@dcl/blog-site 0.3.1-24533807769.commit-2e68981 → 0.3.1-24574465167.commit-1f456d2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/AuthorPage-Df6gn9_m.js +1 -0
- package/assets/BlogPage-B4pxSza8.js +1 -0
- package/assets/CategoryPage-CxeJ3QiI.js +1 -0
- package/assets/Media-BiHT3qBR.js +1 -0
- package/assets/PageLayout-Ciu0k-U_.js +1 -0
- package/assets/PostCard-Dd4F35zx.js +1 -0
- package/assets/PostPage-QHfmu2Vt.js +1 -0
- package/assets/PostPage.styled-D5lERqJA.js +2 -0
- package/assets/PreviewPage-J15Hru2y.js +1 -0
- package/assets/{QueryClientProvider-Dv18L3Bf.js → QueryClientProvider-OhEAiC0P.js} +1 -1
- package/assets/SEO-DW5vf2xx.js +5 -0
- package/assets/SearchPage-Aj2MbbZU.js +1 -0
- package/assets/SignInRedirect-qy6q_tZq.js +1 -0
- package/assets/{WalletStateProvider-Bb79ArZ-.js → WalletStateProvider-CdpYlS08.js} +1 -1
- package/assets/{Web3Inner-CgxSXeS_.js → Web3Inner-BJ-KSM84.js} +1 -1
- package/assets/{Web3SyncProvider-D6_GzSKM.js → Web3SyncProvider-CVoNw-Ck.js} +2 -2
- package/assets/X-DOiZv48t.js +15 -0
- package/assets/__federation_expose_App-8sv1g15i.js +1 -0
- package/assets/{__federation_fn_import-BxyPyKYw.js → __federation_fn_import-DNtjaGC4.js} +1 -1
- package/assets/__federation_shared_@dcl/core-web3/lazy-DkP-jRSY.js +2 -0
- package/assets/__federation_shared_@dcl/{core-web3-CKa_YLUg.js → core-web3-B8eHhcKW.js} +2 -2
- package/assets/__federation_shared_@dcl/{hooks-BUl9fwJ6.js → hooks-6RDCWtS0.js} +5 -5
- package/assets/__federation_shared_@dcl/schemas-Bx07hTGg.js +1 -0
- package/assets/__federation_shared_@emotion/react-TNrN6Qto.js +1 -0
- package/assets/__federation_shared_@emotion/{styled-DWCD7TRI.js → styled-CGJjdZ7M.js} +1 -1
- package/assets/{__federation_shared_decentraland-ui2-DhNprCzs.js → __federation_shared_decentraland-ui2-Bc45XQnG.js} +28 -31
- package/assets/__federation_shared_react-D4NpQaXx.js +1 -0
- package/assets/__federation_shared_react-dom-BnMp-IwM.js +1 -0
- package/assets/{__federation_shared_react-redux-BbbSoEti.js → __federation_shared_react-redux-C0CNQCVL.js} +1 -1
- package/assets/{__federation_shared_react-router-dom-CghPW3T5.js → __federation_shared_react-router-dom-DwnKrWTP.js} +1 -1
- package/assets/{__federation_shared_viem-BSisS619.js → __federation_shared_viem-BnQWYaJC.js} +1 -1
- package/assets/{__federation_shared_wagmi-BNNJMvLV.js → __federation_shared_wagmi-gkTMllsk.js} +1 -1
- package/assets/{add-CdrtIhqC.js → add-CrlFk3Q3.js} +1 -1
- package/assets/{all-wallets-Cmla8eMe.js → all-wallets-Cn4vlXAg.js} +1 -1
- package/assets/{app-store-ma7uMa9T.js → app-store-Be5qHevD.js} +1 -1
- package/assets/{apple-bELCHYbt.js → apple-BLF9iOOU.js} +1 -1
- package/assets/{arrow-bottom-DloKu1fV.js → arrow-bottom-DkIzNCmM.js} +1 -1
- package/assets/{arrow-bottom-circle-DzXI01oZ.js → arrow-bottom-circle-DTIccLhb.js} +1 -1
- package/assets/{arrow-left-B55lkgKK.js → arrow-left-Dn2O6Yc9.js} +1 -1
- package/assets/{arrow-right-Bw7eQ4QH.js → arrow-right-BhwoZxOJ.js} +1 -1
- package/assets/{arrow-top-Dn6leB_M.js → arrow-top-CKR018aC.js} +1 -1
- package/assets/authRedirect-CDwN-vsd.js +1 -0
- package/assets/{auto-track-CkHj-ik-.js → auto-track-D5pJjTP0.js} +1 -1
- package/assets/{bank-DH1VVekh.js → bank-C7cxDWGw.js} +1 -1
- package/assets/{basic-CpaLk7Rk.js → basic-C9P9esct.js} +1 -1
- package/assets/{biconomy-C-Aa3WOy.js → biconomy-C3StBANE.js} +1 -1
- package/assets/{browser-Cy2ntZlE.js → browser-DJ7_iUnZ.js} +1 -1
- package/assets/{card-DeDlu8qm.js → card-JDGi0NHR.js} +1 -1
- package/assets/{ccip-O3XMTSRc.js → ccip-CIy6Np-r.js} +1 -1
- package/assets/{checkmark-DNVFeB3s.js → checkmark-CPuFFcJX.js} +1 -1
- package/assets/{checkmark-bold-DEcOisss.js → checkmark-bold-mWhrN4oP.js} +1 -1
- package/assets/{chevron-bottom-xDV_oQI6.js → chevron-bottom-BiS2oxh-.js} +1 -1
- package/assets/{chevron-left-BYtOhhqm.js → chevron-left-mgiwYveY.js} +1 -1
- package/assets/{chevron-right-CfsnvkD5.js → chevron-right-BBbwfFkV.js} +1 -1
- package/assets/{chevron-top-CONIZzEr.js → chevron-top-vRyln5TS.js} +1 -1
- package/assets/{chrome-store-D9VGMy-w.js → chrome-store-BMwl9GFC.js} +1 -1
- package/assets/{clock-DRArrlZN.js → clock-Cyo1NCoz.js} +1 -1
- package/assets/{close-BnL2HnLj.js → close-DpLs-6ut.js} +1 -1
- package/assets/{coinPlaceholder-DspCsB1d.js → coinPlaceholder-CMWbyfzw.js} +1 -1
- package/assets/{compass-CL9Ubv1C.js → compass-BZlWuYsQ.js} +1 -1
- package/assets/config-DzzapLE-.js +1 -0
- package/assets/contentful-5JGMFnCq.js +4 -0
- package/assets/{controller-BVrxdctz.js → controller-zrh0AA5v.js} +2 -2
- package/assets/{copy-DzcJW_6z.js → copy-C8XbJm81.js} +1 -1
- package/assets/{core-CNeX_97j.js → core-CmzgCi5e.js} +3 -3
- package/assets/{createBundlerClient-BPAMiN0_.js → createBundlerClient-CvVX10zF.js} +1 -1
- package/assets/{createClient-B3NJif4G.js → createClient-DuiD_-hg.js} +1 -1
- package/assets/{cursor-VEXLPp4L.js → cursor-DgKI5UfF.js} +1 -1
- package/assets/{cursor-transparent-eNYb23WQ.js → cursor-transparent-DYc-PvMS.js} +1 -1
- package/assets/{decimals-QcoDvy79.js → decimals-BprNBSsW.js} +1 -1
- package/assets/{decimals-Bcje5XLK.js → decimals-DC_X5ByZ.js} +1 -1
- package/assets/defaultTheme-0boCqa4G.js +1 -0
- package/assets/{desktop-B8dtxVkT.js → desktop-BXu5vjTJ.js} +1 -1
- package/assets/{detectExtension-CCed483c.js → detectExtension-B_qG6Uj3.js} +1 -1
- package/assets/{disconnect-5l_BrY-g.js → disconnect-BIjCZBSY.js} +1 -1
- package/assets/{discord-vPm7sSnB.js → discord-BHe20Bgu.js} +1 -1
- package/assets/emotion-element-f0de968e.browser.esm-DUNwabDo.js +8 -0
- package/assets/{emotion-use-insertion-effect-with-fallbacks.browser.esm-BLv21GTb.js → emotion-use-insertion-effect-with-fallbacks.browser.esm-B88ZkZJW.js} +1 -1
- package/assets/{encode-D4fq-GtO.js → encode-w1S6O2Jy.js} +2 -2
- package/assets/{engine-C-meN4xY.js → engine-CjoYEL_B.js} +1 -1
- package/assets/{estimate-gas-DFiVp-Bb.js → estimate-gas-Clq1zGmM.js} +3 -3
- package/assets/{estimate-l1-fee-lAfdaqWJ.js → estimate-l1-fee-D_wtZw7B.js} +1 -1
- package/assets/{eth_getStorageAt-DFwf_hwV.js → eth_getStorageAt-BPq1D0T-.js} +1 -1
- package/assets/{etherscan-Ck2P6D17.js → etherscan-CG5vA-W6.js} +1 -1
- package/assets/events-DqOg3rR3.js +1 -0
- package/assets/{exclamation-triangle-DfbN77Lf.js → exclamation-triangle-GyJq4nAX.js} +1 -1
- package/assets/{extension-CtEMnFwe.js → extension-muflT2fN.js} +1 -1
- package/assets/{external-link-B0IDyBri.js → external-link-DH3pNf93.js} +1 -1
- package/assets/{extractIPFS-DIosWHkP.js → extractIPFS-CN8RjoYW.js} +1 -1
- package/assets/{facebook-C0UeZpYw.js → facebook-Dvt8S6HP.js} +1 -1
- package/assets/{farcaster-CYOZFCGP.js → farcaster-CExK9GF3.js} +1 -1
- package/assets/{fee-data-BpKOAsFJ.js → fee-data-ITl-GLgb.js} +1 -1
- package/assets/{fetchTokenMetadata-DqYbYFuX.js → fetchTokenMetadata-C8Ab2EFW.js} +2 -2
- package/assets/{filters-NBQeHIU7.js → filters-BjkvScGN.js} +1 -1
- package/assets/{get-ecosystem-wallet-info-CDZa8BmK.js → get-ecosystem-wallet-info-BMnnm-zL.js} +1 -1
- package/assets/{getBalance-Bw5byYn3.js → getBalance-D97jBzkx.js} +1 -1
- package/assets/{getInstalledModules-By8IApsm.js → getInstalledModules-bM9ZiQVT.js} +1 -1
- package/assets/{getNFT-YU4EH9Wq.js → getNFT-DXArYl_b.js} +2 -2
- package/assets/{getNFT-DEyn-Dm_.js → getNFT-o2zOBSOX.js} +1 -1
- package/assets/{github-C4rc0OEq.js → github-DIcpmiTD.js} +1 -1
- package/assets/{google-kXTnc_BR.js → google-Ckbmg2Ga.js} +1 -1
- package/assets/{help-circle-Bwzt3B2p.js → help-circle-s_lVA58g.js} +1 -1
- package/assets/{id-zOIHpH1K.js → id-DeQgQo7H.js} +1 -1
- package/assets/{image-B1eT9feQ.js → image-DbZ9UUJ_.js} +1 -1
- package/assets/{in-app-wallet-calls-C61H1buU.js → in-app-wallet-calls-DzF9AO72.js} +1 -1
- package/assets/index-B584AmqK.js +1 -0
- package/assets/{index-Dy0yjznp__bundled.js → index-B584AmqK__bundled.js} +1 -1
- package/assets/index-BHSHxmEC.js +1 -0
- package/assets/{index-BqjaI3ay.js → index-BtR4l8xs.js} +1 -1
- package/assets/{index-AMqzEpe3.js → index-BxRTPul1.js} +1 -1
- package/assets/{index-DD6DIvwj.js → index-C0Hq4IJY.js} +1 -1
- package/assets/index-C1_ZJ2Fz.js +2 -0
- package/assets/{index-CQa-TpsF.js → index-C2PA63OZ.js} +2 -2
- package/assets/{index-CUrF8sCH.js → index-C7wwE81D.js} +3 -3
- package/assets/index-C9JLZTTc.js +1 -0
- package/assets/{index-C3DFzjjm.js → index-CA0YZX5c.js} +1 -1
- package/assets/index-CDytriL0.js +3 -0
- package/assets/{index-BozJS3za.js → index-CFfzHT-l.js} +4 -4
- package/assets/{index-B5C7HYRN.js → index-Cl9Sxyic.js} +1 -1
- package/assets/index-CsRwhq7r.js +1 -0
- package/assets/{index-DFwD9Y6T.js → index-CyHd0GjE.js} +1 -1
- package/assets/index-DmRwGcGJ.js +2 -0
- package/assets/index-DyjOKhts.js +2 -0
- package/assets/index-_YWtfAHj.js +1 -0
- package/assets/{index-BjzJcZq6__bundled.js → index-_YWtfAHj__bundled.js} +1 -1
- package/assets/{index-C1_xRJU5.js → index-eLC4bAt3.js} +1 -1
- package/assets/{index-BOPorWEt.js → index-yCW6eWvL.js} +1 -1
- package/assets/index.es-BRoT1QUU.js +2 -0
- package/assets/{index.es-D3pP9hN4.js → index.es-Bjzmmtjk.js} +1 -1
- package/assets/{index.es-CX6b-_J8.js → index.es-DDZKss3Y.js} +1 -1
- package/assets/{index.es-Co6Vfgvo.js → index.es-t7HDtKGz.js} +3 -3
- package/assets/index.modern-zayAXp-r.js +5 -0
- package/assets/index.umd-ddl_WOWs.js +1 -0
- package/assets/{info-fCoUT5OA.js → info-B83FYyYF.js} +1 -1
- package/assets/{info-circle-BSc3Qu0H.js → info-circle-BIW8YsHS.js} +1 -1
- package/assets/{jsx-runtime-DncYoG30.js → jsx-runtime-BWEVYhay.js} +1 -1
- package/assets/{jsx-runtime-DncYoG30__bundled.js → jsx-runtime-BWEVYhay__bundled.js} +1 -1
- package/assets/{lightbulb-CtEeQpR-.js → lightbulb-D3FjAVfy.js} +1 -1
- package/assets/{mail-CyEGKrO1.js → mail-B-gu_WkI.js} +1 -1
- package/assets/{mobile-va3MMBf-.js → mobile-COjPZ1X2.js} +1 -1
- package/assets/{more-CNKLmFKq.js → more-Ra8fJn--.js} +1 -1
- package/assets/{network-placeholder-COaPFv9Z.js → network-placeholder-DWM9do2v.js} +1 -1
- package/assets/{nftPlaceholder-CwqKeCBT.js → nftPlaceholder-BkuiJ1Fi.js} +1 -1
- package/assets/{off-BXJei5ZC.js → off-KeVYYonx.js} +1 -1
- package/assets/{openzeppelin-5tViGSfu.js → openzeppelin-65KMFHrE.js} +1 -1
- package/assets/{ownerOf-B0jDYVPj.js → ownerOf-B5EfXA60.js} +1 -1
- package/assets/{parseNft-C9UVkjKp.js → parseNft-CtU7M4OG.js} +2 -2
- package/assets/{play-store-DPqFtu_u.js → play-store-Dvga_7y6.js} +1 -1
- package/assets/{plus-BRStu8oq.js → plus-1d7HZSRm.js} +1 -1
- package/assets/{preload-helper-DtiUdDj_.js → preload-helper-5SOR_wM4.js} +1 -1
- package/assets/{qr-code-zVq-PsFR.js → qr-code-DHi3Cbzt.js} +1 -1
- package/assets/{qr-overlay-CzG9L326.js → qr-overlay-wjVP52h3.js} +1 -1
- package/assets/{recycle-horizontal-BUcJt7KV.js → recycle-horizontal-f80ctvB9.js} +1 -1
- package/assets/{refresh-DoJwoFWZ.js → refresh-DCOqM3zJ.js} +1 -1
- package/assets/remoteEntry.js +1 -1
- package/assets/{reown-logo-VGJ4-w32.js → reown-logo-Bh1MMtyx.js} +1 -1
- package/assets/{resolveImplementation-CDZMD3pd.js → resolveImplementation-eBjFZj8j.js} +1 -1
- package/assets/rich-text-react-renderer.es5-DX5s0zF9.js +2 -0
- package/assets/{search-qfys2xfh.js → search-CZQy06by.js} +1 -1
- package/assets/{send-BNIku3tf.js → send-D-TwjhV1.js} +1 -1
- package/assets/{send-batch-transaction-DJsVdrRi.js → send-batch-transaction-Ugc9XCfc.js} +1 -1
- package/assets/{send-eip712-transaction-zZlwlA8h.js → send-eip712-transaction-CsbokYJ3.js} +2 -2
- package/assets/{send-gasless-transaction-0zsgzkl7.js → send-gasless-transaction-XWm5OsJP.js} +2 -2
- package/assets/{serializeAuthorizationList-B224vId9.js → serializeAuthorizationList-sXgqtd3N.js} +1 -1
- package/assets/{session-proposal-DQKIaN0P.js → session-proposal-BZkE3xXx.js} +1 -1
- package/assets/{session-request-DO6jaRLL.js → session-request-BS122IY1.js} +2 -2
- package/assets/{signing-D7Amo-_J.js → signing-DLkAwP5Y.js} +3 -3
- package/assets/{slice-D08eqHRd.js → slice-D5Jq-FmM.js} +1 -1
- package/assets/{slice-DH_M4Fq9.js → slice-DpowZ_6S.js} +1 -1
- package/assets/{swapHorizontal-D4EMXwCW.js → swapHorizontal-DH1W1UoG.js} +1 -1
- package/assets/{swapHorizontalBold-DPzDpA5S.js → swapHorizontalBold-D8QA6zjc.js} +1 -1
- package/assets/{swapHorizontalMedium-BO1_vkWp.js → swapHorizontalMedium-D6iiMSB9.js} +1 -1
- package/assets/{swapHorizontalRoundedBold-D5f2zm5T.js → swapHorizontalRoundedBold-CG0CSrfy.js} +1 -1
- package/assets/{swapVertical-Cl2TRZgu.js → swapVertical-BVkEaika.js} +1 -1
- package/assets/{telegram-COuwS3-1.js → telegram-BRL2ke_g.js} +1 -1
- package/assets/{thirdweb-ChZTN2O0.js → thirdweb-B-Xe4N-j.js} +3 -3
- package/assets/{three-dots-DaJ9Yk_z.js → three-dots-Ce3AHErA.js} +1 -1
- package/assets/{totalSupply-CeZQpDgj.js → totalSupply-BycaSCJm.js} +1 -1
- package/assets/{twitch-ChHlcjtL.js → twitch-BOhm2e6I.js} +1 -1
- package/assets/{twitterIcon-BHaGUsBd.js → twitterIcon-Bi32kZ_p.js} +1 -1
- package/assets/{uid-BE5dre25.js → uid-Cob2hcqP.js} +3 -3
- package/assets/useInfiniteBlogPosts-CA3uk6ie.js +1 -0
- package/assets/{verify-BJHlq4Cl.js → verify-XBYDp8cg.js} +1 -1
- package/assets/{verify-filled-CUQ_cX7L.js → verify-filled-DIs-cByX.js} +1 -1
- package/assets/{w3m-modal-BQt7iWW0.js → w3m-modal-CkzQCU-p.js} +1 -1
- package/assets/{wait-for-tx-receipt-mEy_aAXI.js → wait-for-tx-receipt-BmfZs18K.js} +1 -1
- package/assets/{wallet-Bqa5aoUK.js → wallet-DhGCzxG1.js} +1 -1
- package/assets/{wallet-placeholder-ZqWJAmHm.js → wallet-placeholder-CbhoKZ6M.js} +1 -1
- package/assets/{walletconnect-DgD3JeRt.js → walletconnect-Bo6cSb7c.js} +1 -1
- package/assets/{wallets-DBEqpf9_.js → wallets-DpmOypgu.js} +5 -5
- package/assets/{warning-circle-C-GR2K3_.js → warning-circle-DXO4TTWk.js} +1 -1
- package/assets/{web-connector-DbEpPXWA.js → web-connector-D9njQB_l.js} +3 -3
- package/assets/{webSocket-D9rKCHPk.js → webSocket-i6CHiIgb.js} +1 -1
- package/assets/{x-dxs8B49F.js → x-5st4UAZO.js} +1 -1
- package/index.html +29 -16
- package/package.json +3 -3
- package/assets/SignInRedirect-CXE_9i3I.js +0 -9
- package/assets/X-Bfq5REIM.js +0 -15
- package/assets/___vite-browser-external_commonjs-proxy-BqV5D26a.js +0 -1
- package/assets/__federation_expose_App-c8Vsr-t8.js +0 -1
- package/assets/__federation_shared_@dcl/core-web3/lazy-CB9aN5En.js +0 -2
- package/assets/__federation_shared_@dcl/schemas-DMXTEmDf.js +0 -1
- package/assets/__federation_shared_@emotion/react-Dqhl2Mup.js +0 -1
- package/assets/__federation_shared_react-B3tlNTLg.js +0 -1
- package/assets/__federation_shared_react-dom-CCS4dT_K.js +0 -1
- package/assets/_commonjsHelpers-C4iS2aBk.js +0 -1
- package/assets/emotion-react.browser.esm-C-lDaXQ7.js +0 -8
- package/assets/events-B5inrCVE.js +0 -1
- package/assets/index-BjA_RJ3F.js +0 -2
- package/assets/index-BjzJcZq6.js +0 -1
- package/assets/index-C1IoT2if.js +0 -3
- package/assets/index-CgX6dKUG.js +0 -2
- package/assets/index-DU4RVPgw.js +0 -1
- package/assets/index-Dy0yjznp.js +0 -1
- package/assets/index-IYkCvEK_.js +0 -1
- package/assets/index-Tsk25L8E.js +0 -1
- package/assets/index.es-D5YKsq2-.js +0 -2
- package/assets/index.umd-DK712HHb.js +0 -1
- package/assets/rich-text-react-renderer.es5-D_tE7AHo.js +0 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{importShared as e}from"./__federation_fn_import-DNtjaGC4.js";import{j as t}from"./jsx-runtime-BWEVYhay.js";import{u as x,P as h}from"./useInfiniteBlogPosts-CA3uk6ie.js";import{u as m,P as d}from"./PageLayout-Ciu0k-U_.js";import{S as j,O as f}from"./SEO-DW5vf2xx.js";import{g as y}from"./authRedirect-CDwN-vsd.js";const{Box:g,styled:c}=await e("decentraland-ui2"),B=c(g)(({theme:r})=>({marginBottom:r.spacing(6),display:"flex",flexDirection:"column",alignItems:"left",gap:r.spacing(4)})),P=c("img")(()=>({width:"150px",height:"150px",borderRadius:"50%",objectFit:"cover"})),l=c(g)(({theme:r})=>({textAlign:"center",paddingTop:r.spacing(8),paddingBottom:r.spacing(8)})),{useParams:L}=await e("react-router-dom"),{useTranslation:u}=await e("@dcl/hooks"),{CircularProgress:v,Typography:i}=await e("decentraland-ui2"),A=({author:r})=>{const{t:s}=u(),{posts:o,isLoadingInitial:a,error:n}=x({author:r.slug});return n?t.jsx(l,{children:t.jsx(i,{color:"error",children:s("error.load_posts")})}):t.jsxs(t.Fragment,{children:[t.jsxs(B,{children:[r.image&&t.jsx(P,{src:r.image.url,alt:r.title}),t.jsx(i,{variant:"h5",children:r.title}),t.jsx(i,{variant:"body1",color:"textSecondary",children:r.description})]}),t.jsx(h,{posts:o,loading:a,hasMainPost:!1})]})},O=()=>{const{t:r}=u(),{authorSlug:s}=L(),{data:o,isLoading:a,error:n}=m({slug:s||""}),p=y("BLOG_BASE_URL")||"";return n?t.jsx(d,{showBlogNavigation:!0,children:t.jsx(l,{children:t.jsx(i,{color:"error",children:r("error.load_author")})})}):t.jsxs(d,{showBlogNavigation:!0,children:[t.jsx(j,{title:o?.title?r("blog.posts_by",{author:o.title}):void 0,description:o?.description||r("blog.default_description"),url:`${p}/author/${s}`,type:f.PROFILE,image:o?.image?{url:o.image.url,alt:o.title}:void 0}),a?t.jsx(l,{children:t.jsx(v,{})}):o?t.jsx(A,{author:o},o.id):null]})};export{O as AuthorPage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{importShared as a}from"./__federation_fn_import-DNtjaGC4.js";import{g as w,c as P}from"./authRedirect-CDwN-vsd.js";import{j as l}from"./jsx-runtime-BWEVYhay.js";import{u as v,P as S}from"./useInfiniteBlogPosts-CA3uk6ie.js";import{P as O}from"./PageLayout-Ciu0k-U_.js";import{S as B}from"./SEO-DW5vf2xx.js";import{u as T}from"./Media-BiHT3qBR.js";function c(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?c=function(o){return typeof o}:c=function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},c(e)}function x(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E(e,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function D(e,t,o){return t&&E(e.prototype,t),e}function M(e,t){return t&&(c(t)==="object"||typeof t=="function")?t:u(e)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},f(e)}function u(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function j(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}function h(e,t){return h=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},h(e,t)}function p(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}const C=await a("react"),{PureComponent:I}=C;var L=function(e){j(t,e);function t(){var o,r;x(this,t);for(var i=arguments.length,n=new Array(i),s=0;s<i;s++)n[s]=arguments[s];return r=M(this,(o=f(t)).call.apply(o,[this].concat(n))),p(u(r),"state",{bootstrapped:!1}),p(u(r),"_unsubscribe",void 0),p(u(r),"handlePersistorState",function(){var d=r.props.persistor,_=d.getState(),b=_.bootstrapped;b&&(r.props.onBeforeLift?Promise.resolve(r.props.onBeforeLift()).finally(function(){return r.setState({bootstrapped:!0})}):r.setState({bootstrapped:!0}),r._unsubscribe&&r._unsubscribe())}),r}return D(t,[{key:"componentDidMount",value:function(){this._unsubscribe=this.props.persistor.subscribe(this.handlePersistorState),this.handlePersistorState()}},{key:"componentWillUnmount",value:function(){this._unsubscribe&&this._unsubscribe()}},{key:"render",value:function(){return typeof this.props.children=="function"?this.props.children(this.state.bootstrapped):this.state.bootstrapped?this.props.children:this.props.loading}}]),t}(I);p(L,"defaultProps",{children:null,loading:null});const{createWeb3CoreConfig:R,thirdweb:N}=await a("@dcl/core-web3"),m=w("THIRDWEB_CLIENT_ID")??"",A={dev:"dev",stg:"stg",prod:"prd"},q=A[P.getEnv()]??"prd",te=R({environment:q,appMetadata:{name:"Decentraland Blog",description:"The official Decentraland Blog",url:typeof window<"u"?window.location.origin:"https://decentraland.org/blog"},additionalConnectors:[...m?[N({clientId:m})]:[]]}),F={title:"Blog",default_description:"Stay up to date with Decentraland announcements, updates, community highlights, and more.",all_articles:"All articles",load_more:"Load More",nothing_to_show:"Nothing to show",related_post:"Related Articles",share:"Share",posts_by:"Posts by {author}"},W={placeholder:"Search...",clear:"Clear search",searching:"Searching...",error:"Search error",no_matches:"No matches",try_something_else:"Try searching for something else",see_more_results:"See more results",results_for:"Search results for",no_results_for:"No results found for",title:"Search",title_with_query:"Search: {query}",description_with_query:'Search results for "{query}" in Decentraland Blog',description:"Search the Decentraland Blog"},k={generic:"Something went wrong. Please try again.",load_post:"Failed to load post. Please try again later.",load_posts:"Failed to load posts. Please try again later.",load_category:"Failed to load category. Please try again later.",load_author:"Failed to load author. Please try again later.",load_preview:"Failed to load preview. Please check your preview URL and try again."},U={mode:"Preview Mode",description:"You are viewing an unpublished post from Contentful",missing_params:"Missing preview parameters. Required: contentful_id, contentful_env, token"},G={default_image_alt:"Decentraland - A virtual world owned by its users"},oe={blog:F,search:W,error:k,preview:U,seo:G},{Box:g,styled:y}=await a("decentraland-ui2");y(g)(({theme:e})=>({marginTop:e.spacing(6),display:"flex",justifyContent:"center"}));y(g)(({theme:e})=>({display:"flex",justifyContent:"center",marginTop:e.spacing(6)}));const H=y(g)(({theme:e})=>({textAlign:"center",paddingTop:e.spacing(4),paddingBottom:e.spacing(4)})),{useMemo:z}=await a("react"),{useTranslation:Q}=await a("@dcl/hooks"),{Typography:V}=await a("decentraland-ui2"),re=()=>{const{t:e}=Q(),t=T(),{posts:o,isLoadingInitial:r,error:i}=v(),n=z(()=>o.find(d=>!("isPlaceholder"in d)),[o]);return l.jsxs(O,{showBlogNavigation:!0,activeCategory:"all_articles",children:[l.jsx(B,{title:e("blog.title"),description:n?.description||e("blog.default_description"),image:n?.image?{url:n.image.url,width:n.image.width,height:n.image.height,alt:n.title}:void 0}),i?l.jsx(H,{children:l.jsx(V,{color:"error",children:e("error.load_posts")})}):l.jsx(S,{posts:o,loading:r,hasMainPost:!t})]})};export{re as B,L as P,oe as e,te as w};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{importShared as e}from"./__federation_fn_import-DNtjaGC4.js";import{j as r}from"./jsx-runtime-BWEVYhay.js";import{u as h,P as m}from"./useInfiniteBlogPosts-CA3uk6ie.js";import{d as f,P as p}from"./PageLayout-Ciu0k-U_.js";import{S as j}from"./SEO-DW5vf2xx.js";import{g as w}from"./authRedirect-CDwN-vsd.js";import{u as b}from"./Media-BiHT3qBR.js";const{Box:y,Typography:C,styled:c}=await e("decentraland-ui2"),B=c(y)(({theme:t,imageUrl:i})=>({backgroundImage:`linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url("${i}")`,backgroundSize:"cover",backgroundPosition:"center",width:"100%",height:"248px",display:"flex",alignItems:"center",justifyContent:"flex-start",marginBottom:t.spacing(6),[t.breakpoints.down("sm")]:{height:"180px",justifyContent:"center"}})),S=c(y)(({theme:t})=>({textAlign:"left",color:t.palette.common.white,maxWidth:t.spacing(133),width:"100%",margin:"0 auto",padding:t.spacing(3),"& p":{fontSize:"18px",lineHeight:"28px",textShadow:"0 1px 2px rgba(0, 0, 0, 0.5)"},[t.breakpoints.down("sm")]:{textAlign:"center"}})),P=c(C)(({theme:t})=>({marginBottom:t.spacing(2),textShadow:"0 2px 4px rgba(0, 0, 0, 0.5)",[t.breakpoints.down("sm")]:{fontSize:t.typography.h4.fontSize,fontWeight:t.typography.h4.fontWeight,lineHeight:t.typography.h4.lineHeight}})),{memo:v}=await e("react"),{Typography:T}=await e("decentraland-ui2"),L=v(t=>{const{category:i,description:o,image:a}=t;return r.jsx(B,{imageUrl:a,children:r.jsxs(S,{children:[r.jsx(P,{variant:"h3",children:i}),r.jsx(T,{variant:"body1",children:o})]})})}),{Box:l,styled:d}=await e("decentraland-ui2"),g=d(l)(({theme:t})=>({textAlign:"center",paddingTop:t.spacing(8),paddingBottom:t.spacing(8)}));d(l)(({theme:t})=>({display:"flex",justifyContent:"center",marginTop:t.spacing(6)}));d(l)(({theme:t})=>({display:"flex",justifyContent:"center",marginTop:t.spacing(6)}));const{useParams:k}=await e("react-router-dom"),{useTranslation:u}=await e("@dcl/hooks"),{CircularProgress:H,Typography:x}=await e("decentraland-ui2"),$=({category:t})=>{const{t:i}=u(),o=b(),{posts:a,isLoadingInitial:n,error:s}=h({category:t.slug});return s?r.jsx(g,{children:r.jsx(x,{color:"error",children:i("error.load_posts")})}):r.jsx(m,{posts:a,loading:n,hasMainPost:!o})},W=()=>{const{t}=u(),{categorySlug:i}=k(),{data:o,isLoading:a,error:n}=f({slug:i||""}),s=w("BLOG_BASE_URL")||"";return n?r.jsx(p,{showBlogNavigation:!0,activeCategory:i,children:r.jsx(g,{children:r.jsx(x,{color:"error",children:t("error.load_category")})})}):r.jsxs(p,{showBlogNavigation:!0,activeCategory:i,banner:o?r.jsx(L,{category:o.title,description:o.description,image:o.image.url}):void 0,children:[r.jsx(j,{title:o?.title,description:o?.description||t("blog.default_description"),url:`${s}/${i}`,image:o?.image?{url:o.image.url,width:o.image.width,height:o.image.height,alt:o.title}:void 0}),a?r.jsx(g,{children:r.jsx(H,{})}):o?r.jsx($,{category:o},o.id):null]})};export{W as CategoryPage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{importShared as d}from"./__federation_fn_import-DNtjaGC4.js";import{r as M,c as w,u as k,T as y,d as Q}from"./defaultTheme-0boCqa4G.js";import{T as x}from"./emotion-element-f0de968e.browser.esm-DUNwabDo.js";function S(e){const{theme:t,name:n,props:s}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?s:M(t.components[n].defaultProps,s)}const D=await d("react");function g(e){return Object.keys(e).length===0}function b(e=null){const t=D.useContext(x);return!t||g(t)?e:t}const v=w();function E(e=v){return b(e)}const f=await d("react");function L(e,t,n,s,u){const[r,m]=f.useState(()=>u&&n?n(e).matches:s?s(e).matches:t);return k(()=>{let a=!0;if(!n)return;const o=n(e),p=()=>{a&&m(o.matches)};return p(),o.addListener(p),()=>{a=!1,o.removeListener(p)}},[e,n]),r}const T=f.useSyncExternalStore;function N(e,t,n,s,u){const r=f.useCallback(()=>t,[t]),m=f.useMemo(()=>{if(u&&n)return()=>n(e).matches;if(s!==null){const{matches:c}=s(e);return()=>c}return r},[r,e,s,u,n]),[a,o]=f.useMemo(()=>{if(n===null)return[r,()=>()=>{}];const c=n(e);return[()=>c.matches,h=>(c.addListener(h),()=>{c.removeListener(h)})]},[r,n,e]);return T(o,a,m)}function i(e,t={}){const n=b(),s=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:u=!1,matchMedia:r=s?window.matchMedia:null,ssrMatchMedia:m=null,noSsr:a=!1}=S({name:"MuiUseMediaQuery",props:t,theme:n});let o=typeof e=="function"?e(n):e;return o=o.replace(/^@media( ?)/m,""),(T!==void 0?N:L)(o,u,r,m,a)}await d("react");function l(){const e=E(Q);return e[y]||e}const U=()=>{const e=l();return i(e.breakpoints.up("xl"))},P=()=>{const e=l();return i(e.breakpoints.up("sm"))},j=()=>{const e=l();return i(e.breakpoints.between("xs","sm"))},B=()=>{const e=l();return i(e.breakpoints.down("sm"))},C=()=>{const e=l();return i(e.breakpoints.down("xs"))},O=()=>{const e=l();return i(e.breakpoints.up("xs"))},H=({children:e})=>P()?e:null,I=({children:e})=>j()?e:null,_=({children:e})=>B()?e:null,z=({children:e})=>C()?e:null,F=({children:e})=>O()?e:null;export{H as D,z as M,F as N,I as T,E as a,b,l as c,i as d,B as e,_ as f,S as g,U as h,P as i,O as j,j as k,C as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{importShared as B}from"./__federation_fn_import-DNtjaGC4.js";import{j}from"./jsx-runtime-BWEVYhay.js";import{E as Tn}from"./config-DzzapLE-.js";import{g as Ee,c as In,r as Rn}from"./authRedirect-CDwN-vsd.js";import{w as Ar,t as Cn,u as xr,j as An,v as xs,g as ks,h as xn,r as kn,b as Dn,m as On}from"./redux-Cj8EnDXU.js";import{d as Un}from"./index-yCW6eWvL.js";import{c as _n}from"./index-C9JLZTTc.js";var jn=class extends Error{issues;constructor(t){super(t[0].message),this.name="SchemaError",this.issues=t}},Ds=(t=>(t.uninitialized="uninitialized",t.pending="pending",t.fulfilled="fulfilled",t.rejected="rejected",t))(Ds||{}),qe="uninitialized",Gt="pending",Ge="fulfilled",He="rejected";function kr(t){return{status:t,isUninitialized:t===qe,isLoading:t===Gt,isSuccess:t===Ge,isError:t===He}}const{createAction:je,createSlice:De,createSelector:Nn,createAsyncThunk:Dr,combineReducers:$n,createNextState:er,isAnyOf:ft,isAllOf:At,isAction:Mn,isPending:Os,isRejected:tr,isFulfilled:Ce,isRejectedWithValue:rr,isAsyncThunkAction:Or,prepareAutoBatched:Me,SHOULD_AUTOBATCH:Us,isPlainObject:Ke,nanoid:_s}=await B("@reduxjs/toolkit");var Ur=Ke;function sr(t,n){if(t===n||!(Ur(t)&&Ur(n)||Array.isArray(t)&&Array.isArray(n)))return n;const i=Object.keys(n),l=Object.keys(t);let m=i.length===l.length;const f=Array.isArray(n)?[]:{};for(const h of i)f[h]=sr(t[h],n[h]),m&&(m=t[h]===f[h]);return m?t:f}function Ht(t,n,i){return t.reduce((l,m,f)=>(n(m,f)&&l.push(i(m,f)),l),[]).flat()}function Qn(t){return new RegExp("(^|:)//").test(t)}function Bn(){return typeof document>"u"?!0:document.visibilityState!=="hidden"}function nr(t){return t!=null}function _r(t){return[...t?.values()??[]].filter(nr)}function Ln(){return typeof navigator>"u"||navigator.onLine===void 0?!0:navigator.onLine}var Fn=t=>t.replace(/\/$/,""),Gn=t=>t.replace(/^\//,"");function Hn(t,n){if(!t)return n;if(!n)return t;if(Qn(n))return n;const i=t.endsWith("/")||!n.startsWith("?")?"/":"";return t=Fn(t),n=Gn(n),`${t}${i}${n}`}function gt(t,n,i){return t.has(n)?t.get(n):t.set(n,i(n)).get(n)}var zt=()=>new Map,jr=(...t)=>fetch(...t),zn=t=>t.status>=200&&t.status<=299,Wn=t=>/ion\/(vnd\.api\+)?json/.test(t.get("content-type")||"");function Nr(t){if(!Ke(t))return t;const n={...t};for(const[i,l]of Object.entries(n))l===void 0&&delete n[i];return n}var Vn=t=>typeof t=="object"&&(Ke(t)||Array.isArray(t)||typeof t.toJSON=="function");function Kn({baseUrl:t,prepareHeaders:n=a=>a,fetchFn:i=jr,paramsSerializer:l,isJsonContentType:m=Wn,jsonContentType:f="application/json",jsonReplacer:h,timeout:s,responseHandler:e,validateStatus:r,...o}={}){return typeof fetch>"u"&&i===jr&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),async(u,c,d)=>{const{getState:g,extra:p,endpoint:y,forced:b,type:w}=c;let q,{url:v,headers:S=new Headers(o.headers),params:A=void 0,responseHandler:x=e??"json",validateStatus:R=r??zn,timeout:T=s,...P}=typeof u=="string"?{url:u}:u,E,I=c.signal;T&&(E=new AbortController,c.signal.addEventListener("abort",E.abort),I=E.signal);let C={...o,signal:I,...P};S=new Headers(Nr(S)),C.headers=await n(S,{getState:g,arg:u,extra:p,endpoint:y,forced:b,type:w,extraOptions:d})||S;const k=Vn(C.body);if(C.body!=null&&!k&&typeof C.body!="string"&&C.headers.delete("content-type"),!C.headers.has("content-type")&&k&&C.headers.set("content-type",f),k&&m(C.headers)&&(C.body=JSON.stringify(C.body,h)),C.headers.has("accept")||(x==="json"?C.headers.set("accept","application/json"):x==="text"&&C.headers.set("accept","text/plain, text/html, */*")),A){const M=~v.indexOf("?")?"&":"?",F=l?l(A):new URLSearchParams(Nr(A));v+=M+F}v=Hn(t,v);const U=new Request(v,C);q={request:new Request(v,C)};let O,D=!1,N=E&&setTimeout(()=>{D=!0,E.abort()},T);try{O=await i(U)}catch(M){return{error:{status:D?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(M)},meta:q}}finally{N&&clearTimeout(N),E?.signal.removeEventListener("abort",E.abort)}const Q=O.clone();q.response=Q;let L,V="";try{let M;if(await Promise.all([a(O,x).then(F=>L=F,F=>M=F),Q.text().then(F=>V=F,()=>{})]),M)throw M}catch(M){return{error:{status:"PARSING_ERROR",originalStatus:O.status,data:V,error:String(M)},meta:q}}return R(O,L)?{data:L,meta:q}:{error:{status:O.status,data:L},meta:q}};async function a(u,c){if(typeof c=="function")return c(u);if(c==="content-type"&&(c=m(u.headers)?"json":"text"),c==="json"){const d=await u.text();return d.length?JSON.parse(d):null}return u.text()}}var $r=class{constructor(t,n=void 0){this.value=t,this.meta=n}},vt="__rtkq/",js="online",Ns="offline",Jn="focus",$s="focused",Yn="visibilitychange",St=je(`${vt}${$s}`),ar=je(`${vt}un${$s}`),Et=je(`${vt}${js}`),or=je(`${vt}${Ns}`),tt=!1;function Fc(t,n){function i(){const[l,m,f,h]=[St,ar,Et,or].map(r=>()=>t(r())),s=()=>{window.document.visibilityState==="visible"?l():m()};let e=()=>{tt=!1};if(!tt&&typeof window<"u"&&window.addEventListener){let r=function(a){Object.entries(o).forEach(([u,c])=>{a?window.addEventListener(u,c,!1):window.removeEventListener(u,c)})};const o={[Jn]:l,[Yn]:s,[js]:f,[Ns]:h};r(!0),tt=!0,e=()=>{r(!1),tt=!1}}return e}return i()}var Ze="query",Ms="mutation",Qs="infinitequery";function bt(t){return t.type===Ze}function Xn(t){return t.type===Ms}function Tt(t){return t.type===Qs}function pt(t){return bt(t)||Tt(t)}function ir(t,n,i,l,m,f){const h=Zn(t)?t(n,i,l,m):t;return h?Ht(h,nr,s=>f(Bs(s))):[]}function Zn(t){return typeof t=="function"}function Bs(t){return typeof t=="string"?{type:t}:t}const{formatProdErrorMessage:Gc}=await B("@reduxjs/toolkit");function ea(t,n){return t.catch(n)}var Ue=(t,n)=>t.endpointDefinitions[n],Je=Symbol("forceQueryFn"),Wt=t=>typeof t[Je]=="function";function ta({serializeQueryArgs:t,queryThunk:n,infiniteQueryThunk:i,mutationThunk:l,api:m,context:f,getInternalState:h}){const s=q=>h(q)?.runningQueries,e=q=>h(q)?.runningMutations,{unsubscribeQueryResult:r,removeMutationResult:o,updateSubscriptionOptions:a}=m.internalActions;return{buildInitiateQuery:y,buildInitiateInfiniteQuery:b,buildInitiateMutation:w,getRunningQueryThunk:u,getRunningMutationThunk:c,getRunningQueriesThunk:d,getRunningMutationsThunk:g};function u(q,v){return S=>{const A=Ue(f,q),x=t({queryArgs:v,endpointDefinition:A,endpointName:q});return s(S)?.get(x)}}function c(q,v){return S=>e(S)?.get(v)}function d(){return q=>_r(s(q))}function g(){return q=>_r(e(q))}function p(q,v){const S=(A,{subscribe:x=!0,forceRefetch:R,subscriptionOptions:T,[Je]:P,...E}={})=>(I,C)=>{const k=t({queryArgs:A,endpointDefinition:v,endpointName:q});let U;const _={...E,type:Ze,subscribe:x,forceRefetch:R,subscriptionOptions:T,endpointName:q,originalArgs:A,queryCacheKey:k,[Je]:P};if(bt(v))U=n(_);else{const{direction:$,initialPageParam:K}=E;U=i({..._,direction:$,initialPageParam:K})}const O=m.endpoints[q].select(A),D=I(U),N=O(C()),{requestId:Q,abort:L}=D,V=N.requestId!==Q,M=s(I)?.get(k),F=()=>O(C()),W=Object.assign(P?D.then(F):V&&!M?Promise.resolve(N):Promise.all([M,D]).then(F),{arg:A,requestId:Q,subscriptionOptions:T,queryCacheKey:k,abort:L,async unwrap(){const $=await W;if($.isError)throw $.error;return $.data},refetch:()=>I(S(A,{subscribe:!1,forceRefetch:!0})),unsubscribe(){x&&I(r({queryCacheKey:k,requestId:Q}))},updateSubscriptionOptions($){W.subscriptionOptions=$,I(a({endpointName:q,requestId:Q,queryCacheKey:k,options:$}))}});if(!M&&!V&&!P){const $=s(I);$.set(k,W),W.then(()=>{$.delete(k)})}return W};return S}function y(q,v){return p(q,v)}function b(q,v){return p(q,v)}function w(q){return(v,{track:S=!0,fixedCacheKey:A}={})=>(x,R)=>{const T=l({type:"mutation",endpointName:q,originalArgs:v,track:S,fixedCacheKey:A}),P=x(T),{requestId:E,abort:I,unwrap:C}=P,k=ea(P.unwrap().then(D=>({data:D})),D=>({error:D})),U=()=>{x(o({requestId:E,fixedCacheKey:A}))},_=Object.assign(k,{arg:P.arg,requestId:E,abort:I,unwrap:C,reset:U}),O=e(x);return O.set(E,_),_.then(()=>{O.delete(E)}),A&&(O.set(A,_),_.then(()=>{O.get(A)===_&&O.delete(A)})),_}}}var Ls=class extends jn{constructor(t,n,i,l){super(t),this.value=n,this.schemaName=i,this._bqMeta=l}},be=(t,n)=>Array.isArray(t)?t.includes(n):!!t;async function Te(t,n,i,l){const m=await t["~standard"].validate(n);if(m.issues)throw new Ls(m.issues,n,i,l);return m.value}function Mr(t){return t}var Qe=(t={})=>({...t,[Us]:!0});function ra({reducerPath:t,baseQuery:n,context:{endpointDefinitions:i},serializeQueryArgs:l,api:m,assertTagType:f,selectors:h,onSchemaFailure:s,catchSchemaFailure:e,skipSchemaValidation:r}){const o=(P,E,I,C)=>(k,U)=>{const _=i[P],O=l({queryArgs:E,endpointDefinition:_,endpointName:P});if(k(m.internalActions.queryResultPatched({queryCacheKey:O,patches:I})),!C)return;const D=m.endpoints[P].select(E)(U()),N=ir(_.providesTags,D.data,void 0,E,{},f);k(m.internalActions.updateProvidedBy([{queryCacheKey:O,providedTags:N}]))};function a(P,E,I=0){const C=[E,...P];return I&&C.length>I?C.slice(0,-1):C}function u(P,E,I=0){const C=[...P,E];return I&&C.length>I?C.slice(1):C}const c=(P,E,I,C=!0)=>(k,U)=>{const O=m.endpoints[P].select(E)(U()),D={patches:[],inversePatches:[],undo:()=>k(m.util.patchQueryData(P,E,D.inversePatches,C))};if(O.status===qe)return D;let N;if("data"in O)if(An(O.data)){const[Q,L,V]=xs(O.data,I);D.patches.push(...L),D.inversePatches.push(...V),N=Q}else N=I(O.data),D.patches.push({op:"replace",path:[],value:N}),D.inversePatches.push({op:"replace",path:[],value:O.data});return D.patches.length===0||k(m.util.patchQueryData(P,E,D.patches,C)),D},d=(P,E,I)=>C=>C(m.endpoints[P].initiate(E,{subscribe:!1,forceRefetch:!0,[Je]:()=>({data:I})})),g=(P,E)=>P.query&&P[E]?P[E]:Mr,p=async(P,{signal:E,abort:I,rejectWithValue:C,fulfillWithValue:k,dispatch:U,getState:_,extra:O})=>{const D=i[P.endpointName],{metaSchema:N,skipSchemaValidation:Q=r}=D,L=P.type===Ze;try{let V=Mr;const M={signal:E,abort:I,dispatch:U,getState:_,extra:O,endpoint:P.endpointName,type:P.type,forced:L?y(P,_()):void 0,queryCacheKey:L?P.queryCacheKey:void 0},F=L?P[Je]:void 0;let W;const $=async(z,G,Y,xe)=>{if(G==null&&z.pages.length)return Promise.resolve({data:z});const Pe={queryArg:P.originalArgs,pageParam:G},ke=await K(Pe),oe=xe?a:u;return{data:{pages:oe(z.pages,ke.data,Y),pageParams:oe(z.pageParams,G,Y)},meta:ke.meta}};async function K(z){let G;const{extraOptions:Y,argSchema:xe,rawResponseSchema:Pe,responseSchema:ke}=D;if(xe&&!be(Q,"arg")&&(z=await Te(xe,z,"argSchema",{})),F?G=F():D.query?(V=g(D,"transformResponse"),G=await n(D.query(z),M,Y)):G=await D.queryFn(z,M,Y,$e=>n($e,M,Y)),typeof process<"u",G.error)throw new $r(G.error,G.meta);let{data:oe}=G;Pe&&!be(Q,"rawResponse")&&(oe=await Te(Pe,G.data,"rawResponseSchema",G.meta));let we=await V(oe,G.meta,z);return ke&&!be(Q,"response")&&(we=await Te(ke,we,"responseSchema",G.meta)),{...G,data:we}}if(L&&"infiniteQueryOptions"in D){const{infiniteQueryOptions:z}=D,{maxPages:G=1/0}=z;let Y;const xe={pages:[],pageParams:[]},Pe=h.selectQueryEntry(_(),P.queryCacheKey)?.data,oe=y(P,_())&&!P.direction||!Pe?xe:Pe;if("direction"in P&&P.direction&&oe.pages.length){const we=P.direction==="backward",Ct=(we?Fs:Vt)(z,oe,P.originalArgs);Y=await $(oe,Ct,G,we)}else{const{initialPageParam:we=z.initialPageParam}=P,$e=Pe?.pageParams??[],Ct=$e[0]??we,En=$e.length;Y=await $(oe,Ct,G),F&&(Y={data:Y.data.pages[0]});for(let Cr=1;Cr<En;Cr++){const bn=Vt(z,Y.data,P.originalArgs);Y=await $(Y.data,bn,G)}}W=Y}else W=await K(P.originalArgs);return N&&!be(Q,"meta")&&W.meta&&(W.meta=await Te(N,W.meta,"metaSchema",W.meta)),k(W.data,Qe({fulfilledTimeStamp:Date.now(),baseQueryMeta:W.meta}))}catch(V){let M=V;if(M instanceof $r){let F=g(D,"transformErrorResponse");const{rawErrorResponseSchema:W,errorResponseSchema:$}=D;let{value:K,meta:z}=M;try{W&&!be(Q,"rawErrorResponse")&&(K=await Te(W,K,"rawErrorResponseSchema",z)),N&&!be(Q,"meta")&&(z=await Te(N,z,"metaSchema",z));let G=await F(K,z,P.originalArgs);return $&&!be(Q,"errorResponse")&&(G=await Te($,G,"errorResponseSchema",z)),C(G,Qe({baseQueryMeta:z}))}catch(G){M=G}}try{if(M instanceof Ls){const F={endpoint:P.endpointName,arg:P.originalArgs,type:P.type,queryCacheKey:L?P.queryCacheKey:void 0};D.onSchemaFailure?.(M,F),s?.(M,F);const{catchSchemaFailure:W=e}=D;if(W)return C(W(M,F),Qe({baseQueryMeta:M._bqMeta}))}}catch(F){M=F}throw console.error(M),M}};function y(P,E){const I=h.selectQueryEntry(E,P.queryCacheKey),C=h.selectConfig(E).refetchOnMountOrArgChange,k=I?.fulfilledTimeStamp,U=P.forceRefetch??(P.subscribe&&C);return U?U===!0||(Number(new Date)-Number(k))/1e3>=U:!1}const b=()=>Dr(`${t}/executeQuery`,p,{getPendingMeta({arg:E}){const I=i[E.endpointName];return Qe({startedTimeStamp:Date.now(),...Tt(I)?{direction:E.direction}:{}})},condition(E,{getState:I}){const C=I(),k=h.selectQueryEntry(C,E.queryCacheKey),U=k?.fulfilledTimeStamp,_=E.originalArgs,O=k?.originalArgs,D=i[E.endpointName],N=E.direction;return Wt(E)?!0:k?.status==="pending"?!1:y(E,C)||bt(D)&&D?.forceRefetch?.({currentArg:_,previousArg:O,endpointState:k,state:C})?!0:!(U&&!N)},dispatchConditionRejection:!0}),w=b(),q=b(),v=Dr(`${t}/executeMutation`,p,{getPendingMeta(){return Qe({startedTimeStamp:Date.now()})}}),S=P=>"force"in P,A=P=>"ifOlderThan"in P,x=(P,E,I={})=>(C,k)=>{const U=S(I)&&I.force,_=A(I)&&I.ifOlderThan,O=(N=!0)=>{const Q={forceRefetch:N,subscribe:!1};return m.endpoints[P].initiate(E,Q)},D=m.endpoints[P].select(E)(k());if(U)C(O());else if(_){const N=D?.fulfilledTimeStamp;if(!N){C(O());return}(Number(new Date)-Number(new Date(N)))/1e3>=_&&C(O())}else C(O(!1))};function R(P){return E=>E?.meta?.arg?.endpointName===P}function T(P,E){return{matchPending:At(Os(P),R(E)),matchFulfilled:At(Ce(P),R(E)),matchRejected:At(tr(P),R(E))}}return{queryThunk:w,mutationThunk:v,infiniteQueryThunk:q,prefetch:x,updateQueryData:c,upsertQueryData:d,patchQueryData:o,buildMatchThunkActions:T}}function Vt(t,{pages:n,pageParams:i},l){const m=n.length-1;return t.getNextPageParam(n[m],n,i[m],i,l)}function Fs(t,{pages:n,pageParams:i},l){return t.getPreviousPageParam?.(n[0],n,i[0],i,l)}function Gs(t,n,i,l){return ir(i[t.meta.arg.endpointName][n],Ce(t)?t.payload:void 0,rr(t)?t.payload:void 0,t.meta.arg.originalArgs,"baseQueryMeta"in t.meta?t.meta.baseQueryMeta:void 0,l)}function Qr(t){return ks(t)?xn(t):t}function rt(t,n,i){const l=t[n];l&&i(l)}function Ye(t){return("arg"in t?t.arg.fixedCacheKey:t.fixedCacheKey)??t.requestId}function Br(t,n,i){const l=t[Ye(n)];l&&i(l)}var st={};function sa({reducerPath:t,queryThunk:n,mutationThunk:i,serializeQueryArgs:l,context:{endpointDefinitions:m,apiUid:f,extractRehydrationInfo:h,hasRehydrationInfo:s},assertTagType:e,config:r}){const o=je(`${t}/resetApiState`);function a(R,T,P,E){R[T.queryCacheKey]??={status:qe,endpointName:T.endpointName},rt(R,T.queryCacheKey,I=>{I.status=Gt,I.requestId=P&&I.requestId?I.requestId:E.requestId,T.originalArgs!==void 0&&(I.originalArgs=T.originalArgs),I.startedTimeStamp=E.startedTimeStamp;const C=m[E.arg.endpointName];Tt(C)&&"direction"in T&&(I.direction=T.direction)})}function u(R,T,P,E){rt(R,T.arg.queryCacheKey,I=>{if(I.requestId!==T.requestId&&!E)return;const{merge:C}=m[T.arg.endpointName];if(I.status=Ge,C)if(I.data!==void 0){const{fulfilledTimeStamp:k,arg:U,baseQueryMeta:_,requestId:O}=T;let D=er(I.data,N=>C(N,P,{arg:U.originalArgs,baseQueryMeta:_,fulfilledTimeStamp:k,requestId:O}));I.data=D}else I.data=P;else I.data=m[T.arg.endpointName].structuralSharing??!0?sr(ks(I.data)?kn(I.data):I.data,P):P;delete I.error,I.fulfilledTimeStamp=T.fulfilledTimeStamp})}const c=De({name:`${t}/queries`,initialState:st,reducers:{removeQueryResult:{reducer(R,{payload:{queryCacheKey:T}}){delete R[T]},prepare:Me()},cacheEntriesUpserted:{reducer(R,T){for(const P of T.payload){const{queryDescription:E,value:I}=P;a(R,E,!0,{arg:E,requestId:T.meta.requestId,startedTimeStamp:T.meta.timestamp}),u(R,{arg:E,requestId:T.meta.requestId,fulfilledTimeStamp:T.meta.timestamp,baseQueryMeta:{}},I,!0)}},prepare:R=>({payload:R.map(E=>{const{endpointName:I,arg:C,value:k}=E,U=m[I];return{queryDescription:{type:Ze,endpointName:I,originalArgs:E.arg,queryCacheKey:l({queryArgs:C,endpointDefinition:U,endpointName:I})},value:k}}),meta:{[Us]:!0,requestId:_s(),timestamp:Date.now()}})},queryResultPatched:{reducer(R,{payload:{queryCacheKey:T,patches:P}}){rt(R,T,E=>{E.data=xr(E.data,P.concat())})},prepare:Me()}},extraReducers(R){R.addCase(n.pending,(T,{meta:P,meta:{arg:E}})=>{const I=Wt(E);a(T,E,I,P)}).addCase(n.fulfilled,(T,{meta:P,payload:E})=>{const I=Wt(P.arg);u(T,P,E,I)}).addCase(n.rejected,(T,{meta:{condition:P,arg:E,requestId:I},error:C,payload:k})=>{rt(T,E.queryCacheKey,U=>{if(!P){if(U.requestId!==I)return;U.status=He,U.error=k??C}})}).addMatcher(s,(T,P)=>{const{queries:E}=h(P);for(const[I,C]of Object.entries(E))(C?.status===Ge||C?.status===He)&&(T[I]=C)})}}),d=De({name:`${t}/mutations`,initialState:st,reducers:{removeMutationResult:{reducer(R,{payload:T}){const P=Ye(T);P in R&&delete R[P]},prepare:Me()}},extraReducers(R){R.addCase(i.pending,(T,{meta:P,meta:{requestId:E,arg:I,startedTimeStamp:C}})=>{I.track&&(T[Ye(P)]={requestId:E,status:Gt,endpointName:I.endpointName,startedTimeStamp:C})}).addCase(i.fulfilled,(T,{payload:P,meta:E})=>{E.arg.track&&Br(T,E,I=>{I.requestId===E.requestId&&(I.status=Ge,I.data=P,I.fulfilledTimeStamp=E.fulfilledTimeStamp)})}).addCase(i.rejected,(T,{payload:P,error:E,meta:I})=>{I.arg.track&&Br(T,I,C=>{C.requestId===I.requestId&&(C.status=He,C.error=P??E)})}).addMatcher(s,(T,P)=>{const{mutations:E}=h(P);for(const[I,C]of Object.entries(E))(C?.status===Ge||C?.status===He)&&I!==C?.requestId&&(T[I]=C)})}}),g={tags:{},keys:{}},p=De({name:`${t}/invalidation`,initialState:g,reducers:{updateProvidedBy:{reducer(R,T){for(const{queryCacheKey:P,providedTags:E}of T.payload){y(R,P);for(const{type:I,id:C}of E){const k=(R.tags[I]??={})[C||"__internal_without_id"]??=[];k.includes(P)||k.push(P)}R.keys[P]=E}},prepare:Me()}},extraReducers(R){R.addCase(c.actions.removeQueryResult,(T,{payload:{queryCacheKey:P}})=>{y(T,P)}).addMatcher(s,(T,P)=>{const{provided:E}=h(P);for(const[I,C]of Object.entries(E.tags??{}))for(const[k,U]of Object.entries(C)){const _=(T.tags[I]??={})[k||"__internal_without_id"]??=[];for(const O of U)_.includes(O)||_.push(O),T.keys[O]=E.keys[O]}}).addMatcher(ft(Ce(n),rr(n)),(T,P)=>{b(T,[P])}).addMatcher(c.actions.cacheEntriesUpserted.match,(T,P)=>{const E=P.payload.map(({queryDescription:I,value:C})=>({type:"UNKNOWN",payload:C,meta:{requestStatus:"fulfilled",requestId:"UNKNOWN",arg:I}}));b(T,E)})}});function y(R,T){const P=Qr(R.keys[T]??[]);for(const E of P){const I=E.type,C=E.id??"__internal_without_id",k=R.tags[I]?.[C];k&&(R.tags[I][C]=Qr(k).filter(U=>U!==T))}delete R.keys[T]}function b(R,T){const P=T.map(E=>{const I=Gs(E,"providesTags",m,e),{queryCacheKey:C}=E.meta.arg;return{queryCacheKey:C,providedTags:I}});p.caseReducers.updateProvidedBy(R,p.actions.updateProvidedBy(P))}const w=De({name:`${t}/subscriptions`,initialState:st,reducers:{updateSubscriptionOptions(R,T){},unsubscribeQueryResult(R,T){},internal_getRTKQSubscriptions(){}}}),q=De({name:`${t}/internalSubscriptions`,initialState:st,reducers:{subscriptionsUpdated:{reducer(R,T){return xr(R,T.payload)},prepare:Me()}}}),v=De({name:`${t}/config`,initialState:{online:Ln(),focused:Bn(),middlewareRegistered:!1,...r},reducers:{middlewareRegistered(R,{payload:T}){R.middlewareRegistered=R.middlewareRegistered==="conflict"||f!==T?"conflict":!0}},extraReducers:R=>{R.addCase(Et,T=>{T.online=!0}).addCase(or,T=>{T.online=!1}).addCase(St,T=>{T.focused=!0}).addCase(ar,T=>{T.focused=!1}).addMatcher(s,T=>({...T}))}}),S=$n({queries:c.reducer,mutations:d.reducer,provided:p.reducer,subscriptions:q.reducer,config:v.reducer}),A=(R,T)=>S(o.match(T)?void 0:R,T),x={...v.actions,...c.actions,...w.actions,...q.actions,...d.actions,...p.actions,resetApiState:o};return{reducer:A,actions:x}}var se=Symbol.for("RTKQ/skipToken"),Hs={status:qe},Lr=er(Hs,()=>{}),Fr=er(Hs,()=>{});function na({serializeQueryArgs:t,reducerPath:n,createSelector:i}){const l=w=>Lr,m=w=>Fr;return{buildQuerySelector:u,buildInfiniteQuerySelector:c,buildMutationSelector:d,selectInvalidatedBy:g,selectCachedArgsForQuery:p,selectApiState:h,selectQueries:s,selectMutations:r,selectQueryEntry:e,selectConfig:o};function f(w){return{...w,...kr(w.status)}}function h(w){return w[n]}function s(w){return h(w)?.queries}function e(w,q){return s(w)?.[q]}function r(w){return h(w)?.mutations}function o(w){return h(w)?.config}function a(w,q,v){return S=>{if(S===se)return i(l,v);const A=t({queryArgs:S,endpointDefinition:q,endpointName:w});return i(R=>e(R,A)??Lr,v)}}function u(w,q){return a(w,q,f)}function c(w,q){const{infiniteQueryOptions:v}=q;function S(A){const x={...A,...kr(A.status)},{isLoading:R,isError:T,direction:P}=x,E=P==="forward",I=P==="backward";return{...x,hasNextPage:y(v,x.data,x.originalArgs),hasPreviousPage:b(v,x.data,x.originalArgs),isFetchingNextPage:R&&E,isFetchingPreviousPage:R&&I,isFetchNextPageError:T&&E,isFetchPreviousPageError:T&&I}}return a(w,q,S)}function d(){return w=>{let q;return typeof w=="object"?q=Ye(w)??se:q=w,i(q===se?m:A=>h(A)?.mutations?.[q]??Fr,f)}}function g(w,q){const v=w[n],S=new Set,A=Ht(q,nr,Bs);for(const x of A){const R=v.provided.tags[x.type];if(!R)continue;let T=(x.id!==void 0?R[x.id]:Object.values(R).flat())??[];for(const P of T)S.add(P)}return Array.from(S.values()).flatMap(x=>{const R=v.queries[x];return R?{queryCacheKey:x,endpointName:R.endpointName,originalArgs:R.originalArgs}:[]})}function p(w,q){return Ht(Object.values(s(w)),v=>v?.endpointName===q&&v.status!==qe,v=>v.originalArgs)}function y(w,q,v){return q?Vt(w,q,v)!=null:!1}function b(w,q,v){return!q||!w.getPreviousPageParam?!1:Fs(w,q,v)!=null}}const{formatProdErrorMessage:aa,formatProdErrorMessage:Hc,formatProdErrorMessage:zc}=await B("@reduxjs/toolkit");var Gr=WeakMap?new WeakMap:void 0,Hr=({endpointName:t,queryArgs:n})=>{let i="";const l=Gr?.get(n);if(typeof l=="string")i=l;else{const m=JSON.stringify(n,(f,h)=>(h=typeof h=="bigint"?{$bigint:h.toString()}:h,h=Ke(h)?Object.keys(h).sort().reduce((s,e)=>(s[e]=h[e],s),{}):h,h));Ke(n)&&Gr?.set(n,m),i=m}return`${t}(${i})`};function zs(...t){return function(i){const l=Ar(r=>i.extractRehydrationInfo?.(r,{reducerPath:i.reducerPath??"api"})),m={reducerPath:"api",keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1,invalidationBehavior:"delayed",...i,extractRehydrationInfo:l,serializeQueryArgs(r){let o=Hr;if("serializeQueryArgs"in r.endpointDefinition){const a=r.endpointDefinition.serializeQueryArgs;o=u=>{const c=a(u);return typeof c=="string"?c:Hr({...u,queryArgs:c})}}else i.serializeQueryArgs&&(o=i.serializeQueryArgs);return o(r)},tagTypes:[...i.tagTypes||[]]},f={endpointDefinitions:{},batch(r){r()},apiUid:_s(),extractRehydrationInfo:l,hasRehydrationInfo:Ar(r=>l(r)!=null)},h={injectEndpoints:e,enhanceEndpoints({addTagTypes:r,endpoints:o}){if(r)for(const a of r)m.tagTypes.includes(a)||m.tagTypes.push(a);if(o)for(const[a,u]of Object.entries(o))typeof u=="function"?u(Ue(f,a)):Object.assign(Ue(f,a)||{},u);return h}},s=t.map(r=>r.init(h,m,f));function e(r){const o=r.endpoints({query:a=>({...a,type:Ze}),mutation:a=>({...a,type:Ms}),infiniteQuery:a=>({...a,type:Qs})});for(const[a,u]of Object.entries(o)){if(r.overrideExisting!==!0&&a in f.endpointDefinitions){if(r.overrideExisting==="throw")throw new Error(aa(39));continue}f.endpointDefinitions[a]=u;for(const c of s)c.injectEndpoint(a,u)}return h}return h.injectEndpoints({endpoints:i.endpoints})}}const{formatProdErrorMessage:oa}=await B("@reduxjs/toolkit");function Ws(){return function(){throw new Error(oa(33))}}function ge(t,...n){return Object.assign(t,...n)}var ia=({api:t,queryThunk:n,internalState:i,mwApi:l})=>{const m=`${t.reducerPath}/subscriptions`;let f=null,h=null;const{updateSubscriptionOptions:s,unsubscribeQueryResult:e}=t.internalActions,r=(g,p)=>{if(s.match(p)){const{queryCacheKey:b,requestId:w,options:q}=p.payload,v=g.get(b);return v?.has(w)&&v.set(w,q),!0}if(e.match(p)){const{queryCacheKey:b,requestId:w}=p.payload,q=g.get(b);return q&&q.delete(w),!0}if(t.internalActions.removeQueryResult.match(p))return g.delete(p.payload.queryCacheKey),!0;if(n.pending.match(p)){const{meta:{arg:b,requestId:w}}=p,q=gt(g,b.queryCacheKey,zt);return b.subscribe&&q.set(w,b.subscriptionOptions??q.get(w)??{}),!0}let y=!1;if(n.rejected.match(p)){const{meta:{condition:b,arg:w,requestId:q}}=p;if(b&&w.subscribe){const v=gt(g,w.queryCacheKey,zt);v.set(q,w.subscriptionOptions??v.get(q)??{}),y=!0}}return y},o=()=>i.currentSubscriptions,c={getSubscriptions:o,getSubscriptionCount:g=>o().get(g)?.size??0,isRequestSubscribed:(g,p)=>!!o()?.get(g)?.get(p)};function d(g){return JSON.parse(JSON.stringify(Object.fromEntries([...g].map(([p,y])=>[p,Object.fromEntries(y)]))))}return(g,p)=>{if(f||(f=d(i.currentSubscriptions)),t.util.resetApiState.match(g))return f={},i.currentSubscriptions.clear(),h=null,[!0,!1];if(t.internalActions.internal_getRTKQSubscriptions.match(g))return[!1,c];const y=r(i.currentSubscriptions,g);let b=!0;if(y){h||(h=setTimeout(()=>{const v=d(i.currentSubscriptions),[,S]=xs(f,()=>v);p.next(t.internalActions.subscriptionsUpdated(S)),f=v,h=null},500));const w=typeof g.type=="string"&&!!g.type.startsWith(m),q=n.rejected.match(g)&&g.meta.condition&&!!g.meta.arg.subscribe;b=!w&&!q}return[b,!1]}},ca=2147483647/1e3-1,ua=({reducerPath:t,api:n,queryThunk:i,context:l,internalState:m,selectors:{selectQueryEntry:f,selectConfig:h},getRunningQueryThunk:s,mwApi:e})=>{const{removeQueryResult:r,unsubscribeQueryResult:o,cacheEntriesUpserted:a}=n.internalActions,u=ft(o.match,i.fulfilled,i.rejected,a.match);function c(w){const q=m.currentSubscriptions.get(w);return q?q.size>0:!1}const d={};function g(w){for(const q of w.values())q?.abort?.()}const p=(w,q)=>{const v=q.getState(),S=h(v);if(u(w)){let A;if(a.match(w))A=w.payload.map(x=>x.queryDescription.queryCacheKey);else{const{queryCacheKey:x}=o.match(w)?w.payload:w.meta.arg;A=[x]}y(A,q,S)}if(n.util.resetApiState.match(w)){for(const[A,x]of Object.entries(d))x&&clearTimeout(x),delete d[A];g(m.runningQueries),g(m.runningMutations)}if(l.hasRehydrationInfo(w)){const{queries:A}=l.extractRehydrationInfo(w);y(Object.keys(A),q,S)}};function y(w,q,v){const S=q.getState();for(const A of w){const x=f(S,A);x?.endpointName&&b(A,x.endpointName,q,v)}}function b(w,q,v,S){const x=Ue(l,q)?.keepUnusedDataFor??S.keepUnusedDataFor;if(x===1/0)return;const R=Math.max(0,Math.min(x,ca));if(!c(w)){const T=d[w];T&&clearTimeout(T),d[w]=setTimeout(()=>{if(!c(w)){const P=f(v.getState(),w);P?.endpointName&&v.dispatch(s(P.endpointName,P.originalArgs))?.abort(),v.dispatch(r({queryCacheKey:w}))}delete d[w]},R*1e3)}}return p},zr=new Error("Promise never resolved before cacheEntryRemoved."),la=({api:t,reducerPath:n,context:i,queryThunk:l,mutationThunk:m,internalState:f,selectors:{selectQueryEntry:h,selectApiState:s}})=>{const e=Or(l),r=Or(m),o=Ce(l,m),a={},{removeQueryResult:u,removeMutationResult:c,cacheEntriesUpserted:d}=t.internalActions;function g(v,S,A){const x=a[v];x?.valueResolved&&(x.valueResolved({data:S,meta:A}),delete x.valueResolved)}function p(v){const S=a[v];S&&(delete a[v],S.cacheEntryRemoved())}function y(v){const{arg:S,requestId:A}=v.meta,{endpointName:x,originalArgs:R}=S;return[x,R,A]}const b=(v,S,A)=>{const x=w(v);function R(T,P,E,I){const C=h(A,P),k=h(S.getState(),P);!C&&k&&q(T,I,P,S,E)}if(l.pending.match(v)){const[T,P,E]=y(v);R(T,x,E,P)}else if(d.match(v))for(const{queryDescription:T,value:P}of v.payload){const{endpointName:E,originalArgs:I,queryCacheKey:C}=T;R(E,C,v.meta.requestId,I),g(C,P,{})}else if(m.pending.match(v)){if(S.getState()[n].mutations[x]){const[P,E,I]=y(v);q(P,E,x,S,I)}}else if(o(v))g(x,v.payload,v.meta.baseQueryMeta);else if(u.match(v)||c.match(v))p(x);else if(t.util.resetApiState.match(v))for(const T of Object.keys(a))p(T)};function w(v){return e(v)?v.meta.arg.queryCacheKey:r(v)?v.meta.arg.fixedCacheKey??v.meta.requestId:u.match(v)?v.payload.queryCacheKey:c.match(v)?Ye(v.payload):""}function q(v,S,A,x,R){const T=Ue(i,v),P=T?.onCacheEntryAdded;if(!P)return;const E={},I=new Promise(D=>{E.cacheEntryRemoved=D}),C=Promise.race([new Promise(D=>{E.valueResolved=D}),I.then(()=>{throw zr})]);C.catch(()=>{}),a[A]=E;const k=t.endpoints[v].select(pt(T)?S:A),U=x.dispatch((D,N,Q)=>Q),_={...x,getCacheEntry:()=>k(x.getState()),requestId:R,extra:U,updateCachedData:pt(T)?D=>x.dispatch(t.util.updateQueryData(v,S,D)):void 0,cacheDataLoaded:C,cacheEntryRemoved:I},O=P(S,_);Promise.resolve(O).catch(D=>{if(D!==zr)throw D})}return b},da=({api:t,context:{apiUid:n},reducerPath:i})=>(l,m)=>{t.util.resetApiState.match(l)&&m.dispatch(t.internalActions.middlewareRegistered(n))},ha=({reducerPath:t,context:n,context:{endpointDefinitions:i},mutationThunk:l,queryThunk:m,api:f,assertTagType:h,refetchQuery:s,internalState:e})=>{const{removeQueryResult:r}=f.internalActions,o=ft(Ce(l),rr(l)),a=ft(Ce(m,l),tr(m,l));let u=[],c=0;const d=(y,b)=>{(m.pending.match(y)||l.pending.match(y))&&c++,a(y)&&(c=Math.max(0,c-1)),o(y)?p(Gs(y,"invalidatesTags",i,h),b):a(y)?p([],b):f.util.invalidateTags.match(y)&&p(ir(y.payload,void 0,void 0,void 0,void 0,h),b)};function g(){return c>0}function p(y,b){const w=b.getState(),q=w[t];if(u.push(...y),q.config.invalidationBehavior==="delayed"&&g())return;const v=u;if(u=[],v.length===0)return;const S=f.util.selectInvalidatedBy(w,v);n.batch(()=>{const A=Array.from(S.values());for(const{queryCacheKey:x}of A){const R=q.queries[x],T=gt(e.currentSubscriptions,x,zt);R&&(T.size===0?b.dispatch(r({queryCacheKey:x})):R.status!==qe&&b.dispatch(s(R)))}})}return d},ma=({reducerPath:t,queryThunk:n,api:i,refetchQuery:l,internalState:m})=>{const{currentPolls:f,currentSubscriptions:h}=m,s=new Set;let e=null;const r=(p,y)=>{(i.internalActions.updateSubscriptionOptions.match(p)||i.internalActions.unsubscribeQueryResult.match(p))&&o(p.payload.queryCacheKey,y),(n.pending.match(p)||n.rejected.match(p)&&p.meta.condition)&&o(p.meta.arg.queryCacheKey,y),(n.fulfilled.match(p)||n.rejected.match(p)&&!p.meta.condition)&&a(p.meta.arg,y),i.util.resetApiState.match(p)&&(d(),e&&(clearTimeout(e),e=null),s.clear())};function o(p,y){s.add(p),e||(e=setTimeout(()=>{for(const b of s)u({queryCacheKey:b},y);s.clear(),e=null},0))}function a({queryCacheKey:p},y){const b=y.getState()[t],w=b.queries[p],q=h.get(p);if(!w||w.status===qe)return;const{lowestPollingInterval:v,skipPollingIfUnfocused:S}=g(q);if(!Number.isFinite(v))return;const A=f.get(p);A?.timeout&&(clearTimeout(A.timeout),A.timeout=void 0);const x=Date.now()+v;f.set(p,{nextPollTimestamp:x,pollingInterval:v,timeout:setTimeout(()=>{(b.config.focused||!S)&&y.dispatch(l(w)),a({queryCacheKey:p},y)},v)})}function u({queryCacheKey:p},y){const w=y.getState()[t].queries[p],q=h.get(p);if(!w||w.status===qe)return;const{lowestPollingInterval:v}=g(q);if(!Number.isFinite(v)){c(p);return}const S=f.get(p),A=Date.now()+v;(!S||A<S.nextPollTimestamp)&&a({queryCacheKey:p},y)}function c(p){const y=f.get(p);y?.timeout&&clearTimeout(y.timeout),f.delete(p)}function d(){for(const p of f.keys())c(p)}function g(p=new Map){let y=!1,b=Number.POSITIVE_INFINITY;for(const w of p.values())w.pollingInterval&&(b=Math.min(w.pollingInterval,b),y=w.skipPollingIfUnfocused||y);return{lowestPollingInterval:b,skipPollingIfUnfocused:y}}return r},fa=({api:t,context:n,queryThunk:i,mutationThunk:l})=>{const m=Os(i,l),f=tr(i,l),h=Ce(i,l),s={};return(r,o)=>{if(m(r)){const{requestId:a,arg:{endpointName:u,originalArgs:c}}=r.meta,d=Ue(n,u),g=d?.onQueryStarted;if(g){const p={},y=new Promise((v,S)=>{p.resolve=v,p.reject=S});y.catch(()=>{}),s[a]=p;const b=t.endpoints[u].select(pt(d)?c:a),w=o.dispatch((v,S,A)=>A),q={...o,getCacheEntry:()=>b(o.getState()),requestId:a,extra:w,updateCachedData:pt(d)?v=>o.dispatch(t.util.updateQueryData(u,c,v)):void 0,queryFulfilled:y};g(c,q)}}else if(h(r)){const{requestId:a,baseQueryMeta:u}=r.meta;s[a]?.resolve({data:r.payload,meta:u}),delete s[a]}else if(f(r)){const{requestId:a,rejectedWithValue:u,baseQueryMeta:c}=r.meta;s[a]?.reject({error:r.payload??r.error,isUnhandledError:!u,meta:c}),delete s[a]}}},ga=({reducerPath:t,context:n,api:i,refetchQuery:l,internalState:m})=>{const{removeQueryResult:f}=i.internalActions,h=(e,r)=>{St.match(e)&&s(r,"refetchOnFocus"),Et.match(e)&&s(r,"refetchOnReconnect")};function s(e,r){const o=e.getState()[t],a=o.queries,u=m.currentSubscriptions;n.batch(()=>{for(const c of u.keys()){const d=a[c],g=u.get(c);if(!g||!d)continue;const p=[...g.values()];(p.some(b=>b[r]===!0)||p.every(b=>b[r]===void 0)&&o.config[r])&&(g.size===0?e.dispatch(f({queryCacheKey:c})):d.status!==qe&&e.dispatch(l(d)))}})}return h};function pa(t){const{reducerPath:n,queryThunk:i,api:l,context:m,getInternalState:f}=t,{apiUid:h}=m,s={invalidateTags:je(`${n}/invalidateTags`)},e=u=>u.type.startsWith(`${n}/`),r=[da,ua,ha,ma,la,fa];return{middleware:u=>{let c=!1;const d=f(u.dispatch),g={...t,internalState:d,refetchQuery:a,isThisApiSliceAction:e,mwApi:u},p=r.map(w=>w(g)),y=ia(g),b=ga(g);return w=>q=>{if(!Mn(q))return w(q);c||(c=!0,u.dispatch(l.internalActions.middlewareRegistered(h)));const v={...u,next:w},S=u.getState(),[A,x]=y(q,v,S);let R;if(A?R=w(q):R=x,u.getState()[n]&&(b(q,v,S),e(q)||m.hasRehydrationInfo(q)))for(const T of p)T(q,v,S);return R}},actions:s};function a(u){return t.api.endpoints[u.endpointName].initiate(u.originalArgs,{subscribe:!1,forceRefetch:!0})}}var Wr=Symbol(),Vs=({createSelector:t=Nn}={})=>({name:Wr,init(n,{baseQuery:i,tagTypes:l,reducerPath:m,serializeQueryArgs:f,keepUnusedDataFor:h,refetchOnMountOrArgChange:s,refetchOnFocus:e,refetchOnReconnect:r,invalidationBehavior:o,onSchemaFailure:a,catchSchemaFailure:u,skipSchemaValidation:c},d){Cn();const g=$=>$;Object.assign(n,{reducerPath:m,endpoints:{},internalActions:{onOnline:Et,onOffline:or,onFocus:St,onFocusLost:ar},util:{}});const p=na({serializeQueryArgs:f,reducerPath:m,createSelector:t}),{selectInvalidatedBy:y,selectCachedArgsForQuery:b,buildQuerySelector:w,buildInfiniteQuerySelector:q,buildMutationSelector:v}=p;ge(n.util,{selectInvalidatedBy:y,selectCachedArgsForQuery:b});const{queryThunk:S,infiniteQueryThunk:A,mutationThunk:x,patchQueryData:R,updateQueryData:T,upsertQueryData:P,prefetch:E,buildMatchThunkActions:I}=ra({baseQuery:i,reducerPath:m,context:d,api:n,serializeQueryArgs:f,assertTagType:g,selectors:p,onSchemaFailure:a,catchSchemaFailure:u,skipSchemaValidation:c}),{reducer:C,actions:k}=sa({context:d,queryThunk:S,mutationThunk:x,serializeQueryArgs:f,reducerPath:m,assertTagType:g,config:{refetchOnFocus:e,refetchOnReconnect:r,refetchOnMountOrArgChange:s,keepUnusedDataFor:h,reducerPath:m,invalidationBehavior:o}});ge(n.util,{patchQueryData:R,updateQueryData:T,upsertQueryData:P,prefetch:E,resetApiState:k.resetApiState,upsertQueryEntries:k.cacheEntriesUpserted}),ge(n.internalActions,k);const U=new WeakMap,_=$=>gt(U,$,()=>({currentSubscriptions:new Map,currentPolls:new Map,runningQueries:new Map,runningMutations:new Map})),{buildInitiateQuery:O,buildInitiateInfiniteQuery:D,buildInitiateMutation:N,getRunningMutationThunk:Q,getRunningMutationsThunk:L,getRunningQueriesThunk:V,getRunningQueryThunk:M}=ta({queryThunk:S,mutationThunk:x,infiniteQueryThunk:A,api:n,serializeQueryArgs:f,context:d,getInternalState:_});ge(n.util,{getRunningMutationThunk:Q,getRunningMutationsThunk:L,getRunningQueryThunk:M,getRunningQueriesThunk:V});const{middleware:F,actions:W}=pa({reducerPath:m,context:d,queryThunk:S,mutationThunk:x,infiniteQueryThunk:A,api:n,assertTagType:g,selectors:p,getRunningQueryThunk:M,getInternalState:_});return ge(n.util,W),ge(n,{reducer:C,middleware:F}),{name:Wr,injectEndpoint($,K){const z=n,G=z.endpoints[$]??={};bt(K)&&ge(G,{name:$,select:w($,K),initiate:O($,K)},I(S,$)),Xn(K)&&ge(G,{name:$,select:v(),initiate:N($)},I(x,$)),Tt(K)&&ge(G,{name:$,select:q($,K),initiate:D($,K)},I(S,$))}}}});Vs();var cr="persist:",ur="persist/FLUSH",It="persist/REHYDRATE",lr="persist/PAUSE",dr="persist/PERSIST",hr="persist/PURGE",mr="persist/REGISTER",qa=-1;function dt(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?dt=function(i){return typeof i}:dt=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},dt(t)}function Vr(t,n){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);n&&(l=l.filter(function(m){return Object.getOwnPropertyDescriptor(t,m).enumerable})),i.push.apply(i,l)}return i}function Pa(t){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};n%2?Vr(i,!0).forEach(function(l){wa(t,l,i[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Vr(i).forEach(function(l){Object.defineProperty(t,l,Object.getOwnPropertyDescriptor(i,l))})}return t}function wa(t,n,i){return n in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}function ya(t,n,i,l){l.debug;var m=Pa({},i);return t&&dt(t)==="object"&&Object.keys(t).forEach(function(f){f!=="_persist"&&n[f]===i[f]&&(m[f]=t[f])}),m}function va(t){var n=t.blacklist||null,i=t.whitelist||null,l=t.transforms||[],m=t.throttle||0,f="".concat(t.keyPrefix!==void 0?t.keyPrefix:cr).concat(t.key),h=t.storage,s;t.serialize===!1?s=function(v){return v}:typeof t.serialize=="function"?s=t.serialize:s=Sa;var e=t.writeFailHandler||null,r={},o={},a=[],u=null,c=null,d=function(v){Object.keys(v).forEach(function(S){y(S)&&r[S]!==v[S]&&a.indexOf(S)===-1&&a.push(S)}),Object.keys(r).forEach(function(S){v[S]===void 0&&y(S)&&a.indexOf(S)===-1&&r[S]!==void 0&&a.push(S)}),u===null&&(u=setInterval(g,m)),r=v};function g(){if(a.length===0){u&&clearInterval(u),u=null;return}var q=a.shift(),v=l.reduce(function(S,A){return A.in(S,q,r)},r[q]);if(v!==void 0)try{o[q]=s(v)}catch(S){console.error("redux-persist/createPersistoid: error serializing state",S)}else delete o[q];a.length===0&&p()}function p(){Object.keys(o).forEach(function(q){r[q]===void 0&&delete o[q]}),c=h.setItem(f,s(o)).catch(b)}function y(q){return!(i&&i.indexOf(q)===-1&&q!=="_persist"||n&&n.indexOf(q)!==-1)}function b(q){e&&e(q)}var w=function(){for(;a.length!==0;)g();return c||Promise.resolve()};return{update:d,flush:w}}function Sa(t){return JSON.stringify(t)}function Ea(t){var n=t.transforms||[],i="".concat(t.keyPrefix!==void 0?t.keyPrefix:cr).concat(t.key),l=t.storage;t.debug;var m;return t.deserialize===!1?m=function(h){return h}:typeof t.deserialize=="function"?m=t.deserialize:m=ba,l.getItem(i).then(function(f){if(f)try{var h={},s=m(f);return Object.keys(s).forEach(function(e){h[e]=n.reduceRight(function(r,o){return o.out(r,e,s)},m(s[e]))}),h}catch(e){throw e}else return})}function ba(t){return JSON.parse(t)}function Ta(t){var n=t.storage,i="".concat(t.keyPrefix!==void 0?t.keyPrefix:cr).concat(t.key);return n.removeItem(i,Ia)}function Ia(t){}function Kr(t,n){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);n&&(l=l.filter(function(m){return Object.getOwnPropertyDescriptor(t,m).enumerable})),i.push.apply(i,l)}return i}function pe(t){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};n%2?Kr(i,!0).forEach(function(l){Ra(t,l,i[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Kr(i).forEach(function(l){Object.defineProperty(t,l,Object.getOwnPropertyDescriptor(i,l))})}return t}function Ra(t,n,i){return n in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}function Ca(t,n){if(t==null)return{};var i=Aa(t,n),l,m;if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(t);for(m=0;m<f.length;m++)l=f[m],!(n.indexOf(l)>=0)&&Object.prototype.propertyIsEnumerable.call(t,l)&&(i[l]=t[l])}return i}function Aa(t,n){if(t==null)return{};var i={},l=Object.keys(t),m,f;for(f=0;f<l.length;f++)m=l[f],!(n.indexOf(m)>=0)&&(i[m]=t[m]);return i}var xa=5e3;function ka(t,n){var i=t.version!==void 0?t.version:qa;t.debug;var l=t.stateReconciler===void 0?ya:t.stateReconciler,m=t.getStoredState||Ea,f=t.timeout!==void 0?t.timeout:xa,h=null,s=!1,e=!0,r=function(a){return a._persist.rehydrated&&h&&!e&&h.update(a),a};return function(o,a){var u=o||{},c=u._persist,d=Ca(u,["_persist"]),g=d;if(a.type===dr){var p=!1,y=function(x,R){p||(a.rehydrate(t.key,x,R),p=!0)};if(f&&setTimeout(function(){!p&&y(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(t.key,'"')))},f),e=!1,h||(h=va(t)),c)return pe({},n(g,a),{_persist:c});if(typeof a.rehydrate!="function"||typeof a.register!="function")throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return a.register(t.key),m(t).then(function(A){var x=t.migrate||function(R,T){return Promise.resolve(R)};x(A,i).then(function(R){y(R)},function(R){y(void 0,R)})},function(A){y(void 0,A)}),pe({},n(g,a),{_persist:{version:i,rehydrated:!1}})}else{if(a.type===hr)return s=!0,a.result(Ta(t)),pe({},n(g,a),{_persist:c});if(a.type===ur)return a.result(h&&h.flush()),pe({},n(g,a),{_persist:c});if(a.type===lr)e=!0;else if(a.type===It){if(s)return pe({},g,{_persist:pe({},c,{rehydrated:!0})});if(a.key===t.key){var b=n(g,a),w=a.payload,q=l!==!1&&w!==void 0?l(w,o,b,t):b,v=pe({},q,{_persist:pe({},c,{rehydrated:!0})});return r(v)}}}if(!c)return n(o,a);var S=n(g,a);return S===g?o:r(pe({},S,{_persist:c}))}}function Jr(t){return Ua(t)||Oa(t)||Da()}function Da(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function Oa(t){if(Symbol.iterator in Object(t)||Object.prototype.toString.call(t)==="[object Arguments]")return Array.from(t)}function Ua(t){if(Array.isArray(t)){for(var n=0,i=new Array(t.length);n<t.length;n++)i[n]=t[n];return i}}function Yr(t,n){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);n&&(l=l.filter(function(m){return Object.getOwnPropertyDescriptor(t,m).enumerable})),i.push.apply(i,l)}return i}function Kt(t){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};n%2?Yr(i,!0).forEach(function(l){_a(t,l,i[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Yr(i).forEach(function(l){Object.defineProperty(t,l,Object.getOwnPropertyDescriptor(i,l))})}return t}function _a(t,n,i){return n in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}var Ks={registry:[],bootstrapped:!1},ja=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ks,i=arguments.length>1?arguments[1]:void 0;switch(i.type){case mr:return Kt({},n,{registry:[].concat(Jr(n.registry),[i.key])});case It:var l=n.registry.indexOf(i.key),m=Jr(n.registry);return m.splice(l,1),Kt({},n,{registry:m,bootstrapped:m.length===0});default:return n}};function Na(t,n,i){var l=Dn(ja,Ks,void 0),m=function(e){l.dispatch({type:mr,key:e})},f=function(e,r,o){var a={type:It,payload:r,err:o,key:e};t.dispatch(a),l.dispatch(a)},h=Kt({},l,{purge:function(){var e=[];return t.dispatch({type:hr,result:function(o){e.push(o)}}),Promise.all(e)},flush:function(){var e=[];return t.dispatch({type:ur,result:function(o){e.push(o)}}),Promise.all(e)},pause:function(){t.dispatch({type:lr})},persist:function(){t.dispatch({type:dr,register:m,rehydrate:f})}});return h.persist(),h}var fr={},gr={};gr.__esModule=!0;gr.default=Qa;function ht(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ht=function(i){return typeof i}:ht=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},ht(t)}function xt(){}var $a={getItem:xt,setItem:xt,removeItem:xt};function Ma(t){if((typeof self>"u"?"undefined":ht(self))!=="object"||!(t in self))return!1;try{var n=self[t],i="redux-persist ".concat(t," test");n.setItem(i,"test"),n.getItem(i),n.removeItem(i)}catch{return!1}return!0}function Qa(t){var n="".concat(t,"Storage");return Ma(n)?self[n]:$a}fr.__esModule=!0;fr.default=Fa;var Ba=La(gr);function La(t){return t&&t.__esModule?t:{default:t}}function Fa(t){var n=(0,Ba.default)(t);return{getItem:function(l){return new Promise(function(m,f){m(n.getItem(l))})},setItem:function(l,m){return new Promise(function(f,h){f(n.setItem(l,m))})},removeItem:function(l){return new Promise(function(m,f){m(n.removeItem(l))})}}}var Js=void 0,Ga=Ha(fr);function Ha(t){return t&&t.__esModule?t:{default:t}}var za=(0,Ga.default)("local");Js=za;const{createEntityAdapter:Wa,createSlice:Va}=await B("@reduxjs/toolkit"),ze=Wa(),Ka=ze.getInitialState(),Ys=Va({name:"blog",initialState:Ka,reducers:{postUpserted:(t,n)=>ze.upsertOne(t,n),postsUpserted:(t,n)=>ze.upsertMany(t,n),postsClear:t=>ze.removeAll(t)}}),{postUpserted:Wc,postsUpserted:kt,postsClear:Vc}=Ys.actions,Ja=Ys.reducer;ze.getSelectors();const{formatProdErrorMessage:Kc}=await B("@reduxjs/toolkit"),{batch:Ya,useDispatch:Xa,useSelector:Za,useStore:eo}=await B("react-redux");function nt(t){return t.replace(t[0],t[0].toUpperCase())}var to="query",ro="mutation",so="infinitequery";function no(t){return t.type===to}function ao(t){return t.type===ro}function Xs(t){return t.type===so}function Be(t,...n){return Object.assign(t,...n)}const{formatProdErrorMessage:Jc,formatProdErrorMessage:oo}=await B("@reduxjs/toolkit"),{useEffect:Se,useRef:ve,useMemo:X,useContext:Yc,useCallback:Ie,useDebugValue:Dt,useLayoutEffect:io,useState:Xr}=await B("react"),{shallowEqual:We,Provider:Xc,ReactReduxContext:Zc}=await B("react-redux");var Ot=Symbol();function Ut(t){const n=ve(t),i=X(()=>sr(n.current,t),[t]);return Se(()=>{n.current!==i&&(n.current=i)},[i]),i}function at(t){const n=ve(t);return Se(()=>{We(n.current,t)||(n.current=t)},[t]),We(n.current,t)?n.current:t}var co=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",uo=co(),lo=()=>typeof navigator<"u"&&navigator.product==="ReactNative",ho=lo(),mo=()=>uo||ho?io:Se,fo=mo(),Zr=t=>t.isUninitialized?{...t,isUninitialized:!1,isFetching:!0,isLoading:t.data===void 0,status:Ds.pending}:t;function _t(t,...n){const i={};return n.forEach(l=>{i[l]=t[l]}),i}var jt=["data","status","isLoading","isSuccess","isError","error"];function go({api:t,moduleOptions:{batch:n,hooks:{useDispatch:i,useSelector:l,useStore:m},unstable__sideEffectsInRender:f,createSelector:h},serializeQueryArgs:s,context:e}){const r=f?S=>S():Se,o=S=>S.current?.unsubscribe?.(),a=e.endpointDefinitions;return{buildQueryHooks:w,buildInfiniteQueryHooks:q,buildMutationHook:v,usePrefetch:d};function u(S,A,x){if(A?.endpointName&&S.isUninitialized){const{endpointName:C}=A,k=a[C];x!==se&&s({queryArgs:A.originalArgs,endpointDefinition:k,endpointName:C})===s({queryArgs:x,endpointDefinition:k,endpointName:C})&&(A=void 0)}let R=S.isSuccess?S.data:A?.data;R===void 0&&(R=S.data);const T=R!==void 0,P=S.isLoading,E=(!A||A.isLoading||A.isUninitialized)&&!T&&P,I=S.isSuccess||T&&(P&&!A?.isError||S.isUninitialized);return{...S,data:R,currentData:S.data,isFetching:P,isLoading:E,isSuccess:I}}function c(S,A,x){if(A?.endpointName&&S.isUninitialized){const{endpointName:C}=A,k=a[C];x!==se&&s({queryArgs:A.originalArgs,endpointDefinition:k,endpointName:C})===s({queryArgs:x,endpointDefinition:k,endpointName:C})&&(A=void 0)}let R=S.isSuccess?S.data:A?.data;R===void 0&&(R=S.data);const T=R!==void 0,P=S.isLoading,E=(!A||A.isLoading||A.isUninitialized)&&!T&&P,I=S.isSuccess||P&&T;return{...S,data:R,currentData:S.data,isFetching:P,isLoading:E,isSuccess:I}}function d(S,A){const x=i(),R=at(A);return Ie((T,P)=>x(t.util.prefetch(S,T,{...R,...P})),[S,x,R])}function g(S,A,{refetchOnReconnect:x,refetchOnFocus:R,refetchOnMountOrArgChange:T,skip:P=!1,pollingInterval:E=0,skipPollingIfUnfocused:I=!1,...C}={}){const{initiate:k}=t.endpoints[S],U=i(),_=ve(void 0);if(!_.current){const $=U(t.internalActions.internal_getRTKQSubscriptions());_.current=$}const O=Ut(P?se:A),D=at({refetchOnReconnect:x,refetchOnFocus:R,pollingInterval:E,skipPollingIfUnfocused:I}),N=C.initialPageParam,Q=at(N),L=ve(void 0);let{queryCacheKey:V,requestId:M}=L.current||{},F=!1;V&&M&&(F=_.current.isRequestSubscribed(V,M));const W=!F&&L.current!==void 0;return r(()=>{W&&(L.current=void 0)},[W]),r(()=>{const $=L.current;if(O===se){$?.unsubscribe(),L.current=void 0;return}const K=L.current?.subscriptionOptions;if(!$||$.arg!==O){$?.unsubscribe();const z=U(k(O,{subscriptionOptions:D,forceRefetch:T,...Xs(a[S])?{initialPageParam:Q}:{}}));L.current=z}else D!==K&&$.updateSubscriptionOptions(D)},[U,k,T,O,D,W,Q,S]),[L,U,k,D]}function p(S,A){return(R,{skip:T=!1,selectFromResult:P}={})=>{const{select:E}=t.endpoints[S],I=Ut(T?se:R),C=ve(void 0),k=X(()=>h([E(I),(N,Q)=>Q,N=>I],A,{memoizeOptions:{resultEqualityCheck:We}}),[E,I]),U=X(()=>P?h([k],P,{devModeChecks:{identityFunctionCheck:"never"}}):k,[k,P]),_=l(N=>U(N,C.current),We),O=m(),D=k(O.getState(),C.current);return fo(()=>{C.current=D},[D]),_}}function y(S){Se(()=>()=>{o(S),S.current=void 0},[S])}function b(S){if(!S.current)throw new Error(oo(38));return S.current.refetch()}function w(S){const A=(T,P={})=>{const[E]=g(S,T,P);return y(E),X(()=>({refetch:()=>b(E)}),[E])},x=({refetchOnReconnect:T,refetchOnFocus:P,pollingInterval:E=0,skipPollingIfUnfocused:I=!1}={})=>{const{initiate:C}=t.endpoints[S],k=i(),[U,_]=Xr(Ot),O=ve(void 0),D=at({refetchOnReconnect:T,refetchOnFocus:P,pollingInterval:E,skipPollingIfUnfocused:I});r(()=>{const V=O.current?.subscriptionOptions;D!==V&&O.current?.updateSubscriptionOptions(D)},[D]);const N=ve(D);r(()=>{N.current=D},[D]);const Q=Ie(function(V,M=!1){let F;return n(()=>{o(O),O.current=F=k(C(V,{subscriptionOptions:N.current,forceRefetch:!M})),_(V)}),F},[k,C]),L=Ie(()=>{O.current?.queryCacheKey&&k(t.internalActions.removeQueryResult({queryCacheKey:O.current?.queryCacheKey}))},[k]);return Se(()=>()=>{o(O)},[]),Se(()=>{U!==Ot&&!O.current&&Q(U,!0)},[U,Q]),X(()=>[Q,U,{reset:L}],[Q,U,L])},R=p(S,u);return{useQueryState:R,useQuerySubscription:A,useLazyQuerySubscription:x,useLazyQuery(T){const[P,E,{reset:I}]=x(T),C=R(E,{...T,skip:E===Ot}),k=X(()=>({lastArg:E}),[E]);return X(()=>[P,{...C,reset:I},k],[P,C,I,k])},useQuery(T,P){const E=A(T,P),I=R(T,{selectFromResult:T===se||P?.skip?void 0:Zr,...P}),C=_t(I,...jt);return Dt(C),X(()=>({...I,...E}),[I,E])}}}function q(S){const A=(R,T={})=>{const[P,E,I,C]=g(S,R,T),k=ve(C);r(()=>{k.current=C},[C]);const U=Ie(function(D,N){let Q;return n(()=>{o(P),P.current=Q=E(I(D,{subscriptionOptions:k.current,direction:N}))}),Q},[P,E,I]);y(P);const _=Ut(T.skip?se:R),O=Ie(()=>b(P),[P]);return X(()=>({trigger:U,refetch:O,fetchNextPage:()=>U(_,"forward"),fetchPreviousPage:()=>U(_,"backward")}),[O,U,_])},x=p(S,c);return{useInfiniteQueryState:x,useInfiniteQuerySubscription:A,useInfiniteQuery(R,T){const{refetch:P,fetchNextPage:E,fetchPreviousPage:I}=A(R,T),C=x(R,{selectFromResult:R===se||T?.skip?void 0:Zr,...T}),k=_t(C,...jt,"hasNextPage","hasPreviousPage");return Dt(k),X(()=>({...C,fetchNextPage:E,fetchPreviousPage:I,refetch:P}),[C,E,I,P])}}}function v(S){return({selectFromResult:A,fixedCacheKey:x}={})=>{const{select:R,initiate:T}=t.endpoints[S],P=i(),[E,I]=Xr();Se(()=>()=>{E?.arg.fixedCacheKey||E?.reset()},[E]);const C=Ie(function(V){const M=P(T(V,{fixedCacheKey:x}));return I(M),M},[P,T,x]),{requestId:k}=E||{},U=X(()=>R({fixedCacheKey:x,requestId:E?.requestId}),[x,E,R]),_=X(()=>A?h([U],A):U,[A,U]),O=l(_,We),D=x==null?E?.arg.originalArgs:void 0,N=Ie(()=>{n(()=>{E&&I(void 0),x&&P(t.internalActions.removeMutationResult({requestId:k,fixedCacheKey:x}))})},[P,x,E,k]),Q=_t(O,...jt,"endpointName");Dt(Q);const L=X(()=>({...O,originalArgs:D,reset:N}),[O,D,N]);return X(()=>[C,L],[C,L])}}}var po=Symbol(),qo=({batch:t=Ya,hooks:n={useDispatch:Xa,useSelector:Za,useStore:eo},createSelector:i=On,unstable__sideEffectsInRender:l=!1,...m}={})=>({name:po,init(f,{serializeQueryArgs:h},s){const e=f,{buildQueryHooks:r,buildInfiniteQueryHooks:o,buildMutationHook:a,usePrefetch:u}=go({api:f,moduleOptions:{batch:t,hooks:n,unstable__sideEffectsInRender:l,createSelector:i},serializeQueryArgs:h,context:s});return Be(e,{usePrefetch:u}),Be(s,{batch:t}),{injectEndpoint(c,d){if(no(d)){const{useQuery:g,useLazyQuery:p,useLazyQuerySubscription:y,useQueryState:b,useQuerySubscription:w}=r(c);Be(e.endpoints[c],{useQuery:g,useLazyQuery:p,useLazyQuerySubscription:y,useQueryState:b,useQuerySubscription:w}),f[`use${nt(c)}Query`]=g,f[`useLazy${nt(c)}Query`]=p}if(ao(d)){const g=a(c);Be(e.endpoints[c],{useMutation:g}),f[`use${nt(c)}Mutation`]=g}else if(Xs(d)){const{useInfiniteQuery:g,useInfiniteQuerySubscription:p,useInfiniteQueryState:y}=o(c);Be(e.endpoints[c],{useInfiniteQuery:g,useInfiniteQuerySubscription:p,useInfiniteQueryState:y}),f[`use${nt(c)}InfiniteQuery`]=g}}}}});const{configureStore:eu,formatProdErrorMessage:tu}=await B("@reduxjs/toolkit");await B("react");var pr=zs(Vs(),qo());const Po=Ee("PEER_URL");async function wo(t){try{const n=await fetch(`${Po}/lambdas/profiles/${t.toLowerCase()}`);if(!n.ok)return null;const i=await n.json();return Array.isArray(i)?i[0]:i}catch{return null}}const qt=pr({reducerPath:"profileClient",baseQuery:Ws(),tagTypes:["Profile"],keepUnusedDataFor:300,refetchOnFocus:!1,refetchOnReconnect:!1,endpoints:t=>({getProfile:t.query({queryFn:async n=>{if(!n)return{data:null};try{return{data:await wo(n)}}catch{return{data:null}}},providesTags:(n,i,l)=>l?[{type:"Profile",id:l}]:[]})})}),{useGetProfileQuery:yo}=qt,Zs=Ee("CMS_BASE_URL");if(!Zs)throw new Error("CMS_BASE_URL environment variable is not set");const en=Zs,Pt=pr({reducerPath:"cmsClient",baseQuery:Kn({baseUrl:en}),tagTypes:["BlogPosts","BlogPost","Categories","Authors"],keepUnusedDataFor:300,refetchOnFocus:!1,refetchOnReconnect:!1,endpoints:()=>({})}),wt=pr({reducerPath:"algoliaClient",baseQuery:Ws(),tagTypes:["SearchResults"],keepUnusedDataFor:300,refetchOnFocus:!1,refetchOnReconnect:!1,endpoints:()=>({})}),{combineReducers:vo,configureStore:So}=await B("@reduxjs/toolkit"),{networkReducer:Eo,transactionsReducer:bo,walletReducer:To}=await B("@dcl/core-web3"),Io={key:"blog",storage:Js,whitelist:["ids","entities"]},Ro=vo({blog:ka(Io,Ja),network:Eo,transactions:bo,wallet:To,[Pt.reducerPath]:Pt.reducer,[wt.reducerPath]:wt.reducer,[qt.reducerPath]:qt.reducer}),Ve=So({reducer:Ro,middleware:t=>t({serializableCheck:{ignoredActions:[ur,It,lr,dr,hr,mr]}}).concat(Pt.middleware,wt.middleware,qt.middleware),devTools:!1}),ru=Na(Ve),es=(t,n)=>t.id||n||"",qr=async(t,n)=>{const i=en,l=new URL(`${i}${t}`,window.location.origin),m=await fetch(l.toString());if(!m.ok)throw new Error(`CMS API error: ${m.status} ${m.statusText}`);return m.json()},Nt=new Map,Le=new Map,Oe=new Map,ce=new Map,ne=async t=>{const n=t;if(n?.sys?.type==="Link"&&n.sys.linkType==="Asset"){const i=n.sys.id;if(Nt.has(i))return Nt.get(i);if(Le.has(i))return Le.get(i);const l=qr(`/assets/${i}`).then(m=>{const f=m;return Nt.set(i,f),Le.delete(i),f}).catch(()=>(Le.delete(i),t));return Le.set(i,l),l}return t};let Xe=null;const su=t=>{Xe=t},ie=new Map,re=new Map,ts=()=>{if(!Xe)return new Map;const n=Xe.getState().cmsClient?.queries||{},i=Object.entries(n).find(([l])=>l.startsWith("getBlogCategories"));if(i&&i[1]?.data){const l=i[1].data,m=new Map;for(const f of l)f?.sys?.id&&m.set(f.sys.id,f);return m}return new Map},rs=()=>{if(!Xe)return new Map;const n=Xe.getState().cmsClient?.queries||{},i=Object.entries(n).find(([l])=>l.startsWith("getBlogAuthors"));if(i&&i[1]?.data){const l=i[1].data,m=new Map;for(const f of l)f?.sys?.id&&m.set(f.sys.id,f);return m}return new Map},Jt=async t=>{if(Oe.has(t))return Oe.get(t);if(ce.has(t))return ce.get(t);const n=qr(`/entries/${t}`).then(async i=>{const l=i;return l.fields?.image&&(l.fields.image=await ne(l.fields.image)),Oe.set(t,l),ce.delete(t),l}).catch(()=>{throw ce.delete(t),new Error(`Failed to fetch entry ${t}`)});return ce.set(t,n),n},Co=async t=>{const n=t,i=t;if(n?.sys?.type==="Link"&&n.sys.linkType==="Entry"){const l=n.sys.id;if(ie.has(l))return ie.get(l);const f=ts().get(l);if(f)return f.fields?.image&&(f.fields.image=await ne(f.fields.image)),ie.set(l,f),f;try{const h=await Jt(l);return ie.set(l,h),h}catch{return t}}if(i?.sys?.id&&i?.fields)return ie.has(i.sys.id)?ie.get(i.sys.id):(i.fields.image&&(i.fields.image=await ne(i.fields.image)),ie.set(i.sys.id,i),i);if(i?.sys?.id){if(ie.has(i.sys.id))return ie.get(i.sys.id);const m=ts().get(i.sys.id);if(m)return m.fields?.image&&(m.fields.image=await ne(m.fields.image)),ie.set(i.sys.id,m),m}return t},Ao=async t=>{const n=t,i=t;if(n?.sys?.type==="Link"&&n.sys.linkType==="Entry"){const l=n.sys.id;if(re.has(l))return re.get(l);const f=rs().get(l);if(f)return f.fields?.image&&(f.fields.image=await ne(f.fields.image)),re.set(l,f),f;try{const h=await Jt(l);return re.set(l,h),h}catch{return t}}if(i?.sys?.id&&i?.fields)return re.has(i.sys.id)?re.get(i.sys.id):(i.fields.image&&(i.fields.image=await ne(i.fields.image)),re.set(i.sys.id,i),i);if(i?.sys?.id){if(re.has(i.sys.id))return re.get(i.sys.id);const m=rs().get(i.sys.id);if(m)return m.fields?.image&&(m.fields.image=await ne(m.fields.image)),re.set(i.sys.id,m),m;try{const f=await Jt(i.sys.id);return re.set(i.sys.id,f),f}catch{return t}}return t},ss=async t=>{if(!t)return"";const l=(await ne({sys:{type:"Link",linkType:"Asset",id:t}}))?.fields?.file?.url||"";return l.startsWith("//")?`https:${l}`:l},ns=async t=>{if(!t)return"";if(Oe.has(t))return Oe.get(t)?.fields?.id;if(ce.has(t))return(await ce.get(t))?.fields?.id;try{const n=qr(`/entries/${t}`);ce.set(t,n);const i=await n;return Oe.set(t,i),ce.delete(t),i?.fields?.id}catch{return ce.delete(t),""}};function xo(t){if(!t)return"";const n=t,i=new Date(n.includes("T")?n:`${n}T00:00:00Z`);return Number.isNaN(i.getTime())?n:new Intl.DateTimeFormat("en-US",{timeZone:"UTC",month:"short",day:"2-digit",year:"numeric"}).format(i)}const Fe="/blog",_e={home:()=>"/",blogs:()=>Fe,category:t=>`${Fe}/${t}`,blog:(t,n)=>`${Fe}/${t}/${n}`,author:t=>`${Fe}/author/${t}`,search:t=>`${Fe}/search?q=${encodeURIComponent(t)}`,twitter:t=>{const n=`${window.location.origin}${t.url}`;return`https://x.com/intent/post?text=${encodeURIComponent(t.title)}&url=${encodeURIComponent(n)}`},facebook:t=>{const n=`${window.location.origin}${t.url}`;return`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(n)}`}},tn=t=>t?t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,""):"";function Rt(t){if(!t||!t.sys||!t.fields||!t.fields.file)return null;const n=t.fields.file.url;return n?{id:t.sys.id,url:n.startsWith("//")?`https:${n}`:n,width:t.fields.file.details?.image?.width||0,height:t.fields.file.details?.image?.height||0,mimeType:t.fields.file.contentType||"image/jpeg"}:null}function Yt(t){if(!t||!t.sys||!t.fields)return null;const n=t.fields.id||tn(t.fields.title||"");if(!n)return null;const i=Rt(t.fields.image);return i?{id:t.sys.id,slug:n,title:t.fields.title||"",description:t.fields.description||"",image:i,isShownInMenu:t.fields.isShownInMenu??!0,url:_e.category(n)}:null}function ko(t){return{id:t||"uncategorized",slug:"uncategorized",title:"Uncategorized",description:"Posts without a valid category",image:{id:"default-category-image",url:"https://decentraland.org/logos/png/color.png",width:200,height:200,mimeType:"image/png"},isShownInMenu:!1,url:_e.category("uncategorized")}}function Do(t){return{id:t||"default-image",url:"https://decentraland.org/logos/png/color.png",width:1200,height:630,mimeType:"image/png"}}function as(t){const n=t||"decentraland";return{id:t||"unknown",slug:n,title:"Decentraland",description:"Decentraland Team",image:{id:"default-avatar",url:"https://decentraland.org/logos/png/color.png",width:200,height:200,mimeType:"image/png"},url:_e.author(n)}}function mt(t){if(!t||!t.sys||!t.fields)return as(t?.sys?.id);if(Object.keys(t.fields).length===0)return as(t.sys.id);const i=t.fields.title||"",l=t.fields.id||tn(i)||t.sys.id,m=Rt(t.fields.image);return m?{id:t.sys.id,slug:l,title:i,description:t.fields.description||"",image:m,url:_e.author(l)}:{id:t.sys.id,slug:l,title:i||"Decentraland",description:t.fields.description||"",image:{id:"default-avatar",url:"https://decentraland.org/logos/png/color.png",width:200,height:200,mimeType:"image/png"},url:_e.author(l)}}function ot(t){if(!t||!t.sys||!t.fields)return null;let n=Yt(t.fields.category);n||(n=ko(t.sys.id));const i=mt(t.fields.author);let l=Rt(t.fields.image);l||(l=Do(t.sys.id));const m=t.fields.title||"",f=t.fields.id,h=t.fields.publishedDate,s=t.fields.body;return{id:t.sys.id,slug:f,title:m,description:t.fields.description||"",publishedDate:xo(h),body:s||{},bodyAssets:{},image:l,category:n,author:i,url:_e.blog(n.slug,f)}}const $t=t=>Ve.getState().blog.entities[t],it=async t=>{const n={...t,fields:{...t.fields}},[i,l,m]=await Promise.all([n.fields.category?Co(n.fields.category):void 0,n.fields.author?Ao(n.fields.author):void 0,n.fields.image?ne(n.fields.image):void 0]);return i&&(n.fields.category=i),l&&(n.fields.author=l),m&&(n.fields.image=m),n},ct=async t=>{const n={...t,fields:{...t.fields}};return n.fields.image&&(n.fields.image=await ne(n.fields.image)),n},Re=t=>{if(t instanceof Error)return t.message;if(typeof t=="object"&&t!==null&&"error"in t){const n=t.error;if(typeof n=="string")return n}return"Unknown error"},rn=t=>{const n=[];if(t.nodeType===_n.BLOCKS.EMBEDDED_ASSET&&t.data?.target?.sys?.id&&n.push(t.data.target.sys.id),t.content)for(const i of t.content)n.push(...rn(i));return n},Mt=async t=>{const n=rn(t),i=[...new Set(n)];if(i.length===0)return{};const l=await Promise.all(i.map(async f=>{const h=await ne({sys:{type:"Link",linkType:"Asset",id:f}}),s=Rt(h);return{id:f,asset:s}})),m={};for(const{id:f,asset:h}of l)h&&(m[f]=h);return m},Oo=Pt.injectEndpoints({endpoints:t=>({getBlogPosts:t.query({serializeQueryArgs:({queryArgs:n})=>`posts-${n.category||"all"}-${n.author||"all"}`,merge:(n,i,{arg:l})=>{if(l.skip===0)return n.posts.length>i.posts.length?n:i;const m=new Set(n.posts.map(h=>h.id)),f=i.posts.filter(h=>!m.has(h.id));return{posts:[...n.posts,...f],total:i.total,hasMore:i.hasMore,nextCmsSkip:i.nextCmsSkip}},forceRefetch:({currentArg:n,previousArg:i})=>i?n?.skip!==i?.skip&&(n?.skip??0)>(i?.skip??0):!0,query:({category:n,author:i,limit:l=20,skip:m=0})=>({url:"/blog/posts",params:{category:n,author:i,limit:l,skip:m}}),transformResponse:async(n,i,{skip:l=0})=>{try{const m=n.total,h=(await Promise.all(n.items.map(async r=>{const o=r.sys?.id;if(o){const a=$t(o);if(a)return a}try{const a=await it(r);return ot(a)}catch{return null}}))).filter(r=>r!==null);h.length>0&&Ve.dispatch(kt(h));const s=l+n.items.length,e=n.items.length===0?!1:s<m;return{posts:h,total:m,hasMore:e,nextCmsSkip:s}}catch(m){throw{status:"CUSTOM_ERROR",error:Re(m)}}},keepUnusedDataFor:60,providesTags:n=>n?[...n.posts.map(({id:i})=>({type:"BlogPosts",id:i})),{type:"BlogPosts",id:"LIST"}]:[{type:"BlogPosts",id:"LIST"}]}),getBlogPost:t.query({query:({id:n})=>({url:`/entries/${n}`}),transformResponse:async(n,i,{id:l})=>{try{const m=$t(l);if(m&&m.bodyAssets&&Object.keys(m.bodyAssets).length>0)return m;const f=await it(n),h=ot(f);if(!h)throw{status:"CUSTOM_ERROR",error:"Failed to map blog post: missing required fields"};return h.body&&(h.bodyAssets=await Mt(h.body)),Ve.dispatch(kt([h])),h}catch(m){throw{status:"CUSTOM_ERROR",error:Re(m)}}},providesTags:(n,i,l)=>n?[{type:"BlogPost",id:l.id}]:[]}),getBlogCategories:t.query({query:()=>({url:"/blog/categories"}),transformResponse:async n=>{try{return(await Promise.all(n.items.map(l=>ct(l)))).map(l=>Yt(l)).filter(l=>l!==null)}catch(i){throw{status:"CUSTOM_ERROR",error:Re(i)}}},providesTags:["Categories"]}),getBlogCategoryBySlug:t.query({query:()=>({url:"/blog/categories"}),transformResponse:async(n,i,{slug:l})=>{try{const m=n.items.find(s=>{const e=s.fields;return es(e,s.sys.id)===l});if(!m)throw{status:"CUSTOM_ERROR",error:`Category with slug "${l}" not found`};const f=await ct(m),h=Yt(f);if(!h)throw{status:"CUSTOM_ERROR",error:"Failed to map category: missing required fields"};return h}catch(m){throw{status:"CUSTOM_ERROR",error:Re(m)}}},providesTags:(n,i,l)=>n?[{type:"Categories",id:l.slug}]:[]}),getBlogPostBySlug:t.query({query:({postSlug:n})=>({url:"/blog/posts",params:{slug:n}}),transformResponse:async(n,i,{postSlug:l})=>{try{const m=n.items.find(e=>e.fields.id===l);if(!m)throw{status:"CUSTOM_ERROR",error:`Post with slug "${l}" not found`};const f=m.sys?.id;if(f){const e=$t(f);if(e&&e.bodyAssets&&Object.keys(e.bodyAssets).length>0)return e}const h=await it(m),s=ot(h);if(!s)throw{status:"CUSTOM_ERROR",error:"Failed to map post: missing required fields"};return s.body&&(s.bodyAssets=await Mt(s.body)),Ve.dispatch(kt([s])),s}catch(m){throw{status:"CUSTOM_ERROR",error:Re(m)}}},providesTags:(n,i,l)=>n?[{type:"BlogPost",id:`${l.categorySlug}/${l.postSlug}`}]:[]}),getBlogAuthors:t.query({query:()=>({url:"/blog/authors"}),transformResponse:async n=>{try{return(await Promise.all(n.items.map(l=>ct(l)))).map(l=>mt(l)).filter(l=>l!==null)}catch(i){throw{status:"CUSTOM_ERROR",error:i instanceof Error?i.message:"Unknown error"}}},providesTags:["Authors"]}),getBlogAuthor:t.query({query:({id:n})=>({url:`/entries/${n}`}),transformResponse:n=>{const i=mt(n);if(!i)throw{status:"CUSTOM_ERROR",error:"Failed to map author: missing required fields"};return i},providesTags:(n,i,l)=>n?[{type:"Authors",id:l.id}]:[]}),getBlogAuthorBySlug:t.query({query:()=>({url:"/blog/authors"}),transformResponse:async(n,i,{slug:l})=>{try{const m=n.items.find(s=>{const e=s.fields;return es(e,s.sys.id)===l});if(!m)throw{status:"CUSTOM_ERROR",error:`Author with slug "${l}" not found`};const f=await ct(m),h=mt(f);if(!h)throw{status:"CUSTOM_ERROR",error:"Failed to map author: missing required fields"};return h}catch(m){throw{status:"CUSTOM_ERROR",error:Re(m)}}},providesTags:(n,i,l)=>n?[{type:"Authors",id:l.slug}]:[]}),getBlogPostPreview:t.query({queryFn:async({id:n,env:i,token:l,previewBaseUrl:m,spaceId:f})=>{try{const h=`${m}/spaces/${f}/environments/${i}/entries?content_type=blog_post&fields.id=${n}&access_token=${l}`,s=await fetch(h);if(!s.ok)return{error:{status:s.status,data:`Failed to fetch preview: ${s.statusText}`}};const e=await s.json();if(!e.items||e.items.length===0)return{error:{status:"CUSTOM_ERROR",error:`Preview post with id "${n}" not found`}};const r=e.items[0],o=await it(r),a=ot(o);return a?(a.body&&(a.bodyAssets=await Mt(a.body)),{data:a}):{error:{status:"CUSTOM_ERROR",error:"Failed to map preview post: missing required fields"}}}catch(h){return{error:{status:"CUSTOM_ERROR",error:Re(h)}}}},providesTags:(n,i,l)=>n?[{type:"BlogPost",id:`preview-${l.id}`}]:[]})}),overrideExisting:!1}),{useGetBlogPostsQuery:nu,useGetBlogCategoriesQuery:Uo,useGetBlogCategoryBySlugQuery:au,useGetBlogPostBySlugQuery:ou,useGetBlogAuthorBySlugQuery:iu,useGetBlogPostPreviewQuery:cu}=Oo,{useCallback:ut,useEffect:_o,useMemo:jo,useState:No}=await B("react"),{useNotifications:$o}=await B("@dcl/hooks"),{NotificationActiveTab:Mo,Profile:Qo,dclAddressUtils:Bo}=await B("decentraland-ui2");function Lo(t){const{identity:n,isConnected:i,locale:l="en"}=t,m=!!(n&&i),[f,h]=No(!0),s=Ee("NOTIFICATIONS_API_URL")??"https://notifications.decentraland.org";_o(()=>{m||h(!0)},[m]);const e=ut(()=>{m&&h(v=>v&&!1)},[m]),{notifications:r,isLoading:o,isModalOpen:a,isNotificationsOnboarding:u,modalActiveTab:c,handleNotificationsOpen:d,handleOnBegin:g,handleOnChangeModalTab:p}=$o({identity:n??void 0,isNotificationsEnabled:m&&f,initialActiveTab:Mo.NEWEST,notificationsUrl:s,onError:e}),y=ut(()=>{f||h(!0),d()},[d,f]),b=ut((v,S)=>{p(S)},[p]),w=ut(v=>j.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:[j.jsx(Qo,{address:v,size:"normal",imageOnly:!0}),Bo.shorten(v)]}),[]);return{notificationProps:jo(()=>{if(m)return{locale:l,isLoading:o,isOnboarding:u,isOpen:a,items:r,activeTab:c,onClick:y,onClose:y,onBegin:g,onChangeTab:b,renderProfile:w}},[m,l,o,u,a,r,c,y,g,b,w])}}const{useEffect:Fo,useState:Go}=await B("react"),{useWalletState:Ho}=await B("@dcl/core-web3/lazy");function Qt(t){return!!(t&&t.expiration>new Date)}function Bt(t){try{return Un.localStorageGetIdentity(t.toLowerCase())??void 0}catch(n){console.error("[useAuthIdentity] Failed to get identity:",n);return}}function zo(){const{address:t}=Ho(),n=t??void 0,[i,l]=Go(()=>n?Bt(n):void 0);return Fo(()=>{if(!n){l(void 0);return}const m=Bt(n);if(l(m),m&&Qt(m))return;const f=setInterval(()=>{const h=Bt(n);l(h),h&&Qt(h)&&clearInterval(f)},3e3);return()=>clearInterval(f)},[n]),{identity:i,hasValidIdentity:Qt(i),address:n}}function ue(){function t(n){return new Promise(i=>{let l=new XMLHttpRequest;l.open(n.method,n.url,!0),Object.keys(n.headers).forEach(s=>l.setRequestHeader(s,n.headers[s]));let m=(s,e)=>setTimeout(()=>{l.abort(),i({status:0,content:e,isTimedOut:!0})},s),f=m(n.connectTimeout,"Connection timeout"),h;l.onreadystatechange=()=>{l.readyState>l.OPENED&&h===void 0&&(clearTimeout(f),h=m(n.responseTimeout,"Socket timeout"))},l.onerror=()=>{l.status===0&&(clearTimeout(f),clearTimeout(h),i({content:l.responseText||"Network request failed",status:l.status,isTimedOut:!1}))},l.onload=()=>{clearTimeout(f),clearTimeout(h),i({content:l.responseText,status:l.status,isTimedOut:!1})},l.send(n.data)})}return{send:t}}function le(t){let n;const i=`algolia-client-js-${t.key}`;function l(){return n===void 0&&(n=t.localStorage||window.localStorage),n}function m(){return JSON.parse(l().getItem(i)||"{}")}function f(s){l().setItem(i,JSON.stringify(s))}function h(){const s=t.timeToLive?t.timeToLive*1e3:null,e=m(),r=Object.fromEntries(Object.entries(e).filter(([,a])=>a.timestamp!==void 0));if(f(r),!s)return;const o=Object.fromEntries(Object.entries(r).filter(([,a])=>{const u=new Date().getTime();return!(a.timestamp+s<u)}));f(o)}return{get(s,e,r={miss:()=>Promise.resolve()}){return Promise.resolve().then(()=>(h(),m()[JSON.stringify(s)])).then(o=>Promise.all([o?o.value:e(),o!==void 0])).then(([o,a])=>Promise.all([o,a||r.miss(o)])).then(([o])=>o)},set(s,e){return Promise.resolve().then(()=>{const r=m();return r[JSON.stringify(s)]={timestamp:new Date().getTime(),value:e},l().setItem(i,JSON.stringify(r)),e})},delete(s){return Promise.resolve().then(()=>{const e=m();delete e[JSON.stringify(s)],l().setItem(i,JSON.stringify(e))})},clear(){return Promise.resolve().then(()=>{l().removeItem(i)})}}}function Wo(){return{get(t,n,i={miss:()=>Promise.resolve()}){return n().then(m=>Promise.all([m,i.miss(m)])).then(([m])=>m)},set(t,n){return Promise.resolve(n)},delete(t){return Promise.resolve()},clear(){return Promise.resolve()}}}function Z(t){const n=[...t.caches],i=n.shift();return i===void 0?Wo():{get(l,m,f={miss:()=>Promise.resolve()}){return i.get(l,m,f).catch(()=>Z({caches:n}).get(l,m,f))},set(l,m){return i.set(l,m).catch(()=>Z({caches:n}).set(l,m))},delete(l){return i.delete(l).catch(()=>Z({caches:n}).delete(l))},clear(){return i.clear().catch(()=>Z({caches:n}).clear())}}}function H(t={serializable:!0}){let n={};return{get(i,l,m={miss:()=>Promise.resolve()}){const f=JSON.stringify(i);if(f in n)return Promise.resolve(t.serializable?JSON.parse(n[f]):n[f]);const h=l();return h.then(s=>m.miss(s)).then(()=>h)},set(i,l){return n[JSON.stringify(i)]=t.serializable?JSON.stringify(l):l,Promise.resolve(l)},delete(i){return delete n[JSON.stringify(i)],Promise.resolve()},clear(){return n={},Promise.resolve()}}}function Vo(t){const n={value:`Algolia for JavaScript (${t})`,add(i){const l=`; ${i.segment}${i.version!==void 0?` (${i.version})`:""}`;return n.value.indexOf(l)===-1&&(n.value=`${n.value}${l}`),n}};return n}function de(t,n,i="WithinHeaders"){const l={"x-algolia-api-key":n,"x-algolia-application-id":t};return{headers(){return i==="WithinHeaders"?l:{}},queryParameters(){return i==="WithinQueryParameters"?l:{}}}}function ye({func:t,validate:n,aggregator:i,error:l,timeout:m=()=>0}){const f=h=>new Promise((s,e)=>{t(h).then(async r=>(i&&await i(r),await n(r)?s(r):l&&await l.validate(r)?e(new Error(await l.message(r))):setTimeout(()=>{f(r).then(s).catch(e)},await m()))).catch(r=>{e(r)})});return f()}function he({algoliaAgents:t,client:n,version:i}){const l=Vo(i).add({segment:n,version:i});return t.forEach(m=>l.add(m)),l}function me(){return{debug(t,n){return Promise.resolve()},info(t,n){return Promise.resolve()},error(t,n){return Promise.resolve()}}}var os=2*60*1e3;function is(t,n="up"){const i=Date.now();function l(){return n==="up"||Date.now()-i>os}function m(){return n==="timed out"&&Date.now()-i<=os}return{...t,status:n,lastUpdate:i,isUp:l,isTimedOut:m}}var sn=class extends Error{name="AlgoliaError";constructor(t,n){super(t),n&&(this.name=n)}},nn=class extends sn{stackTrace;constructor(t,n,i){super(t,i),this.stackTrace=n}},Ko=class extends nn{constructor(t){super("Unreachable hosts - your application id may be incorrect. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support",t,"RetryError")}},yt=class extends nn{status;constructor(t,n,i,l="ApiError"){super(t,i,l),this.status=n}},Jo=class extends sn{response;constructor(t,n){super(t,"DeserializationError"),this.response=n}},Yo=class extends yt{error;constructor(t,n,i,l){super(t,n,l,"DetailedApiError"),this.error=i}};function an(t){const n=t;for(let i=t.length-1;i>0;i--){const l=Math.floor(Math.random()*(i+1)),m=t[i];n[i]=t[l],n[l]=m}return n}function Xo(t,n,i){const l=Zo(i);let m=`${t.protocol}://${t.url}${t.port?`:${t.port}`:""}/${n.charAt(0)==="/"?n.substring(1):n}`;return l.length&&(m+=`?${l}`),m}function Zo(t){return Object.keys(t).filter(n=>t[n]!==void 0).sort().map(n=>`${n}=${encodeURIComponent(Object.prototype.toString.call(t[n])==="[object Array]"?t[n].join(","):t[n]).replace(/\+/g,"%20")}`).join("&")}function ei(t,n){if(t.method==="GET"||t.data===void 0&&n.data===void 0)return;const i=Array.isArray(t.data)?t.data:{...t.data,...n.data};return JSON.stringify(i)}function ti(t,n,i){const l={Accept:"application/json",...t,...n,...i},m={};return Object.keys(l).forEach(f=>{const h=l[f];m[f.toLowerCase()]=h}),m}function ri(t){try{return JSON.parse(t.content)}catch(n){throw new Jo(n.message,t)}}function si({content:t,status:n},i){try{const l=JSON.parse(t);return"error"in l?new Yo(l.message,n,l.error,i):new yt(l.message,n,i)}catch{}return new yt(t,n,i)}function ni({isTimedOut:t,status:n}){return!t&&~~n===0}function ai({isTimedOut:t,status:n}){return t||ni({isTimedOut:t,status:n})||~~(n/100)!==2&&~~(n/100)!==4}function oi({status:t}){return~~(t/100)===2}function ii(t){return t.map(n=>on(n))}function on(t){const n=t.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...t,request:{...t.request,headers:{...t.request.headers,...n}}}}function fe({hosts:t,hostsCache:n,baseHeaders:i,logger:l,baseQueryParameters:m,algoliaAgent:f,timeouts:h,requester:s,requestsCache:e,responsesCache:r}){async function o(c){const d=await Promise.all(c.map(w=>n.get(w,()=>Promise.resolve(is(w))))),g=d.filter(w=>w.isUp()),p=d.filter(w=>w.isTimedOut()),y=[...g,...p];return{hosts:y.length>0?y:c,getTimeout(w,q){return(p.length===0&&w===0?1:p.length+3+w)*q}}}async function a(c,d,g=!0){const p=[],y=ei(c,d),b=ti(i,c.headers,d.headers),w=c.method==="GET"?{...c.data,...d.data}:{},q={...m,...c.queryParameters,...w};if(f.value&&(q["x-algolia-agent"]=f.value),d&&d.queryParameters)for(const R of Object.keys(d.queryParameters))!d.queryParameters[R]||Object.prototype.toString.call(d.queryParameters[R])==="[object Object]"?q[R]=d.queryParameters[R]:q[R]=d.queryParameters[R].toString();let v=0;const S=async(R,T)=>{const P=R.pop();if(P===void 0)throw new Ko(ii(p));const E={...h,...d.timeouts},I={data:y,headers:b,method:c.method,url:Xo(P,c.path,q),connectTimeout:T(v,E.connect),responseTimeout:T(v,g?E.read:E.write)},C=U=>{const _={request:I,response:U,host:P,triesLeft:R.length};return p.push(_),_},k=await s.send(I);if(ai(k)){const U=C(k);return k.isTimedOut&&v++,l.info("Retryable failure",on(U)),await n.set(P,is(P,k.isTimedOut?"timed out":"down")),S(R,T)}if(oi(k))return ri(k);throw C(k),si(k,p)},A=t.filter(R=>R.accept==="readWrite"||(g?R.accept==="read":R.accept==="write")),x=await o(A);return S([...x.hosts].reverse(),x.getTimeout)}function u(c,d={}){const g=c.useReadTransporter||c.method==="GET";if(!g)return a(c,d,g);const p=()=>a(c,d);if((d.cacheable||c.cacheable)!==!0)return p();const b={request:c,requestOptions:d,transporter:{queryParameters:m,headers:i}};return r.get(b,()=>e.get(b,()=>e.set(b,p()).then(w=>Promise.all([e.delete(b),w]),w=>Promise.all([e.delete(b),Promise.reject(w)])).then(([w,q])=>q)),{miss:w=>r.set(b,w)})}return{hostsCache:n,requester:s,timeouts:h,logger:l,algoliaAgent:f,baseHeaders:i,baseQueryParameters:m,hosts:t,request:u,requestsCache:e,responsesCache:r}}var Pr="1.7.0",cs=["de","us"];function ci(t){return[{url:t?"analytics.{region}.algolia.com".replace("{region}",t):"analytics.algolia.com",accept:"readWrite",protocol:"https"}]}function ui({appId:t,apiKey:n,authMode:i,algoliaAgents:l,region:m,...f}){const h=de(t,n,i),s=fe({hosts:ci(m),...f,algoliaAgent:he({algoliaAgents:l,client:"AbtestingV3",version:Pr}),baseHeaders:{"content-type":"text/plain",...h.headers(),...f.baseHeaders},baseQueryParameters:{...h.queryParameters(),...f.baseQueryParameters}});return{transporter:s,appId:t,apiKey:n,clearCache(){return Promise.all([s.requestsCache.clear(),s.responsesCache.clear()]).then(()=>{})},get _ua(){return s.algoliaAgent.value},addAlgoliaAgent(e,r){s.algoliaAgent.add({segment:e,version:r})},setClientApiKey({apiKey:e}){!i||i==="WithinHeaders"?s.baseHeaders["x-algolia-api-key"]=e:s.baseQueryParameters["x-algolia-api-key"]=e},addABTests(e,r){if(!e)throw new Error("Parameter `addABTestsRequest` is required when calling `addABTests`.");if(!e.name)throw new Error("Parameter `addABTestsRequest.name` is required when calling `addABTests`.");if(!e.variants)throw new Error("Parameter `addABTestsRequest.variants` is required when calling `addABTests`.");if(!e.metrics)throw new Error("Parameter `addABTestsRequest.metrics` is required when calling `addABTests`.");if(!e.endAt)throw new Error("Parameter `addABTestsRequest.endAt` is required when calling `addABTests`.");const c={method:"POST",path:"/3/abtests",queryParameters:{},headers:{},data:e};return s.request(c,r)},customDelete({path:e,parameters:r},o){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");const d={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return s.request(d,o)},customGet({path:e,parameters:r},o){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");const d={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return s.request(d,o)},customPost({path:e,parameters:r,body:o},a){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");const g={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:o||{}};return s.request(g,a)},customPut({path:e,parameters:r,body:o},a){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");const g={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:o||{}};return s.request(g,a)},deleteABTest({id:e},r){if(!e)throw new Error("Parameter `id` is required when calling `deleteABTest`.");const c={method:"DELETE",path:"/3/abtests/{id}".replace("{id}",encodeURIComponent(e)),queryParameters:{},headers:{}};return s.request(c,r)},estimateABTest(e,r){if(!e)throw new Error("Parameter `estimateABTestRequest` is required when calling `estimateABTest`.");if(!e.configuration)throw new Error("Parameter `estimateABTestRequest.configuration` is required when calling `estimateABTest`.");if(!e.variants)throw new Error("Parameter `estimateABTestRequest.variants` is required when calling `estimateABTest`.");const c={method:"POST",path:"/3/abtests/estimate",queryParameters:{},headers:{},data:e};return s.request(c,r)},getABTest({id:e},r){if(!e)throw new Error("Parameter `id` is required when calling `getABTest`.");const c={method:"GET",path:"/3/abtests/{id}".replace("{id}",encodeURIComponent(e)),queryParameters:{},headers:{}};return s.request(c,r)},getTimeseries({id:e,startDate:r,endDate:o,metric:a},u){if(!e)throw new Error("Parameter `id` is required when calling `getTimeseries`.");const c="/3/abtests/{id}/timeseries".replace("{id}",encodeURIComponent(e)),d={},g={};r!==void 0&&(g.startDate=r.toString()),o!==void 0&&(g.endDate=o.toString()),a!==void 0&&(g.metric=a.toString());const p={method:"GET",path:c,queryParameters:g,headers:d};return s.request(p,u)},listABTests({offset:e,limit:r,indexPrefix:o,indexSuffix:a,direction:u}={},c=void 0){const d="/3/abtests",g={},p={};e!==void 0&&(p.offset=e.toString()),r!==void 0&&(p.limit=r.toString()),o!==void 0&&(p.indexPrefix=o.toString()),a!==void 0&&(p.indexSuffix=a.toString()),u!==void 0&&(p.direction=u.toString());const y={method:"GET",path:d,queryParameters:p,headers:g};return s.request(y,c)},scheduleABTest(e,r){if(!e)throw new Error("Parameter `scheduleABTestsRequest` is required when calling `scheduleABTest`.");if(!e.name)throw new Error("Parameter `scheduleABTestsRequest.name` is required when calling `scheduleABTest`.");if(!e.variants)throw new Error("Parameter `scheduleABTestsRequest.variants` is required when calling `scheduleABTest`.");if(!e.metrics)throw new Error("Parameter `scheduleABTestsRequest.metrics` is required when calling `scheduleABTest`.");if(!e.scheduledAt)throw new Error("Parameter `scheduleABTestsRequest.scheduledAt` is required when calling `scheduleABTest`.");if(!e.endAt)throw new Error("Parameter `scheduleABTestsRequest.endAt` is required when calling `scheduleABTest`.");const c={method:"POST",path:"/3/abtests/schedule",queryParameters:{},headers:{},data:e};return s.request(c,r)},stopABTest({id:e},r){if(!e)throw new Error("Parameter `id` is required when calling `stopABTest`.");const c={method:"POST",path:"/3/abtests/{id}/stop".replace("{id}",encodeURIComponent(e)),queryParameters:{},headers:{}};return s.request(c,r)}}}function cn(t,n,i,l){if(!t||typeof t!="string")throw new Error("`appId` is missing.");if(!n||typeof n!="string")throw new Error("`apiKey` is missing.");if(i&&(typeof i!="string"||!cs.includes(i)))throw new Error(`\`region\` must be one of the following: ${cs.join(", ")}`);return ui({appId:t,apiKey:n,region:i,timeouts:{connect:1e3,read:2e3,write:3e4},logger:me(),requester:ue(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:H(),requestsCache:H({serializable:!1}),hostsCache:Z({caches:[le({key:`${Pr}-${t}`}),H()]}),...l})}const li=Object.freeze(Object.defineProperty({__proto__:null,abtestingV3Client:cn,apiClientVersion:Pr},Symbol.toStringTag,{value:"Module"}));var wr="5.41.0",us=["de","us"];function di(t){return[{url:t?"analytics.{region}.algolia.com".replace("{region}",t):"analytics.algolia.com",accept:"readWrite",protocol:"https"}]}function hi({appId:t,apiKey:n,authMode:i,algoliaAgents:l,region:m,...f}){const h=de(t,n,i),s=fe({hosts:di(m),...f,algoliaAgent:he({algoliaAgents:l,client:"Abtesting",version:wr}),baseHeaders:{"content-type":"text/plain",...h.headers(),...f.baseHeaders},baseQueryParameters:{...h.queryParameters(),...f.baseQueryParameters}});return{transporter:s,appId:t,apiKey:n,clearCache(){return Promise.all([s.requestsCache.clear(),s.responsesCache.clear()]).then(()=>{})},get _ua(){return s.algoliaAgent.value},addAlgoliaAgent(e,r){s.algoliaAgent.add({segment:e,version:r})},setClientApiKey({apiKey:e}){!i||i==="WithinHeaders"?s.baseHeaders["x-algolia-api-key"]=e:s.baseQueryParameters["x-algolia-api-key"]=e},addABTests(e,r){if(!e)throw new Error("Parameter `addABTestsRequest` is required when calling `addABTests`.");if(!e.name)throw new Error("Parameter `addABTestsRequest.name` is required when calling `addABTests`.");if(!e.variants)throw new Error("Parameter `addABTestsRequest.variants` is required when calling `addABTests`.");if(!e.endAt)throw new Error("Parameter `addABTestsRequest.endAt` is required when calling `addABTests`.");const c={method:"POST",path:"/2/abtests",queryParameters:{},headers:{},data:e};return s.request(c,r)},customDelete({path:e,parameters:r},o){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");const d={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return s.request(d,o)},customGet({path:e,parameters:r},o){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");const d={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return s.request(d,o)},customPost({path:e,parameters:r,body:o},a){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");const g={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:o||{}};return s.request(g,a)},customPut({path:e,parameters:r,body:o},a){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");const g={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:o||{}};return s.request(g,a)},deleteABTest({id:e},r){if(!e)throw new Error("Parameter `id` is required when calling `deleteABTest`.");const c={method:"DELETE",path:"/2/abtests/{id}".replace("{id}",encodeURIComponent(e)),queryParameters:{},headers:{}};return s.request(c,r)},estimateABTest(e,r){if(!e)throw new Error("Parameter `estimateABTestRequest` is required when calling `estimateABTest`.");if(!e.configuration)throw new Error("Parameter `estimateABTestRequest.configuration` is required when calling `estimateABTest`.");if(!e.variants)throw new Error("Parameter `estimateABTestRequest.variants` is required when calling `estimateABTest`.");const c={method:"POST",path:"/2/abtests/estimate",queryParameters:{},headers:{},data:e};return s.request(c,r)},getABTest({id:e},r){if(!e)throw new Error("Parameter `id` is required when calling `getABTest`.");const c={method:"GET",path:"/2/abtests/{id}".replace("{id}",encodeURIComponent(e)),queryParameters:{},headers:{}};return s.request(c,r)},listABTests({offset:e,limit:r,indexPrefix:o,indexSuffix:a}={},u=void 0){const c="/2/abtests",d={},g={};e!==void 0&&(g.offset=e.toString()),r!==void 0&&(g.limit=r.toString()),o!==void 0&&(g.indexPrefix=o.toString()),a!==void 0&&(g.indexSuffix=a.toString());const p={method:"GET",path:c,queryParameters:g,headers:d};return s.request(p,u)},scheduleABTest(e,r){if(!e)throw new Error("Parameter `scheduleABTestsRequest` is required when calling `scheduleABTest`.");if(!e.name)throw new Error("Parameter `scheduleABTestsRequest.name` is required when calling `scheduleABTest`.");if(!e.variants)throw new Error("Parameter `scheduleABTestsRequest.variants` is required when calling `scheduleABTest`.");if(!e.scheduledAt)throw new Error("Parameter `scheduleABTestsRequest.scheduledAt` is required when calling `scheduleABTest`.");if(!e.endAt)throw new Error("Parameter `scheduleABTestsRequest.endAt` is required when calling `scheduleABTest`.");const c={method:"POST",path:"/2/abtests/schedule",queryParameters:{},headers:{},data:e};return s.request(c,r)},stopABTest({id:e},r){if(!e)throw new Error("Parameter `id` is required when calling `stopABTest`.");const c={method:"POST",path:"/2/abtests/{id}/stop".replace("{id}",encodeURIComponent(e)),queryParameters:{},headers:{}};return s.request(c,r)}}}function un(t,n,i,l){if(!t||typeof t!="string")throw new Error("`appId` is missing.");if(!n||typeof n!="string")throw new Error("`apiKey` is missing.");if(i&&(typeof i!="string"||!us.includes(i)))throw new Error(`\`region\` must be one of the following: ${us.join(", ")}`);return hi({appId:t,apiKey:n,region:i,timeouts:{connect:1e3,read:2e3,write:3e4},logger:me(),requester:ue(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:H(),requestsCache:H({serializable:!1}),hostsCache:Z({caches:[le({key:`${wr}-${t}`}),H()]}),...l})}const mi=Object.freeze(Object.defineProperty({__proto__:null,abtestingClient:un,apiClientVersion:wr},Symbol.toStringTag,{value:"Module"}));var yr="5.41.0",ls=["de","us"];function fi(t){return[{url:t?"analytics.{region}.algolia.com".replace("{region}",t):"analytics.algolia.com",accept:"readWrite",protocol:"https"}]}function gi({appId:t,apiKey:n,authMode:i,algoliaAgents:l,region:m,...f}){const h=de(t,n,i),s=fe({hosts:fi(m),...f,algoliaAgent:he({algoliaAgents:l,client:"Analytics",version:yr}),baseHeaders:{"content-type":"text/plain",...h.headers(),...f.baseHeaders},baseQueryParameters:{...h.queryParameters(),...f.baseQueryParameters}});return{transporter:s,appId:t,apiKey:n,clearCache(){return Promise.all([s.requestsCache.clear(),s.responsesCache.clear()]).then(()=>{})},get _ua(){return s.algoliaAgent.value},addAlgoliaAgent(e,r){s.algoliaAgent.add({segment:e,version:r})},setClientApiKey({apiKey:e}){!i||i==="WithinHeaders"?s.baseHeaders["x-algolia-api-key"]=e:s.baseQueryParameters["x-algolia-api-key"]=e},customDelete({path:e,parameters:r},o){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");const d={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return s.request(d,o)},customGet({path:e,parameters:r},o){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");const d={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return s.request(d,o)},customPost({path:e,parameters:r,body:o},a){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");const g={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:o||{}};return s.request(g,a)},customPut({path:e,parameters:r,body:o},a){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");const g={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:o||{}};return s.request(g,a)},getAddToCartRate({index:e,startDate:r,endDate:o,tags:a},u){if(!e)throw new Error("Parameter `index` is required when calling `getAddToCartRate`.");const c="/2/conversions/addToCartRate",d={},g={};e!==void 0&&(g.index=e.toString()),r!==void 0&&(g.startDate=r.toString()),o!==void 0&&(g.endDate=o.toString()),a!==void 0&&(g.tags=a.toString());const p={method:"GET",path:c,queryParameters:g,headers:d};return s.request(p,u)},getAverageClickPosition({index:e,startDate:r,endDate:o,tags:a},u){if(!e)throw new Error("Parameter `index` is required when calling `getAverageClickPosition`.");const c="/2/clicks/averageClickPosition",d={},g={};e!==void 0&&(g.index=e.toString()),r!==void 0&&(g.startDate=r.toString()),o!==void 0&&(g.endDate=o.toString()),a!==void 0&&(g.tags=a.toString());const p={method:"GET",path:c,queryParameters:g,headers:d};return s.request(p,u)},getClickPositions({index:e,startDate:r,endDate:o,tags:a},u){if(!e)throw new Error("Parameter `index` is required when calling `getClickPositions`.");const c="/2/clicks/positions",d={},g={};e!==void 0&&(g.index=e.toString()),r!==void 0&&(g.startDate=r.toString()),o!==void 0&&(g.endDate=o.toString()),a!==void 0&&(g.tags=a.toString());const p={method:"GET",path:c,queryParameters:g,headers:d};return s.request(p,u)},getClickThroughRate({index:e,startDate:r,endDate:o,tags:a},u){if(!e)throw new Error("Parameter `index` is required when calling `getClickThroughRate`.");const c="/2/clicks/clickThroughRate",d={},g={};e!==void 0&&(g.index=e.toString()),r!==void 0&&(g.startDate=r.toString()),o!==void 0&&(g.endDate=o.toString()),a!==void 0&&(g.tags=a.toString());const p={method:"GET",path:c,queryParameters:g,headers:d};return s.request(p,u)},getConversionRate({index:e,startDate:r,endDate:o,tags:a},u){if(!e)throw new Error("Parameter `index` is required when calling `getConversionRate`.");const c="/2/conversions/conversionRate",d={},g={};e!==void 0&&(g.index=e.toString()),r!==void 0&&(g.startDate=r.toString()),o!==void 0&&(g.endDate=o.toString()),a!==void 0&&(g.tags=a.toString());const p={method:"GET",path:c,queryParameters:g,headers:d};return s.request(p,u)},getNoClickRate({index:e,startDate:r,endDate:o,tags:a},u){if(!e)throw new Error("Parameter `index` is required when calling `getNoClickRate`.");const c="/2/searches/noClickRate",d={},g={};e!==void 0&&(g.index=e.toString()),r!==void 0&&(g.startDate=r.toString()),o!==void 0&&(g.endDate=o.toString()),a!==void 0&&(g.tags=a.toString());const p={method:"GET",path:c,queryParameters:g,headers:d};return s.request(p,u)},getNoResultsRate({index:e,startDate:r,endDate:o,tags:a},u){if(!e)throw new Error("Parameter `index` is required when calling `getNoResultsRate`.");const c="/2/searches/noResultRate",d={},g={};e!==void 0&&(g.index=e.toString()),r!==void 0&&(g.startDate=r.toString()),o!==void 0&&(g.endDate=o.toString()),a!==void 0&&(g.tags=a.toString());const p={method:"GET",path:c,queryParameters:g,headers:d};return s.request(p,u)},getPurchaseRate({index:e,startDate:r,endDate:o,tags:a},u){if(!e)throw new Error("Parameter `index` is required when calling `getPurchaseRate`.");const c="/2/conversions/purchaseRate",d={},g={};e!==void 0&&(g.index=e.toString()),r!==void 0&&(g.startDate=r.toString()),o!==void 0&&(g.endDate=o.toString()),a!==void 0&&(g.tags=a.toString());const p={method:"GET",path:c,queryParameters:g,headers:d};return s.request(p,u)},getRevenue({index:e,startDate:r,endDate:o,tags:a},u){if(!e)throw new Error("Parameter `index` is required when calling `getRevenue`.");const c="/2/conversions/revenue",d={},g={};e!==void 0&&(g.index=e.toString()),r!==void 0&&(g.startDate=r.toString()),o!==void 0&&(g.endDate=o.toString()),a!==void 0&&(g.tags=a.toString());const p={method:"GET",path:c,queryParameters:g,headers:d};return s.request(p,u)},getSearchesCount({index:e,startDate:r,endDate:o,tags:a},u){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesCount`.");const c="/2/searches/count",d={},g={};e!==void 0&&(g.index=e.toString()),r!==void 0&&(g.startDate=r.toString()),o!==void 0&&(g.endDate=o.toString()),a!==void 0&&(g.tags=a.toString());const p={method:"GET",path:c,queryParameters:g,headers:d};return s.request(p,u)},getSearchesNoClicks({index:e,startDate:r,endDate:o,limit:a,offset:u,tags:c},d){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesNoClicks`.");const g="/2/searches/noClicks",p={},y={};e!==void 0&&(y.index=e.toString()),r!==void 0&&(y.startDate=r.toString()),o!==void 0&&(y.endDate=o.toString()),a!==void 0&&(y.limit=a.toString()),u!==void 0&&(y.offset=u.toString()),c!==void 0&&(y.tags=c.toString());const b={method:"GET",path:g,queryParameters:y,headers:p};return s.request(b,d)},getSearchesNoResults({index:e,startDate:r,endDate:o,limit:a,offset:u,tags:c},d){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesNoResults`.");const g="/2/searches/noResults",p={},y={};e!==void 0&&(y.index=e.toString()),r!==void 0&&(y.startDate=r.toString()),o!==void 0&&(y.endDate=o.toString()),a!==void 0&&(y.limit=a.toString()),u!==void 0&&(y.offset=u.toString()),c!==void 0&&(y.tags=c.toString());const b={method:"GET",path:g,queryParameters:y,headers:p};return s.request(b,d)},getStatus({index:e},r){if(!e)throw new Error("Parameter `index` is required when calling `getStatus`.");const o="/2/status",a={},u={};e!==void 0&&(u.index=e.toString());const c={method:"GET",path:o,queryParameters:u,headers:a};return s.request(c,r)},getTopCountries({index:e,startDate:r,endDate:o,limit:a,offset:u,tags:c},d){if(!e)throw new Error("Parameter `index` is required when calling `getTopCountries`.");const g="/2/countries",p={},y={};e!==void 0&&(y.index=e.toString()),r!==void 0&&(y.startDate=r.toString()),o!==void 0&&(y.endDate=o.toString()),a!==void 0&&(y.limit=a.toString()),u!==void 0&&(y.offset=u.toString()),c!==void 0&&(y.tags=c.toString());const b={method:"GET",path:g,queryParameters:y,headers:p};return s.request(b,d)},getTopFilterAttributes({index:e,search:r,startDate:o,endDate:a,limit:u,offset:c,tags:d},g){if(!e)throw new Error("Parameter `index` is required when calling `getTopFilterAttributes`.");const p="/2/filters",y={},b={};e!==void 0&&(b.index=e.toString()),r!==void 0&&(b.search=r.toString()),o!==void 0&&(b.startDate=o.toString()),a!==void 0&&(b.endDate=a.toString()),u!==void 0&&(b.limit=u.toString()),c!==void 0&&(b.offset=c.toString()),d!==void 0&&(b.tags=d.toString());const w={method:"GET",path:p,queryParameters:b,headers:y};return s.request(w,g)},getTopFilterForAttribute({attribute:e,index:r,search:o,startDate:a,endDate:u,limit:c,offset:d,tags:g},p){if(!e)throw new Error("Parameter `attribute` is required when calling `getTopFilterForAttribute`.");if(!r)throw new Error("Parameter `index` is required when calling `getTopFilterForAttribute`.");const y="/2/filters/{attribute}".replace("{attribute}",encodeURIComponent(e)),b={},w={};r!==void 0&&(w.index=r.toString()),o!==void 0&&(w.search=o.toString()),a!==void 0&&(w.startDate=a.toString()),u!==void 0&&(w.endDate=u.toString()),c!==void 0&&(w.limit=c.toString()),d!==void 0&&(w.offset=d.toString()),g!==void 0&&(w.tags=g.toString());const q={method:"GET",path:y,queryParameters:w,headers:b};return s.request(q,p)},getTopFiltersNoResults({index:e,search:r,startDate:o,endDate:a,limit:u,offset:c,tags:d},g){if(!e)throw new Error("Parameter `index` is required when calling `getTopFiltersNoResults`.");const p="/2/filters/noResults",y={},b={};e!==void 0&&(b.index=e.toString()),r!==void 0&&(b.search=r.toString()),o!==void 0&&(b.startDate=o.toString()),a!==void 0&&(b.endDate=a.toString()),u!==void 0&&(b.limit=u.toString()),c!==void 0&&(b.offset=c.toString()),d!==void 0&&(b.tags=d.toString());const w={method:"GET",path:p,queryParameters:b,headers:y};return s.request(w,g)},getTopHits({index:e,search:r,clickAnalytics:o,revenueAnalytics:a,startDate:u,endDate:c,limit:d,offset:g,tags:p},y){if(!e)throw new Error("Parameter `index` is required when calling `getTopHits`.");const b="/2/hits",w={},q={};e!==void 0&&(q.index=e.toString()),r!==void 0&&(q.search=r.toString()),o!==void 0&&(q.clickAnalytics=o.toString()),a!==void 0&&(q.revenueAnalytics=a.toString()),u!==void 0&&(q.startDate=u.toString()),c!==void 0&&(q.endDate=c.toString()),d!==void 0&&(q.limit=d.toString()),g!==void 0&&(q.offset=g.toString()),p!==void 0&&(q.tags=p.toString());const v={method:"GET",path:b,queryParameters:q,headers:w};return s.request(v,y)},getTopSearches({index:e,clickAnalytics:r,revenueAnalytics:o,startDate:a,endDate:u,orderBy:c,direction:d,limit:g,offset:p,tags:y},b){if(!e)throw new Error("Parameter `index` is required when calling `getTopSearches`.");const w="/2/searches",q={},v={};e!==void 0&&(v.index=e.toString()),r!==void 0&&(v.clickAnalytics=r.toString()),o!==void 0&&(v.revenueAnalytics=o.toString()),a!==void 0&&(v.startDate=a.toString()),u!==void 0&&(v.endDate=u.toString()),c!==void 0&&(v.orderBy=c.toString()),d!==void 0&&(v.direction=d.toString()),g!==void 0&&(v.limit=g.toString()),p!==void 0&&(v.offset=p.toString()),y!==void 0&&(v.tags=y.toString());const S={method:"GET",path:w,queryParameters:v,headers:q};return s.request(S,b)},getUsersCount({index:e,startDate:r,endDate:o,tags:a},u){if(!e)throw new Error("Parameter `index` is required when calling `getUsersCount`.");const c="/2/users/count",d={},g={};e!==void 0&&(g.index=e.toString()),r!==void 0&&(g.startDate=r.toString()),o!==void 0&&(g.endDate=o.toString()),a!==void 0&&(g.tags=a.toString());const p={method:"GET",path:c,queryParameters:g,headers:d};return s.request(p,u)}}}function ln(t,n,i,l){if(!t||typeof t!="string")throw new Error("`appId` is missing.");if(!n||typeof n!="string")throw new Error("`apiKey` is missing.");if(i&&(typeof i!="string"||!ls.includes(i)))throw new Error(`\`region\` must be one of the following: ${ls.join(", ")}`);return gi({appId:t,apiKey:n,region:i,timeouts:{connect:1e3,read:2e3,write:3e4},logger:me(),requester:ue(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:H(),requestsCache:H({serializable:!1}),hostsCache:Z({caches:[le({key:`${yr}-${t}`}),H()]}),...l})}const pi=Object.freeze(Object.defineProperty({__proto__:null,analyticsClient:ln,apiClientVersion:yr},Symbol.toStringTag,{value:"Module"}));var vr="5.41.0",ds=["de","us"];function qi(t){return[{url:t?"insights.{region}.algolia.io".replace("{region}",t):"insights.algolia.io",accept:"readWrite",protocol:"https"}]}function Pi({appId:t,apiKey:n,authMode:i,algoliaAgents:l,region:m,...f}){const h=de(t,n,i),s=fe({hosts:qi(m),...f,algoliaAgent:he({algoliaAgents:l,client:"Insights",version:vr}),baseHeaders:{"content-type":"text/plain",...h.headers(),...f.baseHeaders},baseQueryParameters:{...h.queryParameters(),...f.baseQueryParameters}});return{transporter:s,appId:t,apiKey:n,clearCache(){return Promise.all([s.requestsCache.clear(),s.responsesCache.clear()]).then(()=>{})},get _ua(){return s.algoliaAgent.value},addAlgoliaAgent(e,r){s.algoliaAgent.add({segment:e,version:r})},setClientApiKey({apiKey:e}){!i||i==="WithinHeaders"?s.baseHeaders["x-algolia-api-key"]=e:s.baseQueryParameters["x-algolia-api-key"]=e},customDelete({path:e,parameters:r},o){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");const d={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return s.request(d,o)},customGet({path:e,parameters:r},o){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");const d={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return s.request(d,o)},customPost({path:e,parameters:r,body:o},a){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");const g={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:o||{}};return s.request(g,a)},customPut({path:e,parameters:r,body:o},a){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");const g={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:o||{}};return s.request(g,a)},deleteUserToken({userToken:e},r){if(!e)throw new Error("Parameter `userToken` is required when calling `deleteUserToken`.");const c={method:"DELETE",path:"/1/usertokens/{userToken}".replace("{userToken}",encodeURIComponent(e)),queryParameters:{},headers:{}};return s.request(c,r)},pushEvents(e,r){if(!e)throw new Error("Parameter `insightsEvents` is required when calling `pushEvents`.");if(!e.events)throw new Error("Parameter `insightsEvents.events` is required when calling `pushEvents`.");const c={method:"POST",path:"/1/events",queryParameters:{},headers:{},data:e};return s.request(c,r)}}}function dn(t,n,i,l){if(!t||typeof t!="string")throw new Error("`appId` is missing.");if(!n||typeof n!="string")throw new Error("`apiKey` is missing.");if(i&&(typeof i!="string"||!ds.includes(i)))throw new Error(`\`region\` must be one of the following: ${ds.join(", ")}`);return Pi({appId:t,apiKey:n,region:i,timeouts:{connect:1e3,read:2e3,write:3e4},logger:me(),requester:ue(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:H(),requestsCache:H({serializable:!1}),hostsCache:Z({caches:[le({key:`${vr}-${t}`}),H()]}),...l})}const wi=Object.freeze(Object.defineProperty({__proto__:null,apiClientVersion:vr,insightsClient:dn},Symbol.toStringTag,{value:"Module"}));var Sr="5.41.0",hs=["eu","us"];function yi(t){return[{url:"personalization.{region}.algolia.com".replace("{region}",t),accept:"readWrite",protocol:"https"}]}function vi({appId:t,apiKey:n,authMode:i,algoliaAgents:l,region:m,...f}){const h=de(t,n,i),s=fe({hosts:yi(m),...f,algoliaAgent:he({algoliaAgents:l,client:"Personalization",version:Sr}),baseHeaders:{"content-type":"text/plain",...h.headers(),...f.baseHeaders},baseQueryParameters:{...h.queryParameters(),...f.baseQueryParameters}});return{transporter:s,appId:t,apiKey:n,clearCache(){return Promise.all([s.requestsCache.clear(),s.responsesCache.clear()]).then(()=>{})},get _ua(){return s.algoliaAgent.value},addAlgoliaAgent(e,r){s.algoliaAgent.add({segment:e,version:r})},setClientApiKey({apiKey:e}){!i||i==="WithinHeaders"?s.baseHeaders["x-algolia-api-key"]=e:s.baseQueryParameters["x-algolia-api-key"]=e},customDelete({path:e,parameters:r},o){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");const d={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return s.request(d,o)},customGet({path:e,parameters:r},o){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");const d={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return s.request(d,o)},customPost({path:e,parameters:r,body:o},a){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");const g={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:o||{}};return s.request(g,a)},customPut({path:e,parameters:r,body:o},a){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");const g={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:o||{}};return s.request(g,a)},deleteUserProfile({userToken:e},r){if(!e)throw new Error("Parameter `userToken` is required when calling `deleteUserProfile`.");const c={method:"DELETE",path:"/1/profiles/{userToken}".replace("{userToken}",encodeURIComponent(e)),queryParameters:{},headers:{}};return s.request(c,r)},getPersonalizationStrategy(e){const u={method:"GET",path:"/1/strategies/personalization",queryParameters:{},headers:{}};return s.request(u,e)},getUserTokenProfile({userToken:e},r){if(!e)throw new Error("Parameter `userToken` is required when calling `getUserTokenProfile`.");const c={method:"GET",path:"/1/profiles/personalization/{userToken}".replace("{userToken}",encodeURIComponent(e)),queryParameters:{},headers:{}};return s.request(c,r)},setPersonalizationStrategy(e,r){if(!e)throw new Error("Parameter `personalizationStrategyParams` is required when calling `setPersonalizationStrategy`.");if(!e.eventsScoring)throw new Error("Parameter `personalizationStrategyParams.eventsScoring` is required when calling `setPersonalizationStrategy`.");if(!e.facetsScoring)throw new Error("Parameter `personalizationStrategyParams.facetsScoring` is required when calling `setPersonalizationStrategy`.");if(!e.personalizationImpact)throw new Error("Parameter `personalizationStrategyParams.personalizationImpact` is required when calling `setPersonalizationStrategy`.");const c={method:"POST",path:"/1/strategies/personalization",queryParameters:{},headers:{},data:e};return s.request(c,r)}}}function hn(t,n,i,l){if(!t||typeof t!="string")throw new Error("`appId` is missing.");if(!n||typeof n!="string")throw new Error("`apiKey` is missing.");if(!i||i&&(typeof i!="string"||!hs.includes(i)))throw new Error(`\`region\` is required and must be one of the following: ${hs.join(", ")}`);return vi({appId:t,apiKey:n,region:i,timeouts:{connect:1e3,read:2e3,write:3e4},logger:me(),requester:ue(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:H(),requestsCache:H({serializable:!1}),hostsCache:Z({caches:[le({key:`${Sr}-${t}`}),H()]}),...l})}const Si=Object.freeze(Object.defineProperty({__proto__:null,apiClientVersion:Sr,personalizationClient:hn},Symbol.toStringTag,{value:"Module"}));var Er="5.41.0",ms=["eu","us"];function Ei(t){return[{url:"query-suggestions.{region}.algolia.com".replace("{region}",t),accept:"readWrite",protocol:"https"}]}function bi({appId:t,apiKey:n,authMode:i,algoliaAgents:l,region:m,...f}){const h=de(t,n,i),s=fe({hosts:Ei(m),...f,algoliaAgent:he({algoliaAgents:l,client:"QuerySuggestions",version:Er}),baseHeaders:{"content-type":"text/plain",...h.headers(),...f.baseHeaders},baseQueryParameters:{...h.queryParameters(),...f.baseQueryParameters}});return{transporter:s,appId:t,apiKey:n,clearCache(){return Promise.all([s.requestsCache.clear(),s.responsesCache.clear()]).then(()=>{})},get _ua(){return s.algoliaAgent.value},addAlgoliaAgent(e,r){s.algoliaAgent.add({segment:e,version:r})},setClientApiKey({apiKey:e}){!i||i==="WithinHeaders"?s.baseHeaders["x-algolia-api-key"]=e:s.baseQueryParameters["x-algolia-api-key"]=e},createConfig(e,r){if(!e)throw new Error("Parameter `configurationWithIndex` is required when calling `createConfig`.");const c={method:"POST",path:"/1/configs",queryParameters:{},headers:{},data:e};return s.request(c,r)},customDelete({path:e,parameters:r},o){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");const d={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return s.request(d,o)},customGet({path:e,parameters:r},o){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");const d={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return s.request(d,o)},customPost({path:e,parameters:r,body:o},a){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");const g={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:o||{}};return s.request(g,a)},customPut({path:e,parameters:r,body:o},a){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");const g={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:o||{}};return s.request(g,a)},deleteConfig({indexName:e},r){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteConfig`.");const c={method:"DELETE",path:"/1/configs/{indexName}".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{}};return s.request(c,r)},getAllConfigs(e){const u={method:"GET",path:"/1/configs",queryParameters:{},headers:{}};return s.request(u,e)},getConfig({indexName:e},r){if(!e)throw new Error("Parameter `indexName` is required when calling `getConfig`.");const c={method:"GET",path:"/1/configs/{indexName}".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{}};return s.request(c,r)},getConfigStatus({indexName:e},r){if(!e)throw new Error("Parameter `indexName` is required when calling `getConfigStatus`.");const c={method:"GET",path:"/1/configs/{indexName}/status".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{}};return s.request(c,r)},getLogFile({indexName:e},r){if(!e)throw new Error("Parameter `indexName` is required when calling `getLogFile`.");const c={method:"GET",path:"/1/logs/{indexName}".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{}};return s.request(c,r)},updateConfig({indexName:e,configuration:r},o){if(!e)throw new Error("Parameter `indexName` is required when calling `updateConfig`.");if(!r)throw new Error("Parameter `configuration` is required when calling `updateConfig`.");if(!r.sourceIndices)throw new Error("Parameter `configuration.sourceIndices` is required when calling `updateConfig`.");const d={method:"PUT",path:"/1/configs/{indexName}".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return s.request(d,o)}}}function mn(t,n,i,l){if(!t||typeof t!="string")throw new Error("`appId` is missing.");if(!n||typeof n!="string")throw new Error("`apiKey` is missing.");if(!i||i&&(typeof i!="string"||!ms.includes(i)))throw new Error(`\`region\` is required and must be one of the following: ${ms.join(", ")}`);return bi({appId:t,apiKey:n,region:i,timeouts:{connect:1e3,read:2e3,write:3e4},logger:me(),requester:ue(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:H(),requestsCache:H({serializable:!1}),hostsCache:Z({caches:[le({key:`${Er}-${t}`}),H()]}),...l})}const Ti=Object.freeze(Object.defineProperty({__proto__:null,apiClientVersion:Er,querySuggestionsClient:mn},Symbol.toStringTag,{value:"Module"}));var et="5.41.0";function Ii(t){return[{url:`${t}-dsn.algolia.net`,accept:"read",protocol:"https"},{url:`${t}.algolia.net`,accept:"write",protocol:"https"}].concat(an([{url:`${t}-1.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${t}-2.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${t}-3.algolianet.com`,accept:"readWrite",protocol:"https"}]))}function Ri({appId:t,apiKey:n,authMode:i,algoliaAgents:l,...m}){const f=de(t,n,i),h=fe({hosts:Ii(t),...m,algoliaAgent:he({algoliaAgents:l,client:"Search",version:et}),baseHeaders:{"content-type":"text/plain",...f.headers(),...m.baseHeaders},baseQueryParameters:{...f.queryParameters(),...m.baseQueryParameters}});return{transporter:h,appId:t,apiKey:n,clearCache(){return Promise.all([h.requestsCache.clear(),h.responsesCache.clear()]).then(()=>{})},get _ua(){return h.algoliaAgent.value},addAlgoliaAgent(s,e){h.algoliaAgent.add({segment:s,version:e})},setClientApiKey({apiKey:s}){!i||i==="WithinHeaders"?h.baseHeaders["x-algolia-api-key"]=s:h.baseQueryParameters["x-algolia-api-key"]=s},waitForTask({indexName:s,taskID:e,maxRetries:r=50,timeout:o=u=>Math.min(u*200,5e3)},a){let u=0;return ye({func:()=>this.getTask({indexName:s,taskID:e},a),validate:c=>c.status==="published",aggregator:()=>u+=1,error:{validate:()=>u>=r,message:()=>`The maximum number of retries exceeded. (${u}/${r})`},timeout:()=>o(u)})},waitForAppTask({taskID:s,maxRetries:e=50,timeout:r=a=>Math.min(a*200,5e3)},o){let a=0;return ye({func:()=>this.getAppTask({taskID:s},o),validate:u=>u.status==="published",aggregator:()=>a+=1,error:{validate:()=>a>=e,message:()=>`The maximum number of retries exceeded. (${a}/${e})`},timeout:()=>r(a)})},waitForApiKey({operation:s,key:e,apiKey:r,maxRetries:o=50,timeout:a=c=>Math.min(c*200,5e3)},u){let c=0;const d={aggregator:()=>c+=1,error:{validate:()=>c>=o,message:()=>`The maximum number of retries exceeded. (${c}/${o})`},timeout:()=>a(c)};if(s==="update"){if(!r)throw new Error("`apiKey` is required when waiting for an `update` operation.");return ye({...d,func:()=>this.getApiKey({key:e},u),validate:g=>{for(const p of Object.keys(r)){const y=r[p],b=g[p];if(Array.isArray(y)&&Array.isArray(b)){if(y.length!==b.length||y.some((w,q)=>w!==b[q]))return!1}else if(y!==b)return!1}return!0}})}return ye({...d,func:()=>this.getApiKey({key:e},u).catch(g=>{if(g.status!==404)throw g}),validate:g=>s==="add"?g!==void 0:g===void 0})},browseObjects({indexName:s,browseParams:e,...r},o){return ye({func:a=>this.browse({indexName:s,browseParams:{cursor:a?a.cursor:void 0,hitsPerPage:1e3,...e}},o),validate:a=>a.cursor===void 0,...r})},browseRules({indexName:s,searchRulesParams:e,...r},o){const a={...e,hitsPerPage:e?.hitsPerPage||1e3};return ye({func:u=>this.searchRules({indexName:s,searchRulesParams:{...a,page:u?u.page+1:a.page||0}},o),validate:u=>u.hits.length<a.hitsPerPage,...r})},browseSynonyms({indexName:s,searchSynonymsParams:e,...r},o){const a={...e,page:e?.page||0,hitsPerPage:1e3};return ye({func:u=>{const c=this.searchSynonyms({indexName:s,searchSynonymsParams:{...a,page:a.page}},o);return a.page+=1,c},validate:u=>u.hits.length<a.hitsPerPage,...r})},async chunkedBatch({indexName:s,objects:e,action:r="addObject",waitForTasks:o,batchSize:a=1e3},u){let c=[];const d=[],g=e.entries();for(const[p,y]of g)c.push({action:r,body:y}),(c.length===a||p===e.length-1)&&(d.push(await this.batch({indexName:s,batchWriteParams:{requests:c}},u)),c=[]);if(o)for(const p of d)await this.waitForTask({indexName:s,taskID:p.taskID});return d},async saveObjects({indexName:s,objects:e,waitForTasks:r,batchSize:o},a){return await this.chunkedBatch({indexName:s,objects:e,action:"addObject",waitForTasks:r,batchSize:o},a)},async deleteObjects({indexName:s,objectIDs:e,waitForTasks:r,batchSize:o},a){return await this.chunkedBatch({indexName:s,objects:e.map(u=>({objectID:u})),action:"deleteObject",waitForTasks:r,batchSize:o},a)},async partialUpdateObjects({indexName:s,objects:e,createIfNotExists:r,waitForTasks:o,batchSize:a},u){return await this.chunkedBatch({indexName:s,objects:e,action:r?"partialUpdateObject":"partialUpdateObjectNoCreate",batchSize:a,waitForTasks:o},u)},async replaceAllObjects({indexName:s,objects:e,batchSize:r,scopes:o},a){const u=Math.floor(Math.random()*1e6)+1e5,c=`${s}_tmp_${u}`;o===void 0&&(o=["settings","rules","synonyms"]);try{let d=await this.operationIndex({indexName:s,operationIndexParams:{operation:"copy",destination:c,scope:o}},a);const g=await this.chunkedBatch({indexName:c,objects:e,waitForTasks:!0,batchSize:r},a);await this.waitForTask({indexName:c,taskID:d.taskID}),d=await this.operationIndex({indexName:s,operationIndexParams:{operation:"copy",destination:c,scope:o}},a),await this.waitForTask({indexName:c,taskID:d.taskID});const p=await this.operationIndex({indexName:c,operationIndexParams:{operation:"move",destination:s}},a);return await this.waitForTask({indexName:c,taskID:p.taskID}),{copyOperationResponse:d,batchResponses:g,moveOperationResponse:p}}catch(d){throw await this.deleteIndex({indexName:c}),d}},async indexExists({indexName:s}){try{await this.getSettings({indexName:s})}catch(e){if(e instanceof yt&&e.status===404)return!1;throw e}return!0},searchForHits(s,e){return this.search(s,e)},searchForFacets(s,e){return this.search(s,e)},addApiKey(s,e){if(!s)throw new Error("Parameter `apiKey` is required when calling `addApiKey`.");if(!s.acl)throw new Error("Parameter `apiKey.acl` is required when calling `addApiKey`.");const u={method:"POST",path:"/1/keys",queryParameters:{},headers:{},data:s};return h.request(u,e)},addOrUpdateObject({indexName:s,objectID:e,body:r},o){if(!s)throw new Error("Parameter `indexName` is required when calling `addOrUpdateObject`.");if(!e)throw new Error("Parameter `objectID` is required when calling `addOrUpdateObject`.");if(!r)throw new Error("Parameter `body` is required when calling `addOrUpdateObject`.");const d={method:"PUT",path:"/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(s)).replace("{objectID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return h.request(d,o)},appendSource(s,e){if(!s)throw new Error("Parameter `source` is required when calling `appendSource`.");if(!s.source)throw new Error("Parameter `source.source` is required when calling `appendSource`.");const u={method:"POST",path:"/1/security/sources/append",queryParameters:{},headers:{},data:s};return h.request(u,e)},assignUserId({xAlgoliaUserID:s,assignUserIdParams:e},r){if(!s)throw new Error("Parameter `xAlgoliaUserID` is required when calling `assignUserId`.");if(!e)throw new Error("Parameter `assignUserIdParams` is required when calling `assignUserId`.");if(!e.cluster)throw new Error("Parameter `assignUserIdParams.cluster` is required when calling `assignUserId`.");const o="/1/clusters/mapping",a={},u={};s!==void 0&&(a["X-Algolia-User-ID"]=s.toString());const c={method:"POST",path:o,queryParameters:u,headers:a,data:e};return h.request(c,r)},batch({indexName:s,batchWriteParams:e},r){if(!s)throw new Error("Parameter `indexName` is required when calling `batch`.");if(!e)throw new Error("Parameter `batchWriteParams` is required when calling `batch`.");if(!e.requests)throw new Error("Parameter `batchWriteParams.requests` is required when calling `batch`.");const c={method:"POST",path:"/1/indexes/{indexName}/batch".replace("{indexName}",encodeURIComponent(s)),queryParameters:{},headers:{},data:e};return h.request(c,r)},batchAssignUserIds({xAlgoliaUserID:s,batchAssignUserIdsParams:e},r){if(!s)throw new Error("Parameter `xAlgoliaUserID` is required when calling `batchAssignUserIds`.");if(!e)throw new Error("Parameter `batchAssignUserIdsParams` is required when calling `batchAssignUserIds`.");if(!e.cluster)throw new Error("Parameter `batchAssignUserIdsParams.cluster` is required when calling `batchAssignUserIds`.");if(!e.users)throw new Error("Parameter `batchAssignUserIdsParams.users` is required when calling `batchAssignUserIds`.");const o="/1/clusters/mapping/batch",a={},u={};s!==void 0&&(a["X-Algolia-User-ID"]=s.toString());const c={method:"POST",path:o,queryParameters:u,headers:a,data:e};return h.request(c,r)},batchDictionaryEntries({dictionaryName:s,batchDictionaryEntriesParams:e},r){if(!s)throw new Error("Parameter `dictionaryName` is required when calling `batchDictionaryEntries`.");if(!e)throw new Error("Parameter `batchDictionaryEntriesParams` is required when calling `batchDictionaryEntries`.");if(!e.requests)throw new Error("Parameter `batchDictionaryEntriesParams.requests` is required when calling `batchDictionaryEntries`.");const c={method:"POST",path:"/1/dictionaries/{dictionaryName}/batch".replace("{dictionaryName}",encodeURIComponent(s)),queryParameters:{},headers:{},data:e};return h.request(c,r)},browse({indexName:s,browseParams:e},r){if(!s)throw new Error("Parameter `indexName` is required when calling `browse`.");const c={method:"POST",path:"/1/indexes/{indexName}/browse".replace("{indexName}",encodeURIComponent(s)),queryParameters:{},headers:{},data:e||{},useReadTransporter:!0};return h.request(c,r)},clearObjects({indexName:s},e){if(!s)throw new Error("Parameter `indexName` is required when calling `clearObjects`.");const u={method:"POST",path:"/1/indexes/{indexName}/clear".replace("{indexName}",encodeURIComponent(s)),queryParameters:{},headers:{}};return h.request(u,e)},clearRules({indexName:s,forwardToReplicas:e},r){if(!s)throw new Error("Parameter `indexName` is required when calling `clearRules`.");const o="/1/indexes/{indexName}/rules/clear".replace("{indexName}",encodeURIComponent(s)),a={},u={};e!==void 0&&(u.forwardToReplicas=e.toString());const c={method:"POST",path:o,queryParameters:u,headers:a};return h.request(c,r)},clearSynonyms({indexName:s,forwardToReplicas:e},r){if(!s)throw new Error("Parameter `indexName` is required when calling `clearSynonyms`.");const o="/1/indexes/{indexName}/synonyms/clear".replace("{indexName}",encodeURIComponent(s)),a={},u={};e!==void 0&&(u.forwardToReplicas=e.toString());const c={method:"POST",path:o,queryParameters:u,headers:a};return h.request(c,r)},customDelete({path:s,parameters:e},r){if(!s)throw new Error("Parameter `path` is required when calling `customDelete`.");const c={method:"DELETE",path:"/{path}".replace("{path}",s),queryParameters:e||{},headers:{}};return h.request(c,r)},customGet({path:s,parameters:e},r){if(!s)throw new Error("Parameter `path` is required when calling `customGet`.");const c={method:"GET",path:"/{path}".replace("{path}",s),queryParameters:e||{},headers:{}};return h.request(c,r)},customPost({path:s,parameters:e,body:r},o){if(!s)throw new Error("Parameter `path` is required when calling `customPost`.");const d={method:"POST",path:"/{path}".replace("{path}",s),queryParameters:e||{},headers:{},data:r||{}};return h.request(d,o)},customPut({path:s,parameters:e,body:r},o){if(!s)throw new Error("Parameter `path` is required when calling `customPut`.");const d={method:"PUT",path:"/{path}".replace("{path}",s),queryParameters:e||{},headers:{},data:r||{}};return h.request(d,o)},deleteApiKey({key:s},e){if(!s)throw new Error("Parameter `key` is required when calling `deleteApiKey`.");const u={method:"DELETE",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(s)),queryParameters:{},headers:{}};return h.request(u,e)},deleteBy({indexName:s,deleteByParams:e},r){if(!s)throw new Error("Parameter `indexName` is required when calling `deleteBy`.");if(!e)throw new Error("Parameter `deleteByParams` is required when calling `deleteBy`.");const c={method:"POST",path:"/1/indexes/{indexName}/deleteByQuery".replace("{indexName}",encodeURIComponent(s)),queryParameters:{},headers:{},data:e};return h.request(c,r)},deleteIndex({indexName:s},e){if(!s)throw new Error("Parameter `indexName` is required when calling `deleteIndex`.");const u={method:"DELETE",path:"/1/indexes/{indexName}".replace("{indexName}",encodeURIComponent(s)),queryParameters:{},headers:{}};return h.request(u,e)},deleteObject({indexName:s,objectID:e},r){if(!s)throw new Error("Parameter `indexName` is required when calling `deleteObject`.");if(!e)throw new Error("Parameter `objectID` is required when calling `deleteObject`.");const c={method:"DELETE",path:"/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(s)).replace("{objectID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return h.request(c,r)},deleteRule({indexName:s,objectID:e,forwardToReplicas:r},o){if(!s)throw new Error("Parameter `indexName` is required when calling `deleteRule`.");if(!e)throw new Error("Parameter `objectID` is required when calling `deleteRule`.");const a="/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(s)).replace("{objectID}",encodeURIComponent(e)),u={},c={};r!==void 0&&(c.forwardToReplicas=r.toString());const d={method:"DELETE",path:a,queryParameters:c,headers:u};return h.request(d,o)},deleteSource({source:s},e){if(!s)throw new Error("Parameter `source` is required when calling `deleteSource`.");const u={method:"DELETE",path:"/1/security/sources/{source}".replace("{source}",encodeURIComponent(s)),queryParameters:{},headers:{}};return h.request(u,e)},deleteSynonym({indexName:s,objectID:e,forwardToReplicas:r},o){if(!s)throw new Error("Parameter `indexName` is required when calling `deleteSynonym`.");if(!e)throw new Error("Parameter `objectID` is required when calling `deleteSynonym`.");const a="/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(s)).replace("{objectID}",encodeURIComponent(e)),u={},c={};r!==void 0&&(c.forwardToReplicas=r.toString());const d={method:"DELETE",path:a,queryParameters:c,headers:u};return h.request(d,o)},getApiKey({key:s},e){if(!s)throw new Error("Parameter `key` is required when calling `getApiKey`.");const u={method:"GET",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(s)),queryParameters:{},headers:{}};return h.request(u,e)},getAppTask({taskID:s},e){if(!s)throw new Error("Parameter `taskID` is required when calling `getAppTask`.");const u={method:"GET",path:"/1/task/{taskID}".replace("{taskID}",encodeURIComponent(s)),queryParameters:{},headers:{}};return h.request(u,e)},getDictionaryLanguages(s){const a={method:"GET",path:"/1/dictionaries/*/languages",queryParameters:{},headers:{}};return h.request(a,s)},getDictionarySettings(s){const a={method:"GET",path:"/1/dictionaries/*/settings",queryParameters:{},headers:{}};return h.request(a,s)},getLogs({offset:s,length:e,indexName:r,type:o}={},a=void 0){const u="/1/logs",c={},d={};s!==void 0&&(d.offset=s.toString()),e!==void 0&&(d.length=e.toString()),r!==void 0&&(d.indexName=r.toString()),o!==void 0&&(d.type=o.toString());const g={method:"GET",path:u,queryParameters:d,headers:c};return h.request(g,a)},getObject({indexName:s,objectID:e,attributesToRetrieve:r},o){if(!s)throw new Error("Parameter `indexName` is required when calling `getObject`.");if(!e)throw new Error("Parameter `objectID` is required when calling `getObject`.");const a="/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(s)).replace("{objectID}",encodeURIComponent(e)),u={},c={};r!==void 0&&(c.attributesToRetrieve=r.toString());const d={method:"GET",path:a,queryParameters:c,headers:u};return h.request(d,o)},getObjects(s,e){if(!s)throw new Error("Parameter `getObjectsParams` is required when calling `getObjects`.");if(!s.requests)throw new Error("Parameter `getObjectsParams.requests` is required when calling `getObjects`.");const u={method:"POST",path:"/1/indexes/*/objects",queryParameters:{},headers:{},data:s,useReadTransporter:!0,cacheable:!0};return h.request(u,e)},getRule({indexName:s,objectID:e},r){if(!s)throw new Error("Parameter `indexName` is required when calling `getRule`.");if(!e)throw new Error("Parameter `objectID` is required when calling `getRule`.");const c={method:"GET",path:"/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(s)).replace("{objectID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return h.request(c,r)},getSettings({indexName:s,getVersion:e},r){if(!s)throw new Error("Parameter `indexName` is required when calling `getSettings`.");const o="/1/indexes/{indexName}/settings".replace("{indexName}",encodeURIComponent(s)),a={},u={};e!==void 0&&(u.getVersion=e.toString());const c={method:"GET",path:o,queryParameters:u,headers:a};return h.request(c,r)},getSources(s){const a={method:"GET",path:"/1/security/sources",queryParameters:{},headers:{}};return h.request(a,s)},getSynonym({indexName:s,objectID:e},r){if(!s)throw new Error("Parameter `indexName` is required when calling `getSynonym`.");if(!e)throw new Error("Parameter `objectID` is required when calling `getSynonym`.");const c={method:"GET",path:"/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(s)).replace("{objectID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return h.request(c,r)},getTask({indexName:s,taskID:e},r){if(!s)throw new Error("Parameter `indexName` is required when calling `getTask`.");if(!e)throw new Error("Parameter `taskID` is required when calling `getTask`.");const c={method:"GET",path:"/1/indexes/{indexName}/task/{taskID}".replace("{indexName}",encodeURIComponent(s)).replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return h.request(c,r)},getTopUserIds(s){const a={method:"GET",path:"/1/clusters/mapping/top",queryParameters:{},headers:{}};return h.request(a,s)},getUserId({userID:s},e){if(!s)throw new Error("Parameter `userID` is required when calling `getUserId`.");const u={method:"GET",path:"/1/clusters/mapping/{userID}".replace("{userID}",encodeURIComponent(s)),queryParameters:{},headers:{}};return h.request(u,e)},hasPendingMappings({getClusters:s}={},e=void 0){const r="/1/clusters/mapping/pending",o={},a={};s!==void 0&&(a.getClusters=s.toString());const u={method:"GET",path:r,queryParameters:a,headers:o};return h.request(u,e)},listApiKeys(s){const a={method:"GET",path:"/1/keys",queryParameters:{},headers:{}};return h.request(a,s)},listClusters(s){const a={method:"GET",path:"/1/clusters",queryParameters:{},headers:{}};return h.request(a,s)},listIndices({page:s,hitsPerPage:e}={},r=void 0){const o="/1/indexes",a={},u={};s!==void 0&&(u.page=s.toString()),e!==void 0&&(u.hitsPerPage=e.toString());const c={method:"GET",path:o,queryParameters:u,headers:a};return h.request(c,r)},listUserIds({page:s,hitsPerPage:e}={},r=void 0){const o="/1/clusters/mapping",a={},u={};s!==void 0&&(u.page=s.toString()),e!==void 0&&(u.hitsPerPage=e.toString());const c={method:"GET",path:o,queryParameters:u,headers:a};return h.request(c,r)},multipleBatch(s,e){if(!s)throw new Error("Parameter `batchParams` is required when calling `multipleBatch`.");if(!s.requests)throw new Error("Parameter `batchParams.requests` is required when calling `multipleBatch`.");const u={method:"POST",path:"/1/indexes/*/batch",queryParameters:{},headers:{},data:s};return h.request(u,e)},operationIndex({indexName:s,operationIndexParams:e},r){if(!s)throw new Error("Parameter `indexName` is required when calling `operationIndex`.");if(!e)throw new Error("Parameter `operationIndexParams` is required when calling `operationIndex`.");if(!e.operation)throw new Error("Parameter `operationIndexParams.operation` is required when calling `operationIndex`.");if(!e.destination)throw new Error("Parameter `operationIndexParams.destination` is required when calling `operationIndex`.");const c={method:"POST",path:"/1/indexes/{indexName}/operation".replace("{indexName}",encodeURIComponent(s)),queryParameters:{},headers:{},data:e};return h.request(c,r)},partialUpdateObject({indexName:s,objectID:e,attributesToUpdate:r,createIfNotExists:o},a){if(!s)throw new Error("Parameter `indexName` is required when calling `partialUpdateObject`.");if(!e)throw new Error("Parameter `objectID` is required when calling `partialUpdateObject`.");if(!r)throw new Error("Parameter `attributesToUpdate` is required when calling `partialUpdateObject`.");const u="/1/indexes/{indexName}/{objectID}/partial".replace("{indexName}",encodeURIComponent(s)).replace("{objectID}",encodeURIComponent(e)),c={},d={};o!==void 0&&(d.createIfNotExists=o.toString());const g={method:"POST",path:u,queryParameters:d,headers:c,data:r};return h.request(g,a)},removeUserId({userID:s},e){if(!s)throw new Error("Parameter `userID` is required when calling `removeUserId`.");const u={method:"DELETE",path:"/1/clusters/mapping/{userID}".replace("{userID}",encodeURIComponent(s)),queryParameters:{},headers:{}};return h.request(u,e)},replaceSources({source:s},e){if(!s)throw new Error("Parameter `source` is required when calling `replaceSources`.");const u={method:"PUT",path:"/1/security/sources",queryParameters:{},headers:{},data:s};return h.request(u,e)},restoreApiKey({key:s},e){if(!s)throw new Error("Parameter `key` is required when calling `restoreApiKey`.");const u={method:"POST",path:"/1/keys/{key}/restore".replace("{key}",encodeURIComponent(s)),queryParameters:{},headers:{}};return h.request(u,e)},saveObject({indexName:s,body:e},r){if(!s)throw new Error("Parameter `indexName` is required when calling `saveObject`.");if(!e)throw new Error("Parameter `body` is required when calling `saveObject`.");const c={method:"POST",path:"/1/indexes/{indexName}".replace("{indexName}",encodeURIComponent(s)),queryParameters:{},headers:{},data:e};return h.request(c,r)},saveRule({indexName:s,objectID:e,rule:r,forwardToReplicas:o},a){if(!s)throw new Error("Parameter `indexName` is required when calling `saveRule`.");if(!e)throw new Error("Parameter `objectID` is required when calling `saveRule`.");if(!r)throw new Error("Parameter `rule` is required when calling `saveRule`.");if(!r.objectID)throw new Error("Parameter `rule.objectID` is required when calling `saveRule`.");if(!r.consequence)throw new Error("Parameter `rule.consequence` is required when calling `saveRule`.");const u="/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(s)).replace("{objectID}",encodeURIComponent(e)),c={},d={};o!==void 0&&(d.forwardToReplicas=o.toString());const g={method:"PUT",path:u,queryParameters:d,headers:c,data:r};return h.request(g,a)},saveRules({indexName:s,rules:e,forwardToReplicas:r,clearExistingRules:o},a){if(!s)throw new Error("Parameter `indexName` is required when calling `saveRules`.");if(!e)throw new Error("Parameter `rules` is required when calling `saveRules`.");const u="/1/indexes/{indexName}/rules/batch".replace("{indexName}",encodeURIComponent(s)),c={},d={};r!==void 0&&(d.forwardToReplicas=r.toString()),o!==void 0&&(d.clearExistingRules=o.toString());const g={method:"POST",path:u,queryParameters:d,headers:c,data:e};return h.request(g,a)},saveSynonym({indexName:s,objectID:e,synonymHit:r,forwardToReplicas:o},a){if(!s)throw new Error("Parameter `indexName` is required when calling `saveSynonym`.");if(!e)throw new Error("Parameter `objectID` is required when calling `saveSynonym`.");if(!r)throw new Error("Parameter `synonymHit` is required when calling `saveSynonym`.");if(!r.objectID)throw new Error("Parameter `synonymHit.objectID` is required when calling `saveSynonym`.");if(!r.type)throw new Error("Parameter `synonymHit.type` is required when calling `saveSynonym`.");const u="/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(s)).replace("{objectID}",encodeURIComponent(e)),c={},d={};o!==void 0&&(d.forwardToReplicas=o.toString());const g={method:"PUT",path:u,queryParameters:d,headers:c,data:r};return h.request(g,a)},saveSynonyms({indexName:s,synonymHit:e,forwardToReplicas:r,replaceExistingSynonyms:o},a){if(!s)throw new Error("Parameter `indexName` is required when calling `saveSynonyms`.");if(!e)throw new Error("Parameter `synonymHit` is required when calling `saveSynonyms`.");const u="/1/indexes/{indexName}/synonyms/batch".replace("{indexName}",encodeURIComponent(s)),c={},d={};r!==void 0&&(d.forwardToReplicas=r.toString()),o!==void 0&&(d.replaceExistingSynonyms=o.toString());const g={method:"POST",path:u,queryParameters:d,headers:c,data:e};return h.request(g,a)},search(s,e){if(s&&Array.isArray(s)&&(s={requests:s.map(({params:d,...g})=>g.type==="facet"?{...g,...d,type:"facet"}:{...g,...d,facet:void 0,maxFacetHits:void 0,facetQuery:void 0})}),!s)throw new Error("Parameter `searchMethodParams` is required when calling `search`.");if(!s.requests)throw new Error("Parameter `searchMethodParams.requests` is required when calling `search`.");const u={method:"POST",path:"/1/indexes/*/queries",queryParameters:{},headers:{},data:s,useReadTransporter:!0,cacheable:!0};return h.request(u,e)},searchDictionaryEntries({dictionaryName:s,searchDictionaryEntriesParams:e},r){if(!s)throw new Error("Parameter `dictionaryName` is required when calling `searchDictionaryEntries`.");if(!e)throw new Error("Parameter `searchDictionaryEntriesParams` is required when calling `searchDictionaryEntries`.");if(!e.query)throw new Error("Parameter `searchDictionaryEntriesParams.query` is required when calling `searchDictionaryEntries`.");const c={method:"POST",path:"/1/dictionaries/{dictionaryName}/search".replace("{dictionaryName}",encodeURIComponent(s)),queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return h.request(c,r)},searchForFacetValues({indexName:s,facetName:e,searchForFacetValuesRequest:r},o){if(!s)throw new Error("Parameter `indexName` is required when calling `searchForFacetValues`.");if(!e)throw new Error("Parameter `facetName` is required when calling `searchForFacetValues`.");const d={method:"POST",path:"/1/indexes/{indexName}/facets/{facetName}/query".replace("{indexName}",encodeURIComponent(s)).replace("{facetName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r||{},useReadTransporter:!0,cacheable:!0};return h.request(d,o)},searchRules({indexName:s,searchRulesParams:e},r){if(!s)throw new Error("Parameter `indexName` is required when calling `searchRules`.");const c={method:"POST",path:"/1/indexes/{indexName}/rules/search".replace("{indexName}",encodeURIComponent(s)),queryParameters:{},headers:{},data:e||{},useReadTransporter:!0,cacheable:!0};return h.request(c,r)},searchSingleIndex({indexName:s,searchParams:e},r){if(!s)throw new Error("Parameter `indexName` is required when calling `searchSingleIndex`.");const c={method:"POST",path:"/1/indexes/{indexName}/query".replace("{indexName}",encodeURIComponent(s)),queryParameters:{},headers:{},data:e||{},useReadTransporter:!0,cacheable:!0};return h.request(c,r)},searchSynonyms({indexName:s,searchSynonymsParams:e},r){if(!s)throw new Error("Parameter `indexName` is required when calling `searchSynonyms`.");const c={method:"POST",path:"/1/indexes/{indexName}/synonyms/search".replace("{indexName}",encodeURIComponent(s)),queryParameters:{},headers:{},data:e||{},useReadTransporter:!0,cacheable:!0};return h.request(c,r)},searchUserIds(s,e){if(!s)throw new Error("Parameter `searchUserIdsParams` is required when calling `searchUserIds`.");if(!s.query)throw new Error("Parameter `searchUserIdsParams.query` is required when calling `searchUserIds`.");const u={method:"POST",path:"/1/clusters/mapping/search",queryParameters:{},headers:{},data:s,useReadTransporter:!0,cacheable:!0};return h.request(u,e)},setDictionarySettings(s,e){if(!s)throw new Error("Parameter `dictionarySettingsParams` is required when calling `setDictionarySettings`.");if(!s.disableStandardEntries)throw new Error("Parameter `dictionarySettingsParams.disableStandardEntries` is required when calling `setDictionarySettings`.");const u={method:"PUT",path:"/1/dictionaries/*/settings",queryParameters:{},headers:{},data:s};return h.request(u,e)},setSettings({indexName:s,indexSettings:e,forwardToReplicas:r},o){if(!s)throw new Error("Parameter `indexName` is required when calling `setSettings`.");if(!e)throw new Error("Parameter `indexSettings` is required when calling `setSettings`.");const a="/1/indexes/{indexName}/settings".replace("{indexName}",encodeURIComponent(s)),u={},c={};r!==void 0&&(c.forwardToReplicas=r.toString());const d={method:"PUT",path:a,queryParameters:c,headers:u,data:e};return h.request(d,o)},updateApiKey({key:s,apiKey:e},r){if(!s)throw new Error("Parameter `key` is required when calling `updateApiKey`.");if(!e)throw new Error("Parameter `apiKey` is required when calling `updateApiKey`.");if(!e.acl)throw new Error("Parameter `apiKey.acl` is required when calling `updateApiKey`.");const c={method:"PUT",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(s)),queryParameters:{},headers:{},data:e};return h.request(c,r)}}}function fn(t,n,i){if(!t||typeof t!="string")throw new Error("`appId` is missing.");if(!n||typeof n!="string")throw new Error("`apiKey` is missing.");return Ri({appId:t,apiKey:n,timeouts:{connect:1e3,read:2e3,write:3e4},logger:me(),requester:ue(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:H(),requestsCache:H({serializable:!1}),hostsCache:Z({caches:[le({key:`${et}-${t}`}),H()]}),...i})}const Ci=Object.freeze(Object.defineProperty({__proto__:null,apiClientVersion:et,searchClient:fn},Symbol.toStringTag,{value:"Module"}));var br="1.41.0",fs=["eu","us"];function Ai(t){return[{url:"data.{region}.algolia.com".replace("{region}",t),accept:"readWrite",protocol:"https"}]}function xi(t){return t.type==="onDemand"}function ki(t){return t.type==="schedule"}function Di(t){return t.type==="subscription"}function Oi({appId:t,apiKey:n,authMode:i,algoliaAgents:l,region:m,...f}){const h=de(t,n,i),s=fe({hosts:Ai(m),...f,algoliaAgent:he({algoliaAgents:l,client:"Ingestion",version:br}),baseHeaders:{"content-type":"text/plain",...h.headers(),...f.baseHeaders},baseQueryParameters:{...h.queryParameters(),...f.baseQueryParameters}});return{transporter:s,appId:t,apiKey:n,clearCache(){return Promise.all([s.requestsCache.clear(),s.responsesCache.clear()]).then(()=>{})},get _ua(){return s.algoliaAgent.value},addAlgoliaAgent(e,r){s.algoliaAgent.add({segment:e,version:r})},setClientApiKey({apiKey:e}){!i||i==="WithinHeaders"?s.baseHeaders["x-algolia-api-key"]=e:s.baseQueryParameters["x-algolia-api-key"]=e},async chunkedPush({indexName:e,objects:r,action:o="addObject",waitForTasks:a,batchSize:u=1e3,referenceIndexName:c},d){let g=[],p=0;const y=[],b=Math.floor(u/10)||u,w=r.entries();for(const[q,v]of w)if(g.push(v),(g.length===u||q===r.length-1)&&(y.push(await this.push({indexName:e,pushTaskPayload:{action:o,records:g},referenceIndexName:c},d)),g=[]),a&&y.length>0&&(y.length%b===0||q===r.length-1)){for(const S of y.slice(p,p+b)){if(!S.eventID)throw new Error("received unexpected response from the push endpoint, eventID must not be undefined");let A=0;await ye({func:async()=>{if(S.eventID===void 0||!S.eventID)throw new Error("received unexpected response from the push endpoint, eventID must not be undefined");return this.getEvent({runID:S.runID,eventID:S.eventID}).catch(x=>{if(x.status!==404)throw x})},validate:x=>x!==void 0,aggregator:()=>A+=1,error:{validate:()=>A>=50,message:()=>`The maximum number of retries exceeded. (${A}/50)`},timeout:()=>Math.min(A*500,5e3)})}p+=b}return y},createAuthentication(e,r){if(!e)throw new Error("Parameter `authenticationCreate` is required when calling `createAuthentication`.");if(!e.type)throw new Error("Parameter `authenticationCreate.type` is required when calling `createAuthentication`.");if(!e.name)throw new Error("Parameter `authenticationCreate.name` is required when calling `createAuthentication`.");if(!e.input)throw new Error("Parameter `authenticationCreate.input` is required when calling `createAuthentication`.");const c={method:"POST",path:"/1/authentications",queryParameters:{},headers:{},data:e};return s.request(c,r)},createDestination(e,r){if(!e)throw new Error("Parameter `destinationCreate` is required when calling `createDestination`.");if(!e.type)throw new Error("Parameter `destinationCreate.type` is required when calling `createDestination`.");if(!e.name)throw new Error("Parameter `destinationCreate.name` is required when calling `createDestination`.");if(!e.input)throw new Error("Parameter `destinationCreate.input` is required when calling `createDestination`.");const c={method:"POST",path:"/1/destinations",queryParameters:{},headers:{},data:e};return s.request(c,r)},createSource(e,r){if(!e)throw new Error("Parameter `sourceCreate` is required when calling `createSource`.");if(!e.type)throw new Error("Parameter `sourceCreate.type` is required when calling `createSource`.");if(!e.name)throw new Error("Parameter `sourceCreate.name` is required when calling `createSource`.");const c={method:"POST",path:"/1/sources",queryParameters:{},headers:{},data:e};return s.request(c,r)},createTask(e,r){if(!e)throw new Error("Parameter `taskCreate` is required when calling `createTask`.");if(!e.sourceID)throw new Error("Parameter `taskCreate.sourceID` is required when calling `createTask`.");if(!e.destinationID)throw new Error("Parameter `taskCreate.destinationID` is required when calling `createTask`.");if(!e.action)throw new Error("Parameter `taskCreate.action` is required when calling `createTask`.");const c={method:"POST",path:"/2/tasks",queryParameters:{},headers:{},data:e};return s.request(c,r)},createTaskV1(e,r){if(!e)throw new Error("Parameter `taskCreate` is required when calling `createTaskV1`.");if(!e.sourceID)throw new Error("Parameter `taskCreate.sourceID` is required when calling `createTaskV1`.");if(!e.destinationID)throw new Error("Parameter `taskCreate.destinationID` is required when calling `createTaskV1`.");if(!e.trigger)throw new Error("Parameter `taskCreate.trigger` is required when calling `createTaskV1`.");if(!e.action)throw new Error("Parameter `taskCreate.action` is required when calling `createTaskV1`.");const c={method:"POST",path:"/1/tasks",queryParameters:{},headers:{},data:e};return s.request(c,r)},createTransformation(e,r){if(!e)throw new Error("Parameter `transformationCreate` is required when calling `createTransformation`.");if(!e.name)throw new Error("Parameter `transformationCreate.name` is required when calling `createTransformation`.");const c={method:"POST",path:"/1/transformations",queryParameters:{},headers:{},data:e};return s.request(c,r)},customDelete({path:e,parameters:r},o){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");const d={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return s.request(d,o)},customGet({path:e,parameters:r},o){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");const d={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return s.request(d,o)},customPost({path:e,parameters:r,body:o},a){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");const g={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:o||{}};return s.request(g,a)},customPut({path:e,parameters:r,body:o},a){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");const g={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:o||{}};return s.request(g,a)},deleteAuthentication({authenticationID:e},r){if(!e)throw new Error("Parameter `authenticationID` is required when calling `deleteAuthentication`.");const c={method:"DELETE",path:"/1/authentications/{authenticationID}".replace("{authenticationID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return s.request(c,r)},deleteDestination({destinationID:e},r){if(!e)throw new Error("Parameter `destinationID` is required when calling `deleteDestination`.");const c={method:"DELETE",path:"/1/destinations/{destinationID}".replace("{destinationID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return s.request(c,r)},deleteSource({sourceID:e},r){if(!e)throw new Error("Parameter `sourceID` is required when calling `deleteSource`.");const c={method:"DELETE",path:"/1/sources/{sourceID}".replace("{sourceID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return s.request(c,r)},deleteTask({taskID:e},r){if(!e)throw new Error("Parameter `taskID` is required when calling `deleteTask`.");const c={method:"DELETE",path:"/2/tasks/{taskID}".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return s.request(c,r)},deleteTaskV1({taskID:e},r){if(!e)throw new Error("Parameter `taskID` is required when calling `deleteTaskV1`.");const c={method:"DELETE",path:"/1/tasks/{taskID}".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return s.request(c,r)},deleteTransformation({transformationID:e},r){if(!e)throw new Error("Parameter `transformationID` is required when calling `deleteTransformation`.");const c={method:"DELETE",path:"/1/transformations/{transformationID}".replace("{transformationID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return s.request(c,r)},disableTask({taskID:e},r){if(!e)throw new Error("Parameter `taskID` is required when calling `disableTask`.");const c={method:"PUT",path:"/2/tasks/{taskID}/disable".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return s.request(c,r)},disableTaskV1({taskID:e},r){if(!e)throw new Error("Parameter `taskID` is required when calling `disableTaskV1`.");const c={method:"PUT",path:"/1/tasks/{taskID}/disable".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return s.request(c,r)},enableTask({taskID:e},r){if(!e)throw new Error("Parameter `taskID` is required when calling `enableTask`.");const c={method:"PUT",path:"/2/tasks/{taskID}/enable".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return s.request(c,r)},enableTaskV1({taskID:e},r){if(!e)throw new Error("Parameter `taskID` is required when calling `enableTaskV1`.");const c={method:"PUT",path:"/1/tasks/{taskID}/enable".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return s.request(c,r)},getAuthentication({authenticationID:e},r){if(!e)throw new Error("Parameter `authenticationID` is required when calling `getAuthentication`.");const c={method:"GET",path:"/1/authentications/{authenticationID}".replace("{authenticationID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return s.request(c,r)},getDestination({destinationID:e},r){if(!e)throw new Error("Parameter `destinationID` is required when calling `getDestination`.");const c={method:"GET",path:"/1/destinations/{destinationID}".replace("{destinationID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return s.request(c,r)},getEvent({runID:e,eventID:r},o){if(!e)throw new Error("Parameter `runID` is required when calling `getEvent`.");if(!r)throw new Error("Parameter `eventID` is required when calling `getEvent`.");const d={method:"GET",path:"/1/runs/{runID}/events/{eventID}".replace("{runID}",encodeURIComponent(e)).replace("{eventID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return s.request(d,o)},getRun({runID:e},r){if(!e)throw new Error("Parameter `runID` is required when calling `getRun`.");const c={method:"GET",path:"/1/runs/{runID}".replace("{runID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return s.request(c,r)},getSource({sourceID:e},r){if(!e)throw new Error("Parameter `sourceID` is required when calling `getSource`.");const c={method:"GET",path:"/1/sources/{sourceID}".replace("{sourceID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return s.request(c,r)},getTask({taskID:e},r){if(!e)throw new Error("Parameter `taskID` is required when calling `getTask`.");const c={method:"GET",path:"/2/tasks/{taskID}".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return s.request(c,r)},getTaskV1({taskID:e},r){if(!e)throw new Error("Parameter `taskID` is required when calling `getTaskV1`.");const c={method:"GET",path:"/1/tasks/{taskID}".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return s.request(c,r)},getTransformation({transformationID:e},r){if(!e)throw new Error("Parameter `transformationID` is required when calling `getTransformation`.");const c={method:"GET",path:"/1/transformations/{transformationID}".replace("{transformationID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return s.request(c,r)},listAuthentications({itemsPerPage:e,page:r,type:o,platform:a,sort:u,order:c}={},d=void 0){const g="/1/authentications",p={},y={};e!==void 0&&(y.itemsPerPage=e.toString()),r!==void 0&&(y.page=r.toString()),o!==void 0&&(y.type=o.toString()),a!==void 0&&(y.platform=a.toString()),u!==void 0&&(y.sort=u.toString()),c!==void 0&&(y.order=c.toString());const b={method:"GET",path:g,queryParameters:y,headers:p};return s.request(b,d)},listDestinations({itemsPerPage:e,page:r,type:o,authenticationID:a,transformationID:u,sort:c,order:d}={},g=void 0){const p="/1/destinations",y={},b={};e!==void 0&&(b.itemsPerPage=e.toString()),r!==void 0&&(b.page=r.toString()),o!==void 0&&(b.type=o.toString()),a!==void 0&&(b.authenticationID=a.toString()),u!==void 0&&(b.transformationID=u.toString()),c!==void 0&&(b.sort=c.toString()),d!==void 0&&(b.order=d.toString());const w={method:"GET",path:p,queryParameters:b,headers:y};return s.request(w,g)},listEvents({runID:e,itemsPerPage:r,page:o,status:a,type:u,sort:c,order:d,startDate:g,endDate:p},y){if(!e)throw new Error("Parameter `runID` is required when calling `listEvents`.");const b="/1/runs/{runID}/events".replace("{runID}",encodeURIComponent(e)),w={},q={};r!==void 0&&(q.itemsPerPage=r.toString()),o!==void 0&&(q.page=o.toString()),a!==void 0&&(q.status=a.toString()),u!==void 0&&(q.type=u.toString()),c!==void 0&&(q.sort=c.toString()),d!==void 0&&(q.order=d.toString()),g!==void 0&&(q.startDate=g.toString()),p!==void 0&&(q.endDate=p.toString());const v={method:"GET",path:b,queryParameters:q,headers:w};return s.request(v,y)},listRuns({itemsPerPage:e,page:r,status:o,type:a,taskID:u,sort:c,order:d,startDate:g,endDate:p}={},y=void 0){const b="/1/runs",w={},q={};e!==void 0&&(q.itemsPerPage=e.toString()),r!==void 0&&(q.page=r.toString()),o!==void 0&&(q.status=o.toString()),a!==void 0&&(q.type=a.toString()),u!==void 0&&(q.taskID=u.toString()),c!==void 0&&(q.sort=c.toString()),d!==void 0&&(q.order=d.toString()),g!==void 0&&(q.startDate=g.toString()),p!==void 0&&(q.endDate=p.toString());const v={method:"GET",path:b,queryParameters:q,headers:w};return s.request(v,y)},listSources({itemsPerPage:e,page:r,type:o,authenticationID:a,sort:u,order:c}={},d=void 0){const g="/1/sources",p={},y={};e!==void 0&&(y.itemsPerPage=e.toString()),r!==void 0&&(y.page=r.toString()),o!==void 0&&(y.type=o.toString()),a!==void 0&&(y.authenticationID=a.toString()),u!==void 0&&(y.sort=u.toString()),c!==void 0&&(y.order=c.toString());const b={method:"GET",path:g,queryParameters:y,headers:p};return s.request(b,d)},listTasks({itemsPerPage:e,page:r,action:o,enabled:a,sourceID:u,sourceType:c,destinationID:d,triggerType:g,withEmailNotifications:p,sort:y,order:b}={},w=void 0){const q="/2/tasks",v={},S={};e!==void 0&&(S.itemsPerPage=e.toString()),r!==void 0&&(S.page=r.toString()),o!==void 0&&(S.action=o.toString()),a!==void 0&&(S.enabled=a.toString()),u!==void 0&&(S.sourceID=u.toString()),c!==void 0&&(S.sourceType=c.toString()),d!==void 0&&(S.destinationID=d.toString()),g!==void 0&&(S.triggerType=g.toString()),p!==void 0&&(S.withEmailNotifications=p.toString()),y!==void 0&&(S.sort=y.toString()),b!==void 0&&(S.order=b.toString());const A={method:"GET",path:q,queryParameters:S,headers:v};return s.request(A,w)},listTasksV1({itemsPerPage:e,page:r,action:o,enabled:a,sourceID:u,destinationID:c,triggerType:d,sort:g,order:p}={},y=void 0){const b="/1/tasks",w={},q={};e!==void 0&&(q.itemsPerPage=e.toString()),r!==void 0&&(q.page=r.toString()),o!==void 0&&(q.action=o.toString()),a!==void 0&&(q.enabled=a.toString()),u!==void 0&&(q.sourceID=u.toString()),c!==void 0&&(q.destinationID=c.toString()),d!==void 0&&(q.triggerType=d.toString()),g!==void 0&&(q.sort=g.toString()),p!==void 0&&(q.order=p.toString());const v={method:"GET",path:b,queryParameters:q,headers:w};return s.request(v,y)},listTransformations({itemsPerPage:e,page:r,sort:o,order:a,type:u}={},c=void 0){const d="/1/transformations",g={},p={};e!==void 0&&(p.itemsPerPage=e.toString()),r!==void 0&&(p.page=r.toString()),o!==void 0&&(p.sort=o.toString()),a!==void 0&&(p.order=a.toString()),u!==void 0&&(p.type=u.toString());const y={method:"GET",path:d,queryParameters:p,headers:g};return s.request(y,c)},push({indexName:e,pushTaskPayload:r,watch:o,referenceIndexName:a},u){if(!e)throw new Error("Parameter `indexName` is required when calling `push`.");if(!r)throw new Error("Parameter `pushTaskPayload` is required when calling `push`.");if(!r.action)throw new Error("Parameter `pushTaskPayload.action` is required when calling `push`.");if(!r.records)throw new Error("Parameter `pushTaskPayload.records` is required when calling `push`.");const c="/1/push/{indexName}".replace("{indexName}",encodeURIComponent(e)),d={},g={};o!==void 0&&(g.watch=o.toString()),a!==void 0&&(g.referenceIndexName=a.toString());const p={method:"POST",path:c,queryParameters:g,headers:d,data:r};return u={timeouts:{connect:18e4,read:18e4,write:18e4,...u?.timeouts}},s.request(p,u)},pushTask({taskID:e,pushTaskPayload:r,watch:o},a){if(!e)throw new Error("Parameter `taskID` is required when calling `pushTask`.");if(!r)throw new Error("Parameter `pushTaskPayload` is required when calling `pushTask`.");if(!r.action)throw new Error("Parameter `pushTaskPayload.action` is required when calling `pushTask`.");if(!r.records)throw new Error("Parameter `pushTaskPayload.records` is required when calling `pushTask`.");const u="/2/tasks/{taskID}/push".replace("{taskID}",encodeURIComponent(e)),c={},d={};o!==void 0&&(d.watch=o.toString());const g={method:"POST",path:u,queryParameters:d,headers:c,data:r};return a={timeouts:{connect:18e4,read:18e4,write:18e4,...a?.timeouts}},s.request(g,a)},replaceTask({taskID:e,taskReplace:r},o){if(!e)throw new Error("Parameter `taskID` is required when calling `replaceTask`.");if(!r)throw new Error("Parameter `taskReplace` is required when calling `replaceTask`.");if(!r.destinationID)throw new Error("Parameter `taskReplace.destinationID` is required when calling `replaceTask`.");if(!r.action)throw new Error("Parameter `taskReplace.action` is required when calling `replaceTask`.");const d={method:"PUT",path:"/2/tasks/{taskID}".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return s.request(d,o)},runSource({sourceID:e,runSourcePayload:r},o){if(!e)throw new Error("Parameter `sourceID` is required when calling `runSource`.");const d={method:"POST",path:"/1/sources/{sourceID}/run".replace("{sourceID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r||{}};return s.request(d,o)},runTask({taskID:e,runTaskPayload:r},o){if(!e)throw new Error("Parameter `taskID` is required when calling `runTask`.");const d={method:"POST",path:"/2/tasks/{taskID}/run".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r||{}};return s.request(d,o)},runTaskV1({taskID:e,runTaskPayload:r},o){if(!e)throw new Error("Parameter `taskID` is required when calling `runTaskV1`.");const d={method:"POST",path:"/1/tasks/{taskID}/run".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r||{}};return s.request(d,o)},searchAuthentications(e,r){if(!e)throw new Error("Parameter `authenticationSearch` is required when calling `searchAuthentications`.");if(!e.authenticationIDs)throw new Error("Parameter `authenticationSearch.authenticationIDs` is required when calling `searchAuthentications`.");const c={method:"POST",path:"/1/authentications/search",queryParameters:{},headers:{},data:e};return s.request(c,r)},searchDestinations(e,r){if(!e)throw new Error("Parameter `destinationSearch` is required when calling `searchDestinations`.");if(!e.destinationIDs)throw new Error("Parameter `destinationSearch.destinationIDs` is required when calling `searchDestinations`.");const c={method:"POST",path:"/1/destinations/search",queryParameters:{},headers:{},data:e};return s.request(c,r)},searchSources(e,r){if(!e)throw new Error("Parameter `sourceSearch` is required when calling `searchSources`.");if(!e.sourceIDs)throw new Error("Parameter `sourceSearch.sourceIDs` is required when calling `searchSources`.");const c={method:"POST",path:"/1/sources/search",queryParameters:{},headers:{},data:e};return s.request(c,r)},searchTasks(e,r){if(!e)throw new Error("Parameter `taskSearch` is required when calling `searchTasks`.");if(!e.taskIDs)throw new Error("Parameter `taskSearch.taskIDs` is required when calling `searchTasks`.");const c={method:"POST",path:"/2/tasks/search",queryParameters:{},headers:{},data:e};return s.request(c,r)},searchTasksV1(e,r){if(!e)throw new Error("Parameter `taskSearch` is required when calling `searchTasksV1`.");if(!e.taskIDs)throw new Error("Parameter `taskSearch.taskIDs` is required when calling `searchTasksV1`.");const c={method:"POST",path:"/1/tasks/search",queryParameters:{},headers:{},data:e};return s.request(c,r)},searchTransformations(e,r){if(!e)throw new Error("Parameter `transformationSearch` is required when calling `searchTransformations`.");if(!e.transformationIDs)throw new Error("Parameter `transformationSearch.transformationIDs` is required when calling `searchTransformations`.");const c={method:"POST",path:"/1/transformations/search",queryParameters:{},headers:{},data:e};return s.request(c,r)},triggerDockerSourceDiscover({sourceID:e},r){if(!e)throw new Error("Parameter `sourceID` is required when calling `triggerDockerSourceDiscover`.");const c={method:"POST",path:"/1/sources/{sourceID}/discover".replace("{sourceID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return r={timeouts:{connect:18e4,read:18e4,write:18e4,...r?.timeouts}},s.request(c,r)},tryTransformation(e,r){if(!e)throw new Error("Parameter `transformationTry` is required when calling `tryTransformation`.");if(!e.sampleRecord)throw new Error("Parameter `transformationTry.sampleRecord` is required when calling `tryTransformation`.");const c={method:"POST",path:"/1/transformations/try",queryParameters:{},headers:{},data:e};return s.request(c,r)},tryTransformationBeforeUpdate({transformationID:e,transformationTry:r},o){if(!e)throw new Error("Parameter `transformationID` is required when calling `tryTransformationBeforeUpdate`.");if(!r)throw new Error("Parameter `transformationTry` is required when calling `tryTransformationBeforeUpdate`.");if(!r.sampleRecord)throw new Error("Parameter `transformationTry.sampleRecord` is required when calling `tryTransformationBeforeUpdate`.");const d={method:"POST",path:"/1/transformations/{transformationID}/try".replace("{transformationID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return s.request(d,o)},updateAuthentication({authenticationID:e,authenticationUpdate:r},o){if(!e)throw new Error("Parameter `authenticationID` is required when calling `updateAuthentication`.");if(!r)throw new Error("Parameter `authenticationUpdate` is required when calling `updateAuthentication`.");const d={method:"PATCH",path:"/1/authentications/{authenticationID}".replace("{authenticationID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return s.request(d,o)},updateDestination({destinationID:e,destinationUpdate:r},o){if(!e)throw new Error("Parameter `destinationID` is required when calling `updateDestination`.");if(!r)throw new Error("Parameter `destinationUpdate` is required when calling `updateDestination`.");const d={method:"PATCH",path:"/1/destinations/{destinationID}".replace("{destinationID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return s.request(d,o)},updateSource({sourceID:e,sourceUpdate:r},o){if(!e)throw new Error("Parameter `sourceID` is required when calling `updateSource`.");if(!r)throw new Error("Parameter `sourceUpdate` is required when calling `updateSource`.");const d={method:"PATCH",path:"/1/sources/{sourceID}".replace("{sourceID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return s.request(d,o)},updateTask({taskID:e,taskUpdate:r},o){if(!e)throw new Error("Parameter `taskID` is required when calling `updateTask`.");if(!r)throw new Error("Parameter `taskUpdate` is required when calling `updateTask`.");const d={method:"PATCH",path:"/2/tasks/{taskID}".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return s.request(d,o)},updateTaskV1({taskID:e,taskUpdate:r},o){if(!e)throw new Error("Parameter `taskID` is required when calling `updateTaskV1`.");if(!r)throw new Error("Parameter `taskUpdate` is required when calling `updateTaskV1`.");const d={method:"PATCH",path:"/1/tasks/{taskID}".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return s.request(d,o)},updateTransformation({transformationID:e,transformationCreate:r},o){if(!e)throw new Error("Parameter `transformationID` is required when calling `updateTransformation`.");if(!r)throw new Error("Parameter `transformationCreate` is required when calling `updateTransformation`.");if(!r.name)throw new Error("Parameter `transformationCreate.name` is required when calling `updateTransformation`.");const d={method:"PUT",path:"/1/transformations/{transformationID}".replace("{transformationID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return s.request(d,o)},validateSource(e,r=void 0){const c={method:"POST",path:"/1/sources/validate",queryParameters:{},headers:{},data:e||{}};return r={timeouts:{connect:18e4,read:18e4,write:18e4,...r?.timeouts}},s.request(c,r)},validateSourceBeforeUpdate({sourceID:e,sourceUpdate:r},o){if(!e)throw new Error("Parameter `sourceID` is required when calling `validateSourceBeforeUpdate`.");if(!r)throw new Error("Parameter `sourceUpdate` is required when calling `validateSourceBeforeUpdate`.");const d={method:"POST",path:"/1/sources/{sourceID}/validate".replace("{sourceID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return o={timeouts:{connect:18e4,read:18e4,write:18e4,...o?.timeouts}},s.request(d,o)}}}function Xt(t,n,i,l){if(!t||typeof t!="string")throw new Error("`appId` is missing.");if(!n||typeof n!="string")throw new Error("`apiKey` is missing.");if(!i||i&&(typeof i!="string"||!fs.includes(i)))throw new Error(`\`region\` is required and must be one of the following: ${fs.join(", ")}`);return Oi({appId:t,apiKey:n,region:i,timeouts:{connect:25e3,read:25e3,write:25e3},logger:me(),requester:ue(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:H(),requestsCache:H({serializable:!1}),hostsCache:Z({caches:[le({key:`${br}-${t}`}),H()]}),...l})}const Ui=Object.freeze(Object.defineProperty({__proto__:null,apiClientVersion:br,ingestionClient:Xt,isOnDemandTrigger:xi,isScheduleTrigger:ki,isSubscriptionTrigger:Di},Symbol.toStringTag,{value:"Module"}));var Tr="1.41.0";function _i(){return[{url:"status.algolia.com",accept:"readWrite",protocol:"https"}]}function ji({appId:t,apiKey:n,authMode:i,algoliaAgents:l,...m}){const f=de(t,n,i),h=fe({hosts:_i(),...m,algoliaAgent:he({algoliaAgents:l,client:"Monitoring",version:Tr}),baseHeaders:{"content-type":"text/plain",...f.headers(),...m.baseHeaders},baseQueryParameters:{...f.queryParameters(),...m.baseQueryParameters}});return{transporter:h,appId:t,apiKey:n,clearCache(){return Promise.all([h.requestsCache.clear(),h.responsesCache.clear()]).then(()=>{})},get _ua(){return h.algoliaAgent.value},addAlgoliaAgent(s,e){h.algoliaAgent.add({segment:s,version:e})},setClientApiKey({apiKey:s}){!i||i==="WithinHeaders"?h.baseHeaders["x-algolia-api-key"]=s:h.baseQueryParameters["x-algolia-api-key"]=s},customDelete({path:s,parameters:e},r){if(!s)throw new Error("Parameter `path` is required when calling `customDelete`.");const c={method:"DELETE",path:"/{path}".replace("{path}",s),queryParameters:e||{},headers:{}};return h.request(c,r)},customGet({path:s,parameters:e},r){if(!s)throw new Error("Parameter `path` is required when calling `customGet`.");const c={method:"GET",path:"/{path}".replace("{path}",s),queryParameters:e||{},headers:{}};return h.request(c,r)},customPost({path:s,parameters:e,body:r},o){if(!s)throw new Error("Parameter `path` is required when calling `customPost`.");const d={method:"POST",path:"/{path}".replace("{path}",s),queryParameters:e||{},headers:{},data:r||{}};return h.request(d,o)},customPut({path:s,parameters:e,body:r},o){if(!s)throw new Error("Parameter `path` is required when calling `customPut`.");const d={method:"PUT",path:"/{path}".replace("{path}",s),queryParameters:e||{},headers:{},data:r||{}};return h.request(d,o)},getClusterIncidents({clusters:s},e){if(!s)throw new Error("Parameter `clusters` is required when calling `getClusterIncidents`.");const u={method:"GET",path:"/1/incidents/{clusters}".replace("{clusters}",encodeURIComponent(s)),queryParameters:{},headers:{}};return h.request(u,e)},getClusterStatus({clusters:s},e){if(!s)throw new Error("Parameter `clusters` is required when calling `getClusterStatus`.");const u={method:"GET",path:"/1/status/{clusters}".replace("{clusters}",encodeURIComponent(s)),queryParameters:{},headers:{}};return h.request(u,e)},getIncidents(s){const a={method:"GET",path:"/1/incidents",queryParameters:{},headers:{}};return h.request(a,s)},getIndexingTime({clusters:s},e){if(!s)throw new Error("Parameter `clusters` is required when calling `getIndexingTime`.");const u={method:"GET",path:"/1/indexing/{clusters}".replace("{clusters}",encodeURIComponent(s)),queryParameters:{},headers:{}};return h.request(u,e)},getLatency({clusters:s},e){if(!s)throw new Error("Parameter `clusters` is required when calling `getLatency`.");const u={method:"GET",path:"/1/latency/{clusters}".replace("{clusters}",encodeURIComponent(s)),queryParameters:{},headers:{}};return h.request(u,e)},getMetrics({metric:s,period:e},r){if(!s)throw new Error("Parameter `metric` is required when calling `getMetrics`.");if(!e)throw new Error("Parameter `period` is required when calling `getMetrics`.");const c={method:"GET",path:"/1/infrastructure/{metric}/period/{period}".replace("{metric}",encodeURIComponent(s)).replace("{period}",encodeURIComponent(e)),queryParameters:{},headers:{}};return h.request(c,r)},getReachability({clusters:s},e){if(!s)throw new Error("Parameter `clusters` is required when calling `getReachability`.");const u={method:"GET",path:"/1/reachability/{clusters}/probes".replace("{clusters}",encodeURIComponent(s)),queryParameters:{},headers:{}};return h.request(u,e)},getServers(s){const a={method:"GET",path:"/1/inventory/servers",queryParameters:{},headers:{}};return h.request(a,s)},getStatus(s){const a={method:"GET",path:"/1/status",queryParameters:{},headers:{}};return h.request(a,s)}}}function gn(t,n,i){if(!t||typeof t!="string")throw new Error("`appId` is missing.");if(!n||typeof n!="string")throw new Error("`apiKey` is missing.");return ji({appId:t,apiKey:n,timeouts:{connect:1e3,read:2e3,write:3e4},logger:me(),requester:ue(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:H(),requestsCache:H({serializable:!1}),hostsCache:Z({caches:[le({key:`${Tr}-${t}`}),H()]}),...i})}const Ni=Object.freeze(Object.defineProperty({__proto__:null,apiClientVersion:Tr,monitoringClient:gn},Symbol.toStringTag,{value:"Module"}));var Ir="5.41.0";function $i(t){return[{url:`${t}-dsn.algolia.net`,accept:"read",protocol:"https"},{url:`${t}.algolia.net`,accept:"write",protocol:"https"}].concat(an([{url:`${t}-1.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${t}-2.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${t}-3.algolianet.com`,accept:"readWrite",protocol:"https"}]))}function Mi({appId:t,apiKey:n,authMode:i,algoliaAgents:l,...m}){const f=de(t,n,i),h=fe({hosts:$i(t),...m,algoliaAgent:he({algoliaAgents:l,client:"Recommend",version:Ir}),baseHeaders:{"content-type":"text/plain",...f.headers(),...m.baseHeaders},baseQueryParameters:{...f.queryParameters(),...m.baseQueryParameters}});return{transporter:h,appId:t,apiKey:n,clearCache(){return Promise.all([h.requestsCache.clear(),h.responsesCache.clear()]).then(()=>{})},get _ua(){return h.algoliaAgent.value},addAlgoliaAgent(s,e){h.algoliaAgent.add({segment:s,version:e})},setClientApiKey({apiKey:s}){!i||i==="WithinHeaders"?h.baseHeaders["x-algolia-api-key"]=s:h.baseQueryParameters["x-algolia-api-key"]=s},batchRecommendRules({indexName:s,model:e,recommendRule:r},o){if(!s)throw new Error("Parameter `indexName` is required when calling `batchRecommendRules`.");if(!e)throw new Error("Parameter `model` is required when calling `batchRecommendRules`.");const d={method:"POST",path:"/1/indexes/{indexName}/{model}/recommend/rules/batch".replace("{indexName}",encodeURIComponent(s)).replace("{model}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r||{}};return h.request(d,o)},customDelete({path:s,parameters:e},r){if(!s)throw new Error("Parameter `path` is required when calling `customDelete`.");const c={method:"DELETE",path:"/{path}".replace("{path}",s),queryParameters:e||{},headers:{}};return h.request(c,r)},customGet({path:s,parameters:e},r){if(!s)throw new Error("Parameter `path` is required when calling `customGet`.");const c={method:"GET",path:"/{path}".replace("{path}",s),queryParameters:e||{},headers:{}};return h.request(c,r)},customPost({path:s,parameters:e,body:r},o){if(!s)throw new Error("Parameter `path` is required when calling `customPost`.");const d={method:"POST",path:"/{path}".replace("{path}",s),queryParameters:e||{},headers:{},data:r||{}};return h.request(d,o)},customPut({path:s,parameters:e,body:r},o){if(!s)throw new Error("Parameter `path` is required when calling `customPut`.");const d={method:"PUT",path:"/{path}".replace("{path}",s),queryParameters:e||{},headers:{},data:r||{}};return h.request(d,o)},deleteRecommendRule({indexName:s,model:e,objectID:r},o){if(!s)throw new Error("Parameter `indexName` is required when calling `deleteRecommendRule`.");if(!e)throw new Error("Parameter `model` is required when calling `deleteRecommendRule`.");if(!r)throw new Error("Parameter `objectID` is required when calling `deleteRecommendRule`.");const d={method:"DELETE",path:"/1/indexes/{indexName}/{model}/recommend/rules/{objectID}".replace("{indexName}",encodeURIComponent(s)).replace("{model}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return h.request(d,o)},getRecommendRule({indexName:s,model:e,objectID:r},o){if(!s)throw new Error("Parameter `indexName` is required when calling `getRecommendRule`.");if(!e)throw new Error("Parameter `model` is required when calling `getRecommendRule`.");if(!r)throw new Error("Parameter `objectID` is required when calling `getRecommendRule`.");const d={method:"GET",path:"/1/indexes/{indexName}/{model}/recommend/rules/{objectID}".replace("{indexName}",encodeURIComponent(s)).replace("{model}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return h.request(d,o)},getRecommendStatus({indexName:s,model:e,taskID:r},o){if(!s)throw new Error("Parameter `indexName` is required when calling `getRecommendStatus`.");if(!e)throw new Error("Parameter `model` is required when calling `getRecommendStatus`.");if(!r)throw new Error("Parameter `taskID` is required when calling `getRecommendStatus`.");const d={method:"GET",path:"/1/indexes/{indexName}/{model}/task/{taskID}".replace("{indexName}",encodeURIComponent(s)).replace("{model}",encodeURIComponent(e)).replace("{taskID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return h.request(d,o)},getRecommendations(s,e){if(s&&Array.isArray(s)&&(s={requests:s}),!s)throw new Error("Parameter `getRecommendationsParams` is required when calling `getRecommendations`.");if(!s.requests)throw new Error("Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.");const u={method:"POST",path:"/1/indexes/*/recommendations",queryParameters:{},headers:{},data:s,useReadTransporter:!0,cacheable:!0};return h.request(u,e)},searchRecommendRules({indexName:s,model:e,searchRecommendRulesParams:r},o){if(!s)throw new Error("Parameter `indexName` is required when calling `searchRecommendRules`.");if(!e)throw new Error("Parameter `model` is required when calling `searchRecommendRules`.");const d={method:"POST",path:"/1/indexes/{indexName}/{model}/recommend/rules/search".replace("{indexName}",encodeURIComponent(s)).replace("{model}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r||{},useReadTransporter:!0,cacheable:!0};return h.request(d,o)}}}function pn(t,n,i){if(!t||typeof t!="string")throw new Error("`appId` is missing.");if(!n||typeof n!="string")throw new Error("`apiKey` is missing.");return Mi({appId:t,apiKey:n,timeouts:{connect:1e3,read:2e3,write:3e4},logger:me(),requester:ue(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:H(),requestsCache:H({serializable:!1}),hostsCache:Z({caches:[le({key:`${Ir}-${t}`}),H()]}),...i})}const Qi=Object.freeze(Object.defineProperty({__proto__:null,apiClientVersion:Ir,recommendClient:pn},Symbol.toStringTag,{value:"Module"}));var qn=Object.defineProperty,Bi=Object.getOwnPropertyDescriptor,Li=Object.getOwnPropertyNames,Fi=Object.prototype.hasOwnProperty,Pn=(t,n)=>{for(var i in n)qn(t,i,{get:n[i],enumerable:!0})},Gi=(t,n,i,l)=>{if(n&&typeof n=="object"||typeof n=="function")for(let m of Li(n))!Fi.call(t,m)&&m!==i&&qn(t,m,{get:()=>n[m],enumerable:!(l=Bi(n,m))||l.enumerable});return t},ae=(t,n,i)=>(Gi(t,n,"default"),i),wn={};Pn(wn,{algoliasearch:()=>Zt,apiClientVersion:()=>et});var te={};Pn(te,{apiClientVersion:()=>et});ae(te,li);ae(te,mi);ae(te,pi);ae(te,wi);ae(te,Si);ae(te,Ti);ae(te,Ci);ae(te,Ui);ae(te,Ni);ae(te,Qi);ae(wn,te);function Zt(t,n,i){if(!t||typeof t!="string")throw new Error("`appId` is missing.");if(!n||typeof n!="string")throw new Error("`apiKey` is missing.");const l=fn(t,n,i);let m;if(i?.transformation){if(!i.transformation.region)throw new Error("`region` must be provided when leveraging the transformation pipeline");m=Xt(t,n,i.transformation.region,i)}return{...l,async saveObjectsWithTransformation({indexName:f,objects:h,waitForTasks:s},e){if(!m)throw new Error("`transformation.region` must be provided at client instantiation before calling this method.");if(!i?.transformation?.region)throw new Error("`region` must be provided when leveraging the transformation pipeline");return m.chunkedPush({indexName:f,objects:h,action:"addObject",waitForTasks:s},e)},async partialUpdateObjectsWithTransformation({indexName:f,objects:h,createIfNotExists:s,waitForTasks:e},r){if(!m)throw new Error("`transformation.region` must be provided at client instantiation before calling this method.");if(!i?.transformation?.region)throw new Error("`region` must be provided when leveraging the transformation pipeline");return m.chunkedPush({indexName:f,objects:h,action:s?"partialUpdateObject":"partialUpdateObjectNoCreate",waitForTasks:e},r)},async replaceAllObjectsWithTransformation({indexName:f,objects:h,batchSize:s,scopes:e},r){if(!m)throw new Error("`transformation.region` must be provided at client instantiation before calling this method.");if(!i?.transformation?.region)throw new Error("`region` must be provided when leveraging the transformation pipeline");const o=Math.floor(Math.random()*1e6)+1e5,a=`${f}_tmp_${o}`;e===void 0&&(e=["settings","rules","synonyms"]);try{let u=await this.operationIndex({indexName:f,operationIndexParams:{operation:"copy",destination:a,scope:e}},r);const c=await m.chunkedPush({indexName:a,objects:h,waitForTasks:!0,batchSize:s,referenceIndexName:f},r);await this.waitForTask({indexName:a,taskID:u.taskID}),u=await this.operationIndex({indexName:f,operationIndexParams:{operation:"copy",destination:a,scope:e}},r),await this.waitForTask({indexName:a,taskID:u.taskID});const d=await this.operationIndex({indexName:a,operationIndexParams:{operation:"move",destination:f}},r);return await this.waitForTask({indexName:a,taskID:d.taskID}),{copyOperationResponse:u,watchResponses:c,moveOperationResponse:d}}catch(u){throw await this.deleteIndex({indexName:a}),u}},get _ua(){return l.transporter.algoliaAgent.value},initAbtesting:f=>un(f.appId||t,f.apiKey||n,f.region,f.options),initAbtestingV3:f=>cn(f.appId||t,f.apiKey||n,f.region,f.options),initAnalytics:f=>ln(f.appId||t,f.apiKey||n,f.region,f.options),initIngestion:f=>Xt(f.appId||t,f.apiKey||n,f.region,f.options),initInsights:f=>dn(f.appId||t,f.apiKey||n,f.region,f.options),initMonitoring:(f={})=>gn(f.appId||t,f.apiKey||n,f.options),initPersonalization:f=>hn(f.appId||t,f.apiKey||n,f.region,f.options),initQuerySuggestions:f=>mn(f.appId||t,f.apiKey||n,f.region,f.options),initRecommend:(f={})=>pn(f.appId||t,f.apiKey||n,f.options)}}const gs=Ee("ALGOLIA_APP_ID")||"",ps=Ee("ALGOLIA_API_KEY")||"",qs=Ee("ALGOLIA_BLOG_INDEX")||"decentraland-blog",Hi=wt.injectEndpoints({endpoints:t=>({searchBlogPosts:t.query({queryFn:async({query:n,hitsPerPage:i=10,page:l=0})=>{try{if(n.length<3)return{data:{results:[],total:0,hasMore:!1}};const f=await Zt(gs,ps).searchSingleIndex({indexName:qs,searchParams:{query:n,hitsPerPage:i,page:l}}),h=f.hits||[];return{data:{results:await Promise.all(h.map(async e=>{const o=e.imageObject?.sys?.id||"",u=e.categoryObject?.sys?.id||"",[c,d]=await Promise.all([ss(o),ns(u)]);return{url:`/blog/${d}/${e.id}`,image:c,title:e._highlightResult?.title?.value||e.title,description:e._highlightResult?.description?.value||e.description}})),total:f.nbHits||0,hasMore:(l+1)*i<(f.nbHits||0)}}}catch(m){return{error:{status:"CUSTOM_ERROR",error:m instanceof Error?m.message:"Unknown error"}}}},providesTags:(n,i,l)=>[{type:"SearchResults",id:l.query}]}),searchBlog:t.query({queryFn:async({query:n,hitsPerPage:i=10,page:l=0})=>{try{if(n.length<3)return{data:[]};const h=(await Zt(gs,ps).searchSingleIndex({indexName:qs,searchParams:{query:n,hitsPerPage:i,page:l}})).hits||[];return{data:await Promise.all(h.map(async e=>{const o=e.imageObject?.sys?.id||"",u=e.categoryObject?.sys?.id||"",[c,d]=await Promise.all([ss(o),ns(u)]);return{id:e.id,categoryId:d,url:`/blog/${d}/${e.id}`,image:c,highlightedTitle:e._highlightResult?.title?.value||e.title,highlightedDescription:e._highlightResult?.description?.value||e.description}}))}}catch(m){return{error:{status:"CUSTOM_ERROR",error:m instanceof Error?m.message:"Unknown error"}}}},providesTags:(n,i,l)=>[{type:"SearchResults",id:l.query}]})}),overrideExisting:!1}),{useSearchBlogPostsQuery:uu,useSearchBlogQuery:zi}=Hi,{Link:yn}=await B("react-router-dom"),{Box:ee,dclColors:Rr,styled:J}=await B("decentraland-ui2"),Wi=J(ee,{shouldForwardProp:t=>t!=="$hasResults"})(({theme:t,$hasResults:n})=>({position:"relative",width:"auto",zIndex:n?t.zIndex.modal:1,[t.breakpoints.down("sm")]:{width:"100%"}})),Vi=J(ee)(({theme:t})=>({position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",zIndex:t.zIndex.modal-1})),Ki=J(ee)(()=>({position:"relative",display:"flex",alignItems:"center",width:"100%"})),Ji=J(ee)(({theme:t})=>({width:"300px",padding:`${t.spacing(1.5)} ${t.spacing(5)} ${t.spacing(1.5)} ${t.spacing(2)}`,border:"1px solid rgba(255, 255, 255, 0.15)",borderRadius:t.spacing(1),backgroundColor:"rgba(255, 255, 255, 0.05)",color:t.palette.text.primary,fontSize:"15px",outline:"none",transition:"all 200ms ease","&::placeholder":{color:"rgba(255, 255, 255, 0.5)"},"&:focus":{backgroundColor:"rgba(255, 255, 255, 0.08)",borderColor:"rgba(255, 255, 255, 0.25)"},"@media (max-width: 1450px)":{width:"100%",marginBottom:t.spacing(2)}})).withComponent("input"),Yi=J(ee)(({theme:t})=>({position:"absolute",right:t.spacing(1.5),top:"50%",transform:"translateY(-50%)",background:"none",border:"none",color:"rgba(255, 255, 255, 0.5)",fontSize:"24px",cursor:"pointer",padding:t.spacing(.5),lineHeight:1,transition:"color 200ms ease","&:hover":{color:t.palette.text.primary}})).withComponent("button"),Xi=J(ee)(({theme:t})=>({position:"absolute",top:`calc(100% + ${t.spacing(1)})`,right:0,width:"500px",maxWidth:"90vw",backgroundColor:t.palette.background.paper,borderRadius:t.spacing(1.5),boxShadow:"0 8px 24px rgba(0, 0, 0, 0.4)",listStyleType:"none",margin:0,padding:t.spacing(1),maxHeight:"600px",overflowY:"auto",zIndex:t.zIndex.modal+1,"@media (max-width: 1450px)":{width:`calc(100vw - ${t.spacing(6)})`,left:0,right:"auto"}})).withComponent("ul"),Zi=J(ee,{shouldForwardProp:t=>t!=="$selected"})(({theme:t,$selected:n})=>({borderRadius:t.spacing(1),backgroundColor:n?t.palette.action.hover:"transparent",transition:"background-color 200ms ease",marginBottom:t.spacing(.5),"&:last-child":{marginBottom:0}})).withComponent("li"),ec=J(yn)(({theme:t})=>({display:"flex",padding:t.spacing(1.5),textDecoration:"none",color:"inherit",gap:t.spacing(1.5)})),tc=J(ee,{shouldForwardProp:t=>t!=="$image"})(({theme:t,$image:n})=>({width:"80px",height:"80px",flexShrink:0,borderRadius:t.spacing(1),backgroundColor:"rgba(255, 255, 255, 0.05)",backgroundImage:n?`url(${n})`:"none",backgroundSize:"cover",backgroundPosition:"center"})),rc=J(ee)(({theme:t})=>({flex:1,display:"flex",flexDirection:"column",gap:t.spacing(.5),overflow:"hidden"})),sc=J(ee)(({theme:t})=>({color:t.palette.text.primary,fontSize:"15px",fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap","& em":{fontStyle:"normal",color:Rr.base.primary}})),nc=J(ee)(({theme:t})=>({color:t.palette.text.secondary,fontSize:"13px",lineHeight:"1.5",overflow:"hidden",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical","& em":{fontStyle:"normal",color:Rr.base.primary}})),Lt=J(ee)(({theme:t})=>({display:"flex",flexDirection:"column",alignItems:"center",padding:`${t.spacing(5)} ${t.spacing(2.5)}`,textAlign:"center",color:t.palette.text.secondary,"& strong":{color:t.palette.text.primary,fontSize:"17px",marginBottom:t.spacing(1)},"& span":{fontSize:"15px"}})).withComponent("li"),Ps=J(ee)(({theme:t})=>({fontSize:"48px",marginBottom:t.spacing(2),opacity:.5})),ac=J(ee,{shouldForwardProp:t=>t!=="$selected"})(({theme:t,$selected:n})=>({borderRadius:t.spacing(1),backgroundColor:n?t.palette.action.hover:"transparent",transition:"background-color 200ms ease",marginTop:t.spacing(.5)})).withComponent("li"),oc=J(yn)(({theme:t})=>({display:"block",padding:t.spacing(1.5),textAlign:"center",color:Rr.base.primary,fontSize:"15px",fontWeight:500,textDecoration:"none",transition:"opacity 200ms ease","&:hover":{opacity:.8}})),{useCallback:ws,useEffect:ic,useState:Ft}=await B("react"),{useNavigate:cc}=await B("react-router-dom"),{useTranslation:uc}=await B("@dcl/hooks");function lc(t,n){if(typeof t=="object"&&t!==null&&"error"in t){const i=t.error;if(typeof i=="string")return i}return n}const dc=({placeholder:t,onClose:n})=>{const{t:i}=uc(),l=cc(),[m,f]=Ft(""),[h,s]=Ft(-1),[e,r]=Ft("");ic(()=>{const b=setTimeout(()=>{r(m)},300);return()=>clearTimeout(b)},[m]);const{data:o=[],isLoading:a,error:u,isError:c}=zi({query:e,hitsPerPage:5,page:0},{skip:e.trim().length<=2}),d=ws(()=>{f(""),s(-1),n?.()},[n]),g=ws(b=>{const w=o.length>3?4:o.length;if(b.key==="ArrowUp")b.preventDefault(),s(q=>q<=0?w:q-1);else if(b.key==="ArrowDown")b.preventDefault(),s(q=>q>=w?0:q+1);else if(b.key==="Enter"){if(b.preventDefault(),h===4||h===-1)l(`/blog/search?q=${encodeURIComponent(m)}`);else if(h>=0&&o[h]){const q=o[h];l(`/blog/${q.categoryId}/${q.id}`)}d()}else b.key==="Escape"&&d()},[m,h,o,l,d]),p=m.trim().length>2,y=o.length>0;return j.jsxs(Wi,{$hasResults:p,children:[p&&j.jsx(Vi,{onClick:d}),j.jsxs(Ki,{children:[j.jsx(Ji,{type:"text",value:m,onChange:b=>f(b.target.value),onKeyDown:g,placeholder:t||i("search.placeholder")}),m&&j.jsx(Yi,{onClick:d,"aria-label":i("search.clear"),children:"×"})]}),p&&j.jsxs(Xi,{children:[a&&j.jsx(Lt,{children:j.jsx("span",{children:i("search.searching")})}),!a&&c&&j.jsxs(Lt,{children:[j.jsx(Ps,{children:"⚠️"}),j.jsx("strong",{children:i("search.error")}),j.jsx("span",{children:lc(u,i("error.generic"))})]}),!a&&!c&&!y&&j.jsxs(Lt,{children:[j.jsx(Ps,{children:"🔍"}),j.jsx("strong",{children:i("search.no_matches")}),j.jsx("span",{children:i("search.try_something_else")})]}),!a&&!c&&y&&o.slice(0,4).map((b,w)=>j.jsx(Zi,{$selected:w===h,onMouseEnter:()=>s(w),children:j.jsxs(ec,{to:`/blog/${b.categoryId}/${b.id}`,onClick:d,children:[j.jsx(tc,{$image:b.image}),j.jsxs(rc,{children:[j.jsx(sc,{dangerouslySetInnerHTML:{__html:b.highlightedTitle}}),j.jsx(nc,{dangerouslySetInnerHTML:{__html:b.highlightedDescription}})]})]})},b.id)),!a&&!c&&o.length>4&&j.jsx(ac,{$selected:h===4,onMouseEnter:()=>s(4),children:j.jsx(oc,{to:`/blog/search?q=${encodeURIComponent(m)}`,onClick:d,children:i("search.see_more_results")})})]})]})},{Link:hc}=await B("react-router-dom"),{Box:Ne,dclColors:mc,styled:Ae}=await B("decentraland-ui2"),fc="96px",gc=Ae(Ne,{shouldForwardProp:t=>t!=="$embedded"})(({$embedded:t})=>({width:"100%",...t&&{marginTop:fc}})),pc=Ae(Ne)(({theme:t})=>({paddingTop:t.spacing(2),height:"84px",position:"relative",borderBottom:"1px solid",borderColor:t.palette.divider,display:"flex","@media (max-width: 1450px)":{height:"auto"}})),qc=Ae(Ne)(({theme:t})=>({display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%",margin:"0 auto",padding:`0 ${t.spacing(3)}`,"@media (max-width: 1450px)":{flexDirection:"column-reverse",alignItems:"flex-start"}})),Pc=Ae(Ne)(({theme:t})=>({overflowX:"auto",overflowY:"hidden",width:"auto","@media (max-width: 1450px)":{width:"100%",paddingBottom:t.spacing(1)}})).withComponent("nav"),wc=Ae(Ne)(()=>({display:"flex",flexDirection:"row",listStyleType:"none",margin:0,padding:0,minWidth:"210px"})).withComponent("ul"),ys=Ae(Ne)(({theme:t})=>({marginRight:t.spacing(4),whiteSpace:"nowrap"})).withComponent("li"),vs=Ae(hc,{shouldForwardProp:t=>t!=="$active"})(({theme:t,$active:n})=>({color:t.palette.text.primary,display:"flex",alignItems:"center",fontSize:"17px",fontWeight:n?700:400,height:"64px",padding:0,position:"relative",textDecoration:"none",WebkitTapHighlightColor:"transparent","&::after":{content:'""',position:"absolute",height:"1px",backgroundColor:mc.base.primary,left:0,right:0,bottom:0,opacity:n?1:0,transition:"opacity 250ms ease"},"&:hover::after":{opacity:1}})),{useCallback:yc,useMemo:vc}=await B("react"),{useLocation:Sc}=await B("react-router-dom"),{useTranslation:Ec}=await B("@dcl/hooks"),Ss=({active:t,embedded:n})=>{const{t:i}=Ec(),l=Sc(),{data:m=[]}=Uo(),f=vc(()=>m.filter(s=>s.isShownInMenu),[m]),h=yc(s=>t?t==="all_articles"&&s==="/blog"?!0:`/blog/${t}`===s:l.pathname===s,[t,l.pathname]);return j.jsx(gc,{$embedded:n,children:j.jsx(pc,{children:j.jsxs(qc,{children:[j.jsx(Pc,{children:j.jsxs(wc,{children:[j.jsx(ys,{children:j.jsx(vs,{to:"/blog",$active:h("/blog")||t==="all_articles",children:i("blog.all_articles")})}),f.map(s=>j.jsx(ys,{children:j.jsx(vs,{to:`/blog/${s.slug}`,$active:h(`/blog/${s.slug}`),children:s.title})},s.id))]})}),j.jsx(dc,{})]})})})},{createContext:bc,useContext:lu}=await B("react"),Tc=bc(!0),{Box:vn,styled:Sn}=await B("decentraland-ui2"),Ic="66px",Rc=Sn(vn)(()=>({minHeight:"100vh",display:"flex",flexDirection:"column",paddingTop:Ic})),Es=Sn(vn)(({theme:t})=>({flex:1,padding:t.spacing(5,0,2,0),maxWidth:t.spacing(133),margin:"0 auto",[t.breakpoints.down("md")]:{padding:t.spacing(5,2,2,2)}})),{useCallback:bs,useContext:Cc,useMemo:Ts}=await B("react"),{useLocation:Ac}=await B("react-router-dom"),{useTokenBalance:Is}=await B("@dcl/core-web3"),{useWalletState:xc}=await B("@dcl/core-web3/lazy"),{usePageTracking:kc}=await B("@dcl/hooks"),{ChainId:lt,Network:Rs}=await B("@dcl/schemas"),{Footer:Dc,FooterLanding:Oc,Navbar:Uc,SupportedLanguage:_c}=await B("decentraland-ui2"),Cs=In.is(Tn.PRODUCTION),As=t=>{if(t===null)return;const n=Number(t);return Number.isFinite(n)?n:void 0};function du(t){const{children:n,activeCategory:i,banner:l,showBlogNavigation:m=!1,relatedPosts:f}=t,h=Cc(Tc),s=Ac(),{address:e,isConnected:r,isConnecting:o,isDisconnecting:a,disconnect:u}=xc();kc(s.pathname);const{identity:c}=zo(),{notificationProps:d}=Lo({identity:c,isConnected:r,locale:"en"}),{balance:g}=Is({tokenAddress:Ee("MANA_TOKEN_ADDRESS_ETHEREUM"),chainId:Cs?lt.ETHEREUM_MAINNET:lt.ETHEREUM_SEPOLIA}),{balance:p}=Is({tokenAddress:Ee("MANA_TOKEN_ADDRESS_MATIC"),chainId:Cs?lt.MATIC_MAINNET:lt.MATIC_AMOY}),{data:y}=yo(e??void 0,{skip:!e}),b=y?.avatars?.[0],w=Ts(()=>{if(!r)return{};const A={},x=As(g),R=As(p);return x!==void 0&&(A[Rs.ETHEREUM]=x),R!==void 0&&(A[Rs.MATIC]=R),A},[r,g,p]),q=bs(()=>{Rn()},[]),v=bs(()=>{u()},[u]),S=Ts(()=>({activePage:"learn",isSignedIn:r,isSigningIn:o,isDisconnecting:a,address:e||void 0,avatar:b,manaBalances:w,notifications:d,onClickSignIn:q,onClickSignOut:v,onClickNavbarItem:A=>{const x=A.currentTarget;x?.href&&(window.location.href=x.href)}}),[r,o,a,e,b,w,d,q,v]);return h?j.jsxs(Rc,{children:[j.jsx(Uc,{...S}),m&&j.jsx(Ss,{active:i}),l,j.jsx(Es,{children:n}),f,j.jsx(Oc,{}),j.jsx(Dc,{languages:[{code:_c.EN,name:"English",flag:"🇺🇸"}],hideSocialNetworks:!0})]}):j.jsxs(j.Fragment,{children:[m&&j.jsx(Ss,{active:i,embedded:!0}),l,j.jsx(Es,{children:n}),f]})}export{du as P,Tc as S,Ve as a,Oo as b,cu as c,au as d,uu as e,xo as f,ou as g,nu as h,su as i,_e as l,ru as p,Fc as s,iu as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{importShared as e}from"./__federation_fn_import-DNtjaGC4.js";import{j as t}from"./jsx-runtime-BWEVYhay.js";const{Link:i}=await e("react-router-dom"),{Box:l,Card:g,CardContent:h,Skeleton:r,dclColors:s,styled:a}=await e("decentraland-ui2"),d=a(g)(()=>({display:"flex",flexDirection:"column",width:"calc((100% - (32px * 2)) / 3)",marginRight:"32px",marginBottom:"40px",position:"relative",boxShadow:"none",backgroundColor:"transparent !important",background:"transparent !important","& .MuiPaper-root":{backgroundColor:"transparent !important",background:"transparent !important"},"@media (max-width: 1096px)":{width:"calc((100% - 24px) / 2)",marginRight:0},"@media (max-width: 568px)":{width:"100%"},"&:nth-of-type(3n)":{marginRight:0}})),m=a("img")(()=>({objectFit:"cover",boxShadow:"0 2px 4px 0 rgba(0, 0, 0, 0.16)",borderRadius:"5px",width:"100%",aspectRatio:"2 / 1",marginBottom:"12px",transition:"transform 250ms ease, box-shadow 250ms ease"})),u=a(i)(()=>({display:"block","&:hover > img":{transform:"translate(0, -4px)",boxShadow:"0 10px 20px 0 rgba(0, 0, 0, 0.12)"}})),p=a(h)({width:"100%",padding:0,backgroundColor:"transparent !important",background:"transparent !important","&.MuiCardContent-root":{backgroundColor:"transparent !important",background:"transparent !important"},"&:last-child":{paddingBottom:0}}),j=a("span")(({theme:o})=>({marginRight:"16px",color:o.palette.text.primary,fontSize:"13px",fontWeight:500,textDecoration:"none",textTransform:"uppercase",display:"inline"})),y=a(i)(()=>({color:s.neutral.gray3,fontSize:"13px",textDecoration:"none",textTransform:"uppercase",transition:"color 250ms ease",fontWeight:400,"&:hover":{color:s.neutral.gray2}})),b=a(i)(({theme:o})=>({textDecoration:"none",paddingTop:"8px",display:"block",color:o.palette.text.primary,"& h2, & h6":{fontSize:"20px",lineHeight:"28px",color:o.palette.text.primary,fontWeight:500},"&:visited, &:link, &:active":{color:o.palette.text.primary},"& *":{color:o.palette.text.primary}})),f=a(l)(()=>({display:"flex",justifyContent:"space-between"})),k=a(r)(()=>({height:"200px"})),c=a(r)(()=>({width:"100px"})),w=a(r)(()=>({width:"100%"})),C=a(r)(()=>({width:"80%"})),v=a(l)(()=>({})),{Typography:S}=await e("decentraland-ui2"),R=o=>{const{post:n,loading:x}=o;return x?t.jsxs(d,{elevation:0,children:[t.jsx(k,{variant:"rectangular"}),t.jsxs(p,{children:[t.jsxs(f,{children:[t.jsx(c,{variant:"text"}),t.jsx(c,{variant:"text"})]}),t.jsx(w,{variant:"text"}),t.jsx(C,{variant:"text"})]})]}):t.jsxs(d,{elevation:0,children:[t.jsx(u,{to:n.url,children:t.jsx(m,{src:n.image.url,alt:n.title,loading:"lazy",decoding:"async"})}),t.jsxs(p,{children:[t.jsxs(v,{children:[t.jsx(j,{children:n.publishedDate}),t.jsx("span",{children:t.jsx(y,{to:n.category.url,children:n.category.title})})]}),t.jsx(b,{to:n.url,children:t.jsx(S,{variant:"h6",component:"h2",children:n.title})})]})]})};export{R as P};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{importShared as c}from"./__federation_fn_import-DNtjaGC4.js";import{j as e}from"./jsx-runtime-BWEVYhay.js";import{i as B}from"./defaultTheme-0boCqa4G.js";import{r as E}from"./index-B584AmqK.js";import{r as O,d as D}from"./X-DOiZv48t.js";import{P as M}from"./PostCard-Dd4F35zx.js";import{C as _,a as I,P as W,H as q,M as U,b as N,f as $,T as F,c as H,S as z,g as G,A as V,h as Q,d as X,e as J,i as K,j as Y,k as b,B as Z,R as tt}from"./PostPage.styled-D5lERqJA.js";import{g as et,h as at,f as rt,P as f,l as x}from"./PageLayout-Ciu0k-U_.js";import{S as ot,O as st}from"./SEO-DW5vf2xx.js";import{g as it}from"./authRedirect-CDwN-vsd.js";var m={},nt=B;Object.defineProperty(m,"__esModule",{value:!0});var T=m.default=void 0;dt(E);var lt=nt(O()),ct=e;function S(t){if(typeof WeakMap!="function")return null;var s=new WeakMap,o=new WeakMap;return(S=function(r){return r?o:s})(t)}function dt(t,s){if(t&&t.__esModule)return t;if(t===null||typeof t!="object"&&typeof t!="function")return{default:t};var o=S(s);if(o&&o.has(t))return o.get(t);var r={__proto__:null},d=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(i!=="default"&&Object.prototype.hasOwnProperty.call(t,i)){var n=d?Object.getOwnPropertyDescriptor(t,i):null;n&&(n.get||n.set)?Object.defineProperty(r,i,n):r[i]=t[i]}return r.default=t,o&&o.set(t,r),r}T=m.default=(0,lt.default)((0,ct.jsx)("path",{d:"M5 3h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2m13 2h-2.5A3.5 3.5 0 0 0 12 8.5V11h-2v3h2v7h3v-7h3v-3h-3V9a1 1 0 0 1 1-1h2V5z"}),"Facebook");const{useDispatch:Ut,useSelector:ut}=await c("react-redux"),pt=ut,{Box:w,Typography:gt,dclColors:ht,styled:p}=await c("decentraland-ui2"),ft=p("section")(({theme:t})=>({backgroundColor:ht.neutral.softBlack2,paddingBottom:t.spacing(13),paddingTop:t.spacing(12),width:"100%"})),xt=p(w)(({theme:t})=>({display:"flex",flexDirection:"column",gap:t.spacing(3),paddingLeft:t.spacing(2),paddingRight:t.spacing(2),width:"100%",maxWidth:t.spacing(136.875),margin:"0 auto"})),yt=p(gt)(({theme:t})=>({...t.typography.h6,color:t.palette.text.primary})),mt=p(w)(({theme:t})=>({display:"flex",flexWrap:"nowrap",justifyContent:"flex-start",gap:t.spacing(4),[t.breakpoints.down("xs")]:{justifyContent:"center",flexWrap:"wrap"}})),{memo:jt}=await c("react"),{useTranslation:vt}=await c("@dcl/hooks"),Pt=3,_t=jt(t=>{const{posts:s=[],loading:o=!1,maxItems:r=Pt}=t,d=s.slice(0,r),{t:i}=vt();return o||d.length===0?null:e.jsx(ft,{children:e.jsxs(xt,{children:[e.jsx(yt,{variant:"h6",children:i("blog.related_post")}),e.jsx(mt,{children:d.map(n=>e.jsx(M,{post:n},n.id))})]})})}),{useMemo:y}=await c("react"),{useParams:bt}=await c("react-router-dom"),{useTranslation:Tt}=await c("@dcl/hooks"),{CircularProgress:St,Typography:wt}=await c("decentraland-ui2"),C=3,Ct=10,Rt=C*Ct,Nt=()=>{const{t}=Tt(),{categorySlug:s,postSlug:o}=bt(),r=pt(h=>{for(const u of Object.values(h.cmsClient.queries))if(u?.endpointName==="getBlogPosts"&&u.status==="fulfilled"&&u.data){const v=u.data.posts.find(P=>P.category.slug===s&&P.slug===o);if(v)return v}return null}),{data:d,isLoading:i,error:n}=et({categorySlug:s||"",postSlug:o||""},{skip:!!r}),a=y(()=>r||d,[r,d]),{data:g,isLoading:R}=at({category:a?.category.id,limit:Rt,skip:0},{skip:!a?.category.id}),k=y(()=>!g?.posts||!a?[]:g.posts.filter(h=>h.id!==a.id),[a,g?.posts]),L=y(()=>rt(a?.publishedDate),[a?.publishedDate]),l=a?.author,A=!!l&&!!l.title,j=it("BLOG_BASE_URL")||"";return i&&!r?e.jsx(f,{showBlogNavigation:!0,activeCategory:s,children:e.jsx(_,{children:e.jsx(St,{})})}):n||!a?e.jsx(f,{showBlogNavigation:!0,activeCategory:s,children:e.jsx(_,{children:e.jsx(wt,{color:"error",children:t("error.load_post")})})}):e.jsxs(f,{showBlogNavigation:!0,activeCategory:s,relatedPosts:e.jsx(_t,{posts:k,loading:R,maxItems:C}),children:[e.jsx(ot,{title:a?.title,description:a?.description||t("blog.default_description"),url:a?`${j}/${s}/${o}`:j,type:st.ARTICLE,image:a?.image?{url:a.image.url,width:a.image.width,height:a.image.height,alt:a.title}:void 0,author:l?.title,publishedTime:a?.publishedDate,section:a?.category.title,tags:a?.category.title?[a.category.title]:void 0}),e.jsxs(I,{children:[e.jsx(W,{src:a.image.url,alt:a.title,width:a.image.width,height:a.image.height,fetchPriority:"high",decoding:"async"}),e.jsxs(q,{children:[e.jsxs(U,{as:"span",children:[L,e.jsx(N,{children:"•"}),e.jsx($,{to:x.category(a.category.slug),children:a.category.title})]}),e.jsx(F,{children:e.jsx(H,{variant:"h4",children:a.title})}),e.jsx(z,{variant:"h6",children:a.description})]}),A&&e.jsxs(G,{children:[e.jsx(V,{children:e.jsxs(Q,{to:l.url,children:[l.image?.url&&e.jsx(X,{src:l.image.url,alt:l.title,loading:"lazy",decoding:"async"}),e.jsx(J,{variant:"body2",children:l.title})]})}),e.jsxs(K,{children:[e.jsx(Y,{children:t("blog.share")}),e.jsx(b,{href:x.twitter(a),target:"_blank",rel:"noopener noreferrer",children:e.jsx(D,{fontSize:"small"})}),e.jsx(b,{href:x.facebook(a),target:"_blank",rel:"noopener noreferrer",children:e.jsx(T,{fontSize:"small"})})]})]}),e.jsx(Z,{children:e.jsx(tt,{document:a.body,assets:a.bodyAssets})})]})]})};export{Nt as PostPage};
|