@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.
Files changed (208) hide show
  1. package/assets/{AnimatedBackground-DimPo0o6.js → AnimatedBackground-fvzwNhlg.js} +3 -3
  2. package/assets/Assets-C2SMY4Wn.js +1 -0
  3. package/assets/Button-BMI2yWqO.js +74 -0
  4. package/assets/{Cart-DfisnztS.js → Cart-BzFXsMma.js} +1 -1
  5. package/assets/CircularProgress-Cjnyi6sF.js +28 -0
  6. package/assets/Collection-DeiH22k9.js +1 -0
  7. package/assets/{ConstantsUtil-CiDezLbv.js → ConstantsUtil-DrbbN8Db.js} +1 -1
  8. package/assets/{Creator-DXuvF7aY.js → Creator-BRKRY9NQ.js} +1 -1
  9. package/assets/{ExchangeController-DKuss9DL.js → ExchangeController-BsoPlnUg.js} +1 -1
  10. package/assets/GetCredits-Df0EJOrT.js +2 -0
  11. package/assets/{HelpersUtil-BIYA4n9B.js → HelpersUtil-CG8lWgZZ.js} +1 -1
  12. package/assets/ImportListings-DFJCBiyn.js +1 -0
  13. package/assets/ItemDetail-DiMc18RR.js +2 -0
  14. package/assets/{LoadMore-BOCtgPLI.js → LoadMore-7qZApSeo.js} +1 -1
  15. package/assets/{MenuItem-Ci7Oxa0S.js → MenuItem-BNFaj4bv.js} +2 -2
  16. package/assets/MyAssets-ChOIdS7f.js +1 -0
  17. package/assets/{MyFavorites-BzUnpL59.js → MyFavorites-dpxOF1kK.js} +1 -1
  18. package/assets/{MyPurchases-C-MppIV4.js → MyPurchases-Dg0Dl_Ff.js} +1 -1
  19. package/assets/{NetworkUtil-DDES604E.js → NetworkUtil-BI8jZwmc.js} +1 -1
  20. package/assets/{NotFound-stjqjmfW.js → NotFound-BplOnkUp.js} +1 -1
  21. package/assets/{RealCheckout-BXu8QwUw.js → RealCheckout-BRvLBHx9.js} +1 -1
  22. package/assets/{ShopFooterInner-Bw0tZ5jz.js → ShopFooterInner-Bk4iHJAH.js} +3 -3
  23. package/assets/{SkeletonCards-BysJEVmg.js → SkeletonCards-DSpqiDzZ.js} +1 -1
  24. package/assets/{Success-BmFgC1Fj.js → Success-DznSzYm_.js} +1 -1
  25. package/assets/{SwapController-Daflx-KH.js → SwapController-DUcM1Ja2.js} +1 -1
  26. package/assets/{TradeService-mwlprIfz.js → TradeService-CbUgwZEW.js} +1 -1
  27. package/assets/{W3MFrameProviderSingleton-OCCNZtGo.js → W3MFrameProviderSingleton-BS8u2E5h.js} +3 -3
  28. package/assets/{WebCryptoP256-DcxhTaIn.js → WebCryptoP256-BNECkcp8.js} +1 -1
  29. package/assets/{basic-DokGV68e.js → basic-ExMbnGJU.js} +1 -1
  30. package/assets/{biconomy-BFplpB0T.js → biconomy-DE4NulP5.js} +1 -1
  31. package/assets/{browser-DHYOtFa8.js → browser-D_5JuNNR.js} +1 -1
  32. package/assets/{browser-ponyfill-rND5WOqr.js → browser-ponyfill-ClcxEFdz.js} +1 -1
  33. package/assets/{buy-gasless-B5QPf-sE.js → buy-gasless-BCY1xiea.js} +1 -1
  34. package/assets/{buy-Cei5j8eO.js → buy-qZ6pCz4O.js} +1 -1
  35. package/assets/{ccip-38EHg6W8.js → ccip-BItjvNVe.js} +1 -1
  36. package/assets/{ccip-n6rH3sVb.js → ccip-Dc2Sl0Cx.js} +1 -1
  37. package/assets/{chains-Bk629xE3.js → chains-BsN0T6nV.js} +1 -1
  38. package/assets/{collection-dxCKqLM-.js → collection-DJ02EuIR.js} +1 -1
  39. package/assets/{common-CEkVtB9E.js → common-TfzpxC2l.js} +1 -1
  40. package/assets/{controller-DG_iRQPR.js → controller-RTLxVvZ6.js} +2 -2
  41. package/assets/{core-CIi4Ex77.js → core-DqO1PhnS.js} +4 -4
  42. package/assets/{custom-Cjfua0Ef.js → custom-BYzsjJ7t.js} +1 -1
  43. package/assets/{data-capture-DXahe72x.js → data-capture-DXHtqKgM.js} +1 -1
  44. package/assets/decimals-BKxae-RP.js +1 -0
  45. package/assets/{decimals-teeH97v6.js → decimals-CapXBEic.js} +1 -1
  46. package/assets/{detectExtension-DX1a8DfW.js → detectExtension-C019UiWG.js} +1 -1
  47. package/assets/{email-CPaGg29O.js → email-BDtokP8K.js} +1 -1
  48. package/assets/{embedded-wallet-BhVpPp0v.js → embedded-wallet-CpQg8tqs.js} +1 -1
  49. package/assets/emotion-styled.browser.esm-BhzSSuXb.js +1 -0
  50. package/assets/{engine-CwdwAsnd.js → engine-BQqxATpN.js} +1 -1
  51. package/assets/{estimate-l1-fee-BnSv7s_G.js → estimate-l1-fee-D-hSejEm.js} +1 -1
  52. package/assets/eth_estimateGas-Cu6PWoKP.js +1 -0
  53. package/assets/{eth_getStorageAt-DIueLfGz.js → eth_getStorageAt-r25nMq53.js} +1 -1
  54. package/assets/eth_getTransactionCount-IgHrxRqD.js +1 -0
  55. package/assets/{ethereum-CdeRZR9J.js → ethereum-A1QWZFDW.js} +1 -1
  56. package/assets/{ethers-JeCAM1sd.js → ethers-DXxh-eEm.js} +1 -1
  57. package/assets/{extractIPFS-BrP7LeOr.js → extractIPFS-WJH_KjST.js} +1 -1
  58. package/assets/{features-KCpkg70J.js → features-Df2C7VrE.js} +1 -1
  59. package/assets/{fetchTokenMetadata-ZA_LtwkO.js → fetchTokenMetadata-DQlS8SuK.js} +2 -2
  60. package/assets/{fortmatic-B9IU5L1m.js → fortmatic-Beo5lxXY.js} +1 -1
  61. package/assets/get-ecosystem-wallet-info-hp9qo9J3.js +1 -0
  62. package/assets/{getBalance-DGzGIvMz.js → getBalance-D4rmYxNh.js} +2 -2
  63. package/assets/{getInstalledModules-Bx09uT4y.js → getInstalledModules-C8Hva7AE.js} +1 -1
  64. package/assets/{getNFT-Zd5KGmRs.js → getNFT-CBawyAHj.js} +1 -1
  65. package/assets/{getNFT-tiy4hesk.js → getNFT-Dfj2l-Ch.js} +2 -2
  66. package/assets/{hashTypedData-CvnNX2YB.js → hashTypedData-BHGrMNK6.js} +1 -1
  67. package/assets/{hashTypedData-CtOt2WpE.js → hashTypedData-CM9F6RUI.js} +1 -1
  68. package/assets/{import-Ct60HkEi.js → import-Cx-OZqAE.js} +1 -1
  69. package/assets/{in-app-wallet-calls-nAqAaeZM.js → in-app-wallet-calls-Dch1hsg5.js} +1 -1
  70. package/assets/{index-CImDhWkL.js → index-42gEBfTi.js} +2 -2
  71. package/assets/{index-CtPBA1jA.js → index-48uPzbtE.js} +1 -1
  72. package/assets/{index-Ds5QdmMB.js → index-5E9VLIdh.js} +1 -1
  73. package/assets/{index-DXaR1qC5.js → index-9oav_WyD.js} +1 -1
  74. package/assets/index-B-jeDoF7.js +1 -0
  75. package/assets/{index-BKUufNAr.js → index-B0fp_BTU.js} +1 -1
  76. package/assets/{index-O4fffv47.js → index-BAWcl7uQ.js} +1 -1
  77. package/assets/{index-ClaWRN-y.js → index-BBL-hAHr.js} +1 -1
  78. package/assets/{index-OFpebMSe.js → index-BEVNPg7X.js} +3 -3
  79. package/assets/{index-BcyJUD4U.js → index-BOJUx2yW.js} +1 -1
  80. package/assets/{index-NMzNXj-b.js → index-BSCJHKfS.js} +1 -1
  81. package/assets/{index-Doasr1W7.js → index-BXvfWw1i.js} +1 -1
  82. package/assets/{index-CUREiiKP.js → index-BZvR1iax.js} +1 -1
  83. package/assets/{index-B8kuIs26.js → index-Ba8jdmry.js} +1 -1
  84. package/assets/{index-Bgq0v2Vw.js → index-Balk147I.js} +2 -2
  85. package/assets/{index-CSh-BHOv.js → index-BclUryz1.js} +1 -1
  86. package/assets/{index-BLmKUFKr.js → index-Bs_hiiN9.js} +1 -1
  87. package/assets/{index-CmJ_3H94.js → index-Buef3xrK.js} +1 -1
  88. package/assets/{index-Ca3Sav7N.js → index-BwpJa7L4.js} +1 -1
  89. package/assets/{index-C0sZ2G0D.js → index-BzjsXx68.js} +1 -1
  90. package/assets/{index-9GLN8yqL.js → index-C-qe8hE_.js} +1 -1
  91. package/assets/index-CIcEGlWj.js +1 -0
  92. package/assets/{index-ChvdYvQ4.js → index-CJ21qPJU.js} +1 -1
  93. package/assets/{index-CbNdOGip.js → index-CM1EzVrf.js} +1 -1
  94. package/assets/{index-CM4C6c3v.js → index-CN6e_bJW.js} +1 -1
  95. package/assets/{index-BTe18ABT.js → index-CQTErWBm.js} +1 -1
  96. package/assets/{index-DW9-slpM.js → index-CSZn1axc.js} +3 -3
  97. package/assets/{index-ChQKLd7_.js → index-CWDqSaNg.js} +1 -1
  98. package/assets/{index-CCamfLVz.js → index-CaVzt9Zg.js} +1 -1
  99. package/assets/{index-B_xrDWUL.js → index-Cc4Zz6Zy.js} +1 -1
  100. package/assets/{index-DGRE-ml6.js → index-Ccl-BImo.js} +1 -1
  101. package/assets/{index-U6KrdqpT.js → index-Ce01n-03.js} +1 -1
  102. package/assets/{index-t3MAsdpb.js → index-D6jFYOn4.js} +1 -1
  103. package/assets/{index-eOTACaIJ.js → index-DAZ3T5le.js} +1 -1
  104. package/assets/index-DBVEZzhi.js +4 -0
  105. package/assets/{index-D5Mm7yXQ.js → index-DGN5055N.js} +1 -1
  106. package/assets/{index-Zhfk6Aoz.js → index-DHzrcOiN.js} +1 -1
  107. package/assets/index-DIkXA0Hv.js +1 -0
  108. package/assets/{index-qVJufJAm.js → index-DJIAaV2A.js} +1 -1
  109. package/assets/{index-BFVyBGs8.js → index-DUfRRmta.js} +1 -1
  110. package/assets/{index-DvhSyBnM.js → index-Da42Ph0g.js} +2 -2
  111. package/assets/{index-U2hrSY35.js → index-DekR2YhX.js} +1 -1
  112. package/assets/{index-CqQ8Hs5j.js → index-Dit_Tadt.js} +1 -1
  113. package/assets/{index-xd5vYVHb.js → index-Dt4XXlAo.js} +1 -1
  114. package/assets/{index-T0IQCR4g.js → index-DzTAB8XM.js} +1 -1
  115. package/assets/{index-Bg4LriAo.js → index-FyW6lWdg.js} +1 -1
  116. package/assets/{index-CmD3WgD4.js → index-H3dPSebS.js} +1 -1
  117. package/assets/{index-Bt1JjNoo.js → index-K-cpVYNW.js} +1 -1
  118. package/assets/{index-Bqxd3bRY.js → index-KXOxVBmY.js} +1 -1
  119. package/assets/{index-fOgQisFj.css → index-Kb_kdzXZ.css} +1 -1
  120. package/assets/index-L5rl4tyv.js +103 -0
  121. package/assets/{index-Bz7iJIvj.js → index-Py7lPUfJ.js} +1 -1
  122. package/assets/{index-DZHh5kfE.js → index-VxjWNgq4.js} +1 -1
  123. package/assets/{index-B9fMKYcR.js → index-Z24VwtH-.js} +1 -1
  124. package/assets/{index-RyQIoZwA.js → index-aayYBIgE.js} +1 -1
  125. package/assets/index-g06cE3ON.js +1 -0
  126. package/assets/{index-CYwcDn0L.js → index-mRwFYme8.js} +2 -2
  127. package/assets/{index-CIpCj8f1.js → index-r-eIHibn.js} +1 -1
  128. package/assets/index-r9qogMtw.js +1 -0
  129. package/assets/{index-DssZGhOb.js → index-ue8m9AA_.js} +1 -1
  130. package/assets/{index.es-sLZupOx6.js → index.es-BpB0a1Th.js} +1 -1
  131. package/assets/{index.es-CBUy80x9.js → index.es-Dfabzma5.js} +4 -4
  132. package/assets/{index.es-1m0x5CpA.js → index.es-DhN91Wpt.js} +1 -1
  133. package/assets/{localBatchGatewayRequest-Bwch9V5u.js → localBatchGatewayRequest-k-UZ-HMO.js} +1 -1
  134. package/assets/{mana-rate-BrvfDold.js → mana-rate-GO2pCGLs.js} +1 -1
  135. package/assets/{native-C_y7cRlS.js → native-B9_hMdpy.js} +1 -1
  136. package/assets/network-QssBB6oI.js +1 -0
  137. package/assets/{networks-KNRT4yhl.js → networks-Cf-N-9Xq.js} +1 -1
  138. package/assets/{onramp-vni5tJjM.js → onramp-BGEfyVAt.js} +1 -1
  139. package/assets/{openzeppelin-Dm8mC4Oq.js → openzeppelin-Dqbxfcec.js} +1 -1
  140. package/assets/{ownerOf-lof10XBl.js → ownerOf-CljeAL21.js} +1 -1
  141. package/assets/{parseNft-COV0EcO6.js → parseNft-BC_5oKiz.js} +2 -2
  142. package/assets/{parseSignature-Dx8_igyj.js → parseSignature-CtI5iMV2.js} +1 -1
  143. package/assets/{parseSignature-DH_zPldG.js → parseSignature-V_kdzkxI.js} +3 -3
  144. package/assets/{pay-with-exchange-D7fz03Hw.js → pay-with-exchange-CZQdYVAY.js} +1 -1
  145. package/assets/{qr-overlay-B_s_8Smu.js → qr-overlay-BuM1P1vl.js} +3 -3
  146. package/assets/{react-Vu6nbGi5.js → react-CQ5qhqs6.js} +1 -1
  147. package/assets/{receive-Cm4r3Dka.js → receive-DmQKXpZf.js} +1 -1
  148. package/assets/{resolveImplementation-DG9O52l9.js → resolveImplementation-Bv53gP5B.js} +1 -1
  149. package/assets/{rpc-BA6d-g1R.js → rpc-BMKNIejp.js} +1 -1
  150. package/assets/{secp256k1-DqnVksGc.js → secp256k1--hQ4zJbr.js} +1 -1
  151. package/assets/{secp256k1-zTnesHEt.js → secp256k1-D-BnaYDw.js} +1 -1
  152. package/assets/{secp256k1-K3jrkFCF.js → secp256k1-D6E_Hi1m.js} +1 -1
  153. package/assets/{send-batch-transaction-D8RkjDD6.js → send-batch-transaction-Dz6j3z1q.js} +1 -1
  154. package/assets/{send-eip712-transaction-D224ueJ-.js → send-eip712-transaction-DjWFMOzt.js} +2 -2
  155. package/assets/{send-gasless-transaction-B_0JoAQE.js → send-gasless-transaction-CGFByKRT.js} +2 -2
  156. package/assets/{send-D-iD-Eqx.js → send-qU9iYsqh.js} +1 -1
  157. package/assets/{sendRawTransaction-CA5sPEMX.js → sendRawTransaction-B7PaRJhQ.js} +3 -3
  158. package/assets/{serializeTransaction-DoiqxhWF.js → serializeTransaction-BKFBSxXm.js} +1 -1
  159. package/assets/{session-proposal-gostBQZ3.js → session-proposal-B5Mu6CaX.js} +1 -1
  160. package/assets/{session-request-CTrIE5mc.js → session-request-C5RIloQJ.js} +2 -2
  161. package/assets/{sha256-DvVglGNs.js → sha256-CzoB8HGh.js} +1 -1
  162. package/assets/{signing-BNXs2XCn.js → signing-Ck4I48Ky.js} +5 -5
  163. package/assets/{socials-B0f9Npjf.js → socials-CjlOiNOa.js} +1 -1
  164. package/assets/{swaps-CrDXCLmL.js → swaps-DUV5kVh5.js} +1 -1
  165. package/assets/{thirdweb-BHHkLfZd.js → thirdweb-46ahlzaq.js} +3 -3
  166. package/assets/{totalSupply-OMptbxGo.js → totalSupply-juJGV40_.js} +1 -1
  167. package/assets/{trade-encoding-Dbk3clLx.js → trade-encoding-BnwDZb1r.js} +1 -1
  168. package/assets/{transactionReceipt-wg3yR0Lm.js → transactionReceipt-CjIrYUrd.js} +1 -1
  169. package/assets/{transactions-7oX42CZi.js → transactions-C4k8y4fS.js} +1 -1
  170. package/assets/useInfiniteGrid-BA-VoNAn.js +1 -0
  171. package/assets/{utils-BmX8TqzP.js → utils-CebgHLxz.js} +1 -1
  172. package/assets/{verifyHash-D-LCgkGR.js → verifyHash-CRPE73-q.js} +1 -1
  173. package/assets/{w3m-modal-ZsakVEYv.js → w3m-modal-CSsFueoj.js} +1 -1
  174. package/assets/{w3m-modal-BUd4eWHh.js → w3m-modal-DlKBtHap.js} +1 -1
  175. package/assets/{wait-for-tx-receipt-gZ6Dq1Eb.js → wait-for-tx-receipt-C6eRPabX.js} +1 -1
  176. package/assets/{wallet-kind-DtWrr4AZ.js → wallet-kind-BiP1tBJS.js} +1 -1
  177. package/assets/{wallets-C7iol5XW.js → wallets-DNThg_Tf.js} +6 -6
  178. package/assets/{web-connector-Dgg6xNHV.js → web-connector-Bsz2goeK.js} +3 -3
  179. package/assets/{writeContract-Bue8cAhq.js → writeContract-CQyj5ohz.js} +1 -1
  180. package/assets/{zora-sepolia-kNKNf7Kl.js → zora-sepolia-BXcKZl5q.js} +1 -1
  181. package/assets/{zoraTestnet-CrA1iIe2.js → zoraTestnet-D4vOnerF.js} +1 -1
  182. package/index.html +8 -8
  183. package/package.json +2 -2
  184. package/assets/Assets-0rXRECQy.js +0 -1
  185. package/assets/Button-C5iun1df.js +0 -74
  186. package/assets/CircularProgress-e_Dj0fmx.js +0 -28
  187. package/assets/Collection-CAJMA4Fe.js +0 -1
  188. package/assets/FilterBar-CdU8B66A.js +0 -1
  189. package/assets/GetCredits-DrLnYOdO.js +0 -2
  190. package/assets/ImportListings-CZkdcWaF.js +0 -1
  191. package/assets/ItemDetail-BMgOoWU8.js +0 -2
  192. package/assets/Market-B6NMpu2_.js +0 -1
  193. package/assets/MyAssets-DGLbKyUN.js +0 -1
  194. package/assets/SvgIcon-CBDCsycQ.js +0 -1
  195. package/assets/decimals-CN9Xxdem.js +0 -1
  196. package/assets/eth_estimateGas-Ds0QjpUA.js +0 -1
  197. package/assets/eth_getTransactionCount-joBCO4C6.js +0 -1
  198. package/assets/generateUtilityClasses-uRdMg1ON.js +0 -9
  199. package/assets/get-ecosystem-wallet-info-DezSaPim.js +0 -1
  200. package/assets/index-CKwxO0xv.js +0 -95
  201. package/assets/index-CLIR3TTD.js +0 -1
  202. package/assets/index-CQB-2hib.js +0 -1
  203. package/assets/index-CWxLUWXU.js +0 -4
  204. package/assets/index-CmIVXtjA.js +0 -1
  205. package/assets/index-GZKxkqGp.js +0 -1
  206. package/assets/index-l6x72Ai4.js +0 -1
  207. package/assets/network-DjfG_0s1.js +0 -1
  208. package/assets/useInfiniteGrid-D88R70KF.js +0 -1
@@ -1,95 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-l6x72Ai4.js","assets/react-Vu6nbGi5.js","assets/network-DjfG_0s1.js","assets/index-CmIVXtjA.js","assets/SvgIcon-CBDCsycQ.js","assets/generateUtilityClasses-uRdMg1ON.js","assets/colors-LINLm1ux.js","assets/ethers-JeCAM1sd.js","assets/index-CImDhWkL.js","assets/index-CWxLUWXU.js","assets/index-GZKxkqGp.js","assets/Button-C5iun1df.js","assets/CircularProgress-e_Dj0fmx.js","assets/index-CLIR3TTD.js","assets/MenuItem-Ci7Oxa0S.js","assets/AnimatedBackground-DimPo0o6.js","assets/AnimatedBackground-CiurwFBv.css","assets/ShopFooterInner-Bw0tZ5jz.js","assets/TradeService-mwlprIfz.js","assets/index-NMzNXj-b.js","assets/Assets-0rXRECQy.js","assets/FilterBar-CdU8B66A.js","assets/SkeletonCards-BysJEVmg.js","assets/LoadMore-BOCtgPLI.js","assets/useInfiniteGrid-D88R70KF.js","assets/Market-B6NMpu2_.js","assets/mana-rate-BrvfDold.js","assets/buy-Cei5j8eO.js","assets/trade-encoding-Dbk3clLx.js","assets/buy-gasless-B5QPf-sE.js","assets/ItemDetail-BMgOoWU8.js","assets/ItemDetail-Casltmsg.css","assets/Collection-CAJMA4Fe.js","assets/collection-dxCKqLM-.js","assets/collection-Ds5shVfK.css","assets/Creator-DXuvF7aY.js","assets/MyAssets-DGLbKyUN.js","assets/import-Ct60HkEi.js","assets/wallet-kind-DtWrr4AZ.js","assets/MyAssets-BqJHbQOZ.css","assets/MyFavorites-BzUnpL59.js","assets/MyPurchases-C-MppIV4.js","assets/ImportListings-CZkdcWaF.js","assets/ImportListings-Cdx3om4x.css","assets/Cart-DfisnztS.js","assets/GetCredits-DrLnYOdO.js","assets/Success-BmFgC1Fj.js","assets/NotFound-stjqjmfW.js"])))=>i.map(i=>d[i]);
2
- var BD=Object.defineProperty;var HE=e=>{throw TypeError(e)};var kD=(e,t,r)=>t in e?BD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Yn=(e,t,r)=>kD(e,typeof t!="symbol"?t+"":t,r),Ed=(e,t,r)=>t.has(e)||HE("Cannot "+r);var ue=(e,t,r)=>(Ed(e,t,"read from private field"),r?r.call(e):t.get(e)),We=(e,t,r)=>t.has(e)?HE("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),je=(e,t,r,n)=>(Ed(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),rt=(e,t,r)=>(Ed(e,t,"access private method"),r);var Yu=(e,t,r,n)=>({set _(i){je(e,t,i,r)},get _(){return ue(e,t,n)}});import{r as Me,j as J,l as zO,g as WO,R as YO,c as sg,L as Oo,a as c_,m as xn,d as UD,n as FD,o as dr,N as HD,p as VD,B as GD}from"./react-Vu6nbGi5.js";import{g as Sl,p as yl,W as zD,m as WD,h as VE,f as YD}from"./ethers-JeCAM1sd.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 Vo=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(){}},Qi,ei,Wa,LO,xD=(LO=class extends Vo{constructor(){super();We(this,Qi);We(this,ei);We(this,Wa);je(this,Wa,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){ue(this,ei)||this.setEventListener(ue(this,Wa))}onUnsubscribe(){var t;this.hasListeners()||((t=ue(this,ei))==null||t.call(this),je(this,ei,void 0))}setEventListener(t){var r;je(this,Wa,t),(r=ue(this,ei))==null||r.call(this),je(this,ei,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){ue(this,Qi)!==t&&(je(this,Qi,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof ue(this,Qi)=="boolean"?ue(this,Qi):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Qi=new WeakMap,ei=new WeakMap,Wa=new WeakMap,LO),l_=new xD,KD={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},ti,u_,$O,XD=($O=class{constructor(){We(this,ti,KD);We(this,u_,!1)}setTimeoutProvider(e){je(this,ti,e)}setTimeout(e,t){return ue(this,ti).setTimeout(e,t)}clearTimeout(e){ue(this,ti).clearTimeout(e)}setInterval(e,t){return ue(this,ti).setInterval(e,t)}clearInterval(e){ue(this,ti).clearInterval(e)}},ti=new WeakMap,u_=new WeakMap,$O),Ji=new XD;function JD(e){setTimeout(e,0)}var QD=typeof window>"u"||"Deno"in globalThis;function Sr(){}function ZD(e,t){return typeof e=="function"?e(t):e}function og(e){return typeof e=="number"&&e>=0&&e!==1/0}function xO(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ui(e,t){return typeof e=="function"?e(t):e}function Cr(e,t){return typeof e=="function"?e(t):e}function GE(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:a,queryKey:s,stale:o}=e;if(s){if(n){if(t.queryHash!==d_(s,t.options))return!1}else if(!Po(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 zE(e,t){const{exact:r,status:n,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(No(t.options.mutationKey)!==No(a))return!1}else if(!Po(t.options.mutationKey,a))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function d_(e,t){return((t==null?void 0:t.queryKeyHashFn)||No)(e)}function No(e){return JSON.stringify(e,(t,r)=>cg(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function Po(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Po(e[r],t[r])):!1}var ej=Object.prototype.hasOwnProperty;function KO(e,t,r=0){if(e===t)return e;if(r>500)return t;const n=WE(e)&&WE(t);if(!n&&!(cg(e)&&cg(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],p=e[d],f=t[d];if(p===f){u[d]=p,(n?c<a:ej.call(e,d))&&l++;continue}if(p===null||f===null||typeof p!="object"||typeof f!="object"){u[d]=f;continue}const _=KO(p,f,r+1);u[d]=_,_===p&&l++}return a===o&&l===a?e:u}function ug(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 WE(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function cg(e){if(!YE(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!YE(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function YE(e){return Object.prototype.toString.call(e)==="[object Object]"}function tj(e){return new Promise(t=>{Ji.setTimeout(t,e)})}function lg(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?KO(e,t):t}function i6(e){return e}function rj(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function nj(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var f_=Symbol();function XO(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===f_?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function JO(e,t){return typeof e=="function"?e(...t):!!e}function ij(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 Co=(()=>{let e=()=>QD;return{isServer(){return e()},setIsServer(t){e=t}}})();function dg(){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 aj=JD;function sj(){let e=[],t=0,r=o=>{o()},n=o=>{o()},i=aj;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 Zt=sj(),Ya,ri,xa,qO,oj=(qO=class extends Vo{constructor(){super();We(this,Ya,!0);We(this,ri);We(this,xa);je(this,xa,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(){ue(this,ri)||this.setEventListener(ue(this,xa))}onUnsubscribe(){var t;this.hasListeners()||((t=ue(this,ri))==null||t.call(this),je(this,ri,void 0))}setEventListener(t){var r;je(this,xa,t),(r=ue(this,ri))==null||r.call(this),je(this,ri,t(this.setOnline.bind(this)))}setOnline(t){ue(this,Ya)!==t&&(je(this,Ya,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return ue(this,Ya)}},Ya=new WeakMap,ri=new WeakMap,xa=new WeakMap,qO),Il=new oj;function uj(e){return Math.min(1e3*2**e,3e4)}function QO(e){return(e??"online")==="online"?Il.isOnline():!0}var fg=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function ZO(e){let t=!1,r=0,n;const i=dg(),a=()=>i.status!=="pending",s=R=>{var w;if(!a()){const O=new fg(R);p(O),(w=e.onCancel)==null||w.call(e,O)}},o=()=>{t=!0},u=()=>{t=!1},l=()=>l_.isFocused()&&(e.networkMode==="always"||Il.isOnline())&&e.canRun(),c=()=>QO(e.networkMode)&&e.canRun(),d=R=>{a()||(n==null||n(),i.resolve(R))},p=R=>{a()||(n==null||n(),i.reject(R))},f=()=>new Promise(R=>{var w;n=O=>{(a()||l())&&R(O)},(w=e.onPause)==null||w.call(e)}).then(()=>{var R;n=void 0,a()||(R=e.onContinue)==null||R.call(e)}),_=()=>{if(a())return;let R;const w=r===0?e.initialPromise:void 0;try{R=w??e.fn()}catch(O){R=Promise.reject(O)}Promise.resolve(R).then(d).catch(O=>{var v;if(a())return;const h=e.retry??(Co.isServer()?0:3),T=e.retryDelay??uj,b=typeof T=="function"?T(r,O):T,m=h===!0||typeof h=="number"&&r<h||typeof h=="function"&&h(r,O);if(t||!m){p(O);return}r++,(v=e.onFail)==null||v.call(e,r,O),tj(b).then(()=>l()?void 0:f()).then(()=>{t?p(O):_()})})};return{promise:i,status:()=>i.status,cancel:s,continue:()=>(n==null||n(),i),cancelRetry:o,continueRetry:u,canStart:c,start:()=>(c()?_():f().then(_),i)}}var Zi,BO,eN=(BO=class{constructor(){We(this,Zi)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),og(this.gcTime)&&je(this,Zi,Ji.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Co.isServer()?1/0:300*1e3))}clearGcTimeout(){ue(this,Zi)!==void 0&&(Ji.clearTimeout(ue(this,Zi)),je(this,Zi,void 0))}},Zi=new WeakMap,BO);function cj(e){return{onFetch:(t,r)=>{var c,d,p,f,_;const n=t.options,i=(p=(d=(c=t.fetchOptions)==null?void 0:c.meta)==null?void 0:d.fetchMore)==null?void 0:p.direction,a=((f=t.state.data)==null?void 0:f.pages)||[],s=((_=t.state.data)==null?void 0:_.pageParams)||[];let o={pages:[],pageParams:[]},u=0;const l=async()=>{let R=!1;const w=T=>{ij(T,()=>t.signal,()=>R=!0)},O=XO(t.options,t.fetchOptions),h=async(T,b,m)=>{if(R)return Promise.reject(t.signal.reason);if(b==null&&T.pages.length)return Promise.resolve(T);const A=(()=>{const Y={client:t.client,queryKey:t.queryKey,pageParam:b,direction:m?"backward":"forward",meta:t.options.meta};return w(Y),Y})(),P=await O(A),{maxPages:q}=t.options,z=m?nj:rj;return{pages:z(T.pages,P,q),pageParams:z(T.pageParams,b,q)}};if(i&&a.length){const T=i==="backward",b=T?tN:pg,m={pages:a,pageParams:s},v=b(n,m);o=await h(m,v,T)}else{const T=e??a.length;do{const b=u===0?s[0]??n.initialPageParam:pg(n,o);if(u>0&&b==null)break;o=await h(o,b),u++}while(u<T)}return o};t.options.persister?t.fetchFn=()=>{var R,w;return(w=(R=t.options).persister)==null?void 0:w.call(R,l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=l}}}function pg(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 tN(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 a6(e,t){return t?pg(e,t)!=null:!1}function s6(e,t){return!t||!e.getPreviousPageParam?!1:tN(e,t)!=null}var Ka,ea,Xa,jr,ta,xt,Bo,ra,Pr,rN,Ln,kO,lj=(kO=class extends eN{constructor(t){super();We(this,Pr);We(this,Ka);We(this,ea);We(this,Xa);We(this,jr);We(this,ta);We(this,xt);We(this,Bo);We(this,ra);je(this,ra,!1),je(this,Bo,t.defaultOptions),this.setOptions(t.options),this.observers=[],je(this,ta,t.client),je(this,jr,ue(this,ta).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,je(this,ea,KE(this.options)),this.state=t.state??ue(this,ea),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return ue(this,Ka)}get promise(){var t;return(t=ue(this,xt))==null?void 0:t.promise}setOptions(t){if(this.options={...ue(this,Bo),...t},t!=null&&t._type&&je(this,Ka,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=KE(this.options);r.data!==void 0&&(this.setState(xE(r.data,r.dataUpdatedAt)),je(this,ea,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&ue(this,jr).remove(this)}setData(t,r){const n=lg(this.state.data,t,this.options);return rt(this,Pr,Ln).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,Pr,Ln).call(this,{type:"setState",state:t})}cancel(t){var n,i;const r=(n=ue(this,xt))==null?void 0:n.promise;return(i=ue(this,xt))==null||i.cancel(t),r?r.then(Sr).catch(Sr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return ue(this,ea)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Cr(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===f_||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>ui(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:!xO(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=ue(this,xt))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=ue(this,xt))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),ue(this,jr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(ue(this,xt)&&(ue(this,ra)||rt(this,Pr,rN).call(this)?ue(this,xt).cancel({revert:!0}):ue(this,xt).cancelRetry()),this.scheduleGc()),ue(this,jr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||rt(this,Pr,Ln).call(this,{type:"invalidate"})}async fetch(t,r){var l,c,d,p,f,_,R,w,O,h,T;if(this.state.fetchStatus!=="idle"&&((l=ue(this,xt))==null?void 0:l.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(ue(this,xt))return ue(this,xt).continueRetry(),ue(this,xt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const b=this.observers.find(m=>m.options.queryFn);b&&this.setOptions(b.options)}const n=new AbortController,i=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(je(this,ra,!0),n.signal)})},a=()=>{const b=XO(this.options,r),v=(()=>{const A={client:ue(this,ta),queryKey:this.queryKey,meta:this.meta};return i(A),A})();return je(this,ra,!1),this.options.persister?this.options.persister(b,v,this):b(v)},o=(()=>{const b={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:ue(this,ta),state:this.state,fetchFn:a};return i(b),b})(),u=ue(this,Ka)==="infinite"?cj(this.options.pages):this.options.behavior;u==null||u.onFetch(o,this),je(this,Xa,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=o.fetchOptions)==null?void 0:c.meta))&&rt(this,Pr,Ln).call(this,{type:"fetch",meta:(d=o.fetchOptions)==null?void 0:d.meta}),je(this,xt,ZO({initialPromise:r==null?void 0:r.initialPromise,fn:o.fetchFn,onCancel:b=>{b instanceof fg&&b.revert&&this.setState({...ue(this,Xa),fetchStatus:"idle"}),n.abort()},onFail:(b,m)=>{rt(this,Pr,Ln).call(this,{type:"failed",failureCount:b,error:m})},onPause:()=>{rt(this,Pr,Ln).call(this,{type:"pause"})},onContinue:()=>{rt(this,Pr,Ln).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}));try{const b=await ue(this,xt).start();if(b===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(b),(f=(p=ue(this,jr).config).onSuccess)==null||f.call(p,b,this),(R=(_=ue(this,jr).config).onSettled)==null||R.call(_,b,this.state.error,this),b}catch(b){if(b instanceof fg){if(b.silent)return ue(this,xt).promise;if(b.revert){if(this.state.data===void 0)throw b;return this.state.data}}throw rt(this,Pr,Ln).call(this,{type:"error",error:b}),(O=(w=ue(this,jr).config).onError)==null||O.call(w,b,this),(T=(h=ue(this,jr).config).onSettled)==null||T.call(h,this.state.data,b,this),b}finally{this.scheduleGc()}}},Ka=new WeakMap,ea=new WeakMap,Xa=new WeakMap,jr=new WeakMap,ta=new WeakMap,xt=new WeakMap,Bo=new WeakMap,ra=new WeakMap,Pr=new WeakSet,rN=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Ln=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,...nN(n.data,this.options),fetchMeta:t.meta??null};case"success":const i={...n,...xE(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return je(this,Xa,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),Zt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),ue(this,jr).notify({query:this,type:"updated",action:t})})},kO);function nN(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:QO(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function xE(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function KE(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 Tr,st,ko,pr,na,Ja,Bn,ni,Uo,Qa,Za,ia,aa,ii,es,_t,Qs,mg,hg,yg,gg,_g,Eg,vg,iN,UO,dj=(UO=class extends Vo{constructor(t,r){super();We(this,_t);We(this,Tr);We(this,st);We(this,ko);We(this,pr);We(this,na);We(this,Ja);We(this,Bn);We(this,ni);We(this,Uo);We(this,Qa);We(this,Za);We(this,ia);We(this,aa);We(this,ii);We(this,es,new Set);this.options=r,je(this,Tr,t),je(this,ni,null),je(this,Bn,dg()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(ue(this,st).addObserver(this),XE(ue(this,st),this.options)?rt(this,_t,Qs).call(this):this.updateResult(),rt(this,_t,gg).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return bg(ue(this,st),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return bg(ue(this,st),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,rt(this,_t,_g).call(this),rt(this,_t,Eg).call(this),ue(this,st).removeObserver(this)}setOptions(t){const r=this.options,n=ue(this,st);if(this.options=ue(this,Tr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Cr(this.options.enabled,ue(this,st))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");rt(this,_t,vg).call(this),ue(this,st).setOptions(this.options),r._defaulted&&!ug(this.options,r)&&ue(this,Tr).getQueryCache().notify({type:"observerOptionsUpdated",query:ue(this,st),observer:this});const i=this.hasListeners();i&&JE(ue(this,st),n,this.options,r)&&rt(this,_t,Qs).call(this),this.updateResult(),i&&(ue(this,st)!==n||Cr(this.options.enabled,ue(this,st))!==Cr(r.enabled,ue(this,st))||ui(this.options.staleTime,ue(this,st))!==ui(r.staleTime,ue(this,st)))&&rt(this,_t,mg).call(this);const a=rt(this,_t,hg).call(this);i&&(ue(this,st)!==n||Cr(this.options.enabled,ue(this,st))!==Cr(r.enabled,ue(this,st))||a!==ue(this,ii))&&rt(this,_t,yg).call(this,a)}getOptimisticResult(t){const r=ue(this,Tr).getQueryCache().build(ue(this,Tr),t),n=this.createResult(r,t);return pj(this,n)&&(je(this,pr,n),je(this,Ja,this.options),je(this,na,ue(this,st).state)),n}getCurrentResult(){return ue(this,pr)}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&&ue(this,Bn).status==="pending"&&ue(this,Bn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,i))})}trackProp(t){ue(this,es).add(t)}getCurrentQuery(){return ue(this,st)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=ue(this,Tr).defaultQueryOptions(t),n=ue(this,Tr).getQueryCache().build(ue(this,Tr),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return rt(this,_t,Qs).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),ue(this,pr)))}createResult(t,r){var q;const n=ue(this,st),i=this.options,a=ue(this,pr),s=ue(this,na),o=ue(this,Ja),l=t!==n?t.state:ue(this,ko),{state:c}=t;let d={...c},p=!1,f;if(r._optimisticResults){const z=this.hasListeners(),Y=!z&&XE(t,r),W=z&&JE(t,n,r,i);(Y||W)&&(d={...d,...nN(c.data,t.options)}),r._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:_,errorUpdatedAt:R,status:w}=d;f=d.data;let O=!1;if(r.placeholderData!==void 0&&f===void 0&&w==="pending"){let z;a!=null&&a.isPlaceholderData&&r.placeholderData===(o==null?void 0:o.placeholderData)?(z=a.data,O=!0):z=typeof r.placeholderData=="function"?r.placeholderData((q=ue(this,Za))==null?void 0:q.state.data,ue(this,Za)):r.placeholderData,z!==void 0&&(w="success",f=lg(a==null?void 0:a.data,z,r),p=!0)}if(r.select&&f!==void 0&&!O)if(a&&f===(s==null?void 0:s.data)&&r.select===ue(this,Uo))f=ue(this,Qa);else try{je(this,Uo,r.select),f=r.select(f),f=lg(a==null?void 0:a.data,f,r),je(this,Qa,f),je(this,ni,null)}catch(z){je(this,ni,z)}ue(this,ni)&&(_=ue(this,ni),f=ue(this,Qa),R=Date.now(),w="error");const h=d.fetchStatus==="fetching",T=w==="pending",b=w==="error",m=T&&h,v=f!==void 0,P={status:w,fetchStatus:d.fetchStatus,isPending:T,isSuccess:w==="success",isError:b,isInitialLoading:m,isLoading:m,data:f,dataUpdatedAt:d.dataUpdatedAt,error:_,errorUpdatedAt:R,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:d.dataUpdateCount>l.dataUpdateCount||d.errorUpdateCount>l.errorUpdateCount,isFetching:h,isRefetching:h&&!T,isLoadingError:b&&!v,isPaused:d.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:b&&v,isStale:p_(t,r),refetch:this.refetch,promise:ue(this,Bn),isEnabled:Cr(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const z=P.data!==void 0,Y=P.status==="error"&&!z,W=ce=>{Y?ce.reject(P.error):z&&ce.resolve(P.data)},U=()=>{const ce=je(this,Bn,P.promise=dg());W(ce)},F=ue(this,Bn);switch(F.status){case"pending":t.queryHash===n.queryHash&&W(F);break;case"fulfilled":(Y||P.data!==F.value)&&U();break;case"rejected":(!Y||P.error!==F.reason)&&U();break}}return P}updateResult(){const t=ue(this,pr),r=this.createResult(ue(this,st),this.options);if(je(this,na,ue(this,st).state),je(this,Ja,this.options),ue(this,na).data!==void 0&&je(this,Za,ue(this,st)),ug(r,t))return;je(this,pr,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!ue(this,es).size)return!0;const s=new Set(a??ue(this,es));return this.options.throwOnError&&s.add("error"),Object.keys(ue(this,pr)).some(o=>{const u=o;return ue(this,pr)[u]!==t[u]&&s.has(u)})};rt(this,_t,iN).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&rt(this,_t,gg).call(this)}},Tr=new WeakMap,st=new WeakMap,ko=new WeakMap,pr=new WeakMap,na=new WeakMap,Ja=new WeakMap,Bn=new WeakMap,ni=new WeakMap,Uo=new WeakMap,Qa=new WeakMap,Za=new WeakMap,ia=new WeakMap,aa=new WeakMap,ii=new WeakMap,es=new WeakMap,_t=new WeakSet,Qs=function(t){rt(this,_t,vg).call(this);let r=ue(this,st).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Sr)),r},mg=function(){rt(this,_t,_g).call(this);const t=ui(this.options.staleTime,ue(this,st));if(Co.isServer()||ue(this,pr).isStale||!og(t))return;const n=xO(ue(this,pr).dataUpdatedAt,t)+1;je(this,ia,Ji.setTimeout(()=>{ue(this,pr).isStale||this.updateResult()},n))},hg=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(ue(this,st)):this.options.refetchInterval)??!1},yg=function(t){rt(this,_t,Eg).call(this),je(this,ii,t),!(Co.isServer()||Cr(this.options.enabled,ue(this,st))===!1||!og(ue(this,ii))||ue(this,ii)===0)&&je(this,aa,Ji.setInterval(()=>{(this.options.refetchIntervalInBackground||l_.isFocused())&&rt(this,_t,Qs).call(this)},ue(this,ii)))},gg=function(){rt(this,_t,mg).call(this),rt(this,_t,yg).call(this,rt(this,_t,hg).call(this))},_g=function(){ue(this,ia)!==void 0&&(Ji.clearTimeout(ue(this,ia)),je(this,ia,void 0))},Eg=function(){ue(this,aa)!==void 0&&(Ji.clearInterval(ue(this,aa)),je(this,aa,void 0))},vg=function(){const t=ue(this,Tr).getQueryCache().build(ue(this,Tr),this.options);if(t===ue(this,st))return;const r=ue(this,st);je(this,st,t),je(this,ko,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},iN=function(t){Zt.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(ue(this,pr))}),ue(this,Tr).getQueryCache().notify({query:ue(this,st),type:"observerResultsUpdated"})})},UO);function fj(e,t){return Cr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Cr(t.retryOnMount,e)===!1)}function XE(e,t){return fj(e,t)||e.state.data!==void 0&&bg(e,t,t.refetchOnMount)}function bg(e,t,r){if(Cr(t.enabled,e)!==!1&&ui(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&p_(e,t)}return!1}function JE(e,t,r,n){return(e!==t||Cr(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&p_(e,r)}function p_(e,t){return Cr(t.enabled,e)!==!1&&e.isStaleByTime(ui(t.staleTime,e))}function pj(e,t){return!ug(e.getCurrentResult(),t)}var Fo,hn,ur,sa,yn,Jn,FO,mj=(FO=class extends eN{constructor(t){super();We(this,yn);We(this,Fo);We(this,hn);We(this,ur);We(this,sa);je(this,Fo,t.client),this.mutationId=t.mutationId,je(this,ur,t.mutationCache),je(this,hn,[]),this.state=t.state||hj(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){ue(this,hn).includes(t)||(ue(this,hn).push(t),this.clearGcTimeout(),ue(this,ur).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){je(this,hn,ue(this,hn).filter(r=>r!==t)),this.scheduleGc(),ue(this,ur).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){ue(this,hn).length||(this.state.status==="pending"?this.scheduleGc():ue(this,ur).remove(this))}continue(){var t;return((t=ue(this,sa))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,o,u,l,c,d,p,f,_,R,w,O,h,T,b,m,v,A;const r=()=>{rt(this,yn,Jn).call(this,{type:"continue"})},n={client:ue(this,Fo),meta:this.options.meta,mutationKey:this.options.mutationKey};je(this,sa,ZO({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(P,q)=>{rt(this,yn,Jn).call(this,{type:"failed",failureCount:P,error:q})},onPause:()=>{rt(this,yn,Jn).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>ue(this,ur).canRun(this)}));const i=this.state.status==="pending",a=!ue(this,sa).canStart();try{if(i)r();else{rt(this,yn,Jn).call(this,{type:"pending",variables:t,isPaused:a}),ue(this,ur).config.onMutate&&await ue(this,ur).config.onMutate(t,this,n);const q=await((o=(s=this.options).onMutate)==null?void 0:o.call(s,t,n));q!==this.state.context&&rt(this,yn,Jn).call(this,{type:"pending",context:q,variables:t,isPaused:a})}const P=await ue(this,sa).start();return await((l=(u=ue(this,ur).config).onSuccess)==null?void 0:l.call(u,P,t,this.state.context,this,n)),await((d=(c=this.options).onSuccess)==null?void 0:d.call(c,P,t,this.state.context,n)),await((f=(p=ue(this,ur).config).onSettled)==null?void 0:f.call(p,P,null,this.state.variables,this.state.context,this,n)),await((R=(_=this.options).onSettled)==null?void 0:R.call(_,P,null,t,this.state.context,n)),rt(this,yn,Jn).call(this,{type:"success",data:P}),P}catch(P){try{await((O=(w=ue(this,ur).config).onError)==null?void 0:O.call(w,P,t,this.state.context,this,n))}catch(q){Promise.reject(q)}try{await((T=(h=this.options).onError)==null?void 0:T.call(h,P,t,this.state.context,n))}catch(q){Promise.reject(q)}try{await((m=(b=ue(this,ur).config).onSettled)==null?void 0:m.call(b,void 0,P,this.state.variables,this.state.context,this,n))}catch(q){Promise.reject(q)}try{await((A=(v=this.options).onSettled)==null?void 0:A.call(v,void 0,P,t,this.state.context,n))}catch(q){Promise.reject(q)}throw rt(this,yn,Jn).call(this,{type:"error",error:P}),P}finally{ue(this,ur).runNext(this)}}},Fo=new WeakMap,hn=new WeakMap,ur=new WeakMap,sa=new WeakMap,yn=new WeakSet,Jn=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),Zt.batch(()=>{ue(this,hn).forEach(n=>{n.onMutationUpdate(t)}),ue(this,ur).notify({mutation:this,type:"updated",action:t})})},FO);function hj(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var kn,xr,Ho,HO,yj=(HO=class extends Vo{constructor(t={}){super();We(this,kn);We(this,xr);We(this,Ho);this.config=t,je(this,kn,new Set),je(this,xr,new Map),je(this,Ho,0)}build(t,r,n){const i=new mj({client:t,mutationCache:this,mutationId:++Yu(this,Ho)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){ue(this,kn).add(t);const r=xu(t);if(typeof r=="string"){const n=ue(this,xr).get(r);n?n.push(t):ue(this,xr).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(ue(this,kn).delete(t)){const r=xu(t);if(typeof r=="string"){const n=ue(this,xr).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&ue(this,xr).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=xu(t);if(typeof r=="string"){const n=ue(this,xr).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=xu(t);if(typeof r=="string"){const i=(n=ue(this,xr).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(){Zt.batch(()=>{ue(this,kn).forEach(t=>{this.notify({type:"removed",mutation:t})}),ue(this,kn).clear(),ue(this,xr).clear()})}getAll(){return Array.from(ue(this,kn))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>zE(r,n))}findAll(t={}){return this.getAll().filter(r=>zE(t,r))}notify(t){Zt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Zt.batch(()=>Promise.all(t.map(r=>r.continue().catch(Sr))))}},kn=new WeakMap,xr=new WeakMap,Ho=new WeakMap,HO);function xu(e){var t;return(t=e.options.scope)==null?void 0:t.id}var gn,VO,gj=(VO=class extends Vo{constructor(t={}){super();We(this,gn);this.config=t,je(this,gn,new Map)}build(t,r,n){const i=r.queryKey,a=r.queryHash??d_(i,r);let s=this.get(a);return s||(s=new lj({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(s)),s}add(t){ue(this,gn).has(t.queryHash)||(ue(this,gn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=ue(this,gn).get(t.queryHash);r&&(t.destroy(),r===t&&ue(this,gn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Zt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return ue(this,gn).get(t)}getAll(){return[...ue(this,gn).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>GE(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>GE(t,n)):r}notify(t){Zt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Zt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Zt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},gn=new WeakMap,VO),Bt,ai,si,ts,rs,oi,ns,is,GO,_j=(GO=class{constructor(e={}){We(this,Bt);We(this,ai);We(this,si);We(this,ts);We(this,rs);We(this,oi);We(this,ns);We(this,is);je(this,Bt,e.queryCache||new gj),je(this,ai,e.mutationCache||new yj),je(this,si,e.defaultOptions||{}),je(this,ts,new Map),je(this,rs,new Map),je(this,oi,0)}mount(){Yu(this,oi)._++,ue(this,oi)===1&&(je(this,ns,l_.subscribe(async e=>{e&&(await this.resumePausedMutations(),ue(this,Bt).onFocus())})),je(this,is,Il.subscribe(async e=>{e&&(await this.resumePausedMutations(),ue(this,Bt).onOnline())})))}unmount(){var e,t;Yu(this,oi)._--,ue(this,oi)===0&&((e=ue(this,ns))==null||e.call(this),je(this,ns,void 0),(t=ue(this,is))==null||t.call(this),je(this,is,void 0))}isFetching(e){return ue(this,Bt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return ue(this,ai).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=ue(this,Bt).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=ue(this,Bt).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(ui(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return ue(this,Bt).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=ue(this,Bt).get(n.queryHash),a=i==null?void 0:i.state.data,s=ZD(t,a);if(s!==void 0)return ue(this,Bt).build(this,n).setData(s,{...r,manual:!0})}setQueriesData(e,t,r){return Zt.batch(()=>ue(this,Bt).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=ue(this,Bt).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=ue(this,Bt);Zt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=ue(this,Bt);return Zt.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Zt.batch(()=>ue(this,Bt).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(Sr).catch(Sr)}invalidateQueries(e,t={}){return Zt.batch(()=>(ue(this,Bt).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=Zt.batch(()=>ue(this,Bt).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,r);return r.throwOnError||(a=a.catch(Sr)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then(Sr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=ue(this,Bt).build(this,t);return r.isStaleByTime(ui(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Sr).catch(Sr)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Sr).catch(Sr)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Il.isOnline()?ue(this,ai).resumePausedMutations():Promise.resolve()}getQueryCache(){return ue(this,Bt)}getMutationCache(){return ue(this,ai)}getDefaultOptions(){return ue(this,si)}setDefaultOptions(e){je(this,si,e)}setQueryDefaults(e,t){ue(this,ts).set(No(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...ue(this,ts).values()],r={};return t.forEach(n=>{Po(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){ue(this,rs).set(No(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...ue(this,rs).values()],r={};return t.forEach(n=>{Po(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...ue(this,si).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=d_(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===f_&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...ue(this,si).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){ue(this,Bt).clear(),ue(this,ai).clear()}},Bt=new WeakMap,ai=new WeakMap,si=new WeakMap,ts=new WeakMap,rs=new WeakMap,oi=new WeakMap,ns=new WeakMap,is=new WeakMap,GO),aN=Me.createContext(void 0),Ej=e=>{const t=Me.useContext(aN);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},vj=({client:e,children:t})=>(Me.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),J.jsx(aN.Provider,{value:e,children:t})),sN=Me.createContext(!1),bj=()=>Me.useContext(sN);sN.Provider;function Tj(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Sj=Me.createContext(Tj()),Ij=()=>Me.useContext(Sj),Rj=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?JO(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},wj=e=>{Me.useEffect(()=>{e.clearReset()},[e])},Aj=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||JO(r,[e.error,n])),Oj=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))}},Nj=(e,t)=>e.isLoading&&e.isFetching&&!t,Pj=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,QE=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function Cj(e,t,r){var f,_,R,w;const n=bj(),i=Ij(),a=Ej(),s=a.defaultQueryOptions(e);(_=(f=a.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||_.call(f,s);const o=a.getQueryCache().get(s.queryHash),u=e.subscribed!==!1;s._optimisticResults=n?"isRestoring":u?"optimistic":void 0,Oj(s),Rj(s,i,o),wj(i);const l=!a.getQueryCache().get(s.queryHash),[c]=Me.useState(()=>new t(a,s)),d=c.getOptimisticResult(s),p=!n&&u;if(Me.useSyncExternalStore(Me.useCallback(O=>{const h=p?c.subscribe(Zt.batchCalls(O)):Sr;return c.updateResult(),h},[c,p]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),Me.useEffect(()=>{c.setOptions(s)},[s,c]),Pj(s,d))throw QE(s,c,i);if(Aj({result:d,errorResetBoundary:i,throwOnError:s.throwOnError,query:o,suspense:s.suspense}))throw d.error;if((w=(R=a.getDefaultOptions().queries)==null?void 0:R._experimental_afterQuery)==null||w.call(R,s,d),s.experimental_prefetchInRender&&!Co.isServer()&&Nj(d,n)){const O=l?QE(s,c,i):o==null?void 0:o.promise;O==null||O.catch(Sr).finally(()=>{c.updateResult()})}return s.notifyOnChangeProps?d:c.trackResult(d)}function Ll(e,t){return Cj(e,dj)}const Mj="modulepreload",Dj=function(e){return"https://cdn.decentraland.org/@dcl/shop/0.1.0-29337358135.commit-2e4bf7e/"+e},ZE={},Gt=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=Dj(l),l in ZE)return;ZE[l]=!0;const c=l.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${d}`))return;const p=document.createElement("link");if(p.rel=c?"stylesheet":Mj,c||(p.as="script"),p.crossOrigin="",p.href=l,u&&p.setAttribute("nonce",u),document.head.appendChild(p),c)return new Promise((f,_)=>{p.addEventListener("load",f),p.addEventListener("error",()=>_(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)})},oN=Object.prototype.toString;function m_(e){switch(oN.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return Fn(e,Error)}}function hs(e,t){return oN.call(e)===`[object ${t}]`}function h_(e){return hs(e,"ErrorEvent")}function ev(e){return hs(e,"DOMError")}function jj(e){return hs(e,"DOMException")}function vn(e){return hs(e,"String")}function y_(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function g_(e){return e===null||y_(e)||typeof e!="object"&&typeof e!="function"}function ca(e){return hs(e,"Object")}function $l(e){return typeof Event<"u"&&Fn(e,Event)}function Lj(e){return typeof Element<"u"&&Fn(e,Element)}function $j(e){return hs(e,"RegExp")}function ys(e){return!!(e&&e.then&&typeof e.then=="function")}function qj(e){return ca(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function uN(e){return typeof e=="number"&&e!==e}function Fn(e,t){try{return e instanceof t}catch{return!1}}function cN(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function Ua(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function tv(e,t){if(!Array.isArray(e))return"";const r=[];for(let n=0;n<e.length;n++){const i=e[n];try{cN(i)?r.push("[VueViewModel]"):r.push(String(i))}catch{r.push("[value cannot be serialized]")}}return r.join(t)}function Bj(e,t,r=!1){return vn(e)?$j(t)?t.test(e):vn(t)?r?e===t:e.includes(t):!1:!1}function Go(e,t=[],r=!1){return t.some(n=>Bj(e,n,r))}function kj(e,t,r=250,n,i,a,s){if(!a.exception||!a.exception.values||!s||!Fn(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=Uj(Tg(e,t,i,s.originalException,n,a.exception.values,o,0),r))}function Tg(e,t,r,n,i,a,s,o){if(a.length>=r+1)return a;let u=[...a];if(Fn(n[i],Error)){rv(s,o);const l=e(t,n[i]),c=u.length;nv(l,i,c,o),u=Tg(e,t,r,n[i],i,[l,...u],l,c)}return Array.isArray(n.errors)&&n.errors.forEach((l,c)=>{if(Fn(l,Error)){rv(s,o);const d=e(t,l),p=u.length;nv(d,`errors[${c}]`,p,o),u=Tg(e,t,r,l,i,[d,...u],d,p)}}),u}function rv(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 nv(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 Uj(e,t){return e.map(r=>(r.value&&(r.value=Ua(r.value,t)),r))}function Ku(e){return e&&e.Math==Math?e:void 0}const ot=typeof globalThis=="object"&&Ku(globalThis)||typeof window=="object"&&Ku(window)||typeof self=="object"&&Ku(self)||typeof Sl=="object"&&Ku(Sl)||(function(){return this})()||{};function __(){return ot}function ql(e,t,r){const n=r||ot,i=n.__SENTRY__=n.__SENTRY__||{};return i[e]||(i[e]=t())}const Fa=__(),Fj=80;function as(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||Fj;for(;r&&a++<n&&(l=Hj(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 Hj(e,t){const r=e,n=[];let i,a,s,o,u;if(!r||!r.tagName)return"";if(Fa.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&&vn(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 Vj(){try{return Fa.document.location.href}catch{return""}}function Gj(e){return Fa.document&&Fa.document.querySelector?Fa.document.querySelector(e):null}function lN(e){if(!Fa.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 gs=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,zj="Sentry Logger ",Sg=["debug","info","warn","error","log","assert","trace"],Rl={};function zo(e){if(!("console"in ot))return e();const t=ot.console,r={},n=Object.keys(Rl);n.forEach(i=>{const a=Rl[i];r[i]=t[i],t[i]=a});try{return e()}finally{n.forEach(i=>{t[i]=r[i]})}}function Wj(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return gs?Sg.forEach(r=>{t[r]=(...n)=>{e&&zo(()=>{ot.console[r](`${zj}[${r}]:`,...n)})}}):Sg.forEach(r=>{t[r]=()=>{}}),t}const Re=Wj(),Yj=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function xj(e){return e==="http"||e==="https"}function ha(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 Kj(e){const t=Yj.exec(e);if(!t){zo(()=>{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 dN({host:a,pass:i,path:u,projectId:l,port:s,protocol:r,publicKey:n})}function dN(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Xj(e){if(!gs)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+$/)?xj(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 fN(e){const t=typeof e=="string"?Kj(e):dN(e);if(!(!t||!Xj(t)))return t}class _n 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 tr(e,t,r){if(!(t in e))return;const n=e[t],i=r(n);typeof i=="function"&&pN(i,n),e[t]=i}function la(e,t,r){try{Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0})}catch{gs&&Re.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function pN(e,t){try{const r=t.prototype||{};e.prototype=t.prototype=r,la(e,"__sentry_original__",t)}catch{}}function E_(e){return e.__sentry_original__}function Jj(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function mN(e){if(m_(e))return{message:e.message,name:e.name,stack:e.stack,...av(e)};if($l(e)){const t={type:e.type,target:iv(e.target),currentTarget:iv(e.currentTarget),...av(e)};return typeof CustomEvent<"u"&&Fn(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function iv(e){try{return Lj(e)?as(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function av(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 Qj(e,t=40){const r=Object.keys(mN(e));if(r.sort(),!r.length)return"[object has no keys]";if(r[0].length>=t)return Ua(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:Ua(i,t)}return""}function Ht(e){return Ig(e,new Map)}function Ig(e,t){if(Zj(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]=Ig(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(Ig(i,t))}),n}return e}function Zj(e){if(!ca(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}const hN=50,sv=/\(error: (.*)\)/,ov=/captureMessage|captureException/;function yN(...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=sv.test(o)?o.replace(sv,"$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>=hN)break}}return tL(i)}}function eL(e){return Array.isArray(e)?yN(...e):e}function tL(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(t[t.length-1].function||"")&&t.pop(),t.reverse(),ov.test(t[t.length-1].function||"")&&(t.pop(),ov.test(t[t.length-1].function||"")&&t.pop()),t.slice(0,hN).map(r=>({...r,filename:r.filename||t[t.length-1].filename,function:r.function||"?"}))}const vd="<anonymous>";function Hn(e){try{return!e||typeof e!="function"?vd:e.name||vd}catch{return vd}}const gl={},uv={};function ya(e,t){gl[e]=gl[e]||[],gl[e].push(t)}function ga(e,t){uv[e]||(t(),uv[e]=!0)}function Xr(e,t){const r=e&&gl[e];if(r)for(const n of r)try{n(t)}catch(i){gs&&Re.error(`Error while triggering instrumentation handler.
4
- Type: ${e}
5
- Name: ${Hn(n)}
6
- Error:`,i)}}function rL(e){const t="console";ya(t,e),ga(t,nL)}function nL(){"console"in ot&&Sg.forEach(function(e){e in ot.console&&tr(ot.console,e,function(t){return Rl[e]=t,function(...r){Xr("console",{args:r,level:e});const i=Rl[e];i&&i.apply(ot.console,r)}})})}function yt(){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 gN(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function Zn(e){const{message:t,event_id:r}=e;if(t)return t;const n=gN(e);return n?n.type&&n.value?`${n.type}: ${n.value}`:n.type||n.value||r||"<unknown>":r||"<unknown>"}function Rg(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 Mo(e,t){const r=gN(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 cv(e){if(e&&e.__sentry_captured__)return!0;try{la(e,"__sentry_captured__",!0)}catch{}return!1}function v_(e){return Array.isArray(e)?e:[e]}const $a=ot,iL=1e3;let lv,wg,Ag;function aL(e){ya("dom",e),ga("dom",sL)}function sL(){if(!$a.document)return;const e=Xr.bind(null,"dom"),t=dv(e,!0);$a.document.addEventListener("click",t,!1),$a.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(r=>{const n=$a[r]&&$a[r].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(tr(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=dv(e);c.handler=d,i.call(this,a,d,o)}c.refCount++}catch{}return i.call(this,a,s,o)}}),tr(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 oL(e){if(e.type!==wg)return!1;try{if(!e.target||e.target._sentryId!==Ag)return!1}catch{}return!0}function uL(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function dv(e,t=!1){return r=>{if(!r||r._sentryCaptured)return;const n=cL(r);if(uL(r.type,n))return;la(r,"_sentryCaptured",!0),n&&!n._sentryId&&la(n,"_sentryId",yt());const i=r.type==="keypress"?"input":r.type;oL(r)||(e({event:r,name:i,global:t}),wg=r.type,Ag=n?n._sentryId:void 0),clearTimeout(lv),lv=$a.setTimeout(()=>{Ag=void 0,wg=void 0},iL)}}function cL(e){try{return e.target}catch{return null}}const Og=__();function _N(){if(!("fetch"in Og))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Ng(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function lL(){if(typeof EdgeRuntime=="string")return!0;if(!_N())return!1;if(Ng(Og.fetch))return!0;let e=!1;const t=Og.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=Ng(r.contentWindow.fetch)),t.head.removeChild(r)}catch(r){gs&&Re.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return e}function EN(e){const t="fetch";ya(t,e),ga(t,dL)}function dL(){lL()&&tr(ot,"fetch",function(e){return function(...t){const{method:r,url:n}=fL(t),i={args:t,fetchData:{method:r,url:n},startTimestamp:Date.now()};return Xr("fetch",{...i}),e.apply(ot,t).then(a=>{const s={...i,endTimestamp:Date.now(),response:a};return Xr("fetch",s),a},a=>{const s={...i,endTimestamp:Date.now(),error:a};throw Xr("fetch",s),a})}})}function Pg(e,t){return!!e&&typeof e=="object"&&!!e[t]}function fv(e){return typeof e=="string"?e:e?Pg(e,"url")?e.url:e.toString?e.toString():"":""}function fL(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[r,n]=e;return{url:fv(r),method:Pg(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:fv(t),method:Pg(t,"method")?String(t.method).toUpperCase():"GET"}}let Xu=null;function vN(e){const t="error";ya(t,e),ga(t,pL)}function pL(){Xu=ot.onerror,ot.onerror=function(e,t,r,n,i){return Xr("error",{column:n,error:i,line:r,msg:e,url:t}),Xu&&!Xu.__SENTRY_LOADER__?Xu.apply(this,arguments):!1},ot.onerror.__SENTRY_INSTRUMENTED__=!0}let Ju=null;function bN(e){const t="unhandledrejection";ya(t,e),ga(t,mL)}function mL(){Ju=ot.onunhandledrejection,ot.onunhandledrejection=function(e){return Xr("unhandledrejection",e),Ju&&!Ju.__SENTRY_LOADER__?Ju.apply(this,arguments):!0},ot.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const Qu=__();function hL(){const e=Qu.chrome,t=e&&e.app&&e.app.runtime,r="history"in Qu&&!!Qu.history.pushState&&!!Qu.history.replaceState;return!t&&r}const Ms=ot;let Zu;function b_(e){const t="history";ya(t,e),ga(t,yL)}function yL(){if(!hL())return;const e=Ms.onpopstate;Ms.onpopstate=function(...r){const n=Ms.location.href,i=Zu;if(Zu=n,Xr("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=Zu,s=String(i);Zu=s,Xr("history",{from:a,to:s})}return r.apply(this,n)}}tr(Ms.history,"pushState",t),tr(Ms.history,"replaceState",t)}const gL=ot,qa="__sentry_xhr_v3__";function TN(e){ya("xhr",e),ga("xhr",_L)}function _L(){if(!gL.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;tr(e,"open",function(t){return function(...r){const n=Date.now(),i=vn(r[0])?r[0].toUpperCase():void 0,a=EL(r[1]);if(!i||!a)return t.apply(this,r);this[qa]={method:i,url:a,request_headers:{}},i==="POST"&&a.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const s=()=>{const o=this[qa];if(o&&this.readyState===4){try{o.status_code=this.status}catch{}const u={args:[i,a],endTimestamp:Date.now(),startTimestamp:n,xhr:this};Xr("xhr",u)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?tr(this,"onreadystatechange",function(o){return function(...u){return s(),o.apply(this,u)}}):this.addEventListener("readystatechange",s),tr(this,"setRequestHeader",function(o){return function(...u){const[l,c]=u,d=this[qa];return d&&vn(l)&&vn(c)&&(d.request_headers[l.toLowerCase()]=c),o.apply(this,u)}}),t.apply(this,r)}}),tr(e,"send",function(t){return function(...r){const n=this[qa];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 Xr("xhr",i),t.apply(this,r)}})}function EL(e){if(vn(e))return e;try{return e.toString()}catch{}}function vL(){return"npm"}function bL(){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 Qn(e,t=100,r=1/0){try{return Cg("",e,t,r)}catch(n){return{ERROR:`**non-serializable** (${n})`}}}function SN(e,t=3,r=100*1024){const n=Qn(e,t);return RL(n)>r?SN(e,t-1,r):n}function Cg(e,t,r=1/0,n=1/0,i=bL()){const[a,s]=i;if(t==null||["number","boolean","string"].includes(typeof t)&&!uN(t))return t;const o=TL(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 f=l.toJSON();return Cg("",f,u-1,n,i)}catch{}const c=Array.isArray(t)?[]:{};let d=0;const p=mN(t);for(const f in p){if(!Object.prototype.hasOwnProperty.call(p,f))continue;if(d>=n){c[f]="[MaxProperties ~]";break}const _=p[f];c[f]=Cg(f,_,u-1,n,i),d++}return s(t),c}function TL(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof Sl<"u"&&t===Sl)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(cN(t))return"[VueViewModel]";if(qj(t))return"[SyntheticEvent]";if(typeof t=="number"&&t!==t)return"[NaN]";if(typeof t=="function")return`[Function: ${Hn(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const r=SL(t);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(r){return`**non-serializable** (${r})`}}function SL(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function IL(e){return~-encodeURI(e).split(/%..|./).length}function RL(e){return IL(JSON.stringify(e))}var $n;(function(e){e[e.PENDING=0]="PENDING";const r=1;e[e.RESOLVED=r]="RESOLVED";const n=2;e[e.REJECTED=n]="REJECTED"})($n||($n={}));function ss(e){return new Ir(t=>{t(e)})}function T_(e){return new Ir((t,r)=>{r(e)})}class Ir{constructor(t){Ir.prototype.__init.call(this),Ir.prototype.__init2.call(this),Ir.prototype.__init3.call(this),Ir.prototype.__init4.call(this),this._state=$n.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(r){this._reject(r)}}then(t,r){return new Ir((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 Ir((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($n.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult($n.REJECTED,t)}}__init3(){this._setResult=(t,r)=>{if(this._state===$n.PENDING){if(ys(r)){r.then(this._resolve,this._reject);return}this._state=t,this._value=r,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===$n.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach(r=>{r[0]||(this._state===$n.RESOLVED&&r[1](this._value),this._state===$n.REJECTED&&r[2](this._value),r[0]=!0)})}}}function wL(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 T_(new _n("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 Ir((o,u)=>{let l=t.length;if(!l)return o(!0);const c=setTimeout(()=>{s&&s>0&&o(!1)},s);t.forEach(d=>{ss(d).then(()=>{--l||(clearTimeout(c),o(!0))},u)})})}return{$:t,add:i,drain:a}}function oa(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 AL=["fatal","error","warning","log","info","debug"];function OL(e){return e==="warn"?"warning":AL.includes(e)?e:"log"}const IN=1e3;function _a(){return Date.now()/IN}function NL(){const{performance:e}=ot;if(!e||!e.now)return _a;const t=Date.now()-e.now(),r=e.timeOrigin==null?t:e.timeOrigin;return()=>(r+e.now())/IN}const Ea=NL(),$r=(()=>{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})(),Mg="baggage",RN="sentry-",PL=/^sentry-/,CL=8192;function ML(e){if(!vn(e)&&!Array.isArray(e))return;let t={};if(Array.isArray(e))t=e.reduce((n,i)=>{const a=pv(i);for(const s of Object.keys(a))n[s]=a[s];return n},{});else{if(!e)return;t=pv(e)}const r=Object.entries(t).reduce((n,[i,a])=>{if(i.match(PL)){const s=i.slice(RN.length);n[s]=a}return n},{});if(Object.keys(r).length>0)return r}function wN(e){if(!e)return;const t=Object.entries(e).reduce((r,[n,i])=>(i&&(r[`${RN}${n}`]=i),r),{});return DL(t)}function pv(e){return e.split(",").map(t=>t.split("=").map(r=>decodeURIComponent(r.trim()))).reduce((t,[r,n])=>(t[r]=n,t),{})}function DL(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>CL?(gs&&Re.warn(`Not adding key: ${r} with val: ${n} to baggage header due to exceeding baggage size limits.`),t):s},"")}const jL=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function LL(e){if(!e)return;const t=e.match(jL);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 $L(e,t){const r=LL(e),n=ML(t),{traceId:i,parentSpanId:a,parentSampled:s}=r||{};return r?{traceId:i||yt(),parentSpanId:a||yt().substring(16),spanId:yt().substring(16),sampled:s,dsc:n||{}}:{traceId:i||yt(),spanId:yt().substring(16)}}function S_(e=yt(),t=yt().substring(16),r){let n="";return r!==void 0&&(n=r?"-1":"-0"),`${e}-${t}${n}`}function va(e,t=[]){return[e,t]}function qL(e,t){const[r,n]=e;return[r,[...n,t]]}function mv(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 Dg(e,t){return(t||new TextEncoder).encode(e)}function BL(e,t){const[r,n]=e;let i=JSON.stringify(r);function a(s){typeof i=="string"?i=typeof s=="string"?i+s:[Dg(i,t),s]:i.push(typeof s=="string"?Dg(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(Qn(u))}a(l)}}return typeof i=="string"?i:kL(i)}function kL(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 UL(e,t){const r=typeof e.data=="string"?Dg(e.data,t):e.data;return[Ht({type:"attachment",length:r.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),r]}const FL={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 hv(e){return FL[e]}function AN(e){if(!e||!e.sdk)return;const{name:t,version:r}=e.sdk;return{name:t,version:r}}function HL(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:ha(n)},...i&&{trace:Ht({...i})}}}function VL(e,t,r){const n=[{type:"client_report"},{timestamp:_a(),discarded_events:e}];return va(t?{dsn:t}:{},[n])}const GL=60*1e3;function zL(e,t=Date.now()){const r=parseInt(`${e}`,10);if(!isNaN(r))return r*1e3;const n=Date.parse(`${e}`);return isNaN(n)?GL:n-t}function WL(e,t){return e[t]||e.all||0}function YL(e,t,r=Date.now()){return WL(e,t)>r}function xL(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),p=(isNaN(d)?60:d)*1e3;if(!l)i.all=n+p;else for(const f of l.split(";"))f==="metric_bucket"?(!c||c.split(";").includes("custom"))&&(i[f]=n+p):i[f]=n+p}else s?i.all=n+zL(s,n):t===429&&(i.all=n+60*1e3);return i}const At=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Bl="production";function I_(){return ql("globalEventProcessors",()=>[])}function KL(e){I_().push(e)}function wl(e,t,r,n=0){return new Ir((i,a)=>{const s=e[n];if(t===null||typeof s!="function")i(t);else{const o=s({...t},r);At&&s.id&&o===null&&Re.log(`Event processor "${s.id}" dropped event`),ys(o)?o.then(u=>wl(e,u,r,n+1).then(i)).then(null,a):wl(e,o,r,n+1).then(i).then(null,a)}})}function ON(e){const t=Ea(),r={sid:yt(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>XL(r)};return e&&da(r,e),r}function da(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||Ea(),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:yt()),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 NN(e,t){let r={};e.status==="ok"&&(r={status:"exited"}),da(e,r)}function XL(e){return Ht({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 JL=1;function QL(e){const{spanId:t,traceId:r}=e.spanContext(),{data:n,op:i,parent_span_id:a,status:s,tags:o,origin:u}=Do(e);return Ht({data:n,op:i,parent_span_id:a,span_id:t,status:s,tags:o,trace_id:r,origin:u})}function Do(e){return ZL(e)?e.getSpanJSON():typeof e.toJSON=="function"?e.toJSON():{}}function ZL(e){return typeof e.getSpanJSON=="function"}function e$(e){const{traceFlags:t}=e.spanContext();return!!(t&JL)}function t$(e,t,r,n,i,a){const{normalizeDepth:s=3,normalizeMaxBreadth:o=1e3}=e,u={...t,event_id:t.event_id||r.event_id||yt(),timestamp:t.timestamp||_a()},l=r.integrations||e.integrations.map(w=>w.name);r$(u,e),a$(u,l),t.type===void 0&&n$(u,e.stackParser);const c=o$(n,r.captureContext);r.mechanism&&Mo(u,r.mechanism);const d=i&&i.getEventProcessors?i.getEventProcessors():[],p=v$().getScopeData();if(a){const w=a.getScopeData();Ev(p,w)}if(c){const w=c.getScopeData();Ev(p,w)}const f=[...r.attachments||[],...p.attachments];f.length&&(r.attachments=f),$N(u,p);const _=[...d,...I_(),...p.eventProcessors];return wl(_,u,r).then(w=>(w&&i$(w),typeof s=="number"&&s>0?s$(w,s,o):w))}function r$(e,t){const{environment:r,release:n,dist:i,maxValueLength:a=250}=t;"environment"in e||(e.environment="environment"in t?r:Bl),e.release===void 0&&n!==void 0&&(e.release=n),e.dist===void 0&&i!==void 0&&(e.dist=i),e.message&&(e.message=Ua(e.message,a));const s=e.exception&&e.exception.values&&e.exception.values[0];s&&s.value&&(s.value=Ua(s.value,a));const o=e.request;o&&o.url&&(o.url=Ua(o.url,a))}const yv=new WeakMap;function n$(e,t){const r=ot._sentryDebugIds;if(!r)return;let n;const i=yv.get(t);i?n=i:(n=new Map,yv.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 i$(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 a$(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function s$(e,t,r){if(!e)return null;const n={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(i=>({...i,...i.data&&{data:Qn(i.data,t,r)}}))},...e.user&&{user:Qn(e.user,t,r)},...e.contexts&&{contexts:Qn(e.contexts,t,r)},...e.extra&&{extra:Qn(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=Qn(e.contexts.trace.data,t,r))),e.spans&&(n.spans=e.spans.map(i=>{const a=Do(i).data;return a&&(i.data=Qn(a,t,r)),i})),n}function o$(e,t){if(!t)return e;const r=e?e.clone():new jo;return r.update(t),r}function u$(e){if(e)return c$(e)?{captureContext:e}:d$(e)?{captureContext:e}:e}function c$(e){return e instanceof jo||typeof e=="function"}const l$=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function d$(e){return Object.keys(e).some(t=>l$.includes(t))}function R_(e,t){return Qr().captureException(e,u$(t))}function PN(e,t){return Qr().captureEvent(e,t)}function fa(e,t){Qr().addBreadcrumb(e,t)}function f$(e){Qr().setUser(e)}function CN(...e){const t=Qr();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 gr(){return Qr().getClient()}function Wo(){return Qr().getScope()}function gv(e){const t=gr(),r=Ul(),n=Wo(),{release:i,environment:a=Bl}=t&&t.getOptions()||{},{userAgent:s}=ot.navigator||{},o=ON({release:i,environment:a,user:n.getUser()||r.getUser(),...s&&{userAgent:s},...e}),u=r.getSession();return u&&u.status==="ok"&&da(u,{status:"exited"}),MN(),r.setSession(o),n.setSession(o),o}function MN(){const e=Ul(),t=Wo(),r=t.getSession()||e.getSession();r&&NN(r),DN(),e.setSession(),t.setSession()}function DN(){const e=Ul(),t=Wo(),r=gr(),n=t.getSession()||e.getSession();n&&r&&r.captureSession&&r.captureSession(n)}function _v(e=!1){if(e){MN();return}DN()}function jN(e){return e.transaction}function LN(e,t,r){const n=t.getOptions(),{publicKey:i}=t.getDsn()||{},{segment:a}=r&&r.getUser()||{},s=Ht({environment:n.environment||Bl,release:n.release,user_segment:a,public_key:i,trace_id:e});return t.emit&&t.emit("createDsc",s),s}function p$(e){const t=gr();if(!t)return{};const r=LN(Do(e).trace_id||"",t,Wo()),n=jN(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=Do(n);return s&&s!=="url"&&(r.transaction=o.description),r.sampled=String(e$(n)),t.emit&&t.emit("createDsc",r),r}function $N(e,t){const{fingerprint:r,span:n,breadcrumbs:i,sdkProcessingMetadata:a}=t;m$(e,t),n&&g$(e,n),_$(e,r),h$(e,i),y$(e,a)}function Ev(e,t){const{extra:r,tags:n,user:i,contexts:a,level:s,sdkProcessingMetadata:o,breadcrumbs:u,fingerprint:l,eventProcessors:c,attachments:d,propagationContext:p,transactionName:f,span:_}=t;Ds(e,"extra",r),Ds(e,"tags",n),Ds(e,"user",i),Ds(e,"contexts",a),Ds(e,"sdkProcessingMetadata",o),s&&(e.level=s),f&&(e.transactionName=f),_&&(e.span=_),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,...p}}function Ds(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 m$(e,t){const{extra:r,tags:n,user:i,contexts:a,level:s,transactionName:o}=t,u=Ht(r);u&&Object.keys(u).length&&(e.extra={...u,...e.extra});const l=Ht(n);l&&Object.keys(l).length&&(e.tags={...l,...e.tags});const c=Ht(i);c&&Object.keys(c).length&&(e.user={...c,...e.user});const d=Ht(a);d&&Object.keys(d).length&&(e.contexts={...d,...e.contexts}),s&&(e.level=s),o&&(e.transaction=o)}function h$(e,t){const r=[...e.breadcrumbs||[],...t];e.breadcrumbs=r.length?r:void 0}function y$(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function g$(e,t){e.contexts={trace:QL(t),...e.contexts};const r=jN(t);if(r){e.sdkProcessingMetadata={dynamicSamplingContext:p$(t),...e.sdkProcessingMetadata};const n=Do(r).description;n&&(e.tags={transaction:n,...e.tags})}}function _$(e,t){e.fingerprint=e.fingerprint?v_(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}const E$=100;let bd,jo=class _l{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=vv()}static clone(t){return t?t.clone():new _l}clone(){const t=new _l;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&&da(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 _l){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(ca(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=vv(),this}addBreadcrumb(t,r){const n=typeof r=="number"?r:E$;if(n<=0)return this;const i={timestamp:_a(),...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:p,_span:f}=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:p,span:f}}applyToEvent(t,r={},n=[]){$N(t,this.getScopeData());const i=[...n,...I_(),...this._eventProcessors];return wl(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:yt();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:yt();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:yt();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 v$(){return bd||(bd=new jo),bd}function vv(){return{traceId:yt(),spanId:yt().substring(16)}}const jg="7.120.3",qN=parseFloat(jg),b$=100;let BN=class{constructor(t,r,n,i=qN){this._version=i;let a;r?a=r:(a=new jo,a.setClient(t));let s;n?s=n:(s=new jo,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 ys(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:yt(),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:yt(),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:yt();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=b$}=i.getOptions&&i.getOptions()||{};if(s<=0)return;const u={timestamp:_a(),...t},l=a?zo(()=>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=bv(this);try{t(this)}finally{bv(r)}}getIntegration(t){const r=this.getClient();if(!r)return null;try{return r.getIntegration(t)}catch{return At&&Re.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startTransaction(t,r){const n=this._callExtensionMethod("startTransaction",t,r);return At&&!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&&NN(n),this._sendSessionUpdate(),r.setSession()}startSession(t){const{scope:r,client:n}=this.getStackTop(),{release:i,environment:a=Bl}=n&&n.getOptions()||{},{userAgent:s}=ot.navigator||{},o=ON({release:i,environment:a,user:r.getUser(),...s&&{userAgent:s},...t}),u=r.getSession&&r.getSession();return u&&u.status==="ok"&&da(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=kl().__SENTRY__;if(i&&i.extensions&&typeof i.extensions[t]=="function")return i.extensions[t].apply(this,r);At&&Re.warn(`Extension method ${t} couldn't be found, doing nothing.`)}};function kl(){return ot.__SENTRY__=ot.__SENTRY__||{extensions:{},hub:void 0},ot}function bv(e){const t=kl(),r=Lg(t);return kN(t,e),r}function Qr(){const e=kl();if(e.__SENTRY__&&e.__SENTRY__.acs){const t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return T$(e)}function Ul(){return Qr().getIsolationScope()}function T$(e=kl()){return(!S$(e)||Lg(e).isOlderThan(qN))&&kN(e,new BN),Lg(e)}function S$(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function Lg(e){return ql("hub",()=>new BN,e)}function kN(e,t){if(!e)return!1;const r=e.__SENTRY__=e.__SENTRY__||{};return r.hub=t,!0}function I$(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 R$(e,t,r,n){const i=AN(r),a={sent_at:new Date().toISOString(),...i&&{sdk:i},...!!n&&t&&{dsn:ha(t)}},s="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return va(a,[s])}function w$(e,t,r,n){const i=AN(r),a=e.type&&e.type!=="replay_event"?e.type:"event";I$(e,r&&r.sdk);const s=HL(e,i,n,t);return delete e.sdkProcessingMetadata,va(s,[[{type:a},e]])}const A$="7";function UN(e){const t=e.protocol?`${e.protocol}:`:"",r=e.port?`:${e.port}`:"";return`${t}//${e.host}${r}${e.path?`/${e.path}`:""}/api/`}function O$(e){return`${UN(e)}${e.projectId}/envelope/`}function N$(e,t){return Jj({sentry_key:e.publicKey,sentry_version:A$,...t&&{sentry_client:`${t.name}/${t.version}`}})}function P$(e,t={}){const r=typeof t=="string"?t:t.tunnel,n=typeof t=="string"||!t._metadata?void 0:t._metadata.sdk;return r||`${O$(e)}?${N$(e,n)}`}function C$(e,t){const r=fN(e);if(!r)return"";const n=`${UN(r)}embed/error-page/`;let i=`dsn=${ha(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 Tv=[];function M$(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 D$(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=v_(r(t)):n=t;const i=M$(n),a=L$(i,s=>s.name==="Debug");if(a!==-1){const[s]=i.splice(a,1);i.push(s)}return i}function j$(e,t){const r={};return t.forEach(n=>{n&&FN(e,n,r)}),r}function Sv(e,t){for(const r of t)r&&r.afterAllSetup&&r.afterAllSetup(e)}function FN(e,t,r){if(r[t.name]){At&&Re.log(`Integration skipped because it was already installed: ${t.name}`);return}if(r[t.name]=t,Tv.indexOf(t.name)===-1&&(t.setupOnce(KL,Qr),Tv.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)}At&&Re.log(`Integration installed: ${t.name}`)}function L$(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 $$(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 q$(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=ha(t));const a=B$(e);return va(i,[a])}function B$(e){const t=$$(e);return[{type:"statsd",length:t.length},t]}const Iv="Not capturing exception because it's already been captured.";class k${constructor(t){if(this._options=t,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=fN(t.dsn):At&&Re.warn("No DSN provided, client will not send events."),this._dsn){const r=P$(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(cv(t)){At&&Re.log(Iv);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=y_(t)?t:String(t),o=g_(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&&cv(r.originalException)){At&&Re.log(Iv);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"?At&&Re.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),da(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))):ss(!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 At&&Re.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}addIntegration(t){const r=this._integrations[t.name];FN(this,t,this._integrations),r||Sv(this,[t])}sendEvent(t,r={}){this.emit("beforeSendEvent",t,r);let n=w$(t,this._dsn,this._options._metadata,this._options.tunnel);for(const a of r.attachments||[])n=qL(n,UL(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=R$(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}`;At&&Re.log(`Recording outcome: "${a}"${i>1?` (${i} times)`:""}`),this._outcomes[a]=(this._outcomes[a]||0)+i}}captureAggregateMetrics(t){At&&Re.log(`Flushing aggregated metrics, number of metrics: ${t.length}`);const r=q$(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=j$(this,t),Sv(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)&&(da(t,{...n&&{status:"crashed"},errors:t.errors||Number(i||n)}),this.captureSession(t))}_isClientDoneProcessing(t){return new Ir(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=Ul()){const a=this.getOptions(),s=Object.keys(this._integrations);return!r.integrations&&s.length>0&&(r.integrations=s),this.emit("preprocessEvent",t,r),t$(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:p,dsc:f}=u;o.contexts={trace:{trace_id:c,span_id:d,parent_span_id:p},...o.contexts};const _=f||LN(c,this,n);o.sdkProcessingMetadata={dynamicSamplingContext:_,...o.sdkProcessingMetadata}}return o})}_captureEvent(t,r={},n){return this._processEvent(t,r,n).then(i=>i.event_id,i=>{if(At){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=VN(t),o=HN(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),T_(new _n(`Discarding event because it's not included in the random sample (sampling rate = ${a})`,"log"));const c=u==="replay_event"?"replay":u,p=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(t,r,n,p).then(f=>{if(f===null)throw this.recordDroppedEvent("event_processor",c,t),new _n("An event processor returned `null`, will not send event.","log");if(r.data&&r.data.__sentry__===!0)return f;const R=F$(i,f,r);return U$(R,l)}).then(f=>{if(f===null){if(this.recordDroppedEvent("before_send",c,t),s){const O=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",O)}throw new _n(`${l} returned \`null\`, will not send event.`,"log")}const _=n&&n.getSession();if(!s&&_&&this._updateSessionFromEvent(_,f),s){const w=f.sdkProcessingMetadata&&f.sdkProcessingMetadata.spanCountBeforeProcessing||0,O=f.spans?f.spans.length:0,h=w-O;h>0&&this.recordDroppedEvent("before_send","span",h)}const R=f.transaction_info;if(s&&R&&f.transaction!==t.transaction){const w="custom";f.transaction_info={...R,source:w}}return this.sendEvent(f,r),f}).then(null,f=>{throw f instanceof _n?f:(this.captureException(f,{data:{__sentry__:!0},originalException:f}),new _n(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
13
- Reason: ${f}`))})}_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=>{At&&Re.error("Error while sending event:",r)});At&&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 U$(e,t){const r=`${t} must return \`null\` or a valid event.`;if(ys(e))return e.then(n=>{if(!ca(n)&&n!==null)throw new _n(r);return n},n=>{throw new _n(`${t} rejected with ${n}`)});if(!ca(e)&&e!==null)throw new _n(r);return e}function F$(e,t,r){const{beforeSend:n,beforeSendTransaction:i}=e;if(HN(t)&&n)return n(t,r);if(VN(t)&&i){if(t.spans){const a=t.spans.length;t.sdkProcessingMetadata={...t.sdkProcessingMetadata,spanCountBeforeProcessing:a}}return i(t,r)}return t}function HN(e){return e.type===void 0}function VN(e){return e.type==="transaction"}function H$(e,t){t.debug===!0&&(At?Re.enable():zo(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),Wo().update(t.initialScope);const n=new e(t);V$(n),G$(n)}function V$(e){const r=Qr().getStackTop();r.client=e,r.scope.setClient(e)}function G$(e){e.init?e.init():e.setupIntegrations&&e.setupIntegrations()}const z$=30;function GN(e,t,r=wL(e.bufferSize||z$)){let n={};const i=s=>r.drain(s);function a(s){const o=[];if(mv(s,(d,p)=>{const f=hv(p);if(YL(n,f)){const _=Rv(d,p);e.recordDroppedEvent("ratelimit_backoff",f,_)}else o.push(d)}),o.length===0)return ss();const u=va(s[0],o),l=d=>{mv(u,(p,f)=>{const _=Rv(p,f);e.recordDroppedEvent(d,hv(f),_)})},c=()=>t({body:BL(u,e.textEncoder)}).then(d=>(d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&At&&Re.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),n=xL(n,d),d),d=>{throw l("network_error"),d});return r.add(c).then(d=>d,d=>{if(d instanceof _n)return At&&Re.error("Skipped sending event because buffer is full."),l("queue_overflow"),ss();throw d})}return a.__sentry__baseTransport__=!0,{send:a,flush:i}}function Rv(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}function zN(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:jg})),version:jg}),e._metadata=i}const W$=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/],Y$=[/^.*\/healthcheck$/,/^.*\/healthy$/,/^.*\/live$/,/^.*\/ready$/,/^.*\/heartbeat$/,/^.*\/health$/,/^.*\/healthz$/],WN="InboundFilters",x$=((e={})=>({name:WN,setupOnce(){},processEvent(t,r,n){const i=n.getOptions(),a=K$(e,i);return X$(t,a)?null:t}})),YN=x$;li(WN,YN);function K$(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:W$],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[],...e.disableTransactionDefaults?[]:Y$],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function X$(e,t){return t.ignoreInternal&&rq(e)?(At&&Re.warn(`Event dropped due to being internal Sentry Error.
14
- Event: ${Zn(e)}`),!0):J$(e,t.ignoreErrors)?(At&&Re.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
15
- Event: ${Zn(e)}`),!0):Q$(e,t.ignoreTransactions)?(At&&Re.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
16
- Event: ${Zn(e)}`),!0):Z$(e,t.denyUrls)?(At&&Re.warn(`Event dropped due to being matched by \`denyUrls\` option.
17
- Event: ${Zn(e)}.
18
- Url: ${Al(e)}`),!0):eq(e,t.allowUrls)?!1:(At&&Re.warn(`Event dropped due to not being matched by \`allowUrls\` option.
19
- Event: ${Zn(e)}.
20
- Url: ${Al(e)}`),!0)}function J$(e,t){return e.type||!t||!t.length?!1:tq(e).some(r=>Go(r,t))}function Q$(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;const r=e.transaction;return r?Go(r,t):!1}function Z$(e,t){if(!t||!t.length)return!1;const r=Al(e);return r?Go(r,t):!1}function eq(e,t){if(!t||!t.length)return!0;const r=Al(e);return r?Go(r,t):!0}function tq(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}`)),At&&t.length===0&&Re.error(`Could not extract message for event ${Zn(e)}`),t}function rq(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function nq(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 Al(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?nq(t):null}catch{return At&&Re.error(`Cannot extract url for event ${Zn(e)}`),null}}let wv;const xN="FunctionToString",Av=new WeakMap,iq=(()=>({name:xN,setupOnce(){wv=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=E_(this),r=Av.has(gr())&&t!==void 0?t:this;return wv.apply(r,e)}}catch{}},setup(e){Av.set(e,!0)}})),KN=iq;li(xN,KN);const mt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,XN="production";function aq(){return ql("globalEventProcessors",()=>[])}function $g(e,t,r,n=0){return new Ir((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`),ys(o)?o.then(u=>$g(e,u,r,n+1).then(i)).then(null,a):$g(e,o,r,n+1).then(i).then(null,a)}})}function sq(e){const t=Ea(),r={sid:yt(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>uq(r)};return e&&Fl(r,e),r}function Fl(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||Ea(),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:yt()),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 oq(e,t){let r={};e.status==="ok"&&(r={status:"exited"}),Fl(e,r)}function uq(e){return Ht({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 cq=0,JN=1;function w_(e){const{spanId:t,traceId:r}=e.spanContext(),{data:n,op:i,parent_span_id:a,status:s,tags:o,origin:u}=Rr(e);return Ht({data:n,op:i,parent_span_id:a,span_id:t,status:s,tags:o,trace_id:r,origin:u})}function Hl(e){const{traceId:t,spanId:r}=e.spanContext(),n=A_(e);return S_(t,r,n)}function Vl(e){return typeof e=="number"?Ov(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Ov(e.getTime()):Ea()}function Ov(e){return e>9999999999?e/1e3:e}function Rr(e){return lq(e)?e.getSpanJSON():typeof e.toJSON=="function"?e.toJSON():{}}function lq(e){return typeof e.getSpanJSON=="function"}function A_(e){const{traceFlags:t}=e.spanContext();return!!(t&JN)}function _s(){return vs().getClient()}function Es(){return vs().getScope()}function Ol(e){return e.transaction}function O_(e,t,r){const n=t.getOptions(),{publicKey:i}=t.getDsn()||{},{segment:a}=r&&r.getUser()||{},s=Ht({environment:n.environment||XN,release:n.release,user_segment:a,public_key:i,trace_id:e});return t.emit&&t.emit("createDsc",s),s}function os(e){const t=_s();if(!t)return{};const r=O_(Rr(e).trace_id||"",t,Es()),n=Ol(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=Rr(n);return s&&s!=="url"&&(r.transaction=o.description),r.sampled=String(A_(n)),t.emit&&t.emit("createDsc",r),r}function dq(e,t){const{fingerprint:r,span:n,breadcrumbs:i,sdkProcessingMetadata:a}=t;fq(e,t),n&&hq(e,n),yq(e,r),pq(e,i),mq(e,a)}function fq(e,t){const{extra:r,tags:n,user:i,contexts:a,level:s,transactionName:o}=t,u=Ht(r);u&&Object.keys(u).length&&(e.extra={...u,...e.extra});const l=Ht(n);l&&Object.keys(l).length&&(e.tags={...l,...e.tags});const c=Ht(i);c&&Object.keys(c).length&&(e.user={...c,...e.user});const d=Ht(a);d&&Object.keys(d).length&&(e.contexts={...d,...e.contexts}),s&&(e.level=s),o&&(e.transaction=o)}function pq(e,t){const r=[...e.breadcrumbs||[],...t];e.breadcrumbs=r.length?r:void 0}function mq(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function hq(e,t){e.contexts={trace:w_(t),...e.contexts};const r=Ol(t);if(r){e.sdkProcessingMetadata={dynamicSamplingContext:os(t),...e.sdkProcessingMetadata};const n=Rr(r).description;n&&(e.tags={transaction:n,...e.tags})}}function yq(e,t){e.fingerprint=e.fingerprint?v_(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}const gq=100;class Ha{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=Nv()}static clone(t){return t?t.clone():new Ha}clone(){const t=new Ha;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&&Fl(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 Ha){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(ca(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=Nv(),this}addBreadcrumb(t,r){const n=typeof r=="number"?r:gq;if(n<=0)return this;const i={timestamp:_a(),...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:p,_span:f}=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:p,span:f}}applyToEvent(t,r={},n=[]){dq(t,this.getScopeData());const i=[...n,...aq(),...this._eventProcessors];return $g(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:yt();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:yt();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:yt();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 Nv(){return{traceId:yt(),spanId:yt().substring(16)}}const _q="7.120.3",QN=parseFloat(_q),Eq=100;class ZN{constructor(t,r,n,i=QN){this._version=i;let a;r?a=r:(a=new Ha,a.setClient(t));let s;n?s=n:(s=new Ha,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 ys(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:yt(),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:yt(),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:yt();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=Eq}=i.getOptions&&i.getOptions()||{};if(s<=0)return;const u={timestamp:_a(),...t},l=a?zo(()=>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=Pv(this);try{t(this)}finally{Pv(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&&oq(n),this._sendSessionUpdate(),r.setSession()}startSession(t){const{scope:r,client:n}=this.getStackTop(),{release:i,environment:a=XN}=n&&n.getOptions()||{},{userAgent:s}=ot.navigator||{},o=sq({release:i,environment:a,user:r.getUser(),...s&&{userAgent:s},...t}),u=r.getSession&&r.getSession();return u&&u.status==="ok"&&Fl(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=Yo().__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 Yo(){return ot.__SENTRY__=ot.__SENTRY__||{extensions:{},hub:void 0},ot}function Pv(e){const t=Yo(),r=qg(t);return eP(t,e),r}function vs(){const e=Yo();if(e.__SENTRY__&&e.__SENTRY__.acs){const t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return vq(e)}function N_(){return vs().getIsolationScope()}function vq(e=Yo()){return(!bq(e)||qg(e).isOlderThan(QN))&&eP(e,new ZN),qg(e)}function bq(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function qg(e){return ql("hub",()=>new ZN,e)}function eP(e,t){if(!e)return!1;const r=e.__SENTRY__=e.__SENTRY__||{};return r.hub=t,!0}function pa(e){return vs().getScope().getTransaction()}let Cv=!1;function Tq(){Cv||(Cv=!0,vN(Bg),bN(Bg))}function Bg(){const e=pa();if(e){const t="internal_error";mt&&Re.log(`[Tracing] Transaction: ${t} -> Global error occured`),e.setStatus(t)}}Bg.tag="sentry_tracingErrorCallback";var Mv;(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 p="cancelled";e.Cancelled=p;const f="already_exists";e.AlreadyExists=f;const _="failed_precondition";e.FailedPrecondition=_;const R="aborted";e.Aborted=R;const w="out_of_range";e.OutOfRange=w;const O="data_loss";e.DataLoss=O})(Mv||(Mv={}));function Sq(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 P_(e,t){e.setTag("http.status_code",String(t)),e.setData("http.response.status_code",t);const r=Sq(t);r!=="unknown_error"&&e.setStatus(r)}function bs(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=_s(),r=e||t&&t.getOptions();return!!r&&(r.enableTracing||"tracesSampleRate"in r||"tracesSampler"in r)}function tP(e){if(!bs())return;const t=wq(e),r=vs(),n=e.scope?e.scope.getSpan():Iq();if(e.onlyIfParent&&!n)return;const s=(e.scope||Es()).clone();return Rq(r,{parentSpan:n,spanContext:t,forceTransaction:e.forceTransaction,scope:s})}function Iq(){return Es().getSpan()}function Rq(e,{parentSpan:t,spanContext:r,forceTransaction:n,scope:i}){if(!bs())return;const a=N_();let s;if(t&&!n)s=t.startChild(r);else if(t){const o=os(t),{traceId:u,spanId:l}=t.spanContext(),c=A_(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),Aq(s,i,a),s}function wq(e){if(e.startTime){const t={...e};return t.startTimestamp=Vl(e.startTime),delete t.startTime,t}return e}const rP="_sentryScope",nP="_sentryIsolationScope";function Aq(e,t,r){e&&(la(e,nP,r),la(e,rP,t))}function Oq(e){return{scope:e[rP],isolationScope:e[nP]}}const Va="sentry.source",Ba="sentry.sample_rate",ec="sentry.op",ka="sentry.origin",Nq="profile_id";class iP{constructor(t=1e3){this._maxlen=t,this.spans=[]}add(t){this.spans.length>this._maxlen?t.spanRecorder=void 0:this.spans.push(t)}}class Gl{constructor(t={}){this._traceId=t.traceId||yt(),this._spanId=t.spanId||yt().substring(16),this._startTime=t.startTimestamp||Ea(),this.tags=t.tags?{...t.tags}:{},this.data=t.data?{...t.data}:{},this.instrumenter=t.instrumenter||"sentry",this._attributes={},this.setAttributes({[ka]:t.origin||"manual",[ec]: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[ec]}set op(t){this.setAttribute(ec,t)}get origin(){return this._attributes[ka]}set origin(t){this.setAttribute(ka,t)}spanContext(){const{_spanId:t,_traceId:r,_sampled:n}=this;return{spanId:t,traceId:r,traceFlags:n?JN:cq}}startChild(t){const r=new Gl({...t,parentSpanId:this._spanId,sampled:this._sampled,traceId:this._traceId});r.spanRecorder=this.spanRecorder,r.spanRecorder&&r.spanRecorder.add(r);const n=Ol(this);if(r.transaction=n,mt&&n){const i=t&&t.op||"< unknown op >",a=Rr(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 P_(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=Ol(this);if(mt&&r&&r.spanContext().spanId!==this._spanId){const n=this._logMessage;n&&Re.log(n.replace("Starting","Finishing"))}this._endTime=Vl(t)}toTraceparent(){return Hl(this)}toContext(){return Ht({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 w_(this)}getSpanJSON(){return Ht({data:this._getData(),description:this._name,op:this._attributes[ec],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[ka],_metrics_summary:void 0,profile_id:this._attributes[Nq],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 aP extends Gl{constructor(t,r){super(t),this._contexts={},this._hub=r||vs(),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[Va]&&{source:this._attributes[Va]},...this._attributes[Ba]&&{sampleRate:this._attributes[Ba]}}}set metadata(t){this._metadata=t}setName(t,r="custom"){this._name=t,this.setAttribute(Va,r)}updateName(t){return this._name=t,this}initSpanRecorder(t=1e3){this.spanRecorder||(this.spanRecorder=new iP(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=Vl(t),n=this._finishTransaction(r);if(n)return this._hub.captureEvent(n)}toContext(){const t=super.toContext();return Ht({...t,name:this._name,trimEnd:this._trimEnd})}updateWithContext(t){return super.updateWithContext(t),this._name=t.name||"",this._trimEnd=t.trimEnd,this}getDynamicSamplingContext(){return os(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&&Rr(c).timestamp):[];if(this._trimEnd&&n.length>0){const c=n.map(d=>Rr(d).timestamp).filter(Boolean);this._endTime=c.reduce((d,p)=>d>p?d:p)}const{scope:i,isolationScope:a}=Oq(this),{metadata:s}=this,{source:o}=s,u={contexts:{...this._contexts,trace:w_(this)},spans:n,start_timestamp:this._startTime,tags:this.tags,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{...s,capturedSpanScope:i,capturedSpanIsolationScope:a,...Ht({dynamicSamplingContext:os(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 El={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},Pq="finishReason",Ca=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"];class Cq extends iP{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)),Rr(t).timestamp===void 0&&this._pushActivity(t.spanContext().spanId)}super.add(t)}}class Mq extends aP{constructor(t,r,n=El.idleTimeout,i=El.finalTimeout,a=El.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=Ca[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=Ca[3],this.end())},this._finalTimeout)}end(t){const r=Vl(t);if(this._finished=!0,this.activities={},this.op==="ui.action.click"&&this.setAttribute(Pq,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;Rr(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}=Rr(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 Cq(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=Ca[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=Ca[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=Ea();this._idleTimeoutCanceledPermanently?this._autoFinishAllowed&&(this._finishReason=Ca[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=Ca[0],this.end()):this._pingHeartbeat()}_pingHeartbeat(){mt&&Re.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout(()=>{this._beat()},this._heartbeatInterval)}}function sP(e,t,r){if(!bs(t))return e.sampled=!1,e;if(e.sampled!==void 0)return e.setAttribute(Ba,Number(e.sampled)),e;let n;return typeof t.tracesSampler=="function"?(n=t.tracesSampler(r),e.setAttribute(Ba,Number(n))):r.parentSampled!==void 0?n=r.parentSampled:typeof t.tracesSampleRate<"u"?(n=t.tracesSampleRate,e.setAttribute(Ba,Number(n))):(n=1,e.setAttribute(Ba,n)),oP(n)?n?(e.sampled=Math.random()<n,e.sampled?(mt&&Re.log(`[Tracing] starting ${e.op} transaction - ${Rr(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 oP(e){return uN(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 Dq(){const t=this.getScope().getSpan();return t?{"sentry-trace":Hl(t)}:{}}function jq(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 aP(e,this);return s=sP(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 Dv(e,t,r,n,i,a,s,o=!1){const u=e.getClient(),l=u&&u.getOptions()||{};let c=new Mq(t,e,r,n,s,i,o);return c=sP(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 Lq(){const e=Yo();e.__SENTRY__&&(e.__SENTRY__.extensions=e.__SENTRY__.extensions||{},e.__SENTRY__.extensions.startTransaction||(e.__SENTRY__.extensions.startTransaction=jq),e.__SENTRY__.extensions.traceHeaders||(e.__SENTRY__.extensions.traceHeaders=Dq),Tq())}function $q(e,t,r){const n=pa();n&&n.setMeasurement(e,t,r)}function qq(e,t){const r={sent_at:new Date().toISOString()};t&&(r.dsn=ha(t));const n=e.map(Bq);return va(r,n)}function Bq(e){return[{type:"span"},e]}const Ot=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Je=ot;function kq(){Je.document?Je.document.addEventListener("visibilitychange",()=>{const e=pa();if(Je.document.hidden&&e){const t="cancelled",{op:r,status:n}=Rr(e);Ot&&Re.log(`[Tracing] Transaction: ${t} -> since tab moved to the background, op: ${r}`),n||e.setStatus(t),e.setTag("visibilitychange","document.hidden"),e.end()}}):Ot&&Re.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const xo=(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)))}},Uq=()=>`v3-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,Fq=()=>{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},zl=()=>Je.__WEB_VITALS_POLYFILL__?Je.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||Fq()):Je.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],C_=()=>{const e=zl();return e&&e.activationStart||0},Ko=(e,t)=>{const r=zl();let n="navigate";return r&&(Je.document&&Je.document.prerendering||C_()>0?n="prerender":n=r.type.replace(/_/g,"-")),{name:e,value:typeof t>"u"?-1:t,rating:"good",delta:0,entries:[],id:Uq(),navigationType:n}},Ts=(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{}},Xo=(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))},Hq=(e,t={})=>{const r=Ko("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=Ts("layout-shift",s);if(o){n=xo(e,r,t.reportAllChanges);const u=()=>{s(o.takeRecords()),n(!0)};return Xo(u),u}};let Nl=-1;const Vq=()=>{Je.document&&Je.document.visibilityState&&(Nl=Je.document.visibilityState==="hidden"&&!Je.document.prerendering?0:1/0)},Gq=()=>{Xo(({timeStamp:e})=>{Nl=e},!0)},M_=()=>(Nl<0&&(Vq(),Gq()),{get firstHiddenTime(){return Nl}}),zq=e=>{const t=M_(),r=Ko("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=Ts("first-input",a);n=xo(e,r),s&&Xo(()=>{a(s.takeRecords()),s.disconnect()},!0)};let uP=0,Td=1/0,tc=0;const Wq=e=>{e.forEach(t=>{t.interactionId&&(Td=Math.min(Td,t.interactionId),tc=Math.max(tc,t.interactionId),uP=tc?(tc-Td)/7+1:0)})};let kg;const Yq=()=>kg?uP:performance.interactionCount||0,xq=()=>{"interactionCount"in performance||kg||(kg=Ts("event",Wq,{type:"event",buffered:!0,durationThreshold:0}))},cP=()=>Yq(),jv=10,qn=[],Sd={},Lv=e=>{const t=qn[qn.length-1],r=Sd[e.interactionId];if(r||qn.length<jv||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]};Sd[n.id]=n,qn.push(n)}qn.sort((n,i)=>i.latency-n.latency),qn.splice(jv).forEach(n=>{delete Sd[n.id]})}},Kq=()=>{const e=Math.min(qn.length-1,Math.floor(cP()/50));return qn[e]},Xq=(e,t)=>{t=t||{},xq();const r=Ko("INP");let n;const i=s=>{s.forEach(u=>{u.interactionId&&Lv(u),u.entryType==="first-input"&&!qn.some(c=>c.entries.some(d=>u.duration===d.duration&&u.startTime===d.startTime))&&Lv(u)});const o=Kq();o&&o.latency!==r.value&&(r.value=o.latency,r.entries=o.entries,n())},a=Ts("event",i,{durationThreshold:t.durationThreshold||40});n=xo(e,r,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),Xo(()=>{i(a.takeRecords()),r.value<0&&cP()>0&&(r.value=0,r.entries=[]),n(!0)}))},$v={},Jq=e=>{const t=M_(),r=Ko("LCP");let n;const i=s=>{const o=s[s.length-1];if(o){const u=Math.max(o.startTime-C_(),0);u<t.firstHiddenTime&&(r.value=u,r.entries=[o],n())}},a=Ts("largest-contentful-paint",i);if(a){n=xo(e,r);const s=()=>{$v[r.id]||(i(a.takeRecords()),a.disconnect(),$v[r.id]=!0,n(!0))};return["keydown","click"].forEach(o=>{Je.document&&addEventListener(o,s,{once:!0,capture:!0})}),Xo(s,!0),s}},Ug=e=>{Je.document&&(Je.document.prerendering?addEventListener("prerenderingchange",()=>Ug(e),!0):Je.document.readyState!=="complete"?addEventListener("load",()=>Ug(e),!0):setTimeout(e,0))},Qq=(e,t)=>{t=t||{};const r=Ko("TTFB"),n=xo(e,r,t.reportAllChanges);Ug(()=>{const i=zl();if(i){if(r.value=Math.max(i.responseStart-C_(),0),r.value<0||r.value>performance.now())return;r.entries=[i],n(!0)}})},Ro={},Pl={};let lP,dP,fP,pP,mP;function Zq(e,t=!1){return Jo("cls",e,iB,lP,t)}function eB(e,t=!1){return Jo("lcp",e,sB,fP,t)}function tB(e){return Jo("ttfb",e,oB,pP)}function rB(e){return Jo("fid",e,aB,dP)}function nB(e){return Jo("inp",e,uB,mP)}function Lo(e,t){return hP(e,t),Pl[e]||(cB(e),Pl[e]=!0),yP(e,t)}function Ss(e,t){const r=Ro[e];if(!(!r||!r.length))for(const n of r)try{n(t)}catch(i){Ot&&Re.error(`Error while triggering instrumentation handler.
25
- Type: ${e}
26
- Name: ${Hn(n)}
27
- Error:`,i)}}function iB(){return Hq(e=>{Ss("cls",{metric:e}),lP=e},{reportAllChanges:!0})}function aB(){return zq(e=>{Ss("fid",{metric:e}),dP=e})}function sB(){return Jq(e=>{Ss("lcp",{metric:e}),fP=e})}function oB(){return Qq(e=>{Ss("ttfb",{metric:e}),pP=e})}function uB(){return Xq(e=>{Ss("inp",{metric:e}),mP=e})}function Jo(e,t,r,n,i=!1){hP(e,t);let a;return Pl[e]||(a=r(),Pl[e]=!0),n&&t({metric:n}),yP(e,t,i?a:void 0)}function cB(e){const t={};e==="event"&&(t.durationThreshold=0),Ts(e,r=>{Ss(e,{entries:r})},t)}function hP(e,t){Ro[e]=Ro[e]||[],Ro[e].push(t)}function yP(e,t,r){return()=>{r&&r();const n=Ro[e];if(!n)return;const i=n.indexOf(t);i!==-1&&n.splice(i,1)}}function Id(e){return typeof e=="number"&&isFinite(e)}function us(e,{startTimestamp:t,...r}){return t&&e.startTimestamp>t&&(e.startTimestamp=t),e.startChild({startTimestamp:t,...r})}const lB=2147483647;function Vt(e){return e/1e3}function D_(){return Je&&Je.addEventListener&&Je.performance}let qv=0,kt={},mn,wo;function dB(){const e=D_();if(e&&$r){e.mark&&Je.performance.mark("sentry-tracing-init");const t=gB(),r=hB(),n=yB(),i=_B();return()=>{t(),r(),n(),i()}}return()=>{}}function fB(){Lo("longtask",({entries:e})=>{for(const t of e){const r=pa();if(!r)return;const n=Vt($r+t.startTime),i=Vt(t.duration);r.startChild({description:"Main UI thread blocked",op:"ui.long-task",origin:"auto.ui.browser.metrics",startTimestamp:n,endTimestamp:n+i})}})}function pB(){Lo("event",({entries:e})=>{for(const t of e){const r=pa();if(!r)return;if(t.name==="click"){const n=Vt($r+t.startTime),i=Vt(t.duration),a={description:as(t.target),op:`ui.interaction.${t.name}`,origin:"auto.ui.browser.metrics",startTimestamp:n,endTimestamp:n+i},s=lN(t.target);s&&(a.attributes={"ui.component_name":s}),r.startChild(a)}}})}function mB(e,t){if(D_()&&$r){const n=EB(e,t);return()=>{n()}}return()=>{}}function hB(){return Zq(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Ot&&Re.log("[Measurements] Adding CLS"),kt.cls={value:e.value,unit:""},wo=t)},!0)}function yB(){return eB(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Ot&&Re.log("[Measurements] Adding LCP"),kt.lcp={value:e.value,unit:"millisecond"},mn=t)},!0)}function gB(){return rB(({metric:e})=>{const t=e.entries[e.entries.length-1];if(!t)return;const r=Vt($r),n=Vt(t.startTime);Ot&&Re.log("[Measurements] Adding FID"),kt.fid={value:e.value,unit:"millisecond"},kt["mark.fid"]={value:r+n,unit:"second"}})}function _B(){return tB(({metric:e})=>{e.entries[e.entries.length-1]&&(Ot&&Re.log("[Measurements] Adding TTFB"),kt.ttfb={value:e.value,unit:"millisecond"})})}const Bv={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 EB(e,t){return nB(({metric:r})=>{if(r.value===void 0)return;const n=r.entries.find(T=>T.duration===r.value&&Bv[T.name]!==void 0),i=_s();if(!n||!i)return;const a=Bv[n.name],s=i.getOptions(),o=Vt($r+n.startTime),u=Vt(r.value),l=n.interactionId!==void 0?e[n.interactionId]:void 0;if(l===void 0)return;const{routeName:c,parentContext:d,activeTransaction:p,user:f,replayId:_}=l,R=f!==void 0?f.email||f.id||f.ip_address:void 0,w=p!==void 0?p.getProfileId():void 0,O=new Gl({startTimestamp:o,endTimestamp:o+u,op:`ui.interaction.${a}`,name:as(n.target),attributes:{release:s.release,environment:s.environment,transaction:c,...R!==void 0&&R!==""?{user:R}:{},...w!==void 0?{profile_id:w}:{},..._!==void 0?{replay_id:_}:{}},exclusiveTime:r.value,measurements:{inp:{value:r.value,unit:"millisecond"}}}),h=OB(d,s,t);if(h&&Math.random()<h){const T=O?qq([O],i.getDsn()):void 0,b=i&&i.getTransport();b&&T&&b.send(T).then(null,m=>{Ot&&Re.error("Error while sending interaction:",m)});return}})}function vB(e){const t=D_();if(!t||!Je.performance.getEntries||!$r)return;Ot&&Re.log("[Tracing] Adding & adjusting spans using Performance API");const r=Vt($r),n=t.getEntries(),{op:i,start_timestamp:a}=Rr(e);if(n.slice(qv).forEach(s=>{const o=Vt(s.startTime),u=Vt(s.duration);if(!(e.op==="navigation"&&a&&r+o<a))switch(s.entryType){case"navigation":{TB(e,s,r);break}case"mark":case"paint":case"measure":{bB(e,s,o,u,r);const l=M_(),c=s.startTime<l.firstHiddenTime;s.name==="first-paint"&&c&&(Ot&&Re.log("[Measurements] Adding FP"),kt.fp={value:s.startTime,unit:"millisecond"}),s.name==="first-contentful-paint"&&c&&(Ot&&Re.log("[Measurements] Adding FCP"),kt.fcp={value:s.startTime,unit:"millisecond"});break}case"resource":{IB(e,s,s.name,o,u,r);break}}}),qv=Math.max(n.length-1,0),RB(e),i==="pageload"){AB(kt),["fcp","fp","lcp"].forEach(o=>{if(!kt[o]||!a||r>=a)return;const u=kt[o].value,l=r+Vt(u),c=Math.abs((l-a)*1e3),d=c-u;Ot&&Re.log(`[Measurements] Normalized ${o} from ${u} to ${c} (${d})`),kt[o].value=c});const s=kt["mark.fid"];s&&kt.fid&&(us(e,{description:"first input delay",endTimestamp:s.value+Vt(kt.fid.value),op:"ui.action",origin:"auto.ui.browser.metrics",startTimestamp:s.value}),delete kt["mark.fid"]),"fcp"in kt||delete kt.cls,Object.keys(kt).forEach(o=>{$q(o,kt[o].value,kt[o].unit)}),wB(e)}mn=void 0,wo=void 0,kt={}}function bB(e,t,r,n,i){const a=i+r,s=a+n;return us(e,{description:t.name,endTimestamp:s,op:t.entryType,origin:"auto.resource.browser.metrics",startTimestamp:a}),a}function TB(e,t,r){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(n=>{rc(e,t,n,r)}),rc(e,t,"secureConnection",r,"TLS/SSL","connectEnd"),rc(e,t,"fetch",r,"cache","domainLookupStart"),rc(e,t,"domainLookup",r,"DNS"),SB(e,t,r)}function rc(e,t,r,n,i,a){const s=a?t[a]:t[`${r}End`],o=t[`${r}Start`];!o||!s||us(e,{op:"browser",origin:"auto.browser.browser.metrics",description:i||r,startTimestamp:n+Vt(o),endTimestamp:n+Vt(s)})}function SB(e,t,r){t.responseEnd&&(us(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"request",startTimestamp:r+Vt(t.requestStart),endTimestamp:r+Vt(t.responseEnd)}),us(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"response",startTimestamp:r+Vt(t.responseStart),endTimestamp:r+Vt(t.responseEnd)}))}function IB(e,t,r,n,i,a){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const s=oa(r),o={};Rd(o,t,"transferSize","http.response_transfer_size"),Rd(o,t,"encodedBodySize","http.response_content_length"),Rd(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;us(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 RB(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),Id(r.rtt)&&(kt["connection.rtt"]={value:r.rtt,unit:"millisecond"})),Id(t.deviceMemory)&&e.setTag("deviceMemory",`${t.deviceMemory} GB`),Id(t.hardwareConcurrency)&&e.setTag("hardwareConcurrency",String(t.hardwareConcurrency))}function wB(e){mn&&(Ot&&Re.log("[Measurements] Adding LCP Data"),mn.element&&e.setTag("lcp.element",as(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)),wo&&wo.sources&&(Ot&&Re.log("[Measurements] Adding CLS Data"),wo.sources.forEach((t,r)=>e.setTag(`cls.source.${r+1}`,as(t.node))))}function Rd(e,t,r,n){const i=t[r];i!=null&&i<lB&&(e[n]=i)}function AB(e){const t=zl();if(!t)return;const{responseStart:r,requestStart:n}=t;n<=r&&(Ot&&Re.log("[Measurements] Adding TTFB Request Time"),e["ttfb.requestTime"]={value:r-n,unit:"millisecond"})}function OB(e,t,r){if(!bs(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,oP(n)?n===!0?r:n===!1?0:n*r:(Ot&&Re.warn("[Tracing] Discarding interaction span because of invalid sample rate."),!1)}function NB(e,t,r,n,i="auto.http.browser"){if(!bs()||!e.fetchData)return;const a=t(e.fetchData.url);if(e.endTimestamp&&a){const f=e.fetchData.__span;if(!f)return;const _=n[f];_&&(MB(_,e),delete n[f]);return}const s=Es(),o=_s(),{method:u,url:l}=e.fetchData,c=CB(l),d=c?oa(c).host:void 0,p=a?tP({name:`${u} ${l}`,onlyIfParent:!0,attributes:{url:l,type:"fetch","http.method":u,"http.url":c,"server.address":d,[ka]:i},op:"http.client"}):void 0;if(p&&(e.fetchData.__span=p.spanContext().spanId,n[p.spanContext().spanId]=p),r(e.fetchData.url)&&o){const f=e.args[0];e.args[1]=e.args[1]||{};const _=e.args[1];_.headers=PB(f,o,s,_,p)}return p}function PB(e,t,r,n,i){const a=i||r.getSpan(),s=N_(),{traceId:o,spanId:u,sampled:l,dsc:c}={...s.getPropagationContext(),...r.getPropagationContext()},d=a?Hl(a):S_(o,u,l),p=wN(c||(a?os(a):O_(o,t,r))),f=n.headers||(typeof Request<"u"&&Fn(e,Request)?e.headers:void 0);if(f)if(typeof Headers<"u"&&Fn(f,Headers)){const _=new Headers(f);return _.append("sentry-trace",d),p&&_.append(Mg,p),_}else if(Array.isArray(f)){const _=[...f,["sentry-trace",d]];return p&&_.push([Mg,p]),_}else{const _="baggage"in f?f.baggage:void 0,R=[];return Array.isArray(_)?R.push(..._):_&&R.push(_),p&&R.push(p),{...f,"sentry-trace":d,baggage:R.length>0?R.join(","):void 0}}else return{"sentry-trace":d,baggage:p}}function CB(e){try{return new URL(e).href}catch{return}}function MB(e,t){if(t.response){P_(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 Fg=["localhost",/^\/(?!\/)/],Hg={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,tracingOrigins:Fg,tracePropagationTargets:Fg};function DB(e){const{traceFetch:t,traceXHR:r,tracePropagationTargets:n,tracingOrigins:i,shouldCreateSpanForRequest:a,enableHTTPTimings:s}={traceFetch:Hg.traceFetch,traceXHR:Hg.traceXHR,...e},o=typeof a=="function"?a:c=>!0,u=c=>qB(c,n||i),l={};t&&EN(c=>{const d=NB(c,o,u,l);if(d){const p=gP(c.fetchData.url),f=p?oa(p).host:void 0;d.setAttributes({"http.url":p,"server.address":f})}s&&d&&kv(d)}),r&&TN(c=>{const d=BB(c,o,u,l);s&&d&&kv(d)})}function jB(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function kv(e){const{url:t}=Rr(e).data||{};if(!t||typeof t!="string")return;const r=Lo("resource",({entries:n})=>{n.forEach(i=>{jB(i)&&i.name.endsWith(t)&&($B(i).forEach(s=>e.setAttribute(...s)),setTimeout(r))})})}function LB(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 dn(e=0){return(($r||performance.timeOrigin)+e)/1e3}function $B(e){const{name:t,version:r}=LB(e.nextHopProtocol),n=[];return n.push(["network.protocol.version",r],["network.protocol.name",t]),$r?[...n,["http.request.redirect_start",dn(e.redirectStart)],["http.request.fetch_start",dn(e.fetchStart)],["http.request.domain_lookup_start",dn(e.domainLookupStart)],["http.request.domain_lookup_end",dn(e.domainLookupEnd)],["http.request.connect_start",dn(e.connectStart)],["http.request.secure_connection_start",dn(e.secureConnectionStart)],["http.request.connection_end",dn(e.connectEnd)],["http.request.request_start",dn(e.requestStart)],["http.request.response_start",dn(e.responseStart)],["http.request.response_end",dn(e.responseEnd)]]:n}function qB(e,t){return Go(e,t||Fg)}function BB(e,t,r,n){const i=e.xhr,a=i&&i[qa];if(!bs()||!i||i.__sentry_own_request__||!a)return;const s=t(a.url);if(e.endTimestamp&&s){const f=i.__sentry_xhr_span_id__;if(!f)return;const _=n[f];_&&a.status_code!==void 0&&(P_(_,a.status_code),_.end(),delete n[f]);return}const o=Es(),u=N_(),l=gP(a.url),c=l?oa(l).host:void 0,d=s?tP({name:`${a.method} ${a.url}`,onlyIfParent:!0,attributes:{type:"xhr","http.method":a.method,"http.url":l,url:a.url,"server.address":c,[ka]:"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 p=_s();if(i.setRequestHeader&&r(a.url)&&p){const{traceId:f,spanId:_,sampled:R,dsc:w}={...u.getPropagationContext(),...o.getPropagationContext()},O=d?Hl(d):S_(f,_,R),h=wN(w||(d?os(d):O_(f,p,o)));kB(i,O,h)}return d}function kB(e,t,r){try{e.setRequestHeader("sentry-trace",t),r&&e.setRequestHeader(Mg,r)}catch{}}function gP(e){try{return new URL(e,Je.location.origin).href}catch{return}}function UB(e,t=!0,r=!0){if(!Je||!Je.location){Ot&&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:$r?$r/1e3:void 0,op:"pageload",origin:"auto.pageload.browser",metadata:{source:"url"}})),r&&b_(({to:a,from:s})=>{if(s===void 0&&n&&n.indexOf(a)!==-1){n=void 0;return}s!==a&&(n=void 0,i&&(Ot&&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 FB="BrowserTracing",HB={...El,markBackgroundTransactions:!0,routingInstrumentation:UB,startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,enableInp:!1,interactionsSampleRate:1,_experiments:{},...Hg},Uv=10;class VB{constructor(t){this.name=FB,this._hasSetTracePropagationTargets=!1,Lq(),Ot&&(this._hasSetTracePropagationTargets=!!(t&&(t.tracePropagationTargets||t.tracingOrigins))),this.options={...HB,...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=dB(),this._interactionIdToRouteNameMapping={},this.options.enableInp&&mB(this._interactionIdToRouteNameMapping,this.options.interactionsSampleRate),this.options.enableLongTask&&fB(),this.options._experiments.enableInteractions&&pB(),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:p,enableHTTPTimings:f,_experiments:_}=this.options,R=a&&a.tracePropagationTargets,w=R||this.options.tracePropagationTargets;Ot&&this._hasSetTracePropagationTargets&&R&&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(O=>{const h=this._createRouteTransaction(O);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(h,O,r),h},u,o),l&&kq(),_.enableInteractions&&this._registerInteractionListener(),this.options.enableInp&&this._registerInpInteractionListener(),DB({traceFetch:c,traceXHR:d,tracePropagationTargets:w,shouldCreateSpanForRequest:p,enableHTTPTimings:f})}_createRouteTransaction(t){if(!this._getCurrentHub){Ot&&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 f=o?Fv("sentry-trace"):"",_=o?Fv("baggage"):void 0,{traceId:R,dsc:w,parentSpanId:O,sampled:h}=$L(f,_);u={traceId:R,parentSpanId:O,parentSampled:h,...t,metadata:{...t.metadata,dynamicSamplingContext:w},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&&Ot&&Re.log(`[Tracing] Will not send ${c.op} transaction because of beforeNavigate.`),Ot&&Re.log(`[Tracing] Starting ${c.op} transaction on scope`);const{location:d}=Je,p=Dv(r,c,i,a,!0,{location:d},s,o);return o&&Je.document&&(Je.document.addEventListener("readystatechange",()=>{["interactive","complete"].includes(Je.document.readyState)&&p.sendAutoFinishSignal()}),["interactive","complete"].includes(Je.document.readyState)&&p.sendAutoFinishSignal()),p.registerBeforeFinishCallback(f=>{this._collectWebVitals(),vB(f)}),p}_registerInteractionListener(){let t;const r=()=>{const{idleTimeout:n,finalTimeout:i,heartbeatInterval:a}=this.options,s="ui.action.click",o=pa();if(o&&o.op&&["navigation","pageload"].includes(o.op)){Ot&&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){Ot&&Re.warn(`[Tracing] Did not create ${s} transaction because _getCurrentHub is invalid.`);return}if(!this._latestRoute.name){Ot&&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:{[Va]:this._latestRoute.context?GB(this._latestRoute.context):"url"}};t=Dv(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=_s(),i=n!==void 0&&n.getIntegrationByName!==void 0?n.getIntegrationByName("Replay"):void 0,a=i!==void 0?i.getReplayId():void 0,s=pa(),o=Es(),u=o!==void 0?o.getUser():void 0;r.forEach(l=>{if(zB(l)){const c=l.interactionId;if(c===void 0)return;const d=this._interactionIdToRouteNameMapping[c],p=l.duration,f=l.startTime,_=Object.keys(this._interactionIdToRouteNameMapping),R=_.length>0?_.reduce((w,O)=>this._interactionIdToRouteNameMapping[w].duration<this._interactionIdToRouteNameMapping[O].duration?w:O):void 0;if(l.entryType==="first-input"&&_.map(O=>this._interactionIdToRouteNameMapping[O]).some(O=>O.duration===p&&O.startTime===f)||!c)return;if(d)d.duration=Math.max(d.duration,p);else if(_.length<Uv||R===void 0||p>this._interactionIdToRouteNameMapping[R].duration){const w=this._latestRoute.name,O=this._latestRoute.context;w&&O&&(R&&Object.keys(this._interactionIdToRouteNameMapping).length>=Uv&&delete this._interactionIdToRouteNameMapping[R],this._interactionIdToRouteNameMapping[c]={routeName:w,duration:p,parentContext:O,user:u,activeTransaction:s,replayId:a,startTime:f})}}})};Lo("event",t),Lo("first-input",t)}}function Fv(e){const t=Gj(`meta[name=${e}]`);return t?t.getAttribute("content"):void 0}function GB(e){const t=e.attributes&&e.attributes[Va],r=e.data&&e.data[Va],n=e.metadata&&e.metadata.source;return t||r||n}function zB(e){return"duration"in e}const ft=ot;let Vg=0;function _P(){return Vg>0}function WB(){Vg++,setTimeout(()=>{Vg--})}function cs(e,t={},r){if(typeof e!="function")return e;try{const i=e.__sentry_wrapped__;if(i)return typeof i=="function"?i:e;if(E_(e))return e}catch{return e}const n=function(){const i=Array.prototype.slice.call(arguments);try{const a=i.map(s=>cs(s,t));return e.apply(this,a)}catch(a){throw WB(),CN(s=>{s.addEventProcessor(o=>(t.mechanism&&(Rg(o,void 0),Mo(o,t.mechanism)),o.extra={...o.extra,arguments:i},o)),R_(a)}),a}};try{for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i])}catch{}pN(n,e),la(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get(){return e.name}})}catch{}return n}const Lr=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function EP(e,t){const r=j_(e,t),n={type:t&&t.name,value:XB(t)};return r.length&&(n.stacktrace={frames:r}),n.type===void 0&&n.value===""&&(n.value="Unrecoverable error caught"),n}function YB(e,t,r,n){const i=gr(),a=i&&i.getOptions().normalizeDepth,s={exception:{values:[{type:$l(t)?t.constructor.name:n?"UnhandledRejection":"Error",value:ZB(t,{isUnhandledRejection:n})}]},extra:{__serialized__:SN(t,a)}};if(r){const o=j_(e,r);o.length&&(s.exception.values[0].stacktrace={frames:o})}return s}function wd(e,t){return{exception:{values:[EP(e,t)]}}}function j_(e,t){const r=t.stacktrace||t.stack||"",n=KB(t);try{return e(r,n)}catch{}return[]}const xB=/Minified React error #\d+;/i;function KB(e){if(e){if(typeof e.framesToPop=="number")return e.framesToPop;if(xB.test(e.message))return 1}return 0}function XB(e){const t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function JB(e,t,r,n){const i=r&&r.syntheticException||void 0,a=L_(e,t,i,n);return Mo(a),a.level="error",r&&r.event_id&&(a.event_id=r.event_id),ss(a)}function QB(e,t,r="info",n,i){const a=n&&n.syntheticException||void 0,s=Gg(e,t,a,i);return s.level=r,n&&n.event_id&&(s.event_id=n.event_id),ss(s)}function L_(e,t,r,n,i){let a;if(h_(t)&&t.error)return wd(e,t.error);if(ev(t)||jj(t)){const s=t;if("stack"in t)a=wd(e,t);else{const o=s.name||(ev(s)?"DOMError":"DOMException"),u=s.message?`${o}: ${s.message}`:o;a=Gg(e,u,r,n),Rg(a,u)}return"code"in s&&(a.tags={...a.tags,"DOMException.code":`${s.code}`}),a}return m_(t)?wd(e,t):ca(t)||$l(t)?(a=YB(e,t,r,i),Mo(a,{synthetic:!0}),a):(a=Gg(e,t,r,n),Rg(a,`${t}`),Mo(a,{synthetic:!0}),a)}function Gg(e,t,r,n){const i={};if(n&&r){const a=j_(e,r);a.length&&(i.exception={values:[{value:t,stacktrace:{frames:a}}]})}if(y_(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 ZB(e,{isUnhandledRejection:t}){const r=Qj(e),n=t?"promise rejection":"exception";return h_(e)?`Event \`ErrorEvent\` captured as ${n} with message \`${e.message}\``:$l(e)?`Event \`${ek(e)}\` (type=${e.type}) captured as ${n}`:`Object captured as ${n} with keys: ${r}`}function ek(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function tk(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:ha(n)}},a=rk(e);return va(i,[a])}function rk(e){return[{type:"user_report"},e]}class nk extends k${constructor(t){const r=ft.SENTRY_SDK_SOURCE||vL();zN(t,"browser",["browser"],r),super(t),t.sendClientReports&&ft.document&&ft.document.addEventListener("visibilitychange",()=>{ft.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,r){return JB(this._options.stackParser,t,r,this._options.attachStacktrace)}eventFromMessage(t,r="info",n){return QB(this._options.stackParser,t,r,n,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled()){Lr&&Re.warn("SDK not enabled, will not capture user feedback.");return}const r=tk(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){Lr&&Re.log("No outcomes to send");return}if(!this._dsn){Lr&&Re.log("No dsn provided, will not send outcomes");return}Lr&&Re.log("Sending outcomes:",t);const r=VL(t,this._options.tunnel&&ha(this._dsn));this._sendEnvelope(r)}}let Zs;function ik(){if(Zs)return Zs;if(Ng(ft.fetch))return Zs=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){Lr&&Re.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return Zs=t.bind(ft)}function ak(){Zs=void 0}function sk(e,t=ik()){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 ak(),r-=s,n--,T_(u)}}return GN(e,i)}const ok=4;function uk(e){function t(r){return new Ir((n,i)=>{const a=new XMLHttpRequest;a.onerror=i,a.onreadystatechange=()=>{a.readyState===ok&&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 GN(e,t)}const Wl="?",ck=30,lk=40,dk=50;function $_(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 fk=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,pk=/\((\S*)(?::(\d+))(?::(\d+))\)/,mk=e=>{const t=fk.exec(e);if(t){if(t[2]&&t[2].indexOf("eval")===0){const a=pk.exec(t[2]);a&&(t[2]=a[1],t[3]=a[2],t[4]=a[3])}const[n,i]=vP(t[1]||Wl,t[2]);return $_(i,n,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}},hk=[ck,mk],yk=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,gk=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,_k=e=>{const t=yk.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const a=gk.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]||Wl;return[i,n]=vP(i,n),$_(n,i,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},Ek=[dk,_k],vk=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,bk=e=>{const t=vk.exec(e);return t?$_(t[2],t[1]||Wl,+t[3],t[4]?+t[4]:void 0):void 0},Tk=[lk,bk],Sk=[hk,Ek,Tk],Ik=yN(...Sk),vP=(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]:Wl,r?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},nc=1024,bP="Breadcrumbs",Rk=((e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:bP,setupOnce(){},setup(r){t.console&&rL(Ok(r)),t.dom&&aL(Ak(r,t.dom)),t.xhr&&TN(Nk(r)),t.fetch&&EN(Pk(r)),t.history&&b_(Ck(r)),t.sentry&&r.on&&r.on("beforeSendEvent",wk(r))}}}),TP=Rk;li(bP,TP);function wk(e){return function(r){gr()===e&&fa({category:`sentry.${r.type==="transaction"?"transaction":"event"}`,event_id:r.event_id,level:r.level,message:Zn(r)},{event:r})}}function Ak(e,t){return function(n){if(gr()!==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>nc&&(Lr&&Re.warn(`\`dom.maxStringLength\` cannot exceed ${nc}, but a value of ${o} was configured. Sentry will use ${nc} instead.`),o=nc),typeof s=="string"&&(s=[s]);try{const l=n.event,c=Mk(l)?l.target:l;i=as(c,{keyAttrs:s,maxStringLength:o}),a=lN(c)}catch{i="<unknown>"}if(i.length===0)return;const u={category:`ui.${n.name}`,message:i};a&&(u.data={"ui.component_name":a}),fa(u,{event:n.event,name:n.name,global:n.global})}}function Ok(e){return function(r){if(gr()!==e)return;const n={category:"console",data:{arguments:r.args,logger:"console"},level:OL(r.level),message:tv(r.args," ")};if(r.level==="assert")if(r.args[0]===!1)n.message=`Assertion failed: ${tv(r.args.slice(1)," ")||"console.assert"}`,n.data.arguments=r.args.slice(1);else return;fa(n,{input:r.args,level:r.level})}}function Nk(e){return function(r){if(gr()!==e)return;const{startTimestamp:n,endTimestamp:i}=r,a=r.xhr[qa];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};fa({category:"xhr",data:c,type:"http"},d)}}function Pk(e){return function(r){if(gr()!==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};fa({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};fa({category:"fetch",data:s,type:"http"},o)}}}function Ck(e){return function(r){if(gr()!==e)return;let n=r.from,i=r.to;const a=oa(ft.location.href);let s=n?oa(n):void 0;const o=oa(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),fa({category:"navigation",data:{from:n,to:i}})}}function Mk(e){return!!e&&!!e.target}const SP="Dedupe",Dk=(()=>{let e;return{name:SP,setupOnce(){},processEvent(t){if(t.type)return t;try{if(jk(t,e))return Lr&&Re.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}}),IP=Dk;li(SP,IP);function jk(e,t){return t?!!(Lk(e,t)||$k(e,t)):!1}function Lk(e,t){const r=e.message,n=t.message;return!(!r&&!n||r&&!n||!r&&n||r!==n||!wP(e,t)||!RP(e,t))}function $k(e,t){const r=Hv(t),n=Hv(e);return!(!r||!n||r.type!==n.type||r.value!==n.value||!wP(e,t)||!RP(e,t))}function RP(e,t){let r=Vv(e),n=Vv(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 wP(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 Hv(e){return e.exception&&e.exception.values&&e.exception.values[0]}function Vv(e){const t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch{return}}const AP="GlobalHandlers",qk=((e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:AP,setupOnce(){Error.stackTraceLimit=50},setup(r){t.onerror&&(Bk(r),Gv("onerror")),t.onunhandledrejection&&(kk(r),Gv("onunhandledrejection"))}}}),OP=qk;li(AP,OP);function Bk(e){vN(t=>{const{stackParser:r,attachStacktrace:n}=PP();if(gr()!==e||_P())return;const{msg:i,url:a,line:s,column:o,error:u}=t,l=u===void 0&&vn(i)?Hk(i,a,s,o):NP(L_(r,u||i,void 0,n,!1),a,s,o);l.level="error",PN(l,{originalException:u,mechanism:{handled:!1,type:"onerror"}})})}function kk(e){bN(t=>{const{stackParser:r,attachStacktrace:n}=PP();if(gr()!==e||_P())return;const i=Uk(t),a=g_(i)?Fk(i):L_(r,i,void 0,n,!0);a.level="error",PN(a,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function Uk(e){if(g_(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 Fk(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function Hk(e,t,r,n){const i=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let a=h_(e)?e.message:e,s="Error";const o=a.match(i);return o&&(s=o[1],a=o[2]),NP({exception:{values:[{type:s,value:a}]}},t,r,n)}function NP(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=vn(t)&&t.length>0?t:Vj();return u.length===0&&u.push({colno:l,filename:d,function:"?",in_app:!0,lineno:c}),e}function Gv(e){Lr&&Re.log(`Global Handler attached: ${e}`)}function PP(){const e=gr();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const CP="HttpContext",Vk=(()=>({name:CP,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}})),MP=Vk;li(CP,MP);const Gk="cause",zk=5,DP="LinkedErrors",Wk=((e={})=>{const t=e.limit||zk,r=e.key||Gk;return{name:DP,setupOnce(){},preprocessEvent(n,i,a){const s=a.getOptions();kj(EP,s.stackParser,s.maxValueLength,r,t,n,i)}}}),jP=Wk;li(DP,jP);const Yk=["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"],LP="TryCatch",xk=((e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:LP,setupOnce(){t.setTimeout&&tr(ft,"setTimeout",zv),t.setInterval&&tr(ft,"setInterval",zv),t.requestAnimationFrame&&tr(ft,"requestAnimationFrame",Kk),t.XMLHttpRequest&&"XMLHttpRequest"in ft&&tr(XMLHttpRequest.prototype,"send",Xk);const r=t.eventTarget;r&&(Array.isArray(r)?r:Yk).forEach(Jk)}}}),$P=xk;li(LP,$P);function zv(e){return function(...t){const r=t[0];return t[0]=cs(r,{mechanism:{data:{function:Hn(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function Kk(e){return function(t){return e.apply(this,[cs(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Hn(e)},handled:!1,type:"instrument"}})])}}function Xk(e){return function(...t){const r=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(i=>{i in r&&typeof r[i]=="function"&&tr(r,i,function(a){const s={mechanism:{data:{function:i,handler:Hn(a)},handled:!1,type:"instrument"}},o=E_(a);return o&&(s.mechanism.data.handler=Hn(o)),cs(a,s)})}),e.apply(this,t)}}function Jk(e){const t=ft,r=t[e]&&t[e].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(tr(r,"addEventListener",function(n){return function(i,a,s){try{typeof a.handleEvent=="function"&&(a.handleEvent=cs(a.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Hn(a),target:e},handled:!1,type:"instrument"}}))}catch{}return n.apply(this,[i,cs(a,{mechanism:{data:{function:"addEventListener",handler:Hn(a),target:e},handled:!1,type:"instrument"}}),s])}}),tr(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 Qk=[YN(),KN(),$P(),TP(),OP(),jP(),IP(),MP()];function Zk(e){return[...Qk]}function eU(e={}){e.defaultIntegrations===void 0&&(e.defaultIntegrations=Zk()),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:eL(e.stackParser||Ik),integrations:D$(e),transport:e.transport||(_N()?sk:uk)};H$(nk,t),e.autoSessionTracking&&tU()}const Wv=(e={},t=Qr())=>{if(!ft.document){Lr&&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){Lr&&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=C$(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):Lr&&Re.error("Not injecting report dialog. No injection point found in HTML")};function tU(){if(typeof ft.document>"u"){Lr&&Re.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}gv({ignoreDuration:!0}),_v(),b_(({from:e,to:t})=>{e!==void 0&&e!==t&&(gv({ignoreDuration:!0}),_v())})}function rU(e){const t={...e};zN(t,"react"),eU(t)}var Ad={exports:{}},gt={};/** @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 Yv;function nU(){if(Yv)return gt;Yv=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,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,_=e?Symbol.for("react.lazy"):60116,R=e?Symbol.for("react.block"):60121,w=e?Symbol.for("react.fundamental"):60117,O=e?Symbol.for("react.responder"):60118,h=e?Symbol.for("react.scope"):60119;function T(m){if(typeof m=="object"&&m!==null){var v=m.$$typeof;switch(v){case t:switch(m=m.type,m){case u:case l:case n:case a:case i:case d:return m;default:switch(m=m&&m.$$typeof,m){case o:case c:case _:case f:case s:return m;default:return v}}case r:return v}}}function b(m){return T(m)===l}return gt.AsyncMode=u,gt.ConcurrentMode=l,gt.ContextConsumer=o,gt.ContextProvider=s,gt.Element=t,gt.ForwardRef=c,gt.Fragment=n,gt.Lazy=_,gt.Memo=f,gt.Portal=r,gt.Profiler=a,gt.StrictMode=i,gt.Suspense=d,gt.isAsyncMode=function(m){return b(m)||T(m)===u},gt.isConcurrentMode=b,gt.isContextConsumer=function(m){return T(m)===o},gt.isContextProvider=function(m){return T(m)===s},gt.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===t},gt.isForwardRef=function(m){return T(m)===c},gt.isFragment=function(m){return T(m)===n},gt.isLazy=function(m){return T(m)===_},gt.isMemo=function(m){return T(m)===f},gt.isPortal=function(m){return T(m)===r},gt.isProfiler=function(m){return T(m)===a},gt.isStrictMode=function(m){return T(m)===i},gt.isSuspense=function(m){return T(m)===d},gt.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===n||m===l||m===a||m===i||m===d||m===p||typeof m=="object"&&m!==null&&(m.$$typeof===_||m.$$typeof===f||m.$$typeof===s||m.$$typeof===o||m.$$typeof===c||m.$$typeof===w||m.$$typeof===O||m.$$typeof===h||m.$$typeof===R)},gt.typeOf=T,gt}var xv;function iU(){return xv||(xv=1,Ad.exports=nU()),Ad.exports}var Od,Kv;function aU(){if(Kv)return Od;Kv=1;var e=iU(),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(_){return e.isMemo(_)?i:a[_.$$typeof]||t}var o=Object.defineProperty,u=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,c=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,p=Object.prototype;function f(_,R,w){if(typeof R!="string"){if(p){var O=d(R);O&&O!==p&&f(_,O,w)}var h=u(R);l&&(h=h.concat(l(R)));for(var T=s(_),b=s(R),m=0;m<h.length;++m){var v=h[m];if(!r[v]&&!(w&&w[v])&&!(b&&b[v])&&!(T&&T[v])){var A=c(R,v);try{o(_,v,A)}catch{}}}}return _}return Od=f,Od}aU();const sU=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function oU(e){const t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}const Xv={componentStack:null,error:null,eventId:null};function uU(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 Cl extends Me.Component{constructor(t){super(t),Cl.prototype.__init.call(this),this.state=Xv,this._openFallbackReportDialog=!0;const r=gr();r&&r.on&&t.showDialog&&(this._openFallbackReportDialog=!1,r.on("afterSendEvent",n=>{!n.type&&n.event_id===this._lastEventId&&Wv({...t.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,{componentStack:r}){const{beforeCapture:n,onError:i,showDialog:a,dialogOptions:s}=this.props;CN(o=>{if(oU(Me.version)&&m_(t)){const l=new Error(t.message);l.name=`React ErrorBoundary ${t.name}`,l.stack=r,uU(t,l)}n&&n(o,t,r);const u=R_(t,{captureContext:{contexts:{react:{componentStack:r}}},mechanism:{handled:!!this.props.fallback}});i&&i(t,r,u),a&&(this._lastEventId=u,this._openFallbackReportDialog&&Wv({...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(Xv)}}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,Me.isValidElement(i)?i:(t&&sU&&Re.warn("fallback did not produce a valid ReactElement"),null)}return typeof r=="function"?r():r}}const cU=Me.lazy(()=>Gt(()=>import("./index-l6x72Ai4.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])).then(e=>({default:e.Navbar})));function lU(e){return J.jsx(Me.Suspense,{fallback:J.jsx("div",{className:"topnav-skeleton","aria-hidden":!0}),children:J.jsx(cU,{...e})})}const dU={},Jv=e=>{let t;const r=new Set,n=(c,d)=>{const p=typeof c=="function"?c(t):c;if(!Object.is(p,t)){const f=t;t=d??(typeof p!="object"||p===null)?p:Object.assign({},t,p),r.forEach(_=>_(t,f))}},i=()=>t,u={setState:n,getState:i,getInitialState:()=>l,subscribe:c=>(r.add(c),()=>r.delete(c)),destroy:()=>{(dU?"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},fU=e=>e?Jv(e):Jv;var Nd={exports:{}},Pd={},Cd={exports:{}},Md={};/**
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 Qv;function pU(){if(Qv)return Md;Qv=1;var e=zO();function t(d,p){return d===p&&(d!==0||1/d===1/p)||d!==d&&p!==p}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,i=e.useEffect,a=e.useLayoutEffect,s=e.useDebugValue;function o(d,p){var f=p(),_=n({inst:{value:f,getSnapshot:p}}),R=_[0].inst,w=_[1];return a(function(){R.value=f,R.getSnapshot=p,u(R)&&w({inst:R})},[d,f,p]),i(function(){return u(R)&&w({inst:R}),d(function(){u(R)&&w({inst:R})})},[d]),s(f),f}function u(d){var p=d.getSnapshot;d=d.value;try{var f=p();return!r(d,f)}catch{return!0}}function l(d,p){return p()}var c=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?l:o;return Md.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:c,Md}var Zv;function mU(){return Zv||(Zv=1,Cd.exports=pU()),Cd.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 eb;function hU(){if(eb)return Pd;eb=1;var e=zO(),t=mU();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 Pd.useSyncExternalStoreWithSelector=function(l,c,d,p,f){var _=a(null);if(_.current===null){var R={hasValue:!1,value:null};_.current=R}else R=_.current;_=o(function(){function O(v){if(!h){if(h=!0,T=v,v=p(v),f!==void 0&&R.hasValue){var A=R.value;if(f(A,v))return b=A}return b=v}if(A=b,n(T,v))return A;var P=p(v);return f!==void 0&&f(A,P)?(T=v,A):(T=v,b=P)}var h=!1,T,b,m=d===void 0?null:d;return[function(){return O(c())},m===null?void 0:function(){return O(m())}]},[c,d,p,f]);var w=i(l,_[0],_[1]);return s(function(){R.hasValue=!0,R.value=w},[w]),u(w),w},Pd}var tb;function yU(){return tb||(tb=1,Nd.exports=hU()),Nd.exports}var gU=yU();const _U=WO(gU),qP={},{useDebugValue:EU}=YO,{useSyncExternalStoreWithSelector:vU}=_U;let rb=!1;const bU=e=>e;function TU(e,t=bU,r){(qP?"production":void 0)!=="production"&&r&&!rb&&(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"),rb=!0);const n=vU(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,r);return EU(n),n}const nb=e=>{(qP?"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"?fU(e):e,r=(n,i)=>TU(t,n,i);return Object.assign(r,t),r},Is=e=>e?nb(e):nb;var Br={},fi={},pi={},Dd={},kr={},ic={exports:{}},jd={},On={},mi={},Ld={},$d={},qd={},ib;function $o(){return ib||(ib=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(h){if(super(),!e.IDENTIFIER.test(h))throw new Error("CodeGen: name must be a valid identifier");this.str=h}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class n extends t{constructor(h){super(),this._items=typeof h=="string"?[h]:h}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const h=this._items[0];return h===""||h==='""'}get str(){var h;return(h=this._str)!==null&&h!==void 0?h:this._str=this._items.reduce((T,b)=>`${T}${b}`,"")}get names(){var h;return(h=this._names)!==null&&h!==void 0?h:this._names=this._items.reduce((T,b)=>(b instanceof r&&(T[b.str]=(T[b.str]||0)+1),T),{})}}e._Code=n,e.nil=new n("");function i(O,...h){const T=[O[0]];let b=0;for(;b<h.length;)o(T,h[b]),T.push(O[++b]);return new n(T)}e._=i;const a=new n("+");function s(O,...h){const T=[f(O[0])];let b=0;for(;b<h.length;)T.push(a),o(T,h[b]),T.push(a,f(O[++b]));return u(T),new n(T)}e.str=s;function o(O,h){h instanceof n?O.push(...h._items):h instanceof r?O.push(h):O.push(d(h))}e.addCodeArg=o;function u(O){let h=1;for(;h<O.length-1;){if(O[h]===a){const T=l(O[h-1],O[h+1]);if(T!==void 0){O.splice(h-1,3,T);continue}O[h++]="+"}h++}}function l(O,h){if(h==='""')return O;if(O==='""')return h;if(typeof O=="string")return h instanceof r||O[O.length-1]!=='"'?void 0:typeof h!="string"?`${O.slice(0,-1)}${h}"`:h[0]==='"'?O.slice(0,-1)+h.slice(1):void 0;if(typeof h=="string"&&h[0]==='"'&&!(O instanceof r))return`"${O}${h.slice(1)}`}function c(O,h){return h.emptyStr()?O:O.emptyStr()?h:s`${O}${h}`}e.strConcat=c;function d(O){return typeof O=="number"||typeof O=="boolean"||O===null?O:f(Array.isArray(O)?O.join(","):O)}function p(O){return new n(f(O))}e.stringify=p;function f(O){return JSON.stringify(O).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=f;function _(O){return typeof O=="string"&&e.IDENTIFIER.test(O)?new n(`.${O}`):i`[${O}]`}e.getProperty=_;function R(O){if(typeof O=="string"&&e.IDENTIFIER.test(O))return new n(`${O}`);throw new Error(`CodeGen: invalid export name: ${O}, use explicit $id name mapping`)}e.getEsmExportName=R;function w(O){return new n(O.toString())}e.regexpCode=w})(qd)),qd}var Bd={},ab;function sb(){return ab||(ab=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=$o();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 p=this.toName(l),{prefix:f}=p,_=(d=c.key)!==null&&d!==void 0?d:c.ref;let R=this._values[f];if(R){const h=R.get(_);if(h)return h}else R=this._values[f]=new Map;R.set(_,p);const w=this._scope[f]||(this._scope[f]=[]),O=w.length;return w[O]=c.ref,p.setValue(c,{property:f,itemIndex:O}),p}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,p=>{if(p.value===void 0)throw new Error(`CodeGen: name "${p}" has no value`);return p.value.code},c,d)}_reduceValues(l,c,d={},p){let f=t.nil;for(const _ in l){const R=l[_];if(!R)continue;const w=d[_]=d[_]||new Map;R.forEach(O=>{if(w.has(O))return;w.set(O,n.Started);let h=c(O);if(h){const T=this.opts.es5?e.varKinds.var:e.varKinds.const;f=(0,t._)`${f}${T} ${O} = ${h};${this.opts._n}`}else if(h=p==null?void 0:p(O))f=(0,t._)`${f}${h}${this.opts._n}`;else throw new r(O);w.set(O,n.Completed)})}return f}}e.ValueScope=o})(Bd)),Bd}var ob;function Ke(){return ob||(ob=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=$o(),r=sb();var n=$o();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=sb();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,j){return this}}class s extends a{constructor(N,j,Z){super(),this.varKind=N,this.name=j,this.rhs=Z}render({es5:N,_n:j}){const Z=N?r.varKinds.var:this.varKind,Ee=this.rhs===void 0?"":` = ${this.rhs}`;return`${Z} ${this.name}${Ee};`+j}optimizeNames(N,j){if(N[this.name.str])return this.rhs&&(this.rhs=F(this.rhs,N,j)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class o extends a{constructor(N,j,Z){super(),this.lhs=N,this.rhs=j,this.sideEffects=Z}render({_n:N}){return`${this.lhs} = ${this.rhs};`+N}optimizeNames(N,j){if(!(this.lhs instanceof t.Name&&!N[this.lhs.str]&&!this.sideEffects))return this.rhs=F(this.rhs,N,j),this}get names(){const N=this.lhs instanceof t.Name?{}:{...this.lhs.names};return U(N,this.rhs)}}class u extends o{constructor(N,j,Z,Ee){super(N,Z,Ee),this.op=j}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 p extends a{constructor(N){super(),this.code=N}render({_n:N}){return`${this.code};`+N}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(N,j){return this.code=F(this.code,N,j),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class f extends a{constructor(N=[]){super(),this.nodes=N}render(N){return this.nodes.reduce((j,Z)=>j+Z.render(N),"")}optimizeNodes(){const{nodes:N}=this;let j=N.length;for(;j--;){const Z=N[j].optimizeNodes();Array.isArray(Z)?N.splice(j,1,...Z):Z?N[j]=Z:N.splice(j,1)}return N.length>0?this:void 0}optimizeNames(N,j){const{nodes:Z}=this;let Ee=Z.length;for(;Ee--;){const _e=Z[Ee];_e.optimizeNames(N,j)||(ce(N,_e.names),Z.splice(Ee,1))}return Z.length>0?this:void 0}get names(){return this.nodes.reduce((N,j)=>W(N,j.names),{})}}class _ extends f{render(N){return"{"+N._n+super.render(N)+"}"+N._n}}class R extends f{}class w extends _{}w.kind="else";class O extends _{constructor(N,j){super(j),this.condition=N}render(N){let j=`if(${this.condition})`+super.render(N);return this.else&&(j+="else "+this.else.render(N)),j}optimizeNodes(){super.optimizeNodes();const N=this.condition;if(N===!0)return this.nodes;let j=this.else;if(j){const Z=j.optimizeNodes();j=this.else=Array.isArray(Z)?new w(Z):Z}if(j)return N===!1?j instanceof O?j:j.nodes:this.nodes.length?this:new O(se(N),j instanceof O?[j]:j.nodes);if(!(N===!1||!this.nodes.length))return this}optimizeNames(N,j){var Z;if(this.else=(Z=this.else)===null||Z===void 0?void 0:Z.optimizeNames(N,j),!!(super.optimizeNames(N,j)||this.else))return this.condition=F(this.condition,N,j),this}get names(){const N=super.names;return U(N,this.condition),this.else&&W(N,this.else.names),N}}O.kind="if";class h extends _{}h.kind="for";class T extends h{constructor(N){super(),this.iteration=N}render(N){return`for(${this.iteration})`+super.render(N)}optimizeNames(N,j){if(super.optimizeNames(N,j))return this.iteration=F(this.iteration,N,j),this}get names(){return W(super.names,this.iteration.names)}}class b extends h{constructor(N,j,Z,Ee){super(),this.varKind=N,this.name=j,this.from=Z,this.to=Ee}render(N){const j=N.es5?r.varKinds.var:this.varKind,{name:Z,from:Ee,to:_e}=this;return`for(${j} ${Z}=${Ee}; ${Z}<${_e}; ${Z}++)`+super.render(N)}get names(){const N=U(super.names,this.from);return U(N,this.to)}}class m extends h{constructor(N,j,Z,Ee){super(),this.loop=N,this.varKind=j,this.name=Z,this.iterable=Ee}render(N){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(N)}optimizeNames(N,j){if(super.optimizeNames(N,j))return this.iterable=F(this.iterable,N,j),this}get names(){return W(super.names,this.iterable.names)}}class v extends _{constructor(N,j,Z){super(),this.name=N,this.args=j,this.async=Z}render(N){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(N)}}v.kind="func";class A extends f{render(N){return"return "+super.render(N)}}A.kind="return";class P extends _{render(N){let j="try"+super.render(N);return this.catch&&(j+=this.catch.render(N)),this.finally&&(j+=this.finally.render(N)),j}optimizeNodes(){var N,j;return super.optimizeNodes(),(N=this.catch)===null||N===void 0||N.optimizeNodes(),(j=this.finally)===null||j===void 0||j.optimizeNodes(),this}optimizeNames(N,j){var Z,Ee;return super.optimizeNames(N,j),(Z=this.catch)===null||Z===void 0||Z.optimizeNames(N,j),(Ee=this.finally)===null||Ee===void 0||Ee.optimizeNames(N,j),this}get names(){const N=super.names;return this.catch&&W(N,this.catch.names),this.finally&&W(N,this.finally.names),N}}class q extends _{constructor(N){super(),this.error=N}render(N){return`catch(${this.error})`+super.render(N)}}q.kind="catch";class z extends _{render(N){return"finally"+super.render(N)}}z.kind="finally";class Y{constructor(N,j={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...j,_n:j.lines?`
51
- `:""},this._extScope=N,this._scope=new r.Scope({parent:N}),this._nodes=[new R]}toString(){return this._root.render(this.opts)}name(N){return this._scope.name(N)}scopeName(N){return this._extScope.name(N)}scopeValue(N,j){const Z=this._extScope.value(N,j);return(this._values[Z.prefix]||(this._values[Z.prefix]=new Set)).add(Z),Z}getScopeValue(N,j){return this._extScope.getValue(N,j)}scopeRefs(N){return this._extScope.scopeRefs(N,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(N,j,Z,Ee){const _e=this._scope.toName(j);return Z!==void 0&&Ee&&(this._constants[_e.str]=Z),this._leafNode(new s(N,_e,Z)),_e}const(N,j,Z){return this._def(r.varKinds.const,N,j,Z)}let(N,j,Z){return this._def(r.varKinds.let,N,j,Z)}var(N,j,Z){return this._def(r.varKinds.var,N,j,Z)}assign(N,j,Z){return this._leafNode(new o(N,j,Z))}add(N,j){return this._leafNode(new u(N,e.operators.ADD,j))}code(N){return typeof N=="function"?N():N!==t.nil&&this._leafNode(new p(N)),this}object(...N){const j=["{"];for(const[Z,Ee]of N)j.length>1&&j.push(","),j.push(Z),(Z!==Ee||this.opts.es5)&&(j.push(":"),(0,t.addCodeArg)(j,Ee));return j.push("}"),new t._Code(j)}if(N,j,Z){if(this._blockNode(new O(N)),j&&Z)this.code(j).else().code(Z).endIf();else if(j)this.code(j).endIf();else if(Z)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(N){return this._elseNode(new O(N))}else(){return this._elseNode(new w)}endIf(){return this._endBlockNode(O,w)}_for(N,j){return this._blockNode(N),j&&this.code(j).endFor(),this}for(N,j){return this._for(new T(N),j)}forRange(N,j,Z,Ee,_e=this.opts.es5?r.varKinds.var:r.varKinds.let){const Se=this._scope.toName(N);return this._for(new b(_e,Se,j,Z),()=>Ee(Se))}forOf(N,j,Z,Ee=r.varKinds.const){const _e=this._scope.toName(N);if(this.opts.es5){const Se=j instanceof t.Name?j:this.var("_arr",j);return this.forRange("_i",0,(0,t._)`${Se}.length`,Ie=>{this.var(_e,(0,t._)`${Se}[${Ie}]`),Z(_e)})}return this._for(new m("of",Ee,_e,j),()=>Z(_e))}forIn(N,j,Z,Ee=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(N,(0,t._)`Object.keys(${j})`,Z);const _e=this._scope.toName(N);return this._for(new m("in",Ee,_e,j),()=>Z(_e))}endFor(){return this._endBlockNode(h)}label(N){return this._leafNode(new l(N))}break(N){return this._leafNode(new c(N))}return(N){const j=new A;if(this._blockNode(j),this.code(N),j.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(A)}try(N,j,Z){if(!j&&!Z)throw new Error('CodeGen: "try" without "catch" and "finally"');const Ee=new P;if(this._blockNode(Ee),this.code(N),j){const _e=this.name("e");this._currNode=Ee.catch=new q(_e),j(_e)}return Z&&(this._currNode=Ee.finally=new z,this.code(Z)),this._endBlockNode(q,z)}throw(N){return this._leafNode(new d(N))}block(N,j){return this._blockStarts.push(this._nodes.length),N&&this.code(N).endBlock(j),this}endBlock(N){const j=this._blockStarts.pop();if(j===void 0)throw new Error("CodeGen: not in self-balancing block");const Z=this._nodes.length-j;if(Z<0||N!==void 0&&Z!==N)throw new Error(`CodeGen: wrong number of nodes: ${Z} vs ${N} expected`);return this._nodes.length=j,this}func(N,j=t.nil,Z,Ee){return this._blockNode(new v(N,j,Z)),Ee&&this.code(Ee).endFunc(),this}endFunc(){return this._endBlockNode(v)}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,j){const Z=this._currNode;if(Z instanceof N||j&&Z instanceof j)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${j?`${N.kind}/${j.kind}`:N.kind}"`)}_elseNode(N){const j=this._currNode;if(!(j instanceof O))throw new Error('CodeGen: "else" without "if"');return this._currNode=j.else=N,this}get _root(){return this._nodes[0]}get _currNode(){const N=this._nodes;return N[N.length-1]}set _currNode(N){const j=this._nodes;j[j.length-1]=N}}e.CodeGen=Y;function W(V,N){for(const j in N)V[j]=(V[j]||0)+(N[j]||0);return V}function U(V,N){return N instanceof t._CodeOrName?W(V,N.names):V}function F(V,N,j){if(V instanceof t.Name)return Z(V);if(!Ee(V))return V;return new t._Code(V._items.reduce((_e,Se)=>(Se instanceof t.Name&&(Se=Z(Se)),Se instanceof t._Code?_e.push(...Se._items):_e.push(Se),_e),[]));function Z(_e){const Se=j[_e.str];return Se===void 0||N[_e.str]!==1?_e:(delete N[_e.str],Se)}function Ee(_e){return _e instanceof t._Code&&_e._items.some(Se=>Se instanceof t.Name&&N[Se.str]===1&&j[Se.str]!==void 0)}}function ce(V,N){for(const j in N)V[j]=(V[j]||0)-(N[j]||0)}function se(V){return typeof V=="boolean"||typeof V=="number"||V===null?!V:(0,t._)`!${$(V)}`}e.not=se;const ne=D(e.operators.AND);function X(...V){return V.reduce(ne)}e.and=X;const x=D(e.operators.OR);function L(...V){return V.reduce(x)}e.or=L;function D(V){return(N,j)=>N===t.nil?j:j===t.nil?N:(0,t._)`${$(N)} ${V} ${$(j)}`}function $(V){return V instanceof t.Name?V:(0,t._)`(${V})`}})($d)),$d}var Ze={},ub;function pt(){if(ub)return Ze;ub=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=$o();function r(m){const v={};for(const A of m)v[A]=!0;return v}Ze.toHash=r;function n(m,v){return typeof v=="boolean"?v:Object.keys(v).length===0?!0:(i(m,v),!a(v,m.self.RULES.all))}Ze.alwaysValidSchema=n;function i(m,v=m.schema){const{opts:A,self:P}=m;if(!A.strictSchema||typeof v=="boolean")return;const q=P.RULES.keywords;for(const z in v)q[z]||b(m,`unknown keyword: "${z}"`)}Ze.checkUnknownRules=i;function a(m,v){if(typeof m=="boolean")return!m;for(const A in m)if(v[A])return!0;return!1}Ze.schemaHasRules=a;function s(m,v){if(typeof m=="boolean")return!m;for(const A in m)if(A!=="$ref"&&v.all[A])return!0;return!1}Ze.schemaHasRulesButRef=s;function o({topSchemaRef:m,schemaPath:v},A,P,q){if(!q){if(typeof A=="number"||typeof A=="boolean")return A;if(typeof A=="string")return(0,e._)`${A}`}return(0,e._)`${m}${v}${(0,e.getProperty)(P)}`}Ze.schemaRefOrVal=o;function u(m){return d(decodeURIComponent(m))}Ze.unescapeFragment=u;function l(m){return encodeURIComponent(c(m))}Ze.escapeFragment=l;function c(m){return typeof m=="number"?`${m}`:m.replace(/~/g,"~0").replace(/\//g,"~1")}Ze.escapeJsonPointer=c;function d(m){return m.replace(/~1/g,"/").replace(/~0/g,"~")}Ze.unescapeJsonPointer=d;function p(m,v){if(Array.isArray(m))for(const A of m)v(A);else v(m)}Ze.eachItem=p;function f({mergeNames:m,mergeToName:v,mergeValues:A,resultToName:P}){return(q,z,Y,W)=>{const U=Y===void 0?z:Y instanceof e.Name?(z instanceof e.Name?m(q,z,Y):v(q,z,Y),Y):z instanceof e.Name?(v(q,Y,z),z):A(z,Y);return W===e.Name&&!(U instanceof e.Name)?P(q,U):U}}Ze.mergeEvaluated={props:f({mergeNames:(m,v,A)=>m.if((0,e._)`${A} !== true && ${v} !== undefined`,()=>{m.if((0,e._)`${v} === true`,()=>m.assign(A,!0),()=>m.assign(A,(0,e._)`${A} || {}`).code((0,e._)`Object.assign(${A}, ${v})`))}),mergeToName:(m,v,A)=>m.if((0,e._)`${A} !== true`,()=>{v===!0?m.assign(A,!0):(m.assign(A,(0,e._)`${A} || {}`),R(m,A,v))}),mergeValues:(m,v)=>m===!0?!0:{...m,...v},resultToName:_}),items:f({mergeNames:(m,v,A)=>m.if((0,e._)`${A} !== true && ${v} !== undefined`,()=>m.assign(A,(0,e._)`${v} === true ? true : ${A} > ${v} ? ${A} : ${v}`)),mergeToName:(m,v,A)=>m.if((0,e._)`${A} !== true`,()=>m.assign(A,v===!0?!0:(0,e._)`${A} > ${v} ? ${A} : ${v}`)),mergeValues:(m,v)=>m===!0?!0:Math.max(m,v),resultToName:(m,v)=>m.var("items",v)})};function _(m,v){if(v===!0)return m.var("props",!0);const A=m.var("props",(0,e._)`{}`);return v!==void 0&&R(m,A,v),A}Ze.evaluatedPropsToName=_;function R(m,v,A){Object.keys(A).forEach(P=>m.assign((0,e._)`${v}${(0,e.getProperty)(P)}`,!0))}Ze.setEvaluated=R;const w={};function O(m,v){return m.scopeValue("func",{ref:v,code:w[v.code]||(w[v.code]=new t._Code(v.code))})}Ze.useFunc=O;var h;(function(m){m[m.Num=0]="Num",m[m.Str=1]="Str"})(h||(Ze.Type=h={}));function T(m,v,A){if(m instanceof e.Name){const P=v===h.Num;return A?P?(0,e._)`"[" + ${m} + "]"`:(0,e._)`"['" + ${m} + "']"`:P?(0,e._)`"/" + ${m}`:(0,e._)`"/" + ${m}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return A?(0,e.getProperty)(m).toString():"/"+c(m)}Ze.getErrorPath=T;function b(m,v,A=m.opts.strictSchema){if(A){if(v=`strict mode: ${v}`,A===!0)throw new Error(v);m.self.logger.warn(v)}}return Ze.checkStrictMode=b,Ze}var ac={},cb;function Vn(){if(cb)return ac;cb=1,Object.defineProperty(ac,"__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 ac.default=t,ac}var lb;function Qo(){return lb||(lb=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=Vn();e.keywordError={message:({keyword:w})=>(0,t.str)`must pass "${w}" keyword validation`},e.keyword$DataError={message:({keyword:w,schemaType:O})=>O?(0,t.str)`"${w}" keyword must be ${O} ($data)`:(0,t.str)`"${w}" keyword is invalid ($data)`};function i(w,O=e.keywordError,h,T){const{it:b}=w,{gen:m,compositeRule:v,allErrors:A}=b,P=d(w,O,h);T??(v||A)?u(m,P):l(b,(0,t._)`[${P}]`)}e.reportError=i;function a(w,O=e.keywordError,h){const{it:T}=w,{gen:b,compositeRule:m,allErrors:v}=T,A=d(w,O,h);u(b,A),m||v||l(T,n.default.vErrors)}e.reportExtraError=a;function s(w,O){w.assign(n.default.errors,O),w.if((0,t._)`${n.default.vErrors} !== null`,()=>w.if(O,()=>w.assign((0,t._)`${n.default.vErrors}.length`,O),()=>w.assign(n.default.vErrors,null)))}e.resetErrorsCount=s;function o({gen:w,keyword:O,schemaValue:h,data:T,errsCount:b,it:m}){if(b===void 0)throw new Error("ajv implementation error");const v=w.name("err");w.forRange("i",b,n.default.errors,A=>{w.const(v,(0,t._)`${n.default.vErrors}[${A}]`),w.if((0,t._)`${v}.instancePath === undefined`,()=>w.assign((0,t._)`${v}.instancePath`,(0,t.strConcat)(n.default.instancePath,m.errorPath))),w.assign((0,t._)`${v}.schemaPath`,(0,t.str)`${m.errSchemaPath}/${O}`),m.opts.verbose&&(w.assign((0,t._)`${v}.schema`,h),w.assign((0,t._)`${v}.data`,T))})}e.extendErrors=o;function u(w,O){const h=w.const("err",O);w.if((0,t._)`${n.default.vErrors} === null`,()=>w.assign(n.default.vErrors,(0,t._)`[${h}]`),(0,t._)`${n.default.vErrors}.push(${h})`),w.code((0,t._)`${n.default.errors}++`)}function l(w,O){const{gen:h,validateName:T,schemaEnv:b}=w;b.$async?h.throw((0,t._)`new ${w.ValidationError}(${O})`):(h.assign((0,t._)`${T}.errors`,O),h.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(w,O,h){const{createErrors:T}=w.it;return T===!1?(0,t._)`{}`:p(w,O,h)}function p(w,O,h={}){const{gen:T,it:b}=w,m=[f(b,h),_(w,h)];return R(w,O,m),T.object(...m)}function f({errorPath:w},{instancePath:O}){const h=O?(0,t.str)`${w}${(0,r.getErrorPath)(O,r.Type.Str)}`:w;return[n.default.instancePath,(0,t.strConcat)(n.default.instancePath,h)]}function _({keyword:w,it:{errSchemaPath:O}},{schemaPath:h,parentSchema:T}){let b=T?O:(0,t.str)`${O}/${w}`;return h&&(b=(0,t.str)`${b}${(0,r.getErrorPath)(h,r.Type.Str)}`),[c.schemaPath,b]}function R(w,{params:O,message:h},T){const{keyword:b,data:m,schemaValue:v,it:A}=w,{opts:P,propertyName:q,topSchemaRef:z,schemaPath:Y}=A;T.push([c.keyword,b],[c.params,typeof O=="function"?O(w):O||(0,t._)`{}`]),P.messages&&T.push([c.message,typeof h=="function"?h(w):h]),P.verbose&&T.push([c.schema,v],[c.parentSchema,(0,t._)`${z}${Y}`],[n.default.data,m]),q&&T.push([c.propertyName,q])}})(Ld)),Ld}var db;function SU(){if(db)return mi;db=1,Object.defineProperty(mi,"__esModule",{value:!0}),mi.boolOrEmptySchema=mi.topBoolOrEmptySchema=void 0;const e=Qo(),t=Ke(),r=Vn(),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))}mi.topBoolOrEmptySchema=i;function a(o,u){const{gen:l,schema:c}=o;c===!1?(l.var(u,!1),s(o)):l.var(u,!0)}mi.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 mi}var Qt={},hi={},fb;function BP(){if(fb)return hi;fb=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 Nn={},pb;function kP(){if(pb)return Nn;pb=1,Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.shouldUseRule=Nn.shouldUseGroup=Nn.schemaHasRulesForType=void 0;function e({schema:n,self:i},a){const s=i.RULES.types[a];return s&&s!==!0&&t(n,s)}Nn.schemaHasRulesForType=e;function t(n,i){return i.rules.some(a=>r(n,a))}Nn.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 Nn.shouldUseRule=r,Nn}var mb;function Ml(){if(mb)return Qt;mb=1,Object.defineProperty(Qt,"__esModule",{value:!0}),Qt.reportTypeError=Qt.checkDataTypes=Qt.checkDataType=Qt.coerceAndCheckDataType=Qt.getJSONTypes=Qt.getSchemaTypes=Qt.DataType=void 0;const e=BP(),t=kP(),r=Qo(),n=Ke(),i=pt();var a;(function(h){h[h.Correct=0]="Correct",h[h.Wrong=1]="Wrong"})(a||(Qt.DataType=a={}));function s(h){const T=o(h.type);if(T.includes("null")){if(h.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!T.length&&h.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');h.nullable===!0&&T.push("null")}return T}Qt.getSchemaTypes=s;function o(h){const T=Array.isArray(h)?h:h?[h]:[];if(T.every(e.isJSONType))return T;throw new Error("type must be JSONType or JSONType[]: "+T.join(","))}Qt.getJSONTypes=o;function u(h,T){const{gen:b,data:m,opts:v}=h,A=c(T,v.coerceTypes),P=T.length>0&&!(A.length===0&&T.length===1&&(0,t.schemaHasRulesForType)(h,T[0]));if(P){const q=_(T,m,v.strictNumbers,a.Wrong);b.if(q,()=>{A.length?d(h,T,A):w(h)})}return P}Qt.coerceAndCheckDataType=u;const l=new Set(["string","number","integer","boolean","null"]);function c(h,T){return T?h.filter(b=>l.has(b)||T==="array"&&b==="array"):[]}function d(h,T,b){const{gen:m,data:v,opts:A}=h,P=m.let("dataType",(0,n._)`typeof ${v}`),q=m.let("coerced",(0,n._)`undefined`);A.coerceTypes==="array"&&m.if((0,n._)`${P} == 'object' && Array.isArray(${v}) && ${v}.length == 1`,()=>m.assign(v,(0,n._)`${v}[0]`).assign(P,(0,n._)`typeof ${v}`).if(_(T,v,A.strictNumbers),()=>m.assign(q,v))),m.if((0,n._)`${q} !== undefined`);for(const Y of b)(l.has(Y)||Y==="array"&&A.coerceTypes==="array")&&z(Y);m.else(),w(h),m.endIf(),m.if((0,n._)`${q} !== undefined`,()=>{m.assign(v,q),p(h,q)});function z(Y){switch(Y){case"string":m.elseIf((0,n._)`${P} == "number" || ${P} == "boolean"`).assign(q,(0,n._)`"" + ${v}`).elseIf((0,n._)`${v} === null`).assign(q,(0,n._)`""`);return;case"number":m.elseIf((0,n._)`${P} == "boolean" || ${v} === null
52
- || (${P} == "string" && ${v} && ${v} == +${v})`).assign(q,(0,n._)`+${v}`);return;case"integer":m.elseIf((0,n._)`${P} === "boolean" || ${v} === null
53
- || (${P} === "string" && ${v} && ${v} == +${v} && !(${v} % 1))`).assign(q,(0,n._)`+${v}`);return;case"boolean":m.elseIf((0,n._)`${v} === "false" || ${v} === 0 || ${v} === null`).assign(q,!1).elseIf((0,n._)`${v} === "true" || ${v} === 1`).assign(q,!0);return;case"null":m.elseIf((0,n._)`${v} === "" || ${v} === 0 || ${v} === false`),m.assign(q,null);return;case"array":m.elseIf((0,n._)`${P} === "string" || ${P} === "number"
54
- || ${P} === "boolean" || ${v} === null`).assign(q,(0,n._)`[${v}]`)}}}function p({gen:h,parentData:T,parentDataProperty:b},m){h.if((0,n._)`${T} !== undefined`,()=>h.assign((0,n._)`${T}[${b}]`,m))}function f(h,T,b,m=a.Correct){const v=m===a.Correct?n.operators.EQ:n.operators.NEQ;let A;switch(h){case"null":return(0,n._)`${T} ${v} null`;case"array":A=(0,n._)`Array.isArray(${T})`;break;case"object":A=(0,n._)`${T} && typeof ${T} == "object" && !Array.isArray(${T})`;break;case"integer":A=P((0,n._)`!(${T} % 1) && !isNaN(${T})`);break;case"number":A=P();break;default:return(0,n._)`typeof ${T} ${v} ${h}`}return m===a.Correct?A:(0,n.not)(A);function P(q=n.nil){return(0,n.and)((0,n._)`typeof ${T} == "number"`,q,b?(0,n._)`isFinite(${T})`:n.nil)}}Qt.checkDataType=f;function _(h,T,b,m){if(h.length===1)return f(h[0],T,b,m);let v;const A=(0,i.toHash)(h);if(A.array&&A.object){const P=(0,n._)`typeof ${T} != "object"`;v=A.null?P:(0,n._)`!${T} || ${P}`,delete A.null,delete A.array,delete A.object}else v=n.nil;A.number&&delete A.integer;for(const P in A)v=(0,n.and)(v,f(P,T,b,m));return v}Qt.checkDataTypes=_;const R={message:({schema:h})=>`must be ${h}`,params:({schema:h,schemaValue:T})=>typeof h=="string"?(0,n._)`{type: ${h}}`:(0,n._)`{type: ${T}}`};function w(h){const T=O(h);(0,r.reportError)(T,R)}Qt.reportTypeError=w;function O(h){const{gen:T,data:b,schema:m}=h,v=(0,i.schemaRefOrVal)(h,m,"type");return{gen:T,keyword:"type",data:b,schema:m.type,schemaCode:v,schemaValue:v,parentSchema:m,params:{},it:h}}return Qt}var js={},hb;function IU(){if(hb)return js;hb=1,Object.defineProperty(js,"__esModule",{value:!0}),js.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))}js.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 p=(0,e._)`${d} === undefined`;c.useDefaults==="empty"&&(p=(0,e._)`${p} || ${d} === null || ${d} === ""`),o.if(p,(0,e._)`${d} = ${(0,e.stringify)(s)}`)}return js}var Ur={},Et={},yb;function Zr(){if(yb)return Et;yb=1,Object.defineProperty(Et,"__esModule",{value:!0}),Et.validateUnion=Et.validateArray=Et.usePattern=Et.callValidateCode=Et.schemaProperties=Et.allSchemaProperties=Et.noPropertyInData=Et.propertyInData=Et.isOwnProperty=Et.hasPropFunc=Et.reportMissingProp=Et.checkMissingProp=Et.checkReportMissingProp=void 0;const e=Ke(),t=pt(),r=Vn(),n=pt();function i(h,T){const{gen:b,data:m,it:v}=h;b.if(c(b,m,T,v.opts.ownProperties),()=>{h.setParams({missingProperty:(0,e._)`${T}`},!0),h.error()})}Et.checkReportMissingProp=i;function a({gen:h,data:T,it:{opts:b}},m,v){return(0,e.or)(...m.map(A=>(0,e.and)(c(h,T,A,b.ownProperties),(0,e._)`${v} = ${A}`)))}Et.checkMissingProp=a;function s(h,T){h.setParams({missingProperty:T},!0),h.error()}Et.reportMissingProp=s;function o(h){return h.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}Et.hasPropFunc=o;function u(h,T,b){return(0,e._)`${o(h)}.call(${T}, ${b})`}Et.isOwnProperty=u;function l(h,T,b,m){const v=(0,e._)`${T}${(0,e.getProperty)(b)} !== undefined`;return m?(0,e._)`${v} && ${u(h,T,b)}`:v}Et.propertyInData=l;function c(h,T,b,m){const v=(0,e._)`${T}${(0,e.getProperty)(b)} === undefined`;return m?(0,e.or)(v,(0,e.not)(u(h,T,b))):v}Et.noPropertyInData=c;function d(h){return h?Object.keys(h).filter(T=>T!=="__proto__"):[]}Et.allSchemaProperties=d;function p(h,T){return d(T).filter(b=>!(0,t.alwaysValidSchema)(h,T[b]))}Et.schemaProperties=p;function f({schemaCode:h,data:T,it:{gen:b,topSchemaRef:m,schemaPath:v,errorPath:A},it:P},q,z,Y){const W=Y?(0,e._)`${h}, ${T}, ${m}${v}`:T,U=[[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,A)],[r.default.parentData,P.parentData],[r.default.parentDataProperty,P.parentDataProperty],[r.default.rootData,r.default.rootData]];P.opts.dynamicRef&&U.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const F=(0,e._)`${W}, ${b.object(...U)}`;return z!==e.nil?(0,e._)`${q}.call(${z}, ${F})`:(0,e._)`${q}(${F})`}Et.callValidateCode=f;const _=(0,e._)`new RegExp`;function R({gen:h,it:{opts:T}},b){const m=T.unicodeRegExp?"u":"",{regExp:v}=T.code,A=v(b,m);return h.scopeValue("pattern",{key:A.toString(),ref:A,code:(0,e._)`${v.code==="new RegExp"?_:(0,n.useFunc)(h,v)}(${b}, ${m})`})}Et.usePattern=R;function w(h){const{gen:T,data:b,keyword:m,it:v}=h,A=T.name("valid");if(v.allErrors){const q=T.let("valid",!0);return P(()=>T.assign(q,!1)),q}return T.var(A,!0),P(()=>T.break()),A;function P(q){const z=T.const("len",(0,e._)`${b}.length`);T.forRange("i",0,z,Y=>{h.subschema({keyword:m,dataProp:Y,dataPropType:t.Type.Num},A),T.if((0,e.not)(A),q)})}}Et.validateArray=w;function O(h){const{gen:T,schema:b,keyword:m,it:v}=h;if(!Array.isArray(b))throw new Error("ajv implementation error");if(b.some(z=>(0,t.alwaysValidSchema)(v,z))&&!v.opts.unevaluated)return;const P=T.let("valid",!1),q=T.name("_valid");T.block(()=>b.forEach((z,Y)=>{const W=h.subschema({keyword:m,schemaProp:Y,compositeRule:!0},q);T.assign(P,(0,e._)`${P} || ${q}`),h.mergeValidEvaluated(W,q)||T.if((0,e.not)(P))})),h.result(P,()=>h.reset(),()=>h.error(!0))}return Et.validateUnion=O,Et}var gb;function RU(){if(gb)return Ur;gb=1,Object.defineProperty(Ur,"__esModule",{value:!0}),Ur.validateKeywordUsage=Ur.validSchemaType=Ur.funcKeywordCode=Ur.macroKeywordCode=void 0;const e=Ke(),t=Vn(),r=Zr(),n=Qo();function i(p,f){const{gen:_,keyword:R,schema:w,parentSchema:O,it:h}=p,T=f.macro.call(h.self,w,O,h),b=l(_,R,T);h.opts.validateSchema!==!1&&h.self.validateSchema(T,!0);const m=_.name("valid");p.subschema({schema:T,schemaPath:e.nil,errSchemaPath:`${h.errSchemaPath}/${R}`,topSchemaRef:b,compositeRule:!0},m),p.pass(m,()=>p.error(!0))}Ur.macroKeywordCode=i;function a(p,f){var _;const{gen:R,keyword:w,schema:O,parentSchema:h,$data:T,it:b}=p;u(b,f);const m=!T&&f.compile?f.compile.call(b.self,O,h,b):f.validate,v=l(R,w,m),A=R.let("valid");p.block$data(A,P),p.ok((_=f.valid)!==null&&_!==void 0?_:A);function P(){if(f.errors===!1)Y(),f.modifying&&s(p),W(()=>p.error());else{const U=f.async?q():z();f.modifying&&s(p),W(()=>o(p,U))}}function q(){const U=R.let("ruleErrs",null);return R.try(()=>Y((0,e._)`await `),F=>R.assign(A,!1).if((0,e._)`${F} instanceof ${b.ValidationError}`,()=>R.assign(U,(0,e._)`${F}.errors`),()=>R.throw(F))),U}function z(){const U=(0,e._)`${v}.errors`;return R.assign(U,null),Y(e.nil),U}function Y(U=f.async?(0,e._)`await `:e.nil){const F=b.opts.passContext?t.default.this:t.default.self,ce=!("compile"in f&&!T||f.schema===!1);R.assign(A,(0,e._)`${U}${(0,r.callValidateCode)(p,v,F,ce)}`,f.modifying)}function W(U){var F;R.if((0,e.not)((F=f.valid)!==null&&F!==void 0?F:A),U)}}Ur.funcKeywordCode=a;function s(p){const{gen:f,data:_,it:R}=p;f.if(R.parentData,()=>f.assign(_,(0,e._)`${R.parentData}[${R.parentDataProperty}]`))}function o(p,f){const{gen:_}=p;_.if((0,e._)`Array.isArray(${f})`,()=>{_.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${f} : ${t.default.vErrors}.concat(${f})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,n.extendErrors)(p)},()=>p.error())}function u({schemaEnv:p},f){if(f.async&&!p.$async)throw new Error("async keyword in sync schema")}function l(p,f,_){if(_===void 0)throw new Error(`keyword "${f}" failed to compile`);return p.scopeValue("keyword",typeof _=="function"?{ref:_}:{ref:_,code:(0,e.stringify)(_)})}function c(p,f,_=!1){return!f.length||f.some(R=>R==="array"?Array.isArray(p):R==="object"?p&&typeof p=="object"&&!Array.isArray(p):typeof p==R||_&&typeof p>"u")}Ur.validSchemaType=c;function d({schema:p,opts:f,self:_,errSchemaPath:R},w,O){if(Array.isArray(w.keyword)?!w.keyword.includes(O):w.keyword!==O)throw new Error("ajv implementation error");const h=w.dependencies;if(h!=null&&h.some(T=>!Object.prototype.hasOwnProperty.call(p,T)))throw new Error(`parent schema must have dependencies of ${O}: ${h.join(",")}`);if(w.validateSchema&&!w.validateSchema(p[O])){const b=`keyword "${O}" value is invalid at path "${R}": `+_.errorsText(w.validateSchema.errors);if(f.validateSchema==="log")_.logger.error(b);else throw new Error(b)}}return Ur.validateKeywordUsage=d,Ur}var Pn={},_b;function wU(){if(_b)return Pn;_b=1,Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.extendSubschemaMode=Pn.extendSubschemaData=Pn.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 p=a.schema[s];return o===void 0?{schema:p,schemaPath:(0,e._)`${a.schemaPath}${(0,e.getProperty)(s)}`,errSchemaPath:`${a.errSchemaPath}/${s}`}:{schema:p[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')}Pn.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:p}=s;if(o!==void 0){const{errorPath:_,dataPathArr:R,opts:w}=s,O=p.let("data",(0,e._)`${s.data}${(0,e.getProperty)(o)}`,!0);f(O),a.errorPath=(0,e.str)`${_}${(0,t.getErrorPath)(o,u,w.jsPropertySyntax)}`,a.parentDataProperty=(0,e._)`${o}`,a.dataPathArr=[...R,a.parentDataProperty]}if(l!==void 0){const _=l instanceof e.Name?l:p.let("data",l,!0);f(_),d!==void 0&&(a.propertyName=d)}c&&(a.dataTypes=c);function f(_){a.data=_,a.dataLevel=s.dataLevel+1,a.dataTypes=[],s.definedProperties=new Set,a.parentData=s.data,a.dataNames=[...s.dataNames,_]}}Pn.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 Pn.extendSubschemaMode=i,Pn}var fr={},kd,Eb;function q_(){return Eb||(Eb=1,kd=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}),kd}var Ud={exports:{}},vb;function AU(){if(vb)return Ud.exports;vb=1;var e=Ud.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,p){if(s&&typeof s=="object"&&!Array.isArray(s)){i(s,o,u,l,c,d,p);for(var f in s){var _=s[f];if(Array.isArray(_)){if(f in e.arrayKeywords)for(var R=0;R<_.length;R++)t(n,i,a,_[R],o+"/"+f+"/"+R,u,o,f,s,R)}else if(f in e.propsKeywords){if(_&&typeof _=="object")for(var w in _)t(n,i,a,_[w],o+"/"+f+"/"+r(w),u,o,f,s,w)}else(f in e.keywords||n.allKeys&&!(f in e.skipKeywords))&&t(n,i,a,_,o+"/"+f,u,o,f,s)}a(s,o,u,l,c,d,p)}}function r(n){return n.replace(/~/g,"~0").replace(/\//g,"~1")}return Ud.exports}var bb;function Yl(){if(bb)return fr;bb=1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.getSchemaRefs=fr.resolveUrl=fr.normalizeId=fr._getFullPath=fr.getFullPath=fr.inlineRef=void 0;const e=pt(),t=q_(),r=AU(),n=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function i(R,w=!0){return typeof R=="boolean"?!0:w===!0?!s(R):w?o(R)<=w:!1}fr.inlineRef=i;const a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function s(R){for(const w in R){if(a.has(w))return!0;const O=R[w];if(Array.isArray(O)&&O.some(s)||typeof O=="object"&&s(O))return!0}return!1}function o(R){let w=0;for(const O in R){if(O==="$ref")return 1/0;if(w++,!n.has(O)&&(typeof R[O]=="object"&&(0,e.eachItem)(R[O],h=>w+=o(h)),w===1/0))return 1/0}return w}function u(R,w="",O){O!==!1&&(w=d(w));const h=R.parse(w);return l(R,h)}fr.getFullPath=u;function l(R,w){return R.serialize(w).split("#")[0]+"#"}fr._getFullPath=l;const c=/#\/?$/;function d(R){return R?R.replace(c,""):""}fr.normalizeId=d;function p(R,w,O){return O=d(O),R.resolve(w,O)}fr.resolveUrl=p;const f=/^[a-z_][-a-z0-9._]*$/i;function _(R,w){if(typeof R=="boolean")return{};const{schemaId:O,uriResolver:h}=this.opts,T=d(R[O]||w),b={"":T},m=u(h,T,!1),v={},A=new Set;return r(R,{allKeys:!0},(z,Y,W,U)=>{if(U===void 0)return;const F=m+Y;let ce=b[U];typeof z[O]=="string"&&(ce=se.call(this,z[O])),ne.call(this,z.$anchor),ne.call(this,z.$dynamicAnchor),b[Y]=ce;function se(X){const x=this.opts.uriResolver.resolve;if(X=d(ce?x(ce,X):X),A.has(X))throw q(X);A.add(X);let L=this.refs[X];return typeof L=="string"&&(L=this.refs[L]),typeof L=="object"?P(z,L.schema,X):X!==d(F)&&(X[0]==="#"?(P(z,v[X],X),v[X]=z):this.refs[X]=F),X}function ne(X){if(typeof X=="string"){if(!f.test(X))throw new Error(`invalid anchor "${X}"`);se.call(this,`#${X}`)}}}),v;function P(z,Y,W){if(Y!==void 0&&!t(z,Y))throw q(W)}function q(z){return new Error(`reference "${z}" resolves to more than one schema`)}}return fr.getSchemaRefs=_,fr}var Tb;function Zo(){if(Tb)return On;Tb=1,Object.defineProperty(On,"__esModule",{value:!0}),On.getData=On.KeywordCxt=On.validateFunctionCode=void 0;const e=SU(),t=Ml(),r=kP(),n=Ml(),i=IU(),a=RU(),s=wU(),o=Ke(),u=Vn(),l=Yl(),c=pt(),d=Qo();function p(ie){if(m(ie)&&(A(ie),b(ie))){w(ie);return}f(ie,()=>(0,e.topBoolOrEmptySchema)(ie))}On.validateFunctionCode=p;function f({gen:ie,validateName:le,schema:fe,schemaEnv:me,opts:Te},we){Te.code.es5?ie.func(le,(0,o._)`${u.default.data}, ${u.default.valCxt}`,me.$async,()=>{ie.code((0,o._)`"use strict"; ${h(fe,Te)}`),R(ie,Te),ie.code(we)}):ie.func(le,(0,o._)`${u.default.data}, ${_(Te)}`,me.$async,()=>ie.code(h(fe,Te)).code(we))}function _(ie){return(0,o._)`{${u.default.instancePath}="", ${u.default.parentData}, ${u.default.parentDataProperty}, ${u.default.rootData}=${u.default.data}${ie.dynamicRef?(0,o._)`, ${u.default.dynamicAnchors}={}`:o.nil}}={}`}function R(ie,le){ie.if(u.default.valCxt,()=>{ie.var(u.default.instancePath,(0,o._)`${u.default.valCxt}.${u.default.instancePath}`),ie.var(u.default.parentData,(0,o._)`${u.default.valCxt}.${u.default.parentData}`),ie.var(u.default.parentDataProperty,(0,o._)`${u.default.valCxt}.${u.default.parentDataProperty}`),ie.var(u.default.rootData,(0,o._)`${u.default.valCxt}.${u.default.rootData}`),le.dynamicRef&&ie.var(u.default.dynamicAnchors,(0,o._)`${u.default.valCxt}.${u.default.dynamicAnchors}`)},()=>{ie.var(u.default.instancePath,(0,o._)`""`),ie.var(u.default.parentData,(0,o._)`undefined`),ie.var(u.default.parentDataProperty,(0,o._)`undefined`),ie.var(u.default.rootData,u.default.data),le.dynamicRef&&ie.var(u.default.dynamicAnchors,(0,o._)`{}`)})}function w(ie){const{schema:le,opts:fe,gen:me}=ie;f(ie,()=>{fe.$comment&&le.$comment&&U(ie),z(ie),me.let(u.default.vErrors,null),me.let(u.default.errors,0),fe.unevaluated&&O(ie),P(ie),F(ie)})}function O(ie){const{gen:le,validateName:fe}=ie;ie.evaluated=le.const("evaluated",(0,o._)`${fe}.evaluated`),le.if((0,o._)`${ie.evaluated}.dynamicProps`,()=>le.assign((0,o._)`${ie.evaluated}.props`,(0,o._)`undefined`)),le.if((0,o._)`${ie.evaluated}.dynamicItems`,()=>le.assign((0,o._)`${ie.evaluated}.items`,(0,o._)`undefined`))}function h(ie,le){const fe=typeof ie=="object"&&ie[le.schemaId];return fe&&(le.code.source||le.code.process)?(0,o._)`/*# sourceURL=${fe} */`:o.nil}function T(ie,le){if(m(ie)&&(A(ie),b(ie))){v(ie,le);return}(0,e.boolOrEmptySchema)(ie,le)}function b({schema:ie,self:le}){if(typeof ie=="boolean")return!ie;for(const fe in ie)if(le.RULES.all[fe])return!0;return!1}function m(ie){return typeof ie.schema!="boolean"}function v(ie,le){const{schema:fe,gen:me,opts:Te}=ie;Te.$comment&&fe.$comment&&U(ie),Y(ie),W(ie);const we=me.const("_errs",u.default.errors);P(ie,we),me.var(le,(0,o._)`${we} === ${u.default.errors}`)}function A(ie){(0,c.checkUnknownRules)(ie),q(ie)}function P(ie,le){if(ie.opts.jtd)return se(ie,[],!1,le);const fe=(0,t.getSchemaTypes)(ie.schema),me=(0,t.coerceAndCheckDataType)(ie,fe);se(ie,fe,!me,le)}function q(ie){const{schema:le,errSchemaPath:fe,opts:me,self:Te}=ie;le.$ref&&me.ignoreKeywordsWithRef&&(0,c.schemaHasRulesButRef)(le,Te.RULES)&&Te.logger.warn(`$ref: keywords ignored in schema at path "${fe}"`)}function z(ie){const{schema:le,opts:fe}=ie;le.default!==void 0&&fe.useDefaults&&fe.strictSchema&&(0,c.checkStrictMode)(ie,"default is ignored in the schema root")}function Y(ie){const le=ie.schema[ie.opts.schemaId];le&&(ie.baseId=(0,l.resolveUrl)(ie.opts.uriResolver,ie.baseId,le))}function W(ie){if(ie.schema.$async&&!ie.schemaEnv.$async)throw new Error("async schema in sync schema")}function U({gen:ie,schemaEnv:le,schema:fe,errSchemaPath:me,opts:Te}){const we=fe.$comment;if(Te.$comment===!0)ie.code((0,o._)`${u.default.self}.logger.log(${we})`);else if(typeof Te.$comment=="function"){const Fe=(0,o.str)`${me}/$comment`,xe=ie.scopeValue("root",{ref:le.root});ie.code((0,o._)`${u.default.self}.opts.$comment(${we}, ${Fe}, ${xe}.schema)`)}}function F(ie){const{gen:le,schemaEnv:fe,validateName:me,ValidationError:Te,opts:we}=ie;fe.$async?le.if((0,o._)`${u.default.errors} === 0`,()=>le.return(u.default.data),()=>le.throw((0,o._)`new ${Te}(${u.default.vErrors})`)):(le.assign((0,o._)`${me}.errors`,u.default.vErrors),we.unevaluated&&ce(ie),le.return((0,o._)`${u.default.errors} === 0`))}function ce({gen:ie,evaluated:le,props:fe,items:me}){fe instanceof o.Name&&ie.assign((0,o._)`${le}.props`,fe),me instanceof o.Name&&ie.assign((0,o._)`${le}.items`,me)}function se(ie,le,fe,me){const{gen:Te,schema:we,data:Fe,allErrors:xe,opts:tt,self:Xe}=ie,{RULES:ut}=Xe;if(we.$ref&&(tt.ignoreKeywordsWithRef||!(0,c.schemaHasRulesButRef)(we,ut))){Te.block(()=>Ee(ie,"$ref",ut.all.$ref.definition));return}tt.jtd||X(ie,le),Te.block(()=>{for(const vt of ut.rules)$t(vt);$t(ut.post)});function $t(vt){(0,r.shouldUseGroup)(we,vt)&&(vt.type?(Te.if((0,n.checkDataType)(vt.type,Fe,tt.strictNumbers)),ne(ie,vt),le.length===1&&le[0]===vt.type&&fe&&(Te.else(),(0,n.reportTypeError)(ie)),Te.endIf()):ne(ie,vt),xe||Te.if((0,o._)`${u.default.errors} === ${me||0}`))}}function ne(ie,le){const{gen:fe,schema:me,opts:{useDefaults:Te}}=ie;Te&&(0,i.assignDefaults)(ie,le.type),fe.block(()=>{for(const we of le.rules)(0,r.shouldUseRule)(me,we)&&Ee(ie,we.keyword,we.definition,le.type)})}function X(ie,le){ie.schemaEnv.meta||!ie.opts.strictTypes||(x(ie,le),ie.opts.allowUnionTypes||L(ie,le),D(ie,ie.dataTypes))}function x(ie,le){if(le.length){if(!ie.dataTypes.length){ie.dataTypes=le;return}le.forEach(fe=>{V(ie.dataTypes,fe)||j(ie,`type "${fe}" not allowed by context "${ie.dataTypes.join(",")}"`)}),N(ie,le)}}function L(ie,le){le.length>1&&!(le.length===2&&le.includes("null"))&&j(ie,"use allowUnionTypes to allow union type keyword")}function D(ie,le){const fe=ie.self.RULES.all;for(const me in fe){const Te=fe[me];if(typeof Te=="object"&&(0,r.shouldUseRule)(ie.schema,Te)){const{type:we}=Te.definition;we.length&&!we.some(Fe=>$(le,Fe))&&j(ie,`missing type "${we.join(",")}" for keyword "${me}"`)}}}function $(ie,le){return ie.includes(le)||le==="number"&&ie.includes("integer")}function V(ie,le){return ie.includes(le)||le==="integer"&&ie.includes("number")}function N(ie,le){const fe=[];for(const me of ie.dataTypes)V(le,me)?fe.push(me):le.includes("integer")&&me==="number"&&fe.push("integer");ie.dataTypes=fe}function j(ie,le){const fe=ie.schemaEnv.baseId+ie.errSchemaPath;le+=` at "${fe}" (strictTypes)`,(0,c.checkStrictMode)(ie,le,ie.opts.strictTypes)}class Z{constructor(le,fe,me){if((0,a.validateKeywordUsage)(le,fe,me),this.gen=le.gen,this.allErrors=le.allErrors,this.keyword=me,this.data=le.data,this.schema=le.schema[me],this.$data=fe.$data&&le.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,c.schemaRefOrVal)(le,this.schema,me,this.$data),this.schemaType=fe.schemaType,this.parentSchema=le.schema,this.params={},this.it=le,this.def=fe,this.$data)this.schemaCode=le.gen.const("vSchema",Ie(this.$data,le));else if(this.schemaCode=this.schemaValue,!(0,a.validSchemaType)(this.schema,fe.schemaType,fe.allowUndefined))throw new Error(`${me} value must be ${JSON.stringify(fe.schemaType)}`);("code"in fe?fe.trackErrors:fe.errors!==!1)&&(this.errsCount=le.gen.const("_errs",u.default.errors))}result(le,fe,me){this.failResult((0,o.not)(le),fe,me)}failResult(le,fe,me){this.gen.if(le),me?me():this.error(),fe?(this.gen.else(),fe(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(le,fe){this.failResult((0,o.not)(le),void 0,fe)}fail(le){if(le===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(le),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(le){if(!this.$data)return this.fail(le);const{schemaCode:fe}=this;this.fail((0,o._)`${fe} !== undefined && (${(0,o.or)(this.invalid$data(),le)})`)}error(le,fe,me){if(fe){this.setParams(fe),this._error(le,me),this.setParams({});return}this._error(le,me)}_error(le,fe){(le?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(le){this.allErrors||this.gen.if(le)}setParams(le,fe){fe?Object.assign(this.params,le):this.params=le}block$data(le,fe,me=o.nil){this.gen.block(()=>{this.check$data(le,me),fe()})}check$data(le=o.nil,fe=o.nil){if(!this.$data)return;const{gen:me,schemaCode:Te,schemaType:we,def:Fe}=this;me.if((0,o.or)((0,o._)`${Te} === undefined`,fe)),le!==o.nil&&me.assign(le,!0),(we.length||Fe.validateSchema)&&(me.elseIf(this.invalid$data()),this.$dataError(),le!==o.nil&&me.assign(le,!1)),me.else()}invalid$data(){const{gen:le,schemaCode:fe,schemaType:me,def:Te,it:we}=this;return(0,o.or)(Fe(),xe());function Fe(){if(me.length){if(!(fe instanceof o.Name))throw new Error("ajv implementation error");const tt=Array.isArray(me)?me:[me];return(0,o._)`${(0,n.checkDataTypes)(tt,fe,we.opts.strictNumbers,n.DataType.Wrong)}`}return o.nil}function xe(){if(Te.validateSchema){const tt=le.scopeValue("validate$data",{ref:Te.validateSchema});return(0,o._)`!${tt}(${fe})`}return o.nil}}subschema(le,fe){const me=(0,s.getSubschema)(this.it,le);(0,s.extendSubschemaData)(me,this.it,le),(0,s.extendSubschemaMode)(me,le);const Te={...this.it,...me,items:void 0,props:void 0};return T(Te,fe),Te}mergeEvaluated(le,fe){const{it:me,gen:Te}=this;me.opts.unevaluated&&(me.props!==!0&&le.props!==void 0&&(me.props=c.mergeEvaluated.props(Te,le.props,me.props,fe)),me.items!==!0&&le.items!==void 0&&(me.items=c.mergeEvaluated.items(Te,le.items,me.items,fe)))}mergeValidEvaluated(le,fe){const{it:me,gen:Te}=this;if(me.opts.unevaluated&&(me.props!==!0||me.items!==!0))return Te.if(fe,()=>this.mergeEvaluated(le,o.Name)),!0}}On.KeywordCxt=Z;function Ee(ie,le,fe,me){const Te=new Z(ie,fe,le);"code"in fe?fe.code(Te,me):Te.$data&&fe.validate?(0,a.funcKeywordCode)(Te,fe):"macro"in fe?(0,a.macroKeywordCode)(Te,fe):(fe.compile||fe.validate)&&(0,a.funcKeywordCode)(Te,fe)}const _e=/^\/(?:[^~]|~0|~1)*$/,Se=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Ie(ie,{dataLevel:le,dataNames:fe,dataPathArr:me}){let Te,we;if(ie==="")return u.default.rootData;if(ie[0]==="/"){if(!_e.test(ie))throw new Error(`Invalid JSON-pointer: ${ie}`);Te=ie,we=u.default.rootData}else{const Xe=Se.exec(ie);if(!Xe)throw new Error(`Invalid JSON-pointer: ${ie}`);const ut=+Xe[1];if(Te=Xe[2],Te==="#"){if(ut>=le)throw new Error(tt("property/index",ut));return me[le-ut]}if(ut>le)throw new Error(tt("data",ut));if(we=fe[le-ut],!Te)return we}let Fe=we;const xe=Te.split("/");for(const Xe of xe)Xe&&(we=(0,o._)`${we}${(0,o.getProperty)((0,c.unescapeJsonPointer)(Xe))}`,Fe=(0,o._)`${Fe} && ${we}`);return Fe;function tt(Xe,ut){return`Cannot access ${Xe} ${ut} levels up, current level is ${le}`}}return On.getData=Ie,On}var sc={},Sb;function B_(){if(Sb)return sc;Sb=1,Object.defineProperty(sc,"__esModule",{value:!0});class e extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return sc.default=e,sc}var oc={},Ib;function xl(){if(Ib)return oc;Ib=1,Object.defineProperty(oc,"__esModule",{value:!0});const e=Yl();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 oc.default=t,oc}var Or={},Rb;function k_(){if(Rb)return Or;Rb=1,Object.defineProperty(Or,"__esModule",{value:!0}),Or.resolveSchema=Or.getCompilingSchema=Or.resolveRef=Or.compileSchema=Or.SchemaEnv=void 0;const e=Ke(),t=B_(),r=Vn(),n=Yl(),i=pt(),a=Zo();class s{constructor(O){var h;this.refs={},this.dynamicAnchors={};let T;typeof O.schema=="object"&&(T=O.schema),this.schema=O.schema,this.schemaId=O.schemaId,this.root=O.root||this,this.baseId=(h=O.baseId)!==null&&h!==void 0?h:(0,n.normalizeId)(T==null?void 0:T[O.schemaId||"$id"]),this.schemaPath=O.schemaPath,this.localRefs=O.localRefs,this.meta=O.meta,this.$async=T==null?void 0:T.$async,this.refs={}}}Or.SchemaEnv=s;function o(w){const O=c.call(this,w);if(O)return O;const h=(0,n.getFullPath)(this.opts.uriResolver,w.root.baseId),{es5:T,lines:b}=this.opts.code,{ownProperties:m}=this.opts,v=new e.CodeGen(this.scope,{es5:T,lines:b,ownProperties:m});let A;w.$async&&(A=v.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const P=v.scopeName("validate");w.validateName=P;const q={gen:v,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:v.scopeValue("schema",this.opts.code.source===!0?{ref:w.schema,code:(0,e.stringify)(w.schema)}:{ref:w.schema}),validateName:P,ValidationError:A,schema:w.schema,schemaEnv:w,rootId:h,baseId:w.baseId||h,schemaPath:e.nil,errSchemaPath:w.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let z;try{this._compilations.add(w),(0,a.validateFunctionCode)(q),v.optimize(this.opts.code.optimize);const Y=v.toString();z=`${v.scopeRefs(r.default.scope)}return ${Y}`,this.opts.code.process&&(z=this.opts.code.process(z,w));const U=new Function(`${r.default.self}`,`${r.default.scope}`,z)(this,this.scope.get());if(this.scope.value(P,{ref:U}),U.errors=null,U.schema=w.schema,U.schemaEnv=w,w.$async&&(U.$async=!0),this.opts.code.source===!0&&(U.source={validateName:P,validateCode:Y,scopeValues:v._values}),this.opts.unevaluated){const{props:F,items:ce}=q;U.evaluated={props:F instanceof e.Name?void 0:F,items:ce instanceof e.Name?void 0:ce,dynamicProps:F instanceof e.Name,dynamicItems:ce instanceof e.Name},U.source&&(U.source.evaluated=(0,e.stringify)(U.evaluated))}return w.validate=U,w}catch(Y){throw delete w.validate,delete w.validateName,z&&this.logger.error("Error compiling schema, function code:",z),Y}finally{this._compilations.delete(w)}}Or.compileSchema=o;function u(w,O,h){var T;h=(0,n.resolveUrl)(this.opts.uriResolver,O,h);const b=w.refs[h];if(b)return b;let m=p.call(this,w,h);if(m===void 0){const v=(T=w.localRefs)===null||T===void 0?void 0:T[h],{schemaId:A}=this.opts;v&&(m=new s({schema:v,schemaId:A,root:w,baseId:O}))}if(m!==void 0)return w.refs[h]=l.call(this,m)}Or.resolveRef=u;function l(w){return(0,n.inlineRef)(w.schema,this.opts.inlineRefs)?w.schema:w.validate?w:o.call(this,w)}function c(w){for(const O of this._compilations)if(d(O,w))return O}Or.getCompilingSchema=c;function d(w,O){return w.schema===O.schema&&w.root===O.root&&w.baseId===O.baseId}function p(w,O){let h;for(;typeof(h=this.refs[O])=="string";)O=h;return h||this.schemas[O]||f.call(this,w,O)}function f(w,O){const h=this.opts.uriResolver.parse(O),T=(0,n._getFullPath)(this.opts.uriResolver,h);let b=(0,n.getFullPath)(this.opts.uriResolver,w.baseId,void 0);if(Object.keys(w.schema).length>0&&T===b)return R.call(this,h,w);const m=(0,n.normalizeId)(T),v=this.refs[m]||this.schemas[m];if(typeof v=="string"){const A=f.call(this,w,v);return typeof(A==null?void 0:A.schema)!="object"?void 0:R.call(this,h,A)}if(typeof(v==null?void 0:v.schema)=="object"){if(v.validate||o.call(this,v),m===(0,n.normalizeId)(O)){const{schema:A}=v,{schemaId:P}=this.opts,q=A[P];return q&&(b=(0,n.resolveUrl)(this.opts.uriResolver,b,q)),new s({schema:A,schemaId:P,root:w,baseId:b})}return R.call(this,h,v)}}Or.resolveSchema=f;const _=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function R(w,{baseId:O,schema:h,root:T}){var b;if(((b=w.fragment)===null||b===void 0?void 0:b[0])!=="/")return;for(const A of w.fragment.slice(1).split("/")){if(typeof h=="boolean")return;const P=h[(0,i.unescapeFragment)(A)];if(P===void 0)return;h=P;const q=typeof h=="object"&&h[this.opts.schemaId];!_.has(A)&&q&&(O=(0,n.resolveUrl)(this.opts.uriResolver,O,q))}let m;if(typeof h!="boolean"&&h.$ref&&!(0,i.schemaHasRulesButRef)(h,this.RULES)){const A=(0,n.resolveUrl)(this.opts.uriResolver,O,h.$ref);m=f.call(this,T,A)}const{schemaId:v}=this.opts;if(m=m||new s({schema:h,schemaId:v,root:T,baseId:O}),m.schema!==m.root.schema)return m}return Or}const OU="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",NU="Meta-schema for $data reference (JSON AnySchema extension proposal)",PU="object",CU=["$data"],MU={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},DU=!1,jU={$id:OU,description:NU,type:PU,required:CU,properties:MU,additionalProperties:DU};var uc={},Ls={exports:{}},Fd,wb;function UP(){if(wb)return Fd;wb=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(m){let v="",A=0,P=0;for(P=0;P<m.length;P++)if(A=m[P].charCodeAt(0),A!==48){if(!(A>=48&&A<=57||A>=65&&A<=70||A>=97&&A<=102))return"";v+=m[P];break}for(P+=1;P<m.length;P++){if(A=m[P].charCodeAt(0),!(A>=48&&A<=57||A>=65&&A<=70||A>=97&&A<=102))return"";v+=m[P]}return v}const s=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function o(m){return m.length=0,!0}function u(m,v,A){if(m.length){const P=a(m);if(P!=="")v.push(P);else return A.error=!0,!1;m.length=0}return!0}function l(m){let v=0;const A={error:!1,address:"",zone:""},P=[],q=[];let z=!1,Y=!1,W=u;for(let U=0;U<m.length;U++){const F=m[U];if(!(F==="["||F==="]"))if(F===":"){if(z===!0&&(Y=!0),!W(q,P,A))break;if(++v>7){A.error=!0;break}U>0&&m[U-1]===":"&&(z=!0),P.push(":");continue}else if(F==="%"){if(!W(q,P,A))break;W=o}else{q.push(F);continue}}return q.length&&(W===o?A.zone=q.join(""):Y?P.push(q.join("")):P.push(a(q))),A.address=P.join(""),A}function c(m){if(d(m,":")<2)return{host:m,isIPV6:!1};const v=l(m);if(v.error)return{host:m,isIPV6:!1};{let A=v.address,P=v.address;return v.zone&&(A+="%"+v.zone,P+="%25"+v.zone),{host:A,isIPV6:!0,escapedHost:P}}}function d(m,v){let A=0;for(let P=0;P<m.length;P++)m[P]===v&&A++;return A}function p(m){let v=m;const A=[];let P=-1,q=0;for(;q=v.length;){if(q===1){if(v===".")break;if(v==="/"){A.push("/");break}else{A.push(v);break}}else if(q===2){if(v[0]==="."){if(v[1]===".")break;if(v[1]==="/"){v=v.slice(2);continue}}else if(v[0]==="/"&&(v[1]==="."||v[1]==="/")){A.push("/");break}}else if(q===3&&v==="/.."){A.length!==0&&A.pop(),A.push("/");break}if(v[0]==="."){if(v[1]==="."){if(v[2]==="/"){v=v.slice(3);continue}}else if(v[1]==="/"){v=v.slice(2);continue}}else if(v[0]==="/"&&v[1]==="."){if(v[2]==="/"){v=v.slice(2);continue}else if(v[2]==="."&&v[3]==="/"){v=v.slice(3),A.length!==0&&A.pop();continue}}if((P=v.indexOf("/",1))===-1){A.push(v);break}else A.push(v.slice(0,P)),v=v.slice(P)}return A.join("")}const f={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},_=/[@/?#:]/g,R=/[@/?#]/g;function w(m,v){const A=v?R:_;return A.lastIndex=0,m.replace(A,P=>f[P])}function O(m,v=!1){if(m.indexOf("%")===-1)return m;let A="";for(let P=0;P<m.length;P++){if(m[P]==="%"&&P+2<m.length){const q=m.slice(P+1,P+3);if(r(q)){const z=q.toUpperCase(),Y=String.fromCharCode(parseInt(z,16));v&&n(Y)?A+=Y:A+="%"+z,P+=2;continue}}A+=m[P]}return A}function h(m){let v="";for(let A=0;A<m.length;A++){if(m[A]==="%"&&A+2<m.length){const P=m.slice(A+1,A+3);if(r(P)){const q=P.toUpperCase(),z=String.fromCharCode(parseInt(q,16));z!=="."&&n(z)?v+=z:v+="%"+q,A+=2;continue}}i(m[A])?v+=m[A]:v+=escape(m[A])}return v}function T(m){let v="";for(let A=0;A<m.length;A++){if(m[A]==="%"&&A+2<m.length){const P=m.slice(A+1,A+3);if(r(P)){v+="%"+P.toUpperCase(),A+=2;continue}}v+=escape(m[A])}return v}function b(m){const v=[];if(m.userinfo!==void 0&&(v.push(m.userinfo),v.push("@")),m.host!==void 0){let A=unescape(m.host);if(!t(A)){const P=c(A);P.isIPV6===!0?A=`[${P.escapedHost}]`:A=w(A,!1)}v.push(A)}return(typeof m.port=="number"||typeof m.port=="string")&&(v.push(":"),v.push(String(m.port))),v.length?v.join(""):void 0}return Fd={nonSimpleDomain:s,recomposeAuthority:b,reescapeHostDelimiters:w,normalizePercentEncoding:O,normalizePathEncoding:h,escapePreservingEscapes:T,removeDotSegments:p,isIPv4:t,isUUID:e,normalizeIPv6:c,stringArrayToHexStripped:a},Fd}var Hd,Ab;function LU(){if(Ab)return Hd;Ab=1;const{isUUID:e}=UP(),t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,r=["http","https","ws","wss","urn","urn:uuid"];function n(m){return r.indexOf(m)!==-1}function i(m){return m.secure===!0?!0:m.secure===!1?!1:m.scheme?m.scheme.length===3&&(m.scheme[0]==="w"||m.scheme[0]==="W")&&(m.scheme[1]==="s"||m.scheme[1]==="S")&&(m.scheme[2]==="s"||m.scheme[2]==="S"):!1}function a(m){return m.host||(m.error=m.error||"HTTP URIs must have a host."),m}function s(m){const v=String(m.scheme).toLowerCase()==="https";return(m.port===(v?443:80)||m.port==="")&&(m.port=void 0),m.path||(m.path="/"),m}function o(m){return m.secure=i(m),m.resourceName=(m.path||"/")+(m.query?"?"+m.query:""),m.path=void 0,m.query=void 0,m}function u(m){if((m.port===(i(m)?443:80)||m.port==="")&&(m.port=void 0),typeof m.secure=="boolean"&&(m.scheme=m.secure?"wss":"ws",m.secure=void 0),m.resourceName){const[v,A]=m.resourceName.split("?");m.path=v&&v!=="/"?v:void 0,m.query=A,m.resourceName=void 0}return m.fragment=void 0,m}function l(m,v){if(!m.path)return m.error="URN can not be parsed",m;const A=m.path.match(t);if(A){const P=v.scheme||m.scheme||"urn";m.nid=A[1].toLowerCase(),m.nss=A[2];const q=`${P}:${v.nid||m.nid}`,z=b(q);m.path=void 0,z&&(m=z.parse(m,v))}else m.error=m.error||"URN can not be parsed.";return m}function c(m,v){if(m.nid===void 0)throw new Error("URN without nid cannot be serialized");const A=v.scheme||m.scheme||"urn",P=m.nid.toLowerCase(),q=`${A}:${v.nid||P}`,z=b(q);z&&(m=z.serialize(m,v));const Y=m,W=m.nss;return Y.path=`${P||v.nid}:${W}`,v.skipEscape=!0,Y}function d(m,v){const A=m;return A.uuid=A.nss,A.nss=void 0,!v.tolerant&&(!A.uuid||!e(A.uuid))&&(A.error=A.error||"UUID is not valid."),A}function p(m){const v=m;return v.nss=(m.uuid||"").toLowerCase(),v}const f={scheme:"http",domainHost:!0,parse:a,serialize:s},_={scheme:"https",domainHost:f.domainHost,parse:a,serialize:s},R={scheme:"ws",domainHost:!0,parse:o,serialize:u},w={scheme:"wss",domainHost:R.domainHost,parse:R.parse,serialize:R.serialize},T={http:f,https:_,ws:R,wss:w,urn:{scheme:"urn",parse:l,serialize:c,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:d,serialize:p,skipNormalize:!0}};Object.setPrototypeOf(T,null);function b(m){return m&&(T[m]||T[m.toLowerCase()])||void 0}return Hd={wsIsSecure:i,SCHEMES:T,isValidSchemeName:n,getSchemeHandler:b},Hd}var Ob;function $U(){if(Ob)return Ls.exports;Ob=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:r,normalizePercentEncoding:n,normalizePathEncoding:i,escapePreservingEscapes:a,reescapeHostDelimiters:s,isIPv4:o,nonSimpleDomain:u}=UP(),{SCHEMES:l,getSchemeHandler:c}=LU();function d(P,q){return typeof P=="string"?P=b(P,q):typeof P=="object"&&(P=T(R(P,q),q)),P}function p(P,q,z){const Y=z?Object.assign({scheme:"null"},z):{scheme:"null"},W=f(T(P,Y),T(q,Y),Y,!0);return Y.skipEscape=!0,R(W,Y)}function f(P,q,z,Y){const W={};return Y||(P=T(R(P,z),z),q=T(R(q,z),z)),z=z||{},!z.tolerant&&q.scheme?(W.scheme=q.scheme,W.userinfo=q.userinfo,W.host=q.host,W.port=q.port,W.path=t(q.path||""),W.query=q.query):(q.userinfo!==void 0||q.host!==void 0||q.port!==void 0?(W.userinfo=q.userinfo,W.host=q.host,W.port=q.port,W.path=t(q.path||""),W.query=q.query):(q.path?(q.path[0]==="/"?W.path=t(q.path):((P.userinfo!==void 0||P.host!==void 0||P.port!==void 0)&&!P.path?W.path="/"+q.path:P.path?W.path=P.path.slice(0,P.path.lastIndexOf("/")+1)+q.path:W.path=q.path,W.path=t(W.path)),W.query=q.query):(W.path=P.path,q.query!==void 0?W.query=q.query:W.query=P.query),W.userinfo=P.userinfo,W.host=P.host,W.port=P.port),W.scheme=P.scheme),W.fragment=q.fragment,W}function _(P,q,z){const Y=v(P,z),W=v(q,z);return Y!==void 0&&W!==void 0&&Y.toLowerCase()===W.toLowerCase()}function R(P,q){const z={host:P.host,scheme:P.scheme,userinfo:P.userinfo,port:P.port,path:P.path,query:P.query,nid:P.nid,nss:P.nss,uuid:P.uuid,fragment:P.fragment,reference:P.reference,resourceName:P.resourceName,secure:P.secure,error:""},Y=Object.assign({},q),W=[],U=c(Y.scheme||z.scheme);U&&U.serialize&&U.serialize(z,Y),z.path!==void 0&&(Y.skipEscape?z.path=n(z.path):(z.path=a(z.path),z.scheme!==void 0&&(z.path=z.path.split("%3A").join(":")))),Y.reference!=="suffix"&&z.scheme&&W.push(z.scheme,":");const F=r(z);if(F!==void 0&&(Y.reference!=="suffix"&&W.push("//"),W.push(F),z.path&&z.path[0]!=="/"&&W.push("/")),z.path!==void 0){let ce=z.path;!Y.absolutePath&&(!U||!U.absolutePath)&&(ce=t(ce)),F===void 0&&ce[0]==="/"&&ce[1]==="/"&&(ce="/%2F"+ce.slice(2)),W.push(ce)}return z.query!==void 0&&W.push("?",z.query),z.fragment!==void 0&&W.push("#",z.fragment),W.join("")}const w=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function O(P,q){if(q[2]!==void 0&&P.path&&P.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof P.port=="number"&&(P.port<0||P.port>65535))return"URI port is malformed."}function h(P,q){const z=Object.assign({},q),Y={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let W=!1,U=!1;z.reference==="suffix"&&(z.scheme?P=z.scheme+":"+P:P="//"+P);const F=P.match(w);if(F){Y.scheme=F[1],Y.userinfo=F[3],Y.host=F[4],Y.port=parseInt(F[5],10),Y.path=F[6]||"",Y.query=F[7],Y.fragment=F[8],isNaN(Y.port)&&(Y.port=F[5]);const ce=O(Y,F);if(ce!==void 0&&(Y.error=Y.error||ce,W=!0),Y.host)if(o(Y.host)===!1){const X=e(Y.host);Y.host=X.host.toLowerCase(),U=X.isIPV6}else U=!0;Y.scheme===void 0&&Y.userinfo===void 0&&Y.host===void 0&&Y.port===void 0&&Y.query===void 0&&!Y.path?Y.reference="same-document":Y.scheme===void 0?Y.reference="relative":Y.fragment===void 0?Y.reference="absolute":Y.reference="uri",z.reference&&z.reference!=="suffix"&&z.reference!==Y.reference&&(Y.error=Y.error||"URI is not a "+z.reference+" reference.");const se=c(z.scheme||Y.scheme);if(!z.unicodeSupport&&(!se||!se.unicodeSupport)&&Y.host&&(z.domainHost||se&&se.domainHost)&&U===!1&&u(Y.host))try{Y.host=new URL("http://"+Y.host).hostname}catch(ne){Y.error=Y.error||"Host's domain name can not be converted to ASCII: "+ne}if((!se||se&&!se.skipNormalize)&&(P.indexOf("%")!==-1&&(Y.scheme!==void 0&&(Y.scheme=unescape(Y.scheme)),Y.host!==void 0&&(Y.host=s(unescape(Y.host),U))),Y.path&&(Y.path=i(Y.path)),Y.fragment))try{Y.fragment=encodeURI(decodeURIComponent(Y.fragment))}catch{Y.error=Y.error||"URI malformed"}se&&se.parse&&se.parse(Y,z)}else Y.error=Y.error||"URI can not be parsed.";return{parsed:Y,malformedAuthorityOrPort:W}}function T(P,q){return h(P,q).parsed}function b(P,q){return m(P,q).normalized}function m(P,q){const{parsed:z,malformedAuthorityOrPort:Y}=h(P,q);return{normalized:Y?P:R(z,q),malformedAuthorityOrPort:Y}}function v(P,q){if(typeof P=="string"){const{normalized:z,malformedAuthorityOrPort:Y}=m(P,q);return Y?void 0:z}if(typeof P=="object")return R(P,q)}const A={SCHEMES:l,normalize:d,resolve:p,resolveComponent:f,equal:_,serialize:R,parse:T};return Ls.exports=A,Ls.exports.default=A,Ls.exports.fastUri=A,Ls.exports}var Nb;function qU(){if(Nb)return uc;Nb=1,Object.defineProperty(uc,"__esModule",{value:!0});const e=$U();return e.code='require("ajv/dist/runtime/uri").default',uc.default=e,uc}var Pb;function BU(){return Pb||(Pb=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=Zo();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=B_(),i=xl(),a=BP(),s=k_(),o=Ke(),u=Yl(),l=Ml(),c=pt(),d=jU,p=qU(),f=(L,D)=>new RegExp(L,D);f.code="new RegExp";const _=["removeAdditional","useDefaults","coerceTypes"],R=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),w={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."},O={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},h=200;function T(L){var D,$,V,N,j,Z,Ee,_e,Se,Ie,ie,le,fe,me,Te,we,Fe,xe,tt,Xe,ut,$t,vt,zt,bt;const rr=L.strict,nr=(D=L.code)===null||D===void 0?void 0:D.optimize,ht=nr===!0||nr===void 0?1:nr||0,wr=(V=($=L.code)===null||$===void 0?void 0:$.regExp)!==null&&V!==void 0?V:f,M=(N=L.uriResolver)!==null&&N!==void 0?N:p.default;return{strictSchema:(Z=(j=L.strictSchema)!==null&&j!==void 0?j:rr)!==null&&Z!==void 0?Z:!0,strictNumbers:(_e=(Ee=L.strictNumbers)!==null&&Ee!==void 0?Ee:rr)!==null&&_e!==void 0?_e:!0,strictTypes:(Ie=(Se=L.strictTypes)!==null&&Se!==void 0?Se:rr)!==null&&Ie!==void 0?Ie:"log",strictTuples:(le=(ie=L.strictTuples)!==null&&ie!==void 0?ie:rr)!==null&&le!==void 0?le:"log",strictRequired:(me=(fe=L.strictRequired)!==null&&fe!==void 0?fe:rr)!==null&&me!==void 0?me:!1,code:L.code?{...L.code,optimize:ht,regExp:wr}:{optimize:ht,regExp:wr},loopRequired:(Te=L.loopRequired)!==null&&Te!==void 0?Te:h,loopEnum:(we=L.loopEnum)!==null&&we!==void 0?we:h,meta:(Fe=L.meta)!==null&&Fe!==void 0?Fe:!0,messages:(xe=L.messages)!==null&&xe!==void 0?xe:!0,inlineRefs:(tt=L.inlineRefs)!==null&&tt!==void 0?tt:!0,schemaId:(Xe=L.schemaId)!==null&&Xe!==void 0?Xe:"$id",addUsedSchema:(ut=L.addUsedSchema)!==null&&ut!==void 0?ut:!0,validateSchema:($t=L.validateSchema)!==null&&$t!==void 0?$t:!0,validateFormats:(vt=L.validateFormats)!==null&&vt!==void 0?vt:!0,unicodeRegExp:(zt=L.unicodeRegExp)!==null&&zt!==void 0?zt:!0,int32range:(bt=L.int32range)!==null&&bt!==void 0?bt:!0,uriResolver:M}}class b{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,...T(D)};const{es5:$,lines:V}=this.opts.code;this.scope=new o.ValueScope({scope:{},prefixes:R,es5:$,lines:V}),this.logger=W(D.logger);const N=D.validateFormats;D.validateFormats=!1,this.RULES=(0,a.getRules)(),m.call(this,w,D,"NOT SUPPORTED"),m.call(this,O,D,"DEPRECATED","warn"),this._metaOpts=z.call(this),D.formats&&P.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),D.keywords&&q.call(this,D.keywords),typeof D.meta=="object"&&this.addMetaSchema(D.meta),A.call(this),D.validateFormats=N}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:D,meta:$,schemaId:V}=this.opts;let N=d;V==="id"&&(N={...d},N.id=N.$id,delete N.$id),$&&D&&this.addMetaSchema(N,N[V],!1)}defaultMeta(){const{meta:D,schemaId:$}=this.opts;return this.opts.defaultMeta=typeof D=="object"?D[$]||D:void 0}validate(D,$){let V;if(typeof D=="string"){if(V=this.getSchema(D),!V)throw new Error(`no schema with key or ref "${D}"`)}else V=this.compile(D);const N=V($);return"$async"in V||(this.errors=V.errors),N}compile(D,$){const V=this._addSchema(D,$);return V.validate||this._compileSchemaEnv(V)}compileAsync(D,$){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:V}=this.opts;return N.call(this,D,$);async function N(Ie,ie){await j.call(this,Ie.$schema);const le=this._addSchema(Ie,ie);return le.validate||Z.call(this,le)}async function j(Ie){Ie&&!this.getSchema(Ie)&&await N.call(this,{$ref:Ie},!0)}async function Z(Ie){try{return this._compileSchemaEnv(Ie)}catch(ie){if(!(ie instanceof i.default))throw ie;return Ee.call(this,ie),await _e.call(this,ie.missingSchema),Z.call(this,Ie)}}function Ee({missingSchema:Ie,missingRef:ie}){if(this.refs[Ie])throw new Error(`AnySchema ${Ie} is loaded but ${ie} cannot be resolved`)}async function _e(Ie){const ie=await Se.call(this,Ie);this.refs[Ie]||await j.call(this,ie.$schema),this.refs[Ie]||this.addSchema(ie,Ie,$)}async function Se(Ie){const ie=this._loading[Ie];if(ie)return ie;try{return await(this._loading[Ie]=V(Ie))}finally{delete this._loading[Ie]}}}addSchema(D,$,V,N=this.opts.validateSchema){if(Array.isArray(D)){for(const Z of D)this.addSchema(Z,void 0,V,N);return this}let j;if(typeof D=="object"){const{schemaId:Z}=this.opts;if(j=D[Z],j!==void 0&&typeof j!="string")throw new Error(`schema ${Z} must be string`)}return $=(0,u.normalizeId)($||j),this._checkUnique($),this.schemas[$]=this._addSchema(D,V,$,N,!0),this}addMetaSchema(D,$,V=this.opts.validateSchema){return this.addSchema(D,$,!0,V),this}validateSchema(D,$){if(typeof D=="boolean")return!0;let V;if(V=D.$schema,V!==void 0&&typeof V!="string")throw new Error("$schema must be a string");if(V=V||this.opts.defaultMeta||this.defaultMeta(),!V)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const N=this.validate(V,D);if(!N&&$){const j="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(j);else throw new Error(j)}return N}getSchema(D){let $;for(;typeof($=v.call(this,D))=="string";)D=$;if($===void 0){const{schemaId:V}=this.opts,N=new s.SchemaEnv({schema:{},schemaId:V});if($=s.resolveSchema.call(this,N,D),!$)return;this.refs[D]=$}return $.validate||this._compileSchemaEnv($)}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 $=v.call(this,D);return typeof $=="object"&&this._cache.delete($.schema),delete this.schemas[D],delete this.refs[D],this}case"object":{const $=D;this._cache.delete($);let V=D[this.opts.schemaId];return V&&(V=(0,u.normalizeId)(V),delete this.schemas[V],delete this.refs[V]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(D){for(const $ of D)this.addKeyword($);return this}addKeyword(D,$){let V;if(typeof D=="string")V=D,typeof $=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),$.keyword=V);else if(typeof D=="object"&&$===void 0){if($=D,V=$.keyword,Array.isArray(V)&&!V.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(F.call(this,V,$),!$)return(0,c.eachItem)(V,j=>ce.call(this,j)),this;ne.call(this,$);const N={...$,type:(0,l.getJSONTypes)($.type),schemaType:(0,l.getJSONTypes)($.schemaType)};return(0,c.eachItem)(V,N.type.length===0?j=>ce.call(this,j,N):j=>N.type.forEach(Z=>ce.call(this,j,N,Z))),this}getKeyword(D){const $=this.RULES.all[D];return typeof $=="object"?$.definition:!!$}removeKeyword(D){const{RULES:$}=this;delete $.keywords[D],delete $.all[D];for(const V of $.rules){const N=V.rules.findIndex(j=>j.keyword===D);N>=0&&V.rules.splice(N,1)}return this}addFormat(D,$){return typeof $=="string"&&($=new RegExp($)),this.formats[D]=$,this}errorsText(D=this.errors,{separator:$=", ",dataVar:V="data"}={}){return!D||D.length===0?"No errors":D.map(N=>`${V}${N.instancePath} ${N.message}`).reduce((N,j)=>N+$+j)}$dataMetaSchema(D,$){const V=this.RULES.all;D=JSON.parse(JSON.stringify(D));for(const N of $){const j=N.split("/").slice(1);let Z=D;for(const Ee of j)Z=Z[Ee];for(const Ee in V){const _e=V[Ee];if(typeof _e!="object")continue;const{$data:Se}=_e.definition,Ie=Z[Ee];Se&&Ie&&(Z[Ee]=x(Ie))}}return D}_removeAllSchemas(D,$){for(const V in D){const N=D[V];(!$||$.test(V))&&(typeof N=="string"?delete D[V]:N&&!N.meta&&(this._cache.delete(N.schema),delete D[V]))}}_addSchema(D,$,V,N=this.opts.validateSchema,j=this.opts.addUsedSchema){let Z;const{schemaId:Ee}=this.opts;if(typeof D=="object")Z=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 _e=this._cache.get(D);if(_e!==void 0)return _e;V=(0,u.normalizeId)(Z||V);const Se=u.getSchemaRefs.call(this,D,V);return _e=new s.SchemaEnv({schema:D,schemaId:Ee,meta:$,baseId:V,localRefs:Se}),this._cache.set(_e.schema,_e),j&&!V.startsWith("#")&&(V&&this._checkUnique(V),this.refs[V]=_e),N&&this.validateSchema(D,!0),_e}_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 $=this.opts;this.opts=this._metaOpts;try{s.compileSchema.call(this,D)}finally{this.opts=$}}}b.ValidationError=n.default,b.MissingRefError=i.default,e.default=b;function m(L,D,$,V="error"){for(const N in L){const j=N;j in D&&this.logger[V](`${$}: option ${N}. ${L[j]}`)}}function v(L){return L=(0,u.normalizeId)(L),this.schemas[L]||this.refs[L]}function A(){const L=this.opts.schemas;if(L)if(Array.isArray(L))this.addSchema(L);else for(const D in L)this.addSchema(L[D],D)}function P(){for(const L in this.opts.formats){const D=this.opts.formats[L];D&&this.addFormat(L,D)}}function q(L){if(Array.isArray(L)){this.addVocabulary(L);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const D in L){const $=L[D];$.keyword||($.keyword=D),this.addKeyword($)}}function z(){const L={...this.opts};for(const D of _)delete L[D];return L}const Y={log(){},warn(){},error(){}};function W(L){if(L===!1)return Y;if(L===void 0)return console;if(L.log&&L.warn&&L.error)return L;throw new Error("logger must implement log, warn and error methods")}const U=/^[a-z_$][a-z0-9_$:-]*$/i;function F(L,D){const{RULES:$}=this;if((0,c.eachItem)(L,V=>{if($.keywords[V])throw new Error(`Keyword ${V} is already defined`);if(!U.test(V))throw new Error(`Keyword ${V} has invalid name`)}),!!D&&D.$data&&!("code"in D||"validate"in D))throw new Error('$data keyword must have "code" or "validate" function')}function ce(L,D,$){var V;const N=D==null?void 0:D.post;if($&&N)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:j}=this;let Z=N?j.post:j.rules.find(({type:_e})=>_e===$);if(Z||(Z={type:$,rules:[]},j.rules.push(Z)),j.keywords[L]=!0,!D)return;const Ee={keyword:L,definition:{...D,type:(0,l.getJSONTypes)(D.type),schemaType:(0,l.getJSONTypes)(D.schemaType)}};D.before?se.call(this,Z,Ee,D.before):Z.rules.push(Ee),j.all[L]=Ee,(V=D.implements)===null||V===void 0||V.forEach(_e=>this.addKeyword(_e))}function se(L,D,$){const V=L.rules.findIndex(N=>N.keyword===$);V>=0?L.rules.splice(V,0,D):(L.rules.push(D),this.logger.warn(`rule ${$} is not defined`))}function ne(L){let{metaSchema:D}=L;D!==void 0&&(L.$data&&this.opts.$data&&(D=x(D)),L.validateSchema=this.compile(D,!0))}const X={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function x(L){return{anyOf:[L,X]}}})(jd)),jd}var cc={},lc={},dc={},Cb;function kU(){if(Cb)return dc;Cb=1,Object.defineProperty(dc,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return dc.default=e,dc}var Kn={},Mb;function UU(){if(Mb)return Kn;Mb=1,Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.callRef=Kn.getValidate=void 0;const e=xl(),t=Zr(),r=Ke(),n=Vn(),i=k_(),a=pt(),s={keyword:"$ref",schemaType:"string",code(l){const{gen:c,schema:d,it:p}=l,{baseId:f,schemaEnv:_,validateName:R,opts:w,self:O}=p,{root:h}=_;if((d==="#"||d==="#/")&&f===h.baseId)return b();const T=i.resolveRef.call(O,h,f,d);if(T===void 0)throw new e.default(p.opts.uriResolver,f,d);if(T instanceof i.SchemaEnv)return m(T);return v(T);function b(){if(_===h)return u(l,R,_,_.$async);const A=c.scopeValue("root",{ref:h});return u(l,(0,r._)`${A}.validate`,h,h.$async)}function m(A){const P=o(l,A);u(l,P,A,A.$async)}function v(A){const P=c.scopeValue("schema",w.code.source===!0?{ref:A,code:(0,r.stringify)(A)}:{ref:A}),q=c.name("valid"),z=l.subschema({schema:A,dataTypes:[],schemaPath:r.nil,topSchemaRef:P,errSchemaPath:d},q);l.mergeEvaluated(z),l.ok(q)}}};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`}Kn.getValidate=o;function u(l,c,d,p){const{gen:f,it:_}=l,{allErrors:R,schemaEnv:w,opts:O}=_,h=O.passContext?n.default.this:r.nil;p?T():b();function T(){if(!w.$async)throw new Error("async schema referenced by sync schema");const A=f.let("valid");f.try(()=>{f.code((0,r._)`await ${(0,t.callValidateCode)(l,c,h)}`),v(c),R||f.assign(A,!0)},P=>{f.if((0,r._)`!(${P} instanceof ${_.ValidationError})`,()=>f.throw(P)),m(P),R||f.assign(A,!1)}),l.ok(A)}function b(){l.result((0,t.callValidateCode)(l,c,h),()=>v(c),()=>m(c))}function m(A){const P=(0,r._)`${A}.errors`;f.assign(n.default.vErrors,(0,r._)`${n.default.vErrors} === null ? ${P} : ${n.default.vErrors}.concat(${P})`),f.assign(n.default.errors,(0,r._)`${n.default.vErrors}.length`)}function v(A){var P;if(!_.opts.unevaluated)return;const q=(P=d==null?void 0:d.validate)===null||P===void 0?void 0:P.evaluated;if(_.props!==!0)if(q&&!q.dynamicProps)q.props!==void 0&&(_.props=a.mergeEvaluated.props(f,q.props,_.props));else{const z=f.var("props",(0,r._)`${A}.evaluated.props`);_.props=a.mergeEvaluated.props(f,z,_.props,r.Name)}if(_.items!==!0)if(q&&!q.dynamicItems)q.items!==void 0&&(_.items=a.mergeEvaluated.items(f,q.items,_.items));else{const z=f.var("items",(0,r._)`${A}.evaluated.items`);_.items=a.mergeEvaluated.items(f,z,_.items,r.Name)}}}return Kn.callRef=u,Kn.default=s,Kn}var Db;function FU(){if(Db)return lc;Db=1,Object.defineProperty(lc,"__esModule",{value:!0});const e=kU(),t=UU(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return lc.default=r,lc}var fc={},pc={},jb;function HU(){if(jb)return pc;jb=1,Object.defineProperty(pc,"__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 pc.default=i,pc}var mc={},Lb;function VU(){if(Lb)return mc;Lb=1,Object.defineProperty(mc,"__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 mc.default=r,mc}var hc={},yc={},$b;function GU(){if($b)return yc;$b=1,Object.defineProperty(yc,"__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 yc.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',yc}var qb;function zU(){if(qb)return hc;qb=1,Object.defineProperty(hc,"__esModule",{value:!0});const e=Ke(),t=pt(),r=GU(),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 hc.default=i,hc}var gc={},Bb;function WU(){if(Bb)return gc;Bb=1,Object.defineProperty(gc,"__esModule",{value:!0});const e=Zr(),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,p=d.opts.unicodeRegExp?"u":"";if(u){const{regExp:f}=d.opts.code,_=f.code==="new RegExp"?(0,r._)`new RegExp`:(0,t.useFunc)(s,f),R=s.let("valid");s.try(()=>s.assign(R,(0,r._)`${_}(${c}, ${p}).test(${o})`),()=>s.assign(R,!1)),a.fail$data((0,r._)`!${R}`)}else{const f=(0,e.usePattern)(a,l);a.fail$data((0,r._)`!${f}.test(${o})`)}}};return gc.default=i,gc}var _c={},kb;function YU(){if(kb)return _c;kb=1,Object.defineProperty(_c,"__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 _c.default=r,_c}var Ec={},Ub;function xU(){if(Ub)return Ec;Ub=1,Object.defineProperty(Ec,"__esModule",{value:!0});const e=Zr(),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:p}=d;if(!c&&o.length===0)return;const f=o.length>=p.loopRequired;if(d.allErrors?_():R(),p.strictRequired){const h=a.parentSchema.properties,{definedProperties:T}=a.it;for(const b of o)if((h==null?void 0:h[b])===void 0&&!T.has(b)){const m=d.schemaEnv.baseId+d.errSchemaPath,v=`required property "${b}" is not defined at "${m}" (strictRequired)`;(0,r.checkStrictMode)(d,v,d.opts.strictRequired)}}function _(){if(f||c)a.block$data(t.nil,w);else for(const h of o)(0,e.checkReportMissingProp)(a,h)}function R(){const h=s.let("missing");if(f||c){const T=s.let("valid",!0);a.block$data(T,()=>O(h,T)),a.ok(T)}else s.if((0,e.checkMissingProp)(a,o,h)),(0,e.reportMissingProp)(a,h),s.else()}function w(){s.forOf("prop",u,h=>{a.setParams({missingProperty:h}),s.if((0,e.noPropertyInData)(s,l,h,p.ownProperties),()=>a.error())})}function O(h,T){a.setParams({missingProperty:h}),s.forOf(h,u,()=>{s.assign(T,(0,e.propertyInData)(s,l,h,p.ownProperties)),s.if((0,t.not)(T),()=>{a.error(),s.break()})},t.nil)}}};return Ec.default=i,Ec}var vc={},Fb;function KU(){if(Fb)return vc;Fb=1,Object.defineProperty(vc,"__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 vc.default=r,vc}var bc={},Tc={},Hb;function U_(){if(Hb)return Tc;Hb=1,Object.defineProperty(Tc,"__esModule",{value:!0});const e=q_();return e.code='require("ajv/dist/runtime/equal").default',Tc.default=e,Tc}var Vb;function XU(){if(Vb)return bc;Vb=1,Object.defineProperty(bc,"__esModule",{value:!0});const e=Ml(),t=Ke(),r=pt(),n=U_(),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:p,it:f}=s;if(!l&&!c)return;const _=o.let("valid"),R=d.items?(0,e.getSchemaTypes)(d.items):[];s.block$data(_,w,(0,t._)`${p} === false`),s.ok(_);function w(){const b=o.let("i",(0,t._)`${u}.length`),m=o.let("j");s.setParams({i:b,j:m}),o.assign(_,!0),o.if((0,t._)`${b} > 1`,()=>(O()?h:T)(b,m))}function O(){return R.length>0&&!R.some(b=>b==="object"||b==="array")}function h(b,m){const v=o.name("item"),A=(0,e.checkDataTypes)(R,v,f.opts.strictNumbers,e.DataType.Wrong),P=o.const("indices",(0,t._)`{}`);o.for((0,t._)`;${b}--;`,()=>{o.let(v,(0,t._)`${u}[${b}]`),o.if(A,(0,t._)`continue`),R.length>1&&o.if((0,t._)`typeof ${v} == "string"`,(0,t._)`${v} += "_"`),o.if((0,t._)`typeof ${P}[${v}] == "number"`,()=>{o.assign(m,(0,t._)`${P}[${v}]`),s.error(),o.assign(_,!1).break()}).code((0,t._)`${P}[${v}] = ${b}`)})}function T(b,m){const v=(0,r.useFunc)(o,n.default),A=o.name("outer");o.label(A).for((0,t._)`;${b}--;`,()=>o.for((0,t._)`${m} = ${b}; ${m}--;`,()=>o.if((0,t._)`${v}(${u}[${b}], ${u}[${m}])`,()=>{s.error(),o.assign(_,!1).break(A)})))}}};return bc.default=a,bc}var Sc={},Gb;function JU(){if(Gb)return Sc;Gb=1,Object.defineProperty(Sc,"__esModule",{value:!0});const e=Ke(),t=pt(),r=U_(),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 Sc.default=i,Sc}var Ic={},zb;function QU(){if(zb)return Ic;zb=1,Object.defineProperty(Ic,"__esModule",{value:!0});const e=Ke(),t=pt(),r=U_(),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 p=l.length>=d.opts.loopEnum;let f;const _=()=>f??(f=(0,t.useFunc)(s,r.default));let R;if(p||u)R=s.let("valid"),a.block$data(R,w);else{if(!Array.isArray(l))throw new Error("ajv implementation error");const h=s.const("vSchema",c);R=(0,e.or)(...l.map((T,b)=>O(h,b)))}a.pass(R);function w(){s.assign(R,!1),s.forOf("v",c,h=>s.if((0,e._)`${_()}(${o}, ${h})`,()=>s.assign(R,!0).break()))}function O(h,T){const b=l[T];return typeof b=="object"&&b!==null?(0,e._)`${_()}(${o}, ${h}[${T}])`:(0,e._)`${o} === ${b}`}}};return Ic.default=i,Ic}var Wb;function ZU(){if(Wb)return fc;Wb=1,Object.defineProperty(fc,"__esModule",{value:!0});const e=HU(),t=VU(),r=zU(),n=WU(),i=YU(),a=xU(),s=KU(),o=XU(),u=JU(),l=QU(),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 fc.default=c,fc}var Rc={},Ma={},Yb;function FP(){if(Yb)return Ma;Yb=1,Object.defineProperty(Ma,"__esModule",{value:!0}),Ma.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 p=o.const("len",(0,e._)`${l}.length`);if(u===!1)a.setParams({len:s.length}),a.pass((0,e._)`${p} <= ${s.length}`);else if(typeof u=="object"&&!(0,t.alwaysValidSchema)(d,u)){const _=o.var("valid",(0,e._)`${p} <= ${s.length}`);o.if((0,e.not)(_),()=>f(_)),a.ok(_)}function f(_){o.forRange("i",s.length,p,R=>{a.subschema({keyword:c,dataProp:R,dataPropType:t.Type.Num},_),d.allErrors||o.if((0,e.not)(_),()=>o.break())})}}return Ma.validateAdditionalItems=i,Ma.default=n,Ma}var wc={},Da={},xb;function HP(){if(xb)return Da;xb=1,Object.defineProperty(Da,"__esModule",{value:!0}),Da.validateTuple=void 0;const e=Ke(),t=pt(),r=Zr(),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:p}=a;R(l),p.opts.unevaluated&&o.length&&p.items!==!0&&(p.items=t.mergeEvaluated.items(u,o.length,p.items));const f=u.name("valid"),_=u.const("len",(0,e._)`${c}.length`);o.forEach((w,O)=>{(0,t.alwaysValidSchema)(p,w)||(u.if((0,e._)`${_} > ${O}`,()=>a.subschema({keyword:d,schemaProp:O,dataProp:O},f)),a.ok(f))});function R(w){const{opts:O,errSchemaPath:h}=p,T=o.length,b=T===w.minItems&&(T===w.maxItems||w[s]===!1);if(O.strictTuples&&!b){const m=`"${d}" is ${T}-tuple, but minItems or maxItems/${s} are not specified or different at path "${h}"`;(0,t.checkStrictMode)(p,m,O.strictTuples)}}}return Da.validateTuple=i,Da.default=n,Da}var Kb;function e2(){if(Kb)return wc;Kb=1,Object.defineProperty(wc,"__esModule",{value:!0});const e=HP(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,e.validateTuple)(r,"items")};return wc.default=t,wc}var Ac={},Xb;function t2(){if(Xb)return Ac;Xb=1,Object.defineProperty(Ac,"__esModule",{value:!0});const e=Ke(),t=pt(),r=Zr(),n=FP(),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 Ac.default=a,Ac}var Oc={},Jb;function r2(){if(Jb)return Oc;Jb=1,Object.defineProperty(Oc,"__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:p,maxContains:f}=o;l.opts.next?(c=p===void 0?1:p,d=f):c=1;const _=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 T=(0,e._)`${_} >= ${c}`;d!==void 0&&(T=(0,e._)`${T} && ${_} <= ${d}`),i.pass(T);return}l.items=!0;const R=a.name("valid");d===void 0&&c===1?O(R,()=>a.if(R,()=>a.break())):c===0?(a.let(R,!0),d!==void 0&&a.if((0,e._)`${u}.length > 0`,w)):(a.let(R,!1),w()),i.result(R,()=>i.reset());function w(){const T=a.name("_valid"),b=a.let("count",0);O(T,()=>a.if(T,()=>h(b)))}function O(T,b){a.forRange("i",0,_,m=>{i.subschema({keyword:"contains",dataProp:m,dataPropType:t.Type.Num,compositeRule:!0},T),b()})}function h(T){a.code((0,e._)`${T}++`),d===void 0?a.if((0,e._)`${T} >= ${c}`,()=>a.assign(R,!0).break()):(a.if((0,e._)`${T} > ${d}`,()=>a.assign(R,!1).break()),c===1?a.assign(R,!0):a.if((0,e._)`${T} >= ${c}`,()=>a.assign(R,!0)))}}};return Oc.default=n,Oc}var Vd={},Qb;function n2(){return Qb||(Qb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=Ke(),r=pt(),n=Zr();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 p=Array.isArray(u[d])?l:c;p[d]=u[d]}return[l,c]}function s(u,l=u.schema){const{gen:c,data:d,it:p}=u;if(Object.keys(l).length===0)return;const f=c.let("missing");for(const _ in l){const R=l[_];if(R.length===0)continue;const w=(0,n.propertyInData)(c,d,_,p.opts.ownProperties);u.setParams({property:_,depsCount:R.length,deps:R.join(", ")}),p.allErrors?c.if(w,()=>{for(const O of R)(0,n.checkReportMissingProp)(u,O)}):(c.if((0,t._)`${w} && (${(0,n.checkMissingProp)(u,R,f)})`),(0,n.reportMissingProp)(u,f),c.else())}}e.validatePropertyDeps=s;function o(u,l=u.schema){const{gen:c,data:d,keyword:p,it:f}=u,_=c.name("valid");for(const R in l)(0,r.alwaysValidSchema)(f,l[R])||(c.if((0,n.propertyInData)(c,d,R,f.opts.ownProperties),()=>{const w=u.subschema({keyword:p,schemaProp:R},_);u.mergeValidEvaluated(w,_)},()=>c.var(_,!0)),u.ok(_))}e.validateSchemaDeps=o,e.default=i})(Vd)),Vd}var Nc={},Zb;function i2(){if(Zb)return Nc;Zb=1,Object.defineProperty(Nc,"__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 Nc.default=n,Nc}var Pc={},e0;function VP(){if(e0)return Pc;e0=1,Object.defineProperty(Pc,"__esModule",{value:!0});const e=Zr(),t=Ke(),r=Vn(),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:p}=s;if(!d)throw new Error("ajv implementation error");const{allErrors:f,opts:_}=p;if(p.props=!0,_.removeAdditional!=="all"&&(0,n.alwaysValidSchema)(p,u))return;const R=(0,e.allSchemaProperties)(l.properties),w=(0,e.allSchemaProperties)(l.patternProperties);O(),s.ok((0,t._)`${d} === ${r.default.errors}`);function O(){o.forIn("key",c,v=>{!R.length&&!w.length?b(v):o.if(h(v),()=>b(v))})}function h(v){let A;if(R.length>8){const P=(0,n.schemaRefOrVal)(p,l.properties,"properties");A=(0,e.isOwnProperty)(o,P,v)}else R.length?A=(0,t.or)(...R.map(P=>(0,t._)`${v} === ${P}`)):A=t.nil;return w.length&&(A=(0,t.or)(A,...w.map(P=>(0,t._)`${(0,e.usePattern)(s,P)}.test(${v})`))),(0,t.not)(A)}function T(v){o.code((0,t._)`delete ${c}[${v}]`)}function b(v){if(_.removeAdditional==="all"||_.removeAdditional&&u===!1){T(v);return}if(u===!1){s.setParams({additionalProperty:v}),s.error(),f||o.break();return}if(typeof u=="object"&&!(0,n.alwaysValidSchema)(p,u)){const A=o.name("valid");_.removeAdditional==="failing"?(m(v,A,!1),o.if((0,t.not)(A),()=>{s.reset(),T(v)})):(m(v,A),f||o.if((0,t.not)(A),()=>o.break()))}}function m(v,A,P){const q={keyword:"additionalProperties",dataProp:v,dataPropType:n.Type.Str};P===!1&&Object.assign(q,{compositeRule:!0,createErrors:!1,allErrors:!1}),s.subschema(q,A)}}};return Pc.default=a,Pc}var Cc={},t0;function a2(){if(t0)return Cc;t0=1,Object.defineProperty(Cc,"__esModule",{value:!0});const e=Zo(),t=Zr(),r=pt(),n=VP(),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 w of d)c.definedProperties.add(w);c.opts.unevaluated&&d.length&&c.props!==!0&&(c.props=r.mergeEvaluated.props(s,(0,r.toHash)(d),c.props));const p=d.filter(w=>!(0,r.alwaysValidSchema)(c,o[w]));if(p.length===0)return;const f=s.name("valid");for(const w of p)_(w)?R(w):(s.if((0,t.propertyInData)(s,l,w,c.opts.ownProperties)),R(w),c.allErrors||s.else().var(f,!0),s.endIf()),a.it.definedProperties.add(w),a.ok(f);function _(w){return c.opts.useDefaults&&!c.compositeRule&&o[w].default!==void 0}function R(w){a.subschema({keyword:"properties",schemaProp:w,dataProp:w},f)}}};return Cc.default=i,Cc}var Mc={},r0;function s2(){if(r0)return Mc;r0=1,Object.defineProperty(Mc,"__esModule",{value:!0});const e=Zr(),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,p=(0,e.allSchemaProperties)(o),f=p.filter(b=>(0,r.alwaysValidSchema)(c,o[b]));if(p.length===0||f.length===p.length&&(!c.opts.unevaluated||c.props===!0))return;const _=d.strictSchema&&!d.allowMatchingProperties&&l.properties,R=s.name("valid");c.props!==!0&&!(c.props instanceof t.Name)&&(c.props=(0,n.evaluatedPropsToName)(s,c.props));const{props:w}=c;O();function O(){for(const b of p)_&&h(b),c.allErrors?T(b):(s.var(R,!0),T(b),s.if(R))}function h(b){for(const m in _)new RegExp(b).test(m)&&(0,r.checkStrictMode)(c,`property ${m} matches pattern ${b} (use allowMatchingProperties)`)}function T(b){s.forIn("key",u,m=>{s.if((0,t._)`${(0,e.usePattern)(a,b)}.test(${m})`,()=>{const v=f.includes(b);v||a.subschema({keyword:"patternProperties",schemaProp:b,dataProp:m,dataPropType:n.Type.Str},R),c.opts.unevaluated&&w!==!0?s.assign((0,t._)`${w}[${m}]`,!0):!v&&!c.allErrors&&s.if((0,t.not)(R),()=>s.break())})})}}};return Mc.default=i,Mc}var Dc={},n0;function o2(){if(n0)return Dc;n0=1,Object.defineProperty(Dc,"__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 Dc.default=t,Dc}var jc={},i0;function u2(){if(i0)return jc;i0=1,Object.defineProperty(jc,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Zr().validateUnion,error:{message:"must match a schema in anyOf"}};return jc.default=t,jc}var Lc={},a0;function c2(){if(a0)return Lc;a0=1,Object.defineProperty(Lc,"__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),p=a.name("_valid");i.setParams({passing:d}),a.block(f),i.result(c,()=>i.reset(),()=>i.error(!0));function f(){l.forEach((_,R)=>{let w;(0,t.alwaysValidSchema)(u,_)?a.var(p,!0):w=i.subschema({keyword:"oneOf",schemaProp:R,compositeRule:!0},p),R>0&&a.if((0,e._)`${p} && ${c}`).assign(c,!1).assign(d,(0,e._)`[${d}, ${R}]`).else(),a.if(p,()=>{a.assign(c,!0),a.assign(d,R),w&&i.mergeEvaluated(w,e.Name)})})}}};return Lc.default=n,Lc}var $c={},s0;function l2(){if(s0)return $c;s0=1,Object.defineProperty($c,"__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 $c.default=t,$c}var qc={},o0;function d2(){if(o0)return qc;o0=1,Object.defineProperty(qc,"__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),p=s.name("_valid");if(f(),a.reset(),l&&c){const R=s.let("ifClause");a.setParams({ifClause:R}),s.if(p,_("then",R),_("else",R))}else l?s.if(p,_("then")):s.if((0,e.not)(p),_("else"));a.pass(d,()=>a.error(!0));function f(){const R=a.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},p);a.mergeEvaluated(R)}function _(R,w){return()=>{const O=a.subschema({keyword:R},p);s.assign(d,p),a.mergeValidEvaluated(O,d),w?s.assign(w,(0,e._)`${R}`):a.setParams({ifClause:R})}}}};function i(a,s){const o=a.schema[s];return o!==void 0&&!(0,t.alwaysValidSchema)(a,o)}return qc.default=n,qc}var Bc={},u0;function f2(){if(u0)return Bc;u0=1,Object.defineProperty(Bc,"__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 Bc.default=t,Bc}var c0;function p2(){if(c0)return Rc;c0=1,Object.defineProperty(Rc,"__esModule",{value:!0});const e=FP(),t=e2(),r=HP(),n=t2(),i=r2(),a=n2(),s=i2(),o=VP(),u=a2(),l=s2(),c=o2(),d=u2(),p=c2(),f=l2(),_=d2(),R=f2();function w(O=!1){const h=[c.default,d.default,p.default,f.default,_.default,R.default,s.default,o.default,a.default,u.default,l.default];return O?h.push(t.default,n.default):h.push(e.default,r.default),h.push(i.default),h}return Rc.default=w,Rc}var kc={},Uc={},l0;function m2(){if(l0)return Uc;l0=1,Object.defineProperty(Uc,"__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:p,schemaEnv:f,self:_}=c;if(!d.validateFormats)return;o?R():w();function R(){const O=a.scopeValue("formats",{ref:_.formats,code:d.code.formats}),h=a.const("fDef",(0,e._)`${O}[${l}]`),T=a.let("fType"),b=a.let("format");a.if((0,e._)`typeof ${h} == "object" && !(${h} instanceof RegExp)`,()=>a.assign(T,(0,e._)`${h}.type || "string"`).assign(b,(0,e._)`${h}.validate`),()=>a.assign(T,(0,e._)`"string"`).assign(b,h)),n.fail$data((0,e.or)(m(),v()));function m(){return d.strictSchema===!1?e.nil:(0,e._)`${l} && !${b}`}function v(){const A=f.$async?(0,e._)`(${h}.async ? await ${b}(${s}) : ${b}(${s}))`:(0,e._)`${b}(${s})`,P=(0,e._)`(typeof ${b} == "function" ? ${A} : ${b}.test(${s}))`;return(0,e._)`${b} && ${b} !== true && ${T} === ${i} && !${P}`}}function w(){const O=_.formats[u];if(!O){m();return}if(O===!0)return;const[h,T,b]=v(O);h===i&&n.pass(A());function m(){if(d.strictSchema===!1){_.logger.warn(P());return}throw new Error(P());function P(){return`unknown format "${u}" ignored in schema at path "${p}"`}}function v(P){const q=P instanceof RegExp?(0,e.regexpCode)(P):d.code.formats?(0,e._)`${d.code.formats}${(0,e.getProperty)(u)}`:void 0,z=a.scopeValue("formats",{key:u,ref:P,code:q});return typeof P=="object"&&!(P instanceof RegExp)?[P.type||"string",P.validate,(0,e._)`${z}.validate`]:["string",P,z]}function A(){if(typeof O=="object"&&!(O instanceof RegExp)&&O.async){if(!f.$async)throw new Error("async format in sync schema");return(0,e._)`await ${b}(${s})`}return typeof T=="function"?(0,e._)`${b}(${s})`:(0,e._)`${b}.test(${s})`}}}};return Uc.default=r,Uc}var d0;function h2(){if(d0)return kc;d0=1,Object.defineProperty(kc,"__esModule",{value:!0});const t=[m2().default];return kc.default=t,kc}var yi={},f0;function y2(){return f0||(f0=1,Object.defineProperty(yi,"__esModule",{value:!0}),yi.contentVocabulary=yi.metadataVocabulary=void 0,yi.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],yi.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),yi}var p0;function g2(){if(p0)return cc;p0=1,Object.defineProperty(cc,"__esModule",{value:!0});const e=FU(),t=ZU(),r=p2(),n=h2(),i=y2(),a=[e.default,t.default,(0,r.default)(),n.default,i.metadataVocabulary,i.contentVocabulary];return cc.default=a,cc}var Fc={},$s={},m0;function _2(){if(m0)return $s;m0=1,Object.defineProperty($s,"__esModule",{value:!0}),$s.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||($s.DiscrError=e={})),$s}var h0;function E2(){if(h0)return Fc;h0=1,Object.defineProperty(Fc,"__esModule",{value:!0});const e=Ke(),t=_2(),r=k_(),n=xl(),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:p}=o,{oneOf:f}=d;if(!p.opts.discriminator)throw new Error("discriminator: requires discriminator option");const _=c.propertyName;if(typeof _!="string")throw new Error("discriminator: requires propertyName");if(c.mapping)throw new Error("discriminator: mapping is not supported");if(!f)throw new Error("discriminator: requires oneOf keyword");const R=u.let("valid",!1),w=u.const("tag",(0,e._)`${l}${(0,e.getProperty)(_)}`);u.if((0,e._)`typeof ${w} == "string"`,()=>O(),()=>o.error(!1,{discrError:t.DiscrError.Tag,tag:w,tagName:_})),o.ok(R);function O(){const b=T();u.if(!1);for(const m in b)u.elseIf((0,e._)`${w} === ${m}`),u.assign(R,h(b[m]));u.else(),o.error(!1,{discrError:t.DiscrError.Mapping,tag:w,tagName:_}),u.endIf()}function h(b){const m=u.name("valid"),v=o.subschema({keyword:"oneOf",schemaProp:b},m);return o.mergeEvaluated(v,e.Name),m}function T(){var b;const m={},v=P(d);let A=!0;for(let Y=0;Y<f.length;Y++){let W=f[Y];if(W!=null&&W.$ref&&!(0,i.schemaHasRulesButRef)(W,p.self.RULES)){const F=W.$ref;if(W=r.resolveRef.call(p.self,p.schemaEnv.root,p.baseId,F),W instanceof r.SchemaEnv&&(W=W.schema),W===void 0)throw new n.default(p.opts.uriResolver,p.baseId,F)}const U=(b=W==null?void 0:W.properties)===null||b===void 0?void 0:b[_];if(typeof U!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${_}"`);A=A&&(v||P(W)),q(U,Y)}if(!A)throw new Error(`discriminator: "${_}" must be required`);return m;function P({required:Y}){return Array.isArray(Y)&&Y.includes(_)}function q(Y,W){if(Y.const)z(Y.const,W);else if(Y.enum)for(const U of Y.enum)z(U,W);else throw new Error(`discriminator: "properties/${_}" must have "const" or "enum"`)}function z(Y,W){if(typeof Y!="string"||Y in m)throw new Error(`discriminator: "${_}" values must be unique strings`);m[Y]=W}}}};return Fc.default=s,Fc}const v2="http://json-schema.org/draft-07/schema#",b2="http://json-schema.org/draft-07/schema#",T2="Core schema meta-schema",S2={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:[]}},I2=["object","boolean"],R2={$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:"#"}},w2={$schema:v2,$id:b2,title:T2,definitions:S2,type:I2,properties:R2,default:!0};var y0;function F_(){return y0||(y0=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=BU(),n=g2(),i=E2(),a=w2,s=["/properties"],o="http://json-schema.org/draft-07/schema";class u extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(_=>this.addVocabulary(_)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const _=this.opts.$data?this.$dataMetaSchema(a,s):a;this.addMetaSchema(_,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=Zo();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=B_();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return d.default}});var p=xl();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return p.default}})})(ic,ic.exports)),ic.exports}var eo={exports:{}},to={exports:{}},ro={exports:{}},Hc={exports:{}},g0;function A2(){return g0||(g0=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})(Hc,Hc.exports)),Hc.exports}var _0=ro.exports,E0;function O2(){return E0||(E0=1,(function(e,t){var r=_0&&_0.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(A2()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(ro,ro.exports)),ro.exports}var no={exports:{}},GP={},Kl={};Kl.byteLength=C2;Kl.toByteArray=D2;Kl.fromByteArray=$2;var En=[],Dr=[],N2=typeof Uint8Array<"u"?Uint8Array:Array,Gd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var ja=0,P2=Gd.length;ja<P2;++ja)En[ja]=Gd[ja],Dr[Gd.charCodeAt(ja)]=ja;Dr[45]=62;Dr[95]=63;function zP(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 C2(e){var t=zP(e),r=t[0],n=t[1];return(r+n)*3/4-n}function M2(e,t,r){return(t+r)*3/4-r}function D2(e){var t,r=zP(e),n=r[0],i=r[1],a=new N2(M2(e,n,i)),s=0,o=i>0?n-4:n,u;for(u=0;u<o;u+=4)t=Dr[e.charCodeAt(u)]<<18|Dr[e.charCodeAt(u+1)]<<12|Dr[e.charCodeAt(u+2)]<<6|Dr[e.charCodeAt(u+3)],a[s++]=t>>16&255,a[s++]=t>>8&255,a[s++]=t&255;return i===2&&(t=Dr[e.charCodeAt(u)]<<2|Dr[e.charCodeAt(u+1)]>>4,a[s++]=t&255),i===1&&(t=Dr[e.charCodeAt(u)]<<10|Dr[e.charCodeAt(u+1)]<<4|Dr[e.charCodeAt(u+2)]>>2,a[s++]=t>>8&255,a[s++]=t&255),a}function j2(e){return En[e>>18&63]+En[e>>12&63]+En[e>>6&63]+En[e&63]}function L2(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(j2(n));return i.join("")}function $2(e){for(var t,r=e.length,n=r%3,i=[],a=16383,s=0,o=r-n;s<o;s+=a)i.push(L2(e,s,s+a>o?o:s+a));return n===1?(t=e[r-1],i.push(En[t>>2]+En[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],i.push(En[t>>10]+En[t>>4&63]+En[t<<2&63]+"=")),i.join("")}var H_={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */H_.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,p=r?-1:1,f=e[t+d];for(d+=p,a=f&(1<<-c)-1,f>>=-c,c+=o;c>0;a=a*256+e[t+d],d+=p,c-=8);for(s=a&(1<<-c)-1,a>>=-c,c+=n;c>0;s=s*256+e[t+d],d+=p,c-=8);if(a===0)a=1-l;else{if(a===u)return s?NaN:(f?-1:1)*(1/0);s=s+Math.pow(2,n),a=a-l}return(f?-1:1)*s*Math.pow(2,a-n)};H_.write=function(e,t,r,n,i,a){var s,o,u,l=a*8-i-1,c=(1<<l)-1,d=c>>1,p=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:a-1,_=n?1:-1,R=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+=p/u:t+=p*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+f]=o&255,f+=_,o/=256,i-=8);for(s=s<<i|o,l+=i;l>0;e[r+f]=s&255,f+=_,s/=256,l-=8);e[r+f-_]|=R*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=Kl,r=H_,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=c,e.SlowBuffer=m,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 M=new a(1),E={foo:function(){return 42}};return Object.setPrototypeOf(E,a.prototype),Object.setPrototypeOf(M,E),M.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(M){if(M>i)throw new RangeError('The value "'+M+'" is invalid for option "size"');const E=new a(M);return Object.setPrototypeOf(E,c.prototype),E}function c(M,E,I){if(typeof M=="number"){if(typeof E=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return _(M)}return d(M,E,I)}c.poolSize=8192;function d(M,E,I){if(typeof M=="string")return R(M,E);if(s.isView(M))return O(M);if(M==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof M);if(bt(M,s)||M&&bt(M.buffer,s)||typeof o<"u"&&(bt(M,o)||M&&bt(M.buffer,o)))return h(M,E,I);if(typeof M=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const G=M.valueOf&&M.valueOf();if(G!=null&&G!==M)return c.from(G,E,I);const de=T(M);if(de)return de;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof M[Symbol.toPrimitive]=="function")return c.from(M[Symbol.toPrimitive]("string"),E,I);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof M)}c.from=function(M,E,I){return d(M,E,I)},Object.setPrototypeOf(c.prototype,a.prototype),Object.setPrototypeOf(c,a);function p(M){if(typeof M!="number")throw new TypeError('"size" argument must be of type number');if(M<0)throw new RangeError('The value "'+M+'" is invalid for option "size"')}function f(M,E,I){return p(M),M<=0?l(M):E!==void 0?typeof I=="string"?l(M).fill(E,I):l(M).fill(E):l(M)}c.alloc=function(M,E,I){return f(M,E,I)};function _(M){return p(M),l(M<0?0:b(M)|0)}c.allocUnsafe=function(M){return _(M)},c.allocUnsafeSlow=function(M){return _(M)};function R(M,E){if((typeof E!="string"||E==="")&&(E="utf8"),!c.isEncoding(E))throw new TypeError("Unknown encoding: "+E);const I=v(M,E)|0;let G=l(I);const de=G.write(M,E);return de!==I&&(G=G.slice(0,de)),G}function w(M){const E=M.length<0?0:b(M.length)|0,I=l(E);for(let G=0;G<E;G+=1)I[G]=M[G]&255;return I}function O(M){if(bt(M,a)){const E=new a(M);return h(E.buffer,E.byteOffset,E.byteLength)}return w(M)}function h(M,E,I){if(E<0||M.byteLength<E)throw new RangeError('"offset" is outside of buffer bounds');if(M.byteLength<E+(I||0))throw new RangeError('"length" is outside of buffer bounds');let G;return E===void 0&&I===void 0?G=new a(M):I===void 0?G=new a(M,E):G=new a(M,E,I),Object.setPrototypeOf(G,c.prototype),G}function T(M){if(c.isBuffer(M)){const E=b(M.length)|0,I=l(E);return I.length===0||M.copy(I,0,0,E),I}if(M.length!==void 0)return typeof M.length!="number"||rr(M.length)?l(0):w(M);if(M.type==="Buffer"&&Array.isArray(M.data))return w(M.data)}function b(M){if(M>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return M|0}function m(M){return+M!=M&&(M=0),c.alloc(+M)}c.isBuffer=function(E){return E!=null&&E._isBuffer===!0&&E!==c.prototype},c.compare=function(E,I){if(bt(E,a)&&(E=c.from(E,E.offset,E.byteLength)),bt(I,a)&&(I=c.from(I,I.offset,I.byteLength)),!c.isBuffer(E)||!c.isBuffer(I))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(E===I)return 0;let G=E.length,de=I.length;for(let ge=0,be=Math.min(G,de);ge<be;++ge)if(E[ge]!==I[ge]){G=E[ge],de=I[ge];break}return G<de?-1:de<G?1:0},c.isEncoding=function(E){switch(String(E).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(E,I){if(!Array.isArray(E))throw new TypeError('"list" argument must be an Array of Buffers');if(E.length===0)return c.alloc(0);let G;if(I===void 0)for(I=0,G=0;G<E.length;++G)I+=E[G].length;const de=c.allocUnsafe(I);let ge=0;for(G=0;G<E.length;++G){let be=E[G];if(bt(be,a))ge+be.length>de.length?(c.isBuffer(be)||(be=c.from(be)),be.copy(de,ge)):a.prototype.set.call(de,be,ge);else if(c.isBuffer(be))be.copy(de,ge);else throw new TypeError('"list" argument must be an Array of Buffers');ge+=be.length}return de};function v(M,E){if(c.isBuffer(M))return M.length;if(s.isView(M)||bt(M,s))return M.byteLength;if(typeof M!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof M);const I=M.length,G=arguments.length>2&&arguments[2]===!0;if(!G&&I===0)return 0;let de=!1;for(;;)switch(E){case"ascii":case"latin1":case"binary":return I;case"utf8":case"utf-8":return Xe(M).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I*2;case"hex":return I>>>1;case"base64":return vt(M).length;default:if(de)return G?-1:Xe(M).length;E=(""+E).toLowerCase(),de=!0}}c.byteLength=v;function A(M,E,I){let G=!1;if((E===void 0||E<0)&&(E=0),E>this.length||((I===void 0||I>this.length)&&(I=this.length),I<=0)||(I>>>=0,E>>>=0,I<=E))return"";for(M||(M="utf8");;)switch(M){case"hex":return $(this,E,I);case"utf8":case"utf-8":return ne(this,E,I);case"ascii":return L(this,E,I);case"latin1":case"binary":return D(this,E,I);case"base64":return se(this,E,I);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return V(this,E,I);default:if(G)throw new TypeError("Unknown encoding: "+M);M=(M+"").toLowerCase(),G=!0}}c.prototype._isBuffer=!0;function P(M,E,I){const G=M[E];M[E]=M[I],M[I]=G}c.prototype.swap16=function(){const E=this.length;if(E%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let I=0;I<E;I+=2)P(this,I,I+1);return this},c.prototype.swap32=function(){const E=this.length;if(E%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let I=0;I<E;I+=4)P(this,I,I+3),P(this,I+1,I+2);return this},c.prototype.swap64=function(){const E=this.length;if(E%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let I=0;I<E;I+=8)P(this,I,I+7),P(this,I+1,I+6),P(this,I+2,I+5),P(this,I+3,I+4);return this},c.prototype.toString=function(){const E=this.length;return E===0?"":arguments.length===0?ne(this,0,E):A.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(E){if(!c.isBuffer(E))throw new TypeError("Argument must be a Buffer");return this===E?!0:c.compare(this,E)===0},c.prototype.inspect=function(){let E="";const I=e.INSPECT_MAX_BYTES;return E=this.toString("hex",0,I).replace(/(.{2})/g,"$1 ").trim(),this.length>I&&(E+=" ... "),"<Buffer "+E+">"},n&&(c.prototype[n]=c.prototype.inspect),c.prototype.compare=function(E,I,G,de,ge){if(bt(E,a)&&(E=c.from(E,E.offset,E.byteLength)),!c.isBuffer(E))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof E);if(I===void 0&&(I=0),G===void 0&&(G=E?E.length:0),de===void 0&&(de=0),ge===void 0&&(ge=this.length),I<0||G>E.length||de<0||ge>this.length)throw new RangeError("out of range index");if(de>=ge&&I>=G)return 0;if(de>=ge)return-1;if(I>=G)return 1;if(I>>>=0,G>>>=0,de>>>=0,ge>>>=0,this===E)return 0;let be=ge-de,Qe=G-I;const Pt=Math.min(be,Qe),Tt=this.slice(de,ge),Ct=E.slice(I,G);for(let nt=0;nt<Pt;++nt)if(Tt[nt]!==Ct[nt]){be=Tt[nt],Qe=Ct[nt];break}return be<Qe?-1:Qe<be?1:0};function q(M,E,I,G,de){if(M.length===0)return-1;if(typeof I=="string"?(G=I,I=0):I>2147483647?I=2147483647:I<-2147483648&&(I=-2147483648),I=+I,rr(I)&&(I=de?0:M.length-1),I<0&&(I=M.length+I),I>=M.length){if(de)return-1;I=M.length-1}else if(I<0)if(de)I=0;else return-1;if(typeof E=="string"&&(E=c.from(E,G)),c.isBuffer(E))return E.length===0?-1:z(M,E,I,G,de);if(typeof E=="number")return E=E&255,typeof a.prototype.indexOf=="function"?de?a.prototype.indexOf.call(M,E,I):a.prototype.lastIndexOf.call(M,E,I):z(M,[E],I,G,de);throw new TypeError("val must be string, number or Buffer")}function z(M,E,I,G,de){let ge=1,be=M.length,Qe=E.length;if(G!==void 0&&(G=String(G).toLowerCase(),G==="ucs2"||G==="ucs-2"||G==="utf16le"||G==="utf-16le")){if(M.length<2||E.length<2)return-1;ge=2,be/=2,Qe/=2,I/=2}function Pt(Ct,nt){return ge===1?Ct[nt]:Ct.readUInt16BE(nt*ge)}let Tt;if(de){let Ct=-1;for(Tt=I;Tt<be;Tt++)if(Pt(M,Tt)===Pt(E,Ct===-1?0:Tt-Ct)){if(Ct===-1&&(Ct=Tt),Tt-Ct+1===Qe)return Ct*ge}else Ct!==-1&&(Tt-=Tt-Ct),Ct=-1}else for(I+Qe>be&&(I=be-Qe),Tt=I;Tt>=0;Tt--){let Ct=!0;for(let nt=0;nt<Qe;nt++)if(Pt(M,Tt+nt)!==Pt(E,nt)){Ct=!1;break}if(Ct)return Tt}return-1}c.prototype.includes=function(E,I,G){return this.indexOf(E,I,G)!==-1},c.prototype.indexOf=function(E,I,G){return q(this,E,I,G,!0)},c.prototype.lastIndexOf=function(E,I,G){return q(this,E,I,G,!1)};function Y(M,E,I,G){I=Number(I)||0;const de=M.length-I;G?(G=Number(G),G>de&&(G=de)):G=de;const ge=E.length;G>ge/2&&(G=ge/2);let be;for(be=0;be<G;++be){const Qe=parseInt(E.substr(be*2,2),16);if(rr(Qe))return be;M[I+be]=Qe}return be}function W(M,E,I,G){return zt(Xe(E,M.length-I),M,I,G)}function U(M,E,I,G){return zt(ut(E),M,I,G)}function F(M,E,I,G){return zt(vt(E),M,I,G)}function ce(M,E,I,G){return zt($t(E,M.length-I),M,I,G)}c.prototype.write=function(E,I,G,de){if(I===void 0)de="utf8",G=this.length,I=0;else if(G===void 0&&typeof I=="string")de=I,G=this.length,I=0;else if(isFinite(I))I=I>>>0,isFinite(G)?(G=G>>>0,de===void 0&&(de="utf8")):(de=G,G=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const ge=this.length-I;if((G===void 0||G>ge)&&(G=ge),E.length>0&&(G<0||I<0)||I>this.length)throw new RangeError("Attempt to write outside buffer bounds");de||(de="utf8");let be=!1;for(;;)switch(de){case"hex":return Y(this,E,I,G);case"utf8":case"utf-8":return W(this,E,I,G);case"ascii":case"latin1":case"binary":return U(this,E,I,G);case"base64":return F(this,E,I,G);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ce(this,E,I,G);default:if(be)throw new TypeError("Unknown encoding: "+de);de=(""+de).toLowerCase(),be=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function se(M,E,I){return E===0&&I===M.length?t.fromByteArray(M):t.fromByteArray(M.slice(E,I))}function ne(M,E,I){I=Math.min(M.length,I);const G=[];let de=E;for(;de<I;){const ge=M[de];let be=null,Qe=ge>239?4:ge>223?3:ge>191?2:1;if(de+Qe<=I){let Pt,Tt,Ct,nt;switch(Qe){case 1:ge<128&&(be=ge);break;case 2:Pt=M[de+1],(Pt&192)===128&&(nt=(ge&31)<<6|Pt&63,nt>127&&(be=nt));break;case 3:Pt=M[de+1],Tt=M[de+2],(Pt&192)===128&&(Tt&192)===128&&(nt=(ge&15)<<12|(Pt&63)<<6|Tt&63,nt>2047&&(nt<55296||nt>57343)&&(be=nt));break;case 4:Pt=M[de+1],Tt=M[de+2],Ct=M[de+3],(Pt&192)===128&&(Tt&192)===128&&(Ct&192)===128&&(nt=(ge&15)<<18|(Pt&63)<<12|(Tt&63)<<6|Ct&63,nt>65535&&nt<1114112&&(be=nt))}}be===null?(be=65533,Qe=1):be>65535&&(be-=65536,G.push(be>>>10&1023|55296),be=56320|be&1023),G.push(be),de+=Qe}return x(G)}const X=4096;function x(M){const E=M.length;if(E<=X)return String.fromCharCode.apply(String,M);let I="",G=0;for(;G<E;)I+=String.fromCharCode.apply(String,M.slice(G,G+=X));return I}function L(M,E,I){let G="";I=Math.min(M.length,I);for(let de=E;de<I;++de)G+=String.fromCharCode(M[de]&127);return G}function D(M,E,I){let G="";I=Math.min(M.length,I);for(let de=E;de<I;++de)G+=String.fromCharCode(M[de]);return G}function $(M,E,I){const G=M.length;(!E||E<0)&&(E=0),(!I||I<0||I>G)&&(I=G);let de="";for(let ge=E;ge<I;++ge)de+=nr[M[ge]];return de}function V(M,E,I){const G=M.slice(E,I);let de="";for(let ge=0;ge<G.length-1;ge+=2)de+=String.fromCharCode(G[ge]+G[ge+1]*256);return de}c.prototype.slice=function(E,I){const G=this.length;E=~~E,I=I===void 0?G:~~I,E<0?(E+=G,E<0&&(E=0)):E>G&&(E=G),I<0?(I+=G,I<0&&(I=0)):I>G&&(I=G),I<E&&(I=E);const de=this.subarray(E,I);return Object.setPrototypeOf(de,c.prototype),de};function N(M,E,I){if(M%1!==0||M<0)throw new RangeError("offset is not uint");if(M+E>I)throw new RangeError("Trying to access beyond buffer length")}c.prototype.readUintLE=c.prototype.readUIntLE=function(E,I,G){E=E>>>0,I=I>>>0,G||N(E,I,this.length);let de=this[E],ge=1,be=0;for(;++be<I&&(ge*=256);)de+=this[E+be]*ge;return de},c.prototype.readUintBE=c.prototype.readUIntBE=function(E,I,G){E=E>>>0,I=I>>>0,G||N(E,I,this.length);let de=this[E+--I],ge=1;for(;I>0&&(ge*=256);)de+=this[E+--I]*ge;return de},c.prototype.readUint8=c.prototype.readUInt8=function(E,I){return E=E>>>0,I||N(E,1,this.length),this[E]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(E,I){return E=E>>>0,I||N(E,2,this.length),this[E]|this[E+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(E,I){return E=E>>>0,I||N(E,2,this.length),this[E]<<8|this[E+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(E,I){return E=E>>>0,I||N(E,4,this.length),(this[E]|this[E+1]<<8|this[E+2]<<16)+this[E+3]*16777216},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(E,I){return E=E>>>0,I||N(E,4,this.length),this[E]*16777216+(this[E+1]<<16|this[E+2]<<8|this[E+3])},c.prototype.readBigUInt64LE=ht(function(E){E=E>>>0,we(E,"offset");const I=this[E],G=this[E+7];(I===void 0||G===void 0)&&Fe(E,this.length-8);const de=I+this[++E]*2**8+this[++E]*2**16+this[++E]*2**24,ge=this[++E]+this[++E]*2**8+this[++E]*2**16+G*2**24;return BigInt(de)+(BigInt(ge)<<BigInt(32))}),c.prototype.readBigUInt64BE=ht(function(E){E=E>>>0,we(E,"offset");const I=this[E],G=this[E+7];(I===void 0||G===void 0)&&Fe(E,this.length-8);const de=I*2**24+this[++E]*2**16+this[++E]*2**8+this[++E],ge=this[++E]*2**24+this[++E]*2**16+this[++E]*2**8+G;return(BigInt(de)<<BigInt(32))+BigInt(ge)}),c.prototype.readIntLE=function(E,I,G){E=E>>>0,I=I>>>0,G||N(E,I,this.length);let de=this[E],ge=1,be=0;for(;++be<I&&(ge*=256);)de+=this[E+be]*ge;return ge*=128,de>=ge&&(de-=Math.pow(2,8*I)),de},c.prototype.readIntBE=function(E,I,G){E=E>>>0,I=I>>>0,G||N(E,I,this.length);let de=I,ge=1,be=this[E+--de];for(;de>0&&(ge*=256);)be+=this[E+--de]*ge;return ge*=128,be>=ge&&(be-=Math.pow(2,8*I)),be},c.prototype.readInt8=function(E,I){return E=E>>>0,I||N(E,1,this.length),this[E]&128?(255-this[E]+1)*-1:this[E]},c.prototype.readInt16LE=function(E,I){E=E>>>0,I||N(E,2,this.length);const G=this[E]|this[E+1]<<8;return G&32768?G|4294901760:G},c.prototype.readInt16BE=function(E,I){E=E>>>0,I||N(E,2,this.length);const G=this[E+1]|this[E]<<8;return G&32768?G|4294901760:G},c.prototype.readInt32LE=function(E,I){return E=E>>>0,I||N(E,4,this.length),this[E]|this[E+1]<<8|this[E+2]<<16|this[E+3]<<24},c.prototype.readInt32BE=function(E,I){return E=E>>>0,I||N(E,4,this.length),this[E]<<24|this[E+1]<<16|this[E+2]<<8|this[E+3]},c.prototype.readBigInt64LE=ht(function(E){E=E>>>0,we(E,"offset");const I=this[E],G=this[E+7];(I===void 0||G===void 0)&&Fe(E,this.length-8);const de=this[E+4]+this[E+5]*2**8+this[E+6]*2**16+(G<<24);return(BigInt(de)<<BigInt(32))+BigInt(I+this[++E]*2**8+this[++E]*2**16+this[++E]*2**24)}),c.prototype.readBigInt64BE=ht(function(E){E=E>>>0,we(E,"offset");const I=this[E],G=this[E+7];(I===void 0||G===void 0)&&Fe(E,this.length-8);const de=(I<<24)+this[++E]*2**16+this[++E]*2**8+this[++E];return(BigInt(de)<<BigInt(32))+BigInt(this[++E]*2**24+this[++E]*2**16+this[++E]*2**8+G)}),c.prototype.readFloatLE=function(E,I){return E=E>>>0,I||N(E,4,this.length),r.read(this,E,!0,23,4)},c.prototype.readFloatBE=function(E,I){return E=E>>>0,I||N(E,4,this.length),r.read(this,E,!1,23,4)},c.prototype.readDoubleLE=function(E,I){return E=E>>>0,I||N(E,8,this.length),r.read(this,E,!0,52,8)},c.prototype.readDoubleBE=function(E,I){return E=E>>>0,I||N(E,8,this.length),r.read(this,E,!1,52,8)};function j(M,E,I,G,de,ge){if(!c.isBuffer(M))throw new TypeError('"buffer" argument must be a Buffer instance');if(E>de||E<ge)throw new RangeError('"value" argument is out of bounds');if(I+G>M.length)throw new RangeError("Index out of range")}c.prototype.writeUintLE=c.prototype.writeUIntLE=function(E,I,G,de){if(E=+E,I=I>>>0,G=G>>>0,!de){const Qe=Math.pow(2,8*G)-1;j(this,E,I,G,Qe,0)}let ge=1,be=0;for(this[I]=E&255;++be<G&&(ge*=256);)this[I+be]=E/ge&255;return I+G},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(E,I,G,de){if(E=+E,I=I>>>0,G=G>>>0,!de){const Qe=Math.pow(2,8*G)-1;j(this,E,I,G,Qe,0)}let ge=G-1,be=1;for(this[I+ge]=E&255;--ge>=0&&(be*=256);)this[I+ge]=E/be&255;return I+G},c.prototype.writeUint8=c.prototype.writeUInt8=function(E,I,G){return E=+E,I=I>>>0,G||j(this,E,I,1,255,0),this[I]=E&255,I+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(E,I,G){return E=+E,I=I>>>0,G||j(this,E,I,2,65535,0),this[I]=E&255,this[I+1]=E>>>8,I+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(E,I,G){return E=+E,I=I>>>0,G||j(this,E,I,2,65535,0),this[I]=E>>>8,this[I+1]=E&255,I+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(E,I,G){return E=+E,I=I>>>0,G||j(this,E,I,4,4294967295,0),this[I+3]=E>>>24,this[I+2]=E>>>16,this[I+1]=E>>>8,this[I]=E&255,I+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(E,I,G){return E=+E,I=I>>>0,G||j(this,E,I,4,4294967295,0),this[I]=E>>>24,this[I+1]=E>>>16,this[I+2]=E>>>8,this[I+3]=E&255,I+4};function Z(M,E,I,G,de){Te(E,G,de,M,I,7);let ge=Number(E&BigInt(4294967295));M[I++]=ge,ge=ge>>8,M[I++]=ge,ge=ge>>8,M[I++]=ge,ge=ge>>8,M[I++]=ge;let be=Number(E>>BigInt(32)&BigInt(4294967295));return M[I++]=be,be=be>>8,M[I++]=be,be=be>>8,M[I++]=be,be=be>>8,M[I++]=be,I}function Ee(M,E,I,G,de){Te(E,G,de,M,I,7);let ge=Number(E&BigInt(4294967295));M[I+7]=ge,ge=ge>>8,M[I+6]=ge,ge=ge>>8,M[I+5]=ge,ge=ge>>8,M[I+4]=ge;let be=Number(E>>BigInt(32)&BigInt(4294967295));return M[I+3]=be,be=be>>8,M[I+2]=be,be=be>>8,M[I+1]=be,be=be>>8,M[I]=be,I+8}c.prototype.writeBigUInt64LE=ht(function(E,I=0){return Z(this,E,I,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeBigUInt64BE=ht(function(E,I=0){return Ee(this,E,I,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeIntLE=function(E,I,G,de){if(E=+E,I=I>>>0,!de){const Pt=Math.pow(2,8*G-1);j(this,E,I,G,Pt-1,-Pt)}let ge=0,be=1,Qe=0;for(this[I]=E&255;++ge<G&&(be*=256);)E<0&&Qe===0&&this[I+ge-1]!==0&&(Qe=1),this[I+ge]=(E/be>>0)-Qe&255;return I+G},c.prototype.writeIntBE=function(E,I,G,de){if(E=+E,I=I>>>0,!de){const Pt=Math.pow(2,8*G-1);j(this,E,I,G,Pt-1,-Pt)}let ge=G-1,be=1,Qe=0;for(this[I+ge]=E&255;--ge>=0&&(be*=256);)E<0&&Qe===0&&this[I+ge+1]!==0&&(Qe=1),this[I+ge]=(E/be>>0)-Qe&255;return I+G},c.prototype.writeInt8=function(E,I,G){return E=+E,I=I>>>0,G||j(this,E,I,1,127,-128),E<0&&(E=255+E+1),this[I]=E&255,I+1},c.prototype.writeInt16LE=function(E,I,G){return E=+E,I=I>>>0,G||j(this,E,I,2,32767,-32768),this[I]=E&255,this[I+1]=E>>>8,I+2},c.prototype.writeInt16BE=function(E,I,G){return E=+E,I=I>>>0,G||j(this,E,I,2,32767,-32768),this[I]=E>>>8,this[I+1]=E&255,I+2},c.prototype.writeInt32LE=function(E,I,G){return E=+E,I=I>>>0,G||j(this,E,I,4,2147483647,-2147483648),this[I]=E&255,this[I+1]=E>>>8,this[I+2]=E>>>16,this[I+3]=E>>>24,I+4},c.prototype.writeInt32BE=function(E,I,G){return E=+E,I=I>>>0,G||j(this,E,I,4,2147483647,-2147483648),E<0&&(E=4294967295+E+1),this[I]=E>>>24,this[I+1]=E>>>16,this[I+2]=E>>>8,this[I+3]=E&255,I+4},c.prototype.writeBigInt64LE=ht(function(E,I=0){return Z(this,E,I,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeBigInt64BE=ht(function(E,I=0){return Ee(this,E,I,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function _e(M,E,I,G,de,ge){if(I+G>M.length)throw new RangeError("Index out of range");if(I<0)throw new RangeError("Index out of range")}function Se(M,E,I,G,de){return E=+E,I=I>>>0,de||_e(M,E,I,4),r.write(M,E,I,G,23,4),I+4}c.prototype.writeFloatLE=function(E,I,G){return Se(this,E,I,!0,G)},c.prototype.writeFloatBE=function(E,I,G){return Se(this,E,I,!1,G)};function Ie(M,E,I,G,de){return E=+E,I=I>>>0,de||_e(M,E,I,8),r.write(M,E,I,G,52,8),I+8}c.prototype.writeDoubleLE=function(E,I,G){return Ie(this,E,I,!0,G)},c.prototype.writeDoubleBE=function(E,I,G){return Ie(this,E,I,!1,G)},c.prototype.copy=function(E,I,G,de){if(!c.isBuffer(E))throw new TypeError("argument should be a Buffer");if(G||(G=0),!de&&de!==0&&(de=this.length),I>=E.length&&(I=E.length),I||(I=0),de>0&&de<G&&(de=G),de===G||E.length===0||this.length===0)return 0;if(I<0)throw new RangeError("targetStart out of bounds");if(G<0||G>=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),E.length-I<de-G&&(de=E.length-I+G);const ge=de-G;return this===E&&typeof a.prototype.copyWithin=="function"?this.copyWithin(I,G,de):a.prototype.set.call(E,this.subarray(G,de),I),ge},c.prototype.fill=function(E,I,G,de){if(typeof E=="string"){if(typeof I=="string"?(de=I,I=0,G=this.length):typeof G=="string"&&(de=G,G=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(E.length===1){const be=E.charCodeAt(0);(de==="utf8"&&be<128||de==="latin1")&&(E=be)}}else typeof E=="number"?E=E&255:typeof E=="boolean"&&(E=Number(E));if(I<0||this.length<I||this.length<G)throw new RangeError("Out of range index");if(G<=I)return this;I=I>>>0,G=G===void 0?this.length:G>>>0,E||(E=0);let ge;if(typeof E=="number")for(ge=I;ge<G;++ge)this[ge]=E;else{const be=c.isBuffer(E)?E:c.from(E,de),Qe=be.length;if(Qe===0)throw new TypeError('The value "'+E+'" is invalid for argument "value"');for(ge=0;ge<G-I;++ge)this[ge+I]=be[ge%Qe]}return this};const ie={};function le(M,E,I){ie[M]=class extends I{constructor(){super(),Object.defineProperty(this,"message",{value:E.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${M}]`,this.stack,delete this.name}get code(){return M}set code(de){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:de,writable:!0})}toString(){return`${this.name} [${M}]: ${this.message}`}}}le("ERR_BUFFER_OUT_OF_BOUNDS",function(M){return M?`${M} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),le("ERR_INVALID_ARG_TYPE",function(M,E){return`The "${M}" argument must be of type number. Received type ${typeof E}`},TypeError),le("ERR_OUT_OF_RANGE",function(M,E,I){let G=`The value of "${M}" is out of range.`,de=I;return Number.isInteger(I)&&Math.abs(I)>2**32?de=fe(String(I)):typeof I=="bigint"&&(de=String(I),(I>BigInt(2)**BigInt(32)||I<-(BigInt(2)**BigInt(32)))&&(de=fe(de)),de+="n"),G+=` It must be ${E}. Received ${de}`,G},RangeError);function fe(M){let E="",I=M.length;const G=M[0]==="-"?1:0;for(;I>=G+4;I-=3)E=`_${M.slice(I-3,I)}${E}`;return`${M.slice(0,I)}${E}`}function me(M,E,I){we(E,"offset"),(M[E]===void 0||M[E+I]===void 0)&&Fe(E,M.length-(I+1))}function Te(M,E,I,G,de,ge){if(M>I||M<E){const be=typeof E=="bigint"?"n":"";let Qe;throw E===0||E===BigInt(0)?Qe=`>= 0${be} and < 2${be} ** ${(ge+1)*8}${be}`:Qe=`>= -(2${be} ** ${(ge+1)*8-1}${be}) and < 2 ** ${(ge+1)*8-1}${be}`,new ie.ERR_OUT_OF_RANGE("value",Qe,M)}me(G,de,ge)}function we(M,E){if(typeof M!="number")throw new ie.ERR_INVALID_ARG_TYPE(E,"number",M)}function Fe(M,E,I){throw Math.floor(M)!==M?(we(M,I),new ie.ERR_OUT_OF_RANGE("offset","an integer",M)):E<0?new ie.ERR_BUFFER_OUT_OF_BOUNDS:new ie.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${E}`,M)}const xe=/[^+/0-9A-Za-z-_]/g;function tt(M){if(M=M.split("=")[0],M=M.trim().replace(xe,""),M.length<2)return"";for(;M.length%4!==0;)M=M+"=";return M}function Xe(M,E){E=E||1/0;let I;const G=M.length;let de=null;const ge=[];for(let be=0;be<G;++be){if(I=M.charCodeAt(be),I>55295&&I<57344){if(!de){if(I>56319){(E-=3)>-1&&ge.push(239,191,189);continue}else if(be+1===G){(E-=3)>-1&&ge.push(239,191,189);continue}de=I;continue}if(I<56320){(E-=3)>-1&&ge.push(239,191,189),de=I;continue}I=(de-55296<<10|I-56320)+65536}else de&&(E-=3)>-1&&ge.push(239,191,189);if(de=null,I<128){if((E-=1)<0)break;ge.push(I)}else if(I<2048){if((E-=2)<0)break;ge.push(I>>6|192,I&63|128)}else if(I<65536){if((E-=3)<0)break;ge.push(I>>12|224,I>>6&63|128,I&63|128)}else if(I<1114112){if((E-=4)<0)break;ge.push(I>>18|240,I>>12&63|128,I>>6&63|128,I&63|128)}else throw new Error("Invalid code point")}return ge}function ut(M){const E=[];for(let I=0;I<M.length;++I)E.push(M.charCodeAt(I)&255);return E}function $t(M,E){let I,G,de;const ge=[];for(let be=0;be<M.length&&!((E-=2)<0);++be)I=M.charCodeAt(be),G=I>>8,de=I%256,ge.push(de),ge.push(G);return ge}function vt(M){return t.toByteArray(tt(M))}function zt(M,E,I,G){let de;for(de=0;de<G&&!(de+I>=E.length||de>=M.length);++de)E[de+I]=M[de];return de}function bt(M,E){return M instanceof E||M!=null&&M.constructor!=null&&M.constructor.name!=null&&M.constructor.name===E.name}function rr(M){return M!==M}const nr=(function(){const M="0123456789abcdef",E=new Array(256);for(let I=0;I<16;++I){const G=I*16;for(let de=0;de<16;++de)E[G+de]=M[I]+M[de]}return E})();function ht(M){return typeof BigInt>"u"?wr:M}function wr(){throw new Error("BigInt not supported")}})(GP);const v0=GP.Buffer;var Vc={exports:{}},b0;function q2(){return b0||(b0=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r={Object,Array,Function,Number,String,Date,RegExp};typeof v0<"u"&&(r.Buffer=v0),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})(Vc,Vc.exports)),Vc.exports}var T0=no.exports,S0;function B2(){return S0||(S0=1,(function(e,t){var r=T0&&T0.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(q2()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(no,no.exports)),no.exports}var io={exports:{}},ao={exports:{}},Gc={},I0;function WP(){if(I0)return Gc;I0=1,Object.defineProperty(Gc,"__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 Gc.default=e,Gc}var R0=ao.exports,w0;function k2(){return w0||(w0=1,(function(e,t){var r=R0&&R0.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const i=(0,r(WP()).default)("range");t.default=i,e.exports=i})(ao,ao.exports)),ao.exports}var A0=io.exports,O0;function U2(){return O0||(O0=1,(function(e,t){var r=A0&&A0.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(k2()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(io,io.exports)),io.exports}var so={exports:{}},oo={exports:{}},N0=oo.exports,P0;function F2(){return P0||(P0=1,(function(e,t){var r=N0&&N0.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const i=(0,r(WP()).default)("exclusiveRange");t.default=i,e.exports=i})(oo,oo.exports)),oo.exports}var C0=so.exports,M0;function H2(){return M0||(M0=1,(function(e,t){var r=C0&&C0.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(F2()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(so,so.exports)),so.exports}var uo={exports:{}},zc={exports:{}},gi={},D0;function Xl(){if(D0)return gi;D0=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 j0;function V2(){return j0||(j0=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=Ke(),n=Xl(),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(p){if(typeof p=="object")return(0,n.usePattern)(o,p.pattern,p.flags);const f=a.exec(p);if(f)return(0,n.usePattern)(o,f[1],f[2]);throw new Error("cannot parse string into RegExp")}},metaSchema:{anyOf:[{type:"string"},i]}}}t.default=s,e.exports=s})(zc,zc.exports)),zc.exports}var L0=uo.exports,$0;function G2(){return $0||($0=1,(function(e,t){var r=L0&&L0.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(V2()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(uo,uo.exports)),uo.exports}var co={exports:{}},Wc={exports:{}},q0;function z2(){return q0||(q0=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:p,it:f}=u,{parentData:_,parentDataProperty:R}=f,w=d;if(!w.length)return;let O;if(w.includes("toEnumCase")){const T=s(p);O=l.scopeValue("obj",{ref:T,code:(0,r.stringify)(T)})}l.if((0,r._)`typeof ${c} == "string" && ${_} !== undefined`,()=>{l.assign(c,h(w.slice())),l.assign((0,r._)`${_}[${R}]`,c)});function h(T){if(!T.length)return c;const b=T.pop();if(!(b in n))throw new Error(`transform: unknown transformation ${b}`);const m=l.scopeValue("func",{ref:n[b],code:(0,r._)`require("ajv-keywords/dist/definitions/transform").transform${(0,r.getProperty)(b)}`}),v=h(T);return O&&b==="toEnumCase"?(0,r._)`${m}(${v}, ${O})`:(0,r._)`${m}(${v})`}},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})(Wc,Wc.exports)),Wc.exports}var B0=co.exports,k0;function W2(){return k0||(k0=1,(function(e,t){var r=B0&&B0.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(z2()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(co,co.exports)),co.exports}var lo={exports:{}},Yc={exports:{}},U0;function Y2(){return U0||(U0=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=q_(),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 p={};for(const f of l){if(!f||typeof f!="object")continue;let _=f[d];if(!(_&&typeof _=="object")){if(typeof _=="string"&&(_='"'+_),p[_])return!1;p[_]=!0}}}else for(let p=l.length;p--;){const f=l[p];if(!(!f||typeof f!="object"))for(let _=p;_--;){const R=l[_];if(R&&typeof R=="object"&&r(f[d],R[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 p=(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(p)?!p.includes("object")&&!p.includes("array"):n.includes(p)})}e.exports=i})(Yc,Yc.exports)),Yc.exports}var F0=lo.exports,H0;function x2(){return H0||(H0=1,(function(e,t){var r=F0&&F0.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(Y2()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(lo,lo.exports)),lo.exports}var fo={exports:{}},xc={exports:{}},V0;function K2(){return V0||(V0=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})(xc,xc.exports)),xc.exports}var G0=fo.exports,z0;function X2(){return z0||(z0=1,(function(e,t){var r=G0&&G0.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(K2()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(fo,fo.exports)),fo.exports}var po={exports:{}},mo={exports:{}},Kc={},W0;function YP(){if(W0)return Kc;W0=1,Object.defineProperty(Kc,"__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 Kc.default=e,Kc}var Y0=mo.exports,x0;function J2(){return x0||(x0=1,(function(e,t){var r=Y0&&Y0.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const i=(0,r(YP()).default)("anyRequired");t.default=i,e.exports=i})(mo,mo.exports)),mo.exports}var K0=po.exports,X0;function Q2(){return X0||(X0=1,(function(e,t){var r=K0&&K0.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(J2()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(po,po.exports)),po.exports}var ho={exports:{}},yo={exports:{}},J0=yo.exports,Q0;function Z2(){return Q0||(Q0=1,(function(e,t){var r=J0&&J0.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const i=(0,r(YP()).default)("oneRequired");t.default=i,e.exports=i})(yo,yo.exports)),yo.exports}var Z0=ho.exports,eT;function eF(){return eT||(eT=1,(function(e,t){var r=Z0&&Z0.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(Z2()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(ho,ho.exports)),ho.exports}var go={exports:{}},Xc={exports:{}},tT;function tF(){return tT||(tT=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=Ke(),n=Xl(),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 p of u)d(p);function d(p){const f=o.let("matched",!1);o.forIn("key",l,_=>{o.assign(f,(0,r._)`${(0,n.usePattern)(s,p)}.test(${_})`),o.if(f,()=>o.break())}),s.setParams({missingPattern:p}),o.assign(c,(0,r.and)(c,f)),s.pass(c)}},metaSchema:{type:"array",items:{type:"string",format:"regex"},uniqueItems:!0}}}t.default=a,e.exports=a})(Xc,Xc.exports)),Xc.exports}var rT=go.exports,nT;function rF(){return nT||(nT=1,(function(e,t){var r=rT&&rT.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(tF()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(go,go.exports)),go.exports}var _o={exports:{}},Jc={exports:{}},iT;function nF(){return iT||(iT=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})(Jc,Jc.exports)),Jc.exports}var aT=_o.exports,sT;function iF(){return sT||(sT=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 n=r(nF()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(_o,_o.exports)),_o.exports}var Eo={exports:{}},Qc={exports:{}},oT;function aF(){return oT||(oT=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=Xl();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 p=u[d];const f=d===u.length-1;p=a(p);const _=c.properties={};let R;if(/[0-9]+/.test(p)){let w=+p;for(R=c.items=[],c.type=["object","array"];w--;)R.push({})}else c.type="object";c=f?o:{},_[p]=c,R&&R.push(c)}return l}function a(s){return s.replace(/~1/g,"/").replace(/~0/g,"~")}e.exports=n})(Qc,Qc.exports)),Qc.exports}var uT=Eo.exports,cT;function sF(){return cT||(cT=1,(function(e,t){var r=uT&&uT.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(aF()),i=(a,s)=>a.addKeyword((0,n.default)(s));t.default=i,e.exports=i})(Eo,Eo.exports)),Eo.exports}var vo={exports:{}},Zc={exports:{}},lT;function oF(){return lT||(lT=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 p=o;const f=d.map((_,R)=>R?p=(0,r._)`${p}${(0,r.getProperty)(i(_))}`:p);return(0,r.and)(...f)}},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})(Zc,Zc.exports)),Zc.exports}var dT=vo.exports,fT;function uF(){return fT||(fT=1,(function(e,t){var r=dT&&dT.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(oF()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(vo,vo.exports)),vo.exports}var bo={exports:{}},el={exports:{}},pT;function cF(){return pT||(pT=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 p=(d=c==null?void 0:c.max)!==null&&d!==void 0?d:2;return()=>Math.floor(Math.random()*p)},seq:c=>{var d;const p=(d=c==null?void 0:c.name)!==null&&d!==void 0?d:"";return r[p]||(r[p]=0),()=>r[p]++}},i=Object.assign(a,{DEFAULTS:n});function a(){return{keyword:"dynamicDefaults",type:"object",schemaType:["string","object"],modifying:!0,valid:!0,compile(c,d,p){if(!p.opts.useDefaults||p.compositeRule)return()=>!0;const f={};for(const R in c)f[R]=s(c[R]);const _=p.opts.useDefaults==="empty";return R=>{for(const w in c)(R[w]===void 0||_&&(R[w]===null||R[w]===""))&&(R[w]=f[w]());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 p=n[c];return l(c,p),p(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})(el,el.exports)),el.exports}var mT=bo.exports,hT;function lF(){return hT||(hT=1,(function(e,t){var r=mT&&mT.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(cF()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(bo,bo.exports)),bo.exports}var To={exports:{}},tl={exports:{}},yT;function dF(){return yT||(yT=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=Ke(),n=Xl(),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 p=l.let("valid",!0),f=l.name("_valid"),_=l.const("value",(0,r._)`${c} === null ? "null" : ${c}`);l.if(!1);for(const R in d.selectCases){u.setParams({schemaProp:R}),l.elseIf((0,r._)`"" + ${_} == ${R}`);const w=u.subschema({keyword:"selectCases",schemaProp:R},f);u.mergeEvaluated(w,r.Name),l.assign(p,f)}if(l.else(),d.selectDefault!==void 0){u.setParams({schemaProp:void 0});const R=u.subschema({keyword:"selectDefault"},f);u.mergeEvaluated(R,r.Name),l.assign(p,f)}l.endIf(),u.pass(p)})}},{keyword:"selectCases",dependencies:["select"],metaSchema:{type:"object",additionalProperties:o}},{keyword:"selectDefault",dependencies:["select","selectCases"],metaSchema:o}]}t.default=a,e.exports=a})(tl,tl.exports)),tl.exports}var gT=To.exports,_T;function fF(){return _T||(_T=1,(function(e,t){var r=gT&&gT.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(dF()),i=(a,s)=>((0,n.default)(s).forEach(o=>a.addKeyword(o)),a);t.default=i,e.exports=i})(To,To.exports)),To.exports}var ET=to.exports,vT;function pF(){return vT||(vT=1,(function(e,t){var r=ET&&ET.__importDefault||function(b){return b&&b.__esModule?b:{default:b}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(O2()),i=r(B2()),a=r(U2()),s=r(H2()),o=r(G2()),u=r(W2()),l=r(x2()),c=r(X2()),d=r(Q2()),p=r(eF()),f=r(rF()),_=r(iF()),R=r(sF()),w=r(uF()),O=r(lF()),h=r(fF()),T={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:p.default,patternRequired:f.default,prohibited:_.default,deepProperties:R.default,deepRequired:w.default,dynamicDefaults:O.default,select:h.default};t.default=T,e.exports=T})(to,to.exports)),to.exports}var bT=eo.exports,TT;function xP(){return TT||(TT=1,(function(e,t){var r=bT&&bT.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(pF()),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})(eo,eo.exports)),eo.exports}var rl={exports:{}},ST;function KP(){return ST||(ST=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=F_(),n=Ke(),i=$o(),a=Zo(),s=Qo(),o=Vn(),u="errorMessage",l=new r.Name("emUsed"),c={required:"missingProperty",dependencies:"property",dependentRequired:"property"},d=/\$\{[^}]+\}/,p=/\$\{([^}]+)\}/g,f=/^""\s*\+\s*|\s*\+\s*""$/g;function _(w){return{keyword:u,schemaType:["string","object"],post:!0,code(O){const{gen:h,data:T,schema:b,schemaValue:m,it:v}=O;if(v.createErrors===!1)return;const A=b,P=n.strConcat(o.default.instancePath,v.errorPath);h.if(r._`${o.default.errors} > 0`,()=>{if(typeof A=="object"){const[V,N]=z(A);N&&Y(N),V&&W(V),U(q(A))}const $=typeof A=="string"?A:A._;$&&F($),w.keepErrors||ce()});function q({properties:$,items:V}){const N={};if($){N.props={};for(const j in $)N.props[j]=[]}if(V){N.items={};for(let j=0;j<V.length;j++)N.items[j]=[]}return N}function z($){let V,N;for(const j in $){if(j==="properties"||j==="items")continue;const Z=$[j];if(typeof Z=="object"){V||(V={});const Ee=V[j]={};for(const _e in Z)Ee[_e]=[]}else N||(N={}),N[j]=[]}return[V,N]}function Y($){const V=h.const("emErrors",r.stringify($)),N=h.const("templates",x($,b));h.forOf("err",o.default.vErrors,_e=>h.if(se(_e,V),()=>h.code(r._`${V}[${_e}.keyword].push(${_e})`).assign(r._`${_e}.${l}`,!0)));const{singleError:j}=w;if(j){const _e=h.let("message",r._`""`),Se=h.let("paramsErrors",r._`[]`);Z(Ie=>{h.if(_e,()=>h.code(r._`${_e} += ${typeof j=="string"?j:";"}`)),h.code(r._`${_e} += ${Ee(Ie)}`),h.assign(Se,r._`${Se}.concat(${V}[${Ie}])`)}),s.reportError(O,{message:_e,params:r._`{errors: ${Se}}`})}else Z(_e=>s.reportError(O,{message:Ee(_e),params:r._`{errors: ${V}[${_e}]}`}));function Z(_e){h.forIn("key",V,Se=>h.if(r._`${V}[${Se}].length`,()=>_e(Se)))}function Ee(_e){return r._`${_e} in ${N} ? ${N}[${_e}]() : ${m}[${_e}]`}}function W($){const V=h.const("emErrors",r.stringify($)),N=[];for(const Se in $)N.push([Se,x($[Se],b[Se])]);const j=h.const("templates",h.object(...N)),Z=h.scopeValue("obj",{ref:c,code:r.stringify(c)}),Ee=h.let("emPropParams"),_e=h.let("emParamsErrors");h.forOf("err",o.default.vErrors,Se=>h.if(se(Se,V),()=>{h.assign(Ee,r._`${Z}[${Se}.keyword]`),h.assign(_e,r._`${V}[${Se}.keyword][${Se}.params[${Ee}]]`),h.if(_e,()=>h.code(r._`${_e}.push(${Se})`).assign(r._`${Se}.${l}`,!0))})),h.forIn("key",V,Se=>h.forIn("keyProp",r._`${V}[${Se}]`,Ie=>{h.assign(_e,r._`${V}[${Se}][${Ie}]`),h.if(r._`${_e}.length`,()=>{const ie=h.const("tmpl",r._`${j}[${Se}] && ${j}[${Se}][${Ie}]`);s.reportError(O,{message:r._`${ie} ? ${ie}() : ${m}[${Se}][${Ie}]`,params:r._`{errors: ${_e}}`})})}))}function U($){const{props:V,items:N}=$;if(!V&&!N)return;const j=r._`typeof ${T} == "object"`,Z=r._`Array.isArray(${T})`,Ee=h.let("emErrors");let _e,Se;const Ie=h.let("templates");V&&N?(_e=h.let("emChildKwd"),h.if(j),h.if(Z,()=>{ie(N,b.items),h.assign(_e,r.str`items`)},()=>{ie(V,b.properties),h.assign(_e,r.str`properties`)}),Se=r._`[${_e}]`):N?(h.if(Z),ie(N,b.items),Se=r._`.items`):V&&(h.if(n.and(j,n.not(Z))),ie(V,b.properties),Se=r._`.properties`),h.forOf("err",o.default.vErrors,le=>ne(le,Ee,fe=>h.code(r._`${Ee}[${fe}].push(${le})`).assign(r._`${le}.${l}`,!0))),h.forIn("key",Ee,le=>h.if(r._`${Ee}[${le}].length`,()=>{s.reportError(O,{message:r._`${le} in ${Ie} ? ${Ie}[${le}]() : ${m}${Se}[${le}]`,params:r._`{errors: ${Ee}[${le}]}`}),h.assign(r._`${o.default.vErrors}[${o.default.errors}-1].instancePath`,r._`${P} + "/" + ${le}.replace(/~/g, "~0").replace(/\\//g, "~1")`)})),h.endIf();function ie(le,fe){h.assign(Ee,r.stringify(le)),h.assign(Ie,x(le,fe))}}function F($){const V=h.const("emErrs",r._`[]`);h.forOf("err",o.default.vErrors,N=>h.if(X(N),()=>h.code(r._`${V}.push(${N})`).assign(r._`${N}.${l}`,!0))),h.if(r._`${V}.length`,()=>s.reportError(O,{message:L($),params:r._`{errors: ${V}}`}))}function ce(){const $=h.const("emErrs",r._`[]`);h.forOf("err",o.default.vErrors,V=>h.if(r._`!${V}.${l}`,()=>h.code(r._`${$}.push(${V})`))),h.assign(o.default.vErrors,$).assign(o.default.errors,r._`${$}.length`)}function se($,V){return n.and(r._`${$}.keyword !== ${u}`,r._`!${$}.${l}`,r._`${$}.instancePath === ${P}`,r._`${$}.keyword in ${V}`,r._`${$}.schemaPath.indexOf(${v.errSchemaPath}) === 0`,r._`/^\\/[^\\/]*$/.test(${$}.schemaPath.slice(${v.errSchemaPath.length}))`)}function ne($,V,N){h.if(n.and(r._`${$}.keyword !== ${u}`,r._`!${$}.${l}`,r._`${$}.instancePath.indexOf(${P}) === 0`),()=>{const j=h.scopeValue("pattern",{ref:/^\/([^/]*)(?:\/|$)/,code:r._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")`}),Z=h.const("emMatches",r._`${j}.exec(${$}.instancePath.slice(${P}.length))`),Ee=h.const("emChild",r._`${Z} && ${Z}[1].replace(/~1/g, "/").replace(/~0/g, "~")`);h.if(r._`${Ee} !== undefined && ${Ee} in ${V}`,()=>N(Ee))})}function X($){return n.and(r._`${$}.keyword !== ${u}`,r._`!${$}.${l}`,n.or(r._`${$}.instancePath === ${P}`,n.and(r._`${$}.instancePath.indexOf(${P}) === 0`,r._`${$}.instancePath[${P}.length] === "/"`)),r._`${$}.schemaPath.indexOf(${v.errSchemaPath}) === 0`,r._`${$}.schemaPath[${v.errSchemaPath}.length] === "/"`)}function x($,V){const N=[];for(const j in $){const Z=V[j];d.test(Z)&&N.push([j,D(Z)])}return h.object(...N)}function L($){return d.test($)?new i._Code(i.safeStringify($).replace(p,(V,N)=>`" + JSON.stringify(${a.getData(N,v)}) + "`).replace(f,"")):r.stringify($)}function D($){return r._`function(){return ${L($)}}`}},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 R=(w,O={})=>{if(!w.opts.allErrors)throw new Error("ajv-errors: Ajv option allErrors must be true");if(w.opts.jsPropertySyntax)throw new Error("ajv-errors: ajv option jsPropertySyntax is not supported");return w.addKeyword(_(O))};t.default=R,e.exports=R,e.exports.default=R})(rl,rl.exports)),rl.exports}var IT;function Oe(){if(IT)return kr;IT=1;var e=kr&&kr.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(kr,"__esModule",{value:!0}),kr.validateType=kr.generateLazyValidator=kr.Ajv=void 0;const t=e(F_());kr.Ajv=t.default;const r=e(xP()),n=e(KP());function i(s,o){let u=null;const l=(c,d)=>{if(!u){const p=new t.default({$data:!0,allErrors:!0});(0,r.default)(p),(0,n.default)(p,{singleError:!0}),o==null||o.forEach(f=>p.addKeyword(f)),u=p.compile(s),Object.defineProperty(l,"errors",{get(){return u==null?void 0:u.errors}})}return u(c,d)};return l}kr.generateLazyValidator=i;function a(s,o){return s.validate(o)}return kr.validateType=a,kr}var RT;function mF(){return RT||(RT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneUpdate=e.SCENE_UPDATE=void 0;const t=Oe();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={}))})(Dd)),Dd}var zd={},wT;function hF(){return wT||(wT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Update=e.UPDATE=void 0;const t=Oe();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={}))})(zd)),zd}var AT;function yF(){return AT||(AT=1,(function(e){var t=pi&&pi.__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=pi&&pi.__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(mF(),e),r(hF(),e)})(pi)),pi}var _i={},Wd={},OT;function gF(){return OT||(OT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProjectType=void 0;const t=Oe();(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={}))})(Wd)),Wd}var Yd={},xd={},NT;function Jl(){return NT||(NT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Rarity=void 0;const t=Oe();(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={}))})(xd)),xd}var Kd={},PT;function ba(){return PT||(PT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableCategory=void 0;const t=Oe();(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={}))})(Kd)),Kd}var Xd={},CT;function Ql(){return CT||(CT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpringBonesData=e.SpringBoneParams=void 0;const t=Oe();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={}))})(Xd)),Xd}var Jd={},Qd={},MT;function V_(){return MT||(MT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyShape=void 0;const t=Oe();(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={}))})(Qd)),Qd}var Zd={},ef={},DT;function XP(){return DT||(DT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyPartCategory=void 0;const t=Oe();(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={}))})(ef)),ef}var jT;function G_(){return jT||(jT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=void 0;const t=ba(),r=Oe(),n=XP();(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={}))})(Zd)),Zd}var LT;function z_(){return LT||(LT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableRepresentation=void 0;const t=Oe(),r=V_(),n=G_();(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={}))})(Jd)),Jd}var Ei={},vi={},tf={},rf={},$T;function Ta(){return $T||($T=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.IPFSv1=e.IPFSv2=e.EthAddress=e.Color3=void 0;const t=Oe();(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={}))})(rf)),rf}var qT;function JP(){return qT||(qT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Avatar=e.Link=e.LinkUrl=e.AvatarInfo=e.Snapshots=void 0;const t=ba(),r=Ta(),n=Oe();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={}))})(tf)),tf}var nf={},BT;function _F(){return BT||(BT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Profile=void 0;const t=Oe(),r=JP();(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={}))})(nf)),nf}var kT;function EF(){return kT||(kT=1,(function(e){var t=vi&&vi.__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=vi&&vi.__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(JP(),e),r(_F(),e)})(vi)),vi}var af={},sf={},UT;function QP(){return UT||(UT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FeatureToggles=e.portableExperiencesToggles=e.toggles=void 0;const t=Oe();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={}))})(sf)),sf}var of={},FT;function ZP(){return FT||(FT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorldConfiguration=void 0;const t=Oe();(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={}))})(of)),of}var uf={},HT;function eC(){return HT||(HT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneParcels=void 0;const t=Oe();(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={}))})(uf)),uf}var cf={},qs={},VT;function W_(){return VT||(VT=1,Object.defineProperty(qs,"__esModule",{value:!0}),qs.displayableProperties=void 0,qs.displayableProperties={menuBarIcon:{description:"Name of the file used as icon for the MenuBar",type:"string",nullable:!0}}),qs}var lf={},GT;function tC(){return GT||(GT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Source=void 0;const t=Oe();(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={}))})(lf)),lf}var df={},zT;function rC(){return zT||(zT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=void 0;const t=Oe();(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={}))})(df)),df}var WT;function vF(){return WT||(WT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Scene=e.RequiredPermission=void 0;const t=Oe(),r=W_(),n=QP(),i=eC(),a=tC(),s=rC(),o=ZP();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={}))})(cf)),cf}var YT;function bF(){return YT||(YT=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=QP();Object.defineProperty(e,"FeatureToggles",{enumerable:!0,get:function(){return t.FeatureToggles}});var r=ZP();Object.defineProperty(e,"WorldConfiguration",{enumerable:!0,get:function(){return r.WorldConfiguration}});var n=eC();Object.defineProperty(e,"SceneParcels",{enumerable:!0,get:function(){return n.SceneParcels}});var i=vF();Object.defineProperty(e,"Scene",{enumerable:!0,get:function(){return i.Scene}}),Object.defineProperty(e,"RequiredPermission",{enumerable:!0,get:function(){return i.RequiredPermission}});var a=tC();Object.defineProperty(e,"Source",{enumerable:!0,get:function(){return a.Source}});var s=rC();Object.defineProperty(e,"SpawnPoint",{enumerable:!0,get:function(){return s.SpawnPoint}})})(af)),af}var bi={},ff={},pf={},xT;function nC(){return xT||(xT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Locale=void 0;const t=Oe();(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={}))})(pf)),pf}var KT;function iC(){return KT||(KT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.I18N=void 0;const t=Oe(),r=nC();(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={}))})(ff)),ff}var mf={},XT;function aC(){return XT||(XT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Metrics=void 0;const t=Oe();(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={}))})(mf)),mf}var hf={},JT;function Y_(){return JT||(JT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isStandard=e.standardProperties=void 0;const t=Jl(),r=Oe();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})(hf)),hf}var yf={},Ti={},gf={},QT;function TF(){return QT||(QT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MerkleProof=void 0;const t=Oe();(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={}))})(gf)),gf}var ZT;function sC(){return ZT||(ZT=1,(function(e){var t=Ti&&Ti.__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=Ti&&Ti.__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(TF(),e)})(Ti)),Ti}var _f={},eS;function x_(){return eS||(eS=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=Oe();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(f,_){if(!_||!_.from||!_.to)return!1;let{to:R,from:w}=_;return(typeof w!="bigint"||typeof R!="bigint")&&(w=BigInt(w),R=BigInt(R)),w<=R},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(f,_){try{c(_)}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 p=Object.values(n).reduce((f,_)=>(f[_]=d.innerSchema,f),{});d.schema={type:"object",properties:p,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(p,f,_){super(p),this.existingMapping=f,this.conflictingMapping=_}}e.AddMappingError=l;function c(d={}){const p={};for(const[m,v]of Object.entries(d)){p[m]={};for(const[A,P]of Object.entries(v))for(const q of P)T(m,A,q)}function f(){return JSON.parse(JSON.stringify(p))}function _(m,v,A){const P=BigInt(m);return P>=BigInt(v)&&P<=BigInt(A)}function R(m,v){switch(v.type){case r.SINGLE:return m.id===v.id;case r.MULTIPLE:return v.ids.includes(m.id);case r.RANGE:return _(m.id,v.from,v.to);default:return!1}}function w(m,v){switch(v.type){case r.SINGLE:return m.ids.includes(v.id);case r.MULTIPLE:return m.ids.some(A=>v.ids.includes(A));case r.RANGE:return m.ids.some(A=>_(A,v.from,v.to));default:return!1}}function O(m,v){switch(v.type){case r.SINGLE:return _(v.id,m.from,m.to);case r.MULTIPLE:return v.ids.some(A=>_(A,m.from,m.to));case r.RANGE:return BigInt(m.from)<=BigInt(v.to)&&BigInt(m.to)>=BigInt(v.from)}}function h(m,v){if(m.type===r.ANY||v.type===r.ANY)return!0;switch(m.type){case r.SINGLE:return R(m,v);case r.MULTIPLE:return w(m,v);case r.RANGE:return O(m,v)}}function T(m,v,A){var P,q;const z=v.toLowerCase();p[m]=(P=p[m])!==null&&P!==void 0?P:{},p[m][z]=(q=p[m][z])!==null&&q!==void 0?q:[];for(const Y of p[m][z])if(h(Y,A))throw new l(`Cannot add mapping to contract ${z} on network ${m} because it overlaps with existing mapping`,Y,A);p[m][z].push(A)}function b(m,v,A){var P;return!((P=p[m])===null||P===void 0)&&P[v]?p[m][v].some(q=>{switch(q.type){case r.SINGLE:return q.id===A;case r.ANY:return!0;case r.MULTIPLE:return q.ids.includes(A);case r.RANGE:return BigInt(A)>=BigInt(q.from)&&BigInt(A)<=BigInt(q.to)}}):!1}return{addMapping:T,getMappings:f,includesNft:b}}e.createMappingsHelper=c})(_f)),_f}var tS;function K_(){return tS||(tS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.schema=void 0;const t=Oe(),r=sC(),n=x_();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})(yf)),yf}var Ef={},vf={},Fr={},rS;function oC(){if(rS)return Fr;rS=1,Object.defineProperty(Fr,"__esModule",{value:!0}),Fr.isBaseEmote=Fr.isBaseAvatar=Fr.requiredBaseItemProps=Fr.baseItemProperties=void 0;const e=iC(),t=aC(),r=W_();Fr.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})}),Fr.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}Fr.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 Fr.isBaseEmote=i,Fr}var nS;function SF(){return nS||(nS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Wearable=void 0;const t=Oe(),r=ba(),n=z_(),i=oC(),a=Y_(),s=K_(),o=G_(),u=x_(),l=Ql();(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:(f,_)=>!f||(0,s.isThirdParty)(_),errors:!1},p={keyword:"_isBaseAvatar",validate:(f,_)=>!f||(0,i.isBaseAvatar)(_),errors:!1};c.validate=(0,t.generateLazyValidator)(c.schema,[d,p,u.RangeMapping._fromLessThanOrEqualTo,u.Mappings._isMappingsValid])})(e.Wearable||(e.Wearable={}))})(vf)),vf}var iS;function IF(){return iS||(iS=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=z_();Object.defineProperty(e,"WearableRepresentation",{enumerable:!0,get:function(){return t.WearableRepresentation}});var r=SF();Object.defineProperty(e,"Wearable",{enumerable:!0,get:function(){return r.Wearable}});var n=ba();Object.defineProperty(e,"WearableCategory",{enumerable:!0,get:function(){return n.WearableCategory}});var i=XP();Object.defineProperty(e,"BodyPartCategory",{enumerable:!0,get:function(){return i.BodyPartCategory}});var a=G_();Object.defineProperty(e,"HideableWearableCategory",{enumerable:!0,get:function(){return a.HideableWearableCategory}});var s=Ql();Object.defineProperty(e,"SpringBoneParams",{enumerable:!0,get:function(){return s.SpringBoneParams}}),Object.defineProperty(e,"SpringBonesData",{enumerable:!0,get:function(){return s.SpringBonesData}})})(Ef)),Ef}var bf={},Tf={},Sf={},If={},aS;function uC(){return aS||(aS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteCategory=void 0;const t=Oe();(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={}))})(If)),If}var Rf={},sS;function cC(){return sS||(sS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteRepresentationADR74=void 0;const t=Oe(),r=V_();(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={}))})(Rf)),Rf}var wf={},oS;function lC(){return oS||(oS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.OutcomeGroup=e.StartAnimation=e.EmoteClip=e.ArmatureId=void 0;const t=Oe();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={}))})(wf)),wf}var uS;function dC(){return uS||(uS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteDataADR74=void 0;const t=uC(),r=Oe(),n=cC(),i=lC();(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={}))})(Sf)),Sf}var cS;function RF(){return cS||(cS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Emote=void 0;const t=fC(),r=Oe(),n=oC(),i=Y_(),a=K_(),s=dC();(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={}))})(Tf)),Tf}var Af={},lS;function wF(){return lS||(lS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmotePlayMode=void 0;const t=Oe();(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={}))})(Af)),Af}var Of={},dS;function AF(){return dS||(dS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteOutcomeType=void 0;const t=Oe();(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={}))})(Of)),Of}var fS;function OF(){return fS||(fS=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=RF();Object.defineProperty(e,"Emote",{enumerable:!0,get:function(){return t.Emote}});var r=cC();Object.defineProperty(e,"EmoteRepresentationADR74",{enumerable:!0,get:function(){return r.EmoteRepresentationADR74}});var n=dC();Object.defineProperty(e,"EmoteDataADR74",{enumerable:!0,get:function(){return n.EmoteDataADR74}});var i=lC();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=uC();Object.defineProperty(e,"EmoteCategory",{enumerable:!0,get:function(){return a.EmoteCategory}});var s=wF();Object.defineProperty(e,"EmotePlayMode",{enumerable:!0,get:function(){return s.EmotePlayMode}});var o=AF();Object.defineProperty(e,"EmoteOutcomeType",{enumerable:!0,get:function(){return o.EmoteOutcomeType}})})(bf)),bf}var pS;function fC(){return pS||(pS=1,(function(e){var t=bi&&bi.__createBinding||(Object.create?(function(l,c,d,p){p===void 0&&(p=d);var f=Object.getOwnPropertyDescriptor(c,d);(!f||("get"in f?!c.__esModule:f.writable||f.configurable))&&(f={enumerable:!0,get:function(){return c[d]}}),Object.defineProperty(l,p,f)}):(function(l,c,d,p){p===void 0&&(p=d),l[p]=c[d]})),r=bi&&bi.__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=iC();Object.defineProperty(e,"I18N",{enumerable:!0,get:function(){return n.I18N}});var i=nC();Object.defineProperty(e,"Locale",{enumerable:!0,get:function(){return i.Locale}});var a=aC();Object.defineProperty(e,"Metrics",{enumerable:!0,get:function(){return a.Metrics}});var s=V_();Object.defineProperty(e,"BodyShape",{enumerable:!0,get:function(){return s.BodyShape}});var o=Y_();Object.defineProperty(e,"isStandard",{enumerable:!0,get:function(){return o.isStandard}});var u=K_();Object.defineProperty(e,"isThirdParty",{enumerable:!0,get:function(){return u.isThirdParty}}),r(x_(),e),r(IF(),e),r(OF(),e)})(bi)),bi}var Nf={},Pf={},mS;function eu(){return mS||(mS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthChain=e.AuthLink=e.AuthLinkType=void 0;const t=Oe();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={}))})(Pf)),Pf}var hS;function NF(){return hS||(hS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PointerChangesSyncDeployment=e.SnapshotSyncDeployment=void 0;const t=Ta(),r=eu(),n=Oe();(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={}))})(Nf)),Nf}var Cf={},Mf={},yS;function pC(){return yS||(yS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ContentMapping=void 0;const t=Ta(),r=Oe();(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={}))})(Mf)),Mf}var gS;function mC(){return gS||(gS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Entity=e.EntityType=void 0;const t=Ta(),r=pC(),n=Oe();(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={}))})(Cf)),Cf}var Df={},_S;function PF(){return _S||(_S=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeploymentWithAuthChain=void 0;const t=eu(),r=Oe();(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={}))})(Df)),Df}var Si={},jf={},ES;function CF(){return ES||(ES=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Outfits=e.Outfit=void 0;const t=ba(),r=Ta(),n=Oe();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={}))})(jf)),jf}var vS;function MF(){return vS||(vS=1,(function(e){var t=Si&&Si.__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=Si&&Si.__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(CF(),e)})(Si)),Si}var Ii={},Lf={},bS;function hC(){return bS||(bS=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={}))})(Lf)),Lf}var $f={},qf={},TS;function yC(){return TS||(TS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SubscriptionDetails=void 0;const t=Oe(),r=hC(),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={}))})(qf)),qf}var Bf={},SS;function gC(){return SS||(SS=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={}))})(Bf)),Bf}var IS;function DF(){return IS||(IS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Subscription=void 0;const t=Oe(),r=yC(),n=Ta(),i=gC();(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={}))})($f)),$f}var RS;function jF(){return RS||(RS=1,(function(e){var t=Ii&&Ii.__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=Ii&&Ii.__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(hC(),e),r(DF(),e),r(yC(),e)})(Ii)),Ii}var Ri={},kf={},wS;function _r(){return wS||(wS=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={}))})(kf)),kf}var Uf={},AS;function LF(){return AS||(AS=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=Oe(),r=_r();(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={}))})(Uf)),Uf}var Ff={},OS;function $F(){return OS||(OS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalystDeploymentEvent=void 0;const t=eu(),r=Oe(),n=mC(),i=_r();(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={}))})(Ff)),Ff}var Hf={},NS;function qF(){return NS||(NS=1,Object.defineProperty(Hf,"__esModule",{value:!0})),Hf}var Vf={},PS;function BF(){return PS||(PS=1,Object.defineProperty(Vf,"__esModule",{value:!0})),Vf}var Gf={},CS;function kF(){return CS||(CS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BidReceivedEvent=void 0;const t=Oe(),r=_r();(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={}))})(Gf)),Gf}var zf={},Bs={},MS;function Zl(){if(MS)return Bs;MS=1,Object.defineProperty(Bs,"__esModule",{value:!0}),Bs.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 Bs.createEventSchema=e,Bs}var DS;function UF(){return DS||(DS=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=Oe(),r=_r(),n=Zl(),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={}))})(zf)),zf}var Wf={},jS;function FF(){return jS||(jS=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=Oe(),r=_r();(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={}))})(Wf)),Wf}var Yf={},LS;function HF(){return LS||(LS=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=Oe(),r=_r(),n=Zl(),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={}))})(Yf)),Yf}var xf={},$S;function VF(){return $S||($S=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UserUnbannedFromSceneEvent=e.UserBannedFromSceneEvent=e.UserLeftRoomEvent=e.UserJoinedRoomEvent=e.RoomType=void 0;const t=Oe(),r=_r();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={}))})(xf)),xf}var Kf={},qS;function GF(){return qS||(qS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ReferralNewTierReachedEvent=e.ReferralInvitedUsersAcceptedEvent=void 0;const t=Oe(),r=_r(),n=Zl(),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={}))})(Kf)),Kf}var Xf={},BS;function zF(){return BS||(BS=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=Oe(),r=_r();(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={}))})(Xf)),Xf}var Jf={},kS;function WF(){return kS||(kS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PhotoTakenEvent=e.PhotoPrivacyChangedEvent=void 0;const t=Oe(),r=_r();(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={}))})(Jf)),Jf}var Qf={},US;function YF(){return US||(US=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=Oe(),r=_r();(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={}))})(Qf)),Qf}var Zf={},FS;function xF(){return FS||(FS=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=Oe(),r=_r(),n=Zl(),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={}))})(Zf)),Zf}var ep={},HS;function KF(){return HS||(HS=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=eu(),r=Oe(),n=_r();(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={}))})(ep)),ep}var tp={},VS;function XF(){return VS||(VS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UserWarningCreatedEvent=e.UserBanLiftedEvent=e.UserBanCreatedEvent=void 0;const t=Oe(),r=_r();(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={}))})(tp)),tp}var GS;function JF(){return GS||(GS=1,(function(e){var t=Ri&&Ri.__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=Ri&&Ri.__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(_r(),e),r(LF(),e),r($F(),e),r(qF(),e),r(BF(),e),r(kF(),e),r(UF(),e),r(FF(),e),r(HF(),e),r(VF(),e),r(GF(),e),r(zF(),e),r(WF(),e),r(YF(),e),r(xF(),e),r(KF(),e),r(XF(),e)})(Ri)),Ri}var zS;function X_(){return zS||(zS=1,(function(e){var t=Ei&&Ei.__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=Ei&&Ei.__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(EF(),e),r(bF(),e),r(fC(),e),r(W_(),e),r(sC(),e),r(NF(),e),r(mC(),e),r(PF(),e),r(MF(),e),r(jF(),e),r(JF(),e)})(Ei)),Ei}var WS;function QF(){return WS||(WS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableJson=void 0;const t=Jl(),r=ba(),n=Ql(),i=z_(),a=Oe(),s=X_();(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={}))})(Yd)),Yd}var YS;function ZF(){return YS||(YS=1,(function(e){var t=_i&&_i.__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=_i&&_i.__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(gF(),e),r(QF(),e)})(_i)),_i}var xS;function eH(){return xS||(xS=1,(function(e){var t=fi&&fi.__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=fi&&fi.__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(yF(),e),r(ZF(),e)})(fi)),fi}var wi={},rp={},KS;function tH(){return KS||(KS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Account=e.AccountSortBy=void 0;const t=Oe();(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={}))})(rp)),rp}var np={},ip={},XS;function _C(){return XS||(XS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getChainId=e.ChainName=void 0;const t=Oe(),r=tn();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={}))})(ip)),ip}var ap={},JS;function en(){return JS||(JS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Network=void 0;const t=Oe();(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={}))})(ap)),ap}var QS;function tn(){return QS||(QS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getNetwork=e.getNetworkMapping=e.getURNProtocol=e.getChainName=e.ChainId=void 0;const t=Oe(),r=_C(),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={}))})(np)),np}var sp={},ZS;function rH(){return ZS||(ZS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Collection=e.CollectionSortBy=void 0;const t=Oe(),r=tn(),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={}))})(sp)),sp}var op={},up={},eI;function ed(){return eI||(eI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFTCategory=void 0;const t=Oe();(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={}))})(up)),up}var tI;function nH(){return tI||(tI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Contract=e.ContractSortBy=void 0;const t=Oe(),r=tn(),n=en(),i=ed();(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={}))})(op)),op}var cp={},lp={},rI;function EC(){return rI||(rI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFT=e.NFTSortBy=void 0;const t=Oe(),r=tn(),n=X_(),i=en(),a=ed(),s=Jl(),o=ba();(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={}))})(lp)),lp}var nI;function iH(){return nI||(nI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Item=e.ItemSortBy=void 0;const t=Oe(),r=tn(),n=en(),i=EC(),a=ed();(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={}))})(cp)),cp}var dp={},iI;function J_(){return iI||(iI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ListingStatus=void 0;const t=Oe();(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={}))})(dp)),dp}var fp={},aI;function aH(){return aI||(aI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MetaTransaction=void 0;const t=Oe();(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={}))})(fp)),fp}var pp={},sI;function sH(){return sI||(sI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Mint=e.MintSortBy=void 0;const t=Oe(),r=tn(),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={}))})(pp)),pp}var mp={},oI;function oH(){return oI||(oI=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={}))})(mp)),mp}var hp={},uI;function uH(){return uI||(uI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Order=e.OrderSortBy=void 0;const t=Oe(),r=tn(),n=J_(),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={}))})(hp)),hp}var yp={},cI;function cH(){return cI||(cI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProviderType=void 0;const t=Oe();(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={}))})(yp)),yp}var gp={},lI;function vC(){return lI||(lI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SaleType=void 0;const t=Oe();(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={}))})(gp)),gp}var _p={},dI;function lH(){return dI||(dI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Sale=e.SaleSortBy=void 0;const t=Oe(),r=tn(),n=vC(),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={}))})(_p)),_p}var Ep={},fI;function dH(){return fI||(fI=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=Oe(),r=tn(),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={}))})(Ep)),Ep}var vp={},pI;function fH(){return pI||(pI=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={}))})(vp)),vp}var bp={},mI;function pH(){return mI||(mI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Store=void 0;const t=Oe();(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={}))})(bp)),bp}var Tp={},hI;function mH(){return hI||(hI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GenderFilterOption=e.WearableGender=void 0;const t=Oe();(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={}))})(Tp)),Tp}var Sp={},yI;function hH(){return yI||(yI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.World=e.isInsideWorldLimits=e.getWorld=void 0;const t=Oe();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={}))})(Sp)),Sp}var Ip={},gI;function yH(){return gI||(gI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Bid=e.BidSortBy=void 0;const t=Oe(),r=tn(),n=J_(),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={}))})(Ip)),Ip}var Rp={},_I;function gH(){return _I||(_I=1,Object.defineProperty(Rp,"__esModule",{value:!0})),Rp}var wp={},EI;function _H(){return EI||(EI=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={}))})(wp)),wp}var Ai={},Ap={},vI;function EH(){return vI||(vI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewCamera=void 0;const t=Oe();(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={}))})(Ap)),Ap}var Op={},bI;function vH(){return bI||(bI=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={}))})(Op)),Op}var Np={},TI;function bH(){return TI||(TI=1,Object.defineProperty(Np,"__esModule",{value:!0})),Np}var Pp={},SI;function TH(){return SI||(SI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmoteEventType=void 0;const t=Oe();(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={}))})(Pp)),Pp}var Cp={},II;function SH(){return II||(II=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmote=void 0;const t=Oe();(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={}))})(Cp)),Cp}var Mp={},RI;function IH(){return RI||(RI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sendMessage=e.PreviewRenderer=e.PreviewMessageType=void 0;const t=Oe();(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})(Mp)),Mp}var Dp={},wI;function RH(){return wI||(wI=1,Object.defineProperty(Dp,"__esModule",{value:!0})),Dp}var jp={},AI;function wH(){return AI||(AI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewProjection=void 0;const t=Oe();(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={}))})(jp)),jp}var Lp={},OI;function AH(){return OI||(OI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewType=void 0;const t=Oe();(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={}))})(Lp)),Lp}var $p={},NI;function OH(){return NI||(NI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpringBoneParams=void 0;var t=Ql();Object.defineProperty(e,"SpringBoneParams",{enumerable:!0,get:function(){return t.SpringBoneParams}})})($p)),$p}var qp={},PI;function NH(){return PI||(PI=1,Object.defineProperty(qp,"__esModule",{value:!0})),qp}var Bp={},CI;function PH(){return CI||(CI=1,Object.defineProperty(Bp,"__esModule",{value:!0})),Bp}var kp={},MI;function CH(){return MI||(MI=1,Object.defineProperty(kp,"__esModule",{value:!0})),kp}var Up={},DI;function MH(){return DI||(DI=1,Object.defineProperty(Up,"__esModule",{value:!0})),Up}var Fp={},jI;function DH(){return jI||(jI=1,Object.defineProperty(Fp,"__esModule",{value:!0})),Fp}var Hp={},LI;function jH(){return LI||(LI=1,Object.defineProperty(Hp,"__esModule",{value:!0})),Hp}var Vp={},$I;function LH(){return $I||($I=1,Object.defineProperty(Vp,"__esModule",{value:!0})),Vp}var Gp={},qI;function $H(){return qI||(qI=1,Object.defineProperty(Gp,"__esModule",{value:!0})),Gp}var BI;function qH(){return BI||(BI=1,(function(e){var t=Ai&&Ai.__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=Ai&&Ai.__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(EH(),e),r(vH(),e),r(bH(),e),r(TH(),e),r(SH(),e),r(IH(),e),r(RH(),e),r(wH(),e),r(AH(),e),r(OH(),e),r(NH(),e),r(PH(),e),r(CH(),e),r(MH(),e),r(DH(),e),r(jH(),e),r(LH(),e),r($H(),e)})(Ai)),Ai}var Oi={},ks={},kI;function BH(){if(kI)return ks;kI=1,Object.defineProperty(ks,"__esModule",{value:!0}),ks.isSysLink=void 0;const e=t=>t!==null&&typeof t=="object"&&"sys"in t&&"id"in t.sys;return ks.isSysLink=e,ks}var Us={},UI;function kH(){if(UI)return Us;UI=1,Object.defineProperty(Us,"__esModule",{value:!0}),Us.ContentfulLocale=void 0;var e;return(function(t){t.enUS="en-US",t.es="es",t.zh="zh"})(e||(e={})),Us.ContentfulLocale=e,Us}var zp={},FI;function UH(){return FI||(FI=1,Object.defineProperty(zp,"__esModule",{value:!0})),zp}var HI;function FH(){return HI||(HI=1,(function(e){var t=Oi&&Oi.__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=Oi&&Oi.__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(BH(),e),r(kH(),e),r(UH(),e)})(Oi)),Oi}var VI;function HH(){return VI||(VI=1,(function(e){var t=wi&&wi.__createBinding||(Object.create?(function(z,Y,W,U){U===void 0&&(U=W);var F=Object.getOwnPropertyDescriptor(Y,W);(!F||("get"in F?!Y.__esModule:F.writable||F.configurable))&&(F={enumerable:!0,get:function(){return Y[W]}}),Object.defineProperty(z,U,F)}):(function(z,Y,W,U){U===void 0&&(U=W),z[U]=Y[W]})),r=wi&&wi.__exportStar||function(z,Y){for(var W in z)W!=="default"&&!Object.prototype.hasOwnProperty.call(Y,W)&&t(Y,z,W)};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=tH();Object.defineProperty(e,"Account",{enumerable:!0,get:function(){return n.Account}}),Object.defineProperty(e,"AccountSortBy",{enumerable:!0,get:function(){return n.AccountSortBy}});var i=tn();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=_C();Object.defineProperty(e,"ChainName",{enumerable:!0,get:function(){return a.ChainName}}),Object.defineProperty(e,"getChainId",{enumerable:!0,get:function(){return a.getChainId}});var s=rH();Object.defineProperty(e,"Collection",{enumerable:!0,get:function(){return s.Collection}}),Object.defineProperty(e,"CollectionSortBy",{enumerable:!0,get:function(){return s.CollectionSortBy}});var o=nH();Object.defineProperty(e,"Contract",{enumerable:!0,get:function(){return o.Contract}}),Object.defineProperty(e,"ContractSortBy",{enumerable:!0,get:function(){return o.ContractSortBy}});var u=iH();Object.defineProperty(e,"Item",{enumerable:!0,get:function(){return u.Item}}),Object.defineProperty(e,"ItemSortBy",{enumerable:!0,get:function(){return u.ItemSortBy}});var l=J_();Object.defineProperty(e,"ListingStatus",{enumerable:!0,get:function(){return l.ListingStatus}});var c=aH();Object.defineProperty(e,"MetaTransaction",{enumerable:!0,get:function(){return c.MetaTransaction}});var d=sH();Object.defineProperty(e,"Mint",{enumerable:!0,get:function(){return d.Mint}}),Object.defineProperty(e,"MintSortBy",{enumerable:!0,get:function(){return d.MintSortBy}});var p=en();Object.defineProperty(e,"Network",{enumerable:!0,get:function(){return p.Network}});var f=ed();Object.defineProperty(e,"NFTCategory",{enumerable:!0,get:function(){return f.NFTCategory}});var _=EC();Object.defineProperty(e,"NFT",{enumerable:!0,get:function(){return _.NFT}}),Object.defineProperty(e,"NFTSortBy",{enumerable:!0,get:function(){return _.NFTSortBy}});var R=oH();Object.defineProperty(e,"CatalogSortBy",{enumerable:!0,get:function(){return R.CatalogSortBy}}),Object.defineProperty(e,"CatalogSortDirection",{enumerable:!0,get:function(){return R.CatalogSortDirection}});var w=uH();Object.defineProperty(e,"Order",{enumerable:!0,get:function(){return w.Order}}),Object.defineProperty(e,"OrderSortBy",{enumerable:!0,get:function(){return w.OrderSortBy}});var O=cH();Object.defineProperty(e,"ProviderType",{enumerable:!0,get:function(){return O.ProviderType}});var h=Jl();Object.defineProperty(e,"Rarity",{enumerable:!0,get:function(){return h.Rarity}});var T=vC();Object.defineProperty(e,"SaleType",{enumerable:!0,get:function(){return T.SaleType}});var b=lH();Object.defineProperty(e,"Sale",{enumerable:!0,get:function(){return b.Sale}}),Object.defineProperty(e,"SaleSortBy",{enumerable:!0,get:function(){return b.SaleSortBy}});var m=dH();Object.defineProperty(e,"RentalStatus",{enumerable:!0,get:function(){return m.RentalStatus}}),Object.defineProperty(e,"RentalsListingSortDirection",{enumerable:!0,get:function(){return m.RentalsListingSortDirection}}),Object.defineProperty(e,"RentalsListingsFilterByCategory",{enumerable:!0,get:function(){return m.RentalsListingsFilterByCategory}}),Object.defineProperty(e,"RentalsListingsSortBy",{enumerable:!0,get:function(){return m.RentalsListingsSortBy}}),Object.defineProperty(e,"RentalListingCreation",{enumerable:!0,get:function(){return m.RentalListingCreation}}),Object.defineProperty(e,"PeriodCreation",{enumerable:!0,get:function(){return m.PeriodCreation}});var v=fH();Object.defineProperty(e,"AnalyticsDayDataSortBy",{enumerable:!0,get:function(){return v.AnalyticsDayDataSortBy}});var A=pH();Object.defineProperty(e,"Store",{enumerable:!0,get:function(){return A.Store}});var P=mH();Object.defineProperty(e,"WearableGender",{enumerable:!0,get:function(){return P.WearableGender}}),Object.defineProperty(e,"GenderFilterOption",{enumerable:!0,get:function(){return P.GenderFilterOption}});var q=hH();Object.defineProperty(e,"World",{enumerable:!0,get:function(){return q.World}}),Object.defineProperty(e,"getWorld",{enumerable:!0,get:function(){return q.getWorld}}),Object.defineProperty(e,"isInsideWorldLimits",{enumerable:!0,get:function(){return q.isInsideWorldLimits}}),r(yH(),e),r(gH(),e),r(_H(),e),r(qH(),e),r(FH(),e)})(wi)),wi}var Wp={},GI;function VH(){return GI||(GI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LinkerAuthorization=void 0;const t=Oe();(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={}))})(Wp)),Wp}var Ni={},Yp={},Fs={},zI;function bC(){if(zI)return Fs;zI=1,Object.defineProperty(Fs,"__esModule",{value:!0}),Fs.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 Fs.isInExceptionBlock=n,Fs}var WI;function GH(){return WI||(WI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Parcel=e.PARCEL_LIMITS=void 0;const t=Oe(),r=bC();e.PARCEL_LIMITS={minX:-150,maxX:150,minY:-150,maxY:150},(function(n){n._isInLimits={keyword:"_isInLimits",validate:function(f,_){return!_||typeof _.x!="number"||typeof _.y!="number"?!1:o(_)||(0,r.isInExceptionBlock)(_.x,_.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:p,y:f}){return`${p},${f}`}n.parcelToString=i;function a(p){const f=p.match(/^(-?\d+),(-?\d+)$/);if(!f)return null;const[,_,R]=f,w=parseInt(_,10),O=parseInt(R,10);return{x:w,y:O}}n.stringToParcel=a;function s(p){const f=a(p);return f?n.validate(f):!1}n.isParcelStringValid=s;function o(p){const{x:f,y:_}=p;return f>=e.PARCEL_LIMITS.minX&&f<=e.PARCEL_LIMITS.maxX&&_>=e.PARCEL_LIMITS.minY&&_<=e.PARCEL_LIMITS.maxY}n.isInStandardBounds=o;function u(p){return(0,r.isInExceptionBlock)(p.x,p.y)}n.isExceptionParcel=u;function l(p){return o(p)||u(p)}n.isInBounds=l;function c(p){return n.validate(p)}n.isValid=c;function d(p){const f=a(p);return f?n.validate(f):!1}n.isValidString=d})(e.Parcel||(e.Parcel={}))})(Yp)),Yp}var Pi={},YI;function zH(){if(YI)return Pi;YI=1,Object.defineProperty(Pi,"__esModule",{value:!0}),Pi.validateUrlInstance=Pi.validateUrl=void 0;const e={allowLocalhost:!1,allowedPorts:[]};function t(f,_=2){let R=f;for(let w=0;w<_;w++)try{R=decodeURIComponent(R)}catch{break}return R.normalize("NFKC")}function r(f){return/[\u0000-\u001F\u007F-\u009F\u202A-\u202E\u2066-\u2069]/.test(f)}function n(f){return!!(f.username||f.password)}function i(f){return/\\/.test(f)}const a=["80","443"];function s(f,_){return!!f.port&&!_.includes(f.port)}function o(f){const _=f.toLowerCase();return!!(_==="localhost"||_.endsWith(".local")||/^(127\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.|192\.168\.|169\.254\.)/.test(_)||_==="::1"||_==="[::1]"||_.startsWith("fe80:")||_.startsWith("fc00:"))}function u(f){if(f.startsWith("//"))return null;try{return{url:new URL(f),wasRelative:!1}}catch{try{return{url:new URL(f,"https://example.com"),wasRelative:!0}}catch{return null}}}function l(f){const _=t(String(f).toLowerCase());return!(r(_)||i(_))}function c(f){return!(!f||f.includes("..")||f.includes("//")||r(f)||i(f))}function d(f,_={}){const R=Object.assign(Object.assign({},e),_),w=[...a,...R.allowedPorts];if(!f||f.length===0||f.length>4096||r(f)||i(f))return!1;const O=t(f);if(r(O)||i(O)||f.startsWith("//"))return!1;const h=u(f);if(!h)return!1;const{url:T,wasRelative:b}=h;if(T.protocol!=="http:"&&T.protocol!=="https:"&&T.protocol!==""||n(T)||i(f)||i(T.href)||!b&&(s(T,w)||!R.allowLocalhost&&T.hostname&&o(T.hostname))||!c(T.pathname)||T.pathname.length>2048)return!1;const m=Array.from(T.searchParams.entries());if(m.length>50||(T.search?T.search.startsWith("?")?T.search.length-1:T.search.length:0)>2048)return!1;for(const[A,P]of m)if(A.length===0||!l(A)||!l(P)||A.length>128||P.length>1024)return!1;return!(T.hash&&r(T.hash))}Pi.validateUrl=d;function p(f,_={}){return d(f.toString(),_)}return Pi.validateUrlInstance=p,Pi}var xI;function WH(){return xI||(xI=1,(function(e){var t=Ni&&Ni.__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=Ni&&Ni.__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(GH(),e),r(bC(),e),r(zH(),e)})(Ni)),Ni}var KI;function YH(){return KI||(KI=1,(function(e){var t=Br&&Br.__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=Br&&Br.__setModuleDefault||(Object.create?(function(s,o){Object.defineProperty(s,"default",{enumerable:!0,value:o})}):function(s,o){s.default=o}),n=Br&&Br.__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=Br&&Br.__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(eH());e.sdk=a,i(Oe(),e),i(HH(),e),i(X_(),e),i(Ta(),e),i(VH(),e),i(eu(),e),i(pC(),e),i(gC(),e),i(WH(),e)})(Br)),Br}var Jr=YH(),Ci={},Hr={},So={exports:{}},xH=So.exports,XI;function td(){return XI||(XI=1,(function(e,t){(function(r,n){n(t)})(xH,(function(r){function n(y){if(y.jsonrpc="2.0",!y.id||typeof y.id!="number"||Math.floor(y.id)!==y.id)throw new Error(`Invalid RPC message(invalid id) message: ${JSON.stringify(y)}`);if(!y.method||typeof y.method!="string"||y.method.trim().length===0)throw new Error(`Invalid RPC message(invalid method) message: ${JSON.stringify(y)}`);if(!y.params||typeof y.params!="object")throw new Error(`Invalid RPC message(invalid params) message: ${JSON.stringify(y)}`);return y}var i={};function a(){let y,S;const C=new Promise(((K,ee)=>{y=oe=>{K(oe),C.isPending=!1},S=oe=>{ee(oe),C.isPending=!1}})).catch((K=>Promise.reject(K)));return C.resolve=y,C.reject=S,"finally"in C||(C.finally=K=>{C.then(K),C.catch(K)}),C.isPending=!0,C}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(y){(function(){var S="input is invalid type",C=typeof window=="object",K=C?window:{};K.JS_SHA3_NO_WINDOW&&(C=!1);var ee=!C&&typeof self=="object";!K.JS_SHA3_NO_NODE_JS&&typeof yl=="object"&&yl.versions&&yl.versions.node?K=sg:ee&&(K=self);var oe=!K.JS_SHA3_NO_COMMON_JS&&y.exports,ve=!K.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",Pe="0123456789abcdef".split(""),He=[4,1024,262144,67108864],Ge=[0,8,16,24],cr=[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],qt=[224,256,384,512],De=[128,256],Kt=["hex","buffer","arrayBuffer","array","digest"],It={128:168,256:136};!K.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(g){return Object.prototype.toString.call(g)==="[object Array]"}),!ve||!K.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(g){return typeof g=="object"&&g.buffer&&g.buffer.constructor===ArrayBuffer});for(var Rt=function(g,B,Q){return function(H){return new lt(g,B,g).update(H)[Q]()}},ir=function(g,B,Q){return function(H,te){return new lt(g,B,te).update(H)[Q]()}},In=function(g,B,Q){return function(H,te,re,ae){return Xt["cshake"+g].update(H,te,re,ae)[Q]()}},on=function(g,B,Q){return function(H,te,re,ae){return Xt["kmac"+g].update(H,te,re,ae)[Q]()}},ar=function(g,B,Q,H){for(var te=0;te<Kt.length;++te){var re=Kt[te];g[re]=B(Q,H,re)}return g},un=function(g,B){var Q=Rt(g,B,"hex");return Q.create=function(){return new lt(g,B,g)},Q.update=function(H){return Q.create().update(H)},ar(Q,Rt,g,B)},Gn=[{name:"keccak",padding:[1,256,65536,16777216],bits:qt,createMethod:un},{name:"sha3",padding:[6,1536,393216,100663296],bits:qt,createMethod:un},{name:"shake",padding:[31,7936,2031616,520093696],bits:De,createMethod:function(g,B){var Q=ir(g,B,"hex");return Q.create=function(H){return new lt(g,B,H)},Q.update=function(H,te){return Q.create(te).update(H)},ar(Q,ir,g,B)}},{name:"cshake",padding:He,bits:De,createMethod:function(g,B){var Q=It[g],H=In(g,0,"hex");return H.create=function(te,re,ae){return re||ae?new lt(g,B,te).bytepad([re,ae],Q):Xt["shake"+g].create(te)},H.update=function(te,re,ae,pe){return H.create(re,ae,pe).update(te)},ar(H,In,g,B)}},{name:"kmac",padding:He,bits:De,createMethod:function(g,B){var Q=It[g],H=on(g,0,"hex");return H.create=function(te,re,ae){return new Ar(g,B,re).bytepad(["KMAC",ae],Q).bytepad([te],Q)},H.update=function(te,re,ae,pe){return H.create(te,ae,pe).update(re)},ar(H,on,g,B)}}],Xt={},Rn=[],sr=0;sr<Gn.length;++sr)for(var cn=Gn[sr],Ae=cn.bits,wn=0;wn<Ae.length;++wn){var Na=cn.name+"_"+Ae[wn];if(Rn.push(Na),Xt[Na]=cn.createMethod(Ae[wn],cn.padding),cn.name!=="sha3"){var Pa=cn.name+Ae[wn];Rn.push(Pa),Xt[Pa]=Xt[Na]}}function lt(g,B,Q){this.blocks=[],this.s=[],this.padding=B,this.outputBits=Q,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(g<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=Q>>5,this.extraBytes=(31&Q)>>3;for(var H=0;H<50;++H)this.s[H]=0}function Ar(g,B,Q){lt.call(this,g,B,Q)}lt.prototype.update=function(g){if(this.finalized)throw new Error("finalize already called");var B,Q=typeof g;if(Q!=="string"){if(Q!=="object")throw new Error(S);if(g===null)throw new Error(S);if(ve&&g.constructor===ArrayBuffer)g=new Uint8Array(g);else if(!(Array.isArray(g)||ve&&ArrayBuffer.isView(g)))throw new Error(S);B=!0}for(var H,te,re=this.blocks,ae=this.byteCount,pe=g.length,ye=this.blockCount,he=0,Ce=this.s;he<pe;){if(this.reset)for(this.reset=!1,re[0]=this.block,H=1;H<ye+1;++H)re[H]=0;if(B)for(H=this.start;he<pe&&H<ae;++he)re[H>>2]|=g[he]<<Ge[3&H++];else for(H=this.start;he<pe&&H<ae;++he)(te=g.charCodeAt(he))<128?re[H>>2]|=te<<Ge[3&H++]:te<2048?(re[H>>2]|=(192|te>>6)<<Ge[3&H++],re[H>>2]|=(128|63&te)<<Ge[3&H++]):te<55296||te>=57344?(re[H>>2]|=(224|te>>12)<<Ge[3&H++],re[H>>2]|=(128|te>>6&63)<<Ge[3&H++],re[H>>2]|=(128|63&te)<<Ge[3&H++]):(te=65536+((1023&te)<<10|1023&g.charCodeAt(++he)),re[H>>2]|=(240|te>>18)<<Ge[3&H++],re[H>>2]|=(128|te>>12&63)<<Ge[3&H++],re[H>>2]|=(128|te>>6&63)<<Ge[3&H++],re[H>>2]|=(128|63&te)<<Ge[3&H++]);if(this.lastByteIndex=H,H>=ae){for(this.start=H-ae,this.block=re[ye],H=0;H<ye;++H)Ce[H]^=re[H];k(Ce),this.reset=!0}else this.start=H}return this},lt.prototype.encode=function(g,B){var Q=255&g,H=1,te=[Q];for(Q=255&(g>>=8);Q>0;)te.unshift(Q),Q=255&(g>>=8),++H;return B?te.push(H):te.unshift(H),this.update(te),te.length},lt.prototype.encodeString=function(g){var B,Q=typeof g;if(Q!=="string"){if(Q!=="object")throw new Error(S);if(g===null)throw new Error(S);if(ve&&g.constructor===ArrayBuffer)g=new Uint8Array(g);else if(!(Array.isArray(g)||ve&&ArrayBuffer.isView(g)))throw new Error(S);B=!0}var H=0,te=g.length;if(B)H=te;else for(var re=0;re<g.length;++re){var ae=g.charCodeAt(re);ae<128?H+=1:ae<2048?H+=2:ae<55296||ae>=57344?H+=3:(ae=65536+((1023&ae)<<10|1023&g.charCodeAt(++re)),H+=4)}return H+=this.encode(8*H),this.update(g),H},lt.prototype.bytepad=function(g,B){for(var Q=this.encode(B),H=0;H<g.length;++H)Q+=this.encodeString(g[H]);var te=B-Q%B,re=[];return re.length=te,this.update(re),this},lt.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var g=this.blocks,B=this.lastByteIndex,Q=this.blockCount,H=this.s;if(g[B>>2]|=this.padding[3&B],this.lastByteIndex===this.byteCount)for(g[0]=g[Q],B=1;B<Q+1;++B)g[B]=0;for(g[Q-1]|=2147483648,B=0;B<Q;++B)H[B]^=g[B];k(H)}},lt.prototype.toString=lt.prototype.hex=function(){this.finalize();for(var g,B=this.blockCount,Q=this.s,H=this.outputBlocks,te=this.extraBytes,re=0,ae=0,pe="";ae<H;){for(re=0;re<B&&ae<H;++re,++ae)g=Q[re],pe+=Pe[g>>4&15]+Pe[15&g]+Pe[g>>12&15]+Pe[g>>8&15]+Pe[g>>20&15]+Pe[g>>16&15]+Pe[g>>28&15]+Pe[g>>24&15];ae%B==0&&(k(Q),re=0)}return te&&(g=Q[re],pe+=Pe[g>>4&15]+Pe[15&g],te>1&&(pe+=Pe[g>>12&15]+Pe[g>>8&15]),te>2&&(pe+=Pe[g>>20&15]+Pe[g>>16&15])),pe},lt.prototype.arrayBuffer=function(){this.finalize();var g,B=this.blockCount,Q=this.s,H=this.outputBlocks,te=this.extraBytes,re=0,ae=0,pe=this.outputBits>>3;g=te?new ArrayBuffer(H+1<<2):new ArrayBuffer(pe);for(var ye=new Uint32Array(g);ae<H;){for(re=0;re<B&&ae<H;++re,++ae)ye[ae]=Q[re];ae%B==0&&k(Q)}return te&&(ye[re]=Q[re],g=g.slice(0,pe)),g},lt.prototype.buffer=lt.prototype.arrayBuffer,lt.prototype.digest=lt.prototype.array=function(){this.finalize();for(var g,B,Q=this.blockCount,H=this.s,te=this.outputBlocks,re=this.extraBytes,ae=0,pe=0,ye=[];pe<te;){for(ae=0;ae<Q&&pe<te;++ae,++pe)g=pe<<2,B=H[ae],ye[g]=255&B,ye[g+1]=B>>8&255,ye[g+2]=B>>16&255,ye[g+3]=B>>24&255;pe%Q==0&&k(H)}return re&&(g=pe<<2,B=H[ae],ye[g]=255&B,re>1&&(ye[g+1]=B>>8&255),re>2&&(ye[g+2]=B>>16&255)),ye},Ar.prototype=new lt,Ar.prototype.finalize=function(){return this.encode(this.outputBits,!0),lt.prototype.finalize.call(this)};var k=function(g){var B,Q,H,te,re,ae,pe,ye,he,Ce,Ve,Ye,it,wt,jt,et,dt,Ut,An,zn,Wn,lr,ln,Jt,Ft,St,lu,du,fu,pu,mu,hu,yu,gu,_u,Eu,vu,bu,Tu,Su,Iu,Ru,wu,Au,Ou,Nu,Pu,Cu,Mu,Du,ju,Lu,$u,qu,Bu,ku,Uu,Fu,Hu,Vu,Gu,zu,Wu;for(H=0;H<48;H+=2)te=g[0]^g[10]^g[20]^g[30]^g[40],re=g[1]^g[11]^g[21]^g[31]^g[41],ae=g[2]^g[12]^g[22]^g[32]^g[42],pe=g[3]^g[13]^g[23]^g[33]^g[43],ye=g[4]^g[14]^g[24]^g[34]^g[44],he=g[5]^g[15]^g[25]^g[35]^g[45],Ce=g[6]^g[16]^g[26]^g[36]^g[46],Ve=g[7]^g[17]^g[27]^g[37]^g[47],B=(Ye=g[8]^g[18]^g[28]^g[38]^g[48])^(ae<<1|pe>>>31),Q=(it=g[9]^g[19]^g[29]^g[39]^g[49])^(pe<<1|ae>>>31),g[0]^=B,g[1]^=Q,g[10]^=B,g[11]^=Q,g[20]^=B,g[21]^=Q,g[30]^=B,g[31]^=Q,g[40]^=B,g[41]^=Q,B=te^(ye<<1|he>>>31),Q=re^(he<<1|ye>>>31),g[2]^=B,g[3]^=Q,g[12]^=B,g[13]^=Q,g[22]^=B,g[23]^=Q,g[32]^=B,g[33]^=Q,g[42]^=B,g[43]^=Q,B=ae^(Ce<<1|Ve>>>31),Q=pe^(Ve<<1|Ce>>>31),g[4]^=B,g[5]^=Q,g[14]^=B,g[15]^=Q,g[24]^=B,g[25]^=Q,g[34]^=B,g[35]^=Q,g[44]^=B,g[45]^=Q,B=ye^(Ye<<1|it>>>31),Q=he^(it<<1|Ye>>>31),g[6]^=B,g[7]^=Q,g[16]^=B,g[17]^=Q,g[26]^=B,g[27]^=Q,g[36]^=B,g[37]^=Q,g[46]^=B,g[47]^=Q,B=Ce^(te<<1|re>>>31),Q=Ve^(re<<1|te>>>31),g[8]^=B,g[9]^=Q,g[18]^=B,g[19]^=Q,g[28]^=B,g[29]^=Q,g[38]^=B,g[39]^=Q,g[48]^=B,g[49]^=Q,wt=g[0],jt=g[1],Nu=g[11]<<4|g[10]>>>28,Pu=g[10]<<4|g[11]>>>28,du=g[20]<<3|g[21]>>>29,fu=g[21]<<3|g[20]>>>29,Vu=g[31]<<9|g[30]>>>23,Gu=g[30]<<9|g[31]>>>23,Ru=g[40]<<18|g[41]>>>14,wu=g[41]<<18|g[40]>>>14,gu=g[2]<<1|g[3]>>>31,_u=g[3]<<1|g[2]>>>31,et=g[13]<<12|g[12]>>>20,dt=g[12]<<12|g[13]>>>20,Cu=g[22]<<10|g[23]>>>22,Mu=g[23]<<10|g[22]>>>22,pu=g[33]<<13|g[32]>>>19,mu=g[32]<<13|g[33]>>>19,zu=g[42]<<2|g[43]>>>30,Wu=g[43]<<2|g[42]>>>30,qu=g[5]<<30|g[4]>>>2,Bu=g[4]<<30|g[5]>>>2,Eu=g[14]<<6|g[15]>>>26,vu=g[15]<<6|g[14]>>>26,Ut=g[25]<<11|g[24]>>>21,An=g[24]<<11|g[25]>>>21,Du=g[34]<<15|g[35]>>>17,ju=g[35]<<15|g[34]>>>17,hu=g[45]<<29|g[44]>>>3,yu=g[44]<<29|g[45]>>>3,Jt=g[6]<<28|g[7]>>>4,Ft=g[7]<<28|g[6]>>>4,ku=g[17]<<23|g[16]>>>9,Uu=g[16]<<23|g[17]>>>9,bu=g[26]<<25|g[27]>>>7,Tu=g[27]<<25|g[26]>>>7,zn=g[36]<<21|g[37]>>>11,Wn=g[37]<<21|g[36]>>>11,Lu=g[47]<<24|g[46]>>>8,$u=g[46]<<24|g[47]>>>8,Au=g[8]<<27|g[9]>>>5,Ou=g[9]<<27|g[8]>>>5,St=g[18]<<20|g[19]>>>12,lu=g[19]<<20|g[18]>>>12,Fu=g[29]<<7|g[28]>>>25,Hu=g[28]<<7|g[29]>>>25,Su=g[38]<<8|g[39]>>>24,Iu=g[39]<<8|g[38]>>>24,lr=g[48]<<14|g[49]>>>18,ln=g[49]<<14|g[48]>>>18,g[0]=wt^~et&Ut,g[1]=jt^~dt&An,g[10]=Jt^~St&du,g[11]=Ft^~lu&fu,g[20]=gu^~Eu&bu,g[21]=_u^~vu&Tu,g[30]=Au^~Nu&Cu,g[31]=Ou^~Pu&Mu,g[40]=qu^~ku&Fu,g[41]=Bu^~Uu&Hu,g[2]=et^~Ut&zn,g[3]=dt^~An&Wn,g[12]=St^~du&pu,g[13]=lu^~fu&mu,g[22]=Eu^~bu&Su,g[23]=vu^~Tu&Iu,g[32]=Nu^~Cu&Du,g[33]=Pu^~Mu&ju,g[42]=ku^~Fu&Vu,g[43]=Uu^~Hu&Gu,g[4]=Ut^~zn&lr,g[5]=An^~Wn&ln,g[14]=du^~pu&hu,g[15]=fu^~mu&yu,g[24]=bu^~Su&Ru,g[25]=Tu^~Iu&wu,g[34]=Cu^~Du&Lu,g[35]=Mu^~ju&$u,g[44]=Fu^~Vu&zu,g[45]=Hu^~Gu&Wu,g[6]=zn^~lr&wt,g[7]=Wn^~ln&jt,g[16]=pu^~hu&Jt,g[17]=mu^~yu&Ft,g[26]=Su^~Ru&gu,g[27]=Iu^~wu&_u,g[36]=Du^~Lu&Au,g[37]=ju^~$u&Ou,g[46]=Vu^~zu&qu,g[47]=Gu^~Wu&Bu,g[8]=lr^~wt&et,g[9]=ln^~jt&dt,g[18]=hu^~Jt&St,g[19]=yu^~Ft&lu,g[28]=Ru^~gu&Eu,g[29]=wu^~_u&vu,g[38]=Lu^~Au&Nu,g[39]=$u^~Ou&Pu,g[48]=zu^~qu&ku,g[49]=Wu^~Bu&Uu,g[0]^=cr[H],g[1]^=cr[H+1]};if(oe)y.exports=Xt;else for(sr=0;sr<Rn.length;++sr)K[Rn[sr]]=Xt[Rn[sr]]})()})(o);var u=o.exports,l=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,c=Math.ceil,d=Math.floor,p="[BigNumber Error] ",f=p+"Number primitive has more than 15 significant digits: ",_=1e14,R=14,w=9007199254740991,O=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],h=1e7,T=1e9;function b(y){var S=0|y;return y>0||y===S?S:S-1}function m(y){for(var S,C,K=1,ee=y.length,oe=y[0]+"";K<ee;){for(S=y[K++]+"",C=R-S.length;C--;S="0"+S);oe+=S}for(ee=oe.length;oe.charCodeAt(--ee)===48;);return oe.slice(0,ee+1||1)}function v(y,S){var C,K,ee=y.c,oe=S.c,ve=y.s,Pe=S.s,He=y.e,Ge=S.e;if(!ve||!Pe)return null;if(C=ee&&!ee[0],K=oe&&!oe[0],C||K)return C?K?0:-Pe:ve;if(ve!=Pe)return ve;if(C=ve<0,K=He==Ge,!ee||!oe)return K?0:!ee^C?1:-1;if(!K)return He>Ge^C?1:-1;for(Pe=(He=ee.length)<(Ge=oe.length)?He:Ge,ve=0;ve<Pe;ve++)if(ee[ve]!=oe[ve])return ee[ve]>oe[ve]^C?1:-1;return He==Ge?0:He>Ge^C?1:-1}function A(y,S,C,K){if(y<S||y>C||y!==d(y))throw Error(p+(K||"Argument")+(typeof y=="number"?y<S||y>C?" out of range: ":" not an integer: ":" not a primitive number: ")+String(y))}function P(y){var S=y.c.length-1;return b(y.e/R)==S&&y.c[S]%2!=0}function q(y,S){return(y.length>1?y.charAt(0)+"."+y.slice(1):y)+(S<0?"e":"e+")+S}function z(y,S,C){var K,ee;if(S<0){for(ee=C+".";++S;ee+=C);y=ee+y}else if(++S>(K=y.length)){for(ee=C,S-=K;--S;ee+=C);y+=ee}else S<K&&(y=y.slice(0,S)+"."+y.slice(S));return y}var Y=(function y(S){var C,K,ee,oe,ve,Pe,He,Ge,cr,qt,De=Ae.prototype={constructor:Ae,toString:null,valueOf:null},Kt=new Ae(1),It=20,Rt=4,ir=-7,In=21,on=-1e7,ar=1e7,un=!1,Gn=1,Xt=0,Rn={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},sr="0123456789abcdefghijklmnopqrstuvwxyz",cn=!0;function Ae(k,g){var B,Q,H,te,re,ae,pe,ye,he=this;if(!(he instanceof Ae))return new Ae(k,g);if(g==null){if(k&&k._isBigNumber===!0)return he.s=k.s,void(!k.c||k.e>ar?he.c=he.e=null:k.e<on?he.c=[he.e=0]:(he.e=k.e,he.c=k.c.slice()));if((ae=typeof k=="number")&&0*k==0){if(he.s=1/k<0?(k=-k,-1):1,k===~~k){for(te=0,re=k;re>=10;re/=10,te++);return void(te>ar?he.c=he.e=null:(he.e=te,he.c=[k]))}ye=String(k)}else{if(!l.test(ye=String(k)))return ee(he,ye,ae);he.s=ye.charCodeAt(0)==45?(ye=ye.slice(1),-1):1}(te=ye.indexOf("."))>-1&&(ye=ye.replace(".","")),(re=ye.search(/e/i))>0?(te<0&&(te=re),te+=+ye.slice(re+1),ye=ye.substring(0,re)):te<0&&(te=ye.length)}else{if(A(g,2,sr.length,"Base"),g==10&&cn)return lt(he=new Ae(k),It+he.e+1,Rt);if(ye=String(k),ae=typeof k=="number"){if(0*k!=0)return ee(he,ye,ae,g);if(he.s=1/k<0?(ye=ye.slice(1),-1):1,Ae.DEBUG&&ye.replace(/^0\.0*|\./,"").length>15)throw Error(f+k)}else he.s=ye.charCodeAt(0)===45?(ye=ye.slice(1),-1):1;for(B=sr.slice(0,g),te=re=0,pe=ye.length;re<pe;re++)if(B.indexOf(Q=ye.charAt(re))<0){if(Q=="."){if(re>te){te=pe;continue}}else if(!H&&(ye==ye.toUpperCase()&&(ye=ye.toLowerCase())||ye==ye.toLowerCase()&&(ye=ye.toUpperCase()))){H=!0,re=-1,te=0;continue}return ee(he,String(k),ae,g)}ae=!1,(te=(ye=K(ye,g,10,he.s)).indexOf("."))>-1?ye=ye.replace(".",""):te=ye.length}for(re=0;ye.charCodeAt(re)===48;re++);for(pe=ye.length;ye.charCodeAt(--pe)===48;);if(ye=ye.slice(re,++pe)){if(pe-=re,ae&&Ae.DEBUG&&pe>15&&(k>w||k!==d(k)))throw Error(f+he.s*k);if((te=te-re-1)>ar)he.c=he.e=null;else if(te<on)he.c=[he.e=0];else{if(he.e=te,he.c=[],re=(te+1)%R,te<0&&(re+=R),re<pe){for(re&&he.c.push(+ye.slice(0,re)),pe-=R;re<pe;)he.c.push(+ye.slice(re,re+=R));re=R-(ye=ye.slice(re)).length}else re-=pe;for(;re--;ye+="0");he.c.push(+ye)}}else he.c=[he.e=0]}function wn(k,g,B,Q){var H,te,re,ae,pe;if(B==null?B=Rt:A(B,0,8),!k.c)return k.toString();if(H=k.c[0],re=k.e,g==null)pe=m(k.c),pe=Q==1||Q==2&&(re<=ir||re>=In)?q(pe,re):z(pe,re,"0");else if(te=(k=lt(new Ae(k),g,B)).e,ae=(pe=m(k.c)).length,Q==1||Q==2&&(g<=te||te<=ir)){for(;ae<g;pe+="0",ae++);pe=q(pe,te)}else if(g-=re,pe=z(pe,te,"0"),te+1>ae){if(--g>0)for(pe+=".";g--;pe+="0");}else if((g+=te-ae)>0)for(te+1==ae&&(pe+=".");g--;pe+="0");return k.s<0&&H?"-"+pe:pe}function Na(k,g){for(var B,Q=1,H=new Ae(k[0]);Q<k.length;Q++){if(!(B=new Ae(k[Q])).s){H=B;break}g.call(H,B)&&(H=B)}return H}function Pa(k,g,B){for(var Q=1,H=g.length;!g[--H];g.pop());for(H=g[0];H>=10;H/=10,Q++);return(B=Q+B*R-1)>ar?k.c=k.e=null:B<on?k.c=[k.e=0]:(k.e=B,k.c=g),k}function lt(k,g,B,Q){var H,te,re,ae,pe,ye,he,Ce=k.c,Ve=O;if(Ce){e:{for(H=1,ae=Ce[0];ae>=10;ae/=10,H++);if((te=g-H)<0)te+=R,re=g,he=(pe=Ce[ye=0])/Ve[H-re-1]%10|0;else if((ye=c((te+1)/R))>=Ce.length){if(!Q)break e;for(;Ce.length<=ye;Ce.push(0));pe=he=0,H=1,re=(te%=R)-R+1}else{for(pe=ae=Ce[ye],H=1;ae>=10;ae/=10,H++);he=(re=(te%=R)-R+H)<0?0:pe/Ve[H-re-1]%10|0}if(Q=Q||g<0||Ce[ye+1]!=null||(re<0?pe:pe%Ve[H-re-1]),Q=B<4?(he||Q)&&(B==0||B==(k.s<0?3:2)):he>5||he==5&&(B==4||Q||B==6&&(te>0?re>0?pe/Ve[H-re]:0:Ce[ye-1])%10&1||B==(k.s<0?8:7)),g<1||!Ce[0])return Ce.length=0,Q?(g-=k.e+1,Ce[0]=Ve[(R-g%R)%R],k.e=-g||0):Ce[0]=k.e=0,k;if(te==0?(Ce.length=ye,ae=1,ye--):(Ce.length=ye+1,ae=Ve[R-te],Ce[ye]=re>0?d(pe/Ve[H-re]%Ve[re])*ae:0),Q)for(;;){if(ye==0){for(te=1,re=Ce[0];re>=10;re/=10,te++);for(re=Ce[0]+=ae,ae=1;re>=10;re/=10,ae++);te!=ae&&(k.e++,Ce[0]==_&&(Ce[0]=1));break}if(Ce[ye]+=ae,Ce[ye]!=_)break;Ce[ye--]=0,ae=1}for(te=Ce.length;Ce[--te]===0;Ce.pop());}k.e>ar?k.c=k.e=null:k.e<on&&(k.c=[k.e=0])}return k}function Ar(k){var g,B=k.e;return B===null?k.toString():(g=m(k.c),g=B<=ir||B>=In?q(g,B):z(g,B,"0"),k.s<0?"-"+g:g)}return Ae.clone=y,Ae.ROUND_UP=0,Ae.ROUND_DOWN=1,Ae.ROUND_CEIL=2,Ae.ROUND_FLOOR=3,Ae.ROUND_HALF_UP=4,Ae.ROUND_HALF_DOWN=5,Ae.ROUND_HALF_EVEN=6,Ae.ROUND_HALF_CEIL=7,Ae.ROUND_HALF_FLOOR=8,Ae.EUCLID=9,Ae.config=Ae.set=function(k){var g,B;if(k!=null){if(typeof k!="object")throw Error(p+"Object expected: "+k);if(k.hasOwnProperty(g="DECIMAL_PLACES")&&(A(B=k[g],0,T,g),It=B),k.hasOwnProperty(g="ROUNDING_MODE")&&(A(B=k[g],0,8,g),Rt=B),k.hasOwnProperty(g="EXPONENTIAL_AT")&&((B=k[g])&&B.pop?(A(B[0],-T,0,g),A(B[1],0,T,g),ir=B[0],In=B[1]):(A(B,-T,T,g),ir=-(In=B<0?-B:B))),k.hasOwnProperty(g="RANGE"))if((B=k[g])&&B.pop)A(B[0],-T,-1,g),A(B[1],1,T,g),on=B[0],ar=B[1];else{if(A(B,-T,T,g),!B)throw Error(p+g+" cannot be zero: "+B);on=-(ar=B<0?-B:B)}if(k.hasOwnProperty(g="CRYPTO")){if((B=k[g])!==!!B)throw Error(p+g+" not true or false: "+B);if(B){if(typeof crypto>"u"||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw un=!B,Error(p+"crypto unavailable");un=B}else un=B}if(k.hasOwnProperty(g="MODULO_MODE")&&(A(B=k[g],0,9,g),Gn=B),k.hasOwnProperty(g="POW_PRECISION")&&(A(B=k[g],0,T,g),Xt=B),k.hasOwnProperty(g="FORMAT")){if(typeof(B=k[g])!="object")throw Error(p+g+" not an object: "+B);Rn=B}if(k.hasOwnProperty(g="ALPHABET")){if(typeof(B=k[g])!="string"||/^.?$|[+\-.\s]|(.).*\1/.test(B))throw Error(p+g+" invalid: "+B);cn=B.slice(0,10)=="0123456789",sr=B}}return{DECIMAL_PLACES:It,ROUNDING_MODE:Rt,EXPONENTIAL_AT:[ir,In],RANGE:[on,ar],CRYPTO:un,MODULO_MODE:Gn,POW_PRECISION:Xt,FORMAT:Rn,ALPHABET:sr}},Ae.isBigNumber=function(k){if(!k||k._isBigNumber!==!0)return!1;if(!Ae.DEBUG)return!0;var g,B,Q=k.c,H=k.e,te=k.s;e:if({}.toString.call(Q)=="[object Array]"){if((te===1||te===-1)&&H>=-T&&H<=T&&H===d(H)){if(Q[0]===0){if(H===0&&Q.length===1)return!0;break e}if((g=(H+1)%R)<1&&(g+=R),String(Q[0]).length==g){for(g=0;g<Q.length;g++)if((B=Q[g])<0||B>=_||B!==d(B))break e;if(B!==0)return!0}}}else if(Q===null&&H===null&&(te===null||te===1||te===-1))return!0;throw Error(p+"Invalid BigNumber: "+k)},Ae.maximum=Ae.max=function(){return Na(arguments,De.lt)},Ae.minimum=Ae.min=function(){return Na(arguments,De.gt)},Ae.random=(oe=9007199254740992,ve=Math.random()*oe&2097151?function(){return d(Math.random()*oe)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(k){var g,B,Q,H,te,re=0,ae=[],pe=new Ae(Kt);if(k==null?k=It:A(k,0,T),H=c(k/R),un)if(crypto.getRandomValues){for(g=crypto.getRandomValues(new Uint32Array(H*=2));re<H;)(te=131072*g[re]+(g[re+1]>>>11))>=9e15?(B=crypto.getRandomValues(new Uint32Array(2)),g[re]=B[0],g[re+1]=B[1]):(ae.push(te%1e14),re+=2);re=H/2}else{if(!crypto.randomBytes)throw un=!1,Error(p+"crypto unavailable");for(g=crypto.randomBytes(H*=7);re<H;)(te=281474976710656*(31&g[re])+1099511627776*g[re+1]+4294967296*g[re+2]+16777216*g[re+3]+(g[re+4]<<16)+(g[re+5]<<8)+g[re+6])>=9e15?crypto.randomBytes(7).copy(g,re):(ae.push(te%1e14),re+=7);re=H/7}if(!un)for(;re<H;)(te=ve())<9e15&&(ae[re++]=te%1e14);for(H=ae[--re],k%=R,H&&k&&(te=O[R-k],ae[re]=d(H/te)*te);ae[re]===0;ae.pop(),re--);if(re<0)ae=[Q=0];else{for(Q=-1;ae[0]===0;ae.splice(0,1),Q-=R);for(re=1,te=ae[0];te>=10;te/=10,re++);re<R&&(Q-=R-re)}return pe.e=Q,pe.c=ae,pe}),Ae.sum=function(){for(var k=1,g=arguments,B=new Ae(g[0]);k<g.length;)B=B.plus(g[k++]);return B},K=(function(){var k="0123456789";function g(B,Q,H,te){for(var re,ae,pe=[0],ye=0,he=B.length;ye<he;){for(ae=pe.length;ae--;pe[ae]*=Q);for(pe[0]+=te.indexOf(B.charAt(ye++)),re=0;re<pe.length;re++)pe[re]>H-1&&(pe[re+1]==null&&(pe[re+1]=0),pe[re+1]+=pe[re]/H|0,pe[re]%=H)}return pe.reverse()}return function(B,Q,H,te,re){var ae,pe,ye,he,Ce,Ve,Ye,it,wt=B.indexOf("."),jt=It,et=Rt;for(wt>=0&&(he=Xt,Xt=0,B=B.replace(".",""),Ve=(it=new Ae(Q)).pow(B.length-wt),Xt=he,it.c=g(z(m(Ve.c),Ve.e,"0"),10,H,k),it.e=it.c.length),ye=he=(Ye=g(B,Q,H,re?(ae=sr,k):(ae=k,sr))).length;Ye[--he]==0;Ye.pop());if(!Ye[0])return ae.charAt(0);if(wt<0?--ye:(Ve.c=Ye,Ve.e=ye,Ve.s=te,Ye=(Ve=C(Ve,it,jt,et,H)).c,Ce=Ve.r,ye=Ve.e),wt=Ye[pe=ye+jt+1],he=H/2,Ce=Ce||pe<0||Ye[pe+1]!=null,Ce=et<4?(wt!=null||Ce)&&(et==0||et==(Ve.s<0?3:2)):wt>he||wt==he&&(et==4||Ce||et==6&&1&Ye[pe-1]||et==(Ve.s<0?8:7)),pe<1||!Ye[0])B=Ce?z(ae.charAt(1),-jt,ae.charAt(0)):ae.charAt(0);else{if(Ye.length=pe,Ce)for(--H;++Ye[--pe]>H;)Ye[pe]=0,pe||(++ye,Ye=[1].concat(Ye));for(he=Ye.length;!Ye[--he];);for(wt=0,B="";wt<=he;B+=ae.charAt(Ye[wt++]));B=z(B,ye,ae.charAt(0))}return B}})(),C=(function(){function k(Q,H,te){var re,ae,pe,ye,he=0,Ce=Q.length,Ve=H%h,Ye=H/h|0;for(Q=Q.slice();Ce--;)he=((ae=Ve*(pe=Q[Ce]%h)+(re=Ye*pe+(ye=Q[Ce]/h|0)*Ve)%h*h+he)/te|0)+(re/h|0)+Ye*ye,Q[Ce]=ae%te;return he&&(Q=[he].concat(Q)),Q}function g(Q,H,te,re){var ae,pe;if(te!=re)pe=te>re?1:-1;else for(ae=pe=0;ae<te;ae++)if(Q[ae]!=H[ae]){pe=Q[ae]>H[ae]?1:-1;break}return pe}function B(Q,H,te,re){for(var ae=0;te--;)Q[te]-=ae,ae=Q[te]<H[te]?1:0,Q[te]=ae*re+Q[te]-H[te];for(;!Q[0]&&Q.length>1;Q.splice(0,1));}return function(Q,H,te,re,ae){var pe,ye,he,Ce,Ve,Ye,it,wt,jt,et,dt,Ut,An,zn,Wn,lr,ln,Jt=Q.s==H.s?1:-1,Ft=Q.c,St=H.c;if(!(Ft&&Ft[0]&&St&&St[0]))return new Ae(Q.s&&H.s&&(Ft?!St||Ft[0]!=St[0]:St)?Ft&&Ft[0]==0||!St?0*Jt:Jt/0:NaN);for(jt=(wt=new Ae(Jt)).c=[],Jt=te+(ye=Q.e-H.e)+1,ae||(ae=_,ye=b(Q.e/R)-b(H.e/R),Jt=Jt/R|0),he=0;St[he]==(Ft[he]||0);he++);if(St[he]>(Ft[he]||0)&&ye--,Jt<0)jt.push(1),Ce=!0;else{for(zn=Ft.length,lr=St.length,he=0,Jt+=2,(Ve=d(ae/(St[0]+1)))>1&&(St=k(St,Ve,ae),Ft=k(Ft,Ve,ae),lr=St.length,zn=Ft.length),An=lr,dt=(et=Ft.slice(0,lr)).length;dt<lr;et[dt++]=0);ln=St.slice(),ln=[0].concat(ln),Wn=St[0],St[1]>=ae/2&&Wn++;do{if(Ve=0,(pe=g(St,et,lr,dt))<0){if(Ut=et[0],lr!=dt&&(Ut=Ut*ae+(et[1]||0)),(Ve=d(Ut/Wn))>1)for(Ve>=ae&&(Ve=ae-1),it=(Ye=k(St,Ve,ae)).length,dt=et.length;g(Ye,et,it,dt)==1;)Ve--,B(Ye,lr<it?ln:St,it,ae),it=Ye.length,pe=1;else Ve==0&&(pe=Ve=1),it=(Ye=St.slice()).length;if(it<dt&&(Ye=[0].concat(Ye)),B(et,Ye,dt,ae),dt=et.length,pe==-1)for(;g(St,et,lr,dt)<1;)Ve++,B(et,lr<dt?ln:St,dt,ae),dt=et.length}else pe===0&&(Ve++,et=[0]);jt[he++]=Ve,et[0]?et[dt++]=Ft[An]||0:(et=[Ft[An]],dt=1)}while((An++<zn||et[0]!=null)&&Jt--);Ce=et[0]!=null,jt[0]||jt.splice(0,1)}if(ae==_){for(he=1,Jt=jt[0];Jt>=10;Jt/=10,he++);lt(wt,te+(wt.e=he+ye*R-1)+1,re,Ce)}else wt.e=ye,wt.r=+Ce;return wt}})(),Pe=/^(-?)0([xbo])(?=\w[\w.]*$)/i,He=/^([^.]+)\.$/,Ge=/^\.([^.]+)$/,cr=/^-?(Infinity|NaN)$/,qt=/^\s*\+(?=[\w.])|^\s+|\s+$/g,ee=function(k,g,B,Q){var H,te=B?g:g.replace(qt,"");if(cr.test(te))k.s=isNaN(te)?null:te<0?-1:1;else{if(!B&&(te=te.replace(Pe,(function(re,ae,pe){return H=(pe=pe.toLowerCase())=="x"?16:pe=="b"?2:8,Q&&Q!=H?re:ae})),Q&&(H=Q,te=te.replace(He,"$1").replace(Ge,"0.$1")),g!=te))return new Ae(te,H);if(Ae.DEBUG)throw Error(p+"Not a"+(Q?" base "+Q:"")+" number: "+g);k.s=null}k.c=k.e=null},De.absoluteValue=De.abs=function(){var k=new Ae(this);return k.s<0&&(k.s=1),k},De.comparedTo=function(k,g){return v(this,new Ae(k,g))},De.decimalPlaces=De.dp=function(k,g){var B,Q,H,te=this;if(k!=null)return A(k,0,T),g==null?g=Rt:A(g,0,8),lt(new Ae(te),k+te.e+1,g);if(!(B=te.c))return null;if(Q=((H=B.length-1)-b(this.e/R))*R,H=B[H])for(;H%10==0;H/=10,Q--);return Q<0&&(Q=0),Q},De.dividedBy=De.div=function(k,g){return C(this,new Ae(k,g),It,Rt)},De.dividedToIntegerBy=De.idiv=function(k,g){return C(this,new Ae(k,g),0,1)},De.exponentiatedBy=De.pow=function(k,g){var B,Q,H,te,re,ae,pe,ye,he=this;if((k=new Ae(k)).c&&!k.isInteger())throw Error(p+"Exponent not an integer: "+Ar(k));if(g!=null&&(g=new Ae(g)),re=k.e>14,!he.c||!he.c[0]||he.c[0]==1&&!he.e&&he.c.length==1||!k.c||!k.c[0])return ye=new Ae(Math.pow(+Ar(he),re?k.s*(2-P(k)):+Ar(k))),g?ye.mod(g):ye;if(ae=k.s<0,g){if(g.c?!g.c[0]:!g.s)return new Ae(NaN);(Q=!ae&&he.isInteger()&&g.isInteger())&&(he=he.mod(g))}else{if(k.e>9&&(he.e>0||he.e<-1||(he.e==0?he.c[0]>1||re&&he.c[1]>=24e7:he.c[0]<8e13||re&&he.c[0]<=9999975e7)))return te=he.s<0&&P(k)?-0:0,he.e>-1&&(te=1/te),new Ae(ae?1/te:te);Xt&&(te=c(Xt/R+2))}for(re?(B=new Ae(.5),ae&&(k.s=1),pe=P(k)):pe=(H=Math.abs(+Ar(k)))%2,ye=new Ae(Kt);;){if(pe){if(!(ye=ye.times(he)).c)break;te?ye.c.length>te&&(ye.c.length=te):Q&&(ye=ye.mod(g))}if(H){if((H=d(H/2))===0)break;pe=H%2}else if(lt(k=k.times(B),k.e+1,1),k.e>14)pe=P(k);else{if((H=+Ar(k))==0)break;pe=H%2}he=he.times(he),te?he.c&&he.c.length>te&&(he.c.length=te):Q&&(he=he.mod(g))}return Q?ye:(ae&&(ye=Kt.div(ye)),g?ye.mod(g):te?lt(ye,Xt,Rt,void 0):ye)},De.integerValue=function(k){var g=new Ae(this);return k==null?k=Rt:A(k,0,8),lt(g,g.e+1,k)},De.isEqualTo=De.eq=function(k,g){return v(this,new Ae(k,g))===0},De.isFinite=function(){return!!this.c},De.isGreaterThan=De.gt=function(k,g){return v(this,new Ae(k,g))>0},De.isGreaterThanOrEqualTo=De.gte=function(k,g){return(g=v(this,new Ae(k,g)))===1||g===0},De.isInteger=function(){return!!this.c&&b(this.e/R)>this.c.length-2},De.isLessThan=De.lt=function(k,g){return v(this,new Ae(k,g))<0},De.isLessThanOrEqualTo=De.lte=function(k,g){return(g=v(this,new Ae(k,g)))===-1||g===0},De.isNaN=function(){return!this.s},De.isNegative=function(){return this.s<0},De.isPositive=function(){return this.s>0},De.isZero=function(){return!!this.c&&this.c[0]==0},De.minus=function(k,g){var B,Q,H,te,re=this,ae=re.s;if(g=(k=new Ae(k,g)).s,!ae||!g)return new Ae(NaN);if(ae!=g)return k.s=-g,re.plus(k);var pe=re.e/R,ye=k.e/R,he=re.c,Ce=k.c;if(!pe||!ye){if(!he||!Ce)return he?(k.s=-g,k):new Ae(Ce?re:NaN);if(!he[0]||!Ce[0])return Ce[0]?(k.s=-g,k):new Ae(he[0]?re:Rt==3?-0:0)}if(pe=b(pe),ye=b(ye),he=he.slice(),ae=pe-ye){for((te=ae<0)?(ae=-ae,H=he):(ye=pe,H=Ce),H.reverse(),g=ae;g--;H.push(0));H.reverse()}else for(Q=(te=(ae=he.length)<(g=Ce.length))?ae:g,ae=g=0;g<Q;g++)if(he[g]!=Ce[g]){te=he[g]<Ce[g];break}if(te&&(H=he,he=Ce,Ce=H,k.s=-k.s),(g=(Q=Ce.length)-(B=he.length))>0)for(;g--;he[B++]=0);for(g=_-1;Q>ae;){if(he[--Q]<Ce[Q]){for(B=Q;B&&!he[--B];he[B]=g);--he[B],he[Q]+=_}he[Q]-=Ce[Q]}for(;he[0]==0;he.splice(0,1),--ye);return he[0]?Pa(k,he,ye):(k.s=Rt==3?-1:1,k.c=[k.e=0],k)},De.modulo=De.mod=function(k,g){var B,Q,H=this;return k=new Ae(k,g),!H.c||!k.s||k.c&&!k.c[0]?new Ae(NaN):!k.c||H.c&&!H.c[0]?new Ae(H):(Gn==9?(Q=k.s,k.s=1,B=C(H,k,0,3),k.s=Q,B.s*=Q):B=C(H,k,0,Gn),(k=H.minus(B.times(k))).c[0]||Gn!=1||(k.s=H.s),k)},De.multipliedBy=De.times=function(k,g){var B,Q,H,te,re,ae,pe,ye,he,Ce,Ve,Ye,it,wt,jt,et=this,dt=et.c,Ut=(k=new Ae(k,g)).c;if(!(dt&&Ut&&dt[0]&&Ut[0]))return!et.s||!k.s||dt&&!dt[0]&&!Ut||Ut&&!Ut[0]&&!dt?k.c=k.e=k.s=null:(k.s*=et.s,dt&&Ut?(k.c=[0],k.e=0):k.c=k.e=null),k;for(Q=b(et.e/R)+b(k.e/R),k.s*=et.s,(pe=dt.length)<(Ce=Ut.length)&&(it=dt,dt=Ut,Ut=it,H=pe,pe=Ce,Ce=H),H=pe+Ce,it=[];H--;it.push(0));for(wt=_,jt=h,H=Ce;--H>=0;){for(B=0,Ve=Ut[H]%jt,Ye=Ut[H]/jt|0,te=H+(re=pe);te>H;)B=((ye=Ve*(ye=dt[--re]%jt)+(ae=Ye*ye+(he=dt[re]/jt|0)*Ve)%jt*jt+it[te]+B)/wt|0)+(ae/jt|0)+Ye*he,it[te--]=ye%wt;it[te]=B}return B?++Q:it.splice(0,1),Pa(k,it,Q)},De.negated=function(){var k=new Ae(this);return k.s=-k.s||null,k},De.plus=function(k,g){var B,Q=this,H=Q.s;if(g=(k=new Ae(k,g)).s,!H||!g)return new Ae(NaN);if(H!=g)return k.s=-g,Q.minus(k);var te=Q.e/R,re=k.e/R,ae=Q.c,pe=k.c;if(!te||!re){if(!ae||!pe)return new Ae(H/0);if(!ae[0]||!pe[0])return pe[0]?k:new Ae(ae[0]?Q:0*H)}if(te=b(te),re=b(re),ae=ae.slice(),H=te-re){for(H>0?(re=te,B=pe):(H=-H,B=ae),B.reverse();H--;B.push(0));B.reverse()}for((H=ae.length)-(g=pe.length)<0&&(B=pe,pe=ae,ae=B,g=H),H=0;g;)H=(ae[--g]=ae[g]+pe[g]+H)/_|0,ae[g]=_===ae[g]?0:ae[g]%_;return H&&(ae=[H].concat(ae),++re),Pa(k,ae,re)},De.precision=De.sd=function(k,g){var B,Q,H,te=this;if(k!=null&&k!==!!k)return A(k,1,T),g==null?g=Rt:A(g,0,8),lt(new Ae(te),k,g);if(!(B=te.c))return null;if(Q=(H=B.length-1)*R+1,H=B[H]){for(;H%10==0;H/=10,Q--);for(H=B[0];H>=10;H/=10,Q++);}return k&&te.e+1>Q&&(Q=te.e+1),Q},De.shiftedBy=function(k){return A(k,-9007199254740991,w),this.times("1e"+k)},De.squareRoot=De.sqrt=function(){var k,g,B,Q,H,te=this,re=te.c,ae=te.s,pe=te.e,ye=It+4,he=new Ae("0.5");if(ae!==1||!re||!re[0])return new Ae(!ae||ae<0&&(!re||re[0])?NaN:re?te:1/0);if((ae=Math.sqrt(+Ar(te)))==0||ae==1/0?(((g=m(re)).length+pe)%2==0&&(g+="0"),ae=Math.sqrt(+g),pe=b((pe+1)/2)-(pe<0||pe%2),B=new Ae(g=ae==1/0?"5e"+pe:(g=ae.toExponential()).slice(0,g.indexOf("e")+1)+pe)):B=new Ae(ae+""),B.c[0]){for((ae=(pe=B.e)+ye)<3&&(ae=0);;)if(H=B,B=he.times(H.plus(C(te,H,ye,1))),m(H.c).slice(0,ae)===(g=m(B.c)).slice(0,ae)){if(B.e<pe&&--ae,(g=g.slice(ae-3,ae+1))!="9999"&&(Q||g!="4999")){+g&&(+g.slice(1)||g.charAt(0)!="5")||(lt(B,B.e+It+2,1),k=!B.times(B).eq(te));break}if(!Q&&(lt(H,H.e+It+2,0),H.times(H).eq(te))){B=H;break}ye+=4,ae+=4,Q=1}}return lt(B,B.e+It+1,Rt,k)},De.toExponential=function(k,g){return k!=null&&(A(k,0,T),k++),wn(this,k,g,1)},De.toFixed=function(k,g){return k!=null&&(A(k,0,T),k=k+this.e+1),wn(this,k,g)},De.toFormat=function(k,g,B){var Q,H=this;if(B==null)k!=null&&g&&typeof g=="object"?(B=g,g=null):k&&typeof k=="object"?(B=k,k=g=null):B=Rn;else if(typeof B!="object")throw Error(p+"Argument not an object: "+B);if(Q=H.toFixed(k,g),H.c){var te,re=Q.split("."),ae=+B.groupSize,pe=+B.secondaryGroupSize,ye=B.groupSeparator||"",he=re[0],Ce=re[1],Ve=H.s<0,Ye=Ve?he.slice(1):he,it=Ye.length;if(pe&&(te=ae,ae=pe,pe=te,it-=te),ae>0&&it>0){for(te=it%ae||ae,he=Ye.substr(0,te);te<it;te+=ae)he+=ye+Ye.substr(te,ae);pe>0&&(he+=ye+Ye.slice(te)),Ve&&(he="-"+he)}Q=Ce?he+(B.decimalSeparator||"")+((pe=+B.fractionGroupSize)?Ce.replace(new RegExp("\\d{"+pe+"}\\B","g"),"$&"+(B.fractionGroupSeparator||"")):Ce):he}return(B.prefix||"")+Q+(B.suffix||"")},De.toFraction=function(k){var g,B,Q,H,te,re,ae,pe,ye,he,Ce,Ve,Ye=this,it=Ye.c;if(k!=null&&(!(ae=new Ae(k)).isInteger()&&(ae.c||ae.s!==1)||ae.lt(Kt)))throw Error(p+"Argument "+(ae.isInteger()?"out of range: ":"not an integer: ")+Ar(ae));if(!it)return new Ae(Ye);for(g=new Ae(Kt),ye=B=new Ae(Kt),Q=pe=new Ae(Kt),Ve=m(it),te=g.e=Ve.length-Ye.e-1,g.c[0]=O[(re=te%R)<0?R+re:re],k=!k||ae.comparedTo(g)>0?te>0?g:ye:ae,re=ar,ar=1/0,ae=new Ae(Ve),pe.c[0]=0;he=C(ae,g,0,1),(H=B.plus(he.times(Q))).comparedTo(k)!=1;)B=Q,Q=H,ye=pe.plus(he.times(H=ye)),pe=H,g=ae.minus(he.times(H=g)),ae=H;return H=C(k.minus(B),Q,0,1),pe=pe.plus(H.times(ye)),B=B.plus(H.times(Q)),pe.s=ye.s=Ye.s,Ce=C(ye,Q,te*=2,Rt).minus(Ye).abs().comparedTo(C(pe,B,te,Rt).minus(Ye).abs())<1?[ye,Q]:[pe,B],ar=re,Ce},De.toNumber=function(){return+Ar(this)},De.toPrecision=function(k,g){return k!=null&&A(k,1,T),wn(this,k,g,2)},De.toString=function(k){var g,B=this,Q=B.s,H=B.e;return H===null?Q?(g="Infinity",Q<0&&(g="-"+g)):g="NaN":(k==null?g=H<=ir||H>=In?q(m(B.c),H):z(m(B.c),H,"0"):k===10&&cn?g=z(m((B=lt(new Ae(B),It+H+1,Rt)).c),B.e,"0"):(A(k,2,sr.length,"Base"),g=K(z(m(B.c),H,"0"),10,k,Q,!0)),Q<0&&B.c[0]&&(g="-"+g)),g},De.valueOf=De.toJSON=function(){return Ar(this)},De._isBigNumber=!0,De[Symbol.toStringTag]="BigNumber",De[Symbol.for("nodejs.util.inspect.custom")]=De.valueOf,S!=null&&Ae.set(S),Ae})();const W={ROUNDING_MODE:Y.ROUND_DOWN};function U(y){return new TextEncoder().encode(y)}function F(y){return typeof y=="string"?F(X(y)):new TextDecoder().decode(y)}Y.config(W);const ce="UNKNOWN_ERROR",se="INVALID_ARGUMENT";function ne(y,S=ce,C={}){const K=[];Object.keys(C).forEach((ve=>{try{K.push(ve+"="+JSON.stringify(C[ve]))}catch{K.push(ve+"="+JSON.stringify(C[ve].toString()))}}));const ee=y;K.length&&(y+=" ("+K.join(", ")+")");const oe=new Error(y);return oe.reason=ee,oe.code=S,Object.keys(C).forEach((function(ve){oe[ve]=C[ve]})),oe}function X(y){if(typeof y!="string")throw new Error("hexToBytes only accept strings, got: "+typeof y);if(y.substr(0,2)==="0x")return X(y.substr(2));const S=new Uint8Array(Math.ceil(y.length/2));let C=0;for(let K=0;K<y.length;K+=2){const ee=parseInt(y.substr(K,2),16);if(isNaN(ee))throw new Error("Cannot read hex string:"+JSON.stringify(y));S[C]=ee,C++}return S}function x(y){return Array.from(y).map((S=>S.toString(16).padStart(2,"0"))).join("")}function L(y,S){if(typeof y=="string"){if(S&&S.encoding==="hex"&&typeof y=="string"){let C=y;C.length>2&&C.substr(0,2)==="0x"&&(C=C.substr(2));const K=X(C);return u.keccak256(K)}return u.keccak256(U(y))}return u.keccak256(y)}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 $(y,S,C){return new Array(S-y.length+1).join(C||"0")+y}function V(y){let S="",C=0;const K=y.length;for(y.substring(0,2)==="0x"&&(C=2);C<K;C+=2){const ee=parseInt(y.substr(C,2),16);S+=String.fromCharCode(ee)}return S}function N(y){return I(y)&&y.name&&y.name.indexOf("(")!==-1?y.name:y.name+"("+Z(!1,y.inputs||[]).join(",")+")"}function j(...y){const S=y.reduce(((ee,oe)=>ee+oe.length),0),C=new Uint8Array(S);let K=0;for(const ee of y)C.set(ee,K),K+=ee.length;return C}function Z(y,S){const C=[];return S.forEach((function(K){if(typeof K.components=="object"){if(K.type.substring(0,5)!=="tuple")throw new Error("components found but type is not tuple; report on GitHub");let ee="";const oe=K.type.indexOf("[");oe>=0&&(ee=K.type.substring(oe));const ve=Z(y,K.components);C.push("("+ve.join(",")+")"+ee)}else C.push(K.type)})),C}function Ee(y){const S=y.indexOf("("),C=y.indexOf(")");return S!==-1&&C!==-1?y.substr(0,S):y}function _e(y){const S=y.indexOf("("),C=y.indexOf(")");return S!==-1&&C!==-1?y.substr(S+1,C-S-1).replace(" ",""):""}function Se(y){return y==null?y:xe(y).toNumber()}function Ie(y){return xe(y).toNumber()}function ie(y){return M(y)?y.toString(10):""+y}function le(y){return typeof y=="string"&&!y.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(y)?"0x"+y:we(y)}function fe(y){if(typeof y=="string")return y.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(y)?we(y):"0x"+x(U(y));if(y instanceof Uint8Array)return"0x"+x(y);throw new Error(`toStringData: Error trying to convert ${y} (${typeof y}) to a hex string.`)}function me(y){return typeof y=="boolean"?y:xe(y).toNumber()!==0}function Te(y){const S=xe(y),C=S.toString(16);return S.isLessThan(0)?"-0x"+C.substr(1):"0x"+C}function we(y){if(G(y))return Te(+y);if(M(y))return Te(y);if(E(y)){const S=y;if(S.indexOf("-0x")===0)return Te(S);if(S.indexOf("0x")===0)return S;if(!isFinite(S))return x(U(S))}if(y instanceof Uint8Array)return"0x"+x(y);if(de(y)||I(y))throw new Error("toHex can only be called with scalar values, not objects or arrays");return Te(y)}function Fe(y){const S=y?y.toLowerCase():"ether",C=D[S];if(C===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 Y(C,10)}function xe(y){let S=y||0;return M(S)?S:(typeof S=="string"&&(S=S.trim()),typeof S!="string"||S.indexOf("0x")!==0&&S.indexOf("-0x")!==0?S instanceof Uint8Array?new Y(x(S),16):new Y(S,10):new Y(S.replace("0x","").toLowerCase(),16))}function tt(y){return new Y(new Array(y).fill("1").join(""),2)}function Xe(y,S=256){const C=xe(y).integerValue();return C.isLessThan(0)?tt(S).plus(C).plus(1):C}function ut(y,S){return $(y.toString(2),S,"0")[0]==="1"}function $t(y){if(typeof y!="string")throw ne("invalid address",se,{arg:"address",value:y});if(y.trim().match(/^(0x)?[0-9a-fA-F]{40}$/))return y.trim().substring(0,2)!=="0x"&&(y="0x"+y),nr(y);throw ne("invalid address",se,{arg:"address",value:y})}function vt(y,S=256){if(ut(y,S)){const C=tt(S);return y.minus(C).minus(1)}return y}function zt(y){return/^0x[0-9a-f]{40}$/i.test(y)}function bt(y){return!!/^(0x)?[0-9a-f]{40}$/i.test(y)&&(!(!/^(0x)?[0-9a-f]{40}$/.test(y)&&!/^(0x)?[0-9A-F]{40}$/.test(y))||rr(y))}function rr(y){const S=y.replace("0x",""),C=L(S.toLowerCase());for(let K=0;K<40;K++)if(parseInt(C[K],16)>7&&S[K].toUpperCase()!==S[K]||parseInt(C[K],16)<=7&&S[K].toLowerCase()!==S[K])return!1;return!0}function nr(y){if(y===void 0)return"";const S=y.toLowerCase().replace("0x",""),C=L(S);let K="0x";for(let ee=0;ee<S.length;ee++)parseInt(C[ee],16)>7?K+=S[ee].toUpperCase():K+=S[ee];return K}function ht(y){if(!Array.isArray(y))throw new Error(`Value was not an array: ${JSON.stringify(y)}`);return y}function wr(y){return zt(y)?y:/^[0-9a-f]{40}$/.test(y)?"0x"+y:"0x"+$(we(y).substr(2),40)}function M(y){return y instanceof Y}function E(y){return typeof y=="string"||y&&y.constructor&&y.constructor.name==="String"}function I(y){return y!==null&&!Array.isArray(y)&&typeof y=="object"}function G(y){return typeof y=="boolean"}function de(y){return Array.isArray(y)}var ge,be;function Qe(y,S){if(!y)throw new Error("jsonrpc method should be specified!");if(typeof y!="string")throw new Error(`jsonrpc must be a string, got ${typeof y}!`);return r.messageId++,{jsonrpc:"2.0",id:r.messageId,method:y,params:S||[]}}function Pt(y){return Array.isArray(y)?y.every(S):S(y);function S(C){return!!C&&(C.error===void 0||C.error===null)&&C.jsonrpc==="2.0"&&C.id!==null&&"result"in C&&C.result!==void 0}}r.TransactionStatus=void 0,(ge=r.TransactionStatus||(r.TransactionStatus={})).pending="pending",ge.confirmed="confirmed",ge.failed="failed",r.TransactionType=void 0,(be=r.TransactionType||(r.TransactionType={})).queued="queued",be.dropped="dropped",be.replaced="replaced",be.pending="pending",be.reverted="reverted",be.confirmed="confirmed",r.messageId=0;function Tt(y){return xe(y)}function Ct(y){return y==="latest"||y==="pending"||y==="earliest"}function nt(y){return y===void 0?"latest":Wt(y)}function Wt(y){return y==null?null:Ct(y)?y:we(y)}function fd(y){return y.from&&(y.from=vr(y.from)),y.to&&(y.to=vr(y.to)),y.gasPrice!==void 0&&(y.gasPrice=Te(y.gasPrice)),y.gas!==void 0&&(y.gas=Te(y.gas)),y.value!==void 0&&(y.value=Te(y.value)),y.nonce!==void 0&&(y.nonce=Te(y.nonce)),y.data&&!y.data.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(y.data)&&(y.data="0x"+y.data),y}function Oa(y){if(typeof y!="string")throw new Error("The provided input for transactionId is not a string, got: "+JSON.stringify(y));if(y.indexOf("0x")!==0)throw new Error("TransactionID must start with 0x, got: "+JSON.stringify(y));if(y.length!==66)throw new Error("TransactionID must be a 32 byte hex, got: "+JSON.stringify(y));return y}function pd(y){if(typeof y!="object")throw new Error("Did not provide transaction options");if(!y.from)throw new Error('Missing "from" in transaction options');return y.from=vr(y.from),y.to&&(y.to=vr(y.to)),y.gasPrice!==void 0&&(y.gasPrice=Te(y.gasPrice)),y.gas!==void 0&&(y.gas=Te(y.gas)),y.value!==void 0&&(y.value=Te(y.value)),y.nonce!==void 0&&(y.nonce=Te(y.nonce)),y.data&&!y.data.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(y.data)&&(y.data="0x"+y.data),y}function Os(y){return y?(y.blockNumber!==null&&(y.blockNumber=Ie(y.blockNumber)),y.transactionIndex!==null&&(y.transactionIndex=Ie(y.transactionIndex)),y.nonce=Ie(y.nonce),y.gas=Ie(y.gas),y.gasPrice=xe(y.gasPrice),y.value=xe(y.value),y):null}function IE(y){return y?(y.blockNumber!==null&&(y.blockNumber=Ie(y.blockNumber)),y.transactionIndex!==null&&(y.transactionIndex=Ie(y.transactionIndex)),y.cumulativeGasUsed=Ie(y.cumulativeGasUsed),y.gasUsed=Ie(y.gasUsed),y.effectiveGasPrice!==void 0&&y.effectiveGasPrice!==null&&(y.effectiveGasPrice=Ie(y.effectiveGasPrice)),y.logs&&de(y.logs)&&(y.logs=y.logs.map((function(S){return su(S)}))),y.status=Ie(y.status||""),y):null}function Ns(y){return y?(y.gasLimit=Ie(y.gasLimit),y.gasUsed=Ie(y.gasUsed),y.size=Ie(y.size),y.timestamp=Ie(y.timestamp),y.number!==null&&(y.number=Ie(y.number)),y.difficulty=xe(y.difficulty),y.totalDifficulty=xe(y.totalDifficulty),de(y.transactions)&&y.transactions.forEach((function(S,C){E(S)||(y.transactions[C]=Os(S)||y.transactions[C])})),y):null}function su(y){return y&&(y.blockNumber&&(y.blockNumber=Ie(y.blockNumber)),y.transactionIndex&&(y.transactionIndex=Ie(y.transactionIndex)),y.logIndex&&(y.logIndex=Ie(y.logIndex)),y)}function vr(y){if(zt(y))return y;if(bt(y))return"0x"+y;throw new Error(`Invalid address: ${JSON.stringify(y)}`)}function RE(y){return y}function wE(y){return y&&(y.startingBlock=Ie(y.startingBlock),y.currentBlock=Ie(y.currentBlock),y.highestBlock=Ie(y.highestBlock),y.knownStates&&(y.knownStates=Ie(y.knownStates),y.pulledStates=Ie(y.pulledStates)),y)}function md(y){if(y===null)throw ne("cannot convert null value to array",se,{arg:"value",value:y});if(y instanceof Uint8Array)return new Uint8Array(y);if(typeof y=="string"){const S=y.match(/^(0x)?[0-9a-fA-F]*$/);if(!S)throw ne("invalid hexidecimal string",se,{arg:"value",value:y});if(S[1]!=="0x")throw ne("hex string must have 0x prefix",se,{arg:"value",value:y});(y=y.substring(2)).length%2&&(y="0"+y);const C=[];for(let K=0;K<y.length;K+=2)C.push(parseInt(y.substr(K,2),16));return new Uint8Array(C)}if((function(S){if(!S||parseInt(String(S.length))!==S.length||typeof S=="string")return!1;for(let C=0;C<S.length;C++){const K=S[C];if(K<0||K>=256||parseInt(String(K))!==K)return!1}return!0})(y))return new Uint8Array(y);throw ne("invalid arrayify value",void 0,{arg:"value",value:y,type:typeof y})}function AE(y,S,C){Object.defineProperty(y,S,{enumerable:!0,value:C,writable:!1})}const wD=new Y(-1),AD=new Y(0),OD=new Y(1),OE=new Y("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function NE(y){return(function(S,C){function K(ve){return new Error('unexpected character "'+S[ve]+'" at position '+ve+' in "'+S+'"')}const ee={type:"",name:"",state:{allowType:!0}};let oe=ee;for(let ve=0;ve<S.length;ve++){const Pe=S[ve];switch(Pe){case"(":if(!oe.state.allowParams)throw K(ve);oe.state.allowType=!1,oe.type=Ps(oe.type),oe.components=[{type:"",name:"",parent:oe,state:{allowType:!0}}],oe=oe.components[0];break;case")":delete oe.state,oe.name==="indexed"&&(oe.indexed=!0,oe.name=""),oe.type=Ps(oe.type);const He=oe;if(oe=oe.parent,!oe)throw K(ve);delete He.parent,oe.state.allowParams=!1,oe.state.allowName=!0,oe.state.allowArray=!0;break;case",":delete oe.state,oe.name==="indexed"&&(oe.indexed=!0,oe.name=""),oe.type=Ps(oe.type);const Ge={type:"",name:"",parent:oe.parent,state:{allowType:!0}};oe.parent.components.push(Ge),delete oe.parent,oe=Ge;break;case" ":oe.state.allowType&&oe.type!==""&&(oe.type=Ps(oe.type),delete oe.state.allowType,oe.state.allowName=!0,oe.state.allowParams=!0),oe.state.allowName&&oe.name!==""&&(oe.name==="indexed"?(oe.indexed=!0,oe.name=""):oe.state.allowName=!1);break;case"[":if(!oe.state.allowArray)throw K(ve);oe.type+=Pe,oe.state.allowArray=!1,oe.state.allowName=!1,oe.state.readArray=!0;break;case"]":if(!oe.state.readArray)throw K(ve);oe.type+=Pe,oe.state.readArray=!1,oe.state.allowArray=!0,oe.state.allowName=!0;break;default:if(oe.state.allowType)oe.type+=Pe,oe.state.allowParams=!0,oe.state.allowArray=!0;else if(oe.state.allowName)oe.name+=Pe,delete oe.state.allowArray;else{if(!oe.state.readArray)throw K(ve);oe.type+=Pe}}}if(oe.parent)throw new Error("unexpected eof");return delete ee.state,oe.name==="indexed"&&(oe.indexed=!0,oe.name=""),ee.type=Ps(ee.type),ee})(y)}function Ps(y){return y.match(/^uint($|[^1-9])/)?y="uint256"+y.substring(4):y.match(/^int($|[^1-9])/)&&(y="int256"+y.substring(3)),y}const ND=new RegExp(/^bytes([0-9]*)$/),PE=new RegExp(/^(u?int)([0-9]*)$/),PD=new RegExp(/^(.*)\[([0-9]*)\]$/),CD=function(y,S){const C=y.match(PE);return C&&parseInt(C[2])<=48?S.toNumber():S};class sn{constructor(S,C,K,ee="",oe){this.coerceFunc=S,this.name=C,this.type=K,this.localName=ee,this.dynamic=oe}}class MD extends sn{constructor(S){super(S.coerceFunc,S.name,S.type,void 0,S.dynamic),AE(this,"coder",S)}encode(S){return this.coder.encode(S)}decode(S,C){return this.coder.decode(S,C)}}class DD extends sn{constructor(S,C){super(S,"null","",C,!1)}encode(S){return md([])}decode(S,C){if(C>S.length)throw new Error("invalid null");return{consumed:0,value:this.coerceFunc("null",void 0)}}}function ou(y,S){return new Y(y.toString(2).substr(-S),2)}class CE extends sn{constructor(S,C,K,ee){const oe=(K?"int":"uint")+8*C;super(S,oe,oe,ee,!1),this.size=C,this.signed=K}encode(S){try{let C=xe(S);if(this.signed){let ee=ou(OE,8*this.size-1);if(C.gt(ee))throw new Error("out-of-bounds");if(ee=ee.plus(OD).multipliedBy(wD),C.lt(ee))throw new Error("out-of-bounds")}else if(C.lt(AD)||C.gt(ou(OE,8*this.size)))throw new Error("out-of-bounds");C=ou(Xe(C,8*this.size),8*this.size),this.signed&&(C=Xe(vt(C,8*this.size),256));const K=$(Xe(C).toString(16),64);if(K.indexOf("NaN")!==-1)throw ne("invalid number value, NaN",se,{arg:this.localName,coderType:this.name,value:S,v:C,twosComplement:Xe(C),twosComplement16:Xe(C).toString(16),pad:$(Xe(C).toString(16),64),size:this.size});return X(K)}catch(C){throw ne("invalid number value",se,{arg:this.localName,coderType:this.name,value:S,message:C.toString()})}}decode(S,C){if(S.length<C+32)throw ne("insufficient data for "+this.name+" type",se,{arg:this.localName,coderType:this.name,value:we(S.slice(C,C+32))});const K=32-this.size;let ee=new Y(x(S.slice(C+K,C+32)),16);return ee=this.signed?vt(ee,8*this.size):ou(ee,8*this.size),{consumed:32,value:this.coerceFunc(this.name,ee)}}}const Sn=new CE((function(y,S){return S}),32,!1,"none");class ME extends sn{constructor(S,C,K){const ee="bytes"+C;super(S,ee,ee,K,!1),this.length=C}encode(S){const C=new Uint8Array(32);try{if(typeof S=="string"&&S.length%2!=0)throw new Error("hex string cannot be odd-length");const K=md(S);if(K.length>this.length)throw new Error("incorrect data length");C.set(K)}catch(K){throw ne("invalid "+this.name+" value. Use hex strings or Uint8Array",se,{arg:this.localName,coderType:this.name,value:K.value||S,details:K.message})}return C}decode(S,C){if(S.length<C+32)throw ne("insufficient data for "+this.name+" type",se,{arg:this.localName,coderType:this.name,value:we(S.slice(C,C+32))});return{consumed:32,value:this.coerceFunc(this.name,S.slice(C,C+this.length))}}}function DE(y){const S=32*Math.ceil(y.length/32),C=new Uint8Array(S-y.length);return j(Sn.encode(y.length),y,C)}function jE(y,S,C){if(y.length<S+32)throw ne("insufficient data for dynamicBytes length",se,{arg:C,coderType:"dynamicBytes",value:we(y.slice(S,S+32))});let K=Sn.decode(y,S).value;try{K=K.toNumber()}catch(ee){throw ee("dynamic bytes count too large",se,{arg:C,coderType:"dynamicBytes",value:K.toString()})}if(y.length<S+32+K)throw ne("insufficient data for dynamicBytes type",se,{arg:C,coderType:"dynamicBytes",value:we(y.slice(S,S+32+K))});return{consumed:32+32*Math.ceil(K/32),value:y.slice(S+32,S+32+K)}}function uu(y){return 32*Math.ceil(y/32)}function LE(y,S){if(!Array.isArray(S)){if(!S||typeof S!="object")throw ne("invalid tuple value",se,{coderType:"tuple",value:S});{const He=[];y.forEach((function(Ge){He.push(S[Ge.localName])})),S=He}}if(y.length!==S.length)throw ne("types/value length mismatch",se,{coderType:"tuple",value:S});const C=[];y.forEach((function(He,Ge){C.push({dynamic:He.dynamic,value:He.encode(S[Ge])})}));let K=0,ee=0;C.forEach((function(He){He.dynamic?(K+=32,ee+=uu(He.value.length)):K+=uu(He.value.length)}));let oe=0,ve=K;const Pe=new Uint8Array(K+ee);return C.forEach((function(He){He.dynamic?(Pe.set(Sn.encode(ve),oe),oe+=32,Pe.set(He.value,ve),ve+=uu(He.value.length)):(Pe.set(He.value,oe),oe+=uu(He.value.length))})),Pe}class jD extends Array{}class LD extends sn{constructor(S,C,K,ee){super(S,"array",C.type+"["+(K>=0?K:"")+"]",ee,K===-1||C.dynamic),this.coder=C,this.length=K}encode(S){if(!Array.isArray(S))throw ne("expected array value",se,{arg:this.localName,coderType:"array",value:S});let C=this.length,K=new Uint8Array(0);C===-1&&(C=S.length,K=Sn.encode(C)),(function(oe,ve,Pe){if(Pe||(Pe=""),oe<ve)throw ne("missing argument"+Pe,"MISSING_ARGUMENT",{count:oe,expectedCount:ve});if(oe>ve)throw ne("too many arguments"+Pe,"UNEXPECTED_ARGUMENT",{count:oe,expectedCount:ve})})(C,S.length,"in coder array"+(this.localName?" "+this.localName:""));const ee=[];for(let oe=0;oe<S.length;oe++)ee.push(this.coder);return j(K,LE(ee,S))}decode(S,C){let K=0,ee=this.length;if(ee===-1){let Pe;try{Pe=Sn.decode(S,C)}catch(He){throw ne("insufficient data for dynamic array length",se,{arg:this.localName,coderType:"array",value:He.value})}try{ee=Pe.value.toNumber()}catch{throw ne("array count too large",se,{arg:this.localName,coderType:"array",value:Pe.value.toString()})}K+=Pe.consumed,C+=Pe.consumed}const oe=[];for(let Pe=0;Pe<ee;Pe++)oe.push(new MD(this.coder));const ve=(function(Pe,He,Ge){const cr=Ge;let qt=0;const De=[];return Pe.forEach((function(Kt){let It;if(Kt.dynamic){const Rt=Sn.decode(He,Ge);It=Kt.decode(He,cr+Rt.value.toNumber()),It.consumed=Rt.consumed}else It=Kt.decode(He,Ge);It.value!==void 0&&De.push(It.value),Ge+=It.consumed,qt+=It.consumed})),{value:De,consumed:qt}})(oe,S,C);return ve.consumed+=K,ve.value=this.coerceFunc(this.type,ve.value),ve}}class hd extends sn{constructor(S,C,K){let ee=!1;const oe=[];C.forEach((function(ve){ve.dynamic&&(ee=!0),oe.push(ve.type)})),super(S,"tuple","tuple("+oe.join(",")+")",K,ee),this.coders=C}encode(S){return LE(this.coders,S)}decode(S,C){const K=(function(ee,oe,ve){const Pe=ve;let He=0;const Ge=new jD;return ee.forEach((function(cr){let qt;if(cr.dynamic){const De=Sn.decode(oe,ve);qt=cr.decode(oe,Pe+De.value.toNumber()),qt.consumed=De.consumed}else qt=cr.decode(oe,ve);qt.value!==void 0&&Ge.push(qt.value),ve+=qt.consumed,He+=qt.consumed})),ee.forEach((function(cr,qt){let De=cr.localName;De&&(De==="length"&&(De="_length"),Ge[De]!==null&&Ge[De]!==void 0||(Ge[De]=Ge[qt]))})),{value:Ge,consumed:He}})(this.coders,S,C);return K.value=this.coerceFunc(this.type,K.value),K}}const $D={address:class extends sn{constructor(y,S){super(y,"address","address",S,!1)}encode(y){const S=new Uint8Array(32),C=y.trim();if(!bt(C))throw ne("invalid address format",se,{arg:this.localName,coderType:"address",value:y});try{S.set(X(vr(C)),12)}catch(K){throw ne(`invalid address (${K.message})`,se,{arg:this.localName,coderType:"address",value:y})}return S}decode(y,S){if(y.length<S+32)throw ne("insufficuent data for address type",se,{arg:this.localName,coderType:"address",value:we(y.slice(S,S+32)),missingBytes:S+32-y.length});return{consumed:32,value:this.coerceFunc("address",$t(we(y.slice(S+12,S+32))))}}},bool:class extends sn{constructor(y,S){super(y,"bool","bool",S,!1)}encode(y){return Sn.encode(y?1:0)}decode(y,S){try{const C=Sn.decode(y,S);return{consumed:C.consumed,value:this.coerceFunc("bool",!C.value.isZero())}}catch(C){throw C.reason==="insufficient data for uint256 type"?ne("insufficient data for boolean type",se,{arg:this.localName,coderType:"boolean",value:C.value}):C}}},string:class extends sn{constructor(y,S){super(y,"string","string",S,!0)}encode(y){if(typeof y!="string")throw ne("invalid string value",se,{arg:this.localName,coderType:"string",value:y});return DE(U(y))}decode(y,S){const C=jE(y,S,this.localName);return C.value=this.coerceFunc("string",F(C.value)),C}},bytes:class extends sn{constructor(y,S){super(y,"bytes","bytes",S,!0)}encode(y){try{return DE(md(y))}catch(S){throw S("invalid bytes value",se,{arg:this.localName,coderType:"bytes",value:S.value})}}decode(y,S){const C=jE(y,S,this.localName);return C.value=this.coerceFunc("bytes",C.value),C}},function:class extends ME{constructor(y,S){super(y,24,S)}}};function cu(y,S){const C=$D[S.type];if(C)return new C(y,S.name);let K=S.type.match(PE);if(K){const ee=parseInt(K[2]||"256");if(ee===0||ee>256||ee%8!=0)throw ne("invalid "+K[1]+" bit length",se,{arg:"param",value:S});return new CE(y,ee/8,K[1]==="int",S.name)}if(K=S.type.match(ND),K){const ee=parseInt(K[1]);if(ee===0||ee>32)throw ne("invalid bytes length",se,{arg:"param",value:S});return new ME(y,ee,S.name)}if(K=S.type.match(PD),K){const ee=Object.assign({},S),oe=parseInt(K[2]||"-1");return ee.type=K[1],new LD(y,cu(y,ee),oe,S.name)}if(S.type.substring(0,5)==="tuple")return(function(ee,oe,ve){oe||(oe=[]);const Pe=oe.map((He=>cu(ee,He)));return new hd(ee,Pe,ve)})(y,S.components,S.name);if(S.type==="")return new DD(y,S.name);throw ne("invalid type",se,{arg:"type",value:S.type,fullType:S})}class yd{constructor(S){(function(C,K){if(!(C instanceof K))throw ne("missing new","MISSING_NEW",{name:K.name})})(this,yd),S||(S=CD),AE(this,"coerceFunc",S)}encode(S,C){if(S.length!==C.length)throw ne("types/values length mismatch",se,{count:{types:S.length,values:C.length},value:{types:S,values:C}});const K=S.map((ee=>typeof ee=="string"?NE(ee):ee)).map((ee=>cu(this.coerceFunc,ee)));return new hd(this.coerceFunc,K,"_").encode(C)}decode(S,C){const K=S.map((ee=>typeof ee=="string"?NE(ee):ee)).map((ee=>cu(this.coerceFunc,ee)));return new hd(this.coerceFunc,K,"_").decode(C,0).value}}const $E=new yd;var qE,$e;function Be(y,S,C,K){var ee,oe=arguments.length,ve=oe<3?S:K;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ve=Reflect.decorate(y,S,C,K);else for(var Pe=y.length-1;Pe>=0;Pe--)(ee=y[Pe])&&(ve=(oe<3?ee(ve):oe>3?ee(S,C,ve):ee(S,C))||ve);return oe>3&&ve&&Object.defineProperty(S,C,ve),ve}function ke(y,S){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(y,S)}r.coder=void 0,(qE=r.coder||(r.coder={})).encodeParams=function(y,S){return x($E.encode(y,S))},qE.decodeParams=function(y,S){if(y.length>0&&(!S||S==="0x"||S==="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 $E.decode(y,X("0x"+S.replace(/0x/i,"")))},typeof SuppressedError=="function"&&SuppressedError;class ze{constructor(S){this.callName=S.callName,this.params=S.params||0,this.inputFormatter=S.inputFormatter||null,this.outputFormatter=S.outputFormatter}validateArgs(S){if(S.length!==this.params)throw C=this.callName,K=S.length,ee=this.params,new Error(`Invalid number of input parameters to RPC method "${C}" given: ${K}, expected: ${ee}`);var C,K,ee}formatInput(S){return this.inputFormatter?this.inputFormatter.map((function(C,K){return C?C(S[K]):S[K]})):S}formatOutput(S){return S!==null?this.outputFormatter(S):null}toPayload(S){const C=this.formatInput(S);return this.validateArgs(C),{method:this.callName,params:C}}async execute(S,...C){const K=this.toPayload(C);if(!S)throw new Error("Missing RequestManager in method#exec");const ee=await S.sendAsync(K);return this.formatOutput(ee)}}class br{constructor(S){this.getter=S.getter,this.outputFormatter=S.outputFormatter}formatOutput(S){return this.outputFormatter(S)}async execute(S,...C){const K=await S.sendAsync({method:this.getter,params:[]});return this.formatOutput(K)}}function BE(y){return new Promise((S=>setTimeout(S,y)))}r.eth=void 0,($e=r.eth||(r.eth={})).eth_getBalance=new ze({callName:"eth_getBalance",params:2,inputFormatter:[vr,nt],outputFormatter:Tt}),$e.eth_getStorageAt=new ze({callName:"eth_getStorageAt",params:3,inputFormatter:[vr,we,nt],outputFormatter:le}),$e.eth_getCode=new ze({callName:"eth_getCode",params:2,inputFormatter:[vr,nt],outputFormatter:le}),$e.eth_getBlockByHash=new ze({callName:"eth_getBlockByHash",params:2,inputFormatter:[Wt,function(y){return!!y}],outputFormatter:Ns}),$e.eth_getBlockByNumber=new ze({callName:"eth_getBlockByNumber",params:2,inputFormatter:[Wt,function(y){return!!y}],outputFormatter:Ns}),$e.eth_getUncleByBlockHashAndIndex=new ze({callName:"eth_getUncleByBlockHashAndIndex",params:2,inputFormatter:[Wt,we],outputFormatter:Ns}),$e.eth_getUncleByBlockNumberAndIndex=new ze({callName:"eth_getUncleByBlockNumberAndIndex",params:2,inputFormatter:[Wt,we],outputFormatter:Ns}),$e.eth_getBlockTransactionCountByHash=new ze({callName:"eth_getBlockTransactionCountByHash",params:1,inputFormatter:[Wt],outputFormatter:Ie}),$e.eth_getBlockTransactionCountByNumber=new ze({callName:"eth_getBlockTransactionCountByNumber",params:1,inputFormatter:[Wt],outputFormatter:Ie}),$e.eth_getUncleCountByBlockHash=new ze({callName:"eth_getUncleCountByBlockHash",params:1,inputFormatter:[Wt],outputFormatter:Ie}),$e.eth_getUncleCountByBlockNumber=new ze({callName:"eth_getUncleCountByBlockNumber",params:1,inputFormatter:[Wt],outputFormatter:Ie}),$e.eth_getTransactionByHash=new ze({callName:"eth_getTransactionByHash",params:1,inputFormatter:[Oa],outputFormatter:Os}),$e.eth_getTransactionByBlockHashAndIndex=new ze({callName:"eth_getTransactionByBlockHashAndIndex",params:2,inputFormatter:[Wt,we],outputFormatter:Os}),$e.eth_getTransactionByBlockNumberAndIndex=new ze({callName:"eth_getTransactionByBlockNumberAndIndex",params:2,inputFormatter:[Wt,we],outputFormatter:Os}),$e.eth_getTransactionReceipt=new ze({callName:"eth_getTransactionReceipt",params:1,inputFormatter:[Oa],outputFormatter:IE}),$e.eth_getTransactionCount=new ze({callName:"eth_getTransactionCount",params:2,inputFormatter:[vr,nt],outputFormatter:Ie}),$e.eth_sendRawTransaction=new ze({callName:"eth_sendRawTransaction",params:1,inputFormatter:[null],outputFormatter:le}),$e.web3_sha3=new ze({callName:"web3_sha3",params:1,inputFormatter:[null],outputFormatter:le}),$e.eth_sendTransaction=new ze({callName:"eth_sendTransaction",params:1,inputFormatter:[pd],outputFormatter:le}),$e.eth_sign=new ze({callName:"eth_sign",params:2,inputFormatter:[vr,null],outputFormatter:le}),$e.eth_call=new ze({callName:"eth_call",params:2,inputFormatter:[fd,nt],outputFormatter:le}),$e.eth_estimateGas=new ze({callName:"eth_estimateGas",params:1,inputFormatter:[fd],outputFormatter:Ie}),$e.eth_submitWork=new ze({callName:"eth_submitWork",params:3,inputFormatter:[null,null,null],outputFormatter:me}),$e.eth_getWork=new ze({callName:"eth_getWork",params:0,inputFormatter:[],outputFormatter:ht}),$e.eth_coinbase=new br({getter:"eth_coinbase",outputFormatter:wr}),$e.eth_mining=new br({getter:"eth_mining",outputFormatter:me}),$e.eth_hashrate=new br({getter:"eth_hashrate",outputFormatter:Ie}),$e.eth_syncing=new br({getter:"eth_syncing",outputFormatter:wE}),$e.eth_gasPrice=new br({getter:"eth_gasPrice",outputFormatter:Tt}),$e.eth_accounts=new br({getter:"eth_accounts",outputFormatter:ht}),$e.eth_blockNumber=new br({getter:"eth_blockNumber",outputFormatter:Ie}),$e.eth_protocolVersion=new br({getter:"eth_protocolVersion",outputFormatter:Ie}),$e.web3_clientVersion=new br({getter:"web3_clientVersion",outputFormatter:ie}),$e.net_version=new br({getter:"net_version",outputFormatter:ie}),$e.shh_version=new ze({callName:"shh_version",params:0,inputFormatter:[],outputFormatter:Ie}),$e.shh_post=new ze({callName:"shh_post",params:1,inputFormatter:[null],outputFormatter:me}),$e.personal_newAccount=new ze({callName:"personal_newAccount",params:1,inputFormatter:[null],outputFormatter:wr}),$e.personal_importRawKey=new ze({callName:"personal_importRawKey",params:2,inputFormatter:[null,null],outputFormatter:wr}),$e.personal_sign=new ze({callName:"personal_sign",params:3,inputFormatter:[fe,vr,null],outputFormatter:le}),$e.personal_ecRecover=new ze({callName:"personal_ecRecover",params:2,inputFormatter:[fe,null],outputFormatter:wr}),$e.personal_unlockAccount=new ze({callName:"personal_unlockAccount",params:3,inputFormatter:[vr,null,Se],outputFormatter:me}),$e.personal_sendTransaction=new ze({callName:"personal_sendTransaction",params:2,inputFormatter:[pd,null],outputFormatter:le}),$e.personal_lockAccount=new ze({callName:"personal_lockAccount",params:1,inputFormatter:[vr],outputFormatter:me}),$e.personal_listAccounts=new br({getter:"personal_listAccounts",outputFormatter:ht}),$e.net_listening=new br({getter:"net_listening",outputFormatter:me}),$e.net_peerCount=new br({getter:"net_peerCount",outputFormatter:Ie}),$e.eth_newFilter=new ze({callName:"eth_newFilter",params:1,inputFormatter:[RE],outputFormatter:we}),$e.eth_getLogs=new ze({callName:"eth_getLogs",params:1,inputFormatter:[ht],outputFormatter:ht}),$e.eth_newBlockFilter=new ze({callName:"eth_newBlockFilter",params:0,inputFormatter:[],outputFormatter:we}),$e.eth_newPendingTransactionFilter=new ze({callName:"eth_newPendingTransactionFilter",params:0,inputFormatter:[],outputFormatter:we}),$e.eth_uninstallFilter=new ze({callName:"eth_uninstallFilter",params:1,inputFormatter:[we],outputFormatter:me}),$e.eth_getFilterLogs=new ze({callName:"eth_getFilterLogs",params:1,inputFormatter:[we],outputFormatter:ht}),$e.eth_getFilterChanges=new ze({callName:"eth_getFilterChanges",params:1,inputFormatter:[we],outputFormatter:ht}),$e.eth_submitHashrate=new ze({callName:"eth_submitHashrate",params:2,inputFormatter:[null,null],outputFormatter:me}),$e.shh_newIdentity=new ze({callName:"shh_newIdentity",params:0,inputFormatter:[],outputFormatter:le}),$e.shh_hasIdentity=new ze({callName:"shh_hasIdentity",params:1,inputFormatter:[null],outputFormatter:me}),$e.shh_newGroup=new ze({callName:"shh_newGroup",params:0,inputFormatter:[],outputFormatter:le}),$e.shh_addToGroup=new ze({callName:"shh_addToGroup",params:1,inputFormatter:[null],outputFormatter:me}),$e.shh_newFilter=new ze({callName:"shh_newFilter",params:1,inputFormatter:[null],outputFormatter:we}),$e.shh_uninstallFilter=new ze({callName:"shh_uninstallFilter",params:1,inputFormatter:[null],outputFormatter:me}),$e.shh_getLogs=new ze({callName:"shh_getLogs",params:1,inputFormatter:[null],outputFormatter:ht}),$e.shh_getFilterMessages=new ze({callName:"shh_getFilterMessages",params:1,inputFormatter:[null],outputFormatter:ht}),$e.shh_getFilterChanges=new ze({callName:"shh_getFilterChanges",params:1,inputFormatter:[null],outputFormatter:ht}),$e.shh_getMessages=new ze({callName:"shh_getMessages",params:1,inputFormatter:[null],outputFormatter:ht});function Ue(y,S){const C=r.eth[S];if(!C)throw new Error(`Could not find the method/property named ${S.toString()}`);Object.defineProperty(y,S,{value:function(...K){return C.execute(this,...K)}})}class Le{constructor(S){this.provider=S,this.requests=new Map}async sendAsync(S){const C=await this.provider;if(!C)throw new Error("Provider not set or invalid");const K=Qe(S.method,S.params),ee=s();return this.requests.set(K.id,ee),C.sendAsync(K,((oe,ve)=>{this.requests.delete(K.id),oe?ee.reject(oe):Pt(ve)?ee.resolve(ve.result):ee.reject((function(Pe){const He=Pe&&Pe.error&&Pe.error.message?Pe.error.message:"Invalid JSON RPC response: "+JSON.stringify(Pe);return new Error(He)})(ve))})),ee}setProvider(S){this.provider=S}async getConfirmedTransaction(S){const C=await this.waitForCompletion(S);if(this.isFailure(C))throw new Error(`Transaction "${S}" failed`);return C}async waitForCompletion(S,C){const K=Oa(S);if(await this.isTxDropped(K,C)){const ee=await this.getTransactionAndReceipt(K);return Object.assign(Object.assign({},ee),{status:r.TransactionStatus.failed})}for(;;){const ee=await this.getTransactionAndReceipt(K);if(!this.isPending(ee)&&ee.receipt)return Object.assign(Object.assign({},ee),{status:this.isFailure(ee)?r.TransactionStatus.failed:r.TransactionStatus.confirmed});await BE(2e3)}}async getTransaction(S){let C,K=null;const ee=Oa(S);try{const ve=(await this.eth_accounts())[0];ve&&(K=await this.eth_getTransactionCount(ve,"latest"))}catch{K=null}try{if(C=await this.eth_getTransactionByHash(ee),C===null)return null}catch{return null}if(C.blockNumber===null){if(K!==null){if(C.nonce<K)return{hash:ee,type:r.TransactionType.replaced,nonce:C.nonce};if(C.nonce>K)return{hash:ee,type:r.TransactionType.queued,nonce:C.nonce}}return Object.assign({type:r.TransactionType.pending},C)}let oe;try{if(oe=await this.eth_getTransactionReceipt(ee),oe===null||oe.status===0)return Object.assign({type:r.TransactionType.reverted},C)}catch{return null}return Object.assign(Object.assign({type:r.TransactionType.confirmed},C),{receipt:oe})}async isTxDropped(S,C=15){let K=C;for(;K>0;){if(await this.getTransactionAndReceipt(S)!==null)return!1;K-=1,await BE(2e3)}return!0}async getTransactionAndReceipt(S){S=Oa(S);const[C,K]=await Promise.all([this.eth_getTransactionByHash(S),this.eth_getTransactionReceipt(S)]);return Object.assign(Object.assign({},C),{receipt:K})}isPending(S){return S&&S.blockNumber===null}isFailure(S){return S&&(!S.receipt||S.receipt.status===0)}}Be([Ue,ke("design:type",Function)],Le.prototype,"web3_clientVersion",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"web3_sha3",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"net_version",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"net_peerCount",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"net_listening",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"eth_protocolVersion",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"eth_syncing",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"eth_coinbase",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"eth_mining",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"eth_hashrate",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"eth_gasPrice",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"eth_accounts",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"eth_blockNumber",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"eth_getBalance",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"eth_getStorageAt",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"eth_getTransactionCount",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"eth_getBlockTransactionCountByHash",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"eth_getBlockTransactionCountByNumber",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"eth_getUncleCountByBlockHash",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"eth_getUncleCountByBlockNumber",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"eth_getCode",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"eth_sign",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"eth_sendTransaction",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"eth_sendRawTransaction",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"eth_call",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"eth_estimateGas",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"eth_getBlockByHash",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"eth_getBlockByNumber",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"eth_getTransactionByHash",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"eth_getTransactionByBlockHashAndIndex",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"eth_getTransactionByBlockNumberAndIndex",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"eth_getTransactionReceipt",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"eth_getUncleByBlockHashAndIndex",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"eth_getUncleByBlockNumberAndIndex",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"eth_newFilter",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"eth_newBlockFilter",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"eth_newPendingTransactionFilter",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"eth_uninstallFilter",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"eth_getFilterChanges",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"eth_getFilterLogs",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"eth_getLogs",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"eth_getWork",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"eth_submitWork",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"eth_submitHashrate",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"shh_post",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"shh_version",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"shh_newIdentity",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"shh_hasIdentity",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"shh_newGroup",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"shh_addToGroup",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"shh_newFilter",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"shh_uninstallFilter",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"shh_getFilterChanges",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"shh_getMessages",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"personal_unlockAccount",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"personal_newAccount",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"personal_listAccounts",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"personal_lockAccount",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"personal_importRawKey",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"personal_sendTransaction",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"personal_sign",void 0),Be([Ue,ke("design:type",Function)],Le.prototype,"personal_ecRecover",void 0);class kE{constructor(S){this.json=S,this._inputTypes=S.inputs||[],this._outputTypes=S.outputs||[],this._constant=!!S.constant,this._payable=!!S.payable||S.stateMutability==="payable",this.needsToBeTransaction=this._payable||"constant"in S&&!S.constant||S.stateMutability==="nonpayable",this._name=N(S)}extractDefaultBlock(S){return S.length>this._inputTypes.length&&!I(S[S.length-1])&&nt(S.pop())||"latest"}validateArgs(S){if(S.some((oe=>oe===void 0)))throw new Error("Invalid call, some arguments are undefined");const C=S.filter((function(oe){return!(I(oe)===!0&&de(oe)===!1&&M(oe)===!1&&!(oe instanceof Uint8Array))}));if(C.length!==this._inputTypes.length)throw K=C.length,ee=this._inputTypes.length,new Error(`Invalid number of arguments to Solidity function. given: ${K}, expected: ${ee}`);var K,ee}toPayload(S){let C={to:void 0,data:void 0,value:void 0,from:void 0};S.length>this._inputTypes.length&&I(S[S.length-1])&&(C=S.pop()),this.validateArgs(S);const K=this.signature();let ee=r.coder.encodeParams(this._inputTypes,S);return ee.indexOf("0x")===0&&(ee=ee.substr(2)),C.data="0x"+K+ee,C}signature(){return L(this._name).slice(0,8)}unpackOutput(S){if(!S)return;const C=S.length>=2?S.slice(2):S,K=r.coder.decodeParams(this._outputTypes,C);return K.length===1?K[0]:K}async execute(S,C,...K){if(!S)throw new Error(`Cannot call function ${this.displayName()} because there is no requestManager`);if(this.needsToBeTransaction){const ee=this.toPayload(K);if(ee.to=C,ee.value>0&&!this._payable)throw new Error("Cannot send value to non-payable function");if(!ee.from)throw new Error('Missing "from" in transaction options');return await S.eth_sendTransaction(ee)}{const ee=this.extractDefaultBlock(K),oe=this.toPayload(K);oe.to=C;const ve=await S.eth_call(oe,ee);return this.unpackOutput(ve)}}estimateGas(S,C,...K){if(!(S instanceof Le))throw new Error("estimateGas needs to receive a RequestManager as first argument");const ee=this.toPayload(K);return ee.to=C,S.eth_estimateGas(ee)}displayName(){return Ee(this._name)}typeName(){return _e(this._name)||"void"}attachToContract(S){const C=this.displayName(),K=Object.assign(((...ee)=>this.execute(S.requestManager,S.address,...ee)),{estimateGas:this.estimateGas.bind(this,S.requestManager,S.address),toPayload:(...ee)=>this.toPayload(ee),toRPCMessage:(...ee)=>{const oe=this.extractDefaultBlock(ee),ve=this.toPayload(ee);return ve.to=S.address,{method:"eth_call",params:[ve,oe]}},unpackOutput:ee=>this.unpackOutput(ee)});S[C]||(S[C]=K),S[C][this.typeName()]=K}}function UE(y){if(y==null)return null;const S=String(y).toString();return S.indexOf("0x")===0?S:x(U(S))}class gd{constructor(S){this.requestManager=S,this.isStarted=!1,this.isDisposed=!1,this.formatter=C=>C,this.filterId=s(),this.callbacks=[],this.stopSemaphore=s()}async watch(S){if(this.isDisposed)throw new Error("The filter was disposed");S&&(this.callbacks.push(S),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 S=await this.getNewFilter();if(!S)throw new Error("Could not create a filter, response: "+JSON.stringify(S));this.filterId.resolve(S)}catch(S){throw S}this.stopSemaphore=s(),await this.poll()}}async stop(){if(!this.isStarted||this.isDisposed)return;this.isDisposed=!0;const S=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: ${S}`)}async poll(){if(this.isStarted){if(this.callbacks.length){const C=await this.getChanges();C&&this.callbacks.forEach((K=>{this.formatter?C.forEach((ee=>{K(this.formatter(ee))})):C.forEach((ee=>K(ee)))}))}this.stopSemaphore.resolve(1),this.isStarted&&(this.stopSemaphore=s(),setTimeout((S=()=>this.poll(),function(){S().catch((C=>console.error(C)))}),500))}else this.stopSemaphore.resolve(1);var S}}class Cs extends gd{constructor(S,C,K=(ee=>ee)){super(S),this.requestManager=S,this.options=C,this.formatter=K,this.options=this.options||{},this.options.topics=this.options.topics||[],this.options.topics=this.options.topics.map((function(ee){return UE(ee)})),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"?Wt(this.options.fromBlock)||void 0:"latest",toBlock:typeof this.options.toBlock=="number"||typeof this.options.toBlock=="string"?Wt(this.options.toBlock)||void 0:"latest"}}async getLogs(){this.isStarted||await this.start();const S=await this.filterId;return this.requestManager.eth_getFilterLogs(S)}async getNewFilter(){return this.requestManager.eth_newFilter(this.options)}async getChanges(){const S=await this.filterId;return this.requestManager.eth_getFilterChanges(S)}async uninstall(){const S=await this.filterId;return this.requestManager.eth_uninstallFilter(S)}}class _d{constructor(S,C,K){this.requestManager=S,this.address=K,this._anonymous=!1,this._params=C.inputs||[],this._name=N(C),this._anonymous=C.anonymous||!1}types(S){return this._params.filter((function(C){return C.indexed===S}))}displayName(){return Ee(this._name)}typeName(){return _e(this._name)||"void"}signature(){return L(this._name)}encode(S={},C={}){const K={topics:[],address:this.address};C.fromBlock!==void 0&&(K.fromBlock=Wt(C.fromBlock)||void 0),C.toBlock!==void 0&&(K.toBlock=Wt(C.toBlock)||void 0),K.topics=K.topics||[],this._anonymous||K.topics.push("0x"+this.signature());const ee=this._params.filter((function(oe){return oe.indexed===!0})).map((function(oe){const ve=S[oe.name];return ve==null?null:de(ve)?ve.map((function(Pe){return"0x"+r.coder.encodeParams([oe],[Pe])})):"0x"+r.coder.encodeParams([oe],[ve])}));return K.topics=K.topics.concat(ee),K}decode(S){S.data=S.data||"",S.topics=S.topics||[];const C=(this._anonymous?S.topics:S.topics.slice(1)).map((function(Pe){return Pe.slice(2)})).join(""),K=r.coder.decodeParams(this.types(!0),C),ee=S.data.slice(2),oe=r.coder.decodeParams(this.types(!1),ee),ve=this._params.reduce((function(Pe,He){return Pe[He.name]=He.indexed?K.shift():oe.shift(),Pe}),{});return Object.assign(Object.assign({},su(S)),{event:this.displayName(),address:S.address,args:ve})}async execute(S,C){const K=this.encode(S,C),ee=this.decode.bind(this);return new Cs(this.requestManager,K,ee)}attachToContract(S){const C=this.execute.bind(this),K=this.displayName();S.events[K]||(S.events[K]=C),S.events[K][this.typeName()]=this.execute.bind(this,S)}}class qD{constructor(S,C,K){this._requestManager=S,this._json=C,this._address=K}encode(S={}){const C={address:this._address};return S.fromBlock!==void 0&&(C.fromBlock=Wt(S.fromBlock)||void 0),S.toBlock!==void 0&&(C.toBlock=Wt(S.toBlock)||void 0),C}decode(S){S.data=S.data||"";const C=de(S.topics)&&E(S.topics[0])?S.topics[0].slice(2):"",K=this._json.filter((function(ee){return C===L(N(ee))}))[0];return K?new _d(this._requestManager,K,this._address).decode(S):su(S)}async execute(S){const C=this.encode(S),K=this.decode.bind(this);return new Cs(this._requestManager,C,K)}getAllEventsFunction(){return this.execute.bind(this)}}class FE{constructor(S,C,K){var ee;this.requestManager=S,this.abi=C,this.address=K,this.events={},this.transactionHash=null,this.address=K,this.abi=C,(ee=this).abi.filter((function(oe){return oe.type==="function"})).map((function(oe){return new kE(oe)})).forEach((function(oe){oe.attachToContract(ee)})),this.allEvents=(function(oe){const ve=oe.abi.filter((function(He){return He.type==="event"})),Pe=new qD(oe.requestManager,ve,oe.address);return ve.map((function(He){return new _d(oe.requestManager,He,oe.address)})).forEach((function(He){He.attachToContract(oe)})),Pe.getAllEventsFunction()})(this)}}r.AbstractFilter=gd,r.BigNumber=Y,r.Contract=FE,r.ContractFactory=class{constructor(y,S){this.requestManager=y,this.abi=S}async deploy(...y){let S;const C=y[y.length-1];if(I(C)&&!de(C)&&(S=y.pop()),!S)throw new Error("Missing options object");if(!S.data||typeof S.data!="string")throw new Error("Invalid options.data");if(Ie(S.value)>0&&!(this.abi.filter((function(Ge){return Ge.type==="constructor"&&Ge.inputs.length===y.length}))[0]||{}).payable)throw new Error("Cannot send value to non-payable constructor");const K=(ee=this.abi,oe=y,ee.filter((function(Ge){return Ge.type==="constructor"&&Ge.inputs&&Ge.inputs.length===oe.length})).map((function(Ge){return Ge.inputs||[]})).map((function(Ge){return r.coder.encodeParams(Ge,oe)}))[0]||"");var ee,oe;S.data+=K,S.gas||(S.gas=await this.requestManager.eth_estimateGas(S));const ve=await this.requestManager.eth_sendTransaction(S);if(!ve)throw new Error("Error while sending contract creation transaction. A TxHash was not retrieved");const Pe=await(async function(Ge,cr){const qt=s();let De=0;const Kt=()=>{De++,De>50?qt.reject(new Error("Contract transaction couldn't be found after 50 blocks")):Ge.eth_getTransactionReceipt(cr).then((ir=>{ir&&ir.blockHash?qt.resolve(ir):setTimeout(Kt,1e3)}),(ir=>qt.reject(ir)))};Kt();const It=await qt,Rt=await Ge.eth_getCode(It.contractAddress,"latest");if(Rt&&Rt.length>3)return It.contractAddress;throw Object.assign(new Error("The contract code couldn't be stored, please check your gas amount."),{response:Rt,receipt:It})})(this.requestManager,ve),He=await this.at(Pe);return He.transactionHash=ve,He}async at(y){if(!bt(y))throw new TypeError(`Invalid address ${JSON.stringify(y)}`);return new FE(this.requestManager,this.abi,y)}},r.EthBlockFilter=class extends Cs{constructor(y){super(y,{})}async getNewFilter(){return this.requestManager.eth_newBlockFilter()}},r.EthFilter=Cs,r.EthPendingTransactionFilter=class extends Cs{constructor(y){super(y,{})}async getNewFilter(){return this.requestManager.eth_newPendingTransactionFilter()}},r.HTTPProvider=class{constructor(y,S={}){this.host=y,this.options=S,this.debug=!1,this.host=y||"http://localhost:8545"}send(){throw new Error("Sync requests are deprecated")}sendAsync(y,S){try{let C=null;C=y instanceof Array?y.map((oe=>n(oe))):n(y);const K=this.options.fetch||globalThis.fetch;if(K===void 0)throw new Error("There is no global fetch object nor it was provided. Please install and import isomorphic-fetch");const ee={body:JSON.stringify(C),method:"POST",headers:Object.assign(Object.assign({},this.options.headers),{"Content-Type":"application/json"})};this.debug&&console.log("SEND >> "+ee.body),K(this.host,ee).then((async oe=>{if(oe.ok){const ve=await oe.json();this.debug&&console.log("RECV << "+JSON.stringify(ve)),ve.error?S(Object.assign(new Error(ve.error.json||ve.error),ve.error)):S(null,ve)}else{const ve=(typeof oe.text=="function"?await oe.text().catch((()=>"")):"").trim().slice(0,512),Pe="External error. response code: "+oe.status+(ve?" — "+ve:"");this.debug&&console.log("ERR << "+Pe),S(new Error(Pe))}}),(oe=>{this.debug&&console.log("ERR << "+JSON.stringify(oe)),S(oe)}))}catch(C){this.debug&&console.log("ERR << "+JSON.stringify(C)),S(C)}}},r.Method=ze,r.Property=br,r.RequestManager=Le,r.SHHFilter=class extends gd{constructor(y,S){super(y),this.requestManager=y,this.options=S,this.options=this.options||{topics:[]},this.options.topics=this.options.topics||[],this.options.topics=this.options.topics.map((function(C){return UE(C)})),this.options={topics:this.options.topics,to:this.options.to}}async getMessages(){const y=await this.filterId;return this.requestManager.shh_getMessages(y)}async getNewFilter(){return this.requestManager.shh_newFilter(this.options)}async getChanges(){const y=await this.filterId;return this.requestManager.shh_getFilterChanges(y)}async uninstall(){const y=await this.filterId;return this.requestManager.shh_uninstallFilter(y)}},r.SolidityEvent=_d,r.SolidityFunction=kE,r.WebSocketProvider=class{constructor(y,S={}){this.url=y,this.options=S,this.isDisposed=!1,this.responseCallbacks=new Map,this.notificationCallbacks=new Set,this.debug=!1,this.lastChunk="",this.connect()}dispose(){this.isDisposed=!0;const y=this.connection;this.timeout(new Error("Provider disposed.")),y.then((S=>S.close())).catch((S=>{this.debug&&console.error(S)}))}send(){throw new Error("Sync requests are deprecated")}sendAsync(y,S){const C=[];let K;if(y instanceof Array)K=Promise.all(y.map((ee=>{const oe=s();try{const ve=n(ee);C.push(ve),this.responseCallbacks.set(ve.id,oe)}catch(ve){oe.reject(ve)}return oe})));else{const ee=s();try{const oe=n(y);C.push(oe),this.responseCallbacks.set(oe.id,ee)}catch(oe){ee.reject(oe)}K=ee}K.then((ee=>S(null,ee)),(ee=>S(ee))),this.connection.then((ee=>{C.forEach((oe=>{const ve=JSON.stringify(oe);this.debug&&console.log("SEND >> "+ve),ee.send(ve)}))}),(ee=>{S(ee)}))}parseResponse(y){const S=[];return y.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach((C=>{let K=C;this.lastChunk&&(K=this.lastChunk+K);let ee=null;try{ee=JSON.parse(K)}catch{return this.lastChunk=K,clearTimeout(this.lastChunkTimeout),void(this.lastChunkTimeout=setTimeout((()=>{this.timeout()}),15e3))}clearTimeout(this.lastChunkTimeout),this.lastChunk="",ee&&S.push(ee)})),S}processMessage(y){if("id"in y){const S=y.id,C=this.responseCallbacks.get(S);if(!C)return void console.error("Error: Received a response for an unknown request",y);this.responseCallbacks.delete(S),y.error!==void 0&&y.error!==null?C.reject(Object.assign(new Error(y.error.message||y.error),y.error)):"result"in y&&C.resolve(y)}else this.notificationCallbacks.forEach((S=>S(null,y)))}timeout(y){this.connection&&this.connection.isPending||(this.connection=s());const S=y||new Error("Connection timeout");this.responseCallbacks.forEach((C=>C.reject(S))),this.responseCallbacks.clear(),this.isDisposed||setTimeout((()=>this.connect()),1e3)}connect(){this.connection&&!this.connection.isPending&&this.connection.then((C=>C.close())).catch((C=>{this.debug&&console.error(C)})),this.connection&&this.connection.isPending||(this.connection=s()),this.lastChunk="";const y=this.options.WebSocketConstructor||(typeof WebSocket<"u"?WebSocket:void 0);if(!y)throw new Error("Please provide a WebSocketConstructor");const S=new y(this.url,this.options.protocol);S.onopen=()=>{this.connection.resolve(S)},S.onerror=C=>{const K=new Error("Error in web socket");K.data=C,this.timeout(K)},S.onclose=C=>{this.timeout(new Error(`Connection closed (${C&&C.reason||"Unknown reason"})`))},S.onmessage=C=>{const K=typeof C.data=="string"?C.data:"";this.debug&&console.log("RECV << "+C.data),this.parseResponse(K).forEach((ee=>{ee instanceof Array?ee.forEach((oe=>this.processMessage(oe))):this.processMessage(ee)}))}}},r.bytesToHex=x,r.bytesToUtf8String=F,r.concatBytes=j,r.default=Le,r.extractDisplayName=Ee,r.extractTypeName=_e,r.fromAscii=function(y,S=0){let C="";for(let K=0;K<y.length;K++){const ee=y.charCodeAt(K).toString(16);C+=ee.length<2?"0"+ee:ee}return"0x"+C.padEnd(S,"0")},r.fromDecimal=Te,r.fromTwosComplement=vt,r.fromWei=function(y,S){const C=xe(y).dividedBy(Fe(S));return M(y)?C:C.toString(10)},r.getAddress=$t,r.getValueOfUnit=Fe,r.hexToBytes=X,r.inputAddressFormatter=vr,r.inputBlockNumberFormatter=Wt,r.inputCallFormatter=fd,r.inputDefaultBlockNumberFormatter=nt,r.inputFilterOptions=RE,r.inputPostFormatter=function(y){return y?(y.ttl=Te(y.ttl),y.workToProve=Te(y.workToProve),y.priority=Te(y.priority),de(y.topics)||(y.topics=y.topics?[y.topics]:[]),y.topics=y.topics.map((function(S){return S.indexOf("0x")===0?S:"0x"+x(U(S))})),y):null},r.inputTransactionFormatter=pd,r.inputTransactionId=Oa,r.isAddress=bt,r.isArray=de,r.isBigNumber=M,r.isBloom=function(y){return!!/^(0x)?[0-9a-f]{512}$/i.test(y)&&!!/^(0x)?[0-9a-f]{512}$/i.test(y)},r.isBoolean=G,r.isChecksumAddress=rr,r.isFunction=function(y){return typeof y=="function"},r.isHex=function(y){return typeof y=="string"&&/^0x[0-9a-fA-F]+$/.test(y)},r.isJson=function(y){try{return!!JSON.parse(y)}catch{return!1}},r.isObject=I,r.isPredefinedBlockNumber=Ct,r.isStrictAddress=zt,r.isString=E,r.isTopic=function(y){return!!/^(0x)?[0-9a-f]{64}$/i.test(y)&&!!/^(0x)?[0-9a-f]{64}$/i.test(y)},r.isValidResponse=Pt,r.outputBigNumberFormatter=Tt,r.outputBlockFormatter=Ns,r.outputLogFormatter=su,r.outputPostFormatter=function(y){return y?(y.expiry=Ie(y.expiry),y.sent=Ie(y.sent),y.ttl=Ie(y.ttl),y.workProved=Ie(y.workProved),y.topics||(y.topics=[]),y.topics=y.topics.map((function(S){return V(S)})),y):null},r.outputSyncingFormatter=wE,r.outputTransactionFormatter=Os,r.outputTransactionReceiptFormatter=IE,r.padLeft=$,r.padRight=function(y,S,C){return y+new Array(S-y.length+1).join(C||"0")},r.sha3=L,r.signedIsNegative=ut,r.stringToUtf8Bytes=U,r.toAddress=wr,r.toArray=ht,r.toAscii=V,r.toBatchPayload=function(y){return y.map((function(S){return Qe(S.method,S.params)}))},r.toBigNumber=xe,r.toBoolean=me,r.toChecksumAddress=nr,r.toData=le,r.toDecimal=Ie,r.toHex=we,r.toJsonRpcRequest=Qe,r.toNullDecimal=Se,r.toString=ie,r.toStringData=fe,r.toTwosComplement=Xe,r.toWei=function(y,S){const C=xe(y).times(Fe(S));return M(y)?C:C.toString(10)},r.transformToFullName=N,Object.defineProperty(r,"__esModule",{value:!0})}))})(So,So.exports)),So.exports}var nl={},JI;function KH(){if(JI)return nl;JI=1,Object.defineProperty(nl,"__esModule",{value:!0}),nl.SignatureValidator=t;const e=td();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 nl}var fn={},xp={},Kp={},Mi={},Cn={},Yt={},QI;function Q_(){if(QI)return Yt;QI=1,Object.defineProperty(Yt,"__esModule",{value:!0}),Yt.output=Yt.exists=Yt.hash=Yt.bytes=Yt.bool=Yt.number=Yt.isBytes=void 0;function e(u){if(!Number.isSafeInteger(u)||u<0)throw new Error(`positive integer expected, not ${u}`)}Yt.number=e;function t(u){if(typeof u!="boolean")throw new Error(`boolean expected, not ${u}`)}Yt.bool=t;function r(u){return u instanceof Uint8Array||u!=null&&typeof u=="object"&&u.constructor.name==="Uint8Array"}Yt.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}`)}Yt.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)}Yt.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")}Yt.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}`)}Yt.output=s;const o={number:e,bool:t,bytes:n,hash:i,exists:a,output:s};return Yt.default=o,Yt}var Xp={},Hs={},ZI;function XH(){return ZI||(ZI=1,Object.defineProperty(Hs,"__esModule",{value:!0}),Hs.crypto=void 0,Hs.crypto=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0),Hs}var e1;function tu(){return e1||(e1=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=XH(),r=Q_();function n(W){return W instanceof Uint8Array||W!=null&&typeof W=="object"&&W.constructor.name==="Uint8Array"}e.isBytes=n;const i=W=>new Uint8Array(W.buffer,W.byteOffset,W.byteLength);e.u8=i;const a=W=>new Uint32Array(W.buffer,W.byteOffset,Math.floor(W.byteLength/4));e.u32=a;const s=W=>new DataView(W.buffer,W.byteOffset,W.byteLength);e.createView=s;const o=(W,U)=>W<<32-U|W>>>U;e.rotr=o;const u=(W,U)=>W<<U|W>>>32-U>>>0;e.rotl=u,e.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;const l=W=>W<<24&4278190080|W<<8&16711680|W>>>8&65280|W>>>24&255;e.byteSwap=l,e.byteSwapIfBE=e.isLE?W=>W:W=>(0,e.byteSwap)(W);function c(W){for(let U=0;U<W.length;U++)W[U]=(0,e.byteSwap)(W[U])}e.byteSwap32=c;const d=Array.from({length:256},(W,U)=>U.toString(16).padStart(2,"0"));function p(W){(0,r.bytes)(W);let U="";for(let F=0;F<W.length;F++)U+=d[W[F]];return U}e.bytesToHex=p;const f={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function _(W){if(W>=f._0&&W<=f._9)return W-f._0;if(W>=f._A&&W<=f._F)return W-(f._A-10);if(W>=f._a&&W<=f._f)return W-(f._a-10)}function R(W){if(typeof W!="string")throw new Error("hex string expected, got "+typeof W);const U=W.length,F=U/2;if(U%2)throw new Error("padded hex string expected, got unpadded hex of length "+U);const ce=new Uint8Array(F);for(let se=0,ne=0;se<F;se++,ne+=2){const X=_(W.charCodeAt(ne)),x=_(W.charCodeAt(ne+1));if(X===void 0||x===void 0){const L=W[ne]+W[ne+1];throw new Error('hex string expected, got non-hex character "'+L+'" at index '+ne)}ce[se]=X*16+x}return ce}e.hexToBytes=R;const w=async()=>{};e.nextTick=w;async function O(W,U,F){let ce=Date.now();for(let se=0;se<W;se++){F(se);const ne=Date.now()-ce;ne>=0&&ne<U||(await(0,e.nextTick)(),ce+=ne)}}e.asyncLoop=O;function h(W){if(typeof W!="string")throw new Error(`utf8ToBytes expected string, got ${typeof W}`);return new Uint8Array(new TextEncoder().encode(W))}e.utf8ToBytes=h;function T(W){return typeof W=="string"&&(W=h(W)),(0,r.bytes)(W),W}e.toBytes=T;function b(...W){let U=0;for(let ce=0;ce<W.length;ce++){const se=W[ce];(0,r.bytes)(se),U+=se.length}const F=new Uint8Array(U);for(let ce=0,se=0;ce<W.length;ce++){const ne=W[ce];F.set(ne,se),se+=ne.length}return F}e.concatBytes=b;class m{clone(){return this._cloneInto()}}e.Hash=m;const v={}.toString;function A(W,U){if(U!==void 0&&v.call(U)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(W,U)}e.checkOpts=A;function P(W){const U=ce=>W().update(T(ce)).digest(),F=W();return U.outputLen=F.outputLen,U.blockLen=F.blockLen,U.create=()=>W(),U}e.wrapConstructor=P;function q(W){const U=(ce,se)=>W(se).update(T(ce)).digest(),F=W({});return U.outputLen=F.outputLen,U.blockLen=F.blockLen,U.create=ce=>W(ce),U}e.wrapConstructorWithOpts=q;function z(W){const U=(ce,se)=>W(se).update(T(ce)).digest(),F=W({});return U.outputLen=F.outputLen,U.blockLen=F.blockLen,U.create=ce=>W(ce),U}e.wrapXOFConstructorWithOpts=z;function Y(W=32){if(t.crypto&&typeof t.crypto.getRandomValues=="function")return t.crypto.getRandomValues(new Uint8Array(W));throw new Error("crypto.getRandomValues must be defined")}e.randomBytes=Y})(Xp)),Xp}var t1;function JH(){if(t1)return Cn;t1=1,Object.defineProperty(Cn,"__esModule",{value:!0}),Cn.HashMD=Cn.Maj=Cn.Chi=void 0;const e=Q_(),t=tu();function r(s,o,u,l){if(typeof s.setBigUint64=="function")return s.setBigUint64(o,u,l);const c=BigInt(32),d=BigInt(4294967295),p=Number(u>>c&d),f=Number(u&d),_=l?4:0,R=l?0:4;s.setUint32(o+_,p,l),s.setUint32(o+R,f,l)}const n=(s,o,u)=>s&o^~s&u;Cn.Chi=n;const i=(s,o,u)=>s&o^s&u^o&u;Cn.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 p=0;p<d;){const f=Math.min(c-this.pos,d-p);if(f===c){const _=(0,t.createView)(o);for(;c<=d-p;p+=c)this.process(_,p);continue}l.set(o.subarray(p,p+f),this.pos),this.pos+=f,p+=f,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:p}=this;u[p++]=128,this.buffer.subarray(p).fill(0),this.padOffset>c-p&&(this.process(l,0),p=0);for(let O=p;O<c;O++)u[O]=0;r(l,c-8,BigInt(this.length*8),d),this.process(l,0);const f=(0,t.createView)(o),_=this.outputLen;if(_%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const R=_/4,w=this.get();if(R>w.length)throw new Error("_sha2: outputLen bigger than state");for(let O=0;O<R;O++)f.setUint32(4*O,w[O],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:p,pos:f}=this;return o.length=c,o.pos=f,o.finished=d,o.destroyed=p,c%u&&o.buffer.set(l),o}}return Cn.HashMD=a,Cn}var r1;function QH(){if(r1)return Mi;r1=1,Object.defineProperty(Mi,"__esModule",{value:!0}),Mi.sha224=Mi.sha256=void 0;const e=JH(),t=tu(),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:p,F:f,G:_,H:R}=this;return[u,l,c,d,p,f,_,R]}set(u,l,c,d,p,f,_,R){this.A=u|0,this.B=l|0,this.C=c|0,this.D=d|0,this.E=p|0,this.F=f|0,this.G=_|0,this.H=R|0}process(u,l){for(let h=0;h<16;h++,l+=4)i[h]=u.getUint32(l,!1);for(let h=16;h<64;h++){const T=i[h-15],b=i[h-2],m=(0,t.rotr)(T,7)^(0,t.rotr)(T,18)^T>>>3,v=(0,t.rotr)(b,17)^(0,t.rotr)(b,19)^b>>>10;i[h]=v+i[h-7]+m+i[h-16]|0}let{A:c,B:d,C:p,D:f,E:_,F:R,G:w,H:O}=this;for(let h=0;h<64;h++){const T=(0,t.rotr)(_,6)^(0,t.rotr)(_,11)^(0,t.rotr)(_,25),b=O+T+(0,e.Chi)(_,R,w)+r[h]+i[h]|0,v=((0,t.rotr)(c,2)^(0,t.rotr)(c,13)^(0,t.rotr)(c,22))+(0,e.Maj)(c,d,p)|0;O=w,w=R,R=_,_=f+b|0,f=p,p=d,d=c,c=b+v|0}c=c+this.A|0,d=d+this.B|0,p=p+this.C|0,f=f+this.D|0,_=_+this.E|0,R=R+this.F|0,w=w+this.G|0,O=O+this.H|0,this.set(c,d,p,f,_,R,w,O)}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 Mi.sha256=(0,t.wrapConstructor)(()=>new a),Mi.sha224=(0,t.wrapConstructor)(()=>new s),Mi}var Vs={},Jp={},n1;function ZH(){return n1||(n1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.hmac=e.HMAC=void 0;const t=Q_(),r=tu();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:p}=this;return s=s,s.finished=l,s.destroyed=c,s.blockLen=d,s.outputLen=p,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)})(Jp)),Jp}var Qp={},Gs={},Lt={},Mt={},i1;function ls(){if(i1)return Mt;i1=1,Object.defineProperty(Mt,"__esModule",{value:!0}),Mt.bitMask=void 0,Mt.isBytes=n,Mt.abytes=i,Mt.bytesToHex=s,Mt.numberToHexUnpadded=o,Mt.hexToNumber=u,Mt.hexToBytes=d,Mt.bytesToNumberBE=p,Mt.bytesToNumberLE=f,Mt.numberToBytesBE=_,Mt.numberToBytesLE=R,Mt.numberToVarBytesBE=w,Mt.ensureBytes=O,Mt.concatBytes=h,Mt.equalBytes=T,Mt.utf8ToBytes=b,Mt.bitLen=m,Mt.bitGet=v,Mt.bitSet=A,Mt.createHmacDrbg=Y,Mt.validateObject=U;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const e=BigInt(0),t=BigInt(1),r=BigInt(2);function n(F){return F instanceof Uint8Array||F!=null&&typeof F=="object"&&F.constructor.name==="Uint8Array"}function i(F){if(!n(F))throw new Error("Uint8Array expected")}const a=Array.from({length:256},(F,ce)=>ce.toString(16).padStart(2,"0"));function s(F){i(F);let ce="";for(let se=0;se<F.length;se++)ce+=a[F[se]];return ce}function o(F){const ce=F.toString(16);return ce.length&1?`0${ce}`:ce}function u(F){if(typeof F!="string")throw new Error("hex string expected, got "+typeof F);return BigInt(F===""?"0":`0x${F}`)}const l={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function c(F){if(F>=l._0&&F<=l._9)return F-l._0;if(F>=l._A&&F<=l._F)return F-(l._A-10);if(F>=l._a&&F<=l._f)return F-(l._a-10)}function d(F){if(typeof F!="string")throw new Error("hex string expected, got "+typeof F);const ce=F.length,se=ce/2;if(ce%2)throw new Error("padded hex string expected, got unpadded hex of length "+ce);const ne=new Uint8Array(se);for(let X=0,x=0;X<se;X++,x+=2){const L=c(F.charCodeAt(x)),D=c(F.charCodeAt(x+1));if(L===void 0||D===void 0){const $=F[x]+F[x+1];throw new Error('hex string expected, got non-hex character "'+$+'" at index '+x)}ne[X]=L*16+D}return ne}function p(F){return u(s(F))}function f(F){return i(F),u(s(Uint8Array.from(F).reverse()))}function _(F,ce){return d(F.toString(16).padStart(ce*2,"0"))}function R(F,ce){return _(F,ce).reverse()}function w(F){return d(o(F))}function O(F,ce,se){let ne;if(typeof ce=="string")try{ne=d(ce)}catch(x){throw new Error(`${F} must be valid hex string, got "${ce}". Cause: ${x}`)}else if(n(ce))ne=Uint8Array.from(ce);else throw new Error(`${F} must be hex string or Uint8Array`);const X=ne.length;if(typeof se=="number"&&X!==se)throw new Error(`${F} expected ${se} bytes, got ${X}`);return ne}function h(...F){let ce=0;for(let ne=0;ne<F.length;ne++){const X=F[ne];i(X),ce+=X.length}const se=new Uint8Array(ce);for(let ne=0,X=0;ne<F.length;ne++){const x=F[ne];se.set(x,X),X+=x.length}return se}function T(F,ce){if(F.length!==ce.length)return!1;let se=0;for(let ne=0;ne<F.length;ne++)se|=F[ne]^ce[ne];return se===0}function b(F){if(typeof F!="string")throw new Error(`utf8ToBytes expected string, got ${typeof F}`);return new Uint8Array(new TextEncoder().encode(F))}function m(F){let ce;for(ce=0;F>e;F>>=t,ce+=1);return ce}function v(F,ce){return F>>BigInt(ce)&t}function A(F,ce,se){return F|(se?t:e)<<BigInt(ce)}const P=F=>(r<<BigInt(F-1))-t;Mt.bitMask=P;const q=F=>new Uint8Array(F),z=F=>Uint8Array.from(F);function Y(F,ce,se){if(typeof F!="number"||F<2)throw new Error("hashLen must be a number");if(typeof ce!="number"||ce<2)throw new Error("qByteLen must be a number");if(typeof se!="function")throw new Error("hmacFn must be a function");let ne=q(F),X=q(F),x=0;const L=()=>{ne.fill(1),X.fill(0),x=0},D=(...j)=>se(X,ne,...j),$=(j=q())=>{X=D(z([0]),j),ne=D(),j.length!==0&&(X=D(z([1]),j),ne=D())},V=()=>{if(x++>=1e3)throw new Error("drbg: tried 1000 values");let j=0;const Z=[];for(;j<ce;){ne=D();const Ee=ne.slice();Z.push(Ee),j+=ne.length}return h(...Z)};return(j,Z)=>{L(),$(j);let Ee;for(;!(Ee=Z(V()));)$();return L(),Ee}}const W={bigint:F=>typeof F=="bigint",function:F=>typeof F=="function",boolean:F=>typeof F=="boolean",string:F=>typeof F=="string",stringOrUint8Array:F=>typeof F=="string"||n(F),isSafeInteger:F=>Number.isSafeInteger(F),array:F=>Array.isArray(F),field:(F,ce)=>ce.Fp.isValid(F),hash:F=>typeof F=="function"&&Number.isSafeInteger(F.outputLen)};function U(F,ce,se={}){const ne=(X,x,L)=>{const D=W[x];if(typeof D!="function")throw new Error(`Invalid validator "${x}", expected function`);const $=F[X];if(!(L&&$===void 0)&&!D($,F))throw new Error(`Invalid param ${String(X)}=${$} (${typeof $}), expected ${x}`)};for(const[X,x]of Object.entries(ce))ne(X,x,!1);for(const[X,x]of Object.entries(se))ne(X,x,!0);return F}return Mt}var a1;function rd(){if(a1)return Lt;a1=1,Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.isNegativeLE=void 0,Lt.mod=u,Lt.pow=l,Lt.pow2=c,Lt.invert=d,Lt.tonelliShanks=p,Lt.FpSqrt=f,Lt.validateField=w,Lt.FpPow=O,Lt.FpInvertBatch=h,Lt.FpDiv=T,Lt.FpIsSquare=b,Lt.nLength=m,Lt.Field=v,Lt.FpSqrtOdd=A,Lt.FpSqrtEven=P,Lt.hashToPrivateScalar=q,Lt.getFieldBytesLength=z,Lt.getMinHashLength=Y,Lt.mapHashToField=W;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const e=ls(),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,F){const ce=U%F;return ce>=t?ce:F+ce}function l(U,F,ce){if(ce<=t||F<t)throw new Error("Expected power/modulo > 0");if(ce===r)return t;let se=r;for(;F>t;)F&r&&(se=se*U%ce),U=U*U%ce,F>>=r;return se}function c(U,F,ce){let se=U;for(;F-- >t;)se*=se,se%=ce;return se}function d(U,F){if(U===t||F<=t)throw new Error(`invert: expected positive integers, got n=${U} mod=${F}`);let ce=u(U,F),se=F,ne=t,X=r;for(;ce!==t;){const L=se/ce,D=se%ce,$=ne-X*L;se=ce,ce=D,ne=X,X=$}if(se!==r)throw new Error("invert: does not exist");return u(ne,F)}function p(U){const F=(U-r)/n;let ce,se,ne;for(ce=U-r,se=0;ce%n===t;ce/=n,se++);for(ne=n;ne<U&&l(ne,F,U)!==U-r;ne++);if(se===1){const x=(U+r)/a;return function(D,$){const V=D.pow($,x);if(!D.eql(D.sqr(V),$))throw new Error("Cannot find square root");return V}}const X=(ce+r)/n;return function(L,D){if(L.pow(D,F)===L.neg(L.ONE))throw new Error("Cannot find square root");let $=se,V=L.pow(L.mul(L.ONE,ne),ce),N=L.pow(D,X),j=L.pow(D,ce);for(;!L.eql(j,L.ONE);){if(L.eql(j,L.ZERO))return L.ZERO;let Z=1;for(let _e=L.sqr(j);Z<$&&!L.eql(_e,L.ONE);Z++)_e=L.sqr(_e);const Ee=L.pow(V,r<<BigInt($-Z-1));V=L.sqr(Ee),N=L.mul(N,Ee),j=L.mul(j,V),$=Z}return N}}function f(U){if(U%a===i){const F=(U+r)/a;return function(se,ne){const X=se.pow(ne,F);if(!se.eql(se.sqr(X),ne))throw new Error("Cannot find square root");return X}}if(U%o===s){const F=(U-s)/o;return function(se,ne){const X=se.mul(ne,n),x=se.pow(X,F),L=se.mul(ne,x),D=se.mul(se.mul(L,n),x),$=se.mul(L,se.sub(D,se.ONE));if(!se.eql(se.sqr($),ne))throw new Error("Cannot find square root");return $}}return p(U)}const _=(U,F)=>(u(U,F)&r)===r;Lt.isNegativeLE=_;const R=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function w(U){const F={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},ce=R.reduce((se,ne)=>(se[ne]="function",se),F);return(0,e.validateObject)(U,ce)}function O(U,F,ce){if(ce<t)throw new Error("Expected power > 0");if(ce===t)return U.ONE;if(ce===r)return F;let se=U.ONE,ne=F;for(;ce>t;)ce&r&&(se=U.mul(se,ne)),ne=U.sqr(ne),ce>>=r;return se}function h(U,F){const ce=new Array(F.length),se=F.reduce((X,x,L)=>U.is0(x)?X:(ce[L]=X,U.mul(X,x)),U.ONE),ne=U.inv(se);return F.reduceRight((X,x,L)=>U.is0(x)?X:(ce[L]=U.mul(X,ce[L]),U.mul(X,x)),ne),ce}function T(U,F,ce){return U.mul(F,typeof ce=="bigint"?d(ce,U.ORDER):U.inv(ce))}function b(U){const F=(U.ORDER-r)/n;return ce=>{const se=U.pow(ce,F);return U.eql(se,U.ZERO)||U.eql(se,U.ONE)}}function m(U,F){const ce=F!==void 0?F:U.toString(2).length,se=Math.ceil(ce/8);return{nBitLength:ce,nByteLength:se}}function v(U,F,ce=!1,se={}){if(U<=t)throw new Error(`Expected Field ORDER > 0, got ${U}`);const{nBitLength:ne,nByteLength:X}=m(U,F);if(X>2048)throw new Error("Field lengths over 2048 bytes are not supported");const x=f(U),L=Object.freeze({ORDER:U,BITS:ne,BYTES:X,MASK:(0,e.bitMask)(ne),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,$)=>D===$,sqr:D=>u(D*D,U),add:(D,$)=>u(D+$,U),sub:(D,$)=>u(D-$,U),mul:(D,$)=>u(D*$,U),pow:(D,$)=>O(L,D,$),div:(D,$)=>u(D*d($,U),U),sqrN:D=>D*D,addN:(D,$)=>D+$,subN:(D,$)=>D-$,mulN:(D,$)=>D*$,inv:D=>d(D,U),sqrt:se.sqrt||(D=>x(L,D)),invertBatch:D=>h(L,D),cmov:(D,$,V)=>V?$:D,toBytes:D=>ce?(0,e.numberToBytesLE)(D,X):(0,e.numberToBytesBE)(D,X),fromBytes:D=>{if(D.length!==X)throw new Error(`Fp.fromBytes: expected ${X}, got ${D.length}`);return ce?(0,e.bytesToNumberLE)(D):(0,e.bytesToNumberBE)(D)}});return Object.freeze(L)}function A(U,F){if(!U.isOdd)throw new Error("Field doesn't have isOdd");const ce=U.sqrt(F);return U.isOdd(ce)?ce:U.neg(ce)}function P(U,F){if(!U.isOdd)throw new Error("Field doesn't have isOdd");const ce=U.sqrt(F);return U.isOdd(ce)?U.neg(ce):ce}function q(U,F,ce=!1){U=(0,e.ensureBytes)("privateHash",U);const se=U.length,ne=m(F).nByteLength+8;if(ne<24||se<ne||se>1024)throw new Error(`hashToPrivateScalar: expected ${ne}-1024 bytes of input, got ${se}`);const X=ce?(0,e.bytesToNumberLE)(U):(0,e.bytesToNumberBE)(U);return u(X,F-r)+r}function z(U){if(typeof U!="bigint")throw new Error("field order must be bigint");const F=U.toString(2).length;return Math.ceil(F/8)}function Y(U){const F=z(U);return F+Math.ceil(F/2)}function W(U,F,ce=!1){const se=U.length,ne=z(F),X=Y(F);if(se<16||se<X||se>1024)throw new Error(`expected ${X}-1024 bytes of input, got ${se}`);const x=ce?(0,e.bytesToNumberBE)(U):(0,e.bytesToNumberLE)(U),L=u(x,F-r)+r;return ce?(0,e.numberToBytesLE)(L,ne):(0,e.numberToBytesBE)(L,ne)}return Lt}var s1;function eV(){if(s1)return Gs;s1=1,Object.defineProperty(Gs,"__esModule",{value:!0}),Gs.wNAF=i,Gs.validateBasic=a;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const e=rd(),t=ls(),r=BigInt(0),n=BigInt(1);function i(s,o){const u=(c,d)=>{const p=d.negate();return c?p:d},l=c=>{const d=Math.ceil(o/c)+1,p=2**(c-1);return{windows:d,windowSize:p}};return{constTimeNegate:u,unsafeLadder(c,d){let p=s.ZERO,f=c;for(;d>r;)d&n&&(p=p.add(f)),f=f.double(),d>>=n;return p},precomputeWindow(c,d){const{windows:p,windowSize:f}=l(d),_=[];let R=c,w=R;for(let O=0;O<p;O++){w=R,_.push(w);for(let h=1;h<f;h++)w=w.add(R),_.push(w);R=w.double()}return _},wNAF(c,d,p){const{windows:f,windowSize:_}=l(c);let R=s.ZERO,w=s.BASE;const O=BigInt(2**c-1),h=2**c,T=BigInt(c);for(let b=0;b<f;b++){const m=b*_;let v=Number(p&O);p>>=T,v>_&&(v-=h,p+=n);const A=m,P=m+Math.abs(v)-1,q=b%2!==0,z=v<0;v===0?w=w.add(u(q,d[A])):R=R.add(u(z,d[P]))}return{p:R,f:w}},wNAFCached(c,d,p,f){const _=c._WINDOW_SIZE||1;let R=d.get(c);return R||(R=this.precomputeWindow(c,_),_!==1&&d.set(c,f(R))),this.wNAF(_,R,p)}}}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 Gs}var o1;function TC(){return o1||(o1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DER=void 0,e.weierstrassPoints=f,e.weierstrass=R,e.SWUFpSqrtRatio=w,e.mapToCurveSimpleSWU=O;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const t=eV(),r=rd(),n=ls(),i=ls();function a(h){const T=(0,t.validateBasic)(h);n.validateObject(T,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:b,Fp:m,a:v}=T;if(b){if(!m.eql(v,m.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof b!="object"||typeof b.beta!="bigint"||typeof b.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...T})}const{bytesToNumberBE:s,hexToBytes:o}=n;e.DER={Err:class extends Error{constructor(T=""){super(T)}},_parseInt(h){const{Err:T}=e.DER;if(h.length<2||h[0]!==2)throw new T("Invalid signature integer tag");const b=h[1],m=h.subarray(2,b+2);if(!b||m.length!==b)throw new T("Invalid signature integer: wrong length");if(m[0]&128)throw new T("Invalid signature integer: negative");if(m[0]===0&&!(m[1]&128))throw new T("Invalid signature integer: unnecessary leading zero");return{d:s(m),l:h.subarray(b+2)}},toSig(h){const{Err:T}=e.DER,b=typeof h=="string"?o(h):h;n.abytes(b);let m=b.length;if(m<2||b[0]!=48)throw new T("Invalid signature tag");if(b[1]!==m-2)throw new T("Invalid signature: incorrect length");const{d:v,l:A}=e.DER._parseInt(b.subarray(2)),{d:P,l:q}=e.DER._parseInt(A);if(q.length)throw new T("Invalid signature: left bytes after parsing");return{r:v,s:P}},hexFromSig(h){const T=Y=>Number.parseInt(Y[0],16)&8?"00"+Y:Y,b=Y=>{const W=Y.toString(16);return W.length&1?`0${W}`:W},m=T(b(h.s)),v=T(b(h.r)),A=m.length/2,P=v.length/2,q=b(A),z=b(P);return`30${b(P+A+4)}02${z}${v}02${q}${m}`}};const u=BigInt(0),l=BigInt(1),c=BigInt(2),d=BigInt(3),p=BigInt(4);function f(h){const T=a(h),{Fp:b}=T,m=T.toBytes||((se,ne,X)=>{const x=ne.toAffine();return n.concatBytes(Uint8Array.from([4]),b.toBytes(x.x),b.toBytes(x.y))}),v=T.fromBytes||(se=>{const ne=se.subarray(1),X=b.fromBytes(ne.subarray(0,b.BYTES)),x=b.fromBytes(ne.subarray(b.BYTES,2*b.BYTES));return{x:X,y:x}});function A(se){const{a:ne,b:X}=T,x=b.sqr(se),L=b.mul(x,se);return b.add(b.add(L,b.mul(se,ne)),X)}if(!b.eql(b.sqr(T.Gy),A(T.Gx)))throw new Error("bad generator point: equation left != right");function P(se){return typeof se=="bigint"&&u<se&&se<T.n}function q(se){if(!P(se))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function z(se){const{allowedPrivateKeyLengths:ne,nByteLength:X,wrapPrivateKey:x,n:L}=T;if(ne&&typeof se!="bigint"){if(n.isBytes(se)&&(se=n.bytesToHex(se)),typeof se!="string"||!ne.includes(se.length))throw new Error("Invalid key");se=se.padStart(X*2,"0")}let D;try{D=typeof se=="bigint"?se:n.bytesToNumberBE((0,i.ensureBytes)("private key",se,X))}catch{throw new Error(`private key must be ${X} bytes, hex or bigint, not ${typeof se}`)}return x&&(D=r.mod(D,L)),q(D),D}const Y=new Map;function W(se){if(!(se instanceof U))throw new Error("ProjectivePoint expected")}class U{constructor(ne,X,x){if(this.px=ne,this.py=X,this.pz=x,ne==null||!b.isValid(ne))throw new Error("x required");if(X==null||!b.isValid(X))throw new Error("y required");if(x==null||!b.isValid(x))throw new Error("z required")}static fromAffine(ne){const{x:X,y:x}=ne||{};if(!ne||!b.isValid(X)||!b.isValid(x))throw new Error("invalid affine point");if(ne instanceof U)throw new Error("projective point not allowed");const L=D=>b.eql(D,b.ZERO);return L(X)&&L(x)?U.ZERO:new U(X,x,b.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(ne){const X=b.invertBatch(ne.map(x=>x.pz));return ne.map((x,L)=>x.toAffine(X[L])).map(U.fromAffine)}static fromHex(ne){const X=U.fromAffine(v((0,i.ensureBytes)("pointHex",ne)));return X.assertValidity(),X}static fromPrivateKey(ne){return U.BASE.multiply(z(ne))}_setWindowSize(ne){this._WINDOW_SIZE=ne,Y.delete(this)}assertValidity(){if(this.is0()){if(T.allowInfinityPoint&&!b.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:ne,y:X}=this.toAffine();if(!b.isValid(ne)||!b.isValid(X))throw new Error("bad point: x or y not FE");const x=b.sqr(X),L=A(ne);if(!b.eql(x,L))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:ne}=this.toAffine();if(b.isOdd)return!b.isOdd(ne);throw new Error("Field doesn't support isOdd")}equals(ne){W(ne);const{px:X,py:x,pz:L}=this,{px:D,py:$,pz:V}=ne,N=b.eql(b.mul(X,V),b.mul(D,L)),j=b.eql(b.mul(x,V),b.mul($,L));return N&&j}negate(){return new U(this.px,b.neg(this.py),this.pz)}double(){const{a:ne,b:X}=T,x=b.mul(X,d),{px:L,py:D,pz:$}=this;let V=b.ZERO,N=b.ZERO,j=b.ZERO,Z=b.mul(L,L),Ee=b.mul(D,D),_e=b.mul($,$),Se=b.mul(L,D);return Se=b.add(Se,Se),j=b.mul(L,$),j=b.add(j,j),V=b.mul(ne,j),N=b.mul(x,_e),N=b.add(V,N),V=b.sub(Ee,N),N=b.add(Ee,N),N=b.mul(V,N),V=b.mul(Se,V),j=b.mul(x,j),_e=b.mul(ne,_e),Se=b.sub(Z,_e),Se=b.mul(ne,Se),Se=b.add(Se,j),j=b.add(Z,Z),Z=b.add(j,Z),Z=b.add(Z,_e),Z=b.mul(Z,Se),N=b.add(N,Z),_e=b.mul(D,$),_e=b.add(_e,_e),Z=b.mul(_e,Se),V=b.sub(V,Z),j=b.mul(_e,Ee),j=b.add(j,j),j=b.add(j,j),new U(V,N,j)}add(ne){W(ne);const{px:X,py:x,pz:L}=this,{px:D,py:$,pz:V}=ne;let N=b.ZERO,j=b.ZERO,Z=b.ZERO;const Ee=T.a,_e=b.mul(T.b,d);let Se=b.mul(X,D),Ie=b.mul(x,$),ie=b.mul(L,V),le=b.add(X,x),fe=b.add(D,$);le=b.mul(le,fe),fe=b.add(Se,Ie),le=b.sub(le,fe),fe=b.add(X,L);let me=b.add(D,V);return fe=b.mul(fe,me),me=b.add(Se,ie),fe=b.sub(fe,me),me=b.add(x,L),N=b.add($,V),me=b.mul(me,N),N=b.add(Ie,ie),me=b.sub(me,N),Z=b.mul(Ee,fe),N=b.mul(_e,ie),Z=b.add(N,Z),N=b.sub(Ie,Z),Z=b.add(Ie,Z),j=b.mul(N,Z),Ie=b.add(Se,Se),Ie=b.add(Ie,Se),ie=b.mul(Ee,ie),fe=b.mul(_e,fe),Ie=b.add(Ie,ie),ie=b.sub(Se,ie),ie=b.mul(Ee,ie),fe=b.add(fe,ie),Se=b.mul(Ie,fe),j=b.add(j,Se),Se=b.mul(me,fe),N=b.mul(le,N),N=b.sub(N,Se),Se=b.mul(le,Ie),Z=b.mul(me,Z),Z=b.add(Z,Se),new U(N,j,Z)}subtract(ne){return this.add(ne.negate())}is0(){return this.equals(U.ZERO)}wNAF(ne){return ce.wNAFCached(this,Y,ne,X=>{const x=b.invertBatch(X.map(L=>L.pz));return X.map((L,D)=>L.toAffine(x[D])).map(U.fromAffine)})}multiplyUnsafe(ne){const X=U.ZERO;if(ne===u)return X;if(q(ne),ne===l)return this;const{endo:x}=T;if(!x)return ce.unsafeLadder(this,ne);let{k1neg:L,k1:D,k2neg:$,k2:V}=x.splitScalar(ne),N=X,j=X,Z=this;for(;D>u||V>u;)D&l&&(N=N.add(Z)),V&l&&(j=j.add(Z)),Z=Z.double(),D>>=l,V>>=l;return L&&(N=N.negate()),$&&(j=j.negate()),j=new U(b.mul(j.px,x.beta),j.py,j.pz),N.add(j)}multiply(ne){q(ne);let X=ne,x,L;const{endo:D}=T;if(D){const{k1neg:$,k1:V,k2neg:N,k2:j}=D.splitScalar(X);let{p:Z,f:Ee}=this.wNAF(V),{p:_e,f:Se}=this.wNAF(j);Z=ce.constTimeNegate($,Z),_e=ce.constTimeNegate(N,_e),_e=new U(b.mul(_e.px,D.beta),_e.py,_e.pz),x=Z.add(_e),L=Ee.add(Se)}else{const{p:$,f:V}=this.wNAF(X);x=$,L=V}return U.normalizeZ([x,L])[0]}multiplyAndAddUnsafe(ne,X,x){const L=U.BASE,D=(V,N)=>N===u||N===l||!V.equals(L)?V.multiplyUnsafe(N):V.multiply(N),$=D(this,X).add(D(ne,x));return $.is0()?void 0:$}toAffine(ne){const{px:X,py:x,pz:L}=this,D=this.is0();ne==null&&(ne=D?b.ONE:b.inv(L));const $=b.mul(X,ne),V=b.mul(x,ne),N=b.mul(L,ne);if(D)return{x:b.ZERO,y:b.ZERO};if(!b.eql(N,b.ONE))throw new Error("invZ was invalid");return{x:$,y:V}}isTorsionFree(){const{h:ne,isTorsionFree:X}=T;if(ne===l)return!0;if(X)return X(U,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:ne,clearCofactor:X}=T;return ne===l?this:X?X(U,this):this.multiplyUnsafe(T.h)}toRawBytes(ne=!0){return this.assertValidity(),m(U,this,ne)}toHex(ne=!0){return n.bytesToHex(this.toRawBytes(ne))}}U.BASE=new U(T.Gx,T.Gy,b.ONE),U.ZERO=new U(b.ZERO,b.ONE,b.ZERO);const F=T.nBitLength,ce=(0,t.wNAF)(U,T.endo?Math.ceil(F/2):F);return{CURVE:T,ProjectivePoint:U,normPrivateKeyToScalar:z,weierstrassEquation:A,isWithinCurveOrder:P}}function _(h){const T=(0,t.validateBasic)(h);return n.validateObject(T,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...T})}function R(h){const T=_(h),{Fp:b,n:m}=T,v=b.BYTES+1,A=2*b.BYTES+1;function P(fe){return u<fe&&fe<b.ORDER}function q(fe){return r.mod(fe,m)}function z(fe){return r.invert(fe,m)}const{ProjectivePoint:Y,normPrivateKeyToScalar:W,weierstrassEquation:U,isWithinCurveOrder:F}=f({...T,toBytes(fe,me,Te){const we=me.toAffine(),Fe=b.toBytes(we.x),xe=n.concatBytes;return Te?xe(Uint8Array.from([me.hasEvenY()?2:3]),Fe):xe(Uint8Array.from([4]),Fe,b.toBytes(we.y))},fromBytes(fe){const me=fe.length,Te=fe[0],we=fe.subarray(1);if(me===v&&(Te===2||Te===3)){const Fe=n.bytesToNumberBE(we);if(!P(Fe))throw new Error("Point is not on curve");const xe=U(Fe);let tt;try{tt=b.sqrt(xe)}catch($t){const vt=$t instanceof Error?": "+$t.message:"";throw new Error("Point is not on curve"+vt)}const Xe=(tt&l)===l;return(Te&1)===1!==Xe&&(tt=b.neg(tt)),{x:Fe,y:tt}}else if(me===A&&Te===4){const Fe=b.fromBytes(we.subarray(0,b.BYTES)),xe=b.fromBytes(we.subarray(b.BYTES,2*b.BYTES));return{x:Fe,y:xe}}else throw new Error(`Point of length ${me} was invalid. Expected ${v} compressed bytes or ${A} uncompressed bytes`)}}),ce=fe=>n.bytesToHex(n.numberToBytesBE(fe,T.nByteLength));function se(fe){const me=m>>l;return fe>me}function ne(fe){return se(fe)?q(-fe):fe}const X=(fe,me,Te)=>n.bytesToNumberBE(fe.slice(me,Te));class x{constructor(me,Te,we){this.r=me,this.s=Te,this.recovery=we,this.assertValidity()}static fromCompact(me){const Te=T.nByteLength;return me=(0,i.ensureBytes)("compactSignature",me,Te*2),new x(X(me,0,Te),X(me,Te,2*Te))}static fromDER(me){const{r:Te,s:we}=e.DER.toSig((0,i.ensureBytes)("DER",me));return new x(Te,we)}assertValidity(){if(!F(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!F(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(me){return new x(this.r,this.s,me)}recoverPublicKey(me){const{r:Te,s:we,recovery:Fe}=this,xe=j((0,i.ensureBytes)("msgHash",me));if(Fe==null||![0,1,2,3].includes(Fe))throw new Error("recovery id invalid");const tt=Fe===2||Fe===3?Te+T.n:Te;if(tt>=b.ORDER)throw new Error("recovery id 2 or 3 invalid");const Xe=(Fe&1)===0?"02":"03",ut=Y.fromHex(Xe+ce(tt)),$t=z(tt),vt=q(-xe*$t),zt=q(we*$t),bt=Y.BASE.multiplyAndAddUnsafe(ut,vt,zt);if(!bt)throw new Error("point at infinify");return bt.assertValidity(),bt}hasHighS(){return se(this.s)}normalizeS(){return this.hasHighS()?new x(this.r,q(-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 ce(this.r)+ce(this.s)}}const L={isValidPrivateKey(fe){try{return W(fe),!0}catch{return!1}},normPrivateKeyToScalar:W,randomPrivateKey:()=>{const fe=r.getMinHashLength(T.n);return r.mapHashToField(T.randomBytes(fe),T.n)},precompute(fe=8,me=Y.BASE){return me._setWindowSize(fe),me.multiply(BigInt(3)),me}};function D(fe,me=!0){return Y.fromPrivateKey(fe).toRawBytes(me)}function $(fe){const me=n.isBytes(fe),Te=typeof fe=="string",we=(me||Te)&&fe.length;return me?we===v||we===A:Te?we===2*v||we===2*A:fe instanceof Y}function V(fe,me,Te=!0){if($(fe))throw new Error("first arg must be private key");if(!$(me))throw new Error("second arg must be public key");return Y.fromHex(me).multiply(W(fe)).toRawBytes(Te)}const N=T.bits2int||function(fe){const me=n.bytesToNumberBE(fe),Te=fe.length*8-T.nBitLength;return Te>0?me>>BigInt(Te):me},j=T.bits2int_modN||function(fe){return q(N(fe))},Z=n.bitMask(T.nBitLength);function Ee(fe){if(typeof fe!="bigint")throw new Error("bigint expected");if(!(u<=fe&&fe<Z))throw new Error(`bigint expected < 2^${T.nBitLength}`);return n.numberToBytesBE(fe,T.nByteLength)}function _e(fe,me,Te=Se){if(["recovered","canonical"].some(nr=>nr in Te))throw new Error("sign() legacy options not supported");const{hash:we,randomBytes:Fe}=T;let{lowS:xe,prehash:tt,extraEntropy:Xe}=Te;xe==null&&(xe=!0),fe=(0,i.ensureBytes)("msgHash",fe),tt&&(fe=(0,i.ensureBytes)("prehashed msgHash",we(fe)));const ut=j(fe),$t=W(me),vt=[Ee($t),Ee(ut)];if(Xe!=null&&Xe!==!1){const nr=Xe===!0?Fe(b.BYTES):Xe;vt.push((0,i.ensureBytes)("extraEntropy",nr))}const zt=n.concatBytes(...vt),bt=ut;function rr(nr){const ht=N(nr);if(!F(ht))return;const wr=z(ht),M=Y.BASE.multiply(ht).toAffine(),E=q(M.x);if(E===u)return;const I=q(wr*q(bt+E*$t));if(I===u)return;let G=(M.x===E?0:2)|Number(M.y&l),de=I;return xe&&se(I)&&(de=ne(I),G^=1),new x(E,de,G)}return{seed:zt,k2sig:rr}}const Se={lowS:T.lowS,prehash:!1},Ie={lowS:T.lowS,prehash:!1};function ie(fe,me,Te=Se){const{seed:we,k2sig:Fe}=_e(fe,me,Te),xe=T;return n.createHmacDrbg(xe.hash.outputLen,xe.nByteLength,xe.hmac)(we,Fe)}Y.BASE._setWindowSize(8);function le(fe,me,Te,we=Ie){var M;const Fe=fe;if(me=(0,i.ensureBytes)("msgHash",me),Te=(0,i.ensureBytes)("publicKey",Te),"strict"in we)throw new Error("options.strict was renamed to lowS");const{lowS:xe,prehash:tt}=we;let Xe,ut;try{if(typeof Fe=="string"||n.isBytes(Fe))try{Xe=x.fromDER(Fe)}catch(E){if(!(E instanceof e.DER.Err))throw E;Xe=x.fromCompact(Fe)}else if(typeof Fe=="object"&&typeof Fe.r=="bigint"&&typeof Fe.s=="bigint"){const{r:E,s:I}=Fe;Xe=new x(E,I)}else throw new Error("PARSE");ut=Y.fromHex(Te)}catch(E){if(E.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(xe&&Xe.hasHighS())return!1;tt&&(me=T.hash(me));const{r:$t,s:vt}=Xe,zt=j(me),bt=z(vt),rr=q(zt*bt),nr=q($t*bt),ht=(M=Y.BASE.multiplyAndAddUnsafe(ut,rr,nr))==null?void 0:M.toAffine();return ht?q(ht.x)===$t:!1}return{CURVE:T,getPublicKey:D,getSharedSecret:V,sign:ie,verify:le,ProjectivePoint:Y,Signature:x,utils:L}}function w(h,T){const b=h.ORDER;let m=u;for(let se=b-l;se%c===u;se/=c)m+=l;const v=m,A=c<<v-l-l,P=A*c,q=(b-l)/P,z=(q-l)/c,Y=P-l,W=A,U=h.pow(T,q),F=h.pow(T,(q+l)/c);let ce=(se,ne)=>{let X=U,x=h.pow(ne,Y),L=h.sqr(x);L=h.mul(L,ne);let D=h.mul(se,L);D=h.pow(D,z),D=h.mul(D,x),x=h.mul(D,ne),L=h.mul(D,se);let $=h.mul(L,x);D=h.pow($,W);let V=h.eql(D,h.ONE);x=h.mul(L,F),D=h.mul($,X),L=h.cmov(x,L,V),$=h.cmov(D,$,V);for(let N=v;N>l;N--){let j=N-c;j=c<<j-l;let Z=h.pow($,j);const Ee=h.eql(Z,h.ONE);x=h.mul(L,X),X=h.mul(X,X),Z=h.mul($,X),L=h.cmov(x,L,Ee),$=h.cmov(Z,$,Ee)}return{isValid:V,value:L}};if(h.ORDER%p===d){const se=(h.ORDER-d)/p,ne=h.sqrt(h.neg(T));ce=(X,x)=>{let L=h.sqr(x);const D=h.mul(X,x);L=h.mul(L,D);let $=h.pow(L,se);$=h.mul($,D);const V=h.mul($,ne),N=h.mul(h.sqr($),x),j=h.eql(N,X);let Z=h.cmov(V,$,j);return{isValid:j,value:Z}}}return ce}function O(h,T){if(r.validateField(h),!h.isValid(T.A)||!h.isValid(T.B)||!h.isValid(T.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const b=w(h,T.Z);if(!h.isOdd)throw new Error("Fp.isOdd is not implemented!");return m=>{let v,A,P,q,z,Y,W,U;v=h.sqr(m),v=h.mul(v,T.Z),A=h.sqr(v),A=h.add(A,v),P=h.add(A,h.ONE),P=h.mul(P,T.B),q=h.cmov(T.Z,h.neg(A),!h.eql(A,h.ZERO)),q=h.mul(q,T.A),A=h.sqr(P),Y=h.sqr(q),z=h.mul(Y,T.A),A=h.add(A,z),A=h.mul(A,P),Y=h.mul(Y,q),z=h.mul(Y,T.B),A=h.add(A,z),W=h.mul(v,P);const{isValid:F,value:ce}=b(A,Y);U=h.mul(v,m),U=h.mul(U,ce),W=h.cmov(W,P,F),U=h.cmov(U,ce,F);const se=h.isOdd(m)===h.isOdd(U);return U=h.cmov(h.neg(U),U,se),W=h.div(W,q),{x:W,y:U}}}})(Qp)),Qp}var u1;function tV(){if(u1)return Vs;u1=1,Object.defineProperty(Vs,"__esModule",{value:!0}),Vs.getHash=n,Vs.createCurve=i;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const e=ZH(),t=tu(),r=TC();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 Vs}var Xn={},c1;function rV(){if(c1)return Xn;c1=1,Object.defineProperty(Xn,"__esModule",{value:!0}),Xn.expand_message_xmd=s,Xn.expand_message_xof=o,Xn.hash_to_field=u,Xn.isogenyMap=l,Xn.createHasher=c;const e=rd(),t=ls(),r=t.bytesToNumberBE;function n(d,p){if(d<0||d>=1<<8*p)throw new Error(`bad I2OSP call: value=${d} length=${p}`);const f=Array.from({length:p}).fill(0);for(let _=p-1;_>=0;_--)f[_]=d&255,d>>>=8;return new Uint8Array(f)}function i(d,p){const f=new Uint8Array(d.length);for(let _=0;_<d.length;_++)f[_]=d[_]^p[_];return f}function a(d){if(!Number.isSafeInteger(d))throw new Error("number expected")}function s(d,p,f,_){(0,t.abytes)(d),(0,t.abytes)(p),a(f),p.length>255&&(p=_((0,t.concatBytes)((0,t.utf8ToBytes)("H2C-OVERSIZE-DST-"),p)));const{outputLen:R,blockLen:w}=_,O=Math.ceil(f/R);if(O>255)throw new Error("Invalid xmd length");const h=(0,t.concatBytes)(p,n(p.length,1)),T=n(0,w),b=n(f,2),m=new Array(O),v=_((0,t.concatBytes)(T,d,b,n(0,1),h));m[0]=_((0,t.concatBytes)(v,n(1,1),h));for(let P=1;P<=O;P++){const q=[i(v,m[P-1]),n(P+1,1),h];m[P]=_((0,t.concatBytes)(...q))}return(0,t.concatBytes)(...m).slice(0,f)}function o(d,p,f,_,R){if((0,t.abytes)(d),(0,t.abytes)(p),a(f),p.length>255){const w=Math.ceil(2*_/8);p=R.create({dkLen:w}).update((0,t.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(p).digest()}if(f>65535||p.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return R.create({dkLen:f}).update(d).update(n(f,2)).update(p).update(n(p.length,1)).digest()}function u(d,p,f){(0,t.validateObject)(f,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:_,k:R,m:w,hash:O,expand:h,DST:T}=f;(0,t.abytes)(d),a(p);const b=typeof T=="string"?(0,t.utf8ToBytes)(T):T,m=_.toString(2).length,v=Math.ceil((m+R)/8),A=p*w*v;let P;if(h==="xmd")P=s(d,b,A,O);else if(h==="xof")P=o(d,b,A,R,O);else if(h==="_internal_pass")P=d;else throw new Error('expand must be "xmd" or "xof"');const q=new Array(p);for(let z=0;z<p;z++){const Y=new Array(w);for(let W=0;W<w;W++){const U=v*(W+z*w),F=P.subarray(U,U+v);Y[W]=(0,e.mod)(r(F),_)}q[z]=Y}return q}function l(d,p){const f=p.map(_=>Array.from(_).reverse());return(_,R)=>{const[w,O,h,T]=f.map(b=>b.reduce((m,v)=>d.add(d.mul(m,_),v)));return _=d.div(w,O),R=d.mul(R,d.div(h,T)),{x:_,y:R}}}function c(d,p,f){if(typeof p!="function")throw new Error("mapToCurve() must be defined");return{hashToCurve(_,R){const w=u(_,2,{...f,DST:f.DST,...R}),O=d.fromAffine(p(w[0])),h=d.fromAffine(p(w[1])),T=O.add(h).clearCofactor();return T.assertValidity(),T},encodeToCurve(_,R){const w=u(_,1,{...f,DST:f.encodeDST,...R}),O=d.fromAffine(p(w[0])).clearCofactor();return O.assertValidity(),O},mapToCurve(_){if(!Array.isArray(_))throw new Error("mapToCurve: expected array of bigints");for(const w of _)if(typeof w!="bigint")throw new Error(`mapToCurve: expected array of bigints, got ${w} in array`);const R=d.fromAffine(p(_)).clearCofactor();return R.assertValidity(),R}}}return Xn}var l1;function nV(){return l1||(l1=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=QH(),r=tu(),n=tV(),i=rV(),a=rd(),s=ls(),o=TC(),u=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),l=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),c=BigInt(1),d=BigInt(2),p=(x,L)=>(x+L/d)/L;function f(x){const L=u,D=BigInt(3),$=BigInt(6),V=BigInt(11),N=BigInt(22),j=BigInt(23),Z=BigInt(44),Ee=BigInt(88),_e=x*x*x%L,Se=_e*_e*x%L,Ie=(0,a.pow2)(Se,D,L)*Se%L,ie=(0,a.pow2)(Ie,D,L)*Se%L,le=(0,a.pow2)(ie,d,L)*_e%L,fe=(0,a.pow2)(le,V,L)*le%L,me=(0,a.pow2)(fe,N,L)*fe%L,Te=(0,a.pow2)(me,Z,L)*me%L,we=(0,a.pow2)(Te,Ee,L)*Te%L,Fe=(0,a.pow2)(we,Z,L)*me%L,xe=(0,a.pow2)(Fe,D,L)*Se%L,tt=(0,a.pow2)(xe,j,L)*fe%L,Xe=(0,a.pow2)(tt,$,L)*_e%L,ut=(0,a.pow2)(Xe,d,L);if(!_.eql(_.sqr(ut),x))throw new Error("Cannot find square root");return ut}const _=(0,a.Field)(u,void 0,void 0,{sqrt:f});e.secp256k1=(0,n.createCurve)({a:BigInt(0),b:BigInt(7),Fp:_,n:l,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:x=>{const L=l,D=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),$=-c*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),V=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),N=D,j=BigInt("0x100000000000000000000000000000000"),Z=p(N*x,L),Ee=p(-$*x,L);let _e=(0,a.mod)(x-Z*D-Ee*V,L),Se=(0,a.mod)(-Z*$-Ee*N,L);const Ie=_e>j,ie=Se>j;if(Ie&&(_e=L-_e),ie&&(Se=L-Se),_e>j||Se>j)throw new Error("splitScalar: Endomorphism failed, k="+x);return{k1neg:Ie,k1:_e,k2neg:ie,k2:Se}}}},t.sha256);const R=BigInt(0),w=x=>typeof x=="bigint"&&R<x&&x<u,O=x=>typeof x=="bigint"&&R<x&&x<l,h={};function T(x,...L){let D=h[x];if(D===void 0){const $=(0,t.sha256)(Uint8Array.from(x,V=>V.charCodeAt(0)));D=(0,s.concatBytes)($,$),h[x]=D}return(0,t.sha256)((0,s.concatBytes)(D,...L))}const b=x=>x.toRawBytes(!0).slice(1),m=x=>(0,s.numberToBytesBE)(x,32),v=x=>(0,a.mod)(x,u),A=x=>(0,a.mod)(x,l),P=e.secp256k1.ProjectivePoint,q=(x,L,D)=>P.BASE.multiplyAndAddUnsafe(x,L,D);function z(x){let L=e.secp256k1.utils.normPrivateKeyToScalar(x),D=P.fromPrivateKey(L);return{scalar:D.hasEvenY()?L:A(-L),bytes:b(D)}}function Y(x){if(!w(x))throw new Error("bad x: need 0 < x < p");const L=v(x*x),D=v(L*x+BigInt(7));let $=f(D);$%d!==R&&($=v(-$));const V=new P(x,$,c);return V.assertValidity(),V}function W(...x){return A((0,s.bytesToNumberBE)(T("BIP0340/challenge",...x)))}function U(x){return z(x).bytes}function F(x,L,D=(0,r.randomBytes)(32)){const $=(0,s.ensureBytes)("message",x),{bytes:V,scalar:N}=z(L),j=(0,s.ensureBytes)("auxRand",D,32),Z=m(N^(0,s.bytesToNumberBE)(T("BIP0340/aux",j))),Ee=T("BIP0340/nonce",Z,V,$),_e=A((0,s.bytesToNumberBE)(Ee));if(_e===R)throw new Error("sign failed: k is zero");const{bytes:Se,scalar:Ie}=z(_e),ie=W(Se,V,$),le=new Uint8Array(64);if(le.set(Se,0),le.set(m(A(Ie+ie*N)),32),!ce(le,$,V))throw new Error("sign: Invalid signature produced");return le}function ce(x,L,D){const $=(0,s.ensureBytes)("signature",x,64),V=(0,s.ensureBytes)("message",L),N=(0,s.ensureBytes)("publicKey",D,32);try{const j=Y((0,s.bytesToNumberBE)(N)),Z=(0,s.bytesToNumberBE)($.subarray(0,32));if(!w(Z))return!1;const Ee=(0,s.bytesToNumberBE)($.subarray(32,64));if(!O(Ee))return!1;const _e=W(m(Z),b(j),V),Se=q(j,Ee,A(-_e));return!(!Se||!Se.hasEvenY()||Se.toAffine().x!==Z)}catch{return!1}}e.schnorr={getPublicKey:U,sign:F,verify:ce,utils:{randomPrivateKey:e.secp256k1.utils.randomPrivateKey,lift_x:Y,pointToBytes:b,numberToBytesBE:s.numberToBytesBE,bytesToNumberBE:s.bytesToNumberBE,taggedHash:T,mod:a.mod}};const se=(0,i.isogenyMap)(_,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(x=>x.map(L=>BigInt(L)))),ne=(0,o.mapToCurveSimpleSWU)(_,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:_.create(BigInt("-11"))}),X=(0,i.createHasher)(e.secp256k1.ProjectivePoint,x=>{const{x:L,y:D}=ne(_.create(x[0]));return se(L,D)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:_.ORDER,m:1,k:128,expand:"xmd",hash:t.sha256});e.hashToCurve=X.hashToCurve,e.encodeToCurve=X.encodeToCurve})(Kp)),Kp}var d1;function iV(){return d1||(d1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.secp256k1=void 0;var t=nV();Object.defineProperty(e,"secp256k1",{enumerable:!0,get:function(){return t.secp256k1}})})(xp)),xp}var f1;function aV(){if(f1)return fn;f1=1,Object.defineProperty(fn,"__esModule",{value:!0}),fn.recoverPublicKey=r,fn.recoverAddressFromEthSignature=i,fn.sign=a,fn.createEthereumMessageHash=s,fn.ethSign=o,fn.computeAddress=u,fn.createUnsafeIdentity=l;const e=td(),t=iV();function r(c,d){if(c.length!==65)throw new Error("Invalid signature length "+c.length);const p=c[64];if(p!==27&&p!==28)throw new Error(`Invalid signature recovery value: ${p}. Expected 27 or 28.`);const f=c.slice(0,c.length-1),_=p===28?1:0;return t.secp256k1.Signature.fromCompact(f).addRecoveryBit(_).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 p=new Uint8Array(c);return p[64]=d+27,p}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 p=t.secp256k1.sign(d,c),f=p.recovery===1?"1c":"1b";return"0x"+p.toCompactHex()+f}function s(c){const d=typeof c=="string"?(0,e.stringToUtf8Bytes)(c):c,p=(0,e.concatBytes)((0,e.stringToUtf8Bytes)(`Ethereum Signed Message:
70
- `),(0,e.stringToUtf8Bytes)(String(d.length)),d);return(0,e.hexToBytes)((0,e.sha3)(p))}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),p=u(d);return{privateKey:(0,e.bytesToHex)(c),publicKey:(0,e.bytesToHex)(d),address:p}}return fn}var il={},p1;function sV(){if(p1)return il;p1=1,Object.defineProperty(il,"__esModule",{value:!0});const e=td();class t{constructor(n,i=!0){Yn(this,"requestManager");Yn(this,"checkedBlocks");Yn(this,"saveBlocks");Yn(this,"savedBlocks");Yn(this,"requests");Yn(this,"blockTime");Yn(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 il.default=t,il}var al={},m1;function oV(){if(m1)return al;m1=1,Object.defineProperty(al,"__esModule",{value:!0}),al.moveMinutes=e;function e(t){const r=new Date;return r.setMinutes(r.getMinutes()+t),r}return al}var Zp={},Vr={},Di={},ji={},em={},Gr={},h1;function Ne(){if(h1)return Gr;h1=1;var e=Gr&&Gr.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Gr,"__esModule",{value:!0}),Gr.validateType=Gr.generateLazyValidator=Gr.Ajv=void 0;const t=e(F_());Gr.Ajv=t.default;const r=e(xP()),n=e(KP());function i(s,o){let u=null;const l=(c,d)=>{if(!u){const p=new t.default({$data:!0,allErrors:!0});(0,r.default)(p),(0,n.default)(p,{singleError:!0}),o==null||o.forEach(f=>p.addKeyword(f)),u=p.compile(s),Object.defineProperty(l,"errors",{get(){return u==null?void 0:u.errors}})}return u(c,d)};return l}Gr.generateLazyValidator=i;function a(s,o){return s.validate(o)}return Gr.validateType=a,Gr}var y1;function uV(){return y1||(y1=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={}))})(em)),em}var tm={},g1;function cV(){return g1||(g1=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={}))})(tm)),tm}var _1;function lV(){return _1||(_1=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(uV(),e),r(cV(),e)})(ji)),ji}var Li={},rm={},E1;function dV(){return E1||(E1=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={}))})(rm)),rm}var nm={},im={},v1;function nd(){return v1||(v1=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={}))})(im)),im}var am={},b1;function Sa(){return b1||(b1=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={}))})(am)),am}var sm={},om={},T1;function Z_(){return T1||(T1=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={}))})(om)),om}var um={},cm={},S1;function SC(){return S1||(S1=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={}))})(cm)),cm}var I1;function eE(){return I1||(I1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=void 0;const t=Sa(),r=Ne(),n=SC();(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={}))})(um)),um}var R1;function tE(){return R1||(R1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableRepresentation=void 0;const t=Ne(),r=Z_(),n=eE();(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={}))})(sm)),sm}var $i={},qi={},lm={},dm={},w1;function Ia(){return w1||(w1=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={}))})(dm)),dm}var A1;function IC(){return A1||(A1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Avatar=e.Link=e.LinkUrl=e.AvatarInfo=e.Snapshots=void 0;const t=Sa(),r=Ia(),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={}))})(lm)),lm}var fm={},O1;function fV(){return O1||(O1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Profile=void 0;const t=Ne(),r=IC();(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={}))})(fm)),fm}var N1;function pV(){return N1||(N1=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(IC(),e),r(fV(),e)})(qi)),qi}var pm={},mm={},P1;function RC(){return P1||(P1=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={}))})(mm)),mm}var hm={},C1;function wC(){return C1||(C1=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={}))})(hm)),hm}var ym={},M1;function AC(){return M1||(M1=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={}))})(ym)),ym}var gm={},zs={},D1;function rE(){return D1||(D1=1,Object.defineProperty(zs,"__esModule",{value:!0}),zs.displayableProperties=void 0,zs.displayableProperties={menuBarIcon:{description:"Name of the file used as icon for the MenuBar",type:"string",nullable:!0}}),zs}var _m={},j1;function OC(){return j1||(j1=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={}))})(_m)),_m}var Em={},L1;function NC(){return L1||(L1=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={}))})(Em)),Em}var $1;function mV(){return $1||($1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Scene=e.RequiredPermission=void 0;const t=Ne(),r=rE(),n=RC(),i=AC(),a=OC(),s=NC(),o=wC();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={}))})(gm)),gm}var q1;function hV(){return q1||(q1=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=RC();Object.defineProperty(e,"FeatureToggles",{enumerable:!0,get:function(){return t.FeatureToggles}});var r=wC();Object.defineProperty(e,"WorldConfiguration",{enumerable:!0,get:function(){return r.WorldConfiguration}});var n=AC();Object.defineProperty(e,"SceneParcels",{enumerable:!0,get:function(){return n.SceneParcels}});var i=mV();Object.defineProperty(e,"Scene",{enumerable:!0,get:function(){return i.Scene}}),Object.defineProperty(e,"RequiredPermission",{enumerable:!0,get:function(){return i.RequiredPermission}});var a=OC();Object.defineProperty(e,"Source",{enumerable:!0,get:function(){return a.Source}});var s=NC();Object.defineProperty(e,"SpawnPoint",{enumerable:!0,get:function(){return s.SpawnPoint}})})(pm)),pm}var Bi={},vm={},bm={},B1;function PC(){return B1||(B1=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={}))})(bm)),bm}var k1;function CC(){return k1||(k1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.I18N=void 0;const t=Ne(),r=PC();(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={}))})(vm)),vm}var Tm={},U1;function MC(){return U1||(U1=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={}))})(Tm)),Tm}var Sm={},F1;function nE(){return F1||(F1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isStandard=e.standardProperties=void 0;const t=nd(),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})(Sm)),Sm}var Im={},ki={},Rm={},H1;function yV(){return H1||(H1=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={}))})(Rm)),Rm}var V1;function DC(){return V1||(V1=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(yV(),e)})(ki)),ki}var wm={},G1;function iE(){return G1||(G1=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(f,_){if(!_||!_.from||!_.to)return!1;let{to:R,from:w}=_;return(typeof w!="bigint"||typeof R!="bigint")&&(w=BigInt(w),R=BigInt(R)),w<=R},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(f,_){try{c(_)}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 p=Object.values(n).reduce((f,_)=>(f[_]=d.innerSchema,f),{});d.schema={type:"object",properties:p,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(p,f,_){super(p),this.existingMapping=f,this.conflictingMapping=_}}e.AddMappingError=l;function c(d={}){const p={};for(const[m,v]of Object.entries(d)){p[m]={};for(const[A,P]of Object.entries(v))for(const q of P)T(m,A,q)}function f(){return JSON.parse(JSON.stringify(p))}function _(m,v,A){const P=BigInt(m);return P>=BigInt(v)&&P<=BigInt(A)}function R(m,v){switch(v.type){case r.SINGLE:return m.id===v.id;case r.MULTIPLE:return v.ids.includes(m.id);case r.RANGE:return _(m.id,v.from,v.to);default:return!1}}function w(m,v){switch(v.type){case r.SINGLE:return m.ids.includes(v.id);case r.MULTIPLE:return m.ids.some(A=>v.ids.includes(A));case r.RANGE:return m.ids.some(A=>_(A,v.from,v.to));default:return!1}}function O(m,v){switch(v.type){case r.SINGLE:return _(v.id,m.from,m.to);case r.MULTIPLE:return v.ids.some(A=>_(A,m.from,m.to));case r.RANGE:return BigInt(m.from)<=BigInt(v.to)&&BigInt(m.to)>=BigInt(v.from)}}function h(m,v){if(m.type===r.ANY||v.type===r.ANY)return!0;switch(m.type){case r.SINGLE:return R(m,v);case r.MULTIPLE:return w(m,v);case r.RANGE:return O(m,v)}}function T(m,v,A){var P,q;const z=v.toLowerCase();p[m]=(P=p[m])!==null&&P!==void 0?P:{},p[m][z]=(q=p[m][z])!==null&&q!==void 0?q:[];for(const Y of p[m][z])if(h(Y,A))throw new l(`Cannot add mapping to contract ${z} on network ${m} because it overlaps with existing mapping`,Y,A);p[m][z].push(A)}function b(m,v,A){var P;return!((P=p[m])===null||P===void 0)&&P[v]?p[m][v].some(q=>{switch(q.type){case r.SINGLE:return q.id===A;case r.ANY:return!0;case r.MULTIPLE:return q.ids.includes(A);case r.RANGE:return BigInt(A)>=BigInt(q.from)&&BigInt(A)<=BigInt(q.to)}}):!1}return{addMapping:T,getMappings:f,includesNft:b}}e.createMappingsHelper=c})(wm)),wm}var z1;function aE(){return z1||(z1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.schema=void 0;const t=Ne(),r=DC(),n=iE();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})(Im)),Im}var Am={},Om={},zr={},W1;function jC(){if(W1)return zr;W1=1,Object.defineProperty(zr,"__esModule",{value:!0}),zr.isBaseEmote=zr.isBaseAvatar=zr.requiredBaseItemProps=zr.baseItemProperties=void 0;const e=CC(),t=MC(),r=rE();zr.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})}),zr.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}zr.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 zr.isBaseEmote=i,zr}var Y1;function gV(){return Y1||(Y1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Wearable=void 0;const t=Ne(),r=Sa(),n=tE(),i=jC(),a=nE(),s=aE(),o=eE(),u=iE();(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:(p,f)=>!p||(0,s.isThirdParty)(f),errors:!1},d={keyword:"_isBaseAvatar",validate:(p,f)=>!p||(0,i.isBaseAvatar)(f),errors:!1};l.validate=(0,t.generateLazyValidator)(l.schema,[c,d,u.RangeMapping._fromLessThanOrEqualTo,u.Mappings._isMappingsValid])})(e.Wearable||(e.Wearable={}))})(Om)),Om}var x1;function _V(){return x1||(x1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=e.BodyPartCategory=e.WearableCategory=e.Wearable=e.WearableRepresentation=void 0;var t=tE();Object.defineProperty(e,"WearableRepresentation",{enumerable:!0,get:function(){return t.WearableRepresentation}});var r=gV();Object.defineProperty(e,"Wearable",{enumerable:!0,get:function(){return r.Wearable}});var n=Sa();Object.defineProperty(e,"WearableCategory",{enumerable:!0,get:function(){return n.WearableCategory}});var i=SC();Object.defineProperty(e,"BodyPartCategory",{enumerable:!0,get:function(){return i.BodyPartCategory}});var a=eE();Object.defineProperty(e,"HideableWearableCategory",{enumerable:!0,get:function(){return a.HideableWearableCategory}})})(Am)),Am}var Nm={},Pm={},Cm={},Mm={},K1;function LC(){return K1||(K1=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={}))})(Mm)),Mm}var Dm={},X1;function $C(){return X1||(X1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteRepresentationADR74=void 0;const t=Ne(),r=Z_();(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={}))})(Dm)),Dm}var jm={},J1;function qC(){return J1||(J1=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={}))})(jm)),jm}var Q1;function BC(){return Q1||(Q1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteDataADR74=void 0;const t=LC(),r=Ne(),n=$C(),i=qC();(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={}))})(Cm)),Cm}var Z1;function EV(){return Z1||(Z1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Emote=void 0;const t=kC(),r=Ne(),n=jC(),i=nE(),a=aE(),s=BC();(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={}))})(Pm)),Pm}var Lm={},eR;function vV(){return eR||(eR=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={}))})(Lm)),Lm}var $m={},tR;function bV(){return tR||(tR=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={}))})($m)),$m}var rR;function TV(){return rR||(rR=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=EV();Object.defineProperty(e,"Emote",{enumerable:!0,get:function(){return t.Emote}});var r=$C();Object.defineProperty(e,"EmoteRepresentationADR74",{enumerable:!0,get:function(){return r.EmoteRepresentationADR74}});var n=BC();Object.defineProperty(e,"EmoteDataADR74",{enumerable:!0,get:function(){return n.EmoteDataADR74}});var i=qC();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=LC();Object.defineProperty(e,"EmoteCategory",{enumerable:!0,get:function(){return a.EmoteCategory}});var s=vV();Object.defineProperty(e,"EmotePlayMode",{enumerable:!0,get:function(){return s.EmotePlayMode}});var o=bV();Object.defineProperty(e,"EmoteOutcomeType",{enumerable:!0,get:function(){return o.EmoteOutcomeType}})})(Nm)),Nm}var nR;function kC(){return nR||(nR=1,(function(e){var t=Bi&&Bi.__createBinding||(Object.create?(function(l,c,d,p){p===void 0&&(p=d);var f=Object.getOwnPropertyDescriptor(c,d);(!f||("get"in f?!c.__esModule:f.writable||f.configurable))&&(f={enumerable:!0,get:function(){return c[d]}}),Object.defineProperty(l,p,f)}):(function(l,c,d,p){p===void 0&&(p=d),l[p]=c[d]})),r=Bi&&Bi.__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=CC();Object.defineProperty(e,"I18N",{enumerable:!0,get:function(){return n.I18N}});var i=PC();Object.defineProperty(e,"Locale",{enumerable:!0,get:function(){return i.Locale}});var a=MC();Object.defineProperty(e,"Metrics",{enumerable:!0,get:function(){return a.Metrics}});var s=Z_();Object.defineProperty(e,"BodyShape",{enumerable:!0,get:function(){return s.BodyShape}});var o=nE();Object.defineProperty(e,"isStandard",{enumerable:!0,get:function(){return o.isStandard}});var u=aE();Object.defineProperty(e,"isThirdParty",{enumerable:!0,get:function(){return u.isThirdParty}}),r(iE(),e),r(_V(),e),r(TV(),e)})(Bi)),Bi}var qm={},Bm={},iR;function ru(){return iR||(iR=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={}))})(Bm)),Bm}var aR;function SV(){return aR||(aR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PointerChangesSyncDeployment=e.SnapshotSyncDeployment=void 0;const t=Ia(),r=ru(),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={}))})(qm)),qm}var km={},Um={},sR;function UC(){return sR||(sR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ContentMapping=void 0;const t=Ia(),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={}))})(Um)),Um}var oR;function FC(){return oR||(oR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Entity=e.EntityType=void 0;const t=Ia(),r=UC(),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={}))})(km)),km}var Fm={},uR;function IV(){return uR||(uR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeploymentWithAuthChain=void 0;const t=ru(),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={}))})(Fm)),Fm}var Ui={},Hm={},cR;function RV(){return cR||(cR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Outfits=e.Outfit=void 0;const t=Sa(),r=Ia(),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={}))})(Hm)),Hm}var lR;function wV(){return lR||(lR=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(RV(),e)})(Ui)),Ui}var Fi={},Vm={},dR;function HC(){return dR||(dR=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={}))})(Vm)),Vm}var Gm={},zm={},fR;function VC(){return fR||(fR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SubscriptionDetails=void 0;const t=Ne(),r=HC(),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={}))})(zm)),zm}var Wm={},pR;function GC(){return pR||(pR=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={}))})(Wm)),Wm}var mR;function AV(){return mR||(mR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Subscription=void 0;const t=Ne(),r=VC(),n=Ia(),i=GC();(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={}))})(Gm)),Gm}var hR;function OV(){return hR||(hR=1,(function(e){var t=Fi&&Fi.__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=Fi&&Fi.__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(HC(),e),r(AV(),e),r(VC(),e)})(Fi)),Fi}var Hi={},Ym={},yR;function Er(){return yR||(yR=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={}))})(Ym)),Ym}var xm={},gR;function NV(){return gR||(gR=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=Er();(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={}))})(xm)),xm}var Km={},_R;function PV(){return _R||(_R=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalystDeploymentEvent=void 0;const t=ru(),r=Ne(),n=FC(),i=Er();(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={}))})(Km)),Km}var Xm={},ER;function CV(){return ER||(ER=1,Object.defineProperty(Xm,"__esModule",{value:!0})),Xm}var Jm={},vR;function MV(){return vR||(vR=1,Object.defineProperty(Jm,"__esModule",{value:!0})),Jm}var Qm={},bR;function DV(){return bR||(bR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BidReceivedEvent=void 0;const t=Ne(),r=Er();(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={}))})(Qm)),Qm}var Zm={},Ws={},TR;function id(){if(TR)return Ws;TR=1,Object.defineProperty(Ws,"__esModule",{value:!0}),Ws.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 Ws.createEventSchema=e,Ws}var SR;function jV(){return SR||(SR=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=Er(),n=id(),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={}))})(Zm)),Zm}var eh={},IR;function LV(){return IR||(IR=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=Er();(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={}))})(eh)),eh}var th={},RR;function $V(){return RR||(RR=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=Er(),n=id(),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={}))})(th)),th}var rh={},wR;function qV(){return wR||(wR=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=Er();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={}))})(rh)),rh}var nh={},AR;function BV(){return AR||(AR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ReferralNewTierReachedEvent=e.ReferralInvitedUsersAcceptedEvent=void 0;const t=Ne(),r=Er(),n=id(),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={}))})(nh)),nh}var ih={},OR;function kV(){return OR||(OR=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=Er();(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={}))})(ih)),ih}var ah={},NR;function UV(){return NR||(NR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PhotoTakenEvent=e.PhotoPrivacyChangedEvent=void 0;const t=Ne(),r=Er();(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={}))})(ah)),ah}var sh={},PR;function FV(){return PR||(PR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EventEndedEvent=e.EventCreatedEvent=e.EventStartsSoonEvent=e.EventStartedEvent=void 0;const t=Ne(),r=Er();(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={}))})(sh)),sh}var oh={},CR;function HV(){return CR||(CR=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=Er(),n=id(),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={}))})(oh)),oh}var uh={},MR;function VV(){return MR||(MR=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=ru(),r=Ne(),n=Er();(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={}))})(uh)),uh}var ch={},DR;function GV(){return DR||(DR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UserWarningCreatedEvent=e.UserBanLiftedEvent=e.UserBanCreatedEvent=void 0;const t=Ne(),r=Er();(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={}))})(ch)),ch}var jR;function zV(){return jR||(jR=1,(function(e){var t=Hi&&Hi.__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=Hi&&Hi.__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(Er(),e),r(NV(),e),r(PV(),e),r(CV(),e),r(MV(),e),r(DV(),e),r(jV(),e),r(LV(),e),r($V(),e),r(qV(),e),r(BV(),e),r(kV(),e),r(UV(),e),r(FV(),e),r(HV(),e),r(VV(),e),r(GV(),e)})(Hi)),Hi}var LR;function sE(){return LR||(LR=1,(function(e){var t=$i&&$i.__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=$i&&$i.__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(pV(),e),r(hV(),e),r(kC(),e),r(rE(),e),r(DC(),e),r(SV(),e),r(FC(),e),r(IV(),e),r(wV(),e),r(OV(),e),r(zV(),e)})($i)),$i}var $R;function WV(){return $R||($R=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableJson=void 0;const t=nd(),r=Sa(),n=tE(),i=Ne(),a=sE();(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={}))})(nm)),nm}var qR;function YV(){return qR||(qR=1,(function(e){var t=Li&&Li.__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=Li&&Li.__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(dV(),e),r(WV(),e)})(Li)),Li}var BR;function xV(){return BR||(BR=1,(function(e){var t=Di&&Di.__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=Di&&Di.__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(lV(),e),r(YV(),e)})(Di)),Di}var Vi={},lh={},kR;function KV(){return kR||(kR=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={}))})(lh)),lh}var dh={},fh={},UR;function zC(){return UR||(UR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getChainId=e.ChainName=void 0;const t=Ne(),r=nn();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={}))})(fh)),fh}var ph={},FR;function rn(){return FR||(FR=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={}))})(ph)),ph}var HR;function nn(){return HR||(HR=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=zC(),n=rn();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={}))})(dh)),dh}var mh={},VR;function XV(){return VR||(VR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Collection=e.CollectionSortBy=void 0;const t=Ne(),r=nn(),n=rn();(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={}))})(mh)),mh}var hh={},yh={},GR;function ad(){return GR||(GR=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={}))})(yh)),yh}var zR;function JV(){return zR||(zR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Contract=e.ContractSortBy=void 0;const t=Ne(),r=nn(),n=rn(),i=ad();(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={}))})(hh)),hh}var gh={},_h={},WR;function WC(){return WR||(WR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFT=e.NFTSortBy=void 0;const t=Ne(),r=nn(),n=sE(),i=rn(),a=ad(),s=nd(),o=Sa();(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={}))})(_h)),_h}var YR;function QV(){return YR||(YR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Item=e.ItemSortBy=void 0;const t=Ne(),r=nn(),n=rn(),i=WC(),a=ad();(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={}))})(gh)),gh}var Eh={},xR;function oE(){return xR||(xR=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={}))})(Eh)),Eh}var vh={},KR;function ZV(){return KR||(KR=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={}))})(vh)),vh}var bh={},XR;function eG(){return XR||(XR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Mint=e.MintSortBy=void 0;const t=Ne(),r=nn(),n=rn();(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={}))})(bh)),bh}var Th={},JR;function tG(){return JR||(JR=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={}))})(Th)),Th}var Sh={},QR;function rG(){return QR||(QR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Order=e.OrderSortBy=void 0;const t=Ne(),r=nn(),n=oE(),i=rn();(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={}))})(Sh)),Sh}var Ih={},ZR;function nG(){return ZR||(ZR=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={}))})(Ih)),Ih}var Rh={},ew;function YC(){return ew||(ew=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={}))})(Rh)),Rh}var wh={},tw;function iG(){return tw||(tw=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Sale=e.SaleSortBy=void 0;const t=Ne(),r=nn(),n=YC(),i=rn();(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={}))})(wh)),wh}var Ah={},rw;function aG(){return rw||(rw=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=nn(),n=rn();(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={}))})(Ah)),Ah}var Oh={},nw;function sG(){return nw||(nw=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={}))})(Oh)),Oh}var Nh={},iw;function oG(){return iw||(iw=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={}))})(Nh)),Nh}var Ph={},aw;function uG(){return aw||(aw=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={}))})(Ph)),Ph}var Ch={},sw;function cG(){return sw||(sw=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={}))})(Ch)),Ch}var Mh={},ow;function lG(){return ow||(ow=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Bid=e.BidSortBy=void 0;const t=Ne(),r=nn(),n=oE(),i=rn();(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={}))})(Mh)),Mh}var Dh={},uw;function dG(){return uw||(uw=1,Object.defineProperty(Dh,"__esModule",{value:!0})),Dh}var jh={},cw;function fG(){return cw||(cw=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={}))})(jh)),jh}var Gi={},Lh={},lw;function pG(){return lw||(lw=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={}))})(Lh)),Lh}var $h={},dw;function mG(){return dw||(dw=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={}))})($h)),$h}var qh={},fw;function hG(){return fw||(fw=1,Object.defineProperty(qh,"__esModule",{value:!0})),qh}var Bh={},pw;function yG(){return pw||(pw=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={}))})(Bh)),Bh}var kh={},mw;function gG(){return mw||(mw=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={}))})(kh)),kh}var Uh={},hw;function _G(){return hw||(hw=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})(Uh)),Uh}var Fh={},yw;function EG(){return yw||(yw=1,Object.defineProperty(Fh,"__esModule",{value:!0})),Fh}var Hh={},gw;function vG(){return gw||(gw=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={}))})(Hh)),Hh}var Vh={},_w;function bG(){return _w||(_w=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={}))})(Vh)),Vh}var Gh={},Ew;function TG(){return Ew||(Ew=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={}))})(Gh)),Gh}var zh={},vw;function SG(){return vw||(vw=1,Object.defineProperty(zh,"__esModule",{value:!0})),zh}var Wh={},bw;function IG(){return bw||(bw=1,Object.defineProperty(Wh,"__esModule",{value:!0})),Wh}var Yh={},Tw;function RG(){return Tw||(Tw=1,Object.defineProperty(Yh,"__esModule",{value:!0})),Yh}var xh={},Sw;function wG(){return Sw||(Sw=1,Object.defineProperty(xh,"__esModule",{value:!0})),xh}var Kh={},Iw;function AG(){return Iw||(Iw=1,Object.defineProperty(Kh,"__esModule",{value:!0})),Kh}var Xh={},Rw;function OG(){return Rw||(Rw=1,Object.defineProperty(Xh,"__esModule",{value:!0})),Xh}var Jh={},ww;function NG(){return ww||(ww=1,Object.defineProperty(Jh,"__esModule",{value:!0})),Jh}var Qh={},Aw;function PG(){return Aw||(Aw=1,Object.defineProperty(Qh,"__esModule",{value:!0})),Qh}var Ow;function CG(){return Ow||(Ow=1,(function(e){var t=Gi&&Gi.__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=Gi&&Gi.__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(pG(),e),r(mG(),e),r(hG(),e),r(yG(),e),r(gG(),e),r(_G(),e),r(EG(),e),r(vG(),e),r(bG(),e),r(TG(),e),r(SG(),e),r(IG(),e),r(RG(),e),r(wG(),e),r(AG(),e),r(OG(),e),r(NG(),e),r(PG(),e)})(Gi)),Gi}var zi={},Ys={},Nw;function MG(){if(Nw)return Ys;Nw=1,Object.defineProperty(Ys,"__esModule",{value:!0}),Ys.isSysLink=void 0;const e=t=>t!==null&&typeof t=="object"&&"sys"in t&&"id"in t.sys;return Ys.isSysLink=e,Ys}var xs={},Pw;function DG(){if(Pw)return xs;Pw=1,Object.defineProperty(xs,"__esModule",{value:!0}),xs.ContentfulLocale=void 0;var e;return(function(t){t.enUS="en-US",t.es="es",t.zh="zh"})(e||(e={})),xs.ContentfulLocale=e,xs}var Zh={},Cw;function jG(){return Cw||(Cw=1,Object.defineProperty(Zh,"__esModule",{value:!0})),Zh}var Mw;function LG(){return Mw||(Mw=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(MG(),e),r(DG(),e),r(jG(),e)})(zi)),zi}var Dw;function $G(){return Dw||(Dw=1,(function(e){var t=Vi&&Vi.__createBinding||(Object.create?(function(z,Y,W,U){U===void 0&&(U=W);var F=Object.getOwnPropertyDescriptor(Y,W);(!F||("get"in F?!Y.__esModule:F.writable||F.configurable))&&(F={enumerable:!0,get:function(){return Y[W]}}),Object.defineProperty(z,U,F)}):(function(z,Y,W,U){U===void 0&&(U=W),z[U]=Y[W]})),r=Vi&&Vi.__exportStar||function(z,Y){for(var W in z)W!=="default"&&!Object.prototype.hasOwnProperty.call(Y,W)&&t(Y,z,W)};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=KV();Object.defineProperty(e,"Account",{enumerable:!0,get:function(){return n.Account}}),Object.defineProperty(e,"AccountSortBy",{enumerable:!0,get:function(){return n.AccountSortBy}});var i=nn();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=zC();Object.defineProperty(e,"ChainName",{enumerable:!0,get:function(){return a.ChainName}}),Object.defineProperty(e,"getChainId",{enumerable:!0,get:function(){return a.getChainId}});var s=XV();Object.defineProperty(e,"Collection",{enumerable:!0,get:function(){return s.Collection}}),Object.defineProperty(e,"CollectionSortBy",{enumerable:!0,get:function(){return s.CollectionSortBy}});var o=JV();Object.defineProperty(e,"Contract",{enumerable:!0,get:function(){return o.Contract}}),Object.defineProperty(e,"ContractSortBy",{enumerable:!0,get:function(){return o.ContractSortBy}});var u=QV();Object.defineProperty(e,"Item",{enumerable:!0,get:function(){return u.Item}}),Object.defineProperty(e,"ItemSortBy",{enumerable:!0,get:function(){return u.ItemSortBy}});var l=oE();Object.defineProperty(e,"ListingStatus",{enumerable:!0,get:function(){return l.ListingStatus}});var c=ZV();Object.defineProperty(e,"MetaTransaction",{enumerable:!0,get:function(){return c.MetaTransaction}});var d=eG();Object.defineProperty(e,"Mint",{enumerable:!0,get:function(){return d.Mint}}),Object.defineProperty(e,"MintSortBy",{enumerable:!0,get:function(){return d.MintSortBy}});var p=rn();Object.defineProperty(e,"Network",{enumerable:!0,get:function(){return p.Network}});var f=ad();Object.defineProperty(e,"NFTCategory",{enumerable:!0,get:function(){return f.NFTCategory}});var _=WC();Object.defineProperty(e,"NFT",{enumerable:!0,get:function(){return _.NFT}}),Object.defineProperty(e,"NFTSortBy",{enumerable:!0,get:function(){return _.NFTSortBy}});var R=tG();Object.defineProperty(e,"CatalogSortBy",{enumerable:!0,get:function(){return R.CatalogSortBy}}),Object.defineProperty(e,"CatalogSortDirection",{enumerable:!0,get:function(){return R.CatalogSortDirection}});var w=rG();Object.defineProperty(e,"Order",{enumerable:!0,get:function(){return w.Order}}),Object.defineProperty(e,"OrderSortBy",{enumerable:!0,get:function(){return w.OrderSortBy}});var O=nG();Object.defineProperty(e,"ProviderType",{enumerable:!0,get:function(){return O.ProviderType}});var h=nd();Object.defineProperty(e,"Rarity",{enumerable:!0,get:function(){return h.Rarity}});var T=YC();Object.defineProperty(e,"SaleType",{enumerable:!0,get:function(){return T.SaleType}});var b=iG();Object.defineProperty(e,"Sale",{enumerable:!0,get:function(){return b.Sale}}),Object.defineProperty(e,"SaleSortBy",{enumerable:!0,get:function(){return b.SaleSortBy}});var m=aG();Object.defineProperty(e,"RentalStatus",{enumerable:!0,get:function(){return m.RentalStatus}}),Object.defineProperty(e,"RentalsListingSortDirection",{enumerable:!0,get:function(){return m.RentalsListingSortDirection}}),Object.defineProperty(e,"RentalsListingsFilterByCategory",{enumerable:!0,get:function(){return m.RentalsListingsFilterByCategory}}),Object.defineProperty(e,"RentalsListingsSortBy",{enumerable:!0,get:function(){return m.RentalsListingsSortBy}}),Object.defineProperty(e,"RentalListingCreation",{enumerable:!0,get:function(){return m.RentalListingCreation}}),Object.defineProperty(e,"PeriodCreation",{enumerable:!0,get:function(){return m.PeriodCreation}});var v=sG();Object.defineProperty(e,"AnalyticsDayDataSortBy",{enumerable:!0,get:function(){return v.AnalyticsDayDataSortBy}});var A=oG();Object.defineProperty(e,"Store",{enumerable:!0,get:function(){return A.Store}});var P=uG();Object.defineProperty(e,"WearableGender",{enumerable:!0,get:function(){return P.WearableGender}}),Object.defineProperty(e,"GenderFilterOption",{enumerable:!0,get:function(){return P.GenderFilterOption}});var q=cG();Object.defineProperty(e,"World",{enumerable:!0,get:function(){return q.World}}),Object.defineProperty(e,"getWorld",{enumerable:!0,get:function(){return q.getWorld}}),Object.defineProperty(e,"isInsideWorldLimits",{enumerable:!0,get:function(){return q.isInsideWorldLimits}}),r(lG(),e),r(dG(),e),r(fG(),e),r(CG(),e),r(LG(),e)})(Vi)),Vi}var ey={},jw;function qG(){return jw||(jw=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={}))})(ey)),ey}var Wi={},ty={},Ks={},Lw;function xC(){if(Lw)return Ks;Lw=1,Object.defineProperty(Ks,"__esModule",{value:!0}),Ks.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 Ks.isInExceptionBlock=n,Ks}var $w;function BG(){return $w||($w=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Parcel=e.PARCEL_LIMITS=void 0;const t=Ne(),r=xC();e.PARCEL_LIMITS={minX:-150,maxX:150,minY:-150,maxY:150},(function(n){n._isInLimits={keyword:"_isInLimits",validate:function(f,_){return!_||typeof _.x!="number"||typeof _.y!="number"?!1:o(_)||(0,r.isInExceptionBlock)(_.x,_.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:p,y:f}){return`${p},${f}`}n.parcelToString=i;function a(p){const f=p.match(/^(-?\d+),(-?\d+)$/);if(!f)return null;const[,_,R]=f,w=parseInt(_,10),O=parseInt(R,10);return{x:w,y:O}}n.stringToParcel=a;function s(p){const f=a(p);return f?n.validate(f):!1}n.isParcelStringValid=s;function o(p){const{x:f,y:_}=p;return f>=e.PARCEL_LIMITS.minX&&f<=e.PARCEL_LIMITS.maxX&&_>=e.PARCEL_LIMITS.minY&&_<=e.PARCEL_LIMITS.maxY}n.isInStandardBounds=o;function u(p){return(0,r.isInExceptionBlock)(p.x,p.y)}n.isExceptionParcel=u;function l(p){return o(p)||u(p)}n.isInBounds=l;function c(p){return n.validate(p)}n.isValid=c;function d(p){const f=a(p);return f?n.validate(f):!1}n.isValidString=d})(e.Parcel||(e.Parcel={}))})(ty)),ty}var Yi={},qw;function kG(){if(qw)return Yi;qw=1,Object.defineProperty(Yi,"__esModule",{value:!0}),Yi.validateUrlInstance=Yi.validateUrl=void 0;const e={allowLocalhost:!1,allowedPorts:[]};function t(f,_=2){let R=f;for(let w=0;w<_;w++)try{R=decodeURIComponent(R)}catch{break}return R.normalize("NFKC")}function r(f){return/[\u0000-\u001F\u007F-\u009F\u202A-\u202E\u2066-\u2069]/.test(f)}function n(f){return!!(f.username||f.password)}function i(f){return/\\/.test(f)}const a=["80","443"];function s(f,_){return!!f.port&&!_.includes(f.port)}function o(f){const _=f.toLowerCase();return!!(_==="localhost"||_.endsWith(".local")||/^(127\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.|192\.168\.|169\.254\.)/.test(_)||_==="::1"||_==="[::1]"||_.startsWith("fe80:")||_.startsWith("fc00:"))}function u(f){if(f.startsWith("//"))return null;try{return{url:new URL(f),wasRelative:!1}}catch{try{return{url:new URL(f,"https://example.com"),wasRelative:!0}}catch{return null}}}function l(f){const _=t(String(f).toLowerCase());return!(r(_)||i(_))}function c(f){return!(!f||f.includes("..")||f.includes("//")||r(f)||i(f))}function d(f,_={}){const R=Object.assign(Object.assign({},e),_),w=[...a,...R.allowedPorts];if(!f||f.length===0||f.length>4096||r(f)||i(f))return!1;const O=t(f);if(r(O)||i(O)||f.startsWith("//"))return!1;const h=u(f);if(!h)return!1;const{url:T,wasRelative:b}=h;if(T.protocol!=="http:"&&T.protocol!=="https:"&&T.protocol!==""||n(T)||i(f)||i(T.href)||!b&&(s(T,w)||!R.allowLocalhost&&T.hostname&&o(T.hostname))||!c(T.pathname)||T.pathname.length>2048)return!1;const m=Array.from(T.searchParams.entries());if(m.length>50||(T.search?T.search.startsWith("?")?T.search.length-1:T.search.length:0)>2048)return!1;for(const[A,P]of m)if(A.length===0||!l(A)||!l(P)||A.length>128||P.length>1024)return!1;return!(T.hash&&r(T.hash))}Yi.validateUrl=d;function p(f,_={}){return d(f.toString(),_)}return Yi.validateUrlInstance=p,Yi}var Bw;function UG(){return Bw||(Bw=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(BG(),e),r(xC(),e),r(kG(),e)})(Wi)),Wi}var kw;function FG(){return kw||(kw=1,(function(e){var t=Vr&&Vr.__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=Vr&&Vr.__setModuleDefault||(Object.create?(function(s,o){Object.defineProperty(s,"default",{enumerable:!0,value:o})}):function(s,o){s.default=o}),n=Vr&&Vr.__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=Vr&&Vr.__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(xV());e.sdk=a,i(Ne(),e),i($G(),e),i(sE(),e),i(Ia(),e),i(qG(),e),i(ru(),e),i(UC(),e),i(GC(),e),i(UG(),e)})(Vr)),Vr}var Uw;function KC(){return Uw||(Uw=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthLink=e.AuthLinkType=e.AuthChain=void 0;const t=FG();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}})})(Zp)),Zp}var Fw;function XC(){return Fw||(Fw=1,(function(e){var t=Hr&&Hr.__createBinding||(Object.create?(function(X,x,L,D){D===void 0&&(D=L);var $=Object.getOwnPropertyDescriptor(x,L);(!$||("get"in $?!x.__esModule:$.writable||$.configurable))&&($={enumerable:!0,get:function(){return x[L]}}),Object.defineProperty(X,D,$)}):(function(X,x,L,D){D===void 0&&(D=L),X[D]=x[L]})),r=Hr&&Hr.__setModuleDefault||(Object.create?(function(X,x){Object.defineProperty(X,"default",{enumerable:!0,value:x})}):function(X,x){X.default=x}),n=Hr&&Hr.__importStar||(function(){var X=function(x){return X=Object.getOwnPropertyNames||function(L){var D=[];for(var $ in L)Object.prototype.hasOwnProperty.call(L,$)&&(D[D.length]=$);return D},X(x)};return function(x){if(x&&x.__esModule)return x;var L={};if(x!=null)for(var D=X(x),$=0;$<D.length;$++)D[$]!=="default"&&t(L,x,D[$]);return r(L,x),L}})(),i=Hr&&Hr.__importDefault||function(X){return X&&X.__esModule?X:{default:X}};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=p,e.isValidAuthChain=f,e.createEIP1271MessageHash=_,e.createSimpleAuthChain=R,e.createAuthChain=w,e.initializeAuthChain=O,e.signPayload=h,e.createSignature=T,e.ownerAddress=b,e.getEphemeralMessage=m,e.getEphemeralSignatureType=W,e.getSignedIdentitySignatureType=U,e.parseEphemeralPayload=F,e.isValidEIP1271Signature=ce;const a=n(td()),s=KH(),o=aV(),u=i(sV()),l=oV(),c=KC();e.VALID_SIGNATURE="VALID_SIGNATURE",e.ERC1654_MAGIC_VALUE="1626ba7e";const d=132;async function p(X,x,L,D=Date.now()){let $="";if(!f(x))return{ok:!1,message:"ERROR: Malformed authChain"};for(const N of x){const j=ne(N.type);try{const{nextAuthority:Z}=await j($,N,{provider:L,dateToValidateExpirationInMillis:D});$=Z||""}catch(Z){const Ee=Z instanceof Error?Z.message:String(Z);return{ok:!1,message:`ERROR. Link type: ${N.type}. ${Ee}.`}}}const V=$===X;return{ok:V,message:V?void 0:`ERROR: Invalid final authority. Expected: ${X}. Current ${$}.`}}function f(X){for(const[x,L]of X.entries())if(x===0&&L.type!==c.AuthLinkType.SIGNER||L.type===c.AuthLinkType.SIGNER&&x!==0)return!1;return!0}function _(X){return(0,a.hexToBytes)((0,a.sha3)((0,a.stringToUtf8Bytes)(X)))}function R(X,x,L){return[{type:c.AuthLinkType.SIGNER,payload:x,signature:""},{type:U(L),payload:X,signature:L}]}function w(X,x,L,D){const $=(0,l.moveMinutes)(L),V=m(x.address,$),N=T(X,V),j=T(x,D);return[{type:c.AuthLinkType.SIGNER,payload:X.address,signature:""},{type:c.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL,payload:V,signature:N},{type:c.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY,payload:D,signature:j}]}async function O(X,x,L,D){const $=(0,l.moveMinutes)(L),V=m(x.address,$),N=await D(V),j=[{type:c.AuthLinkType.SIGNER,payload:X,signature:""},{type:W(N),payload:V,signature:N}];return{ephemeralIdentity:x,expiration:$,authChain:j}}function h(X,x){const L=T(X.ephemeralIdentity,x);return[...X.authChain,{type:c.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY,payload:x,signature:L}]}e.createEthereumMessageHash=o.createEthereumMessageHash;function T(X,x){return(0,o.ethSign)((0,a.hexToBytes)(X.privateKey),x)}function b(X){return X.length>0&&X[0].type===c.AuthLinkType.SIGNER?X[0].payload:"Invalid-Owner-Address"}function m(X,x){return`Decentraland Login
71
- Ephemeral address: ${X}
72
- Expiration: ${x.toISOString()}`}e.Authenticator={validateSignature:p,isValidAuthChain:f,createEIP1271MessageHash:_,createSimpleAuthChain:R,createAuthChain:w,initializeAuthChain:O,signPayload:h,createEthereumMessageHash:e.createEthereumMessageHash,createSignature:T,ownerAddress:b,getEphemeralMessage:m};const v=async(X,x)=>({nextAuthority:x.payload});e.SIGNER_VALIDATOR=v;const A=async(X,x)=>{if(!x.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_SIGNED_ENTITY_VALIDATOR'");const L=(0,o.recoverAddressFromEthSignature)(x.signature,x.payload),D=X.toLocaleLowerCase(),$=L.toLocaleLowerCase();if(D===$)return{nextAuthority:x.payload};throw new Error(`Invalid signer address. Expected: ${D}. Actual: ${$}`)};e.ECDSA_SIGNED_ENTITY_VALIDATOR=A;const P=async(X,x,L)=>{if(!x.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_PERSONAL_EPHEMERAL_VALIDATOR'");const{message:D,ephemeralAddress:$,expiration:V}=F(x.payload),N=(L==null?void 0:L.dateToValidateExpirationInMillis)||Date.now();if(V>N){const j=(0,o.recoverAddressFromEthSignature)(x.signature,D),Z=X.toLocaleLowerCase(),Ee=j.toLocaleLowerCase();if(Z===Ee)return{nextAuthority:$};throw new Error(`Invalid signer address. Expected: ${Z}. Actual: ${Ee}`)}throw new Error(`Ephemeral key expired. Expiration: ${V}. Test: ${N}`)};e.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR=P;const q=async(X,x,L)=>{if(!x.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_EIP_1654_EPHEMERAL_VALIDATOR'");const{message:D,ephemeralAddress:$,expiration:V}=F(x.payload),N=(L==null?void 0:L.dateToValidateExpirationInMillis)||Date.now();if(V>N&&await se(L==null?void 0:L.provider,X,D,x.signature,N))return{nextAuthority:$};throw new Error(`Ephemeral key expired. Expiration: ${V}. Test: ${N}`)};e.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR=q;const z=async(X,x,L)=>{if(!x.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'EIP_1654_SIGNED_ENTITY_VALIDATOR'");if(!L)throw new Error("Missing validation options for 'EIP_1654_SIGNED_ENTITY_VALIDATOR'");if(await se(L.provider,X,x.payload,x.signature,L.dateToValidateExpirationInMillis))return{nextAuthority:x.payload};throw new Error("Invalid validation")};e.EIP_1654_SIGNED_ENTITY_VALIDATOR=z;const Y=async(X,x)=>({error:"Error Validator."});function W(X){return X.length===d?c.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL:c.AuthLinkType.ECDSA_EIP_1654_EPHEMERAL}function U(X){return X.length===d?c.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY:c.AuthLinkType.ECDSA_EIP_1654_SIGNED_ENTITY}function F(X){const x=X.replace(/\r/g,""),L=x.split(`
73
- `),D="Ephemeral address: ",$="Expiration: ";if(L.length<3||!L[1].startsWith(D)||!L[2].startsWith($))throw new Error(`Invalid ephemeral payload. Expected 3 lines with "${D}" on line 2 and "${$}" on line 3.`);const V=L[1].substring(D.length),N=L[2].substring($.length),j=Date.parse(N);if(Number.isNaN(j))throw new Error(`Invalid expiration date in ephemeral payload: "${N}"`);return{message:x,ephemeralAddress:V,expiration:j}}e.parseEmphemeralPayload=F;async function ce(X,x,L,D){const $=_(x),V=(0,a.hexToBytes)(L);let N;try{N=(0,a.bytesToHex)(await X.isValidSignature($,V,D))}catch{}if(N===e.ERC1654_MAGIC_VALUE)return!0;const j=(0,o.createEthereumMessageHash)(x);try{N=(0,a.bytesToHex)(await X.isValidSignature(j,V,D))}catch{}return N===e.ERC1654_MAGIC_VALUE}async function se(X,x,L,D,$){if(!X)throw new Error("Missing provider");const V=new a.default(X),N=await(0,s.SignatureValidator)(V,x);let j=await ce(N,L,D);if(j)return!0;const Z=new u.default(V);try{const{block:Ee}=await Z.getDate($,!1);if(j=await ce(N,L,D,Ee),j)return!0}catch(Ee){const _e=Ee instanceof Error?Ee.message:String(Ee);throw new Error(`Invalid validation. Error: ${_e}`)}throw new Error(`Invalid validation. Expected: ${e.ERC1654_MAGIC_VALUE}. Actual: ${j}`)}function ne(X){switch(X){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 Y}}})(Hr)),Hr}var Mn={},Hw;function HG(){return Hw||(Hw=1,Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.AUTH_METADATA_HEADER=Mn.AUTH_TIMESTAMP_HEADER=Mn.AUTH_CHAIN_HEADER_PREFIX=void 0,Mn.AUTH_CHAIN_HEADER_PREFIX="x-identity-auth-chain-",Mn.AUTH_TIMESTAMP_HEADER="x-identity-timestamp",Mn.AUTH_METADATA_HEADER="x-identity-metadata"),Mn}var Vw;function VG(){return Vw||(Vw=1,(function(e){var t=Ci&&Ci.__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=Ci&&Ci.__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(XC(),e),r(HG(),e),r(KC(),e)})(Ci)),Ci}var GG=VG(),xi={},Wr={},sl={exports:{}},ol={exports:{}},Gw;function uE(){return Gw||(Gw=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})(ol,ol.exports)),ol.exports}var ul={exports:{}},zw;function zG(){return zw||(zw=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})(ul,ul.exports)),ul.exports}var cl={exports:{}},Ww;function WG(){return Ww||(Ww=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})(cl,cl.exports)),cl.exports}var ll={exports:{}},dl={exports:{}},Yw;function JC(){return Yw||(Yw=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})(dl,dl.exports)),dl.exports}var xw;function YG(){return xw||(xw=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=i(uE()),n=i(JC());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})(ll,ll.exports)),ll.exports}var fl={exports:{}},Kw;function xG(){return Kw||(Kw=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var r=n(uE());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(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},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 p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(0,r.default)(d);var f=(i(p)==="object"?p.version:arguments[1])||"";return f?f.toString()==="4"?o.test(d):f.toString()==="6"?l.test(d):!1:c(d,{version:4})||c(d,{version:6})}e.exports=t.default,e.exports.default=t.default})(fl,fl.exports)),fl.exports}var Xw;function KG(){return Xw||(Xw=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=O;var r=u(uE()),n=u(zG()),i=u(WG()),a=u(YG()),s=u(xG()),o=u(JC());function u(h){return h&&h.__esModule?h:{default:h}}function l(h,T){return _(h)||f(h,T)||d(h,T)||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(h,T){if(h){if(typeof h=="string")return p(h,T);var b={}.toString.call(h).slice(8,-1);return b==="Object"&&h.constructor&&(b=h.constructor.name),b==="Map"||b==="Set"?Array.from(h):b==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(b)?p(h,T):void 0}}function p(h,T){(T==null||T>h.length)&&(T=h.length);for(var b=0,m=Array(T);b<T;b++)m[b]=h[b];return m}function f(h,T){var b=h==null?null:typeof Symbol<"u"&&h[Symbol.iterator]||h["@@iterator"];if(b!=null){var m,v,A,P,q=[],z=!0,Y=!1;try{if(A=(b=b.call(h)).next,T!==0)for(;!(z=(m=A.call(b)).done)&&(q.push(m.value),q.length!==T);z=!0);}catch(W){Y=!0,v=W}finally{try{if(!z&&b.return!=null&&(P=b.return(),Object(P)!==P))return}finally{if(Y)throw v}}return q}}function _(h){if(Array.isArray(h))return h}var R={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},w=/^\[([^\]]+)\](?::([0-9]+))?$/;function O(h,T){if((0,r.default)(h),!h||/[\s<>]/.test(h)||h.indexOf("mailto:")===0||(T=(0,o.default)(T,R),T.validate_length&&h.length>T.max_allowed_length)||!T.allow_fragments&&(0,i.default)(h,"#")||!T.allow_query_components&&((0,i.default)(h,"?")||(0,i.default)(h,"&")))return!1;var b,m,v,A,P,q,z,Y;z=h.split("#"),h=z.shift(),z=h.split("?"),h=z.shift();var W=h.match(/^([a-z][a-z0-9+\-.]*):/i),U=!1,F=function(le){return U=!0,b=le.toLowerCase(),T.require_valid_protocol&&T.protocols.indexOf(b)===-1?!1:h.substring(W[0].length)};if(W){var ce=W[1],se=h.substring(W[0].length),ne=se.slice(0,2)==="//";if(ne){if(h=F(ce),h===!1)return!1}else{var X=se.indexOf("/"),x=X===-1?se:se.substring(0,X),L=x.indexOf("@");if(L!==-1){var D=x.substring(0,L),$=/^[a-zA-Z0-9\-_.%:]*$/,V=$.test(D),N=/%[0-9a-fA-F]{2}/.test(D);if(V&&!N){if(T.require_protocol)return!1}else if(h=F(ce),h===!1)return!1}else{var j=/^[0-9]/.test(se);if(j){if(T.require_protocol)return!1}else if(h=F(ce),h===!1)return!1}}}else if(T.require_protocol)return!1;if(h.slice(0,2)==="//"){if(!U&&!T.allow_protocol_relative_urls)return!1;h=h.slice(2)}if(h==="")return!1;if(z=h.split("/"),h=z.shift(),h===""&&!T.require_host)return!0;if(z=h.split("@"),z.length>1){if(T.disallow_auth||z[0]===""||(m=z.shift(),m.indexOf(":")>=0&&m.split(":").length>2))return!1;var Z=m.split(":"),Ee=l(Z,2),_e=Ee[0],Se=Ee[1];if(_e===""&&Se==="")return!1}A=z.join("@"),q=null,Y=null;var Ie=A.match(w);if(Ie?(v="",Y=Ie[1],q=Ie[2]||null):(z=A.split(":"),v=z.shift(),z.length&&(q=z.join(":"))),q!==null&&q.length>0){if(P=parseInt(q,10),!/^[0-9]+$/.test(q)||P<=0||P>65535)return!1}else if(T.require_port)return!1;return T.host_whitelist?(0,n.default)(v,T.host_whitelist):v===""&&!T.require_host?!0:!(!(0,s.default)(v)&&!(0,a.default)(v,T)&&(!Y||!(0,s.default)(Y,6))||(v=v||Y,T.host_blacklist&&(0,n.default)(v,T.host_blacklist)))}e.exports=t.default,e.exports.default=t.default})(sl,sl.exports)),sl.exports}var ry={},Jw;function QC(){return Jw||(Jw=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()}`}})(ry)),ry}var Qw;function XG(){if(Qw)return Wr;Qw=1,Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.clearIdentity=Wr.storeIdentity=Wr.getIdentity=Wr.init=void 0;const e=KG(),t=QC(),r=t.SINGLE_SIGN_ON_TARGET,n=500,i=5;let a=0,s="";const o={protocols:["https"],require_protocol:!0};function u(w,O={}){if(!(0,e.default)(w,{...o,...O}))throw new Error(`Invalid url: ${w}`);if(s)throw new Error("Already initialized");const h=document.createElement("iframe");h.id=r,h.src=w,h.style.width="0",h.style.height="0",h.style.border="none",h.style.position="absolute",document.body.appendChild(h),s=w}Wr.init=u;async function l(w){let O;try{O=(await f(await p(),t.Action.GET,{user:w})).identity??null}catch(h){R(h),O=(0,t.localStorageGetIdentity)(w)}return O}Wr.getIdentity=l;async function c(w,O){try{await f(await p(),t.Action.STORE,{user:w,identity:O})}catch(h){R(h),(0,t.localStorageStoreIdentity)(w,O)}}Wr.storeIdentity=c;async function d(w){try{await f(await p(),t.Action.CLEAR,{user:w})}catch(O){R(O),(0,t.localStorageClearIdentity)(w)}}Wr.clearIdentity=d;async function p(){if(!s)throw new Error("Not initialized");for(let w=0;w<i;w++){const O=document.getElementById(r),h=O==null?void 0:O.contentWindow;if(!h){await _(n);continue}try{await f(h,t.Action.PING,{},n)}catch{continue}return h}throw new Error("Could not get iframe because it is not ready or cannot be communicated with")}async function f(w,O,h,T=0){a++;const b=a;let m=null;const v=new Promise((A,P)=>{m=({data:q})=>{!q||q.target!==t.SINGLE_SIGN_ON_TARGET||q.id!==b||(q.error?P(new Error(q.error)):A(q))},window.addEventListener("message",m)});w.postMessage((0,t.createMessage)({id:b,action:O,...h}),s);try{return await(T?Promise.race([v,new Promise((A,P)=>setTimeout(()=>P(new Error("Did not receive a response in time")),T))]):v)}catch(A){throw A}finally{m&&window.removeEventListener("message",m)}}function _(w){return new Promise(O=>setTimeout(O,w))}function R(w){console.warn("Could not get identity from iframe, falling back to localStorage. Error:",w.message)}return Wr}var Zw;function JG(){return Zw||(Zw=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(XG(),e),r(QC(),e)})(xi)),xi}var zg=JG();function QG(e){const{host:t}=e;return t.endsWith(".org")||t.endsWith(".co")?bn.PRODUCTION:t.endsWith(".today")||t.endsWith(".net")?bn.STAGING:t.endsWith(".io")||t.endsWith(".zone")?bn.DEVELOPMENT:null}function ZG(e){const t=new URLSearchParams(e.search),r=t.get("ENV")||t.get("env");if(r){const n=r.toLowerCase();if(eM(n))return n}return null}var eA={},bn;(function(e){e.DEVELOPMENT="dev",e.STAGING="stg",e.PRODUCTION="prod"})(bn||(bn={}));function ZC(){return Object.values(bn)}function eM(e){return ZC().includes(e)}function pl(e){if(eM(e))return e;throw new Error(`Invalid value for DCL_DEFAULT_ENV. Found "${e}", possible values are ${ZC().map(t=>`"${t}"`).join(", ")}.`)}function e3(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?pl(t):r?pl(r):n?pl(n):i?pl(i):bn.PRODUCTION}function t3(e){if(typeof window<"u"){const r=ZG(window.location);if(r)return r;const n=QG(window.location);if(n)return n}return e3(typeof e>"u"&&typeof yl=="object"&&typeof eA=="object"?eA:e)}function r3(e,t){const r=t3(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 n3="development",i3="80002",a3="https://marketplace-api.decentraland.zone",s3="https://marketplace-api.decentraland.zone",o3="/auth",u3="https://rpc.decentraland.org/amoy",c3="https://credits.decentraland.zone",l3="https://builder-api.decentraland.zone",d3="https://peer.decentraland.zone",f3="",p3="",m3="",h3="",y3={ENVIRONMENT:n3,CHAIN_ID:i3,MARKETPLACE_SERVER_URL:a3,NFT_API_URL:s3,AUTH_URL:o3,RPC_URL:u3,CREDITS_SERVER_URL:c3,BUILDER_SERVER_URL:l3,PEER_URL:d3,SHOP_SERVER_URL:f3,STRIPE_PUBLISHABLE_KEY:p3,SEGMENT_WRITE_KEY:m3,SENTRY_DSN:h3},g3="staging",_3="80002",E3="https://marketplace-api.decentraland.zone",v3="https://marketplace-api.decentraland.zone",b3="/auth",T3="https://rpc.decentraland.org/amoy",S3="https://credits.decentraland.zone",I3="https://builder-api.decentraland.zone",R3="https://peer.decentraland.zone",w3="",A3="",O3="",N3="",P3={ENVIRONMENT:g3,CHAIN_ID:_3,MARKETPLACE_SERVER_URL:E3,NFT_API_URL:v3,AUTH_URL:b3,RPC_URL:T3,CREDITS_SERVER_URL:S3,BUILDER_SERVER_URL:I3,PEER_URL:R3,SHOP_SERVER_URL:w3,STRIPE_PUBLISHABLE_KEY:A3,SEGMENT_WRITE_KEY:O3,SENTRY_DSN:N3},C3="production",M3="137",D3="https://marketplace-api.decentraland.org",j3="https://marketplace-api.decentraland.org",L3="/auth",$3="https://rpc.decentraland.org/polygon",q3="https://credits.decentraland.org",B3="https://builder-api.decentraland.org",k3="https://peer.decentraland.org",U3="",F3="",H3="",V3="",G3={ENVIRONMENT:C3,CHAIN_ID:M3,MARKETPLACE_SERVER_URL:D3,NFT_API_URL:j3,AUTH_URL:L3,RPC_URL:$3,CREDITS_SERVER_URL:q3,BUILDER_SERVER_URL:B3,PEER_URL:k3,SHOP_SERVER_URL:U3,STRIPE_PUBLISHABLE_KEY:F3,SEGMENT_WRITE_KEY:H3,SENTRY_DSN:V3},z3={},Nr=r3({[bn.DEVELOPMENT]:y3,[bn.STAGING]:P3,[bn.PRODUCTION]:G3},{systemEnvVariables:{VITE_DCL_DEFAULT_ENV:"dev"}}),or=z3,Nt={marketplaceServerUrl:or.VITE_MARKETPLACE_SERVER_URL??Nr.get("MARKETPLACE_SERVER_URL"),nftApiUrl:or.VITE_NFT_API_URL??Nr.get("NFT_API_URL"),chainId:Number(or.VITE_CHAIN_ID??Nr.get("CHAIN_ID")),authUrl:or.VITE_AUTH_URL??Nr.get("AUTH_URL"),rpcUrl:or.VITE_RPC_URL??Nr.get("RPC_URL"),creditsServerUrl:or.VITE_CREDITS_SERVER_URL??Nr.get("CREDITS_SERVER_URL"),builderServerUrl:or.VITE_BUILDER_SERVER_URL??Nr.get("BUILDER_SERVER_URL"),peerUrl:or.VITE_PEER_URL??Nr.get("PEER_URL"),shopServerUrl:or.VITE_SHOP_SERVER_URL??Nr.get("SHOP_SERVER_URL"),stripePublishableKey:or.VITE_STRIPE_PK??Nr.get("STRIPE_PUBLISHABLE_KEY"),segmentWriteKey:or.VITE_SEGMENT_WRITE_KEY??Nr.get("SEGMENT_WRITE_KEY"),sentryDsn:or.VITE_SENTRY_DSN??Nr.get("SENTRY_DSN"),sentryEnvironment:or.VITE_SENTRY_ENVIRONMENT??(Number(or.VITE_CHAIN_ID??Nr.get("CHAIN_ID"))===80002?"dev":"prod"),sentryRelease:or.VITE_SENTRY_RELEASE??`shop@${or.VITE_APP_VERSION??"0.0.0-dev"}`},W3=744*60;async function tM(){return(await Gt(async()=>{const{connection:e}=await import("./index-CImDhWkL.js").then(t=>t.i);return{connection:e}},__vite__mapDeps([8,1]))).connection}async function Y3(e){if(!e.account)throw new Error("No account returned by the wallet");const t=e.account.toLowerCase(),r=new zD(e.provider),n=r.getSigner();let i=zg.localStorageGetIdentity(t);if(!i){const a=WD.createRandom();i=await GG.Authenticator.initializeAuthChain(t,{address:a.address,publicKey:VE(a.publicKey),privateKey:VE(a.privateKey)},W3,s=>n.signMessage(s)),zg.localStorageStoreIdentity(t,i)}return{address:t,chainId:e.chainId,signer:n,web3Provider:r,identity:i,providerType:e.providerType}}function x3(){const e=encodeURIComponent(window.location.href);window.location.replace(`${Nt.authUrl}/login?redirectTo=${e}`)}async function K3(){try{const t=await(await tM()).tryPreviousConnection();return!t.account||!zg.localStorageGetIdentity(t.account.toLowerCase())?null:await Y3(t)}catch{return null}}async function X3(){try{await(await tM()).disconnect()}catch{}}const J3=typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():`s-${String(performance.now())}`,Q3=Nt.chainId===80002?"amoy":"polygon",Z3=Nt.chainId===80002?"dev":"prod";function cE(){return window.analytics}function e4(){let e=null;try{e=Rs.getState().session}catch{e=null}return{address:(e==null?void 0:e.address)??null,is_signed_in:!!e,session_id:J3,network:Q3,app_env:Z3}}function ci(e,t={}){const r={...e4(),...t},n=cE();n&&n.track(e,r)}function t4(e,t={}){const r=cE();r&&r.identify(e.toLowerCase(),t)}function r4(){const e=cE();e!=null&&e.reset&&e.reset()}function n4(e){ci("Shop Viewed Page",{page:e})}function tA(e){return e===Jr.ProviderType.MAGIC||e===Jr.ProviderType.MAGIC_TEST?"magic":"wallet"}function i4(e){const t=`shop:seen:${e.toLowerCase()}`;try{return localStorage.getItem(t)?!1:(localStorage.setItem(t,"1"),!0)}catch{return!1}}function qo(e){return Math.round(e*10)/100}function lE(e){return!e.tokenId}function l6(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:qo(e.priceCredits),rarity:e.rarity,creator:e.creator||null,is_primary:lE(e)}}function d6(e){const t=e.reduce((n,i)=>n+i.priceCredits,0),r=e.some(lE);return{items:e.map(n=>({item_id:n.itemId??null,contract_address:n.contractAddress,token_id:n.tokenId??null,price_usd:qo(n.priceCredits)})),value_credits:t,value_usd:qo(t),purchase_type:r?"item":"nft_resale",is_primary:r}}function a4(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 f6(e){return a4(e)==="user_rejected"}function s4(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 rA=!1;function o4(){if(rA)return;rA=!0;const e=Nt.segmentWriteKey;e&&s4(e)}let Wg=null;function u4(e){Wg=e}function nA(e,t={}){const r=typeof t.flow=="string"?`error in ${t.flow}`:"error";if(console.error(`[shop] ${r}`,e,t),Wg)try{Wg(e,t)}catch{}}const c4=/0x[a-fA-F0-9]{130}\b/g,l4=/0x[a-fA-F0-9]{64}\b/g,d4=/(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,f4=/(signature|private|identity|authchain|auth_chain|ephemeral|token|secret|password|cookie|authorization)/i;function Xs(e){return e.replace(c4,"<signature>").replace(d4,"<secret>").replace(l4,"<hex32>")}function p4(e){var r;e.message&&(e.message=Xs(e.message));for(const n of((r=e.exception)==null?void 0:r.values)??[])n.value&&(n.value=Xs(n.value));for(const n of e.breadcrumbs??[])n.message&&(n.message=Xs(n.message));e.request&&(e.request.url&&(e.request.url=Xs(e.request.url)),delete e.request.cookies,delete e.request.headers);const t=n=>{if(n)for(const i of Object.keys(n)){if(f4.test(i)){delete n[i];continue}typeof n[i]=="string"&&(n[i]=Xs(n[i]))}};return t(e.tags),t(e.extra),e}let iA=!1;function m4(){if(iA)return;const e=Nt.sentryDsn;if(!e)return;iA=!0,rU({dsn:e,environment:Nt.sentryEnvironment,release:Nt.sentryRelease,integrations:[new VB],tracesSampleRate:.01,sendDefaultPii:!1,ignoreErrors:[/user rejected/i,/user denied/i,"ResizeObserver loop limit exceeded"],beforeSend:p4});const t=h4();t&&f$({id:t}),u4((r,n)=>R_(r,{extra:n}))}function h4(){var e;try{return((e=Rs.getState().session)==null?void 0:e.address)??null}catch{return null}}const aA="shop-favorites";let vl=null;const rM=e=>e?`${aA}:${e.toLowerCase()}`:aA;function sA(e){var t;try{const r=localStorage.getItem(rM(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 oA(e){try{localStorage.setItem(rM(vl),JSON.stringify(e))}catch{}}const Dl=Is(e=>({items:sA(vl),toggle:t=>e(r=>{const n={...r.items};return n[t.id]?delete n[t.id]:n[t.id]=t,oA(n),{items:n}}),remove:t=>e(r=>{const n={...r.items};return delete n[t],oA(n),{items:n}}),reloadFor:t=>{vl=t?t.toLowerCase():null,e({items:sA(vl)})}})),uA="shop:followed-creators:v1",y4=200;let dE=null;const nM=e=>e?`${uA}:${e.toLowerCase()}`:uA;function cA(){try{const e=localStorage.getItem(nM(dE));if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(r=>typeof r=="string"):[]}catch{return[]}}function lA(e){try{localStorage.setItem(nM(dE),JSON.stringify(e))}catch{}}const Yg=Is((e,t)=>({followed:cA(),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,y4);lA(i),e({followed:i}),ci("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);lA(i),e({followed:i}),ci("Shop Unfollowed Creator",{creator_address:n,following_count:i.length})},toggle:r=>t().isFollowing(r)?t().unfollow(r):t().follow(r),reloadFor:r=>{dE=r?r.toLowerCase():null,e({followed:cA()})}})),ny="shop:signing_in",Rs=Is(e=>({session:null,connecting:!1,error:null,signIn:()=>{try{sessionStorage.setItem(ny,"1")}catch{}x3()},disconnect:async()=>{ci("Shop Signed Out");try{await X3()}catch(t){nA(t,{flow:"wallet",step:"disconnect"})}r4(),Dl.getState().reloadFor(null),Yg.getState().reloadFor(null),e({session:null})},restore:async()=>{let t;try{t=await K3()}catch(n){nA(n,{flow:"wallet",step:"restore"});return}if(!t)return;e({session:t}),Dl.getState().reloadFor(t.address),Yg.getState().reloadFor(t.address),t4(t.address,{sign_in_method:tA(t.providerType)});let r=!1;try{r=sessionStorage.getItem(ny)==="1",r&&sessionStorage.removeItem(ny)}catch{}r&&ci("Shop Signed In",{method:tA(t.providerType),is_new_user:i4(t.address)})}})),g4=Nt.peerUrl;function fE(e){return Ll({queryKey:["profile",e],enabled:!!e,staleTime:5*6e4,queryFn:async()=>{var n;const t=await fetch(`${g4}/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]}})}var Dn={},iy={},dA;function iM(){return dA||(dA=1,Object.defineProperty(iy,"__esModule",{value:!0})),iy}var jn={},pn={},La={},Ki={},fA={},Js,pA;function an(){if(pA)return Js;pA=1;var e=function(t){return t&&t.Math===Math&&t};return Js=e(typeof globalThis=="object"&&globalThis)||e(typeof window=="object"&&window)||e(typeof self=="object"&&self)||e(typeof sg=="object"&&sg)||e(typeof Js=="object"&&Js)||(function(){return this})()||Function("return this")(),Js}var ay,mA;function Ra(){return mA||(mA=1,ay=function(e){try{return!!e()}catch{return!0}}),ay}var sy,hA;function sd(){if(hA)return sy;hA=1;var e=Ra();return sy=!e(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),sy}var oy,yA;function _4(){if(yA)return oy;yA=1;var e=sd(),t=Function.prototype,r=t.apply,n=t.call;return oy=typeof Reflect=="object"&&Reflect.apply||(e?n.bind(r):function(){return n.apply(r,arguments)}),oy}var uy,gA;function ws(){if(gA)return uy;gA=1;var e=sd(),t=Function.prototype,r=t.call,n=e&&t.bind.bind(r,r);return uy=e?n:function(i){return function(){return r.apply(i,arguments)}},uy}var cy,_A;function aM(){if(_A)return cy;_A=1;var e=ws(),t=e({}.toString),r=e("".slice);return cy=function(n){return r(t(n),8,-1)},cy}var ly,EA;function sM(){if(EA)return ly;EA=1;var e=aM(),t=ws();return ly=function(r){if(e(r)==="Function")return t(r)},ly}var dy,vA;function wa(){if(vA)return dy;vA=1;var e=typeof document=="object"&&document.all;return dy=typeof e>"u"&&e!==void 0?function(t){return typeof t=="function"||t===e}:function(t){return typeof t=="function"},dy}var fy={},py,bA;function nu(){if(bA)return py;bA=1;var e=Ra();return py=!e(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),py}var my,TA;function pE(){if(TA)return my;TA=1;var e=sd(),t=Function.prototype.call;return my=e?t.bind(t):function(){return t.apply(t,arguments)},my}var hy={},SA;function E4(){if(SA)return hy;SA=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,r=t&&!e.call({1:2},1);return hy.f=r?function(i){var a=t(this,i);return!!a&&a.enumerable}:e,hy}var yy,IA;function oM(){return IA||(IA=1,yy=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}),yy}var gy,RA;function v4(){if(RA)return gy;RA=1;var e=ws(),t=Ra(),r=aM(),n=Object,i=e("".split);return gy=t(function(){return!n("z").propertyIsEnumerable(0)})?function(a){return r(a)==="String"?i(a,""):n(a)}:n,gy}var _y,wA;function uM(){return wA||(wA=1,_y=function(e){return e==null}),_y}var Ey,AA;function cM(){if(AA)return Ey;AA=1;var e=uM(),t=TypeError;return Ey=function(r){if(e(r))throw new t("Can't call method on "+r);return r},Ey}var vy,OA;function b4(){if(OA)return vy;OA=1;var e=v4(),t=cM();return vy=function(r){return e(t(r))},vy}var by,NA;function od(){if(NA)return by;NA=1;var e=wa();return by=function(t){return typeof t=="object"?t!==null:e(t)},by}var Ty,PA;function lM(){return PA||(PA=1,Ty={}),Ty}var Sy,CA;function T4(){if(CA)return Sy;CA=1;var e=lM(),t=an(),r=wa(),n=function(i){return r(i)?i:void 0};return Sy=function(i,a){return arguments.length<2?n(e[i])||n(t[i]):e[i]&&e[i][a]||t[i]&&t[i][a]},Sy}var Iy,MA;function S4(){if(MA)return Iy;MA=1;var e=ws();return Iy=e({}.isPrototypeOf),Iy}var Ry,DA;function I4(){if(DA)return Ry;DA=1;var e=an(),t=e.navigator,r=t&&t.userAgent;return Ry=r?String(r):"",Ry}var wy,jA;function R4(){if(jA)return wy;jA=1;var e=an(),t=I4(),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]))),wy=o,wy}var Ay,LA;function dM(){if(LA)return Ay;LA=1;var e=R4(),t=Ra(),r=an(),n=r.String;return Ay=!!Object.getOwnPropertySymbols&&!t(function(){var i=Symbol("symbol detection");return!n(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&e&&e<41}),Ay}var Oy,$A;function fM(){if($A)return Oy;$A=1;var e=dM();return Oy=e&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Oy}var Ny,qA;function pM(){if(qA)return Ny;qA=1;var e=T4(),t=wa(),r=S4(),n=fM(),i=Object;return Ny=n?function(a){return typeof a=="symbol"}:function(a){var s=e("Symbol");return t(s)&&r(s.prototype,i(a))},Ny}var Py,BA;function w4(){if(BA)return Py;BA=1;var e=String;return Py=function(t){try{return e(t)}catch{return"Object"}},Py}var Cy,kA;function mM(){if(kA)return Cy;kA=1;var e=wa(),t=w4(),r=TypeError;return Cy=function(n){if(e(n))return n;throw new r(t(n)+" is not a function")},Cy}var My,UA;function A4(){if(UA)return My;UA=1;var e=mM(),t=uM();return My=function(r,n){var i=r[n];return t(i)?void 0:e(i)},My}var Dy,FA;function O4(){if(FA)return Dy;FA=1;var e=pE(),t=wa(),r=od(),n=TypeError;return Dy=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")},Dy}var jy={exports:{}},Ly,HA;function N4(){return HA||(HA=1,Ly=!0),Ly}var $y,VA;function P4(){if(VA)return $y;VA=1;var e=an(),t=Object.defineProperty;return $y=function(r,n){try{t(e,r,{value:n,configurable:!0,writable:!0})}catch{e[r]=n}return n},$y}var GA;function C4(){if(GA)return jy.exports;GA=1;var e=N4(),t=an(),r=P4(),n="__core-js_shared__",i=jy.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"}),jy.exports}var qy,zA;function M4(){if(zA)return qy;zA=1;var e=C4();return qy=function(t,r){return e[t]||(e[t]=r||{})},qy}var By,WA;function D4(){if(WA)return By;WA=1;var e=cM(),t=Object;return By=function(r){return t(e(r))},By}var ky,YA;function mE(){if(YA)return ky;YA=1;var e=ws(),t=D4(),r=e({}.hasOwnProperty);return ky=Object.hasOwn||function(i,a){return r(t(i),a)},ky}var Uy,xA;function j4(){if(xA)return Uy;xA=1;var e=ws(),t=0,r=Math.random(),n=e(1.1.toString);return Uy=function(i){return"Symbol("+(i===void 0?"":i)+")_"+n(++t+r,36)},Uy}var Fy,KA;function L4(){if(KA)return Fy;KA=1;var e=an(),t=M4(),r=mE(),n=j4(),i=dM(),a=fM(),s=e.Symbol,o=t("wks"),u=a?s.for||s:s&&s.withoutSetter||n;return Fy=function(l){return r(o,l)||(o[l]=i&&r(s,l)?s[l]:u("Symbol."+l)),o[l]},Fy}var Hy,XA;function $4(){if(XA)return Hy;XA=1;var e=pE(),t=od(),r=pM(),n=A4(),i=O4(),a=L4(),s=TypeError,o=a("toPrimitive");return Hy=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)},Hy}var Vy,JA;function hM(){if(JA)return Vy;JA=1;var e=$4(),t=pM();return Vy=function(r){var n=e(r,"string");return t(n)?n:n+""},Vy}var Gy,QA;function q4(){if(QA)return Gy;QA=1;var e=an(),t=od(),r=e.document,n=t(r)&&t(r.createElement);return Gy=function(i){return n?r.createElement(i):{}},Gy}var zy,ZA;function yM(){if(ZA)return zy;ZA=1;var e=nu(),t=Ra(),r=q4();return zy=!e&&!t(function(){return Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a!==7}),zy}var eO;function B4(){if(eO)return fy;eO=1;var e=nu(),t=pE(),r=E4(),n=oM(),i=b4(),a=hM(),s=mE(),o=yM(),u=Object.getOwnPropertyDescriptor;return fy.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])},fy}var Wy,tO;function k4(){if(tO)return Wy;tO=1;var e=Ra(),t=wa(),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 Wy=n,Wy}var Yy,rO;function U4(){if(rO)return Yy;rO=1;var e=sM(),t=mM(),r=sd(),n=e(e.bind);return Yy=function(i,a){return t(i),a===void 0?i:r?n(i,a):function(){return i.apply(a,arguments)}},Yy}var xy={},Ky,nO;function F4(){if(nO)return Ky;nO=1;var e=nu(),t=Ra();return Ky=e&&t(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Ky}var Xy,iO;function H4(){if(iO)return Xy;iO=1;var e=od(),t=String,r=TypeError;return Xy=function(n){if(e(n))return n;throw new r(t(n)+" is not an object")},Xy}var aO;function V4(){if(aO)return xy;aO=1;var e=nu(),t=yM(),r=F4(),n=H4(),i=hM(),a=TypeError,s=Object.defineProperty,o=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return xy.f=e?r?function(p,f,_){if(n(p),f=i(f),n(_),typeof p=="function"&&f==="prototype"&&"value"in _&&c in _&&!_[c]){var R=o(p,f);R&&R[c]&&(p[f]=_.value,_={configurable:l in _?_[l]:R[l],enumerable:u in _?_[u]:R[u],writable:!1})}return s(p,f,_)}:s:function(p,f,_){if(n(p),f=i(f),n(_),t)try{return s(p,f,_)}catch{}if("get"in _||"set"in _)throw new a("Accessors not supported");return"value"in _&&(p[f]=_.value),p},xy}var Jy,sO;function G4(){if(sO)return Jy;sO=1;var e=nu(),t=V4(),r=oM();return Jy=e?function(n,i,a){return t.f(n,i,r(1,a))}:function(n,i,a){return n[i]=a,n},Jy}var Qy,oO;function z4(){if(oO)return Qy;oO=1;var e=an(),t=_4(),r=sM(),n=wa(),i=B4().f,a=k4(),s=lM(),o=U4(),u=G4(),l=mE(),c=function(d){var p=function(f,_,R){if(this instanceof p){switch(arguments.length){case 0:return new d;case 1:return new d(f);case 2:return new d(f,_)}return new d(f,_,R)}return t(d,this,arguments)};return p.prototype=d.prototype,p};return Qy=function(d,p){var f=d.target,_=d.global,R=d.stat,w=d.proto,O=_?e:R?e[f]:e[f]&&e[f].prototype,h=_?s:s[f]||u(s,f,{})[f],T=h.prototype,b,m,v,A,P,q,z,Y,W;for(A in p)b=a(_?A:f+(R?".":"#")+A,d.forced),m=!b&&O&&l(O,A),q=h[A],m&&(d.dontCallGetSet?(W=i(O,A),z=W&&W.value):z=O[A]),P=m&&z?z:p[A],!(!b&&!w&&typeof q==typeof P)&&(d.bind&&m?Y=o(P,e):d.wrap&&m?Y=c(P):w&&n(P)?Y=r(P):Y=P,(d.sham||P&&P.sham||q&&q.sham)&&u(Y,"sham",!0),u(h,A,Y),w&&(v=f+"Prototype",l(s,v)||u(s,v,{}),u(s[v],A,P),d.real&&T&&(b||!T[A])&&u(T,A,P)))},Qy}var uO;function W4(){if(uO)return fA;uO=1;var e=z4(),t=an();return e({global:!0,forced:t.globalThis!==t},{globalThis:t}),fA}var Zy,cO;function Y4(){return cO||(cO=1,W4(),Zy=an()),Zy}var eg,lO;function x4(){if(lO)return eg;lO=1;var e=Y4();return eg=e,eg}var dO;function gM(){if(dO)return Ki;dO=1;var e=Ki&&Ki.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.getImplementation=void 0;var t=e(x4());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 Ki.getImplementation=r,Ki}var fO;function _M(){if(fO)return La;fO=1;var e=La&&La.__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(La,"__esModule",{value:!0});var t=XC(),r=gM(),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,p,f,_){var R,w,O=new u(_),h=String(Date.now()),T=JSON.stringify(f),b=[d,p,h,T].join(":").toLowerCase(),m=0,v=t.Authenticator.signPayload(c,b);try{for(var A=e(v),P=A.next();!P.done;P=A.next()){var q=P.value;O.set(n+m,JSON.stringify(q)),m++}}catch(z){R={error:z}}finally{try{P&&!P.done&&(w=A.return)&&w.call(A)}finally{if(R)throw R.error}}return O.set(i,h),O.set(a,T),O}}return La.default=s,La}var pO;function EM(){if(pO)return pn;pO=1;var e=pn&&pn.__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=pn&&pn.__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=pn&&pn.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(pn,"__esModule",{value:!0});var n=r(_M()),i=gM();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(p,f){if(f&&f.identity){var _=f.identity,R=f.metadata,w=t(f,["identity","metadata"]);if(typeof p=="string"||p instanceof u||globalThis.URL&&p instanceof globalThis.URL){var O=typeof p=="string"?new u(p):p,h=new l(O.toString(),e(e({},w),{headers:o(_,f.method||"GET",O.pathname,R||{},w==null?void 0:w.headers)}));return c(h)}var T=new u(p.url),b=new l(p),m=o(_,p.method||"GET",T.pathname,R||{});return m.forEach(function(v,A){b.headers.set(A,v)}),c(b)}return c(p,f)}}return pn.default=a,pn}var mO;function K4(){return mO||(mO=1,(function(e){var t=jn&&jn.__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=jn&&jn.__exportStar||function(s,o){for(var u in s)u!=="default"&&!Object.prototype.hasOwnProperty.call(o,u)&&t(o,s,u)},n=jn&&jn.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(e,"__esModule",{value:!0}),e.signedHeaderFactory=e.signedFetchFactory=void 0,r(iM(),e);var i=EM();Object.defineProperty(e,"signedFetchFactory",{enumerable:!0,get:function(){return n(i).default}});var a=_M();Object.defineProperty(e,"signedHeaderFactory",{enumerable:!0,get:function(){return n(a).default}})})(jn)),jn}var hO;function X4(){return hO||(hO=1,(function(e){var t=Dn&&Dn.__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=Dn&&Dn.__exportStar||function(a,s){for(var o in a)o!=="default"&&!Object.prototype.hasOwnProperty.call(s,o)&&t(s,a,o)},n=Dn&&Dn.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0}),r(iM(),e),r(K4(),e);var i=n(EM());e.default=(0,i.default)()})(Dn)),Dn}var J4=X4();const ud=WO(J4);async function Q4(e,t){const r=`${Nt.creditsServerUrl}/users/${e.toLowerCase()}/credits`,n=await ud(r,{method:"GET",identity:t,metadata:{}});if(!n.ok)throw new Error(`getUserCredits ${n.status}: ${await n.text()}`);return n.json()}async function Z4(e,t){const{usd:r}=await Q4(e,t);return r??{balanceCents:0,credits:0}}async function p6(e,t,r){const n=`${Nt.creditsServerUrl}/credits/authorize`,i=await ud(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 m6(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=`${Nt.creditsServerUrl}/users/${e.toLowerCase()}/purchases${i?`?${i}`:""}`,s=await ud(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 h6(e,t){if(t.length===0)return 0;const r=`${Nt.creditsServerUrl}/credits/authorize/cancel`,n=await ud(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 y6(e,t=1e3){const r=await fetch(`${Nt.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 ez(e){return Ll({queryKey:["usd-balance",e==null?void 0:e.address],enabled:!!e,staleTime:3e4,queryFn:async()=>Z4(e.address,e.identity)})}const tz=e=>qo(e.reduce((t,r)=>t+r.priceCredits,0)),Kr=Is((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;ci("Shop Added To Cart",{item_id:r.itemId??null,contract_address:r.contractAddress,price_credits:r.priceCredits,price_usd:qo(r.priceCredits),is_primary:!r.tokenId,source:n,cart_size:a.length,cart_value_usd:tz(a)})},remove:r=>{const n=t().items.find(i=>i.id===r);e(i=>({items:i.items.filter(a=>a.id!==r)})),n&&ci("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})})),ds={name:"credits",nameSingular:"credit",symbol:"◈",iconClass:"ico-credits"};function g6(e){return`${e} ${e===1?ds.nameSingular:ds.name}`}function Un({className:e}){return J.jsx("span",{className:`ico ${ds.iconClass}${e?` ${e}`:""}`,"aria-hidden":!0})}function rz(){const e=Kr(s=>s.items),t=Kr(s=>s.open),r=Kr(s=>s.setOpen),n=Kr(s=>s.setFittingOpen),i=Me.useRef(null),a=e.reduce((s,o)=>s+o.priceCredits,0);return Me.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:J.jsxs("div",{className:"cart-pop",ref:i,role:"dialog","aria-label":"Cart",children:[J.jsxs("div",{className:"cart-pop__head",children:[J.jsx("span",{className:"ico ico-cart","aria-hidden":!0})," Added to cart"]}),J.jsx("div",{className:"cart-pop__list",children:e.slice(-4).map(s=>J.jsxs("div",{className:"cart-pop__row",children:[J.jsx("div",{className:"cart-pop__thumb",children:s.thumbnail?J.jsx("img",{src:s.thumbnail,alt:s.name}):null}),J.jsx("div",{className:"cart-pop__name",title:s.name,children:s.name}),J.jsxs("div",{className:"cart-pop__price",children:[J.jsx(Un,{className:"ccy-mark"})," ",s.priceCredits]})]},s.id))}),J.jsxs("div",{className:"cart-pop__foot",children:[J.jsxs("span",{className:"cart-pop__total",children:[e.length," item",e.length>1?"s":""," · ",J.jsxs("strong",{children:[J.jsx(Un,{className:"ccy-mark"})," ",a]})]}),J.jsxs("div",{className:"cart-pop__actions",children:[J.jsx("button",{className:"btn btn--ghost btn--sm",onClick:()=>n(!0),children:"Try on"}),J.jsx(Oo,{className:"btn btn--purple btn--sm",to:"/cart",onClick:()=>r(!1),children:"Checkout"})]})]})]})}var xg=function(e,t){return xg=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])},xg(e,t)};function Mr(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");xg(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 As(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 vM(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 bM(e,t){return function(r,n){t(r,n,e)}}function TM(e,t,r,n,i,a){function s(O){if(O!==void 0&&typeof O!="function")throw new TypeError("Function expected");return O}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,p=!1,f=r.length-1;f>=0;f--){var _={};for(var R in n)_[R]=R==="access"?{}:n[R];for(var R in n.access)_.access[R]=n.access[R];_.addInitializer=function(O){if(p)throw new TypeError("Cannot add initializers after decoration has completed");a.push(s(O||null))};var w=(0,r[f])(o==="accessor"?{get:c.get,set:c.set}:c[u],_);if(o==="accessor"){if(w===void 0)continue;if(w===null||typeof w!="object")throw new TypeError("Object expected");(d=s(w.get))&&(c.get=d),(d=s(w.set))&&(c.set=d),(d=s(w.init))&&i.unshift(d)}else(d=s(w))&&(o==="field"?i.unshift(d):c[u]=d)}l&&Object.defineProperty(l,n.name,c),p=!0}function SM(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 IM(e){return typeof e=="symbol"?e:"".concat(e)}function RM(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 wM(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function AM(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 OM(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 cd=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 NM(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&cd(t,e,r)}function jl(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 hE(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 PM(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(hE(arguments[t]));return e}function CM(){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 er(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 fs(e){return this instanceof fs?(this.v=e,this):new fs(e)}function MM(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(f){return function(_){return Promise.resolve(_).then(f,d)}}function o(f,_){n[f]&&(i[f]=function(R){return new Promise(function(w,O){a.push([f,R,w,O])>1||u(f,R)})},_&&(i[f]=_(i[f])))}function u(f,_){try{l(n[f](_))}catch(R){p(a[0][3],R)}}function l(f){f.value instanceof fs?Promise.resolve(f.value.v).then(c,d):p(a[0][2],f)}function c(f){u("next",f)}function d(f){u("throw",f)}function p(f,_){f(_),a.shift(),a.length&&u(a[0][0],a[0][1])}}function DM(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:fs(e[i](s)),done:!1}:a?a(s):s}:a}}function jM(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 jl=="function"?jl(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 LM(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var nz=Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t},Kg=function(e){return Kg=Object.getOwnPropertyNames||function(t){var r=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[r.length]=n);return r},Kg(e)};function $M(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=Kg(e),n=0;n<r.length;n++)r[n]!=="default"&&cd(t,e,r[n]);return nz(t,e),t}function qM(e){return e&&e.__esModule?e:{default:e}}function BM(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 kM(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 UM(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 FM(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 iz=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 HM(e){function t(a){e.error=e.hasError?new iz(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 VM(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 az={__extends:Mr,__assign:qe,__rest:As,__decorate:vM,__param:bM,__esDecorate:TM,__runInitializers:SM,__propKey:IM,__setFunctionName:RM,__metadata:wM,__awaiter:AM,__generator:OM,__createBinding:cd,__exportStar:NM,__values:jl,__read:hE,__spread:PM,__spreadArrays:CM,__spreadArray:er,__await:fs,__asyncGenerator:MM,__asyncDelegator:DM,__asyncValues:jM,__makeTemplateObject:LM,__importStar:$M,__importDefault:qM,__classPrivateFieldGet:BM,__classPrivateFieldSet:kM,__classPrivateFieldIn:UM,__addDisposableResource:FM,__disposeResources:HM,__rewriteRelativeImportExtension:VM},_6=Object.freeze(Object.defineProperty({__proto__:null,__addDisposableResource:FM,get __assign(){return qe},__asyncDelegator:DM,__asyncGenerator:MM,__asyncValues:jM,__await:fs,__awaiter:AM,__classPrivateFieldGet:BM,__classPrivateFieldIn:UM,__classPrivateFieldSet:kM,__createBinding:cd,__decorate:vM,__disposeResources:HM,__esDecorate:TM,__exportStar:NM,__extends:Mr,__generator:OM,__importDefault:qM,__importStar:$M,__makeTemplateObject:LM,__metadata:wM,__param:bM,__propKey:IM,__read:hE,__rest:As,__rewriteRelativeImportExtension:VM,__runInitializers:SM,__setFunctionName:RM,__spread:PM,__spreadArray:er,__spreadArrays:CM,__values:jl,default:az},Symbol.toStringTag,{value:"Module"}));function hr(e,t){var r=t&&t.cache?t.cache:dz,n=t&&t.serializer?t.serializer:lz,i=t&&t.strategy?t.strategy:uz;return i(e,{cache:r,serializer:n})}function sz(e){return e==null||typeof e=="number"||typeof e=="boolean"}function oz(e,t,r,n){var i=sz(n)?n:r(n),a=t.get(i);return typeof a>"u"&&(a=e.call(this,n),t.set(i,a)),a}function GM(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 zM(e,t,r,n,i){return r.bind(t,e,n,i)}function uz(e,t){var r=e.length===1?oz:GM;return zM(e,this,r,t.cache.create(),t.serializer)}function cz(e,t){return zM(e,this,GM,t.cache.create(),t.serializer)}var lz=function(){return JSON.stringify(arguments)};function yE(){this.cache=Object.create(null)}yE.prototype.get=function(e){return this.cache[e]};yE.prototype.set=function(e,t){this.cache[e]=t};var dz={create:function(){return new yE}},yr={variadic:cz};function WM(e,t,r){if(r===void 0&&(r=Error),!e)throw new r(t)}hr(function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.NumberFormat).bind.apply(e,er([void 0],t,!1)))},{strategy:yr.variadic});hr(function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.DateTimeFormat).bind.apply(e,er([void 0],t,!1)))},{strategy:yr.variadic});hr(function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.PluralRules).bind.apply(e,er([void 0],t,!1)))},{strategy:yr.variadic});hr(function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.Locale).bind.apply(e,er([void 0],t,!1)))},{strategy:yr.variadic});hr(function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.ListFormat).bind.apply(e,er([void 0],t,!1)))},{strategy:yr.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 Dt;(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"})(Dt||(Dt={}));var ps;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(ps||(ps={}));function yO(e){return e.type===Dt.literal}function fz(e){return e.type===Dt.argument}function YM(e){return e.type===Dt.number}function xM(e){return e.type===Dt.date}function KM(e){return e.type===Dt.time}function XM(e){return e.type===Dt.select}function JM(e){return e.type===Dt.plural}function pz(e){return e.type===Dt.pound}function QM(e){return e.type===Dt.tag}function ZM(e){return!!(e&&typeof e=="object"&&e.type===ps.number)}function Xg(e){return!!(e&&typeof e=="object"&&e.type===ps.dateTime)}var eD=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,mz=/(?:[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 hz(e){var t={};return e.replace(mz,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 yz=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function gz(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(yz).filter(function(p){return p.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 _z(e){return e.replace(/^(.*?)-/,"")}var gO=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,tD=/^(@+)?(\+|#+)?[rs]?$/g,Ez=/(\*)(0+)|(#+)(0+)|(0+)/g,rD=/^(0+)$/;function _O(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(tD,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 nD(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 vz(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)),!rD.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function EO(e){var t={},r=nD(e);return r||t}function bz(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=_z(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),EO(l))},{}));continue;case"engineering":t=qe(qe(qe({},t),{notation:"engineering"}),i.options.reduce(function(u,l){return qe(qe({},u),EO(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(Ez,function(u,l,c,d,p,f){if(l)t.minimumIntegerDigits=c.length;else{if(d&&p)throw new Error("We currently do not support maximum integer digits");if(f)throw new Error("We currently do not support exact integer digits")}return""});continue}if(rD.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(gO.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(gO,function(u,l,c,d,p,f){return c==="*"?t.minimumFractionDigits=l.length:d&&d[0]==="#"?t.maximumFractionDigits=d.length:p&&f?(t.minimumFractionDigits=p.length,t.maximumFractionDigits=p.length+f.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),_O(a)));continue}if(tD.test(i.stem)){t=qe(qe({},t),_O(i.stem));continue}var s=nD(i.stem);s&&(t=qe(qe({},t),s));var o=vz(i.stem);o&&(t=qe(qe({},t),o))}return t}var ml={"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 Tz(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=Sz(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 Sz(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=ml[n||""]||ml[r||""]||ml["".concat(r,"-001")]||ml["001"];return i[0]}var tg,Iz=new RegExp("^".concat(eD.source,"*")),Rz=new RegExp("".concat(eD.source,"*$"));function ct(e,t){return{start:e,end:t}}var wz=!!String.prototype.startsWith&&"_a".startsWith("a",1),Az=!!String.fromCodePoint,Oz=!!Object.fromEntries,Nz=!!String.prototype.codePointAt,Pz=!!String.prototype.trimStart,Cz=!!String.prototype.trimEnd,Mz=!!Number.isSafeInteger,Dz=Mz?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Jg=!0;try{var jz=aD("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Jg=((tg=jz.exec("a"))===null||tg===void 0?void 0:tg[0])==="a"}catch{Jg=!1}var vO=wz?function(t,r,n){return t.startsWith(r,n)}:function(t,r,n){return t.slice(n,n+r.length)===r},Qg=Az?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},bO=Oz?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},iD=Nz?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}},Lz=Pz?function(t){return t.trimStart()}:function(t){return t.replace(Iz,"")},$z=Cz?function(t){return t.trimEnd()}:function(t){return t.replace(Rz,"")};function aD(e,t){return new RegExp(e,t)}var Zg;if(Jg){var TO=aD("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Zg=function(t,r){var n;TO.lastIndex=r;var i=TO.exec(t);return(n=i[1])!==null&&n!==void 0?n:""}}else Zg=function(t,r){for(var n=[];;){var i=iD(t,r);if(i===void 0||sD(i)||Uz(i))break;n.push(i),r+=i>=65536?2:1}return Qg.apply(void 0,n)};var qz=(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:Dt.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&&e_(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:Dt.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()||!e_(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:Dt.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()&&kz(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:Dt.literal,value:i,location:u},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Bz(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 Qg.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(),Qg(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:Dt.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=Zg(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 p=$z(d.val);if(p.length===0)return this.error(at.EXPECT_ARGUMENT_STYLE,ct(this.clonePosition(),this.clonePosition()));var f=ct(c,this.clonePosition());l={style:p,styleLocation:f}}var _=this.tryParseArgumentClose(i);if(_.err)return _;var R=ct(i,this.clonePosition());if(l&&vO(l==null?void 0:l.style,"::",0)){var w=Lz(l.style.slice(2));if(o==="number"){var d=this.parseNumberSkeletonFromString(w,l.styleLocation);return d.err?d:{val:{type:Dt.number,value:n,location:R,style:d.val},err:null}}else{if(w.length===0)return this.error(at.EXPECT_DATE_TIME_SKELETON,R);var O=w;this.locale&&(O=Tz(w,this.locale));var p={type:ps.dateTime,pattern:O,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?hz(O):{}},h=o==="date"?Dt.date:Dt.time;return{val:{type:h,value:n,location:R,style:p},err:null}}}return{val:{type:o==="number"?Dt.number:o==="date"?Dt.date:Dt.time,value:n,location:R,style:(a=l==null?void 0:l.style)!==null&&a!==void 0?a:null},err:null}}case"plural":case"selectordinal":case"select":{var T=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(at.EXPECT_SELECT_ARGUMENT_OPTIONS,ct(T,qe({},T)));this.bumpSpace();var b=this.parseIdentifierIfPossible(),m=0;if(o!=="select"&&b.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(),b=this.parseIdentifierIfPossible(),m=d.val}var v=this.tryParsePluralOrSelectOptions(t,o,r,b);if(v.err)return v;var _=this.tryParseArgumentClose(i);if(_.err)return _;var A=ct(i,this.clonePosition());return o==="select"?{val:{type:Dt.select,value:n,options:bO(v.val),location:A},err:null}:{val:{type:Dt.plural,value:n,options:bO(v.val),offset:m,pluralType:o==="plural"?"cardinal":"ordinal",location:A},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=gz(t)}catch{return this.error(at.INVALID_NUMBER_SKELETON,r)}return{val:{type:ps.number,tokens:n,location:r,parsedOptions:this.shouldParseSkeletons?bz(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 p=this.tryParseDecimalInteger(at.EXPECT_PLURAL_ARGUMENT_SELECTOR,at.INVALID_PLURAL_ARGUMENT_SELECTOR);if(p.err)return p;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 f=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 _=this.parseMessage(t+1,r,n);if(_.err)return _;var R=this.tryParseArgumentClose(f);if(R.err)return R;o.push([l,{value:_.val,location:ct(f,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,Dz(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=iD(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(vO(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()&&sD(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 e_(e){return e>=97&&e<=122||e>=65&&e<=90}function Bz(e){return e_(e)||e===47}function kz(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 sD(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Uz(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 t_(e){e.forEach(function(t){if(delete t.location,XM(t)||JM(t))for(var r in t.options)delete t.options[r].location,t_(t.options[r].value);else YM(t)&&ZM(t.style)||(xM(t)||KM(t))&&Xg(t.style)?delete t.style.location:QM(t)&&t_(t.children)})}function Fz(e,t){t===void 0&&(t={}),t=qe({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new qz(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||t_(r.val),r.val}var Tn;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Tn||(Tn={}));var di=(function(e){Mr(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),SO=(function(e){Mr(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('", "'),'"'),Tn.INVALID_VALUE,a)||this}return t})(di),Hz=(function(e){Mr(t,e);function t(r,n,i){return e.call(this,'Value for "'.concat(r,'" must be of type ').concat(n),Tn.INVALID_VALUE,i)||this}return t})(di),Vz=(function(e){Mr(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,'"'),Tn.MISSING_VALUE,n)||this}return t})(di),mr;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(mr||(mr={}));function Gz(e){return e.length<2?e:e.reduce(function(t,r){var n=t[t.length-1];return!n||n.type!==mr.literal||r.type!==mr.literal?t.push(r):n.value+=r.value,t},[])}function oD(e){return typeof e=="function"}function bl(e,t,r,n,i,a,s){if(e.length===1&&yO(e[0]))return[{type:mr.literal,value:e[0].value}];for(var o=[],u=0,l=e;u<l.length;u++){var c=l[u];if(yO(c)){o.push({type:mr.literal,value:c.value});continue}if(pz(c)){typeof a=="number"&&o.push({type:mr.literal,value:r.getNumberFormat(t).format(a)});continue}var d=c.value;if(!(i&&d in i))throw new Vz(d,s);var p=i[d];if(fz(c)){(!p||typeof p=="string"||typeof p=="number")&&(p=typeof p=="string"||typeof p=="number"?String(p):""),o.push({type:typeof p=="string"?mr.literal:mr.object,value:p});continue}if(xM(c)){var f=typeof c.style=="string"?n.date[c.style]:Xg(c.style)?c.style.parsedOptions:void 0;o.push({type:mr.literal,value:r.getDateTimeFormat(t,f).format(p)});continue}if(KM(c)){var f=typeof c.style=="string"?n.time[c.style]:Xg(c.style)?c.style.parsedOptions:n.time.medium;o.push({type:mr.literal,value:r.getDateTimeFormat(t,f).format(p)});continue}if(YM(c)){var f=typeof c.style=="string"?n.number[c.style]:ZM(c.style)?c.style.parsedOptions:void 0;f&&f.scale&&(p=p*(f.scale||1)),o.push({type:mr.literal,value:r.getNumberFormat(t,f).format(p)});continue}if(QM(c)){var _=c.children,R=c.value,w=i[R];if(!oD(w))throw new Hz(R,"function",s);var O=bl(_,t,r,n,i,a),h=w(O.map(function(m){return m.value}));Array.isArray(h)||(h=[h]),o.push.apply(o,h.map(function(m){return{type:typeof m=="string"?mr.literal:mr.object,value:m}}))}if(XM(c)){var T=c.options[p]||c.options.other;if(!T)throw new SO(c.value,p,Object.keys(c.options),s);o.push.apply(o,bl(T.value,t,r,n,i));continue}if(JM(c)){var T=c.options["=".concat(p)];if(!T){if(!Intl.PluralRules)throw new di(`Intl.PluralRules is not available in this environment.
75
- Try polyfilling it using "@formatjs/intl-pluralrules"
76
- `,Tn.MISSING_INTL_API,s);var b=r.getPluralRules(t,{type:c.pluralType}).select(p-(c.offset||0));T=c.options[b]||c.options.other}if(!T)throw new SO(c.value,p,Object.keys(c.options),s);o.push.apply(o,bl(T.value,t,r,n,i,p-(c.offset||0)));continue}}return Gz(o)}function zz(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 Wz(e,t){return t?Object.keys(e).reduce(function(r,n){return r[n]=zz(e[n],t[n]),r},qe({},e)):e}function rg(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}function Yz(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:hr(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.NumberFormat).bind.apply(t,er([void 0],r,!1)))},{cache:rg(e.number),strategy:yr.variadic}),getDateTimeFormat:hr(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.DateTimeFormat).bind.apply(t,er([void 0],r,!1)))},{cache:rg(e.dateTime),strategy:yr.variadic}),getPluralRules:hr(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.PluralRules).bind.apply(t,er([void 0],r,!1)))},{cache:rg(e.pluralRules),strategy:yr.variadic})}}var uD=(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,p){return!d.length||p.type!==mr.literal||typeof d[d.length-1]!="string"?d.push(p.value):d[d.length-1]+=p.value,d},[]);return c.length<=1?c[0]||"":c},this.formatToParts=function(u){return bl(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=As(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=Wz(e.formats,n),this.formatters=i&&i.formatters||Yz(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=Fz,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})(),ma;(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"})(ma||(ma={}));var iu=(function(e){Mr(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,`
77
- `).concat(s?`
78
- `.concat(s.message,`
79
- `).concat(s.stack):""))||this,a.code=r,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(a,t),a}return t})(Error),xz=(function(e){Mr(t,e);function t(r,n){return e.call(this,ma.UNSUPPORTED_FORMATTER,r,n)||this}return t})(iu),Kz=(function(e){Mr(t,e);function t(r,n){return e.call(this,ma.INVALID_CONFIG,r,n)||this}return t})(iu),IO=(function(e){Mr(t,e);function t(r,n){return e.call(this,ma.MISSING_DATA,r,n)||this}return t})(iu),qr=(function(e){Mr(t,e);function t(r,n,i){var a=e.call(this,ma.FORMAT_ERROR,"".concat(r,`
80
- Locale: `).concat(n,`
81
- `),i)||this;return a.locale=n,a}return t})(iu),ng=(function(e){Mr(t,e);function t(r,n,i,a){var s=e.call(this,"".concat(r,`
82
- MessageID: `).concat(i==null?void 0:i.id,`
83
- Default Message: `).concat(i==null?void 0:i.defaultMessage,`
84
- Description: `).concat(i==null?void 0:i.description,`
85
- `),n,a)||this;return s.descriptor=i,s.locale=n,s}return t})(qr),Xz=(function(e){Mr(t,e);function t(r,n){var i=e.call(this,ma.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})(iu);function Aa(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 Jz=function(e){},Qz=function(e){},cD={formats:{},messages:{},timeZone:void 0,defaultLocale:"en",defaultFormats:{},fallbackOnEmptyString:!0,onError:Jz,onWarn:Qz};function lD(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function Xi(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}function Zz(e){e===void 0&&(e=lD());var t=Intl.RelativeTimeFormat,r=Intl.ListFormat,n=Intl.DisplayNames,i=hr(function(){for(var o,u=[],l=0;l<arguments.length;l++)u[l]=arguments[l];return new((o=Intl.DateTimeFormat).bind.apply(o,er([void 0],u,!1)))},{cache:Xi(e.dateTime),strategy:yr.variadic}),a=hr(function(){for(var o,u=[],l=0;l<arguments.length;l++)u[l]=arguments[l];return new((o=Intl.NumberFormat).bind.apply(o,er([void 0],u,!1)))},{cache:Xi(e.number),strategy:yr.variadic}),s=hr(function(){for(var o,u=[],l=0;l<arguments.length;l++)u[l]=arguments[l];return new((o=Intl.PluralRules).bind.apply(o,er([void 0],u,!1)))},{cache:Xi(e.pluralRules),strategy:yr.variadic});return{getDateTimeFormat:i,getNumberFormat:a,getMessageFormat:hr(function(o,u,l,c){return new uD(o,u,l,qe({formatters:{getNumberFormat:a,getDateTimeFormat:i,getPluralRules:s}},c||{}))},{cache:Xi(e.message),strategy:yr.variadic}),getRelativeTimeFormat:hr(function(){for(var o=[],u=0;u<arguments.length;u++)o[u]=arguments[u];return new(t.bind.apply(t,er([void 0],o,!1)))},{cache:Xi(e.relativeTime),strategy:yr.variadic}),getPluralRules:s,getListFormat:hr(function(){for(var o=[],u=0;u<arguments.length;u++)o[u]=arguments[u];return new(r.bind.apply(r,er([void 0],o,!1)))},{cache:Xi(e.list),strategy:yr.variadic}),getDisplayNames:hr(function(){for(var o=[],u=0;u<arguments.length;u++)o[u]=arguments[u];return new(n.bind.apply(n,er([void 0],o,!1)))},{cache:Xi(e.displayNames),strategy:yr.variadic})}}function gE(e,t,r,n){var i=e&&e[t],a;if(i&&(a=i[r]),a)return a;n(new xz("No ".concat(t," format named: ").concat(r)))}function hl(e,t){return Object.keys(e).reduce(function(r,n){return r[n]=qe({timeZone:t},e[n]),r},{})}function RO(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 wO(e,t){if(!t)return e;var r=uD.formats;return qe(qe(qe({},r),e),{date:RO(hl(r.date,t),hl(e.date||{},t)),time:RO(hl(r.time,t),hl(e.time||{},t))})}var r_=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,p=e.timeZone,f=e.defaultRichTextElements;r===void 0&&(r={id:""});var _=r.id,R=r.defaultMessage;WM(!!_,"[@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 w=String(_),O=o&&Object.prototype.hasOwnProperty.call(o,w)&&o[w];if(Array.isArray(O)&&O.length===1&&O[0].type===Dt.literal)return O[0].value;if(!n&&O&&typeof O=="string"&&!f)return O.replace(/'\{(.*?)\}'/gi,"{$1}");if(n=qe(qe({},f),n||{}),s=wO(s,p),l=wO(l,p),!O){if(c===!1&&O==="")return O;if((!R||a&&a.toLowerCase()!==u.toLowerCase())&&d(new Xz(r,a)),R)try{var h=t.getMessageFormat(R,u,l,i);return h.format(n)}catch(T){return d(new ng('Error formatting default message for: "'.concat(w,'", rendering default message verbatim'),a,r,T)),typeof R=="string"?R:w}return w}try{var h=t.getMessageFormat(O,a,s,qe({formatters:t},i||{}));return h.format(n)}catch(T){d(new ng('Error formatting message: "'.concat(w,'", using ').concat(R?"default message":"id"," as fallback."),a,r,T))}if(R)try{var h=t.getMessageFormat(R,u,l,i);return h.format(n)}catch(T){d(new ng('Error formatting the default message for: "'.concat(w,'", rendering message verbatim'),a,r,T))}return typeof O=="string"?O:typeof R=="string"?R:w},dD=["formatMatcher","timeZone","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName","hourCycle","dateStyle","timeStyle","calendar","numberingSystem","fractionalSecondDigits"];function ld(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&&gE(a,t,u,s)),c=Aa(n,dD,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 e8(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 ld(e,"date",t,s).format(o)}catch(u){e.onError(new qr("Error formatting date.",e.locale,u))}return String(o)}function t8(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 ld(e,"time",t,s).format(o)}catch(u){e.onError(new qr("Error formatting time.",e.locale,u))}return String(o)}function r8(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=Aa(o,dD,u?{timeZone:u}:{});try{return t(l,d).formatRange(i,a)}catch(p){c(new qr("Error formatting date time range.",e.locale,p))}return String(i)}function n8(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 ld(e,"date",t,s).formatToParts(o)}catch(u){e.onError(new qr("Error formatting date.",e.locale,u))}return[]}function i8(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 ld(e,"time",t,s).formatToParts(o)}catch(u){e.onError(new qr("Error formatting time.",e.locale,u))}return[]}var a8=["style","type","fallback","languageDisplay"];function s8(e,t,r,n){var i=e.locale,a=e.onError,s=Intl.DisplayNames;s||a(new di(`Intl.DisplayNames is not available in this environment.
86
- Try polyfilling it using "@formatjs/intl-displaynames"
87
- `,Tn.MISSING_INTL_API));var o=Aa(n,a8);try{return t(i,o).of(r)}catch(u){a(new qr("Error formatting display name.",i,u))}}var o8=["type","style"],AO=Date.now();function u8(e){return"".concat(AO,"_").concat(e,"_").concat(AO)}function c8(e,t,r,n){n===void 0&&(n={});var i=fD(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 fD(e,t,r,n){var i=e.locale,a=e.onError;n===void 0&&(n={});var s=Intl.ListFormat;s||a(new di(`Intl.ListFormat is not available in this environment.
88
- Try polyfilling it using "@formatjs/intl-listformat"
89
- `,Tn.MISSING_INTL_API));var o=Aa(n,o8);try{var u={},l=r.map(function(c,d){if(typeof c=="object"){var p=u8(d);return u[p]=c,p}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 qr("Error formatting list.",i,c))}return r}var l8=["type"];function d8(e,t,r,n){var i=e.locale,a=e.onError;n===void 0&&(n={}),Intl.PluralRules||a(new di(`Intl.PluralRules is not available in this environment.
90
- Try polyfilling it using "@formatjs/intl-pluralrules"
91
- `,Tn.MISSING_INTL_API));var s=Aa(n,l8);try{return t(i,s).select(r)}catch(o){a(new qr("Error formatting plural.",i,o))}return"other"}var f8=["numeric","style"];function p8(e,t,r){var n=e.locale,i=e.formats,a=e.onError;r===void 0&&(r={});var s=r.format,o=!!s&&gE(i,"relative",s,a)||{},u=Aa(r,f8,o);return t(n,u)}function m8(e,t,r,n,i){i===void 0&&(i={}),n||(n="second");var a=Intl.RelativeTimeFormat;a||e.onError(new di(`Intl.RelativeTimeFormat is not available in this environment.
92
- Try polyfilling it using "@formatjs/intl-relativetimeformat"
93
- `,Tn.MISSING_INTL_API));try{return p8(e,t,i).format(r,n)}catch(s){e.onError(new qr("Error formatting relative time.",e.locale,s))}return String(r)}var h8=["style","currency","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","currencyDisplay","currencySign","notation","signDisplay","unit","unitDisplay","numberingSystem","trailingZeroDisplay","roundingPriority","roundingIncrement","roundingMode"];function pD(e,t,r){var n=e.locale,i=e.formats,a=e.onError;r===void 0&&(r={});var s=r.format,o=s&&gE(i,"number",s,a)||{},u=Aa(r,h8,o);return t(n,u)}function y8(e,t,r,n){n===void 0&&(n={});try{return pD(e,t,n).format(r)}catch(i){e.onError(new qr("Error formatting number.",e.locale,i))}return String(r)}function g8(e,t,r,n){n===void 0&&(n={});try{return pD(e,t,n).formatToParts(r)}catch(i){e.onError(new qr("Error formatting number.",e.locale,i))}return[]}function _8(e){var t=e?e[Object.keys(e)[0]]:void 0;return typeof t=="string"}function E8(e){e.onWarn&&e.defaultRichTextElements&&_8(e.messages||{})&&e.onWarn(`[@formatjs/intl] "defaultRichTextElements" was specified but "message" was not pre-compiled.
94
- Please consider using "@formatjs/cli" to pre-compile your messages for performance.
95
- For more details see https://formatjs.io/docs/getting-started/message-distribution`)}function v8(e,t){var r=Zz(t),n=qe(qe({},cD),e),i=n.locale,a=n.defaultLocale,s=n.onError;return i?!Intl.NumberFormat.supportedLocalesOf(i).length&&s?s(new IO('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 IO('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 Kz('"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"),E8(n),qe(qe({},n),{formatters:r,formatNumber:y8.bind(null,n,r.getNumberFormat),formatNumberToParts:g8.bind(null,n,r.getNumberFormat),formatRelativeTime:m8.bind(null,n,r.getRelativeTimeFormat),formatDate:e8.bind(null,n,r.getDateTimeFormat),formatDateToParts:n8.bind(null,n,r.getDateTimeFormat),formatTime:t8.bind(null,n,r.getDateTimeFormat),formatDateTimeRange:r8.bind(null,n,r.getDateTimeFormat),formatTimeToParts:i8.bind(null,n,r.getDateTimeFormat),formatPlural:d8.bind(null,n,r.getPluralRules),formatMessage:r_.bind(null,n,r),$t:r_.bind(null,n,r),formatList:c8.bind(null,n,r.getListFormat),formatListToParts:fD.bind(null,n,r.getListFormat),formatDisplayName:s8.bind(null,n,r.getDisplayNames)})}function b8(e){WM(e,"[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.")}var T8=qe(qe({},cD),{textComponent:Me.Fragment});function S8(e){return function(t){return e(Me.Children.toArray(t))}}var _E=typeof window<"u"&&!window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__?window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=Me.createContext(null)):Me.createContext(null);_E.Consumer;var I8=_E.Provider,R8=I8,w8=_E;function mD(){var e=Me.useContext(w8);return b8(e),e}var n_;(function(e){e.formatDate="FormattedDate",e.formatTime="FormattedTime",e.formatNumber="FormattedNumber",e.formatList="FormattedList",e.formatDisplayName="FormattedDisplayName"})(n_||(n_={}));var i_;(function(e){e.formatDate="FormattedDateParts",e.formatTime="FormattedTimeParts",e.formatNumber="FormattedNumberParts",e.formatList="FormattedListParts"})(i_||(i_={}));function hD(e){var t=function(r){var n=mD(),i=r.value,a=r.children,s=As(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=i_[e],t}function au(e){var t=function(r){var n=mD(),i=r.value,a=r.children,s=As(r,["value","children"]),o=n[e](i,s);if(typeof a=="function")return a(o);var u=n.textComponent||Me.Fragment;return Me.createElement(u,null,o)};return t.displayName=n_[e],t}function yD(e){return e&&Object.keys(e).reduce(function(t,r){var n=e[r];return t[r]=oD(n)?S8(n):n,t},{})}var OO=function(e,t,r,n){for(var i=[],a=4;a<arguments.length;a++)i[a-4]=arguments[a];var s=yD(n),o=r_.apply(void 0,er([e,t,r,s],i,!1));return Array.isArray(o)?Me.Children.toArray(o):o},A8=function(e,t){var r=e.defaultRichTextElements,n=As(e,["defaultRichTextElements"]),i=yD(r),a=v8(qe(qe(qe({},T8),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:OO.bind(null,s,a.formatters),$t:OO.bind(null,s,a.formatters)})};au("formatDate");au("formatTime");au("formatNumber");au("formatList");au("formatDisplayName");hD("formatDate");hD("formatTime");const O8={overview:"Overview",collectibles:"Collectibles",market:"Market",myAssets:"My Assets",myFavorites:"My Favorites",myPurchases:"My Purchases",searchPlaceholder:"Search items, creators, collections…",searchAria:"Search the shop",yourBalance:"Your {currency}",getCredits:"Get {currency}",cart:"Cart"},N8={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"},P8={empty:{title:"Your cart is empty",body:"Find something you love and it’ll show up here.",cta:"Browse Collectibles"}},C8={nav:O8,notFound:N8,cart:P8},M8={overview:"Inicio",collectibles:"Coleccionables",market:"Mercado",myAssets:"Mis artículos",myFavorites:"Mis favoritos",myPurchases:"Mis compras",searchPlaceholder:"Buscá artículos, creadores, colecciones…",searchAria:"Buscar en la tienda",yourBalance:"Tus {currency}",getCredits:"Conseguir {currency}",cart:"Carrito"},D8={title:"Página no encontrada",body:"La página que buscás no está acá. Volvamos a la tienda.",cta:"Ver coleccionables"},j8={empty:{title:"Tu carrito está vacío",body:"Encontrá algo que te guste y va a aparecer acá.",cta:"Ver coleccionables"}},L8={nav:M8,notFound:D8,cart:j8},Tl=["en","es"];function a_(e,t="",r={}){for(const[n,i]of Object.entries(e)){const a=t?`${t}.${n}`:n;i&&typeof i=="object"&&!Array.isArray(i)?a_(i,a,r):r[a]=String(i)}return r}const $8={en:a_(C8),es:a_(L8)},q8=lD(),ig={};function EE(e){return ig[e]||(ig[e]=A8({locale:e,defaultLocale:"en",messages:$8[e],onError:()=>{}},q8)),ig[e]}let gD=EE("en");function B8(e){gD=EE(e)}function Yr(e,t){return gD.formatMessage({id:e},t)}function k8(){const{session:e,connecting:t,signIn:r,disconnect:n,restore:i}=Rs(),a=e==null?void 0:e.address,{data:s,isLoading:o}=fE(a),{data:u}=ez(e),l=Kr(w=>w.items.length),c=c_(),[d,p]=Me.useState(""),f=Me.useRef();Me.useEffect(()=>{i()},[i]);function _(w){c(w.trim()?`/assets?q=${encodeURIComponent(w.trim())}`:"/assets",{replace:!0})}function R(w){p(w),f.current&&clearTimeout(f.current),f.current=setTimeout(()=>_(w),300)}return J.jsxs(J.Fragment,{children:[J.jsx(lU,{activePage:"shop",isSignedIn:!!e,isSigningIn:t,isLoadingProfile:!!e&&o,address:a,avatar:s,onClickSignIn:()=>r(),onClickSignOut:()=>void n()}),J.jsxs("div",{className:"subnav",children:[J.jsxs("nav",{className:"subnav__tabs",children:[J.jsx(xn,{to:"/overview",children:Yr("nav.overview")}),J.jsx(xn,{to:"/assets",children:Yr("nav.collectibles")}),J.jsx(xn,{to:"/market",children:Yr("nav.market")}),J.jsx(xn,{to:"/my-assets",children:Yr("nav.myAssets")}),J.jsx(xn,{to:"/my-favorites",children:Yr("nav.myFavorites")}),e?J.jsx(xn,{to:"/my-purchases",children:Yr("nav.myPurchases")}):null]}),J.jsxs("div",{className:"subnav__search",children:[J.jsx("span",{className:"ico ico-search subnav__search-ico","aria-hidden":!0}),J.jsx("input",{value:d,"aria-label":Yr("nav.searchAria"),placeholder:Yr("nav.searchPlaceholder"),onChange:w=>R(w.target.value),onKeyDown:w=>{w.key==="Enter"&&(f.current&&clearTimeout(f.current),_(d))}})]}),e?J.jsxs("span",{className:"subnav__balance",title:Yr("nav.yourBalance",{currency:ds.name}),children:[J.jsx(Un,{className:"subnav__balance-ico"}),(u==null?void 0:u.credits)??0]}):null,J.jsxs(xn,{to:"/credits",className:"subnav__credits",children:[J.jsx(Un,{className:"subnav__credits-ico"}),Yr("nav.getCredits",{currency:ds.name})]}),J.jsxs("div",{className:"subnav__cart-wrap",children:[J.jsxs(xn,{to:"/cart",className:"subnav__cart","aria-label":Yr("nav.cart"),children:[J.jsx("span",{className:"ico ico-cart","aria-hidden":!0}),l>0?J.jsx("span",{className:"subnav__cart-badge",children:l}):null]}),J.jsx(rz,{})]})]})]})}let U8=0;const Ao=Is(e=>({toasts:[],push:t=>{const r=++U8;return e(n=>({toasts:[...n.toasts,{...t,id:r}]})),r},dismiss:t=>e(r=>({toasts:r.toasts.filter(n=>n.id!==t)}))})),E6={success:e=>Ao.getState().push({message:e,kind:"success"}),error:e=>Ao.getState().push({message:e,kind:"error"}),info:e=>Ao.getState().push({message:e,kind:"info"})},F8={success:"✓",error:"!",info:"i"};function H8({t:e}){const t=Ao(r=>r.dismiss);return Me.useEffect(()=>{const r=setTimeout(()=>t(e.id),4500);return()=>clearTimeout(r)},[e.id,t]),J.jsxs("div",{className:`toast toast--${e.kind}`,role:e.kind==="error"?"alert":"status",onClick:()=>t(e.id),children:[J.jsx("span",{className:"toast__icon","aria-hidden":!0,children:F8[e.kind]}),J.jsx("span",{className:"toast__msg",children:e.message})]})}function V8(){const e=Ao(t=>t.toasts);return e.length===0?null:J.jsx("div",{className:"toaster","aria-live":"polite",children:e.map(t=>J.jsx(H8,{t},t.id))})}const G8=Me.lazy(()=>Gt(()=>import("./index-CWxLUWXU.js"),__vite__mapDeps([9,1,10,5,11,4,12,13,7,3,14])).then(e=>({default:e.WearablePreview})));function vE(e){return J.jsx(Me.Suspense,{fallback:null,children:J.jsx(G8,{...e})})}function z8(e){return e.itemId?`urn:decentraland:${Nt.chainId===80002?"amoy":"matic"}:collections-v2:${e.contractAddress.toLowerCase()}:${e.itemId}`:null}const Ga=Jr.BodyShape.MALE,za=Jr.BodyShape.FEMALE;function s_(e){if(e.category==="emote")return[Ga,za];switch(e.gender){case"male":return[Ga];case"female":return[za];default:return[Ga,za]}}function W8(e){var r;const t=(r=e==null?void 0:e.avatar)==null?void 0:r.bodyShape;return t?t.includes("BaseFemale")?za:Ga:null}function bE(e,t){return t==null||s_(e).includes(t)}function NO(e){return e===za?"Female":"Male"}function Y8(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?za:Ga}function ua(e){return e.category!=="emote"}function ms(e){return ua(e)?e.wearableCategory??`unknown:${e.id}`:null}const x8=new Set(["hat","helmet","mask","tiara","top_head","hair","facial_hair","eyewear","earring","eyes","eyebrows","mouth"]);function K8(e){if(!ua(e))return"item";const t=e.wearableCategory;return t?x8.has(t)?"head":t==="upper_body"?"upper":t==="lower_body"?"lower":t==="feet"?"feet":t==="hands"||t==="hands_wear"?"hands":"item":"item"}function PO(e,t=null){const r=new Set,n=new Set;for(const i of e){const a=ms(i);a==null||n.has(a)||bE(i,t)&&(n.add(a),r.add(i.id))}return r}function X8(e,t,r){if(!ua(t))return e;const n=new Set(e);if(n.has(t.id))return n.delete(t.id),n;const i=ms(t);if(i!=null)for(const a of r)a.id!==t.id&&n.has(a.id)&&ms(a)===i&&n.delete(a.id);return n.add(t.id),n}function J8(e){const t=new Map;for(const n of e){const i=ms(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 Q8(e,t,r=null){const n=[];for(const i of e){if(!t.has(i.id)||!ua(i)||!bE(i,r))continue;const a=z8(i);a&&n.push(a)}return n}const Z8=Me.lazy(()=>Gt(()=>import("./AnimatedBackground-DimPo0o6.js"),__vite__mapDeps([15,1,16])));function CO(e){return!e||e.startsWith("unknown:")?"Wearable":e.charAt(0).toUpperCase()+e.slice(1).replace(/_/g," ")}function eW(){const e=Kr(m=>m.fittingOpen),t=Kr(m=>m.setFittingOpen),r=Kr(m=>m.items),n=Kr(m=>m.remove),i=c_(),a=Rs(m=>{var v;return(v=m.session)==null?void 0:v.address}),{data:s,isFetched:o}=fE(a),u=!a||o,l=!!a&&!!s,c=l?a:"default",d=W8(s)??Y8(r)??Ga,[p,f]=Me.useState(()=>PO(r,d)),[_,R]=Me.useState(!1);Me.useEffect(()=>{e&&f(PO(r,d))},[e,d]),Me.useEffect(()=>{const m=new Set(r.map(v=>v.id));f(v=>{const A=new Set([...v].filter(P=>m.has(P)));return A.size===v.size?v:A})},[r]);const w=Me.useMemo(()=>J8(r),[r]),O=Me.useMemo(()=>Q8(r,p,d),[r,p,d]),h=r.reduce((m,v)=>m+v.priceCredits,0),T=O.join(",");Me.useEffect(()=>{R(!1)},[T,c]);const b=Me.useRef(!1);return Me.useEffect(()=>{if(!e){b.current=!1;return}b.current||(b.current=!0,ci("Shop Tried On Outfit",{cart_size:r.length,wearables:r.filter(ua).length,emotes:r.filter(m=>!ua(m)).length,cart_value_credits:h}))},[e,r,h]),Me.useEffect(()=>{if(!e)return;const m=v=>{v.key==="Escape"&&t(!1)};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[e,t]),!e||r.length===0?null:J.jsxs("div",{className:"fitting",role:"dialog","aria-modal":"true","aria-label":"Fitting room",children:[J.jsx("div",{className:"fitting__scrim",onClick:()=>t(!1)}),J.jsxs("div",{className:"fitting__panel",children:[J.jsx("button",{className:"fitting__close",onClick:()=>t(!1),"aria-label":"Close",children:"×"}),J.jsxs("div",{className:"fitting__stage",children:[J.jsx(Me.Suspense,{fallback:null,children:J.jsx(Z8,{})}),u?O.length>0?J.jsxs(J.Fragment,{children:[J.jsx(vE,{profile:c,bodyShape:l?void 0:d,urns:O,type:Jr.PreviewType.AVATAR,emote:Jr.PreviewEmote.FASHION,disableBackground:!0,disableFadeEffect:!0,dev:Nt.chainId===80002,onLoad:()=>R(!0)},c),_?null:J.jsx("div",{className:"fitting__loading","aria-hidden":!0,children:J.jsx("span",{className:"fitting__spinner"})})]}):J.jsxs("div",{className:"fitting__empty-stage",children:[J.jsx("p",{children:"Nothing on right now."}),J.jsx("p",{className:"muted",children:"Turn on an item from the list to try it."})]}):J.jsx("div",{className:"fitting__loading","aria-hidden":!0,children:J.jsx("span",{className:"fitting__spinner"})})]}),J.jsxs("div",{className:"fitting__side",children:[J.jsxs("div",{className:"fitting__head",children:[J.jsx("h2",{className:"fitting__title",children:"Fitting room"}),J.jsx("p",{className:"fitting__sub muted",children:"Mix and match your cart. Turn items on and off to see the look."})]}),J.jsx("div",{className:"fitting__items",children:r.map(m=>{const v=ua(m),A=v&&!bE(m,d),P=p.has(m.id),q=w.has(m.id);return J.jsxs("div",{className:`fitting-row${P?" is-on":""}${A?" is-incompatible":""}`,children:[J.jsxs("label",{className:"fitting-row__toggle",children:[J.jsx("input",{type:"checkbox",checked:P,disabled:!v||A,onChange:()=>f(z=>X8(z,m,r))}),J.jsx("span",{className:"fitting-row__box","aria-hidden":!0})]}),J.jsx("div",{className:"fitting-row__thumb",children:m.thumbnail?J.jsx("img",{src:m.thumbnail,alt:m.name}):null}),J.jsxs("div",{className:"fitting-row__info",children:[J.jsx("div",{className:"fitting-row__name",title:m.name,children:m.name}),J.jsxs("div",{className:"fitting-row__meta",children:[J.jsx("span",{className:`ico ico-slot-${v?K8(m):"item"} fitting-row__slot-ico`,title:v?CO(ms(m)):"Emote",role:"img","aria-label":v?CO(ms(m)):"Emote"}),q&&!A?J.jsx("span",{className:"fitting-row__conflict",title:"Only one item per slot can be worn",children:"1 per slot"}):null,A?J.jsxs("span",{className:"fitting-row__incompat",title:`This item is made for the ${NO(s_(m)[0])} body shape`,children:[NO(s_(m)[0])," only"]}):null]})]}),J.jsxs("div",{className:"fitting-row__price",children:[J.jsx(Un,{className:"fitting-row__diamond"}),m.priceCredits]}),J.jsx("button",{className:"fitting-row__remove",onClick:()=>n(m.id),"aria-label":`Remove ${m.name} from cart`,title:"Remove",children:J.jsx("span",{className:"ico ico-trash","aria-hidden":!0})})]},m.id)})}),J.jsxs("div",{className:"fitting__foot",children:[J.jsxs("div",{className:"fitting__total",children:[r.length," item",r.length>1?"s":""," · ",J.jsxs("strong",{children:[ds.symbol," ",h]})]}),J.jsx("button",{className:"btn btn--purple fitting__checkout",onClick:()=>{t(!1),i("/cart")},children:"Checkout"})]})]})]})]})}const _D="shop:locale";function tW(){var e;try{const t=new URLSearchParams(window.location.search).get("lang");if(t&&Tl.includes(t))return t;const r=localStorage.getItem(_D);if(r&&Tl.includes(r))return r;const n=(e=navigator.language)==null?void 0:e.slice(0,2);if(n&&Tl.includes(n))return n}catch{}return"en"}const o_=Is(e=>({locale:tW(),setLocale:t=>{try{localStorage.setItem(_D,t)}catch{}e({locale:t})}})),rW=Me.lazy(()=>Gt(()=>import("./ShopFooterInner-Bw0tZ5jz.js"),__vite__mapDeps([17,1,5,6,14,11,4,3,7])));function nW(){const e=o_(r=>r.locale),t=o_(r=>r.setLocale);return J.jsx("div",{className:"shop-footer",children:J.jsx(Me.Suspense,{fallback:null,children:J.jsx(rW,{locale:e,onChange:r=>{Tl.includes(r)&&t(r)}})})})}function iW(){const[e,t]=Me.useState(!1);return Me.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?J.jsx("div",{"aria-hidden":!0,style:{position:"fixed",left:-9999,top:-9999,width:2,height:2,opacity:0,overflow:"hidden",pointerEvents:"none"},children:J.jsx(vE,{id:"preview-warmer",profile:"default",dev:Nt.chainId===80002,disableBackground:!0,disableFadeEffect:!0})}):null}function aW(){const e=Rs(t=>t.session);Me.useEffect(()=>{if(!e||e.providerType!==Jr.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])}const TE=`${Nt.nftApiUrl}/v1`;function ED(e){if(!e)return 0;try{return Math.ceil(Number(YD(e))*10)}catch{return 0}}function v6(e){if(!e)return 0;try{const t=BigInt(e),r=10n**16n;return Number((t+r-1n)/r)}catch{return 0}}async function b6(e,t){var n,i,a;const r=new URLSearchParams({contractAddresses:e,itemId:t,first:"1"});try{const s=await fetch(`${Nt.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 T6(e){const{listings:t}=await dd({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 sW(e,t){var a;const r=new URLSearchParams({contractAddress:e,tokenId:t,first:"1"}),n=await fetch(`${TE}/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 vD(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 dd(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(`${Nt.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 S6(e,t){const{listings:r}=await dd({contractAddress:e,itemId:t,first:1});return r[0]?vD(r[0]):null}async function oW({first:e=100,...t}={}){const{listings:r,total:n}=await dd({...t,first:e});return{items:r.map(vD),total:n}}function uW(e){return{tradeId:e.tradeId,listingType:"primary",contractAddress:e.contractAddress,itemId:e.itemId??"",name:e.name??"",thumbnail:e.thumbnail??"",rarity:e.rarity??"common",category:e.category??"wearable",wearableCategory:e.wearableCategory??null,creator:e.creator??"",manaWei:e.manaWei,available:e.available??0,network:e.network??"MATIC",chainId:e.chainId??Nt.chainId,createdAt:e.createdAt??0}}async function I6({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.search&&r.set("search",t.search),t.sortBy&&r.set("sortBy",t.sortBy);const n=await fetch(`${Nt.marketplaceServerUrl}/v3/catalog/legacy?${r.toString()}`);if(!n.ok)throw new Error(`fetchLegacyListings ${n.status}`);const i=await n.json(),a=i.data??[];return{items:a.map(uW),total:i.total??a.length}}async function R6(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(`${TE}/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,p,f,_;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)??((f=(p=l.nft.data)==null?void 0:p.emote)==null?void 0:f.rarity),network:l.nft.network,chainId:l.nft.chainId,isOnSale:l.order!=null,listingPrice:l.order?ED(l.order.price):void 0,tradeId:(_=l.order)==null?void 0:_.tradeId}}),total:o}}const cW="dcl:marketplace";async function w6(e,t){const{TradeService:r}=await Gt(async()=>{const{TradeService:i}=await import("./TradeService-mwlprIfz.js");return{TradeService:i}},__vite__mapDeps([18,7,1,19,2,8]));return new r(cW,Nt.marketplaceServerUrl,()=>t).addTrade(e)}async function bD(e){const t=await fetch(`${Nt.marketplaceServerUrl}/v1/trades/${e}`);if(!t.ok)throw new Error(`fetchTrade ${t.status}`);const r=await t.json();return r.data??r}async function lW(e,t){const r=new URLSearchParams({contractAddress:e,itemId:t,first:"1"}),n=await fetch(`${TE}/items?${r.toString()}`);if(!n.ok)return null;const{data:i}=await n.json();return(i==null?void 0:i[0])??null}async function A6(e){var u,l;let t;try{t=await bD(e)}catch{return null}const r=(u=t.sent)==null?void 0:u[0],n=(l=t.received)==null?void 0:l[0],i=ED(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)===Jr.TradeAssetType.COLLECTION_ITEM){const c=await lW(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 sW(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 O6(e,t){var i;const{listings:r}=await dd({contractAddress:e,itemId:t,first:1}),n=(i=r[0])==null?void 0:i.tradeId;return n?bD(n):null}function dW(e,t){return!t||!e.creator?!1:lE(e)&&e.creator.toLowerCase()===t.toLowerCase()}function N6(e,t){return!!e.signer&&!!t&&e.signer.toLowerCase()===t.toLowerCase()}function fW(e){return/^0x[a-fA-F0-9]{40}$/.test(e)?`${e.slice(0,6)}…${e.slice(-4)}`:e}function pW(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 mW(e,t){var r;return(((r=e==null?void 0:e.trim())==null?void 0:r[0])||t.replace(/^0x/i,"")[0]||"?").toUpperCase()}function hW({address:e,className:t,linkToProfile:r}){var p,f;const n=c_(),{data:i}=fE(e),a=(f=(p=i==null?void 0:i.avatar)==null?void 0:p.snapshots)==null?void 0:f.face256,[s,o]=Me.useState(!1);if(Me.useEffect(()=>o(!1),[a]),!e)return null;const u=(i==null?void 0:i.name)||fW(e),c=!!a&&!s?J.jsx("img",{className:"creator__ava",src:a,alt:"",loading:"lazy",onError:()=>o(!0)}):J.jsx("span",{className:"creator__ava creator__ava--letter",style:{backgroundColor:pW(e)},"aria-hidden":!0,children:mW(i==null?void 0:i.name,e)}),d=J.jsxs(J.Fragment,{children:[c,J.jsxs("span",{className:"creator__name",children:["By ",u]})]});return r?J.jsx("button",{className:`creator creator--link${t?` ${t}`:""}`,title:`View ${u}`,onClick:_=>{_.stopPropagation(),n(`/creator/${e}`)},children:d}):J.jsx("span",{className:`creator${t?` ${t}`:""}`,children:d})}const ag="#a09ba8";function MO(e){if(!e)return ag;try{return Jr.Rarity.getColor(e.toLowerCase())||ag}catch{return ag}}function yW(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"}function gW(e,t=Date.now()){const{priceCredits:r,compareAtCredits:n,saleEndsAt:i}=e;return!(n==null||!(n>r)||i!=null&&i<=t)}function _W(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 Io(e,t=Date.now()){return e==null?1/0:Math.max(0,e-t)}function EW(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 DO(e){return!isFinite(e)||e<=0?0:e<36e5?1e3:6e4}function vW({endsAt:e,className:t}){const[r,n]=Me.useState(()=>Io(e));Me.useEffect(()=>{if(n(Io(e)),e==null)return;let a;const s=()=>{const u=Io(e);n(u);const l=DO(u);l>0&&(a=setTimeout(s,l))},o=DO(Io(e));return o>0&&(a=setTimeout(s,o)),()=>clearTimeout(a)},[e]);const i=EW(r);return i?J.jsxs("span",{className:t??"sale-countdown",children:[J.jsx("span",{className:"ico ico-clock sale-countdown__ico","aria-hidden":!0}),i]}):null}function bW(e){const[,t]=Me.useState(0);return Me.useEffect(()=>{const r=Io(e.saleEndsAt);if(!isFinite(r)||r<=0||r>2147483647)return;const n=setTimeout(()=>t(i=>i+1),r+1);return()=>clearTimeout(n)},[e.saleEndsAt]),gW(e)}const TW=120,SW=250;function IW(e){return e==="male"?"♂":e==="female"?"♀":e==="unisex"?"⚥":""}function SE(e){const{item:t}=e,r=e.mode==="market",[n,i]=Me.useState(!1),[a,s]=Me.useState(!1),o=Me.useRef(),u=Me.useRef(),l=Kr(z=>z.add),c=Kr(z=>z.items.some(Y=>Y.id===t.id)),d=Rs(z=>{var Y;return(Y=z.session)==null?void 0:Y.address}),p=dW(t,d),f=Dl(z=>z.toggle),_=Dl(z=>!!z.items[t.id]),R=!!t.contractAddress&&!!t.itemId,w=t.tokenId??t.itemId,O=!r&&!!t.contractAddress&&!!w,h=`/item/${t.contractAddress}/${w}`;function T(){o.current&&clearTimeout(o.current),u.current&&clearTimeout(u.current),s(!1),o.current=setTimeout(()=>i(!0),TW)}function b(){o.current&&clearTimeout(o.current),u.current&&clearTimeout(u.current),i(!1),s(!1)}function m(){u.current&&clearTimeout(u.current),u.current=setTimeout(()=>s(!0),SW)}const v=IW(t.gender),A=bW({priceCredits:t.priceCredits,compareAtCredits:t.compareAtCredits,saleEndsAt:t.saleEndsAt}),P=!r&&A,q=P?_W(t.compareAtCredits,t.priceCredits):0;return J.jsxs("article",{className:`card${n?" card--hover":""}`,style:O?{cursor:"pointer"}:void 0,onMouseEnter:T,onMouseLeave:b,children:[O?J.jsx(Oo,{className:"card__link",to:h,state:{item:t,tradeId:t.tradeId},"aria-label":t.name}):null,J.jsxs("div",{className:"card__media",children:[P?J.jsxs("span",{className:"card__sale-badge",children:["SALE",q>0?` -${q}%`:""]}):null,J.jsx("button",{className:`card__fav${_?" is-on":""}`,onClick:z=>{z.stopPropagation(),f(t)},"aria-label":_?"Remove from favorites":"Add to favorites",children:J.jsx("span",{className:"ico ico-heart","aria-hidden":!0})}),t.thumbnail?J.jsx("img",{className:`card__img${n&&a?" card__img--hidden":""}`,src:t.thumbnail,alt:t.name,loading:"lazy"}):null,n&&R?J.jsxs(J.Fragment,{children:[J.jsx("div",{className:`card__preview${a?" is-ready":""}`,children:J.jsx(vE,{contractAddress:t.contractAddress,itemId:t.itemId??void 0,profile:"default",type:t.category==="emote"?void 0:Jr.PreviewType.AVATAR,emote:t.category==="emote"?void 0:Jr.PreviewEmote.FASHION,dev:Nt.chainId===80002,disableBackground:!0,disableFadeEffect:!0,onLoad:m})}),J.jsx("span",{className:"card__preview-shield","aria-hidden":!0}),a?null:J.jsx("span",{className:"card__loadbar","aria-hidden":!0})]}):null]}),J.jsxs("div",{className:"card__body",children:[J.jsxs("div",{className:"card__desc",children:[J.jsx("div",{className:"card__name",title:t.name,children:t.name}),t.creator?J.jsx(hW,{address:t.creator,className:"card__creator",linkToProfile:!0}):J.jsx("div",{className:"card__creator",children:" "})]}),J.jsxs("div",{className:"card__meta",children:[r&&e.mode==="market"?J.jsxs("div",{className:"card__price card__price--market",children:[J.jsx("span",{className:"card__approx","aria-hidden":!0,children:"≈"}),J.jsx(Un,{className:"card__diamond"}),e.marketPriceCredits==null?"—":e.marketPriceCredits,J.jsx("span",{className:"chip card__market-chip",children:"Market price"})]}):P?J.jsxs("div",{className:"card__price card__price--sale",children:[J.jsxs("span",{className:"card__price-now",children:[J.jsx(Un,{className:"card__diamond"}),t.priceCredits]}),J.jsxs("span",{className:"card__price-was",children:[J.jsx(Un,{className:"card__diamond card__diamond--was"}),t.compareAtCredits]}),J.jsx(vW,{endsAt:t.saleEndsAt,className:"card__countdown"})]}):J.jsxs("div",{className:"card__price",children:[J.jsx(Un,{className:"card__diamond"}),t.priceCredits]}),J.jsxs("div",{className:"card__chips",children:[J.jsx("span",{className:"chip chip--rarity",style:{background:MO(t.rarity),color:yW(MO(t.rarity))},children:t.rarity}),t.category==="wearable"?J.jsx("span",{className:"chip chip--icon",children:J.jsx("span",{className:"ico ico-eyewear","aria-hidden":!0})}):null,v?J.jsx("span",{className:"chip chip--icon",children:v}):null]})]}),r&&e.mode==="market"?J.jsx("button",{className:"card__cart",onClick:z=>{z.stopPropagation(),e.onBuyNow(t)},disabled:e.marketPriceCredits==null,children:e.marketPriceCredits==null?"Unavailable":"Buy now"}):J.jsxs("button",{className:`card__cart${c?" is-in":""}`,onClick:z=>{z.stopPropagation(),p||l(t,"grid")},disabled:c||p,children:[p?null:J.jsx("span",{className:"ico ico-cart-solid card__cart-ico","aria-hidden":!0}),p?"Your item":c?"In cart":"Add to cart"]})]})]})}function RW(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 TD(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:RW((s=(a=e.data)==null?void 0:a.wearable)==null?void 0:s.bodyShapes)}}async function P6(e,{first:t=20,skip:r=0}={}){const n=new URLSearchParams({contractAddress:e,first:String(t),skip:String(r),includeSocialEmotes:"false"}),i=await fetch(`${Nt.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(TD);return{items:o,total:s??r+o.length}}async function wW(e,{first:t=60,skip:r=0}={}){const n=new URLSearchParams({creator:e,first:String(t),skip:String(r),includeSocialEmotes:"false"}),i=await fetch(`${Nt.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(TD);return{items:o,total:s??r+o.length}}const AW=8,OW=8,NW=12;function PW(){const t=Yg(i=>i.followed).slice(0,AW),{data:r=[],isLoading:n}=Ll({queryKey:["followed-creators-row",t.join(",")],enabled:t.length>0,queryFn:async()=>{const i=await Promise.all(t.map(a=>wW(a,{first:OW}).then(s=>s.items).catch(()=>[])));return CW(i).filter(a=>a.priceCredits>0).slice(0,NW)}});return t.length===0||!n&&r.length===0?null:J.jsxs("section",{className:"row",children:[J.jsx("div",{className:"row__head",children:J.jsx("h2",{className:"row__title",children:"From creators you follow"})}),J.jsx("div",{className:"row__track",children:n?Array.from({length:6}).map((i,a)=>J.jsx("div",{className:"card card--skeleton"},a)):r.map(i=>J.jsx(SE,{item:i},i.id))})]})}function CW(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 SD="shop:recently-viewed",ID=12;function RD(){try{const e=localStorage.getItem(SD);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.slice(0,ID):[]}catch{return[]}}function C6(e){if(e!=null&&e.id)try{const t=[e,...RD().filter(r=>r.id!==e.id)].slice(0,ID);localStorage.setItem(SD,JSON.stringify(t))}catch{}}function MW({excludeId:e}){const t=Me.useMemo(()=>RD().filter(r=>r.id!==e),[e]);return t.length===0?null:J.jsxs("section",{className:"row",children:[J.jsx("div",{className:"row__head",children:J.jsx("h2",{className:"row__title",children:"Recently viewed"})}),J.jsx("div",{className:"row__track",children:t.map(r=>J.jsx(SE,{item:r},r.id))})]})}function jO({title:e,items:t,loading:r}){return J.jsxs("section",{className:"row",children:[J.jsxs("div",{className:"row__head",children:[J.jsx("h2",{className:"row__title",children:e}),J.jsxs(Oo,{className:"row__viewall",to:"/assets",children:["View all ",J.jsx("span",{className:"ico ico-viewall","aria-hidden":!0})]})]}),J.jsx("div",{className:"row__track",children:r?Array.from({length:6}).map((n,i)=>J.jsx("div",{className:"card card--skeleton"},i)):t.map(n=>J.jsx(SE,{item:n},n.id))})]})}function DW(){const{data:e,isLoading:t}=Ll({queryKey:["overview-listings"],queryFn:()=>oW({first:24})}),r=(e==null?void 0:e.items)??[];return J.jsxs("div",{className:"overview",children:[J.jsx("section",{className:"hero",children:J.jsxs("div",{className:"hero__inner",children:[J.jsx("h1",{className:"hero__title",children:"FASHION WEEK OUTFITS"}),J.jsx(Oo,{className:"btn btn--purple",to:"/assets",children:"EXPLORE COLLECTION"})]})}),J.jsx(PW,{}),J.jsx(MW,{}),t||r.length>0?J.jsxs(J.Fragment,{children:[J.jsx(jO,{title:"Featured",items:r.slice(0,12),loading:t}),r.length>12?J.jsx(jO,{title:"New Creations",items:r.slice(12,24),loading:!1}):null]}):J.jsxs("div",{className:"overview__empty",children:[J.jsx("p",{className:"overview__empty-title",children:"New drops are on the way"}),J.jsx("p",{className:"muted",children:"There are no items on sale right now — check back soon."}),J.jsx(Oo,{className:"btn btn--purple",to:"/assets",children:"Browse Collectibles"})]})]})}const jW={"/overview":"overview","/assets":"assets","/market":"market","/my-assets":"my_assets","/my-favorites":"favorites","/my-purchases":"my_purchases","/import":"import","/cart":"cart","/credits":"credits","/success":"success"},LW=Me.lazy(()=>Gt(()=>import("./Assets-0rXRECQy.js"),__vite__mapDeps([20,1,21,22,23,24,7])).then(e=>({default:e.Assets}))),$W=Me.lazy(()=>Gt(()=>import("./Market-B6NMpu2_.js"),__vite__mapDeps([25,1,26,19,7,21,22,23,27,28,29,24])).then(e=>({default:e.Market}))),qW=Me.lazy(()=>Gt(()=>import("./ItemDetail-BMgOoWU8.js"),__vite__mapDeps([30,1,27,28,19,7,29,31])).then(e=>({default:e.ItemDetail}))),BW=Me.lazy(()=>Gt(()=>import("./Collection-CAJMA4Fe.js"),__vite__mapDeps([32,1,33,34,22,23,24,7])).then(e=>({default:e.Collection}))),kW=Me.lazy(()=>Gt(()=>import("./Creator-DXuvF7aY.js"),__vite__mapDeps([35,1,33,34,22,23,24,7])).then(e=>({default:e.Creator}))),UW=Me.lazy(()=>Gt(()=>import("./MyAssets-DGLbKyUN.js"),__vite__mapDeps([36,1,37,27,28,19,7,26,38,23,24,39])).then(e=>({default:e.MyAssets}))),FW=Me.lazy(()=>Gt(()=>import("./MyFavorites-BzUnpL59.js"),__vite__mapDeps([40,1,23,7])).then(e=>({default:e.MyFavorites}))),HW=Me.lazy(()=>Gt(()=>import("./MyPurchases-C-MppIV4.js"),__vite__mapDeps([41,1,23,24,7])).then(e=>({default:e.MyPurchases}))),VW=Me.lazy(()=>Gt(()=>import("./ImportListings-CZkdcWaF.js"),__vite__mapDeps([42,1,37,27,28,19,7,26,38,43])).then(e=>({default:e.ImportListings}))),GW=Me.lazy(()=>Gt(()=>import("./Cart-DfisnztS.js"),__vite__mapDeps([44,1,27,28,19,7,29])).then(e=>({default:e.Cart}))),zW=Me.lazy(()=>Gt(()=>import("./GetCredits-DrLnYOdO.js"),__vite__mapDeps([45,1,12,5,7])).then(e=>({default:e.GetCredits}))),WW=Me.lazy(()=>Gt(()=>import("./Success-BmFgC1Fj.js"),__vite__mapDeps([46,1,38,29,28,19,7])).then(e=>({default:e.Success}))),YW=Me.lazy(()=>Gt(()=>import("./NotFound-stjqjmfW.js"),__vite__mapDeps([47,1,7])).then(e=>({default:e.NotFound})));function xW(){return J.jsx("div",{className:"page-loading","aria-busy":"true",children:J.jsx("span",{className:"spinner","aria-hidden":!0})})}function KW(){return J.jsxs("div",{className:"overview__empty",children:[J.jsx("p",{className:"overview__empty-title",children:"Something went wrong"}),J.jsx("p",{className:"muted",children:"This page hit an unexpected error. Try reloading."}),J.jsx("button",{className:"btn btn--purple",onClick:()=>window.location.reload(),children:"Reload"})]})}function XW(){aW();const e=UD();return Me.useEffect(()=>{o4()},[]),Me.useEffect(()=>{const t=e.pathname,r=jW[t]??(t.startsWith("/item/")?"item":t.startsWith("/collection/")?"collection":t.startsWith("/creator/")?"creator":"other");n4(r)},[e.pathname]),J.jsxs(J.Fragment,{children:[J.jsx(V8,{}),J.jsx(iW,{}),J.jsx(eW,{}),J.jsx(k8,{}),J.jsx("main",{className:"page",children:J.jsx(Cl,{fallback:J.jsx(KW,{}),children:J.jsx(Me.Suspense,{fallback:J.jsx(xW,{}),children:J.jsxs(FD,{children:[J.jsx(dr,{path:"/",element:J.jsx(HD,{to:"/overview",replace:!0})}),J.jsx(dr,{path:"/overview",element:J.jsx(DW,{})}),J.jsx(dr,{path:"/assets",element:J.jsx(LW,{})}),J.jsx(dr,{path:"/market",element:J.jsx($W,{})}),J.jsx(dr,{path:"/item/:contractAddress/:tokenId",element:J.jsx(qW,{})}),J.jsx(dr,{path:"/collection/:contractAddress",element:J.jsx(BW,{})}),J.jsx(dr,{path:"/creator/:address",element:J.jsx(kW,{})}),J.jsx(dr,{path:"/my-assets",element:J.jsx(UW,{})}),J.jsx(dr,{path:"/my-favorites",element:J.jsx(FW,{})}),J.jsx(dr,{path:"/my-purchases",element:J.jsx(HW,{})}),J.jsx(dr,{path:"/import",element:J.jsx(VW,{})}),J.jsx(dr,{path:"/cart",element:J.jsx(GW,{})}),J.jsx(dr,{path:"/credits",element:J.jsx(zW,{})}),J.jsx(dr,{path:"/success",element:J.jsx(WW,{})}),J.jsx(dr,{path:"*",element:J.jsx(YW,{})})]})})})}),J.jsx(Cl,{fallback:J.jsx(J.Fragment,{}),children:J.jsx(nW,{})})]})}function JW({children:e}){const t=o_(r=>r.locale);return B8(t),J.jsx(R8,{value:EE(t),children:e},t)}m4();const QW=new _j({defaultOptions:{queries:{staleTime:3e4,refetchOnWindowFocus:!1}}}),ZW=["localhost","127.0.0.1"].includes(window.location.hostname),e6=ZW?void 0:"/shop";VD.createRoot(document.getElementById("root")).render(J.jsx(YO.StrictMode,{children:J.jsx(vj,{client:QW,children:J.jsx(JW,{children:J.jsx(GD,{basename:e6,children:J.jsx(XW,{})})})})}));export{r3 as $,SE as A,v0 as B,hW as C,nA as D,p6 as E,d6 as F,f6 as G,a4 as H,h6 as I,O6 as J,fE as K,z8 as L,W8 as M,bE as N,Y8 as O,Ga as P,g6 as Q,I6 as R,dj as S,s6 as T,a6 as U,Cj as V,vE as W,i6 as X,ud as Y,y6 as Z,Gt as _,Rs as a,bn as a0,s_ as a1,NO as a2,bW as a3,l6 as a4,C6 as a5,_W as a6,vW as a7,S6 as a8,b6 as a9,R6 as aa,T6 as ab,tn as ac,cH as ad,J4 as ae,tu as af,Q_ as ag,_6 as ah,F_ as ai,xP as aj,KP as ak,qH as al,TH as am,m6 as b,Ll as c,Un as d,A6 as e,P6 as f,bD as g,Nt as h,Jr as i,ci as j,ds as k,oW as l,Yg as m,wW as n,Kr as o,w6 as p,dW as q,en as r,E6 as s,Yr as t,Dl as u,N6 as v,v6 as w,ez as x,Ej as y,qo as z};