ghost 6.68.0 → 6.69.0
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/components/ghost-storage-base-3.0.1.tgz +0 -0
- package/components/tryghost-adapter-base-cache-0.2.1.tgz +0 -0
- package/components/tryghost-adapter-base-scheduling-0.2.5.tgz +0 -0
- package/components/tryghost-adapter-base-sso-0.1.4.tgz +0 -0
- package/components/tryghost-app-contracts-0.0.0.tgz +0 -0
- package/components/tryghost-checkout-0.0.0.tgz +0 -0
- package/components/tryghost-i18n-0.0.0.tgz +0 -0
- package/components/tryghost-kg-card-factory-5.2.6.tgz +0 -0
- package/components/tryghost-kg-clean-basic-html-4.3.6.tgz +0 -0
- package/components/tryghost-kg-converters-1.2.6.tgz +0 -0
- package/components/tryghost-kg-default-cards-10.3.7.tgz +0 -0
- package/components/tryghost-kg-default-nodes-2.2.3.tgz +0 -0
- package/components/tryghost-kg-default-transforms-1.3.6.tgz +0 -0
- package/components/tryghost-kg-html-to-lexical-1.4.1.tgz +0 -0
- package/components/tryghost-kg-lexical-html-renderer-1.5.1.tgz +0 -0
- package/components/tryghost-kg-markdown-html-renderer-7.2.7.tgz +0 -0
- package/components/tryghost-kg-utils-1.1.6.tgz +0 -0
- package/components/tryghost-metafield-csv-0.0.0.tgz +0 -0
- package/components/tryghost-metafield-types-0.1.1.tgz +0 -0
- package/core/boot.js +6 -0
- package/core/built/admin/assets/{about-D_nwtf7X.js → about-Dxp30cNg.js} +1 -1
- package/core/built/admin/assets/{account-migration-BaecWw1T.js → account-migration-D05akW4q.js} +1 -1
- package/core/built/admin/assets/activitypub/{account-migration-4saTEZ6p.js → account-migration-BmiwuzXI.js} +6 -6
- package/core/built/admin/assets/activitypub/activitypub.js +2 -2
- package/core/built/admin/assets/activitypub/{bluesky-sharing-BHBNuZQH.js → bluesky-sharing-B1fzMdFb.js} +6 -6
- package/core/built/admin/assets/activitypub/{content-formatters-DVx9YktY.js → content-formatters-G0qBT5QE.js} +3 -3
- package/core/built/admin/assets/activitypub/{domain-rAmlMXBC.js → domain-B3UtdA1m.js} +7 -7
- package/core/built/admin/assets/activitypub/{edit-profile-CXYL4ZrS.js → edit-profile-9EodzviR.js} +4 -4
- package/core/built/admin/assets/activitypub/{explore-dqpEx3GA.js → explore-DmwPdxHI.js} +8 -8
- package/core/built/admin/assets/activitypub/{feed-Cb-wYNw9.js → feed-yauqnu7A.js} +5 -5
- package/core/built/admin/assets/activitypub/{field-JxegcPt6.js → field-CsrMjbg2.js} +2 -2
- package/core/built/admin/assets/activitypub/{inbox-2hXDJBn5.js → inbox-DV3RrpFH.js} +7 -7
- package/core/built/admin/assets/activitypub/{label-DRQzZ7lb.js → label-DPs40NLn.js} +2 -2
- package/core/built/admin/assets/activitypub/layout-CvOhndCA.js +1 -0
- package/core/built/admin/assets/activitypub/{moderation-BnYKcTXY.js → moderation-DGa6hVNH.js} +7 -7
- package/core/built/admin/assets/activitypub/{note-C6ucS3Wu.js → note-BVL6LVHF.js} +5 -5
- package/core/built/admin/assets/activitypub/{notifications-DgBW9wEC.js → notifications-CRUu_uMC.js} +5 -5
- package/core/built/admin/assets/activitypub/{onboarding-DGu6yG4L.js → onboarding-Dpm-nLkQ.js} +2 -2
- package/core/built/admin/assets/activitypub/{onboarding-Bq3fNf_a.js → onboarding-KtpJA-xb.js} +2 -2
- package/core/built/admin/assets/activitypub/{preferences-C3jI1eVN.js → preferences-CdFuVqIt.js} +7 -7
- package/core/built/admin/assets/activitypub/{profile-Cn3vRb5Z.js → profile-KnNAoHYu.js} +8 -8
- package/core/built/admin/assets/activitypub/{routes-DbrwlS9h.js → routes-BRndai50.js} +26 -26
- package/core/built/admin/assets/activitypub/{settings-D0BALDQu.js → settings-DU7ftJ8w.js} +4 -4
- package/core/built/admin/assets/activitypub/{site-BFGj8HuQ.js → site-D1ZYV3AT.js} +2 -2
- package/core/built/admin/assets/activitypub/{step-1-CaoPg0a5.js → step-1-9IHheE78.js} +4 -4
- package/core/built/admin/assets/activitypub/{step-3-5k0TkyC9.js → step-3-DBERnfa-.js} +3 -3
- package/core/built/admin/assets/activitypub/{tabs-BV4JU7Vg.js → tabs-CvkwStij.js} +4 -4
- package/core/built/admin/assets/activitypub/{topic-filter-71sX5nfN.js → topic-filter-CS0Jsf_4.js} +2 -2
- package/core/built/admin/assets/activitypub/{use-activity-pub-queries-B3srUuKt.js → use-activity-pub-queries-CGgtQrxL.js} +2 -2
- package/core/built/admin/assets/activitypub/{use-reply-chain-data-Cl6bGNy7.js → use-reply-chain-data-CLdUpx1t.js} +4 -4
- package/core/built/admin/assets/activitypub/{users-EcSPpds5.js → users-CyoMXlwX.js} +11 -3
- package/core/built/admin/assets/{add-integration-modal-DBFzeAUT.js → add-integration-modal-BVg-ec8i.js} +1 -1
- package/core/built/admin/assets/{add-newsletter-modal-CYJe-dTC.js → add-newsletter-modal-Du6th521.js} +1 -1
- package/core/built/admin/assets/{add-recommendation-modal-CgwGKH-_.js → add-recommendation-modal-BiCJ0-q5.js} +1 -1
- package/core/built/admin/assets/{analytics-CcXT_WqF.js → analytics-CQJzDDdJ.js} +1 -1
- package/core/built/admin/assets/{announcement-bar-modal-Ldcg-PB-.js → announcement-bar-modal-CskyZLzT.js} +1 -1
- package/core/built/admin/assets/{api-BLteQZ7W.js → api-BFocMbDg.js} +2 -2
- package/core/built/admin/assets/{api-keys-CoeerpwI.js → api-keys-CqKJHuAV.js} +1 -1
- package/core/built/admin/assets/{audience-Deg9lzfk.js → audience-Dn7LuH-r.js} +1 -1
- package/core/built/admin/assets/{auth-layout-CRaMX7g6.js → auth-layout-VLhXgXn5.js} +1 -1
- package/core/built/admin/assets/{automated-emails-WcjjRkRV.js → automated-emails-D5cFl1wr.js} +1 -1
- package/core/built/admin/assets/{automations-CbIdX0rd.js → automations-BpweKEcq.js} +1 -1
- package/core/built/admin/assets/automations-DBTYwNTJ.js +1 -0
- package/core/built/admin/assets/{bluesky-sharing-BJMNRwnU.js → bluesky-sharing-CrfpFHQ9.js} +1 -1
- package/core/built/admin/assets/{chart-helpers-D-3N170i.js → chart-helpers-BSuFLd6-.js} +1 -1
- package/core/built/admin/assets/{chunk.524.94ab17e1199b4c3f4615.js → chunk.524.e24d68bc6253b274b726.js} +4 -4
- package/core/built/admin/assets/{chunk.582.6f09b19a007e2805824e.js → chunk.582.47834285406dfa1abb29.js} +6 -6
- package/core/built/admin/assets/{chunk.476.53b5794a67d68111e0bf.js → chunk.837.e1454abc054e1fba1fe5.js} +5 -5
- package/core/built/admin/assets/{code-editor-view-DhTwpxxv.js → code-editor-view-BrGe3eS4.js} +1 -1
- package/core/built/admin/assets/{code-editor-view-C7wXGiuv.js → code-editor-view-CY6JCXNv.js} +1 -1
- package/core/built/admin/assets/{color-picker-field-Cjz2zY11.js → color-picker-field-DGe9HH6W.js} +1 -1
- package/core/built/admin/assets/{comments-DY-VLVxh.js → comments-iRbF6XiJ.js} +1 -1
- package/core/built/admin/assets/{config-B3HuCo0y.js → config-CRAZ4Civ.js} +1 -1
- package/core/built/admin/assets/{content-api-modal-2jt-jWiM.js → content-api-modal-B-XRbzeW.js} +1 -1
- package/core/built/admin/assets/{content-formatters-VqvNA7Pv.js → content-formatters-C08JJbUJ.js} +2 -2
- package/core/built/admin/assets/{context-menu-BWbk9nd5.js → context-menu-BxGXsgQO.js} +1 -1
- package/core/built/admin/assets/{custom-field-type-option-CIatEwIN.js → custom-field-type-option-C8Nt4X6x.js} +1 -1
- package/core/built/admin/assets/{custom-integration-modal-Cw0w2Tb3.js → custom-integration-modal-DzI16qjN.js} +1 -1
- package/core/built/admin/assets/{date-range-select-O-uA-BRV.js → date-range-select-BZqsYsGx.js} +1 -1
- package/core/built/admin/assets/{design-and-theme-modal-BLjNHRYN.js → design-and-theme-modal-1ty_KEkM.js} +2 -2
- package/core/built/admin/assets/{dist-DJhCsld6.js → dist-B4jqKAG5.js} +1 -1
- package/core/built/admin/assets/{dist-5Ol0DC_t.js → dist-Bmo2j_KH.js} +1 -1
- package/core/built/admin/assets/{dist-p52UDdoR.js → dist-C-_aTlvJ.js} +1 -1
- package/core/built/admin/assets/{dist-CcN1a5SB.js → dist-CWHIoxYn.js} +1 -1
- package/core/built/admin/assets/{dist-BcfsaiCV.js → dist-Cp2M5TzT.js} +1 -1
- package/core/built/admin/assets/{dist-kjTYGivb.js → dist-DQAAPbtg.js} +1 -1
- package/core/built/admin/assets/{dist-IMek6Acg.js → dist-DyO279y5.js} +1 -1
- package/core/built/admin/assets/{domain-DaPAeOFF.js → domain-DiFl_Z1A.js} +1 -1
- package/core/built/admin/assets/{edit-profile-BKO5qonH.js → edit-profile-PrLbJV3P.js} +1 -1
- package/core/built/admin/assets/editor-BBJDJL8U.js +8 -0
- package/core/built/admin/assets/{editor-screen-l4BUPE2o.js → editor-screen-nblrp808.js} +3 -3
- package/core/built/admin/assets/{email-previews-B1Ska3CF.js → email-previews-BKJxrW29.js} +1 -1
- package/core/built/admin/assets/{email-sending-status-provider-Bjn5KTy2.js → email-sending-status-provider-DB9ylBWk.js} +1 -1
- package/core/built/admin/assets/{emails-qxNbhO6X.js → emails-8YiSmC2X.js} +1 -1
- package/core/built/admin/assets/{embed-signup-form-modal-DSgds6Js.js → embed-signup-form-modal-CZmbYKfd.js} +1 -1
- package/core/built/admin/assets/{error-boundary-CJODV8Rg.js → error-boundary-DrxPFFO-.js} +1 -1
- package/core/built/admin/assets/{esm-CNLDtBMc.js → esm-_iCUCvbN.js} +1 -1
- package/core/built/admin/assets/{explore-C6V_JpUZ.js → explore-C69LSRVg.js} +1 -1
- package/core/built/admin/assets/{feed-B_TyFn9E.js → feed-B_0m7WhZ.js} +1 -1
- package/core/built/admin/assets/{feedback-gKOzmiGt.js → feedback-DW1DXdzT.js} +1 -1
- package/core/built/admin/assets/{filters-Bf6E1qAP.js → filters-Dr3vMnjZ.js} +1 -1
- package/core/built/admin/assets/{filters-DhsiEotO.js → filters-M2sRWPoF.js} +1 -1
- package/core/built/admin/assets/{first-promoter-modal-LmTXHr-z.js → first-promoter-modal-D43R2zhI.js} +1 -1
- package/core/built/admin/assets/{focus-koenig-editor-on-bottom-click-BAcLNJti.js → focus-koenig-editor-on-bottom-click-BzS8jiJf.js} +1 -1
- package/core/built/admin/assets/fullscreen-close-button-CWSp-MsK.js +1 -0
- package/core/built/admin/assets/{ghost-63bc7da4336844000c523a5a0819531e.js → ghost-ffde29676517b768b1aef5ec8d492418.js} +93 -96
- package/core/built/admin/assets/{gift-link-modal-uZtwRHzl.js → gift-link-modal-CNE7dfPD.js} +1 -1
- package/core/built/admin/assets/{gift-links-HVqaXear.js → gift-links-lQ7H_D8Z.js} +1 -1
- package/core/built/admin/assets/global-search-modal-DzRM3aON.js +1 -0
- package/core/built/admin/assets/{growth-BlPW4DHj.js → growth-CAi_5HIf.js} +1 -1
- package/core/built/admin/assets/{growth-CflU3vR0.js → growth-CMHbTWKE.js} +1 -1
- package/core/built/admin/assets/history-modal-BIz13vhr.js +1 -0
- package/core/built/admin/assets/{hooks-C-BDQ6Hs.js → hooks-0r7qxGEo.js} +2 -2
- package/core/built/admin/assets/{html-field-D6G0G1d_.js → html-field-vTe2q1be.js} +1 -1
- package/core/built/admin/assets/{iframe-buffering-DW-Axhvc.js → iframe-buffering-cu-yK7NA.js} +1 -1
- package/core/built/admin/assets/{images-BSUWxquu.js → images-DTZtaIAr.js} +1 -1
- package/core/built/admin/assets/{inbox-BkU3sg13.js → inbox-BHfpmmzn.js} +1 -1
- package/core/built/admin/assets/{index-z8-nEVdb.css → index-B02LJqc8.css} +1 -1
- package/core/built/admin/assets/{index-CuDhPtkB.js → index-RuRs_qGS.js} +3 -3
- package/core/built/admin/assets/{index.es-H6HOI4DG.js → index.es-rdb1skp_.js} +1 -1
- package/core/built/admin/assets/{integrations-BRo5DwA5.js → integrations-Deg9-u8X.js} +1 -1
- package/core/built/admin/assets/{invite-user-modal-CydBOG99.js → invite-user-modal-C4DeNcoO.js} +1 -1
- package/core/built/admin/assets/koenig-lexical/koenig-lexical.js +10483 -10455
- package/core/built/admin/assets/koenig-lexical/koenig-lexical.umd.js +131 -131
- package/core/built/admin/assets/{koenig-lexical-CG_eb4dw.js → koenig-lexical-BhXu1__-.js} +96 -96
- package/core/built/admin/assets/{kpi-helpers-CyRx_yD6.js → kpi-helpers-H-Hl6h7h.js} +1 -1
- package/core/built/admin/assets/{kpi-tabs-V1_Nu9sh.js → kpi-tabs-k4A9-imn.js} +1 -1
- package/core/built/admin/assets/{label-picker-GTIIlBQ6.js → label-picker-DaivLdMw.js} +1 -1
- package/core/built/admin/assets/{labels-BVGLgdAj.js → labels-BCj6D_nl.js} +1 -1
- package/core/built/admin/assets/{layout-CG58T6P7.js → layout-_g2xhB0L.js} +1 -1
- package/core/built/admin/assets/{lib-Dkic19kH.js → lib-Bre6UXdJ.js} +2 -2
- package/core/built/admin/assets/{links-jD8AkkIu.js → links-C8RnEJVJ.js} +1 -1
- package/core/built/admin/assets/{member-activity-JggQ0VNQ.js → member-activity-DNJPUW5X.js} +1 -1
- package/core/built/admin/assets/{member-activity-feed-BBeCZmLM.js → member-activity-feed-CvKEetHS.js} +1 -1
- package/core/built/admin/assets/{member-custom-fields-DPsyP1Hq.js → member-custom-fields-CBdiwPD9.js} +1 -1
- package/core/built/admin/assets/{member-detail-D7qugPN7.js → member-detail-BIoyIIsl.js} +1 -1
- package/core/built/admin/assets/{members-Cj_BUZUL.js → members-CH6KeXQc.js} +1 -1
- package/core/built/admin/assets/{members-alDWPKDd.js → members-Dd9RczFK.js} +1 -1
- package/core/built/admin/assets/{migrate-2uKKakld.js → migrate-CVQIWsXO.js} +1 -1
- package/core/built/admin/assets/{moderation-pCUKsxbF.js → moderation-OtjZoNOc.js} +1 -1
- package/core/built/admin/assets/{navigation-modal-D0FBI5-m.js → navigation-modal-Bl02NjtO.js} +1 -1
- package/core/built/admin/assets/{newsletter-4urgCSR_.js → newsletter-BXyT7o69.js} +1 -1
- package/core/built/admin/assets/{newsletter-detail-modal-Chh1jvjH.js → newsletter-detail-modal-DxuKNu_1.js} +1 -1
- package/core/built/admin/assets/{newsletter-emails-CzVCiC2K.js → newsletter-emails-DicgmnMU.js} +1 -1
- package/core/built/admin/assets/{newsletters-eRQTtOBH.js → newsletters-By25FmUs.js} +1 -1
- package/core/built/admin/assets/{newsletters-BMEgeL2l.js → newsletters-CACa0VCx.js} +1 -1
- package/core/built/admin/assets/{note-dqog4Bua.js → note-CF4LrSmR.js} +1 -1
- package/core/built/admin/assets/{notifications-rcEVv-gx.js → notifications-BmHJmqIJ.js} +1 -1
- package/core/built/admin/assets/{offers-hV7zBtsI.js → offers-Df9Jzay5.js} +1 -1
- package/core/built/admin/assets/{offers-container-modal-DgZgkMsA.js → offers-container-modal-R0HRwugm.js} +1 -1
- package/core/built/admin/assets/{onboarding-4TxbZb90.js → onboarding-Bpo1yTzA.js} +1 -1
- package/core/built/admin/assets/{onboarding-SGscZLIc.js → onboarding-bMq3R8jB.js} +1 -1
- package/core/built/admin/assets/{onboarding-route-B3mN9l7E.js → onboarding-route-flf5YWti.js} +1 -1
- package/core/built/admin/assets/{overview-D4EanvDG.js → overview-C9WvmmOC.js} +1 -1
- package/core/built/admin/assets/{overview-CCwbHet8.js → overview-CDkHdIJM.js} +1 -1
- package/core/built/admin/assets/{page-header-Baymg6VR.js → page-header-CxTb0je5.js} +1 -1
- package/core/built/admin/assets/{pagemenu--UL0gW1x.js → pagemenu-DXr_U43J.js} +1 -1
- package/core/built/admin/assets/{pages-Cbq1M2kG.js → pages-Bm-zFXyP.js} +1 -1
- package/core/built/admin/assets/pages-route-LCw94aIO.js +1 -0
- package/core/built/admin/assets/{pintura-modal-D6HGlnJa.js → pintura-modal-B5sIPWcj.js} +1 -1
- package/core/built/admin/assets/{portal-modal-Bhqsevn_.js → portal-modal-DjOO3Unv.js} +1 -1
- package/core/built/admin/assets/{post-analytics-header-DX9fETdi.js → post-analytics-header-D2anehCj.js} +1 -1
- package/core/built/admin/assets/{post-analytics-provider-U7RtOle1.js → post-analytics-provider-BLQvV5C0.js} +1 -1
- package/core/built/admin/assets/{post-analytics-BJWDtC3a.js → post-analytics-wdu9gq8u.js} +1 -1
- package/core/built/admin/assets/{post-debug-D1b8Amju.js → post-debug-BnABXMfD.js} +1 -1
- package/core/built/admin/assets/{posts-Lg-p_ZHg.js → posts-CftunZgV.js} +1 -1
- package/core/built/admin/assets/{posts-list-screen-CmsW18e_.js → posts-list-screen-CwXmvY68.js} +2 -2
- package/core/built/admin/assets/posts-route-J74fMhCe.js +1 -0
- package/core/built/admin/assets/{preferences-CMlDfHfa.js → preferences-DFhf_pJF.js} +1 -1
- package/core/built/admin/assets/{preview-modal-D8om_cQv.js → preview-modal-BrZza3R_.js} +1 -1
- package/core/built/admin/assets/{profile-yFsIoZom.js → profile-CS4fP60N.js} +1 -1
- package/core/built/admin/assets/{radio-group-DwgLjwWB.js → radio-group-Xfp-frJz.js} +1 -1
- package/core/built/admin/assets/{referrers-DzP5QoXL.js → referrers-C8LJlrBm.js} +1 -1
- package/core/built/admin/assets/{reload-CZ-KP3IQ.js → reload-D0fnKoCm.js} +1 -1
- package/core/built/admin/assets/{reset-CCAa8v35.js → reset-CB-ATcLE.js} +1 -1
- package/core/built/admin/assets/{restore-screen-Ba0i2Y1K.js → restore-screen-EaZf4V8j.js} +1 -1
- package/core/built/admin/assets/{routes-DrnhmKTT.js → routes-DKfpFMfF.js} +2 -2
- package/core/built/admin/assets/search-index-sM3OjEUl.js +1 -0
- package/core/built/admin/assets/settings-BWzod-5X.js +4 -0
- package/core/built/admin/assets/{settings-lqWkfSmT.js → settings-DvgngbFt.js} +1 -1
- package/core/built/admin/assets/{setup-BopRPuaM.js → setup-CdHAchG5.js} +1 -1
- package/core/built/admin/assets/{signin-e8NgsU9M.js → signin-CUEEme88.js} +1 -1
- package/core/built/admin/assets/{signin-verify-CHkFJevb.js → signin-verify-CYRphSrj.js} +1 -1
- package/core/built/admin/assets/{signout-DRvQZuWa.js → signout-kLCJau9G.js} +1 -1
- package/core/built/admin/assets/{signup-DQHi7jZz.js → signup-J2Vjq7Gt.js} +1 -1
- package/core/built/admin/assets/{slack-modal-BuGESzgn.js → slack-modal-DKamr_94.js} +1 -1
- package/core/built/admin/assets/source-icon-DqBCPDIK.js +1 -0
- package/core/built/admin/assets/{stats-CHOikfoP.js → stats-BL_FJ7Ns.js} +1 -1
- package/core/built/admin/assets/{stats-view-DQZzKeEz.js → stats-view-BwbdkdOQ.js} +1 -1
- package/core/built/admin/assets/{step-1-C8XwHcKt.js → step-1-CLYhNmG9.js} +1 -1
- package/core/built/admin/assets/{step-2-BXaXAdwY.js → step-2-B2ujMlpa.js} +1 -1
- package/core/built/admin/assets/{step-3-DytbqpJi.js → step-3-DoaTWqqj.js} +1 -1
- package/core/built/admin/assets/{stripe-connect-modal-BhudjSeO.js → stripe-connect-modal-DytxH9DJ.js} +1 -1
- package/core/built/admin/assets/{tabs-CDb_TceL.js → tabs-fHs3A8WC.js} +1 -1
- package/core/built/admin/assets/{tag-detail-V72Zlro8.js → tag-detail-BcO46Ids.js} +2 -2
- package/core/built/admin/assets/{tag-picker-M3fC-yOF.js → tag-picker-Ct6NeqWK.js} +1 -1
- package/core/built/admin/assets/{tags-CXqE2A2T.js → tags-C1h3wCpW.js} +1 -1
- package/core/built/admin/assets/{tags-ZhqbPPc6.js → tags-OlmRJ6Ps.js} +1 -1
- package/core/built/admin/assets/{testimonials-modal-Cn8gvIFA.js → testimonials-modal-DMsQzSCB.js} +1 -1
- package/core/built/admin/assets/{themes-pOHHvnkt.js → themes-CPJSMo_W.js} +1 -1
- package/core/built/admin/assets/{tier-detail-modal-CeDla1OO.js → tier-detail-modal-DssSmhkF.js} +1 -1
- package/core/built/admin/assets/{tiers-D7aGzwZ-.js → tiers-DlvS8D6_.js} +1 -1
- package/core/built/admin/assets/{toggle-group-D7ly9OGa.js → toggle-group-BFWCtH3p.js} +1 -1
- package/core/built/admin/assets/{topic-filter-DQ3pr6AB.js → topic-filter-DAJ-DFPb.js} +1 -1
- package/core/built/admin/assets/{transistor-modal-4_Yx2vRo.js → transistor-modal-CtyFRsD0.js} +1 -1
- package/core/built/admin/assets/{unsplash-modal-Dm7R4k4k.js → unsplash-modal-DHnnTPmZ.js} +1 -1
- package/core/built/admin/assets/{use-activity-pub-queries-Gy9_locM.js → use-activity-pub-queries-BgR1USeY.js} +1 -1
- package/core/built/admin/assets/{use-analytics-data-oJ2o0pSS.js → use-analytics-data-Byf83QE-.js} +1 -1
- package/core/built/admin/assets/{use-availability-BqL7Dvn_.js → use-availability-CgZC6L_V.js} +1 -1
- package/core/built/admin/assets/{use-check-theme-limit-error-CxC9uKJz.js → use-check-theme-limit-error-DjprzKAN.js} +1 -1
- package/core/built/admin/assets/use-definitions-CJuXLSob.js +1 -0
- package/core/built/admin/assets/{use-email-sending-status-BFAg5TIb.js → use-email-sending-status-7kopNcza.js} +1 -1
- package/core/built/admin/assets/{use-filter-params-BOo9yZ5j.js → use-filter-params-DQ7uX-Zp.js} +1 -1
- package/core/built/admin/assets/{use-filterable-api-BnNLaS_r.js → use-filterable-api-CDrrxoGD.js} +1 -1
- package/core/built/admin/assets/{use-growth-stats-BS62uyyn.js → use-growth-stats-CCpnBgqS.js} +1 -1
- package/core/built/admin/assets/{use-host-limits-CNh4AAEs.js → use-host-limits-BZx7rzRI.js} +1 -1
- package/core/built/admin/assets/{use-limiter-DPKxoO1_.js → use-limiter-gF219BEg.js} +1 -1
- package/core/built/admin/assets/{use-pintura-config-CyVO62ZV.js → use-pintura-config-D-pmGkn2.js} +1 -1
- package/core/built/admin/assets/{use-pintura-editor-B5VBPbiO.js → use-pintura-editor-D_4zhlGE.js} +1 -1
- package/core/built/admin/assets/{use-post-referrers-nUPolSk7.js → use-post-referrers-Bc8eq4uy.js} +1 -1
- package/core/built/admin/assets/{use-post-top-links-DCH4eO11.js → use-post-top-links-DjltnQuI.js} +1 -1
- package/core/built/admin/assets/{use-reply-chain-data-UMzFbDvh.js → use-reply-chain-data-BiV3Cl0B.js} +1 -1
- package/core/built/admin/assets/use-sending-eta-gE-2B0Zw.js +1 -0
- package/core/built/admin/assets/{use-setting-group-Bf3vY8br.js → use-setting-group-YP84CqrJ.js} +1 -1
- package/core/built/admin/assets/{use-staff-users-CcQzTHqH.js → use-staff-users-CnwfdSx1.js} +1 -1
- package/core/built/admin/assets/{use-tinybird-query-CPy5ipAP.js → use-tinybird-query-BYbl5gKY.js} +1 -1
- package/core/built/admin/assets/{use-tinybird-token-DVNHuhu_.js → use-tinybird-token-Dz37zvb7.js} +1 -1
- package/core/built/admin/assets/{use-unsaved-changes-guard-Bvcp_Rny.js → use-unsaved-changes-guard-BkCuSlvU.js} +1 -1
- package/core/built/admin/assets/{use-upgrade-route-Bsxw9ZLN.js → use-upgrade-route-C-V-Xfak.js} +1 -1
- package/core/built/admin/assets/{use-url-input-DPJ592FB.js → use-url-input-BeYKYMGh.js} +1 -1
- package/core/built/admin/assets/{user-detail-modal-6UY6GdNy.js → user-detail-modal-CSoj7vOC.js} +1 -1
- package/core/built/admin/assets/{users-CzgQKbfO.js → users-CKJaAxEJ.js} +1 -1
- package/core/built/admin/assets/{view-site-DA_-zfGq.js → view-site-SpMx4P7G.js} +1 -1
- package/core/built/admin/assets/{web-Cq5YiD2r.js → web-CZf-k4F0.js} +1 -1
- package/core/built/admin/assets/{web-DqFIrOxt.js → web-uAqgYPK9.js} +1 -1
- package/core/built/admin/assets/{zapier-modal-DgqU-OBB.js → zapier-modal-DENbgTyE.js} +1 -1
- package/core/built/admin/index.html +24 -24
- package/core/frontend/helpers/color_to_rgba.js +15 -13
- package/core/frontend/helpers/facebook_url.js +27 -15
- package/core/frontend/services/assets-minification/card-assets.js +1 -1
- package/core/frontend/services/helpers/register-ghost-helpers.js +2 -2
- package/core/server/api/endpoints/app-installations.js +36 -0
- package/core/server/api/endpoints/automations.js +1 -1
- package/core/server/api/endpoints/index.js +4 -0
- package/core/server/data/exporter/table-lists.js +2 -0
- package/core/server/data/migrations/versions/6.69/2026-10-07-06-20-43-add-app-installation-permissions.js +40 -0
- package/core/server/data/schema/fixtures/fixtures.json +21 -0
- package/core/server/data/schema/in-development.js +1 -1
- package/core/server/data/schema/schema.js +53 -0
- package/core/server/lib/after-commit.js +20 -0
- package/core/server/models/action.js +6 -0
- package/core/server/services/app-installations/actions.js +44 -0
- package/core/server/services/app-installations/codec.js +20 -0
- package/core/server/services/app-installations/index.js +42 -0
- package/core/server/services/app-installations/schema.js +52 -0
- package/core/server/services/app-installations/service.js +160 -0
- package/core/server/services/automations/README.md +3 -3
- package/core/server/services/automations/automations-api.js +1 -1
- package/core/server/services/comments/comments-service-emails.js +8 -6
- package/core/server/services/email-service/README.md +16 -0
- package/core/server/services/email-service/email-service-wrapper.js +1 -0
- package/core/server/services/email-service/email-service.js +94 -53
- package/core/server/services/email-service/sending-status-serializers.js +4 -1
- package/core/server/services/email-service/sending-status-service.js +13 -0
- package/core/server/services/email-service/sending-status.js +12 -1
- package/core/server/services/members/members-api/repositories/member-repository.js +5 -23
- package/core/server/services/posts/post-email-handler.js +61 -28
- package/core/server/services/posts/posts-service.js +27 -2
- package/core/server/services/service-inventory.yaml +93 -7
- package/core/server/services/stats/stats-service.js +1 -5
- package/core/server/services/tinybird-sync/index.js +0 -3
- package/core/server/services/tinybird-sync/tinybird-sync-service.js +2 -6
- package/core/server/web/api/endpoints/admin/routes.js +25 -12
- package/core/shared/labs.js +4 -6
- package/package.json +11 -10
- package/pnpm-lock.yaml +112 -100
- package/pnpm-workspace.yaml +14 -12
- package/components/ghost-storage-base-3.0.0.tgz +0 -0
- package/components/tryghost-adapter-base-cache-0.2.0.tgz +0 -0
- package/components/tryghost-checkout-0.0.1.tgz +0 -0
- package/components/tryghost-kg-card-factory-5.2.4.tgz +0 -0
- package/components/tryghost-kg-clean-basic-html-4.3.4.tgz +0 -0
- package/components/tryghost-kg-converters-1.2.5.tgz +0 -0
- package/components/tryghost-kg-default-transforms-1.3.4.tgz +0 -0
- package/components/tryghost-kg-html-to-lexical-1.4.0.tgz +0 -0
- package/components/tryghost-kg-markdown-html-renderer-7.2.6.tgz +0 -0
- package/components/tryghost-kg-utils-1.1.4.tgz +0 -0
- package/components/tryghost-metafield-csv-0.0.1.tgz +0 -0
- package/core/built/admin/assets/activitypub/layout-QTbY0t8e.js +0 -1
- package/core/built/admin/assets/automations-DVToctfJ.js +0 -1
- package/core/built/admin/assets/editor-CMXR0YvR.js +0 -8
- package/core/built/admin/assets/fullscreen-close-button-DXssPeDB.js +0 -1
- package/core/built/admin/assets/global-search-modal-C8LVJmiz.js +0 -1
- package/core/built/admin/assets/history-modal-parBtjpz.js +0 -1
- package/core/built/admin/assets/pages-route-CDk3V9rq.js +0 -1
- package/core/built/admin/assets/posts-route-CexHhklY.js +0 -1
- package/core/built/admin/assets/settings-xqakrAWa.js +0 -4
- package/core/built/admin/assets/source-icon-BjVangBd.js +0 -1
- package/core/built/admin/assets/use-definitions-DMVU3mTG.js +0 -1
- package/core/built/admin/assets/use-sending-eta-BsnKdQhv.js +0 -1
package/core/built/admin/assets/{automated-emails-WcjjRkRV.js → automated-emails-D5cFl1wr.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`ec97a752-2565-43db-88f6-1514fe76927e`,e._sentryDebugIdIdentifier=`sentry-dbid-ec97a752-2565-43db-88f6-1514fe76927e`)}catch{}})();import{s as e,t}from"./react-C9lG_SsT.js";import{n,r}from"./hooks-
|
|
1
|
+
(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`ec97a752-2565-43db-88f6-1514fe76927e`,e._sentryDebugIdIdentifier=`sentry-dbid-ec97a752-2565-43db-88f6-1514fe76927e`)}catch{}})();import{s as e,t}from"./react-C9lG_SsT.js";import{n,r}from"./hooks-0r7qxGEo.js";import{t as i}from"./use-filterable-api-CDrrxoGD.js";import{n as a,r as o}from"./update-queries-sbOKc6_E.js";import{n as s}from"./offers-Df9Jzay5.js";import{r as c}from"./posts-CftunZgV.js";var l=e(t(),1),u=({siteUrl:e,membersSignupAccess:t,donationsEnabled:n,recommendationsEnabled:r,includeShareLink:a=!1,shareLinkLabel:o=`Share`})=>{let{data:u}=s(),{data:d}=c({searchParams:{filter:`status:published`,fields:`id,url,title,visibility,published_at`,order:`published_at desc`,limit:`5`}}),f=i({path:`/search-index/posts/`,filterKey:`title`,responseKey:`posts`}),p=i({path:`/search-index/pages/`,filterKey:`title`,responseKey:`pages`}),m=(0,l.useMemo)(()=>[{label:`Latest posts`,items:(d?.posts||[]).map(e=>({id:e.id,title:e.title,url:e.url,visibility:e.visibility,publishedAt:e.published_at??void 0}))}],[d?.posts]);return{fetchAutocompleteLinks:(0,l.useCallback)(async()=>{let i=[{label:`Homepage`,value:e},{label:`Free signup`,value:`#/portal/signup/free`}],s=a?[{label:o,value:`#/share`}]:[],c=t===`all`?[{label:`Paid signup`,value:`#/portal/signup`},{label:`Upgrade or change plan`,value:`#/portal/account/plans`}]:[],l=n?[{label:`Tips and donations`,value:`#/portal/support`}]:[],d=r?[{label:`Recommendations`,value:`#/portal/recommendations`}]:[],f=(u?.offers||[]).filter(e=>e.status===`active`&&e.redemption_type===`signup`).map(t=>({label:`Offer - ${t.name}`,value:new URL(t.code,e).toString()}));return[...i,...c,...l,...s,...d,...f]},[n,a,t,u?.offers,r,o,e]),searchLinks:(0,l.useCallback)(async e=>{if(!e)return m;let[t,n]=await Promise.all([f.loadData(e),p.loadData(e)]);return[{label:`Posts`,items:t.filter(e=>e.status===`published`).map(e=>({id:e.id,title:e.title,url:e.url,visibility:e.visibility,publishedAt:e.published_at}))},{label:`Pages`,items:n.filter(e=>e.status===`published`).map(e=>({id:e.id,title:e.title,url:e.url,visibility:e.visibility,publishedAt:e.published_at}))}].filter(e=>e.items.length>0)},[m,p,f])}},d=`AutomatedEmailsResponseType`,f=r({dataType:d,path:`/automated_emails/`}),p=n({method:`POST`,path:()=>`/automated_emails/`,body:e=>({automated_emails:[e]}),updateQueries:{dataType:d,emberUpdateType:`createOrUpdate`,update:a(`automated_emails`)}}),m=n({method:`PUT`,path:e=>`/automated_emails/${e.id}/`,body:({slug:e,...t})=>({automated_emails:[t]}),updateQueries:{dataType:d,emberUpdateType:`createOrUpdate`,update:o(`automated_emails`)}}),h=n({method:`PUT`,path:()=>`/automated_emails/senders/`,body:e=>e,updateQueries:{dataType:d,emberUpdateType:`createOrUpdate`,update:o(`automated_emails`)}}),g=n({method:`PUT`,path:()=>`/automated_emails/verifications/`,body:({token:e})=>({token:e}),updateQueries:{dataType:d,emberUpdateType:`createOrUpdate`,update:o(`automated_emails`)}}),_=n({method:`POST`,path:({id:e})=>`/automated_emails/${e}/test/`,body:({email:e,subject:t,lexical:n})=>({email:e,subject:t,lexical:n})}),v=n({method:`POST`,path:({id:e})=>`/automated_emails/${e}/preview/`,body:({subject:e,lexical:t})=>({subject:e,lexical:t})});export{v as a,u as c,h as i,f as n,_ as o,m as r,g as s,p as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`63afa560-6328-459c-81d1-dfdba296d202`,e._sentryDebugIdIdentifier=`sentry-dbid-63afa560-6328-459c-81d1-dfdba296d202`)}catch{}})();import{n as e,s as t,t as n}from"./react-C9lG_SsT.js";import{c as r,i,n as a,r as o,t as s}from"./hooks-C-BDQ6Hs.js";import{t as c}from"./jsx-runtime-Bm2_KH-0.js";import{a as l,f as u,g as d,o as f,p,r as m,v as h}from"./schemas-21VB7GGY.js";import{n as g,t as _}from"./iso-B3K0cJod.js";var v=t(n(),1),y=c(),b=({status:e})=>{switch(e){case`active`:return(0,y.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 rounded-full bg-green/20 px-2 py-0.5 text-xs font-medium text-green uppercase`,children:[(0,y.jsx)(`span`,{className:`size-1.5 rounded-full bg-green`}),`Live`]});case`inactive`:return(0,y.jsx)(`span`,{className:`inline-flex items-center gap-1.5 rounded-full bg-muted px-2 py-0.5 text-xs font-medium text-muted-foreground uppercase`,children:`Off`});default:throw Error(`Unhandled status: ${String(e)}`)}},x={free:`member-welcome-email-free`,paid:`member-welcome-email-paid`},S=t(e(((e,t)=>{for(var n=Math.floor(Math.random()*16777215),r=d.index=parseInt(Math.random()*16777215,10),i=(typeof process>`u`||typeof process.pid!=`number`?Math.floor(Math.random()*1e5):process.pid)%65535,a=(()=>{try{return _Buffer}catch{try{return Buffer}catch{return null}}})(),o=function(e){return!!(e!=null&&e.constructor&&typeof e.constructor.isBuffer==`function`&&e.constructor.isBuffer(e))},s=[],c=0;c<256;c++)s[c]=(c<=15?`0`:``)+c.toString(16);var l=RegExp(`^[0-9a-fA-F]{24}$`),u=[];for(c=0;c<10;)u[48+c]=c++;for(;c<16;)u[55+c]=u[87+c]=c++;function d(e){if(!(this instanceof d))return new d(e);if(e&&(e instanceof d||e._bsontype===`ObjectID`))return e;if(this._bsontype=`ObjectID`,e==null||typeof e==`number`){this.id=this.generate(e);return}var t=d.isValid(e);if(!t&&e!=null)throw Error(`Argument passed in must be a single String of 12 bytes or a string of 24 hex characters`);if(t&&typeof e==`string`&&e.length===24)return d.createFromHexString(e);if(e!=null&&e.length===12)this.id=e;else if(e!=null&&typeof e.toHexString==`function`)return e;else throw Error(`Argument passed in must be a single String of 12 bytes or a string of 24 hex characters`)}t.exports=d,d.default=d,d.createFromTime=function(e){return e=parseInt(e,10)%4294967295,new d(p(8,e)+`0000000000000000`)},d.createFromHexString=function(e){if(e===void 0||e!=null&&e.length!==24)throw Error(`Argument passed in must be a single String of 12 bytes or a string of 24 hex characters`);for(var t=``,n=0;n<24;)t+=String.fromCharCode(u[e.charCodeAt(n++)]<<4|u[e.charCodeAt(n++)]);return new d(t)},d.isValid=function(e){return e==null?!1:typeof e==`number`?!0:typeof e==`string`?e.length===12||e.length===24&&l.test(e):e instanceof d?!0:o(e)?d.isValid(e.toString(`hex`)):typeof e.toHexString==`function`&&a&&(e.id instanceof a||typeof e.id==`string`)?e.id.length===12||e.id.length===24&&l.test(e.id):!1},d.prototype={constructor:d,toHexString:function(){if(!this.id||!this.id.length)throw Error(`invalid ObjectId, ObjectId.id must be either a string or a Buffer, but is [`+JSON.stringify(this.id)+`]`);if(this.id.length===24)return this.id;if(o(this.id))return this.id.toString(`hex`);for(var e=``,t=0;t<this.id.length;t++)e+=s[this.id.charCodeAt(t)];return e},equals:function(e){return e instanceof d?this.toString()===e.toString():typeof e==`string`&&d.isValid(e)&&e.length===12&&o(this.id)?e===this.id.toString(`binary`):typeof e==`string`&&d.isValid(e)&&e.length===24?e.toLowerCase()===this.toHexString():typeof e==`string`&&d.isValid(e)&&e.length===12?e===this.id:e!=null&&(e instanceof d||e.toHexString)?e.toHexString()===this.toHexString():!1},getTimestamp:function(){var e=new Date,t=o(this.id)?this.id[3]|this.id[2]<<8|this.id[1]<<16|this.id[0]<<24:this.id.charCodeAt(3)|this.id.charCodeAt(2)<<8|this.id.charCodeAt(1)<<16|this.id.charCodeAt(0)<<24;return e.setTime(Math.floor(t)*1e3),e},generate:function(e){typeof e!=`number`&&(e=~~(Date.now()/1e3)),e=parseInt(e,10)%4294967295;var t=f();return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,e&255,n>>16&255,n>>8&255,n&255,i>>8&255,i&255,t>>16&255,t>>8&255,t&255)}};function f(){return r=(r+1)%16777215}function p(e,t){return t=t.toString(16),t.length===e?t:`00000000`.substring(t.length,e)+t}var m=Symbol&&Symbol.for&&Symbol.for(`nodejs.util.inspect.custom`)||`inspect`;d.prototype[m]=function(){return`ObjectID(`+this+`)`},d.prototype.toJSON=d.prototype.toHexString,d.prototype.toString=d.prototype.toHexString}))(),1),C=`AutomationsResponseType`,w=o({dataType:C,path:`/automations/`}),T=i({dataType:C,path:e=>`/automations/${e}/`}),E=p({automation_performance_stats:l(p({automation_id:d(),total_run_count:u().int().nonnegative(),in_progress_run_count:u().int().nonnegative(),completed_run_count:u().int().nonnegative(),exited_early_run_count:u().int().nonnegative(),entries:l(p({date:h([_(),g()]),count:u().int().nonnegative()})).min(1),entry_window:p({date_from:_(),date_to:_(),bucket:m([`day`,`hour`]),timezone:d().min(1)})})).length(1)}),D=(e,t,n=``)=>o({dataType:`AutomationPerformanceStatsResponseType:${n}`,path:`/automations/${e}/performance-stats/`,parseResponse:n=>E.refine(t=>t.automation_performance_stats[0].automation_id===e,{message:`Performance statistics do not match the requested automation.`}).refine(e=>{let n=e.automation_performance_stats[0].entry_window,r=t?.searchParams,i=r?.date_to?new Date(Date.parse(r.date_to)+864e5).toISOString().slice(0,10):void 0;return(!r?.timezone||n.timezone===r.timezone)&&(!r?.date_from||n.date_from===r.date_from)&&(!i||n.date_to===i)},{message:`Performance statistics do not match the requested date range.`}).parse(n)})(t),O=p({id:d().min(1),created_at:g(),status:m([`in_progress`,`completed`,`exited_early`]),failed:f(),member:p({id:d().min(1),name:d().nullable(),email:d()}).nullable()}),k=p({automation_runs:l(O).max(50).refine(e=>new Set(e.map(e=>e.id)).size===e.length,`Run IDs must be unique`),meta:p({pagination:p({state:m([`scanning`,`more`,`exhausted`]).optional(),limit:u().int().positive(),next_cursor:d().min(1).nullable()}).refine(e=>e.state!==`scanning`||e.next_cursor!==null,{message:`Scanning requires a continuation cursor`})})}),A=(e,t,n)=>{let i=`/automations/${e}/runs/`,a=(0,v.useMemo)(()=>new Set,[t,r(i,n?.searchParams)]);return s({dataType:`AutomationRunsResponseType:${t}`,path:i,parseResponse:(e,t)=>{let n=k.parse(e);t.cursor?a.add(t.cursor):a.clear();let r=n.meta.pagination.next_cursor;if(r){if(a.has(r))throw Error(`Automation run pagination repeated a cursor`);a.add(r)}return n},returnData:e=>{let{pages:t}=e,n=new Set;return{runs:t.flatMap(e=>e.automation_runs).filter(e=>n.has(e.id)?!1:(n.add(e.id),!0)),scanning:t.at(-1)?.meta.pagination.state===`scanning`}},defaultNextPageParams:(e,t)=>{let n=e.meta.pagination.next_cursor;return n?{...t,cursor:n}:void 0}})(n)},j=i({dataType:`AutomationActionLinksResponseType`,path:e=>`/automations/${e}/links/`}),M=(e,t,n={})=>j(`${e}/actions/${t}`,n),N=e=>{switch(e.type){case`wait`:return e;case`send_email`:return{id:e.id,type:e.type,data:e.data};default:throw Error(`Unknown automation action type: ${e}`)}},P=a({method:`PUT`,path:({id:e})=>`/automations/${e}/`,body:({status:e,actions:t,edges:n})=>({automations:[{status:e,actions:t.map(N),edges:n}]}),invalidateQueries:{dataType:C}}),F=a({method:`POST`,path:({id:e})=>`/automations/${e}/email_preview`,body:({subject:e,lexical:t})=>({subject:e,lexical:t})}),I=a({method:`POST`,path:({id:e})=>`/automations/${e}/email_test`,body:({email:e,subject:t,lexical:n})=>({email:e,subject:t,lexical:n})}),L=()=>(0,S.default)().toHexString(),R=`default-automated-email`,z=JSON.stringify({root:{children:[],direction:null,format:``,indent:0,type:`root`,version:1}}),B=()=>({id:L(),type:`wait`,data:{wait_hours:24}}),V=()=>({id:L(),type:`send_email`,data:{email_subject:``,email_lexical:z,email_design_setting_id:R}}),H=(e,t)=>{if(!e.actions.some(e=>e.id===t))throw Error(`spliceAction: anchor references unknown action id "${t}"`)},U=(e,t,n)=>e.edges.some(e=>e.source_action_id===t&&e.target_action_id===n),W=({detail:e,action:t,anchor:n})=>{let{previousActionId:r,nextActionId:i}=n;if(r!==void 0&&H(e,r),i!==void 0&&H(e,i),r===void 0&&i===void 0&&e.actions.length>0)throw Error(`spliceAction: anchor is required when inserting into a non-empty automation`);if(r!==void 0&&i!==void 0&&!U(e,r,i))throw Error(`spliceAction: anchor edge "${r}" -> "${i}" does not exist`);if(r!==void 0&&i===void 0&&e.edges.some(e=>e.source_action_id===r))throw Error(`spliceAction: anchor previousActionId "${r}" is not the tail action`);if(r===void 0&&i!==void 0&&e.edges.some(e=>e.target_action_id===i))throw Error(`spliceAction: anchor nextActionId "${i}" is not the head action`);let a=[...e.actions,t],o=e.edges.filter(e=>!(e.source_action_id===r&&e.target_action_id===i));return r!==void 0&&o.push({source_action_id:r,target_action_id:t.id}),i!==void 0&&o.push({source_action_id:t.id,target_action_id:i}),{...e,actions:a,edges:o}},G=({detail:e,anchor:t})=>W({detail:e,action:B(),anchor:t}),K=({detail:e,anchor:t})=>W({detail:e,action:V(),anchor:t}),q=({detail:e,actionId:t,waitHours:n})=>{if(!Number.isSafeInteger(n)||n<=0)throw Error(`updateWaitAction: waitHours must be a safe positive integer, received "${n}"`);let r=!1,i=e.actions.map(e=>{if(e.id===t){if(e.type!==`wait`)throw Error(`updateWaitAction: action "${t}" is not a wait action`);return r=!0,{...e,data:{...e.data,wait_hours:n}}}return e});if(!r)throw Error(`updateWaitAction: unknown action id "${t}"`);return{...e,actions:i,edges:[...e.edges]}},J=({detail:e,actionId:t,emailSubject:n,emailLexical:r})=>{let i=!1,a=e.actions.map(e=>{if(e.id===t){if(e.type!==`send_email`)throw Error(`updateSendEmailAction: action "${t}" is not a send_email action`);return i=!0,{...e,data:{...e.data,email_subject:n,email_lexical:r}}}return e});if(!i)throw Error(`updateSendEmailAction: unknown action id "${t}"`);return{...e,actions:a,edges:[...e.edges]}},Y=({detail:e,actionId:t})=>{let n=e.actions.filter(e=>e.id!==t);if(!(n.length<e.actions.length))throw Error(`removeAction: unknown action id "${t}"`);let r=e.edges.find(e=>e.target_action_id===t),i=e.edges.find(e=>e.source_action_id===t),a=e.edges.filter(e=>e.source_action_id!==t&&e.target_action_id!==t);return r&&i&&a.push({source_action_id:r.source_action_id,target_action_id:i.target_action_id}),{...e,actions:n,edges:a}};export{J as a,A as c,F as d,T as f,b as g,x as h,Y as i,w as l,I as m,K as n,q as o,D as p,G as r,M as s,O as t,P as u};
|
|
1
|
+
(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`954a9bfc-a796-4060-8dca-8904c6602002`,e._sentryDebugIdIdentifier=`sentry-dbid-954a9bfc-a796-4060-8dca-8904c6602002`)}catch{}})();import{n as e,s as t,t as n}from"./react-C9lG_SsT.js";import{c as r,i,n as a,r as o,t as s}from"./hooks-0r7qxGEo.js";import{t as c}from"./jsx-runtime-Bm2_KH-0.js";import{a as l,f as u,g as d,o as f,p,r as m,v as h}from"./schemas-21VB7GGY.js";import{n as g,t as _}from"./iso-B3K0cJod.js";var v=t(n(),1),y=c(),b=({status:e})=>{switch(e){case`active`:return(0,y.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 rounded-full bg-green/20 px-2 py-0.5 text-xs font-medium text-green uppercase`,children:[(0,y.jsx)(`span`,{className:`size-1.5 rounded-full bg-green`}),`Live`]});case`inactive`:return(0,y.jsx)(`span`,{className:`inline-flex items-center gap-1.5 rounded-full bg-muted px-2 py-0.5 text-xs font-medium text-muted-foreground uppercase`,children:`Off`});default:throw Error(`Unhandled status: ${String(e)}`)}},x={free:`member-welcome-email-free`,paid:`member-welcome-email-paid`},S=t(e(((e,t)=>{for(var n=Math.floor(Math.random()*16777215),r=d.index=parseInt(Math.random()*16777215,10),i=(typeof process>`u`||typeof process.pid!=`number`?Math.floor(Math.random()*1e5):process.pid)%65535,a=(()=>{try{return _Buffer}catch{try{return Buffer}catch{return null}}})(),o=function(e){return!!(e!=null&&e.constructor&&typeof e.constructor.isBuffer==`function`&&e.constructor.isBuffer(e))},s=[],c=0;c<256;c++)s[c]=(c<=15?`0`:``)+c.toString(16);var l=RegExp(`^[0-9a-fA-F]{24}$`),u=[];for(c=0;c<10;)u[48+c]=c++;for(;c<16;)u[55+c]=u[87+c]=c++;function d(e){if(!(this instanceof d))return new d(e);if(e&&(e instanceof d||e._bsontype===`ObjectID`))return e;if(this._bsontype=`ObjectID`,e==null||typeof e==`number`){this.id=this.generate(e);return}var t=d.isValid(e);if(!t&&e!=null)throw Error(`Argument passed in must be a single String of 12 bytes or a string of 24 hex characters`);if(t&&typeof e==`string`&&e.length===24)return d.createFromHexString(e);if(e!=null&&e.length===12)this.id=e;else if(e!=null&&typeof e.toHexString==`function`)return e;else throw Error(`Argument passed in must be a single String of 12 bytes or a string of 24 hex characters`)}t.exports=d,d.default=d,d.createFromTime=function(e){return e=parseInt(e,10)%4294967295,new d(p(8,e)+`0000000000000000`)},d.createFromHexString=function(e){if(e===void 0||e!=null&&e.length!==24)throw Error(`Argument passed in must be a single String of 12 bytes or a string of 24 hex characters`);for(var t=``,n=0;n<24;)t+=String.fromCharCode(u[e.charCodeAt(n++)]<<4|u[e.charCodeAt(n++)]);return new d(t)},d.isValid=function(e){return e==null?!1:typeof e==`number`?!0:typeof e==`string`?e.length===12||e.length===24&&l.test(e):e instanceof d?!0:o(e)?d.isValid(e.toString(`hex`)):typeof e.toHexString==`function`&&a&&(e.id instanceof a||typeof e.id==`string`)?e.id.length===12||e.id.length===24&&l.test(e.id):!1},d.prototype={constructor:d,toHexString:function(){if(!this.id||!this.id.length)throw Error(`invalid ObjectId, ObjectId.id must be either a string or a Buffer, but is [`+JSON.stringify(this.id)+`]`);if(this.id.length===24)return this.id;if(o(this.id))return this.id.toString(`hex`);for(var e=``,t=0;t<this.id.length;t++)e+=s[this.id.charCodeAt(t)];return e},equals:function(e){return e instanceof d?this.toString()===e.toString():typeof e==`string`&&d.isValid(e)&&e.length===12&&o(this.id)?e===this.id.toString(`binary`):typeof e==`string`&&d.isValid(e)&&e.length===24?e.toLowerCase()===this.toHexString():typeof e==`string`&&d.isValid(e)&&e.length===12?e===this.id:e!=null&&(e instanceof d||e.toHexString)?e.toHexString()===this.toHexString():!1},getTimestamp:function(){var e=new Date,t=o(this.id)?this.id[3]|this.id[2]<<8|this.id[1]<<16|this.id[0]<<24:this.id.charCodeAt(3)|this.id.charCodeAt(2)<<8|this.id.charCodeAt(1)<<16|this.id.charCodeAt(0)<<24;return e.setTime(Math.floor(t)*1e3),e},generate:function(e){typeof e!=`number`&&(e=~~(Date.now()/1e3)),e=parseInt(e,10)%4294967295;var t=f();return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,e&255,n>>16&255,n>>8&255,n&255,i>>8&255,i&255,t>>16&255,t>>8&255,t&255)}};function f(){return r=(r+1)%16777215}function p(e,t){return t=t.toString(16),t.length===e?t:`00000000`.substring(t.length,e)+t}var m=Symbol&&Symbol.for&&Symbol.for(`nodejs.util.inspect.custom`)||`inspect`;d.prototype[m]=function(){return`ObjectID(`+this+`)`},d.prototype.toJSON=d.prototype.toHexString,d.prototype.toString=d.prototype.toHexString}))(),1),C=`AutomationsResponseType`,w=o({dataType:C,path:`/automations/`}),T=i({dataType:C,path:e=>`/automations/${e}/`}),E=p({automation_performance_stats:l(p({automation_id:d(),total_run_count:u().int().nonnegative(),in_progress_run_count:u().int().nonnegative(),completed_run_count:u().int().nonnegative(),exited_early_run_count:u().int().nonnegative(),entries:l(p({date:h([_(),g()]),count:u().int().nonnegative()})).min(1),entry_window:p({date_from:_(),date_to:_(),bucket:m([`day`,`hour`]),timezone:d().min(1)})})).length(1)}),D=(e,t,n=``)=>o({dataType:`AutomationPerformanceStatsResponseType:${n}`,path:`/automations/${e}/performance-stats/`,parseResponse:n=>E.refine(t=>t.automation_performance_stats[0].automation_id===e,{message:`Performance statistics do not match the requested automation.`}).refine(e=>{let n=e.automation_performance_stats[0].entry_window,r=t?.searchParams,i=r?.date_to?new Date(Date.parse(r.date_to)+864e5).toISOString().slice(0,10):void 0;return(!r?.timezone||n.timezone===r.timezone)&&(!r?.date_from||n.date_from===r.date_from)&&(!i||n.date_to===i)},{message:`Performance statistics do not match the requested date range.`}).parse(n)})(t),O=p({id:d().min(1),created_at:g(),status:m([`in_progress`,`completed`,`exited_early`]),failed:f(),member:p({id:d().min(1),name:d().nullable(),email:d()}).nullable()}),k=p({automation_runs:l(O).max(50).refine(e=>new Set(e.map(e=>e.id)).size===e.length,`Run IDs must be unique`),meta:p({pagination:p({state:m([`scanning`,`more`,`exhausted`]).optional(),limit:u().int().positive(),next_cursor:d().min(1).nullable()}).refine(e=>e.state!==`scanning`||e.next_cursor!==null,{message:`Scanning requires a continuation cursor`})})}),A=(e,t,n)=>{let i=`/automations/${e}/runs/`,a=(0,v.useMemo)(()=>new Set,[t,r(i,n?.searchParams)]);return s({dataType:`AutomationRunsResponseType:${t}`,path:i,parseResponse:(e,t)=>{let n=k.parse(e);t.cursor?a.add(t.cursor):a.clear();let r=n.meta.pagination.next_cursor;if(r){if(a.has(r))throw Error(`Automation run pagination repeated a cursor`);a.add(r)}return n},returnData:e=>{let{pages:t}=e,n=new Set;return{runs:t.flatMap(e=>e.automation_runs).filter(e=>n.has(e.id)?!1:(n.add(e.id),!0)),scanning:t.at(-1)?.meta.pagination.state===`scanning`}},defaultNextPageParams:(e,t)=>{let n=e.meta.pagination.next_cursor;return n?{...t,cursor:n}:void 0}})(n)},j=i({dataType:`AutomationActionLinksResponseType`,path:e=>`/automations/${e}/links/`}),M=(e,t,n={})=>j(`${e}/actions/${t}`,n),N=e=>{switch(e.type){case`wait`:return e;case`send_email`:return{id:e.id,type:e.type,data:e.data};default:throw Error(`Unknown automation action type: ${e}`)}},P=a({method:`PUT`,path:({id:e})=>`/automations/${e}/`,body:({name:e,description:t,status:n,actions:r,edges:i,trigger_tier_scope:a,trigger_tier_ids:o})=>({automations:[{name:e,description:t,status:n,trigger_tier_scope:a,trigger_tier_ids:o,actions:r.map(N),edges:i}]}),invalidateQueries:{dataType:C}}),F=a({method:`POST`,path:({id:e})=>`/automations/${e}/email_preview`,body:({subject:e,lexical:t})=>({subject:e,lexical:t})}),I=a({method:`POST`,path:({id:e})=>`/automations/${e}/email_test`,body:({email:e,subject:t,lexical:n})=>({email:e,subject:t,lexical:n})}),L=()=>(0,S.default)().toHexString(),R=`default-automated-email`,z=JSON.stringify({root:{children:[],direction:null,format:``,indent:0,type:`root`,version:1}}),B=()=>({id:L(),type:`wait`,data:{wait_hours:24}}),V=()=>({id:L(),type:`send_email`,data:{email_subject:``,email_lexical:z,email_design_setting_id:R}}),H=(e,t)=>{if(!e.actions.some(e=>e.id===t))throw Error(`spliceAction: anchor references unknown action id "${t}"`)},U=(e,t,n)=>e.edges.some(e=>e.source_action_id===t&&e.target_action_id===n),W=({detail:e,action:t,anchor:n})=>{let{previousActionId:r,nextActionId:i}=n;if(r!==void 0&&H(e,r),i!==void 0&&H(e,i),r===void 0&&i===void 0&&e.actions.length>0)throw Error(`spliceAction: anchor is required when inserting into a non-empty automation`);if(r!==void 0&&i!==void 0&&!U(e,r,i))throw Error(`spliceAction: anchor edge "${r}" -> "${i}" does not exist`);if(r!==void 0&&i===void 0&&e.edges.some(e=>e.source_action_id===r))throw Error(`spliceAction: anchor previousActionId "${r}" is not the tail action`);if(r===void 0&&i!==void 0&&e.edges.some(e=>e.target_action_id===i))throw Error(`spliceAction: anchor nextActionId "${i}" is not the head action`);let a=[...e.actions,t],o=e.edges.filter(e=>!(e.source_action_id===r&&e.target_action_id===i));return r!==void 0&&o.push({source_action_id:r,target_action_id:t.id}),i!==void 0&&o.push({source_action_id:t.id,target_action_id:i}),{...e,actions:a,edges:o}},G=({detail:e,anchor:t})=>W({detail:e,action:B(),anchor:t}),K=({detail:e,anchor:t})=>W({detail:e,action:V(),anchor:t}),q=({detail:e,actionId:t,waitHours:n})=>{if(!Number.isSafeInteger(n)||n<=0)throw Error(`updateWaitAction: waitHours must be a safe positive integer, received "${n}"`);let r=!1,i=e.actions.map(e=>{if(e.id===t){if(e.type!==`wait`)throw Error(`updateWaitAction: action "${t}" is not a wait action`);return r=!0,{...e,data:{...e.data,wait_hours:n}}}return e});if(!r)throw Error(`updateWaitAction: unknown action id "${t}"`);return{...e,actions:i,edges:[...e.edges]}},J=({detail:e,actionId:t,emailSubject:n,emailLexical:r})=>{let i=!1,a=e.actions.map(e=>{if(e.id===t){if(e.type!==`send_email`)throw Error(`updateSendEmailAction: action "${t}" is not a send_email action`);return i=!0,{...e,data:{...e.data,email_subject:n,email_lexical:r}}}return e});if(!i)throw Error(`updateSendEmailAction: unknown action id "${t}"`);return{...e,actions:a,edges:[...e.edges]}},Y=({detail:e,actionId:t})=>{let n=e.actions.filter(e=>e.id!==t);if(!(n.length<e.actions.length))throw Error(`removeAction: unknown action id "${t}"`);let r=e.edges.find(e=>e.target_action_id===t),i=e.edges.find(e=>e.source_action_id===t),a=e.edges.filter(e=>e.source_action_id!==t&&e.target_action_id!==t);return r&&i&&a.push({source_action_id:r.source_action_id,target_action_id:i.target_action_id}),{...e,actions:n,edges:a}};export{J as a,A as c,F as d,T as f,b as g,x as h,Y as i,w as l,I as m,K as n,q as o,D as p,G as r,M as s,O as t,P as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`0397e710-0a5f-49e9-a7d5-98d75bf34fa0`,e._sentryDebugIdIdentifier=`sentry-dbid-0397e710-0a5f-49e9-a7d5-98d75bf34fa0`)}catch{}})();import{t as e}from"./react-C9lG_SsT.js";import{o as t}from"./hooks-0r7qxGEo.js";import{t as n}from"./jsx-runtime-Bm2_KH-0.js";import{s as r}from"./config-CRAZ4Civ.js";import{n as i}from"./chunk-OB3PAWPO-D3muQBsq.js";import{H as a,L as o,W as s}from"./shade-provider-DvrXKKQZ.js";import{t as c}from"./box-BOIwAOVT.js";import{t as l}from"./container-DakAbO79.js";import{Rt as u,i as d}from"./button-CTHYSI-d.js";import{t as f}from"./badge-DuMiqyUH.js";import{t as p}from"./skeleton-C1s6yr9e.js";import{t as m}from"./page-header-CxTb0je5.js";import{a as h,c as g,n as _,r as v,s as y,t as b}from"./table-DQ63Yu4a.js";import{l as x,n as S}from"./users-CKJaAxEJ.js";import{B as C,Bt as w,Kt as T,Vt as E}from"./index-RuRs_qGS.js";import{g as D,h as O,l as k}from"./automations-BpweKEcq.js";import{t as A}from"./list-page-BnOuLOBb.js";e();var j=n(),M=`https://forum.ghost.org`,N=`https://ghost.org/help/automations-beta`,P=`block w-full rounded-xl border border-border bg-card p-6 text-left transition-all hover:shadow-xs hover:bg-table-row-hover group/card`,F=({title:e,description:t,children:n})=>(0,j.jsxs)(`div`,{className:`flex items-center gap-6`,children:[n,(0,j.jsxs)(`div`,{className:`flex flex-col gap-0.5 leading-tight`,children:[(0,j.jsx)(`span`,{className:`text-base font-semibold`,children:e}),(0,j.jsx)(`span`,{className:`text-sm font-normal text-gray-700`,children:t})]})]}),I=({url:e,className:t,title:n,description:r,children:i})=>(0,j.jsx)(`a`,{className:o(P,t),href:e,rel:`noreferrer`,target:`_blank`,children:(0,j.jsx)(F,{description:r,title:n,children:i})}),L=({className:e,title:t,description:n,children:r,onClick:i,onMouseEnter:a,onFocus:s})=>(0,j.jsx)(`button`,{className:o(P,`cursor-pointer appearance-none`,e),type:`button`,onClick:i,onFocus:s,onMouseEnter:a,children:(0,j.jsx)(F,{description:n,title:t,children:r})}),R=()=>(0,j.jsx)(`div`,{className:`flex h-18 w-[100px] min-w-[100px] items-center justify-center rounded-md bg-gradient-to-tr from-[#8B5CF6]/20 to-[#EC4899]/20 p-4 opacity-80 transition-all group-hover/card:opacity-100`,children:(0,j.jsx)(d,{className:`text-[#8B5CF6]`,size:20,strokeWidth:1.5})}),z=()=>(0,j.jsx)(`div`,{className:`flex h-18 w-[100px] min-w-[100px] items-center justify-center rounded-md bg-gradient-to-tl from-[#10B981]/20 to-[#0EA5E9]/20 p-4 opacity-80 transition-all group-hover/card:opacity-100`,children:(0,j.jsx)(u,{className:`text-[#0EA5E9]`,size:20,strokeWidth:1.5})}),B=`Share your feedback`,V=`Tell us what’s working and what’s missing — your input shapes what we build next.`,H=()=>{let{data:e}=t(),{isAvailable:n,openFeedbackWidget:r,preloadFeedbackWidget:i}=w(),a=n&&e&&!x(e);return(0,j.jsxs)(`div`,{className:`mt-auto grid grid-cols-1 gap-6 pt-10 lg:grid-cols-2`,children:[(0,j.jsx)(I,{description:`Learn how to set up automations, customize your emails, and get the most out of the beta.`,title:`Automations in Ghost`,url:N,children:(0,j.jsx)(R,{})}),a?(0,j.jsx)(L,{description:V,title:B,onClick:()=>r(),onFocus:i,onMouseEnter:i,children:(0,j.jsx)(z,{})}):(0,j.jsx)(I,{description:V,title:B,url:M,children:(0,j.jsx)(z,{})})]})},U=[{key:`lastEntry`,label:`Last started`,widthClassName:`lg:w-40`,skeletonWidthClassName:`w-20`},{key:`totalEntries`,label:`Total runs`,widthClassName:`lg:w-32`,skeletonWidthClassName:`w-10`},{key:`inProgressEntries`,label:`In progress`,widthClassName:`lg:w-32`,skeletonWidthClassName:`w-10`}],W=e=>{e.defaultPrevented||!(e.target instanceof Element)||e.target.closest(`a, button, input, select, textarea`)||e.currentTarget.querySelector(`a`)?.click()},G=()=>(0,j.jsx)(b,{"aria-busy":`true`,"aria-label":`Automations`,className:`flex table-auto flex-col lg:table`,"data-testid":`automations-list-loading`,children:(0,j.jsx)(_,{className:`flex flex-col lg:table-row-group`,children:Array.from({length:2},(e,t)=>(0,j.jsxs)(g,{"aria-hidden":`true`,className:`grid w-full grid-cols-[repeat(3,minmax(0,1fr))_auto] items-center gap-x-4 gap-y-3 px-2 py-6 lg:table-row lg:gap-0 lg:p-0`,children:[(0,j.jsxs)(v,{className:`col-span-3 row-start-1 min-w-0 p-0 lg:table-cell lg:p-4`,children:[(0,j.jsx)(p,{className:`mb-1 h-3 w-48 max-w-full `}),(0,j.jsx)(p,{className:`h-3 w-80 max-w-full`})]}),U.map(e=>(0,j.jsx)(v,{className:o(`row-start-2 min-w-0 p-0 lg:table-cell lg:p-4`,e.widthClassName),children:(0,j.jsx)(p,{className:o(`h-3`,e.skeletonWidthClassName)})},e.key)),(0,j.jsx)(v,{className:`col-start-4 row-start-1 w-auto p-0 text-right lg:table-cell lg:w-28 lg:p-4 lg:text-left`,children:(0,j.jsx)(p,{className:`ml-auto h-3 w-16 lg:ml-0`})})]},t))})}),K=({automations:e=[],isLoading:t=!1})=>{if(t)return(0,j.jsx)(G,{});let n=e.every(e=>e.stats!==void 0);return(0,j.jsxs)(b,{"aria-label":`Automations`,className:o(`flex table-auto flex-col lg:table`,!n&&`border-t`),"data-testid":`automations-list`,children:[n&&(0,j.jsx)(y,{className:`hidden lg:table-header-group`,children:(0,j.jsxs)(g,{className:`hover:bg-transparent`,children:[(0,j.jsx)(h,{className:`lg:px-4`,scope:`col`,children:`Automation`}),U.map(e=>(0,j.jsx)(h,{className:o(`lg:px-4`,e.widthClassName),scope:`col`,children:e.label},e.key)),(0,j.jsx)(h,{className:`w-28 lg:px-4`,scope:`col`,children:`Status`})]})}),(0,j.jsx)(_,{className:`flex flex-col lg:table-row-group`,children:e.map(e=>{let t=e.description.trim(),r=e.stats?.last_run_created_at,c=e.stats?.total_run_count??0,l=e.stats?.in_progress_run_count??0,u={lastEntry:{content:r?(0,j.jsx)(`time`,{dateTime:r,children:s(r)}):`Never`,isEmpty:!r},totalEntries:{content:a(c),isEmpty:c===0},inProgressEntries:{content:a(l),isEmpty:l===0}};return(0,j.jsxs)(g,{className:`grid w-full cursor-pointer grid-cols-[repeat(3,minmax(0,1fr))_auto] items-center gap-x-4 gap-y-3 px-2 py-6 hover:bg-table-row-hover has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-offset-[-2px] has-[:focus-visible]:outline-focus-ring lg:table-row lg:gap-0 lg:p-0`,"data-testid":`automation-list-row`,onClick:W,children:[(0,j.jsxs)(h,{className:`col-span-3 row-start-1 h-auto min-w-0 p-0 text-left text-base font-normal tracking-normal text-foreground lg:table-cell lg:p-4`,scope:`row`,children:[(0,j.jsx)(i,{className:`rounded-sm focus-visible:outline-hidden`,to:`/automations/${e.id}`,children:(0,j.jsx)(`span`,{className:`block text-md font-semibold`,children:e.name})}),t&&(0,j.jsx)(`span`,{className:`block text-muted-foreground`,children:t})]}),n&&U.map(e=>{let t=u[e.key];return(0,j.jsxs)(v,{className:o(`row-start-2 flex min-w-0 flex-col p-0 lg:table-cell lg:p-4`,e.widthClassName,t.isEmpty&&`text-muted-foreground`),children:[t.content,(0,j.jsx)(`span`,{className:`mt-0.5 text-sm leading-tight whitespace-nowrap text-muted-foreground lg:hidden`,children:e.label})]},e.key)}),(0,j.jsx)(v,{className:o(`col-start-4 row-start-1 w-auto p-0 text-right lg:table-cell lg:p-4`,n?`lg:w-28 lg:text-left`:`lg:w-32`),children:(0,j.jsx)(D,{status:e.status})})]},e.id)})})]})},q=()=>{let{data:e,error:t,isError:n,isLoading:i}=k({defaultErrorHandler:!1,refetchOnMount:`always`,staleTime:0}),{data:a,isLoading:o}=T(),{data:s,isLoading:c}=r();return{automations:E(a?.settings||[],s?.config||{})?e?.automations:e?.automations?.filter(e=>e.slug!==O.paid),automationCount:e?.automations?.length,error:t,isError:n,isLoading:i||o||c}},J=50,Y=()=>{let{automations:e,automationCount:n,error:r,isError:i,isLoading:a}=q(),o=C(`automationsPerTier`),{data:s}=t(),u=!!s&&S(s)&&n!==void 0&&n<J;if(i)throw r instanceof Error?r:Error(`Failed to load automations`);return(0,j.jsx)(c,{className:`size-full`,"data-sentry-mask":`true`,children:(0,j.jsx)(l,{className:`relative flex h-full flex-col`,size:`page`,children:(0,j.jsxs)(A,{"data-testid":`automations-page`,children:[(0,j.jsx)(A.Header,{children:(0,j.jsxs)(m,{blurredBackground:!1,sticky:!1,children:[(0,j.jsx)(m.Left,{children:(0,j.jsx)(m.Title,{children:(0,j.jsxs)(`span`,{className:`inline-flex items-baseline gap-2`,children:[`Automations`,(0,j.jsx)(f,{className:`px-1 py-px text-[10px] leading-none tracking-wider uppercase`,variant:`secondary`,children:`Beta`})]})})}),o&&(0,j.jsx)(m.Actions,{children:(0,j.jsx)(m.ActionGroup,{children:(0,j.jsx)(m.ActionGroup.Primary,{children:(0,j.jsx)(m.Action,{disabled:!u,label:`New automation`,type:`button`,children:`New automation`})})})})]})}),(0,j.jsxs)(A.Body,{children:[(0,j.jsx)(K,{automations:e,isLoading:a}),(0,j.jsx)(H,{})]})]})})})};export{Y as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`12be5d7c-bc08-4713-a262-2570aece73dc`,e._sentryDebugIdIdentifier=`sentry-dbid-12be5d7c-bc08-4713-a262-2570aece73dc`)}catch{}})();import{s as e,t}from"./react-C9lG_SsT.js";import{t as n}from"./jsx-runtime-Bm2_KH-0.js";import{n as r}from"./dist-pogVoW2G.js";import{n as i,r as a}from"./heading-Ch2Mb19A.js";import{Nn as o,or as s,t as c,zn as l}from"./button-CTHYSI-d.js";import{a as u,c as d,i as f,n as p,o as m,r as h,s as g,t as _}from"./alert-dialog-CAPLqwVs.js";import{a as v}from"./routes-
|
|
1
|
+
(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`12be5d7c-bc08-4713-a262-2570aece73dc`,e._sentryDebugIdIdentifier=`sentry-dbid-12be5d7c-bc08-4713-a262-2570aece73dc`)}catch{}})();import{s as e,t}from"./react-C9lG_SsT.js";import{t as n}from"./jsx-runtime-Bm2_KH-0.js";import{n as r}from"./dist-pogVoW2G.js";import{n as i,r as a}from"./heading-Ch2Mb19A.js";import{Nn as o,or as s,t as c,zn as l}from"./button-CTHYSI-d.js";import{a as u,c as d,i as f,n as p,o as m,r as h,s as g,t as _}from"./alert-dialog-CAPLqwVs.js";import{a as v}from"./routes-DKfpFMfF.js";import{c as y,o as b,r as x,s as S,t as C}from"./dialog-BO1lcy8A.js";import{t as w}from"./edit-profile-PrLbJV3P.js";import{n as T}from"./loading-indicator-DaRyGrxv.js";import{l as E}from"./content-formatters-C08JJbUJ.js";import{a as D,d as O,g as k,m as A}from"./use-activity-pub-queries-BgR1USeY.js";import"./layout-_g2xhB0L.js";var j=e(t(),1),M=n(),N=5e3,P=12,F=()=>{let{data:e,isLoading:t}=D(`index`,`me`),[n,F]=(0,j.useState)(()=>e?.blueskyEnabled&&!e?.blueskyHandleConfirmed),[I,L]=(0,j.useState)(!1),[R,z]=(0,j.useState)(!1),[B,V]=(0,j.useState)(!1),[H,U]=(0,j.useState)(!1),W=(0,j.useRef)(0),G=k(`index`),K=A(`index`),q=O(`index`),J=async()=>{L(!0),await navigator.clipboard.writeText(e?.blueskyHandle||``),setTimeout(()=>L(!1),2e3)},Y=async()=>{if(!e?.avatarUrl)z(!0);else{F(!0);try{await G.mutateAsync()}catch{F(!1),r.error(`Something went wrong, please try again.`)}}},X=async()=>{F(!0);try{await K.mutateAsync(),V(!1),r.success(`Bluesky sharing disabled`)}finally{F(!1)}},Z=(0,j.useCallback)(()=>{q.mutateAsync().then(e=>{e&&U(!0)})},[]);if((0,j.useEffect)(()=>{if(!e?.blueskyEnabled){U(!1),F(!1),W.current=0;return}if(e?.blueskyHandleConfirmed){U(!0),F(!1),W.current>0&&r.success(`Bluesky sharing enabled`),W.current=0;return}U(!1),F(!0),W.current=0;let t=setInterval(async()=>{if(W.current+=1,W.current>P){clearInterval(t),r.error(`Something went wrong, please try again.`),await K.mutateAsync(),F(!1);return}Z()},N);return()=>clearInterval(t)},[e?.blueskyEnabled,e?.blueskyHandleConfirmed,Z]),t)return(0,M.jsx)(v,{children:(0,M.jsxs)(`div`,{className:`mx-auto max-w-[620px] py-[min(4vh,48px)]`,children:[(0,M.jsx)(`div`,{className:`flex items-center justify-between gap-8`,children:(0,M.jsx)(i,{children:`Bluesky sharing`})}),(0,M.jsx)(`div`,{className:`mt-6 flex justify-center`,children:(0,M.jsx)(T,{size:`md`})})]})});let Q=e?.blueskyEnabled&&e?.blueskyHandleConfirmed;return(0,M.jsxs)(v,{children:[(0,M.jsxs)(`div`,{className:`mx-auto max-w-[620px] py-[min(4vh,48px)]`,children:[(0,M.jsxs)(`div`,{className:`flex items-center justify-between gap-8`,children:[(0,M.jsx)(i,{children:`Bluesky sharing`}),Q&&(0,M.jsxs)(c,{className:`group w-24 translate-y-1 px-2 hover:bg-red/5! hover:text-red`,size:`default`,variant:`outline`,onClick:()=>V(!0),children:[(0,M.jsx)(`span`,{className:`size-2 rounded-full bg-green group-hover:hidden`}),(0,M.jsx)(`span`,{className:`group-hover:hidden`,children:`Enabled`}),(0,M.jsx)(`span`,{className:`hidden group-hover:visible! group-hover:inline!`,children:`Disable`})]})]}),Q?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`p`,{className:`mt-2 pr-32 text-base`,children:[`Your social web profile is now connected to Bluesky, via`,` `,(0,M.jsx)(`a`,{className:`text-purple hover:text-purple-600`,href:`https://fed.brid.gy`,rel:`noreferrer`,target:`_blank`,children:`Bridgy Fed`}),`. Posts are automatically synced after a short delay to complete activation.`]}),H&&(0,M.jsxs)(`div`,{className:`mt-6 flex flex-col items-center gap-4 rounded-lg border border-gray-200 p-8 dark:border-gray-950`,children:[(0,M.jsxs)(`div`,{className:`relative`,children:[(0,M.jsx)(E,{author:{icon:{url:e?.avatarUrl||``},name:e?.name||``,handle:e?.handle||``},size:`md`}),(0,M.jsx)(`div`,{className:`absolute right-0 bottom-0 z-10 flex size-6 items-center justify-center rounded-full bg-white shadow-xs`,children:(0,M.jsx)(`svg`,{height:`14`,role:`img`,viewBox:`0 0 24 24`,width:`14`,xmlns:`http://www.w3.org/2000/svg`,children:(0,M.jsx)(`path`,{d:`M12 10.8c-1.087 -2.114 -4.046 -6.053 -6.798 -7.995C2.566 0.944 1.561 1.266 0.902 1.565 0.139 1.908 0 3.08 0 3.768c0 0.69 0.378 5.65 0.624 6.479 0.815 2.736 3.713 3.66 6.383 3.364 0.136 -0.02 0.275 -0.039 0.415 -0.056 -0.138 0.022 -0.276 0.04 -0.415 0.056 -3.912 0.58 -7.387 2.005 -2.83 7.078 5.013 5.19 6.87 -1.113 7.823 -4.308 0.953 3.195 2.05 9.271 7.733 4.308 4.267 -4.308 1.172 -6.498 -2.74 -7.078a8.741 8.741 0 0 1 -0.415 -0.056c0.14 0.017 0.279 0.036 0.415 0.056 2.67 0.297 5.568 -0.628 6.383 -3.364 0.246 -0.828 0.624 -5.79 0.624 -6.478 0 -0.69 -0.139 -1.861 -0.902 -2.206 -0.659 -0.298 -1.664 -0.62 -4.3 1.24C16.046 4.748 13.087 8.687 12 10.8Z`,fill:`#0385FF`,strokeWidth:`1`})})})]}),(0,M.jsxs)(`div`,{className:`flex grow flex-col items-center`,children:[(0,M.jsx)(a,{children:e?.name||``}),(0,M.jsxs)(`div`,{className:`flex items-center gap-1 text-gray-800`,children:[(0,M.jsx)(`span`,{className:`text-lg font-medium`,children:e?.blueskyHandle}),(0,M.jsx)(c,{className:`size-6 p-0 hover:opacity-80`,title:`Copy handle`,variant:`link`,onClick:J,children:I?(0,M.jsx)(s,{size:16}):(0,M.jsx)(l,{size:16})})]})]}),(0,M.jsx)(c,{className:`mt-2 w-full`,size:`lg`,variant:`secondary`,asChild:!0,children:(0,M.jsxs)(`a`,{href:`https://bsky.app/profile/${e?.blueskyHandle?.replace(/^@/,``)}`,rel:`noreferrer`,target:`_blank`,children:[`Open profile`,(0,M.jsx)(o,{size:14,strokeWidth:1.25})]})})]})]}):(0,M.jsxs)(`div`,{className:`mt-3 flex flex-col gap-5`,children:[(0,M.jsx)(`p`,{className:`text-base`,children:e?.avatarUrl?(0,M.jsxs)(M.Fragment,{children:[`Connect your account to`,` `,(0,M.jsx)(`a`,{className:`text-purple hover:text-purple-600`,href:`https://fed.brid.gy`,rel:`noreferrer`,target:`_blank`,children:`Bridgy Fed`}),` `,`to share content directly to a dedicated Bluesky profile and increase your reach across the social web.`]}):`Add a profile image to connect to Bluesky. Profile pictures help prevent spam.`}),(0,M.jsx)(`p`,{className:`-mt-2 text-base`,children:`You can't change your Bluesky username, so make sure you're happy with your current social web handle before connecting.`}),e?.avatarUrl?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(c,{className:`h-10 text-base`,disabled:n,variant:`secondary`,onClick:Y,children:n?(0,M.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,M.jsx)(T,{size:`sm`}),(0,M.jsx)(`span`,{children:`Enabling Bluesky sharing...`})]}):(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`svg`,{height:`32`,role:`img`,viewBox:`0 0 24 24`,width:`32`,xmlns:`http://www.w3.org/2000/svg`,children:(0,M.jsx)(`path`,{d:`M12 10.8c-1.087 -2.114 -4.046 -6.053 -6.798 -7.995C2.566 0.944 1.561 1.266 0.902 1.565 0.139 1.908 0 3.08 0 3.768c0 0.69 0.378 5.65 0.624 6.479 0.815 2.736 3.713 3.66 6.383 3.364 0.136 -0.02 0.275 -0.039 0.415 -0.056 -0.138 0.022 -0.276 0.04 -0.415 0.056 -3.912 0.58 -7.387 2.005 -2.83 7.078 5.013 5.19 6.87 -1.113 7.823 -4.308 0.953 3.195 2.05 9.271 7.733 4.308 4.267 -4.308 1.172 -6.498 -2.74 -7.078a8.741 8.741 0 0 1 -0.415 -0.056c0.14 0.017 0.279 0.036 0.415 0.056 2.67 0.297 5.568 -0.628 6.383 -3.364 0.246 -0.828 0.624 -5.79 0.624 -6.478 0 -0.69 -0.139 -1.861 -0.902 -2.206 -0.659 -0.298 -1.664 -0.62 -4.3 1.24C16.046 4.748 13.087 8.687 12 10.8Z`,fill:`#0385FF`,strokeWidth:`1`})}),`Enable Bluesky sharing`]})}),n&&(0,M.jsx)(`p`,{className:`-mt-2 text-center text-sm text-gray-700 dark:text-gray-600`,children:`You can leave this page and come back to check the status.`})]}):(0,M.jsxs)(C,{open:R,onOpenChange:z,children:[(0,M.jsx)(y,{children:(0,M.jsx)(c,{className:`h-10 w-full text-base`,variant:`secondary`,children:`Edit profile`})}),(0,M.jsxs)(x,{className:`w-full max-w-[520px]`,onOpenAutoFocus:e=>e.preventDefault(),children:[(0,M.jsx)(b,{children:(0,M.jsx)(S,{children:`Profile settings`})}),e&&(0,M.jsx)(w,{account:e,setIsEditingProfile:z})]})]})]})]}),(0,M.jsx)(_,{open:B,onOpenChange:V,children:(0,M.jsxs)(f,{children:[(0,M.jsxs)(g,{children:[(0,M.jsx)(d,{children:`Disable Bluesky sharing?`}),(0,M.jsx)(u,{children:`Your bridged Bluesky account will be deactivated and your content will no longer be shared on Bluesky. You can re-enable sharing at any time.`})]}),(0,M.jsxs)(m,{children:[(0,M.jsx)(h,{children:`Cancel`}),(0,M.jsx)(p,{disabled:n,variant:`destructive`,onClick:e=>{e.preventDefault(),X()},children:n?(0,M.jsx)(T,{color:`light`,size:`sm`}):`Disable`})]})]})})]})};export{F as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`61e01038-d41e-4a78-83aa-bc7ebe719f18`,e._sentryDebugIdIdentifier=`sentry-dbid-61e01038-d41e-4a78-83aa-bc7ebe719f18`)}catch{}})();import{s as e}from"./react-C9lG_SsT.js";import{J as t}from"./shade-provider-DvrXKKQZ.js";import{J as n,q as r}from"./index-
|
|
1
|
+
(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`61e01038-d41e-4a78-83aa-bc7ebe719f18`,e._sentryDebugIdIdentifier=`sentry-dbid-61e01038-d41e-4a78-83aa-bc7ebe719f18`)}catch{}})();import{s as e}from"./react-C9lG_SsT.js";import{J as t}from"./shade-provider-DvrXKKQZ.js";import{J as n,q as r}from"./index-RuRs_qGS.js";var i=e(t(),1),a=e=>e.format(`YYYY-MM-DD`),o=e=>Math.round(e/100),s=e=>{let t=Intl.DateTimeFormat().resolvedOptions().timeZone,n=(0,i.default)().tz(t).endOf(`day`),r;return r=e===-1?(0,i.default)().tz(t).startOf(`year`):(0,i.default)().tz(t).subtract(e-1,`days`).startOf(`day`),{startDate:r,endDate:n,timezone:t}},c=e=>{let t=Intl.DateTimeFormat().resolvedOptions().timeZone,n=(0,i.default)(e).tz(t).startOf(`day`),r=(0,i.default)().tz(t).startOf(`day`).diff(n,`days`)+1;return Math.max(r,1)},l=91,u=366,d=e=>{let t=n.find(t=>t.value===e);return t?[`Last 7 days`,`Last 30 days`,`Last 90 days`,`Last 12 months`].includes(t.name)?`in the ${t.name.toLowerCase()}`:t.name===`All time`?`(all time)`:t.name.toLowerCase():``};function f(e,t=`value`){let n=e.findIndex(e=>Number(e[t])>0);return n>1?e.slice(n-1):e}function p(e,t=[]){if(e===r.yearToDate.value){let{startDate:t,endDate:n}=s(e);return n.diff(t,`days`)+1}return e===r.allTime.value&&t.length>0?(0,i.default)(t[t.length-1].date).diff((0,i.default)(t[0].date),`days`)+1:e}function m(e,t=[],n){if(n)return n;let r=p(e,t);return r>270?`monthly`:r>=91?`weekly`:`none`}function h(e,t,n,r){switch(r){case`sum`:return e;case`avg`:return t>0?e/t:0;case`exact`:return n}}function g(e,t,n,r,a){let o=[],s=(0,i.default)(e[0].date).startOf(r),c=0,l=0,u=e[0],d=()=>{o.push({...u,date:s.format(`YYYY-MM-DD`),[t]:h(c,l,Number(u[t]),n)})};e.forEach(e=>{let n=(0,i.default)(e.date);n.isSame(s,r)||(d(),s=n.clone().startOf(r),c=0,l=0),c+=Number(e[t]),l+=1,u=e}),d();let f=o[0];return a&&a>f.date&&(0,i.default)(a).isSame((0,i.default)(f.date),r)&&(o[0]={...f,date:a}),o}function _(e,t){if(e===r.allTime.value)return t[0].date;let{startDate:n}=s(e);return n.format(`YYYY-MM-DD`)}function v(e,t,n){return t===r.allTime.value?f(e,n):e}var y=(e,t,n=`value`,r=`avg`,i)=>{if(!e.length)return[];let a=v(e,t,n);switch(m(t,a,i)){case`weekly`:return g(a,n,r,`week`,_(t,a));case`monthly`:return g(a,n,r,`month`,_(t,a));default:return a}};function b(e,t=[],n={}){let i=v(t,e,n.fieldName??`value`);switch(m(e,i,n.overrideStrategy)){case`monthly`:return u;case`weekly`:return l;default:return e>0&&e!==r.allTime.value?e:Math.max(p(e,i),2)}}export{s as a,y as c,d as i,a as n,c as o,b as r,p as s,o as t};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var __ember_auto_import__;(()=>{var e,r={80032(e){"use strict"
|
|
2
|
-
e.exports=require("ember-tracked-storage-polyfill")},
|
|
2
|
+
e.exports=require("ember-tracked-storage-polyfill")},90475(e,r,n){e.exports=function(){var e=_eai_d,r=_eai_r
|
|
3
3
|
function t(e){return e&&e.__esModule?e:Object.assign({default:e},e)}window.emberAutoImportDynamic=function(e){return 1===arguments.length?r("_eai_dyn_"+e):r("_eai_dynt_"+e)(Array.prototype.slice.call(arguments,1))},window.emberAutoImportSync=function(e){return r("_eai_sync_"+e)(Array.prototype.slice.call(arguments,1))},e("@sentry/browser",[],function(){return t(n(14919))}),e("@sentry/core",[],function(){return t(n(43581))}),e("@sentry/utils",[],function(){return t(n(3261))}),e("@tryghost/admin-x-framework/api/dunning",[],function(){return t(n(14612))}),e("@tryghost/admin-x-framework/hooks",[],function(){return t(n(88950))}),e("@tryghost/admin-x-framework/utils/admin-theme",[],function(){return t(n(78221))}),e("@tryghost/kg-clean-basic-html",[],function(){return t(n(27929))}),e("@tryghost/kg-converters",[],function(){return t(n(90724))}),e("@tryghost/limit-service",[],function(){return t(n(27944))}),e("@tryghost/nql-string",[],function(){return t(n(26031))}),e("@tryghost/string",[],function(){return t(n(65532))}),e("@tryghost/timezone-data",[],function(){return t(n(44460))}),e("dompurify",[],function(){return t(n(41091))}),e("element-resize-detector",[],function(){return t(n(93197))}),e("ember-assign-helper/helpers/assign",[],function(){return t(n(83514))}),e("ember-keyboard/helpers/if-key.js",[],function(){return t(n(13247))}),e("ember-keyboard/helpers/on-key.js",[],function(){return t(n(41353))}),e("ember-keyboard/modifiers/on-key.js",[],function(){return t(n(61264))}),e("ember-keyboard/services/keyboard.js",[],function(){return t(n(66135))}),e("ember-modifier",[],function(){return t(n(47078))}),e("ember-moment/helpers/-base",[],function(){return t(n(19384))}),e("ember-moment/helpers/is-after",[],function(){return t(n(10527))}),e("ember-moment/helpers/is-before",[],function(){return t(n(46998))}),e("ember-moment/helpers/is-between",[],function(){return t(n(43533))}),e("ember-moment/helpers/is-same",[],function(){return t(n(7675))}),e("ember-moment/helpers/is-same-or-after",[],function(){return t(n(34234))}),e("ember-moment/helpers/is-same-or-before",[],function(){return t(n(26625))}),e("ember-moment/helpers/moment",[],function(){return t(n(4748))}),e("ember-moment/helpers/moment-add",[],function(){return t(n(15950))}),e("ember-moment/helpers/moment-calendar",[],function(){return t(n(61191))}),e("ember-moment/helpers/moment-diff",[],function(){return t(n(78542))}),e("ember-moment/helpers/moment-duration",[],function(){return t(n(84325))}),e("ember-moment/helpers/moment-format",[],function(){return t(n(33366))}),e("ember-moment/helpers/moment-from",[],function(){return t(n(63021))}),e("ember-moment/helpers/moment-from-now",[],function(){return t(n(14196))}),e("ember-moment/helpers/moment-subtract",[],function(){return t(n(67821))}),e("ember-moment/helpers/moment-to",[],function(){return t(n(35248))}),e("ember-moment/helpers/moment-to-date",[],function(){return t(n(87737))}),e("ember-moment/helpers/moment-to-now",[],function(){return t(n(14213))}),e("ember-moment/helpers/now",[],function(){return t(n(5042))}),e("ember-moment/helpers/unix",[],function(){return t(n(8834))}),e("ember-moment/helpers/utc",[],function(){return t(n(7660))}),e("ember-moment/services/moment",[],function(){return t(n(49197))}),e("fast-deep-equal",[],function(){return t(n(45484))}),e("flexsearch",[],function(){return t(n(52177))}),e("focus-trap",[],function(){return t(n(83600))}),e("intersection-observer-admin",[],function(){return t(n(73116))}),e("microdiff",[],function(){return t(n(75917))}),e("moment-timezone",[],function(){return t(n(57681))}),e("raf-pool",[],function(){return t(n(82474))}),e("react",[],function(){return t(n(80576))}),e("react-dom",[],function(){return t(n(42997))}),e("react-dom/client",[],function(){return t(n(99790))}),e("react/jsx-runtime",[],function(){return t(n(49628))}),e("tooltip.js",[],function(){return t(n(82566))}),e("tracked-built-ins",["ember-tracked-storage-polyfill"],function(){return t(n(30227))}),e("validator",[],function(){return t(n(83239))}),e("_eai_dyn_@sentry/browser",[],function(){return Promise.resolve().then(n.bind(n,14919))})}()}},n={}
|
|
4
4
|
function t(e){var o=n[e]
|
|
5
5
|
if(void 0!==o)return o.exports
|
|
@@ -17,8 +17,8 @@ var r=(r,n)=>{var o,u,[i,m,s]=n,c=0
|
|
|
17
17
|
if(i.some(r=>0!==e[r])){for(o in m)t.o(m,o)&&(t.m[o]=m[o])
|
|
18
18
|
if(s)var f=s(t)}for(r&&r(n);c<i.length;c++)u=i[c],t.o(e,u)&&e[u]&&e[u][0](),e[u]=0
|
|
19
19
|
return t.O(f)},n=globalThis.webpackChunk_ember_auto_import_=globalThis.webpackChunk_ember_auto_import_||[]
|
|
20
|
-
n.forEach(r.bind(null,0)),n.push=r.bind(null,n.push.bind(n))})(),t.O(void 0,[675,
|
|
21
|
-
var o=t.O(void 0,[675,
|
|
20
|
+
n.forEach(r.bind(null,0)),n.push=r.bind(null,n.push.bind(n))})(),t.O(void 0,[675,837],()=>t(89126))
|
|
21
|
+
var o=t.O(void 0,[675,837],()=>t(90475))
|
|
22
22
|
o=t.O(o),__ember_auto_import__=o})()
|
|
23
23
|
|
|
24
|
-
//# sourceMappingURL=chunk.524.
|
|
24
|
+
//# sourceMappingURL=chunk.524.e24d68bc6253b274b726.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var __ember_auto_import__;(()=>{var e,r={80032(e){"use strict"
|
|
2
|
-
e.exports=require("ember-tracked-storage-polyfill")},
|
|
3
|
-
function n(e){return e&&e.__esModule?e:Object.assign({default:e},e)}window.emberAutoImportDynamic=function(e){return 1===arguments.length?r("_eai_dyn_"+e):r("_eai_dynt_"+e)(Array.prototype.slice.call(arguments,1))},window.emberAutoImportSync=function(e){return r("_eai_sync_"+e)(Array.prototype.slice.call(arguments,1))},e("@sentry/browser",EAI_DISCOVERED_EXTERNALS("@sentry/browser"),function(){return n(t(14919))}),e("@sentry/core",EAI_DISCOVERED_EXTERNALS("@sentry/core"),function(){return n(t(43581))}),e("@sentry/utils",EAI_DISCOVERED_EXTERNALS("@sentry/utils"),function(){return n(t(3261))}),e("@tryghost/admin-x-framework/api/dunning",EAI_DISCOVERED_EXTERNALS("@tryghost/admin-x-framework/api/dunning"),function(){return n(t(14612))}),e("@tryghost/admin-x-framework/hooks",EAI_DISCOVERED_EXTERNALS("@tryghost/admin-x-framework/hooks"),function(){return n(t(88950))}),e("@tryghost/admin-x-framework/utils/admin-theme",EAI_DISCOVERED_EXTERNALS("@tryghost/admin-x-framework/utils/admin-theme"),function(){return n(t(78221))}),e("@tryghost/kg-clean-basic-html",EAI_DISCOVERED_EXTERNALS("@tryghost/kg-clean-basic-html"),function(){return n(t(27929))}),e("@tryghost/kg-converters",EAI_DISCOVERED_EXTERNALS("@tryghost/kg-converters"),function(){return n(t(90724))}),e("@tryghost/limit-service",EAI_DISCOVERED_EXTERNALS("@tryghost/limit-service"),function(){return n(t(27944))}),e("@tryghost/nql-string",EAI_DISCOVERED_EXTERNALS("@tryghost/nql-string"),function(){return n(t(26031))}),e("@tryghost/string",EAI_DISCOVERED_EXTERNALS("@tryghost/string"),function(){return n(t(65532))}),e("@tryghost/timezone-data",EAI_DISCOVERED_EXTERNALS("@tryghost/timezone-data"),function(){return n(t(44460))}),e("dompurify",EAI_DISCOVERED_EXTERNALS("dompurify"),function(){return n(t(41091))}),e("element-resize-detector",EAI_DISCOVERED_EXTERNALS("element-resize-detector"),function(){return n(t(93197))}),e("ember-assign-helper/helpers/assign",EAI_DISCOVERED_EXTERNALS("ember-assign-helper/helpers/assign"),function(){return n(t(83514))}),e("ember-keyboard/helpers/if-key.js",EAI_DISCOVERED_EXTERNALS("ember-keyboard/helpers/if-key.js"),function(){return n(t(13247))}),e("ember-keyboard/helpers/on-key.js",EAI_DISCOVERED_EXTERNALS("ember-keyboard/helpers/on-key.js"),function(){return n(t(41353))}),e("ember-keyboard/modifiers/on-key.js",EAI_DISCOVERED_EXTERNALS("ember-keyboard/modifiers/on-key.js"),function(){return n(t(61264))}),e("ember-keyboard/services/keyboard.js",EAI_DISCOVERED_EXTERNALS("ember-keyboard/services/keyboard.js"),function(){return n(t(66135))}),e("ember-modifier",EAI_DISCOVERED_EXTERNALS("ember-modifier"),function(){return n(t(47078))}),e("ember-moment/helpers/-base",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/-base"),function(){return n(t(19384))}),e("ember-moment/helpers/is-after",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/is-after"),function(){return n(t(10527))}),e("ember-moment/helpers/is-before",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/is-before"),function(){return n(t(46998))}),e("ember-moment/helpers/is-between",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/is-between"),function(){return n(t(43533))}),e("ember-moment/helpers/is-same",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/is-same"),function(){return n(t(7675))}),e("ember-moment/helpers/is-same-or-after",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/is-same-or-after"),function(){return n(t(34234))}),e("ember-moment/helpers/is-same-or-before",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/is-same-or-before"),function(){return n(t(26625))}),e("ember-moment/helpers/moment",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/moment"),function(){return n(t(4748))}),e("ember-moment/helpers/moment-add",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/moment-add"),function(){return n(t(15950))}),e("ember-moment/helpers/moment-calendar",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/moment-calendar"),function(){return n(t(61191))}),e("ember-moment/helpers/moment-diff",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/moment-diff"),function(){return n(t(78542))}),e("ember-moment/helpers/moment-duration",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/moment-duration"),function(){return n(t(84325))}),e("ember-moment/helpers/moment-format",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/moment-format"),function(){return n(t(33366))}),e("ember-moment/helpers/moment-from",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/moment-from"),function(){return n(t(63021))}),e("ember-moment/helpers/moment-from-now",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/moment-from-now"),function(){return n(t(14196))}),e("ember-moment/helpers/moment-subtract",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/moment-subtract"),function(){return n(t(67821))}),e("ember-moment/helpers/moment-to",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/moment-to"),function(){return n(t(35248))}),e("ember-moment/helpers/moment-to-date",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/moment-to-date"),function(){return n(t(87737))}),e("ember-moment/helpers/moment-to-now",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/moment-to-now"),function(){return n(t(14213))}),e("ember-moment/helpers/now",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/now"),function(){return n(t(5042))}),e("ember-moment/helpers/unix",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/unix"),function(){return n(t(8834))}),e("ember-moment/helpers/utc",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/utc"),function(){return n(t(7660))}),e("ember-moment/services/moment",EAI_DISCOVERED_EXTERNALS("ember-moment/services/moment"),function(){return n(t(49197))}),e("fast-deep-equal",EAI_DISCOVERED_EXTERNALS("fast-deep-equal"),function(){return n(t(45484))}),e("flexsearch",EAI_DISCOVERED_EXTERNALS("flexsearch"),function(){return n(t(52177))}),e("focus-trap",EAI_DISCOVERED_EXTERNALS("focus-trap"),function(){return n(t(83600))}),e("intersection-observer-admin",EAI_DISCOVERED_EXTERNALS("intersection-observer-admin"),function(){return n(t(73116))}),e("microdiff",EAI_DISCOVERED_EXTERNALS("microdiff"),function(){return n(t(75917))}),e("moment-timezone",EAI_DISCOVERED_EXTERNALS("moment-timezone"),function(){return n(t(57681))}),e("raf-pool",EAI_DISCOVERED_EXTERNALS("raf-pool"),function(){return n(t(82474))}),e("react",EAI_DISCOVERED_EXTERNALS("react"),function(){return n(t(80576))}),e("react-dom",EAI_DISCOVERED_EXTERNALS("react-dom"),function(){return n(t(42997))}),e("react-dom/client",EAI_DISCOVERED_EXTERNALS("react-dom/client"),function(){return n(t(99790))}),e("react/jsx-runtime",EAI_DISCOVERED_EXTERNALS("react/jsx-runtime"),function(){return n(t(49628))}),e("tooltip.js",EAI_DISCOVERED_EXTERNALS("tooltip.js"),function(){return n(t(82566))}),e("tracked-built-ins",EAI_DISCOVERED_EXTERNALS("tracked-built-ins"),function(){return n(t(30227))}),e("validator",EAI_DISCOVERED_EXTERNALS("validator"),function(){return n(t(83239))}),e("_eai_dyn_@sentry/browser",[],function(){return Promise.resolve().then(t.bind(t,14919))})}()},
|
|
2
|
+
e.exports=require("ember-tracked-storage-polyfill")},90475(e,r,t){e.exports=function(){var e=_eai_d,r=_eai_r
|
|
3
|
+
function n(e){return e&&e.__esModule?e:Object.assign({default:e},e)}window.emberAutoImportDynamic=function(e){return 1===arguments.length?r("_eai_dyn_"+e):r("_eai_dynt_"+e)(Array.prototype.slice.call(arguments,1))},window.emberAutoImportSync=function(e){return r("_eai_sync_"+e)(Array.prototype.slice.call(arguments,1))},e("@sentry/browser",EAI_DISCOVERED_EXTERNALS("@sentry/browser"),function(){return n(t(14919))}),e("@sentry/core",EAI_DISCOVERED_EXTERNALS("@sentry/core"),function(){return n(t(43581))}),e("@sentry/utils",EAI_DISCOVERED_EXTERNALS("@sentry/utils"),function(){return n(t(3261))}),e("@tryghost/admin-x-framework/api/dunning",EAI_DISCOVERED_EXTERNALS("@tryghost/admin-x-framework/api/dunning"),function(){return n(t(14612))}),e("@tryghost/admin-x-framework/hooks",EAI_DISCOVERED_EXTERNALS("@tryghost/admin-x-framework/hooks"),function(){return n(t(88950))}),e("@tryghost/admin-x-framework/utils/admin-theme",EAI_DISCOVERED_EXTERNALS("@tryghost/admin-x-framework/utils/admin-theme"),function(){return n(t(78221))}),e("@tryghost/kg-clean-basic-html",EAI_DISCOVERED_EXTERNALS("@tryghost/kg-clean-basic-html"),function(){return n(t(27929))}),e("@tryghost/kg-converters",EAI_DISCOVERED_EXTERNALS("@tryghost/kg-converters"),function(){return n(t(90724))}),e("@tryghost/limit-service",EAI_DISCOVERED_EXTERNALS("@tryghost/limit-service"),function(){return n(t(27944))}),e("@tryghost/nql-string",EAI_DISCOVERED_EXTERNALS("@tryghost/nql-string"),function(){return n(t(26031))}),e("@tryghost/string",EAI_DISCOVERED_EXTERNALS("@tryghost/string"),function(){return n(t(65532))}),e("@tryghost/timezone-data",EAI_DISCOVERED_EXTERNALS("@tryghost/timezone-data"),function(){return n(t(44460))}),e("dompurify",EAI_DISCOVERED_EXTERNALS("dompurify"),function(){return n(t(41091))}),e("element-resize-detector",EAI_DISCOVERED_EXTERNALS("element-resize-detector"),function(){return n(t(93197))}),e("ember-assign-helper/helpers/assign",EAI_DISCOVERED_EXTERNALS("ember-assign-helper/helpers/assign"),function(){return n(t(83514))}),e("ember-keyboard/helpers/if-key.js",EAI_DISCOVERED_EXTERNALS("ember-keyboard/helpers/if-key.js"),function(){return n(t(13247))}),e("ember-keyboard/helpers/on-key.js",EAI_DISCOVERED_EXTERNALS("ember-keyboard/helpers/on-key.js"),function(){return n(t(41353))}),e("ember-keyboard/modifiers/on-key.js",EAI_DISCOVERED_EXTERNALS("ember-keyboard/modifiers/on-key.js"),function(){return n(t(61264))}),e("ember-keyboard/services/keyboard.js",EAI_DISCOVERED_EXTERNALS("ember-keyboard/services/keyboard.js"),function(){return n(t(66135))}),e("ember-modifier",EAI_DISCOVERED_EXTERNALS("ember-modifier"),function(){return n(t(47078))}),e("ember-moment/helpers/-base",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/-base"),function(){return n(t(19384))}),e("ember-moment/helpers/is-after",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/is-after"),function(){return n(t(10527))}),e("ember-moment/helpers/is-before",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/is-before"),function(){return n(t(46998))}),e("ember-moment/helpers/is-between",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/is-between"),function(){return n(t(43533))}),e("ember-moment/helpers/is-same",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/is-same"),function(){return n(t(7675))}),e("ember-moment/helpers/is-same-or-after",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/is-same-or-after"),function(){return n(t(34234))}),e("ember-moment/helpers/is-same-or-before",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/is-same-or-before"),function(){return n(t(26625))}),e("ember-moment/helpers/moment",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/moment"),function(){return n(t(4748))}),e("ember-moment/helpers/moment-add",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/moment-add"),function(){return n(t(15950))}),e("ember-moment/helpers/moment-calendar",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/moment-calendar"),function(){return n(t(61191))}),e("ember-moment/helpers/moment-diff",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/moment-diff"),function(){return n(t(78542))}),e("ember-moment/helpers/moment-duration",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/moment-duration"),function(){return n(t(84325))}),e("ember-moment/helpers/moment-format",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/moment-format"),function(){return n(t(33366))}),e("ember-moment/helpers/moment-from",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/moment-from"),function(){return n(t(63021))}),e("ember-moment/helpers/moment-from-now",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/moment-from-now"),function(){return n(t(14196))}),e("ember-moment/helpers/moment-subtract",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/moment-subtract"),function(){return n(t(67821))}),e("ember-moment/helpers/moment-to",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/moment-to"),function(){return n(t(35248))}),e("ember-moment/helpers/moment-to-date",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/moment-to-date"),function(){return n(t(87737))}),e("ember-moment/helpers/moment-to-now",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/moment-to-now"),function(){return n(t(14213))}),e("ember-moment/helpers/now",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/now"),function(){return n(t(5042))}),e("ember-moment/helpers/unix",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/unix"),function(){return n(t(8834))}),e("ember-moment/helpers/utc",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/utc"),function(){return n(t(7660))}),e("ember-moment/services/moment",EAI_DISCOVERED_EXTERNALS("ember-moment/services/moment"),function(){return n(t(49197))}),e("fast-deep-equal",EAI_DISCOVERED_EXTERNALS("fast-deep-equal"),function(){return n(t(45484))}),e("flexsearch",EAI_DISCOVERED_EXTERNALS("flexsearch"),function(){return n(t(52177))}),e("focus-trap",EAI_DISCOVERED_EXTERNALS("focus-trap"),function(){return n(t(83600))}),e("intersection-observer-admin",EAI_DISCOVERED_EXTERNALS("intersection-observer-admin"),function(){return n(t(73116))}),e("microdiff",EAI_DISCOVERED_EXTERNALS("microdiff"),function(){return n(t(75917))}),e("moment-timezone",EAI_DISCOVERED_EXTERNALS("moment-timezone"),function(){return n(t(57681))}),e("raf-pool",EAI_DISCOVERED_EXTERNALS("raf-pool"),function(){return n(t(82474))}),e("react",EAI_DISCOVERED_EXTERNALS("react"),function(){return n(t(80576))}),e("react-dom",EAI_DISCOVERED_EXTERNALS("react-dom"),function(){return n(t(42997))}),e("react-dom/client",EAI_DISCOVERED_EXTERNALS("react-dom/client"),function(){return n(t(99790))}),e("react/jsx-runtime",EAI_DISCOVERED_EXTERNALS("react/jsx-runtime"),function(){return n(t(49628))}),e("tooltip.js",EAI_DISCOVERED_EXTERNALS("tooltip.js"),function(){return n(t(82566))}),e("tracked-built-ins",EAI_DISCOVERED_EXTERNALS("tracked-built-ins"),function(){return n(t(30227))}),e("validator",EAI_DISCOVERED_EXTERNALS("validator"),function(){return n(t(83239))}),e("_eai_dyn_@sentry/browser",[],function(){return Promise.resolve().then(t.bind(t,14919))})}()},85257(e,r,t){e.exports=function(){_eai_d
|
|
4
4
|
var e=_eai_r
|
|
5
|
-
window.emberAutoImportDynamic=function(r){return 1===arguments.length?e("_eai_dyn_"+r):e("_eai_dynt_"+r)(Array.prototype.slice.call(arguments,1))},window.emberAutoImportSync=function(r){return e("_eai_sync_"+r)(Array.prototype.slice.call(arguments,1))},t(
|
|
5
|
+
window.emberAutoImportDynamic=function(r){return 1===arguments.length?e("_eai_dyn_"+r):e("_eai_dynt_"+r)(Array.prototype.slice.call(arguments,1))},window.emberAutoImportSync=function(r){return e("_eai_sync_"+r)(Array.prototype.slice.call(arguments,1))},t(90475)}()}},t={}
|
|
6
6
|
function n(e){var o=t[e]
|
|
7
7
|
if(void 0!==o)return o.exports
|
|
8
8
|
var m=t[e]={id:e,loaded:!1,exports:{}}
|
|
@@ -19,8 +19,8 @@ var r=(r,t)=>{var o,m,[E,i,s]=t,u=0
|
|
|
19
19
|
if(E.some(r=>0!==e[r])){for(o in i)n.o(i,o)&&(n.m[o]=i[o])
|
|
20
20
|
if(s)var _=s(n)}for(r&&r(t);u<E.length;u++)m=E[u],n.o(e,m)&&e[m]&&e[m][0](),e[m]=0
|
|
21
21
|
return n.O(_)},t=globalThis.webpackChunk_ember_auto_import_=globalThis.webpackChunk_ember_auto_import_||[]
|
|
22
|
-
t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),n.O(void 0,[675,
|
|
23
|
-
var o=n.O(void 0,[675,
|
|
22
|
+
t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),n.O(void 0,[675,837],()=>n(89126))
|
|
23
|
+
var o=n.O(void 0,[675,837],()=>n(85257))
|
|
24
24
|
o=n.O(o),__ember_auto_import__=o})()
|
|
25
25
|
|
|
26
|
-
//# sourceMappingURL=chunk.582.
|
|
26
|
+
//# sourceMappingURL=chunk.582.47834285406dfa1abb29.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(globalThis.webpackChunk_ember_auto_import_=globalThis.webpackChunk_ember_auto_import_||[]).push([[
|
|
1
|
+
(globalThis.webpackChunk_ember_auto_import_=globalThis.webpackChunk_ember_auto_import_||[]).push([[837],{25305(e,t){"use strict"
|
|
2
2
|
Object.defineProperty(t,"__esModule",{value:!0}),t.cleanBasicHtml=function(e="",t={}){const r=Object.assign({},{},t)
|
|
3
3
|
if(!r.createDocument){const e="undefined"!=typeof DOMParser&&DOMParser||"undefined"!=typeof window&&window.DOMParser
|
|
4
4
|
if(!e)throw new Error("cleanBasicHtml() must be passed a `createDocument` function as an option when used in a non-browser environment")
|
|
@@ -92,7 +92,7 @@ return e.forEach(e=>{const r=e[0]
|
|
|
92
92
|
r in n&&(t|=n[r])}),t}},62739(e,t,r){var s={"./af":69339,"./af.js":69339,"./am-et":77954,"./am-et.js":77954,"./ar":92175,"./ar-dz":95354,"./ar-dz.js":95354,"./ar-kw":79018,"./ar-kw.js":79018,"./ar-ly":40799,"./ar-ly.js":40799,"./ar-ma":80630,"./ar-ma.js":80630,"./ar-ps":40421,"./ar-ps.js":40421,"./ar-sa":76228,"./ar-sa.js":76228,"./ar-tn":74822,"./ar-tn.js":74822,"./ar.js":92175,"./az":70503,"./az.js":70503,"./be":51665,"./be.js":51665,"./bg":29679,"./bg.js":29679,"./bm":51497,"./bm.js":51497,"./bn":76016,"./bn-bd":18923,"./bn-bd.js":18923,"./bn.js":76016,"./bo":167,"./bo.js":167,"./br":93588,"./br.js":93588,"./bs":41531,"./bs.js":41531,"./ca":23988,"./ca.js":23988,"./cs":72750,"./cs.js":72750,"./cv":82065,"./cv.js":82065,"./cy":41948,"./cy.js":41948,"./da":35391,"./da.js":35391,"./de":75451,"./de-at":78769,"./de-at.js":78769,"./de-ch":71599,"./de-ch.js":71599,"./de.js":75451,"./dv":59918,"./dv.js":59918,"./el":52265,"./el.js":52265,"./en-au":95782,"./en-au.js":95782,"./en-ca":7756,"./en-ca.js":7756,"./en-gb":40177,"./en-gb.js":40177,"./en-ie":35374,"./en-ie.js":35374,"./en-il":50661,"./en-il.js":50661,"./en-in":2563,"./en-in.js":2563,"./en-nz":73368,"./en-nz.js":73368,"./en-sg":12282,"./en-sg.js":12282,"./eo":51376,"./eo.js":51376,"./es":34260,"./es-do":51512,"./es-do.js":51512,"./es-mx":14560,"./es-mx.js":14560,"./es-us":17529,"./es-us.js":17529,"./es.js":34260,"./et":5601,"./et.js":5601,"./eu":51698,"./eu.js":51698,"./fa":89769,"./fa.js":89769,"./fi":13233,"./fi.js":13233,"./fil":72217,"./fil.js":72217,"./fo":31307,"./fo.js":31307,"./fr":83808,"./fr-ca":77809,"./fr-ca.js":77809,"./fr-ch":38938,"./fr-ch.js":38938,"./fr.js":83808,"./fy":66401,"./fy.js":66401,"./ga":14208,"./ga.js":14208,"./gd":15571,"./gd.js":15571,"./gl":33499,"./gl.js":33499,"./gom-deva":95486,"./gom-deva.js":95486,"./gom-latn":64377,"./gom-latn.js":64377,"./gu":29692,"./gu.js":29692,"./he":1871,"./he.js":1871,"./hi":72323,"./hi.js":72323,"./hr":17182,"./hr.js":17182,"./hu":16191,"./hu.js":16191,"./hy-am":46373,"./hy-am.js":46373,"./id":86725,"./id.js":86725,"./is":73568,"./is.js":73568,"./it":13717,"./it-ch":95345,"./it-ch.js":95345,"./it.js":13717,"./ja":44117,"./ja.js":44117,"./jv":50800,"./jv.js":50800,"./ka":82364,"./ka.js":82364,"./kk":13166,"./kk.js":13166,"./km":82488,"./km.js":82488,"./kn":38833,"./kn.js":38833,"./ko":70946,"./ko.js":70946,"./ku":9408,"./ku-kmr":89247,"./ku-kmr.js":89247,"./ku.js":9408,"./ky":80756,"./ky.js":80756,"./lb":70778,"./lb.js":70778,"./lo":26861,"./lo.js":26861,"./lt":38796,"./lt.js":38796,"./lv":27766,"./lv.js":27766,"./me":31594,"./me.js":31594,"./mi":16606,"./mi.js":16606,"./mk":14676,"./mk.js":14676,"./ml":99745,"./ml.js":99745,"./mn":22559,"./mn.js":22559,"./mr":14275,"./mr.js":14275,"./ms":16284,"./ms-my":64735,"./ms-my.js":64735,"./ms.js":16284,"./mt":72585,"./mt.js":72585,"./my":47086,"./my.js":47086,"./nb":96984,"./nb.js":96984,"./ne":89421,"./ne.js":89421,"./nl":24678,"./nl-be":66978,"./nl-be.js":66978,"./nl.js":24678,"./nn":90972,"./nn.js":90972,"./oc-lnc":71160,"./oc-lnc.js":71160,"./pa-in":70535,"./pa-in.js":70535,"./pl":96552,"./pl.js":96552,"./ps":89317,"./ps.js":89317,"./pt":72464,"./pt-br":73089,"./pt-br.js":73089,"./pt.js":72464,"./ro":25015,"./ro.js":25015,"./ru":64721,"./ru.js":64721,"./sd":66511,"./sd.js":66511,"./se":22584,"./se.js":22584,"./si":97340,"./si.js":97340,"./sk":73574,"./sk.js":73574,"./sl":44839,"./sl.js":44839,"./sq":44148,"./sq.js":44148,"./sr":42269,"./sr-cyrl":90532,"./sr-cyrl.js":90532,"./sr.js":42269,"./ss":32350,"./ss.js":32350,"./sv":58017,"./sv.js":58017,"./sw":38290,"./sw.js":38290,"./ta":53679,"./ta.js":53679,"./te":99627,"./te.js":99627,"./tet":48767,"./tet.js":48767,"./tg":41837,"./tg.js":41837,"./th":25136,"./th.js":25136,"./tk":75497,"./tk.js":75497,"./tl-ph":9609,"./tl-ph.js":9609,"./tlh":39022,"./tlh.js":39022,"./tr":25458,"./tr.js":25458,"./tzl":88548,"./tzl.js":88548,"./tzm":53643,"./tzm-latn":30621,"./tzm-latn.js":30621,"./tzm.js":53643,"./ug-cn":50260,"./ug-cn.js":50260,"./uk":77740,"./uk.js":77740,"./ur":30027,"./ur.js":30027,"./uz":12899,"./uz-latn":59093,"./uz-latn.js":59093,"./uz.js":12899,"./vi":86913,"./vi.js":86913,"./x-pseudo":62289,"./x-pseudo.js":62289,"./yo":42516,"./yo.js":42516,"./zh-cn":76942,"./zh-cn.js":76942,"./zh-hk":82482,"./zh-hk.js":82482,"./zh-mo":76775,"./zh-mo.js":76775,"./zh-tw":92506,"./zh-tw.js":92506}
|
|
93
93
|
function a(e){var t=n(e)
|
|
94
94
|
return r(t)}function n(e){if(!r.o(s,e)){var t=new Error("Cannot find module '"+e+"'")
|
|
95
|
-
throw t.code="MODULE_NOT_FOUND",t}return s[e]}a.keys=function(){return Object.keys(s)},a.resolve=n,e.exports=a,a.id=62739},21901(){},
|
|
95
|
+
throw t.code="MODULE_NOT_FOUND",t}return s[e]}a.keys=function(){return Object.keys(s)},a.resolve=n,e.exports=a,a.id=62739},21901(){},89126(e,t){window._eai_r=require,window._eai_d=define},82211(e,t,r){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})
|
|
96
96
|
var s="ConfigResponseType",a=s,n=r(90665).createQuery({dataType:s,path:"/config/"}),i="/pro"
|
|
97
97
|
t.DEFAULT_UPGRADE_ROUTE=i,t.configDataType=a,t.hasSendingDomain=e=>{const t=e?.hostSettings?.managedEmail?.sendingDomain
|
|
98
98
|
return"string"==typeof t&&t.length>0},t.isManagedEmail=e=>!!e?.hostSettings?.managedEmail?.enabled,t.sendingDomain=e=>e?.hostSettings?.managedEmail?.sendingDomain,t.upgradeRoute=e=>{const t=e?.hostSettings?.billing?.upgradeUrl
|
|
@@ -148,7 +148,7 @@ function v(e,t){return`${e.toLocaleString()} ${1===e?t:`${t}s`}`}var w=n.createM
|
|
|
148
148
|
s.append("membersfile",e)
|
|
149
149
|
for(const a of t)s.append("labels",a)
|
|
150
150
|
for(const[a,n]of Object.entries(r))"string"==typeof n&&s.append(`mapping[${a}]`,n)
|
|
151
|
-
return s},invalidateQueries:{dataType:d}}),T=n.createQueryWithId({dataType:d,path:e=>`/members/${e}/`}),P=n.createMutation({method:"POST",path:({id:e})=>`/members/${e}/commenting/disable`,body:({reason:e,hideComments:t})=>({reason:e,hide_comments:t}),invalidateQueries:{dataType:["CommentsResponseType",d]}}),S=n.createMutation({method:"POST",path:({id:e})=>`/members/${e}/commenting/enable`,body:()=>({}),invalidateQueries:{dataType:["CommentsResponseType",d]}}),j=n.createInfiniteQuery({dataType:d,path:p,defaultSearchParams:{include:"labels,tiers",limit:"100",order:"created_at desc"},defaultNextPageParams:(e,t)=>{if(e.meta?.pagination.next)return{...t,page:e.meta.pagination.next.toString()}},returnData:e=>{const{pages:t}=e,r=t.flatMap(e=>e.members),s=t[t.length-1].meta
|
|
151
|
+
return s},invalidateQueries:{dataType:[d,"LabelsResponseType"]}}),T=n.createQueryWithId({dataType:d,path:e=>`/members/${e}/`}),P=n.createMutation({method:"POST",path:({id:e})=>`/members/${e}/commenting/disable`,body:({reason:e,hideComments:t})=>({reason:e,hide_comments:t}),invalidateQueries:{dataType:["CommentsResponseType",d]}}),S=n.createMutation({method:"POST",path:({id:e})=>`/members/${e}/commenting/enable`,body:()=>({}),invalidateQueries:{dataType:["CommentsResponseType",d]}}),j=n.createInfiniteQuery({dataType:d,path:p,defaultSearchParams:{include:"labels,tiers",limit:"100",order:"created_at desc"},defaultNextPageParams:(e,t)=>{if(e.meta?.pagination.next)return{...t,page:e.meta.pagination.next.toString()}},returnData:e=>{const{pages:t}=e,r=t.flatMap(e=>e.members),s=t[t.length-1].meta
|
|
152
152
|
return{members:r,meta:s,isEnd:!s||s.pagination.pages===s.pagination.page}}})
|
|
153
153
|
function _({filter:e,search:t,all:r}){if(!r&&!e&&!t)throw new Error("Bulk operation requires a filter, search, or all flag")
|
|
154
154
|
const s={}
|
|
@@ -365,7 +365,7 @@ case"include":c.withCredentials=!0
|
|
|
365
365
|
break
|
|
366
366
|
default:throw new Error(a)}c.responseType="arraybuffer"
|
|
367
367
|
for(const[e,t]of Object.entries(s))c.setRequestHeader(e,t)
|
|
368
|
-
c.upload.onprogress=t=>{t.lengthComputable&&e(t.loaded/t.total*100)},c.onload=()=>{o((e=>new Response(e.response,{status:e.status,statusText:e.statusText,headers:p(e)}))(c))},c.onerror=()=>{l(new TypeError("Network request failed"))},c.onabort=u
|
|
368
|
+
c.upload.onprogress=t=>{t.lengthComputable&&e(t.loaded/t.total*100)},c.onload=()=>{try{o((e=>new Response([204,205,304].includes(e.status)?null:e.response,{status:e.status,statusText:e.statusText,headers:p(e)}))(c))}catch(e){l(e)}},c.onerror=()=>{l(new TypeError("Network request failed"))},c.onabort=u
|
|
369
369
|
const d=()=>c.abort()
|
|
370
370
|
i.addEventListener("abort",d),c.onloadend=()=>{i.removeEventListener("abort",d)},c.send(n)}),{apiRoot:T}=o.getGhostPaths()
|
|
371
371
|
t.apiUrl=(e,t={})=>{const r=new URL(`${T}${e}`,window.location.origin)
|
|
@@ -506,4 +506,4 @@ throw e}}async errorIfIsOverLimit(e,t={}){this.isLimited(e)&&await this.limits[e
|
|
|
506
506
|
return!1}}},26031(e,t,r){"use strict"
|
|
507
507
|
function s(e){return`'${e.replace(/(['"])/g,"\\$1")}'`}r.r(t),r.d(t,{escapeNqlString:()=>s})}}])
|
|
508
508
|
|
|
509
|
-
//# sourceMappingURL=chunk.
|
|
509
|
+
//# sourceMappingURL=chunk.837.e1454abc054e1fba1fe5.map
|
package/core/built/admin/assets/{code-editor-view-DhTwpxxv.js → code-editor-view-BrGe3eS4.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`
|
|
1
|
+
(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`66146a9b-739f-473a-a714-352b9fde0d56`,e._sentryDebugIdIdentifier=`sentry-dbid-66146a9b-739f-473a-a714-352b9fde0d56`)}catch{}})();import{s as e,t}from"./react-C9lG_SsT.js";import{t as n}from"./jsx-runtime-Bm2_KH-0.js";import{L as r,n as i}from"./shade-provider-DvrXKKQZ.js";import{t as a}from"./stack-C3OmgpUv.js";import{t as o}from"./esm-_iCUCvbN.js";import{t as s}from"./input-surface-DoDPknjt.js";import{o as c,r as l}from"./field-DCPPrQDr.js";import{Lt as u,rt as d}from"./dist-tI811Kyl.js";var f=e(t(),1),p=n(),m=[`[&_.cm-editor]:bg-transparent`,`[&_.cm-editor]:border-transparent`,`[&_.cm-scroller]:font-mono`,`[&_.cm-scroller]:border-transparent`,`[&_.cm-activeLine]:bg-transparent`,`[&_.cm-activeLineGutter]:bg-transparent`,`[&_.cm-gutters]:bg-muted`,`[&_.cm-gutters]:text-muted-foreground`,`[&_.cm-gutters]:border-border`,`[&_.cm-cursor]:border-foreground`].join(` `),h=(0,f.forwardRef)(function({title:e,value:t,height:n=`200px`,error:h,hint:g,clearBg:_=!0,extensions:v,ariaLabel:y,editable:b=!0,onChange:x,onFocus:S,onBlur:C,className:w,...T},E){let D=(0,f.useId)(),O=`${D}-label`,k=`${D}-description`,A=!!e,j=(0,f.useRef)(null),{darkMode:M,setFocusState:N}=i(),P=(0,f.useRef)(!1),F=(0,f.useRef)(N),[I,L]=(0,f.useState)(100),[R,z]=(0,f.useState)([]);F.current=N;let[B]=(0,f.useState)(()=>document.createElement(`div`));(0,f.useEffect)(()=>(B.className=`shade cm-tooltip-parent pointer-events-none fixed inset-0 z-[60]`,document.body.appendChild(B),()=>{B.remove()}),[B]);let V=(0,f.useMemo)(()=>({crosshairCursor:!1,searchKeymap:!1}),[]),H=(0,f.useMemo)(()=>{let e={id:D};return A?e[`aria-labelledby`]=O:y&&(e[`aria-label`]=y),h&&(e[`aria-invalid`]=`true`),g&&(e[`aria-describedby`]=k),b||(e[`aria-disabled`]=`true`),[...R,u({position:`fixed`,parent:B}),d.contentAttributes.of(e)]},[y,b,h,A,g,k,D,O,R,B]),U=e=>{S?.(e),P.current=!0,N(!0)},W=e=>{C?.(e),P.current=!1,N(!1)},G=()=>{b&&document.getElementById(D)?.focus()};(0,f.useEffect)(()=>()=>{P.current&&F.current(!1)},[]),(0,f.useEffect)(()=>{let e=!1,t=v.map(e=>typeof e==`function`?e():e);return Promise.all(t).then(t=>{e||z(t)},()=>{e||z([])}),()=>{e=!0}},[v]),(0,f.useEffect)(()=>{let e=new ResizeObserver(([e])=>{L(e.contentRect.width)});return e.observe(j.current),()=>e.disconnect()},[]);let K=r(s(`within`),`peer order-2 w-full max-w-full overflow-hidden`,_&&`bg-transparent`,n===`full`&&`h-full`,!b&&`cursor-not-allowed opacity-50`,m,w);return(0,p.jsxs)(`div`,{className:r(`w-full`,n===`full`&&`h-full`),children:[(0,p.jsx)(`div`,{ref:j}),(0,p.jsxs)(a,{className:n===`full`?`h-full`:``,gap:`xs`,style:{width:I},children:[e&&(0,p.jsx)(c,{id:O,onClick:G,children:e}),(0,p.jsx)(o,{ref:E,basicSetup:V,className:K,editable:b,extensions:H,height:n===`full`?`100%`:n,theme:M?`dark`:`light`,value:t,onBlur:W,onChange:x,onFocus:U,...T}),g&&(0,p.jsx)(l,{className:r(h&&`text-destructive`),id:k,children:g})]})]})});h.displayName=`CodeEditorView`;export{h as default};
|
package/core/built/admin/assets/{code-editor-view-C7wXGiuv.js → code-editor-view-CY6JCXNv.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`8d71b136-c865-4df5-80f5-6051a3c52e5d`,e._sentryDebugIdIdentifier=`sentry-dbid-8d71b136-c865-4df5-80f5-6051a3c52e5d`)}catch{}})();import{s as e,t}from"./react-C9lG_SsT.js";import{t as n}from"./jsx-runtime-Bm2_KH-0.js";import{Z as r,n as i}from"./shade-provider-DvrXKKQZ.js";import{t as a}from"./esm-
|
|
1
|
+
(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`8d71b136-c865-4df5-80f5-6051a3c52e5d`,e._sentryDebugIdIdentifier=`sentry-dbid-8d71b136-c865-4df5-80f5-6051a3c52e5d`)}catch{}})();import{s as e,t}from"./react-C9lG_SsT.js";import{t as n}from"./jsx-runtime-Bm2_KH-0.js";import{Z as r,n as i}from"./shade-provider-DvrXKKQZ.js";import{t as a}from"./esm-_iCUCvbN.js";import{o,r as s}from"./field-DCPPrQDr.js";var c=e(t(),1),l=n(),u=[`[&_.cm-editor]:bg-transparent`,`[&_.cm-editor]:border-transparent`,`[&_.cm-scroller]:font-mono`,`[&_.cm-scroller]:border-transparent`,`[&_.cm-activeLine]:bg-transparent`,`[&_.cm-activeLineGutter]:bg-transparent`,`[&_.cm-gutters]:bg-muted`,`[&_.cm-gutters]:text-muted-foreground`,`[&_.cm-gutters]:border-border`,`[&_.cm-cursor]:border-foreground`,`[&_.cm-tooltip-autocomplete.cm-tooltip_ul_li:not([aria-selected])]:bg-background`].join(` `),d=(0,c.forwardRef)(function({title:e,value:t,height:n=`200px`,error:d,hint:f,clearBg:p=!0,extensions:m,onChange:h,onFocus:g,onBlur:_,className:v,...y},b){let x=(0,c.useId)(),S=(0,c.useRef)(null),[C,w]=(0,c.useState)(100),[T,E]=c.useState([]),[D,O]=(0,c.useState)({crosshairCursor:!1}),{darkMode:k,setFocusState:A}=i(),j=e=>{g?.(e),A(!0)},M=e=>{_?.(e),A(!1)};(0,c.useEffect)(()=>{let e=!1;return Promise.all(m.map(e=>Promise.resolve(e))).then(t=>{e||E(t)},()=>{e||E([])}),O(e=>({setup:e,searchKeymap:!1})),()=>{e=!0}},[m]),(0,c.useEffect)(()=>{let e=new ResizeObserver(([e])=>{w(e.contentRect.width)});return e.observe(S.current),()=>e.disconnect()},[]);let N=r(`peer order-2 w-full max-w-full overflow-hidden rounded-sm border`,p?`bg-transparent`:`bg-muted`,d?`border-destructive`:`border-border`,e&&`mt-2`,n===`full`&&`h-full`,u,v);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(`div`,{ref:S}),(0,l.jsxs)(`div`,{className:n===`full`?`h-full`:``,style:{width:C},children:[(0,l.jsx)(a,{ref:b,basicSetup:D,className:N,extensions:T,height:n===`full`?`100%`:n,theme:k?`dark`:`light`,value:t,onBlur:M,onChange:h,onFocus:j,...y}),e&&(0,l.jsx)(o,{className:`order-1`,htmlFor:x,children:e}),f&&(0,l.jsx)(s,{className:r(`order-3 mt-1`,d&&`text-destructive`),children:f})]})]})});export{d as default};
|
package/core/built/admin/assets/{color-picker-field-Cjz2zY11.js → color-picker-field-DGe9HH6W.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`
|
|
1
|
+
(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`ff3c787a-19dd-407e-8043-808e965f846f`,e._sentryDebugIdIdentifier=`sentry-dbid-ff3c787a-19dd-407e-8043-808e965f846f`)}catch{}})();import{s as e,t}from"./react-C9lG_SsT.js";import{t as n}from"./jsx-runtime-Bm2_KH-0.js";import{t as r}from"./inline-Qoyy4r2g.js";import{a as i,i as a,t as o}from"./popover-r_3DwMi9.js";import{r as s}from"./field-DCPPrQDr.js";import{n as c,r as l,t as u}from"./color-picker-jiQKnLn-.js";import{t as d}from"./debounce-Dg7iKwZN.js";var f=e(t(),1),p=n(),m=/^#(?:[0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i,h=(e,t,n=[])=>{if(e&&m.test(e))return e;switch(e){case`accent`:return t&&m.test(t)?t:`#ffffff`;case`dark`:return`#08090c`;case`light`:return`#ffffff`;case`transparent`:return`#00000000`;default:return n.find(t=>t.value===e)?.hex||`#ffffff`}},g=e=>e.length===4?e.replace(/#(.)(.)(.)/,`#$1$1$2$2$3$3`):e,_=({testId:e,title:t,direction:n=`rtl`,hint:m,error:_,value:v,onChange:y,accentColor:b,swatches:x=[],alwaysOpen:S=!1,debounceMs:C})=>{let[w,T]=(0,f.useState)(S),[E,D]=(0,f.useState)(v),O=(0,f.useRef)(!1),k=(0,f.useRef)(!1),A=(0,f.useRef)(null),j=(0,f.useId)(),M=h(E,b,x);(0,f.useEffect)(()=>{D(e=>g(e||``)===v?e:v)},[v]);let N=(0,f.useMemo)(()=>y&&C?d(y,C):y,[C,y]),P=(0,f.useCallback)(e=>{D(e),N?.(e?g(e):null)},[N]),F=(0,f.useCallback)(()=>{A.current&&=(window.removeEventListener(`keydown`,A.current,!0),null)},[]),I=()=>{O.current=!1,k.current=!1},L=()=>{F(),I(),S||T(!1)},R=()=>{if(A.current)return;let e=e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),L())};A.current=e,window.addEventListener(`keydown`,e,!0)};return(0,f.useEffect)(()=>F,[F]),(0,p.jsxs)(o,{open:w,onOpenChange:e=>{S||(I(),e?R():F(),T(e))},children:[(0,p.jsxs)(r,{align:m?`start`:`center`,className:`w-full ${n===`ltr`?`flex-row-reverse`:``}`,"data-testid":e,gap:`sm`,justify:`between`,children:[t&&(0,p.jsxs)(`label`,{className:`min-w-0 flex-1 cursor-pointer text-left`,htmlFor:j,children:[t,m&&(0,p.jsx)(s,{className:_?`text-destructive`:void 0,children:m})]}),(0,p.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[w&&x.length>0&&(0,p.jsx)(l,{swatches:x,value:E,onSelect:e=>{O.current=!1,k.current=!0,P(e),L()}}),(0,p.jsx)(i,{asChild:!0,children:(0,p.jsx)(c,{id:j,value:M})})]})]}),(0,p.jsx)(a,{align:n===`rtl`?`end`:`start`,className:`w-auto p-4`,onEscapeKeyDown:e=>e.stopPropagation(),children:(0,p.jsx)(`div`,{onInputCapture:()=>O.current=!0,onKeyDownCapture:()=>O.current=!0,onMouseDownCapture:()=>O.current=!0,onPointerDownCapture:()=>O.current=!0,onTouchStartCapture:()=>O.current=!0,children:(0,p.jsx)(u,{defaultValue:M,onChange:e=>{!k.current&&O.current&&P(e.toLowerCase())}})})})]})};export{_ as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`56a39c81-5a62-4c8e-b8a8-5eba6d257bb2`,e._sentryDebugIdIdentifier=`sentry-dbid-56a39c81-5a62-4c8e-b8a8-5eba6d257bb2`)}catch{}})();import{s as e,t}from"./react-C9lG_SsT.js";import{m as n}from"./framework-provider-CIvHFnik.js";import{i as r,n as i,t as a}from"./hooks-C-BDQ6Hs.js";import{t as o}from"./jsx-runtime-Bm2_KH-0.js";import{f as s,l as c}from"./members-Cj_BUZUL.js";import{t as l}from"./src-BwdakGcc.js";import{_ as u,n as d}from"./chunk-OB3PAWPO-D3muQBsq.js";import{H as f,L as p,W as m,a as h,i as g,o as _,r as v,s as y}from"./shade-provider-DvrXKKQZ.js";import{t as b}from"./box-BOIwAOVT.js";import{t as x}from"./container-DakAbO79.js";import{A as S,En as C,Ft as w,In as T,Mn as ee,Nn as te,Pn as ne,Rt as E,a as re,ar as ie,gn as D,gt as O,ht as ae,jn as oe,k as se,nr as ce,ot as le,t as k,u as ue,zt as de}from"./button-CTHYSI-d.js";import{t as A}from"./avatar-YbECDnBI.js";import{t as j}from"./badge-DuMiqyUH.js";import{t as fe}from"./checkbox-DN_wUAjb.js";import{a as M,i as pe,o as N,r as P,s as F,t as I}from"./dialog-BO1lcy8A.js";import{t as L}from"./empty-indicator-BhVwqSVH.js";import{t as me}from"./label-CxXFmzcd.js";import{n as R}from"./loading-indicator-DaRyGrxv.js";import{t as z}from"./page-header-Baymg6VR.js";import{i as he,n as ge,r as _e,t as ve}from"./tabs-CDb_TceL.js";import{a as ye,d as B,i as be,p as V}from"./label-picker-GTIIlBQ6.js";import{a as xe,o as Se,s as H}from"./filters-Bf6E1qAP.js";import{$ as Ce,Kt as we,Q as Te,ct as Ee,ft as U,nt as De,st as Oe,tt as ke,ut as Ae,vt as je}from"./index-CuDhPtkB.js";import{t as Me}from"./get-site-timezone-BnQQpb6P.js";import{t as W}from"./list-page-BnOuLOBb.js";import{i as Ne,n as Pe,r as Fe,t as Ie}from"./virtual-list-qPFukjyT.js";import{M as Le,N as Re,S as ze,T as G,c as Be,d as Ve,f as He,j as Ue,l as We,n as Ge,p as Ke,s as qe,t as Je,u as Ye,v as Xe,x as Ze,y as Qe}from"./filters-DhsiEotO.js";var K=e(t(),1),q=Ge([{key:`status`,icon:`circle`,type:`scalar`,operators:[`is`],options:[{value:`published`,label:`Published`},{value:`hidden`,label:`Hidden`}],ui:{label:`Status`,searchable:!1,hideOperatorSelect:!0}},{key:`created_at`,icon:`calendar`,type:`timestamp`,operators:Ze,ui:{label:`Date`}},{key:`body`,icon:`message-text`,type:`text`,operators:[`contains`,`does-not-contain`],addressing:G({field:`html`}),parseKeys:[`html`],ui:{label:`Text`,placeholder:`Search comment text...`,className:`w-full max-w-48`,popoverContentClassName:`w-full max-w-48`}},{key:`post`,icon:`file-text`,type:`scalar`,operators:[`is`,`is-not`],addressing:G({field:`post_id`}),parseKeys:[`post_id`],ui:{label:`Post`,searchable:!0,className:`w-full max-w-80`,popoverContentClassName:`w-full max-w-[calc(100vw-32px)] max-w-80`}},{key:`author`,icon:`person`,type:`scalar`,operators:[`is`,`is-not`],addressing:G({field:`member_id`}),parseKeys:[`member_id`],ui:{label:`Author`,searchable:!0,className:`w-80`,popoverContentClassName:`w-80`}},{key:`reported`,icon:`flag`,type:`count`,valueConfig:{threshold:0,absentForm:`equals`},addressing:G({field:`count.reports`}),parseKeys:[`count.reports`],options:[{value:`true`,label:`Yes`},{value:`false`,label:`No`}],ui:{label:`Reported`,type:`select`,searchable:!1,hideOperatorSelect:!0}}]),$e=[`author`,`post`,`body`,`status`,`reported`,`created_at`],et={...Qe,...Le};function tt({postValueSource:e,memberValueSource:t,siteTimezone:n=`UTC`}){return(0,K.useMemo)(()=>{let r=ze(n);return $e.map(n=>{let i=q[n],a=n===`created_at`?{defaultValue:r,...Re(i)?{customRenderer:Ue(r)}:{}}:{};return{key:n,...i.ui,icon:Je[i.ui.icon],operators:Xe(i.operators,{labels:et}),...`options`in i&&i.options?{options:i.options}:{},...a,...n===`author`?{valueSource:t}:{},...n===`post`?{valueSource:e}:{}}})},[t,e,n])}var J=o(),nt=({filters:e,siteTimezone:t,onFiltersChange:n})=>{let{isAdmin7:r}=v(),i=be(),a=tt({memberValueSource:ye(),postValueSource:i,siteTimezone:t}),o=e.length>0,s=r?(0,J.jsx)(H.Actions,{children:(0,J.jsx)(H.Action,{type:`button`,variant:`ghost`,onClick:()=>n([]),children:`Clear`})}):(0,J.jsx)(k,{className:`sm:absolute sm:top-0 sm:right-0`,type:`button`,variant:`outline`,onClick:()=>n([]),children:`Clear`});return(0,J.jsx)(xe,{addButton:(0,J.jsx)(xe.Trigger,{}),allowMultiple:!1,className:p(`[&>button]:order-last`,!o&&`w-auto`),clearButton:s,clearButtonClassName:`font-normal text-muted-foreground`,clearButtonIcon:(0,J.jsx)(re,{}),clearButtonText:`Clear`,fields:a,filters:e,keyboardShortcut:`f`,popoverAlign:o?`start`:`end`,showClearButton:o,showSearchInput:!1,onChange:n})},Y=`CommentsResponseType`,rt=`count.dislikes`,X=e=>[`member`,`post`,`count.replies`,`count.direct_replies`,`count.likes`,...e?[rt]:[],`count.reports`,`parent`,`in_reply_to`].join(`,`),it=e=>[`member`,`post`,`count.direct_replies`,`count.likes`,...e?[rt]:[],`count.reports`,`parent`,`in_reply_to`].join(`,`),at=a({dataType:Y,path:`/comments/`,defaultNextPageParams:(e,t)=>e.meta?.pagination.next?{...t,page:(e.meta?.pagination.next||1).toString()}:void 0,returnData:e=>{let{pages:t}=e,n=t.flatMap(e=>e.comments),r=t[t.length-1].meta;return{comments:n,meta:r,isEnd:r?r.pagination.pages===r.pagination.page:!0}}}),ot=e=>at({...e,searchParams:{limit:`100`,order:`created_at desc`,include:`member,post,parent`,...e?.searchParams}}),st=i({method:`PUT`,path:({id:e})=>`/comments/${e}/`,body:({id:e})=>({comments:[{id:e,status:`hidden`}]}),invalidateQueries:{dataType:Y}}),ct=i({method:`PUT`,path:({id:e})=>`/comments/${e}/`,body:({id:e})=>({comments:[{id:e,status:`published`}]}),invalidateQueries:{dataType:Y}}),lt=i({method:`PUT`,path:({id:e})=>`/comments/${e}/`,body:({id:e})=>({comments:[{id:e,pinned:!0}]}),invalidateQueries:{dataType:Y}}),Z=i({method:`PUT`,path:({id:e})=>`/comments/${e}/`,body:({id:e})=>({comments:[{id:e,pinned:!1}]}),invalidateQueries:{dataType:Y}}),ut=r({dataType:Y,path:e=>`/comments/${e}/`,defaultSearchParams:{include:X(!1)}}),dt=(e,t)=>{let{dislikesEnabled:n=!1,searchParams:r,...i}=t||{};return ut(e,{...i,searchParams:{include:X(n),...r}})},ft=r({dataType:`CommentReportsResponseType`,path:e=>`/comments/${e}/reports/`}),pt=(e,t)=>ft(e,{...t}),mt=r({dataType:`CommentLikesResponseType`,path:e=>`/comments/${e}/likes/`,defaultSearchParams:{include:`member`,limit:`100`,order:`created_at desc`}}),ht=(e,t)=>mt(e,{...t}),gt=r({dataType:`CommentDislikesResponseType`,path:e=>`/comments/${e}/dislikes/`,defaultSearchParams:{include:`member`,limit:`100`,order:`created_at desc`}}),_t=(e,t)=>gt(e,{...t}),vt=(e,t)=>{let{dislikesEnabled:n=!1,...r}=t||{};return ot({...r,searchParams:{filter:`(parent_id:${e}+in_reply_to_id:null),in_reply_to_id:${e}`,order:`created_at asc`,include:it(n),limit:`100`}})};function yt({onClick:e,expanded:t}){return(0,J.jsxs)(k,{className:`shrink-0 gap-0.5 self-start p-0 text-base hover:bg-transparent`,variant:`ghost`,onClick:e,children:[t?`Show less`:`Show more`,t?(0,J.jsx)(ce,{}):(0,J.jsx)(ie,{})]})}function bt({item:e}){let t=(0,K.useRef)(null),[n,r]=(0,K.useState)(!1),[i,a]=(0,K.useState)(!1);return(0,K.useEffect)(()=>{if(i)return;let e=()=>{t.current&&r(t.current.scrollHeight>t.current.clientHeight)};return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[e.html,i]),(0,J.jsx)(`div`,{className:`mt-2 flex flex-col gap-2`,children:(0,J.jsxs)(`div`,{className:`flex max-w-full flex-col items-start ${e.status===`hidden`&&`opacity-50`}`,children:[(0,J.jsx)(`div`,{dangerouslySetInnerHTML:{__html:e.html||``},ref:t,className:p(`prose balance max-w-[80ch] flex-1 text-base leading-[1.5em] [&_*]:text-base [&_*]:leading-[1.5em] [&_*]:font-normal [&_a]:underline [&_blockquote]:border-l-[3px] [&_blockquote]:border-foreground [&_blockquote]:p-0 [&_blockquote]:pl-3 [&_blockquote_p]:mt-0`,i?`-mb-1 [&_p]:mb-[0.85em]`:`mb-1 line-clamp-2 [&_blockquote+p]:mt-1 [&_p]:m-0`)}),n&&(0,J.jsx)(yt,{expanded:i,onClick:()=>a(!i)})]})})}function xt(e){let t=new Date(e);return new Intl.DateTimeFormat(`en-US`,{month:`short`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`numeric`}).format(t).replace(/(\d+),(\s+\d{4})/,`$1$2`)}function St({memberName:e,memberId:t,createdAt:n,isHidden:r,canComment:i,isPinned:a,onAuthorClick:o,postTitle:s,onPostClick:c,onUnpinClick:l,className:u}){return(0,J.jsxs)(`div`,{className:p(`flex items-center gap-2`,u),children:[(0,J.jsxs)(`div`,{className:p(`flex min-w-0 items-center gap-x-1`,r&&`opacity-50`),children:[(0,J.jsx)(`div`,{className:`whitespace-nowrap`,children:t&&o?(0,J.jsx)(k,{className:`flex h-auto items-center gap-1.5 truncate p-0 text-md font-semibold text-primary hover:opacity-70`,variant:`link`,onClick:o,children:e||`Unknown`}):(0,J.jsx)(`span`,{className:`block truncate font-semibold`,children:e||`Unknown`})}),i===!1&&(0,J.jsxs)(g,{children:[(0,J.jsx)(y,{asChild:!0,children:(0,J.jsx)(`span`,{"data-testid":`commenting-disabled-indicator`,children:(0,J.jsx)(de,{className:`size-3.5 text-muted-foreground`})})}),(0,J.jsx)(h,{children:`Comments disabled`})]}),(0,J.jsx)(T,{className:`shrink-0 text-muted-foreground/50`,size:16}),(0,J.jsx)(`div`,{className:`shrink-0 whitespace-nowrap`,children:n&&(0,J.jsxs)(g,{children:[(0,J.jsx)(y,{asChild:!0,children:(0,J.jsx)(`span`,{className:`cursor-default text-sm text-muted-foreground`,children:m(n)})}),(0,J.jsx)(h,{children:xt(n)})]})}),s&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`div`,{className:`shrink-0 text-muted-foreground`,children:`on`}),(0,J.jsx)(`div`,{className:`min-w-0 truncate`,children:c?(0,J.jsx)(k,{className:`block h-auto w-full cursor-pointer truncate p-0 text-left font-medium text-gray-800 hover:opacity-70 dark:text-gray-400`,variant:`link`,onClick:c,children:s}):(0,J.jsx)(`span`,{className:`font-medium text-gray-800 dark:text-gray-400`,children:s})})]})]}),r&&(0,J.jsx)(j,{variant:`secondary`,children:`Hidden`}),a&&(l?(0,J.jsx)(j,{className:`group gap-1 hover:bg-state-warning/30`,variant:`warning`,asChild:!0,children:(0,J.jsxs)(`button`,{"aria-label":`Unpin comment`,type:`button`,onClick:e=>{e.stopPropagation(),l?.()},children:[(0,J.jsxs)(`span`,{className:`grid size-3 shrink-0`,children:[(0,J.jsx)(O,{className:`col-start-1 row-start-1 size-3 group-hover:opacity-0 group-focus-visible:opacity-0`}),(0,J.jsx)(ae,{className:`col-start-1 row-start-1 size-3 opacity-0 group-hover:opacity-100 group-focus-visible:opacity-100`})]}),(0,J.jsxs)(`span`,{className:`grid justify-items-start text-left`,children:[(0,J.jsx)(`span`,{className:`col-start-1 row-start-1 group-hover:opacity-0 group-focus-visible:opacity-0`,children:`Pinned`}),(0,J.jsx)(`span`,{className:`col-start-1 row-start-1 opacity-0 group-hover:opacity-100 group-focus-visible:opacity-100`,children:`Unpin`})]})]})}):(0,J.jsxs)(j,{className:`gap-1`,variant:`warning`,children:[(0,J.jsx)(O,{className:`size-3`}),`Pinned`]}))]})}function Ct({open:e,memberName:t,onOpenChange:n,onConfirm:r}){let[i,a]=(0,K.useState)(!1),o=e=>{e||a(!1),n(e)};return(0,J.jsx)(I,{open:e,onOpenChange:o,children:(0,J.jsxs)(P,{className:`gap-5`,children:[(0,J.jsxs)(N,{children:[(0,J.jsx)(F,{children:`Disable comments`}),(0,J.jsxs)(pe,{children:[t||`This member`,` won't be able to comment in the future. You can re-enable commenting anytime.`]})]}),(0,J.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,J.jsx)(fe,{checked:i,id:`hide-comments`,onCheckedChange:e=>a(e===!0)}),(0,J.jsx)(me,{htmlFor:`hide-comments`,children:`Hide all previous comments`})]}),(0,J.jsxs)(M,{children:[(0,J.jsx)(k,{variant:`outline`,onClick:()=>o(!1),children:`Cancel`}),(0,J.jsx)(k,{onClick:()=>{r(i),a(!1)},children:`Disable comments`})]})]})})}function wt({comment:e}){let{isAdmin7:t}=v(),{mutate:n}=c(),{mutate:r}=s(),{mutate:i}=lt(),{mutate:a}=Z(),[o,l]=(0,K.useState)(!1),{id:u,post:f,member:p}=e,m=f?.url,h=p?.id,g=p?.can_comment,_=!e.parent_id&&e.status!==`deleted`;return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(Ee,{children:[(0,J.jsx)(je,{asChild:!0,children:(0,J.jsx)(k,{"aria-label":`Comment actions`,className:`relative z-10 text-gray-800 hover:bg-secondary [&_svg]:size-4`,size:t?`icon`:`sm`,variant:`ghost`,children:(0,J.jsx)(ne,{})})}),(0,J.jsxs)(Ae,{align:`start`,children:[m&&(0,J.jsx)(U,{asChild:!0,children:(0,J.jsxs)(`a`,{href:`${m}#ghost-comments-${u}`,rel:`noopener noreferrer`,target:`_blank`,children:[(0,J.jsx)(te,{className:`size-4`}),`View on post`]})}),h&&(0,J.jsx)(U,{asChild:!0,children:(0,J.jsxs)(d,{to:`/members/${h}`,children:[(0,J.jsx)(ue,{className:`size-4`}),`View member`]})}),_&&(e.pinned?(0,J.jsxs)(U,{onClick:()=>a({id:u}),children:[(0,J.jsx)(ae,{className:`size-4`}),`Unpin comment`]}):(0,J.jsxs)(U,{onClick:()=>i({id:u}),children:[(0,J.jsx)(O,{className:`size-4`}),`Pin comment`]})),h&&(g===!1?(0,J.jsxs)(U,{onClick:()=>{h&&r({id:h})},children:[(0,J.jsx)(E,{className:`size-4`}),`Enable commenting`]}):(0,J.jsxs)(U,{onClick:()=>l(!0),children:[(0,J.jsx)(de,{className:`size-4`}),`Disable commenting`]}))]})]}),(0,J.jsx)(Ct,{memberName:p?.name,open:o,onConfirm:e=>{h&&(n({id:h,reason:`Disabled from comment ${u}`,hideComments:e}),l(!1))},onOpenChange:l})]})}function Tt({comment:e,dislikesEnabled:t,open:n,defaultTab:r=`likes`,onOpenChange:i}){let{data:a,isLoading:o}=ht(e.id,{enabled:n}),{data:s,isLoading:c}=_t(e.id,{enabled:n&&t}),l=a?.comment_likes??[],u=t?s?.comment_dislikes??[]:[],d=e.count?.likes??0,p=t?e.count?.dislikes??0:0,h=Math.max(0,d-l.length),g=Math.max(0,p-u.length);return(0,J.jsx)(I,{open:n,onOpenChange:i,children:(0,J.jsxs)(P,{"aria-describedby":void 0,children:[(0,J.jsx)(N,{children:(0,J.jsx)(F,{children:t?(0,J.jsxs)(J.Fragment,{children:[f(d),` `,d===1?`like`:`likes`,` and`,` `,f(p),` `,p===1?`dislike`:`dislikes`]}):(0,J.jsxs)(J.Fragment,{children:[f(d),` `,d===1?`like`:`likes`]})})}),(0,J.jsx)(`div`,{className:`overflow-hidden rounded-md border p-3`,children:(0,J.jsxs)(`div`,{className:`flex min-w-0 items-start gap-3`,children:[(0,J.jsx)(A,{className:`shrink-0`,...V(e.member),src:e.member?.avatar_image}),(0,J.jsxs)(`div`,{className:`flex min-w-0 flex-col overflow-hidden`,children:[(0,J.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1 text-sm`,children:[(0,J.jsx)(`span`,{className:`shrink-0 font-semibold`,children:e.member?B(e.member):`Deleted member`}),(0,J.jsx)(T,{className:`shrink-0 text-muted-foreground/50`,size:16}),(0,J.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:e.created_at&&m(e.created_at)}),(0,J.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:`on`}),(0,J.jsx)(`span`,{className:`min-w-0 truncate font-medium text-gray-800 dark:text-gray-400`,children:e.post?.title||`Unknown post`})]}),(0,J.jsx)(`div`,{dangerouslySetInnerHTML:{__html:e.html||``},className:`prose mt-2 line-clamp-2 text-sm [&_*]:text-sm [&_*]:leading-[1.5em] [&_p]:m-0`})]})]})}),t?(0,J.jsxs)(ve,{defaultValue:r,variant:`segmented`,children:[(0,J.jsxs)(_e,{className:`grid w-full grid-cols-2`,children:[(0,J.jsx)(he,{value:`likes`,children:`Likes`}),(0,J.jsx)(he,{value:`dislikes`,children:`Dislikes`})]}),(0,J.jsx)(ge,{className:`mt-4`,value:`likes`,children:(0,J.jsx)(`div`,{className:`-mx-1 max-h-64 overflow-y-auto px-1`,children:o?(0,J.jsx)(`div`,{className:`flex justify-center py-4`,children:(0,J.jsx)(R,{size:`md`})}):l.length===0?(0,J.jsx)(`div`,{className:`py-4 text-center text-sm text-muted-foreground`,children:`No likes yet`}):(0,J.jsxs)(`div`,{className:`flex flex-col gap-3 pb-1`,children:[l.map(e=>(0,J.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,J.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,J.jsxs)(`div`,{className:`relative shrink-0`,children:[(0,J.jsx)(A,{...V(e.member),src:e.member?.avatar_image}),(0,J.jsx)(`div`,{className:`absolute -right-0.5 -bottom-0.5 flex size-4 items-center justify-center rounded-full bg-gray-500 text-white`,children:(0,J.jsx)(se,{className:`size-2.5`,fill:`currentColor`})})]}),(0,J.jsx)(`span`,{className:`font-medium`,children:e.member?B(e.member):`Deleted member`})]}),(0,J.jsx)(`span`,{className:`shrink-0 text-sm text-muted-foreground`,children:m(e.created_at)})]},e.id)),h>0&&(0,J.jsxs)(`div`,{className:`pt-1 text-center text-sm text-muted-foreground`,children:[`and `,f(h),` more`]})]})})}),(0,J.jsx)(ge,{className:`mt-4`,value:`dislikes`,children:(0,J.jsx)(`div`,{className:`-mx-1 max-h-64 overflow-y-auto px-1`,children:c?(0,J.jsx)(`div`,{className:`flex justify-center py-4`,children:(0,J.jsx)(R,{size:`md`})}):u.length===0?(0,J.jsx)(`div`,{className:`py-4 text-center text-sm text-muted-foreground`,children:`No dislikes yet`}):(0,J.jsxs)(`div`,{className:`flex flex-col gap-3 pb-1`,children:[u.map(e=>(0,J.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,J.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,J.jsxs)(`div`,{className:`relative shrink-0`,children:[(0,J.jsx)(A,{...V(e.member),src:e.member?.avatar_image}),(0,J.jsx)(`div`,{className:`absolute -right-0.5 -bottom-0.5 flex size-4 items-center justify-center rounded-full bg-gray-500 text-white`,children:(0,J.jsx)(S,{className:`size-2.5`,fill:`currentColor`})})]}),(0,J.jsx)(`span`,{className:`font-medium`,children:e.member?B(e.member):`Deleted member`})]}),(0,J.jsx)(`span`,{className:`shrink-0 text-sm text-muted-foreground`,children:m(e.created_at)})]},e.id)),g>0&&(0,J.jsxs)(`div`,{className:`pt-1 text-center text-sm text-muted-foreground`,children:[`and `,f(g),` more`]})]})})})]}):(0,J.jsx)(`div`,{className:`-mx-1 max-h-64 overflow-y-auto px-1`,children:o?(0,J.jsx)(`div`,{className:`flex justify-center py-4`,children:(0,J.jsx)(R,{size:`md`})}):(0,J.jsxs)(`div`,{className:`flex flex-col gap-3 pb-1`,children:[l.map(e=>(0,J.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,J.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,J.jsxs)(`div`,{className:`relative shrink-0`,children:[(0,J.jsx)(A,{...V(e.member),src:e.member?.avatar_image}),(0,J.jsx)(`div`,{className:`absolute -right-0.5 -bottom-0.5 flex size-4 items-center justify-center rounded-full bg-pink-500 text-white`,children:(0,J.jsx)(D,{className:`size-2.5`,fill:`currentColor`})})]}),(0,J.jsx)(`span`,{className:`font-medium`,children:e.member?B(e.member):`Deleted member`})]}),(0,J.jsx)(`span`,{className:`shrink-0 text-sm text-muted-foreground`,children:m(e.created_at)})]},e.id)),h>0&&(0,J.jsxs)(`div`,{className:`pt-1 text-center text-sm text-muted-foreground`,children:[`and `,f(h),` more`]})]})}),(0,J.jsx)(M,{children:(0,J.jsx)(k,{onClick:()=>i(!1),children:`OK`})})]})})}function Et({comment:e,open:t,onOpenChange:n}){let{data:r,isLoading:i}=pt(e.id,{enabled:t}),a=r?.comment_reports??[],o=e.count?.reports??a.length;return(0,J.jsx)(I,{open:t,onOpenChange:n,children:(0,J.jsxs)(P,{"aria-describedby":void 0,children:[(0,J.jsx)(N,{children:(0,J.jsxs)(F,{children:[o,` `,o===1?`report`:`reports`]})}),(0,J.jsx)(`div`,{className:`overflow-hidden rounded-md border p-3`,children:(0,J.jsxs)(`div`,{className:`flex min-w-0 items-start gap-3`,children:[(0,J.jsx)(A,{className:`shrink-0`,...V(e.member),src:e.member?.avatar_image}),(0,J.jsxs)(`div`,{className:`flex min-w-0 flex-col overflow-hidden`,children:[(0,J.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1 text-sm`,children:[(0,J.jsx)(`span`,{className:`shrink-0 font-semibold`,children:e.member?B(e.member):`Deleted member`}),(0,J.jsx)(T,{className:`shrink-0 text-muted-foreground/50`,size:16}),(0,J.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:e.created_at&&m(e.created_at)}),(0,J.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:`on`}),(0,J.jsx)(`span`,{className:`min-w-0 truncate font-medium text-gray-800 dark:text-gray-400`,children:e.post?.title||`Unknown post`})]}),(0,J.jsx)(`div`,{dangerouslySetInnerHTML:{__html:e.html||``},className:`prose mt-2 line-clamp-2 text-sm [&_*]:text-sm [&_*]:leading-[1.5em] [&_p]:m-0`})]})]})}),(0,J.jsx)(`div`,{className:`-mx-1 max-h-64 overflow-y-auto px-1`,children:i?(0,J.jsx)(`div`,{className:`flex justify-center py-4`,children:(0,J.jsx)(R,{size:`md`})}):(0,J.jsx)(`div`,{className:`flex flex-col gap-3 pb-1`,children:a.map(e=>(0,J.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,J.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,J.jsxs)(`div`,{className:`relative shrink-0`,children:[(0,J.jsx)(A,{...V(e.member),src:e.member?.avatar_image}),(0,J.jsx)(`div`,{className:`absolute -right-0.5 -bottom-0.5 flex size-4 items-center justify-center rounded-full bg-red text-white`,children:(0,J.jsx)(C,{className:`size-2.5`,fill:`currentColor`})})]}),(0,J.jsx)(`span`,{className:`font-medium`,children:e.member?B(e.member):`Deleted member`})]}),(0,J.jsx)(`span`,{className:`shrink-0 text-sm text-muted-foreground`,children:m(e.created_at)})]},e.id))})}),(0,J.jsx)(M,{children:(0,J.jsx)(k,{onClick:()=>n(!1),children:`OK`})})]})})}function Q(e,t){if(!t)return;let n=new URLSearchParams(e);return n.set(`thread`,`is:${t}`),`?${n.toString()}`}function $({icon:e,count:t,label:n,to:r,onClick:i,className:a,testId:o}){let s=p(`flex items-center gap-1 text-xs text-gray-800`,a),c=(0,J.jsxs)(J.Fragment,{children:[e,(0,J.jsx)(`span`,{children:f(t)})]}),l=r||i;return(0,J.jsxs)(g,{children:[(0,J.jsx)(y,{asChild:!0,children:r?(0,J.jsx)(d,{className:p(s,`cursor-pointer hover:opacity-70`),"data-testid":o,to:r,onClick:e=>{e.stopPropagation()},children:c}):i?(0,J.jsx)(`button`,{className:p(s,`cursor-pointer hover:opacity-70`),"data-testid":o,type:`button`,onClick:e=>{e.stopPropagation(),i()},children:c}):(0,J.jsx)(`div`,{className:s,"data-testid":o,children:c})}),(0,J.jsx)(h,{children:l?`View ${n.toLowerCase()}`:n})]})}function Dt({comment:e,dislikesEnabled:t,className:n}){let[r]=u(),[i,a]=(0,K.useState)(!1),[o,s]=(0,K.useState)(`likes`),[c,l]=(0,K.useState)(!1),d=Q(r,e.id),f=e.count?.direct_replies??e.replies?.length??0,m=e.count?.likes??0,h=t?e.count?.dislikes??0:0,g=e.count?.reports??0,_=f>0,v=m>0,y=h>0,b=g>0;return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`div`,{className:p(`flex items-center gap-6`,n),children:[(0,J.jsx)($,{count:f,icon:(0,J.jsx)(le,{size:16,strokeWidth:1.5}),label:`Replies`,testId:`replies-metric`,to:_?d:void 0}),t?(0,J.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,J.jsx)($,{count:m,icon:(0,J.jsx)(se,{size:16,strokeWidth:1.5}),label:`Likes`,testId:`likes-metric`,onClick:v?()=>{s(`likes`),a(!0)}:void 0}),(0,J.jsx)($,{count:h,icon:(0,J.jsx)(S,{size:16,strokeWidth:1.5}),label:`Dislikes`,testId:`dislikes-metric`,onClick:y?()=>{s(`dislikes`),a(!0)}:void 0})]}):(0,J.jsx)($,{count:m,icon:(0,J.jsx)(D,{size:16,strokeWidth:1.5}),label:`Likes`,onClick:v?()=>a(!0):void 0}),(0,J.jsx)($,{className:b?`font-semibold text-red`:void 0,count:g,icon:(0,J.jsx)(C,{size:16,strokeWidth:1.5}),label:`Reports`,onClick:b?()=>l(!0):void 0})]}),(0,J.jsx)(Tt,{comment:e,defaultTab:o,dislikesEnabled:t,open:i,onOpenChange:a}),(0,J.jsx)(Et,{comment:e,open:c,onOpenChange:l})]})}function Ot({hasReplies:e}){return e?(0,J.jsx)(`div`,{className:`mb-2 h-full w-px grow rounded bg-gradient-to-b from-muted-foreground/20 from-70% to-transparent`,"data-testid":`replies-line`}):null}function kt({comment:e,dislikesEnabled:t,isReply:n=!1,isSelectedComment:r=!1,selectedCommentId:i}){let[a]=u(),{mutate:o}=st(),{mutate:s}=ct(),{mutate:c}=Z(),l=(e.replies?.length??0)>0||(e.count?.direct_replies??e.count?.replies??0)>0;return(0,J.jsxs)(`div`,{className:`flex w-full flex-row ${!l||n?`mb-7`:`mb-0`}`,children:[(0,J.jsxs)(`div`,{className:`mr-2 flex shrink-0 flex-col items-center justify-start md:mr-3`,children:[(0,J.jsx)(A,{className:p(`mb-3 size-6 md:mb-4 md:size-8`,e.status===`hidden`&&`opacity-50`),...V(e.member),src:e.member?.avatar_image}),(0,J.jsx)(Ot,{hasReplies:l&&!n})]}),(0,J.jsx)(`div`,{className:`grow`,children:(0,J.jsxs)(`div`,{className:`w-full`,"data-testid":`comment-thread-row-${e.id}`,children:[(0,J.jsxs)(`div`,{className:`flex min-w-0 flex-col`,children:[(0,J.jsx)(St,{canComment:e.member?.can_comment,createdAt:e.created_at,isHidden:e.status===`hidden`,isPinned:e.pinned,memberId:e.member?.id,memberName:e.member?.name,onUnpinClick:()=>c({id:e.id})}),e.in_reply_to_snippet&&r&&(0,J.jsxs)(`div`,{className:`mb-1 line-clamp-1 text-sm ${e.status===`hidden`&&`opacity-50`}`,children:[(0,J.jsx)(`span`,{className:`text-muted-foreground`,children:`Replied to:`}),`\xA0`,(0,J.jsx)(d,{className:`text-sm font-normal text-muted-foreground hover:text-foreground`,"data-testid":`replied-to-link`,to:Q(a,e.in_reply_to_id||e.parent_id)||``,onClick:e=>{e.stopPropagation()},children:e.in_reply_to_snippet})]}),(0,J.jsx)(bt,{item:e}),(0,J.jsxs)(`div`,{className:`mt-4 flex flex-row flex-wrap items-center gap-3`,children:[e.status===`published`&&(0,J.jsxs)(k,{className:`text-gray-800`,size:`sm`,variant:`outline`,onClick:()=>o({id:e.id}),children:[(0,J.jsx)(ee,{}),(0,J.jsx)(`span`,{className:`max-md:hidden`,children:`Hide`})]}),e.status===`hidden`&&(0,J.jsxs)(k,{className:`text-gray-800`,size:`sm`,variant:`outline`,onClick:()=>s({id:e.id}),children:[(0,J.jsx)(oe,{}),(0,J.jsx)(`span`,{className:`max-md:hidden`,children:`Show`})]}),(0,J.jsx)(Dt,{comment:e,dislikesEnabled:t}),(0,J.jsx)(wt,{comment:e})]})]}),l&&e.replies&&(0,J.jsx)(`div`,{className:`mt-7 mb-4 -ml-2 pl-2 md:mt-8 md:mb-0 md:-ml-3 md:pl-3`,children:e.replies.map(e=>(0,J.jsx)(kt,{comment:e,dislikesEnabled:t,isReply:!0,selectedCommentId:i},e.id))})]})})]})}var At=({selectedComment:e,dislikesEnabled:t,replies:n,selectedCommentId:r,fetchNextPage:i,hasNextPage:a,isFetchingNextPage:o})=>(0,J.jsxs)(`div`,{className:`flex flex-col`,"data-testid":`comment-thread-list`,children:[(0,J.jsx)(kt,{comment:{...e,replies:n},dislikesEnabled:t,isSelectedComment:!0,selectedCommentId:r}),a&&(0,J.jsx)(`div`,{className:`flex justify-center pb-4`,children:(0,J.jsx)(k,{disabled:o,variant:`outline`,onClick:()=>i(),children:o?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(R,{size:`sm`}),`Loading...`]}):`Load more replies`})})]}),jt=({commentId:e,dislikesEnabled:t,open:n,onOpenChange:r})=>{let{data:i,isLoading:a,isError:o,fetchNextPage:s,hasNextPage:c,isFetchingNextPage:l}=vt(e??``,{dislikesEnabled:t,enabled:n&&!!e}),{data:u,isLoading:d,isError:f}=dt(e??``,{dislikesEnabled:t,enabled:n&&!!e}),p=a||d,m=f||o&&!u,h=u?.comments?.[0],g=i?.comments||[];return(0,J.jsx)(Te,{open:n,onOpenChange:r,children:(0,J.jsxs)(Ce,{className:`overflow-y-auto px-6 pt-0 sm:max-w-[420px]`,children:[(0,J.jsx)(ke,{className:`sticky top-0 z-40 -mx-6 bg-surface-elevated/60 p-6 backdrop-blur`,children:(0,J.jsx)(De,{className:`text-md`,children:`Thread`})}),h?.post&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,J.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,J.jsx)(`h3`,{className:`line-clamp-1 text-xl font-semibold text-foreground`,children:h.post.title}),h.post.excerpt&&(0,J.jsx)(`p`,{className:`mt-1 line-clamp-2 text-sm text-muted-foreground`,children:h.post.excerpt})]}),h.post.feature_image&&(0,J.jsx)(`img`,{alt:h.post.title||`Post feature image`,className:`hidden aspect-video h-18 shrink-0 rounded object-cover lg:block`,src:h.post.feature_image})]}),(0,J.jsx)(Oe,{className:`-mx-6 my-6 w-auto`})]}),(0,J.jsx)(`div`,{children:p?(0,J.jsx)(`div`,{className:`flex h-full items-center justify-center py-8`,children:(0,J.jsx)(R,{size:`lg`})}):m||!h?(0,J.jsx)(`div`,{className:`flex h-full items-center justify-center py-8`,children:(0,J.jsx)(L,{actions:(0,J.jsx)(k,{variant:`outline`,onClick:()=>r(!1),children:`Back to comments`}),description:`This thread may have been deleted or doesn't exist.`,title:`Thread not found`,children:(0,J.jsx)(w,{})})}):(0,J.jsx)(At,{dislikesEnabled:t,fetchNextPage:()=>void s(),hasNextPage:c,isFetchingNextPage:l,replies:g,selectedComment:h,selectedCommentId:e??``})})]})})},Mt=({height:e})=>(0,J.jsx)(`div`,{"aria-hidden":`true`,className:`flex`,children:(0,J.jsx)(`div`,{className:`flex`,style:{height:e}})}),Nt=(0,K.forwardRef)(function(e,t){return(0,J.jsx)(`div`,{ref:t,...e,"aria-hidden":`true`,className:`relative flex flex-col`,children:(0,J.jsx)(`div`,{className:`relative z-10 h-24 animate-pulse`,children:(0,J.jsx)(`div`,{className:`h-full rounded-md bg-muted`,"data-testid":`loading-placeholder`})})})});function Pt({items:e,totalItems:t,hasNextPage:n,isFetchingNextPage:r,fetchNextPage:i,resetKey:a,onAddFilter:o,isLoading:s,dislikesEnabled:c}){let{isAdmin7:l}=v(),f=(0,K.useRef)(null),{visibleItemCount:m,canLoadMore:h,loadMore:g}=Fe(t,{resetKey:a}),[y,b]=u(),[x,S]=(0,K.useState)(!1),[C,w]=(0,K.useState)(null),{mutate:T}=st(),{mutate:te}=ct(),{mutate:ne}=Z(),E=e=>{if(S(e),!e){let e=new URLSearchParams(y);e.delete(`thread`),b(e,{replace:!0})}};(0,K.useEffect)(()=>{let e=y.get(`thread`);if(e){let t=e.match(/^is:(.+)$/);if(t&&t[1]){let e=t[1];w(e),S(!0)}else S(!1),w(null)}else S(!1),w(null)},[y]),Pe({parentRef:f,isLoading:s});let{visibleItems:re,spaceBefore:ie,spaceAfter:D}=Ne({items:e,totalItems:m,hasNextPage:n,isFetchingNextPage:r,fetchNextPage:i,parentRef:f});return(0,J.jsx)(_,{children:(0,J.jsxs)(`div`,{ref:f,className:`overflow-hidden border-t`,children:[(0,J.jsx)(`div`,{className:`flex flex-col`,"data-testid":`comments-list`,children:(0,J.jsxs)(`div`,{className:`flex flex-col`,children:[(0,J.jsx)(Mt,{height:ie}),re.map(({key:t,virtualItem:n,item:r,props:i})=>n.index>e.length-1?(0,J.jsx)(Nt,{...i},t):(0,J.jsxs)(`div`,{...i,className:`group/comment grid w-full grid-cols-1 items-start justify-between gap-4 border-b p-3 hover:bg-table-row-hover md:p-5 lg:grid-cols-[minmax(0,1fr)_144px]`,"data-testid":`comment-list-row`,onClick:()=>{x&&E(!1)},children:[(0,J.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,J.jsx)(A,{className:p(`mt-0.5 size-6 md:size-8`,r.status===`hidden`&&`opacity-50`),...V(r.member),src:r.member?.avatar_image}),(0,J.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:[(0,J.jsxs)(`div`,{children:[(0,J.jsx)(St,{canComment:r.member?.can_comment,createdAt:r.created_at,isHidden:r.status===`hidden`,isPinned:r.pinned,memberId:r.member?.id,memberName:r.member?.name,postTitle:r.post?.title,onAuthorClick:r.member?.id?()=>o(`author`,r.member.id):void 0,onPostClick:r.post?.id?()=>o(`post`,r.post.id):void 0,onUnpinClick:()=>ne({id:r.id})}),r.in_reply_to_snippet&&(0,J.jsxs)(`div`,{className:`mb-1 line-clamp-1 max-w-3xl ${r.status===`hidden`&&`opacity-50`}`,children:[(0,J.jsx)(`span`,{className:`text-muted-foreground`,children:`Replied to:`}),`\xA0`,(0,J.jsx)(d,{className:`text-sm font-normal text-muted-foreground hover:text-foreground`,"data-testid":`replied-to-link`,to:Q(y,r.in_reply_to_id||r.parent_id)||``,onClick:e=>{e.stopPropagation()},children:r.in_reply_to_snippet})]})]}),(0,J.jsx)(bt,{item:r}),(0,J.jsxs)(`div`,{className:`flex flex-row flex-nowrap items-center gap-3`,children:[r.status===`published`&&(0,J.jsxs)(k,{className:p(`text-foreground`,l&&`group-hover/comment:bg-background`),size:`sm`,variant:`outline`,onClick:()=>T({id:r.id}),children:[(0,J.jsx)(ee,{}),`Hide`]}),r.status===`hidden`&&(0,J.jsxs)(k,{className:p(`text-foreground`,l&&`group-hover/comment:bg-background`),size:`sm`,variant:`outline`,onClick:()=>te({id:r.id}),children:[(0,J.jsx)(oe,{}),`Show`]}),(0,J.jsx)(Dt,{className:`ml-2`,comment:r,dislikesEnabled:c}),(0,J.jsx)(wt,{comment:r})]})]})]}),(0,J.jsx)(`div`,{children:r.post?.feature_image?(0,J.jsx)(`img`,{alt:r.post.title||`Post feature image`,className:`hidden aspect-video w-36 rounded object-cover lg:block ${r.status===`hidden`&&`opacity-50`}`,src:r.post.feature_image}):null})]},t)),(0,J.jsx)(Mt,{height:D})]})}),h&&(0,J.jsx)(Ie,{isLoading:r,onClick:g}),(0,J.jsx)(jt,{commentId:C,dislikesEnabled:c,open:x,onOpenChange:E})]})})}var Ft=qe(q,`date`);function It(e){return We(e,q)}function Lt(e,t){let n=Ye(e??``);return n?Ke(Ve(n,q,t).filter(It)):[]}function Rt(e){let t=Ye(e??``);return t?Be(t,Ft):!1}function zt(e,t){return He(e.filter(It),q,t)}var Bt=[`status`,`created_at`,`body`,`post`,`author`,`reported`],Vt={is_not:`is-not`,not_contains:`does-not-contain`,before:`is-less`,after:`is-greater`,on_or_before:`is-or-less`,on_or_after:`is-or-greater`};function Ht(e){let t=e.indexOf(`:`);if(t<=0)return null;let n=e.substring(0,t),r=e.substring(t+1);return r?{operator:Vt[n]??n,value:r}:null}function Ut(e){let t=[];for(let[n,r]of e.entries()){if(!Bt.includes(n))continue;let e=Ht(r);e&&t.push({id:`${n}:${t.length+1}`,field:n,operator:e.operator,values:[e.value]})}return t}function Wt(e){Bt.forEach(t=>e.delete(t))}function Gt(e,t,n){let r=new URLSearchParams(e),i=zt(t,n);return r.delete(`filter`),Wt(r),i&&r.set(`filter`,i),r}function Kt(e,t,n=!t){return!!e&&n&&!t&&Rt(e)}function qt(e){let[t,n]=u(),r=(0,K.useRef)(null),i=(0,K.useMemo)(()=>t.get(`filter`)??void 0,[t]),a=(0,K.useMemo)(()=>t.toString(),[t]),o=(0,K.useMemo)(()=>i===void 0?Ut(t):Lt(i,e),[i,t,e]),[s,c]=(0,K.useState)(o),l=(0,K.useMemo)(()=>zt(s,e),[s,e]);return(0,K.useEffect)(()=>{a!==r.current&&(c(o),r.current=a)},[a,o]),(0,K.useEffect)(()=>{if(r.current!==null&&a!==r.current)return;let i=Gt(t,s,e),o=i.toString();o!==a&&(r.current=o,n(i,{replace:!0}))},[a,s,t,n,e]),{filters:s,nql:l,setFilters:(0,K.useCallback)((i,a={})=>{let o=typeof i==`function`?i(s):i,l=Gt(t,o,e),u=a.replace??!0;c(o),r.current=l.toString(),n(l,{replace:u})},[s,t,n,e]),clearFilters:(0,K.useCallback)(({replace:e=!0}={})=>{let i=new URLSearchParams(t);i.delete(`filter`),Wt(i),c([]),r.current=i.toString(),n(i,{replace:e})},[t,n])}}function Jt(e){return e.get(`id`)?.match(/^is:(.+)$/)?.[1]}var Yt=({timezone:e,singleCommentId:t})=>{let[r,i]=u(),{filters:a,nql:o,setFilters:s}=qt(e),c=(0,K.useCallback)((n,o,c=`is`)=>{let l=[...a.filter(e=>e.field!==n),Se(n,c,[o])];if(!t){s(l,{replace:!1});return}let u=new URLSearchParams(r),d=zt(l,e);u.delete(`id`),u.delete(`filter`),d&&u.set(`filter`,d),i(u,{replace:!1})},[a,r,s,i,t,e]),d=(0,K.useMemo)(()=>t?`id:${l(t)}`:o,[o,t]),f=(0,K.useCallback)(()=>{i(new URLSearchParams,{replace:!1})},[i]),{data:p,isError:m,isFetching:h,isFetchingNextPage:g,isRefetching:_,fetchNextPage:v,hasNextPage:y}=ot({searchParams:{include:X(!0),...d?{filter:d}:{}},placeholderData:n}),S=h&&!g&&!_,C=d??``,T=a.length>0;return(0,J.jsx)(b,{className:`size-full`,children:(0,J.jsx)(x,{className:`relative flex h-full flex-col`,size:`page`,children:(0,J.jsxs)(W,{"data-testid":`comments-page`,children:[(0,J.jsxs)(W.Header,{children:[(0,J.jsxs)(z,{blurredBackground:!1,sticky:!1,children:[(0,J.jsx)(z.Left,{children:(0,J.jsx)(z.Title,{children:`Comments`})}),!t&&!T&&(0,J.jsx)(z.Actions,{children:(0,J.jsx)(z.ActionGroup,{children:(0,J.jsx)(nt,{filters:a,siteTimezone:e,onFiltersChange:s})})})]}),!t&&T&&(0,J.jsx)(H,{children:(0,J.jsx)(nt,{filters:a,siteTimezone:e,onFiltersChange:s})})]}),(0,J.jsx)(W.Body,{children:S?(0,J.jsx)(`div`,{className:`flex flex-1 items-center justify-center`,children:(0,J.jsx)(R,{size:`lg`})}):m?(0,J.jsxs)(`div`,{className:`flex flex-1 flex-col items-center justify-center`,children:[(0,J.jsx)(`h2`,{className:`mb-2 text-xl font-medium`,children:`Error loading comments`}),(0,J.jsx)(`p`,{className:`mb-4 text-muted-foreground`,children:`Please reload the page to try again`}),(0,J.jsx)(k,{onClick:()=>window.location.reload(),children:`Reload page`})]}):p?.comments.length?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(Pt,{dislikesEnabled:!0,fetchNextPage:()=>void v(),hasNextPage:y,isFetchingNextPage:g,isLoading:h&&!g,items:p?.comments??[],resetKey:C,totalItems:p?.meta?.pagination?.total??0,onAddFilter:c}),t&&(0,J.jsx)(`div`,{className:`flex justify-center py-8`,children:(0,J.jsx)(k,{variant:`outline`,onClick:f,children:`Show all comments`})})]}):(0,J.jsx)(`div`,{className:`flex flex-1 items-center justify-center`,children:t?(0,J.jsxs)(`div`,{className:`flex flex-col items-center`,children:[(0,J.jsx)(L,{title:`Comment not found`,children:(0,J.jsx)(w,{})}),(0,J.jsx)(k,{className:`mt-4`,variant:`outline`,onClick:f,children:`Show all comments`})]}):(0,J.jsx)(L,{title:`No comments yet`,children:(0,J.jsx)(w,{})})})})]})})})},Xt=()=>{let[e]=u(),{data:t,isLoading:n}=we({}),r=(0,K.useMemo)(()=>Jt(e),[e]),i=e.get(`filter`)??void 0;if(!r&&Kt(i,!!t,n))return(0,J.jsx)(b,{className:`size-full`,children:(0,J.jsx)(x,{className:`relative flex h-full flex-col`,size:`page`,children:(0,J.jsxs)(W,{children:[(0,J.jsx)(W.Header,{children:(0,J.jsx)(z,{blurredBackground:!1,sticky:!1,children:(0,J.jsx)(z.Left,{children:(0,J.jsx)(z.Title,{children:`Comments`})})})}),(0,J.jsx)(W.Body,{children:(0,J.jsx)(`div`,{className:`flex flex-1 items-center justify-center`,children:(0,J.jsx)(R,{size:`lg`})})})]})})});let a=Me(t?.settings??[]);return(0,J.jsx)(Yt,{singleCommentId:r,timezone:a})};export{Xt as default};
|
|
1
|
+
(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`56a39c81-5a62-4c8e-b8a8-5eba6d257bb2`,e._sentryDebugIdIdentifier=`sentry-dbid-56a39c81-5a62-4c8e-b8a8-5eba6d257bb2`)}catch{}})();import{s as e,t}from"./react-C9lG_SsT.js";import{m as n}from"./framework-provider-CIvHFnik.js";import{i as r,n as i,t as a}from"./hooks-0r7qxGEo.js";import{t as o}from"./jsx-runtime-Bm2_KH-0.js";import{f as s,l as c}from"./members-CH6KeXQc.js";import{t as l}from"./src-BwdakGcc.js";import{_ as u,n as d}from"./chunk-OB3PAWPO-D3muQBsq.js";import{H as f,L as p,W as m,a as h,i as g,o as _,r as v,s as y}from"./shade-provider-DvrXKKQZ.js";import{t as b}from"./box-BOIwAOVT.js";import{t as x}from"./container-DakAbO79.js";import{A as S,En as C,Ft as w,In as T,Mn as ee,Nn as te,Pn as ne,Rt as E,a as re,ar as ie,gn as D,gt as O,ht as ae,jn as oe,k as se,nr as ce,ot as le,t as k,u as ue,zt as de}from"./button-CTHYSI-d.js";import{t as A}from"./avatar-YbECDnBI.js";import{t as j}from"./badge-DuMiqyUH.js";import{t as fe}from"./checkbox-DN_wUAjb.js";import{a as M,i as pe,o as N,r as P,s as F,t as I}from"./dialog-BO1lcy8A.js";import{t as L}from"./empty-indicator-BhVwqSVH.js";import{t as me}from"./label-CxXFmzcd.js";import{n as R}from"./loading-indicator-DaRyGrxv.js";import{t as z}from"./page-header-CxTb0je5.js";import{i as he,n as ge,r as _e,t as ve}from"./tabs-fHs3A8WC.js";import{a as ye,d as B,i as be,p as V}from"./label-picker-DaivLdMw.js";import{a as xe,o as Se,s as H}from"./filters-Dr3vMnjZ.js";import{$ as Ce,Kt as we,Q as Te,ct as Ee,ft as U,nt as De,st as Oe,tt as ke,ut as Ae,vt as je}from"./index-RuRs_qGS.js";import{t as Me}from"./get-site-timezone-BnQQpb6P.js";import{t as W}from"./list-page-BnOuLOBb.js";import{i as Ne,n as Pe,r as Fe,t as Ie}from"./virtual-list-qPFukjyT.js";import{M as Le,N as Re,S as ze,T as G,c as Be,d as Ve,f as He,j as Ue,l as We,n as Ge,p as Ke,s as qe,t as Je,u as Ye,v as Xe,x as Ze,y as Qe}from"./filters-M2sRWPoF.js";var K=e(t(),1),q=Ge([{key:`status`,icon:`circle`,type:`scalar`,operators:[`is`],options:[{value:`published`,label:`Published`},{value:`hidden`,label:`Hidden`}],ui:{label:`Status`,searchable:!1,hideOperatorSelect:!0}},{key:`created_at`,icon:`calendar`,type:`timestamp`,operators:Ze,ui:{label:`Date`}},{key:`body`,icon:`message-text`,type:`text`,operators:[`contains`,`does-not-contain`],addressing:G({field:`html`}),parseKeys:[`html`],ui:{label:`Text`,placeholder:`Search comment text...`,className:`w-full max-w-48`,popoverContentClassName:`w-full max-w-48`}},{key:`post`,icon:`file-text`,type:`scalar`,operators:[`is`,`is-not`],addressing:G({field:`post_id`}),parseKeys:[`post_id`],ui:{label:`Post`,searchable:!0,className:`w-full max-w-80`,popoverContentClassName:`w-full max-w-[calc(100vw-32px)] max-w-80`}},{key:`author`,icon:`person`,type:`scalar`,operators:[`is`,`is-not`],addressing:G({field:`member_id`}),parseKeys:[`member_id`],ui:{label:`Author`,searchable:!0,className:`w-80`,popoverContentClassName:`w-80`}},{key:`reported`,icon:`flag`,type:`count`,valueConfig:{threshold:0,absentForm:`equals`},addressing:G({field:`count.reports`}),parseKeys:[`count.reports`],options:[{value:`true`,label:`Yes`},{value:`false`,label:`No`}],ui:{label:`Reported`,type:`select`,searchable:!1,hideOperatorSelect:!0}}]),$e=[`author`,`post`,`body`,`status`,`reported`,`created_at`],et={...Qe,...Le};function tt({postValueSource:e,memberValueSource:t,siteTimezone:n=`UTC`}){return(0,K.useMemo)(()=>{let r=ze(n);return $e.map(n=>{let i=q[n],a=n===`created_at`?{defaultValue:r,...Re(i)?{customRenderer:Ue(r)}:{}}:{};return{key:n,...i.ui,icon:Je[i.ui.icon],operators:Xe(i.operators,{labels:et}),...`options`in i&&i.options?{options:i.options}:{},...a,...n===`author`?{valueSource:t}:{},...n===`post`?{valueSource:e}:{}}})},[t,e,n])}var J=o(),nt=({filters:e,siteTimezone:t,onFiltersChange:n})=>{let{isAdmin7:r}=v(),i=be(),a=tt({memberValueSource:ye(),postValueSource:i,siteTimezone:t}),o=e.length>0,s=r?(0,J.jsx)(H.Actions,{children:(0,J.jsx)(H.Action,{type:`button`,variant:`ghost`,onClick:()=>n([]),children:`Clear`})}):(0,J.jsx)(k,{className:`sm:absolute sm:top-0 sm:right-0`,type:`button`,variant:`outline`,onClick:()=>n([]),children:`Clear`});return(0,J.jsx)(xe,{addButton:(0,J.jsx)(xe.Trigger,{}),allowMultiple:!1,className:p(`[&>button]:order-last`,!o&&`w-auto`),clearButton:s,clearButtonClassName:`font-normal text-muted-foreground`,clearButtonIcon:(0,J.jsx)(re,{}),clearButtonText:`Clear`,fields:a,filters:e,keyboardShortcut:`f`,popoverAlign:o?`start`:`end`,showClearButton:o,showSearchInput:!1,onChange:n})},Y=`CommentsResponseType`,rt=`count.dislikes`,X=e=>[`member`,`post`,`count.replies`,`count.direct_replies`,`count.likes`,...e?[rt]:[],`count.reports`,`parent`,`in_reply_to`].join(`,`),it=e=>[`member`,`post`,`count.direct_replies`,`count.likes`,...e?[rt]:[],`count.reports`,`parent`,`in_reply_to`].join(`,`),at=a({dataType:Y,path:`/comments/`,defaultNextPageParams:(e,t)=>e.meta?.pagination.next?{...t,page:(e.meta?.pagination.next||1).toString()}:void 0,returnData:e=>{let{pages:t}=e,n=t.flatMap(e=>e.comments),r=t[t.length-1].meta;return{comments:n,meta:r,isEnd:r?r.pagination.pages===r.pagination.page:!0}}}),ot=e=>at({...e,searchParams:{limit:`100`,order:`created_at desc`,include:`member,post,parent`,...e?.searchParams}}),st=i({method:`PUT`,path:({id:e})=>`/comments/${e}/`,body:({id:e})=>({comments:[{id:e,status:`hidden`}]}),invalidateQueries:{dataType:Y}}),ct=i({method:`PUT`,path:({id:e})=>`/comments/${e}/`,body:({id:e})=>({comments:[{id:e,status:`published`}]}),invalidateQueries:{dataType:Y}}),lt=i({method:`PUT`,path:({id:e})=>`/comments/${e}/`,body:({id:e})=>({comments:[{id:e,pinned:!0}]}),invalidateQueries:{dataType:Y}}),Z=i({method:`PUT`,path:({id:e})=>`/comments/${e}/`,body:({id:e})=>({comments:[{id:e,pinned:!1}]}),invalidateQueries:{dataType:Y}}),ut=r({dataType:Y,path:e=>`/comments/${e}/`,defaultSearchParams:{include:X(!1)}}),dt=(e,t)=>{let{dislikesEnabled:n=!1,searchParams:r,...i}=t||{};return ut(e,{...i,searchParams:{include:X(n),...r}})},ft=r({dataType:`CommentReportsResponseType`,path:e=>`/comments/${e}/reports/`}),pt=(e,t)=>ft(e,{...t}),mt=r({dataType:`CommentLikesResponseType`,path:e=>`/comments/${e}/likes/`,defaultSearchParams:{include:`member`,limit:`100`,order:`created_at desc`}}),ht=(e,t)=>mt(e,{...t}),gt=r({dataType:`CommentDislikesResponseType`,path:e=>`/comments/${e}/dislikes/`,defaultSearchParams:{include:`member`,limit:`100`,order:`created_at desc`}}),_t=(e,t)=>gt(e,{...t}),vt=(e,t)=>{let{dislikesEnabled:n=!1,...r}=t||{};return ot({...r,searchParams:{filter:`(parent_id:${e}+in_reply_to_id:null),in_reply_to_id:${e}`,order:`created_at asc`,include:it(n),limit:`100`}})};function yt({onClick:e,expanded:t}){return(0,J.jsxs)(k,{className:`shrink-0 gap-0.5 self-start p-0 text-base hover:bg-transparent`,variant:`ghost`,onClick:e,children:[t?`Show less`:`Show more`,t?(0,J.jsx)(ce,{}):(0,J.jsx)(ie,{})]})}function bt({item:e}){let t=(0,K.useRef)(null),[n,r]=(0,K.useState)(!1),[i,a]=(0,K.useState)(!1);return(0,K.useEffect)(()=>{if(i)return;let e=()=>{t.current&&r(t.current.scrollHeight>t.current.clientHeight)};return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[e.html,i]),(0,J.jsx)(`div`,{className:`mt-2 flex flex-col gap-2`,children:(0,J.jsxs)(`div`,{className:`flex max-w-full flex-col items-start ${e.status===`hidden`&&`opacity-50`}`,children:[(0,J.jsx)(`div`,{dangerouslySetInnerHTML:{__html:e.html||``},ref:t,className:p(`prose balance max-w-[80ch] flex-1 text-base leading-[1.5em] [&_*]:text-base [&_*]:leading-[1.5em] [&_*]:font-normal [&_a]:underline [&_blockquote]:border-l-[3px] [&_blockquote]:border-foreground [&_blockquote]:p-0 [&_blockquote]:pl-3 [&_blockquote_p]:mt-0`,i?`-mb-1 [&_p]:mb-[0.85em]`:`mb-1 line-clamp-2 [&_blockquote+p]:mt-1 [&_p]:m-0`)}),n&&(0,J.jsx)(yt,{expanded:i,onClick:()=>a(!i)})]})})}function xt(e){let t=new Date(e);return new Intl.DateTimeFormat(`en-US`,{month:`short`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`numeric`}).format(t).replace(/(\d+),(\s+\d{4})/,`$1$2`)}function St({memberName:e,memberId:t,createdAt:n,isHidden:r,canComment:i,isPinned:a,onAuthorClick:o,postTitle:s,onPostClick:c,onUnpinClick:l,className:u}){return(0,J.jsxs)(`div`,{className:p(`flex items-center gap-2`,u),children:[(0,J.jsxs)(`div`,{className:p(`flex min-w-0 items-center gap-x-1`,r&&`opacity-50`),children:[(0,J.jsx)(`div`,{className:`whitespace-nowrap`,children:t&&o?(0,J.jsx)(k,{className:`flex h-auto items-center gap-1.5 truncate p-0 text-md font-semibold text-primary hover:opacity-70`,variant:`link`,onClick:o,children:e||`Unknown`}):(0,J.jsx)(`span`,{className:`block truncate font-semibold`,children:e||`Unknown`})}),i===!1&&(0,J.jsxs)(g,{children:[(0,J.jsx)(y,{asChild:!0,children:(0,J.jsx)(`span`,{"data-testid":`commenting-disabled-indicator`,children:(0,J.jsx)(de,{className:`size-3.5 text-muted-foreground`})})}),(0,J.jsx)(h,{children:`Comments disabled`})]}),(0,J.jsx)(T,{className:`shrink-0 text-muted-foreground/50`,size:16}),(0,J.jsx)(`div`,{className:`shrink-0 whitespace-nowrap`,children:n&&(0,J.jsxs)(g,{children:[(0,J.jsx)(y,{asChild:!0,children:(0,J.jsx)(`span`,{className:`cursor-default text-sm text-muted-foreground`,children:m(n)})}),(0,J.jsx)(h,{children:xt(n)})]})}),s&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`div`,{className:`shrink-0 text-muted-foreground`,children:`on`}),(0,J.jsx)(`div`,{className:`min-w-0 truncate`,children:c?(0,J.jsx)(k,{className:`block h-auto w-full cursor-pointer truncate p-0 text-left font-medium text-gray-800 hover:opacity-70 dark:text-gray-400`,variant:`link`,onClick:c,children:s}):(0,J.jsx)(`span`,{className:`font-medium text-gray-800 dark:text-gray-400`,children:s})})]})]}),r&&(0,J.jsx)(j,{variant:`secondary`,children:`Hidden`}),a&&(l?(0,J.jsx)(j,{className:`group gap-1 hover:bg-state-warning/30`,variant:`warning`,asChild:!0,children:(0,J.jsxs)(`button`,{"aria-label":`Unpin comment`,type:`button`,onClick:e=>{e.stopPropagation(),l?.()},children:[(0,J.jsxs)(`span`,{className:`grid size-3 shrink-0`,children:[(0,J.jsx)(O,{className:`col-start-1 row-start-1 size-3 group-hover:opacity-0 group-focus-visible:opacity-0`}),(0,J.jsx)(ae,{className:`col-start-1 row-start-1 size-3 opacity-0 group-hover:opacity-100 group-focus-visible:opacity-100`})]}),(0,J.jsxs)(`span`,{className:`grid justify-items-start text-left`,children:[(0,J.jsx)(`span`,{className:`col-start-1 row-start-1 group-hover:opacity-0 group-focus-visible:opacity-0`,children:`Pinned`}),(0,J.jsx)(`span`,{className:`col-start-1 row-start-1 opacity-0 group-hover:opacity-100 group-focus-visible:opacity-100`,children:`Unpin`})]})]})}):(0,J.jsxs)(j,{className:`gap-1`,variant:`warning`,children:[(0,J.jsx)(O,{className:`size-3`}),`Pinned`]}))]})}function Ct({open:e,memberName:t,onOpenChange:n,onConfirm:r}){let[i,a]=(0,K.useState)(!1),o=e=>{e||a(!1),n(e)};return(0,J.jsx)(I,{open:e,onOpenChange:o,children:(0,J.jsxs)(P,{className:`gap-5`,children:[(0,J.jsxs)(N,{children:[(0,J.jsx)(F,{children:`Disable comments`}),(0,J.jsxs)(pe,{children:[t||`This member`,` won't be able to comment in the future. You can re-enable commenting anytime.`]})]}),(0,J.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,J.jsx)(fe,{checked:i,id:`hide-comments`,onCheckedChange:e=>a(e===!0)}),(0,J.jsx)(me,{htmlFor:`hide-comments`,children:`Hide all previous comments`})]}),(0,J.jsxs)(M,{children:[(0,J.jsx)(k,{variant:`outline`,onClick:()=>o(!1),children:`Cancel`}),(0,J.jsx)(k,{onClick:()=>{r(i),a(!1)},children:`Disable comments`})]})]})})}function wt({comment:e}){let{isAdmin7:t}=v(),{mutate:n}=c(),{mutate:r}=s(),{mutate:i}=lt(),{mutate:a}=Z(),[o,l]=(0,K.useState)(!1),{id:u,post:f,member:p}=e,m=f?.url,h=p?.id,g=p?.can_comment,_=!e.parent_id&&e.status!==`deleted`;return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(Ee,{children:[(0,J.jsx)(je,{asChild:!0,children:(0,J.jsx)(k,{"aria-label":`Comment actions`,className:`relative z-10 text-gray-800 hover:bg-secondary [&_svg]:size-4`,size:t?`icon`:`sm`,variant:`ghost`,children:(0,J.jsx)(ne,{})})}),(0,J.jsxs)(Ae,{align:`start`,children:[m&&(0,J.jsx)(U,{asChild:!0,children:(0,J.jsxs)(`a`,{href:`${m}#ghost-comments-${u}`,rel:`noopener noreferrer`,target:`_blank`,children:[(0,J.jsx)(te,{className:`size-4`}),`View on post`]})}),h&&(0,J.jsx)(U,{asChild:!0,children:(0,J.jsxs)(d,{to:`/members/${h}`,children:[(0,J.jsx)(ue,{className:`size-4`}),`View member`]})}),_&&(e.pinned?(0,J.jsxs)(U,{onClick:()=>a({id:u}),children:[(0,J.jsx)(ae,{className:`size-4`}),`Unpin comment`]}):(0,J.jsxs)(U,{onClick:()=>i({id:u}),children:[(0,J.jsx)(O,{className:`size-4`}),`Pin comment`]})),h&&(g===!1?(0,J.jsxs)(U,{onClick:()=>{h&&r({id:h})},children:[(0,J.jsx)(E,{className:`size-4`}),`Enable commenting`]}):(0,J.jsxs)(U,{onClick:()=>l(!0),children:[(0,J.jsx)(de,{className:`size-4`}),`Disable commenting`]}))]})]}),(0,J.jsx)(Ct,{memberName:p?.name,open:o,onConfirm:e=>{h&&(n({id:h,reason:`Disabled from comment ${u}`,hideComments:e}),l(!1))},onOpenChange:l})]})}function Tt({comment:e,dislikesEnabled:t,open:n,defaultTab:r=`likes`,onOpenChange:i}){let{data:a,isLoading:o}=ht(e.id,{enabled:n}),{data:s,isLoading:c}=_t(e.id,{enabled:n&&t}),l=a?.comment_likes??[],u=t?s?.comment_dislikes??[]:[],d=e.count?.likes??0,p=t?e.count?.dislikes??0:0,h=Math.max(0,d-l.length),g=Math.max(0,p-u.length);return(0,J.jsx)(I,{open:n,onOpenChange:i,children:(0,J.jsxs)(P,{"aria-describedby":void 0,children:[(0,J.jsx)(N,{children:(0,J.jsx)(F,{children:t?(0,J.jsxs)(J.Fragment,{children:[f(d),` `,d===1?`like`:`likes`,` and`,` `,f(p),` `,p===1?`dislike`:`dislikes`]}):(0,J.jsxs)(J.Fragment,{children:[f(d),` `,d===1?`like`:`likes`]})})}),(0,J.jsx)(`div`,{className:`overflow-hidden rounded-md border p-3`,children:(0,J.jsxs)(`div`,{className:`flex min-w-0 items-start gap-3`,children:[(0,J.jsx)(A,{className:`shrink-0`,...V(e.member),src:e.member?.avatar_image}),(0,J.jsxs)(`div`,{className:`flex min-w-0 flex-col overflow-hidden`,children:[(0,J.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1 text-sm`,children:[(0,J.jsx)(`span`,{className:`shrink-0 font-semibold`,children:e.member?B(e.member):`Deleted member`}),(0,J.jsx)(T,{className:`shrink-0 text-muted-foreground/50`,size:16}),(0,J.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:e.created_at&&m(e.created_at)}),(0,J.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:`on`}),(0,J.jsx)(`span`,{className:`min-w-0 truncate font-medium text-gray-800 dark:text-gray-400`,children:e.post?.title||`Unknown post`})]}),(0,J.jsx)(`div`,{dangerouslySetInnerHTML:{__html:e.html||``},className:`prose mt-2 line-clamp-2 text-sm [&_*]:text-sm [&_*]:leading-[1.5em] [&_p]:m-0`})]})]})}),t?(0,J.jsxs)(ve,{defaultValue:r,variant:`segmented`,children:[(0,J.jsxs)(_e,{className:`grid w-full grid-cols-2`,children:[(0,J.jsx)(he,{value:`likes`,children:`Likes`}),(0,J.jsx)(he,{value:`dislikes`,children:`Dislikes`})]}),(0,J.jsx)(ge,{className:`mt-4`,value:`likes`,children:(0,J.jsx)(`div`,{className:`-mx-1 max-h-64 overflow-y-auto px-1`,children:o?(0,J.jsx)(`div`,{className:`flex justify-center py-4`,children:(0,J.jsx)(R,{size:`md`})}):l.length===0?(0,J.jsx)(`div`,{className:`py-4 text-center text-sm text-muted-foreground`,children:`No likes yet`}):(0,J.jsxs)(`div`,{className:`flex flex-col gap-3 pb-1`,children:[l.map(e=>(0,J.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,J.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,J.jsxs)(`div`,{className:`relative shrink-0`,children:[(0,J.jsx)(A,{...V(e.member),src:e.member?.avatar_image}),(0,J.jsx)(`div`,{className:`absolute -right-0.5 -bottom-0.5 flex size-4 items-center justify-center rounded-full bg-gray-500 text-white`,children:(0,J.jsx)(se,{className:`size-2.5`,fill:`currentColor`})})]}),(0,J.jsx)(`span`,{className:`font-medium`,children:e.member?B(e.member):`Deleted member`})]}),(0,J.jsx)(`span`,{className:`shrink-0 text-sm text-muted-foreground`,children:m(e.created_at)})]},e.id)),h>0&&(0,J.jsxs)(`div`,{className:`pt-1 text-center text-sm text-muted-foreground`,children:[`and `,f(h),` more`]})]})})}),(0,J.jsx)(ge,{className:`mt-4`,value:`dislikes`,children:(0,J.jsx)(`div`,{className:`-mx-1 max-h-64 overflow-y-auto px-1`,children:c?(0,J.jsx)(`div`,{className:`flex justify-center py-4`,children:(0,J.jsx)(R,{size:`md`})}):u.length===0?(0,J.jsx)(`div`,{className:`py-4 text-center text-sm text-muted-foreground`,children:`No dislikes yet`}):(0,J.jsxs)(`div`,{className:`flex flex-col gap-3 pb-1`,children:[u.map(e=>(0,J.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,J.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,J.jsxs)(`div`,{className:`relative shrink-0`,children:[(0,J.jsx)(A,{...V(e.member),src:e.member?.avatar_image}),(0,J.jsx)(`div`,{className:`absolute -right-0.5 -bottom-0.5 flex size-4 items-center justify-center rounded-full bg-gray-500 text-white`,children:(0,J.jsx)(S,{className:`size-2.5`,fill:`currentColor`})})]}),(0,J.jsx)(`span`,{className:`font-medium`,children:e.member?B(e.member):`Deleted member`})]}),(0,J.jsx)(`span`,{className:`shrink-0 text-sm text-muted-foreground`,children:m(e.created_at)})]},e.id)),g>0&&(0,J.jsxs)(`div`,{className:`pt-1 text-center text-sm text-muted-foreground`,children:[`and `,f(g),` more`]})]})})})]}):(0,J.jsx)(`div`,{className:`-mx-1 max-h-64 overflow-y-auto px-1`,children:o?(0,J.jsx)(`div`,{className:`flex justify-center py-4`,children:(0,J.jsx)(R,{size:`md`})}):(0,J.jsxs)(`div`,{className:`flex flex-col gap-3 pb-1`,children:[l.map(e=>(0,J.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,J.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,J.jsxs)(`div`,{className:`relative shrink-0`,children:[(0,J.jsx)(A,{...V(e.member),src:e.member?.avatar_image}),(0,J.jsx)(`div`,{className:`absolute -right-0.5 -bottom-0.5 flex size-4 items-center justify-center rounded-full bg-pink-500 text-white`,children:(0,J.jsx)(D,{className:`size-2.5`,fill:`currentColor`})})]}),(0,J.jsx)(`span`,{className:`font-medium`,children:e.member?B(e.member):`Deleted member`})]}),(0,J.jsx)(`span`,{className:`shrink-0 text-sm text-muted-foreground`,children:m(e.created_at)})]},e.id)),h>0&&(0,J.jsxs)(`div`,{className:`pt-1 text-center text-sm text-muted-foreground`,children:[`and `,f(h),` more`]})]})}),(0,J.jsx)(M,{children:(0,J.jsx)(k,{onClick:()=>i(!1),children:`OK`})})]})})}function Et({comment:e,open:t,onOpenChange:n}){let{data:r,isLoading:i}=pt(e.id,{enabled:t}),a=r?.comment_reports??[],o=e.count?.reports??a.length;return(0,J.jsx)(I,{open:t,onOpenChange:n,children:(0,J.jsxs)(P,{"aria-describedby":void 0,children:[(0,J.jsx)(N,{children:(0,J.jsxs)(F,{children:[o,` `,o===1?`report`:`reports`]})}),(0,J.jsx)(`div`,{className:`overflow-hidden rounded-md border p-3`,children:(0,J.jsxs)(`div`,{className:`flex min-w-0 items-start gap-3`,children:[(0,J.jsx)(A,{className:`shrink-0`,...V(e.member),src:e.member?.avatar_image}),(0,J.jsxs)(`div`,{className:`flex min-w-0 flex-col overflow-hidden`,children:[(0,J.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1 text-sm`,children:[(0,J.jsx)(`span`,{className:`shrink-0 font-semibold`,children:e.member?B(e.member):`Deleted member`}),(0,J.jsx)(T,{className:`shrink-0 text-muted-foreground/50`,size:16}),(0,J.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:e.created_at&&m(e.created_at)}),(0,J.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:`on`}),(0,J.jsx)(`span`,{className:`min-w-0 truncate font-medium text-gray-800 dark:text-gray-400`,children:e.post?.title||`Unknown post`})]}),(0,J.jsx)(`div`,{dangerouslySetInnerHTML:{__html:e.html||``},className:`prose mt-2 line-clamp-2 text-sm [&_*]:text-sm [&_*]:leading-[1.5em] [&_p]:m-0`})]})]})}),(0,J.jsx)(`div`,{className:`-mx-1 max-h-64 overflow-y-auto px-1`,children:i?(0,J.jsx)(`div`,{className:`flex justify-center py-4`,children:(0,J.jsx)(R,{size:`md`})}):(0,J.jsx)(`div`,{className:`flex flex-col gap-3 pb-1`,children:a.map(e=>(0,J.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,J.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,J.jsxs)(`div`,{className:`relative shrink-0`,children:[(0,J.jsx)(A,{...V(e.member),src:e.member?.avatar_image}),(0,J.jsx)(`div`,{className:`absolute -right-0.5 -bottom-0.5 flex size-4 items-center justify-center rounded-full bg-red text-white`,children:(0,J.jsx)(C,{className:`size-2.5`,fill:`currentColor`})})]}),(0,J.jsx)(`span`,{className:`font-medium`,children:e.member?B(e.member):`Deleted member`})]}),(0,J.jsx)(`span`,{className:`shrink-0 text-sm text-muted-foreground`,children:m(e.created_at)})]},e.id))})}),(0,J.jsx)(M,{children:(0,J.jsx)(k,{onClick:()=>n(!1),children:`OK`})})]})})}function Q(e,t){if(!t)return;let n=new URLSearchParams(e);return n.set(`thread`,`is:${t}`),`?${n.toString()}`}function $({icon:e,count:t,label:n,to:r,onClick:i,className:a,testId:o}){let s=p(`flex items-center gap-1 text-xs text-gray-800`,a),c=(0,J.jsxs)(J.Fragment,{children:[e,(0,J.jsx)(`span`,{children:f(t)})]}),l=r||i;return(0,J.jsxs)(g,{children:[(0,J.jsx)(y,{asChild:!0,children:r?(0,J.jsx)(d,{className:p(s,`cursor-pointer hover:opacity-70`),"data-testid":o,to:r,onClick:e=>{e.stopPropagation()},children:c}):i?(0,J.jsx)(`button`,{className:p(s,`cursor-pointer hover:opacity-70`),"data-testid":o,type:`button`,onClick:e=>{e.stopPropagation(),i()},children:c}):(0,J.jsx)(`div`,{className:s,"data-testid":o,children:c})}),(0,J.jsx)(h,{children:l?`View ${n.toLowerCase()}`:n})]})}function Dt({comment:e,dislikesEnabled:t,className:n}){let[r]=u(),[i,a]=(0,K.useState)(!1),[o,s]=(0,K.useState)(`likes`),[c,l]=(0,K.useState)(!1),d=Q(r,e.id),f=e.count?.direct_replies??e.replies?.length??0,m=e.count?.likes??0,h=t?e.count?.dislikes??0:0,g=e.count?.reports??0,_=f>0,v=m>0,y=h>0,b=g>0;return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`div`,{className:p(`flex items-center gap-6`,n),children:[(0,J.jsx)($,{count:f,icon:(0,J.jsx)(le,{size:16,strokeWidth:1.5}),label:`Replies`,testId:`replies-metric`,to:_?d:void 0}),t?(0,J.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,J.jsx)($,{count:m,icon:(0,J.jsx)(se,{size:16,strokeWidth:1.5}),label:`Likes`,testId:`likes-metric`,onClick:v?()=>{s(`likes`),a(!0)}:void 0}),(0,J.jsx)($,{count:h,icon:(0,J.jsx)(S,{size:16,strokeWidth:1.5}),label:`Dislikes`,testId:`dislikes-metric`,onClick:y?()=>{s(`dislikes`),a(!0)}:void 0})]}):(0,J.jsx)($,{count:m,icon:(0,J.jsx)(D,{size:16,strokeWidth:1.5}),label:`Likes`,onClick:v?()=>a(!0):void 0}),(0,J.jsx)($,{className:b?`font-semibold text-red`:void 0,count:g,icon:(0,J.jsx)(C,{size:16,strokeWidth:1.5}),label:`Reports`,onClick:b?()=>l(!0):void 0})]}),(0,J.jsx)(Tt,{comment:e,defaultTab:o,dislikesEnabled:t,open:i,onOpenChange:a}),(0,J.jsx)(Et,{comment:e,open:c,onOpenChange:l})]})}function Ot({hasReplies:e}){return e?(0,J.jsx)(`div`,{className:`mb-2 h-full w-px grow rounded bg-gradient-to-b from-muted-foreground/20 from-70% to-transparent`,"data-testid":`replies-line`}):null}function kt({comment:e,dislikesEnabled:t,isReply:n=!1,isSelectedComment:r=!1,selectedCommentId:i}){let[a]=u(),{mutate:o}=st(),{mutate:s}=ct(),{mutate:c}=Z(),l=(e.replies?.length??0)>0||(e.count?.direct_replies??e.count?.replies??0)>0;return(0,J.jsxs)(`div`,{className:`flex w-full flex-row ${!l||n?`mb-7`:`mb-0`}`,children:[(0,J.jsxs)(`div`,{className:`mr-2 flex shrink-0 flex-col items-center justify-start md:mr-3`,children:[(0,J.jsx)(A,{className:p(`mb-3 size-6 md:mb-4 md:size-8`,e.status===`hidden`&&`opacity-50`),...V(e.member),src:e.member?.avatar_image}),(0,J.jsx)(Ot,{hasReplies:l&&!n})]}),(0,J.jsx)(`div`,{className:`grow`,children:(0,J.jsxs)(`div`,{className:`w-full`,"data-testid":`comment-thread-row-${e.id}`,children:[(0,J.jsxs)(`div`,{className:`flex min-w-0 flex-col`,children:[(0,J.jsx)(St,{canComment:e.member?.can_comment,createdAt:e.created_at,isHidden:e.status===`hidden`,isPinned:e.pinned,memberId:e.member?.id,memberName:e.member?.name,onUnpinClick:()=>c({id:e.id})}),e.in_reply_to_snippet&&r&&(0,J.jsxs)(`div`,{className:`mb-1 line-clamp-1 text-sm ${e.status===`hidden`&&`opacity-50`}`,children:[(0,J.jsx)(`span`,{className:`text-muted-foreground`,children:`Replied to:`}),`\xA0`,(0,J.jsx)(d,{className:`text-sm font-normal text-muted-foreground hover:text-foreground`,"data-testid":`replied-to-link`,to:Q(a,e.in_reply_to_id||e.parent_id)||``,onClick:e=>{e.stopPropagation()},children:e.in_reply_to_snippet})]}),(0,J.jsx)(bt,{item:e}),(0,J.jsxs)(`div`,{className:`mt-4 flex flex-row flex-wrap items-center gap-3`,children:[e.status===`published`&&(0,J.jsxs)(k,{className:`text-gray-800`,size:`sm`,variant:`outline`,onClick:()=>o({id:e.id}),children:[(0,J.jsx)(ee,{}),(0,J.jsx)(`span`,{className:`max-md:hidden`,children:`Hide`})]}),e.status===`hidden`&&(0,J.jsxs)(k,{className:`text-gray-800`,size:`sm`,variant:`outline`,onClick:()=>s({id:e.id}),children:[(0,J.jsx)(oe,{}),(0,J.jsx)(`span`,{className:`max-md:hidden`,children:`Show`})]}),(0,J.jsx)(Dt,{comment:e,dislikesEnabled:t}),(0,J.jsx)(wt,{comment:e})]})]}),l&&e.replies&&(0,J.jsx)(`div`,{className:`mt-7 mb-4 -ml-2 pl-2 md:mt-8 md:mb-0 md:-ml-3 md:pl-3`,children:e.replies.map(e=>(0,J.jsx)(kt,{comment:e,dislikesEnabled:t,isReply:!0,selectedCommentId:i},e.id))})]})})]})}var At=({selectedComment:e,dislikesEnabled:t,replies:n,selectedCommentId:r,fetchNextPage:i,hasNextPage:a,isFetchingNextPage:o})=>(0,J.jsxs)(`div`,{className:`flex flex-col`,"data-testid":`comment-thread-list`,children:[(0,J.jsx)(kt,{comment:{...e,replies:n},dislikesEnabled:t,isSelectedComment:!0,selectedCommentId:r}),a&&(0,J.jsx)(`div`,{className:`flex justify-center pb-4`,children:(0,J.jsx)(k,{disabled:o,variant:`outline`,onClick:()=>i(),children:o?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(R,{size:`sm`}),`Loading...`]}):`Load more replies`})})]}),jt=({commentId:e,dislikesEnabled:t,open:n,onOpenChange:r})=>{let{data:i,isLoading:a,isError:o,fetchNextPage:s,hasNextPage:c,isFetchingNextPage:l}=vt(e??``,{dislikesEnabled:t,enabled:n&&!!e}),{data:u,isLoading:d,isError:f}=dt(e??``,{dislikesEnabled:t,enabled:n&&!!e}),p=a||d,m=f||o&&!u,h=u?.comments?.[0],g=i?.comments||[];return(0,J.jsx)(Te,{open:n,onOpenChange:r,children:(0,J.jsxs)(Ce,{className:`overflow-y-auto px-6 pt-0 sm:max-w-[420px]`,children:[(0,J.jsx)(ke,{className:`sticky top-0 z-40 -mx-6 bg-surface-elevated/60 p-6 backdrop-blur`,children:(0,J.jsx)(De,{className:`text-md`,children:`Thread`})}),h?.post&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,J.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,J.jsx)(`h3`,{className:`line-clamp-1 text-xl font-semibold text-foreground`,children:h.post.title}),h.post.excerpt&&(0,J.jsx)(`p`,{className:`mt-1 line-clamp-2 text-sm text-muted-foreground`,children:h.post.excerpt})]}),h.post.feature_image&&(0,J.jsx)(`img`,{alt:h.post.title||`Post feature image`,className:`hidden aspect-video h-18 shrink-0 rounded object-cover lg:block`,src:h.post.feature_image})]}),(0,J.jsx)(Oe,{className:`-mx-6 my-6 w-auto`})]}),(0,J.jsx)(`div`,{children:p?(0,J.jsx)(`div`,{className:`flex h-full items-center justify-center py-8`,children:(0,J.jsx)(R,{size:`lg`})}):m||!h?(0,J.jsx)(`div`,{className:`flex h-full items-center justify-center py-8`,children:(0,J.jsx)(L,{actions:(0,J.jsx)(k,{variant:`outline`,onClick:()=>r(!1),children:`Back to comments`}),description:`This thread may have been deleted or doesn't exist.`,title:`Thread not found`,children:(0,J.jsx)(w,{})})}):(0,J.jsx)(At,{dislikesEnabled:t,fetchNextPage:()=>void s(),hasNextPage:c,isFetchingNextPage:l,replies:g,selectedComment:h,selectedCommentId:e??``})})]})})},Mt=({height:e})=>(0,J.jsx)(`div`,{"aria-hidden":`true`,className:`flex`,children:(0,J.jsx)(`div`,{className:`flex`,style:{height:e}})}),Nt=(0,K.forwardRef)(function(e,t){return(0,J.jsx)(`div`,{ref:t,...e,"aria-hidden":`true`,className:`relative flex flex-col`,children:(0,J.jsx)(`div`,{className:`relative z-10 h-24 animate-pulse`,children:(0,J.jsx)(`div`,{className:`h-full rounded-md bg-muted`,"data-testid":`loading-placeholder`})})})});function Pt({items:e,totalItems:t,hasNextPage:n,isFetchingNextPage:r,fetchNextPage:i,resetKey:a,onAddFilter:o,isLoading:s,dislikesEnabled:c}){let{isAdmin7:l}=v(),f=(0,K.useRef)(null),{visibleItemCount:m,canLoadMore:h,loadMore:g}=Fe(t,{resetKey:a}),[y,b]=u(),[x,S]=(0,K.useState)(!1),[C,w]=(0,K.useState)(null),{mutate:T}=st(),{mutate:te}=ct(),{mutate:ne}=Z(),E=e=>{if(S(e),!e){let e=new URLSearchParams(y);e.delete(`thread`),b(e,{replace:!0})}};(0,K.useEffect)(()=>{let e=y.get(`thread`);if(e){let t=e.match(/^is:(.+)$/);if(t&&t[1]){let e=t[1];w(e),S(!0)}else S(!1),w(null)}else S(!1),w(null)},[y]),Pe({parentRef:f,isLoading:s});let{visibleItems:re,spaceBefore:ie,spaceAfter:D}=Ne({items:e,totalItems:m,hasNextPage:n,isFetchingNextPage:r,fetchNextPage:i,parentRef:f});return(0,J.jsx)(_,{children:(0,J.jsxs)(`div`,{ref:f,className:`overflow-hidden border-t`,children:[(0,J.jsx)(`div`,{className:`flex flex-col`,"data-testid":`comments-list`,children:(0,J.jsxs)(`div`,{className:`flex flex-col`,children:[(0,J.jsx)(Mt,{height:ie}),re.map(({key:t,virtualItem:n,item:r,props:i})=>n.index>e.length-1?(0,J.jsx)(Nt,{...i},t):(0,J.jsxs)(`div`,{...i,className:`group/comment grid w-full grid-cols-1 items-start justify-between gap-4 border-b p-3 hover:bg-table-row-hover md:p-5 lg:grid-cols-[minmax(0,1fr)_144px]`,"data-testid":`comment-list-row`,onClick:()=>{x&&E(!1)},children:[(0,J.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,J.jsx)(A,{className:p(`mt-0.5 size-6 md:size-8`,r.status===`hidden`&&`opacity-50`),...V(r.member),src:r.member?.avatar_image}),(0,J.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:[(0,J.jsxs)(`div`,{children:[(0,J.jsx)(St,{canComment:r.member?.can_comment,createdAt:r.created_at,isHidden:r.status===`hidden`,isPinned:r.pinned,memberId:r.member?.id,memberName:r.member?.name,postTitle:r.post?.title,onAuthorClick:r.member?.id?()=>o(`author`,r.member.id):void 0,onPostClick:r.post?.id?()=>o(`post`,r.post.id):void 0,onUnpinClick:()=>ne({id:r.id})}),r.in_reply_to_snippet&&(0,J.jsxs)(`div`,{className:`mb-1 line-clamp-1 max-w-3xl ${r.status===`hidden`&&`opacity-50`}`,children:[(0,J.jsx)(`span`,{className:`text-muted-foreground`,children:`Replied to:`}),`\xA0`,(0,J.jsx)(d,{className:`text-sm font-normal text-muted-foreground hover:text-foreground`,"data-testid":`replied-to-link`,to:Q(y,r.in_reply_to_id||r.parent_id)||``,onClick:e=>{e.stopPropagation()},children:r.in_reply_to_snippet})]})]}),(0,J.jsx)(bt,{item:r}),(0,J.jsxs)(`div`,{className:`flex flex-row flex-nowrap items-center gap-3`,children:[r.status===`published`&&(0,J.jsxs)(k,{className:p(`text-foreground`,l&&`group-hover/comment:bg-background`),size:`sm`,variant:`outline`,onClick:()=>T({id:r.id}),children:[(0,J.jsx)(ee,{}),`Hide`]}),r.status===`hidden`&&(0,J.jsxs)(k,{className:p(`text-foreground`,l&&`group-hover/comment:bg-background`),size:`sm`,variant:`outline`,onClick:()=>te({id:r.id}),children:[(0,J.jsx)(oe,{}),`Show`]}),(0,J.jsx)(Dt,{className:`ml-2`,comment:r,dislikesEnabled:c}),(0,J.jsx)(wt,{comment:r})]})]})]}),(0,J.jsx)(`div`,{children:r.post?.feature_image?(0,J.jsx)(`img`,{alt:r.post.title||`Post feature image`,className:`hidden aspect-video w-36 rounded object-cover lg:block ${r.status===`hidden`&&`opacity-50`}`,src:r.post.feature_image}):null})]},t)),(0,J.jsx)(Mt,{height:D})]})}),h&&(0,J.jsx)(Ie,{isLoading:r,onClick:g}),(0,J.jsx)(jt,{commentId:C,dislikesEnabled:c,open:x,onOpenChange:E})]})})}var Ft=qe(q,`date`);function It(e){return We(e,q)}function Lt(e,t){let n=Ye(e??``);return n?Ke(Ve(n,q,t).filter(It)):[]}function Rt(e){let t=Ye(e??``);return t?Be(t,Ft):!1}function zt(e,t){return He(e.filter(It),q,t)}var Bt=[`status`,`created_at`,`body`,`post`,`author`,`reported`],Vt={is_not:`is-not`,not_contains:`does-not-contain`,before:`is-less`,after:`is-greater`,on_or_before:`is-or-less`,on_or_after:`is-or-greater`};function Ht(e){let t=e.indexOf(`:`);if(t<=0)return null;let n=e.substring(0,t),r=e.substring(t+1);return r?{operator:Vt[n]??n,value:r}:null}function Ut(e){let t=[];for(let[n,r]of e.entries()){if(!Bt.includes(n))continue;let e=Ht(r);e&&t.push({id:`${n}:${t.length+1}`,field:n,operator:e.operator,values:[e.value]})}return t}function Wt(e){Bt.forEach(t=>e.delete(t))}function Gt(e,t,n){let r=new URLSearchParams(e),i=zt(t,n);return r.delete(`filter`),Wt(r),i&&r.set(`filter`,i),r}function Kt(e,t,n=!t){return!!e&&n&&!t&&Rt(e)}function qt(e){let[t,n]=u(),r=(0,K.useRef)(null),i=(0,K.useMemo)(()=>t.get(`filter`)??void 0,[t]),a=(0,K.useMemo)(()=>t.toString(),[t]),o=(0,K.useMemo)(()=>i===void 0?Ut(t):Lt(i,e),[i,t,e]),[s,c]=(0,K.useState)(o),l=(0,K.useMemo)(()=>zt(s,e),[s,e]);return(0,K.useEffect)(()=>{a!==r.current&&(c(o),r.current=a)},[a,o]),(0,K.useEffect)(()=>{if(r.current!==null&&a!==r.current)return;let i=Gt(t,s,e),o=i.toString();o!==a&&(r.current=o,n(i,{replace:!0}))},[a,s,t,n,e]),{filters:s,nql:l,setFilters:(0,K.useCallback)((i,a={})=>{let o=typeof i==`function`?i(s):i,l=Gt(t,o,e),u=a.replace??!0;c(o),r.current=l.toString(),n(l,{replace:u})},[s,t,n,e]),clearFilters:(0,K.useCallback)(({replace:e=!0}={})=>{let i=new URLSearchParams(t);i.delete(`filter`),Wt(i),c([]),r.current=i.toString(),n(i,{replace:e})},[t,n])}}function Jt(e){return e.get(`id`)?.match(/^is:(.+)$/)?.[1]}var Yt=({timezone:e,singleCommentId:t})=>{let[r,i]=u(),{filters:a,nql:o,setFilters:s}=qt(e),c=(0,K.useCallback)((n,o,c=`is`)=>{let l=[...a.filter(e=>e.field!==n),Se(n,c,[o])];if(!t){s(l,{replace:!1});return}let u=new URLSearchParams(r),d=zt(l,e);u.delete(`id`),u.delete(`filter`),d&&u.set(`filter`,d),i(u,{replace:!1})},[a,r,s,i,t,e]),d=(0,K.useMemo)(()=>t?`id:${l(t)}`:o,[o,t]),f=(0,K.useCallback)(()=>{i(new URLSearchParams,{replace:!1})},[i]),{data:p,isError:m,isFetching:h,isFetchingNextPage:g,isRefetching:_,fetchNextPage:v,hasNextPage:y}=ot({searchParams:{include:X(!0),...d?{filter:d}:{}},placeholderData:n}),S=h&&!g&&!_,C=d??``,T=a.length>0;return(0,J.jsx)(b,{className:`size-full`,children:(0,J.jsx)(x,{className:`relative flex h-full flex-col`,size:`page`,children:(0,J.jsxs)(W,{"data-testid":`comments-page`,children:[(0,J.jsxs)(W.Header,{children:[(0,J.jsxs)(z,{blurredBackground:!1,sticky:!1,children:[(0,J.jsx)(z.Left,{children:(0,J.jsx)(z.Title,{children:`Comments`})}),!t&&!T&&(0,J.jsx)(z.Actions,{children:(0,J.jsx)(z.ActionGroup,{children:(0,J.jsx)(nt,{filters:a,siteTimezone:e,onFiltersChange:s})})})]}),!t&&T&&(0,J.jsx)(H,{children:(0,J.jsx)(nt,{filters:a,siteTimezone:e,onFiltersChange:s})})]}),(0,J.jsx)(W.Body,{children:S?(0,J.jsx)(`div`,{className:`flex flex-1 items-center justify-center`,children:(0,J.jsx)(R,{size:`lg`})}):m?(0,J.jsxs)(`div`,{className:`flex flex-1 flex-col items-center justify-center`,children:[(0,J.jsx)(`h2`,{className:`mb-2 text-xl font-medium`,children:`Error loading comments`}),(0,J.jsx)(`p`,{className:`mb-4 text-muted-foreground`,children:`Please reload the page to try again`}),(0,J.jsx)(k,{onClick:()=>window.location.reload(),children:`Reload page`})]}):p?.comments.length?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(Pt,{dislikesEnabled:!0,fetchNextPage:()=>void v(),hasNextPage:y,isFetchingNextPage:g,isLoading:h&&!g,items:p?.comments??[],resetKey:C,totalItems:p?.meta?.pagination?.total??0,onAddFilter:c}),t&&(0,J.jsx)(`div`,{className:`flex justify-center py-8`,children:(0,J.jsx)(k,{variant:`outline`,onClick:f,children:`Show all comments`})})]}):(0,J.jsx)(`div`,{className:`flex flex-1 items-center justify-center`,children:t?(0,J.jsxs)(`div`,{className:`flex flex-col items-center`,children:[(0,J.jsx)(L,{title:`Comment not found`,children:(0,J.jsx)(w,{})}),(0,J.jsx)(k,{className:`mt-4`,variant:`outline`,onClick:f,children:`Show all comments`})]}):(0,J.jsx)(L,{title:`No comments yet`,children:(0,J.jsx)(w,{})})})})]})})})},Xt=()=>{let[e]=u(),{data:t,isLoading:n}=we({}),r=(0,K.useMemo)(()=>Jt(e),[e]),i=e.get(`filter`)??void 0;if(!r&&Kt(i,!!t,n))return(0,J.jsx)(b,{className:`size-full`,children:(0,J.jsx)(x,{className:`relative flex h-full flex-col`,size:`page`,children:(0,J.jsxs)(W,{children:[(0,J.jsx)(W.Header,{children:(0,J.jsx)(z,{blurredBackground:!1,sticky:!1,children:(0,J.jsx)(z.Left,{children:(0,J.jsx)(z.Title,{children:`Comments`})})})}),(0,J.jsx)(W.Body,{children:(0,J.jsx)(`div`,{className:`flex flex-1 items-center justify-center`,children:(0,J.jsx)(R,{size:`lg`})})})]})})});let a=Me(t?.settings??[]);return(0,J.jsx)(Yt,{singleCommentId:r,timezone:a})};export{Xt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`a6001fe5-88c7-46cd-a222-2bcb9fb5fc32`,e._sentryDebugIdIdentifier=`sentry-dbid-a6001fe5-88c7-46cd-a222-2bcb9fb5fc32`)}catch{}})();import{r as e}from"./hooks-
|
|
1
|
+
(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`a6001fe5-88c7-46cd-a222-2bcb9fb5fc32`,e._sentryDebugIdIdentifier=`sentry-dbid-a6001fe5-88c7-46cd-a222-2bcb9fb5fc32`)}catch{}})();import{r as e}from"./hooks-0r7qxGEo.js";var t=`ConfigResponseType`,n=t,r=e({dataType:t,path:`/config/`}),i=e=>!!e?.hostSettings?.managedEmail?.enabled,a=e=>{let t=e?.hostSettings?.managedEmail?.sendingDomain;return typeof t==`string`&&t.length>0},o=e=>e?.hostSettings?.managedEmail?.sendingDomain,s=`/pro`,c=e=>{let t=e?.hostSettings?.billing?.upgradeUrl;return t?t.replace(/^#/,``):s};export{o as a,i,n,c as o,a as r,r as s,s as t};
|
package/core/built/admin/assets/{content-api-modal-2jt-jWiM.js → content-api-modal-B-XRbzeW.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`
|
|
1
|
+
(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`c4f7b617-f2f0-4a77-98f7-5ef4f57c9d56`,e._sentryDebugIdIdentifier=`sentry-dbid-c4f7b617-f2f0-4a77-98f7-5ef4f57c9d56`)}catch{}})();import{m as e}from"./hooks-0r7qxGEo.js";import{t}from"./jsx-runtime-Bm2_KH-0.js";import{Nn as n,Vn as r,t as i}from"./button-CTHYSI-d.js";import{t as a}from"./settings-modal-3x4v8abr.js";import{t as o}from"./use-settings-navigation-CO2nUqDW.js";import{n as s}from"./integrations-Deg9-u8X.js";import{t as c}from"./api-keys-COZMaKEL.js";import{t as l}from"./integration-header-CrqD-b0Z.js";var u=t();function d(){let{updateRoute:t}=o(),{data:{integrations:d}={integrations:[]}}=s(),f=d.find(({slug:e})=>e===`ghost-core-content`)?.api_keys?.find(e=>e.type===`content`);return(0,u.jsxs)(a,{cancelLabel:``,footer:(0,u.jsxs)(`div`,{className:`mx-8 flex w-full items-center justify-between`,children:[(0,u.jsx)(i,{variant:`outline`,asChild:!0,children:(0,u.jsxs)(`a`,{href:`https://docs.ghost.org/content-api/`,rel:`noopener noreferrer`,target:`_blank`,children:[`Open docs `,(0,u.jsx)(n,{className:`size-3`})]})}),(0,u.jsx)(i,{type:`button`,onClick:()=>{t(`integrations`)},children:`Close`})]}),testId:`content-api-modal`,title:``,stickyFooter:!0,onClose:()=>{t(`integrations`)},children:[(0,u.jsx)(l,{detail:`Access your content programmatically`,icon:(0,u.jsx)(r,{className:`size-14`}),title:`Content API`}),(0,u.jsxs)(`div`,{className:`mt-7`,children:[(0,u.jsx)(`p`,{className:`mb-6 text-gray-700`,children:`This key provides read-only access to your published content. For full read/write access, create a custom integration.`}),(0,u.jsx)(c,{keys:[{id:`content-api-key`,label:`Content API key`,text:f?.secret},{id:`api-url`,label:`API URL`,text:window.location.origin+e().subdir}]})]})]})}export{d as default};
|