@dcl/shop 0.1.0-28788415697.commit-92a0131 → 0.1.0-28849951791.commit-e0fa315

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 (201) hide show
  1. package/assets/Assets-uXzVK3Qk.js +1 -0
  2. package/assets/Cart-B_feHFWP.js +1 -0
  3. package/assets/{CircularProgress-B0lRHBCP.js → CircularProgress-MlGhFCHM.js} +1 -1
  4. package/assets/{Collection-DpUFjy6q.js → Collection-HISXJvQ9.js} +1 -1
  5. package/assets/{ConstantsUtil-D9t4gp4-.js → ConstantsUtil-DOBrEopM.js} +1 -1
  6. package/assets/{Creator-BIgvo89M.js → Creator-DckKaL-1.js} +1 -1
  7. package/assets/{ExchangeController-BxGELXaJ.js → ExchangeController-Baa0YVeA.js} +1 -1
  8. package/assets/GetCredits-DqKwryal.js +2 -0
  9. package/assets/{HelpersUtil-JEAWoPWy.js → HelpersUtil-BVXkvMyH.js} +1 -1
  10. package/assets/ImportListings-3PSkCxI9.js +1 -0
  11. package/assets/ItemDetail-Ck5cudTI.js +1 -0
  12. package/assets/{LoadMore-DB6TwvRe.js → LoadMore-Cae84rui.js} +1 -1
  13. package/assets/Market-r9wggpqR.js +1 -0
  14. package/assets/MenuItem-CTKZTFhj.js +82 -0
  15. package/assets/MyAssets-DbjlwVgI.js +1 -0
  16. package/assets/{MyFavorites-LznRvK5N.js → MyFavorites-CUJsTl4U.js} +1 -1
  17. package/assets/{MyPurchases-BM1Uxpk1.js → MyPurchases-D231IumZ.js} +1 -1
  18. package/assets/{NetworkUtil-CSluj-ND.js → NetworkUtil-aE1iGnVj.js} +1 -1
  19. package/assets/NotFound-MYCYhimC.js +1 -0
  20. package/assets/{RealCheckout-DbSQfCUZ.js → RealCheckout-_Z3g7ZbH.js} +1 -1
  21. package/assets/ShopFooterInner-gDzKrctg.js +24 -0
  22. package/assets/{SkeletonCards-yV2mi4oc.js → SkeletonCards-D9qg3FUs.js} +1 -1
  23. package/assets/{Success-CkhrWNlU.js → Success-vyQPaFjH.js} +1 -1
  24. package/assets/{SvgIcon-o9nhGFxM.js → SvgIcon-DHNKm7fg.js} +1 -1
  25. package/assets/{SwapController-C1nqmWnS.js → SwapController-C28NtHea.js} +1 -1
  26. package/assets/{TradeService-BOr6_BxE.js → TradeService-CV6tm-S-.js} +1 -1
  27. package/assets/{W3MFrameProviderSingleton-Drovl6ew.js → W3MFrameProviderSingleton-CPW2Gx43.js} +3 -3
  28. package/assets/{WebCryptoP256-C468KsvN.js → WebCryptoP256-CJ8gEFrP.js} +1 -1
  29. package/assets/{basic-CfT3tKSs.js → basic-Cp5xCH29.js} +1 -1
  30. package/assets/{biconomy-BRQR4sBp.js → biconomy-DE6VN2MK.js} +1 -1
  31. package/assets/{browser-tNtPL9tA.js → browser-Ch1J123w.js} +1 -1
  32. package/assets/{browser-ponyfill-DgNUJw98.js → browser-ponyfill-Be08WuKC.js} +1 -1
  33. package/assets/{buy-C-Rj-xp5.js → buy-DW_YPH6-.js} +1 -1
  34. package/assets/{buy-gasless-BmoACMRr.js → buy-gasless-C0vjtz9e.js} +1 -1
  35. package/assets/{ccip-c6S7TqyR.js → ccip-CO-J9tPJ.js} +1 -1
  36. package/assets/{ccip-0BllB1E2.js → ccip-Dw1-xWm0.js} +1 -1
  37. package/assets/{chains-L33YnVne.js → chains-BQfW7JAQ.js} +1 -1
  38. package/assets/{collection-WeXeyjAn.js → collection-gU9snfSG.js} +1 -1
  39. package/assets/colors-LINLm1ux.js +1 -0
  40. package/assets/{common-CKF0Kl8D.js → common-CcOIK3mx.js} +1 -1
  41. package/assets/{controller-dlBlTbYB.js → controller-Dp-L0bGU.js} +2 -2
  42. package/assets/{core-Bl_sLfyx.js → core-DOKNMejd.js} +4 -4
  43. package/assets/{custom-CNFVifWV.js → custom-DrZvVkR4.js} +1 -1
  44. package/assets/{data-capture-SDMekFnt.js → data-capture-CWmntLCH.js} +1 -1
  45. package/assets/{decimals-CSVlCZb3.js → decimals-BpJkRsKM.js} +1 -1
  46. package/assets/decimals-D1rmvFNT.js +1 -0
  47. package/assets/{detectExtension-CGFTREd-.js → detectExtension-BOrmaly3.js} +1 -1
  48. package/assets/{email-CYnr2jcE.js → email-DTaLpEKv.js} +1 -1
  49. package/assets/{embedded-wallet-W7SWJ6st.js → embedded-wallet-DVickMII.js} +1 -1
  50. package/assets/{engine-UOkAfyVN.js → engine-Cyf0wDMH.js} +1 -1
  51. package/assets/{estimate-l1-fee-D_bpSDla.js → estimate-l1-fee-Ci_3qNsd.js} +1 -1
  52. package/assets/eth_estimateGas-Bu7KbsjJ.js +1 -0
  53. package/assets/{eth_getStorageAt-D3dzlnBk.js → eth_getStorageAt-gEhkd3Dl.js} +1 -1
  54. package/assets/eth_getTransactionCount-CZrmDIpa.js +1 -0
  55. package/assets/{ethereum-BT-rALS5.js → ethereum-XjVKsXdf.js} +1 -1
  56. package/assets/{ethers-DbXGgxrh.js → ethers-CU3Ctw5k.js} +1 -1
  57. package/assets/{extractIPFS-DGHj61b1.js → extractIPFS-HSGbtFdH.js} +1 -1
  58. package/assets/{features-DENKVFit.js → features-CjtSZKbI.js} +1 -1
  59. package/assets/{fetchTokenMetadata-D85asFLD.js → fetchTokenMetadata-DcoAGAFy.js} +2 -2
  60. package/assets/{fortmatic-fqRJiMUL.js → fortmatic-86Dpmkig.js} +1 -1
  61. package/assets/{generateUtilityClasses-DXz6v4wN.js → generateUtilityClasses-DMMGtITh.js} +2 -2
  62. package/assets/get-ecosystem-wallet-info-GpWofI03.js +1 -0
  63. package/assets/{getBalance-D2EO4aBF.js → getBalance-IAhn1Sx7.js} +2 -2
  64. package/assets/{getInstalledModules-D4PNkmVO.js → getInstalledModules-Clea_yJr.js} +1 -1
  65. package/assets/{getNFT-BESsQ4oH.js → getNFT-BkaCCDU5.js} +1 -1
  66. package/assets/{getNFT-Ddh7bEJQ.js → getNFT-CbT_NWLy.js} +2 -2
  67. package/assets/{hashTypedData-C9QOz9pr.js → hashTypedData-DAd66wY6.js} +1 -1
  68. package/assets/{hashTypedData-Bx3nzvk8.js → hashTypedData-PYLB7hJl.js} +1 -1
  69. package/assets/import-dVEuzimB.js +1 -0
  70. package/assets/{in-app-wallet-calls-Df158hbr.js → in-app-wallet-calls-l67EA4DZ.js} +1 -1
  71. package/assets/{index-Dk9zDQwk.js → index-7rWaFD7f.js} +1 -1
  72. package/assets/{index-K4m_AYVk.js → index-B0--HMVL.js} +3 -3
  73. package/assets/{index-soJZoLvF.js → index-B1ZF46Ko.js} +1 -1
  74. package/assets/{index-p2GbBPES.js → index-B3P6BPci.js} +1 -1
  75. package/assets/{index-aTH_VwVx.js → index-B67hpoq5.js} +1 -1
  76. package/assets/{index-BkFksbUM.js → index-B6lLVyUf.js} +1 -1
  77. package/assets/{index-kV1vUp3Z.js → index-B94ghhpu.js} +1 -1
  78. package/assets/{index-BC7-fNQN.js → index-BKA2Kk9C.js} +1 -1
  79. package/assets/{index-DBg2eXPN.js → index-BVcNzXap.js} +1 -1
  80. package/assets/{index-3SuxDGIz.js → index-BWbKKFVK.js} +1 -1
  81. package/assets/{index-BGGbU05t.js → index-BYg62rD6.js} +1 -1
  82. package/assets/{index-DFJRGUDh.js → index-B_NuPdf0.js} +1 -1
  83. package/assets/{index-BEqhzSDF.js → index-BcZPRgUv.js} +1 -1
  84. package/assets/{index-VSv5weX8.js → index-Bd4x7TMP.js} +1 -1
  85. package/assets/{index-DoTsdAEj.js → index-BeUILvqM.js} +1 -1
  86. package/assets/{index-boWBUFDv.js → index-BjptEpaJ.js} +1 -1
  87. package/assets/{index-DYf2mXDi.js → index-Bl9N3aWR.js} +1 -1
  88. package/assets/{index-Cre0gJrZ.js → index-BrR0WZ0Y.js} +1 -1
  89. package/assets/{index-BqV4-5lu.js → index-BuedKT8D.js} +2 -2
  90. package/assets/{index-TLgW5WZT.js → index-Bv11rzVa.js} +1 -1
  91. package/assets/{index-CIxFIqFU.js → index-C6uhDE9h.js} +1 -1
  92. package/assets/{index-wj8CVNfJ.js → index-C7St4Q5o.js} +1 -1
  93. package/assets/{index-DFrHyvod.js → index-CAXOAo7E.js} +1 -1
  94. package/assets/index-CENUxZfv.js +4 -0
  95. package/assets/{index-WQHztqda.js → index-CbyAJw4-.js} +1 -1
  96. package/assets/{index-CfLoF7Qe.js → index-CcUfpaSP.js} +1 -1
  97. package/assets/{index-D6h-NdP-.js → index-CcsWoBJK.js} +1 -1
  98. package/assets/{index-LSdKGFoq.js → index-CdO-kfoS.js} +1 -1
  99. package/assets/{index-BQWuxKdW.js → index-CqnsV9lR.js} +1 -1
  100. package/assets/{index-m4zZXBld.js → index-CsVrdKM8.js} +1 -1
  101. package/assets/{index-B4P5FnkC.js → index-Ctj09Wx6.js} +1 -1
  102. package/assets/index-CuBAn4iR.js +1 -0
  103. package/assets/{index-75Ps2rGt.js → index-D1gEge8-.js} +3 -3
  104. package/assets/{index-B5lBgsVo.js → index-D3oE2u-n.js} +1 -1
  105. package/assets/{index-BpRV6pU7.js → index-D5JjqjjU.js} +1 -1
  106. package/assets/index-D9XZpwfV.js +95 -0
  107. package/assets/{index-CORb4fda.js → index-DHG_C-Ye.js} +1 -1
  108. package/assets/{index-u6DTe7Nz.js → index-DOLdge0g.js} +1 -1
  109. package/assets/{index-DUOCGq8U.js → index-DURh1PEo.js} +1 -1
  110. package/assets/{index-B3m29cNt.js → index-DVcL7J_t.js} +1 -1
  111. package/assets/{index-ykRzQjuZ.js → index-Df6GKZpc.js} +2 -2
  112. package/assets/{index-CvVHPcFb.js → index-DnQG3NAn.js} +1 -1
  113. package/assets/{index-C6ImpJyG.js → index-DqnX5uAR.js} +1 -1
  114. package/assets/{index-DaBA0yRd.js → index-Dv41StGm.js} +1 -1
  115. package/assets/index-DxWP3gak.js +7 -0
  116. package/assets/index-Pws_ODuR.css +1 -0
  117. package/assets/index-ZxkJeEpU.js +1 -0
  118. package/assets/{index-BwMgLDly.js → index-a4k6LaYK.js} +1 -1
  119. package/assets/{index-SBOBxQlc.js → index-bJ6HAtiK.js} +1 -1
  120. package/assets/{index-CBLO6USL.js → index-jCrNn234.js} +1 -1
  121. package/assets/{index-C631qzTG.js → index-o2j-czuk.js} +1 -1
  122. package/assets/{index-DdlK5WYO.js → index-o3xLbiUm.js} +1 -1
  123. package/assets/{index-kSZb6Dua.js → index-rk-RtPGh.js} +1 -1
  124. package/assets/{index-bwiQJCJg.js → index-u77btqjQ.js} +2 -2
  125. package/assets/{index-yPxvUW6S.js → index-u8nH4Rw0.js} +1 -1
  126. package/assets/{index-BUE1aXpM.js → index-uzc4dT8s.js} +1 -1
  127. package/assets/{index-63GX_n07.js → index-zVvLDKBh.js} +2 -2
  128. package/assets/{index-B4VK7VPX.js → index-zbujtMDB.js} +1 -1
  129. package/assets/{index.es-C0c_PfHy.js → index.es-CYMyZCD-.js} +1 -1
  130. package/assets/{index.es-BRKHDF5O.js → index.es-DJUkBdGr.js} +1 -1
  131. package/assets/{index.es-CO_XF63k.js → index.es-UvEfkSna.js} +4 -4
  132. package/assets/{localBatchGatewayRequest-Coptu8fQ.js → localBatchGatewayRequest-C9D88kZr.js} +1 -1
  133. package/assets/{mana-rate-RN1C71HA.js → mana-rate-Dx_lqKWQ.js} +1 -1
  134. package/assets/{native-BJmDxbqB.js → native-zogUBnfz.js} +1 -1
  135. package/assets/network-CCTP_tzM.js +1 -0
  136. package/assets/{networks-Dk1wsaJ8.js → networks-KbQXXD7P.js} +1 -1
  137. package/assets/{onramp-8Ursi6WH.js → onramp-iekcmGjJ.js} +1 -1
  138. package/assets/{openzeppelin-DoezFh1a.js → openzeppelin-41206uN_.js} +1 -1
  139. package/assets/{ownerOf-Be35NH6y.js → ownerOf-DH7SAQYs.js} +1 -1
  140. package/assets/{parseNft-B8RddWyu.js → parseNft-Dy8OsAtf.js} +2 -2
  141. package/assets/{parseSignature-BCXOdvDq.js → parseSignature-BiaWpR8i.js} +1 -1
  142. package/assets/{parseSignature-B9N92FV1.js → parseSignature-D9IuPuaA.js} +3 -3
  143. package/assets/{pay-with-exchange-CLsRdRnD.js → pay-with-exchange-D0U4VJXZ.js} +1 -1
  144. package/assets/{qr-overlay-CfKat5Nj.js → qr-overlay-35KmnL99.js} +3 -3
  145. package/assets/{react-E8ng6RF2.js → react-4iaCnQ6n.js} +1 -1
  146. package/assets/{receive-Bpba7exF.js → receive-D80uh9Rj.js} +1 -1
  147. package/assets/{resolveImplementation-COEuR_c6.js → resolveImplementation-BuxyNBBw.js} +1 -1
  148. package/assets/{rpc-CA14ywXy.js → rpc-CV4XQPwJ.js} +1 -1
  149. package/assets/{secp256k1-BYTveHSI.js → secp256k1-Bz9G1VTq.js} +1 -1
  150. package/assets/{secp256k1-BxNXIPx_.js → secp256k1-CZj9lLpY.js} +1 -1
  151. package/assets/{secp256k1-VCKU6ZbV.js → secp256k1-lf00rTSa.js} +1 -1
  152. package/assets/{send-CKEWBVZR.js → send-CZjs1yZc.js} +1 -1
  153. package/assets/{send-batch-transaction-kRaDbHFW.js → send-batch-transaction-uDBYU3an.js} +1 -1
  154. package/assets/{send-eip712-transaction-BdAsbdUC.js → send-eip712-transaction-DR18L-sh.js} +2 -2
  155. package/assets/{send-gasless-transaction-umbide8L.js → send-gasless-transaction-BfuwoIYy.js} +2 -2
  156. package/assets/{sendRawTransaction-9yflHgsx.js → sendRawTransaction-BUgSPkVd.js} +3 -3
  157. package/assets/{serializeTransaction-Cl_9QLOo.js → serializeTransaction-Dmi33xSK.js} +1 -1
  158. package/assets/{session-proposal-CAuTXnKi.js → session-proposal-BOa4yxBl.js} +1 -1
  159. package/assets/{session-request-CuMQl9E8.js → session-request-Bcaq75nd.js} +2 -2
  160. package/assets/{sha256-4KqSLEWF.js → sha256-zMI7s0-F.js} +1 -1
  161. package/assets/{signing-CHdT_Ot8.js → signing-Cvv8O8BI.js} +5 -5
  162. package/assets/{socials-9xnPXlWI.js → socials-C_Nw_-aT.js} +1 -1
  163. package/assets/{swaps-DJp-RCo5.js → swaps-DrEprVp5.js} +1 -1
  164. package/assets/{thirdweb-T9OwwIQ6.js → thirdweb-D3908hZR.js} +3 -3
  165. package/assets/{totalSupply-D_X-_ZDw.js → totalSupply-CpI009r1.js} +1 -1
  166. package/assets/{transactionReceipt-BTJ1sQrj.js → transactionReceipt-CRiBJ28i.js} +1 -1
  167. package/assets/{transactions-C6sC5BaM.js → transactions-63jnvtFL.js} +1 -1
  168. package/assets/{useInfiniteGrid-et3T-1IY.js → useInfiniteGrid-xOdKaR3H.js} +1 -1
  169. package/assets/{utils-BZTXwsyT.js → utils-kxirIM46.js} +1 -1
  170. package/assets/{verifyHash-CudNiAgH.js → verifyHash-BR9R1RG0.js} +1 -1
  171. package/assets/{w3m-modal-DIuoUtJk.js → w3m-modal-BlMrqGaw.js} +1 -1
  172. package/assets/{w3m-modal-BxYBckMB.js → w3m-modal-lZE_ZuOa.js} +1 -1
  173. package/assets/{wait-for-tx-receipt-CygP4VsC.js → wait-for-tx-receipt-Do82Sucy.js} +1 -1
  174. package/assets/{wallet-kind-BTWNHcc9.js → wallet-kind-WAQetlRX.js} +1 -1
  175. package/assets/{wallets-CsiIl2HG.js → wallets-CoP2jTeJ.js} +6 -6
  176. package/assets/{web-connector-BkMDTCh_.js → web-connector-uOzuTTW_.js} +3 -3
  177. package/assets/{writeContract-C8FPneHs.js → writeContract-D-hfmcKA.js} +1 -1
  178. package/assets/{zora-sepolia-BF9oR096.js → zora-sepolia-BMTSsYE9.js} +1 -1
  179. package/assets/{zoraTestnet-CQZ9NUll.js → zoraTestnet-BMgpy9AE.js} +1 -1
  180. package/index.html +8 -8
  181. package/package.json +2 -2
  182. package/assets/Assets-C0yakYaS.js +0 -1
  183. package/assets/Cart-CcietwVV.js +0 -1
  184. package/assets/GetCredits-BkyWsDk5.js +0 -2
  185. package/assets/ImportListings-_ZmYZr75.js +0 -1
  186. package/assets/ItemDetail-5H1R8AEJ.js +0 -1
  187. package/assets/Market-DjypWFj5.js +0 -1
  188. package/assets/MyAssets-CrobB3dP.js +0 -1
  189. package/assets/NotFound-DW9xW0V2.js +0 -1
  190. package/assets/decimals-DoXdKj3t.js +0 -1
  191. package/assets/eth_estimateGas-CtUEH79c.js +0 -1
  192. package/assets/eth_getTransactionCount-n2pPwlEw.js +0 -1
  193. package/assets/get-ecosystem-wallet-info-D5g78AMe.js +0 -1
  194. package/assets/import-CDNhzcDz.js +0 -1
  195. package/assets/index-C13awi5n.js +0 -74
  196. package/assets/index-CVEOS5BF.css +0 -1
  197. package/assets/index-ChPBLIHl.js +0 -1
  198. package/assets/index-D7_2_7YY.js +0 -85
  199. package/assets/index-DSxKsQSh.js +0 -1
  200. package/assets/index-z01aMwFk.js +0 -7
  201. package/assets/network-DRh88abw.js +0 -1
@@ -0,0 +1,95 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CuBAn4iR.js","assets/react-4iaCnQ6n.js","assets/network-CCTP_tzM.js","assets/SvgIcon-DHNKm7fg.js","assets/generateUtilityClasses-DMMGtITh.js","assets/colors-LINLm1ux.js","assets/ethers-CU3Ctw5k.js","assets/index-zVvLDKBh.js","assets/index-CENUxZfv.js","assets/index-D3oE2u-n.js","assets/MenuItem-CTKZTFhj.js","assets/CircularProgress-MlGhFCHM.js","assets/ShopFooterInner-gDzKrctg.js","assets/TradeService-CV6tm-S-.js","assets/index-B94ghhpu.js","assets/Assets-uXzVK3Qk.js","assets/SkeletonCards-D9qg3FUs.js","assets/LoadMore-Cae84rui.js","assets/useInfiniteGrid-xOdKaR3H.js","assets/Market-r9wggpqR.js","assets/mana-rate-Dx_lqKWQ.js","assets/buy-DW_YPH6-.js","assets/buy-gasless-C0vjtz9e.js","assets/ItemDetail-Ck5cudTI.js","assets/ItemDetail-BLC5ggDg.css","assets/Collection-HISXJvQ9.js","assets/collection-gU9snfSG.js","assets/collection-Ds5shVfK.css","assets/Creator-DckKaL-1.js","assets/MyAssets-DbjlwVgI.js","assets/import-dVEuzimB.js","assets/wallet-kind-WAQetlRX.js","assets/MyAssets-BjiqkBzd.css","assets/MyFavorites-CUJsTl4U.js","assets/MyPurchases-D231IumZ.js","assets/ImportListings-3PSkCxI9.js","assets/ImportListings-Cdx3om4x.css","assets/Cart-B_feHFWP.js","assets/GetCredits-DqKwryal.js","assets/Success-vyQPaFjH.js","assets/NotFound-MYCYhimC.js"])))=>i.map(i=>d[i]);
2
+ var RD=Object.defineProperty;var DE=e=>{throw TypeError(e)};var wD=(e,t,r)=>t in e?RD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Yn=(e,t,r)=>wD(e,typeof t!="symbol"?t+"":t,r),gd=(e,t,r)=>t.has(e)||DE("Cannot "+r);var ue=(e,t,r)=>(gd(e,t,"read from private field"),r?r.call(e):t.get(e)),We=(e,t,r)=>t.has(e)?DE("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),je=(e,t,r,n)=>(gd(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),rt=(e,t,r)=>(gd(e,t,"access private method"),r);var Gu=(e,t,r,n)=>({set _(i){je(e,t,i,r)},get _(){return ue(e,t,n)}});import{r as De,j as Q,l as CO,g as MO,R as DO,c as ng,L as vl,a as Ml,m as xn,d as AD,n as OD,o as dr,N as ND,p as PD,B as CD}from"./react-4iaCnQ6n.js";import{g as bl,p as ml,W as MD,m as DD,h as jE,f as jO}from"./ethers-CU3Ctw5k.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 Uo=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,Ga,bO,jD=(bO=class extends Uo{constructor(){super();We(this,Qi);We(this,ei);We(this,Ga);je(this,Ga,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,Ga))}onUnsubscribe(){var t;this.hasListeners()||((t=ue(this,ei))==null||t.call(this),je(this,ei,void 0))}setEventListener(t){var r;je(this,Ga,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,Ga=new WeakMap,bO),i_=new jD,LD={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},ti,n_,TO,$D=(TO=class{constructor(){We(this,ti,LD);We(this,n_,!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,n_=new WeakMap,TO),Ji=new $D;function qD(e){setTimeout(e,0)}var BD=typeof window>"u"||"Deno"in globalThis;function Sr(){}function kD(e,t){return typeof e=="function"?e(t):e}function ig(e){return typeof e=="number"&&e>=0&&e!==1/0}function LO(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 LE(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:a,queryKey:s,stale:o}=e;if(s){if(n){if(t.queryHash!==a_(s,t.options))return!1}else if(!wo(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 $E(e,t){const{exact:r,status:n,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(Ro(t.options.mutationKey)!==Ro(a))return!1}else if(!wo(t.options.mutationKey,a))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function a_(e,t){return((t==null?void 0:t.queryKeyHashFn)||Ro)(e)}function Ro(e){return JSON.stringify(e,(t,r)=>sg(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function wo(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>wo(e[r],t[r])):!1}var UD=Object.prototype.hasOwnProperty;function $O(e,t,r=0){if(e===t)return e;if(r>500)return t;const n=qE(e)&&qE(t);if(!n&&!(sg(e)&&sg(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],m=e[d],p=t[d];if(m===p){u[d]=m,(n?c<a:UD.call(e,d))&&l++;continue}if(m===null||p===null||typeof m!="object"||typeof p!="object"){u[d]=p;continue}const E=$O(m,p,r+1);u[d]=E,E===m&&l++}return a===o&&l===a?e:u}function ag(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 qE(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function sg(e){if(!BE(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!BE(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function BE(e){return Object.prototype.toString.call(e)==="[object Object]"}function FD(e){return new Promise(t=>{Ji.setTimeout(t,e)})}function og(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?$O(e,t):t}function GW(e){return e}function HD(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function VD(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var s_=Symbol();function qO(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===s_?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function BO(e,t){return typeof e=="function"?e(...t):!!e}function GD(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 Ao=(()=>{let e=()=>BD;return{isServer(){return e()},setIsServer(t){e=t}}})();function ug(){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 zD=qD;function WD(){let e=[],t=0,r=o=>{o()},n=o=>{o()},i=zD;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=WD(),za,ri,Wa,SO,YD=(SO=class extends Uo{constructor(){super();We(this,za,!0);We(this,ri);We(this,Wa);je(this,Wa,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,Wa))}onUnsubscribe(){var t;this.hasListeners()||((t=ue(this,ri))==null||t.call(this),je(this,ri,void 0))}setEventListener(t){var r;je(this,Wa,t),(r=ue(this,ri))==null||r.call(this),je(this,ri,t(this.setOnline.bind(this)))}setOnline(t){ue(this,za)!==t&&(je(this,za,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return ue(this,za)}},za=new WeakMap,ri=new WeakMap,Wa=new WeakMap,SO),Tl=new YD;function xD(e){return Math.min(1e3*2**e,3e4)}function kO(e){return(e??"online")==="online"?Tl.isOnline():!0}var cg=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function UO(e){let t=!1,r=0,n;const i=ug(),a=()=>i.status!=="pending",s=T=>{var S;if(!a()){const A=new cg(T);m(A),(S=e.onCancel)==null||S.call(e,A)}},o=()=>{t=!0},u=()=>{t=!1},l=()=>i_.isFocused()&&(e.networkMode==="always"||Tl.isOnline())&&e.canRun(),c=()=>kO(e.networkMode)&&e.canRun(),d=T=>{a()||(n==null||n(),i.resolve(T))},m=T=>{a()||(n==null||n(),i.reject(T))},p=()=>new Promise(T=>{var S;n=A=>{(a()||l())&&T(A)},(S=e.onPause)==null||S.call(e)}).then(()=>{var T;n=void 0,a()||(T=e.onContinue)==null||T.call(e)}),E=()=>{if(a())return;let T;const S=r===0?e.initialPromise:void 0;try{T=S??e.fn()}catch(A){T=Promise.reject(A)}Promise.resolve(T).then(d).catch(A=>{var I;if(a())return;const f=e.retry??(Ao.isServer()?0:3),_=e.retryDelay??xD,b=typeof _=="function"?_(r,A):_,h=f===!0||typeof f=="number"&&r<f||typeof f=="function"&&f(r,A);if(t||!h){m(A);return}r++,(I=e.onFail)==null||I.call(e,r,A),FD(b).then(()=>l()?void 0:p()).then(()=>{t?m(A):E()})})};return{promise:i,status:()=>i.status,cancel:s,continue:()=>(n==null||n(),i),cancelRetry:o,continueRetry:u,canStart:c,start:()=>(c()?E():p().then(E),i)}}var Zi,IO,FO=(IO=class{constructor(){We(this,Zi)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ig(this.gcTime)&&je(this,Zi,Ji.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ao.isServer()?1/0:300*1e3))}clearGcTimeout(){ue(this,Zi)!==void 0&&(Ji.clearTimeout(ue(this,Zi)),je(this,Zi,void 0))}},Zi=new WeakMap,IO);function KD(e){return{onFetch:(t,r)=>{var c,d,m,p,E;const n=t.options,i=(m=(d=(c=t.fetchOptions)==null?void 0:c.meta)==null?void 0:d.fetchMore)==null?void 0:m.direction,a=((p=t.state.data)==null?void 0:p.pages)||[],s=((E=t.state.data)==null?void 0:E.pageParams)||[];let o={pages:[],pageParams:[]},u=0;const l=async()=>{let T=!1;const S=_=>{GD(_,()=>t.signal,()=>T=!0)},A=qO(t.options,t.fetchOptions),f=async(_,b,h)=>{if(T)return Promise.reject(t.signal.reason);if(b==null&&_.pages.length)return Promise.resolve(_);const O=(()=>{const Y={client:t.client,queryKey:t.queryKey,pageParam:b,direction:h?"backward":"forward",meta:t.options.meta};return S(Y),Y})(),P=await A(O),{maxPages:B}=t.options,z=h?VD:HD;return{pages:z(_.pages,P,B),pageParams:z(_.pageParams,b,B)}};if(i&&a.length){const _=i==="backward",b=_?HO:lg,h={pages:a,pageParams:s},I=b(n,h);o=await f(h,I,_)}else{const _=e??a.length;do{const b=u===0?s[0]??n.initialPageParam:lg(n,o);if(u>0&&b==null)break;o=await f(o,b),u++}while(u<_)}return o};t.options.persister?t.fetchFn=()=>{var T,S;return(S=(T=t.options).persister)==null?void 0:S.call(T,l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=l}}}function lg(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 HO(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 zW(e,t){return t?lg(e,t)!=null:!1}function WW(e,t){return!t||!e.getPreviousPageParam?!1:HO(e,t)!=null}var Ya,ea,xa,jr,ta,Yt,Lo,ra,Pr,VO,jn,RO,XD=(RO=class extends FO{constructor(t){super();We(this,Pr);We(this,Ya);We(this,ea);We(this,xa);We(this,jr);We(this,ta);We(this,Yt);We(this,Lo);We(this,ra);je(this,ra,!1),je(this,Lo,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,UE(this.options)),this.state=t.state??ue(this,ea),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return ue(this,Ya)}get promise(){var t;return(t=ue(this,Yt))==null?void 0:t.promise}setOptions(t){if(this.options={...ue(this,Lo),...t},t!=null&&t._type&&je(this,Ya,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=UE(this.options);r.data!==void 0&&(this.setState(kE(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=og(this.state.data,t,this.options);return rt(this,Pr,jn).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,jn).call(this,{type:"setState",state:t})}cancel(t){var n,i;const r=(n=ue(this,Yt))==null?void 0:n.promise;return(i=ue(this,Yt))==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===s_||!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:!LO(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=ue(this,Yt))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=ue(this,Yt))==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,Yt)&&(ue(this,ra)||rt(this,Pr,VO).call(this)?ue(this,Yt).cancel({revert:!0}):ue(this,Yt).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,jn).call(this,{type:"invalidate"})}async fetch(t,r){var l,c,d,m,p,E,T,S,A,f,_;if(this.state.fetchStatus!=="idle"&&((l=ue(this,Yt))==null?void 0:l.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(ue(this,Yt))return ue(this,Yt).continueRetry(),ue(this,Yt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const b=this.observers.find(h=>h.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=qO(this.options,r),I=(()=>{const O={client:ue(this,ta),queryKey:this.queryKey,meta:this.meta};return i(O),O})();return je(this,ra,!1),this.options.persister?this.options.persister(b,I,this):b(I)},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,Ya)==="infinite"?KD(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,jn).call(this,{type:"fetch",meta:(d=o.fetchOptions)==null?void 0:d.meta}),je(this,Yt,UO({initialPromise:r==null?void 0:r.initialPromise,fn:o.fetchFn,onCancel:b=>{b instanceof cg&&b.revert&&this.setState({...ue(this,xa),fetchStatus:"idle"}),n.abort()},onFail:(b,h)=>{rt(this,Pr,jn).call(this,{type:"failed",failureCount:b,error:h})},onPause:()=>{rt(this,Pr,jn).call(this,{type:"pause"})},onContinue:()=>{rt(this,Pr,jn).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}));try{const b=await ue(this,Yt).start();if(b===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(b),(p=(m=ue(this,jr).config).onSuccess)==null||p.call(m,b,this),(T=(E=ue(this,jr).config).onSettled)==null||T.call(E,b,this.state.error,this),b}catch(b){if(b instanceof cg){if(b.silent)return ue(this,Yt).promise;if(b.revert){if(this.state.data===void 0)throw b;return this.state.data}}throw rt(this,Pr,jn).call(this,{type:"error",error:b}),(A=(S=ue(this,jr).config).onError)==null||A.call(S,b,this),(_=(f=ue(this,jr).config).onSettled)==null||_.call(f,this.state.data,b,this),b}finally{this.scheduleGc()}}},Ya=new WeakMap,ea=new WeakMap,xa=new WeakMap,jr=new WeakMap,ta=new WeakMap,Yt=new WeakMap,Lo=new WeakMap,ra=new WeakMap,Pr=new WeakSet,VO=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},jn=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,...GO(n.data,this.options),fetchMeta:t.meta??null};case"success":const i={...n,...kE(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})})},RO);function GO(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:kO(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function kE(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function UE(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,$o,pr,na,Ka,qn,ni,qo,Xa,Ja,ia,aa,ii,Qa,_t,Xs,dg,fg,pg,mg,hg,yg,gg,zO,wO,JD=(wO=class extends Uo{constructor(t,r){super();We(this,_t);We(this,Tr);We(this,st);We(this,$o);We(this,pr);We(this,na);We(this,Ka);We(this,qn);We(this,ni);We(this,qo);We(this,Xa);We(this,Ja);We(this,ia);We(this,aa);We(this,ii);We(this,Qa,new Set);this.options=r,je(this,Tr,t),je(this,ni,null),je(this,qn,ug()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(ue(this,st).addObserver(this),FE(ue(this,st),this.options)?rt(this,_t,Xs).call(this):this.updateResult(),rt(this,_t,mg).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return _g(ue(this,st),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return _g(ue(this,st),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,rt(this,_t,hg).call(this),rt(this,_t,yg).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,gg).call(this),ue(this,st).setOptions(this.options),r._defaulted&&!ag(this.options,r)&&ue(this,Tr).getQueryCache().notify({type:"observerOptionsUpdated",query:ue(this,st),observer:this});const i=this.hasListeners();i&&HE(ue(this,st),n,this.options,r)&&rt(this,_t,Xs).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,dg).call(this);const a=rt(this,_t,fg).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,pg).call(this,a)}getOptimisticResult(t){const r=ue(this,Tr).getQueryCache().build(ue(this,Tr),t),n=this.createResult(r,t);return ZD(this,n)&&(je(this,pr,n),je(this,Ka,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,qn).status==="pending"&&ue(this,qn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,i))})}trackProp(t){ue(this,Qa).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,Xs).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),ue(this,pr)))}createResult(t,r){var B;const n=ue(this,st),i=this.options,a=ue(this,pr),s=ue(this,na),o=ue(this,Ka),l=t!==n?t.state:ue(this,$o),{state:c}=t;let d={...c},m=!1,p;if(r._optimisticResults){const z=this.hasListeners(),Y=!z&&FE(t,r),W=z&&HE(t,n,r,i);(Y||W)&&(d={...d,...GO(c.data,t.options)}),r._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:E,errorUpdatedAt:T,status:S}=d;p=d.data;let A=!1;if(r.placeholderData!==void 0&&p===void 0&&S==="pending"){let z;a!=null&&a.isPlaceholderData&&r.placeholderData===(o==null?void 0:o.placeholderData)?(z=a.data,A=!0):z=typeof r.placeholderData=="function"?r.placeholderData((B=ue(this,Ja))==null?void 0:B.state.data,ue(this,Ja)):r.placeholderData,z!==void 0&&(S="success",p=og(a==null?void 0:a.data,z,r),m=!0)}if(r.select&&p!==void 0&&!A)if(a&&p===(s==null?void 0:s.data)&&r.select===ue(this,qo))p=ue(this,Xa);else try{je(this,qo,r.select),p=r.select(p),p=og(a==null?void 0:a.data,p,r),je(this,Xa,p),je(this,ni,null)}catch(z){je(this,ni,z)}ue(this,ni)&&(E=ue(this,ni),p=ue(this,Xa),T=Date.now(),S="error");const f=d.fetchStatus==="fetching",_=S==="pending",b=S==="error",h=_&&f,I=p!==void 0,P={status:S,fetchStatus:d.fetchStatus,isPending:_,isSuccess:S==="success",isError:b,isInitialLoading:h,isLoading:h,data:p,dataUpdatedAt:d.dataUpdatedAt,error:E,errorUpdatedAt:T,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:d.dataUpdateCount>l.dataUpdateCount||d.errorUpdateCount>l.errorUpdateCount,isFetching:f,isRefetching:f&&!_,isLoadingError:b&&!I,isPaused:d.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:b&&I,isStale:o_(t,r),refetch:this.refetch,promise:ue(this,qn),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,qn,P.promise=ug());W(ce)},F=ue(this,qn);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,Ka,this.options),ue(this,na).data!==void 0&&je(this,Ja,ue(this,st)),ag(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,Qa).size)return!0;const s=new Set(a??ue(this,Qa));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,zO).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&rt(this,_t,mg).call(this)}},Tr=new WeakMap,st=new WeakMap,$o=new WeakMap,pr=new WeakMap,na=new WeakMap,Ka=new WeakMap,qn=new WeakMap,ni=new WeakMap,qo=new WeakMap,Xa=new WeakMap,Ja=new WeakMap,ia=new WeakMap,aa=new WeakMap,ii=new WeakMap,Qa=new WeakMap,_t=new WeakSet,Xs=function(t){rt(this,_t,gg).call(this);let r=ue(this,st).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Sr)),r},dg=function(){rt(this,_t,hg).call(this);const t=ui(this.options.staleTime,ue(this,st));if(Ao.isServer()||ue(this,pr).isStale||!ig(t))return;const n=LO(ue(this,pr).dataUpdatedAt,t)+1;je(this,ia,Ji.setTimeout(()=>{ue(this,pr).isStale||this.updateResult()},n))},fg=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(ue(this,st)):this.options.refetchInterval)??!1},pg=function(t){rt(this,_t,yg).call(this),je(this,ii,t),!(Ao.isServer()||Cr(this.options.enabled,ue(this,st))===!1||!ig(ue(this,ii))||ue(this,ii)===0)&&je(this,aa,Ji.setInterval(()=>{(this.options.refetchIntervalInBackground||i_.isFocused())&&rt(this,_t,Xs).call(this)},ue(this,ii)))},mg=function(){rt(this,_t,dg).call(this),rt(this,_t,pg).call(this,rt(this,_t,fg).call(this))},hg=function(){ue(this,ia)!==void 0&&(Ji.clearTimeout(ue(this,ia)),je(this,ia,void 0))},yg=function(){ue(this,aa)!==void 0&&(Ji.clearInterval(ue(this,aa)),je(this,aa,void 0))},gg=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,$o,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},zO=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"})})},wO);function QD(e,t){return Cr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Cr(t.retryOnMount,e)===!1)}function FE(e,t){return QD(e,t)||e.state.data!==void 0&&_g(e,t,t.refetchOnMount)}function _g(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&&o_(e,t)}return!1}function HE(e,t,r,n){return(e!==t||Cr(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&o_(e,r)}function o_(e,t){return Cr(t.enabled,e)!==!1&&e.isStaleByTime(ui(t.staleTime,e))}function ZD(e,t){return!ag(e.getCurrentResult(),t)}var Bo,mn,ur,sa,hn,Jn,AO,ej=(AO=class extends FO{constructor(t){super();We(this,hn);We(this,Bo);We(this,mn);We(this,ur);We(this,sa);je(this,Bo,t.client),this.mutationId=t.mutationId,je(this,ur,t.mutationCache),je(this,mn,[]),this.state=t.state||tj(),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,mn).includes(t)||(ue(this,mn).push(t),this.clearGcTimeout(),ue(this,ur).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){je(this,mn,ue(this,mn).filter(r=>r!==t)),this.scheduleGc(),ue(this,ur).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){ue(this,mn).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,m,p,E,T,S,A,f,_,b,h,I,O;const r=()=>{rt(this,hn,Jn).call(this,{type:"continue"})},n={client:ue(this,Bo),meta:this.options.meta,mutationKey:this.options.mutationKey};je(this,sa,UO({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(P,B)=>{rt(this,hn,Jn).call(this,{type:"failed",failureCount:P,error:B})},onPause:()=>{rt(this,hn,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,hn,Jn).call(this,{type:"pending",variables:t,isPaused:a}),ue(this,ur).config.onMutate&&await ue(this,ur).config.onMutate(t,this,n);const B=await((o=(s=this.options).onMutate)==null?void 0:o.call(s,t,n));B!==this.state.context&&rt(this,hn,Jn).call(this,{type:"pending",context:B,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((p=(m=ue(this,ur).config).onSettled)==null?void 0:p.call(m,P,null,this.state.variables,this.state.context,this,n)),await((T=(E=this.options).onSettled)==null?void 0:T.call(E,P,null,t,this.state.context,n)),rt(this,hn,Jn).call(this,{type:"success",data:P}),P}catch(P){try{await((A=(S=ue(this,ur).config).onError)==null?void 0:A.call(S,P,t,this.state.context,this,n))}catch(B){Promise.reject(B)}try{await((_=(f=this.options).onError)==null?void 0:_.call(f,P,t,this.state.context,n))}catch(B){Promise.reject(B)}try{await((h=(b=ue(this,ur).config).onSettled)==null?void 0:h.call(b,void 0,P,this.state.variables,this.state.context,this,n))}catch(B){Promise.reject(B)}try{await((O=(I=this.options).onSettled)==null?void 0:O.call(I,void 0,P,t,this.state.context,n))}catch(B){Promise.reject(B)}throw rt(this,hn,Jn).call(this,{type:"error",error:P}),P}finally{ue(this,ur).runNext(this)}}},Bo=new WeakMap,mn=new WeakMap,ur=new WeakMap,sa=new WeakMap,hn=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,mn).forEach(n=>{n.onMutationUpdate(t)}),ue(this,ur).notify({mutation:this,type:"updated",action:t})})},AO);function tj(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Bn,xr,ko,OO,rj=(OO=class extends Uo{constructor(t={}){super();We(this,Bn);We(this,xr);We(this,ko);this.config=t,je(this,Bn,new Set),je(this,xr,new Map),je(this,ko,0)}build(t,r,n){const i=new ej({client:t,mutationCache:this,mutationId:++Gu(this,ko)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){ue(this,Bn).add(t);const r=zu(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,Bn).delete(t)){const r=zu(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=zu(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=zu(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,Bn).forEach(t=>{this.notify({type:"removed",mutation:t})}),ue(this,Bn).clear(),ue(this,xr).clear()})}getAll(){return Array.from(ue(this,Bn))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>$E(r,n))}findAll(t={}){return this.getAll().filter(r=>$E(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))))}},Bn=new WeakMap,xr=new WeakMap,ko=new WeakMap,OO);function zu(e){var t;return(t=e.options.scope)==null?void 0:t.id}var yn,NO,nj=(NO=class extends Uo{constructor(t={}){super();We(this,yn);this.config=t,je(this,yn,new Map)}build(t,r,n){const i=r.queryKey,a=r.queryHash??a_(i,r);let s=this.get(a);return s||(s=new XD({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(s)),s}add(t){ue(this,yn).has(t.queryHash)||(ue(this,yn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=ue(this,yn).get(t.queryHash);r&&(t.destroy(),r===t&&ue(this,yn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Zt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return ue(this,yn).get(t)}getAll(){return[...ue(this,yn).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>LE(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>LE(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()})})}},yn=new WeakMap,NO),Bt,ai,si,Za,es,oi,ts,rs,PO,ij=(PO=class{constructor(e={}){We(this,Bt);We(this,ai);We(this,si);We(this,Za);We(this,es);We(this,oi);We(this,ts);We(this,rs);je(this,Bt,e.queryCache||new nj),je(this,ai,e.mutationCache||new rj),je(this,si,e.defaultOptions||{}),je(this,Za,new Map),je(this,es,new Map),je(this,oi,0)}mount(){Gu(this,oi)._++,ue(this,oi)===1&&(je(this,ts,i_.subscribe(async e=>{e&&(await this.resumePausedMutations(),ue(this,Bt).onFocus())})),je(this,rs,Tl.subscribe(async e=>{e&&(await this.resumePausedMutations(),ue(this,Bt).onOnline())})))}unmount(){var e,t;Gu(this,oi)._--,ue(this,oi)===0&&((e=ue(this,ts))==null||e.call(this),je(this,ts,void 0),(t=ue(this,rs))==null||t.call(this),je(this,rs,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=kD(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 Tl.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,Za).set(Ro(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...ue(this,Za).values()],r={};return t.forEach(n=>{wo(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){ue(this,es).set(Ro(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...ue(this,es).values()],r={};return t.forEach(n=>{wo(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=a_(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===s_&&(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,Za=new WeakMap,es=new WeakMap,oi=new WeakMap,ts=new WeakMap,rs=new WeakMap,PO),WO=De.createContext(void 0),aj=e=>{const t=De.useContext(WO);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},sj=({client:e,children:t})=>(De.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),Q.jsx(WO.Provider,{value:e,children:t})),YO=De.createContext(!1),oj=()=>De.useContext(YO);YO.Provider;function uj(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var cj=De.createContext(uj()),lj=()=>De.useContext(cj),dj=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?BO(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},fj=e=>{De.useEffect(()=>{e.clearReset()},[e])},pj=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||BO(r,[e.error,n])),mj=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))}},hj=(e,t)=>e.isLoading&&e.isFetching&&!t,yj=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,VE=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function gj(e,t,r){var p,E,T,S;const n=oj(),i=lj(),a=aj(),s=a.defaultQueryOptions(e);(E=(p=a.getDefaultOptions().queries)==null?void 0:p._experimental_beforeQuery)==null||E.call(p,s);const o=a.getQueryCache().get(s.queryHash),u=e.subscribed!==!1;s._optimisticResults=n?"isRestoring":u?"optimistic":void 0,mj(s),dj(s,i,o),fj(i);const l=!a.getQueryCache().get(s.queryHash),[c]=De.useState(()=>new t(a,s)),d=c.getOptimisticResult(s),m=!n&&u;if(De.useSyncExternalStore(De.useCallback(A=>{const f=m?c.subscribe(Zt.batchCalls(A)):Sr;return c.updateResult(),f},[c,m]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),De.useEffect(()=>{c.setOptions(s)},[s,c]),yj(s,d))throw VE(s,c,i);if(pj({result:d,errorResetBoundary:i,throwOnError:s.throwOnError,query:o,suspense:s.suspense}))throw d.error;if((S=(T=a.getDefaultOptions().queries)==null?void 0:T._experimental_afterQuery)==null||S.call(T,s,d),s.experimental_prefetchInRender&&!Ao.isServer()&&hj(d,n)){const A=l?VE(s,c,i):o==null?void 0:o.promise;A==null||A.catch(Sr).finally(()=>{c.updateResult()})}return s.notifyOnChangeProps?d:c.trackResult(d)}function Dl(e,t){return gj(e,JD)}const _j="modulepreload",Ej=function(e){return"https://cdn.decentraland.org/@dcl/shop/0.1.0-28849951791.commit-e0fa315/"+e},GE={},xt=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=Ej(l),l in GE)return;GE[l]=!0;const c=l.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${d}`))return;const m=document.createElement("link");if(m.rel=c?"stylesheet":_j,c||(m.as="script"),m.crossOrigin="",m.href=l,u&&m.setAttribute("nonce",u),document.head.appendChild(m),c)return new Promise((p,E)=>{m.addEventListener("load",p),m.addEventListener("error",()=>E(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)})},xO=Object.prototype.toString;function u_(e){switch(xO.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return Un(e,Error)}}function ps(e,t){return xO.call(e)===`[object ${t}]`}function c_(e){return ps(e,"ErrorEvent")}function zE(e){return ps(e,"DOMError")}function vj(e){return ps(e,"DOMException")}function En(e){return ps(e,"String")}function l_(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function d_(e){return e===null||l_(e)||typeof e!="object"&&typeof e!="function"}function ca(e){return ps(e,"Object")}function jl(e){return typeof Event<"u"&&Un(e,Event)}function bj(e){return typeof Element<"u"&&Un(e,Element)}function Tj(e){return ps(e,"RegExp")}function ms(e){return!!(e&&e.then&&typeof e.then=="function")}function Sj(e){return ca(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function KO(e){return typeof e=="number"&&e!==e}function Un(e,t){try{return e instanceof t}catch{return!1}}function XO(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 WE(e,t){if(!Array.isArray(e))return"";const r=[];for(let n=0;n<e.length;n++){const i=e[n];try{XO(i)?r.push("[VueViewModel]"):r.push(String(i))}catch{r.push("[value cannot be serialized]")}}return r.join(t)}function Ij(e,t,r=!1){return En(e)?Tj(t)?t.test(e):En(t)?r?e===t:e.includes(t):!1:!1}function Fo(e,t=[],r=!1){return t.some(n=>Ij(e,n,r))}function Rj(e,t,r=250,n,i,a,s){if(!a.exception||!a.exception.values||!s||!Un(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=wj(Eg(e,t,i,s.originalException,n,a.exception.values,o,0),r))}function Eg(e,t,r,n,i,a,s,o){if(a.length>=r+1)return a;let u=[...a];if(Un(n[i],Error)){YE(s,o);const l=e(t,n[i]),c=u.length;xE(l,i,c,o),u=Eg(e,t,r,n[i],i,[l,...u],l,c)}return Array.isArray(n.errors)&&n.errors.forEach((l,c)=>{if(Un(l,Error)){YE(s,o);const d=e(t,l),m=u.length;xE(d,`errors[${c}]`,m,o),u=Eg(e,t,r,l,i,[d,...u],d,m)}}),u}function YE(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 xE(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 wj(e,t){return e.map(r=>(r.value&&(r.value=Ua(r.value,t)),r))}function Wu(e){return e&&e.Math==Math?e:void 0}const ot=typeof globalThis=="object"&&Wu(globalThis)||typeof window=="object"&&Wu(window)||typeof self=="object"&&Wu(self)||typeof bl=="object"&&Wu(bl)||(function(){return this})()||{};function f_(){return ot}function Ll(e,t,r){const n=r||ot,i=n.__SENTRY__=n.__SENTRY__||{};return i[e]||(i[e]=t())}const Fa=f_(),Aj=80;function ns(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||Aj;for(;r&&a++<n&&(l=Oj(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 Oj(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&&En(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 Nj(){try{return Fa.document.location.href}catch{return""}}function Pj(e){return Fa.document&&Fa.document.querySelector?Fa.document.querySelector(e):null}function JO(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 hs=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Cj="Sentry Logger ",vg=["debug","info","warn","error","log","assert","trace"],Sl={};function Ho(e){if(!("console"in ot))return e();const t=ot.console,r={},n=Object.keys(Sl);n.forEach(i=>{const a=Sl[i];r[i]=t[i],t[i]=a});try{return e()}finally{n.forEach(i=>{t[i]=r[i]})}}function Mj(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return hs?vg.forEach(r=>{t[r]=(...n)=>{e&&Ho(()=>{ot.console[r](`${Cj}[${r}]:`,...n)})}}):vg.forEach(r=>{t[r]=()=>{}}),t}const Re=Mj(),Dj=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function jj(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 Lj(e){const t=Dj.exec(e);if(!t){Ho(()=>{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 QO({host:a,pass:i,path:u,projectId:l,port:s,protocol:r,publicKey:n})}function QO(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function $j(e){if(!hs)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+$/)?jj(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 ZO(e){const t=typeof e=="string"?Lj(e):QO(e);if(!(!t||!$j(t)))return t}class gn 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"&&eN(i,n),e[t]=i}function la(e,t,r){try{Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0})}catch{hs&&Re.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function eN(e,t){try{const r=t.prototype||{};e.prototype=t.prototype=r,la(e,"__sentry_original__",t)}catch{}}function p_(e){return e.__sentry_original__}function qj(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function tN(e){if(u_(e))return{message:e.message,name:e.name,stack:e.stack,...XE(e)};if(jl(e)){const t={type:e.type,target:KE(e.target),currentTarget:KE(e.currentTarget),...XE(e)};return typeof CustomEvent<"u"&&Un(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function KE(e){try{return bj(e)?ns(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function XE(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 Bj(e,t=40){const r=Object.keys(tN(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 bg(e,new Map)}function bg(e,t){if(kj(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]=bg(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(bg(i,t))}),n}return e}function kj(e){if(!ca(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}const rN=50,JE=/\(error: (.*)\)/,QE=/captureMessage|captureException/;function nN(...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=JE.test(o)?o.replace(JE,"$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>=rN)break}}return Fj(i)}}function Uj(e){return Array.isArray(e)?nN(...e):e}function Fj(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(t[t.length-1].function||"")&&t.pop(),t.reverse(),QE.test(t[t.length-1].function||"")&&(t.pop(),QE.test(t[t.length-1].function||"")&&t.pop()),t.slice(0,rN).map(r=>({...r,filename:r.filename||t[t.length-1].filename,function:r.function||"?"}))}const _d="<anonymous>";function Fn(e){try{return!e||typeof e!="function"?_d:e.name||_d}catch{return _d}}const hl={},ZE={};function ya(e,t){hl[e]=hl[e]||[],hl[e].push(t)}function ga(e,t){ZE[e]||(t(),ZE[e]=!0)}function Xr(e,t){const r=e&&hl[e];if(r)for(const n of r)try{n(t)}catch(i){hs&&Re.error(`Error while triggering instrumentation handler.
4
+ Type: ${e}
5
+ Name: ${Fn(n)}
6
+ Error:`,i)}}function Hj(e){const t="console";ya(t,e),ga(t,Vj)}function Vj(){"console"in ot&&vg.forEach(function(e){e in ot.console&&tr(ot.console,e,function(t){return Sl[e]=t,function(...r){Xr("console",{args:r,level:e});const i=Sl[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 iN(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=iN(e);return n?n.type&&n.value?`${n.type}: ${n.value}`:n.type||n.value||r||"<unknown>":r||"<unknown>"}function Tg(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 Oo(e,t){const r=iN(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 ev(e){if(e&&e.__sentry_captured__)return!0;try{la(e,"__sentry_captured__",!0)}catch{}return!1}function m_(e){return Array.isArray(e)?e:[e]}const $a=ot,Gj=1e3;let tv,Sg,Ig;function zj(e){ya("dom",e),ga("dom",Wj)}function Wj(){if(!$a.document)return;const e=Xr.bind(null,"dom"),t=rv(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=rv(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 Yj(e){if(e.type!==Sg)return!1;try{if(!e.target||e.target._sentryId!==Ig)return!1}catch{}return!0}function xj(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function rv(e,t=!1){return r=>{if(!r||r._sentryCaptured)return;const n=Kj(r);if(xj(r.type,n))return;la(r,"_sentryCaptured",!0),n&&!n._sentryId&&la(n,"_sentryId",yt());const i=r.type==="keypress"?"input":r.type;Yj(r)||(e({event:r,name:i,global:t}),Sg=r.type,Ig=n?n._sentryId:void 0),clearTimeout(tv),tv=$a.setTimeout(()=>{Ig=void 0,Sg=void 0},Gj)}}function Kj(e){try{return e.target}catch{return null}}const Rg=f_();function aN(){if(!("fetch"in Rg))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function wg(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Xj(){if(typeof EdgeRuntime=="string")return!0;if(!aN())return!1;if(wg(Rg.fetch))return!0;let e=!1;const t=Rg.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=wg(r.contentWindow.fetch)),t.head.removeChild(r)}catch(r){hs&&Re.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return e}function sN(e){const t="fetch";ya(t,e),ga(t,Jj)}function Jj(){Xj()&&tr(ot,"fetch",function(e){return function(...t){const{method:r,url:n}=Qj(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 Ag(e,t){return!!e&&typeof e=="object"&&!!e[t]}function nv(e){return typeof e=="string"?e:e?Ag(e,"url")?e.url:e.toString?e.toString():"":""}function Qj(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[r,n]=e;return{url:nv(r),method:Ag(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:nv(t),method:Ag(t,"method")?String(t.method).toUpperCase():"GET"}}let Yu=null;function oN(e){const t="error";ya(t,e),ga(t,Zj)}function Zj(){Yu=ot.onerror,ot.onerror=function(e,t,r,n,i){return Xr("error",{column:n,error:i,line:r,msg:e,url:t}),Yu&&!Yu.__SENTRY_LOADER__?Yu.apply(this,arguments):!1},ot.onerror.__SENTRY_INSTRUMENTED__=!0}let xu=null;function uN(e){const t="unhandledrejection";ya(t,e),ga(t,eL)}function eL(){xu=ot.onunhandledrejection,ot.onunhandledrejection=function(e){return Xr("unhandledrejection",e),xu&&!xu.__SENTRY_LOADER__?xu.apply(this,arguments):!0},ot.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const Ku=f_();function tL(){const e=Ku.chrome,t=e&&e.app&&e.app.runtime,r="history"in Ku&&!!Ku.history.pushState&&!!Ku.history.replaceState;return!t&&r}const Ps=ot;let Xu;function h_(e){const t="history";ya(t,e),ga(t,rL)}function rL(){if(!tL())return;const e=Ps.onpopstate;Ps.onpopstate=function(...r){const n=Ps.location.href,i=Xu;if(Xu=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=Xu,s=String(i);Xu=s,Xr("history",{from:a,to:s})}return r.apply(this,n)}}tr(Ps.history,"pushState",t),tr(Ps.history,"replaceState",t)}const nL=ot,qa="__sentry_xhr_v3__";function cN(e){ya("xhr",e),ga("xhr",iL)}function iL(){if(!nL.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;tr(e,"open",function(t){return function(...r){const n=Date.now(),i=En(r[0])?r[0].toUpperCase():void 0,a=aL(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&&En(l)&&En(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 aL(e){if(En(e))return e;try{return e.toString()}catch{}}function sL(){return"npm"}function oL(){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 Og("",e,t,r)}catch(n){return{ERROR:`**non-serializable** (${n})`}}}function lN(e,t=3,r=100*1024){const n=Qn(e,t);return dL(n)>r?lN(e,t-1,r):n}function Og(e,t,r=1/0,n=1/0,i=oL()){const[a,s]=i;if(t==null||["number","boolean","string"].includes(typeof t)&&!KO(t))return t;const o=uL(e,t);if(!o.startsWith("[object "))return o;if(t.__sentry_skip_normalization__)return t;const u=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:r;if(u===0)return o.replace("object ","");if(a(t))return"[Circular ~]";const l=t;if(l&&typeof l.toJSON=="function")try{const p=l.toJSON();return Og("",p,u-1,n,i)}catch{}const c=Array.isArray(t)?[]:{};let d=0;const m=tN(t);for(const p in m){if(!Object.prototype.hasOwnProperty.call(m,p))continue;if(d>=n){c[p]="[MaxProperties ~]";break}const E=m[p];c[p]=Og(p,E,u-1,n,i),d++}return s(t),c}function uL(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof bl<"u"&&t===bl)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(XO(t))return"[VueViewModel]";if(Sj(t))return"[SyntheticEvent]";if(typeof t=="number"&&t!==t)return"[NaN]";if(typeof t=="function")return`[Function: ${Fn(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const r=cL(t);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(r){return`**non-serializable** (${r})`}}function cL(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function lL(e){return~-encodeURI(e).split(/%..|./).length}function dL(e){return lL(JSON.stringify(e))}var Ln;(function(e){e[e.PENDING=0]="PENDING";const r=1;e[e.RESOLVED=r]="RESOLVED";const n=2;e[e.REJECTED=n]="REJECTED"})(Ln||(Ln={}));function is(e){return new Ir(t=>{t(e)})}function y_(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=Ln.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(Ln.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(Ln.REJECTED,t)}}__init3(){this._setResult=(t,r)=>{if(this._state===Ln.PENDING){if(ms(r)){r.then(this._resolve,this._reject);return}this._state=t,this._value=r,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===Ln.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach(r=>{r[0]||(this._state===Ln.RESOLVED&&r[1](this._value),this._state===Ln.REJECTED&&r[2](this._value),r[0]=!0)})}}}function fL(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 y_(new gn("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=>{is(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 pL=["fatal","error","warning","log","info","debug"];function mL(e){return e==="warn"?"warning":pL.includes(e)?e:"log"}const dN=1e3;function _a(){return Date.now()/dN}function hL(){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())/dN}const Ea=hL(),$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})(),Ng="baggage",fN="sentry-",yL=/^sentry-/,gL=8192;function _L(e){if(!En(e)&&!Array.isArray(e))return;let t={};if(Array.isArray(e))t=e.reduce((n,i)=>{const a=iv(i);for(const s of Object.keys(a))n[s]=a[s];return n},{});else{if(!e)return;t=iv(e)}const r=Object.entries(t).reduce((n,[i,a])=>{if(i.match(yL)){const s=i.slice(fN.length);n[s]=a}return n},{});if(Object.keys(r).length>0)return r}function pN(e){if(!e)return;const t=Object.entries(e).reduce((r,[n,i])=>(i&&(r[`${fN}${n}`]=i),r),{});return EL(t)}function iv(e){return e.split(",").map(t=>t.split("=").map(r=>decodeURIComponent(r.trim()))).reduce((t,[r,n])=>(t[r]=n,t),{})}function EL(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>gL?(hs&&Re.warn(`Not adding key: ${r} with val: ${n} to baggage header due to exceeding baggage size limits.`),t):s},"")}const vL=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function bL(e){if(!e)return;const t=e.match(vL);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 TL(e,t){const r=bL(e),n=_L(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 g_(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 SL(e,t){const[r,n]=e;return[r,[...n,t]]}function av(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 Pg(e,t){return(t||new TextEncoder).encode(e)}function IL(e,t){const[r,n]=e;let i=JSON.stringify(r);function a(s){typeof i=="string"?i=typeof s=="string"?i+s:[Pg(i,t),s]:i.push(typeof s=="string"?Pg(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:RL(i)}function RL(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 wL(e,t){const r=typeof e.data=="string"?Pg(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 AL={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 sv(e){return AL[e]}function mN(e){if(!e||!e.sdk)return;const{name:t,version:r}=e.sdk;return{name:t,version:r}}function OL(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 NL(e,t,r){const n=[{type:"client_report"},{timestamp:_a(),discarded_events:e}];return va(t?{dsn:t}:{},[n])}const PL=60*1e3;function CL(e,t=Date.now()){const r=parseInt(`${e}`,10);if(!isNaN(r))return r*1e3;const n=Date.parse(`${e}`);return isNaN(n)?PL:n-t}function ML(e,t){return e[t]||e.all||0}function DL(e,t,r=Date.now()){return ML(e,t)>r}function jL(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),m=(isNaN(d)?60:d)*1e3;if(!l)i.all=n+m;else for(const p of l.split(";"))p==="metric_bucket"?(!c||c.split(";").includes("custom"))&&(i[p]=n+m):i[p]=n+m}else s?i.all=n+CL(s,n):t===429&&(i.all=n+60*1e3);return i}const At=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,$l="production";function __(){return Ll("globalEventProcessors",()=>[])}function LL(e){__().push(e)}function Il(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`),ms(o)?o.then(u=>Il(e,u,r,n+1).then(i)).then(null,a):Il(e,o,r,n+1).then(i).then(null,a)}})}function hN(e){const t=Ea(),r={sid:yt(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>$L(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 yN(e,t){let r={};e.status==="ok"&&(r={status:"exited"}),da(e,r)}function $L(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 qL=1;function BL(e){const{spanId:t,traceId:r}=e.spanContext(),{data:n,op:i,parent_span_id:a,status:s,tags:o,origin:u}=No(e);return Ht({data:n,op:i,parent_span_id:a,span_id:t,status:s,tags:o,trace_id:r,origin:u})}function No(e){return kL(e)?e.getSpanJSON():typeof e.toJSON=="function"?e.toJSON():{}}function kL(e){return typeof e.getSpanJSON=="function"}function UL(e){const{traceFlags:t}=e.spanContext();return!!(t&qL)}function FL(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(S=>S.name);HL(u,e),zL(u,l),t.type===void 0&&VL(u,e.stackParser);const c=YL(n,r.captureContext);r.mechanism&&Oo(u,r.mechanism);const d=i&&i.getEventProcessors?i.getEventProcessors():[],m=s$().getScopeData();if(a){const S=a.getScopeData();lv(m,S)}if(c){const S=c.getScopeData();lv(m,S)}const p=[...r.attachments||[],...m.attachments];p.length&&(r.attachments=p),SN(u,m);const E=[...d,...__(),...m.eventProcessors];return Il(E,u,r).then(S=>(S&&GL(S),typeof s=="number"&&s>0?WL(S,s,o):S))}function HL(e,t){const{environment:r,release:n,dist:i,maxValueLength:a=250}=t;"environment"in e||(e.environment="environment"in t?r:$l),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 ov=new WeakMap;function VL(e,t){const r=ot._sentryDebugIds;if(!r)return;let n;const i=ov.get(t);i?n=i:(n=new Map,ov.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 GL(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 zL(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function WL(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=No(i).data;return a&&(i.data=Qn(a,t,r)),i})),n}function YL(e,t){if(!t)return e;const r=e?e.clone():new Po;return r.update(t),r}function xL(e){if(e)return KL(e)?{captureContext:e}:JL(e)?{captureContext:e}:e}function KL(e){return e instanceof Po||typeof e=="function"}const XL=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function JL(e){return Object.keys(e).some(t=>XL.includes(t))}function E_(e,t){return Jr().captureException(e,xL(t))}function gN(e,t){return Jr().captureEvent(e,t)}function fa(e,t){Jr().addBreadcrumb(e,t)}function QL(e){Jr().setUser(e)}function _N(...e){const t=Jr();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 Jr().getClient()}function Vo(){return Jr().getScope()}function uv(e){const t=gr(),r=Bl(),n=Vo(),{release:i,environment:a=$l}=t&&t.getOptions()||{},{userAgent:s}=ot.navigator||{},o=hN({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"}),EN(),r.setSession(o),n.setSession(o),o}function EN(){const e=Bl(),t=Vo(),r=t.getSession()||e.getSession();r&&yN(r),vN(),e.setSession(),t.setSession()}function vN(){const e=Bl(),t=Vo(),r=gr(),n=t.getSession()||e.getSession();n&&r&&r.captureSession&&r.captureSession(n)}function cv(e=!1){if(e){EN();return}vN()}function bN(e){return e.transaction}function TN(e,t,r){const n=t.getOptions(),{publicKey:i}=t.getDsn()||{},{segment:a}=r&&r.getUser()||{},s=Ht({environment:n.environment||$l,release:n.release,user_segment:a,public_key:i,trace_id:e});return t.emit&&t.emit("createDsc",s),s}function ZL(e){const t=gr();if(!t)return{};const r=TN(No(e).trace_id||"",t,Vo()),n=bN(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=No(n);return s&&s!=="url"&&(r.transaction=o.description),r.sampled=String(UL(n)),t.emit&&t.emit("createDsc",r),r}function SN(e,t){const{fingerprint:r,span:n,breadcrumbs:i,sdkProcessingMetadata:a}=t;e$(e,t),n&&n$(e,n),i$(e,r),t$(e,i),r$(e,a)}function lv(e,t){const{extra:r,tags:n,user:i,contexts:a,level:s,sdkProcessingMetadata:o,breadcrumbs:u,fingerprint:l,eventProcessors:c,attachments:d,propagationContext:m,transactionName:p,span:E}=t;Cs(e,"extra",r),Cs(e,"tags",n),Cs(e,"user",i),Cs(e,"contexts",a),Cs(e,"sdkProcessingMetadata",o),s&&(e.level=s),p&&(e.transactionName=p),E&&(e.span=E),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,...m}}function Cs(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 e$(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 t$(e,t){const r=[...e.breadcrumbs||[],...t];e.breadcrumbs=r.length?r:void 0}function r$(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function n$(e,t){e.contexts={trace:BL(t),...e.contexts};const r=bN(t);if(r){e.sdkProcessingMetadata={dynamicSamplingContext:ZL(t),...e.sdkProcessingMetadata};const n=No(r).description;n&&(e.tags={transaction:n,...e.tags})}}function i$(e,t){e.fingerprint=e.fingerprint?m_(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}const a$=100;let Ed,Po=class yl{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=dv()}static clone(t){return t?t.clone():new yl}clone(){const t=new yl;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 yl){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=dv(),this}addBreadcrumb(t,r){const n=typeof r=="number"?r:a$;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:m,_span:p}=this;return{breadcrumbs:t,attachments:r,contexts:n,tags:i,extra:a,user:s,level:o,fingerprint:u||[],eventProcessors:l,propagationContext:c,sdkProcessingMetadata:d,transactionName:m,span:p}}applyToEvent(t,r={},n=[]){SN(t,this.getScopeData());const i=[...n,...__(),...this._eventProcessors];return Il(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 s$(){return Ed||(Ed=new Po),Ed}function dv(){return{traceId:yt(),spanId:yt().substring(16)}}const Cg="7.120.3",IN=parseFloat(Cg),o$=100;let RN=class{constructor(t,r,n,i=IN){this._version=i;let a;r?a=r:(a=new Po,a.setClient(t));let s;n?s=n:(s=new Po,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 ms(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=o$}=i.getOptions&&i.getOptions()||{};if(s<=0)return;const u={timestamp:_a(),...t},l=a?Ho(()=>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=fv(this);try{t(this)}finally{fv(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&&yN(n),this._sendSessionUpdate(),r.setSession()}startSession(t){const{scope:r,client:n}=this.getStackTop(),{release:i,environment:a=$l}=n&&n.getOptions()||{},{userAgent:s}=ot.navigator||{},o=hN({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=ql().__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 ql(){return ot.__SENTRY__=ot.__SENTRY__||{extensions:{},hub:void 0},ot}function fv(e){const t=ql(),r=Mg(t);return wN(t,e),r}function Jr(){const e=ql();if(e.__SENTRY__&&e.__SENTRY__.acs){const t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return u$(e)}function Bl(){return Jr().getIsolationScope()}function u$(e=ql()){return(!c$(e)||Mg(e).isOlderThan(IN))&&wN(e,new RN),Mg(e)}function c$(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function Mg(e){return Ll("hub",()=>new RN,e)}function wN(e,t){if(!e)return!1;const r=e.__SENTRY__=e.__SENTRY__||{};return r.hub=t,!0}function l$(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 d$(e,t,r,n){const i=mN(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 f$(e,t,r,n){const i=mN(r),a=e.type&&e.type!=="replay_event"?e.type:"event";l$(e,r&&r.sdk);const s=OL(e,i,n,t);return delete e.sdkProcessingMetadata,va(s,[[{type:a},e]])}const p$="7";function AN(e){const t=e.protocol?`${e.protocol}:`:"",r=e.port?`:${e.port}`:"";return`${t}//${e.host}${r}${e.path?`/${e.path}`:""}/api/`}function m$(e){return`${AN(e)}${e.projectId}/envelope/`}function h$(e,t){return qj({sentry_key:e.publicKey,sentry_version:p$,...t&&{sentry_client:`${t.name}/${t.version}`}})}function y$(e,t={}){const r=typeof t=="string"?t:t.tunnel,n=typeof t=="string"||!t._metadata?void 0:t._metadata.sdk;return r||`${m$(e)}?${h$(e,n)}`}function g$(e,t){const r=ZO(e);if(!r)return"";const n=`${AN(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 pv=[];function _$(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 E$(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=m_(r(t)):n=t;const i=_$(n),a=b$(i,s=>s.name==="Debug");if(a!==-1){const[s]=i.splice(a,1);i.push(s)}return i}function v$(e,t){const r={};return t.forEach(n=>{n&&ON(e,n,r)}),r}function mv(e,t){for(const r of t)r&&r.afterAllSetup&&r.afterAllSetup(e)}function ON(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,pv.indexOf(t.name)===-1&&(t.setupOnce(LL,Jr),pv.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 b$(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 T$(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 S$(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=I$(e);return va(i,[a])}function I$(e){const t=T$(e);return[{type:"statsd",length:t.length},t]}const hv="Not capturing exception because it's already been captured.";class R${constructor(t){if(this._options=t,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=ZO(t.dsn):At&&Re.warn("No DSN provided, client will not send events."),this._dsn){const r=y$(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(ev(t)){At&&Re.log(hv);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=l_(t)?t:String(t),o=d_(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&&ev(r.originalException)){At&&Re.log(hv);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))):is(!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];ON(this,t,this._integrations),r||mv(this,[t])}sendEvent(t,r={}){this.emit("beforeSendEvent",t,r);let n=f$(t,this._dsn,this._options._metadata,this._options.tunnel);for(const a of r.attachments||[])n=SL(n,wL(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=d$(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=S$(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=v$(this,t),mv(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=Bl()){const a=this.getOptions(),s=Object.keys(this._integrations);return!r.integrations&&s.length>0&&(r.integrations=s),this.emit("preprocessEvent",t,r),FL(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:m,dsc:p}=u;o.contexts={trace:{trace_id:c,span_id:d,parent_span_id:m},...o.contexts};const E=p||TN(c,this,n);o.sdkProcessingMetadata={dynamicSamplingContext:E,...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=PN(t),o=NN(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),y_(new gn(`Discarding event because it's not included in the random sample (sampling rate = ${a})`,"log"));const c=u==="replay_event"?"replay":u,m=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(t,r,n,m).then(p=>{if(p===null)throw this.recordDroppedEvent("event_processor",c,t),new gn("An event processor returned `null`, will not send event.","log");if(r.data&&r.data.__sentry__===!0)return p;const T=A$(i,p,r);return w$(T,l)}).then(p=>{if(p===null){if(this.recordDroppedEvent("before_send",c,t),s){const A=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",A)}throw new gn(`${l} returned \`null\`, will not send event.`,"log")}const E=n&&n.getSession();if(!s&&E&&this._updateSessionFromEvent(E,p),s){const S=p.sdkProcessingMetadata&&p.sdkProcessingMetadata.spanCountBeforeProcessing||0,A=p.spans?p.spans.length:0,f=S-A;f>0&&this.recordDroppedEvent("before_send","span",f)}const T=p.transaction_info;if(s&&T&&p.transaction!==t.transaction){const S="custom";p.transaction_info={...T,source:S}}return this.sendEvent(p,r),p}).then(null,p=>{throw p instanceof gn?p:(this.captureException(p,{data:{__sentry__:!0},originalException:p}),new gn(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
13
+ Reason: ${p}`))})}_process(t){this._numProcessing++,t.then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r))}_sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)return this._transport.send(t).then(null,r=>{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 w$(e,t){const r=`${t} must return \`null\` or a valid event.`;if(ms(e))return e.then(n=>{if(!ca(n)&&n!==null)throw new gn(r);return n},n=>{throw new gn(`${t} rejected with ${n}`)});if(!ca(e)&&e!==null)throw new gn(r);return e}function A$(e,t,r){const{beforeSend:n,beforeSendTransaction:i}=e;if(NN(t)&&n)return n(t,r);if(PN(t)&&i){if(t.spans){const a=t.spans.length;t.sdkProcessingMetadata={...t.sdkProcessingMetadata,spanCountBeforeProcessing:a}}return i(t,r)}return t}function NN(e){return e.type===void 0}function PN(e){return e.type==="transaction"}function O$(e,t){t.debug===!0&&(At?Re.enable():Ho(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),Vo().update(t.initialScope);const n=new e(t);N$(n),P$(n)}function N$(e){const r=Jr().getStackTop();r.client=e,r.scope.setClient(e)}function P$(e){e.init?e.init():e.setupIntegrations&&e.setupIntegrations()}const C$=30;function CN(e,t,r=fL(e.bufferSize||C$)){let n={};const i=s=>r.drain(s);function a(s){const o=[];if(av(s,(d,m)=>{const p=sv(m);if(DL(n,p)){const E=yv(d,m);e.recordDroppedEvent("ratelimit_backoff",p,E)}else o.push(d)}),o.length===0)return is();const u=va(s[0],o),l=d=>{av(u,(m,p)=>{const E=yv(m,p);e.recordDroppedEvent(d,sv(p),E)})},c=()=>t({body:IL(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=jL(n,d),d),d=>{throw l("network_error"),d});return r.add(c).then(d=>d,d=>{if(d instanceof gn)return At&&Re.error("Skipped sending event because buffer is full."),l("queue_overflow"),is();throw d})}return a.__sentry__baseTransport__=!0,{send:a,flush:i}}function yv(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}function MN(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:Cg})),version:Cg}),e._metadata=i}const M$=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/],D$=[/^.*\/healthcheck$/,/^.*\/healthy$/,/^.*\/live$/,/^.*\/ready$/,/^.*\/heartbeat$/,/^.*\/health$/,/^.*\/healthz$/],DN="InboundFilters",j$=((e={})=>({name:DN,setupOnce(){},processEvent(t,r,n){const i=n.getOptions(),a=L$(e,i);return $$(t,a)?null:t}})),jN=j$;li(DN,jN);function L$(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:M$],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[],...e.disableTransactionDefaults?[]:D$],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function $$(e,t){return t.ignoreInternal&&H$(e)?(At&&Re.warn(`Event dropped due to being internal Sentry Error.
14
+ Event: ${Zn(e)}`),!0):q$(e,t.ignoreErrors)?(At&&Re.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
15
+ Event: ${Zn(e)}`),!0):B$(e,t.ignoreTransactions)?(At&&Re.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
16
+ Event: ${Zn(e)}`),!0):k$(e,t.denyUrls)?(At&&Re.warn(`Event dropped due to being matched by \`denyUrls\` option.
17
+ Event: ${Zn(e)}.
18
+ Url: ${Rl(e)}`),!0):U$(e,t.allowUrls)?!1:(At&&Re.warn(`Event dropped due to not being matched by \`allowUrls\` option.
19
+ Event: ${Zn(e)}.
20
+ Url: ${Rl(e)}`),!0)}function q$(e,t){return e.type||!t||!t.length?!1:F$(e).some(r=>Fo(r,t))}function B$(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;const r=e.transaction;return r?Fo(r,t):!1}function k$(e,t){if(!t||!t.length)return!1;const r=Rl(e);return r?Fo(r,t):!1}function U$(e,t){if(!t||!t.length)return!0;const r=Rl(e);return r?Fo(r,t):!0}function F$(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 H$(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function V$(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 Rl(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?V$(t):null}catch{return At&&Re.error(`Cannot extract url for event ${Zn(e)}`),null}}let gv;const LN="FunctionToString",_v=new WeakMap,G$=(()=>({name:LN,setupOnce(){gv=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=p_(this),r=_v.has(gr())&&t!==void 0?t:this;return gv.apply(r,e)}}catch{}},setup(e){_v.set(e,!0)}})),$N=G$;li(LN,$N);const mt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,qN="production";function z$(){return Ll("globalEventProcessors",()=>[])}function Dg(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`),ms(o)?o.then(u=>Dg(e,u,r,n+1).then(i)).then(null,a):Dg(e,o,r,n+1).then(i).then(null,a)}})}function W$(e){const t=Ea(),r={sid:yt(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>x$(r)};return e&&kl(r,e),r}function kl(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 Y$(e,t){let r={};e.status==="ok"&&(r={status:"exited"}),kl(e,r)}function x$(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 K$=0,BN=1;function v_(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 Ul(e){const{traceId:t,spanId:r}=e.spanContext(),n=b_(e);return g_(t,r,n)}function Fl(e){return typeof e=="number"?Ev(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Ev(e.getTime()):Ea()}function Ev(e){return e>9999999999?e/1e3:e}function Rr(e){return X$(e)?e.getSpanJSON():typeof e.toJSON=="function"?e.toJSON():{}}function X$(e){return typeof e.getSpanJSON=="function"}function b_(e){const{traceFlags:t}=e.spanContext();return!!(t&BN)}function ys(){return _s().getClient()}function gs(){return _s().getScope()}function wl(e){return e.transaction}function T_(e,t,r){const n=t.getOptions(),{publicKey:i}=t.getDsn()||{},{segment:a}=r&&r.getUser()||{},s=Ht({environment:n.environment||qN,release:n.release,user_segment:a,public_key:i,trace_id:e});return t.emit&&t.emit("createDsc",s),s}function as(e){const t=ys();if(!t)return{};const r=T_(Rr(e).trace_id||"",t,gs()),n=wl(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(b_(n)),t.emit&&t.emit("createDsc",r),r}function J$(e,t){const{fingerprint:r,span:n,breadcrumbs:i,sdkProcessingMetadata:a}=t;Q$(e,t),n&&tq(e,n),rq(e,r),Z$(e,i),eq(e,a)}function Q$(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 Z$(e,t){const r=[...e.breadcrumbs||[],...t];e.breadcrumbs=r.length?r:void 0}function eq(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function tq(e,t){e.contexts={trace:v_(t),...e.contexts};const r=wl(t);if(r){e.sdkProcessingMetadata={dynamicSamplingContext:as(t),...e.sdkProcessingMetadata};const n=Rr(r).description;n&&(e.tags={transaction:n,...e.tags})}}function rq(e,t){e.fingerprint=e.fingerprint?m_(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}const nq=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=vv()}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&&kl(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=vv(),this}addBreadcrumb(t,r){const n=typeof r=="number"?r:nq;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:m,_span:p}=this;return{breadcrumbs:t,attachments:r,contexts:n,tags:i,extra:a,user:s,level:o,fingerprint:u||[],eventProcessors:l,propagationContext:c,sdkProcessingMetadata:d,transactionName:m,span:p}}applyToEvent(t,r={},n=[]){J$(t,this.getScopeData());const i=[...n,...z$(),...this._eventProcessors];return Dg(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 vv(){return{traceId:yt(),spanId:yt().substring(16)}}const iq="7.120.3",kN=parseFloat(iq),aq=100;class UN{constructor(t,r,n,i=kN){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 ms(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=aq}=i.getOptions&&i.getOptions()||{};if(s<=0)return;const u={timestamp:_a(),...t},l=a?Ho(()=>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 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&&Y$(n),this._sendSessionUpdate(),r.setSession()}startSession(t){const{scope:r,client:n}=this.getStackTop(),{release:i,environment:a=qN}=n&&n.getOptions()||{},{userAgent:s}=ot.navigator||{},o=W$({release:i,environment:a,user:r.getUser(),...s&&{userAgent:s},...t}),u=r.getSession&&r.getSession();return u&&u.status==="ok"&&kl(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=Go().__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 Go(){return ot.__SENTRY__=ot.__SENTRY__||{extensions:{},hub:void 0},ot}function bv(e){const t=Go(),r=jg(t);return FN(t,e),r}function _s(){const e=Go();if(e.__SENTRY__&&e.__SENTRY__.acs){const t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return sq(e)}function S_(){return _s().getIsolationScope()}function sq(e=Go()){return(!oq(e)||jg(e).isOlderThan(kN))&&FN(e,new UN),jg(e)}function oq(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function jg(e){return Ll("hub",()=>new UN,e)}function FN(e,t){if(!e)return!1;const r=e.__SENTRY__=e.__SENTRY__||{};return r.hub=t,!0}function pa(e){return _s().getScope().getTransaction()}let Tv=!1;function uq(){Tv||(Tv=!0,oN(Lg),uN(Lg))}function Lg(){const e=pa();if(e){const t="internal_error";mt&&Re.log(`[Tracing] Transaction: ${t} -> Global error occured`),e.setStatus(t)}}Lg.tag="sentry_tracingErrorCallback";var Sv;(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 m="cancelled";e.Cancelled=m;const p="already_exists";e.AlreadyExists=p;const E="failed_precondition";e.FailedPrecondition=E;const T="aborted";e.Aborted=T;const S="out_of_range";e.OutOfRange=S;const A="data_loss";e.DataLoss=A})(Sv||(Sv={}));function cq(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 I_(e,t){e.setTag("http.status_code",String(t)),e.setData("http.response.status_code",t);const r=cq(t);r!=="unknown_error"&&e.setStatus(r)}function Es(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=ys(),r=e||t&&t.getOptions();return!!r&&(r.enableTracing||"tracesSampleRate"in r||"tracesSampler"in r)}function HN(e){if(!Es())return;const t=fq(e),r=_s(),n=e.scope?e.scope.getSpan():lq();if(e.onlyIfParent&&!n)return;const s=(e.scope||gs()).clone();return dq(r,{parentSpan:n,spanContext:t,forceTransaction:e.forceTransaction,scope:s})}function lq(){return gs().getSpan()}function dq(e,{parentSpan:t,spanContext:r,forceTransaction:n,scope:i}){if(!Es())return;const a=S_();let s;if(t&&!n)s=t.startChild(r);else if(t){const o=as(t),{traceId:u,spanId:l}=t.spanContext(),c=b_(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),pq(s,i,a),s}function fq(e){if(e.startTime){const t={...e};return t.startTimestamp=Fl(e.startTime),delete t.startTime,t}return e}const VN="_sentryScope",GN="_sentryIsolationScope";function pq(e,t,r){e&&(la(e,GN,r),la(e,VN,t))}function mq(e){return{scope:e[VN],isolationScope:e[GN]}}const Va="sentry.source",Ba="sentry.sample_rate",Ju="sentry.op",ka="sentry.origin",hq="profile_id";class zN{constructor(t=1e3){this._maxlen=t,this.spans=[]}add(t){this.spans.length>this._maxlen?t.spanRecorder=void 0:this.spans.push(t)}}class Hl{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",[Ju]: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[Ju]}set op(t){this.setAttribute(Ju,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?BN:K$}}startChild(t){const r=new Hl({...t,parentSpanId:this._spanId,sampled:this._sampled,traceId:this._traceId});r.spanRecorder=this.spanRecorder,r.spanRecorder&&r.spanRecorder.add(r);const n=wl(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 I_(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=wl(this);if(mt&&r&&r.spanContext().spanId!==this._spanId){const n=this._logMessage;n&&Re.log(n.replace("Starting","Finishing"))}this._endTime=Fl(t)}toTraceparent(){return Ul(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 v_(this)}getSpanJSON(){return Ht({data:this._getData(),description:this._name,op:this._attributes[Ju],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[hq],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 WN extends Hl{constructor(t,r){super(t),this._contexts={},this._hub=r||_s(),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 zN(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=Fl(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 as(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,m)=>d>m?d:m)}const{scope:i,isolationScope:a}=mq(this),{metadata:s}=this,{source:o}=s,u={contexts:{...this._contexts,trace:v_(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:as(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 gl={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},yq="finishReason",Ca=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"];class gq extends zN{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 _q extends WN{constructor(t,r,n=gl.idleTimeout,i=gl.finalTimeout,a=gl.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=Fl(t);if(this._finished=!0,this.activities={},this.op==="ui.action.click"&&this.setAttribute(yq,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 gq(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 YN(e,t,r){if(!Es(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)),xN(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 xN(e){return KO(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 Eq(){const t=this.getScope().getSpan();return t?{"sentry-trace":Ul(t)}:{}}function vq(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 WN(e,this);return s=YN(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 Iv(e,t,r,n,i,a,s,o=!1){const u=e.getClient(),l=u&&u.getOptions()||{};let c=new _q(t,e,r,n,s,i,o);return c=YN(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 bq(){const e=Go();e.__SENTRY__&&(e.__SENTRY__.extensions=e.__SENTRY__.extensions||{},e.__SENTRY__.extensions.startTransaction||(e.__SENTRY__.extensions.startTransaction=vq),e.__SENTRY__.extensions.traceHeaders||(e.__SENTRY__.extensions.traceHeaders=Eq),uq())}function Tq(e,t,r){const n=pa();n&&n.setMeasurement(e,t,r)}function Sq(e,t){const r={sent_at:new Date().toISOString()};t&&(r.dsn=ha(t));const n=e.map(Iq);return va(r,n)}function Iq(e){return[{type:"span"},e]}const Ot=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Je=ot;function Rq(){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 zo=(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)))}},wq=()=>`v3-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,Aq=()=>{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},Vl=()=>Je.__WEB_VITALS_POLYFILL__?Je.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||Aq()):Je.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],R_=()=>{const e=Vl();return e&&e.activationStart||0},Wo=(e,t)=>{const r=Vl();let n="navigate";return r&&(Je.document&&Je.document.prerendering||R_()>0?n="prerender":n=r.type.replace(/_/g,"-")),{name:e,value:typeof t>"u"?-1:t,rating:"good",delta:0,entries:[],id:wq(),navigationType:n}},vs=(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{}},Yo=(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))},Oq=(e,t={})=>{const r=Wo("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=vs("layout-shift",s);if(o){n=zo(e,r,t.reportAllChanges);const u=()=>{s(o.takeRecords()),n(!0)};return Yo(u),u}};let Al=-1;const Nq=()=>{Je.document&&Je.document.visibilityState&&(Al=Je.document.visibilityState==="hidden"&&!Je.document.prerendering?0:1/0)},Pq=()=>{Yo(({timeStamp:e})=>{Al=e},!0)},w_=()=>(Al<0&&(Nq(),Pq()),{get firstHiddenTime(){return Al}}),Cq=e=>{const t=w_(),r=Wo("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=vs("first-input",a);n=zo(e,r),s&&Yo(()=>{a(s.takeRecords()),s.disconnect()},!0)};let KN=0,vd=1/0,Qu=0;const Mq=e=>{e.forEach(t=>{t.interactionId&&(vd=Math.min(vd,t.interactionId),Qu=Math.max(Qu,t.interactionId),KN=Qu?(Qu-vd)/7+1:0)})};let $g;const Dq=()=>$g?KN:performance.interactionCount||0,jq=()=>{"interactionCount"in performance||$g||($g=vs("event",Mq,{type:"event",buffered:!0,durationThreshold:0}))},XN=()=>Dq(),Rv=10,$n=[],bd={},wv=e=>{const t=$n[$n.length-1],r=bd[e.interactionId];if(r||$n.length<Rv||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]};bd[n.id]=n,$n.push(n)}$n.sort((n,i)=>i.latency-n.latency),$n.splice(Rv).forEach(n=>{delete bd[n.id]})}},Lq=()=>{const e=Math.min($n.length-1,Math.floor(XN()/50));return $n[e]},$q=(e,t)=>{t=t||{},jq();const r=Wo("INP");let n;const i=s=>{s.forEach(u=>{u.interactionId&&wv(u),u.entryType==="first-input"&&!$n.some(c=>c.entries.some(d=>u.duration===d.duration&&u.startTime===d.startTime))&&wv(u)});const o=Lq();o&&o.latency!==r.value&&(r.value=o.latency,r.entries=o.entries,n())},a=vs("event",i,{durationThreshold:t.durationThreshold||40});n=zo(e,r,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),Yo(()=>{i(a.takeRecords()),r.value<0&&XN()>0&&(r.value=0,r.entries=[]),n(!0)}))},Av={},qq=e=>{const t=w_(),r=Wo("LCP");let n;const i=s=>{const o=s[s.length-1];if(o){const u=Math.max(o.startTime-R_(),0);u<t.firstHiddenTime&&(r.value=u,r.entries=[o],n())}},a=vs("largest-contentful-paint",i);if(a){n=zo(e,r);const s=()=>{Av[r.id]||(i(a.takeRecords()),a.disconnect(),Av[r.id]=!0,n(!0))};return["keydown","click"].forEach(o=>{Je.document&&addEventListener(o,s,{once:!0,capture:!0})}),Yo(s,!0),s}},qg=e=>{Je.document&&(Je.document.prerendering?addEventListener("prerenderingchange",()=>qg(e),!0):Je.document.readyState!=="complete"?addEventListener("load",()=>qg(e),!0):setTimeout(e,0))},Bq=(e,t)=>{t=t||{};const r=Wo("TTFB"),n=zo(e,r,t.reportAllChanges);qg(()=>{const i=Vl();if(i){if(r.value=Math.max(i.responseStart-R_(),0),r.value<0||r.value>performance.now())return;r.entries=[i],n(!0)}})},To={},Ol={};let JN,QN,ZN,eP,tP;function kq(e,t=!1){return xo("cls",e,Gq,JN,t)}function Uq(e,t=!1){return xo("lcp",e,Wq,ZN,t)}function Fq(e){return xo("ttfb",e,Yq,eP)}function Hq(e){return xo("fid",e,zq,QN)}function Vq(e){return xo("inp",e,xq,tP)}function Co(e,t){return rP(e,t),Ol[e]||(Kq(e),Ol[e]=!0),nP(e,t)}function bs(e,t){const r=To[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: ${Fn(n)}
27
+ Error:`,i)}}function Gq(){return Oq(e=>{bs("cls",{metric:e}),JN=e},{reportAllChanges:!0})}function zq(){return Cq(e=>{bs("fid",{metric:e}),QN=e})}function Wq(){return qq(e=>{bs("lcp",{metric:e}),ZN=e})}function Yq(){return Bq(e=>{bs("ttfb",{metric:e}),eP=e})}function xq(){return $q(e=>{bs("inp",{metric:e}),tP=e})}function xo(e,t,r,n,i=!1){rP(e,t);let a;return Ol[e]||(a=r(),Ol[e]=!0),n&&t({metric:n}),nP(e,t,i?a:void 0)}function Kq(e){const t={};e==="event"&&(t.durationThreshold=0),vs(e,r=>{bs(e,{entries:r})},t)}function rP(e,t){To[e]=To[e]||[],To[e].push(t)}function nP(e,t,r){return()=>{r&&r();const n=To[e];if(!n)return;const i=n.indexOf(t);i!==-1&&n.splice(i,1)}}function Td(e){return typeof e=="number"&&isFinite(e)}function ss(e,{startTimestamp:t,...r}){return t&&e.startTimestamp>t&&(e.startTimestamp=t),e.startChild({startTimestamp:t,...r})}const Xq=2147483647;function Vt(e){return e/1e3}function A_(){return Je&&Je.addEventListener&&Je.performance}let Ov=0,kt={},pn,So;function Jq(){const e=A_();if(e&&$r){e.mark&&Je.performance.mark("sentry-tracing-init");const t=nB(),r=tB(),n=rB(),i=iB();return()=>{t(),r(),n(),i()}}return()=>{}}function Qq(){Co("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 Zq(){Co("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:ns(t.target),op:`ui.interaction.${t.name}`,origin:"auto.ui.browser.metrics",startTimestamp:n,endTimestamp:n+i},s=JO(t.target);s&&(a.attributes={"ui.component_name":s}),r.startChild(a)}}})}function eB(e,t){if(A_()&&$r){const n=aB(e,t);return()=>{n()}}return()=>{}}function tB(){return kq(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Ot&&Re.log("[Measurements] Adding CLS"),kt.cls={value:e.value,unit:""},So=t)},!0)}function rB(){return Uq(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Ot&&Re.log("[Measurements] Adding LCP"),kt.lcp={value:e.value,unit:"millisecond"},pn=t)},!0)}function nB(){return Hq(({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 iB(){return Fq(({metric:e})=>{e.entries[e.entries.length-1]&&(Ot&&Re.log("[Measurements] Adding TTFB"),kt.ttfb={value:e.value,unit:"millisecond"})})}const Nv={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 aB(e,t){return Vq(({metric:r})=>{if(r.value===void 0)return;const n=r.entries.find(_=>_.duration===r.value&&Nv[_.name]!==void 0),i=ys();if(!n||!i)return;const a=Nv[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:m,user:p,replayId:E}=l,T=p!==void 0?p.email||p.id||p.ip_address:void 0,S=m!==void 0?m.getProfileId():void 0,A=new Hl({startTimestamp:o,endTimestamp:o+u,op:`ui.interaction.${a}`,name:ns(n.target),attributes:{release:s.release,environment:s.environment,transaction:c,...T!==void 0&&T!==""?{user:T}:{},...S!==void 0?{profile_id:S}:{},...E!==void 0?{replay_id:E}:{}},exclusiveTime:r.value,measurements:{inp:{value:r.value,unit:"millisecond"}}}),f=mB(d,s,t);if(f&&Math.random()<f){const _=A?Sq([A],i.getDsn()):void 0,b=i&&i.getTransport();b&&_&&b.send(_).then(null,h=>{Ot&&Re.error("Error while sending interaction:",h)});return}})}function sB(e){const t=A_();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(Ov).forEach(s=>{const o=Vt(s.startTime),u=Vt(s.duration);if(!(e.op==="navigation"&&a&&r+o<a))switch(s.entryType){case"navigation":{uB(e,s,r);break}case"mark":case"paint":case"measure":{oB(e,s,o,u,r);const l=w_(),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":{lB(e,s,s.name,o,u,r);break}}}),Ov=Math.max(n.length-1,0),dB(e),i==="pageload"){pB(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&&(ss(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=>{Tq(o,kt[o].value,kt[o].unit)}),fB(e)}pn=void 0,So=void 0,kt={}}function oB(e,t,r,n,i){const a=i+r,s=a+n;return ss(e,{description:t.name,endTimestamp:s,op:t.entryType,origin:"auto.resource.browser.metrics",startTimestamp:a}),a}function uB(e,t,r){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(n=>{Zu(e,t,n,r)}),Zu(e,t,"secureConnection",r,"TLS/SSL","connectEnd"),Zu(e,t,"fetch",r,"cache","domainLookupStart"),Zu(e,t,"domainLookup",r,"DNS"),cB(e,t,r)}function Zu(e,t,r,n,i,a){const s=a?t[a]:t[`${r}End`],o=t[`${r}Start`];!o||!s||ss(e,{op:"browser",origin:"auto.browser.browser.metrics",description:i||r,startTimestamp:n+Vt(o),endTimestamp:n+Vt(s)})}function cB(e,t,r){t.responseEnd&&(ss(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"request",startTimestamp:r+Vt(t.requestStart),endTimestamp:r+Vt(t.responseEnd)}),ss(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"response",startTimestamp:r+Vt(t.responseStart),endTimestamp:r+Vt(t.responseEnd)}))}function lB(e,t,r,n,i,a){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const s=oa(r),o={};Sd(o,t,"transferSize","http.response_transfer_size"),Sd(o,t,"encodedBodySize","http.response_content_length"),Sd(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;ss(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 dB(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),Td(r.rtt)&&(kt["connection.rtt"]={value:r.rtt,unit:"millisecond"})),Td(t.deviceMemory)&&e.setTag("deviceMemory",`${t.deviceMemory} GB`),Td(t.hardwareConcurrency)&&e.setTag("hardwareConcurrency",String(t.hardwareConcurrency))}function fB(e){pn&&(Ot&&Re.log("[Measurements] Adding LCP Data"),pn.element&&e.setTag("lcp.element",ns(pn.element)),pn.id&&e.setTag("lcp.id",pn.id),pn.url&&e.setTag("lcp.url",pn.url.trim().slice(0,200)),e.setTag("lcp.size",pn.size)),So&&So.sources&&(Ot&&Re.log("[Measurements] Adding CLS Data"),So.sources.forEach((t,r)=>e.setTag(`cls.source.${r+1}`,ns(t.node))))}function Sd(e,t,r,n){const i=t[r];i!=null&&i<Xq&&(e[n]=i)}function pB(e){const t=Vl();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 mB(e,t,r){if(!Es(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,xN(n)?n===!0?r:n===!1?0:n*r:(Ot&&Re.warn("[Tracing] Discarding interaction span because of invalid sample rate."),!1)}function hB(e,t,r,n,i="auto.http.browser"){if(!Es()||!e.fetchData)return;const a=t(e.fetchData.url);if(e.endTimestamp&&a){const p=e.fetchData.__span;if(!p)return;const E=n[p];E&&(_B(E,e),delete n[p]);return}const s=gs(),o=ys(),{method:u,url:l}=e.fetchData,c=gB(l),d=c?oa(c).host:void 0,m=a?HN({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(m&&(e.fetchData.__span=m.spanContext().spanId,n[m.spanContext().spanId]=m),r(e.fetchData.url)&&o){const p=e.args[0];e.args[1]=e.args[1]||{};const E=e.args[1];E.headers=yB(p,o,s,E,m)}return m}function yB(e,t,r,n,i){const a=i||r.getSpan(),s=S_(),{traceId:o,spanId:u,sampled:l,dsc:c}={...s.getPropagationContext(),...r.getPropagationContext()},d=a?Ul(a):g_(o,u,l),m=pN(c||(a?as(a):T_(o,t,r))),p=n.headers||(typeof Request<"u"&&Un(e,Request)?e.headers:void 0);if(p)if(typeof Headers<"u"&&Un(p,Headers)){const E=new Headers(p);return E.append("sentry-trace",d),m&&E.append(Ng,m),E}else if(Array.isArray(p)){const E=[...p,["sentry-trace",d]];return m&&E.push([Ng,m]),E}else{const E="baggage"in p?p.baggage:void 0,T=[];return Array.isArray(E)?T.push(...E):E&&T.push(E),m&&T.push(m),{...p,"sentry-trace":d,baggage:T.length>0?T.join(","):void 0}}else return{"sentry-trace":d,baggage:m}}function gB(e){try{return new URL(e).href}catch{return}}function _B(e,t){if(t.response){I_(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 Bg=["localhost",/^\/(?!\/)/],kg={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,tracingOrigins:Bg,tracePropagationTargets:Bg};function EB(e){const{traceFetch:t,traceXHR:r,tracePropagationTargets:n,tracingOrigins:i,shouldCreateSpanForRequest:a,enableHTTPTimings:s}={traceFetch:kg.traceFetch,traceXHR:kg.traceXHR,...e},o=typeof a=="function"?a:c=>!0,u=c=>SB(c,n||i),l={};t&&sN(c=>{const d=hB(c,o,u,l);if(d){const m=iP(c.fetchData.url),p=m?oa(m).host:void 0;d.setAttributes({"http.url":m,"server.address":p})}s&&d&&Pv(d)}),r&&cN(c=>{const d=IB(c,o,u,l);s&&d&&Pv(d)})}function vB(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function Pv(e){const{url:t}=Rr(e).data||{};if(!t||typeof t!="string")return;const r=Co("resource",({entries:n})=>{n.forEach(i=>{vB(i)&&i.name.endsWith(t)&&(TB(i).forEach(s=>e.setAttribute(...s)),setTimeout(r))})})}function bB(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 ln(e=0){return(($r||performance.timeOrigin)+e)/1e3}function TB(e){const{name:t,version:r}=bB(e.nextHopProtocol),n=[];return n.push(["network.protocol.version",r],["network.protocol.name",t]),$r?[...n,["http.request.redirect_start",ln(e.redirectStart)],["http.request.fetch_start",ln(e.fetchStart)],["http.request.domain_lookup_start",ln(e.domainLookupStart)],["http.request.domain_lookup_end",ln(e.domainLookupEnd)],["http.request.connect_start",ln(e.connectStart)],["http.request.secure_connection_start",ln(e.secureConnectionStart)],["http.request.connection_end",ln(e.connectEnd)],["http.request.request_start",ln(e.requestStart)],["http.request.response_start",ln(e.responseStart)],["http.request.response_end",ln(e.responseEnd)]]:n}function SB(e,t){return Fo(e,t||Bg)}function IB(e,t,r,n){const i=e.xhr,a=i&&i[qa];if(!Es()||!i||i.__sentry_own_request__||!a)return;const s=t(a.url);if(e.endTimestamp&&s){const p=i.__sentry_xhr_span_id__;if(!p)return;const E=n[p];E&&a.status_code!==void 0&&(I_(E,a.status_code),E.end(),delete n[p]);return}const o=gs(),u=S_(),l=iP(a.url),c=l?oa(l).host:void 0,d=s?HN({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 m=ys();if(i.setRequestHeader&&r(a.url)&&m){const{traceId:p,spanId:E,sampled:T,dsc:S}={...u.getPropagationContext(),...o.getPropagationContext()},A=d?Ul(d):g_(p,E,T),f=pN(S||(d?as(d):T_(p,m,o)));RB(i,A,f)}return d}function RB(e,t,r){try{e.setRequestHeader("sentry-trace",t),r&&e.setRequestHeader(Ng,r)}catch{}}function iP(e){try{return new URL(e,Je.location.origin).href}catch{return}}function wB(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&&h_(({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 AB="BrowserTracing",OB={...gl,markBackgroundTransactions:!0,routingInstrumentation:wB,startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,enableInp:!1,interactionsSampleRate:1,_experiments:{},...kg},Cv=10;class NB{constructor(t){this.name=AB,this._hasSetTracePropagationTargets=!1,bq(),Ot&&(this._hasSetTracePropagationTargets=!!(t&&(t.tracePropagationTargets||t.tracingOrigins))),this.options={...OB,...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=Jq(),this._interactionIdToRouteNameMapping={},this.options.enableInp&&eB(this._interactionIdToRouteNameMapping,this.options.interactionsSampleRate),this.options.enableLongTask&&Qq(),this.options._experiments.enableInteractions&&Zq(),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:m,enableHTTPTimings:p,_experiments:E}=this.options,T=a&&a.tracePropagationTargets,S=T||this.options.tracePropagationTargets;Ot&&this._hasSetTracePropagationTargets&&T&&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(A=>{const f=this._createRouteTransaction(A);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(f,A,r),f},u,o),l&&Rq(),E.enableInteractions&&this._registerInteractionListener(),this.options.enableInp&&this._registerInpInteractionListener(),EB({traceFetch:c,traceXHR:d,tracePropagationTargets:S,shouldCreateSpanForRequest:m,enableHTTPTimings:p})}_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 p=o?Mv("sentry-trace"):"",E=o?Mv("baggage"):void 0,{traceId:T,dsc:S,parentSpanId:A,sampled:f}=TL(p,E);u={traceId:T,parentSpanId:A,parentSampled:f,...t,metadata:{...t.metadata,dynamicSamplingContext:S},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,m=Iv(r,c,i,a,!0,{location:d},s,o);return o&&Je.document&&(Je.document.addEventListener("readystatechange",()=>{["interactive","complete"].includes(Je.document.readyState)&&m.sendAutoFinishSignal()}),["interactive","complete"].includes(Je.document.readyState)&&m.sendAutoFinishSignal()),m.registerBeforeFinishCallback(p=>{this._collectWebVitals(),sB(p)}),m}_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?PB(this._latestRoute.context):"url"}};t=Iv(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=ys(),i=n!==void 0&&n.getIntegrationByName!==void 0?n.getIntegrationByName("Replay"):void 0,a=i!==void 0?i.getReplayId():void 0,s=pa(),o=gs(),u=o!==void 0?o.getUser():void 0;r.forEach(l=>{if(CB(l)){const c=l.interactionId;if(c===void 0)return;const d=this._interactionIdToRouteNameMapping[c],m=l.duration,p=l.startTime,E=Object.keys(this._interactionIdToRouteNameMapping),T=E.length>0?E.reduce((S,A)=>this._interactionIdToRouteNameMapping[S].duration<this._interactionIdToRouteNameMapping[A].duration?S:A):void 0;if(l.entryType==="first-input"&&E.map(A=>this._interactionIdToRouteNameMapping[A]).some(A=>A.duration===m&&A.startTime===p)||!c)return;if(d)d.duration=Math.max(d.duration,m);else if(E.length<Cv||T===void 0||m>this._interactionIdToRouteNameMapping[T].duration){const S=this._latestRoute.name,A=this._latestRoute.context;S&&A&&(T&&Object.keys(this._interactionIdToRouteNameMapping).length>=Cv&&delete this._interactionIdToRouteNameMapping[T],this._interactionIdToRouteNameMapping[c]={routeName:S,duration:m,parentContext:A,user:u,activeTransaction:s,replayId:a,startTime:p})}}})};Co("event",t),Co("first-input",t)}}function Mv(e){const t=Pj(`meta[name=${e}]`);return t?t.getAttribute("content"):void 0}function PB(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 CB(e){return"duration"in e}const ft=ot;let Ug=0;function aP(){return Ug>0}function MB(){Ug++,setTimeout(()=>{Ug--})}function os(e,t={},r){if(typeof e!="function")return e;try{const i=e.__sentry_wrapped__;if(i)return typeof i=="function"?i:e;if(p_(e))return e}catch{return e}const n=function(){const i=Array.prototype.slice.call(arguments);try{const a=i.map(s=>os(s,t));return e.apply(this,a)}catch(a){throw MB(),_N(s=>{s.addEventProcessor(o=>(t.mechanism&&(Tg(o,void 0),Oo(o,t.mechanism)),o.extra={...o.extra,arguments:i},o)),E_(a)}),a}};try{for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i])}catch{}eN(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 sP(e,t){const r=O_(e,t),n={type:t&&t.name,value:$B(t)};return r.length&&(n.stacktrace={frames:r}),n.type===void 0&&n.value===""&&(n.value="Unrecoverable error caught"),n}function DB(e,t,r,n){const i=gr(),a=i&&i.getOptions().normalizeDepth,s={exception:{values:[{type:jl(t)?t.constructor.name:n?"UnhandledRejection":"Error",value:kB(t,{isUnhandledRejection:n})}]},extra:{__serialized__:lN(t,a)}};if(r){const o=O_(e,r);o.length&&(s.exception.values[0].stacktrace={frames:o})}return s}function Id(e,t){return{exception:{values:[sP(e,t)]}}}function O_(e,t){const r=t.stacktrace||t.stack||"",n=LB(t);try{return e(r,n)}catch{}return[]}const jB=/Minified React error #\d+;/i;function LB(e){if(e){if(typeof e.framesToPop=="number")return e.framesToPop;if(jB.test(e.message))return 1}return 0}function $B(e){const t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function qB(e,t,r,n){const i=r&&r.syntheticException||void 0,a=N_(e,t,i,n);return Oo(a),a.level="error",r&&r.event_id&&(a.event_id=r.event_id),is(a)}function BB(e,t,r="info",n,i){const a=n&&n.syntheticException||void 0,s=Fg(e,t,a,i);return s.level=r,n&&n.event_id&&(s.event_id=n.event_id),is(s)}function N_(e,t,r,n,i){let a;if(c_(t)&&t.error)return Id(e,t.error);if(zE(t)||vj(t)){const s=t;if("stack"in t)a=Id(e,t);else{const o=s.name||(zE(s)?"DOMError":"DOMException"),u=s.message?`${o}: ${s.message}`:o;a=Fg(e,u,r,n),Tg(a,u)}return"code"in s&&(a.tags={...a.tags,"DOMException.code":`${s.code}`}),a}return u_(t)?Id(e,t):ca(t)||jl(t)?(a=DB(e,t,r,i),Oo(a,{synthetic:!0}),a):(a=Fg(e,t,r,n),Tg(a,`${t}`),Oo(a,{synthetic:!0}),a)}function Fg(e,t,r,n){const i={};if(n&&r){const a=O_(e,r);a.length&&(i.exception={values:[{value:t,stacktrace:{frames:a}}]})}if(l_(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 kB(e,{isUnhandledRejection:t}){const r=Bj(e),n=t?"promise rejection":"exception";return c_(e)?`Event \`ErrorEvent\` captured as ${n} with message \`${e.message}\``:jl(e)?`Event \`${UB(e)}\` (type=${e.type}) captured as ${n}`:`Object captured as ${n} with keys: ${r}`}function UB(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function FB(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=HB(e);return va(i,[a])}function HB(e){return[{type:"user_report"},e]}class VB extends R${constructor(t){const r=ft.SENTRY_SDK_SOURCE||sL();MN(t,"browser",["browser"],r),super(t),t.sendClientReports&&ft.document&&ft.document.addEventListener("visibilitychange",()=>{ft.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,r){return qB(this._options.stackParser,t,r,this._options.attachStacktrace)}eventFromMessage(t,r="info",n){return BB(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=FB(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=NL(t,this._options.tunnel&&ha(this._dsn));this._sendEnvelope(r)}}let Js;function GB(){if(Js)return Js;if(wg(ft.fetch))return Js=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 Js=t.bind(ft)}function zB(){Js=void 0}function WB(e,t=GB()){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 zB(),r-=s,n--,y_(u)}}return CN(e,i)}const YB=4;function xB(e){function t(r){return new Ir((n,i)=>{const a=new XMLHttpRequest;a.onerror=i,a.onreadystatechange=()=>{a.readyState===YB&&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 CN(e,t)}const Gl="?",KB=30,XB=40,JB=50;function P_(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 QB=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,ZB=/\((\S*)(?::(\d+))(?::(\d+))\)/,ek=e=>{const t=QB.exec(e);if(t){if(t[2]&&t[2].indexOf("eval")===0){const a=ZB.exec(t[2]);a&&(t[2]=a[1],t[3]=a[2],t[4]=a[3])}const[n,i]=oP(t[1]||Gl,t[2]);return P_(i,n,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}},tk=[KB,ek],rk=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,nk=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,ik=e=>{const t=rk.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const a=nk.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]||Gl;return[i,n]=oP(i,n),P_(n,i,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},ak=[JB,ik],sk=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,ok=e=>{const t=sk.exec(e);return t?P_(t[2],t[1]||Gl,+t[3],t[4]?+t[4]:void 0):void 0},uk=[XB,ok],ck=[tk,ak,uk],lk=nN(...ck),oP=(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]:Gl,r?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},ec=1024,uP="Breadcrumbs",dk=((e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:uP,setupOnce(){},setup(r){t.console&&Hj(mk(r)),t.dom&&zj(pk(r,t.dom)),t.xhr&&cN(hk(r)),t.fetch&&sN(yk(r)),t.history&&h_(gk(r)),t.sentry&&r.on&&r.on("beforeSendEvent",fk(r))}}}),cP=dk;li(uP,cP);function fk(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 pk(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>ec&&(Lr&&Re.warn(`\`dom.maxStringLength\` cannot exceed ${ec}, but a value of ${o} was configured. Sentry will use ${ec} instead.`),o=ec),typeof s=="string"&&(s=[s]);try{const l=n.event,c=_k(l)?l.target:l;i=ns(c,{keyAttrs:s,maxStringLength:o}),a=JO(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 mk(e){return function(r){if(gr()!==e)return;const n={category:"console",data:{arguments:r.args,logger:"console"},level:mL(r.level),message:WE(r.args," ")};if(r.level==="assert")if(r.args[0]===!1)n.message=`Assertion failed: ${WE(r.args.slice(1)," ")||"console.assert"}`,n.data.arguments=r.args.slice(1);else return;fa(n,{input:r.args,level:r.level})}}function hk(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 yk(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 gk(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 _k(e){return!!e&&!!e.target}const lP="Dedupe",Ek=(()=>{let e;return{name:lP,setupOnce(){},processEvent(t){if(t.type)return t;try{if(vk(t,e))return Lr&&Re.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}}),dP=Ek;li(lP,dP);function vk(e,t){return t?!!(bk(e,t)||Tk(e,t)):!1}function bk(e,t){const r=e.message,n=t.message;return!(!r&&!n||r&&!n||!r&&n||r!==n||!pP(e,t)||!fP(e,t))}function Tk(e,t){const r=Dv(t),n=Dv(e);return!(!r||!n||r.type!==n.type||r.value!==n.value||!pP(e,t)||!fP(e,t))}function fP(e,t){let r=jv(e),n=jv(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 pP(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 Dv(e){return e.exception&&e.exception.values&&e.exception.values[0]}function jv(e){const t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch{return}}const mP="GlobalHandlers",Sk=((e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:mP,setupOnce(){Error.stackTraceLimit=50},setup(r){t.onerror&&(Ik(r),Lv("onerror")),t.onunhandledrejection&&(Rk(r),Lv("onunhandledrejection"))}}}),hP=Sk;li(mP,hP);function Ik(e){oN(t=>{const{stackParser:r,attachStacktrace:n}=gP();if(gr()!==e||aP())return;const{msg:i,url:a,line:s,column:o,error:u}=t,l=u===void 0&&En(i)?Ok(i,a,s,o):yP(N_(r,u||i,void 0,n,!1),a,s,o);l.level="error",gN(l,{originalException:u,mechanism:{handled:!1,type:"onerror"}})})}function Rk(e){uN(t=>{const{stackParser:r,attachStacktrace:n}=gP();if(gr()!==e||aP())return;const i=wk(t),a=d_(i)?Ak(i):N_(r,i,void 0,n,!0);a.level="error",gN(a,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function wk(e){if(d_(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 Ak(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function Ok(e,t,r,n){const i=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let a=c_(e)?e.message:e,s="Error";const o=a.match(i);return o&&(s=o[1],a=o[2]),yP({exception:{values:[{type:s,value:a}]}},t,r,n)}function yP(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=En(t)&&t.length>0?t:Nj();return u.length===0&&u.push({colno:l,filename:d,function:"?",in_app:!0,lineno:c}),e}function Lv(e){Lr&&Re.log(`Global Handler attached: ${e}`)}function gP(){const e=gr();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const _P="HttpContext",Nk=(()=>({name:_P,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}})),EP=Nk;li(_P,EP);const Pk="cause",Ck=5,vP="LinkedErrors",Mk=((e={})=>{const t=e.limit||Ck,r=e.key||Pk;return{name:vP,setupOnce(){},preprocessEvent(n,i,a){const s=a.getOptions();Rj(sP,s.stackParser,s.maxValueLength,r,t,n,i)}}}),bP=Mk;li(vP,bP);const Dk=["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"],TP="TryCatch",jk=((e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:TP,setupOnce(){t.setTimeout&&tr(ft,"setTimeout",$v),t.setInterval&&tr(ft,"setInterval",$v),t.requestAnimationFrame&&tr(ft,"requestAnimationFrame",Lk),t.XMLHttpRequest&&"XMLHttpRequest"in ft&&tr(XMLHttpRequest.prototype,"send",$k);const r=t.eventTarget;r&&(Array.isArray(r)?r:Dk).forEach(qk)}}}),SP=jk;li(TP,SP);function $v(e){return function(...t){const r=t[0];return t[0]=os(r,{mechanism:{data:{function:Fn(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function Lk(e){return function(t){return e.apply(this,[os(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Fn(e)},handled:!1,type:"instrument"}})])}}function $k(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:Fn(a)},handled:!1,type:"instrument"}},o=p_(a);return o&&(s.mechanism.data.handler=Fn(o)),os(a,s)})}),e.apply(this,t)}}function qk(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=os(a.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Fn(a),target:e},handled:!1,type:"instrument"}}))}catch{}return n.apply(this,[i,os(a,{mechanism:{data:{function:"addEventListener",handler:Fn(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 Bk=[jN(),$N(),SP(),cP(),hP(),bP(),dP(),EP()];function kk(e){return[...Bk]}function Uk(e={}){e.defaultIntegrations===void 0&&(e.defaultIntegrations=kk()),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:Uj(e.stackParser||lk),integrations:E$(e),transport:e.transport||(aN()?WB:xB)};O$(VB,t),e.autoSessionTracking&&Fk()}const qv=(e={},t=Jr())=>{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=g$(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 Fk(){if(typeof ft.document>"u"){Lr&&Re.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}uv({ignoreDuration:!0}),cv(),h_(({from:e,to:t})=>{e!==void 0&&e!==t&&(uv({ignoreDuration:!0}),cv())})}function Hk(e){const t={...e};MN(t,"react"),Uk(t)}var Rd={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 Bv;function Vk(){if(Bv)return gt;Bv=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,m=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,E=e?Symbol.for("react.lazy"):60116,T=e?Symbol.for("react.block"):60121,S=e?Symbol.for("react.fundamental"):60117,A=e?Symbol.for("react.responder"):60118,f=e?Symbol.for("react.scope"):60119;function _(h){if(typeof h=="object"&&h!==null){var I=h.$$typeof;switch(I){case t:switch(h=h.type,h){case u:case l:case n:case a:case i:case d:return h;default:switch(h=h&&h.$$typeof,h){case o:case c:case E:case p:case s:return h;default:return I}}case r:return I}}}function b(h){return _(h)===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=E,gt.Memo=p,gt.Portal=r,gt.Profiler=a,gt.StrictMode=i,gt.Suspense=d,gt.isAsyncMode=function(h){return b(h)||_(h)===u},gt.isConcurrentMode=b,gt.isContextConsumer=function(h){return _(h)===o},gt.isContextProvider=function(h){return _(h)===s},gt.isElement=function(h){return typeof h=="object"&&h!==null&&h.$$typeof===t},gt.isForwardRef=function(h){return _(h)===c},gt.isFragment=function(h){return _(h)===n},gt.isLazy=function(h){return _(h)===E},gt.isMemo=function(h){return _(h)===p},gt.isPortal=function(h){return _(h)===r},gt.isProfiler=function(h){return _(h)===a},gt.isStrictMode=function(h){return _(h)===i},gt.isSuspense=function(h){return _(h)===d},gt.isValidElementType=function(h){return typeof h=="string"||typeof h=="function"||h===n||h===l||h===a||h===i||h===d||h===m||typeof h=="object"&&h!==null&&(h.$$typeof===E||h.$$typeof===p||h.$$typeof===s||h.$$typeof===o||h.$$typeof===c||h.$$typeof===S||h.$$typeof===A||h.$$typeof===f||h.$$typeof===T)},gt.typeOf=_,gt}var kv;function Gk(){return kv||(kv=1,Rd.exports=Vk()),Rd.exports}var wd,Uv;function zk(){if(Uv)return wd;Uv=1;var e=Gk(),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(E){return e.isMemo(E)?i:a[E.$$typeof]||t}var o=Object.defineProperty,u=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,c=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,m=Object.prototype;function p(E,T,S){if(typeof T!="string"){if(m){var A=d(T);A&&A!==m&&p(E,A,S)}var f=u(T);l&&(f=f.concat(l(T)));for(var _=s(E),b=s(T),h=0;h<f.length;++h){var I=f[h];if(!r[I]&&!(S&&S[I])&&!(b&&b[I])&&!(_&&_[I])){var O=c(T,I);try{o(E,I,O)}catch{}}}}return E}return wd=p,wd}zk();const Wk=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Yk(e){const t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}const Fv={componentStack:null,error:null,eventId:null};function xk(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 Nl extends De.Component{constructor(t){super(t),Nl.prototype.__init.call(this),this.state=Fv,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&&qv({...t.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,{componentStack:r}){const{beforeCapture:n,onError:i,showDialog:a,dialogOptions:s}=this.props;_N(o=>{if(Yk(De.version)&&u_(t)){const l=new Error(t.message);l.name=`React ErrorBoundary ${t.name}`,l.stack=r,xk(t,l)}n&&n(o,t,r);const u=E_(t,{captureContext:{contexts:{react:{componentStack:r}}},mechanism:{handled:!!this.props.fallback}});i&&i(t,r,u),a&&(this._lastEventId=u,this._openFallbackReportDialog&&qv({...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(Fv)}}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,De.isValidElement(i)?i:(t&&Wk&&Re.warn("fallback did not produce a valid ReactElement"),null)}return typeof r=="function"?r():r}}const Kk=De.lazy(()=>xt(()=>import("./index-CuBAn4iR.js"),__vite__mapDeps([0,1,2,3,4,5,6])).then(e=>({default:e.Navbar})));function Xk(e){return Q.jsx(De.Suspense,{fallback:Q.jsx("div",{className:"topnav-skeleton","aria-hidden":!0}),children:Q.jsx(Kk,{...e})})}const Jk={},Hv=e=>{let t;const r=new Set,n=(c,d)=>{const m=typeof c=="function"?c(t):c;if(!Object.is(m,t)){const p=t;t=d??(typeof m!="object"||m===null)?m:Object.assign({},t,m),r.forEach(E=>E(t,p))}},i=()=>t,u={setState:n,getState:i,getInitialState:()=>l,subscribe:c=>(r.add(c),()=>r.delete(c)),destroy:()=>{(Jk?"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},Qk=e=>e?Hv(e):Hv;var Ad={exports:{}},Od={},Nd={exports:{}},Pd={};/**
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 Vv;function Zk(){if(Vv)return Pd;Vv=1;var e=CO();function t(d,m){return d===m&&(d!==0||1/d===1/m)||d!==d&&m!==m}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,i=e.useEffect,a=e.useLayoutEffect,s=e.useDebugValue;function o(d,m){var p=m(),E=n({inst:{value:p,getSnapshot:m}}),T=E[0].inst,S=E[1];return a(function(){T.value=p,T.getSnapshot=m,u(T)&&S({inst:T})},[d,p,m]),i(function(){return u(T)&&S({inst:T}),d(function(){u(T)&&S({inst:T})})},[d]),s(p),p}function u(d){var m=d.getSnapshot;d=d.value;try{var p=m();return!r(d,p)}catch{return!0}}function l(d,m){return m()}var c=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?l:o;return Pd.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:c,Pd}var Gv;function eU(){return Gv||(Gv=1,Nd.exports=Zk()),Nd.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 zv;function tU(){if(zv)return Od;zv=1;var e=CO(),t=eU();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 Od.useSyncExternalStoreWithSelector=function(l,c,d,m,p){var E=a(null);if(E.current===null){var T={hasValue:!1,value:null};E.current=T}else T=E.current;E=o(function(){function A(I){if(!f){if(f=!0,_=I,I=m(I),p!==void 0&&T.hasValue){var O=T.value;if(p(O,I))return b=O}return b=I}if(O=b,n(_,I))return O;var P=m(I);return p!==void 0&&p(O,P)?(_=I,O):(_=I,b=P)}var f=!1,_,b,h=d===void 0?null:d;return[function(){return A(c())},h===null?void 0:function(){return A(h())}]},[c,d,m,p]);var S=i(l,E[0],E[1]);return s(function(){T.hasValue=!0,T.value=S},[S]),u(S),S},Od}var Wv;function rU(){return Wv||(Wv=1,Ad.exports=tU()),Ad.exports}var nU=rU();const iU=MO(nU),IP={},{useDebugValue:aU}=DO,{useSyncExternalStoreWithSelector:sU}=iU;let Yv=!1;const oU=e=>e;function uU(e,t=oU,r){(IP?"production":void 0)!=="production"&&r&&!Yv&&(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"),Yv=!0);const n=sU(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,r);return aU(n),n}const xv=e=>{(IP?"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"?Qk(e):e,r=(n,i)=>uU(t,n,i);return Object.assign(r,t),r},Ts=e=>e?xv(e):xv;var Br={},fi={},pi={},Cd={},kr={},tc={exports:{}},Md={},An={},mi={},Dd={},jd={},Ld={},Kv;function Mo(){return Kv||(Kv=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(f){if(super(),!e.IDENTIFIER.test(f))throw new Error("CodeGen: name must be a valid identifier");this.str=f}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class n extends t{constructor(f){super(),this._items=typeof f=="string"?[f]:f}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const f=this._items[0];return f===""||f==='""'}get str(){var f;return(f=this._str)!==null&&f!==void 0?f:this._str=this._items.reduce((_,b)=>`${_}${b}`,"")}get names(){var f;return(f=this._names)!==null&&f!==void 0?f:this._names=this._items.reduce((_,b)=>(b instanceof r&&(_[b.str]=(_[b.str]||0)+1),_),{})}}e._Code=n,e.nil=new n("");function i(A,...f){const _=[A[0]];let b=0;for(;b<f.length;)o(_,f[b]),_.push(A[++b]);return new n(_)}e._=i;const a=new n("+");function s(A,...f){const _=[p(A[0])];let b=0;for(;b<f.length;)_.push(a),o(_,f[b]),_.push(a,p(A[++b]));return u(_),new n(_)}e.str=s;function o(A,f){f instanceof n?A.push(...f._items):f instanceof r?A.push(f):A.push(d(f))}e.addCodeArg=o;function u(A){let f=1;for(;f<A.length-1;){if(A[f]===a){const _=l(A[f-1],A[f+1]);if(_!==void 0){A.splice(f-1,3,_);continue}A[f++]="+"}f++}}function l(A,f){if(f==='""')return A;if(A==='""')return f;if(typeof A=="string")return f instanceof r||A[A.length-1]!=='"'?void 0:typeof f!="string"?`${A.slice(0,-1)}${f}"`:f[0]==='"'?A.slice(0,-1)+f.slice(1):void 0;if(typeof f=="string"&&f[0]==='"'&&!(A instanceof r))return`"${A}${f.slice(1)}`}function c(A,f){return f.emptyStr()?A:A.emptyStr()?f:s`${A}${f}`}e.strConcat=c;function d(A){return typeof A=="number"||typeof A=="boolean"||A===null?A:p(Array.isArray(A)?A.join(","):A)}function m(A){return new n(p(A))}e.stringify=m;function p(A){return JSON.stringify(A).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=p;function E(A){return typeof A=="string"&&e.IDENTIFIER.test(A)?new n(`.${A}`):i`[${A}]`}e.getProperty=E;function T(A){if(typeof A=="string"&&e.IDENTIFIER.test(A))return new n(`${A}`);throw new Error(`CodeGen: invalid export name: ${A}, use explicit $id name mapping`)}e.getEsmExportName=T;function S(A){return new n(A.toString())}e.regexpCode=S})(Ld)),Ld}var $d={},Xv;function Jv(){return Xv||(Xv=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=Mo();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 m=this.toName(l),{prefix:p}=m,E=(d=c.key)!==null&&d!==void 0?d:c.ref;let T=this._values[p];if(T){const f=T.get(E);if(f)return f}else T=this._values[p]=new Map;T.set(E,m);const S=this._scope[p]||(this._scope[p]=[]),A=S.length;return S[A]=c.ref,m.setValue(c,{property:p,itemIndex:A}),m}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,m=>{if(m.value===void 0)throw new Error(`CodeGen: name "${m}" has no value`);return m.value.code},c,d)}_reduceValues(l,c,d={},m){let p=t.nil;for(const E in l){const T=l[E];if(!T)continue;const S=d[E]=d[E]||new Map;T.forEach(A=>{if(S.has(A))return;S.set(A,n.Started);let f=c(A);if(f){const _=this.opts.es5?e.varKinds.var:e.varKinds.const;p=(0,t._)`${p}${_} ${A} = ${f};${this.opts._n}`}else if(f=m==null?void 0:m(A))p=(0,t._)`${p}${f}${this.opts._n}`;else throw new r(A);S.set(A,n.Completed)})}return p}}e.ValueScope=o})($d)),$d}var Qv;function Ke(){return Qv||(Qv=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=Mo(),r=Jv();var n=Mo();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=Jv();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 m 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 p 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 E extends p{render(N){return"{"+N._n+super.render(N)+"}"+N._n}}class T extends p{}class S extends E{}S.kind="else";class A extends E{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 S(Z):Z}if(j)return N===!1?j instanceof A?j:j.nodes:this.nodes.length?this:new A(se(N),j instanceof A?[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}}A.kind="if";class f extends E{}f.kind="for";class _ extends f{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 f{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 h extends f{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 I extends E{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)}}I.kind="func";class O extends p{render(N){return"return "+super.render(N)}}O.kind="return";class P extends E{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 B extends E{constructor(N){super(),this.error=N}render(N){return`catch(${this.error})`+super.render(N)}}B.kind="catch";class z extends E{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 T]}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 m(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 A(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 A(N))}else(){return this._elseNode(new S)}endIf(){return this._endBlockNode(A,S)}_for(N,j){return this._blockNode(N),j&&this.code(j).endFor(),this}for(N,j){return this._for(new _(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 h("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 h("in",Ee,_e,j),()=>Z(_e))}endFor(){return this._endBlockNode(f)}label(N){return this._leafNode(new l(N))}break(N){return this._leafNode(new c(N))}return(N){const j=new O;if(this._blockNode(j),this.code(N),j.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(O)}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 B(_e),j(_e)}return Z&&(this._currNode=Ee.finally=new z,this.code(Z)),this._endBlockNode(B,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 I(N,j,Z)),Ee&&this.code(Ee).endFunc(),this}endFunc(){return this._endBlockNode(I)}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 A))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})`}})(jd)),jd}var Ze={},Zv;function pt(){if(Zv)return Ze;Zv=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=Mo();function r(h){const I={};for(const O of h)I[O]=!0;return I}Ze.toHash=r;function n(h,I){return typeof I=="boolean"?I:Object.keys(I).length===0?!0:(i(h,I),!a(I,h.self.RULES.all))}Ze.alwaysValidSchema=n;function i(h,I=h.schema){const{opts:O,self:P}=h;if(!O.strictSchema||typeof I=="boolean")return;const B=P.RULES.keywords;for(const z in I)B[z]||b(h,`unknown keyword: "${z}"`)}Ze.checkUnknownRules=i;function a(h,I){if(typeof h=="boolean")return!h;for(const O in h)if(I[O])return!0;return!1}Ze.schemaHasRules=a;function s(h,I){if(typeof h=="boolean")return!h;for(const O in h)if(O!=="$ref"&&I.all[O])return!0;return!1}Ze.schemaHasRulesButRef=s;function o({topSchemaRef:h,schemaPath:I},O,P,B){if(!B){if(typeof O=="number"||typeof O=="boolean")return O;if(typeof O=="string")return(0,e._)`${O}`}return(0,e._)`${h}${I}${(0,e.getProperty)(P)}`}Ze.schemaRefOrVal=o;function u(h){return d(decodeURIComponent(h))}Ze.unescapeFragment=u;function l(h){return encodeURIComponent(c(h))}Ze.escapeFragment=l;function c(h){return typeof h=="number"?`${h}`:h.replace(/~/g,"~0").replace(/\//g,"~1")}Ze.escapeJsonPointer=c;function d(h){return h.replace(/~1/g,"/").replace(/~0/g,"~")}Ze.unescapeJsonPointer=d;function m(h,I){if(Array.isArray(h))for(const O of h)I(O);else I(h)}Ze.eachItem=m;function p({mergeNames:h,mergeToName:I,mergeValues:O,resultToName:P}){return(B,z,Y,W)=>{const U=Y===void 0?z:Y instanceof e.Name?(z instanceof e.Name?h(B,z,Y):I(B,z,Y),Y):z instanceof e.Name?(I(B,Y,z),z):O(z,Y);return W===e.Name&&!(U instanceof e.Name)?P(B,U):U}}Ze.mergeEvaluated={props:p({mergeNames:(h,I,O)=>h.if((0,e._)`${O} !== true && ${I} !== undefined`,()=>{h.if((0,e._)`${I} === true`,()=>h.assign(O,!0),()=>h.assign(O,(0,e._)`${O} || {}`).code((0,e._)`Object.assign(${O}, ${I})`))}),mergeToName:(h,I,O)=>h.if((0,e._)`${O} !== true`,()=>{I===!0?h.assign(O,!0):(h.assign(O,(0,e._)`${O} || {}`),T(h,O,I))}),mergeValues:(h,I)=>h===!0?!0:{...h,...I},resultToName:E}),items:p({mergeNames:(h,I,O)=>h.if((0,e._)`${O} !== true && ${I} !== undefined`,()=>h.assign(O,(0,e._)`${I} === true ? true : ${O} > ${I} ? ${O} : ${I}`)),mergeToName:(h,I,O)=>h.if((0,e._)`${O} !== true`,()=>h.assign(O,I===!0?!0:(0,e._)`${O} > ${I} ? ${O} : ${I}`)),mergeValues:(h,I)=>h===!0?!0:Math.max(h,I),resultToName:(h,I)=>h.var("items",I)})};function E(h,I){if(I===!0)return h.var("props",!0);const O=h.var("props",(0,e._)`{}`);return I!==void 0&&T(h,O,I),O}Ze.evaluatedPropsToName=E;function T(h,I,O){Object.keys(O).forEach(P=>h.assign((0,e._)`${I}${(0,e.getProperty)(P)}`,!0))}Ze.setEvaluated=T;const S={};function A(h,I){return h.scopeValue("func",{ref:I,code:S[I.code]||(S[I.code]=new t._Code(I.code))})}Ze.useFunc=A;var f;(function(h){h[h.Num=0]="Num",h[h.Str=1]="Str"})(f||(Ze.Type=f={}));function _(h,I,O){if(h instanceof e.Name){const P=I===f.Num;return O?P?(0,e._)`"[" + ${h} + "]"`:(0,e._)`"['" + ${h} + "']"`:P?(0,e._)`"/" + ${h}`:(0,e._)`"/" + ${h}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return O?(0,e.getProperty)(h).toString():"/"+c(h)}Ze.getErrorPath=_;function b(h,I,O=h.opts.strictSchema){if(O){if(I=`strict mode: ${I}`,O===!0)throw new Error(I);h.self.logger.warn(I)}}return Ze.checkStrictMode=b,Ze}var rc={},eb;function Vn(){if(eb)return rc;eb=1,Object.defineProperty(rc,"__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 rc.default=t,rc}var tb;function Ko(){return tb||(tb=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:S})=>(0,t.str)`must pass "${S}" keyword validation`},e.keyword$DataError={message:({keyword:S,schemaType:A})=>A?(0,t.str)`"${S}" keyword must be ${A} ($data)`:(0,t.str)`"${S}" keyword is invalid ($data)`};function i(S,A=e.keywordError,f,_){const{it:b}=S,{gen:h,compositeRule:I,allErrors:O}=b,P=d(S,A,f);_??(I||O)?u(h,P):l(b,(0,t._)`[${P}]`)}e.reportError=i;function a(S,A=e.keywordError,f){const{it:_}=S,{gen:b,compositeRule:h,allErrors:I}=_,O=d(S,A,f);u(b,O),h||I||l(_,n.default.vErrors)}e.reportExtraError=a;function s(S,A){S.assign(n.default.errors,A),S.if((0,t._)`${n.default.vErrors} !== null`,()=>S.if(A,()=>S.assign((0,t._)`${n.default.vErrors}.length`,A),()=>S.assign(n.default.vErrors,null)))}e.resetErrorsCount=s;function o({gen:S,keyword:A,schemaValue:f,data:_,errsCount:b,it:h}){if(b===void 0)throw new Error("ajv implementation error");const I=S.name("err");S.forRange("i",b,n.default.errors,O=>{S.const(I,(0,t._)`${n.default.vErrors}[${O}]`),S.if((0,t._)`${I}.instancePath === undefined`,()=>S.assign((0,t._)`${I}.instancePath`,(0,t.strConcat)(n.default.instancePath,h.errorPath))),S.assign((0,t._)`${I}.schemaPath`,(0,t.str)`${h.errSchemaPath}/${A}`),h.opts.verbose&&(S.assign((0,t._)`${I}.schema`,f),S.assign((0,t._)`${I}.data`,_))})}e.extendErrors=o;function u(S,A){const f=S.const("err",A);S.if((0,t._)`${n.default.vErrors} === null`,()=>S.assign(n.default.vErrors,(0,t._)`[${f}]`),(0,t._)`${n.default.vErrors}.push(${f})`),S.code((0,t._)`${n.default.errors}++`)}function l(S,A){const{gen:f,validateName:_,schemaEnv:b}=S;b.$async?f.throw((0,t._)`new ${S.ValidationError}(${A})`):(f.assign((0,t._)`${_}.errors`,A),f.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(S,A,f){const{createErrors:_}=S.it;return _===!1?(0,t._)`{}`:m(S,A,f)}function m(S,A,f={}){const{gen:_,it:b}=S,h=[p(b,f),E(S,f)];return T(S,A,h),_.object(...h)}function p({errorPath:S},{instancePath:A}){const f=A?(0,t.str)`${S}${(0,r.getErrorPath)(A,r.Type.Str)}`:S;return[n.default.instancePath,(0,t.strConcat)(n.default.instancePath,f)]}function E({keyword:S,it:{errSchemaPath:A}},{schemaPath:f,parentSchema:_}){let b=_?A:(0,t.str)`${A}/${S}`;return f&&(b=(0,t.str)`${b}${(0,r.getErrorPath)(f,r.Type.Str)}`),[c.schemaPath,b]}function T(S,{params:A,message:f},_){const{keyword:b,data:h,schemaValue:I,it:O}=S,{opts:P,propertyName:B,topSchemaRef:z,schemaPath:Y}=O;_.push([c.keyword,b],[c.params,typeof A=="function"?A(S):A||(0,t._)`{}`]),P.messages&&_.push([c.message,typeof f=="function"?f(S):f]),P.verbose&&_.push([c.schema,I],[c.parentSchema,(0,t._)`${z}${Y}`],[n.default.data,h]),B&&_.push([c.propertyName,B])}})(Dd)),Dd}var rb;function cU(){if(rb)return mi;rb=1,Object.defineProperty(mi,"__esModule",{value:!0}),mi.boolOrEmptySchema=mi.topBoolOrEmptySchema=void 0;const e=Ko(),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={},nb;function RP(){if(nb)return hi;nb=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 On={},ib;function wP(){if(ib)return On;ib=1,Object.defineProperty(On,"__esModule",{value:!0}),On.shouldUseRule=On.shouldUseGroup=On.schemaHasRulesForType=void 0;function e({schema:n,self:i},a){const s=i.RULES.types[a];return s&&s!==!0&&t(n,s)}On.schemaHasRulesForType=e;function t(n,i){return i.rules.some(a=>r(n,a))}On.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 On.shouldUseRule=r,On}var ab;function Pl(){if(ab)return Qt;ab=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=RP(),t=wP(),r=Ko(),n=Ke(),i=pt();var a;(function(f){f[f.Correct=0]="Correct",f[f.Wrong=1]="Wrong"})(a||(Qt.DataType=a={}));function s(f){const _=o(f.type);if(_.includes("null")){if(f.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!_.length&&f.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');f.nullable===!0&&_.push("null")}return _}Qt.getSchemaTypes=s;function o(f){const _=Array.isArray(f)?f:f?[f]:[];if(_.every(e.isJSONType))return _;throw new Error("type must be JSONType or JSONType[]: "+_.join(","))}Qt.getJSONTypes=o;function u(f,_){const{gen:b,data:h,opts:I}=f,O=c(_,I.coerceTypes),P=_.length>0&&!(O.length===0&&_.length===1&&(0,t.schemaHasRulesForType)(f,_[0]));if(P){const B=E(_,h,I.strictNumbers,a.Wrong);b.if(B,()=>{O.length?d(f,_,O):S(f)})}return P}Qt.coerceAndCheckDataType=u;const l=new Set(["string","number","integer","boolean","null"]);function c(f,_){return _?f.filter(b=>l.has(b)||_==="array"&&b==="array"):[]}function d(f,_,b){const{gen:h,data:I,opts:O}=f,P=h.let("dataType",(0,n._)`typeof ${I}`),B=h.let("coerced",(0,n._)`undefined`);O.coerceTypes==="array"&&h.if((0,n._)`${P} == 'object' && Array.isArray(${I}) && ${I}.length == 1`,()=>h.assign(I,(0,n._)`${I}[0]`).assign(P,(0,n._)`typeof ${I}`).if(E(_,I,O.strictNumbers),()=>h.assign(B,I))),h.if((0,n._)`${B} !== undefined`);for(const Y of b)(l.has(Y)||Y==="array"&&O.coerceTypes==="array")&&z(Y);h.else(),S(f),h.endIf(),h.if((0,n._)`${B} !== undefined`,()=>{h.assign(I,B),m(f,B)});function z(Y){switch(Y){case"string":h.elseIf((0,n._)`${P} == "number" || ${P} == "boolean"`).assign(B,(0,n._)`"" + ${I}`).elseIf((0,n._)`${I} === null`).assign(B,(0,n._)`""`);return;case"number":h.elseIf((0,n._)`${P} == "boolean" || ${I} === null
52
+ || (${P} == "string" && ${I} && ${I} == +${I})`).assign(B,(0,n._)`+${I}`);return;case"integer":h.elseIf((0,n._)`${P} === "boolean" || ${I} === null
53
+ || (${P} === "string" && ${I} && ${I} == +${I} && !(${I} % 1))`).assign(B,(0,n._)`+${I}`);return;case"boolean":h.elseIf((0,n._)`${I} === "false" || ${I} === 0 || ${I} === null`).assign(B,!1).elseIf((0,n._)`${I} === "true" || ${I} === 1`).assign(B,!0);return;case"null":h.elseIf((0,n._)`${I} === "" || ${I} === 0 || ${I} === false`),h.assign(B,null);return;case"array":h.elseIf((0,n._)`${P} === "string" || ${P} === "number"
54
+ || ${P} === "boolean" || ${I} === null`).assign(B,(0,n._)`[${I}]`)}}}function m({gen:f,parentData:_,parentDataProperty:b},h){f.if((0,n._)`${_} !== undefined`,()=>f.assign((0,n._)`${_}[${b}]`,h))}function p(f,_,b,h=a.Correct){const I=h===a.Correct?n.operators.EQ:n.operators.NEQ;let O;switch(f){case"null":return(0,n._)`${_} ${I} null`;case"array":O=(0,n._)`Array.isArray(${_})`;break;case"object":O=(0,n._)`${_} && typeof ${_} == "object" && !Array.isArray(${_})`;break;case"integer":O=P((0,n._)`!(${_} % 1) && !isNaN(${_})`);break;case"number":O=P();break;default:return(0,n._)`typeof ${_} ${I} ${f}`}return h===a.Correct?O:(0,n.not)(O);function P(B=n.nil){return(0,n.and)((0,n._)`typeof ${_} == "number"`,B,b?(0,n._)`isFinite(${_})`:n.nil)}}Qt.checkDataType=p;function E(f,_,b,h){if(f.length===1)return p(f[0],_,b,h);let I;const O=(0,i.toHash)(f);if(O.array&&O.object){const P=(0,n._)`typeof ${_} != "object"`;I=O.null?P:(0,n._)`!${_} || ${P}`,delete O.null,delete O.array,delete O.object}else I=n.nil;O.number&&delete O.integer;for(const P in O)I=(0,n.and)(I,p(P,_,b,h));return I}Qt.checkDataTypes=E;const T={message:({schema:f})=>`must be ${f}`,params:({schema:f,schemaValue:_})=>typeof f=="string"?(0,n._)`{type: ${f}}`:(0,n._)`{type: ${_}}`};function S(f){const _=A(f);(0,r.reportError)(_,T)}Qt.reportTypeError=S;function A(f){const{gen:_,data:b,schema:h}=f,I=(0,i.schemaRefOrVal)(f,h,"type");return{gen:_,keyword:"type",data:b,schema:h.type,schemaCode:I,schemaValue:I,parentSchema:h,params:{},it:f}}return Qt}var Ms={},sb;function lU(){if(sb)return Ms;sb=1,Object.defineProperty(Ms,"__esModule",{value:!0}),Ms.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))}Ms.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 m=(0,e._)`${d} === undefined`;c.useDefaults==="empty"&&(m=(0,e._)`${m} || ${d} === null || ${d} === ""`),o.if(m,(0,e._)`${d} = ${(0,e.stringify)(s)}`)}return Ms}var Ur={},Et={},ob;function Qr(){if(ob)return Et;ob=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(f,_){const{gen:b,data:h,it:I}=f;b.if(c(b,h,_,I.opts.ownProperties),()=>{f.setParams({missingProperty:(0,e._)`${_}`},!0),f.error()})}Et.checkReportMissingProp=i;function a({gen:f,data:_,it:{opts:b}},h,I){return(0,e.or)(...h.map(O=>(0,e.and)(c(f,_,O,b.ownProperties),(0,e._)`${I} = ${O}`)))}Et.checkMissingProp=a;function s(f,_){f.setParams({missingProperty:_},!0),f.error()}Et.reportMissingProp=s;function o(f){return f.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}Et.hasPropFunc=o;function u(f,_,b){return(0,e._)`${o(f)}.call(${_}, ${b})`}Et.isOwnProperty=u;function l(f,_,b,h){const I=(0,e._)`${_}${(0,e.getProperty)(b)} !== undefined`;return h?(0,e._)`${I} && ${u(f,_,b)}`:I}Et.propertyInData=l;function c(f,_,b,h){const I=(0,e._)`${_}${(0,e.getProperty)(b)} === undefined`;return h?(0,e.or)(I,(0,e.not)(u(f,_,b))):I}Et.noPropertyInData=c;function d(f){return f?Object.keys(f).filter(_=>_!=="__proto__"):[]}Et.allSchemaProperties=d;function m(f,_){return d(_).filter(b=>!(0,t.alwaysValidSchema)(f,_[b]))}Et.schemaProperties=m;function p({schemaCode:f,data:_,it:{gen:b,topSchemaRef:h,schemaPath:I,errorPath:O},it:P},B,z,Y){const W=Y?(0,e._)`${f}, ${_}, ${h}${I}`:_,U=[[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,O)],[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._)`${B}.call(${z}, ${F})`:(0,e._)`${B}(${F})`}Et.callValidateCode=p;const E=(0,e._)`new RegExp`;function T({gen:f,it:{opts:_}},b){const h=_.unicodeRegExp?"u":"",{regExp:I}=_.code,O=I(b,h);return f.scopeValue("pattern",{key:O.toString(),ref:O,code:(0,e._)`${I.code==="new RegExp"?E:(0,n.useFunc)(f,I)}(${b}, ${h})`})}Et.usePattern=T;function S(f){const{gen:_,data:b,keyword:h,it:I}=f,O=_.name("valid");if(I.allErrors){const B=_.let("valid",!0);return P(()=>_.assign(B,!1)),B}return _.var(O,!0),P(()=>_.break()),O;function P(B){const z=_.const("len",(0,e._)`${b}.length`);_.forRange("i",0,z,Y=>{f.subschema({keyword:h,dataProp:Y,dataPropType:t.Type.Num},O),_.if((0,e.not)(O),B)})}}Et.validateArray=S;function A(f){const{gen:_,schema:b,keyword:h,it:I}=f;if(!Array.isArray(b))throw new Error("ajv implementation error");if(b.some(z=>(0,t.alwaysValidSchema)(I,z))&&!I.opts.unevaluated)return;const P=_.let("valid",!1),B=_.name("_valid");_.block(()=>b.forEach((z,Y)=>{const W=f.subschema({keyword:h,schemaProp:Y,compositeRule:!0},B);_.assign(P,(0,e._)`${P} || ${B}`),f.mergeValidEvaluated(W,B)||_.if((0,e.not)(P))})),f.result(P,()=>f.reset(),()=>f.error(!0))}return Et.validateUnion=A,Et}var ub;function dU(){if(ub)return Ur;ub=1,Object.defineProperty(Ur,"__esModule",{value:!0}),Ur.validateKeywordUsage=Ur.validSchemaType=Ur.funcKeywordCode=Ur.macroKeywordCode=void 0;const e=Ke(),t=Vn(),r=Qr(),n=Ko();function i(m,p){const{gen:E,keyword:T,schema:S,parentSchema:A,it:f}=m,_=p.macro.call(f.self,S,A,f),b=l(E,T,_);f.opts.validateSchema!==!1&&f.self.validateSchema(_,!0);const h=E.name("valid");m.subschema({schema:_,schemaPath:e.nil,errSchemaPath:`${f.errSchemaPath}/${T}`,topSchemaRef:b,compositeRule:!0},h),m.pass(h,()=>m.error(!0))}Ur.macroKeywordCode=i;function a(m,p){var E;const{gen:T,keyword:S,schema:A,parentSchema:f,$data:_,it:b}=m;u(b,p);const h=!_&&p.compile?p.compile.call(b.self,A,f,b):p.validate,I=l(T,S,h),O=T.let("valid");m.block$data(O,P),m.ok((E=p.valid)!==null&&E!==void 0?E:O);function P(){if(p.errors===!1)Y(),p.modifying&&s(m),W(()=>m.error());else{const U=p.async?B():z();p.modifying&&s(m),W(()=>o(m,U))}}function B(){const U=T.let("ruleErrs",null);return T.try(()=>Y((0,e._)`await `),F=>T.assign(O,!1).if((0,e._)`${F} instanceof ${b.ValidationError}`,()=>T.assign(U,(0,e._)`${F}.errors`),()=>T.throw(F))),U}function z(){const U=(0,e._)`${I}.errors`;return T.assign(U,null),Y(e.nil),U}function Y(U=p.async?(0,e._)`await `:e.nil){const F=b.opts.passContext?t.default.this:t.default.self,ce=!("compile"in p&&!_||p.schema===!1);T.assign(O,(0,e._)`${U}${(0,r.callValidateCode)(m,I,F,ce)}`,p.modifying)}function W(U){var F;T.if((0,e.not)((F=p.valid)!==null&&F!==void 0?F:O),U)}}Ur.funcKeywordCode=a;function s(m){const{gen:p,data:E,it:T}=m;p.if(T.parentData,()=>p.assign(E,(0,e._)`${T.parentData}[${T.parentDataProperty}]`))}function o(m,p){const{gen:E}=m;E.if((0,e._)`Array.isArray(${p})`,()=>{E.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${p} : ${t.default.vErrors}.concat(${p})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,n.extendErrors)(m)},()=>m.error())}function u({schemaEnv:m},p){if(p.async&&!m.$async)throw new Error("async keyword in sync schema")}function l(m,p,E){if(E===void 0)throw new Error(`keyword "${p}" failed to compile`);return m.scopeValue("keyword",typeof E=="function"?{ref:E}:{ref:E,code:(0,e.stringify)(E)})}function c(m,p,E=!1){return!p.length||p.some(T=>T==="array"?Array.isArray(m):T==="object"?m&&typeof m=="object"&&!Array.isArray(m):typeof m==T||E&&typeof m>"u")}Ur.validSchemaType=c;function d({schema:m,opts:p,self:E,errSchemaPath:T},S,A){if(Array.isArray(S.keyword)?!S.keyword.includes(A):S.keyword!==A)throw new Error("ajv implementation error");const f=S.dependencies;if(f!=null&&f.some(_=>!Object.prototype.hasOwnProperty.call(m,_)))throw new Error(`parent schema must have dependencies of ${A}: ${f.join(",")}`);if(S.validateSchema&&!S.validateSchema(m[A])){const b=`keyword "${A}" value is invalid at path "${T}": `+E.errorsText(S.validateSchema.errors);if(p.validateSchema==="log")E.logger.error(b);else throw new Error(b)}}return Ur.validateKeywordUsage=d,Ur}var Nn={},cb;function fU(){if(cb)return Nn;cb=1,Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.extendSubschemaMode=Nn.extendSubschemaData=Nn.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 m=a.schema[s];return o===void 0?{schema:m,schemaPath:(0,e._)`${a.schemaPath}${(0,e.getProperty)(s)}`,errSchemaPath:`${a.errSchemaPath}/${s}`}:{schema:m[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')}Nn.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:m}=s;if(o!==void 0){const{errorPath:E,dataPathArr:T,opts:S}=s,A=m.let("data",(0,e._)`${s.data}${(0,e.getProperty)(o)}`,!0);p(A),a.errorPath=(0,e.str)`${E}${(0,t.getErrorPath)(o,u,S.jsPropertySyntax)}`,a.parentDataProperty=(0,e._)`${o}`,a.dataPathArr=[...T,a.parentDataProperty]}if(l!==void 0){const E=l instanceof e.Name?l:m.let("data",l,!0);p(E),d!==void 0&&(a.propertyName=d)}c&&(a.dataTypes=c);function p(E){a.data=E,a.dataLevel=s.dataLevel+1,a.dataTypes=[],s.definedProperties=new Set,a.parentData=s.data,a.dataNames=[...s.dataNames,E]}}Nn.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 Nn.extendSubschemaMode=i,Nn}var fr={},qd,lb;function C_(){return lb||(lb=1,qd=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}),qd}var Bd={exports:{}},db;function pU(){if(db)return Bd.exports;db=1;var e=Bd.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,m){if(s&&typeof s=="object"&&!Array.isArray(s)){i(s,o,u,l,c,d,m);for(var p in s){var E=s[p];if(Array.isArray(E)){if(p in e.arrayKeywords)for(var T=0;T<E.length;T++)t(n,i,a,E[T],o+"/"+p+"/"+T,u,o,p,s,T)}else if(p in e.propsKeywords){if(E&&typeof E=="object")for(var S in E)t(n,i,a,E[S],o+"/"+p+"/"+r(S),u,o,p,s,S)}else(p in e.keywords||n.allKeys&&!(p in e.skipKeywords))&&t(n,i,a,E,o+"/"+p,u,o,p,s)}a(s,o,u,l,c,d,m)}}function r(n){return n.replace(/~/g,"~0").replace(/\//g,"~1")}return Bd.exports}var fb;function zl(){if(fb)return fr;fb=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=C_(),r=pU(),n=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function i(T,S=!0){return typeof T=="boolean"?!0:S===!0?!s(T):S?o(T)<=S:!1}fr.inlineRef=i;const a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function s(T){for(const S in T){if(a.has(S))return!0;const A=T[S];if(Array.isArray(A)&&A.some(s)||typeof A=="object"&&s(A))return!0}return!1}function o(T){let S=0;for(const A in T){if(A==="$ref")return 1/0;if(S++,!n.has(A)&&(typeof T[A]=="object"&&(0,e.eachItem)(T[A],f=>S+=o(f)),S===1/0))return 1/0}return S}function u(T,S="",A){A!==!1&&(S=d(S));const f=T.parse(S);return l(T,f)}fr.getFullPath=u;function l(T,S){return T.serialize(S).split("#")[0]+"#"}fr._getFullPath=l;const c=/#\/?$/;function d(T){return T?T.replace(c,""):""}fr.normalizeId=d;function m(T,S,A){return A=d(A),T.resolve(S,A)}fr.resolveUrl=m;const p=/^[a-z_][-a-z0-9._]*$/i;function E(T,S){if(typeof T=="boolean")return{};const{schemaId:A,uriResolver:f}=this.opts,_=d(T[A]||S),b={"":_},h=u(f,_,!1),I={},O=new Set;return r(T,{allKeys:!0},(z,Y,W,U)=>{if(U===void 0)return;const F=h+Y;let ce=b[U];typeof z[A]=="string"&&(ce=se.call(this,z[A])),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),O.has(X))throw B(X);O.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,I[X],X),I[X]=z):this.refs[X]=F),X}function ne(X){if(typeof X=="string"){if(!p.test(X))throw new Error(`invalid anchor "${X}"`);se.call(this,`#${X}`)}}}),I;function P(z,Y,W){if(Y!==void 0&&!t(z,Y))throw B(W)}function B(z){return new Error(`reference "${z}" resolves to more than one schema`)}}return fr.getSchemaRefs=E,fr}var pb;function Xo(){if(pb)return An;pb=1,Object.defineProperty(An,"__esModule",{value:!0}),An.getData=An.KeywordCxt=An.validateFunctionCode=void 0;const e=cU(),t=Pl(),r=wP(),n=Pl(),i=lU(),a=dU(),s=fU(),o=Ke(),u=Vn(),l=zl(),c=pt(),d=Ko();function m(ie){if(h(ie)&&(O(ie),b(ie))){S(ie);return}p(ie,()=>(0,e.topBoolOrEmptySchema)(ie))}An.validateFunctionCode=m;function p({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"; ${f(fe,Te)}`),T(ie,Te),ie.code(we)}):ie.func(le,(0,o._)`${u.default.data}, ${E(Te)}`,me.$async,()=>ie.code(f(fe,Te)).code(we))}function E(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 T(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 S(ie){const{schema:le,opts:fe,gen:me}=ie;p(ie,()=>{fe.$comment&&le.$comment&&U(ie),z(ie),me.let(u.default.vErrors,null),me.let(u.default.errors,0),fe.unevaluated&&A(ie),P(ie),F(ie)})}function A(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 f(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 _(ie,le){if(h(ie)&&(O(ie),b(ie))){I(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 h(ie){return typeof ie.schema!="boolean"}function I(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 O(ie){(0,c.checkUnknownRules)(ie),B(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 B(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 _(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}}An.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 An.getData=Ie,An}var nc={},mb;function M_(){if(mb)return nc;mb=1,Object.defineProperty(nc,"__esModule",{value:!0});class e extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return nc.default=e,nc}var ic={},hb;function Wl(){if(hb)return ic;hb=1,Object.defineProperty(ic,"__esModule",{value:!0});const e=zl();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 ic.default=t,ic}var Or={},yb;function D_(){if(yb)return Or;yb=1,Object.defineProperty(Or,"__esModule",{value:!0}),Or.resolveSchema=Or.getCompilingSchema=Or.resolveRef=Or.compileSchema=Or.SchemaEnv=void 0;const e=Ke(),t=M_(),r=Vn(),n=zl(),i=pt(),a=Xo();class s{constructor(A){var f;this.refs={},this.dynamicAnchors={};let _;typeof A.schema=="object"&&(_=A.schema),this.schema=A.schema,this.schemaId=A.schemaId,this.root=A.root||this,this.baseId=(f=A.baseId)!==null&&f!==void 0?f:(0,n.normalizeId)(_==null?void 0:_[A.schemaId||"$id"]),this.schemaPath=A.schemaPath,this.localRefs=A.localRefs,this.meta=A.meta,this.$async=_==null?void 0:_.$async,this.refs={}}}Or.SchemaEnv=s;function o(S){const A=c.call(this,S);if(A)return A;const f=(0,n.getFullPath)(this.opts.uriResolver,S.root.baseId),{es5:_,lines:b}=this.opts.code,{ownProperties:h}=this.opts,I=new e.CodeGen(this.scope,{es5:_,lines:b,ownProperties:h});let O;S.$async&&(O=I.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const P=I.scopeName("validate");S.validateName=P;const B={gen:I,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:I.scopeValue("schema",this.opts.code.source===!0?{ref:S.schema,code:(0,e.stringify)(S.schema)}:{ref:S.schema}),validateName:P,ValidationError:O,schema:S.schema,schemaEnv:S,rootId:f,baseId:S.baseId||f,schemaPath:e.nil,errSchemaPath:S.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let z;try{this._compilations.add(S),(0,a.validateFunctionCode)(B),I.optimize(this.opts.code.optimize);const Y=I.toString();z=`${I.scopeRefs(r.default.scope)}return ${Y}`,this.opts.code.process&&(z=this.opts.code.process(z,S));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=S.schema,U.schemaEnv=S,S.$async&&(U.$async=!0),this.opts.code.source===!0&&(U.source={validateName:P,validateCode:Y,scopeValues:I._values}),this.opts.unevaluated){const{props:F,items:ce}=B;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 S.validate=U,S}catch(Y){throw delete S.validate,delete S.validateName,z&&this.logger.error("Error compiling schema, function code:",z),Y}finally{this._compilations.delete(S)}}Or.compileSchema=o;function u(S,A,f){var _;f=(0,n.resolveUrl)(this.opts.uriResolver,A,f);const b=S.refs[f];if(b)return b;let h=m.call(this,S,f);if(h===void 0){const I=(_=S.localRefs)===null||_===void 0?void 0:_[f],{schemaId:O}=this.opts;I&&(h=new s({schema:I,schemaId:O,root:S,baseId:A}))}if(h!==void 0)return S.refs[f]=l.call(this,h)}Or.resolveRef=u;function l(S){return(0,n.inlineRef)(S.schema,this.opts.inlineRefs)?S.schema:S.validate?S:o.call(this,S)}function c(S){for(const A of this._compilations)if(d(A,S))return A}Or.getCompilingSchema=c;function d(S,A){return S.schema===A.schema&&S.root===A.root&&S.baseId===A.baseId}function m(S,A){let f;for(;typeof(f=this.refs[A])=="string";)A=f;return f||this.schemas[A]||p.call(this,S,A)}function p(S,A){const f=this.opts.uriResolver.parse(A),_=(0,n._getFullPath)(this.opts.uriResolver,f);let b=(0,n.getFullPath)(this.opts.uriResolver,S.baseId,void 0);if(Object.keys(S.schema).length>0&&_===b)return T.call(this,f,S);const h=(0,n.normalizeId)(_),I=this.refs[h]||this.schemas[h];if(typeof I=="string"){const O=p.call(this,S,I);return typeof(O==null?void 0:O.schema)!="object"?void 0:T.call(this,f,O)}if(typeof(I==null?void 0:I.schema)=="object"){if(I.validate||o.call(this,I),h===(0,n.normalizeId)(A)){const{schema:O}=I,{schemaId:P}=this.opts,B=O[P];return B&&(b=(0,n.resolveUrl)(this.opts.uriResolver,b,B)),new s({schema:O,schemaId:P,root:S,baseId:b})}return T.call(this,f,I)}}Or.resolveSchema=p;const E=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function T(S,{baseId:A,schema:f,root:_}){var b;if(((b=S.fragment)===null||b===void 0?void 0:b[0])!=="/")return;for(const O of S.fragment.slice(1).split("/")){if(typeof f=="boolean")return;const P=f[(0,i.unescapeFragment)(O)];if(P===void 0)return;f=P;const B=typeof f=="object"&&f[this.opts.schemaId];!E.has(O)&&B&&(A=(0,n.resolveUrl)(this.opts.uriResolver,A,B))}let h;if(typeof f!="boolean"&&f.$ref&&!(0,i.schemaHasRulesButRef)(f,this.RULES)){const O=(0,n.resolveUrl)(this.opts.uriResolver,A,f.$ref);h=p.call(this,_,O)}const{schemaId:I}=this.opts;if(h=h||new s({schema:f,schemaId:I,root:_,baseId:A}),h.schema!==h.root.schema)return h}return Or}const mU="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",hU="Meta-schema for $data reference (JSON AnySchema extension proposal)",yU="object",gU=["$data"],_U={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},EU=!1,vU={$id:mU,description:hU,type:yU,required:gU,properties:_U,additionalProperties:EU};var ac={},Ds={exports:{}},kd,gb;function AP(){if(gb)return kd;gb=1;const e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),t=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),r=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),n=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),i=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function a(h){let I="",O=0,P=0;for(P=0;P<h.length;P++)if(O=h[P].charCodeAt(0),O!==48){if(!(O>=48&&O<=57||O>=65&&O<=70||O>=97&&O<=102))return"";I+=h[P];break}for(P+=1;P<h.length;P++){if(O=h[P].charCodeAt(0),!(O>=48&&O<=57||O>=65&&O<=70||O>=97&&O<=102))return"";I+=h[P]}return I}const s=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function o(h){return h.length=0,!0}function u(h,I,O){if(h.length){const P=a(h);if(P!=="")I.push(P);else return O.error=!0,!1;h.length=0}return!0}function l(h){let I=0;const O={error:!1,address:"",zone:""},P=[],B=[];let z=!1,Y=!1,W=u;for(let U=0;U<h.length;U++){const F=h[U];if(!(F==="["||F==="]"))if(F===":"){if(z===!0&&(Y=!0),!W(B,P,O))break;if(++I>7){O.error=!0;break}U>0&&h[U-1]===":"&&(z=!0),P.push(":");continue}else if(F==="%"){if(!W(B,P,O))break;W=o}else{B.push(F);continue}}return B.length&&(W===o?O.zone=B.join(""):Y?P.push(B.join("")):P.push(a(B))),O.address=P.join(""),O}function c(h){if(d(h,":")<2)return{host:h,isIPV6:!1};const I=l(h);if(I.error)return{host:h,isIPV6:!1};{let O=I.address,P=I.address;return I.zone&&(O+="%"+I.zone,P+="%25"+I.zone),{host:O,isIPV6:!0,escapedHost:P}}}function d(h,I){let O=0;for(let P=0;P<h.length;P++)h[P]===I&&O++;return O}function m(h){let I=h;const O=[];let P=-1,B=0;for(;B=I.length;){if(B===1){if(I===".")break;if(I==="/"){O.push("/");break}else{O.push(I);break}}else if(B===2){if(I[0]==="."){if(I[1]===".")break;if(I[1]==="/"){I=I.slice(2);continue}}else if(I[0]==="/"&&(I[1]==="."||I[1]==="/")){O.push("/");break}}else if(B===3&&I==="/.."){O.length!==0&&O.pop(),O.push("/");break}if(I[0]==="."){if(I[1]==="."){if(I[2]==="/"){I=I.slice(3);continue}}else if(I[1]==="/"){I=I.slice(2);continue}}else if(I[0]==="/"&&I[1]==="."){if(I[2]==="/"){I=I.slice(2);continue}else if(I[2]==="."&&I[3]==="/"){I=I.slice(3),O.length!==0&&O.pop();continue}}if((P=I.indexOf("/",1))===-1){O.push(I);break}else O.push(I.slice(0,P)),I=I.slice(P)}return O.join("")}const p={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},E=/[@/?#:]/g,T=/[@/?#]/g;function S(h,I){const O=I?T:E;return O.lastIndex=0,h.replace(O,P=>p[P])}function A(h,I=!1){if(h.indexOf("%")===-1)return h;let O="";for(let P=0;P<h.length;P++){if(h[P]==="%"&&P+2<h.length){const B=h.slice(P+1,P+3);if(r(B)){const z=B.toUpperCase(),Y=String.fromCharCode(parseInt(z,16));I&&n(Y)?O+=Y:O+="%"+z,P+=2;continue}}O+=h[P]}return O}function f(h){let I="";for(let O=0;O<h.length;O++){if(h[O]==="%"&&O+2<h.length){const P=h.slice(O+1,O+3);if(r(P)){const B=P.toUpperCase(),z=String.fromCharCode(parseInt(B,16));z!=="."&&n(z)?I+=z:I+="%"+B,O+=2;continue}}i(h[O])?I+=h[O]:I+=escape(h[O])}return I}function _(h){let I="";for(let O=0;O<h.length;O++){if(h[O]==="%"&&O+2<h.length){const P=h.slice(O+1,O+3);if(r(P)){I+="%"+P.toUpperCase(),O+=2;continue}}I+=escape(h[O])}return I}function b(h){const I=[];if(h.userinfo!==void 0&&(I.push(h.userinfo),I.push("@")),h.host!==void 0){let O=unescape(h.host);if(!t(O)){const P=c(O);P.isIPV6===!0?O=`[${P.escapedHost}]`:O=S(O,!1)}I.push(O)}return(typeof h.port=="number"||typeof h.port=="string")&&(I.push(":"),I.push(String(h.port))),I.length?I.join(""):void 0}return kd={nonSimpleDomain:s,recomposeAuthority:b,reescapeHostDelimiters:S,normalizePercentEncoding:A,normalizePathEncoding:f,escapePreservingEscapes:_,removeDotSegments:m,isIPv4:t,isUUID:e,normalizeIPv6:c,stringArrayToHexStripped:a},kd}var Ud,_b;function bU(){if(_b)return Ud;_b=1;const{isUUID:e}=AP(),t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,r=["http","https","ws","wss","urn","urn:uuid"];function n(h){return r.indexOf(h)!==-1}function i(h){return h.secure===!0?!0:h.secure===!1?!1:h.scheme?h.scheme.length===3&&(h.scheme[0]==="w"||h.scheme[0]==="W")&&(h.scheme[1]==="s"||h.scheme[1]==="S")&&(h.scheme[2]==="s"||h.scheme[2]==="S"):!1}function a(h){return h.host||(h.error=h.error||"HTTP URIs must have a host."),h}function s(h){const I=String(h.scheme).toLowerCase()==="https";return(h.port===(I?443:80)||h.port==="")&&(h.port=void 0),h.path||(h.path="/"),h}function o(h){return h.secure=i(h),h.resourceName=(h.path||"/")+(h.query?"?"+h.query:""),h.path=void 0,h.query=void 0,h}function u(h){if((h.port===(i(h)?443:80)||h.port==="")&&(h.port=void 0),typeof h.secure=="boolean"&&(h.scheme=h.secure?"wss":"ws",h.secure=void 0),h.resourceName){const[I,O]=h.resourceName.split("?");h.path=I&&I!=="/"?I:void 0,h.query=O,h.resourceName=void 0}return h.fragment=void 0,h}function l(h,I){if(!h.path)return h.error="URN can not be parsed",h;const O=h.path.match(t);if(O){const P=I.scheme||h.scheme||"urn";h.nid=O[1].toLowerCase(),h.nss=O[2];const B=`${P}:${I.nid||h.nid}`,z=b(B);h.path=void 0,z&&(h=z.parse(h,I))}else h.error=h.error||"URN can not be parsed.";return h}function c(h,I){if(h.nid===void 0)throw new Error("URN without nid cannot be serialized");const O=I.scheme||h.scheme||"urn",P=h.nid.toLowerCase(),B=`${O}:${I.nid||P}`,z=b(B);z&&(h=z.serialize(h,I));const Y=h,W=h.nss;return Y.path=`${P||I.nid}:${W}`,I.skipEscape=!0,Y}function d(h,I){const O=h;return O.uuid=O.nss,O.nss=void 0,!I.tolerant&&(!O.uuid||!e(O.uuid))&&(O.error=O.error||"UUID is not valid."),O}function m(h){const I=h;return I.nss=(h.uuid||"").toLowerCase(),I}const p={scheme:"http",domainHost:!0,parse:a,serialize:s},E={scheme:"https",domainHost:p.domainHost,parse:a,serialize:s},T={scheme:"ws",domainHost:!0,parse:o,serialize:u},S={scheme:"wss",domainHost:T.domainHost,parse:T.parse,serialize:T.serialize},_={http:p,https:E,ws:T,wss:S,urn:{scheme:"urn",parse:l,serialize:c,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:d,serialize:m,skipNormalize:!0}};Object.setPrototypeOf(_,null);function b(h){return h&&(_[h]||_[h.toLowerCase()])||void 0}return Ud={wsIsSecure:i,SCHEMES:_,isValidSchemeName:n,getSchemeHandler:b},Ud}var Eb;function TU(){if(Eb)return Ds.exports;Eb=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:r,normalizePercentEncoding:n,normalizePathEncoding:i,escapePreservingEscapes:a,reescapeHostDelimiters:s,isIPv4:o,nonSimpleDomain:u}=AP(),{SCHEMES:l,getSchemeHandler:c}=bU();function d(P,B){return typeof P=="string"?P=b(P,B):typeof P=="object"&&(P=_(T(P,B),B)),P}function m(P,B,z){const Y=z?Object.assign({scheme:"null"},z):{scheme:"null"},W=p(_(P,Y),_(B,Y),Y,!0);return Y.skipEscape=!0,T(W,Y)}function p(P,B,z,Y){const W={};return Y||(P=_(T(P,z),z),B=_(T(B,z),z)),z=z||{},!z.tolerant&&B.scheme?(W.scheme=B.scheme,W.userinfo=B.userinfo,W.host=B.host,W.port=B.port,W.path=t(B.path||""),W.query=B.query):(B.userinfo!==void 0||B.host!==void 0||B.port!==void 0?(W.userinfo=B.userinfo,W.host=B.host,W.port=B.port,W.path=t(B.path||""),W.query=B.query):(B.path?(B.path[0]==="/"?W.path=t(B.path):((P.userinfo!==void 0||P.host!==void 0||P.port!==void 0)&&!P.path?W.path="/"+B.path:P.path?W.path=P.path.slice(0,P.path.lastIndexOf("/")+1)+B.path:W.path=B.path,W.path=t(W.path)),W.query=B.query):(W.path=P.path,B.query!==void 0?W.query=B.query:W.query=P.query),W.userinfo=P.userinfo,W.host=P.host,W.port=P.port),W.scheme=P.scheme),W.fragment=B.fragment,W}function E(P,B,z){const Y=I(P,z),W=I(B,z);return Y!==void 0&&W!==void 0&&Y.toLowerCase()===W.toLowerCase()}function T(P,B){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({},B),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 S=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function A(P,B){if(B[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 f(P,B){const z=Object.assign({},B),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(S);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=A(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 _(P,B){return f(P,B).parsed}function b(P,B){return h(P,B).normalized}function h(P,B){const{parsed:z,malformedAuthorityOrPort:Y}=f(P,B);return{normalized:Y?P:T(z,B),malformedAuthorityOrPort:Y}}function I(P,B){if(typeof P=="string"){const{normalized:z,malformedAuthorityOrPort:Y}=h(P,B);return Y?void 0:z}if(typeof P=="object")return T(P,B)}const O={SCHEMES:l,normalize:d,resolve:m,resolveComponent:p,equal:E,serialize:T,parse:_};return Ds.exports=O,Ds.exports.default=O,Ds.exports.fastUri=O,Ds.exports}var vb;function SU(){if(vb)return ac;vb=1,Object.defineProperty(ac,"__esModule",{value:!0});const e=TU();return e.code='require("ajv/dist/runtime/uri").default',ac.default=e,ac}var bb;function IU(){return bb||(bb=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=Xo();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=M_(),i=Wl(),a=RP(),s=D_(),o=Ke(),u=zl(),l=Pl(),c=pt(),d=vU,m=SU(),p=(L,D)=>new RegExp(L,D);p.code="new RegExp";const E=["removeAdditional","useDefaults","coerceTypes"],T=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),S={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."},A={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},f=200;function _(L){var D,$,V,N,j,Z,Ee,_e,Se,Ie,ie,le,fe,me,Te,we,Fe,xe,tt,Xe,ut,$t,vt,Gt,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:p,M=(N=L.uriResolver)!==null&&N!==void 0?N:m.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:f,loopEnum:(we=L.loopEnum)!==null&&we!==void 0?we:f,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:(Gt=L.unicodeRegExp)!==null&&Gt!==void 0?Gt:!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,..._(D)};const{es5:$,lines:V}=this.opts.code;this.scope=new o.ValueScope({scope:{},prefixes:T,es5:$,lines:V}),this.logger=W(D.logger);const N=D.validateFormats;D.validateFormats=!1,this.RULES=(0,a.getRules)(),h.call(this,S,D,"NOT SUPPORTED"),h.call(this,A,D,"DEPRECATED","warn"),this._metaOpts=z.call(this),D.formats&&P.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),D.keywords&&B.call(this,D.keywords),typeof D.meta=="object"&&this.addMetaSchema(D.meta),O.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($=I.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 $=I.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 h(L,D,$,V="error"){for(const N in L){const j=N;j in D&&this.logger[V](`${$}: option ${N}. ${L[j]}`)}}function I(L){return L=(0,u.normalizeId)(L),this.schemas[L]||this.refs[L]}function O(){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 B(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 E)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]}}})(Md)),Md}var sc={},oc={},uc={},Tb;function RU(){if(Tb)return uc;Tb=1,Object.defineProperty(uc,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return uc.default=e,uc}var Kn={},Sb;function wU(){if(Sb)return Kn;Sb=1,Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.callRef=Kn.getValidate=void 0;const e=Wl(),t=Qr(),r=Ke(),n=Vn(),i=D_(),a=pt(),s={keyword:"$ref",schemaType:"string",code(l){const{gen:c,schema:d,it:m}=l,{baseId:p,schemaEnv:E,validateName:T,opts:S,self:A}=m,{root:f}=E;if((d==="#"||d==="#/")&&p===f.baseId)return b();const _=i.resolveRef.call(A,f,p,d);if(_===void 0)throw new e.default(m.opts.uriResolver,p,d);if(_ instanceof i.SchemaEnv)return h(_);return I(_);function b(){if(E===f)return u(l,T,E,E.$async);const O=c.scopeValue("root",{ref:f});return u(l,(0,r._)`${O}.validate`,f,f.$async)}function h(O){const P=o(l,O);u(l,P,O,O.$async)}function I(O){const P=c.scopeValue("schema",S.code.source===!0?{ref:O,code:(0,r.stringify)(O)}:{ref:O}),B=c.name("valid"),z=l.subschema({schema:O,dataTypes:[],schemaPath:r.nil,topSchemaRef:P,errSchemaPath:d},B);l.mergeEvaluated(z),l.ok(B)}}};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,m){const{gen:p,it:E}=l,{allErrors:T,schemaEnv:S,opts:A}=E,f=A.passContext?n.default.this:r.nil;m?_():b();function _(){if(!S.$async)throw new Error("async schema referenced by sync schema");const O=p.let("valid");p.try(()=>{p.code((0,r._)`await ${(0,t.callValidateCode)(l,c,f)}`),I(c),T||p.assign(O,!0)},P=>{p.if((0,r._)`!(${P} instanceof ${E.ValidationError})`,()=>p.throw(P)),h(P),T||p.assign(O,!1)}),l.ok(O)}function b(){l.result((0,t.callValidateCode)(l,c,f),()=>I(c),()=>h(c))}function h(O){const P=(0,r._)`${O}.errors`;p.assign(n.default.vErrors,(0,r._)`${n.default.vErrors} === null ? ${P} : ${n.default.vErrors}.concat(${P})`),p.assign(n.default.errors,(0,r._)`${n.default.vErrors}.length`)}function I(O){var P;if(!E.opts.unevaluated)return;const B=(P=d==null?void 0:d.validate)===null||P===void 0?void 0:P.evaluated;if(E.props!==!0)if(B&&!B.dynamicProps)B.props!==void 0&&(E.props=a.mergeEvaluated.props(p,B.props,E.props));else{const z=p.var("props",(0,r._)`${O}.evaluated.props`);E.props=a.mergeEvaluated.props(p,z,E.props,r.Name)}if(E.items!==!0)if(B&&!B.dynamicItems)B.items!==void 0&&(E.items=a.mergeEvaluated.items(p,B.items,E.items));else{const z=p.var("items",(0,r._)`${O}.evaluated.items`);E.items=a.mergeEvaluated.items(p,z,E.items,r.Name)}}}return Kn.callRef=u,Kn.default=s,Kn}var Ib;function AU(){if(Ib)return oc;Ib=1,Object.defineProperty(oc,"__esModule",{value:!0});const e=RU(),t=wU(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return oc.default=r,oc}var cc={},lc={},Rb;function OU(){if(Rb)return lc;Rb=1,Object.defineProperty(lc,"__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 lc.default=i,lc}var dc={},wb;function NU(){if(wb)return dc;wb=1,Object.defineProperty(dc,"__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 dc.default=r,dc}var fc={},pc={},Ab;function PU(){if(Ab)return pc;Ab=1,Object.defineProperty(pc,"__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 pc.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',pc}var Ob;function CU(){if(Ob)return fc;Ob=1,Object.defineProperty(fc,"__esModule",{value:!0});const e=Ke(),t=pt(),r=PU(),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 fc.default=i,fc}var mc={},Nb;function MU(){if(Nb)return mc;Nb=1,Object.defineProperty(mc,"__esModule",{value:!0});const e=Qr(),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,m=d.opts.unicodeRegExp?"u":"";if(u){const{regExp:p}=d.opts.code,E=p.code==="new RegExp"?(0,r._)`new RegExp`:(0,t.useFunc)(s,p),T=s.let("valid");s.try(()=>s.assign(T,(0,r._)`${E}(${c}, ${m}).test(${o})`),()=>s.assign(T,!1)),a.fail$data((0,r._)`!${T}`)}else{const p=(0,e.usePattern)(a,l);a.fail$data((0,r._)`!${p}.test(${o})`)}}};return mc.default=i,mc}var hc={},Pb;function DU(){if(Pb)return hc;Pb=1,Object.defineProperty(hc,"__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 hc.default=r,hc}var yc={},Cb;function jU(){if(Cb)return yc;Cb=1,Object.defineProperty(yc,"__esModule",{value:!0});const e=Qr(),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:m}=d;if(!c&&o.length===0)return;const p=o.length>=m.loopRequired;if(d.allErrors?E():T(),m.strictRequired){const f=a.parentSchema.properties,{definedProperties:_}=a.it;for(const b of o)if((f==null?void 0:f[b])===void 0&&!_.has(b)){const h=d.schemaEnv.baseId+d.errSchemaPath,I=`required property "${b}" is not defined at "${h}" (strictRequired)`;(0,r.checkStrictMode)(d,I,d.opts.strictRequired)}}function E(){if(p||c)a.block$data(t.nil,S);else for(const f of o)(0,e.checkReportMissingProp)(a,f)}function T(){const f=s.let("missing");if(p||c){const _=s.let("valid",!0);a.block$data(_,()=>A(f,_)),a.ok(_)}else s.if((0,e.checkMissingProp)(a,o,f)),(0,e.reportMissingProp)(a,f),s.else()}function S(){s.forOf("prop",u,f=>{a.setParams({missingProperty:f}),s.if((0,e.noPropertyInData)(s,l,f,m.ownProperties),()=>a.error())})}function A(f,_){a.setParams({missingProperty:f}),s.forOf(f,u,()=>{s.assign(_,(0,e.propertyInData)(s,l,f,m.ownProperties)),s.if((0,t.not)(_),()=>{a.error(),s.break()})},t.nil)}}};return yc.default=i,yc}var gc={},Mb;function LU(){if(Mb)return gc;Mb=1,Object.defineProperty(gc,"__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 gc.default=r,gc}var _c={},Ec={},Db;function j_(){if(Db)return Ec;Db=1,Object.defineProperty(Ec,"__esModule",{value:!0});const e=C_();return e.code='require("ajv/dist/runtime/equal").default',Ec.default=e,Ec}var jb;function $U(){if(jb)return _c;jb=1,Object.defineProperty(_c,"__esModule",{value:!0});const e=Pl(),t=Ke(),r=pt(),n=j_(),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:m,it:p}=s;if(!l&&!c)return;const E=o.let("valid"),T=d.items?(0,e.getSchemaTypes)(d.items):[];s.block$data(E,S,(0,t._)`${m} === false`),s.ok(E);function S(){const b=o.let("i",(0,t._)`${u}.length`),h=o.let("j");s.setParams({i:b,j:h}),o.assign(E,!0),o.if((0,t._)`${b} > 1`,()=>(A()?f:_)(b,h))}function A(){return T.length>0&&!T.some(b=>b==="object"||b==="array")}function f(b,h){const I=o.name("item"),O=(0,e.checkDataTypes)(T,I,p.opts.strictNumbers,e.DataType.Wrong),P=o.const("indices",(0,t._)`{}`);o.for((0,t._)`;${b}--;`,()=>{o.let(I,(0,t._)`${u}[${b}]`),o.if(O,(0,t._)`continue`),T.length>1&&o.if((0,t._)`typeof ${I} == "string"`,(0,t._)`${I} += "_"`),o.if((0,t._)`typeof ${P}[${I}] == "number"`,()=>{o.assign(h,(0,t._)`${P}[${I}]`),s.error(),o.assign(E,!1).break()}).code((0,t._)`${P}[${I}] = ${b}`)})}function _(b,h){const I=(0,r.useFunc)(o,n.default),O=o.name("outer");o.label(O).for((0,t._)`;${b}--;`,()=>o.for((0,t._)`${h} = ${b}; ${h}--;`,()=>o.if((0,t._)`${I}(${u}[${b}], ${u}[${h}])`,()=>{s.error(),o.assign(E,!1).break(O)})))}}};return _c.default=a,_c}var vc={},Lb;function qU(){if(Lb)return vc;Lb=1,Object.defineProperty(vc,"__esModule",{value:!0});const e=Ke(),t=pt(),r=j_(),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 vc.default=i,vc}var bc={},$b;function BU(){if($b)return bc;$b=1,Object.defineProperty(bc,"__esModule",{value:!0});const e=Ke(),t=pt(),r=j_(),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 m=l.length>=d.opts.loopEnum;let p;const E=()=>p??(p=(0,t.useFunc)(s,r.default));let T;if(m||u)T=s.let("valid"),a.block$data(T,S);else{if(!Array.isArray(l))throw new Error("ajv implementation error");const f=s.const("vSchema",c);T=(0,e.or)(...l.map((_,b)=>A(f,b)))}a.pass(T);function S(){s.assign(T,!1),s.forOf("v",c,f=>s.if((0,e._)`${E()}(${o}, ${f})`,()=>s.assign(T,!0).break()))}function A(f,_){const b=l[_];return typeof b=="object"&&b!==null?(0,e._)`${E()}(${o}, ${f}[${_}])`:(0,e._)`${o} === ${b}`}}};return bc.default=i,bc}var qb;function kU(){if(qb)return cc;qb=1,Object.defineProperty(cc,"__esModule",{value:!0});const e=OU(),t=NU(),r=CU(),n=MU(),i=DU(),a=jU(),s=LU(),o=$U(),u=qU(),l=BU(),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 cc.default=c,cc}var Tc={},Ma={},Bb;function OP(){if(Bb)return Ma;Bb=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 m=o.const("len",(0,e._)`${l}.length`);if(u===!1)a.setParams({len:s.length}),a.pass((0,e._)`${m} <= ${s.length}`);else if(typeof u=="object"&&!(0,t.alwaysValidSchema)(d,u)){const E=o.var("valid",(0,e._)`${m} <= ${s.length}`);o.if((0,e.not)(E),()=>p(E)),a.ok(E)}function p(E){o.forRange("i",s.length,m,T=>{a.subschema({keyword:c,dataProp:T,dataPropType:t.Type.Num},E),d.allErrors||o.if((0,e.not)(E),()=>o.break())})}}return Ma.validateAdditionalItems=i,Ma.default=n,Ma}var Sc={},Da={},kb;function NP(){if(kb)return Da;kb=1,Object.defineProperty(Da,"__esModule",{value:!0}),Da.validateTuple=void 0;const e=Ke(),t=pt(),r=Qr(),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:m}=a;T(l),m.opts.unevaluated&&o.length&&m.items!==!0&&(m.items=t.mergeEvaluated.items(u,o.length,m.items));const p=u.name("valid"),E=u.const("len",(0,e._)`${c}.length`);o.forEach((S,A)=>{(0,t.alwaysValidSchema)(m,S)||(u.if((0,e._)`${E} > ${A}`,()=>a.subschema({keyword:d,schemaProp:A,dataProp:A},p)),a.ok(p))});function T(S){const{opts:A,errSchemaPath:f}=m,_=o.length,b=_===S.minItems&&(_===S.maxItems||S[s]===!1);if(A.strictTuples&&!b){const h=`"${d}" is ${_}-tuple, but minItems or maxItems/${s} are not specified or different at path "${f}"`;(0,t.checkStrictMode)(m,h,A.strictTuples)}}}return Da.validateTuple=i,Da.default=n,Da}var Ub;function UU(){if(Ub)return Sc;Ub=1,Object.defineProperty(Sc,"__esModule",{value:!0});const e=NP(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,e.validateTuple)(r,"items")};return Sc.default=t,Sc}var Ic={},Fb;function FU(){if(Fb)return Ic;Fb=1,Object.defineProperty(Ic,"__esModule",{value:!0});const e=Ke(),t=pt(),r=Qr(),n=OP(),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 Ic.default=a,Ic}var Rc={},Hb;function HU(){if(Hb)return Rc;Hb=1,Object.defineProperty(Rc,"__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:m,maxContains:p}=o;l.opts.next?(c=m===void 0?1:m,d=p):c=1;const E=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 _=(0,e._)`${E} >= ${c}`;d!==void 0&&(_=(0,e._)`${_} && ${E} <= ${d}`),i.pass(_);return}l.items=!0;const T=a.name("valid");d===void 0&&c===1?A(T,()=>a.if(T,()=>a.break())):c===0?(a.let(T,!0),d!==void 0&&a.if((0,e._)`${u}.length > 0`,S)):(a.let(T,!1),S()),i.result(T,()=>i.reset());function S(){const _=a.name("_valid"),b=a.let("count",0);A(_,()=>a.if(_,()=>f(b)))}function A(_,b){a.forRange("i",0,E,h=>{i.subschema({keyword:"contains",dataProp:h,dataPropType:t.Type.Num,compositeRule:!0},_),b()})}function f(_){a.code((0,e._)`${_}++`),d===void 0?a.if((0,e._)`${_} >= ${c}`,()=>a.assign(T,!0).break()):(a.if((0,e._)`${_} > ${d}`,()=>a.assign(T,!1).break()),c===1?a.assign(T,!0):a.if((0,e._)`${_} >= ${c}`,()=>a.assign(T,!0)))}}};return Rc.default=n,Rc}var Fd={},Vb;function VU(){return Vb||(Vb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=Ke(),r=pt(),n=Qr();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 m=Array.isArray(u[d])?l:c;m[d]=u[d]}return[l,c]}function s(u,l=u.schema){const{gen:c,data:d,it:m}=u;if(Object.keys(l).length===0)return;const p=c.let("missing");for(const E in l){const T=l[E];if(T.length===0)continue;const S=(0,n.propertyInData)(c,d,E,m.opts.ownProperties);u.setParams({property:E,depsCount:T.length,deps:T.join(", ")}),m.allErrors?c.if(S,()=>{for(const A of T)(0,n.checkReportMissingProp)(u,A)}):(c.if((0,t._)`${S} && (${(0,n.checkMissingProp)(u,T,p)})`),(0,n.reportMissingProp)(u,p),c.else())}}e.validatePropertyDeps=s;function o(u,l=u.schema){const{gen:c,data:d,keyword:m,it:p}=u,E=c.name("valid");for(const T in l)(0,r.alwaysValidSchema)(p,l[T])||(c.if((0,n.propertyInData)(c,d,T,p.opts.ownProperties),()=>{const S=u.subschema({keyword:m,schemaProp:T},E);u.mergeValidEvaluated(S,E)},()=>c.var(E,!0)),u.ok(E))}e.validateSchemaDeps=o,e.default=i})(Fd)),Fd}var wc={},Gb;function GU(){if(Gb)return wc;Gb=1,Object.defineProperty(wc,"__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 wc.default=n,wc}var Ac={},zb;function PP(){if(zb)return Ac;zb=1,Object.defineProperty(Ac,"__esModule",{value:!0});const e=Qr(),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:m}=s;if(!d)throw new Error("ajv implementation error");const{allErrors:p,opts:E}=m;if(m.props=!0,E.removeAdditional!=="all"&&(0,n.alwaysValidSchema)(m,u))return;const T=(0,e.allSchemaProperties)(l.properties),S=(0,e.allSchemaProperties)(l.patternProperties);A(),s.ok((0,t._)`${d} === ${r.default.errors}`);function A(){o.forIn("key",c,I=>{!T.length&&!S.length?b(I):o.if(f(I),()=>b(I))})}function f(I){let O;if(T.length>8){const P=(0,n.schemaRefOrVal)(m,l.properties,"properties");O=(0,e.isOwnProperty)(o,P,I)}else T.length?O=(0,t.or)(...T.map(P=>(0,t._)`${I} === ${P}`)):O=t.nil;return S.length&&(O=(0,t.or)(O,...S.map(P=>(0,t._)`${(0,e.usePattern)(s,P)}.test(${I})`))),(0,t.not)(O)}function _(I){o.code((0,t._)`delete ${c}[${I}]`)}function b(I){if(E.removeAdditional==="all"||E.removeAdditional&&u===!1){_(I);return}if(u===!1){s.setParams({additionalProperty:I}),s.error(),p||o.break();return}if(typeof u=="object"&&!(0,n.alwaysValidSchema)(m,u)){const O=o.name("valid");E.removeAdditional==="failing"?(h(I,O,!1),o.if((0,t.not)(O),()=>{s.reset(),_(I)})):(h(I,O),p||o.if((0,t.not)(O),()=>o.break()))}}function h(I,O,P){const B={keyword:"additionalProperties",dataProp:I,dataPropType:n.Type.Str};P===!1&&Object.assign(B,{compositeRule:!0,createErrors:!1,allErrors:!1}),s.subschema(B,O)}}};return Ac.default=a,Ac}var Oc={},Wb;function zU(){if(Wb)return Oc;Wb=1,Object.defineProperty(Oc,"__esModule",{value:!0});const e=Xo(),t=Qr(),r=pt(),n=PP(),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 S of d)c.definedProperties.add(S);c.opts.unevaluated&&d.length&&c.props!==!0&&(c.props=r.mergeEvaluated.props(s,(0,r.toHash)(d),c.props));const m=d.filter(S=>!(0,r.alwaysValidSchema)(c,o[S]));if(m.length===0)return;const p=s.name("valid");for(const S of m)E(S)?T(S):(s.if((0,t.propertyInData)(s,l,S,c.opts.ownProperties)),T(S),c.allErrors||s.else().var(p,!0),s.endIf()),a.it.definedProperties.add(S),a.ok(p);function E(S){return c.opts.useDefaults&&!c.compositeRule&&o[S].default!==void 0}function T(S){a.subschema({keyword:"properties",schemaProp:S,dataProp:S},p)}}};return Oc.default=i,Oc}var Nc={},Yb;function WU(){if(Yb)return Nc;Yb=1,Object.defineProperty(Nc,"__esModule",{value:!0});const e=Qr(),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,m=(0,e.allSchemaProperties)(o),p=m.filter(b=>(0,r.alwaysValidSchema)(c,o[b]));if(m.length===0||p.length===m.length&&(!c.opts.unevaluated||c.props===!0))return;const E=d.strictSchema&&!d.allowMatchingProperties&&l.properties,T=s.name("valid");c.props!==!0&&!(c.props instanceof t.Name)&&(c.props=(0,n.evaluatedPropsToName)(s,c.props));const{props:S}=c;A();function A(){for(const b of m)E&&f(b),c.allErrors?_(b):(s.var(T,!0),_(b),s.if(T))}function f(b){for(const h in E)new RegExp(b).test(h)&&(0,r.checkStrictMode)(c,`property ${h} matches pattern ${b} (use allowMatchingProperties)`)}function _(b){s.forIn("key",u,h=>{s.if((0,t._)`${(0,e.usePattern)(a,b)}.test(${h})`,()=>{const I=p.includes(b);I||a.subschema({keyword:"patternProperties",schemaProp:b,dataProp:h,dataPropType:n.Type.Str},T),c.opts.unevaluated&&S!==!0?s.assign((0,t._)`${S}[${h}]`,!0):!I&&!c.allErrors&&s.if((0,t.not)(T),()=>s.break())})})}}};return Nc.default=i,Nc}var Pc={},xb;function YU(){if(xb)return Pc;xb=1,Object.defineProperty(Pc,"__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 Pc.default=t,Pc}var Cc={},Kb;function xU(){if(Kb)return Cc;Kb=1,Object.defineProperty(Cc,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Qr().validateUnion,error:{message:"must match a schema in anyOf"}};return Cc.default=t,Cc}var Mc={},Xb;function KU(){if(Xb)return Mc;Xb=1,Object.defineProperty(Mc,"__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),m=a.name("_valid");i.setParams({passing:d}),a.block(p),i.result(c,()=>i.reset(),()=>i.error(!0));function p(){l.forEach((E,T)=>{let S;(0,t.alwaysValidSchema)(u,E)?a.var(m,!0):S=i.subschema({keyword:"oneOf",schemaProp:T,compositeRule:!0},m),T>0&&a.if((0,e._)`${m} && ${c}`).assign(c,!1).assign(d,(0,e._)`[${d}, ${T}]`).else(),a.if(m,()=>{a.assign(c,!0),a.assign(d,T),S&&i.mergeEvaluated(S,e.Name)})})}}};return Mc.default=n,Mc}var Dc={},Jb;function XU(){if(Jb)return Dc;Jb=1,Object.defineProperty(Dc,"__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 Dc.default=t,Dc}var jc={},Qb;function JU(){if(Qb)return jc;Qb=1,Object.defineProperty(jc,"__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),m=s.name("_valid");if(p(),a.reset(),l&&c){const T=s.let("ifClause");a.setParams({ifClause:T}),s.if(m,E("then",T),E("else",T))}else l?s.if(m,E("then")):s.if((0,e.not)(m),E("else"));a.pass(d,()=>a.error(!0));function p(){const T=a.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},m);a.mergeEvaluated(T)}function E(T,S){return()=>{const A=a.subschema({keyword:T},m);s.assign(d,m),a.mergeValidEvaluated(A,d),S?s.assign(S,(0,e._)`${T}`):a.setParams({ifClause:T})}}}};function i(a,s){const o=a.schema[s];return o!==void 0&&!(0,t.alwaysValidSchema)(a,o)}return jc.default=n,jc}var Lc={},Zb;function QU(){if(Zb)return Lc;Zb=1,Object.defineProperty(Lc,"__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 Lc.default=t,Lc}var e0;function ZU(){if(e0)return Tc;e0=1,Object.defineProperty(Tc,"__esModule",{value:!0});const e=OP(),t=UU(),r=NP(),n=FU(),i=HU(),a=VU(),s=GU(),o=PP(),u=zU(),l=WU(),c=YU(),d=xU(),m=KU(),p=XU(),E=JU(),T=QU();function S(A=!1){const f=[c.default,d.default,m.default,p.default,E.default,T.default,s.default,o.default,a.default,u.default,l.default];return A?f.push(t.default,n.default):f.push(e.default,r.default),f.push(i.default),f}return Tc.default=S,Tc}var $c={},qc={},t0;function e2(){if(t0)return qc;t0=1,Object.defineProperty(qc,"__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:m,schemaEnv:p,self:E}=c;if(!d.validateFormats)return;o?T():S();function T(){const A=a.scopeValue("formats",{ref:E.formats,code:d.code.formats}),f=a.const("fDef",(0,e._)`${A}[${l}]`),_=a.let("fType"),b=a.let("format");a.if((0,e._)`typeof ${f} == "object" && !(${f} instanceof RegExp)`,()=>a.assign(_,(0,e._)`${f}.type || "string"`).assign(b,(0,e._)`${f}.validate`),()=>a.assign(_,(0,e._)`"string"`).assign(b,f)),n.fail$data((0,e.or)(h(),I()));function h(){return d.strictSchema===!1?e.nil:(0,e._)`${l} && !${b}`}function I(){const O=p.$async?(0,e._)`(${f}.async ? await ${b}(${s}) : ${b}(${s}))`:(0,e._)`${b}(${s})`,P=(0,e._)`(typeof ${b} == "function" ? ${O} : ${b}.test(${s}))`;return(0,e._)`${b} && ${b} !== true && ${_} === ${i} && !${P}`}}function S(){const A=E.formats[u];if(!A){h();return}if(A===!0)return;const[f,_,b]=I(A);f===i&&n.pass(O());function h(){if(d.strictSchema===!1){E.logger.warn(P());return}throw new Error(P());function P(){return`unknown format "${u}" ignored in schema at path "${m}"`}}function I(P){const B=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:B});return typeof P=="object"&&!(P instanceof RegExp)?[P.type||"string",P.validate,(0,e._)`${z}.validate`]:["string",P,z]}function O(){if(typeof A=="object"&&!(A instanceof RegExp)&&A.async){if(!p.$async)throw new Error("async format in sync schema");return(0,e._)`await ${b}(${s})`}return typeof _=="function"?(0,e._)`${b}(${s})`:(0,e._)`${b}.test(${s})`}}}};return qc.default=r,qc}var r0;function t2(){if(r0)return $c;r0=1,Object.defineProperty($c,"__esModule",{value:!0});const t=[e2().default];return $c.default=t,$c}var yi={},n0;function r2(){return n0||(n0=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 i0;function n2(){if(i0)return sc;i0=1,Object.defineProperty(sc,"__esModule",{value:!0});const e=AU(),t=kU(),r=ZU(),n=t2(),i=r2(),a=[e.default,t.default,(0,r.default)(),n.default,i.metadataVocabulary,i.contentVocabulary];return sc.default=a,sc}var Bc={},js={},a0;function i2(){if(a0)return js;a0=1,Object.defineProperty(js,"__esModule",{value:!0}),js.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||(js.DiscrError=e={})),js}var s0;function a2(){if(s0)return Bc;s0=1,Object.defineProperty(Bc,"__esModule",{value:!0});const e=Ke(),t=i2(),r=D_(),n=Wl(),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:m}=o,{oneOf:p}=d;if(!m.opts.discriminator)throw new Error("discriminator: requires discriminator option");const E=c.propertyName;if(typeof E!="string")throw new Error("discriminator: requires propertyName");if(c.mapping)throw new Error("discriminator: mapping is not supported");if(!p)throw new Error("discriminator: requires oneOf keyword");const T=u.let("valid",!1),S=u.const("tag",(0,e._)`${l}${(0,e.getProperty)(E)}`);u.if((0,e._)`typeof ${S} == "string"`,()=>A(),()=>o.error(!1,{discrError:t.DiscrError.Tag,tag:S,tagName:E})),o.ok(T);function A(){const b=_();u.if(!1);for(const h in b)u.elseIf((0,e._)`${S} === ${h}`),u.assign(T,f(b[h]));u.else(),o.error(!1,{discrError:t.DiscrError.Mapping,tag:S,tagName:E}),u.endIf()}function f(b){const h=u.name("valid"),I=o.subschema({keyword:"oneOf",schemaProp:b},h);return o.mergeEvaluated(I,e.Name),h}function _(){var b;const h={},I=P(d);let O=!0;for(let Y=0;Y<p.length;Y++){let W=p[Y];if(W!=null&&W.$ref&&!(0,i.schemaHasRulesButRef)(W,m.self.RULES)){const F=W.$ref;if(W=r.resolveRef.call(m.self,m.schemaEnv.root,m.baseId,F),W instanceof r.SchemaEnv&&(W=W.schema),W===void 0)throw new n.default(m.opts.uriResolver,m.baseId,F)}const U=(b=W==null?void 0:W.properties)===null||b===void 0?void 0:b[E];if(typeof U!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${E}"`);O=O&&(I||P(W)),B(U,Y)}if(!O)throw new Error(`discriminator: "${E}" must be required`);return h;function P({required:Y}){return Array.isArray(Y)&&Y.includes(E)}function B(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/${E}" must have "const" or "enum"`)}function z(Y,W){if(typeof Y!="string"||Y in h)throw new Error(`discriminator: "${E}" values must be unique strings`);h[Y]=W}}}};return Bc.default=s,Bc}const s2="http://json-schema.org/draft-07/schema#",o2="http://json-schema.org/draft-07/schema#",u2="Core schema meta-schema",c2={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:[]}},l2=["object","boolean"],d2={$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:"#"}},f2={$schema:s2,$id:o2,title:u2,definitions:c2,type:l2,properties:d2,default:!0};var o0;function L_(){return o0||(o0=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=IU(),n=n2(),i=a2(),a=f2,s=["/properties"],o="http://json-schema.org/draft-07/schema";class u extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(E=>this.addVocabulary(E)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const E=this.opts.$data?this.$dataMetaSchema(a,s):a;this.addMetaSchema(E,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=Xo();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=M_();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return d.default}});var m=Wl();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return m.default}})})(tc,tc.exports)),tc.exports}var Qs={exports:{}},Zs={exports:{}},eo={exports:{}},kc={exports:{}},u0;function p2(){return u0||(u0=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})(kc,kc.exports)),kc.exports}var c0=eo.exports,l0;function m2(){return l0||(l0=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(p2()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(eo,eo.exports)),eo.exports}var to={exports:{}},CP={},Yl={};Yl.byteLength=g2;Yl.toByteArray=E2;Yl.fromByteArray=T2;var _n=[],Dr=[],h2=typeof Uint8Array<"u"?Uint8Array:Array,Hd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var ja=0,y2=Hd.length;ja<y2;++ja)_n[ja]=Hd[ja],Dr[Hd.charCodeAt(ja)]=ja;Dr[45]=62;Dr[95]=63;function MP(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 g2(e){var t=MP(e),r=t[0],n=t[1];return(r+n)*3/4-n}function _2(e,t,r){return(t+r)*3/4-r}function E2(e){var t,r=MP(e),n=r[0],i=r[1],a=new h2(_2(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 v2(e){return _n[e>>18&63]+_n[e>>12&63]+_n[e>>6&63]+_n[e&63]}function b2(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(v2(n));return i.join("")}function T2(e){for(var t,r=e.length,n=r%3,i=[],a=16383,s=0,o=r-n;s<o;s+=a)i.push(b2(e,s,s+a>o?o:s+a));return n===1?(t=e[r-1],i.push(_n[t>>2]+_n[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],i.push(_n[t>>10]+_n[t>>4&63]+_n[t<<2&63]+"=")),i.join("")}var $_={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */$_.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,m=r?-1:1,p=e[t+d];for(d+=m,a=p&(1<<-c)-1,p>>=-c,c+=o;c>0;a=a*256+e[t+d],d+=m,c-=8);for(s=a&(1<<-c)-1,a>>=-c,c+=n;c>0;s=s*256+e[t+d],d+=m,c-=8);if(a===0)a=1-l;else{if(a===u)return s?NaN:(p?-1:1)*(1/0);s=s+Math.pow(2,n),a=a-l}return(p?-1:1)*s*Math.pow(2,a-n)};$_.write=function(e,t,r,n,i,a){var s,o,u,l=a*8-i-1,c=(1<<l)-1,d=c>>1,m=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,E=n?1:-1,T=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+=m/u:t+=m*Math.pow(2,1-d),t*u>=2&&(s++,u/=2),s+d>=c?(o=0,s=c):s+d>=1?(o=(t*u-1)*Math.pow(2,i),s=s+d):(o=t*Math.pow(2,d-1)*Math.pow(2,i),s=0));i>=8;e[r+p]=o&255,p+=E,o/=256,i-=8);for(s=s<<i|o,l+=i;l>0;e[r+p]=s&255,p+=E,s/=256,l-=8);e[r+p-E]|=T*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=Yl,r=$_,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=c,e.SlowBuffer=h,e.INSPECT_MAX_BYTES=50;const i=2147483647;e.kMaxLength=i;const{Uint8Array:a,ArrayBuffer:s,SharedArrayBuffer:o}=globalThis;c.TYPED_ARRAY_SUPPORT=u(),!c.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function u(){try{const M=new a(1),v={foo:function(){return 42}};return Object.setPrototypeOf(v,a.prototype),Object.setPrototypeOf(M,v),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 v=new a(M);return Object.setPrototypeOf(v,c.prototype),v}function c(M,v,w){if(typeof M=="number"){if(typeof v=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return E(M)}return d(M,v,w)}c.poolSize=8192;function d(M,v,w){if(typeof M=="string")return T(M,v);if(s.isView(M))return A(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 f(M,v,w);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,v,w);const de=_(M);if(de)return de;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof M[Symbol.toPrimitive]=="function")return c.from(M[Symbol.toPrimitive]("string"),v,w);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,v,w){return d(M,v,w)},Object.setPrototypeOf(c.prototype,a.prototype),Object.setPrototypeOf(c,a);function m(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 p(M,v,w){return m(M),M<=0?l(M):v!==void 0?typeof w=="string"?l(M).fill(v,w):l(M).fill(v):l(M)}c.alloc=function(M,v,w){return p(M,v,w)};function E(M){return m(M),l(M<0?0:b(M)|0)}c.allocUnsafe=function(M){return E(M)},c.allocUnsafeSlow=function(M){return E(M)};function T(M,v){if((typeof v!="string"||v==="")&&(v="utf8"),!c.isEncoding(v))throw new TypeError("Unknown encoding: "+v);const w=I(M,v)|0;let G=l(w);const de=G.write(M,v);return de!==w&&(G=G.slice(0,de)),G}function S(M){const v=M.length<0?0:b(M.length)|0,w=l(v);for(let G=0;G<v;G+=1)w[G]=M[G]&255;return w}function A(M){if(bt(M,a)){const v=new a(M);return f(v.buffer,v.byteOffset,v.byteLength)}return S(M)}function f(M,v,w){if(v<0||M.byteLength<v)throw new RangeError('"offset" is outside of buffer bounds');if(M.byteLength<v+(w||0))throw new RangeError('"length" is outside of buffer bounds');let G;return v===void 0&&w===void 0?G=new a(M):w===void 0?G=new a(M,v):G=new a(M,v,w),Object.setPrototypeOf(G,c.prototype),G}function _(M){if(c.isBuffer(M)){const v=b(M.length)|0,w=l(v);return w.length===0||M.copy(w,0,0,v),w}if(M.length!==void 0)return typeof M.length!="number"||rr(M.length)?l(0):S(M);if(M.type==="Buffer"&&Array.isArray(M.data))return S(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 h(M){return+M!=M&&(M=0),c.alloc(+M)}c.isBuffer=function(v){return v!=null&&v._isBuffer===!0&&v!==c.prototype},c.compare=function(v,w){if(bt(v,a)&&(v=c.from(v,v.offset,v.byteLength)),bt(w,a)&&(w=c.from(w,w.offset,w.byteLength)),!c.isBuffer(v)||!c.isBuffer(w))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(v===w)return 0;let G=v.length,de=w.length;for(let ge=0,be=Math.min(G,de);ge<be;++ge)if(v[ge]!==w[ge]){G=v[ge],de=w[ge];break}return G<de?-1:de<G?1:0},c.isEncoding=function(v){switch(String(v).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(v,w){if(!Array.isArray(v))throw new TypeError('"list" argument must be an Array of Buffers');if(v.length===0)return c.alloc(0);let G;if(w===void 0)for(w=0,G=0;G<v.length;++G)w+=v[G].length;const de=c.allocUnsafe(w);let ge=0;for(G=0;G<v.length;++G){let be=v[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 I(M,v){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 w=M.length,G=arguments.length>2&&arguments[2]===!0;if(!G&&w===0)return 0;let de=!1;for(;;)switch(v){case"ascii":case"latin1":case"binary":return w;case"utf8":case"utf-8":return Xe(M).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w*2;case"hex":return w>>>1;case"base64":return vt(M).length;default:if(de)return G?-1:Xe(M).length;v=(""+v).toLowerCase(),de=!0}}c.byteLength=I;function O(M,v,w){let G=!1;if((v===void 0||v<0)&&(v=0),v>this.length||((w===void 0||w>this.length)&&(w=this.length),w<=0)||(w>>>=0,v>>>=0,w<=v))return"";for(M||(M="utf8");;)switch(M){case"hex":return $(this,v,w);case"utf8":case"utf-8":return ne(this,v,w);case"ascii":return L(this,v,w);case"latin1":case"binary":return D(this,v,w);case"base64":return se(this,v,w);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return V(this,v,w);default:if(G)throw new TypeError("Unknown encoding: "+M);M=(M+"").toLowerCase(),G=!0}}c.prototype._isBuffer=!0;function P(M,v,w){const G=M[v];M[v]=M[w],M[w]=G}c.prototype.swap16=function(){const v=this.length;if(v%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let w=0;w<v;w+=2)P(this,w,w+1);return this},c.prototype.swap32=function(){const v=this.length;if(v%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let w=0;w<v;w+=4)P(this,w,w+3),P(this,w+1,w+2);return this},c.prototype.swap64=function(){const v=this.length;if(v%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let w=0;w<v;w+=8)P(this,w,w+7),P(this,w+1,w+6),P(this,w+2,w+5),P(this,w+3,w+4);return this},c.prototype.toString=function(){const v=this.length;return v===0?"":arguments.length===0?ne(this,0,v):O.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(v){if(!c.isBuffer(v))throw new TypeError("Argument must be a Buffer");return this===v?!0:c.compare(this,v)===0},c.prototype.inspect=function(){let v="";const w=e.INSPECT_MAX_BYTES;return v=this.toString("hex",0,w).replace(/(.{2})/g,"$1 ").trim(),this.length>w&&(v+=" ... "),"<Buffer "+v+">"},n&&(c.prototype[n]=c.prototype.inspect),c.prototype.compare=function(v,w,G,de,ge){if(bt(v,a)&&(v=c.from(v,v.offset,v.byteLength)),!c.isBuffer(v))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof v);if(w===void 0&&(w=0),G===void 0&&(G=v?v.length:0),de===void 0&&(de=0),ge===void 0&&(ge=this.length),w<0||G>v.length||de<0||ge>this.length)throw new RangeError("out of range index");if(de>=ge&&w>=G)return 0;if(de>=ge)return-1;if(w>=G)return 1;if(w>>>=0,G>>>=0,de>>>=0,ge>>>=0,this===v)return 0;let be=ge-de,Qe=G-w;const Nt=Math.min(be,Qe),Tt=this.slice(de,ge),Pt=v.slice(w,G);for(let nt=0;nt<Nt;++nt)if(Tt[nt]!==Pt[nt]){be=Tt[nt],Qe=Pt[nt];break}return be<Qe?-1:Qe<be?1:0};function B(M,v,w,G,de){if(M.length===0)return-1;if(typeof w=="string"?(G=w,w=0):w>2147483647?w=2147483647:w<-2147483648&&(w=-2147483648),w=+w,rr(w)&&(w=de?0:M.length-1),w<0&&(w=M.length+w),w>=M.length){if(de)return-1;w=M.length-1}else if(w<0)if(de)w=0;else return-1;if(typeof v=="string"&&(v=c.from(v,G)),c.isBuffer(v))return v.length===0?-1:z(M,v,w,G,de);if(typeof v=="number")return v=v&255,typeof a.prototype.indexOf=="function"?de?a.prototype.indexOf.call(M,v,w):a.prototype.lastIndexOf.call(M,v,w):z(M,[v],w,G,de);throw new TypeError("val must be string, number or Buffer")}function z(M,v,w,G,de){let ge=1,be=M.length,Qe=v.length;if(G!==void 0&&(G=String(G).toLowerCase(),G==="ucs2"||G==="ucs-2"||G==="utf16le"||G==="utf-16le")){if(M.length<2||v.length<2)return-1;ge=2,be/=2,Qe/=2,w/=2}function Nt(Pt,nt){return ge===1?Pt[nt]:Pt.readUInt16BE(nt*ge)}let Tt;if(de){let Pt=-1;for(Tt=w;Tt<be;Tt++)if(Nt(M,Tt)===Nt(v,Pt===-1?0:Tt-Pt)){if(Pt===-1&&(Pt=Tt),Tt-Pt+1===Qe)return Pt*ge}else Pt!==-1&&(Tt-=Tt-Pt),Pt=-1}else for(w+Qe>be&&(w=be-Qe),Tt=w;Tt>=0;Tt--){let Pt=!0;for(let nt=0;nt<Qe;nt++)if(Nt(M,Tt+nt)!==Nt(v,nt)){Pt=!1;break}if(Pt)return Tt}return-1}c.prototype.includes=function(v,w,G){return this.indexOf(v,w,G)!==-1},c.prototype.indexOf=function(v,w,G){return B(this,v,w,G,!0)},c.prototype.lastIndexOf=function(v,w,G){return B(this,v,w,G,!1)};function Y(M,v,w,G){w=Number(w)||0;const de=M.length-w;G?(G=Number(G),G>de&&(G=de)):G=de;const ge=v.length;G>ge/2&&(G=ge/2);let be;for(be=0;be<G;++be){const Qe=parseInt(v.substr(be*2,2),16);if(rr(Qe))return be;M[w+be]=Qe}return be}function W(M,v,w,G){return Gt(Xe(v,M.length-w),M,w,G)}function U(M,v,w,G){return Gt(ut(v),M,w,G)}function F(M,v,w,G){return Gt(vt(v),M,w,G)}function ce(M,v,w,G){return Gt($t(v,M.length-w),M,w,G)}c.prototype.write=function(v,w,G,de){if(w===void 0)de="utf8",G=this.length,w=0;else if(G===void 0&&typeof w=="string")de=w,G=this.length,w=0;else if(isFinite(w))w=w>>>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-w;if((G===void 0||G>ge)&&(G=ge),v.length>0&&(G<0||w<0)||w>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,v,w,G);case"utf8":case"utf-8":return W(this,v,w,G);case"ascii":case"latin1":case"binary":return U(this,v,w,G);case"base64":return F(this,v,w,G);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ce(this,v,w,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,v,w){return v===0&&w===M.length?t.fromByteArray(M):t.fromByteArray(M.slice(v,w))}function ne(M,v,w){w=Math.min(M.length,w);const G=[];let de=v;for(;de<w;){const ge=M[de];let be=null,Qe=ge>239?4:ge>223?3:ge>191?2:1;if(de+Qe<=w){let Nt,Tt,Pt,nt;switch(Qe){case 1:ge<128&&(be=ge);break;case 2:Nt=M[de+1],(Nt&192)===128&&(nt=(ge&31)<<6|Nt&63,nt>127&&(be=nt));break;case 3:Nt=M[de+1],Tt=M[de+2],(Nt&192)===128&&(Tt&192)===128&&(nt=(ge&15)<<12|(Nt&63)<<6|Tt&63,nt>2047&&(nt<55296||nt>57343)&&(be=nt));break;case 4:Nt=M[de+1],Tt=M[de+2],Pt=M[de+3],(Nt&192)===128&&(Tt&192)===128&&(Pt&192)===128&&(nt=(ge&15)<<18|(Nt&63)<<12|(Tt&63)<<6|Pt&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 v=M.length;if(v<=X)return String.fromCharCode.apply(String,M);let w="",G=0;for(;G<v;)w+=String.fromCharCode.apply(String,M.slice(G,G+=X));return w}function L(M,v,w){let G="";w=Math.min(M.length,w);for(let de=v;de<w;++de)G+=String.fromCharCode(M[de]&127);return G}function D(M,v,w){let G="";w=Math.min(M.length,w);for(let de=v;de<w;++de)G+=String.fromCharCode(M[de]);return G}function $(M,v,w){const G=M.length;(!v||v<0)&&(v=0),(!w||w<0||w>G)&&(w=G);let de="";for(let ge=v;ge<w;++ge)de+=nr[M[ge]];return de}function V(M,v,w){const G=M.slice(v,w);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(v,w){const G=this.length;v=~~v,w=w===void 0?G:~~w,v<0?(v+=G,v<0&&(v=0)):v>G&&(v=G),w<0?(w+=G,w<0&&(w=0)):w>G&&(w=G),w<v&&(w=v);const de=this.subarray(v,w);return Object.setPrototypeOf(de,c.prototype),de};function N(M,v,w){if(M%1!==0||M<0)throw new RangeError("offset is not uint");if(M+v>w)throw new RangeError("Trying to access beyond buffer length")}c.prototype.readUintLE=c.prototype.readUIntLE=function(v,w,G){v=v>>>0,w=w>>>0,G||N(v,w,this.length);let de=this[v],ge=1,be=0;for(;++be<w&&(ge*=256);)de+=this[v+be]*ge;return de},c.prototype.readUintBE=c.prototype.readUIntBE=function(v,w,G){v=v>>>0,w=w>>>0,G||N(v,w,this.length);let de=this[v+--w],ge=1;for(;w>0&&(ge*=256);)de+=this[v+--w]*ge;return de},c.prototype.readUint8=c.prototype.readUInt8=function(v,w){return v=v>>>0,w||N(v,1,this.length),this[v]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(v,w){return v=v>>>0,w||N(v,2,this.length),this[v]|this[v+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(v,w){return v=v>>>0,w||N(v,2,this.length),this[v]<<8|this[v+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(v,w){return v=v>>>0,w||N(v,4,this.length),(this[v]|this[v+1]<<8|this[v+2]<<16)+this[v+3]*16777216},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(v,w){return v=v>>>0,w||N(v,4,this.length),this[v]*16777216+(this[v+1]<<16|this[v+2]<<8|this[v+3])},c.prototype.readBigUInt64LE=ht(function(v){v=v>>>0,we(v,"offset");const w=this[v],G=this[v+7];(w===void 0||G===void 0)&&Fe(v,this.length-8);const de=w+this[++v]*2**8+this[++v]*2**16+this[++v]*2**24,ge=this[++v]+this[++v]*2**8+this[++v]*2**16+G*2**24;return BigInt(de)+(BigInt(ge)<<BigInt(32))}),c.prototype.readBigUInt64BE=ht(function(v){v=v>>>0,we(v,"offset");const w=this[v],G=this[v+7];(w===void 0||G===void 0)&&Fe(v,this.length-8);const de=w*2**24+this[++v]*2**16+this[++v]*2**8+this[++v],ge=this[++v]*2**24+this[++v]*2**16+this[++v]*2**8+G;return(BigInt(de)<<BigInt(32))+BigInt(ge)}),c.prototype.readIntLE=function(v,w,G){v=v>>>0,w=w>>>0,G||N(v,w,this.length);let de=this[v],ge=1,be=0;for(;++be<w&&(ge*=256);)de+=this[v+be]*ge;return ge*=128,de>=ge&&(de-=Math.pow(2,8*w)),de},c.prototype.readIntBE=function(v,w,G){v=v>>>0,w=w>>>0,G||N(v,w,this.length);let de=w,ge=1,be=this[v+--de];for(;de>0&&(ge*=256);)be+=this[v+--de]*ge;return ge*=128,be>=ge&&(be-=Math.pow(2,8*w)),be},c.prototype.readInt8=function(v,w){return v=v>>>0,w||N(v,1,this.length),this[v]&128?(255-this[v]+1)*-1:this[v]},c.prototype.readInt16LE=function(v,w){v=v>>>0,w||N(v,2,this.length);const G=this[v]|this[v+1]<<8;return G&32768?G|4294901760:G},c.prototype.readInt16BE=function(v,w){v=v>>>0,w||N(v,2,this.length);const G=this[v+1]|this[v]<<8;return G&32768?G|4294901760:G},c.prototype.readInt32LE=function(v,w){return v=v>>>0,w||N(v,4,this.length),this[v]|this[v+1]<<8|this[v+2]<<16|this[v+3]<<24},c.prototype.readInt32BE=function(v,w){return v=v>>>0,w||N(v,4,this.length),this[v]<<24|this[v+1]<<16|this[v+2]<<8|this[v+3]},c.prototype.readBigInt64LE=ht(function(v){v=v>>>0,we(v,"offset");const w=this[v],G=this[v+7];(w===void 0||G===void 0)&&Fe(v,this.length-8);const de=this[v+4]+this[v+5]*2**8+this[v+6]*2**16+(G<<24);return(BigInt(de)<<BigInt(32))+BigInt(w+this[++v]*2**8+this[++v]*2**16+this[++v]*2**24)}),c.prototype.readBigInt64BE=ht(function(v){v=v>>>0,we(v,"offset");const w=this[v],G=this[v+7];(w===void 0||G===void 0)&&Fe(v,this.length-8);const de=(w<<24)+this[++v]*2**16+this[++v]*2**8+this[++v];return(BigInt(de)<<BigInt(32))+BigInt(this[++v]*2**24+this[++v]*2**16+this[++v]*2**8+G)}),c.prototype.readFloatLE=function(v,w){return v=v>>>0,w||N(v,4,this.length),r.read(this,v,!0,23,4)},c.prototype.readFloatBE=function(v,w){return v=v>>>0,w||N(v,4,this.length),r.read(this,v,!1,23,4)},c.prototype.readDoubleLE=function(v,w){return v=v>>>0,w||N(v,8,this.length),r.read(this,v,!0,52,8)},c.prototype.readDoubleBE=function(v,w){return v=v>>>0,w||N(v,8,this.length),r.read(this,v,!1,52,8)};function j(M,v,w,G,de,ge){if(!c.isBuffer(M))throw new TypeError('"buffer" argument must be a Buffer instance');if(v>de||v<ge)throw new RangeError('"value" argument is out of bounds');if(w+G>M.length)throw new RangeError("Index out of range")}c.prototype.writeUintLE=c.prototype.writeUIntLE=function(v,w,G,de){if(v=+v,w=w>>>0,G=G>>>0,!de){const Qe=Math.pow(2,8*G)-1;j(this,v,w,G,Qe,0)}let ge=1,be=0;for(this[w]=v&255;++be<G&&(ge*=256);)this[w+be]=v/ge&255;return w+G},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(v,w,G,de){if(v=+v,w=w>>>0,G=G>>>0,!de){const Qe=Math.pow(2,8*G)-1;j(this,v,w,G,Qe,0)}let ge=G-1,be=1;for(this[w+ge]=v&255;--ge>=0&&(be*=256);)this[w+ge]=v/be&255;return w+G},c.prototype.writeUint8=c.prototype.writeUInt8=function(v,w,G){return v=+v,w=w>>>0,G||j(this,v,w,1,255,0),this[w]=v&255,w+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(v,w,G){return v=+v,w=w>>>0,G||j(this,v,w,2,65535,0),this[w]=v&255,this[w+1]=v>>>8,w+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(v,w,G){return v=+v,w=w>>>0,G||j(this,v,w,2,65535,0),this[w]=v>>>8,this[w+1]=v&255,w+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(v,w,G){return v=+v,w=w>>>0,G||j(this,v,w,4,4294967295,0),this[w+3]=v>>>24,this[w+2]=v>>>16,this[w+1]=v>>>8,this[w]=v&255,w+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(v,w,G){return v=+v,w=w>>>0,G||j(this,v,w,4,4294967295,0),this[w]=v>>>24,this[w+1]=v>>>16,this[w+2]=v>>>8,this[w+3]=v&255,w+4};function Z(M,v,w,G,de){Te(v,G,de,M,w,7);let ge=Number(v&BigInt(4294967295));M[w++]=ge,ge=ge>>8,M[w++]=ge,ge=ge>>8,M[w++]=ge,ge=ge>>8,M[w++]=ge;let be=Number(v>>BigInt(32)&BigInt(4294967295));return M[w++]=be,be=be>>8,M[w++]=be,be=be>>8,M[w++]=be,be=be>>8,M[w++]=be,w}function Ee(M,v,w,G,de){Te(v,G,de,M,w,7);let ge=Number(v&BigInt(4294967295));M[w+7]=ge,ge=ge>>8,M[w+6]=ge,ge=ge>>8,M[w+5]=ge,ge=ge>>8,M[w+4]=ge;let be=Number(v>>BigInt(32)&BigInt(4294967295));return M[w+3]=be,be=be>>8,M[w+2]=be,be=be>>8,M[w+1]=be,be=be>>8,M[w]=be,w+8}c.prototype.writeBigUInt64LE=ht(function(v,w=0){return Z(this,v,w,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeBigUInt64BE=ht(function(v,w=0){return Ee(this,v,w,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeIntLE=function(v,w,G,de){if(v=+v,w=w>>>0,!de){const Nt=Math.pow(2,8*G-1);j(this,v,w,G,Nt-1,-Nt)}let ge=0,be=1,Qe=0;for(this[w]=v&255;++ge<G&&(be*=256);)v<0&&Qe===0&&this[w+ge-1]!==0&&(Qe=1),this[w+ge]=(v/be>>0)-Qe&255;return w+G},c.prototype.writeIntBE=function(v,w,G,de){if(v=+v,w=w>>>0,!de){const Nt=Math.pow(2,8*G-1);j(this,v,w,G,Nt-1,-Nt)}let ge=G-1,be=1,Qe=0;for(this[w+ge]=v&255;--ge>=0&&(be*=256);)v<0&&Qe===0&&this[w+ge+1]!==0&&(Qe=1),this[w+ge]=(v/be>>0)-Qe&255;return w+G},c.prototype.writeInt8=function(v,w,G){return v=+v,w=w>>>0,G||j(this,v,w,1,127,-128),v<0&&(v=255+v+1),this[w]=v&255,w+1},c.prototype.writeInt16LE=function(v,w,G){return v=+v,w=w>>>0,G||j(this,v,w,2,32767,-32768),this[w]=v&255,this[w+1]=v>>>8,w+2},c.prototype.writeInt16BE=function(v,w,G){return v=+v,w=w>>>0,G||j(this,v,w,2,32767,-32768),this[w]=v>>>8,this[w+1]=v&255,w+2},c.prototype.writeInt32LE=function(v,w,G){return v=+v,w=w>>>0,G||j(this,v,w,4,2147483647,-2147483648),this[w]=v&255,this[w+1]=v>>>8,this[w+2]=v>>>16,this[w+3]=v>>>24,w+4},c.prototype.writeInt32BE=function(v,w,G){return v=+v,w=w>>>0,G||j(this,v,w,4,2147483647,-2147483648),v<0&&(v=4294967295+v+1),this[w]=v>>>24,this[w+1]=v>>>16,this[w+2]=v>>>8,this[w+3]=v&255,w+4},c.prototype.writeBigInt64LE=ht(function(v,w=0){return Z(this,v,w,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeBigInt64BE=ht(function(v,w=0){return Ee(this,v,w,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function _e(M,v,w,G,de,ge){if(w+G>M.length)throw new RangeError("Index out of range");if(w<0)throw new RangeError("Index out of range")}function Se(M,v,w,G,de){return v=+v,w=w>>>0,de||_e(M,v,w,4),r.write(M,v,w,G,23,4),w+4}c.prototype.writeFloatLE=function(v,w,G){return Se(this,v,w,!0,G)},c.prototype.writeFloatBE=function(v,w,G){return Se(this,v,w,!1,G)};function Ie(M,v,w,G,de){return v=+v,w=w>>>0,de||_e(M,v,w,8),r.write(M,v,w,G,52,8),w+8}c.prototype.writeDoubleLE=function(v,w,G){return Ie(this,v,w,!0,G)},c.prototype.writeDoubleBE=function(v,w,G){return Ie(this,v,w,!1,G)},c.prototype.copy=function(v,w,G,de){if(!c.isBuffer(v))throw new TypeError("argument should be a Buffer");if(G||(G=0),!de&&de!==0&&(de=this.length),w>=v.length&&(w=v.length),w||(w=0),de>0&&de<G&&(de=G),de===G||v.length===0||this.length===0)return 0;if(w<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),v.length-w<de-G&&(de=v.length-w+G);const ge=de-G;return this===v&&typeof a.prototype.copyWithin=="function"?this.copyWithin(w,G,de):a.prototype.set.call(v,this.subarray(G,de),w),ge},c.prototype.fill=function(v,w,G,de){if(typeof v=="string"){if(typeof w=="string"?(de=w,w=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(v.length===1){const be=v.charCodeAt(0);(de==="utf8"&&be<128||de==="latin1")&&(v=be)}}else typeof v=="number"?v=v&255:typeof v=="boolean"&&(v=Number(v));if(w<0||this.length<w||this.length<G)throw new RangeError("Out of range index");if(G<=w)return this;w=w>>>0,G=G===void 0?this.length:G>>>0,v||(v=0);let ge;if(typeof v=="number")for(ge=w;ge<G;++ge)this[ge]=v;else{const be=c.isBuffer(v)?v:c.from(v,de),Qe=be.length;if(Qe===0)throw new TypeError('The value "'+v+'" is invalid for argument "value"');for(ge=0;ge<G-w;++ge)this[ge+w]=be[ge%Qe]}return this};const ie={};function le(M,v,w){ie[M]=class extends w{constructor(){super(),Object.defineProperty(this,"message",{value:v.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,v){return`The "${M}" argument must be of type number. Received type ${typeof v}`},TypeError),le("ERR_OUT_OF_RANGE",function(M,v,w){let G=`The value of "${M}" is out of range.`,de=w;return Number.isInteger(w)&&Math.abs(w)>2**32?de=fe(String(w)):typeof w=="bigint"&&(de=String(w),(w>BigInt(2)**BigInt(32)||w<-(BigInt(2)**BigInt(32)))&&(de=fe(de)),de+="n"),G+=` It must be ${v}. Received ${de}`,G},RangeError);function fe(M){let v="",w=M.length;const G=M[0]==="-"?1:0;for(;w>=G+4;w-=3)v=`_${M.slice(w-3,w)}${v}`;return`${M.slice(0,w)}${v}`}function me(M,v,w){we(v,"offset"),(M[v]===void 0||M[v+w]===void 0)&&Fe(v,M.length-(w+1))}function Te(M,v,w,G,de,ge){if(M>w||M<v){const be=typeof v=="bigint"?"n":"";let Qe;throw v===0||v===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,v){if(typeof M!="number")throw new ie.ERR_INVALID_ARG_TYPE(v,"number",M)}function Fe(M,v,w){throw Math.floor(M)!==M?(we(M,w),new ie.ERR_OUT_OF_RANGE("offset","an integer",M)):v<0?new ie.ERR_BUFFER_OUT_OF_BOUNDS:new ie.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${v}`,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,v){v=v||1/0;let w;const G=M.length;let de=null;const ge=[];for(let be=0;be<G;++be){if(w=M.charCodeAt(be),w>55295&&w<57344){if(!de){if(w>56319){(v-=3)>-1&&ge.push(239,191,189);continue}else if(be+1===G){(v-=3)>-1&&ge.push(239,191,189);continue}de=w;continue}if(w<56320){(v-=3)>-1&&ge.push(239,191,189),de=w;continue}w=(de-55296<<10|w-56320)+65536}else de&&(v-=3)>-1&&ge.push(239,191,189);if(de=null,w<128){if((v-=1)<0)break;ge.push(w)}else if(w<2048){if((v-=2)<0)break;ge.push(w>>6|192,w&63|128)}else if(w<65536){if((v-=3)<0)break;ge.push(w>>12|224,w>>6&63|128,w&63|128)}else if(w<1114112){if((v-=4)<0)break;ge.push(w>>18|240,w>>12&63|128,w>>6&63|128,w&63|128)}else throw new Error("Invalid code point")}return ge}function ut(M){const v=[];for(let w=0;w<M.length;++w)v.push(M.charCodeAt(w)&255);return v}function $t(M,v){let w,G,de;const ge=[];for(let be=0;be<M.length&&!((v-=2)<0);++be)w=M.charCodeAt(be),G=w>>8,de=w%256,ge.push(de),ge.push(G);return ge}function vt(M){return t.toByteArray(tt(M))}function Gt(M,v,w,G){let de;for(de=0;de<G&&!(de+w>=v.length||de>=M.length);++de)v[de+w]=M[de];return de}function bt(M,v){return M instanceof v||M!=null&&M.constructor!=null&&M.constructor.name!=null&&M.constructor.name===v.name}function rr(M){return M!==M}const nr=(function(){const M="0123456789abcdef",v=new Array(256);for(let w=0;w<16;++w){const G=w*16;for(let de=0;de<16;++de)v[G+de]=M[w]+M[de]}return v})();function ht(M){return typeof BigInt>"u"?wr:M}function wr(){throw new Error("BigInt not supported")}})(CP);const d0=CP.Buffer;var Uc={exports:{}},f0;function S2(){return f0||(f0=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r={Object,Array,Function,Number,String,Date,RegExp};typeof d0<"u"&&(r.Buffer=d0),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})(Uc,Uc.exports)),Uc.exports}var p0=to.exports,m0;function I2(){return m0||(m0=1,(function(e,t){var r=p0&&p0.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(S2()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(to,to.exports)),to.exports}var ro={exports:{}},no={exports:{}},Fc={},h0;function DP(){if(h0)return Fc;h0=1,Object.defineProperty(Fc,"__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 Fc.default=e,Fc}var y0=no.exports,g0;function R2(){return g0||(g0=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(DP()).default)("range");t.default=i,e.exports=i})(no,no.exports)),no.exports}var _0=ro.exports,E0;function w2(){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(R2()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(ro,ro.exports)),ro.exports}var io={exports:{}},ao={exports:{}},v0=ao.exports,b0;function A2(){return b0||(b0=1,(function(e,t){var r=v0&&v0.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const i=(0,r(DP()).default)("exclusiveRange");t.default=i,e.exports=i})(ao,ao.exports)),ao.exports}var T0=io.exports,S0;function O2(){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(A2()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(io,io.exports)),io.exports}var so={exports:{}},Hc={exports:{}},gi={},I0;function xl(){if(I0)return gi;I0=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 R0;function N2(){return R0||(R0=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(m){if(typeof m=="object")return(0,n.usePattern)(o,m.pattern,m.flags);const p=a.exec(m);if(p)return(0,n.usePattern)(o,p[1],p[2]);throw new Error("cannot parse string into RegExp")}},metaSchema:{anyOf:[{type:"string"},i]}}}t.default=s,e.exports=s})(Hc,Hc.exports)),Hc.exports}var w0=so.exports,A0;function P2(){return A0||(A0=1,(function(e,t){var r=w0&&w0.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(N2()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(so,so.exports)),so.exports}var oo={exports:{}},Vc={exports:{}},O0;function C2(){return O0||(O0=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:m,it:p}=u,{parentData:E,parentDataProperty:T}=p,S=d;if(!S.length)return;let A;if(S.includes("toEnumCase")){const _=s(m);A=l.scopeValue("obj",{ref:_,code:(0,r.stringify)(_)})}l.if((0,r._)`typeof ${c} == "string" && ${E} !== undefined`,()=>{l.assign(c,f(S.slice())),l.assign((0,r._)`${E}[${T}]`,c)});function f(_){if(!_.length)return c;const b=_.pop();if(!(b in n))throw new Error(`transform: unknown transformation ${b}`);const h=l.scopeValue("func",{ref:n[b],code:(0,r._)`require("ajv-keywords/dist/definitions/transform").transform${(0,r.getProperty)(b)}`}),I=f(_);return A&&b==="toEnumCase"?(0,r._)`${h}(${I}, ${A})`:(0,r._)`${h}(${I})`}},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})(Vc,Vc.exports)),Vc.exports}var N0=oo.exports,P0;function M2(){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 n=r(C2()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(oo,oo.exports)),oo.exports}var uo={exports:{}},Gc={exports:{}},C0;function D2(){return C0||(C0=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=C_(),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 m={};for(const p of l){if(!p||typeof p!="object")continue;let E=p[d];if(!(E&&typeof E=="object")){if(typeof E=="string"&&(E='"'+E),m[E])return!1;m[E]=!0}}}else for(let m=l.length;m--;){const p=l[m];if(!(!p||typeof p!="object"))for(let E=m;E--;){const T=l[E];if(T&&typeof T=="object"&&r(p[d],T[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 m=(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(m)?!m.includes("object")&&!m.includes("array"):n.includes(m)})}e.exports=i})(Gc,Gc.exports)),Gc.exports}var M0=uo.exports,D0;function j2(){return D0||(D0=1,(function(e,t){var r=M0&&M0.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(D2()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(uo,uo.exports)),uo.exports}var co={exports:{}},zc={exports:{}},j0;function L2(){return j0||(j0=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})(zc,zc.exports)),zc.exports}var L0=co.exports,$0;function $2(){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(L2()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(co,co.exports)),co.exports}var lo={exports:{}},fo={exports:{}},Wc={},q0;function jP(){if(q0)return Wc;q0=1,Object.defineProperty(Wc,"__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 Wc.default=e,Wc}var B0=fo.exports,k0;function q2(){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 i=(0,r(jP()).default)("anyRequired");t.default=i,e.exports=i})(fo,fo.exports)),fo.exports}var U0=lo.exports,F0;function B2(){return F0||(F0=1,(function(e,t){var r=U0&&U0.__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})(lo,lo.exports)),lo.exports}var po={exports:{}},mo={exports:{}},H0=mo.exports,V0;function k2(){return V0||(V0=1,(function(e,t){var r=H0&&H0.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const i=(0,r(jP()).default)("oneRequired");t.default=i,e.exports=i})(mo,mo.exports)),mo.exports}var G0=po.exports,z0;function U2(){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})(po,po.exports)),po.exports}var ho={exports:{}},Yc={exports:{}},W0;function F2(){return W0||(W0=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 m of u)d(m);function d(m){const p=o.let("matched",!1);o.forIn("key",l,E=>{o.assign(p,(0,r._)`${(0,n.usePattern)(s,m)}.test(${E})`),o.if(p,()=>o.break())}),s.setParams({missingPattern:m}),o.assign(c,(0,r.and)(c,p)),s.pass(c)}},metaSchema:{type:"array",items:{type:"string",format:"regex"},uniqueItems:!0}}}t.default=a,e.exports=a})(Yc,Yc.exports)),Yc.exports}var Y0=ho.exports,x0;function H2(){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 n=r(F2()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(ho,ho.exports)),ho.exports}var yo={exports:{}},xc={exports:{}},K0;function V2(){return K0||(K0=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})(xc,xc.exports)),xc.exports}var X0=yo.exports,J0;function G2(){return J0||(J0=1,(function(e,t){var r=X0&&X0.__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})(yo,yo.exports)),yo.exports}var go={exports:{}},Kc={exports:{}},Q0;function z2(){return Q0||(Q0=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 m=u[d];const p=d===u.length-1;m=a(m);const E=c.properties={};let T;if(/[0-9]+/.test(m)){let S=+m;for(T=c.items=[],c.type=["object","array"];S--;)T.push({})}else c.type="object";c=p?o:{},E[m]=c,T&&T.push(c)}return l}function a(s){return s.replace(/~1/g,"/").replace(/~0/g,"~")}e.exports=n})(Kc,Kc.exports)),Kc.exports}var Z0=go.exports,eT;function W2(){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,s)=>a.addKeyword((0,n.default)(s));t.default=i,e.exports=i})(go,go.exports)),go.exports}var _o={exports:{}},Xc={exports:{}},tT;function Y2(){return tT||(tT=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 m=o;const p=d.map((E,T)=>T?m=(0,r._)`${m}${(0,r.getProperty)(i(E))}`:m);return(0,r.and)(...p)}},metaSchema:{type:"array",items:{type:"string",format:"json-pointer"}}}}t.default=n;function i(a){return a.replace(/~1/g,"/").replace(/~0/g,"~")}e.exports=n})(Xc,Xc.exports)),Xc.exports}var rT=_o.exports,nT;function x2(){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(Y2()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(_o,_o.exports)),_o.exports}var Eo={exports:{}},Jc={exports:{}},iT;function K2(){return iT||(iT=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 m=(d=c==null?void 0:c.max)!==null&&d!==void 0?d:2;return()=>Math.floor(Math.random()*m)},seq:c=>{var d;const m=(d=c==null?void 0:c.name)!==null&&d!==void 0?d:"";return r[m]||(r[m]=0),()=>r[m]++}},i=Object.assign(a,{DEFAULTS:n});function a(){return{keyword:"dynamicDefaults",type:"object",schemaType:["string","object"],modifying:!0,valid:!0,compile(c,d,m){if(!m.opts.useDefaults||m.compositeRule)return()=>!0;const p={};for(const T in c)p[T]=s(c[T]);const E=m.opts.useDefaults==="empty";return T=>{for(const S in c)(T[S]===void 0||E&&(T[S]===null||T[S]===""))&&(T[S]=p[S]());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 m=n[c];return l(c,m),m(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})(Jc,Jc.exports)),Jc.exports}var aT=Eo.exports,sT;function X2(){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(K2()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(Eo,Eo.exports)),Eo.exports}var vo={exports:{}},Qc={exports:{}},oT;function J2(){return oT||(oT=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 m=l.let("valid",!0),p=l.name("_valid"),E=l.const("value",(0,r._)`${c} === null ? "null" : ${c}`);l.if(!1);for(const T in d.selectCases){u.setParams({schemaProp:T}),l.elseIf((0,r._)`"" + ${E} == ${T}`);const S=u.subschema({keyword:"selectCases",schemaProp:T},p);u.mergeEvaluated(S,r.Name),l.assign(m,p)}if(l.else(),d.selectDefault!==void 0){u.setParams({schemaProp:void 0});const T=u.subschema({keyword:"selectDefault"},p);u.mergeEvaluated(T,r.Name),l.assign(m,p)}l.endIf(),u.pass(m)})}},{keyword:"selectCases",dependencies:["select"],metaSchema:{type:"object",additionalProperties:o}},{keyword:"selectDefault",dependencies:["select","selectCases"],metaSchema:o}]}t.default=a,e.exports=a})(Qc,Qc.exports)),Qc.exports}var uT=vo.exports,cT;function Q2(){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(J2()),i=(a,s)=>((0,n.default)(s).forEach(o=>a.addKeyword(o)),a);t.default=i,e.exports=i})(vo,vo.exports)),vo.exports}var lT=Zs.exports,dT;function Z2(){return dT||(dT=1,(function(e,t){var r=lT&&lT.__importDefault||function(b){return b&&b.__esModule?b:{default:b}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(m2()),i=r(I2()),a=r(w2()),s=r(O2()),o=r(P2()),u=r(M2()),l=r(j2()),c=r($2()),d=r(B2()),m=r(U2()),p=r(H2()),E=r(G2()),T=r(W2()),S=r(x2()),A=r(X2()),f=r(Q2()),_={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:m.default,patternRequired:p.default,prohibited:E.default,deepProperties:T.default,deepRequired:S.default,dynamicDefaults:A.default,select:f.default};t.default=_,e.exports=_})(Zs,Zs.exports)),Zs.exports}var fT=Qs.exports,pT;function LP(){return pT||(pT=1,(function(e,t){var r=fT&&fT.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(Z2()),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})(Qs,Qs.exports)),Qs.exports}var Zc={exports:{}},mT;function $P(){return mT||(mT=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=L_(),n=Ke(),i=Mo(),a=Xo(),s=Ko(),o=Vn(),u="errorMessage",l=new r.Name("emUsed"),c={required:"missingProperty",dependencies:"property",dependentRequired:"property"},d=/\$\{[^}]+\}/,m=/\$\{([^}]+)\}/g,p=/^""\s*\+\s*|\s*\+\s*""$/g;function E(S){return{keyword:u,schemaType:["string","object"],post:!0,code(A){const{gen:f,data:_,schema:b,schemaValue:h,it:I}=A;if(I.createErrors===!1)return;const O=b,P=n.strConcat(o.default.instancePath,I.errorPath);f.if(r._`${o.default.errors} > 0`,()=>{if(typeof O=="object"){const[V,N]=z(O);N&&Y(N),V&&W(V),U(B(O))}const $=typeof O=="string"?O:O._;$&&F($),S.keepErrors||ce()});function B({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=f.const("emErrors",r.stringify($)),N=f.const("templates",x($,b));f.forOf("err",o.default.vErrors,_e=>f.if(se(_e,V),()=>f.code(r._`${V}[${_e}.keyword].push(${_e})`).assign(r._`${_e}.${l}`,!0)));const{singleError:j}=S;if(j){const _e=f.let("message",r._`""`),Se=f.let("paramsErrors",r._`[]`);Z(Ie=>{f.if(_e,()=>f.code(r._`${_e} += ${typeof j=="string"?j:";"}`)),f.code(r._`${_e} += ${Ee(Ie)}`),f.assign(Se,r._`${Se}.concat(${V}[${Ie}])`)}),s.reportError(A,{message:_e,params:r._`{errors: ${Se}}`})}else Z(_e=>s.reportError(A,{message:Ee(_e),params:r._`{errors: ${V}[${_e}]}`}));function Z(_e){f.forIn("key",V,Se=>f.if(r._`${V}[${Se}].length`,()=>_e(Se)))}function Ee(_e){return r._`${_e} in ${N} ? ${N}[${_e}]() : ${h}[${_e}]`}}function W($){const V=f.const("emErrors",r.stringify($)),N=[];for(const Se in $)N.push([Se,x($[Se],b[Se])]);const j=f.const("templates",f.object(...N)),Z=f.scopeValue("obj",{ref:c,code:r.stringify(c)}),Ee=f.let("emPropParams"),_e=f.let("emParamsErrors");f.forOf("err",o.default.vErrors,Se=>f.if(se(Se,V),()=>{f.assign(Ee,r._`${Z}[${Se}.keyword]`),f.assign(_e,r._`${V}[${Se}.keyword][${Se}.params[${Ee}]]`),f.if(_e,()=>f.code(r._`${_e}.push(${Se})`).assign(r._`${Se}.${l}`,!0))})),f.forIn("key",V,Se=>f.forIn("keyProp",r._`${V}[${Se}]`,Ie=>{f.assign(_e,r._`${V}[${Se}][${Ie}]`),f.if(r._`${_e}.length`,()=>{const ie=f.const("tmpl",r._`${j}[${Se}] && ${j}[${Se}][${Ie}]`);s.reportError(A,{message:r._`${ie} ? ${ie}() : ${h}[${Se}][${Ie}]`,params:r._`{errors: ${_e}}`})})}))}function U($){const{props:V,items:N}=$;if(!V&&!N)return;const j=r._`typeof ${_} == "object"`,Z=r._`Array.isArray(${_})`,Ee=f.let("emErrors");let _e,Se;const Ie=f.let("templates");V&&N?(_e=f.let("emChildKwd"),f.if(j),f.if(Z,()=>{ie(N,b.items),f.assign(_e,r.str`items`)},()=>{ie(V,b.properties),f.assign(_e,r.str`properties`)}),Se=r._`[${_e}]`):N?(f.if(Z),ie(N,b.items),Se=r._`.items`):V&&(f.if(n.and(j,n.not(Z))),ie(V,b.properties),Se=r._`.properties`),f.forOf("err",o.default.vErrors,le=>ne(le,Ee,fe=>f.code(r._`${Ee}[${fe}].push(${le})`).assign(r._`${le}.${l}`,!0))),f.forIn("key",Ee,le=>f.if(r._`${Ee}[${le}].length`,()=>{s.reportError(A,{message:r._`${le} in ${Ie} ? ${Ie}[${le}]() : ${h}${Se}[${le}]`,params:r._`{errors: ${Ee}[${le}]}`}),f.assign(r._`${o.default.vErrors}[${o.default.errors}-1].instancePath`,r._`${P} + "/" + ${le}.replace(/~/g, "~0").replace(/\\//g, "~1")`)})),f.endIf();function ie(le,fe){f.assign(Ee,r.stringify(le)),f.assign(Ie,x(le,fe))}}function F($){const V=f.const("emErrs",r._`[]`);f.forOf("err",o.default.vErrors,N=>f.if(X(N),()=>f.code(r._`${V}.push(${N})`).assign(r._`${N}.${l}`,!0))),f.if(r._`${V}.length`,()=>s.reportError(A,{message:L($),params:r._`{errors: ${V}}`}))}function ce(){const $=f.const("emErrs",r._`[]`);f.forOf("err",o.default.vErrors,V=>f.if(r._`!${V}.${l}`,()=>f.code(r._`${$}.push(${V})`))),f.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(${I.errSchemaPath}) === 0`,r._`/^\\/[^\\/]*$/.test(${$}.schemaPath.slice(${I.errSchemaPath.length}))`)}function ne($,V,N){f.if(n.and(r._`${$}.keyword !== ${u}`,r._`!${$}.${l}`,r._`${$}.instancePath.indexOf(${P}) === 0`),()=>{const j=f.scopeValue("pattern",{ref:/^\/([^/]*)(?:\/|$)/,code:r._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")`}),Z=f.const("emMatches",r._`${j}.exec(${$}.instancePath.slice(${P}.length))`),Ee=f.const("emChild",r._`${Z} && ${Z}[1].replace(/~1/g, "/").replace(/~0/g, "~")`);f.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(${I.errSchemaPath}) === 0`,r._`${$}.schemaPath[${I.errSchemaPath}.length] === "/"`)}function x($,V){const N=[];for(const j in $){const Z=V[j];d.test(Z)&&N.push([j,D(Z)])}return f.object(...N)}function L($){return d.test($)?new i._Code(i.safeStringify($).replace(m,(V,N)=>`" + JSON.stringify(${a.getData(N,I)}) + "`).replace(p,"")):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 T=(S,A={})=>{if(!S.opts.allErrors)throw new Error("ajv-errors: Ajv option allErrors must be true");if(S.opts.jsPropertySyntax)throw new Error("ajv-errors: ajv option jsPropertySyntax is not supported");return S.addKeyword(E(A))};t.default=T,e.exports=T,e.exports.default=T})(Zc,Zc.exports)),Zc.exports}var hT;function Oe(){if(hT)return kr;hT=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(L_());kr.Ajv=t.default;const r=e(LP()),n=e($P());function i(s,o){let u=null;const l=(c,d)=>{if(!u){const m=new t.default({$data:!0,allErrors:!0});(0,r.default)(m),(0,n.default)(m,{singleError:!0}),o==null||o.forEach(p=>m.addKeyword(p)),u=m.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 yT;function eF(){return yT||(yT=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={}))})(Cd)),Cd}var Vd={},gT;function tF(){return gT||(gT=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={}))})(Vd)),Vd}var _T;function rF(){return _T||(_T=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(eF(),e),r(tF(),e)})(pi)),pi}var _i={},Gd={},ET;function nF(){return ET||(ET=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={}))})(Gd)),Gd}var zd={},Wd={},vT;function Kl(){return vT||(vT=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={}))})(Wd)),Wd}var Yd={},bT;function ba(){return bT||(bT=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={}))})(Yd)),Yd}var xd={},TT;function Xl(){return TT||(TT=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 Kd={},Xd={},ST;function q_(){return ST||(ST=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={}))})(Xd)),Xd}var Jd={},Qd={},IT;function qP(){return IT||(IT=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={}))})(Qd)),Qd}var RT;function B_(){return RT||(RT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=void 0;const t=ba(),r=Oe(),n=qP();(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={}))})(Jd)),Jd}var wT;function k_(){return wT||(wT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableRepresentation=void 0;const t=Oe(),r=q_(),n=B_();(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={}))})(Kd)),Kd}var Ei={},vi={},Zd={},ef={},AT;function Ta(){return AT||(AT=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={}))})(ef)),ef}var OT;function BP(){return OT||(OT=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={}))})(Zd)),Zd}var tf={},NT;function iF(){return NT||(NT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Profile=void 0;const t=Oe(),r=BP();(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={}))})(tf)),tf}var PT;function aF(){return PT||(PT=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(BP(),e),r(iF(),e)})(vi)),vi}var rf={},nf={},CT;function kP(){return CT||(CT=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={}))})(nf)),nf}var af={},MT;function UP(){return MT||(MT=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={}))})(af)),af}var sf={},DT;function FP(){return DT||(DT=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={}))})(sf)),sf}var of={},Ls={},jT;function U_(){return jT||(jT=1,Object.defineProperty(Ls,"__esModule",{value:!0}),Ls.displayableProperties=void 0,Ls.displayableProperties={menuBarIcon:{description:"Name of the file used as icon for the MenuBar",type:"string",nullable:!0}}),Ls}var uf={},LT;function HP(){return LT||(LT=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={}))})(uf)),uf}var cf={},$T;function VP(){return $T||($T=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={}))})(cf)),cf}var qT;function sF(){return qT||(qT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Scene=e.RequiredPermission=void 0;const t=Oe(),r=U_(),n=kP(),i=FP(),a=HP(),s=VP(),o=UP();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={}))})(of)),of}var BT;function oF(){return BT||(BT=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=kP();Object.defineProperty(e,"FeatureToggles",{enumerable:!0,get:function(){return t.FeatureToggles}});var r=UP();Object.defineProperty(e,"WorldConfiguration",{enumerable:!0,get:function(){return r.WorldConfiguration}});var n=FP();Object.defineProperty(e,"SceneParcels",{enumerable:!0,get:function(){return n.SceneParcels}});var i=sF();Object.defineProperty(e,"Scene",{enumerable:!0,get:function(){return i.Scene}}),Object.defineProperty(e,"RequiredPermission",{enumerable:!0,get:function(){return i.RequiredPermission}});var a=HP();Object.defineProperty(e,"Source",{enumerable:!0,get:function(){return a.Source}});var s=VP();Object.defineProperty(e,"SpawnPoint",{enumerable:!0,get:function(){return s.SpawnPoint}})})(rf)),rf}var bi={},lf={},df={},kT;function GP(){return kT||(kT=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={}))})(df)),df}var UT;function zP(){return UT||(UT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.I18N=void 0;const t=Oe(),r=GP();(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={}))})(lf)),lf}var ff={},FT;function WP(){return FT||(FT=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={}))})(ff)),ff}var pf={},HT;function F_(){return HT||(HT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isStandard=e.standardProperties=void 0;const t=Kl(),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})(pf)),pf}var mf={},Ti={},hf={},VT;function uF(){return VT||(VT=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={}))})(hf)),hf}var GT;function YP(){return GT||(GT=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(uF(),e)})(Ti)),Ti}var yf={},zT;function H_(){return zT||(zT=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(p,E){if(!E||!E.from||!E.to)return!1;let{to:T,from:S}=E;return(typeof S!="bigint"||typeof T!="bigint")&&(S=BigInt(S),T=BigInt(T)),S<=T},errors:!1},d.schema={type:"object",properties:{type:{type:"string",const:r.RANGE},from:{type:"string",pattern:"^[0-9]+$"},to:{type:"string",pattern:"^[0-9]+$"}},required:["type","from","to"],additionalProperties:!1,_fromLessThanOrEqualTo:!0},d.validate=(0,t.generateLazyValidator)(d.schema,[d._fromLessThanOrEqualTo])})(s=e.RangeMapping||(e.RangeMapping={}));var o;(function(d){d.schema={type:"object",properties:{type:{type:"string",const:r.MULTIPLE},ids:{type:"array",items:{type:"string",pattern:"^[0-9]+$"},minItems:1,uniqueItems:!0}},required:["type","ids"],additionalProperties:!1},d.validate=(0,t.generateLazyValidator)(d.schema)})(o=e.MultipleMapping||(e.MultipleMapping={}));var u;(function(d){d.schema={type:"object",properties:{type:{type:"string",enum:Object.values(r)}},required:["type"],oneOf:[i.schema,a.schema,s.schema,o.schema]},d.validate=(0,t.generateLazyValidator)(d.schema,[s._fromLessThanOrEqualTo])})(u=e.Mapping||(e.Mapping={})),(function(d){d._isMappingsValid={keyword:"_isMappingsValid",validate:function(p,E){try{c(E)}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 m=Object.values(n).reduce((p,E)=>(p[E]=d.innerSchema,p),{});d.schema={type:"object",properties:m,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(m,p,E){super(m),this.existingMapping=p,this.conflictingMapping=E}}e.AddMappingError=l;function c(d={}){const m={};for(const[h,I]of Object.entries(d)){m[h]={};for(const[O,P]of Object.entries(I))for(const B of P)_(h,O,B)}function p(){return JSON.parse(JSON.stringify(m))}function E(h,I,O){const P=BigInt(h);return P>=BigInt(I)&&P<=BigInt(O)}function T(h,I){switch(I.type){case r.SINGLE:return h.id===I.id;case r.MULTIPLE:return I.ids.includes(h.id);case r.RANGE:return E(h.id,I.from,I.to);default:return!1}}function S(h,I){switch(I.type){case r.SINGLE:return h.ids.includes(I.id);case r.MULTIPLE:return h.ids.some(O=>I.ids.includes(O));case r.RANGE:return h.ids.some(O=>E(O,I.from,I.to));default:return!1}}function A(h,I){switch(I.type){case r.SINGLE:return E(I.id,h.from,h.to);case r.MULTIPLE:return I.ids.some(O=>E(O,h.from,h.to));case r.RANGE:return BigInt(h.from)<=BigInt(I.to)&&BigInt(h.to)>=BigInt(I.from)}}function f(h,I){if(h.type===r.ANY||I.type===r.ANY)return!0;switch(h.type){case r.SINGLE:return T(h,I);case r.MULTIPLE:return S(h,I);case r.RANGE:return A(h,I)}}function _(h,I,O){var P,B;const z=I.toLowerCase();m[h]=(P=m[h])!==null&&P!==void 0?P:{},m[h][z]=(B=m[h][z])!==null&&B!==void 0?B:[];for(const Y of m[h][z])if(f(Y,O))throw new l(`Cannot add mapping to contract ${z} on network ${h} because it overlaps with existing mapping`,Y,O);m[h][z].push(O)}function b(h,I,O){var P;return!((P=m[h])===null||P===void 0)&&P[I]?m[h][I].some(B=>{switch(B.type){case r.SINGLE:return B.id===O;case r.ANY:return!0;case r.MULTIPLE:return B.ids.includes(O);case r.RANGE:return BigInt(O)>=BigInt(B.from)&&BigInt(O)<=BigInt(B.to)}}):!1}return{addMapping:_,getMappings:p,includesNft:b}}e.createMappingsHelper=c})(yf)),yf}var WT;function V_(){return WT||(WT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.schema=void 0;const t=Oe(),r=YP(),n=H_();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})(mf)),mf}var gf={},_f={},Fr={},YT;function xP(){if(YT)return Fr;YT=1,Object.defineProperty(Fr,"__esModule",{value:!0}),Fr.isBaseEmote=Fr.isBaseAvatar=Fr.requiredBaseItemProps=Fr.baseItemProperties=void 0;const e=zP(),t=WP(),r=U_();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 xT;function cF(){return xT||(xT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Wearable=void 0;const t=Oe(),r=ba(),n=k_(),i=xP(),a=F_(),s=V_(),o=B_(),u=H_(),l=Xl();(function(c){c.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},i.baseItemProperties),a.standardProperties),s.schema.properties.thirdPartyProps),{data:{type:"object",properties:{replaces:{type:"array",items:o.HideableWearableCategory.schema},hides:{type:"array",items:o.HideableWearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.WearableRepresentation.schema,minItems:1},category:r.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:o.HideableWearableCategory.schema},blockVrmExport:{type:"boolean",nullable:!0},outlineCompatible:{type:"boolean",nullable:!0},springBones:Object.assign(Object.assign({},l.SpringBonesData.schema),{nullable:!0})},required:["replaces","hides","tags","representations","category"]}}),additionalProperties:!0,required:[],oneOf:[{required:["id","i18n"],prohibited:["merkleProof","content","collectionAddress","rarity","mappings"],_isBaseAvatar:!0},{required:[...i.requiredBaseItemProps,"data","collectionAddress","rarity"],prohibited:["merkleProof","content","mappings"]},{required:[...i.requiredBaseItemProps,"data","merkleProof","content"],prohibited:["collectionAddress","rarity"],_isThirdParty:!0}],errorMessage:{oneOf:"either standard XOR thirdparty properties conditions must be met"}};const d={keyword:"_isThirdParty",validate:(p,E)=>!p||(0,s.isThirdParty)(E),errors:!1},m={keyword:"_isBaseAvatar",validate:(p,E)=>!p||(0,i.isBaseAvatar)(E),errors:!1};c.validate=(0,t.generateLazyValidator)(c.schema,[d,m,u.RangeMapping._fromLessThanOrEqualTo,u.Mappings._isMappingsValid])})(e.Wearable||(e.Wearable={}))})(_f)),_f}var KT;function lF(){return KT||(KT=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=k_();Object.defineProperty(e,"WearableRepresentation",{enumerable:!0,get:function(){return t.WearableRepresentation}});var r=cF();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=qP();Object.defineProperty(e,"BodyPartCategory",{enumerable:!0,get:function(){return i.BodyPartCategory}});var a=B_();Object.defineProperty(e,"HideableWearableCategory",{enumerable:!0,get:function(){return a.HideableWearableCategory}});var s=Xl();Object.defineProperty(e,"SpringBoneParams",{enumerable:!0,get:function(){return s.SpringBoneParams}}),Object.defineProperty(e,"SpringBonesData",{enumerable:!0,get:function(){return s.SpringBonesData}})})(gf)),gf}var Ef={},vf={},bf={},Tf={},XT;function KP(){return XT||(XT=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={}))})(Tf)),Tf}var Sf={},JT;function XP(){return JT||(JT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteRepresentationADR74=void 0;const t=Oe(),r=q_();(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={}))})(Sf)),Sf}var If={},QT;function JP(){return QT||(QT=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={}))})(If)),If}var ZT;function QP(){return ZT||(ZT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteDataADR74=void 0;const t=KP(),r=Oe(),n=XP(),i=JP();(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={}))})(bf)),bf}var eS;function dF(){return eS||(eS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Emote=void 0;const t=ZP(),r=Oe(),n=xP(),i=F_(),a=V_(),s=QP();(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={}))})(vf)),vf}var Rf={},tS;function fF(){return tS||(tS=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={}))})(Rf)),Rf}var wf={},rS;function pF(){return rS||(rS=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={}))})(wf)),wf}var nS;function mF(){return nS||(nS=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=dF();Object.defineProperty(e,"Emote",{enumerable:!0,get:function(){return t.Emote}});var r=XP();Object.defineProperty(e,"EmoteRepresentationADR74",{enumerable:!0,get:function(){return r.EmoteRepresentationADR74}});var n=QP();Object.defineProperty(e,"EmoteDataADR74",{enumerable:!0,get:function(){return n.EmoteDataADR74}});var i=JP();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=KP();Object.defineProperty(e,"EmoteCategory",{enumerable:!0,get:function(){return a.EmoteCategory}});var s=fF();Object.defineProperty(e,"EmotePlayMode",{enumerable:!0,get:function(){return s.EmotePlayMode}});var o=pF();Object.defineProperty(e,"EmoteOutcomeType",{enumerable:!0,get:function(){return o.EmoteOutcomeType}})})(Ef)),Ef}var iS;function ZP(){return iS||(iS=1,(function(e){var t=bi&&bi.__createBinding||(Object.create?(function(l,c,d,m){m===void 0&&(m=d);var p=Object.getOwnPropertyDescriptor(c,d);(!p||("get"in p?!c.__esModule:p.writable||p.configurable))&&(p={enumerable:!0,get:function(){return c[d]}}),Object.defineProperty(l,m,p)}):(function(l,c,d,m){m===void 0&&(m=d),l[m]=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=zP();Object.defineProperty(e,"I18N",{enumerable:!0,get:function(){return n.I18N}});var i=GP();Object.defineProperty(e,"Locale",{enumerable:!0,get:function(){return i.Locale}});var a=WP();Object.defineProperty(e,"Metrics",{enumerable:!0,get:function(){return a.Metrics}});var s=q_();Object.defineProperty(e,"BodyShape",{enumerable:!0,get:function(){return s.BodyShape}});var o=F_();Object.defineProperty(e,"isStandard",{enumerable:!0,get:function(){return o.isStandard}});var u=V_();Object.defineProperty(e,"isThirdParty",{enumerable:!0,get:function(){return u.isThirdParty}}),r(H_(),e),r(lF(),e),r(mF(),e)})(bi)),bi}var Af={},Of={},aS;function Jo(){return aS||(aS=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={}))})(Of)),Of}var sS;function hF(){return sS||(sS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PointerChangesSyncDeployment=e.SnapshotSyncDeployment=void 0;const t=Ta(),r=Jo(),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={}))})(Af)),Af}var Nf={},Pf={},oS;function eC(){return oS||(oS=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={}))})(Pf)),Pf}var uS;function tC(){return uS||(uS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Entity=e.EntityType=void 0;const t=Ta(),r=eC(),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={}))})(Nf)),Nf}var Cf={},cS;function yF(){return cS||(cS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeploymentWithAuthChain=void 0;const t=Jo(),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={}))})(Cf)),Cf}var Si={},Mf={},lS;function gF(){return lS||(lS=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={}))})(Mf)),Mf}var dS;function _F(){return dS||(dS=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(gF(),e)})(Si)),Si}var Ii={},Df={},fS;function rC(){return fS||(fS=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={}))})(Df)),Df}var jf={},Lf={},pS;function nC(){return pS||(pS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SubscriptionDetails=void 0;const t=Oe(),r=rC(),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={}))})(Lf)),Lf}var $f={},mS;function iC(){return mS||(mS=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={}))})($f)),$f}var hS;function EF(){return hS||(hS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Subscription=void 0;const t=Oe(),r=nC(),n=Ta(),i=iC();(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={}))})(jf)),jf}var yS;function vF(){return yS||(yS=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(rC(),e),r(EF(),e),r(nC(),e)})(Ii)),Ii}var Ri={},qf={},gS;function _r(){return gS||(gS=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={}))})(qf)),qf}var Bf={},_S;function bF(){return _S||(_S=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={}))})(Bf)),Bf}var kf={},ES;function TF(){return ES||(ES=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalystDeploymentEvent=void 0;const t=Jo(),r=Oe(),n=tC(),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={}))})(kf)),kf}var Uf={},vS;function SF(){return vS||(vS=1,Object.defineProperty(Uf,"__esModule",{value:!0})),Uf}var Ff={},bS;function IF(){return bS||(bS=1,Object.defineProperty(Ff,"__esModule",{value:!0})),Ff}var Hf={},TS;function RF(){return TS||(TS=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={}))})(Hf)),Hf}var Vf={},$s={},SS;function Jl(){if(SS)return $s;SS=1,Object.defineProperty($s,"__esModule",{value:!0}),$s.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 $s.createEventSchema=e,$s}var IS;function wF(){return IS||(IS=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=Jl(),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={}))})(Vf)),Vf}var Gf={},RS;function AF(){return RS||(RS=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={}))})(Gf)),Gf}var zf={},wS;function OF(){return wS||(wS=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=Jl(),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={}))})(zf)),zf}var Wf={},AS;function NF(){return AS||(AS=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={}))})(Wf)),Wf}var Yf={},OS;function PF(){return OS||(OS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ReferralNewTierReachedEvent=e.ReferralInvitedUsersAcceptedEvent=void 0;const t=Oe(),r=_r(),n=Jl(),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={}))})(Yf)),Yf}var xf={},NS;function CF(){return NS||(NS=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 Kf={},PS;function MF(){return PS||(PS=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={}))})(Kf)),Kf}var Xf={},CS;function DF(){return CS||(CS=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={}))})(Xf)),Xf}var Jf={},MS;function jF(){return MS||(MS=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=Jl(),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={}))})(Jf)),Jf}var Qf={},DS;function LF(){return DS||(DS=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=Jo(),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={}))})(Qf)),Qf}var Zf={},jS;function $F(){return jS||(jS=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={}))})(Zf)),Zf}var LS;function qF(){return LS||(LS=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(bF(),e),r(TF(),e),r(SF(),e),r(IF(),e),r(RF(),e),r(wF(),e),r(AF(),e),r(OF(),e),r(NF(),e),r(PF(),e),r(CF(),e),r(MF(),e),r(DF(),e),r(jF(),e),r(LF(),e),r($F(),e)})(Ri)),Ri}var $S;function G_(){return $S||($S=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(aF(),e),r(oF(),e),r(ZP(),e),r(U_(),e),r(YP(),e),r(hF(),e),r(tC(),e),r(yF(),e),r(_F(),e),r(vF(),e),r(qF(),e)})(Ei)),Ei}var qS;function BF(){return qS||(qS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableJson=void 0;const t=Kl(),r=ba(),n=Xl(),i=k_(),a=Oe(),s=G_();(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={}))})(zd)),zd}var BS;function kF(){return BS||(BS=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(nF(),e),r(BF(),e)})(_i)),_i}var kS;function UF(){return kS||(kS=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(rF(),e),r(kF(),e)})(fi)),fi}var wi={},ep={},US;function FF(){return US||(US=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={}))})(ep)),ep}var tp={},rp={},FS;function aC(){return FS||(FS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getChainId=e.ChainName=void 0;const t=Oe(),r=en();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={}))})(rp)),rp}var np={},HS;function Zr(){return HS||(HS=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={}))})(np)),np}var VS;function en(){return VS||(VS=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=aC(),n=Zr();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={}))})(tp)),tp}var ip={},GS;function HF(){return GS||(GS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Collection=e.CollectionSortBy=void 0;const t=Oe(),r=en(),n=Zr();(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={}))})(ip)),ip}var ap={},sp={},zS;function Ql(){return zS||(zS=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={}))})(sp)),sp}var WS;function VF(){return WS||(WS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Contract=e.ContractSortBy=void 0;const t=Oe(),r=en(),n=Zr(),i=Ql();(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={}))})(ap)),ap}var op={},up={},YS;function sC(){return YS||(YS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFT=e.NFTSortBy=void 0;const t=Oe(),r=en(),n=G_(),i=Zr(),a=Ql(),s=Kl(),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={}))})(up)),up}var xS;function GF(){return xS||(xS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Item=e.ItemSortBy=void 0;const t=Oe(),r=en(),n=Zr(),i=sC(),a=Ql();(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={}))})(op)),op}var cp={},KS;function z_(){return KS||(KS=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={}))})(cp)),cp}var lp={},XS;function zF(){return XS||(XS=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={}))})(lp)),lp}var dp={},JS;function WF(){return JS||(JS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Mint=e.MintSortBy=void 0;const t=Oe(),r=en(),n=Zr();(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={}))})(dp)),dp}var fp={},QS;function YF(){return QS||(QS=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={}))})(fp)),fp}var pp={},ZS;function xF(){return ZS||(ZS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Order=e.OrderSortBy=void 0;const t=Oe(),r=en(),n=z_(),i=Zr();(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={}))})(pp)),pp}var mp={},eI;function KF(){return eI||(eI=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={}))})(mp)),mp}var hp={},tI;function oC(){return tI||(tI=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={}))})(hp)),hp}var yp={},rI;function XF(){return rI||(rI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Sale=e.SaleSortBy=void 0;const t=Oe(),r=en(),n=oC(),i=Zr();(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={}))})(yp)),yp}var gp={},nI;function JF(){return nI||(nI=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=en(),n=Zr();(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={}))})(gp)),gp}var _p={},iI;function QF(){return iI||(iI=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={}))})(_p)),_p}var Ep={},aI;function ZF(){return aI||(aI=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={}))})(Ep)),Ep}var vp={},sI;function eH(){return sI||(sI=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={}))})(vp)),vp}var bp={},oI;function tH(){return oI||(oI=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={}))})(bp)),bp}var Tp={},uI;function rH(){return uI||(uI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Bid=e.BidSortBy=void 0;const t=Oe(),r=en(),n=z_(),i=Zr();(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={}))})(Tp)),Tp}var Sp={},cI;function nH(){return cI||(cI=1,Object.defineProperty(Sp,"__esModule",{value:!0})),Sp}var Ip={},lI;function iH(){return lI||(lI=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={}))})(Ip)),Ip}var Ai={},Rp={},dI;function aH(){return dI||(dI=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={}))})(Rp)),Rp}var wp={},fI;function sH(){return fI||(fI=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={}))})(wp)),wp}var Ap={},pI;function oH(){return pI||(pI=1,Object.defineProperty(Ap,"__esModule",{value:!0})),Ap}var Op={},mI;function uH(){return mI||(mI=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={}))})(Op)),Op}var Np={},hI;function cH(){return hI||(hI=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={}))})(Np)),Np}var Pp={},yI;function lH(){return yI||(yI=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})(Pp)),Pp}var Cp={},gI;function dH(){return gI||(gI=1,Object.defineProperty(Cp,"__esModule",{value:!0})),Cp}var Mp={},_I;function fH(){return _I||(_I=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={}))})(Mp)),Mp}var Dp={},EI;function pH(){return EI||(EI=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={}))})(Dp)),Dp}var jp={},vI;function mH(){return vI||(vI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpringBoneParams=void 0;var t=Xl();Object.defineProperty(e,"SpringBoneParams",{enumerable:!0,get:function(){return t.SpringBoneParams}})})(jp)),jp}var Lp={},bI;function hH(){return bI||(bI=1,Object.defineProperty(Lp,"__esModule",{value:!0})),Lp}var $p={},TI;function yH(){return TI||(TI=1,Object.defineProperty($p,"__esModule",{value:!0})),$p}var qp={},SI;function gH(){return SI||(SI=1,Object.defineProperty(qp,"__esModule",{value:!0})),qp}var Bp={},II;function _H(){return II||(II=1,Object.defineProperty(Bp,"__esModule",{value:!0})),Bp}var kp={},RI;function EH(){return RI||(RI=1,Object.defineProperty(kp,"__esModule",{value:!0})),kp}var Up={},wI;function vH(){return wI||(wI=1,Object.defineProperty(Up,"__esModule",{value:!0})),Up}var Fp={},AI;function bH(){return AI||(AI=1,Object.defineProperty(Fp,"__esModule",{value:!0})),Fp}var Hp={},OI;function TH(){return OI||(OI=1,Object.defineProperty(Hp,"__esModule",{value:!0})),Hp}var NI;function SH(){return NI||(NI=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(aH(),e),r(sH(),e),r(oH(),e),r(uH(),e),r(cH(),e),r(lH(),e),r(dH(),e),r(fH(),e),r(pH(),e),r(mH(),e),r(hH(),e),r(yH(),e),r(gH(),e),r(_H(),e),r(EH(),e),r(vH(),e),r(bH(),e),r(TH(),e)})(Ai)),Ai}var Oi={},qs={},PI;function IH(){if(PI)return qs;PI=1,Object.defineProperty(qs,"__esModule",{value:!0}),qs.isSysLink=void 0;const e=t=>t!==null&&typeof t=="object"&&"sys"in t&&"id"in t.sys;return qs.isSysLink=e,qs}var Bs={},CI;function RH(){if(CI)return Bs;CI=1,Object.defineProperty(Bs,"__esModule",{value:!0}),Bs.ContentfulLocale=void 0;var e;return(function(t){t.enUS="en-US",t.es="es",t.zh="zh"})(e||(e={})),Bs.ContentfulLocale=e,Bs}var Vp={},MI;function wH(){return MI||(MI=1,Object.defineProperty(Vp,"__esModule",{value:!0})),Vp}var DI;function AH(){return DI||(DI=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(IH(),e),r(RH(),e),r(wH(),e)})(Oi)),Oi}var jI;function OH(){return jI||(jI=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=FF();Object.defineProperty(e,"Account",{enumerable:!0,get:function(){return n.Account}}),Object.defineProperty(e,"AccountSortBy",{enumerable:!0,get:function(){return n.AccountSortBy}});var i=en();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=aC();Object.defineProperty(e,"ChainName",{enumerable:!0,get:function(){return a.ChainName}}),Object.defineProperty(e,"getChainId",{enumerable:!0,get:function(){return a.getChainId}});var s=HF();Object.defineProperty(e,"Collection",{enumerable:!0,get:function(){return s.Collection}}),Object.defineProperty(e,"CollectionSortBy",{enumerable:!0,get:function(){return s.CollectionSortBy}});var o=VF();Object.defineProperty(e,"Contract",{enumerable:!0,get:function(){return o.Contract}}),Object.defineProperty(e,"ContractSortBy",{enumerable:!0,get:function(){return o.ContractSortBy}});var u=GF();Object.defineProperty(e,"Item",{enumerable:!0,get:function(){return u.Item}}),Object.defineProperty(e,"ItemSortBy",{enumerable:!0,get:function(){return u.ItemSortBy}});var l=z_();Object.defineProperty(e,"ListingStatus",{enumerable:!0,get:function(){return l.ListingStatus}});var c=zF();Object.defineProperty(e,"MetaTransaction",{enumerable:!0,get:function(){return c.MetaTransaction}});var d=WF();Object.defineProperty(e,"Mint",{enumerable:!0,get:function(){return d.Mint}}),Object.defineProperty(e,"MintSortBy",{enumerable:!0,get:function(){return d.MintSortBy}});var m=Zr();Object.defineProperty(e,"Network",{enumerable:!0,get:function(){return m.Network}});var p=Ql();Object.defineProperty(e,"NFTCategory",{enumerable:!0,get:function(){return p.NFTCategory}});var E=sC();Object.defineProperty(e,"NFT",{enumerable:!0,get:function(){return E.NFT}}),Object.defineProperty(e,"NFTSortBy",{enumerable:!0,get:function(){return E.NFTSortBy}});var T=YF();Object.defineProperty(e,"CatalogSortBy",{enumerable:!0,get:function(){return T.CatalogSortBy}}),Object.defineProperty(e,"CatalogSortDirection",{enumerable:!0,get:function(){return T.CatalogSortDirection}});var S=xF();Object.defineProperty(e,"Order",{enumerable:!0,get:function(){return S.Order}}),Object.defineProperty(e,"OrderSortBy",{enumerable:!0,get:function(){return S.OrderSortBy}});var A=KF();Object.defineProperty(e,"ProviderType",{enumerable:!0,get:function(){return A.ProviderType}});var f=Kl();Object.defineProperty(e,"Rarity",{enumerable:!0,get:function(){return f.Rarity}});var _=oC();Object.defineProperty(e,"SaleType",{enumerable:!0,get:function(){return _.SaleType}});var b=XF();Object.defineProperty(e,"Sale",{enumerable:!0,get:function(){return b.Sale}}),Object.defineProperty(e,"SaleSortBy",{enumerable:!0,get:function(){return b.SaleSortBy}});var h=JF();Object.defineProperty(e,"RentalStatus",{enumerable:!0,get:function(){return h.RentalStatus}}),Object.defineProperty(e,"RentalsListingSortDirection",{enumerable:!0,get:function(){return h.RentalsListingSortDirection}}),Object.defineProperty(e,"RentalsListingsFilterByCategory",{enumerable:!0,get:function(){return h.RentalsListingsFilterByCategory}}),Object.defineProperty(e,"RentalsListingsSortBy",{enumerable:!0,get:function(){return h.RentalsListingsSortBy}}),Object.defineProperty(e,"RentalListingCreation",{enumerable:!0,get:function(){return h.RentalListingCreation}}),Object.defineProperty(e,"PeriodCreation",{enumerable:!0,get:function(){return h.PeriodCreation}});var I=QF();Object.defineProperty(e,"AnalyticsDayDataSortBy",{enumerable:!0,get:function(){return I.AnalyticsDayDataSortBy}});var O=ZF();Object.defineProperty(e,"Store",{enumerable:!0,get:function(){return O.Store}});var P=eH();Object.defineProperty(e,"WearableGender",{enumerable:!0,get:function(){return P.WearableGender}}),Object.defineProperty(e,"GenderFilterOption",{enumerable:!0,get:function(){return P.GenderFilterOption}});var B=tH();Object.defineProperty(e,"World",{enumerable:!0,get:function(){return B.World}}),Object.defineProperty(e,"getWorld",{enumerable:!0,get:function(){return B.getWorld}}),Object.defineProperty(e,"isInsideWorldLimits",{enumerable:!0,get:function(){return B.isInsideWorldLimits}}),r(rH(),e),r(nH(),e),r(iH(),e),r(SH(),e),r(AH(),e)})(wi)),wi}var Gp={},LI;function NH(){return LI||(LI=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={}))})(Gp)),Gp}var Ni={},zp={},ks={},$I;function uC(){if($I)return ks;$I=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 qI;function PH(){return qI||(qI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Parcel=e.PARCEL_LIMITS=void 0;const t=Oe(),r=uC();e.PARCEL_LIMITS={minX:-150,maxX:150,minY:-150,maxY:150},(function(n){n._isInLimits={keyword:"_isInLimits",validate:function(p,E){return!E||typeof E.x!="number"||typeof E.y!="number"?!1:o(E)||(0,r.isInExceptionBlock)(E.x,E.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:m,y:p}){return`${m},${p}`}n.parcelToString=i;function a(m){const p=m.match(/^(-?\d+),(-?\d+)$/);if(!p)return null;const[,E,T]=p,S=parseInt(E,10),A=parseInt(T,10);return{x:S,y:A}}n.stringToParcel=a;function s(m){const p=a(m);return p?n.validate(p):!1}n.isParcelStringValid=s;function o(m){const{x:p,y:E}=m;return p>=e.PARCEL_LIMITS.minX&&p<=e.PARCEL_LIMITS.maxX&&E>=e.PARCEL_LIMITS.minY&&E<=e.PARCEL_LIMITS.maxY}n.isInStandardBounds=o;function u(m){return(0,r.isInExceptionBlock)(m.x,m.y)}n.isExceptionParcel=u;function l(m){return o(m)||u(m)}n.isInBounds=l;function c(m){return n.validate(m)}n.isValid=c;function d(m){const p=a(m);return p?n.validate(p):!1}n.isValidString=d})(e.Parcel||(e.Parcel={}))})(zp)),zp}var Pi={},BI;function CH(){if(BI)return Pi;BI=1,Object.defineProperty(Pi,"__esModule",{value:!0}),Pi.validateUrlInstance=Pi.validateUrl=void 0;const e={allowLocalhost:!1,allowedPorts:[]};function t(p,E=2){let T=p;for(let S=0;S<E;S++)try{T=decodeURIComponent(T)}catch{break}return T.normalize("NFKC")}function r(p){return/[\u0000-\u001F\u007F-\u009F\u202A-\u202E\u2066-\u2069]/.test(p)}function n(p){return!!(p.username||p.password)}function i(p){return/\\/.test(p)}const a=["80","443"];function s(p,E){return!!p.port&&!E.includes(p.port)}function o(p){const E=p.toLowerCase();return!!(E==="localhost"||E.endsWith(".local")||/^(127\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.|192\.168\.|169\.254\.)/.test(E)||E==="::1"||E==="[::1]"||E.startsWith("fe80:")||E.startsWith("fc00:"))}function u(p){if(p.startsWith("//"))return null;try{return{url:new URL(p),wasRelative:!1}}catch{try{return{url:new URL(p,"https://example.com"),wasRelative:!0}}catch{return null}}}function l(p){const E=t(String(p).toLowerCase());return!(r(E)||i(E))}function c(p){return!(!p||p.includes("..")||p.includes("//")||r(p)||i(p))}function d(p,E={}){const T=Object.assign(Object.assign({},e),E),S=[...a,...T.allowedPorts];if(!p||p.length===0||p.length>4096||r(p)||i(p))return!1;const A=t(p);if(r(A)||i(A)||p.startsWith("//"))return!1;const f=u(p);if(!f)return!1;const{url:_,wasRelative:b}=f;if(_.protocol!=="http:"&&_.protocol!=="https:"&&_.protocol!==""||n(_)||i(p)||i(_.href)||!b&&(s(_,S)||!T.allowLocalhost&&_.hostname&&o(_.hostname))||!c(_.pathname)||_.pathname.length>2048)return!1;const h=Array.from(_.searchParams.entries());if(h.length>50||(_.search?_.search.startsWith("?")?_.search.length-1:_.search.length:0)>2048)return!1;for(const[O,P]of h)if(O.length===0||!l(O)||!l(P)||O.length>128||P.length>1024)return!1;return!(_.hash&&r(_.hash))}Pi.validateUrl=d;function m(p,E={}){return d(p.toString(),E)}return Pi.validateUrlInstance=m,Pi}var kI;function MH(){return kI||(kI=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(PH(),e),r(uC(),e),r(CH(),e)})(Ni)),Ni}var UI;function DH(){return UI||(UI=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(UF());e.sdk=a,i(Oe(),e),i(OH(),e),i(G_(),e),i(Ta(),e),i(NH(),e),i(Jo(),e),i(eC(),e),i(iC(),e),i(MH(),e)})(Br)),Br}var Hn=DH(),Ci={},Hr={},bo={exports:{}},jH=bo.exports,FI;function Zl(){return FI||(FI=1,(function(e,t){(function(r,n){n(t)})(jH,(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,R;const C=new Promise(((K,ee)=>{y=oe=>{K(oe),C.isPending=!1},R=oe=>{ee(oe),C.isPending=!1}})).catch((K=>Promise.reject(K)));return C.resolve=y,C.reject=R,"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 R="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 ml=="object"&&ml.versions&&ml.versions.node?K=ng: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],Me=[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,q,J){return function(H){return new lt(g,q,g).update(H)[J]()}},ir=function(g,q,J){return function(H,te){return new lt(g,q,te).update(H)[J]()}},Sn=function(g,q,J){return function(H,te,re,ae){return Xt["cshake"+g].update(H,te,re,ae)[J]()}},sn=function(g,q,J){return function(H,te,re,ae){return Xt["kmac"+g].update(H,te,re,ae)[J]()}},ar=function(g,q,J,H){for(var te=0;te<Kt.length;++te){var re=Kt[te];g[re]=q(J,H,re)}return g},on=function(g,q){var J=Rt(g,q,"hex");return J.create=function(){return new lt(g,q,g)},J.update=function(H){return J.create().update(H)},ar(J,Rt,g,q)},Gn=[{name:"keccak",padding:[1,256,65536,16777216],bits:qt,createMethod:on},{name:"sha3",padding:[6,1536,393216,100663296],bits:qt,createMethod:on},{name:"shake",padding:[31,7936,2031616,520093696],bits:Me,createMethod:function(g,q){var J=ir(g,q,"hex");return J.create=function(H){return new lt(g,q,H)},J.update=function(H,te){return J.create(te).update(H)},ar(J,ir,g,q)}},{name:"cshake",padding:He,bits:Me,createMethod:function(g,q){var J=It[g],H=Sn(g,0,"hex");return H.create=function(te,re,ae){return re||ae?new lt(g,q,te).bytepad([re,ae],J):Xt["shake"+g].create(te)},H.update=function(te,re,ae,pe){return H.create(re,ae,pe).update(te)},ar(H,Sn,g,q)}},{name:"kmac",padding:He,bits:Me,createMethod:function(g,q){var J=It[g],H=sn(g,0,"hex");return H.create=function(te,re,ae){return new Ar(g,q,re).bytepad(["KMAC",ae],J).bytepad([te],J)},H.update=function(te,re,ae,pe){return H.create(te,ae,pe).update(re)},ar(H,sn,g,q)}}],Xt={},In=[],sr=0;sr<Gn.length;++sr)for(var un=Gn[sr],Ae=un.bits,Rn=0;Rn<Ae.length;++Rn){var Na=un.name+"_"+Ae[Rn];if(In.push(Na),Xt[Na]=un.createMethod(Ae[Rn],un.padding),un.name!=="sha3"){var Pa=un.name+Ae[Rn];In.push(Pa),Xt[Pa]=Xt[Na]}}function lt(g,q,J){this.blocks=[],this.s=[],this.padding=q,this.outputBits=J,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=J>>5,this.extraBytes=(31&J)>>3;for(var H=0;H<50;++H)this.s[H]=0}function Ar(g,q,J){lt.call(this,g,q,J)}lt.prototype.update=function(g){if(this.finalized)throw new Error("finalize already called");var q,J=typeof g;if(J!=="string"){if(J!=="object")throw new Error(R);if(g===null)throw new Error(R);if(ve&&g.constructor===ArrayBuffer)g=new Uint8Array(g);else if(!(Array.isArray(g)||ve&&ArrayBuffer.isView(g)))throw new Error(R);q=!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(q)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,q){var J=255&g,H=1,te=[J];for(J=255&(g>>=8);J>0;)te.unshift(J),J=255&(g>>=8),++H;return q?te.push(H):te.unshift(H),this.update(te),te.length},lt.prototype.encodeString=function(g){var q,J=typeof g;if(J!=="string"){if(J!=="object")throw new Error(R);if(g===null)throw new Error(R);if(ve&&g.constructor===ArrayBuffer)g=new Uint8Array(g);else if(!(Array.isArray(g)||ve&&ArrayBuffer.isView(g)))throw new Error(R);q=!0}var H=0,te=g.length;if(q)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,q){for(var J=this.encode(q),H=0;H<g.length;++H)J+=this.encodeString(g[H]);var te=q-J%q,re=[];return re.length=te,this.update(re),this},lt.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var g=this.blocks,q=this.lastByteIndex,J=this.blockCount,H=this.s;if(g[q>>2]|=this.padding[3&q],this.lastByteIndex===this.byteCount)for(g[0]=g[J],q=1;q<J+1;++q)g[q]=0;for(g[J-1]|=2147483648,q=0;q<J;++q)H[q]^=g[q];k(H)}},lt.prototype.toString=lt.prototype.hex=function(){this.finalize();for(var g,q=this.blockCount,J=this.s,H=this.outputBlocks,te=this.extraBytes,re=0,ae=0,pe="";ae<H;){for(re=0;re<q&&ae<H;++re,++ae)g=J[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%q==0&&(k(J),re=0)}return te&&(g=J[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,q=this.blockCount,J=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<q&&ae<H;++re,++ae)ye[ae]=J[re];ae%q==0&&k(J)}return te&&(ye[re]=J[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,q,J=this.blockCount,H=this.s,te=this.outputBlocks,re=this.extraBytes,ae=0,pe=0,ye=[];pe<te;){for(ae=0;ae<J&&pe<te;++ae,++pe)g=pe<<2,q=H[ae],ye[g]=255&q,ye[g+1]=q>>8&255,ye[g+2]=q>>16&255,ye[g+3]=q>>24&255;pe%J==0&&k(H)}return re&&(g=pe<<2,q=H[ae],ye[g]=255&q,re>1&&(ye[g+1]=q>>8&255),re>2&&(ye[g+2]=q>>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 q,J,H,te,re,ae,pe,ye,he,Ce,Ve,Ye,it,wt,jt,et,dt,Ut,wn,zn,Wn,lr,cn,Jt,Ft,St,ou,uu,cu,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;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],q=(Ye=g[8]^g[18]^g[28]^g[38]^g[48])^(ae<<1|pe>>>31),J=(it=g[9]^g[19]^g[29]^g[39]^g[49])^(pe<<1|ae>>>31),g[0]^=q,g[1]^=J,g[10]^=q,g[11]^=J,g[20]^=q,g[21]^=J,g[30]^=q,g[31]^=J,g[40]^=q,g[41]^=J,q=te^(ye<<1|he>>>31),J=re^(he<<1|ye>>>31),g[2]^=q,g[3]^=J,g[12]^=q,g[13]^=J,g[22]^=q,g[23]^=J,g[32]^=q,g[33]^=J,g[42]^=q,g[43]^=J,q=ae^(Ce<<1|Ve>>>31),J=pe^(Ve<<1|Ce>>>31),g[4]^=q,g[5]^=J,g[14]^=q,g[15]^=J,g[24]^=q,g[25]^=J,g[34]^=q,g[35]^=J,g[44]^=q,g[45]^=J,q=ye^(Ye<<1|it>>>31),J=he^(it<<1|Ye>>>31),g[6]^=q,g[7]^=J,g[16]^=q,g[17]^=J,g[26]^=q,g[27]^=J,g[36]^=q,g[37]^=J,g[46]^=q,g[47]^=J,q=Ce^(te<<1|re>>>31),J=Ve^(re<<1|te>>>31),g[8]^=q,g[9]^=J,g[18]^=q,g[19]^=J,g[28]^=q,g[29]^=J,g[38]^=q,g[39]^=J,g[48]^=q,g[49]^=J,wt=g[0],jt=g[1],wu=g[11]<<4|g[10]>>>28,Au=g[10]<<4|g[11]>>>28,uu=g[20]<<3|g[21]>>>29,cu=g[21]<<3|g[20]>>>29,Uu=g[31]<<9|g[30]>>>23,Fu=g[30]<<9|g[31]>>>23,Tu=g[40]<<18|g[41]>>>14,Su=g[41]<<18|g[40]>>>14,mu=g[2]<<1|g[3]>>>31,hu=g[3]<<1|g[2]>>>31,et=g[13]<<12|g[12]>>>20,dt=g[12]<<12|g[13]>>>20,Ou=g[22]<<10|g[23]>>>22,Nu=g[23]<<10|g[22]>>>22,lu=g[33]<<13|g[32]>>>19,du=g[32]<<13|g[33]>>>19,Hu=g[42]<<2|g[43]>>>30,Vu=g[43]<<2|g[42]>>>30,ju=g[5]<<30|g[4]>>>2,Lu=g[4]<<30|g[5]>>>2,yu=g[14]<<6|g[15]>>>26,gu=g[15]<<6|g[14]>>>26,Ut=g[25]<<11|g[24]>>>21,wn=g[24]<<11|g[25]>>>21,Pu=g[34]<<15|g[35]>>>17,Cu=g[35]<<15|g[34]>>>17,fu=g[45]<<29|g[44]>>>3,pu=g[44]<<29|g[45]>>>3,Jt=g[6]<<28|g[7]>>>4,Ft=g[7]<<28|g[6]>>>4,$u=g[17]<<23|g[16]>>>9,qu=g[16]<<23|g[17]>>>9,_u=g[26]<<25|g[27]>>>7,Eu=g[27]<<25|g[26]>>>7,zn=g[36]<<21|g[37]>>>11,Wn=g[37]<<21|g[36]>>>11,Mu=g[47]<<24|g[46]>>>8,Du=g[46]<<24|g[47]>>>8,Iu=g[8]<<27|g[9]>>>5,Ru=g[9]<<27|g[8]>>>5,St=g[18]<<20|g[19]>>>12,ou=g[19]<<20|g[18]>>>12,Bu=g[29]<<7|g[28]>>>25,ku=g[28]<<7|g[29]>>>25,vu=g[38]<<8|g[39]>>>24,bu=g[39]<<8|g[38]>>>24,lr=g[48]<<14|g[49]>>>18,cn=g[49]<<14|g[48]>>>18,g[0]=wt^~et&Ut,g[1]=jt^~dt&wn,g[10]=Jt^~St&uu,g[11]=Ft^~ou&cu,g[20]=mu^~yu&_u,g[21]=hu^~gu&Eu,g[30]=Iu^~wu&Ou,g[31]=Ru^~Au&Nu,g[40]=ju^~$u&Bu,g[41]=Lu^~qu&ku,g[2]=et^~Ut&zn,g[3]=dt^~wn&Wn,g[12]=St^~uu&lu,g[13]=ou^~cu&du,g[22]=yu^~_u&vu,g[23]=gu^~Eu&bu,g[32]=wu^~Ou&Pu,g[33]=Au^~Nu&Cu,g[42]=$u^~Bu&Uu,g[43]=qu^~ku&Fu,g[4]=Ut^~zn&lr,g[5]=wn^~Wn&cn,g[14]=uu^~lu&fu,g[15]=cu^~du&pu,g[24]=_u^~vu&Tu,g[25]=Eu^~bu&Su,g[34]=Ou^~Pu&Mu,g[35]=Nu^~Cu&Du,g[44]=Bu^~Uu&Hu,g[45]=ku^~Fu&Vu,g[6]=zn^~lr&wt,g[7]=Wn^~cn&jt,g[16]=lu^~fu&Jt,g[17]=du^~pu&Ft,g[26]=vu^~Tu&mu,g[27]=bu^~Su&hu,g[36]=Pu^~Mu&Iu,g[37]=Cu^~Du&Ru,g[46]=Uu^~Hu&ju,g[47]=Fu^~Vu&Lu,g[8]=lr^~wt&et,g[9]=cn^~jt&dt,g[18]=fu^~Jt&St,g[19]=pu^~Ft&ou,g[28]=Tu^~mu&yu,g[29]=Su^~hu&gu,g[38]=Mu^~Iu&wu,g[39]=Du^~Ru&Au,g[48]=Hu^~ju&$u,g[49]=Vu^~Lu&qu,g[0]^=cr[H],g[1]^=cr[H+1]};if(oe)y.exports=Xt;else for(sr=0;sr<In.length;++sr)K[In[sr]]=Xt[In[sr]]})()})(o);var u=o.exports,l=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,c=Math.ceil,d=Math.floor,m="[BigNumber Error] ",p=m+"Number primitive has more than 15 significant digits: ",E=1e14,T=14,S=9007199254740991,A=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],f=1e7,_=1e9;function b(y){var R=0|y;return y>0||y===R?R:R-1}function h(y){for(var R,C,K=1,ee=y.length,oe=y[0]+"";K<ee;){for(R=y[K++]+"",C=T-R.length;C--;R="0"+R);oe+=R}for(ee=oe.length;oe.charCodeAt(--ee)===48;);return oe.slice(0,ee+1||1)}function I(y,R){var C,K,ee=y.c,oe=R.c,ve=y.s,Pe=R.s,He=y.e,Ge=R.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 O(y,R,C,K){if(y<R||y>C||y!==d(y))throw Error(m+(K||"Argument")+(typeof y=="number"?y<R||y>C?" out of range: ":" not an integer: ":" not a primitive number: ")+String(y))}function P(y){var R=y.c.length-1;return b(y.e/T)==R&&y.c[R]%2!=0}function B(y,R){return(y.length>1?y.charAt(0)+"."+y.slice(1):y)+(R<0?"e":"e+")+R}function z(y,R,C){var K,ee;if(R<0){for(ee=C+".";++R;ee+=C);y=ee+y}else if(++R>(K=y.length)){for(ee=C,R-=K;--R;ee+=C);y+=ee}else R<K&&(y=y.slice(0,R)+"."+y.slice(R));return y}var Y=(function y(R){var C,K,ee,oe,ve,Pe,He,Ge,cr,qt,Me=Ae.prototype={constructor:Ae,toString:null,valueOf:null},Kt=new Ae(1),It=20,Rt=4,ir=-7,Sn=21,sn=-1e7,ar=1e7,on=!1,Gn=1,Xt=0,In={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},sr="0123456789abcdefghijklmnopqrstuvwxyz",un=!0;function Ae(k,g){var q,J,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<sn?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(O(g,2,sr.length,"Base"),g==10&&un)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(p+k)}else he.s=ye.charCodeAt(0)===45?(ye=ye.slice(1),-1):1;for(q=sr.slice(0,g),te=re=0,pe=ye.length;re<pe;re++)if(q.indexOf(J=ye.charAt(re))<0){if(J=="."){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>S||k!==d(k)))throw Error(p+he.s*k);if((te=te-re-1)>ar)he.c=he.e=null;else if(te<sn)he.c=[he.e=0];else{if(he.e=te,he.c=[],re=(te+1)%T,te<0&&(re+=T),re<pe){for(re&&he.c.push(+ye.slice(0,re)),pe-=T;re<pe;)he.c.push(+ye.slice(re,re+=T));re=T-(ye=ye.slice(re)).length}else re-=pe;for(;re--;ye+="0");he.c.push(+ye)}}else he.c=[he.e=0]}function Rn(k,g,q,J){var H,te,re,ae,pe;if(q==null?q=Rt:O(q,0,8),!k.c)return k.toString();if(H=k.c[0],re=k.e,g==null)pe=h(k.c),pe=J==1||J==2&&(re<=ir||re>=Sn)?B(pe,re):z(pe,re,"0");else if(te=(k=lt(new Ae(k),g,q)).e,ae=(pe=h(k.c)).length,J==1||J==2&&(g<=te||te<=ir)){for(;ae<g;pe+="0",ae++);pe=B(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 q,J=1,H=new Ae(k[0]);J<k.length;J++){if(!(q=new Ae(k[J])).s){H=q;break}g.call(H,q)&&(H=q)}return H}function Pa(k,g,q){for(var J=1,H=g.length;!g[--H];g.pop());for(H=g[0];H>=10;H/=10,J++);return(q=J+q*T-1)>ar?k.c=k.e=null:q<sn?k.c=[k.e=0]:(k.e=q,k.c=g),k}function lt(k,g,q,J){var H,te,re,ae,pe,ye,he,Ce=k.c,Ve=A;if(Ce){e:{for(H=1,ae=Ce[0];ae>=10;ae/=10,H++);if((te=g-H)<0)te+=T,re=g,he=(pe=Ce[ye=0])/Ve[H-re-1]%10|0;else if((ye=c((te+1)/T))>=Ce.length){if(!J)break e;for(;Ce.length<=ye;Ce.push(0));pe=he=0,H=1,re=(te%=T)-T+1}else{for(pe=ae=Ce[ye],H=1;ae>=10;ae/=10,H++);he=(re=(te%=T)-T+H)<0?0:pe/Ve[H-re-1]%10|0}if(J=J||g<0||Ce[ye+1]!=null||(re<0?pe:pe%Ve[H-re-1]),J=q<4?(he||J)&&(q==0||q==(k.s<0?3:2)):he>5||he==5&&(q==4||J||q==6&&(te>0?re>0?pe/Ve[H-re]:0:Ce[ye-1])%10&1||q==(k.s<0?8:7)),g<1||!Ce[0])return Ce.length=0,J?(g-=k.e+1,Ce[0]=Ve[(T-g%T)%T],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[T-te],Ce[ye]=re>0?d(pe/Ve[H-re]%Ve[re])*ae:0),J)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]==E&&(Ce[0]=1));break}if(Ce[ye]+=ae,Ce[ye]!=E)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<sn&&(k.c=[k.e=0])}return k}function Ar(k){var g,q=k.e;return q===null?k.toString():(g=h(k.c),g=q<=ir||q>=Sn?B(g,q):z(g,q,"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,q;if(k!=null){if(typeof k!="object")throw Error(m+"Object expected: "+k);if(k.hasOwnProperty(g="DECIMAL_PLACES")&&(O(q=k[g],0,_,g),It=q),k.hasOwnProperty(g="ROUNDING_MODE")&&(O(q=k[g],0,8,g),Rt=q),k.hasOwnProperty(g="EXPONENTIAL_AT")&&((q=k[g])&&q.pop?(O(q[0],-_,0,g),O(q[1],0,_,g),ir=q[0],Sn=q[1]):(O(q,-_,_,g),ir=-(Sn=q<0?-q:q))),k.hasOwnProperty(g="RANGE"))if((q=k[g])&&q.pop)O(q[0],-_,-1,g),O(q[1],1,_,g),sn=q[0],ar=q[1];else{if(O(q,-_,_,g),!q)throw Error(m+g+" cannot be zero: "+q);sn=-(ar=q<0?-q:q)}if(k.hasOwnProperty(g="CRYPTO")){if((q=k[g])!==!!q)throw Error(m+g+" not true or false: "+q);if(q){if(typeof crypto>"u"||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw on=!q,Error(m+"crypto unavailable");on=q}else on=q}if(k.hasOwnProperty(g="MODULO_MODE")&&(O(q=k[g],0,9,g),Gn=q),k.hasOwnProperty(g="POW_PRECISION")&&(O(q=k[g],0,_,g),Xt=q),k.hasOwnProperty(g="FORMAT")){if(typeof(q=k[g])!="object")throw Error(m+g+" not an object: "+q);In=q}if(k.hasOwnProperty(g="ALPHABET")){if(typeof(q=k[g])!="string"||/^.?$|[+\-.\s]|(.).*\1/.test(q))throw Error(m+g+" invalid: "+q);un=q.slice(0,10)=="0123456789",sr=q}}return{DECIMAL_PLACES:It,ROUNDING_MODE:Rt,EXPONENTIAL_AT:[ir,Sn],RANGE:[sn,ar],CRYPTO:on,MODULO_MODE:Gn,POW_PRECISION:Xt,FORMAT:In,ALPHABET:sr}},Ae.isBigNumber=function(k){if(!k||k._isBigNumber!==!0)return!1;if(!Ae.DEBUG)return!0;var g,q,J=k.c,H=k.e,te=k.s;e:if({}.toString.call(J)=="[object Array]"){if((te===1||te===-1)&&H>=-_&&H<=_&&H===d(H)){if(J[0]===0){if(H===0&&J.length===1)return!0;break e}if((g=(H+1)%T)<1&&(g+=T),String(J[0]).length==g){for(g=0;g<J.length;g++)if((q=J[g])<0||q>=E||q!==d(q))break e;if(q!==0)return!0}}}else if(J===null&&H===null&&(te===null||te===1||te===-1))return!0;throw Error(m+"Invalid BigNumber: "+k)},Ae.maximum=Ae.max=function(){return Na(arguments,Me.lt)},Ae.minimum=Ae.min=function(){return Na(arguments,Me.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,q,J,H,te,re=0,ae=[],pe=new Ae(Kt);if(k==null?k=It:O(k,0,_),H=c(k/T),on)if(crypto.getRandomValues){for(g=crypto.getRandomValues(new Uint32Array(H*=2));re<H;)(te=131072*g[re]+(g[re+1]>>>11))>=9e15?(q=crypto.getRandomValues(new Uint32Array(2)),g[re]=q[0],g[re+1]=q[1]):(ae.push(te%1e14),re+=2);re=H/2}else{if(!crypto.randomBytes)throw on=!1,Error(m+"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(!on)for(;re<H;)(te=ve())<9e15&&(ae[re++]=te%1e14);for(H=ae[--re],k%=T,H&&k&&(te=A[T-k],ae[re]=d(H/te)*te);ae[re]===0;ae.pop(),re--);if(re<0)ae=[J=0];else{for(J=-1;ae[0]===0;ae.splice(0,1),J-=T);for(re=1,te=ae[0];te>=10;te/=10,re++);re<T&&(J-=T-re)}return pe.e=J,pe.c=ae,pe}),Ae.sum=function(){for(var k=1,g=arguments,q=new Ae(g[0]);k<g.length;)q=q.plus(g[k++]);return q},K=(function(){var k="0123456789";function g(q,J,H,te){for(var re,ae,pe=[0],ye=0,he=q.length;ye<he;){for(ae=pe.length;ae--;pe[ae]*=J);for(pe[0]+=te.indexOf(q.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(q,J,H,te,re){var ae,pe,ye,he,Ce,Ve,Ye,it,wt=q.indexOf("."),jt=It,et=Rt;for(wt>=0&&(he=Xt,Xt=0,q=q.replace(".",""),Ve=(it=new Ae(J)).pow(q.length-wt),Xt=he,it.c=g(z(h(Ve.c),Ve.e,"0"),10,H,k),it.e=it.c.length),ye=he=(Ye=g(q,J,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])q=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,q="";wt<=he;q+=ae.charAt(Ye[wt++]));q=z(q,ye,ae.charAt(0))}return q}})(),C=(function(){function k(J,H,te){var re,ae,pe,ye,he=0,Ce=J.length,Ve=H%f,Ye=H/f|0;for(J=J.slice();Ce--;)he=((ae=Ve*(pe=J[Ce]%f)+(re=Ye*pe+(ye=J[Ce]/f|0)*Ve)%f*f+he)/te|0)+(re/f|0)+Ye*ye,J[Ce]=ae%te;return he&&(J=[he].concat(J)),J}function g(J,H,te,re){var ae,pe;if(te!=re)pe=te>re?1:-1;else for(ae=pe=0;ae<te;ae++)if(J[ae]!=H[ae]){pe=J[ae]>H[ae]?1:-1;break}return pe}function q(J,H,te,re){for(var ae=0;te--;)J[te]-=ae,ae=J[te]<H[te]?1:0,J[te]=ae*re+J[te]-H[te];for(;!J[0]&&J.length>1;J.splice(0,1));}return function(J,H,te,re,ae){var pe,ye,he,Ce,Ve,Ye,it,wt,jt,et,dt,Ut,wn,zn,Wn,lr,cn,Jt=J.s==H.s?1:-1,Ft=J.c,St=H.c;if(!(Ft&&Ft[0]&&St&&St[0]))return new Ae(J.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=J.e-H.e)+1,ae||(ae=E,ye=b(J.e/T)-b(H.e/T),Jt=Jt/T|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),wn=lr,dt=(et=Ft.slice(0,lr)).length;dt<lr;et[dt++]=0);cn=St.slice(),cn=[0].concat(cn),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--,q(Ye,lr<it?cn: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)),q(et,Ye,dt,ae),dt=et.length,pe==-1)for(;g(St,et,lr,dt)<1;)Ve++,q(et,lr<dt?cn:St,dt,ae),dt=et.length}else pe===0&&(Ve++,et=[0]);jt[he++]=Ve,et[0]?et[dt++]=Ft[wn]||0:(et=[Ft[wn]],dt=1)}while((wn++<zn||et[0]!=null)&&Jt--);Ce=et[0]!=null,jt[0]||jt.splice(0,1)}if(ae==E){for(he=1,Jt=jt[0];Jt>=10;Jt/=10,he++);lt(wt,te+(wt.e=he+ye*T-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,q,J){var H,te=q?g:g.replace(qt,"");if(cr.test(te))k.s=isNaN(te)?null:te<0?-1:1;else{if(!q&&(te=te.replace(Pe,(function(re,ae,pe){return H=(pe=pe.toLowerCase())=="x"?16:pe=="b"?2:8,J&&J!=H?re:ae})),J&&(H=J,te=te.replace(He,"$1").replace(Ge,"0.$1")),g!=te))return new Ae(te,H);if(Ae.DEBUG)throw Error(m+"Not a"+(J?" base "+J:"")+" number: "+g);k.s=null}k.c=k.e=null},Me.absoluteValue=Me.abs=function(){var k=new Ae(this);return k.s<0&&(k.s=1),k},Me.comparedTo=function(k,g){return I(this,new Ae(k,g))},Me.decimalPlaces=Me.dp=function(k,g){var q,J,H,te=this;if(k!=null)return O(k,0,_),g==null?g=Rt:O(g,0,8),lt(new Ae(te),k+te.e+1,g);if(!(q=te.c))return null;if(J=((H=q.length-1)-b(this.e/T))*T,H=q[H])for(;H%10==0;H/=10,J--);return J<0&&(J=0),J},Me.dividedBy=Me.div=function(k,g){return C(this,new Ae(k,g),It,Rt)},Me.dividedToIntegerBy=Me.idiv=function(k,g){return C(this,new Ae(k,g),0,1)},Me.exponentiatedBy=Me.pow=function(k,g){var q,J,H,te,re,ae,pe,ye,he=this;if((k=new Ae(k)).c&&!k.isInteger())throw Error(m+"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);(J=!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/T+2))}for(re?(q=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):J&&(ye=ye.mod(g))}if(H){if((H=d(H/2))===0)break;pe=H%2}else if(lt(k=k.times(q),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):J&&(he=he.mod(g))}return J?ye:(ae&&(ye=Kt.div(ye)),g?ye.mod(g):te?lt(ye,Xt,Rt,void 0):ye)},Me.integerValue=function(k){var g=new Ae(this);return k==null?k=Rt:O(k,0,8),lt(g,g.e+1,k)},Me.isEqualTo=Me.eq=function(k,g){return I(this,new Ae(k,g))===0},Me.isFinite=function(){return!!this.c},Me.isGreaterThan=Me.gt=function(k,g){return I(this,new Ae(k,g))>0},Me.isGreaterThanOrEqualTo=Me.gte=function(k,g){return(g=I(this,new Ae(k,g)))===1||g===0},Me.isInteger=function(){return!!this.c&&b(this.e/T)>this.c.length-2},Me.isLessThan=Me.lt=function(k,g){return I(this,new Ae(k,g))<0},Me.isLessThanOrEqualTo=Me.lte=function(k,g){return(g=I(this,new Ae(k,g)))===-1||g===0},Me.isNaN=function(){return!this.s},Me.isNegative=function(){return this.s<0},Me.isPositive=function(){return this.s>0},Me.isZero=function(){return!!this.c&&this.c[0]==0},Me.minus=function(k,g){var q,J,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/T,ye=k.e/T,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(J=(te=(ae=he.length)<(g=Ce.length))?ae:g,ae=g=0;g<J;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=(J=Ce.length)-(q=he.length))>0)for(;g--;he[q++]=0);for(g=E-1;J>ae;){if(he[--J]<Ce[J]){for(q=J;q&&!he[--q];he[q]=g);--he[q],he[J]+=E}he[J]-=Ce[J]}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)},Me.modulo=Me.mod=function(k,g){var q,J,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?(J=k.s,k.s=1,q=C(H,k,0,3),k.s=J,q.s*=J):q=C(H,k,0,Gn),(k=H.minus(q.times(k))).c[0]||Gn!=1||(k.s=H.s),k)},Me.multipliedBy=Me.times=function(k,g){var q,J,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(J=b(et.e/T)+b(k.e/T),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=E,jt=f,H=Ce;--H>=0;){for(q=0,Ve=Ut[H]%jt,Ye=Ut[H]/jt|0,te=H+(re=pe);te>H;)q=((ye=Ve*(ye=dt[--re]%jt)+(ae=Ye*ye+(he=dt[re]/jt|0)*Ve)%jt*jt+it[te]+q)/wt|0)+(ae/jt|0)+Ye*he,it[te--]=ye%wt;it[te]=q}return q?++J:it.splice(0,1),Pa(k,it,J)},Me.negated=function(){var k=new Ae(this);return k.s=-k.s||null,k},Me.plus=function(k,g){var q,J=this,H=J.s;if(g=(k=new Ae(k,g)).s,!H||!g)return new Ae(NaN);if(H!=g)return k.s=-g,J.minus(k);var te=J.e/T,re=k.e/T,ae=J.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]?J:0*H)}if(te=b(te),re=b(re),ae=ae.slice(),H=te-re){for(H>0?(re=te,q=pe):(H=-H,q=ae),q.reverse();H--;q.push(0));q.reverse()}for((H=ae.length)-(g=pe.length)<0&&(q=pe,pe=ae,ae=q,g=H),H=0;g;)H=(ae[--g]=ae[g]+pe[g]+H)/E|0,ae[g]=E===ae[g]?0:ae[g]%E;return H&&(ae=[H].concat(ae),++re),Pa(k,ae,re)},Me.precision=Me.sd=function(k,g){var q,J,H,te=this;if(k!=null&&k!==!!k)return O(k,1,_),g==null?g=Rt:O(g,0,8),lt(new Ae(te),k,g);if(!(q=te.c))return null;if(J=(H=q.length-1)*T+1,H=q[H]){for(;H%10==0;H/=10,J--);for(H=q[0];H>=10;H/=10,J++);}return k&&te.e+1>J&&(J=te.e+1),J},Me.shiftedBy=function(k){return O(k,-9007199254740991,S),this.times("1e"+k)},Me.squareRoot=Me.sqrt=function(){var k,g,q,J,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=h(re)).length+pe)%2==0&&(g+="0"),ae=Math.sqrt(+g),pe=b((pe+1)/2)-(pe<0||pe%2),q=new Ae(g=ae==1/0?"5e"+pe:(g=ae.toExponential()).slice(0,g.indexOf("e")+1)+pe)):q=new Ae(ae+""),q.c[0]){for((ae=(pe=q.e)+ye)<3&&(ae=0);;)if(H=q,q=he.times(H.plus(C(te,H,ye,1))),h(H.c).slice(0,ae)===(g=h(q.c)).slice(0,ae)){if(q.e<pe&&--ae,(g=g.slice(ae-3,ae+1))!="9999"&&(J||g!="4999")){+g&&(+g.slice(1)||g.charAt(0)!="5")||(lt(q,q.e+It+2,1),k=!q.times(q).eq(te));break}if(!J&&(lt(H,H.e+It+2,0),H.times(H).eq(te))){q=H;break}ye+=4,ae+=4,J=1}}return lt(q,q.e+It+1,Rt,k)},Me.toExponential=function(k,g){return k!=null&&(O(k,0,_),k++),Rn(this,k,g,1)},Me.toFixed=function(k,g){return k!=null&&(O(k,0,_),k=k+this.e+1),Rn(this,k,g)},Me.toFormat=function(k,g,q){var J,H=this;if(q==null)k!=null&&g&&typeof g=="object"?(q=g,g=null):k&&typeof k=="object"?(q=k,k=g=null):q=In;else if(typeof q!="object")throw Error(m+"Argument not an object: "+q);if(J=H.toFixed(k,g),H.c){var te,re=J.split("."),ae=+q.groupSize,pe=+q.secondaryGroupSize,ye=q.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)}J=Ce?he+(q.decimalSeparator||"")+((pe=+q.fractionGroupSize)?Ce.replace(new RegExp("\\d{"+pe+"}\\B","g"),"$&"+(q.fractionGroupSeparator||"")):Ce):he}return(q.prefix||"")+J+(q.suffix||"")},Me.toFraction=function(k){var g,q,J,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(m+"Argument "+(ae.isInteger()?"out of range: ":"not an integer: ")+Ar(ae));if(!it)return new Ae(Ye);for(g=new Ae(Kt),ye=q=new Ae(Kt),J=pe=new Ae(Kt),Ve=h(it),te=g.e=Ve.length-Ye.e-1,g.c[0]=A[(re=te%T)<0?T+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=q.plus(he.times(J))).comparedTo(k)!=1;)q=J,J=H,ye=pe.plus(he.times(H=ye)),pe=H,g=ae.minus(he.times(H=g)),ae=H;return H=C(k.minus(q),J,0,1),pe=pe.plus(H.times(ye)),q=q.plus(H.times(J)),pe.s=ye.s=Ye.s,Ce=C(ye,J,te*=2,Rt).minus(Ye).abs().comparedTo(C(pe,q,te,Rt).minus(Ye).abs())<1?[ye,J]:[pe,q],ar=re,Ce},Me.toNumber=function(){return+Ar(this)},Me.toPrecision=function(k,g){return k!=null&&O(k,1,_),Rn(this,k,g,2)},Me.toString=function(k){var g,q=this,J=q.s,H=q.e;return H===null?J?(g="Infinity",J<0&&(g="-"+g)):g="NaN":(k==null?g=H<=ir||H>=Sn?B(h(q.c),H):z(h(q.c),H,"0"):k===10&&un?g=z(h((q=lt(new Ae(q),It+H+1,Rt)).c),q.e,"0"):(O(k,2,sr.length,"Base"),g=K(z(h(q.c),H,"0"),10,k,J,!0)),J<0&&q.c[0]&&(g="-"+g)),g},Me.valueOf=Me.toJSON=function(){return Ar(this)},Me._isBigNumber=!0,Me[Symbol.toStringTag]="BigNumber",Me[Symbol.for("nodejs.util.inspect.custom")]=Me.valueOf,R!=null&&Ae.set(R),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,R=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=R,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 R=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));R[C]=ee,C++}return R}function x(y){return Array.from(y).map((R=>R.toString(16).padStart(2,"0"))).join("")}function L(y,R){if(typeof y=="string"){if(R&&R.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,R,C){return new Array(R-y.length+1).join(C||"0")+y}function V(y){let R="",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);R+=String.fromCharCode(ee)}return R}function N(y){return w(y)&&y.name&&y.name.indexOf("(")!==-1?y.name:y.name+"("+Z(!1,y.inputs||[]).join(",")+")"}function j(...y){const R=y.reduce(((ee,oe)=>ee+oe.length),0),C=new Uint8Array(R);let K=0;for(const ee of y)C.set(ee,K),K+=ee.length;return C}function Z(y,R){const C=[];return R.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 R=y.indexOf("("),C=y.indexOf(")");return R!==-1&&C!==-1?y.substr(0,R):y}function _e(y){const R=y.indexOf("("),C=y.indexOf(")");return R!==-1&&C!==-1?y.substr(R+1,C-R-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 R=xe(y),C=R.toString(16);return R.isLessThan(0)?"-0x"+C.substr(1):"0x"+C}function we(y){if(G(y))return Te(+y);if(M(y))return Te(y);if(v(y)){const R=y;if(R.indexOf("-0x")===0)return Te(R);if(R.indexOf("0x")===0)return R;if(!isFinite(R))return x(U(R))}if(y instanceof Uint8Array)return"0x"+x(y);if(de(y)||w(y))throw new Error("toHex can only be called with scalar values, not objects or arrays");return Te(y)}function Fe(y){const R=y?y.toLowerCase():"ether",C=D[R];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 R=y||0;return M(R)?R:(typeof R=="string"&&(R=R.trim()),typeof R!="string"||R.indexOf("0x")!==0&&R.indexOf("-0x")!==0?R instanceof Uint8Array?new Y(x(R),16):new Y(R,10):new Y(R.replace("0x","").toLowerCase(),16))}function tt(y){return new Y(new Array(y).fill("1").join(""),2)}function Xe(y,R=256){const C=xe(y).integerValue();return C.isLessThan(0)?tt(R).plus(C).plus(1):C}function ut(y,R){return $(y.toString(2),R,"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,R=256){if(ut(y,R)){const C=tt(R);return y.minus(C).minus(1)}return y}function Gt(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 R=y.replace("0x",""),C=L(R.toLowerCase());for(let K=0;K<40;K++)if(parseInt(C[K],16)>7&&R[K].toUpperCase()!==R[K]||parseInt(C[K],16)<=7&&R[K].toLowerCase()!==R[K])return!1;return!0}function nr(y){if(y===void 0)return"";const R=y.toLowerCase().replace("0x",""),C=L(R);let K="0x";for(let ee=0;ee<R.length;ee++)parseInt(C[ee],16)>7?K+=R[ee].toUpperCase():K+=R[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 Gt(y)?y:/^[0-9a-f]{40}$/.test(y)?"0x"+y:"0x"+$(we(y).substr(2),40)}function M(y){return y instanceof Y}function v(y){return typeof y=="string"||y&&y.constructor&&y.constructor.name==="String"}function w(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,R){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:R||[]}}function Nt(y){return Array.isArray(y)?y.every(R):R(y);function R(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 Pt(y){return y==="latest"||y==="pending"||y==="earliest"}function nt(y){return y===void 0?"latest":zt(y)}function zt(y){return y==null?null:Pt(y)?y:we(y)}function ld(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 dd(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 ws(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 hE(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(R){return nu(R)}))),y.status=Ie(y.status||""),y):null}function As(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(R,C){v(R)||(y.transactions[C]=ws(R)||y.transactions[C])})),y):null}function nu(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(Gt(y))return y;if(bt(y))return"0x"+y;throw new Error(`Invalid address: ${JSON.stringify(y)}`)}function yE(y){return y}function gE(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 fd(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 R=y.match(/^(0x)?[0-9a-fA-F]*$/);if(!R)throw ne("invalid hexidecimal string",se,{arg:"value",value:y});if(R[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(R){if(!R||parseInt(String(R.length))!==R.length||typeof R=="string")return!1;for(let C=0;C<R.length;C++){const K=R[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 _E(y,R,C){Object.defineProperty(y,R,{enumerable:!0,value:C,writable:!1})}const pD=new Y(-1),mD=new Y(0),hD=new Y(1),EE=new Y("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function vE(y){return(function(R,C){function K(ve){return new Error('unexpected character "'+R[ve]+'" at position '+ve+' in "'+R+'"')}const ee={type:"",name:"",state:{allowType:!0}};let oe=ee;for(let ve=0;ve<R.length;ve++){const Pe=R[ve];switch(Pe){case"(":if(!oe.state.allowParams)throw K(ve);oe.state.allowType=!1,oe.type=Os(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=Os(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=Os(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=Os(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=Os(ee.type),ee})(y)}function Os(y){return y.match(/^uint($|[^1-9])/)?y="uint256"+y.substring(4):y.match(/^int($|[^1-9])/)&&(y="int256"+y.substring(3)),y}const yD=new RegExp(/^bytes([0-9]*)$/),bE=new RegExp(/^(u?int)([0-9]*)$/),gD=new RegExp(/^(.*)\[([0-9]*)\]$/),_D=function(y,R){const C=y.match(bE);return C&&parseInt(C[2])<=48?R.toNumber():R};class an{constructor(R,C,K,ee="",oe){this.coerceFunc=R,this.name=C,this.type=K,this.localName=ee,this.dynamic=oe}}class ED extends an{constructor(R){super(R.coerceFunc,R.name,R.type,void 0,R.dynamic),_E(this,"coder",R)}encode(R){return this.coder.encode(R)}decode(R,C){return this.coder.decode(R,C)}}class vD extends an{constructor(R,C){super(R,"null","",C,!1)}encode(R){return fd([])}decode(R,C){if(C>R.length)throw new Error("invalid null");return{consumed:0,value:this.coerceFunc("null",void 0)}}}function iu(y,R){return new Y(y.toString(2).substr(-R),2)}class TE extends an{constructor(R,C,K,ee){const oe=(K?"int":"uint")+8*C;super(R,oe,oe,ee,!1),this.size=C,this.signed=K}encode(R){try{let C=xe(R);if(this.signed){let ee=iu(EE,8*this.size-1);if(C.gt(ee))throw new Error("out-of-bounds");if(ee=ee.plus(hD).multipliedBy(pD),C.lt(ee))throw new Error("out-of-bounds")}else if(C.lt(mD)||C.gt(iu(EE,8*this.size)))throw new Error("out-of-bounds");C=iu(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:R,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:R,message:C.toString()})}}decode(R,C){if(R.length<C+32)throw ne("insufficient data for "+this.name+" type",se,{arg:this.localName,coderType:this.name,value:we(R.slice(C,C+32))});const K=32-this.size;let ee=new Y(x(R.slice(C+K,C+32)),16);return ee=this.signed?vt(ee,8*this.size):iu(ee,8*this.size),{consumed:32,value:this.coerceFunc(this.name,ee)}}}const Tn=new TE((function(y,R){return R}),32,!1,"none");class SE extends an{constructor(R,C,K){const ee="bytes"+C;super(R,ee,ee,K,!1),this.length=C}encode(R){const C=new Uint8Array(32);try{if(typeof R=="string"&&R.length%2!=0)throw new Error("hex string cannot be odd-length");const K=fd(R);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||R,details:K.message})}return C}decode(R,C){if(R.length<C+32)throw ne("insufficient data for "+this.name+" type",se,{arg:this.localName,coderType:this.name,value:we(R.slice(C,C+32))});return{consumed:32,value:this.coerceFunc(this.name,R.slice(C,C+this.length))}}}function IE(y){const R=32*Math.ceil(y.length/32),C=new Uint8Array(R-y.length);return j(Tn.encode(y.length),y,C)}function RE(y,R,C){if(y.length<R+32)throw ne("insufficient data for dynamicBytes length",se,{arg:C,coderType:"dynamicBytes",value:we(y.slice(R,R+32))});let K=Tn.decode(y,R).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<R+32+K)throw ne("insufficient data for dynamicBytes type",se,{arg:C,coderType:"dynamicBytes",value:we(y.slice(R,R+32+K))});return{consumed:32+32*Math.ceil(K/32),value:y.slice(R+32,R+32+K)}}function au(y){return 32*Math.ceil(y/32)}function wE(y,R){if(!Array.isArray(R)){if(!R||typeof R!="object")throw ne("invalid tuple value",se,{coderType:"tuple",value:R});{const He=[];y.forEach((function(Ge){He.push(R[Ge.localName])})),R=He}}if(y.length!==R.length)throw ne("types/value length mismatch",se,{coderType:"tuple",value:R});const C=[];y.forEach((function(He,Ge){C.push({dynamic:He.dynamic,value:He.encode(R[Ge])})}));let K=0,ee=0;C.forEach((function(He){He.dynamic?(K+=32,ee+=au(He.value.length)):K+=au(He.value.length)}));let oe=0,ve=K;const Pe=new Uint8Array(K+ee);return C.forEach((function(He){He.dynamic?(Pe.set(Tn.encode(ve),oe),oe+=32,Pe.set(He.value,ve),ve+=au(He.value.length)):(Pe.set(He.value,oe),oe+=au(He.value.length))})),Pe}class bD extends Array{}class TD extends an{constructor(R,C,K,ee){super(R,"array",C.type+"["+(K>=0?K:"")+"]",ee,K===-1||C.dynamic),this.coder=C,this.length=K}encode(R){if(!Array.isArray(R))throw ne("expected array value",se,{arg:this.localName,coderType:"array",value:R});let C=this.length,K=new Uint8Array(0);C===-1&&(C=R.length,K=Tn.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,R.length,"in coder array"+(this.localName?" "+this.localName:""));const ee=[];for(let oe=0;oe<R.length;oe++)ee.push(this.coder);return j(K,wE(ee,R))}decode(R,C){let K=0,ee=this.length;if(ee===-1){let Pe;try{Pe=Tn.decode(R,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 ED(this.coder));const ve=(function(Pe,He,Ge){const cr=Ge;let qt=0;const Me=[];return Pe.forEach((function(Kt){let It;if(Kt.dynamic){const Rt=Tn.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&&Me.push(It.value),Ge+=It.consumed,qt+=It.consumed})),{value:Me,consumed:qt}})(oe,R,C);return ve.consumed+=K,ve.value=this.coerceFunc(this.type,ve.value),ve}}class pd extends an{constructor(R,C,K){let ee=!1;const oe=[];C.forEach((function(ve){ve.dynamic&&(ee=!0),oe.push(ve.type)})),super(R,"tuple","tuple("+oe.join(",")+")",K,ee),this.coders=C}encode(R){return wE(this.coders,R)}decode(R,C){const K=(function(ee,oe,ve){const Pe=ve;let He=0;const Ge=new bD;return ee.forEach((function(cr){let qt;if(cr.dynamic){const Me=Tn.decode(oe,ve);qt=cr.decode(oe,Pe+Me.value.toNumber()),qt.consumed=Me.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 Me=cr.localName;Me&&(Me==="length"&&(Me="_length"),Ge[Me]!==null&&Ge[Me]!==void 0||(Ge[Me]=Ge[qt]))})),{value:Ge,consumed:He}})(this.coders,R,C);return K.value=this.coerceFunc(this.type,K.value),K}}const SD={address:class extends an{constructor(y,R){super(y,"address","address",R,!1)}encode(y){const R=new Uint8Array(32),C=y.trim();if(!bt(C))throw ne("invalid address format",se,{arg:this.localName,coderType:"address",value:y});try{R.set(X(vr(C)),12)}catch(K){throw ne(`invalid address (${K.message})`,se,{arg:this.localName,coderType:"address",value:y})}return R}decode(y,R){if(y.length<R+32)throw ne("insufficuent data for address type",se,{arg:this.localName,coderType:"address",value:we(y.slice(R,R+32)),missingBytes:R+32-y.length});return{consumed:32,value:this.coerceFunc("address",$t(we(y.slice(R+12,R+32))))}}},bool:class extends an{constructor(y,R){super(y,"bool","bool",R,!1)}encode(y){return Tn.encode(y?1:0)}decode(y,R){try{const C=Tn.decode(y,R);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 an{constructor(y,R){super(y,"string","string",R,!0)}encode(y){if(typeof y!="string")throw ne("invalid string value",se,{arg:this.localName,coderType:"string",value:y});return IE(U(y))}decode(y,R){const C=RE(y,R,this.localName);return C.value=this.coerceFunc("string",F(C.value)),C}},bytes:class extends an{constructor(y,R){super(y,"bytes","bytes",R,!0)}encode(y){try{return IE(fd(y))}catch(R){throw R("invalid bytes value",se,{arg:this.localName,coderType:"bytes",value:R.value})}}decode(y,R){const C=RE(y,R,this.localName);return C.value=this.coerceFunc("bytes",C.value),C}},function:class extends SE{constructor(y,R){super(y,24,R)}}};function su(y,R){const C=SD[R.type];if(C)return new C(y,R.name);let K=R.type.match(bE);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:R});return new TE(y,ee/8,K[1]==="int",R.name)}if(K=R.type.match(yD),K){const ee=parseInt(K[1]);if(ee===0||ee>32)throw ne("invalid bytes length",se,{arg:"param",value:R});return new SE(y,ee,R.name)}if(K=R.type.match(gD),K){const ee=Object.assign({},R),oe=parseInt(K[2]||"-1");return ee.type=K[1],new TD(y,su(y,ee),oe,R.name)}if(R.type.substring(0,5)==="tuple")return(function(ee,oe,ve){oe||(oe=[]);const Pe=oe.map((He=>su(ee,He)));return new pd(ee,Pe,ve)})(y,R.components,R.name);if(R.type==="")return new vD(y,R.name);throw ne("invalid type",se,{arg:"type",value:R.type,fullType:R})}class md{constructor(R){(function(C,K){if(!(C instanceof K))throw ne("missing new","MISSING_NEW",{name:K.name})})(this,md),R||(R=_D),_E(this,"coerceFunc",R)}encode(R,C){if(R.length!==C.length)throw ne("types/values length mismatch",se,{count:{types:R.length,values:C.length},value:{types:R,values:C}});const K=R.map((ee=>typeof ee=="string"?vE(ee):ee)).map((ee=>su(this.coerceFunc,ee)));return new pd(this.coerceFunc,K,"_").encode(C)}decode(R,C){const K=R.map((ee=>typeof ee=="string"?vE(ee):ee)).map((ee=>su(this.coerceFunc,ee)));return new pd(this.coerceFunc,K,"_").decode(C,0).value}}const AE=new md;var OE,$e;function Be(y,R,C,K){var ee,oe=arguments.length,ve=oe<3?R:K;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ve=Reflect.decorate(y,R,C,K);else for(var Pe=y.length-1;Pe>=0;Pe--)(ee=y[Pe])&&(ve=(oe<3?ee(ve):oe>3?ee(R,C,ve):ee(R,C))||ve);return oe>3&&ve&&Object.defineProperty(R,C,ve),ve}function ke(y,R){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(y,R)}r.coder=void 0,(OE=r.coder||(r.coder={})).encodeParams=function(y,R){return x(AE.encode(y,R))},OE.decodeParams=function(y,R){if(y.length>0&&(!R||R==="0x"||R==="0X"))throw new Error("Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.");return AE.decode(y,X("0x"+R.replace(/0x/i,"")))},typeof SuppressedError=="function"&&SuppressedError;class ze{constructor(R){this.callName=R.callName,this.params=R.params||0,this.inputFormatter=R.inputFormatter||null,this.outputFormatter=R.outputFormatter}validateArgs(R){if(R.length!==this.params)throw C=this.callName,K=R.length,ee=this.params,new Error(`Invalid number of input parameters to RPC method "${C}" given: ${K}, expected: ${ee}`);var C,K,ee}formatInput(R){return this.inputFormatter?this.inputFormatter.map((function(C,K){return C?C(R[K]):R[K]})):R}formatOutput(R){return R!==null?this.outputFormatter(R):null}toPayload(R){const C=this.formatInput(R);return this.validateArgs(C),{method:this.callName,params:C}}async execute(R,...C){const K=this.toPayload(C);if(!R)throw new Error("Missing RequestManager in method#exec");const ee=await R.sendAsync(K);return this.formatOutput(ee)}}class br{constructor(R){this.getter=R.getter,this.outputFormatter=R.outputFormatter}formatOutput(R){return this.outputFormatter(R)}async execute(R,...C){const K=await R.sendAsync({method:this.getter,params:[]});return this.formatOutput(K)}}function NE(y){return new Promise((R=>setTimeout(R,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:[zt,function(y){return!!y}],outputFormatter:As}),$e.eth_getBlockByNumber=new ze({callName:"eth_getBlockByNumber",params:2,inputFormatter:[zt,function(y){return!!y}],outputFormatter:As}),$e.eth_getUncleByBlockHashAndIndex=new ze({callName:"eth_getUncleByBlockHashAndIndex",params:2,inputFormatter:[zt,we],outputFormatter:As}),$e.eth_getUncleByBlockNumberAndIndex=new ze({callName:"eth_getUncleByBlockNumberAndIndex",params:2,inputFormatter:[zt,we],outputFormatter:As}),$e.eth_getBlockTransactionCountByHash=new ze({callName:"eth_getBlockTransactionCountByHash",params:1,inputFormatter:[zt],outputFormatter:Ie}),$e.eth_getBlockTransactionCountByNumber=new ze({callName:"eth_getBlockTransactionCountByNumber",params:1,inputFormatter:[zt],outputFormatter:Ie}),$e.eth_getUncleCountByBlockHash=new ze({callName:"eth_getUncleCountByBlockHash",params:1,inputFormatter:[zt],outputFormatter:Ie}),$e.eth_getUncleCountByBlockNumber=new ze({callName:"eth_getUncleCountByBlockNumber",params:1,inputFormatter:[zt],outputFormatter:Ie}),$e.eth_getTransactionByHash=new ze({callName:"eth_getTransactionByHash",params:1,inputFormatter:[Oa],outputFormatter:ws}),$e.eth_getTransactionByBlockHashAndIndex=new ze({callName:"eth_getTransactionByBlockHashAndIndex",params:2,inputFormatter:[zt,we],outputFormatter:ws}),$e.eth_getTransactionByBlockNumberAndIndex=new ze({callName:"eth_getTransactionByBlockNumberAndIndex",params:2,inputFormatter:[zt,we],outputFormatter:ws}),$e.eth_getTransactionReceipt=new ze({callName:"eth_getTransactionReceipt",params:1,inputFormatter:[Oa],outputFormatter:hE}),$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:[dd],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:[ld,nt],outputFormatter:le}),$e.eth_estimateGas=new ze({callName:"eth_estimateGas",params:1,inputFormatter:[ld],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:gE}),$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:[dd,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:[yE],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,R){const C=r.eth[R];if(!C)throw new Error(`Could not find the method/property named ${R.toString()}`);Object.defineProperty(y,R,{value:function(...K){return C.execute(this,...K)}})}class Le{constructor(R){this.provider=R,this.requests=new Map}async sendAsync(R){const C=await this.provider;if(!C)throw new Error("Provider not set or invalid");const K=Qe(R.method,R.params),ee=s();return this.requests.set(K.id,ee),C.sendAsync(K,((oe,ve)=>{this.requests.delete(K.id),oe?ee.reject(oe):Nt(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(R){this.provider=R}async getConfirmedTransaction(R){const C=await this.waitForCompletion(R);if(this.isFailure(C))throw new Error(`Transaction "${R}" failed`);return C}async waitForCompletion(R,C){const K=Oa(R);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 NE(2e3)}}async getTransaction(R){let C,K=null;const ee=Oa(R);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(R,C=15){let K=C;for(;K>0;){if(await this.getTransactionAndReceipt(R)!==null)return!1;K-=1,await NE(2e3)}return!0}async getTransactionAndReceipt(R){R=Oa(R);const[C,K]=await Promise.all([this.eth_getTransactionByHash(R),this.eth_getTransactionReceipt(R)]);return Object.assign(Object.assign({},C),{receipt:K})}isPending(R){return R&&R.blockNumber===null}isFailure(R){return R&&(!R.receipt||R.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 PE{constructor(R){this.json=R,this._inputTypes=R.inputs||[],this._outputTypes=R.outputs||[],this._constant=!!R.constant,this._payable=!!R.payable||R.stateMutability==="payable",this.needsToBeTransaction=this._payable||"constant"in R&&!R.constant||R.stateMutability==="nonpayable",this._name=N(R)}extractDefaultBlock(R){return R.length>this._inputTypes.length&&!w(R[R.length-1])&&nt(R.pop())||"latest"}validateArgs(R){if(R.some((oe=>oe===void 0)))throw new Error("Invalid call, some arguments are undefined");const C=R.filter((function(oe){return!(w(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(R){let C={to:void 0,data:void 0,value:void 0,from:void 0};R.length>this._inputTypes.length&&w(R[R.length-1])&&(C=R.pop()),this.validateArgs(R);const K=this.signature();let ee=r.coder.encodeParams(this._inputTypes,R);return ee.indexOf("0x")===0&&(ee=ee.substr(2)),C.data="0x"+K+ee,C}signature(){return L(this._name).slice(0,8)}unpackOutput(R){if(!R)return;const C=R.length>=2?R.slice(2):R,K=r.coder.decodeParams(this._outputTypes,C);return K.length===1?K[0]:K}async execute(R,C,...K){if(!R)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 R.eth_sendTransaction(ee)}{const ee=this.extractDefaultBlock(K),oe=this.toPayload(K);oe.to=C;const ve=await R.eth_call(oe,ee);return this.unpackOutput(ve)}}estimateGas(R,C,...K){if(!(R instanceof Le))throw new Error("estimateGas needs to receive a RequestManager as first argument");const ee=this.toPayload(K);return ee.to=C,R.eth_estimateGas(ee)}displayName(){return Ee(this._name)}typeName(){return _e(this._name)||"void"}attachToContract(R){const C=this.displayName(),K=Object.assign(((...ee)=>this.execute(R.requestManager,R.address,...ee)),{estimateGas:this.estimateGas.bind(this,R.requestManager,R.address),toPayload:(...ee)=>this.toPayload(ee),toRPCMessage:(...ee)=>{const oe=this.extractDefaultBlock(ee),ve=this.toPayload(ee);return ve.to=R.address,{method:"eth_call",params:[ve,oe]}},unpackOutput:ee=>this.unpackOutput(ee)});R[C]||(R[C]=K),R[C][this.typeName()]=K}}function CE(y){if(y==null)return null;const R=String(y).toString();return R.indexOf("0x")===0?R:x(U(R))}class hd{constructor(R){this.requestManager=R,this.isStarted=!1,this.isDisposed=!1,this.formatter=C=>C,this.filterId=s(),this.callbacks=[],this.stopSemaphore=s()}async watch(R){if(this.isDisposed)throw new Error("The filter was disposed");R&&(this.callbacks.push(R),this.isStarted||await this.start())}async start(){if(this.isDisposed)throw new Error("The filter was disposed");if(!this.isStarted){this.isStarted=!0;try{const R=await this.getNewFilter();if(!R)throw new Error("Could not create a filter, response: "+JSON.stringify(R));this.filterId.resolve(R)}catch(R){throw R}this.stopSemaphore=s(),await this.poll()}}async stop(){if(!this.isStarted||this.isDisposed)return;this.isDisposed=!0;const R=await this.filterId;if(this.isStarted=!1,this.stopSemaphore&&await this.stopSemaphore,await this.uninstall()!==!0)throw new Error(`Couldn't stop the eth filter: ${R}`)}async poll(){if(this.isStarted){if(this.callbacks.length){const 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((R=()=>this.poll(),function(){R().catch((C=>console.error(C)))}),500))}else this.stopSemaphore.resolve(1);var R}}class Ns extends hd{constructor(R,C,K=(ee=>ee)){super(R),this.requestManager=R,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 CE(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"?zt(this.options.fromBlock)||void 0:"latest",toBlock:typeof this.options.toBlock=="number"||typeof this.options.toBlock=="string"?zt(this.options.toBlock)||void 0:"latest"}}async getLogs(){this.isStarted||await this.start();const R=await this.filterId;return this.requestManager.eth_getFilterLogs(R)}async getNewFilter(){return this.requestManager.eth_newFilter(this.options)}async getChanges(){const R=await this.filterId;return this.requestManager.eth_getFilterChanges(R)}async uninstall(){const R=await this.filterId;return this.requestManager.eth_uninstallFilter(R)}}class yd{constructor(R,C,K){this.requestManager=R,this.address=K,this._anonymous=!1,this._params=C.inputs||[],this._name=N(C),this._anonymous=C.anonymous||!1}types(R){return this._params.filter((function(C){return C.indexed===R}))}displayName(){return Ee(this._name)}typeName(){return _e(this._name)||"void"}signature(){return L(this._name)}encode(R={},C={}){const K={topics:[],address:this.address};C.fromBlock!==void 0&&(K.fromBlock=zt(C.fromBlock)||void 0),C.toBlock!==void 0&&(K.toBlock=zt(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=R[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(R){R.data=R.data||"",R.topics=R.topics||[];const C=(this._anonymous?R.topics:R.topics.slice(1)).map((function(Pe){return Pe.slice(2)})).join(""),K=r.coder.decodeParams(this.types(!0),C),ee=R.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({},nu(R)),{event:this.displayName(),address:R.address,args:ve})}async execute(R,C){const K=this.encode(R,C),ee=this.decode.bind(this);return new Ns(this.requestManager,K,ee)}attachToContract(R){const C=this.execute.bind(this),K=this.displayName();R.events[K]||(R.events[K]=C),R.events[K][this.typeName()]=this.execute.bind(this,R)}}class ID{constructor(R,C,K){this._requestManager=R,this._json=C,this._address=K}encode(R={}){const C={address:this._address};return R.fromBlock!==void 0&&(C.fromBlock=zt(R.fromBlock)||void 0),R.toBlock!==void 0&&(C.toBlock=zt(R.toBlock)||void 0),C}decode(R){R.data=R.data||"";const C=de(R.topics)&&v(R.topics[0])?R.topics[0].slice(2):"",K=this._json.filter((function(ee){return C===L(N(ee))}))[0];return K?new yd(this._requestManager,K,this._address).decode(R):nu(R)}async execute(R){const C=this.encode(R),K=this.decode.bind(this);return new Ns(this._requestManager,C,K)}getAllEventsFunction(){return this.execute.bind(this)}}class ME{constructor(R,C,K){var ee;this.requestManager=R,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 PE(oe)})).forEach((function(oe){oe.attachToContract(ee)})),this.allEvents=(function(oe){const ve=oe.abi.filter((function(He){return He.type==="event"})),Pe=new ID(oe.requestManager,ve,oe.address);return ve.map((function(He){return new yd(oe.requestManager,He,oe.address)})).forEach((function(He){He.attachToContract(oe)})),Pe.getAllEventsFunction()})(this)}}r.AbstractFilter=hd,r.BigNumber=Y,r.Contract=ME,r.ContractFactory=class{constructor(y,R){this.requestManager=y,this.abi=R}async deploy(...y){let R;const C=y[y.length-1];if(w(C)&&!de(C)&&(R=y.pop()),!R)throw new Error("Missing options object");if(!R.data||typeof R.data!="string")throw new Error("Invalid options.data");if(Ie(R.value)>0&&!(this.abi.filter((function(Ge){return Ge.type==="constructor"&&Ge.inputs.length===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;R.data+=K,R.gas||(R.gas=await this.requestManager.eth_estimateGas(R));const ve=await this.requestManager.eth_sendTransaction(R);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 Me=0;const Kt=()=>{Me++,Me>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 ME(this.requestManager,this.abi,y)}},r.EthBlockFilter=class extends Ns{constructor(y){super(y,{})}async getNewFilter(){return this.requestManager.eth_newBlockFilter()}},r.EthFilter=Ns,r.EthPendingTransactionFilter=class extends Ns{constructor(y){super(y,{})}async getNewFilter(){return this.requestManager.eth_newPendingTransactionFilter()}},r.HTTPProvider=class{constructor(y,R={}){this.host=y,this.options=R,this.debug=!1,this.host=y||"http://localhost:8545"}send(){throw new Error("Sync requests are deprecated")}sendAsync(y,R){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?R(Object.assign(new Error(ve.error.json||ve.error),ve.error)):R(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),R(new Error(Pe))}}),(oe=>{this.debug&&console.log("ERR << "+JSON.stringify(oe)),R(oe)}))}catch(C){this.debug&&console.log("ERR << "+JSON.stringify(C)),R(C)}}},r.Method=ze,r.Property=br,r.RequestManager=Le,r.SHHFilter=class extends hd{constructor(y,R){super(y),this.requestManager=y,this.options=R,this.options=this.options||{topics:[]},this.options.topics=this.options.topics||[],this.options.topics=this.options.topics.map((function(C){return CE(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=yd,r.SolidityFunction=PE,r.WebSocketProvider=class{constructor(y,R={}){this.url=y,this.options=R,this.isDisposed=!1,this.responseCallbacks=new Map,this.notificationCallbacks=new Set,this.debug=!1,this.lastChunk="",this.connect()}dispose(){this.isDisposed=!0;const y=this.connection;this.timeout(new Error("Provider disposed.")),y.then((R=>R.close())).catch((R=>{this.debug&&console.error(R)}))}send(){throw new Error("Sync requests are deprecated")}sendAsync(y,R){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=>R(null,ee)),(ee=>R(ee))),this.connection.then((ee=>{C.forEach((oe=>{const ve=JSON.stringify(oe);this.debug&&console.log("SEND >> "+ve),ee.send(ve)}))}),(ee=>{R(ee)}))}parseResponse(y){const R=[];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&&R.push(ee)})),R}processMessage(y){if("id"in y){const R=y.id,C=this.responseCallbacks.get(R);if(!C)return void console.error("Error: Received a response for an unknown request",y);this.responseCallbacks.delete(R),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((R=>R(null,y)))}timeout(y){this.connection&&this.connection.isPending||(this.connection=s());const R=y||new Error("Connection timeout");this.responseCallbacks.forEach((C=>C.reject(R))),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 R=new y(this.url,this.options.protocol);R.onopen=()=>{this.connection.resolve(R)},R.onerror=C=>{const K=new Error("Error in web socket");K.data=C,this.timeout(K)},R.onclose=C=>{this.timeout(new Error(`Connection closed (${C&&C.reason||"Unknown reason"})`))},R.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,R=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(R,"0")},r.fromDecimal=Te,r.fromTwosComplement=vt,r.fromWei=function(y,R){const C=xe(y).dividedBy(Fe(R));return M(y)?C:C.toString(10)},r.getAddress=$t,r.getValueOfUnit=Fe,r.hexToBytes=X,r.inputAddressFormatter=vr,r.inputBlockNumberFormatter=zt,r.inputCallFormatter=ld,r.inputDefaultBlockNumberFormatter=nt,r.inputFilterOptions=yE,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(R){return R.indexOf("0x")===0?R:"0x"+x(U(R))})),y):null},r.inputTransactionFormatter=dd,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=w,r.isPredefinedBlockNumber=Pt,r.isStrictAddress=Gt,r.isString=v,r.isTopic=function(y){return!!/^(0x)?[0-9a-f]{64}$/i.test(y)&&!!/^(0x)?[0-9a-f]{64}$/i.test(y)},r.isValidResponse=Nt,r.outputBigNumberFormatter=Tt,r.outputBlockFormatter=As,r.outputLogFormatter=nu,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(R){return V(R)})),y):null},r.outputSyncingFormatter=gE,r.outputTransactionFormatter=ws,r.outputTransactionReceiptFormatter=hE,r.padLeft=$,r.padRight=function(y,R,C){return y+new Array(R-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(R){return Qe(R.method,R.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,R){const C=xe(y).times(Fe(R));return M(y)?C:C.toString(10)},r.transformToFullName=N,Object.defineProperty(r,"__esModule",{value:!0})}))})(bo,bo.exports)),bo.exports}var el={},HI;function LH(){if(HI)return el;HI=1,Object.defineProperty(el,"__esModule",{value:!0}),el.SignatureValidator=t;const e=Zl();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 el}var dn={},Wp={},Yp={},Mi={},Pn={},Wt={},VI;function W_(){if(VI)return Wt;VI=1,Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.output=Wt.exists=Wt.hash=Wt.bytes=Wt.bool=Wt.number=Wt.isBytes=void 0;function e(u){if(!Number.isSafeInteger(u)||u<0)throw new Error(`positive integer expected, not ${u}`)}Wt.number=e;function t(u){if(typeof u!="boolean")throw new Error(`boolean expected, not ${u}`)}Wt.bool=t;function r(u){return u instanceof Uint8Array||u!=null&&typeof u=="object"&&u.constructor.name==="Uint8Array"}Wt.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}`)}Wt.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)}Wt.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")}Wt.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}`)}Wt.output=s;const o={number:e,bool:t,bytes:n,hash:i,exists:a,output:s};return Wt.default=o,Wt}var xp={},Us={},GI;function $H(){return GI||(GI=1,Object.defineProperty(Us,"__esModule",{value:!0}),Us.crypto=void 0,Us.crypto=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0),Us}var zI;function Qo(){return zI||(zI=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=$H(),r=W_();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 m(W){(0,r.bytes)(W);let U="";for(let F=0;F<W.length;F++)U+=d[W[F]];return U}e.bytesToHex=m;const p={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function E(W){if(W>=p._0&&W<=p._9)return W-p._0;if(W>=p._A&&W<=p._F)return W-(p._A-10);if(W>=p._a&&W<=p._f)return W-(p._a-10)}function T(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=E(W.charCodeAt(ne)),x=E(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=T;const S=async()=>{};e.nextTick=S;async function A(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=A;function f(W){if(typeof W!="string")throw new Error(`utf8ToBytes expected string, got ${typeof W}`);return new Uint8Array(new TextEncoder().encode(W))}e.utf8ToBytes=f;function _(W){return typeof W=="string"&&(W=f(W)),(0,r.bytes)(W),W}e.toBytes=_;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 h{clone(){return this._cloneInto()}}e.Hash=h;const I={}.toString;function O(W,U){if(U!==void 0&&I.call(U)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(W,U)}e.checkOpts=O;function P(W){const U=ce=>W().update(_(ce)).digest(),F=W();return U.outputLen=F.outputLen,U.blockLen=F.blockLen,U.create=()=>W(),U}e.wrapConstructor=P;function B(W){const U=(ce,se)=>W(se).update(_(ce)).digest(),F=W({});return U.outputLen=F.outputLen,U.blockLen=F.blockLen,U.create=ce=>W(ce),U}e.wrapConstructorWithOpts=B;function z(W){const U=(ce,se)=>W(se).update(_(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 WI;function qH(){if(WI)return Pn;WI=1,Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.HashMD=Pn.Maj=Pn.Chi=void 0;const e=W_(),t=Qo();function r(s,o,u,l){if(typeof s.setBigUint64=="function")return s.setBigUint64(o,u,l);const c=BigInt(32),d=BigInt(4294967295),m=Number(u>>c&d),p=Number(u&d),E=l?4:0,T=l?0:4;s.setUint32(o+E,m,l),s.setUint32(o+T,p,l)}const n=(s,o,u)=>s&o^~s&u;Pn.Chi=n;const i=(s,o,u)=>s&o^s&u^o&u;Pn.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 m=0;m<d;){const p=Math.min(c-this.pos,d-m);if(p===c){const E=(0,t.createView)(o);for(;c<=d-m;m+=c)this.process(E,m);continue}l.set(o.subarray(m,m+p),this.pos),this.pos+=p,m+=p,this.pos===c&&(this.process(u,0),this.pos=0)}return this.length+=o.length,this.roundClean(),this}digestInto(o){(0,e.exists)(this),(0,e.output)(o,this),this.finished=!0;const{buffer:u,view:l,blockLen:c,isLE:d}=this;let{pos:m}=this;u[m++]=128,this.buffer.subarray(m).fill(0),this.padOffset>c-m&&(this.process(l,0),m=0);for(let A=m;A<c;A++)u[A]=0;r(l,c-8,BigInt(this.length*8),d),this.process(l,0);const p=(0,t.createView)(o),E=this.outputLen;if(E%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const T=E/4,S=this.get();if(T>S.length)throw new Error("_sha2: outputLen bigger than state");for(let A=0;A<T;A++)p.setUint32(4*A,S[A],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:m,pos:p}=this;return o.length=c,o.pos=p,o.finished=d,o.destroyed=m,c%u&&o.buffer.set(l),o}}return Pn.HashMD=a,Pn}var YI;function BH(){if(YI)return Mi;YI=1,Object.defineProperty(Mi,"__esModule",{value:!0}),Mi.sha224=Mi.sha256=void 0;const e=qH(),t=Qo(),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:m,F:p,G:E,H:T}=this;return[u,l,c,d,m,p,E,T]}set(u,l,c,d,m,p,E,T){this.A=u|0,this.B=l|0,this.C=c|0,this.D=d|0,this.E=m|0,this.F=p|0,this.G=E|0,this.H=T|0}process(u,l){for(let f=0;f<16;f++,l+=4)i[f]=u.getUint32(l,!1);for(let f=16;f<64;f++){const _=i[f-15],b=i[f-2],h=(0,t.rotr)(_,7)^(0,t.rotr)(_,18)^_>>>3,I=(0,t.rotr)(b,17)^(0,t.rotr)(b,19)^b>>>10;i[f]=I+i[f-7]+h+i[f-16]|0}let{A:c,B:d,C:m,D:p,E,F:T,G:S,H:A}=this;for(let f=0;f<64;f++){const _=(0,t.rotr)(E,6)^(0,t.rotr)(E,11)^(0,t.rotr)(E,25),b=A+_+(0,e.Chi)(E,T,S)+r[f]+i[f]|0,I=((0,t.rotr)(c,2)^(0,t.rotr)(c,13)^(0,t.rotr)(c,22))+(0,e.Maj)(c,d,m)|0;A=S,S=T,T=E,E=p+b|0,p=m,m=d,d=c,c=b+I|0}c=c+this.A|0,d=d+this.B|0,m=m+this.C|0,p=p+this.D|0,E=E+this.E|0,T=T+this.F|0,S=S+this.G|0,A=A+this.H|0,this.set(c,d,m,p,E,T,S,A)}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 Fs={},Kp={},xI;function kH(){return xI||(xI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.hmac=e.HMAC=void 0;const t=W_(),r=Qo();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:m}=this;return s=s,s.finished=l,s.destroyed=c,s.blockLen=d,s.outputLen=m,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)})(Kp)),Kp}var Xp={},Hs={},Lt={},Ct={},KI;function us(){if(KI)return Ct;KI=1,Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.bitMask=void 0,Ct.isBytes=n,Ct.abytes=i,Ct.bytesToHex=s,Ct.numberToHexUnpadded=o,Ct.hexToNumber=u,Ct.hexToBytes=d,Ct.bytesToNumberBE=m,Ct.bytesToNumberLE=p,Ct.numberToBytesBE=E,Ct.numberToBytesLE=T,Ct.numberToVarBytesBE=S,Ct.ensureBytes=A,Ct.concatBytes=f,Ct.equalBytes=_,Ct.utf8ToBytes=b,Ct.bitLen=h,Ct.bitGet=I,Ct.bitSet=O,Ct.createHmacDrbg=Y,Ct.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 m(F){return u(s(F))}function p(F){return i(F),u(s(Uint8Array.from(F).reverse()))}function E(F,ce){return d(F.toString(16).padStart(ce*2,"0"))}function T(F,ce){return E(F,ce).reverse()}function S(F){return d(o(F))}function A(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 f(...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 _(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 h(F){let ce;for(ce=0;F>e;F>>=t,ce+=1);return ce}function I(F,ce){return F>>BigInt(ce)&t}function O(F,ce,se){return F|(se?t:e)<<BigInt(ce)}const P=F=>(r<<BigInt(F-1))-t;Ct.bitMask=P;const B=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=B(F),X=B(F),x=0;const L=()=>{ne.fill(1),X.fill(0),x=0},D=(...j)=>se(X,ne,...j),$=(j=B())=>{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 f(...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 Ct}var XI;function ed(){if(XI)return Lt;XI=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=m,Lt.FpSqrt=p,Lt.validateField=S,Lt.FpPow=A,Lt.FpInvertBatch=f,Lt.FpDiv=_,Lt.FpIsSquare=b,Lt.nLength=h,Lt.Field=I,Lt.FpSqrtOdd=O,Lt.FpSqrtEven=P,Lt.hashToPrivateScalar=B,Lt.getFieldBytesLength=z,Lt.getMinHashLength=Y,Lt.mapHashToField=W;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const e=us(),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 m(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 p(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 m(U)}const E=(U,F)=>(u(U,F)&r)===r;Lt.isNegativeLE=E;const T=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function S(U){const F={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},ce=T.reduce((se,ne)=>(se[ne]="function",se),F);return(0,e.validateObject)(U,ce)}function A(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 f(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 _(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 h(U,F){const ce=F!==void 0?F:U.toString(2).length,se=Math.ceil(ce/8);return{nBitLength:ce,nByteLength:se}}function I(U,F,ce=!1,se={}){if(U<=t)throw new Error(`Expected Field ORDER > 0, got ${U}`);const{nBitLength:ne,nByteLength:X}=h(U,F);if(X>2048)throw new Error("Field lengths over 2048 bytes are not supported");const x=p(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,$)=>A(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=>f(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 O(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 B(U,F,ce=!1){U=(0,e.ensureBytes)("privateHash",U);const se=U.length,ne=h(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 JI;function UH(){if(JI)return Hs;JI=1,Object.defineProperty(Hs,"__esModule",{value:!0}),Hs.wNAF=i,Hs.validateBasic=a;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const e=ed(),t=us(),r=BigInt(0),n=BigInt(1);function i(s,o){const u=(c,d)=>{const m=d.negate();return c?m:d},l=c=>{const d=Math.ceil(o/c)+1,m=2**(c-1);return{windows:d,windowSize:m}};return{constTimeNegate:u,unsafeLadder(c,d){let m=s.ZERO,p=c;for(;d>r;)d&n&&(m=m.add(p)),p=p.double(),d>>=n;return m},precomputeWindow(c,d){const{windows:m,windowSize:p}=l(d),E=[];let T=c,S=T;for(let A=0;A<m;A++){S=T,E.push(S);for(let f=1;f<p;f++)S=S.add(T),E.push(S);T=S.double()}return E},wNAF(c,d,m){const{windows:p,windowSize:E}=l(c);let T=s.ZERO,S=s.BASE;const A=BigInt(2**c-1),f=2**c,_=BigInt(c);for(let b=0;b<p;b++){const h=b*E;let I=Number(m&A);m>>=_,I>E&&(I-=f,m+=n);const O=h,P=h+Math.abs(I)-1,B=b%2!==0,z=I<0;I===0?S=S.add(u(B,d[O])):T=T.add(u(z,d[P]))}return{p:T,f:S}},wNAFCached(c,d,m,p){const E=c._WINDOW_SIZE||1;let T=d.get(c);return T||(T=this.precomputeWindow(c,E),E!==1&&d.set(c,p(T))),this.wNAF(E,T,m)}}}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 Hs}var QI;function cC(){return QI||(QI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DER=void 0,e.weierstrassPoints=p,e.weierstrass=T,e.SWUFpSqrtRatio=S,e.mapToCurveSimpleSWU=A;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const t=UH(),r=ed(),n=us(),i=us();function a(f){const _=(0,t.validateBasic)(f);n.validateObject(_,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:b,Fp:h,a:I}=_;if(b){if(!h.eql(I,h.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({..._})}const{bytesToNumberBE:s,hexToBytes:o}=n;e.DER={Err:class extends Error{constructor(_=""){super(_)}},_parseInt(f){const{Err:_}=e.DER;if(f.length<2||f[0]!==2)throw new _("Invalid signature integer tag");const b=f[1],h=f.subarray(2,b+2);if(!b||h.length!==b)throw new _("Invalid signature integer: wrong length");if(h[0]&128)throw new _("Invalid signature integer: negative");if(h[0]===0&&!(h[1]&128))throw new _("Invalid signature integer: unnecessary leading zero");return{d:s(h),l:f.subarray(b+2)}},toSig(f){const{Err:_}=e.DER,b=typeof f=="string"?o(f):f;n.abytes(b);let h=b.length;if(h<2||b[0]!=48)throw new _("Invalid signature tag");if(b[1]!==h-2)throw new _("Invalid signature: incorrect length");const{d:I,l:O}=e.DER._parseInt(b.subarray(2)),{d:P,l:B}=e.DER._parseInt(O);if(B.length)throw new _("Invalid signature: left bytes after parsing");return{r:I,s:P}},hexFromSig(f){const _=Y=>Number.parseInt(Y[0],16)&8?"00"+Y:Y,b=Y=>{const W=Y.toString(16);return W.length&1?`0${W}`:W},h=_(b(f.s)),I=_(b(f.r)),O=h.length/2,P=I.length/2,B=b(O),z=b(P);return`30${b(P+O+4)}02${z}${I}02${B}${h}`}};const u=BigInt(0),l=BigInt(1),c=BigInt(2),d=BigInt(3),m=BigInt(4);function p(f){const _=a(f),{Fp:b}=_,h=_.toBytes||((se,ne,X)=>{const x=ne.toAffine();return n.concatBytes(Uint8Array.from([4]),b.toBytes(x.x),b.toBytes(x.y))}),I=_.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 O(se){const{a:ne,b:X}=_,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(_.Gy),O(_.Gx)))throw new Error("bad generator point: equation left != right");function P(se){return typeof se=="bigint"&&u<se&&se<_.n}function B(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}=_;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)),B(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(I((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(_.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=O(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}=_,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=_.a,_e=b.mul(_.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(B(ne),ne===l)return this;const{endo:x}=_;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){B(ne);let X=ne,x,L;const{endo:D}=_;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}=_;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}=_;return ne===l?this:X?X(U,this):this.multiplyUnsafe(_.h)}toRawBytes(ne=!0){return this.assertValidity(),h(U,this,ne)}toHex(ne=!0){return n.bytesToHex(this.toRawBytes(ne))}}U.BASE=new U(_.Gx,_.Gy,b.ONE),U.ZERO=new U(b.ZERO,b.ONE,b.ZERO);const F=_.nBitLength,ce=(0,t.wNAF)(U,_.endo?Math.ceil(F/2):F);return{CURVE:_,ProjectivePoint:U,normPrivateKeyToScalar:z,weierstrassEquation:O,isWithinCurveOrder:P}}function E(f){const _=(0,t.validateBasic)(f);return n.validateObject(_,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,..._})}function T(f){const _=E(f),{Fp:b,n:h}=_,I=b.BYTES+1,O=2*b.BYTES+1;function P(fe){return u<fe&&fe<b.ORDER}function B(fe){return r.mod(fe,h)}function z(fe){return r.invert(fe,h)}const{ProjectivePoint:Y,normPrivateKeyToScalar:W,weierstrassEquation:U,isWithinCurveOrder:F}=p({..._,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===I&&(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===O&&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 ${I} compressed bytes or ${O} uncompressed bytes`)}}),ce=fe=>n.bytesToHex(n.numberToBytesBE(fe,_.nByteLength));function se(fe){const me=h>>l;return fe>me}function ne(fe){return se(fe)?B(-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=_.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+_.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=B(-xe*$t),Gt=B(we*$t),bt=Y.BASE.multiplyAndAddUnsafe(ut,vt,Gt);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,B(-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(_.n);return r.mapHashToField(_.randomBytes(fe),_.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===I||we===O:Te?we===2*I||we===2*O: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=_.bits2int||function(fe){const me=n.bytesToNumberBE(fe),Te=fe.length*8-_.nBitLength;return Te>0?me>>BigInt(Te):me},j=_.bits2int_modN||function(fe){return B(N(fe))},Z=n.bitMask(_.nBitLength);function Ee(fe){if(typeof fe!="bigint")throw new Error("bigint expected");if(!(u<=fe&&fe<Z))throw new Error(`bigint expected < 2^${_.nBitLength}`);return n.numberToBytesBE(fe,_.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}=_;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 Gt=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(),v=B(M.x);if(v===u)return;const w=B(wr*B(bt+v*$t));if(w===u)return;let G=(M.x===v?0:2)|Number(M.y&l),de=w;return xe&&se(w)&&(de=ne(w),G^=1),new x(v,de,G)}return{seed:Gt,k2sig:rr}}const Se={lowS:_.lowS,prehash:!1},Ie={lowS:_.lowS,prehash:!1};function ie(fe,me,Te=Se){const{seed:we,k2sig:Fe}=_e(fe,me,Te),xe=_;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(v){if(!(v instanceof e.DER.Err))throw v;Xe=x.fromCompact(Fe)}else if(typeof Fe=="object"&&typeof Fe.r=="bigint"&&typeof Fe.s=="bigint"){const{r:v,s:w}=Fe;Xe=new x(v,w)}else throw new Error("PARSE");ut=Y.fromHex(Te)}catch(v){if(v.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(xe&&Xe.hasHighS())return!1;tt&&(me=_.hash(me));const{r:$t,s:vt}=Xe,Gt=j(me),bt=z(vt),rr=B(Gt*bt),nr=B($t*bt),ht=(M=Y.BASE.multiplyAndAddUnsafe(ut,rr,nr))==null?void 0:M.toAffine();return ht?B(ht.x)===$t:!1}return{CURVE:_,getPublicKey:D,getSharedSecret:V,sign:ie,verify:le,ProjectivePoint:Y,Signature:x,utils:L}}function S(f,_){const b=f.ORDER;let h=u;for(let se=b-l;se%c===u;se/=c)h+=l;const I=h,O=c<<I-l-l,P=O*c,B=(b-l)/P,z=(B-l)/c,Y=P-l,W=O,U=f.pow(_,B),F=f.pow(_,(B+l)/c);let ce=(se,ne)=>{let X=U,x=f.pow(ne,Y),L=f.sqr(x);L=f.mul(L,ne);let D=f.mul(se,L);D=f.pow(D,z),D=f.mul(D,x),x=f.mul(D,ne),L=f.mul(D,se);let $=f.mul(L,x);D=f.pow($,W);let V=f.eql(D,f.ONE);x=f.mul(L,F),D=f.mul($,X),L=f.cmov(x,L,V),$=f.cmov(D,$,V);for(let N=I;N>l;N--){let j=N-c;j=c<<j-l;let Z=f.pow($,j);const Ee=f.eql(Z,f.ONE);x=f.mul(L,X),X=f.mul(X,X),Z=f.mul($,X),L=f.cmov(x,L,Ee),$=f.cmov(Z,$,Ee)}return{isValid:V,value:L}};if(f.ORDER%m===d){const se=(f.ORDER-d)/m,ne=f.sqrt(f.neg(_));ce=(X,x)=>{let L=f.sqr(x);const D=f.mul(X,x);L=f.mul(L,D);let $=f.pow(L,se);$=f.mul($,D);const V=f.mul($,ne),N=f.mul(f.sqr($),x),j=f.eql(N,X);let Z=f.cmov(V,$,j);return{isValid:j,value:Z}}}return ce}function A(f,_){if(r.validateField(f),!f.isValid(_.A)||!f.isValid(_.B)||!f.isValid(_.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const b=S(f,_.Z);if(!f.isOdd)throw new Error("Fp.isOdd is not implemented!");return h=>{let I,O,P,B,z,Y,W,U;I=f.sqr(h),I=f.mul(I,_.Z),O=f.sqr(I),O=f.add(O,I),P=f.add(O,f.ONE),P=f.mul(P,_.B),B=f.cmov(_.Z,f.neg(O),!f.eql(O,f.ZERO)),B=f.mul(B,_.A),O=f.sqr(P),Y=f.sqr(B),z=f.mul(Y,_.A),O=f.add(O,z),O=f.mul(O,P),Y=f.mul(Y,B),z=f.mul(Y,_.B),O=f.add(O,z),W=f.mul(I,P);const{isValid:F,value:ce}=b(O,Y);U=f.mul(I,h),U=f.mul(U,ce),W=f.cmov(W,P,F),U=f.cmov(U,ce,F);const se=f.isOdd(h)===f.isOdd(U);return U=f.cmov(f.neg(U),U,se),W=f.div(W,B),{x:W,y:U}}}})(Xp)),Xp}var ZI;function FH(){if(ZI)return Fs;ZI=1,Object.defineProperty(Fs,"__esModule",{value:!0}),Fs.getHash=n,Fs.createCurve=i;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const e=kH(),t=Qo(),r=cC();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 Fs}var Xn={},eR;function HH(){if(eR)return Xn;eR=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=ed(),t=us(),r=t.bytesToNumberBE;function n(d,m){if(d<0||d>=1<<8*m)throw new Error(`bad I2OSP call: value=${d} length=${m}`);const p=Array.from({length:m}).fill(0);for(let E=m-1;E>=0;E--)p[E]=d&255,d>>>=8;return new Uint8Array(p)}function i(d,m){const p=new Uint8Array(d.length);for(let E=0;E<d.length;E++)p[E]=d[E]^m[E];return p}function a(d){if(!Number.isSafeInteger(d))throw new Error("number expected")}function s(d,m,p,E){(0,t.abytes)(d),(0,t.abytes)(m),a(p),m.length>255&&(m=E((0,t.concatBytes)((0,t.utf8ToBytes)("H2C-OVERSIZE-DST-"),m)));const{outputLen:T,blockLen:S}=E,A=Math.ceil(p/T);if(A>255)throw new Error("Invalid xmd length");const f=(0,t.concatBytes)(m,n(m.length,1)),_=n(0,S),b=n(p,2),h=new Array(A),I=E((0,t.concatBytes)(_,d,b,n(0,1),f));h[0]=E((0,t.concatBytes)(I,n(1,1),f));for(let P=1;P<=A;P++){const B=[i(I,h[P-1]),n(P+1,1),f];h[P]=E((0,t.concatBytes)(...B))}return(0,t.concatBytes)(...h).slice(0,p)}function o(d,m,p,E,T){if((0,t.abytes)(d),(0,t.abytes)(m),a(p),m.length>255){const S=Math.ceil(2*E/8);m=T.create({dkLen:S}).update((0,t.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(m).digest()}if(p>65535||m.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return T.create({dkLen:p}).update(d).update(n(p,2)).update(m).update(n(m.length,1)).digest()}function u(d,m,p){(0,t.validateObject)(p,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:E,k:T,m:S,hash:A,expand:f,DST:_}=p;(0,t.abytes)(d),a(m);const b=typeof _=="string"?(0,t.utf8ToBytes)(_):_,h=E.toString(2).length,I=Math.ceil((h+T)/8),O=m*S*I;let P;if(f==="xmd")P=s(d,b,O,A);else if(f==="xof")P=o(d,b,O,T,A);else if(f==="_internal_pass")P=d;else throw new Error('expand must be "xmd" or "xof"');const B=new Array(m);for(let z=0;z<m;z++){const Y=new Array(S);for(let W=0;W<S;W++){const U=I*(W+z*S),F=P.subarray(U,U+I);Y[W]=(0,e.mod)(r(F),E)}B[z]=Y}return B}function l(d,m){const p=m.map(E=>Array.from(E).reverse());return(E,T)=>{const[S,A,f,_]=p.map(b=>b.reduce((h,I)=>d.add(d.mul(h,E),I)));return E=d.div(S,A),T=d.mul(T,d.div(f,_)),{x:E,y:T}}}function c(d,m,p){if(typeof m!="function")throw new Error("mapToCurve() must be defined");return{hashToCurve(E,T){const S=u(E,2,{...p,DST:p.DST,...T}),A=d.fromAffine(m(S[0])),f=d.fromAffine(m(S[1])),_=A.add(f).clearCofactor();return _.assertValidity(),_},encodeToCurve(E,T){const S=u(E,1,{...p,DST:p.encodeDST,...T}),A=d.fromAffine(m(S[0])).clearCofactor();return A.assertValidity(),A},mapToCurve(E){if(!Array.isArray(E))throw new Error("mapToCurve: expected array of bigints");for(const S of E)if(typeof S!="bigint")throw new Error(`mapToCurve: expected array of bigints, got ${S} in array`);const T=d.fromAffine(m(E)).clearCofactor();return T.assertValidity(),T}}}return Xn}var tR;function VH(){return tR||(tR=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=BH(),r=Qo(),n=FH(),i=HH(),a=ed(),s=us(),o=cC(),u=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),l=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),c=BigInt(1),d=BigInt(2),m=(x,L)=>(x+L/d)/L;function p(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(!E.eql(E.sqr(ut),x))throw new Error("Cannot find square root");return ut}const E=(0,a.Field)(u,void 0,void 0,{sqrt:p});e.secp256k1=(0,n.createCurve)({a:BigInt(0),b:BigInt(7),Fp:E,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=m(N*x,L),Ee=m(-$*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 T=BigInt(0),S=x=>typeof x=="bigint"&&T<x&&x<u,A=x=>typeof x=="bigint"&&T<x&&x<l,f={};function _(x,...L){let D=f[x];if(D===void 0){const $=(0,t.sha256)(Uint8Array.from(x,V=>V.charCodeAt(0)));D=(0,s.concatBytes)($,$),f[x]=D}return(0,t.sha256)((0,s.concatBytes)(D,...L))}const b=x=>x.toRawBytes(!0).slice(1),h=x=>(0,s.numberToBytesBE)(x,32),I=x=>(0,a.mod)(x,u),O=x=>(0,a.mod)(x,l),P=e.secp256k1.ProjectivePoint,B=(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:O(-L),bytes:b(D)}}function Y(x){if(!S(x))throw new Error("bad x: need 0 < x < p");const L=I(x*x),D=I(L*x+BigInt(7));let $=p(D);$%d!==T&&($=I(-$));const V=new P(x,$,c);return V.assertValidity(),V}function W(...x){return O((0,s.bytesToNumberBE)(_("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=h(N^(0,s.bytesToNumberBE)(_("BIP0340/aux",j))),Ee=_("BIP0340/nonce",Z,V,$),_e=O((0,s.bytesToNumberBE)(Ee));if(_e===T)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(h(O(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(!S(Z))return!1;const Ee=(0,s.bytesToNumberBE)($.subarray(32,64));if(!A(Ee))return!1;const _e=W(h(Z),b(j),V),Se=B(j,Ee,O(-_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:_,mod:a.mod}};const se=(0,i.isogenyMap)(E,[["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)(E,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:E.create(BigInt("-11"))}),X=(0,i.createHasher)(e.secp256k1.ProjectivePoint,x=>{const{x:L,y:D}=ne(E.create(x[0]));return se(L,D)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:E.ORDER,m:1,k:128,expand:"xmd",hash:t.sha256});e.hashToCurve=X.hashToCurve,e.encodeToCurve=X.encodeToCurve})(Yp)),Yp}var rR;function GH(){return rR||(rR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.secp256k1=void 0;var t=VH();Object.defineProperty(e,"secp256k1",{enumerable:!0,get:function(){return t.secp256k1}})})(Wp)),Wp}var nR;function zH(){if(nR)return dn;nR=1,Object.defineProperty(dn,"__esModule",{value:!0}),dn.recoverPublicKey=r,dn.recoverAddressFromEthSignature=i,dn.sign=a,dn.createEthereumMessageHash=s,dn.ethSign=o,dn.computeAddress=u,dn.createUnsafeIdentity=l;const e=Zl(),t=GH();function r(c,d){if(c.length!==65)throw new Error("Invalid signature length "+c.length);const m=c[64];if(m!==27&&m!==28)throw new Error(`Invalid signature recovery value: ${m}. Expected 27 or 28.`);const p=c.slice(0,c.length-1),E=m===28?1:0;return t.secp256k1.Signature.fromCompact(p).addRecoveryBit(E).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 m=new Uint8Array(c);return m[64]=d+27,m}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 m=t.secp256k1.sign(d,c),p=m.recovery===1?"1c":"1b";return"0x"+m.toCompactHex()+p}function s(c){const d=typeof c=="string"?(0,e.stringToUtf8Bytes)(c):c,m=(0,e.concatBytes)((0,e.stringToUtf8Bytes)(`Ethereum Signed Message:
70
+ `),(0,e.stringToUtf8Bytes)(String(d.length)),d);return(0,e.hexToBytes)((0,e.sha3)(m))}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),m=u(d);return{privateKey:(0,e.bytesToHex)(c),publicKey:(0,e.bytesToHex)(d),address:m}}return dn}var tl={},iR;function WH(){if(iR)return tl;iR=1,Object.defineProperty(tl,"__esModule",{value:!0});const e=Zl();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 tl.default=t,tl}var rl={},aR;function YH(){if(aR)return rl;aR=1,Object.defineProperty(rl,"__esModule",{value:!0}),rl.moveMinutes=e;function e(t){const r=new Date;return r.setMinutes(r.getMinutes()+t),r}return rl}var Jp={},Vr={},Di={},ji={},Qp={},Gr={},sR;function Ne(){if(sR)return Gr;sR=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(L_());Gr.Ajv=t.default;const r=e(LP()),n=e($P());function i(s,o){let u=null;const l=(c,d)=>{if(!u){const m=new t.default({$data:!0,allErrors:!0});(0,r.default)(m),(0,n.default)(m,{singleError:!0}),o==null||o.forEach(p=>m.addKeyword(p)),u=m.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 oR;function xH(){return oR||(oR=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={}))})(Qp)),Qp}var Zp={},uR;function KH(){return uR||(uR=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={}))})(Zp)),Zp}var cR;function XH(){return cR||(cR=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(xH(),e),r(KH(),e)})(ji)),ji}var Li={},em={},lR;function JH(){return lR||(lR=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={}))})(em)),em}var tm={},rm={},dR;function td(){return dR||(dR=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={}))})(rm)),rm}var nm={},fR;function Sa(){return fR||(fR=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={}))})(nm)),nm}var im={},am={},pR;function Y_(){return pR||(pR=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={}))})(am)),am}var sm={},om={},mR;function lC(){return mR||(mR=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={}))})(om)),om}var hR;function x_(){return hR||(hR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=void 0;const t=Sa(),r=Ne(),n=lC();(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={}))})(sm)),sm}var yR;function K_(){return yR||(yR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableRepresentation=void 0;const t=Ne(),r=Y_(),n=x_();(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={}))})(im)),im}var $i={},qi={},um={},cm={},gR;function Ia(){return gR||(gR=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={}))})(cm)),cm}var _R;function dC(){return _R||(_R=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={}))})(um)),um}var lm={},ER;function QH(){return ER||(ER=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Profile=void 0;const t=Ne(),r=dC();(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={}))})(lm)),lm}var vR;function ZH(){return vR||(vR=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(dC(),e),r(QH(),e)})(qi)),qi}var dm={},fm={},bR;function fC(){return bR||(bR=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={}))})(fm)),fm}var pm={},TR;function pC(){return TR||(TR=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={}))})(pm)),pm}var mm={},SR;function mC(){return SR||(SR=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={}))})(mm)),mm}var hm={},Vs={},IR;function X_(){return IR||(IR=1,Object.defineProperty(Vs,"__esModule",{value:!0}),Vs.displayableProperties=void 0,Vs.displayableProperties={menuBarIcon:{description:"Name of the file used as icon for the MenuBar",type:"string",nullable:!0}}),Vs}var ym={},RR;function hC(){return RR||(RR=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={}))})(ym)),ym}var gm={},wR;function yC(){return wR||(wR=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={}))})(gm)),gm}var AR;function eV(){return AR||(AR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Scene=e.RequiredPermission=void 0;const t=Ne(),r=X_(),n=fC(),i=mC(),a=hC(),s=yC(),o=pC();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={}))})(hm)),hm}var OR;function tV(){return OR||(OR=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=fC();Object.defineProperty(e,"FeatureToggles",{enumerable:!0,get:function(){return t.FeatureToggles}});var r=pC();Object.defineProperty(e,"WorldConfiguration",{enumerable:!0,get:function(){return r.WorldConfiguration}});var n=mC();Object.defineProperty(e,"SceneParcels",{enumerable:!0,get:function(){return n.SceneParcels}});var i=eV();Object.defineProperty(e,"Scene",{enumerable:!0,get:function(){return i.Scene}}),Object.defineProperty(e,"RequiredPermission",{enumerable:!0,get:function(){return i.RequiredPermission}});var a=hC();Object.defineProperty(e,"Source",{enumerable:!0,get:function(){return a.Source}});var s=yC();Object.defineProperty(e,"SpawnPoint",{enumerable:!0,get:function(){return s.SpawnPoint}})})(dm)),dm}var Bi={},_m={},Em={},NR;function gC(){return NR||(NR=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={}))})(Em)),Em}var PR;function _C(){return PR||(PR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.I18N=void 0;const t=Ne(),r=gC();(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={}))})(_m)),_m}var vm={},CR;function EC(){return CR||(CR=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={}))})(vm)),vm}var bm={},MR;function J_(){return MR||(MR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isStandard=e.standardProperties=void 0;const t=td(),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})(bm)),bm}var Tm={},ki={},Sm={},DR;function rV(){return DR||(DR=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={}))})(Sm)),Sm}var jR;function vC(){return jR||(jR=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(rV(),e)})(ki)),ki}var Im={},LR;function Q_(){return LR||(LR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createMappingsHelper=e.AddMappingError=e.Mappings=e.Mapping=e.MultipleMapping=e.RangeMapping=e.AnyMapping=e.SingleMapping=e.ContractNetwork=e.MappingType=void 0;const t=Ne();var r;(function(d){d.SINGLE="single",d.ANY="any",d.MULTIPLE="multiple",d.RANGE="range"})(r=e.MappingType||(e.MappingType={}));var n;(function(d){d.MAINNET="mainnet",d.BASE_MAINNET="base_mainnet",d.BASE_SEPOLIA="base_sepolia",d.MONAD_MAINNET="monad_mainnet",d.MONAD_TESTNET="monad_testnet",d.APE_MAINNET="ape_mainnet",d.APE_CALDERA="ape_caldera",d.MATIC="matic",d.SEPOLIA="sepolia",d.AMOY="amoy"})(n=e.ContractNetwork||(e.ContractNetwork={}));var i;(function(d){d.schema={type:"object",properties:{type:{type:"string",const:r.SINGLE},id:{type:"string",pattern:"^[0-9]+$"}},required:["type","id"],additionalProperties:!1},d.validate=(0,t.generateLazyValidator)(d.schema)})(i=e.SingleMapping||(e.SingleMapping={}));var a;(function(d){d.schema={type:"object",properties:{type:{type:"string",const:r.ANY}},required:["type"],additionalProperties:!1},d.validate=(0,t.generateLazyValidator)(d.schema)})(a=e.AnyMapping||(e.AnyMapping={}));var s;(function(d){d._fromLessThanOrEqualTo={keyword:"_fromLessThanOrEqualTo",validate:function(p,E){if(!E||!E.from||!E.to)return!1;let{to:T,from:S}=E;return(typeof S!="bigint"||typeof T!="bigint")&&(S=BigInt(S),T=BigInt(T)),S<=T},errors:!1},d.schema={type:"object",properties:{type:{type:"string",const:r.RANGE},from:{type:"string",pattern:"^[0-9]+$"},to:{type:"string",pattern:"^[0-9]+$"}},required:["type","from","to"],additionalProperties:!1,_fromLessThanOrEqualTo:!0},d.validate=(0,t.generateLazyValidator)(d.schema,[d._fromLessThanOrEqualTo])})(s=e.RangeMapping||(e.RangeMapping={}));var o;(function(d){d.schema={type:"object",properties:{type:{type:"string",const:r.MULTIPLE},ids:{type:"array",items:{type:"string",pattern:"^[0-9]+$"},minItems:1,uniqueItems:!0}},required:["type","ids"],additionalProperties:!1},d.validate=(0,t.generateLazyValidator)(d.schema)})(o=e.MultipleMapping||(e.MultipleMapping={}));var u;(function(d){d.schema={type:"object",properties:{type:{type:"string",enum:Object.values(r)}},required:["type"],oneOf:[i.schema,a.schema,s.schema,o.schema]},d.validate=(0,t.generateLazyValidator)(d.schema,[s._fromLessThanOrEqualTo])})(u=e.Mapping||(e.Mapping={})),(function(d){d._isMappingsValid={keyword:"_isMappingsValid",validate:function(p,E){try{c(E)}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 m=Object.values(n).reduce((p,E)=>(p[E]=d.innerSchema,p),{});d.schema={type:"object",properties:m,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(m,p,E){super(m),this.existingMapping=p,this.conflictingMapping=E}}e.AddMappingError=l;function c(d={}){const m={};for(const[h,I]of Object.entries(d)){m[h]={};for(const[O,P]of Object.entries(I))for(const B of P)_(h,O,B)}function p(){return JSON.parse(JSON.stringify(m))}function E(h,I,O){const P=BigInt(h);return P>=BigInt(I)&&P<=BigInt(O)}function T(h,I){switch(I.type){case r.SINGLE:return h.id===I.id;case r.MULTIPLE:return I.ids.includes(h.id);case r.RANGE:return E(h.id,I.from,I.to);default:return!1}}function S(h,I){switch(I.type){case r.SINGLE:return h.ids.includes(I.id);case r.MULTIPLE:return h.ids.some(O=>I.ids.includes(O));case r.RANGE:return h.ids.some(O=>E(O,I.from,I.to));default:return!1}}function A(h,I){switch(I.type){case r.SINGLE:return E(I.id,h.from,h.to);case r.MULTIPLE:return I.ids.some(O=>E(O,h.from,h.to));case r.RANGE:return BigInt(h.from)<=BigInt(I.to)&&BigInt(h.to)>=BigInt(I.from)}}function f(h,I){if(h.type===r.ANY||I.type===r.ANY)return!0;switch(h.type){case r.SINGLE:return T(h,I);case r.MULTIPLE:return S(h,I);case r.RANGE:return A(h,I)}}function _(h,I,O){var P,B;const z=I.toLowerCase();m[h]=(P=m[h])!==null&&P!==void 0?P:{},m[h][z]=(B=m[h][z])!==null&&B!==void 0?B:[];for(const Y of m[h][z])if(f(Y,O))throw new l(`Cannot add mapping to contract ${z} on network ${h} because it overlaps with existing mapping`,Y,O);m[h][z].push(O)}function b(h,I,O){var P;return!((P=m[h])===null||P===void 0)&&P[I]?m[h][I].some(B=>{switch(B.type){case r.SINGLE:return B.id===O;case r.ANY:return!0;case r.MULTIPLE:return B.ids.includes(O);case r.RANGE:return BigInt(O)>=BigInt(B.from)&&BigInt(O)<=BigInt(B.to)}}):!1}return{addMapping:_,getMappings:p,includesNft:b}}e.createMappingsHelper=c})(Im)),Im}var $R;function Z_(){return $R||($R=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.schema=void 0;const t=Ne(),r=vC(),n=Q_();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})(Tm)),Tm}var Rm={},wm={},zr={},qR;function bC(){if(qR)return zr;qR=1,Object.defineProperty(zr,"__esModule",{value:!0}),zr.isBaseEmote=zr.isBaseAvatar=zr.requiredBaseItemProps=zr.baseItemProperties=void 0;const e=_C(),t=EC(),r=X_();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 BR;function nV(){return BR||(BR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Wearable=void 0;const t=Ne(),r=Sa(),n=K_(),i=bC(),a=J_(),s=Z_(),o=x_(),u=Q_();(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:(m,p)=>!m||(0,s.isThirdParty)(p),errors:!1},d={keyword:"_isBaseAvatar",validate:(m,p)=>!m||(0,i.isBaseAvatar)(p),errors:!1};l.validate=(0,t.generateLazyValidator)(l.schema,[c,d,u.RangeMapping._fromLessThanOrEqualTo,u.Mappings._isMappingsValid])})(e.Wearable||(e.Wearable={}))})(wm)),wm}var kR;function iV(){return kR||(kR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=e.BodyPartCategory=e.WearableCategory=e.Wearable=e.WearableRepresentation=void 0;var t=K_();Object.defineProperty(e,"WearableRepresentation",{enumerable:!0,get:function(){return t.WearableRepresentation}});var r=nV();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=lC();Object.defineProperty(e,"BodyPartCategory",{enumerable:!0,get:function(){return i.BodyPartCategory}});var a=x_();Object.defineProperty(e,"HideableWearableCategory",{enumerable:!0,get:function(){return a.HideableWearableCategory}})})(Rm)),Rm}var Am={},Om={},Nm={},Pm={},UR;function TC(){return UR||(UR=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={}))})(Pm)),Pm}var Cm={},FR;function SC(){return FR||(FR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteRepresentationADR74=void 0;const t=Ne(),r=Y_();(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={}))})(Cm)),Cm}var Mm={},HR;function IC(){return HR||(HR=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={}))})(Mm)),Mm}var VR;function RC(){return VR||(VR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteDataADR74=void 0;const t=TC(),r=Ne(),n=SC(),i=IC();(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={}))})(Nm)),Nm}var GR;function aV(){return GR||(GR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Emote=void 0;const t=wC(),r=Ne(),n=bC(),i=J_(),a=Z_(),s=RC();(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={}))})(Om)),Om}var Dm={},zR;function sV(){return zR||(zR=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={}))})(Dm)),Dm}var jm={},WR;function oV(){return WR||(WR=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={}))})(jm)),jm}var YR;function uV(){return YR||(YR=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=aV();Object.defineProperty(e,"Emote",{enumerable:!0,get:function(){return t.Emote}});var r=SC();Object.defineProperty(e,"EmoteRepresentationADR74",{enumerable:!0,get:function(){return r.EmoteRepresentationADR74}});var n=RC();Object.defineProperty(e,"EmoteDataADR74",{enumerable:!0,get:function(){return n.EmoteDataADR74}});var i=IC();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=TC();Object.defineProperty(e,"EmoteCategory",{enumerable:!0,get:function(){return a.EmoteCategory}});var s=sV();Object.defineProperty(e,"EmotePlayMode",{enumerable:!0,get:function(){return s.EmotePlayMode}});var o=oV();Object.defineProperty(e,"EmoteOutcomeType",{enumerable:!0,get:function(){return o.EmoteOutcomeType}})})(Am)),Am}var xR;function wC(){return xR||(xR=1,(function(e){var t=Bi&&Bi.__createBinding||(Object.create?(function(l,c,d,m){m===void 0&&(m=d);var p=Object.getOwnPropertyDescriptor(c,d);(!p||("get"in p?!c.__esModule:p.writable||p.configurable))&&(p={enumerable:!0,get:function(){return c[d]}}),Object.defineProperty(l,m,p)}):(function(l,c,d,m){m===void 0&&(m=d),l[m]=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=_C();Object.defineProperty(e,"I18N",{enumerable:!0,get:function(){return n.I18N}});var i=gC();Object.defineProperty(e,"Locale",{enumerable:!0,get:function(){return i.Locale}});var a=EC();Object.defineProperty(e,"Metrics",{enumerable:!0,get:function(){return a.Metrics}});var s=Y_();Object.defineProperty(e,"BodyShape",{enumerable:!0,get:function(){return s.BodyShape}});var o=J_();Object.defineProperty(e,"isStandard",{enumerable:!0,get:function(){return o.isStandard}});var u=Z_();Object.defineProperty(e,"isThirdParty",{enumerable:!0,get:function(){return u.isThirdParty}}),r(Q_(),e),r(iV(),e),r(uV(),e)})(Bi)),Bi}var Lm={},$m={},KR;function Zo(){return KR||(KR=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={}))})($m)),$m}var XR;function cV(){return XR||(XR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PointerChangesSyncDeployment=e.SnapshotSyncDeployment=void 0;const t=Ia(),r=Zo(),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={}))})(Lm)),Lm}var qm={},Bm={},JR;function AC(){return JR||(JR=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={}))})(Bm)),Bm}var QR;function OC(){return QR||(QR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Entity=e.EntityType=void 0;const t=Ia(),r=AC(),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={}))})(qm)),qm}var km={},ZR;function lV(){return ZR||(ZR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeploymentWithAuthChain=void 0;const t=Zo(),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={}))})(km)),km}var Ui={},Um={},e1;function dV(){return e1||(e1=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={}))})(Um)),Um}var t1;function fV(){return t1||(t1=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(dV(),e)})(Ui)),Ui}var Fi={},Fm={},r1;function NC(){return r1||(r1=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={}))})(Fm)),Fm}var Hm={},Vm={},n1;function PC(){return n1||(n1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SubscriptionDetails=void 0;const t=Ne(),r=NC(),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={}))})(Vm)),Vm}var Gm={},i1;function CC(){return i1||(i1=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={}))})(Gm)),Gm}var a1;function pV(){return a1||(a1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Subscription=void 0;const t=Ne(),r=PC(),n=Ia(),i=CC();(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={}))})(Hm)),Hm}var s1;function mV(){return s1||(s1=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(NC(),e),r(pV(),e),r(PC(),e)})(Fi)),Fi}var Hi={},zm={},o1;function Er(){return o1||(o1=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={}))})(zm)),zm}var Wm={},u1;function hV(){return u1||(u1=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={}))})(Wm)),Wm}var Ym={},c1;function yV(){return c1||(c1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalystDeploymentEvent=void 0;const t=Zo(),r=Ne(),n=OC(),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={}))})(Ym)),Ym}var xm={},l1;function gV(){return l1||(l1=1,Object.defineProperty(xm,"__esModule",{value:!0})),xm}var Km={},d1;function _V(){return d1||(d1=1,Object.defineProperty(Km,"__esModule",{value:!0})),Km}var Xm={},f1;function EV(){return f1||(f1=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={}))})(Xm)),Xm}var Jm={},Gs={},p1;function rd(){if(p1)return Gs;p1=1,Object.defineProperty(Gs,"__esModule",{value:!0}),Gs.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 Gs.createEventSchema=e,Gs}var m1;function vV(){return m1||(m1=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=rd(),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={}))})(Jm)),Jm}var Qm={},h1;function bV(){return h1||(h1=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={}))})(Qm)),Qm}var Zm={},y1;function TV(){return y1||(y1=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=rd(),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={}))})(Zm)),Zm}var eh={},g1;function SV(){return g1||(g1=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={}))})(eh)),eh}var th={},_1;function IV(){return _1||(_1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ReferralNewTierReachedEvent=e.ReferralInvitedUsersAcceptedEvent=void 0;const t=Ne(),r=Er(),n=rd(),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={}))})(th)),th}var rh={},E1;function RV(){return E1||(E1=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={}))})(rh)),rh}var nh={},v1;function wV(){return v1||(v1=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={}))})(nh)),nh}var ih={},b1;function AV(){return b1||(b1=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={}))})(ih)),ih}var ah={},T1;function OV(){return T1||(T1=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=rd(),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={}))})(ah)),ah}var sh={},S1;function NV(){return S1||(S1=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=Zo(),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={}))})(sh)),sh}var oh={},I1;function PV(){return I1||(I1=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={}))})(oh)),oh}var R1;function CV(){return R1||(R1=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(hV(),e),r(yV(),e),r(gV(),e),r(_V(),e),r(EV(),e),r(vV(),e),r(bV(),e),r(TV(),e),r(SV(),e),r(IV(),e),r(RV(),e),r(wV(),e),r(AV(),e),r(OV(),e),r(NV(),e),r(PV(),e)})(Hi)),Hi}var w1;function eE(){return w1||(w1=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(ZH(),e),r(tV(),e),r(wC(),e),r(X_(),e),r(vC(),e),r(cV(),e),r(OC(),e),r(lV(),e),r(fV(),e),r(mV(),e),r(CV(),e)})($i)),$i}var A1;function MV(){return A1||(A1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableJson=void 0;const t=td(),r=Sa(),n=K_(),i=Ne(),a=eE();(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={}))})(tm)),tm}var O1;function DV(){return O1||(O1=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(JH(),e),r(MV(),e)})(Li)),Li}var N1;function jV(){return N1||(N1=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(XH(),e),r(DV(),e)})(Di)),Di}var Vi={},uh={},P1;function LV(){return P1||(P1=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={}))})(uh)),uh}var ch={},lh={},C1;function MC(){return C1||(C1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getChainId=e.ChainName=void 0;const t=Ne(),r=rn();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={}))})(lh)),lh}var dh={},M1;function tn(){return M1||(M1=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={}))})(dh)),dh}var D1;function rn(){return D1||(D1=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=MC(),n=tn();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={}))})(ch)),ch}var fh={},j1;function $V(){return j1||(j1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Collection=e.CollectionSortBy=void 0;const t=Ne(),r=rn(),n=tn();(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={}))})(fh)),fh}var ph={},mh={},L1;function nd(){return L1||(L1=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={}))})(mh)),mh}var $1;function qV(){return $1||($1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Contract=e.ContractSortBy=void 0;const t=Ne(),r=rn(),n=tn(),i=nd();(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={}))})(ph)),ph}var hh={},yh={},q1;function DC(){return q1||(q1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFT=e.NFTSortBy=void 0;const t=Ne(),r=rn(),n=eE(),i=tn(),a=nd(),s=td(),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={}))})(yh)),yh}var B1;function BV(){return B1||(B1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Item=e.ItemSortBy=void 0;const t=Ne(),r=rn(),n=tn(),i=DC(),a=nd();(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={}))})(hh)),hh}var gh={},k1;function tE(){return k1||(k1=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={}))})(gh)),gh}var _h={},U1;function kV(){return U1||(U1=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={}))})(_h)),_h}var Eh={},F1;function UV(){return F1||(F1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Mint=e.MintSortBy=void 0;const t=Ne(),r=rn(),n=tn();(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={}))})(Eh)),Eh}var vh={},H1;function FV(){return H1||(H1=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={}))})(vh)),vh}var bh={},V1;function HV(){return V1||(V1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Order=e.OrderSortBy=void 0;const t=Ne(),r=rn(),n=tE(),i=tn();(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={}))})(bh)),bh}var Th={},G1;function VV(){return G1||(G1=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={}))})(Th)),Th}var Sh={},z1;function jC(){return z1||(z1=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={}))})(Sh)),Sh}var Ih={},W1;function GV(){return W1||(W1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Sale=e.SaleSortBy=void 0;const t=Ne(),r=rn(),n=jC(),i=tn();(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={}))})(Ih)),Ih}var Rh={},Y1;function zV(){return Y1||(Y1=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=rn(),n=tn();(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={}))})(Rh)),Rh}var wh={},x1;function WV(){return x1||(x1=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={}))})(wh)),wh}var Ah={},K1;function YV(){return K1||(K1=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={}))})(Ah)),Ah}var Oh={},X1;function xV(){return X1||(X1=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={}))})(Oh)),Oh}var Nh={},J1;function KV(){return J1||(J1=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={}))})(Nh)),Nh}var Ph={},Q1;function XV(){return Q1||(Q1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Bid=e.BidSortBy=void 0;const t=Ne(),r=rn(),n=tE(),i=tn();(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={}))})(Ph)),Ph}var Ch={},Z1;function JV(){return Z1||(Z1=1,Object.defineProperty(Ch,"__esModule",{value:!0})),Ch}var Mh={},ew;function QV(){return ew||(ew=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={}))})(Mh)),Mh}var Gi={},Dh={},tw;function ZV(){return tw||(tw=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={}))})(Dh)),Dh}var jh={},rw;function eG(){return rw||(rw=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={}))})(jh)),jh}var Lh={},nw;function tG(){return nw||(nw=1,Object.defineProperty(Lh,"__esModule",{value:!0})),Lh}var $h={},iw;function rG(){return iw||(iw=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={}))})($h)),$h}var qh={},aw;function nG(){return aw||(aw=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={}))})(qh)),qh}var Bh={},sw;function iG(){return sw||(sw=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})(Bh)),Bh}var kh={},ow;function aG(){return ow||(ow=1,Object.defineProperty(kh,"__esModule",{value:!0})),kh}var Uh={},uw;function sG(){return uw||(uw=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={}))})(Uh)),Uh}var Fh={},cw;function oG(){return cw||(cw=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={}))})(Fh)),Fh}var Hh={},lw;function uG(){return lw||(lw=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={}))})(Hh)),Hh}var Vh={},dw;function cG(){return dw||(dw=1,Object.defineProperty(Vh,"__esModule",{value:!0})),Vh}var Gh={},fw;function lG(){return fw||(fw=1,Object.defineProperty(Gh,"__esModule",{value:!0})),Gh}var zh={},pw;function dG(){return pw||(pw=1,Object.defineProperty(zh,"__esModule",{value:!0})),zh}var Wh={},mw;function fG(){return mw||(mw=1,Object.defineProperty(Wh,"__esModule",{value:!0})),Wh}var Yh={},hw;function pG(){return hw||(hw=1,Object.defineProperty(Yh,"__esModule",{value:!0})),Yh}var xh={},yw;function mG(){return yw||(yw=1,Object.defineProperty(xh,"__esModule",{value:!0})),xh}var Kh={},gw;function hG(){return gw||(gw=1,Object.defineProperty(Kh,"__esModule",{value:!0})),Kh}var Xh={},_w;function yG(){return _w||(_w=1,Object.defineProperty(Xh,"__esModule",{value:!0})),Xh}var Ew;function gG(){return Ew||(Ew=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(ZV(),e),r(eG(),e),r(tG(),e),r(rG(),e),r(nG(),e),r(iG(),e),r(aG(),e),r(sG(),e),r(oG(),e),r(uG(),e),r(cG(),e),r(lG(),e),r(dG(),e),r(fG(),e),r(pG(),e),r(mG(),e),r(hG(),e),r(yG(),e)})(Gi)),Gi}var zi={},zs={},vw;function _G(){if(vw)return zs;vw=1,Object.defineProperty(zs,"__esModule",{value:!0}),zs.isSysLink=void 0;const e=t=>t!==null&&typeof t=="object"&&"sys"in t&&"id"in t.sys;return zs.isSysLink=e,zs}var Ws={},bw;function EG(){if(bw)return Ws;bw=1,Object.defineProperty(Ws,"__esModule",{value:!0}),Ws.ContentfulLocale=void 0;var e;return(function(t){t.enUS="en-US",t.es="es",t.zh="zh"})(e||(e={})),Ws.ContentfulLocale=e,Ws}var Jh={},Tw;function vG(){return Tw||(Tw=1,Object.defineProperty(Jh,"__esModule",{value:!0})),Jh}var Sw;function bG(){return Sw||(Sw=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(_G(),e),r(EG(),e),r(vG(),e)})(zi)),zi}var Iw;function TG(){return Iw||(Iw=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=LV();Object.defineProperty(e,"Account",{enumerable:!0,get:function(){return n.Account}}),Object.defineProperty(e,"AccountSortBy",{enumerable:!0,get:function(){return n.AccountSortBy}});var i=rn();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=MC();Object.defineProperty(e,"ChainName",{enumerable:!0,get:function(){return a.ChainName}}),Object.defineProperty(e,"getChainId",{enumerable:!0,get:function(){return a.getChainId}});var s=$V();Object.defineProperty(e,"Collection",{enumerable:!0,get:function(){return s.Collection}}),Object.defineProperty(e,"CollectionSortBy",{enumerable:!0,get:function(){return s.CollectionSortBy}});var o=qV();Object.defineProperty(e,"Contract",{enumerable:!0,get:function(){return o.Contract}}),Object.defineProperty(e,"ContractSortBy",{enumerable:!0,get:function(){return o.ContractSortBy}});var u=BV();Object.defineProperty(e,"Item",{enumerable:!0,get:function(){return u.Item}}),Object.defineProperty(e,"ItemSortBy",{enumerable:!0,get:function(){return u.ItemSortBy}});var l=tE();Object.defineProperty(e,"ListingStatus",{enumerable:!0,get:function(){return l.ListingStatus}});var c=kV();Object.defineProperty(e,"MetaTransaction",{enumerable:!0,get:function(){return c.MetaTransaction}});var d=UV();Object.defineProperty(e,"Mint",{enumerable:!0,get:function(){return d.Mint}}),Object.defineProperty(e,"MintSortBy",{enumerable:!0,get:function(){return d.MintSortBy}});var m=tn();Object.defineProperty(e,"Network",{enumerable:!0,get:function(){return m.Network}});var p=nd();Object.defineProperty(e,"NFTCategory",{enumerable:!0,get:function(){return p.NFTCategory}});var E=DC();Object.defineProperty(e,"NFT",{enumerable:!0,get:function(){return E.NFT}}),Object.defineProperty(e,"NFTSortBy",{enumerable:!0,get:function(){return E.NFTSortBy}});var T=FV();Object.defineProperty(e,"CatalogSortBy",{enumerable:!0,get:function(){return T.CatalogSortBy}}),Object.defineProperty(e,"CatalogSortDirection",{enumerable:!0,get:function(){return T.CatalogSortDirection}});var S=HV();Object.defineProperty(e,"Order",{enumerable:!0,get:function(){return S.Order}}),Object.defineProperty(e,"OrderSortBy",{enumerable:!0,get:function(){return S.OrderSortBy}});var A=VV();Object.defineProperty(e,"ProviderType",{enumerable:!0,get:function(){return A.ProviderType}});var f=td();Object.defineProperty(e,"Rarity",{enumerable:!0,get:function(){return f.Rarity}});var _=jC();Object.defineProperty(e,"SaleType",{enumerable:!0,get:function(){return _.SaleType}});var b=GV();Object.defineProperty(e,"Sale",{enumerable:!0,get:function(){return b.Sale}}),Object.defineProperty(e,"SaleSortBy",{enumerable:!0,get:function(){return b.SaleSortBy}});var h=zV();Object.defineProperty(e,"RentalStatus",{enumerable:!0,get:function(){return h.RentalStatus}}),Object.defineProperty(e,"RentalsListingSortDirection",{enumerable:!0,get:function(){return h.RentalsListingSortDirection}}),Object.defineProperty(e,"RentalsListingsFilterByCategory",{enumerable:!0,get:function(){return h.RentalsListingsFilterByCategory}}),Object.defineProperty(e,"RentalsListingsSortBy",{enumerable:!0,get:function(){return h.RentalsListingsSortBy}}),Object.defineProperty(e,"RentalListingCreation",{enumerable:!0,get:function(){return h.RentalListingCreation}}),Object.defineProperty(e,"PeriodCreation",{enumerable:!0,get:function(){return h.PeriodCreation}});var I=WV();Object.defineProperty(e,"AnalyticsDayDataSortBy",{enumerable:!0,get:function(){return I.AnalyticsDayDataSortBy}});var O=YV();Object.defineProperty(e,"Store",{enumerable:!0,get:function(){return O.Store}});var P=xV();Object.defineProperty(e,"WearableGender",{enumerable:!0,get:function(){return P.WearableGender}}),Object.defineProperty(e,"GenderFilterOption",{enumerable:!0,get:function(){return P.GenderFilterOption}});var B=KV();Object.defineProperty(e,"World",{enumerable:!0,get:function(){return B.World}}),Object.defineProperty(e,"getWorld",{enumerable:!0,get:function(){return B.getWorld}}),Object.defineProperty(e,"isInsideWorldLimits",{enumerable:!0,get:function(){return B.isInsideWorldLimits}}),r(XV(),e),r(JV(),e),r(QV(),e),r(gG(),e),r(bG(),e)})(Vi)),Vi}var Qh={},Rw;function SG(){return Rw||(Rw=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={}))})(Qh)),Qh}var Wi={},Zh={},Ys={},ww;function LC(){if(ww)return Ys;ww=1,Object.defineProperty(Ys,"__esModule",{value:!0}),Ys.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 Ys.isInExceptionBlock=n,Ys}var Aw;function IG(){return Aw||(Aw=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Parcel=e.PARCEL_LIMITS=void 0;const t=Ne(),r=LC();e.PARCEL_LIMITS={minX:-150,maxX:150,minY:-150,maxY:150},(function(n){n._isInLimits={keyword:"_isInLimits",validate:function(p,E){return!E||typeof E.x!="number"||typeof E.y!="number"?!1:o(E)||(0,r.isInExceptionBlock)(E.x,E.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:m,y:p}){return`${m},${p}`}n.parcelToString=i;function a(m){const p=m.match(/^(-?\d+),(-?\d+)$/);if(!p)return null;const[,E,T]=p,S=parseInt(E,10),A=parseInt(T,10);return{x:S,y:A}}n.stringToParcel=a;function s(m){const p=a(m);return p?n.validate(p):!1}n.isParcelStringValid=s;function o(m){const{x:p,y:E}=m;return p>=e.PARCEL_LIMITS.minX&&p<=e.PARCEL_LIMITS.maxX&&E>=e.PARCEL_LIMITS.minY&&E<=e.PARCEL_LIMITS.maxY}n.isInStandardBounds=o;function u(m){return(0,r.isInExceptionBlock)(m.x,m.y)}n.isExceptionParcel=u;function l(m){return o(m)||u(m)}n.isInBounds=l;function c(m){return n.validate(m)}n.isValid=c;function d(m){const p=a(m);return p?n.validate(p):!1}n.isValidString=d})(e.Parcel||(e.Parcel={}))})(Zh)),Zh}var Yi={},Ow;function RG(){if(Ow)return Yi;Ow=1,Object.defineProperty(Yi,"__esModule",{value:!0}),Yi.validateUrlInstance=Yi.validateUrl=void 0;const e={allowLocalhost:!1,allowedPorts:[]};function t(p,E=2){let T=p;for(let S=0;S<E;S++)try{T=decodeURIComponent(T)}catch{break}return T.normalize("NFKC")}function r(p){return/[\u0000-\u001F\u007F-\u009F\u202A-\u202E\u2066-\u2069]/.test(p)}function n(p){return!!(p.username||p.password)}function i(p){return/\\/.test(p)}const a=["80","443"];function s(p,E){return!!p.port&&!E.includes(p.port)}function o(p){const E=p.toLowerCase();return!!(E==="localhost"||E.endsWith(".local")||/^(127\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.|192\.168\.|169\.254\.)/.test(E)||E==="::1"||E==="[::1]"||E.startsWith("fe80:")||E.startsWith("fc00:"))}function u(p){if(p.startsWith("//"))return null;try{return{url:new URL(p),wasRelative:!1}}catch{try{return{url:new URL(p,"https://example.com"),wasRelative:!0}}catch{return null}}}function l(p){const E=t(String(p).toLowerCase());return!(r(E)||i(E))}function c(p){return!(!p||p.includes("..")||p.includes("//")||r(p)||i(p))}function d(p,E={}){const T=Object.assign(Object.assign({},e),E),S=[...a,...T.allowedPorts];if(!p||p.length===0||p.length>4096||r(p)||i(p))return!1;const A=t(p);if(r(A)||i(A)||p.startsWith("//"))return!1;const f=u(p);if(!f)return!1;const{url:_,wasRelative:b}=f;if(_.protocol!=="http:"&&_.protocol!=="https:"&&_.protocol!==""||n(_)||i(p)||i(_.href)||!b&&(s(_,S)||!T.allowLocalhost&&_.hostname&&o(_.hostname))||!c(_.pathname)||_.pathname.length>2048)return!1;const h=Array.from(_.searchParams.entries());if(h.length>50||(_.search?_.search.startsWith("?")?_.search.length-1:_.search.length:0)>2048)return!1;for(const[O,P]of h)if(O.length===0||!l(O)||!l(P)||O.length>128||P.length>1024)return!1;return!(_.hash&&r(_.hash))}Yi.validateUrl=d;function m(p,E={}){return d(p.toString(),E)}return Yi.validateUrlInstance=m,Yi}var Nw;function wG(){return Nw||(Nw=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(IG(),e),r(LC(),e),r(RG(),e)})(Wi)),Wi}var Pw;function AG(){return Pw||(Pw=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(jV());e.sdk=a,i(Ne(),e),i(TG(),e),i(eE(),e),i(Ia(),e),i(SG(),e),i(Zo(),e),i(AC(),e),i(CC(),e),i(wG(),e)})(Vr)),Vr}var Cw;function $C(){return Cw||(Cw=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthLink=e.AuthLinkType=e.AuthChain=void 0;const t=AG();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}})})(Jp)),Jp}var Mw;function qC(){return Mw||(Mw=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=m,e.isValidAuthChain=p,e.createEIP1271MessageHash=E,e.createSimpleAuthChain=T,e.createAuthChain=S,e.initializeAuthChain=A,e.signPayload=f,e.createSignature=_,e.ownerAddress=b,e.getEphemeralMessage=h,e.getEphemeralSignatureType=W,e.getSignedIdentitySignatureType=U,e.parseEphemeralPayload=F,e.isValidEIP1271Signature=ce;const a=n(Zl()),s=LH(),o=zH(),u=i(WH()),l=YH(),c=$C();e.VALID_SIGNATURE="VALID_SIGNATURE",e.ERC1654_MAGIC_VALUE="1626ba7e";const d=132;async function m(X,x,L,D=Date.now()){let $="";if(!p(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 p(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 E(X){return(0,a.hexToBytes)((0,a.sha3)((0,a.stringToUtf8Bytes)(X)))}function T(X,x,L){return[{type:c.AuthLinkType.SIGNER,payload:x,signature:""},{type:U(L),payload:X,signature:L}]}function S(X,x,L,D){const $=(0,l.moveMinutes)(L),V=h(x.address,$),N=_(X,V),j=_(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 A(X,x,L,D){const $=(0,l.moveMinutes)(L),V=h(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 f(X,x){const L=_(X.ephemeralIdentity,x);return[...X.authChain,{type:c.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY,payload:x,signature:L}]}e.createEthereumMessageHash=o.createEthereumMessageHash;function _(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 h(X,x){return`Decentraland Login
71
+ Ephemeral address: ${X}
72
+ Expiration: ${x.toISOString()}`}e.Authenticator={validateSignature:m,isValidAuthChain:p,createEIP1271MessageHash:E,createSimpleAuthChain:T,createAuthChain:S,initializeAuthChain:A,signPayload:f,createEthereumMessageHash:e.createEthereumMessageHash,createSignature:_,ownerAddress:b,getEphemeralMessage:h};const I=async(X,x)=>({nextAuthority:x.payload});e.SIGNER_VALIDATOR=I;const O=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=O;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 B=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=B;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 $=E(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 Cn={},Dw;function OG(){return Dw||(Dw=1,Object.defineProperty(Cn,"__esModule",{value:!0}),Cn.AUTH_METADATA_HEADER=Cn.AUTH_TIMESTAMP_HEADER=Cn.AUTH_CHAIN_HEADER_PREFIX=void 0,Cn.AUTH_CHAIN_HEADER_PREFIX="x-identity-auth-chain-",Cn.AUTH_TIMESTAMP_HEADER="x-identity-timestamp",Cn.AUTH_METADATA_HEADER="x-identity-metadata"),Cn}var jw;function NG(){return jw||(jw=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(qC(),e),r(OG(),e),r($C(),e)})(Ci)),Ci}var PG=NG(),xi={},Wr={},nl={exports:{}},il={exports:{}},Lw;function rE(){return Lw||(Lw=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})(il,il.exports)),il.exports}var al={exports:{}},$w;function CG(){return $w||($w=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})(al,al.exports)),al.exports}var sl={exports:{}},qw;function MG(){return qw||(qw=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})(sl,sl.exports)),sl.exports}var ol={exports:{}},ul={exports:{}},Bw;function BC(){return Bw||(Bw=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})(ul,ul.exports)),ul.exports}var kw;function DG(){return kw||(kw=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=i(rE()),n=i(BC());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})(ol,ol.exports)),ol.exports}var cl={exports:{}},Uw;function jG(){return Uw||(Uw=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var r=n(rE());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(m){return typeof m}:function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m},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 m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(0,r.default)(d);var p=(i(m)==="object"?m.version:arguments[1])||"";return p?p.toString()==="4"?o.test(d):p.toString()==="6"?l.test(d):!1:c(d,{version:4})||c(d,{version:6})}e.exports=t.default,e.exports.default=t.default})(cl,cl.exports)),cl.exports}var Fw;function LG(){return Fw||(Fw=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=A;var r=u(rE()),n=u(CG()),i=u(MG()),a=u(DG()),s=u(jG()),o=u(BC());function u(f){return f&&f.__esModule?f:{default:f}}function l(f,_){return E(f)||p(f,_)||d(f,_)||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(f,_){if(f){if(typeof f=="string")return m(f,_);var b={}.toString.call(f).slice(8,-1);return b==="Object"&&f.constructor&&(b=f.constructor.name),b==="Map"||b==="Set"?Array.from(f):b==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(b)?m(f,_):void 0}}function m(f,_){(_==null||_>f.length)&&(_=f.length);for(var b=0,h=Array(_);b<_;b++)h[b]=f[b];return h}function p(f,_){var b=f==null?null:typeof Symbol<"u"&&f[Symbol.iterator]||f["@@iterator"];if(b!=null){var h,I,O,P,B=[],z=!0,Y=!1;try{if(O=(b=b.call(f)).next,_!==0)for(;!(z=(h=O.call(b)).done)&&(B.push(h.value),B.length!==_);z=!0);}catch(W){Y=!0,I=W}finally{try{if(!z&&b.return!=null&&(P=b.return(),Object(P)!==P))return}finally{if(Y)throw I}}return B}}function E(f){if(Array.isArray(f))return f}var T={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},S=/^\[([^\]]+)\](?::([0-9]+))?$/;function A(f,_){if((0,r.default)(f),!f||/[\s<>]/.test(f)||f.indexOf("mailto:")===0||(_=(0,o.default)(_,T),_.validate_length&&f.length>_.max_allowed_length)||!_.allow_fragments&&(0,i.default)(f,"#")||!_.allow_query_components&&((0,i.default)(f,"?")||(0,i.default)(f,"&")))return!1;var b,h,I,O,P,B,z,Y;z=f.split("#"),f=z.shift(),z=f.split("?"),f=z.shift();var W=f.match(/^([a-z][a-z0-9+\-.]*):/i),U=!1,F=function(le){return U=!0,b=le.toLowerCase(),_.require_valid_protocol&&_.protocols.indexOf(b)===-1?!1:f.substring(W[0].length)};if(W){var ce=W[1],se=f.substring(W[0].length),ne=se.slice(0,2)==="//";if(ne){if(f=F(ce),f===!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(_.require_protocol)return!1}else if(f=F(ce),f===!1)return!1}else{var j=/^[0-9]/.test(se);if(j){if(_.require_protocol)return!1}else if(f=F(ce),f===!1)return!1}}}else if(_.require_protocol)return!1;if(f.slice(0,2)==="//"){if(!U&&!_.allow_protocol_relative_urls)return!1;f=f.slice(2)}if(f==="")return!1;if(z=f.split("/"),f=z.shift(),f===""&&!_.require_host)return!0;if(z=f.split("@"),z.length>1){if(_.disallow_auth||z[0]===""||(h=z.shift(),h.indexOf(":")>=0&&h.split(":").length>2))return!1;var Z=h.split(":"),Ee=l(Z,2),_e=Ee[0],Se=Ee[1];if(_e===""&&Se==="")return!1}O=z.join("@"),B=null,Y=null;var Ie=O.match(S);if(Ie?(I="",Y=Ie[1],B=Ie[2]||null):(z=O.split(":"),I=z.shift(),z.length&&(B=z.join(":"))),B!==null&&B.length>0){if(P=parseInt(B,10),!/^[0-9]+$/.test(B)||P<=0||P>65535)return!1}else if(_.require_port)return!1;return _.host_whitelist?(0,n.default)(I,_.host_whitelist):I===""&&!_.require_host?!0:!(!(0,s.default)(I)&&!(0,a.default)(I,_)&&(!Y||!(0,s.default)(Y,6))||(I=I||Y,_.host_blacklist&&(0,n.default)(I,_.host_blacklist)))}e.exports=t.default,e.exports.default=t.default})(nl,nl.exports)),nl.exports}var ey={},Hw;function kC(){return Hw||(Hw=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()}`}})(ey)),ey}var Vw;function $G(){if(Vw)return Wr;Vw=1,Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.clearIdentity=Wr.storeIdentity=Wr.getIdentity=Wr.init=void 0;const e=LG(),t=kC(),r=t.SINGLE_SIGN_ON_TARGET,n=500,i=5;let a=0,s="";const o={protocols:["https"],require_protocol:!0};function u(S,A={}){if(!(0,e.default)(S,{...o,...A}))throw new Error(`Invalid url: ${S}`);if(s)throw new Error("Already initialized");const f=document.createElement("iframe");f.id=r,f.src=S,f.style.width="0",f.style.height="0",f.style.border="none",f.style.position="absolute",document.body.appendChild(f),s=S}Wr.init=u;async function l(S){let A;try{A=(await p(await m(),t.Action.GET,{user:S})).identity??null}catch(f){T(f),A=(0,t.localStorageGetIdentity)(S)}return A}Wr.getIdentity=l;async function c(S,A){try{await p(await m(),t.Action.STORE,{user:S,identity:A})}catch(f){T(f),(0,t.localStorageStoreIdentity)(S,A)}}Wr.storeIdentity=c;async function d(S){try{await p(await m(),t.Action.CLEAR,{user:S})}catch(A){T(A),(0,t.localStorageClearIdentity)(S)}}Wr.clearIdentity=d;async function m(){if(!s)throw new Error("Not initialized");for(let S=0;S<i;S++){const A=document.getElementById(r),f=A==null?void 0:A.contentWindow;if(!f){await E(n);continue}try{await p(f,t.Action.PING,{},n)}catch{continue}return f}throw new Error("Could not get iframe because it is not ready or cannot be communicated with")}async function p(S,A,f,_=0){a++;const b=a;let h=null;const I=new Promise((O,P)=>{h=({data:B})=>{!B||B.target!==t.SINGLE_SIGN_ON_TARGET||B.id!==b||(B.error?P(new Error(B.error)):O(B))},window.addEventListener("message",h)});S.postMessage((0,t.createMessage)({id:b,action:A,...f}),s);try{return await(_?Promise.race([I,new Promise((O,P)=>setTimeout(()=>P(new Error("Did not receive a response in time")),_))]):I)}catch(O){throw O}finally{h&&window.removeEventListener("message",h)}}function E(S){return new Promise(A=>setTimeout(A,S))}function T(S){console.warn("Could not get identity from iframe, falling back to localStorage. Error:",S.message)}return Wr}var Gw;function qG(){return Gw||(Gw=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($G(),e),r(kC(),e)})(xi)),xi}var Hg=qG();function BG(e){const{host:t}=e;return t.endsWith(".org")||t.endsWith(".co")?vn.PRODUCTION:t.endsWith(".today")||t.endsWith(".net")?vn.STAGING:t.endsWith(".io")||t.endsWith(".zone")?vn.DEVELOPMENT:null}function kG(e){const t=new URLSearchParams(e.search),r=t.get("ENV")||t.get("env");if(r){const n=r.toLowerCase();if(FC(n))return n}return null}var zw={},vn;(function(e){e.DEVELOPMENT="dev",e.STAGING="stg",e.PRODUCTION="prod"})(vn||(vn={}));function UC(){return Object.values(vn)}function FC(e){return UC().includes(e)}function ll(e){if(FC(e))return e;throw new Error(`Invalid value for DCL_DEFAULT_ENV. Found "${e}", possible values are ${UC().map(t=>`"${t}"`).join(", ")}.`)}function UG(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?ll(t):r?ll(r):n?ll(n):i?ll(i):vn.PRODUCTION}function FG(e){if(typeof window<"u"){const r=kG(window.location);if(r)return r;const n=BG(window.location);if(n)return n}return UG(typeof e>"u"&&typeof ml=="object"&&typeof zw=="object"?zw:e)}function HG(e,t){const r=FG(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 VG="development",GG="80002",zG="https://marketplace-api.decentraland.zone",WG="https://marketplace-api.decentraland.zone",YG="/auth",xG="https://rpc.decentraland.org/amoy",KG="https://credits.decentraland.zone",XG="https://builder-api.decentraland.zone",JG="https://peer.decentraland.zone",QG="",ZG="",e3="",t3="",r3={ENVIRONMENT:VG,CHAIN_ID:GG,MARKETPLACE_SERVER_URL:zG,NFT_API_URL:WG,AUTH_URL:YG,RPC_URL:xG,CREDITS_SERVER_URL:KG,BUILDER_SERVER_URL:XG,PEER_URL:JG,SHOP_SERVER_URL:QG,STRIPE_PUBLISHABLE_KEY:ZG,SEGMENT_WRITE_KEY:e3,SENTRY_DSN:t3},n3="staging",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="production",_3="137",E3="https://marketplace-api.decentraland.org",v3="https://marketplace-api.decentraland.org",b3="/auth",T3="https://rpc.decentraland.org/polygon",S3="https://credits.decentraland.org",I3="https://builder-api.decentraland.org",R3="https://peer.decentraland.org",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={},Nr=HG({[vn.DEVELOPMENT]:r3,[vn.STAGING]:y3,[vn.PRODUCTION]:P3},{systemEnvVariables:{VITE_DCL_DEFAULT_ENV:"dev"}}),or=C3,Dt={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"}`},M3=744*60;async function HC(){return(await xt(async()=>{const{connection:e}=await import("./index-zVvLDKBh.js").then(t=>t.i);return{connection:e}},__vite__mapDeps([7,1]))).connection}async function D3(e){if(!e.account)throw new Error("No account returned by the wallet");const t=e.account.toLowerCase(),r=new MD(e.provider),n=r.getSigner();let i=Hg.localStorageGetIdentity(t);if(!i){const a=DD.createRandom();i=await PG.Authenticator.initializeAuthChain(t,{address:a.address,publicKey:jE(a.publicKey),privateKey:jE(a.privateKey)},M3,s=>n.signMessage(s)),Hg.localStorageStoreIdentity(t,i)}return{address:t,chainId:e.chainId,signer:n,web3Provider:r,identity:i,providerType:e.providerType}}function j3(){const e=encodeURIComponent(window.location.href);window.location.replace(`${Dt.authUrl}/login?redirectTo=${e}`)}async function L3(){try{const t=await(await HC()).tryPreviousConnection();return!t.account||!Hg.localStorageGetIdentity(t.account.toLowerCase())?null:await D3(t)}catch{return null}}async function $3(){try{await(await HC()).disconnect()}catch{}}const q3=typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():`s-${String(performance.now())}`,B3=Dt.chainId===80002?"amoy":"polygon",k3=Dt.chainId===80002?"dev":"prod";function VC(){return window.analytics}function U3(){let e=null;try{e=Ss.getState().session}catch{e=null}return{address:(e==null?void 0:e.address)??null,is_signed_in:!!e,session_id:q3,network:B3,app_env:k3}}function ci(e,t={}){const r={...U3(),...t},n=VC();n&&n.track(e,r)}function F3(e,t={}){const r=VC();r&&r.identify(e.toLowerCase(),t)}function H3(e){ci("Shop Viewed Page",{page:e})}function Ww(e){return e===Hn.ProviderType.MAGIC||e===Hn.ProviderType.MAGIC_TEST?"magic":"wallet"}function V3(e){const t=`shop:seen:${e.toLowerCase()}`;try{return localStorage.getItem(t)?!1:(localStorage.setItem(t,"1"),!0)}catch{return!1}}function Do(e){return Math.round(e*10)/100}function nE(e){return!e.tokenId}function XW(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:Do(e.priceCredits),rarity:e.rarity,creator:e.creator||null,is_primary:nE(e)}}function JW(e){const t=e.reduce((n,i)=>n+i.priceCredits,0),r=e.some(nE);return{items:e.map(n=>({item_id:n.itemId??null,contract_address:n.contractAddress,token_id:n.tokenId??null,price_usd:Do(n.priceCredits)})),value_credits:t,value_usd:Do(t),purchase_type:r?"item":"nft_resale",is_primary:r}}function G3(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 QW(e){return G3(e)==="user_rejected"}function z3(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 Yw=!1;function W3(){if(Yw)return;Yw=!0;const e=Dt.segmentWriteKey;e&&z3(e)}let Vg=null;function Y3(e){Vg=e}function xw(e,t={}){const r=typeof t.flow=="string"?`error in ${t.flow}`:"error";if(console.error(`[shop] ${r}`,e,t),Vg)try{Vg(e,t)}catch{}}const x3=/0x[a-fA-F0-9]{130}\b/g,K3=/0x[a-fA-F0-9]{64}\b/g,X3=/(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,J3=/(signature|private|identity|authchain|auth_chain|ephemeral|token|secret|password|cookie|authorization)/i;function xs(e){return e.replace(x3,"<signature>").replace(X3,"<secret>").replace(K3,"<hex32>")}function Q3(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(J3.test(i)){delete n[i];continue}typeof n[i]=="string"&&(n[i]=xs(n[i]))}};return t(e.tags),t(e.extra),e}let Kw=!1;function Z3(){if(Kw)return;const e=Dt.sentryDsn;if(!e)return;Kw=!0,Hk({dsn:e,environment:Dt.sentryEnvironment,release:Dt.sentryRelease,integrations:[new NB],tracesSampleRate:.01,sendDefaultPii:!1,ignoreErrors:[/user rejected/i,/user denied/i,"ResizeObserver loop limit exceeded"],beforeSend:Q3});const t=e4();t&&QL({id:t}),Y3((r,n)=>E_(r,{extra:n}))}function e4(){var e;try{return((e=Ss.getState().session)==null?void 0:e.address)??null}catch{return null}}const ty="shop:signing_in",Ss=Ts(e=>({session:null,connecting:!1,error:null,signIn:()=>{try{sessionStorage.setItem(ty,"1")}catch{}j3()},disconnect:async()=>{ci("Shop Signed Out");try{await $3()}catch(t){xw(t,{flow:"wallet",step:"disconnect"})}e({session:null})},restore:async()=>{let t;try{t=await L3()}catch(n){xw(n,{flow:"wallet",step:"restore"});return}if(!t)return;e({session:t}),F3(t.address,{sign_in_method:Ww(t.providerType)});let r=!1;try{r=sessionStorage.getItem(ty)==="1",r&&sessionStorage.removeItem(ty)}catch{}r&&ci("Shop Signed In",{method:Ww(t.providerType),is_new_user:V3(t.address)})}})),t4=Dt.peerUrl;function iE(e){return Dl({queryKey:["profile",e],enabled:!!e,staleTime:5*6e4,queryFn:async()=>{var n;const t=await fetch(`${t4}/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 Mn={},ry={},Xw;function GC(){return Xw||(Xw=1,Object.defineProperty(ry,"__esModule",{value:!0})),ry}var Dn={},fn={},La={},Ki={},Jw={},Ks,Qw;function nn(){if(Qw)return Ks;Qw=1;var e=function(t){return t&&t.Math===Math&&t};return Ks=e(typeof globalThis=="object"&&globalThis)||e(typeof window=="object"&&window)||e(typeof self=="object"&&self)||e(typeof ng=="object"&&ng)||e(typeof Ks=="object"&&Ks)||(function(){return this})()||Function("return this")(),Ks}var ny,Zw;function Ra(){return Zw||(Zw=1,ny=function(e){try{return!!e()}catch{return!0}}),ny}var iy,eA;function id(){if(eA)return iy;eA=1;var e=Ra();return iy=!e(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),iy}var ay,tA;function r4(){if(tA)return ay;tA=1;var e=id(),t=Function.prototype,r=t.apply,n=t.call;return ay=typeof Reflect=="object"&&Reflect.apply||(e?n.bind(r):function(){return n.apply(r,arguments)}),ay}var sy,rA;function Is(){if(rA)return sy;rA=1;var e=id(),t=Function.prototype,r=t.call,n=e&&t.bind.bind(r,r);return sy=e?n:function(i){return function(){return r.apply(i,arguments)}},sy}var oy,nA;function zC(){if(nA)return oy;nA=1;var e=Is(),t=e({}.toString),r=e("".slice);return oy=function(n){return r(t(n),8,-1)},oy}var uy,iA;function WC(){if(iA)return uy;iA=1;var e=zC(),t=Is();return uy=function(r){if(e(r)==="Function")return t(r)},uy}var cy,aA;function wa(){if(aA)return cy;aA=1;var e=typeof document=="object"&&document.all;return cy=typeof e>"u"&&e!==void 0?function(t){return typeof t=="function"||t===e}:function(t){return typeof t=="function"},cy}var ly={},dy,sA;function eu(){if(sA)return dy;sA=1;var e=Ra();return dy=!e(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),dy}var fy,oA;function aE(){if(oA)return fy;oA=1;var e=id(),t=Function.prototype.call;return fy=e?t.bind(t):function(){return t.apply(t,arguments)},fy}var py={},uA;function n4(){if(uA)return py;uA=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,r=t&&!e.call({1:2},1);return py.f=r?function(i){var a=t(this,i);return!!a&&a.enumerable}:e,py}var my,cA;function YC(){return cA||(cA=1,my=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}),my}var hy,lA;function i4(){if(lA)return hy;lA=1;var e=Is(),t=Ra(),r=zC(),n=Object,i=e("".split);return hy=t(function(){return!n("z").propertyIsEnumerable(0)})?function(a){return r(a)==="String"?i(a,""):n(a)}:n,hy}var yy,dA;function xC(){return dA||(dA=1,yy=function(e){return e==null}),yy}var gy,fA;function KC(){if(fA)return gy;fA=1;var e=xC(),t=TypeError;return gy=function(r){if(e(r))throw new t("Can't call method on "+r);return r},gy}var _y,pA;function a4(){if(pA)return _y;pA=1;var e=i4(),t=KC();return _y=function(r){return e(t(r))},_y}var Ey,mA;function ad(){if(mA)return Ey;mA=1;var e=wa();return Ey=function(t){return typeof t=="object"?t!==null:e(t)},Ey}var vy,hA;function XC(){return hA||(hA=1,vy={}),vy}var by,yA;function s4(){if(yA)return by;yA=1;var e=XC(),t=nn(),r=wa(),n=function(i){return r(i)?i:void 0};return by=function(i,a){return arguments.length<2?n(e[i])||n(t[i]):e[i]&&e[i][a]||t[i]&&t[i][a]},by}var Ty,gA;function o4(){if(gA)return Ty;gA=1;var e=Is();return Ty=e({}.isPrototypeOf),Ty}var Sy,_A;function u4(){if(_A)return Sy;_A=1;var e=nn(),t=e.navigator,r=t&&t.userAgent;return Sy=r?String(r):"",Sy}var Iy,EA;function c4(){if(EA)return Iy;EA=1;var e=nn(),t=u4(),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]))),Iy=o,Iy}var Ry,vA;function JC(){if(vA)return Ry;vA=1;var e=c4(),t=Ra(),r=nn(),n=r.String;return Ry=!!Object.getOwnPropertySymbols&&!t(function(){var i=Symbol("symbol detection");return!n(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&e&&e<41}),Ry}var wy,bA;function QC(){if(bA)return wy;bA=1;var e=JC();return wy=e&&!Symbol.sham&&typeof Symbol.iterator=="symbol",wy}var Ay,TA;function ZC(){if(TA)return Ay;TA=1;var e=s4(),t=wa(),r=o4(),n=QC(),i=Object;return Ay=n?function(a){return typeof a=="symbol"}:function(a){var s=e("Symbol");return t(s)&&r(s.prototype,i(a))},Ay}var Oy,SA;function l4(){if(SA)return Oy;SA=1;var e=String;return Oy=function(t){try{return e(t)}catch{return"Object"}},Oy}var Ny,IA;function eM(){if(IA)return Ny;IA=1;var e=wa(),t=l4(),r=TypeError;return Ny=function(n){if(e(n))return n;throw new r(t(n)+" is not a function")},Ny}var Py,RA;function d4(){if(RA)return Py;RA=1;var e=eM(),t=xC();return Py=function(r,n){var i=r[n];return t(i)?void 0:e(i)},Py}var Cy,wA;function f4(){if(wA)return Cy;wA=1;var e=aE(),t=wa(),r=ad(),n=TypeError;return Cy=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")},Cy}var My={exports:{}},Dy,AA;function p4(){return AA||(AA=1,Dy=!0),Dy}var jy,OA;function m4(){if(OA)return jy;OA=1;var e=nn(),t=Object.defineProperty;return jy=function(r,n){try{t(e,r,{value:n,configurable:!0,writable:!0})}catch{e[r]=n}return n},jy}var NA;function h4(){if(NA)return My.exports;NA=1;var e=p4(),t=nn(),r=m4(),n="__core-js_shared__",i=My.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"}),My.exports}var Ly,PA;function y4(){if(PA)return Ly;PA=1;var e=h4();return Ly=function(t,r){return e[t]||(e[t]=r||{})},Ly}var $y,CA;function g4(){if(CA)return $y;CA=1;var e=KC(),t=Object;return $y=function(r){return t(e(r))},$y}var qy,MA;function sE(){if(MA)return qy;MA=1;var e=Is(),t=g4(),r=e({}.hasOwnProperty);return qy=Object.hasOwn||function(i,a){return r(t(i),a)},qy}var By,DA;function _4(){if(DA)return By;DA=1;var e=Is(),t=0,r=Math.random(),n=e(1.1.toString);return By=function(i){return"Symbol("+(i===void 0?"":i)+")_"+n(++t+r,36)},By}var ky,jA;function E4(){if(jA)return ky;jA=1;var e=nn(),t=y4(),r=sE(),n=_4(),i=JC(),a=QC(),s=e.Symbol,o=t("wks"),u=a?s.for||s:s&&s.withoutSetter||n;return ky=function(l){return r(o,l)||(o[l]=i&&r(s,l)?s[l]:u("Symbol."+l)),o[l]},ky}var Uy,LA;function v4(){if(LA)return Uy;LA=1;var e=aE(),t=ad(),r=ZC(),n=d4(),i=f4(),a=E4(),s=TypeError,o=a("toPrimitive");return Uy=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)},Uy}var Fy,$A;function tM(){if($A)return Fy;$A=1;var e=v4(),t=ZC();return Fy=function(r){var n=e(r,"string");return t(n)?n:n+""},Fy}var Hy,qA;function b4(){if(qA)return Hy;qA=1;var e=nn(),t=ad(),r=e.document,n=t(r)&&t(r.createElement);return Hy=function(i){return n?r.createElement(i):{}},Hy}var Vy,BA;function rM(){if(BA)return Vy;BA=1;var e=eu(),t=Ra(),r=b4();return Vy=!e&&!t(function(){return Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a!==7}),Vy}var kA;function T4(){if(kA)return ly;kA=1;var e=eu(),t=aE(),r=n4(),n=YC(),i=a4(),a=tM(),s=sE(),o=rM(),u=Object.getOwnPropertyDescriptor;return ly.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])},ly}var Gy,UA;function S4(){if(UA)return Gy;UA=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 Gy=n,Gy}var zy,FA;function I4(){if(FA)return zy;FA=1;var e=WC(),t=eM(),r=id(),n=e(e.bind);return zy=function(i,a){return t(i),a===void 0?i:r?n(i,a):function(){return i.apply(a,arguments)}},zy}var Wy={},Yy,HA;function R4(){if(HA)return Yy;HA=1;var e=eu(),t=Ra();return Yy=e&&t(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Yy}var xy,VA;function w4(){if(VA)return xy;VA=1;var e=ad(),t=String,r=TypeError;return xy=function(n){if(e(n))return n;throw new r(t(n)+" is not an object")},xy}var GA;function A4(){if(GA)return Wy;GA=1;var e=eu(),t=rM(),r=R4(),n=w4(),i=tM(),a=TypeError,s=Object.defineProperty,o=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return Wy.f=e?r?function(m,p,E){if(n(m),p=i(p),n(E),typeof m=="function"&&p==="prototype"&&"value"in E&&c in E&&!E[c]){var T=o(m,p);T&&T[c]&&(m[p]=E.value,E={configurable:l in E?E[l]:T[l],enumerable:u in E?E[u]:T[u],writable:!1})}return s(m,p,E)}:s:function(m,p,E){if(n(m),p=i(p),n(E),t)try{return s(m,p,E)}catch{}if("get"in E||"set"in E)throw new a("Accessors not supported");return"value"in E&&(m[p]=E.value),m},Wy}var Ky,zA;function O4(){if(zA)return Ky;zA=1;var e=eu(),t=A4(),r=YC();return Ky=e?function(n,i,a){return t.f(n,i,r(1,a))}:function(n,i,a){return n[i]=a,n},Ky}var Xy,WA;function N4(){if(WA)return Xy;WA=1;var e=nn(),t=r4(),r=WC(),n=wa(),i=T4().f,a=S4(),s=XC(),o=I4(),u=O4(),l=sE(),c=function(d){var m=function(p,E,T){if(this instanceof m){switch(arguments.length){case 0:return new d;case 1:return new d(p);case 2:return new d(p,E)}return new d(p,E,T)}return t(d,this,arguments)};return m.prototype=d.prototype,m};return Xy=function(d,m){var p=d.target,E=d.global,T=d.stat,S=d.proto,A=E?e:T?e[p]:e[p]&&e[p].prototype,f=E?s:s[p]||u(s,p,{})[p],_=f.prototype,b,h,I,O,P,B,z,Y,W;for(O in m)b=a(E?O:p+(T?".":"#")+O,d.forced),h=!b&&A&&l(A,O),B=f[O],h&&(d.dontCallGetSet?(W=i(A,O),z=W&&W.value):z=A[O]),P=h&&z?z:m[O],!(!b&&!S&&typeof B==typeof P)&&(d.bind&&h?Y=o(P,e):d.wrap&&h?Y=c(P):S&&n(P)?Y=r(P):Y=P,(d.sham||P&&P.sham||B&&B.sham)&&u(Y,"sham",!0),u(f,O,Y),S&&(I=p+"Prototype",l(s,I)||u(s,I,{}),u(s[I],O,P),d.real&&_&&(b||!_[O])&&u(_,O,P)))},Xy}var YA;function P4(){if(YA)return Jw;YA=1;var e=N4(),t=nn();return e({global:!0,forced:t.globalThis!==t},{globalThis:t}),Jw}var Jy,xA;function C4(){return xA||(xA=1,P4(),Jy=nn()),Jy}var Qy,KA;function M4(){if(KA)return Qy;KA=1;var e=C4();return Qy=e,Qy}var XA;function nM(){if(XA)return Ki;XA=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(M4());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 JA;function iM(){if(JA)return La;JA=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=qC(),r=nM(),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,m,p,E){var T,S,A=new u(E),f=String(Date.now()),_=JSON.stringify(p),b=[d,m,f,_].join(":").toLowerCase(),h=0,I=t.Authenticator.signPayload(c,b);try{for(var O=e(I),P=O.next();!P.done;P=O.next()){var B=P.value;A.set(n+h,JSON.stringify(B)),h++}}catch(z){T={error:z}}finally{try{P&&!P.done&&(S=O.return)&&S.call(O)}finally{if(T)throw T.error}}return A.set(i,f),A.set(a,_),A}}return La.default=s,La}var QA;function aM(){if(QA)return fn;QA=1;var e=fn&&fn.__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=fn&&fn.__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=fn&&fn.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(fn,"__esModule",{value:!0});var n=r(iM()),i=nM();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(m,p){if(p&&p.identity){var E=p.identity,T=p.metadata,S=t(p,["identity","metadata"]);if(typeof m=="string"||m instanceof u||globalThis.URL&&m instanceof globalThis.URL){var A=typeof m=="string"?new u(m):m,f=new l(A.toString(),e(e({},S),{headers:o(E,p.method||"GET",A.pathname,T||{},S==null?void 0:S.headers)}));return c(f)}var _=new u(m.url),b=new l(m),h=o(E,m.method||"GET",_.pathname,T||{});return h.forEach(function(I,O){b.headers.set(O,I)}),c(b)}return c(m,p)}}return fn.default=a,fn}var ZA;function D4(){return ZA||(ZA=1,(function(e){var t=Dn&&Dn.__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=Dn&&Dn.__exportStar||function(s,o){for(var u in s)u!=="default"&&!Object.prototype.hasOwnProperty.call(o,u)&&t(o,s,u)},n=Dn&&Dn.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(e,"__esModule",{value:!0}),e.signedHeaderFactory=e.signedFetchFactory=void 0,r(GC(),e);var i=aM();Object.defineProperty(e,"signedFetchFactory",{enumerable:!0,get:function(){return n(i).default}});var a=iM();Object.defineProperty(e,"signedHeaderFactory",{enumerable:!0,get:function(){return n(a).default}})})(Dn)),Dn}var eO;function j4(){return eO||(eO=1,(function(e){var t=Mn&&Mn.__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=Mn&&Mn.__exportStar||function(a,s){for(var o in a)o!=="default"&&!Object.prototype.hasOwnProperty.call(s,o)&&t(s,a,o)},n=Mn&&Mn.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0}),r(GC(),e),r(D4(),e);var i=n(aM());e.default=(0,i.default)()})(Mn)),Mn}var L4=j4();const sd=MO(L4);async function $4(e,t){const r=`${Dt.creditsServerUrl}/users/${e.toLowerCase()}/credits`,n=await sd(r,{method:"GET",identity:t,metadata:{}});if(!n.ok)throw new Error(`getUserCredits ${n.status}: ${await n.text()}`);return n.json()}async function q4(e,t){const{usd:r}=await $4(e,t);return r??{balanceCents:0,credits:0}}async function ZW(e,t,r){const n=`${Dt.creditsServerUrl}/credits/authorize`,i=await sd(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 e6(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=`${Dt.creditsServerUrl}/users/${e.toLowerCase()}/purchases${i?`?${i}`:""}`,s=await sd(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 t6(e,t){if(t.length===0)return 0;const r=`${Dt.creditsServerUrl}/credits/authorize/cancel`,n=await sd(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 r6(e,t=1e3){const r=await fetch(`${Dt.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 B4(e){return Dl({queryKey:["usd-balance",e==null?void 0:e.address],enabled:!!e,staleTime:3e4,queryFn:async()=>q4(e.address,e.identity)})}const k4=e=>Do(e.reduce((t,r)=>t+r.priceCredits,0)),Kr=Ts((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:Do(r.priceCredits),is_primary:!r.tokenId,source:n,cart_size:a.length,cart_value_usd:k4(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})})),cs={name:"credits",nameSingular:"credit",symbol:"◈",iconClass:"ico-credits"};function n6(e){return`${e} ${e===1?cs.nameSingular:cs.name}`}function kn({className:e}){return Q.jsx("span",{className:`ico ${cs.iconClass}${e?` ${e}`:""}`,"aria-hidden":!0})}function U4(){const e=Kr(s=>s.items),t=Kr(s=>s.open),r=Kr(s=>s.setOpen),n=Kr(s=>s.setFittingOpen),i=De.useRef(null),a=e.reduce((s,o)=>s+o.priceCredits,0);return De.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:Q.jsxs("div",{className:"cart-pop",ref:i,role:"dialog","aria-label":"Cart",children:[Q.jsxs("div",{className:"cart-pop__head",children:[Q.jsx("span",{className:"ico ico-cart","aria-hidden":!0})," Added to cart"]}),Q.jsx("div",{className:"cart-pop__list",children:e.slice(-4).map(s=>Q.jsxs("div",{className:"cart-pop__row",children:[Q.jsx("div",{className:"cart-pop__thumb",children:s.thumbnail?Q.jsx("img",{src:s.thumbnail,alt:s.name}):null}),Q.jsx("div",{className:"cart-pop__name",title:s.name,children:s.name}),Q.jsxs("div",{className:"cart-pop__price",children:[Q.jsx(kn,{className:"ccy-mark"})," ",s.priceCredits]})]},s.id))}),Q.jsxs("div",{className:"cart-pop__foot",children:[Q.jsxs("span",{className:"cart-pop__total",children:[e.length," item",e.length>1?"s":""," · ",Q.jsxs("strong",{children:[Q.jsx(kn,{className:"ccy-mark"})," ",a]})]}),Q.jsxs("div",{className:"cart-pop__actions",children:[Q.jsx("button",{className:"btn btn--ghost btn--sm",onClick:()=>n(!0),children:"Try on"}),Q.jsx(vl,{className:"btn btn--purple btn--sm",to:"/cart",onClick:()=>r(!1),children:"Checkout"})]})]})]})}var Gg=function(e,t){return Gg=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])},Gg(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");Gg(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 Rs(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 sM(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 oM(e,t){return function(r,n){t(r,n,e)}}function uM(e,t,r,n,i,a){function s(A){if(A!==void 0&&typeof A!="function")throw new TypeError("Function expected");return A}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,m=!1,p=r.length-1;p>=0;p--){var E={};for(var T in n)E[T]=T==="access"?{}:n[T];for(var T in n.access)E.access[T]=n.access[T];E.addInitializer=function(A){if(m)throw new TypeError("Cannot add initializers after decoration has completed");a.push(s(A||null))};var S=(0,r[p])(o==="accessor"?{get:c.get,set:c.set}:c[u],E);if(o==="accessor"){if(S===void 0)continue;if(S===null||typeof S!="object")throw new TypeError("Object expected");(d=s(S.get))&&(c.get=d),(d=s(S.set))&&(c.set=d),(d=s(S.init))&&i.unshift(d)}else(d=s(S))&&(o==="field"?i.unshift(d):c[u]=d)}l&&Object.defineProperty(l,n.name,c),m=!0}function cM(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 lM(e){return typeof e=="symbol"?e:"".concat(e)}function dM(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 fM(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function pM(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 mM(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 od=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 hM(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&od(t,e,r)}function Cl(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 oE(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 yM(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(oE(arguments[t]));return e}function gM(){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 ls(e){return this instanceof ls?(this.v=e,this):new ls(e)}function _M(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),i,a=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),o("next"),o("throw"),o("return",s),i[Symbol.asyncIterator]=function(){return this},i;function s(p){return function(E){return Promise.resolve(E).then(p,d)}}function o(p,E){n[p]&&(i[p]=function(T){return new Promise(function(S,A){a.push([p,T,S,A])>1||u(p,T)})},E&&(i[p]=E(i[p])))}function u(p,E){try{l(n[p](E))}catch(T){m(a[0][3],T)}}function l(p){p.value instanceof ls?Promise.resolve(p.value.v).then(c,d):m(a[0][2],p)}function c(p){u("next",p)}function d(p){u("throw",p)}function m(p,E){p(E),a.shift(),a.length&&u(a[0][0],a[0][1])}}function EM(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:ls(e[i](s)),done:!1}:a?a(s):s}:a}}function vM(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 Cl=="function"?Cl(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 bM(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var F4=Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t},zg=function(e){return zg=Object.getOwnPropertyNames||function(t){var r=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[r.length]=n);return r},zg(e)};function TM(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=zg(e),n=0;n<r.length;n++)r[n]!=="default"&&od(t,e,r[n]);return F4(t,e),t}function SM(e){return e&&e.__esModule?e:{default:e}}function IM(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 RM(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 wM(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 AM(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 H4=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 OM(e){function t(a){e.error=e.hasError?new H4(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 NM(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 V4={__extends:Mr,__assign:qe,__rest:Rs,__decorate:sM,__param:oM,__esDecorate:uM,__runInitializers:cM,__propKey:lM,__setFunctionName:dM,__metadata:fM,__awaiter:pM,__generator:mM,__createBinding:od,__exportStar:hM,__values:Cl,__read:oE,__spread:yM,__spreadArrays:gM,__spreadArray:er,__await:ls,__asyncGenerator:_M,__asyncDelegator:EM,__asyncValues:vM,__makeTemplateObject:bM,__importStar:TM,__importDefault:SM,__classPrivateFieldGet:IM,__classPrivateFieldSet:RM,__classPrivateFieldIn:wM,__addDisposableResource:AM,__disposeResources:OM,__rewriteRelativeImportExtension:NM},i6=Object.freeze(Object.defineProperty({__proto__:null,__addDisposableResource:AM,get __assign(){return qe},__asyncDelegator:EM,__asyncGenerator:_M,__asyncValues:vM,__await:ls,__awaiter:pM,__classPrivateFieldGet:IM,__classPrivateFieldIn:wM,__classPrivateFieldSet:RM,__createBinding:od,__decorate:sM,__disposeResources:OM,__esDecorate:uM,__exportStar:hM,__extends:Mr,__generator:mM,__importDefault:SM,__importStar:TM,__makeTemplateObject:bM,__metadata:fM,__param:oM,__propKey:lM,__read:oE,__rest:Rs,__rewriteRelativeImportExtension:NM,__runInitializers:cM,__setFunctionName:dM,__spread:yM,__spreadArray:er,__spreadArrays:gM,__values:Cl,default:V4},Symbol.toStringTag,{value:"Module"}));function hr(e,t){var r=t&&t.cache?t.cache:K4,n=t&&t.serializer?t.serializer:x4,i=t&&t.strategy?t.strategy:W4;return i(e,{cache:r,serializer:n})}function G4(e){return e==null||typeof e=="number"||typeof e=="boolean"}function z4(e,t,r,n){var i=G4(n)?n:r(n),a=t.get(i);return typeof a>"u"&&(a=e.call(this,n),t.set(i,a)),a}function PM(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 CM(e,t,r,n,i){return r.bind(t,e,n,i)}function W4(e,t){var r=e.length===1?z4:PM;return CM(e,this,r,t.cache.create(),t.serializer)}function Y4(e,t){return CM(e,this,PM,t.cache.create(),t.serializer)}var x4=function(){return JSON.stringify(arguments)};function uE(){this.cache=Object.create(null)}uE.prototype.get=function(e){return this.cache[e]};uE.prototype.set=function(e,t){this.cache[e]=t};var K4={create:function(){return new uE}},yr={variadic:Y4};function MM(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 Mt;(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"})(Mt||(Mt={}));var ds;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(ds||(ds={}));function tO(e){return e.type===Mt.literal}function X4(e){return e.type===Mt.argument}function DM(e){return e.type===Mt.number}function jM(e){return e.type===Mt.date}function LM(e){return e.type===Mt.time}function $M(e){return e.type===Mt.select}function qM(e){return e.type===Mt.plural}function J4(e){return e.type===Mt.pound}function BM(e){return e.type===Mt.tag}function kM(e){return!!(e&&typeof e=="object"&&e.type===ds.number)}function Wg(e){return!!(e&&typeof e=="object"&&e.type===ds.dateTime)}var UM=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Q4=/(?:[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 Z4(e){var t={};return e.replace(Q4,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 ez=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function tz(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(ez).filter(function(m){return m.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 rz(e){return e.replace(/^(.*?)-/,"")}var rO=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,FM=/^(@+)?(\+|#+)?[rs]?$/g,nz=/(\*)(0+)|(#+)(0+)|(0+)/g,HM=/^(0+)$/;function nO(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(FM,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 VM(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 iz(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)),!HM.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function iO(e){var t={},r=VM(e);return r||t}function az(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=rz(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),iO(l))},{}));continue;case"engineering":t=qe(qe(qe({},t),{notation:"engineering"}),i.options.reduce(function(u,l){return qe(qe({},u),iO(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(nz,function(u,l,c,d,m,p){if(l)t.minimumIntegerDigits=c.length;else{if(d&&m)throw new Error("We currently do not support maximum integer digits");if(p)throw new Error("We currently do not support exact integer digits")}return""});continue}if(HM.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(rO.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(rO,function(u,l,c,d,m,p){return c==="*"?t.minimumFractionDigits=l.length:d&&d[0]==="#"?t.maximumFractionDigits=d.length:m&&p?(t.minimumFractionDigits=m.length,t.maximumFractionDigits=m.length+p.length):(t.minimumFractionDigits=l.length,t.maximumFractionDigits=l.length),""});var a=i.options[0];a==="w"?t=qe(qe({},t),{trailingZeroDisplay:"stripIfInteger"}):a&&(t=qe(qe({},t),nO(a)));continue}if(FM.test(i.stem)){t=qe(qe({},t),nO(i.stem));continue}var s=VM(i.stem);s&&(t=qe(qe({},t),s));var o=iz(i.stem);o&&(t=qe(qe({},t),o))}return t}var dl={"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 sz(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=oz(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 oz(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=dl[n||""]||dl[r||""]||dl["".concat(r,"-001")]||dl["001"];return i[0]}var Zy,uz=new RegExp("^".concat(UM.source,"*")),cz=new RegExp("".concat(UM.source,"*$"));function ct(e,t){return{start:e,end:t}}var lz=!!String.prototype.startsWith&&"_a".startsWith("a",1),dz=!!String.fromCodePoint,fz=!!Object.fromEntries,pz=!!String.prototype.codePointAt,mz=!!String.prototype.trimStart,hz=!!String.prototype.trimEnd,yz=!!Number.isSafeInteger,gz=yz?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Yg=!0;try{var _z=zM("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Yg=((Zy=_z.exec("a"))===null||Zy===void 0?void 0:Zy[0])==="a"}catch{Yg=!1}var aO=lz?function(t,r,n){return t.startsWith(r,n)}:function(t,r,n){return t.slice(n,n+r.length)===r},xg=dz?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},sO=fz?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},GM=pz?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}},Ez=mz?function(t){return t.trimStart()}:function(t){return t.replace(uz,"")},vz=hz?function(t){return t.trimEnd()}:function(t){return t.replace(cz,"")};function zM(e,t){return new RegExp(e,t)}var Kg;if(Yg){var oO=zM("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Kg=function(t,r){var n;oO.lastIndex=r;var i=oO.exec(t);return(n=i[1])!==null&&n!==void 0?n:""}}else Kg=function(t,r){for(var n=[];;){var i=GM(t,r);if(i===void 0||WM(i)||Iz(i))break;n.push(i),r+=i>=65536?2:1}return xg.apply(void 0,n)};var bz=(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:Mt.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&&Xg(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:Mt.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()||!Xg(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:Mt.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()&&Sz(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:Mt.literal,value:i,location:u},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Tz(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 xg.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(),xg(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:Mt.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=Kg(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 m=vz(d.val);if(m.length===0)return this.error(at.EXPECT_ARGUMENT_STYLE,ct(this.clonePosition(),this.clonePosition()));var p=ct(c,this.clonePosition());l={style:m,styleLocation:p}}var E=this.tryParseArgumentClose(i);if(E.err)return E;var T=ct(i,this.clonePosition());if(l&&aO(l==null?void 0:l.style,"::",0)){var S=Ez(l.style.slice(2));if(o==="number"){var d=this.parseNumberSkeletonFromString(S,l.styleLocation);return d.err?d:{val:{type:Mt.number,value:n,location:T,style:d.val},err:null}}else{if(S.length===0)return this.error(at.EXPECT_DATE_TIME_SKELETON,T);var A=S;this.locale&&(A=sz(S,this.locale));var m={type:ds.dateTime,pattern:A,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?Z4(A):{}},f=o==="date"?Mt.date:Mt.time;return{val:{type:f,value:n,location:T,style:m},err:null}}}return{val:{type:o==="number"?Mt.number:o==="date"?Mt.date:Mt.time,value:n,location:T,style:(a=l==null?void 0:l.style)!==null&&a!==void 0?a:null},err:null}}case"plural":case"selectordinal":case"select":{var _=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(at.EXPECT_SELECT_ARGUMENT_OPTIONS,ct(_,qe({},_)));this.bumpSpace();var b=this.parseIdentifierIfPossible(),h=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(),h=d.val}var I=this.tryParsePluralOrSelectOptions(t,o,r,b);if(I.err)return I;var E=this.tryParseArgumentClose(i);if(E.err)return E;var O=ct(i,this.clonePosition());return o==="select"?{val:{type:Mt.select,value:n,options:sO(I.val),location:O},err:null}:{val:{type:Mt.plural,value:n,options:sO(I.val),offset:h,pluralType:o==="plural"?"cardinal":"ordinal",location:O},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=tz(t)}catch{return this.error(at.INVALID_NUMBER_SKELETON,r)}return{val:{type:ds.number,tokens:n,location:r,parsedOptions:this.shouldParseSkeletons?az(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 m=this.tryParseDecimalInteger(at.EXPECT_PLURAL_ARGUMENT_SELECTOR,at.INVALID_PLURAL_ARGUMENT_SELECTOR);if(m.err)return m;c=ct(d,this.clonePosition()),l=this.message.slice(d.offset,this.offset())}else break}if(u.has(l))return this.error(r==="select"?at.DUPLICATE_SELECT_ARGUMENT_SELECTOR:at.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,c);l==="other"&&(s=!0),this.bumpSpace();var p=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?at.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:at.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,ct(this.clonePosition(),this.clonePosition()));var E=this.parseMessage(t+1,r,n);if(E.err)return E;var T=this.tryParseArgumentClose(p);if(T.err)return T;o.push([l,{value:E.val,location:ct(p,this.clonePosition())}]),u.add(l),this.bumpSpace(),a=this.parseIdentifierIfPossible(),l=a.value,c=a.location}return o.length===0?this.error(r==="select"?at.EXPECT_SELECT_ARGUMENT_SELECTOR:at.EXPECT_PLURAL_ARGUMENT_SELECTOR,ct(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(at.MISSING_OTHER_CLAUSE,ct(this.clonePosition(),this.clonePosition())):{val:o,err:null}},e.prototype.tryParseDecimalInteger=function(t,r){var n=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var a=!1,s=0;!this.isEOF();){var o=this.char();if(o>=48&&o<=57)a=!0,s=s*10+(o-48),this.bump();else break}var u=ct(i,this.clonePosition());return a?(s*=n,gz(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=GM(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(aO(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()&&WM(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 Xg(e){return e>=97&&e<=122||e>=65&&e<=90}function Tz(e){return Xg(e)||e===47}function Sz(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 WM(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Iz(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 Jg(e){e.forEach(function(t){if(delete t.location,$M(t)||qM(t))for(var r in t.options)delete t.options[r].location,Jg(t.options[r].value);else DM(t)&&kM(t.style)||(jM(t)||LM(t))&&Wg(t.style)?delete t.style.location:BM(t)&&Jg(t.children)})}function Rz(e,t){t===void 0&&(t={}),t=qe({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new bz(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||Jg(r.val),r.val}var bn;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(bn||(bn={}));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),uO=(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('", "'),'"'),bn.INVALID_VALUE,a)||this}return t})(di),wz=(function(e){Mr(t,e);function t(r,n,i){return e.call(this,'Value for "'.concat(r,'" must be of type ').concat(n),bn.INVALID_VALUE,i)||this}return t})(di),Az=(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,'"'),bn.MISSING_VALUE,n)||this}return t})(di),mr;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(mr||(mr={}));function Oz(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 YM(e){return typeof e=="function"}function _l(e,t,r,n,i,a,s){if(e.length===1&&tO(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(tO(c)){o.push({type:mr.literal,value:c.value});continue}if(J4(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 Az(d,s);var m=i[d];if(X4(c)){(!m||typeof m=="string"||typeof m=="number")&&(m=typeof m=="string"||typeof m=="number"?String(m):""),o.push({type:typeof m=="string"?mr.literal:mr.object,value:m});continue}if(jM(c)){var p=typeof c.style=="string"?n.date[c.style]:Wg(c.style)?c.style.parsedOptions:void 0;o.push({type:mr.literal,value:r.getDateTimeFormat(t,p).format(m)});continue}if(LM(c)){var p=typeof c.style=="string"?n.time[c.style]:Wg(c.style)?c.style.parsedOptions:n.time.medium;o.push({type:mr.literal,value:r.getDateTimeFormat(t,p).format(m)});continue}if(DM(c)){var p=typeof c.style=="string"?n.number[c.style]:kM(c.style)?c.style.parsedOptions:void 0;p&&p.scale&&(m=m*(p.scale||1)),o.push({type:mr.literal,value:r.getNumberFormat(t,p).format(m)});continue}if(BM(c)){var E=c.children,T=c.value,S=i[T];if(!YM(S))throw new wz(T,"function",s);var A=_l(E,t,r,n,i,a),f=S(A.map(function(h){return h.value}));Array.isArray(f)||(f=[f]),o.push.apply(o,f.map(function(h){return{type:typeof h=="string"?mr.literal:mr.object,value:h}}))}if($M(c)){var _=c.options[m]||c.options.other;if(!_)throw new uO(c.value,m,Object.keys(c.options),s);o.push.apply(o,_l(_.value,t,r,n,i));continue}if(qM(c)){var _=c.options["=".concat(m)];if(!_){if(!Intl.PluralRules)throw new di(`Intl.PluralRules is not available in this environment.
75
+ Try polyfilling it using "@formatjs/intl-pluralrules"
76
+ `,bn.MISSING_INTL_API,s);var b=r.getPluralRules(t,{type:c.pluralType}).select(m-(c.offset||0));_=c.options[b]||c.options.other}if(!_)throw new uO(c.value,m,Object.keys(c.options),s);o.push.apply(o,_l(_.value,t,r,n,i,m-(c.offset||0)));continue}}return Oz(o)}function Nz(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 Pz(e,t){return t?Object.keys(e).reduce(function(r,n){return r[n]=Nz(e[n],t[n]),r},qe({},e)):e}function eg(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}function Cz(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:eg(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:eg(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:eg(e.pluralRules),strategy:yr.variadic})}}var xM=(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,m){return!d.length||m.type!==mr.literal||typeof d[d.length-1]!="string"?d.push(m.value):d[d.length-1]+=m.value,d},[]);return c.length<=1?c[0]||"":c},this.formatToParts=function(u){return _l(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=Rs(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=Pz(e.formats,n),this.formatters=i&&i.formatters||Cz(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=Rz,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 tu=(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),Mz=(function(e){Mr(t,e);function t(r,n){return e.call(this,ma.UNSUPPORTED_FORMATTER,r,n)||this}return t})(tu),Dz=(function(e){Mr(t,e);function t(r,n){return e.call(this,ma.INVALID_CONFIG,r,n)||this}return t})(tu),cO=(function(e){Mr(t,e);function t(r,n){return e.call(this,ma.MISSING_DATA,r,n)||this}return t})(tu),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})(tu),tg=(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),jz=(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})(tu);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 Lz=function(e){},$z=function(e){},KM={formats:{},messages:{},timeZone:void 0,defaultLocale:"en",defaultFormats:{},fallbackOnEmptyString:!0,onError:Lz,onWarn:$z};function XM(){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 qz(e){e===void 0&&(e=XM());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 xM(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 cE(e,t,r,n){var i=e&&e[t],a;if(i&&(a=i[r]),a)return a;n(new Mz("No ".concat(t," format named: ").concat(r)))}function fl(e,t){return Object.keys(e).reduce(function(r,n){return r[n]=qe({timeZone:t},e[n]),r},{})}function lO(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 dO(e,t){if(!t)return e;var r=xM.formats;return qe(qe(qe({},r),e),{date:lO(fl(r.date,t),fl(e.date||{},t)),time:lO(fl(r.time,t),fl(e.time||{},t))})}var Qg=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,m=e.timeZone,p=e.defaultRichTextElements;r===void 0&&(r={id:""});var E=r.id,T=r.defaultMessage;MM(!!E,"[@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 S=String(E),A=o&&Object.prototype.hasOwnProperty.call(o,S)&&o[S];if(Array.isArray(A)&&A.length===1&&A[0].type===Mt.literal)return A[0].value;if(!n&&A&&typeof A=="string"&&!p)return A.replace(/'\{(.*?)\}'/gi,"{$1}");if(n=qe(qe({},p),n||{}),s=dO(s,m),l=dO(l,m),!A){if(c===!1&&A==="")return A;if((!T||a&&a.toLowerCase()!==u.toLowerCase())&&d(new jz(r,a)),T)try{var f=t.getMessageFormat(T,u,l,i);return f.format(n)}catch(_){return d(new tg('Error formatting default message for: "'.concat(S,'", rendering default message verbatim'),a,r,_)),typeof T=="string"?T:S}return S}try{var f=t.getMessageFormat(A,a,s,qe({formatters:t},i||{}));return f.format(n)}catch(_){d(new tg('Error formatting message: "'.concat(S,'", using ').concat(T?"default message":"id"," as fallback."),a,r,_))}if(T)try{var f=t.getMessageFormat(T,u,l,i);return f.format(n)}catch(_){d(new tg('Error formatting the default message for: "'.concat(S,'", rendering message verbatim'),a,r,_))}return typeof A=="string"?A:typeof T=="string"?T:S},JM=["formatMatcher","timeZone","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName","hourCycle","dateStyle","timeStyle","calendar","numberingSystem","fractionalSecondDigits"];function ud(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&&cE(a,t,u,s)),c=Aa(n,JM,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 Bz(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 ud(e,"date",t,s).format(o)}catch(u){e.onError(new qr("Error formatting date.",e.locale,u))}return String(o)}function kz(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 ud(e,"time",t,s).format(o)}catch(u){e.onError(new qr("Error formatting time.",e.locale,u))}return String(o)}function Uz(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,JM,u?{timeZone:u}:{});try{return t(l,d).formatRange(i,a)}catch(m){c(new qr("Error formatting date time range.",e.locale,m))}return String(i)}function Fz(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 ud(e,"date",t,s).formatToParts(o)}catch(u){e.onError(new qr("Error formatting date.",e.locale,u))}return[]}function Hz(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 ud(e,"time",t,s).formatToParts(o)}catch(u){e.onError(new qr("Error formatting time.",e.locale,u))}return[]}var Vz=["style","type","fallback","languageDisplay"];function Gz(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
+ `,bn.MISSING_INTL_API));var o=Aa(n,Vz);try{return t(i,o).of(r)}catch(u){a(new qr("Error formatting display name.",i,u))}}var zz=["type","style"],fO=Date.now();function Wz(e){return"".concat(fO,"_").concat(e,"_").concat(fO)}function Yz(e,t,r,n){n===void 0&&(n={});var i=QM(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 QM(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
+ `,bn.MISSING_INTL_API));var o=Aa(n,zz);try{var u={},l=r.map(function(c,d){if(typeof c=="object"){var m=Wz(d);return u[m]=c,m}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 xz=["type"];function Kz(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
+ `,bn.MISSING_INTL_API));var s=Aa(n,xz);try{return t(i,s).select(r)}catch(o){a(new qr("Error formatting plural.",i,o))}return"other"}var Xz=["numeric","style"];function Jz(e,t,r){var n=e.locale,i=e.formats,a=e.onError;r===void 0&&(r={});var s=r.format,o=!!s&&cE(i,"relative",s,a)||{},u=Aa(r,Xz,o);return t(n,u)}function Qz(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
+ `,bn.MISSING_INTL_API));try{return Jz(e,t,i).format(r,n)}catch(s){e.onError(new qr("Error formatting relative time.",e.locale,s))}return String(r)}var Zz=["style","currency","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","currencyDisplay","currencySign","notation","signDisplay","unit","unitDisplay","numberingSystem","trailingZeroDisplay","roundingPriority","roundingIncrement","roundingMode"];function ZM(e,t,r){var n=e.locale,i=e.formats,a=e.onError;r===void 0&&(r={});var s=r.format,o=s&&cE(i,"number",s,a)||{},u=Aa(r,Zz,o);return t(n,u)}function e8(e,t,r,n){n===void 0&&(n={});try{return ZM(e,t,n).format(r)}catch(i){e.onError(new qr("Error formatting number.",e.locale,i))}return String(r)}function t8(e,t,r,n){n===void 0&&(n={});try{return ZM(e,t,n).formatToParts(r)}catch(i){e.onError(new qr("Error formatting number.",e.locale,i))}return[]}function r8(e){var t=e?e[Object.keys(e)[0]]:void 0;return typeof t=="string"}function n8(e){e.onWarn&&e.defaultRichTextElements&&r8(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 i8(e,t){var r=qz(t),n=qe(qe({},KM),e),i=n.locale,a=n.defaultLocale,s=n.onError;return i?!Intl.NumberFormat.supportedLocalesOf(i).length&&s?s(new cO('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 cO('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 Dz('"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"),n8(n),qe(qe({},n),{formatters:r,formatNumber:e8.bind(null,n,r.getNumberFormat),formatNumberToParts:t8.bind(null,n,r.getNumberFormat),formatRelativeTime:Qz.bind(null,n,r.getRelativeTimeFormat),formatDate:Bz.bind(null,n,r.getDateTimeFormat),formatDateToParts:Fz.bind(null,n,r.getDateTimeFormat),formatTime:kz.bind(null,n,r.getDateTimeFormat),formatDateTimeRange:Uz.bind(null,n,r.getDateTimeFormat),formatTimeToParts:Hz.bind(null,n,r.getDateTimeFormat),formatPlural:Kz.bind(null,n,r.getPluralRules),formatMessage:Qg.bind(null,n,r),$t:Qg.bind(null,n,r),formatList:Yz.bind(null,n,r.getListFormat),formatListToParts:QM.bind(null,n,r.getListFormat),formatDisplayName:Gz.bind(null,n,r.getDisplayNames)})}function a8(e){MM(e,"[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.")}var s8=qe(qe({},KM),{textComponent:De.Fragment});function o8(e){return function(t){return e(De.Children.toArray(t))}}var lE=typeof window<"u"&&!window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__?window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=De.createContext(null)):De.createContext(null);lE.Consumer;var u8=lE.Provider,c8=u8,l8=lE;function eD(){var e=De.useContext(l8);return a8(e),e}var Zg;(function(e){e.formatDate="FormattedDate",e.formatTime="FormattedTime",e.formatNumber="FormattedNumber",e.formatList="FormattedList",e.formatDisplayName="FormattedDisplayName"})(Zg||(Zg={}));var e_;(function(e){e.formatDate="FormattedDateParts",e.formatTime="FormattedTimeParts",e.formatNumber="FormattedNumberParts",e.formatList="FormattedListParts"})(e_||(e_={}));function tD(e){var t=function(r){var n=eD(),i=r.value,a=r.children,s=Rs(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=e_[e],t}function ru(e){var t=function(r){var n=eD(),i=r.value,a=r.children,s=Rs(r,["value","children"]),o=n[e](i,s);if(typeof a=="function")return a(o);var u=n.textComponent||De.Fragment;return De.createElement(u,null,o)};return t.displayName=Zg[e],t}function rD(e){return e&&Object.keys(e).reduce(function(t,r){var n=e[r];return t[r]=YM(n)?o8(n):n,t},{})}var pO=function(e,t,r,n){for(var i=[],a=4;a<arguments.length;a++)i[a-4]=arguments[a];var s=rD(n),o=Qg.apply(void 0,er([e,t,r,s],i,!1));return Array.isArray(o)?De.Children.toArray(o):o},d8=function(e,t){var r=e.defaultRichTextElements,n=Rs(e,["defaultRichTextElements"]),i=rD(r),a=i8(qe(qe(qe({},s8),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:pO.bind(null,s,a.formatters),$t:pO.bind(null,s,a.formatters)})};ru("formatDate");ru("formatTime");ru("formatNumber");ru("formatList");ru("formatDisplayName");tD("formatDate");tD("formatTime");const f8={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"},p8={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"},m8={empty:{title:"Your cart is empty",body:"Find something you love and it’ll show up here.",cta:"Browse Collectibles"}},h8={nav:f8,notFound:p8,cart:m8},y8={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"},g8={title:"Página no encontrada",body:"La página que buscás no está acá. Volvamos a la tienda.",cta:"Ver coleccionables"},_8={empty:{title:"Tu carrito está vacío",body:"Encontrá algo que te guste y va a aparecer acá.",cta:"Ver coleccionables"}},E8={nav:y8,notFound:g8,cart:_8},El=["en","es"];function t_(e,t="",r={}){for(const[n,i]of Object.entries(e)){const a=t?`${t}.${n}`:n;i&&typeof i=="object"&&!Array.isArray(i)?t_(i,a,r):r[a]=String(i)}return r}const v8={en:t_(h8),es:t_(E8)},b8=XM(),rg={};function dE(e){return rg[e]||(rg[e]=d8({locale:e,defaultLocale:"en",messages:v8[e],onError:()=>{}},b8)),rg[e]}let nD=dE("en");function T8(e){nD=dE(e)}function Yr(e,t){return nD.formatMessage({id:e},t)}function S8(){const{session:e,connecting:t,signIn:r,disconnect:n,restore:i}=Ss(),a=e==null?void 0:e.address,{data:s,isLoading:o}=iE(a),{data:u}=B4(e),l=Kr(S=>S.items.length),c=Ml(),[d,m]=De.useState(""),p=De.useRef();De.useEffect(()=>{i()},[i]);function E(S){c(S.trim()?`/assets?q=${encodeURIComponent(S.trim())}`:"/assets",{replace:!0})}function T(S){m(S),p.current&&clearTimeout(p.current),p.current=setTimeout(()=>E(S),300)}return Q.jsxs(Q.Fragment,{children:[Q.jsx(Xk,{activePage:"shop",isSignedIn:!!e,isSigningIn:t,isLoadingProfile:!!e&&o,address:a,avatar:s,onClickSignIn:()=>r(),onClickSignOut:()=>void n()}),Q.jsxs("div",{className:"subnav",children:[Q.jsxs("nav",{className:"subnav__tabs",children:[Q.jsx(xn,{to:"/overview",children:Yr("nav.overview")}),Q.jsx(xn,{to:"/assets",children:Yr("nav.collectibles")}),Q.jsx(xn,{to:"/market",children:Yr("nav.market")}),Q.jsx(xn,{to:"/my-assets",children:Yr("nav.myAssets")}),Q.jsx(xn,{to:"/my-favorites",children:Yr("nav.myFavorites")}),e?Q.jsx(xn,{to:"/my-purchases",children:Yr("nav.myPurchases")}):null]}),Q.jsxs("div",{className:"subnav__search",children:[Q.jsx("span",{className:"ico ico-search subnav__search-ico","aria-hidden":!0}),Q.jsx("input",{value:d,"aria-label":Yr("nav.searchAria"),placeholder:Yr("nav.searchPlaceholder"),onChange:S=>T(S.target.value),onKeyDown:S=>{S.key==="Enter"&&(p.current&&clearTimeout(p.current),E(d))}})]}),e?Q.jsxs("span",{className:"subnav__balance",title:Yr("nav.yourBalance",{currency:cs.name}),children:[Q.jsx(kn,{className:"subnav__balance-ico"}),(u==null?void 0:u.credits)??0]}):null,Q.jsxs(xn,{to:"/credits",className:"subnav__credits",children:[Q.jsx(kn,{className:"subnav__credits-ico"}),Yr("nav.getCredits",{currency:cs.name})]}),Q.jsxs("div",{className:"subnav__cart-wrap",children:[Q.jsxs(xn,{to:"/cart",className:"subnav__cart","aria-label":Yr("nav.cart"),children:[Q.jsx("span",{className:"ico ico-cart","aria-hidden":!0}),l>0?Q.jsx("span",{className:"subnav__cart-badge",children:l}):null]}),Q.jsx(U4,{})]})]})]})}let I8=0;const Io=Ts(e=>({toasts:[],push:t=>{const r=++I8;return e(n=>({toasts:[...n.toasts,{...t,id:r}]})),r},dismiss:t=>e(r=>({toasts:r.toasts.filter(n=>n.id!==t)}))})),a6={success:e=>Io.getState().push({message:e,kind:"success"}),error:e=>Io.getState().push({message:e,kind:"error"}),info:e=>Io.getState().push({message:e,kind:"info"})},R8={success:"✓",error:"!",info:"i"};function w8({t:e}){const t=Io(r=>r.dismiss);return De.useEffect(()=>{const r=setTimeout(()=>t(e.id),4500);return()=>clearTimeout(r)},[e.id,t]),Q.jsxs("div",{className:`toast toast--${e.kind}`,role:e.kind==="error"?"alert":"status",onClick:()=>t(e.id),children:[Q.jsx("span",{className:"toast__icon","aria-hidden":!0,children:R8[e.kind]}),Q.jsx("span",{className:"toast__msg",children:e.message})]})}function A8(){const e=Io(t=>t.toasts);return e.length===0?null:Q.jsx("div",{className:"toaster","aria-live":"polite",children:e.map(t=>Q.jsx(w8,{t},t.id))})}const O8=De.lazy(()=>xt(()=>import("./index-CENUxZfv.js"),__vite__mapDeps([8,1,9,6,3,4,10,11])).then(e=>({default:e.WearablePreview})));function fE(e){return Q.jsx(De.Suspense,{fallback:null,children:Q.jsx(O8,{...e})})}function N8(e){return e.itemId?`urn:decentraland:${Dt.chainId===80002?"amoy":"matic"}:collections-v2:${e.contractAddress.toLowerCase()}:${e.itemId}`:null}function ua(e){return e.category!=="emote"}function fs(e){return ua(e)?e.wearableCategory??`unknown:${e.id}`:null}const P8=new Set(["hat","helmet","mask","tiara","top_head","hair","facial_hair","eyewear","earring","eyes","eyebrows","mouth"]);function C8(e){if(!ua(e))return"item";const t=e.wearableCategory;return t?P8.has(t)?"head":t==="upper_body"?"upper":t==="lower_body"?"lower":t==="feet"?"feet":t==="hands"||t==="hands_wear"?"hands":"item":"item"}function mO(e){const t=new Set,r=new Set;for(const n of e){const i=fs(n);i==null||r.has(i)||(r.add(i),t.add(n.id))}return t}function M8(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=fs(t);if(i!=null)for(const a of r)a.id!==t.id&&n.has(a.id)&&fs(a)===i&&n.delete(a.id);return n.add(t.id),n}function D8(e){const t=new Map;for(const n of e){const i=fs(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 j8(e,t){const r=[];for(const n of e){if(!t.has(n.id)||!ua(n))continue;const i=N8(n);i&&r.push(i)}return r}function hO(e){return!e||e.startsWith("unknown:")?"Wearable":e.charAt(0).toUpperCase()+e.slice(1).replace(/_/g," ")}function L8(){const e=Kr(_=>_.fittingOpen),t=Kr(_=>_.setFittingOpen),r=Kr(_=>_.items),n=Kr(_=>_.remove),i=Ml(),a=Ss(_=>{var b;return(b=_.session)==null?void 0:b.address}),{data:s,isFetched:o}=iE(a),u=!a||o,l=a&&s?a:"default",[c,d]=De.useState(()=>mO(r)),[m,p]=De.useState(!1);De.useEffect(()=>{e&&d(mO(r))},[e]),De.useEffect(()=>{const _=new Set(r.map(b=>b.id));d(b=>{const h=new Set([...b].filter(I=>_.has(I)));return h.size===b.size?b:h})},[r]);const E=De.useMemo(()=>D8(r),[r]),T=De.useMemo(()=>j8(r,c),[r,c]),S=r.reduce((_,b)=>_+b.priceCredits,0),A=T.join(",");De.useEffect(()=>{p(!1)},[A,l]);const f=De.useRef(!1);return De.useEffect(()=>{if(!e){f.current=!1;return}f.current||(f.current=!0,ci("Shop Tried On Outfit",{cart_size:r.length,wearables:r.filter(ua).length,emotes:r.filter(_=>!ua(_)).length,cart_value_credits:S}))},[e,r,S]),De.useEffect(()=>{if(!e)return;const _=b=>{b.key==="Escape"&&t(!1)};return document.addEventListener("keydown",_),()=>document.removeEventListener("keydown",_)},[e,t]),!e||r.length===0?null:Q.jsxs("div",{className:"fitting",role:"dialog","aria-modal":"true","aria-label":"Fitting room",children:[Q.jsx("div",{className:"fitting__scrim",onClick:()=>t(!1)}),Q.jsxs("div",{className:"fitting__panel",children:[Q.jsx("button",{className:"fitting__close",onClick:()=>t(!1),"aria-label":"Close",children:"×"}),Q.jsx("div",{className:"fitting__stage",children:u?T.length>0?Q.jsxs(Q.Fragment,{children:[Q.jsx(fE,{profile:l,urns:T,type:Hn.PreviewType.AVATAR,emote:Hn.PreviewEmote.FASHION,background:"ecebed",disableFadeEffect:!0,dev:Dt.chainId===80002,onLoad:()=>p(!0)},l),m?null:Q.jsx("div",{className:"fitting__loading","aria-hidden":!0,children:Q.jsx("span",{className:"fitting__spinner"})})]}):Q.jsxs("div",{className:"fitting__empty-stage",children:[Q.jsx("p",{children:"Nothing on right now."}),Q.jsx("p",{className:"muted",children:"Turn on an item from the list to try it."})]}):Q.jsx("div",{className:"fitting__loading","aria-hidden":!0,children:Q.jsx("span",{className:"fitting__spinner"})})}),Q.jsxs("div",{className:"fitting__side",children:[Q.jsxs("div",{className:"fitting__head",children:[Q.jsx("h2",{className:"fitting__title",children:"Fitting room"}),Q.jsx("p",{className:"fitting__sub muted",children:"Mix and match your cart. Turn items on and off to see the look."})]}),Q.jsx("div",{className:"fitting__items",children:r.map(_=>{const b=ua(_),h=c.has(_.id),I=E.has(_.id);return Q.jsxs("div",{className:`fitting-row${h?" is-on":""}`,children:[Q.jsxs("label",{className:"fitting-row__toggle",children:[Q.jsx("input",{type:"checkbox",checked:h,disabled:!b,onChange:()=>d(O=>M8(O,_,r))}),Q.jsx("span",{className:"fitting-row__box","aria-hidden":!0})]}),Q.jsx("div",{className:"fitting-row__thumb",children:_.thumbnail?Q.jsx("img",{src:_.thumbnail,alt:_.name}):null}),Q.jsxs("div",{className:"fitting-row__info",children:[Q.jsx("div",{className:"fitting-row__name",title:_.name,children:_.name}),Q.jsxs("div",{className:"fitting-row__meta",children:[Q.jsx("span",{className:`ico ico-slot-${b?C8(_):"item"} fitting-row__slot-ico`,title:b?hO(fs(_)):"Emote",role:"img","aria-label":b?hO(fs(_)):"Emote"}),I?Q.jsx("span",{className:"fitting-row__conflict",title:"Only one item per slot can be worn",children:"1 per slot"}):null]})]}),Q.jsxs("div",{className:"fitting-row__price",children:[Q.jsx(kn,{className:"fitting-row__diamond"}),_.priceCredits]}),Q.jsx("button",{className:"fitting-row__remove",onClick:()=>n(_.id),"aria-label":`Remove ${_.name} from cart`,title:"Remove",children:Q.jsx("span",{className:"ico ico-trash","aria-hidden":!0})})]},_.id)})}),Q.jsxs("div",{className:"fitting__foot",children:[Q.jsxs("div",{className:"fitting__total",children:[r.length," item",r.length>1?"s":""," · ",Q.jsxs("strong",{children:[cs.symbol," ",S]})]}),Q.jsx("button",{className:"btn btn--purple fitting__checkout",onClick:()=>{t(!1),i("/cart")},children:"Checkout"})]})]})]})]})}const iD="shop:locale";function $8(){var e;try{const t=new URLSearchParams(window.location.search).get("lang");if(t&&El.includes(t))return t;const r=localStorage.getItem(iD);if(r&&El.includes(r))return r;const n=(e=navigator.language)==null?void 0:e.slice(0,2);if(n&&El.includes(n))return n}catch{}return"en"}const r_=Ts(e=>({locale:$8(),setLocale:t=>{try{localStorage.setItem(iD,t)}catch{}e({locale:t})}})),q8=De.lazy(()=>xt(()=>import("./ShopFooterInner-gDzKrctg.js"),__vite__mapDeps([12,1,4,5,10,3,6])));function B8(){const e=r_(r=>r.locale),t=r_(r=>r.setLocale);return Q.jsx("div",{className:"shop-footer",children:Q.jsx(De.Suspense,{fallback:null,children:Q.jsx(q8,{locale:e,onChange:r=>{El.includes(r)&&t(r)}})})})}function k8(){const[e,t]=De.useState(!1);return De.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?Q.jsx("div",{"aria-hidden":!0,style:{position:"fixed",left:-9999,top:-9999,width:2,height:2,opacity:0,overflow:"hidden",pointerEvents:"none"},children:Q.jsx(fE,{id:"preview-warmer",profile:"default",dev:Dt.chainId===80002,disableBackground:!0,disableFadeEffect:!0})}):null}function U8(){const e=Ss(t=>t.session);De.useEffect(()=>{if(!e||e.providerType!==Hn.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 pE=`${Dt.nftApiUrl}/v1`;function aD(e){if(!e)return 0;try{return Math.ceil(Number(jO(e))*10)}catch{return 0}}function s6(e){if(!e)return 0;try{const t=BigInt(e),r=10n**16n;return Number((t+r-1n)/r)}catch{return 0}}async function o6(e){const{listings:t}=await cd({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 F8(e,t){var a;const r=new URLSearchParams({contractAddress:e,tokenId:t,first:"1"}),n=await fetch(`${pE}/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 sD(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 cd(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(`${Dt.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 u6(e,t){const{listings:r}=await cd({contractAddress:e,itemId:t,first:1});return r[0]?sD(r[0]):null}async function H8({first:e=100,...t}={}){const{listings:r,total:n}=await cd({...t,first:e});return{items:r.map(sD),total:n}}function V8(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??Dt.chainId,createdAt:e.createdAt??0}}async function c6({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(`${Dt.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(V8),total:i.total??a.length}}async function l6(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(`${pE}/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,m,p,E;return{id:l.nft.id,contractAddress:l.nft.contractAddress,tokenId:l.nft.tokenId,itemId:l.nft.itemId??null,name:l.nft.name,category:l.nft.category,image:l.nft.image,rarity:((d=(c=l.nft.data)==null?void 0:c.wearable)==null?void 0:d.rarity)??((p=(m=l.nft.data)==null?void 0:m.emote)==null?void 0:p.rarity),network:l.nft.network,chainId:l.nft.chainId,isOnSale:l.order!=null,listingPrice:l.order?aD(l.order.price):void 0,tradeId:(E=l.order)==null?void 0:E.tradeId}}),total:o}}const G8="dcl:marketplace";async function d6(e,t){const{TradeService:r}=await xt(async()=>{const{TradeService:i}=await import("./TradeService-CV6tm-S-.js");return{TradeService:i}},__vite__mapDeps([13,6,1,14,2,7]));return new r(G8,Dt.marketplaceServerUrl,()=>t).addTrade(e)}async function oD(e){const t=await fetch(`${Dt.marketplaceServerUrl}/v1/trades/${e}`);if(!t.ok)throw new Error(`fetchTrade ${t.status}`);const r=await t.json();return r.data??r}async function z8(e,t){const r=new URLSearchParams({contractAddress:e,itemId:t,first:"1"}),n=await fetch(`${pE}/items?${r.toString()}`);if(!n.ok)return null;const{data:i}=await n.json();return(i==null?void 0:i[0])??null}async function f6(e){var u,l;let t;try{t=await oD(e)}catch{return null}const r=(u=t.sent)==null?void 0:u[0],n=(l=t.received)==null?void 0:l[0],i=aD(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)===Hn.TradeAssetType.COLLECTION_ITEM){const c=await z8(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 F8(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 p6(e,t){var i;const{listings:r}=await cd({contractAddress:e,itemId:t,first:1}),n=(i=r[0])==null?void 0:i.tradeId;return n?oD(n):null}const W8={};function Y8(e,t){let r;try{r=e()}catch{return}return{getItem:i=>{var a;const s=u=>u===null?null:JSON.parse(u,void 0),o=(a=r.getItem(i))!=null?a:null;return o instanceof Promise?o.then(s):s(o)},setItem:(i,a)=>r.setItem(i,JSON.stringify(a,void 0)),removeItem:i=>r.removeItem(i)}}const jo=e=>t=>{try{const r=e(t);return r instanceof Promise?r:{then(n){return jo(n)(r)},catch(n){return this}}}catch(r){return{then(n){return this},catch(n){return jo(n)(r)}}}},x8=(e,t)=>(r,n,i)=>{let a={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:S=>S,version:0,merge:(S,A)=>({...A,...S}),...t},s=!1;const o=new Set,u=new Set;let l;try{l=a.getStorage()}catch{}if(!l)return e((...S)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),r(...S)},n,i);const c=jo(a.serialize),d=()=>{const S=a.partialize({...n()});let A;const f=c({state:S,version:a.version}).then(_=>l.setItem(a.name,_)).catch(_=>{A=_});if(A)throw A;return f},m=i.setState;i.setState=(S,A)=>{m(S,A),d()};const p=e((...S)=>{r(...S),d()},n,i);let E;const T=()=>{var S;if(!l)return;s=!1,o.forEach(f=>f(n()));const A=((S=a.onRehydrateStorage)==null?void 0:S.call(a,n()))||void 0;return jo(l.getItem.bind(l))(a.name).then(f=>{if(f)return a.deserialize(f)}).then(f=>{if(f)if(typeof f.version=="number"&&f.version!==a.version){if(a.migrate)return a.migrate(f.state,f.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return f.state}).then(f=>{var _;return E=a.merge(f,(_=n())!=null?_:p),r(E,!0),d()}).then(()=>{A==null||A(E,void 0),s=!0,u.forEach(f=>f(E))}).catch(f=>{A==null||A(void 0,f)})};return i.persist={setOptions:S=>{a={...a,...S},S.getStorage&&(l=S.getStorage())},clearStorage:()=>{l==null||l.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>T(),hasHydrated:()=>s,onHydrate:S=>(o.add(S),()=>{o.delete(S)}),onFinishHydration:S=>(u.add(S),()=>{u.delete(S)})},T(),E||p},K8=(e,t)=>(r,n,i)=>{let a={storage:Y8(()=>localStorage),partialize:T=>T,version:0,merge:(T,S)=>({...S,...T}),...t},s=!1;const o=new Set,u=new Set;let l=a.storage;if(!l)return e((...T)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),r(...T)},n,i);const c=()=>{const T=a.partialize({...n()});return l.setItem(a.name,{state:T,version:a.version})},d=i.setState;i.setState=(T,S)=>{d(T,S),c()};const m=e((...T)=>{r(...T),c()},n,i);i.getInitialState=()=>m;let p;const E=()=>{var T,S;if(!l)return;s=!1,o.forEach(f=>{var _;return f((_=n())!=null?_:m)});const A=((S=a.onRehydrateStorage)==null?void 0:S.call(a,(T=n())!=null?T:m))||void 0;return jo(l.getItem.bind(l))(a.name).then(f=>{if(f)if(typeof f.version=="number"&&f.version!==a.version){if(a.migrate)return[!0,a.migrate(f.state,f.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,f.state];return[!1,void 0]}).then(f=>{var _;const[b,h]=f;if(p=a.merge(h,(_=n())!=null?_:m),r(p,!0),b)return c()}).then(()=>{A==null||A(p,void 0),p=n(),s=!0,u.forEach(f=>f(p))}).catch(f=>{A==null||A(void 0,f)})};return i.persist={setOptions:T=>{a={...a,...T},T.storage&&(l=T.storage)},clearStorage:()=>{l==null||l.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>E(),hasHydrated:()=>s,onHydrate:T=>(o.add(T),()=>{o.delete(T)}),onFinishHydration:T=>(u.add(T),()=>{u.delete(T)})},a.skipHydration||E(),p||m},X8=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?((W8?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),x8(e,t)):K8(e,t),J8=X8,yO=Ts()(J8(e=>({items:{},toggle:t=>e(r=>{const n={...r.items};return n[t.id]?delete n[t.id]:n[t.id]=t,{items:n}}),remove:t=>e(r=>{const n={...r.items};return delete n[t],{items:n}})}),{name:"shop-favorites"}));function Q8(e,t){return!t||!e.creator?!1:nE(e)&&e.creator.toLowerCase()===t.toLowerCase()}function m6(e,t){return!!e.signer&&!!t&&e.signer.toLowerCase()===t.toLowerCase()}function Z8(e){return/^0x[a-fA-F0-9]{40}$/.test(e)?`${e.slice(0,6)}…${e.slice(-4)}`:e}function eW({address:e,className:t,linkToProfile:r}){var u,l;const n=Ml(),{data:i}=iE(e);if(!e)return null;const a=(i==null?void 0:i.name)||Z8(e),s=(l=(u=i==null?void 0:i.avatar)==null?void 0:u.snapshots)==null?void 0:l.face256,o=Q.jsxs(Q.Fragment,{children:[s?Q.jsx("img",{className:"creator__ava",src:s,alt:"",loading:"lazy"}):Q.jsx("span",{className:"creator__ava creator__ava--ph","aria-hidden":!0}),Q.jsxs("span",{className:"creator__name",children:["By ",a]})]});return r?Q.jsx("button",{className:`creator creator--link${t?` ${t}`:""}`,title:`View ${a}`,onClick:c=>{c.stopPropagation(),n(`/creator/${e}`)},children:o}):Q.jsx("span",{className:`creator${t?` ${t}`:""}`,children:o})}function gO(e){if(!e)return"#a09ba8";try{return Hn.Rarity.getColor(e.toLowerCase())}catch{return"#a09ba8"}}function tW(e){const t=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 rW(e,t=Date.now()){const{priceCredits:r,compareAtCredits:n,saleEndsAt:i}=e;return!(n==null||!(n>r)||i!=null&&i<=t)}function nW(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 pl(e,t=Date.now()){return e==null?1/0:Math.max(0,e-t)}function iW(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 _O(e){return!isFinite(e)||e<=0?0:e<36e5?1e3:6e4}function aW({endsAt:e,className:t}){const[r,n]=De.useState(()=>pl(e));De.useEffect(()=>{if(n(pl(e)),e==null)return;let a;const s=()=>{const u=pl(e);n(u);const l=_O(u);l>0&&(a=setTimeout(s,l))},o=_O(pl(e));return o>0&&(a=setTimeout(s,o)),()=>clearTimeout(a)},[e]);const i=iW(r);return i?Q.jsxs("span",{className:t??"sale-countdown",children:[Q.jsx("span",{className:"ico ico-clock sale-countdown__ico","aria-hidden":!0}),i]}):null}const sW=120,oW=250;function uW(e){return e==="male"?"♂":e==="female"?"♀":e==="unisex"?"⚥":""}function mE(e){const{item:t}=e,r=e.mode==="market",[n,i]=De.useState(!1),[a,s]=De.useState(!1),o=De.useRef(),u=De.useRef(),l=Kr(z=>z.add),c=Kr(z=>z.items.some(Y=>Y.id===t.id)),d=Ss(z=>{var Y;return(Y=z.session)==null?void 0:Y.address}),m=Q8(t,d),p=yO(z=>z.toggle),E=yO(z=>!!z.items[t.id]),T=Ml(),S=!!t.contractAddress&&!!t.itemId,A=t.tokenId??t.itemId,f=!r&&!!t.contractAddress&&!!A;function _(){f&&T(`/item/${t.contractAddress}/${A}`,{state:{item:t,tradeId:t.tradeId}})}function b(){o.current&&clearTimeout(o.current),u.current&&clearTimeout(u.current),s(!1),o.current=setTimeout(()=>i(!0),sW)}function h(){o.current&&clearTimeout(o.current),u.current&&clearTimeout(u.current),i(!1),s(!1)}function I(){u.current&&clearTimeout(u.current),u.current=setTimeout(()=>s(!0),oW)}const O=uW(t.gender),P=!r&&rW({priceCredits:t.priceCredits,compareAtCredits:t.compareAtCredits,saleEndsAt:t.saleEndsAt}),B=P?nW(t.compareAtCredits,t.priceCredits):0;return Q.jsxs("article",{className:`card${n?" card--hover":""}`,style:f?{cursor:"pointer"}:void 0,onMouseEnter:b,onMouseLeave:h,onClick:_,role:f?"link":void 0,tabIndex:f?0:void 0,onKeyDown:f?z=>{(z.key==="Enter"||z.key===" ")&&(z.preventDefault(),_())}:void 0,children:[Q.jsxs("div",{className:"card__media",children:[P?Q.jsxs("span",{className:"card__sale-badge",children:["SALE",B>0?` -${B}%`:""]}):null,Q.jsx("button",{className:`card__fav${E?" is-on":""}`,onClick:z=>{z.stopPropagation(),p(t)},"aria-label":E?"Remove from favorites":"Add to favorites",children:Q.jsx("span",{className:"ico ico-heart","aria-hidden":!0})}),t.thumbnail?Q.jsx("img",{className:`card__img${n&&a?" card__img--hidden":""}`,src:t.thumbnail,alt:t.name,loading:"lazy"}):null,n&&S?Q.jsxs(Q.Fragment,{children:[Q.jsx("div",{className:`card__preview${a?" is-ready":""}`,children:Q.jsx(fE,{contractAddress:t.contractAddress,itemId:t.itemId??void 0,profile:"default",type:t.category==="emote"?void 0:Hn.PreviewType.AVATAR,emote:t.category==="emote"?void 0:Hn.PreviewEmote.FASHION,dev:Dt.chainId===80002,disableBackground:!0,disableFadeEffect:!0,onLoad:I})}),Q.jsx("span",{className:"card__preview-shield","aria-hidden":!0}),a?null:Q.jsx("span",{className:"card__loadbar","aria-hidden":!0})]}):null]}),Q.jsxs("div",{className:"card__body",children:[Q.jsxs("div",{className:"card__desc",children:[Q.jsx("div",{className:"card__name",title:t.name,children:t.name}),t.creator?Q.jsx(eW,{address:t.creator,className:"card__creator",linkToProfile:!0}):Q.jsx("div",{className:"card__creator",children:" "})]}),n?r&&e.mode==="market"?Q.jsx("button",{className:"card__cart",onClick:z=>{z.stopPropagation(),e.onBuyNow(t)},disabled:e.marketPriceCredits==null,children:e.marketPriceCredits==null?"Unavailable":"Buy now"}):Q.jsxs("button",{className:`card__cart${c?" is-in":""}`,onClick:z=>{z.stopPropagation(),m||l(t,"grid")},disabled:c||m,children:[m?null:Q.jsx("span",{className:"ico ico-cart-solid card__cart-ico","aria-hidden":!0}),m?"Your item":c?"In cart":"Add to cart"]}):Q.jsxs("div",{className:"card__meta",children:[r&&e.mode==="market"?Q.jsxs("div",{className:"card__price card__price--market",children:[Q.jsx("span",{className:"card__approx","aria-hidden":!0,children:"≈"}),Q.jsx(kn,{className:"card__diamond"}),e.marketPriceCredits==null?"—":e.marketPriceCredits,Q.jsx("span",{className:"chip card__market-chip",children:"Market price"})]}):P?Q.jsxs("div",{className:"card__price card__price--sale",children:[Q.jsxs("span",{className:"card__price-now",children:[Q.jsx(kn,{className:"card__diamond"}),t.priceCredits]}),Q.jsxs("span",{className:"card__price-was",children:[Q.jsx(kn,{className:"card__diamond card__diamond--was"}),t.compareAtCredits]}),Q.jsx(aW,{endsAt:t.saleEndsAt,className:"card__countdown"})]}):Q.jsxs("div",{className:"card__price",children:[Q.jsx(kn,{className:"card__diamond"}),t.priceCredits]}),Q.jsxs("div",{className:"card__chips",children:[Q.jsx("span",{className:"chip chip--rarity",style:{background:gO(t.rarity),color:tW(gO(t.rarity))},children:t.rarity}),t.category==="wearable"?Q.jsx("span",{className:"chip chip--icon",children:Q.jsx("span",{className:"ico ico-eyewear","aria-hidden":!0})}):null,O?Q.jsx("span",{className:"chip chip--icon",children:O}):null]})]})]})]})}function cW(e){if(!e)return 0;try{return Math.ceil(Number(jO(e))*10)}catch{return 0}}function lW(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 uD(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:cW(e.price??e.minPrice),gender:lW((s=(a=e.data)==null?void 0:a.wearable)==null?void 0:s.bodyShapes)}}async function h6(e,{first:t=20,skip:r=0}={}){const n=new URLSearchParams({contractAddress:e,first:String(t),skip:String(r),includeSocialEmotes:"false"}),i=await fetch(`${Dt.nftApiUrl}/v1/items?${n.toString()}`);if(!i.ok)throw new Error(`fetchCollectionItems ${i.status}`);const{data:a,total:s}=await i.json(),o=(a??[]).map(uD);return{items:o,total:s??r+o.length}}async function dW(e,{first:t=60,skip:r=0}={}){const n=new URLSearchParams({creator:e,first:String(t),skip:String(r),includeSocialEmotes:"false"}),i=await fetch(`${Dt.nftApiUrl}/v1/items?${n.toString()}`);if(!i.ok)throw new Error(`fetchCreatorItems ${i.status}`);const{data:a,total:s}=await i.json(),o=(a??[]).map(uD);return{items:o,total:s??r+o.length}}const cD="shop:followed-creators:v1",fW=200;function pW(){try{const e=localStorage.getItem(cD);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(r=>typeof r=="string"):[]}catch{return[]}}function EO(e){try{localStorage.setItem(cD,JSON.stringify(e))}catch{}}const mW=Ts((e,t)=>({followed:pW(),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,fW);EO(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);EO(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)})),hW=8,yW=8,gW=12;function _W(){const t=mW(i=>i.followed).slice(0,hW),{data:r=[],isLoading:n}=Dl({queryKey:["followed-creators-row",t.join(",")],enabled:t.length>0,queryFn:async()=>{const i=await Promise.all(t.map(a=>dW(a,{first:yW}).then(s=>s.items).catch(()=>[])));return EW(i).filter(a=>a.priceCredits>0).slice(0,gW)}});return t.length===0||!n&&r.length===0?null:Q.jsxs("section",{className:"row",children:[Q.jsx("div",{className:"row__head",children:Q.jsx("h2",{className:"row__title",children:"From creators you follow"})}),Q.jsx("div",{className:"row__track",children:n?Array.from({length:6}).map((i,a)=>Q.jsx("div",{className:"card card--skeleton"},a)):r.map(i=>Q.jsx(mE,{item:i},i.id))})]})}function EW(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 lD="shop:recently-viewed",dD=12;function fD(){try{const e=localStorage.getItem(lD);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.slice(0,dD):[]}catch{return[]}}function y6(e){if(e!=null&&e.id)try{const t=[e,...fD().filter(r=>r.id!==e.id)].slice(0,dD);localStorage.setItem(lD,JSON.stringify(t))}catch{}}function vW({excludeId:e}){const t=De.useMemo(()=>fD().filter(r=>r.id!==e),[e]);return t.length===0?null:Q.jsxs("section",{className:"row",children:[Q.jsx("div",{className:"row__head",children:Q.jsx("h2",{className:"row__title",children:"Recently viewed"})}),Q.jsx("div",{className:"row__track",children:t.map(r=>Q.jsx(mE,{item:r},r.id))})]})}function vO({title:e,items:t,loading:r}){return Q.jsxs("section",{className:"row",children:[Q.jsxs("div",{className:"row__head",children:[Q.jsx("h2",{className:"row__title",children:e}),Q.jsxs(vl,{className:"row__viewall",to:"/assets",children:["View all ",Q.jsx("span",{className:"ico ico-viewall","aria-hidden":!0})]})]}),Q.jsx("div",{className:"row__track",children:r?Array.from({length:6}).map((n,i)=>Q.jsx("div",{className:"card card--skeleton"},i)):t.map(n=>Q.jsx(mE,{item:n},n.id))})]})}function bW(){const{data:e,isLoading:t}=Dl({queryKey:["overview-listings"],queryFn:()=>H8({first:24})}),r=(e==null?void 0:e.items)??[];return Q.jsxs("div",{className:"overview",children:[Q.jsx("section",{className:"hero",children:Q.jsxs("div",{className:"hero__inner",children:[Q.jsx("h1",{className:"hero__title",children:"FASHION WEEK OUTFITS"}),Q.jsx(vl,{className:"btn btn--purple",to:"/assets",children:"EXPLORE COLLECTION"})]})}),Q.jsx(_W,{}),Q.jsx(vW,{}),t||r.length>0?Q.jsxs(Q.Fragment,{children:[Q.jsx(vO,{title:"Featured",items:r.slice(0,12),loading:t}),r.length>6?Q.jsx(vO,{title:"New Creations",items:r.slice(6,18),loading:!1}):null]}):Q.jsxs("div",{className:"overview__empty",children:[Q.jsx("p",{className:"overview__empty-title",children:"New drops are on the way"}),Q.jsx("p",{className:"muted",children:"There are no items on sale right now — check back soon."}),Q.jsx(vl,{className:"btn btn--purple",to:"/assets",children:"Browse Collectibles"})]})]})}const TW={"/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"},SW=De.lazy(()=>xt(()=>import("./Assets-uXzVK3Qk.js"),__vite__mapDeps([15,1,16,17,18,6])).then(e=>({default:e.Assets}))),IW=De.lazy(()=>xt(()=>import("./Market-r9wggpqR.js"),__vite__mapDeps([19,1,20,14,6,16,17,21,22,18])).then(e=>({default:e.Market}))),RW=De.lazy(()=>xt(()=>import("./ItemDetail-Ck5cudTI.js"),__vite__mapDeps([23,1,21,14,6,22,24])).then(e=>({default:e.ItemDetail}))),wW=De.lazy(()=>xt(()=>import("./Collection-HISXJvQ9.js"),__vite__mapDeps([25,1,26,27,16,17,18,6])).then(e=>({default:e.Collection}))),AW=De.lazy(()=>xt(()=>import("./Creator-DckKaL-1.js"),__vite__mapDeps([28,1,26,27,16,17,18,6])).then(e=>({default:e.Creator}))),OW=De.lazy(()=>xt(()=>import("./MyAssets-DbjlwVgI.js"),__vite__mapDeps([29,1,30,21,14,6,20,31,17,18,32])).then(e=>({default:e.MyAssets}))),NW=De.lazy(()=>xt(()=>import("./MyFavorites-CUJsTl4U.js"),__vite__mapDeps([33,1,17,6])).then(e=>({default:e.MyFavorites}))),PW=De.lazy(()=>xt(()=>import("./MyPurchases-D231IumZ.js"),__vite__mapDeps([34,1,17,18,6])).then(e=>({default:e.MyPurchases}))),CW=De.lazy(()=>xt(()=>import("./ImportListings-3PSkCxI9.js"),__vite__mapDeps([35,1,30,21,14,6,20,31,36])).then(e=>({default:e.ImportListings}))),MW=De.lazy(()=>xt(()=>import("./Cart-B_feHFWP.js"),__vite__mapDeps([37,1,21,14,6,22])).then(e=>({default:e.Cart}))),DW=De.lazy(()=>xt(()=>import("./GetCredits-DqKwryal.js"),__vite__mapDeps([38,1,11,4,6])).then(e=>({default:e.GetCredits}))),jW=De.lazy(()=>xt(()=>import("./Success-vyQPaFjH.js"),__vite__mapDeps([39,1,31,6])).then(e=>({default:e.Success}))),LW=De.lazy(()=>xt(()=>import("./NotFound-MYCYhimC.js"),__vite__mapDeps([40,1,6])).then(e=>({default:e.NotFound})));function $W(){return Q.jsx("div",{className:"page-loading","aria-busy":"true",children:Q.jsx("span",{className:"spinner","aria-hidden":!0})})}function qW(){return Q.jsxs("div",{className:"overview__empty",children:[Q.jsx("p",{className:"overview__empty-title",children:"Something went wrong"}),Q.jsx("p",{className:"muted",children:"This page hit an unexpected error. Try reloading."}),Q.jsx("button",{className:"btn btn--purple",onClick:()=>window.location.reload(),children:"Reload"})]})}function BW(){U8();const e=AD();return De.useEffect(()=>{W3()},[]),De.useEffect(()=>{const t=e.pathname,r=TW[t]??(t.startsWith("/item/")?"item":t.startsWith("/collection/")?"collection":t.startsWith("/creator/")?"creator":"other");H3(r)},[e.pathname]),Q.jsxs(Q.Fragment,{children:[Q.jsx(A8,{}),Q.jsx(k8,{}),Q.jsx(L8,{}),Q.jsx(S8,{}),Q.jsx("main",{className:"page",children:Q.jsx(Nl,{fallback:Q.jsx(qW,{}),children:Q.jsx(De.Suspense,{fallback:Q.jsx($W,{}),children:Q.jsxs(OD,{children:[Q.jsx(dr,{path:"/",element:Q.jsx(ND,{to:"/overview",replace:!0})}),Q.jsx(dr,{path:"/overview",element:Q.jsx(bW,{})}),Q.jsx(dr,{path:"/assets",element:Q.jsx(SW,{})}),Q.jsx(dr,{path:"/market",element:Q.jsx(IW,{})}),Q.jsx(dr,{path:"/item/:contractAddress/:tokenId",element:Q.jsx(RW,{})}),Q.jsx(dr,{path:"/collection/:contractAddress",element:Q.jsx(wW,{})}),Q.jsx(dr,{path:"/creator/:address",element:Q.jsx(AW,{})}),Q.jsx(dr,{path:"/my-assets",element:Q.jsx(OW,{})}),Q.jsx(dr,{path:"/my-favorites",element:Q.jsx(NW,{})}),Q.jsx(dr,{path:"/my-purchases",element:Q.jsx(PW,{})}),Q.jsx(dr,{path:"/import",element:Q.jsx(CW,{})}),Q.jsx(dr,{path:"/cart",element:Q.jsx(MW,{})}),Q.jsx(dr,{path:"/credits",element:Q.jsx(DW,{})}),Q.jsx(dr,{path:"/success",element:Q.jsx(jW,{})}),Q.jsx(dr,{path:"*",element:Q.jsx(LW,{})})]})})})}),Q.jsx(Nl,{fallback:Q.jsx(Q.Fragment,{}),children:Q.jsx(B8,{})})]})}function kW({children:e}){const t=r_(r=>r.locale);return T8(t),Q.jsx(c8,{value:dE(t),children:e},t)}Z3();const UW=new ij({defaultOptions:{queries:{staleTime:3e4,refetchOnWindowFocus:!1}}});PD.createRoot(document.getElementById("root")).render(Q.jsx(DO.StrictMode,{children:Q.jsx(sj,{client:UW,children:Q.jsx(kW,{children:Q.jsx(CD,{children:Q.jsx(BW,{})})})})}));export{aW as $,mE as A,H8 as B,eW as C,Hn as D,Zr as E,d0 as F,mW as G,dW as H,a6 as I,N8 as J,n6 as K,c6 as L,WW as M,zW as N,gj as O,GW as P,JD as Q,sd as R,r6 as S,iE as T,XW as U,y6 as V,fE as W,rW as X,Q8 as Y,nW as Z,xt as _,Ss as a,u6 as a0,l6 as a1,o6 as a2,HG as a3,vn as a4,en as a5,KF as a6,L4 as a7,Qo as a8,W_ as a9,SH as aa,uH as ab,i6 as ac,L_ as ad,LP as ae,$P as af,e6 as b,Dl as c,kn as d,f6 as e,h6 as f,oD as g,Dt as h,Kr as i,B4 as j,aj as k,cs as l,ci as m,Do as n,p6 as o,d6 as p,m6 as q,ZW as r,JW as s,Yr as t,yO as u,QW as v,xw as w,G3 as x,t6 as y,s6 as z};