ghost 6.55.0 → 6.56.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/tryghost-custom-field-types-0.0.0.tgz +0 -0
- package/components/tryghost-kg-default-cards-10.3.3.tgz +0 -0
- package/components/tryghost-kg-default-nodes-2.1.4.tgz +0 -0
- package/components/tryghost-kg-default-transforms-1.3.3.tgz +0 -0
- package/components/tryghost-kg-html-to-lexical-1.3.3.tgz +0 -0
- package/components/tryghost-kg-lexical-html-renderer-1.4.3.tgz +0 -0
- package/components/tryghost-nql-string-0.0.0.tgz +0 -0
- package/core/built/admin/assets/{Combination-CJG7Flp-.js → Combination-BCm9FL4o.js} +1 -1
- package/core/built/admin/assets/{PolarAngleAxis-BGjf7sBu.js → PolarAngleAxis-C4qtHy1B.js} +1 -1
- package/core/built/admin/assets/{RadialBarChart-zeFf9mBz.js → RadialBarChart-Bh09Stsj.js} +1 -1
- package/core/built/admin/assets/{account-migration-sjHLx5dy.js → account-migration-D3O_yVck.js} +1 -1
- package/core/built/admin/assets/activitypub/{account-migration-DoYXtnZ8.js → account-migration-D8FbP-Z-.js} +7 -7
- package/core/built/admin/assets/activitypub/activitypub.js +6 -6
- package/core/built/admin/assets/activitypub/{avatar-B3DEDB1l.js → avatar-11EA1VSs.js} +2 -2
- package/core/built/admin/assets/activitypub/{avatar-flipboard-Cqrg0XMx.js → avatar-flipboard-jfbLG-xe.js} +2 -2
- package/core/built/admin/assets/activitypub/{bluesky-sharing-Bxeh6MKW.js → bluesky-sharing-f1jTQe2P.js} +16 -16
- package/core/built/admin/assets/activitypub/{content-formatters-BpQARh28.js → content-formatters-nmTOPY9M.js} +3 -3
- package/core/built/admin/assets/activitypub/{copy-D9UWIAan.js → copy-BCwo9ep3.js} +2 -2
- package/core/built/admin/assets/activitypub/{dist-D8sFfdpC.js → dist-BEfX-0aW.js} +12 -12
- package/core/built/admin/assets/activitypub/{domain-CWueFW6q.js → domain-AaDlZlrA.js} +9 -9
- package/core/built/admin/assets/activitypub/{edit-profile-BGxPU7N5.js → edit-profile-DPi8Tl5M.js} +945 -945
- package/core/built/admin/assets/activitypub/{explore-DBK-u0Ch.js → explore-CxTzjILQ.js} +8 -8
- package/core/built/admin/assets/activitypub/{feed-Bcir5RQZ.js → feed-DPv5x2MX.js} +33 -33
- package/core/built/admin/assets/activitypub/{field-BV-CIT3d.js → field-DbgA8lat.js} +3 -3
- package/core/built/admin/assets/activitypub/{hash-BC9Q0N4c.js → hash-BWuZoYkA.js} +2 -2
- package/core/built/admin/assets/activitypub/{inbox-DQ4ZnC1m.js → inbox-35VDQ2K2.js} +2 -2
- package/core/built/admin/assets/activitypub/{inbox-yC0nfvzl.js → inbox-DSrF_i1O.js} +85 -85
- package/core/built/admin/assets/activitypub/{label-DTRS9TDk.js → label-CPjFBbo7.js} +3 -3
- package/core/built/admin/assets/activitypub/layout-CTgrezN7.js +1 -0
- package/core/built/admin/assets/activitypub/{moderation-Dwl9t0pb.js → moderation-BkDC1XVZ.js} +11 -11
- package/core/built/admin/assets/activitypub/{note-B-zKsZ7r.js → note-xEyH4xT-.js} +7 -7
- package/core/built/admin/assets/activitypub/{notifications-DjJZD54t.js → notifications-DClaL3ui.js} +9 -9
- package/core/built/admin/assets/activitypub/{preferences-CoU8vs6d.js → preferences-DpnOa-4Z.js} +20 -20
- package/core/built/admin/assets/activitypub/{profile-BAsaJekx.js → profile-Dvi9mz-6.js} +237 -237
- package/core/built/admin/assets/activitypub/{reply-CpdMeAO5.js → reply-Cs9ySd6Z.js} +2 -2
- package/core/built/admin/assets/activitypub/{routes-CLH3OVTP.js → routes-DFBeTnfn.js} +1139 -1150
- package/core/built/admin/assets/activitypub/{separator-BI1FLsYM.js → separator-C5u_VjzY.js} +3 -3
- package/core/built/admin/assets/activitypub/{settings-DA6pNJ-Q.js → settings-CV2fFu6D.js} +13 -13
- package/core/built/admin/assets/activitypub/{site-CQD42Pw5.js → site-_TgDd_EM.js} +81 -81
- package/core/built/admin/assets/activitypub/{step-1-DIDg4aHb.js → step-1-BfnNL2oF.js} +5 -5
- package/core/built/admin/assets/activitypub/{step-2-BfGe8BYt.js → step-2-DLndZkO-.js} +6 -6
- package/core/built/admin/assets/activitypub/{step-3-mE9spAqw.js → step-3-A-PZTtRE.js} +10 -10
- package/core/built/admin/assets/activitypub/{tabs-Cg0saow1.js → tabs-BUbz7tea.js} +317 -315
- package/core/built/admin/assets/activitypub/{topic-filter-DLHBZT93.js → topic-filter-BdX_xYYT.js} +3 -3
- package/core/built/admin/assets/activitypub/{use-activity-pub-queries-VzbN99u_.js → use-activity-pub-queries-EwuRemHh.js} +2 -2
- package/core/built/admin/assets/activitypub/{use-navigate-with-base-path-CAwXTmqH.js → use-navigate-with-base-path-cy4ACBc4.js} +92 -90
- package/core/built/admin/assets/activitypub/{use-reply-chain-data-Br4aOWOh.js → use-reply-chain-data-CyFcGfan.js} +5 -5
- package/core/built/admin/assets/activitypub/{x-C8tAnXly.js → x-7zk8mV2p.js} +2 -2
- package/core/built/admin/assets/{audience-DjEWNhp3.js → audience-CkBb2LlO.js} +1 -1
- package/core/built/admin/assets/{automated-emails-DRy7qY-J.js → automated-emails-6t2bIRWf.js} +1 -1
- package/core/built/admin/assets/{automations-Bx3VcFIL.js → automations-cMllU545.js} +1 -1
- package/core/built/admin/assets/{bluesky-sharing-ClMd0-Ft.js → bluesky-sharing-DPGpyD-G.js} +1 -1
- package/core/built/admin/assets/{box-BWbhXh21.js → box-By_EgGtm.js} +1 -1
- package/core/built/admin/assets/{breadcrumb-BD0U2ygg.js → breadcrumb-DIfcF5ow.js} +1 -1
- package/core/built/admin/assets/build-CsiH26uS.js +1 -0
- package/core/built/admin/assets/{card-DGoDJzrn.js → card-aUHX0hyR.js} +1 -1
- package/core/built/admin/assets/{chart-BuRT2Y6p.js → chart-BnXyfH11.js} +1 -1
- package/core/built/admin/assets/{chart-helpers-fjQKRVyY.js → chart-helpers-DV0FkdcD.js} +1 -1
- package/core/built/admin/assets/{checkbox-CWa28lgO.js → checkbox-BIl077a0.js} +1 -1
- package/core/built/admin/assets/{chunk.481.6c7395a49484bb4583aa.js → chunk.332.05991a101d67f732dec3.js} +43 -42
- package/core/built/admin/assets/chunk.524.87b52f4fada529df2c4c.js +25 -0
- package/core/built/admin/assets/chunk.582.340bcca873e806cbd4bb.js +27 -0
- package/core/built/admin/assets/{code-editor-view-CCr0rBWS.js → code-editor-view-C0aWNwdl.js} +1 -1
- package/core/built/admin/assets/comments-qwhIjH3c.js +1 -0
- package/core/built/admin/assets/{container-BYz2Ed39.js → container-LiZf3XdY.js} +1 -1
- package/core/built/admin/assets/{data-list-16rkJYYi.js → data-list-CupF7bjM.js} +1 -1
- package/core/built/admin/assets/{date-range-select-BFp58EMk.js → date-range-select-dXc-GsVe.js} +1 -1
- package/core/built/admin/assets/{disabled-sources-indicator-CUxMfiPa.js → disabled-sources-indicator-DYAXW-6V.js} +1 -1
- package/core/built/admin/assets/dist-BUKmD51u.js +1 -0
- package/core/built/admin/assets/{dist-2Tnz2Yfq.js → dist-CNlMj7ML.js} +1 -1
- package/core/built/admin/assets/{dist-DGzPJ_bO.js → dist-Cb5RSHSg.js} +1 -1
- package/core/built/admin/assets/{dist-P_ohUlTi.js → dist-CqO2lWS0.js} +1 -1
- package/core/built/admin/assets/domain-B5ogXUBa.js +1 -0
- package/core/built/admin/assets/{dropzone-DlK-K2DQ.js → dropzone-BnFG7dDP.js} +1 -1
- package/core/built/admin/assets/{edit-profile-BKT-REJw.js → edit-profile-B07jCZy9.js} +1 -1
- package/core/built/admin/assets/editor-DDYSOXGN.js +8 -0
- package/core/built/admin/assets/{empty-indicator-oX1u1Pkn.js → empty-indicator-WB1WgT9h.js} +1 -1
- package/core/built/admin/assets/{explore-ClUpJZOp.js → explore-Ca1y8HW_.js} +1 -1
- package/core/built/admin/assets/{feed-DF92dUMP.js → feed-x4iFMBP4.js} +1 -1
- package/core/built/admin/assets/{field-Do7lieBA.js → field-ChCAabZg.js} +1 -1
- package/core/built/admin/assets/filter-sources-LdtH1e-T.js +1 -0
- package/core/built/admin/assets/filters-CLehPo_D.js +1 -0
- package/core/built/admin/assets/filters-CjVKRP8U.js +1 -0
- package/core/built/admin/assets/{ghost-c4057474943effc568c5659ccc4909d7.js → ghost-7f01131115186d1af84ead76e79646dd.js} +149 -129
- package/core/built/admin/assets/{ghost-a9c788f6f0b1ea6cf0f14ca4b13f4496.css → ghost-d38c30b866e59f2e06a357b5eb844fe5.css} +1 -1
- package/core/built/admin/assets/{ghost-dark-db36d795d21c61426837df40af270966.css → ghost-dark-1bffd5099ba7a749303133efacf8480b.css} +1 -1
- package/core/built/admin/assets/{gift-link-modal-f9VIMNDv.js → gift-link-modal-Buqh2vXh.js} +1 -1
- package/core/built/admin/assets/{growth-B3I6gNLm.js → growth-DajOBdN0.js} +1 -1
- package/core/built/admin/assets/{growth-CVw1My4S.js → growth-Dy2UOSay.js} +2 -2
- package/core/built/admin/assets/{inbox-CFBSu4Ed.js → inbox-BUOLDoji.js} +12 -12
- package/core/built/admin/assets/index-08n05-rc.js +67 -0
- package/core/built/admin/assets/index-DgUzgFvS.css +1 -0
- package/core/built/admin/assets/{inline-EMAm3okk.js → inline-Cw-gigDW.js} +1 -1
- package/core/built/admin/assets/input-group-uSK3XT7b.js +1 -0
- package/core/built/admin/assets/{input-surface-BpAjZXY5.js → input-surface-BdOe4KzO.js} +1 -1
- package/core/built/admin/assets/koenig-lexical/koenig-lexical.js +9535 -9527
- package/core/built/admin/assets/koenig-lexical/koenig-lexical.umd.js +124 -124
- package/core/built/admin/assets/{koenig-lexical-f8vHRYvz.js → koenig-lexical-BFc4yFed.js} +86 -86
- package/core/built/admin/assets/{kpi-card-DSap9rAy.js → kpi-card-BN-E6WYX.js} +1 -1
- package/core/built/admin/assets/{kpi-card-DU0rn9Cj.js → kpi-card-CCt-qeWD.js} +1 -1
- package/core/built/admin/assets/{kpi-helpers-Dz33AV6h.js → kpi-helpers-DlxTbTs4.js} +1 -1
- package/core/built/admin/assets/{kpi-tabs-BtTTrKvJ.js → kpi-tabs-BlcUttpn.js} +1 -1
- package/core/built/admin/assets/{label-DS8Mi6G5.js → label-AVrxwmsz.js} +1 -1
- package/core/built/admin/assets/{label-picker-1DvSuLA1.js → label-picker-DVnpu_IF.js} +1 -1
- package/core/built/admin/assets/labels-DAIqKed7.js +1 -0
- package/core/built/admin/assets/layout-B0YLh7R9.js +1 -0
- package/core/built/admin/assets/link-helpers-D9LsDOkG.js +1 -0
- package/core/built/admin/assets/{list-page-B6ANtzkd.js → list-page-CdsnQR9N.js} +1 -1
- package/core/built/admin/assets/member-custom-fields-C8NpZYza.js +1 -0
- package/core/built/admin/assets/member-detail-CIVAdKXf.js +1 -0
- package/core/built/admin/assets/{members-CQpVFJu4.js → members-oLPiSkXD.js} +2 -2
- package/core/built/admin/assets/modals-CB7v-k3T.js +31 -0
- package/core/built/admin/assets/{moderation-DySbgyUS.js → moderation-CQ3urTFE.js} +1 -1
- package/core/built/admin/assets/newsletter-rbeDX9Wk.js +1 -0
- package/core/built/admin/assets/newsletters-vt3Ni1Ov.js +1 -0
- package/core/built/admin/assets/{note-C8kxrz6w.js → note-Dk877BTv.js} +1 -1
- package/core/built/admin/assets/{notifications-CgtSfX7t.js → notifications-CPlLjPxO.js} +1 -1
- package/core/built/admin/assets/{onboarding-route-4qtziA9d.js → onboarding-route-DdStOtjy.js} +1 -1
- package/core/built/admin/assets/{overview-Bf2sbznq.js → overview--4V-kx9c.js} +1 -1
- package/core/built/admin/assets/overview-DSLv30oz.js +1 -0
- package/core/built/admin/assets/{page-header-B3Wb9Jqv.js → page-header-pp4dWmOS.js} +1 -1
- package/core/built/admin/assets/{post-analytics-We-ko5Cb.js → post-analytics-BMJrI81R.js} +1 -1
- package/core/built/admin/assets/post-analytics-header-pU2m9ZuV.js +1 -0
- package/core/built/admin/assets/{post-analytics-provider-B6UynTGb.js → post-analytics-provider-Btml5vJI.js} +1 -1
- package/core/built/admin/assets/{post-share-modal-DFfO93_0.js → post-share-modal-AcUZkbfL.js} +1 -1
- package/core/built/admin/assets/preferences-Ru4CRPHC.js +5 -0
- package/core/built/admin/assets/profile-BNb1oj7D.js +1 -0
- package/core/built/admin/assets/{router-provider-C1R4AZ2o.js → router-provider-BmEZf6c6.js} +1 -1
- package/core/built/admin/assets/select-B0HteHrp.js +1 -0
- package/core/built/admin/assets/settings-B1C9Q3wo.js +4 -0
- package/core/built/admin/assets/{settings-WXNeWyU1.js → settings-BGgk7oCI.js} +1 -1
- package/core/built/admin/assets/{shade-app-B3heOAfz-CGXQwWeO.js → shade-app-B3heOAfz-BhQXxNkT.js} +1 -1
- package/core/built/admin/assets/{share-modal-DsgW3wbg.js → share-modal-BeuydaBf.js} +1 -1
- package/core/built/admin/assets/social-urls-DA2lXrhW.js +8 -0
- package/core/built/admin/assets/{sort-button-Bb_FCl7e.js → sort-button-Df4t2AL8.js} +1 -1
- package/core/built/admin/assets/{source-icon-BeaRxUn9.js → source-icon-ajoaKb41.js} +1 -1
- package/core/built/admin/assets/{stack-xiN0eQ6Z.js → stack-CIfOAAVf.js} +1 -1
- package/core/built/admin/assets/{stats-Bjj_kmJ1.js → stats-C_lfxZAw.js} +1 -1
- package/core/built/admin/assets/{stats-view-BxPbW6K1.js → stats-view-Cxot1iD8.js} +1 -1
- package/core/built/admin/assets/{step-1-B1e3-1F8.js → step-1-ogAA4lDr.js} +1 -1
- package/core/built/admin/assets/{step-2-C5WaeBJo.js → step-2-C5Xini-7.js} +1 -1
- package/core/built/admin/assets/{step-3-B46iVPwu.js → step-3-CZv1FV81.js} +2 -2
- package/core/built/admin/assets/{switch-z5Y6Uzt6.js → switch-CyQcwMAv.js} +1 -1
- package/core/built/admin/assets/{table-CB-4_HBJ.js → table-DFj1wiYv.js} +1 -1
- package/core/built/admin/assets/{tabs-CCEgKYzq.js → tabs-D4y1gqUd.js} +1 -1
- package/core/built/admin/assets/{tags-Cg2VJGmG.js → tags-Dmft-Y4O.js} +1 -1
- package/core/built/admin/assets/{text-DwtjwGkh.js → text-DU9Hv33_.js} +1 -1
- package/core/built/admin/assets/textarea-d9qEkMOP.js +1 -0
- package/core/built/admin/assets/{toggle-group-b3IlxvhV.js → toggle-group-R2QMFvXW.js} +1 -1
- package/core/built/admin/assets/{topic-filter-DAFT87tQ.js → topic-filter-DGDxDalo.js} +1 -1
- package/core/built/admin/assets/{use-analytics-data-S0FTd43s.js → use-analytics-data-C76v4LIp.js} +1 -1
- package/core/built/admin/assets/use-filter-params-WrdhAISv.js +1 -0
- package/core/built/admin/assets/{use-growth-stats-CIaiHOVb.js → use-growth-stats-aNXJOmQr.js} +1 -1
- package/core/built/admin/assets/{use-post-referrers-Cq2vBPrA.js → use-post-referrers-CG0SZioj.js} +1 -1
- package/core/built/admin/assets/{use-reply-chain-data-DBDRtGu-.js → use-reply-chain-data-RLdPKRmS.js} +1 -1
- package/core/built/admin/assets/{use-simple-pagination-CjYNxdwe.js → use-simple-pagination-DgcF69KI.js} +1 -1
- package/core/built/admin/assets/{use-tinybird-query-falHAtuK.js → use-tinybird-query-C1R_Kbmy.js} +1 -1
- package/core/built/admin/assets/{use-tinybird-token-D7-8ND1y.js → use-tinybird-token-C9fPjVM_.js} +1 -1
- package/core/built/admin/assets/{virtual-list-CvnC9zF2.js → virtual-list-BmTUzeoF.js} +1 -1
- package/core/built/admin/assets/{web-B_5GZRvH.js → web-BqW0b0_C.js} +1 -1
- package/core/built/admin/assets/web-Cy5GKMWM.js +2 -0
- package/core/built/admin/index.html +16 -16
- package/core/frontend/services/data/fetch-data.js +10 -5
- package/core/frontend/services/routing/api-adapter.js +115 -0
- package/core/frontend/services/routing/api-adapter.ts +157 -0
- package/core/frontend/services/routing/collection-router.js +5 -3
- package/core/frontend/services/routing/controllers/index.js +1 -1
- package/core/frontend/services/routing/controllers/rss.js +26 -31
- package/core/frontend/services/routing/controllers/rss.ts +66 -0
- package/core/frontend/services/routing/controllers/static.js +8 -7
- package/core/frontend/services/routing/parent-router.js +17 -4
- package/core/frontend/services/routing/permalink-adapter.js +26 -0
- package/core/frontend/services/routing/permalink-adapter.ts +23 -0
- package/core/frontend/services/routing/registry.js +59 -33
- package/core/frontend/services/routing/router-manager.js +9 -13
- package/core/frontend/services/routing/static-routes-router.js +4 -4
- package/core/frontend/services/routing/taxonomy-router.js +6 -2
- package/core/server/data/migrations/versions/6.56/2026-08-03-19-27-51-add-automation-run-step-id-to-automated-email-recipients.js +8 -0
- package/core/server/data/migrations/versions/6.56/2026-08-04-14-42-39-restrict-notification-add-permission-to-administrators.js +12 -0
- package/core/server/data/schema/fixtures/fixtures.json +2 -2
- package/core/server/data/schema/schema.js +1 -0
- package/core/server/models/post.js +10 -1
- package/core/server/services/automations/automations-repository.ts +3 -1
- package/core/server/services/automations/database-automations-repository.js +33 -14
- package/core/server/services/automations/database-automations-repository.ts +41 -15
- package/core/server/services/automations/get-scheduler-idempotency-key.js +13 -0
- package/core/server/services/automations/get-scheduler-idempotency-key.ts +8 -0
- package/core/server/services/automations/poll.js +3 -1
- package/core/server/services/automations/poll.ts +4 -1
- package/core/server/services/automations/service.js +5 -1
- package/core/server/services/automations/service.ts +5 -1
- package/core/server/services/gift-links/CONTEXT.md +9 -0
- package/core/server/services/gifts/CONTEXT.md +55 -0
- package/core/server/services/gifts/README.md +28 -0
- package/core/server/services/gifts/gift-bookshelf-repository.js +65 -45
- package/core/server/services/gifts/gift-bookshelf-repository.ts +203 -74
- package/core/server/services/gifts/gift-checkout-adapter.js +59 -0
- package/core/server/services/gifts/gift-checkout-offer.js +74 -0
- package/core/server/services/gifts/gift-checkout-offer.ts +127 -0
- package/core/server/services/gifts/gift-codec.js +63 -0
- package/core/server/services/gifts/gift-codec.ts +62 -0
- package/core/server/services/gifts/gift-controller.js +6 -31
- package/core/server/services/gifts/gift-controller.ts +6 -69
- package/core/server/services/gifts/gift-email-service.ts +3 -2
- package/core/server/services/gifts/gift-schema.js +34 -0
- package/core/server/services/gifts/gift-schema.ts +39 -0
- package/core/server/services/gifts/gift-service-wrapper.js +13 -11
- package/core/server/services/gifts/gift-service.js +265 -52
- package/core/server/services/gifts/gift-service.ts +431 -97
- package/core/server/services/gifts/gift.ts +16 -39
- package/core/server/services/link-tracking/link-click-repository.js +6 -1
- package/core/server/services/link-tracking/link-click-tracking-service.js +12 -3
- package/core/server/services/member-welcome-emails/member-welcome-email-renderer.js +4 -3
- package/core/server/services/member-welcome-emails/service.js +7 -3
- package/core/server/services/members/api.js +1 -2
- package/core/server/services/members/import-export/import/importer.ts +3 -2
- package/core/server/services/members/import-export/index.js +10 -2
- package/core/server/services/members/import-export/index.ts +14 -4
- package/core/server/services/members/members-api/controllers/router-controller.js +38 -36
- package/core/server/services/members/members-api/members-api.js +13 -7
- package/core/server/services/members/members-api/repositories/event-repository.js +4 -94
- package/core/server/services/members/members-api/services/member-bread-service.js +3 -3
- package/core/server/services/members/members-api/services/payments-service.js +6 -68
- package/core/server/services/members-custom-fields/schema.js +8 -1
- package/core/server/services/members-custom-fields/schema.ts +8 -0
- package/core/server/services/members-custom-fields/values-service.js +118 -2
- package/core/server/services/members-custom-fields/values-service.ts +134 -4
- package/core/server/services/oembed/oembed-service.js +44 -3
- package/core/server/services/posts/posts-service.js +11 -0
- package/core/server/services/route-settings/dynamic-routing-service.js +1 -3
- package/core/server/services/route-settings/route-settings-parser.js +25 -25
- package/core/server/services/route-settings/route-settings-parser.ts +27 -27
- package/core/server/services/route-settings/validation-errors.js +68 -4
- package/core/server/services/route-settings/validation-errors.ts +79 -4
- package/core/server/services/stats/posts-stats-service.js +27 -23
- package/core/server/services/stripe/services/webhook/charge-refunded-event-service.js +1 -1
- package/core/server/services/stripe/services/webhook/checkout-session-event-service.js +16 -4
- package/core/server/services/stripe/stripe-api.js +10 -0
- package/core/server/web/gift-preview/controller.js +10 -25
- package/core/shared/labs.js +2 -2
- package/package.json +10 -9
- package/pnpm-lock.yaml +28 -18
- package/pnpm-workspace.yaml +5 -4
- package/components/tryghost-kg-default-nodes-2.1.3.tgz +0 -0
- package/core/built/admin/assets/activitypub/layout-qx-bUL1k.js +0 -1
- package/core/built/admin/assets/chunk.524.cffd399783a519e404a9.js +0 -25
- package/core/built/admin/assets/chunk.582.eebf0d0b2d202bb746a5.js +0 -27
- package/core/built/admin/assets/comments-DyUSMUdj.js +0 -1
- package/core/built/admin/assets/dist-CjY-f5Z1.js +0 -1
- package/core/built/admin/assets/domain-C0bV2UV8.js +0 -1
- package/core/built/admin/assets/editor-Dp865O-4.js +0 -8
- package/core/built/admin/assets/filter-sources-BV2rnpfA.js +0 -1
- package/core/built/admin/assets/filters-CUXJ2Nm9.js +0 -1
- package/core/built/admin/assets/filters-DfbIWc_l.js +0 -1
- package/core/built/admin/assets/index-9Cw8z3rA.css +0 -1
- package/core/built/admin/assets/index-BGG7NckO.js +0 -67
- package/core/built/admin/assets/input-group-BSgG_lVw.js +0 -1
- package/core/built/admin/assets/labels-CDSUt4J_.js +0 -1
- package/core/built/admin/assets/layout-yQEi2qDM.js +0 -1
- package/core/built/admin/assets/link-helpers-7EYqvvHs.js +0 -1
- package/core/built/admin/assets/member-custom-fields-yOMHyAg9.js +0 -1
- package/core/built/admin/assets/member-detail-BAq7gDaa.js +0 -1
- package/core/built/admin/assets/modals-ReORvWnu.js +0 -31
- package/core/built/admin/assets/newsletter-CJQvtHqN.js +0 -1
- package/core/built/admin/assets/newsletters-B3QQXfGT.js +0 -1
- package/core/built/admin/assets/nql-BsgFMd93.js +0 -1
- package/core/built/admin/assets/overview-CBfePxcr.js +0 -1
- package/core/built/admin/assets/post-analytics-header-Bmc9su6q.js +0 -1
- package/core/built/admin/assets/preferences-DJPfHEGu.js +0 -5
- package/core/built/admin/assets/profile-DqBQp-gT.js +0 -1
- package/core/built/admin/assets/select-C5_xEt5b.js +0 -1
- package/core/built/admin/assets/settings-BwiVIXau.js +0 -4
- package/core/built/admin/assets/social-urls-BQPFEk1_.js +0 -8
- package/core/built/admin/assets/textarea-Bjccvh_E.js +0 -1
- package/core/built/admin/assets/use-filter-params-Gpoq2E1L.js +0 -1
- package/core/built/admin/assets/web-jFYWCKDn.js +0 -2
- package/core/server/services/gifts/gift-repository.js +0 -2
- package/core/server/services/gifts/gift-repository.ts +0 -29
- package/core/server/services/route-settings/activation-bridge.js +0 -174
- package/core/server/services/route-settings/activation-bridge.ts +0 -250
|
@@ -18,6 +18,18 @@ function hasConflictingCheckoutFlowMetadata(metadata) {
|
|
|
18
18
|
return hasStripeMetadataKey(metadata, 'ghost_donation') && hasStripeMetadataKey(metadata, 'ghost_gift');
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
function getStripeResourceId(resource) {
|
|
22
|
+
if (typeof resource === 'string') {
|
|
23
|
+
return resource;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
if (resource && typeof resource === 'object' && typeof resource.id === 'string') {
|
|
27
|
+
return resource.id;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
|
|
21
33
|
/**
|
|
22
34
|
* Handles `checkout.session.completed` webhook events
|
|
23
35
|
*
|
|
@@ -83,17 +95,17 @@ module.exports = class CheckoutSessionEventService {
|
|
|
83
95
|
* @param {import('stripe').Stripe.Checkout.Session} session
|
|
84
96
|
*/
|
|
85
97
|
async handleGiftEvent(session) {
|
|
86
|
-
await this.deps.giftService.
|
|
98
|
+
await this.deps.giftService.completePurchase({
|
|
87
99
|
token: session.metadata?.gift_token,
|
|
88
100
|
buyerEmail: session.customer_details?.email,
|
|
89
|
-
stripeCustomerId: session.customer
|
|
101
|
+
stripeCustomerId: getStripeResourceId(session.customer),
|
|
90
102
|
tierId: session.metadata?.tier_id,
|
|
91
103
|
cadence: session.metadata?.cadence,
|
|
92
|
-
duration: session.metadata?.duration,
|
|
104
|
+
duration: Number(session.metadata?.duration),
|
|
93
105
|
currency: session.currency,
|
|
94
106
|
amount: session.amount_total,
|
|
95
107
|
stripeCheckoutSessionId: session.id,
|
|
96
|
-
stripePaymentIntentId: session.payment_intent
|
|
108
|
+
stripePaymentIntentId: getStripeResourceId(session.payment_intent)
|
|
97
109
|
});
|
|
98
110
|
}
|
|
99
111
|
|
|
@@ -23,6 +23,12 @@ const SEARCH_MODE_RATE_LIMIT = isTesting ? 10_000 : 100;
|
|
|
23
23
|
|
|
24
24
|
const STRIPE_API_VERSION = '2020-08-27';
|
|
25
25
|
|
|
26
|
+
// Stripe's Managed Payments does not support Connect, and some Stripe
|
|
27
|
+
// accounts have it enabled by default for all Checkout Sessions.
|
|
28
|
+
// On those accounts, session creation fails with "Managed Payments cannot be
|
|
29
|
+
// used with Connect" unless it is explicitly disabled per session.
|
|
30
|
+
const MANAGED_PAYMENTS_DISABLED = {enabled: false};
|
|
31
|
+
|
|
26
32
|
/**
|
|
27
33
|
* @typedef {import('stripe').Stripe.Customer} ICustomer
|
|
28
34
|
* @typedef {import('stripe').Stripe.DeletedCustomer} IDeletedCustomer
|
|
@@ -584,6 +590,7 @@ module.exports = class StripeAPI {
|
|
|
584
590
|
|
|
585
591
|
let stripeSessionOptions = {
|
|
586
592
|
payment_method_types: this.PAYMENT_METHOD_TYPES,
|
|
593
|
+
managed_payments: MANAGED_PAYMENTS_DISABLED,
|
|
587
594
|
success_url: options.successUrl || this._config.checkoutSessionSuccessUrl,
|
|
588
595
|
cancel_url: options.cancelUrl || this._config.checkoutSessionCancelUrl,
|
|
589
596
|
// @ts-ignore - we need to update to latest stripe library to correctly use newer features
|
|
@@ -649,6 +656,7 @@ module.exports = class StripeAPI {
|
|
|
649
656
|
|
|
650
657
|
const stripeSessionOptions = {
|
|
651
658
|
mode: 'payment',
|
|
659
|
+
managed_payments: MANAGED_PAYMENTS_DISABLED,
|
|
652
660
|
success_url: successUrl || this._config.checkoutSessionSuccessUrl,
|
|
653
661
|
cancel_url: cancelUrl || this._config.checkoutSessionCancelUrl,
|
|
654
662
|
automatic_tax: {
|
|
@@ -715,6 +723,7 @@ module.exports = class StripeAPI {
|
|
|
715
723
|
|
|
716
724
|
const stripeSessionOptions = {
|
|
717
725
|
mode: 'payment',
|
|
726
|
+
managed_payments: MANAGED_PAYMENTS_DISABLED,
|
|
718
727
|
success_url: successUrl,
|
|
719
728
|
cancel_url: cancelUrl,
|
|
720
729
|
automatic_tax: {
|
|
@@ -761,6 +770,7 @@ module.exports = class StripeAPI {
|
|
|
761
770
|
await this._rateLimitBucket.throttle();
|
|
762
771
|
const session = await this._stripe.checkout.sessions.create({
|
|
763
772
|
mode: 'setup',
|
|
773
|
+
managed_payments: MANAGED_PAYMENTS_DISABLED,
|
|
764
774
|
payment_method_types: this.PAYMENT_METHOD_TYPES,
|
|
765
775
|
success_url: options.successUrl || this._config.checkoutSetupSessionSuccessUrl,
|
|
766
776
|
cancel_url: options.cancelUrl || this._config.checkoutSetupSessionCancelUrl,
|
|
@@ -39,7 +39,6 @@ function escapeHtml(str) {
|
|
|
39
39
|
|
|
40
40
|
async function giftPreview(req, res) {
|
|
41
41
|
const giftService = require('../../services/gifts').service;
|
|
42
|
-
const tiersService = require('../../services/tiers');
|
|
43
42
|
const urlUtils = require('../../../shared/url-utils').default;
|
|
44
43
|
const settingsCache = require('../../../shared/settings-cache');
|
|
45
44
|
|
|
@@ -48,21 +47,14 @@ async function giftPreview(req, res) {
|
|
|
48
47
|
const {token} = req.params;
|
|
49
48
|
const siteTitle = settingsCache.get('title') || 'Ghost';
|
|
50
49
|
|
|
51
|
-
let
|
|
52
|
-
let tier;
|
|
50
|
+
let preview;
|
|
53
51
|
|
|
54
52
|
try {
|
|
55
|
-
|
|
53
|
+
preview = await giftService.getPreview(token);
|
|
56
54
|
|
|
57
|
-
if (!
|
|
55
|
+
if (!preview) {
|
|
58
56
|
throw new errors.NotFoundError({message: `Gift not found for token`});
|
|
59
57
|
}
|
|
60
|
-
|
|
61
|
-
tier = await tiersService.api.read(gift.tierId);
|
|
62
|
-
|
|
63
|
-
if (!tier) {
|
|
64
|
-
throw new errors.NotFoundError({message: `Tier not found for gift: ${gift.id}`});
|
|
65
|
-
}
|
|
66
58
|
} catch (err) {
|
|
67
59
|
logging.warn(`Gift preview: failed to load required gift data, redirecting to homepage`, err);
|
|
68
60
|
|
|
@@ -70,9 +62,9 @@ async function giftPreview(req, res) {
|
|
|
70
62
|
}
|
|
71
63
|
|
|
72
64
|
const ogTitle = getOgTitle({
|
|
73
|
-
cadence:
|
|
74
|
-
duration:
|
|
75
|
-
tierName: tier.name,
|
|
65
|
+
cadence: preview.cadence,
|
|
66
|
+
duration: preview.duration,
|
|
67
|
+
tierName: preview.tier.name,
|
|
76
68
|
siteTitle
|
|
77
69
|
});
|
|
78
70
|
const ogDescription = t('Open this link to redeem your gift.');
|
|
@@ -120,33 +112,26 @@ async function giftPreview(req, res) {
|
|
|
120
112
|
async function giftPreviewImage(req, res) {
|
|
121
113
|
const giftService = require('../../services/gifts').service;
|
|
122
114
|
const settingsCache = require('../../../shared/settings-cache');
|
|
123
|
-
const tiersService = require('../../services/tiers');
|
|
124
115
|
|
|
125
116
|
const accentColor = settingsCache.get('accent_color') || '#15171A';
|
|
126
117
|
const siteTitle = settingsCache.get('title') || 'Ghost';
|
|
127
118
|
const {token} = req.params;
|
|
128
119
|
|
|
129
120
|
try {
|
|
130
|
-
const
|
|
121
|
+
const preview = await giftService.getPreview(token);
|
|
131
122
|
|
|
132
|
-
if (!
|
|
123
|
+
if (!preview) {
|
|
133
124
|
throw new errors.NotFoundError({message: `Gift not found for token`});
|
|
134
125
|
}
|
|
135
126
|
|
|
136
|
-
const tier = await tiersService.api.read(gift.tierId);
|
|
137
|
-
|
|
138
|
-
if (!tier) {
|
|
139
|
-
throw new errors.NotFoundError({message: `Tier not found for gift: ${gift.id}`});
|
|
140
|
-
}
|
|
141
|
-
|
|
142
127
|
const png = await generateGiftPreviewImage({
|
|
143
128
|
accentColor,
|
|
144
129
|
siteTitle,
|
|
145
130
|
tierLabel: t('{tierName} membership', {
|
|
146
|
-
tierName: tier.name,
|
|
131
|
+
tierName: preview.tier.name,
|
|
147
132
|
interpolation: {escapeValue: false}
|
|
148
133
|
}),
|
|
149
|
-
cadenceLabel: getCadenceLabel(
|
|
134
|
+
cadenceLabel: getCadenceLabel(preview.cadence, preview.duration)
|
|
150
135
|
});
|
|
151
136
|
|
|
152
137
|
res.set('Content-Type', 'image/png');
|
package/core/shared/labs.js
CHANGED
|
@@ -64,8 +64,8 @@ const PRIVATE_FEATURES = [
|
|
|
64
64
|
'getHelperDeduplication',
|
|
65
65
|
'memberDetailsReact',
|
|
66
66
|
'membersCustomFields',
|
|
67
|
-
'
|
|
68
|
-
'
|
|
67
|
+
'paywallImprovements',
|
|
68
|
+
'giftSubCustomization'
|
|
69
69
|
];
|
|
70
70
|
|
|
71
71
|
module.exports.GA_KEYS = [...GA_FEATURES];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ghost",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.56.0",
|
|
4
4
|
"description": "The professional publishing platform",
|
|
5
5
|
"author": "Ghost Foundation",
|
|
6
6
|
"homepage": "https://ghost.org",
|
|
@@ -193,21 +193,22 @@
|
|
|
193
193
|
"xml": "1.0.1",
|
|
194
194
|
"zod": "4.4.3",
|
|
195
195
|
"@tryghost/adapter-base-cache": "file:components/tryghost-adapter-base-cache-0.2.0.tgz",
|
|
196
|
+
"@tryghost/adapter-base-redirects": "file:components/tryghost-adapter-base-redirects-0.0.0.tgz",
|
|
196
197
|
"@tryghost/adapter-base-route-settings": "file:components/tryghost-adapter-base-route-settings-0.0.0.tgz",
|
|
197
|
-
"@tryghost/admin-api-schema": "file:components/tryghost-admin-api-schema-0.0.0.tgz",
|
|
198
198
|
"@tryghost/adapter-base-scheduling": "file:components/tryghost-adapter-base-scheduling-0.2.0.tgz",
|
|
199
199
|
"@tryghost/adapter-base-sso": "file:components/tryghost-adapter-base-sso-0.1.1.tgz",
|
|
200
|
-
"@tryghost/
|
|
201
|
-
"@tryghost/kg-card-factory": "file:components/tryghost-kg-card-factory-5.2.3.tgz",
|
|
200
|
+
"@tryghost/admin-api-schema": "file:components/tryghost-admin-api-schema-0.0.0.tgz",
|
|
202
201
|
"@tryghost/i18n": "file:components/tryghost-i18n-0.0.0.tgz",
|
|
203
|
-
"@tryghost/kg-
|
|
204
|
-
"@tryghost/kg-default-nodes": "file:components/tryghost-kg-default-nodes-2.1.3.tgz",
|
|
205
|
-
"@tryghost/kg-html-to-lexical": "file:components/tryghost-kg-html-to-lexical-1.3.3.tgz",
|
|
202
|
+
"@tryghost/kg-card-factory": "file:components/tryghost-kg-card-factory-5.2.3.tgz",
|
|
206
203
|
"@tryghost/kg-converters": "file:components/tryghost-kg-converters-1.2.3.tgz",
|
|
207
|
-
"@tryghost/
|
|
204
|
+
"@tryghost/kg-default-cards": "file:components/tryghost-kg-default-cards-10.3.3.tgz",
|
|
205
|
+
"@tryghost/kg-default-nodes": "file:components/tryghost-kg-default-nodes-2.1.4.tgz",
|
|
208
206
|
"@tryghost/kg-lexical-html-renderer": "file:components/tryghost-kg-lexical-html-renderer-1.4.3.tgz",
|
|
207
|
+
"@tryghost/nql-string": "file:components/tryghost-nql-string-0.0.0.tgz",
|
|
208
|
+
"@tryghost/parse-email-address": "file:components/tryghost-parse-email-address-0.0.0.tgz",
|
|
209
209
|
"ghost-storage-base": "file:components/ghost-storage-base-3.0.0.tgz",
|
|
210
|
-
"@tryghost/
|
|
210
|
+
"@tryghost/custom-field-types": "file:components/tryghost-custom-field-types-0.0.0.tgz",
|
|
211
|
+
"@tryghost/kg-html-to-lexical": "file:components/tryghost-kg-html-to-lexical-1.3.3.tgz"
|
|
211
212
|
},
|
|
212
213
|
"optionalDependencies": {
|
|
213
214
|
"better-sqlite3": "12.11.1"
|
package/pnpm-lock.yaml
CHANGED
|
@@ -59,23 +59,24 @@ overrides:
|
|
|
59
59
|
underscore@>=1.3.2 <1.12.1: ^1.12.1
|
|
60
60
|
'@xmldom/xmldom@<0.8.13': ^0.9.0
|
|
61
61
|
perf-primitives: ^0.0.6
|
|
62
|
-
'@tryghost/adapter-base-cache': file:components/tryghost-adapter-base-cache-0.2.0.tgz
|
|
63
62
|
'@tryghost/adapter-base-redirects': file:components/tryghost-adapter-base-redirects-0.0.0.tgz
|
|
64
|
-
'@tryghost/adapter-base-scheduling': file:components/tryghost-adapter-base-scheduling-0.2.0.tgz
|
|
65
63
|
'@tryghost/adapter-base-route-settings': file:components/tryghost-adapter-base-route-settings-0.0.0.tgz
|
|
64
|
+
'@tryghost/adapter-base-scheduling': file:components/tryghost-adapter-base-scheduling-0.2.0.tgz
|
|
65
|
+
'@tryghost/adapter-base-cache': file:components/tryghost-adapter-base-cache-0.2.0.tgz
|
|
66
66
|
'@tryghost/adapter-base-sso': file:components/tryghost-adapter-base-sso-0.1.1.tgz
|
|
67
67
|
'@tryghost/custom-field-types': file:components/tryghost-custom-field-types-0.0.0.tgz
|
|
68
68
|
'@tryghost/kg-card-factory': file:components/tryghost-kg-card-factory-5.2.3.tgz
|
|
69
69
|
'@tryghost/admin-api-schema': file:components/tryghost-admin-api-schema-0.0.0.tgz
|
|
70
70
|
'@tryghost/kg-converters': file:components/tryghost-kg-converters-1.2.3.tgz
|
|
71
71
|
'@tryghost/kg-utils': file:components/tryghost-kg-utils-1.1.3.tgz
|
|
72
|
-
'@tryghost/
|
|
72
|
+
'@tryghost/nql-string': file:components/tryghost-nql-string-0.0.0.tgz
|
|
73
73
|
'@tryghost/kg-clean-basic-html': file:components/tryghost-kg-clean-basic-html-4.3.3.tgz
|
|
74
|
+
'@tryghost/parse-email-address': file:components/tryghost-parse-email-address-0.0.0.tgz
|
|
74
75
|
ghost-storage-base: file:components/ghost-storage-base-3.0.0.tgz
|
|
75
76
|
'@tryghost/i18n': file:components/tryghost-i18n-0.0.0.tgz
|
|
76
77
|
'@tryghost/kg-markdown-html-renderer': file:components/tryghost-kg-markdown-html-renderer-7.2.3.tgz
|
|
77
78
|
'@tryghost/kg-default-cards': file:components/tryghost-kg-default-cards-10.3.3.tgz
|
|
78
|
-
'@tryghost/kg-default-nodes': file:components/tryghost-kg-default-nodes-2.1.
|
|
79
|
+
'@tryghost/kg-default-nodes': file:components/tryghost-kg-default-nodes-2.1.4.tgz
|
|
79
80
|
'@tryghost/kg-default-transforms': file:components/tryghost-kg-default-transforms-1.3.3.tgz
|
|
80
81
|
'@tryghost/kg-html-to-lexical': file:components/tryghost-kg-html-to-lexical-1.3.3.tgz
|
|
81
82
|
'@tryghost/kg-lexical-html-renderer': file:components/tryghost-kg-lexical-html-renderer-1.4.3.tgz
|
|
@@ -183,8 +184,8 @@ importers:
|
|
|
183
184
|
specifier: file:components/tryghost-kg-default-cards-10.3.3.tgz
|
|
184
185
|
version: file:components/tryghost-kg-default-cards-10.3.3.tgz(encoding@0.1.13)
|
|
185
186
|
'@tryghost/kg-default-nodes':
|
|
186
|
-
specifier: file:components/tryghost-kg-default-nodes-2.1.
|
|
187
|
-
version: file:components/tryghost-kg-default-nodes-2.1.
|
|
187
|
+
specifier: file:components/tryghost-kg-default-nodes-2.1.4.tgz
|
|
188
|
+
version: file:components/tryghost-kg-default-nodes-2.1.4.tgz(@noble/hashes@1.8.0)
|
|
188
189
|
'@tryghost/kg-html-to-lexical':
|
|
189
190
|
specifier: file:components/tryghost-kg-html-to-lexical-1.3.3.tgz
|
|
190
191
|
version: file:components/tryghost-kg-html-to-lexical-1.3.3.tgz(@lexical/selection@0.13.1(lexical@0.13.1))(@lexical/utils@0.13.1(lexical@0.13.1))(@noble/hashes@1.8.0)
|
|
@@ -221,6 +222,9 @@ importers:
|
|
|
221
222
|
'@tryghost/nql-lang':
|
|
222
223
|
specifier: 0.6.6
|
|
223
224
|
version: 0.6.6
|
|
225
|
+
'@tryghost/nql-string':
|
|
226
|
+
specifier: file:components/tryghost-nql-string-0.0.0.tgz
|
|
227
|
+
version: file:components/tryghost-nql-string-0.0.0.tgz
|
|
224
228
|
'@tryghost/parse-email-address':
|
|
225
229
|
specifier: file:components/tryghost-parse-email-address-0.0.0.tgz
|
|
226
230
|
version: file:components/tryghost-parse-email-address-0.0.0.tgz
|
|
@@ -1368,7 +1372,7 @@ packages:
|
|
|
1368
1372
|
resolution: {integrity: sha512-fTAJPbBEOQgb7K2XXt3M9YDpfLrLPpbg/FrNZBOWoz6g4T/jtqPE11EnPVvIan/8dhgjC3uORcCh9kF/JuOmnA==}
|
|
1369
1373
|
|
|
1370
1374
|
'@tryghost/custom-field-types@file:components/tryghost-custom-field-types-0.0.0.tgz':
|
|
1371
|
-
resolution: {integrity: sha512-
|
|
1375
|
+
resolution: {integrity: sha512-Nrx7P7q+4YnIgpv1QiFfe5KRLNdCOH1IcaQXQu9sK3IpCefmCR0h0nmdJcB6gLTcQyCGyL6zf9PteLwY4M31rA==, tarball: file:components/tryghost-custom-field-types-0.0.0.tgz}
|
|
1372
1376
|
version: 0.0.0
|
|
1373
1377
|
|
|
1374
1378
|
'@tryghost/custom-fonts@1.0.11':
|
|
@@ -1444,25 +1448,25 @@ packages:
|
|
|
1444
1448
|
version: 1.2.3
|
|
1445
1449
|
|
|
1446
1450
|
'@tryghost/kg-default-cards@file:components/tryghost-kg-default-cards-10.3.3.tgz':
|
|
1447
|
-
resolution: {integrity: sha512-
|
|
1451
|
+
resolution: {integrity: sha512-K+k2It8l+o0bOSjAtReoEn2Ki1Ze6xADEt16uIwGEzOLCyfTla5jyaCXsIAh2fKpNiJUAUgTe13tNY/icbkmpg==, tarball: file:components/tryghost-kg-default-cards-10.3.3.tgz}
|
|
1448
1452
|
version: 10.3.3
|
|
1449
1453
|
engines: {node: ^22.13.1 || ^24.0.0}
|
|
1450
1454
|
|
|
1451
|
-
'@tryghost/kg-default-nodes@file:components/tryghost-kg-default-nodes-2.1.
|
|
1452
|
-
resolution: {integrity: sha512-
|
|
1453
|
-
version: 2.1.
|
|
1455
|
+
'@tryghost/kg-default-nodes@file:components/tryghost-kg-default-nodes-2.1.4.tgz':
|
|
1456
|
+
resolution: {integrity: sha512-d6hwQiz3oumlEHLhVx/FQpUXXl8eNpSFEkLlb7YgODM6J5uUp0b3fLFVoU1xXBALjBplEFHb4Gn5YSKh6zEUAQ==, tarball: file:components/tryghost-kg-default-nodes-2.1.4.tgz}
|
|
1457
|
+
version: 2.1.4
|
|
1454
1458
|
engines: {node: ^22.13.1 || ^24.0.0}
|
|
1455
1459
|
|
|
1456
1460
|
'@tryghost/kg-default-transforms@file:components/tryghost-kg-default-transforms-1.3.3.tgz':
|
|
1457
|
-
resolution: {integrity: sha512-
|
|
1461
|
+
resolution: {integrity: sha512-1XkdffnYETy7ZXvHCdmyr/trM/wtUoju29FSF8PNKj65/YVdlb56BSdl38C6MD5TsYxAfjULe1BMn/OgEskhXQ==, tarball: file:components/tryghost-kg-default-transforms-1.3.3.tgz}
|
|
1458
1462
|
version: 1.3.3
|
|
1459
1463
|
|
|
1460
1464
|
'@tryghost/kg-html-to-lexical@file:components/tryghost-kg-html-to-lexical-1.3.3.tgz':
|
|
1461
|
-
resolution: {integrity: sha512-
|
|
1465
|
+
resolution: {integrity: sha512-WfcWr11CFtT4tst1D9WP3tPSNE79F1U0NtPpqucEn+y1Slruxxw5kdnRY8HRYeyPwfXE2Rr1iVnqP9omSGSOeA==, tarball: file:components/tryghost-kg-html-to-lexical-1.3.3.tgz}
|
|
1462
1466
|
version: 1.3.3
|
|
1463
1467
|
|
|
1464
1468
|
'@tryghost/kg-lexical-html-renderer@file:components/tryghost-kg-lexical-html-renderer-1.4.3.tgz':
|
|
1465
|
-
resolution: {integrity: sha512-
|
|
1469
|
+
resolution: {integrity: sha512-AnyKgGOxkq8nxQixpgJwSWo24zIx0WB6ZIRTKYA+0RLQft7LZGoalKNUQfvONQy++m4Y9EAqy21df8VGQvsqIA==, tarball: file:components/tryghost-kg-lexical-html-renderer-1.4.3.tgz}
|
|
1466
1470
|
version: 1.4.3
|
|
1467
1471
|
|
|
1468
1472
|
'@tryghost/kg-markdown-html-renderer@file:components/tryghost-kg-markdown-html-renderer-7.2.3.tgz':
|
|
@@ -1501,6 +1505,10 @@ packages:
|
|
|
1501
1505
|
'@tryghost/nql-lang@0.6.6':
|
|
1502
1506
|
resolution: {integrity: sha512-ZWEUN92fVnxavf+matwASvi7pom0i1jhAtNCuoCN9f3ShtyrVm92m1SfvY+x/XuEvbefXAzCGzSEMcaQ4cqoXw==}
|
|
1503
1507
|
|
|
1508
|
+
'@tryghost/nql-string@file:components/tryghost-nql-string-0.0.0.tgz':
|
|
1509
|
+
resolution: {integrity: sha512-sbvE9JUjBRUHOOMMLQj9X+a2QjdCDbL6T9+/j07XA2mFSIi9kHNMcvTxP5KkxB07ANRYvSzLsxicFQFis2wu0w==, tarball: file:components/tryghost-nql-string-0.0.0.tgz}
|
|
1510
|
+
version: 0.0.0
|
|
1511
|
+
|
|
1504
1512
|
'@tryghost/nql@0.13.1':
|
|
1505
1513
|
resolution: {integrity: sha512-TQRDur1miWd2ORa3XOhtw8Na8AUj/8h+epNMDgiutOyAH/RTw+d+ksLndMnm/Z9MhnKg7kFy7398peKZ7nF8bQ==}
|
|
1506
1514
|
|
|
@@ -6490,7 +6498,7 @@ snapshots:
|
|
|
6490
6498
|
transitivePeerDependencies:
|
|
6491
6499
|
- encoding
|
|
6492
6500
|
|
|
6493
|
-
'@tryghost/kg-default-nodes@file:components/tryghost-kg-default-nodes-2.1.
|
|
6501
|
+
'@tryghost/kg-default-nodes@file:components/tryghost-kg-default-nodes-2.1.4.tgz(@noble/hashes@1.8.0)':
|
|
6494
6502
|
dependencies:
|
|
6495
6503
|
'@lexical/clipboard': 0.13.1(lexical@0.13.1)
|
|
6496
6504
|
'@lexical/rich-text': 0.13.1(@lexical/clipboard@0.13.1(lexical@0.13.1))(@lexical/selection@0.13.1(lexical@0.13.1))(@lexical/utils@0.13.1(lexical@0.13.1))(lexical@0.13.1)
|
|
@@ -6515,7 +6523,7 @@ snapshots:
|
|
|
6515
6523
|
'@lexical/list': 0.13.1(lexical@0.13.1)
|
|
6516
6524
|
'@lexical/rich-text': 0.13.1(@lexical/clipboard@0.13.1(lexical@0.13.1))(@lexical/selection@0.13.1(lexical@0.13.1))(@lexical/utils@0.13.1(lexical@0.13.1))(lexical@0.13.1)
|
|
6517
6525
|
'@lexical/utils': 0.13.1(lexical@0.13.1)
|
|
6518
|
-
'@tryghost/kg-default-nodes': file:components/tryghost-kg-default-nodes-2.1.
|
|
6526
|
+
'@tryghost/kg-default-nodes': file:components/tryghost-kg-default-nodes-2.1.4.tgz(@noble/hashes@1.8.0)
|
|
6519
6527
|
lexical: 0.13.1
|
|
6520
6528
|
transitivePeerDependencies:
|
|
6521
6529
|
- '@lexical/clipboard'
|
|
@@ -6531,7 +6539,7 @@ snapshots:
|
|
|
6531
6539
|
'@lexical/link': 0.13.1(lexical@0.13.1)
|
|
6532
6540
|
'@lexical/list': 0.13.1(lexical@0.13.1)
|
|
6533
6541
|
'@lexical/rich-text': 0.13.1(@lexical/clipboard@0.13.1(lexical@0.13.1))(@lexical/selection@0.13.1(lexical@0.13.1))(@lexical/utils@0.13.1(lexical@0.13.1))(lexical@0.13.1)
|
|
6534
|
-
'@tryghost/kg-default-nodes': file:components/tryghost-kg-default-nodes-2.1.
|
|
6542
|
+
'@tryghost/kg-default-nodes': file:components/tryghost-kg-default-nodes-2.1.4.tgz(@noble/hashes@1.8.0)
|
|
6535
6543
|
'@tryghost/kg-default-transforms': file:components/tryghost-kg-default-transforms-1.3.3.tgz(@lexical/clipboard@0.13.1(lexical@0.13.1))(@lexical/selection@0.13.1(lexical@0.13.1))(@noble/hashes@1.8.0)
|
|
6536
6544
|
jsdom: 29.1.1(@noble/hashes@1.8.0)
|
|
6537
6545
|
lexical: 0.13.1
|
|
@@ -6548,7 +6556,7 @@ snapshots:
|
|
|
6548
6556
|
'@lexical/link': 0.13.1(lexical@0.13.1)
|
|
6549
6557
|
'@lexical/list': 0.13.1(lexical@0.13.1)
|
|
6550
6558
|
'@lexical/rich-text': 0.13.1(@lexical/clipboard@0.13.1(lexical@0.13.1))(@lexical/selection@0.13.1(lexical@0.13.1))(@lexical/utils@0.13.1(lexical@0.13.1))(lexical@0.13.1)
|
|
6551
|
-
'@tryghost/kg-default-nodes': file:components/tryghost-kg-default-nodes-2.1.
|
|
6559
|
+
'@tryghost/kg-default-nodes': file:components/tryghost-kg-default-nodes-2.1.4.tgz(@noble/hashes@1.8.0)
|
|
6552
6560
|
'@tryghost/kg-default-transforms': file:components/tryghost-kg-default-transforms-1.3.3.tgz(@lexical/clipboard@0.13.1(lexical@0.13.1))(@lexical/selection@0.13.1(lexical@0.13.1))(@noble/hashes@1.8.0)
|
|
6553
6561
|
'@tryghost/kg-utils': file:components/tryghost-kg-utils-1.1.3.tgz
|
|
6554
6562
|
jsdom: 29.1.1(@noble/hashes@1.8.0)
|
|
@@ -6699,6 +6707,8 @@ snapshots:
|
|
|
6699
6707
|
dependencies:
|
|
6700
6708
|
date-fns: 2.30.0
|
|
6701
6709
|
|
|
6710
|
+
'@tryghost/nql-string@file:components/tryghost-nql-string-0.0.0.tgz': {}
|
|
6711
|
+
|
|
6702
6712
|
'@tryghost/nql@0.13.1(supports-color@10.2.2)':
|
|
6703
6713
|
dependencies:
|
|
6704
6714
|
'@tryghost/mongo-knex': 0.10.1(supports-color@10.2.2)
|
package/pnpm-workspace.yaml
CHANGED
|
@@ -220,23 +220,24 @@ overrides:
|
|
|
220
220
|
underscore@>=1.3.2 <1.12.1: ^1.12.1
|
|
221
221
|
'@xmldom/xmldom@<0.8.13': ^0.9.0
|
|
222
222
|
perf-primitives: ^0.0.6
|
|
223
|
-
'@tryghost/adapter-base-cache': file:components/tryghost-adapter-base-cache-0.2.0.tgz
|
|
224
223
|
'@tryghost/adapter-base-redirects': file:components/tryghost-adapter-base-redirects-0.0.0.tgz
|
|
225
|
-
'@tryghost/adapter-base-scheduling': file:components/tryghost-adapter-base-scheduling-0.2.0.tgz
|
|
226
224
|
'@tryghost/adapter-base-route-settings': file:components/tryghost-adapter-base-route-settings-0.0.0.tgz
|
|
225
|
+
'@tryghost/adapter-base-scheduling': file:components/tryghost-adapter-base-scheduling-0.2.0.tgz
|
|
226
|
+
'@tryghost/adapter-base-cache': file:components/tryghost-adapter-base-cache-0.2.0.tgz
|
|
227
227
|
'@tryghost/adapter-base-sso': file:components/tryghost-adapter-base-sso-0.1.1.tgz
|
|
228
228
|
'@tryghost/custom-field-types': file:components/tryghost-custom-field-types-0.0.0.tgz
|
|
229
229
|
'@tryghost/kg-card-factory': file:components/tryghost-kg-card-factory-5.2.3.tgz
|
|
230
230
|
'@tryghost/admin-api-schema': file:components/tryghost-admin-api-schema-0.0.0.tgz
|
|
231
231
|
'@tryghost/kg-converters': file:components/tryghost-kg-converters-1.2.3.tgz
|
|
232
232
|
'@tryghost/kg-utils': file:components/tryghost-kg-utils-1.1.3.tgz
|
|
233
|
-
'@tryghost/
|
|
233
|
+
'@tryghost/nql-string': file:components/tryghost-nql-string-0.0.0.tgz
|
|
234
234
|
'@tryghost/kg-clean-basic-html': file:components/tryghost-kg-clean-basic-html-4.3.3.tgz
|
|
235
|
+
'@tryghost/parse-email-address': file:components/tryghost-parse-email-address-0.0.0.tgz
|
|
235
236
|
ghost-storage-base: file:components/ghost-storage-base-3.0.0.tgz
|
|
236
237
|
'@tryghost/i18n': file:components/tryghost-i18n-0.0.0.tgz
|
|
237
238
|
'@tryghost/kg-markdown-html-renderer': file:components/tryghost-kg-markdown-html-renderer-7.2.3.tgz
|
|
238
239
|
'@tryghost/kg-default-cards': file:components/tryghost-kg-default-cards-10.3.3.tgz
|
|
239
|
-
'@tryghost/kg-default-nodes': file:components/tryghost-kg-default-nodes-2.1.
|
|
240
|
+
'@tryghost/kg-default-nodes': file:components/tryghost-kg-default-nodes-2.1.4.tgz
|
|
240
241
|
'@tryghost/kg-default-transforms': file:components/tryghost-kg-default-transforms-1.3.3.tgz
|
|
241
242
|
'@tryghost/kg-html-to-lexical': file:components/tryghost-kg-html-to-lexical-1.3.3.tgz
|
|
242
243
|
'@tryghost/kg-lexical-html-renderer': file:components/tryghost-kg-lexical-html-renderer-1.4.3.tgz
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./routes-CLH3OVTP.js";
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
var __ember_auto_import__;(()=>{var e,r={32186(e){"use strict"
|
|
2
|
-
e.exports=require("@ember/test-waiters")},80032(e){"use strict"
|
|
3
|
-
e.exports=require("ember-tracked-storage-polyfill")},21597(e,r,n){e.exports=function(){var e=_eai_d,r=_eai_r
|
|
4
|
-
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(99878))}),e("@sentry/core",[],function(){return t(n(4156))}),e("@sentry/integrations",[],function(){return t(n(53451))}),e("@sentry/replay",[],function(){return t(n(90478))}),e("@sentry/utils",[],function(){return t(n(76333))}),e("@tryghost/admin-x-framework/hooks",[],function(){return t(n(88950))}),e("@tryghost/color-utils",[],function(){return t(n(6715))}),e("@tryghost/kg-clean-basic-html",[],function(){return t(n(91075))}),e("@tryghost/kg-converters",[],function(){return t(n(26942))}),e("@tryghost/limit-service",[],function(){return t(n(43031))}),e("@tryghost/nql",[],function(){return t(n(53350))}),e("@tryghost/string",[],function(){return t(n(57671))}),e("@tryghost/timezone-data",[],function(){return t(n(86265))}),e("dompurify",[],function(){return t(n(82806))}),e("element-resize-detector",[],function(){return t(n(44535))}),e("ember-assign-helper/helpers/assign",[],function(){return t(n(85780))}),e("ember-css-transitions/modifiers/css-transition",["@ember/test-waiters"],function(){return t(n(38366))}),e("ember-keyboard/helpers/if-key.js",[],function(){return t(n(61021))}),e("ember-keyboard/helpers/on-key.js",[],function(){return t(n(9723))}),e("ember-keyboard/modifiers/on-key.js",[],function(){return t(n(88250))}),e("ember-keyboard/services/keyboard.js",[],function(){return t(n(75841))}),e("ember-modifier",[],function(){return t(n(76092))}),e("ember-moment/helpers/-base",[],function(){return t(n(92030))}),e("ember-moment/helpers/is-after",[],function(){return t(n(50205))}),e("ember-moment/helpers/is-before",[],function(){return t(n(62752))}),e("ember-moment/helpers/is-between",[],function(){return t(n(92583))}),e("ember-moment/helpers/is-same",[],function(){return t(n(66137))}),e("ember-moment/helpers/is-same-or-after",[],function(){return t(n(26468))}),e("ember-moment/helpers/is-same-or-before",[],function(){return t(n(79463))}),e("ember-moment/helpers/moment",[],function(){return t(n(13958))}),e("ember-moment/helpers/moment-add",[],function(){return t(n(58184))}),e("ember-moment/helpers/moment-calendar",[],function(){return t(n(69897))}),e("ember-moment/helpers/moment-diff",[],function(){return t(n(9988))}),e("ember-moment/helpers/moment-duration",[],function(){return t(n(85151))}),e("ember-moment/helpers/moment-format",[],function(){return t(n(74368))}),e("ember-moment/helpers/moment-from",[],function(){return t(n(59519))}),e("ember-moment/helpers/moment-from-now",[],function(){return t(n(1674))}),e("ember-moment/helpers/moment-subtract",[],function(){return t(n(65107))}),e("ember-moment/helpers/moment-to",[],function(){return t(n(15098))}),e("ember-moment/helpers/moment-to-date",[],function(){return t(n(27847))}),e("ember-moment/helpers/moment-to-now",[],function(){return t(n(82163))}),e("ember-moment/helpers/now",[],function(){return t(n(53548))}),e("ember-moment/helpers/unix",[],function(){return t(n(97456))}),e("ember-moment/helpers/utc",[],function(){return t(n(40574))}),e("ember-moment/services/moment",[],function(){return t(n(23807))}),e("fast-deep-equal",[],function(){return t(n(33118))}),e("flexsearch",[],function(){return t(n(27667))}),e("focus-trap",[],function(){return t(n(70193))}),e("intersection-observer-admin",[],function(){return t(n(55546))}),e("microdiff",[],function(){return t(n(75917))}),e("moment-timezone",[],function(){return t(n(74749))}),e("raf-pool",[],function(){return t(n(97068))}),e("react",[],function(){return t(n(53270))}),e("react-dom",[],function(){return t(n(70623))}),e("react-dom/client",[],function(){return t(n(34504))}),e("react/jsx-runtime",[],function(){return t(n(88902))}),e("tooltip.js",[],function(){return t(n(92294))}),e("tracked-built-ins",["ember-tracked-storage-polyfill"],function(){return t(n(1820))}),e("validator",[],function(){return t(n(50912))}),e("_eai_dyn_@sentry/browser",[],function(){return Promise.resolve().then(n.bind(n,99878))})}()}},n={}
|
|
5
|
-
function t(e){var o=n[e]
|
|
6
|
-
if(void 0!==o)return o.exports
|
|
7
|
-
var i=n[e]={id:e,loaded:!1,exports:{}}
|
|
8
|
-
return r[e].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}t.m=r,t.c=n,e=[],t.O=(r,n,o,i)=>{if(!n){var u=1/0
|
|
9
|
-
for(f=0;f<e.length;f++){for(var[n,o,i]=e[f],m=!0,s=0;s<n.length;s++)(!1&i||u>=i)&&Object.keys(t.O).every(e=>t.O[e](n[s]))?n.splice(s--,1):(m=!1,i<u&&(u=i))
|
|
10
|
-
if(m){e.splice(f--,1)
|
|
11
|
-
var c=o()
|
|
12
|
-
void 0!==c&&(r=c)}}return r}i=i||0
|
|
13
|
-
for(var f=e.length;f>0&&e[f-1][2]>i;f--)e[f]=e[f-1]
|
|
14
|
-
e[f]=[n,o,i]},t.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e
|
|
15
|
-
return t.d(r,{a:r}),r},t.d=(e,r)=>{for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},t.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e={524:0}
|
|
16
|
-
t.O.j=r=>0===e[r]
|
|
17
|
-
var r=(r,n)=>{var o,i,[u,m,s]=n,c=0
|
|
18
|
-
if(u.some(r=>0!==e[r])){for(o in m)t.o(m,o)&&(t.m[o]=m[o])
|
|
19
|
-
if(s)var f=s(t)}for(r&&r(n);c<u.length;c++)i=u[c],t.o(e,i)&&e[i]&&e[i][0](),e[i]=0
|
|
20
|
-
return t.O(f)},n=globalThis.webpackChunk_ember_auto_import_=globalThis.webpackChunk_ember_auto_import_||[]
|
|
21
|
-
n.forEach(r.bind(null,0)),n.push=r.bind(null,n.push.bind(n))})(),t.O(void 0,[211,481],()=>t(t.s=89800))
|
|
22
|
-
var o=t.O(void 0,[211,481],()=>t(t.s=21597))
|
|
23
|
-
o=t.O(o),__ember_auto_import__=o})()
|
|
24
|
-
|
|
25
|
-
//# sourceMappingURL=chunk.524.cffd399783a519e404a9.map
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
var __ember_auto_import__;(()=>{var e,r={32186(e){"use strict"
|
|
2
|
-
e.exports=require("@ember/test-waiters")},80032(e){"use strict"
|
|
3
|
-
e.exports=require("ember-tracked-storage-polyfill")},21597(e,r,t){e.exports=function(){var e=_eai_d,r=_eai_r
|
|
4
|
-
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(99878))}),e("@sentry/core",EAI_DISCOVERED_EXTERNALS("@sentry/core"),function(){return n(t(4156))}),e("@sentry/integrations",EAI_DISCOVERED_EXTERNALS("@sentry/integrations"),function(){return n(t(53451))}),e("@sentry/replay",EAI_DISCOVERED_EXTERNALS("@sentry/replay"),function(){return n(t(90478))}),e("@sentry/utils",EAI_DISCOVERED_EXTERNALS("@sentry/utils"),function(){return n(t(76333))}),e("@tryghost/admin-x-framework/hooks",EAI_DISCOVERED_EXTERNALS("@tryghost/admin-x-framework/hooks"),function(){return n(t(88950))}),e("@tryghost/color-utils",EAI_DISCOVERED_EXTERNALS("@tryghost/color-utils"),function(){return n(t(6715))}),e("@tryghost/kg-clean-basic-html",EAI_DISCOVERED_EXTERNALS("@tryghost/kg-clean-basic-html"),function(){return n(t(91075))}),e("@tryghost/kg-converters",EAI_DISCOVERED_EXTERNALS("@tryghost/kg-converters"),function(){return n(t(26942))}),e("@tryghost/limit-service",EAI_DISCOVERED_EXTERNALS("@tryghost/limit-service"),function(){return n(t(43031))}),e("@tryghost/nql",EAI_DISCOVERED_EXTERNALS("@tryghost/nql"),function(){return n(t(53350))}),e("@tryghost/string",EAI_DISCOVERED_EXTERNALS("@tryghost/string"),function(){return n(t(57671))}),e("@tryghost/timezone-data",EAI_DISCOVERED_EXTERNALS("@tryghost/timezone-data"),function(){return n(t(86265))}),e("dompurify",EAI_DISCOVERED_EXTERNALS("dompurify"),function(){return n(t(82806))}),e("element-resize-detector",EAI_DISCOVERED_EXTERNALS("element-resize-detector"),function(){return n(t(44535))}),e("ember-assign-helper/helpers/assign",EAI_DISCOVERED_EXTERNALS("ember-assign-helper/helpers/assign"),function(){return n(t(85780))}),e("ember-css-transitions/modifiers/css-transition",EAI_DISCOVERED_EXTERNALS("ember-css-transitions/modifiers/css-transition"),function(){return n(t(38366))}),e("ember-keyboard/helpers/if-key.js",EAI_DISCOVERED_EXTERNALS("ember-keyboard/helpers/if-key.js"),function(){return n(t(61021))}),e("ember-keyboard/helpers/on-key.js",EAI_DISCOVERED_EXTERNALS("ember-keyboard/helpers/on-key.js"),function(){return n(t(9723))}),e("ember-keyboard/modifiers/on-key.js",EAI_DISCOVERED_EXTERNALS("ember-keyboard/modifiers/on-key.js"),function(){return n(t(88250))}),e("ember-keyboard/services/keyboard.js",EAI_DISCOVERED_EXTERNALS("ember-keyboard/services/keyboard.js"),function(){return n(t(75841))}),e("ember-modifier",EAI_DISCOVERED_EXTERNALS("ember-modifier"),function(){return n(t(76092))}),e("ember-moment/helpers/-base",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/-base"),function(){return n(t(92030))}),e("ember-moment/helpers/is-after",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/is-after"),function(){return n(t(50205))}),e("ember-moment/helpers/is-before",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/is-before"),function(){return n(t(62752))}),e("ember-moment/helpers/is-between",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/is-between"),function(){return n(t(92583))}),e("ember-moment/helpers/is-same",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/is-same"),function(){return n(t(66137))}),e("ember-moment/helpers/is-same-or-after",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/is-same-or-after"),function(){return n(t(26468))}),e("ember-moment/helpers/is-same-or-before",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/is-same-or-before"),function(){return n(t(79463))}),e("ember-moment/helpers/moment",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/moment"),function(){return n(t(13958))}),e("ember-moment/helpers/moment-add",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/moment-add"),function(){return n(t(58184))}),e("ember-moment/helpers/moment-calendar",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/moment-calendar"),function(){return n(t(69897))}),e("ember-moment/helpers/moment-diff",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/moment-diff"),function(){return n(t(9988))}),e("ember-moment/helpers/moment-duration",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/moment-duration"),function(){return n(t(85151))}),e("ember-moment/helpers/moment-format",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/moment-format"),function(){return n(t(74368))}),e("ember-moment/helpers/moment-from",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/moment-from"),function(){return n(t(59519))}),e("ember-moment/helpers/moment-from-now",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/moment-from-now"),function(){return n(t(1674))}),e("ember-moment/helpers/moment-subtract",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/moment-subtract"),function(){return n(t(65107))}),e("ember-moment/helpers/moment-to",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/moment-to"),function(){return n(t(15098))}),e("ember-moment/helpers/moment-to-date",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/moment-to-date"),function(){return n(t(27847))}),e("ember-moment/helpers/moment-to-now",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/moment-to-now"),function(){return n(t(82163))}),e("ember-moment/helpers/now",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/now"),function(){return n(t(53548))}),e("ember-moment/helpers/unix",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/unix"),function(){return n(t(97456))}),e("ember-moment/helpers/utc",EAI_DISCOVERED_EXTERNALS("ember-moment/helpers/utc"),function(){return n(t(40574))}),e("ember-moment/services/moment",EAI_DISCOVERED_EXTERNALS("ember-moment/services/moment"),function(){return n(t(23807))}),e("fast-deep-equal",EAI_DISCOVERED_EXTERNALS("fast-deep-equal"),function(){return n(t(33118))}),e("flexsearch",EAI_DISCOVERED_EXTERNALS("flexsearch"),function(){return n(t(27667))}),e("focus-trap",EAI_DISCOVERED_EXTERNALS("focus-trap"),function(){return n(t(70193))}),e("intersection-observer-admin",EAI_DISCOVERED_EXTERNALS("intersection-observer-admin"),function(){return n(t(55546))}),e("microdiff",EAI_DISCOVERED_EXTERNALS("microdiff"),function(){return n(t(75917))}),e("moment-timezone",EAI_DISCOVERED_EXTERNALS("moment-timezone"),function(){return n(t(74749))}),e("raf-pool",EAI_DISCOVERED_EXTERNALS("raf-pool"),function(){return n(t(97068))}),e("react",EAI_DISCOVERED_EXTERNALS("react"),function(){return n(t(53270))}),e("react-dom",EAI_DISCOVERED_EXTERNALS("react-dom"),function(){return n(t(70623))}),e("react-dom/client",EAI_DISCOVERED_EXTERNALS("react-dom/client"),function(){return n(t(34504))}),e("react/jsx-runtime",EAI_DISCOVERED_EXTERNALS("react/jsx-runtime"),function(){return n(t(88902))}),e("tooltip.js",EAI_DISCOVERED_EXTERNALS("tooltip.js"),function(){return n(t(92294))}),e("tracked-built-ins",EAI_DISCOVERED_EXTERNALS("tracked-built-ins"),function(){return n(t(1820))}),e("validator",EAI_DISCOVERED_EXTERNALS("validator"),function(){return n(t(50912))}),e("_eai_dyn_@sentry/browser",[],function(){return Promise.resolve().then(t.bind(t,99878))})}()},42579(e,r,t){e.exports=function(){_eai_d
|
|
5
|
-
var e=_eai_r
|
|
6
|
-
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(21597)}()}},t={}
|
|
7
|
-
function n(e){var o=t[e]
|
|
8
|
-
if(void 0!==o)return o.exports
|
|
9
|
-
var E=t[e]={id:e,loaded:!1,exports:{}}
|
|
10
|
-
return r[e].call(E.exports,E,E.exports,n),E.loaded=!0,E.exports}n.m=r,n.c=t,e=[],n.O=(r,t,o,E)=>{if(!t){var m=1/0
|
|
11
|
-
for(_=0;_<e.length;_++){for(var[t,o,E]=e[_],i=!0,s=0;s<t.length;s++)(!1&E||m>=E)&&Object.keys(n.O).every(e=>n.O[e](t[s]))?t.splice(s--,1):(i=!1,E<m&&(m=E))
|
|
12
|
-
if(i){e.splice(_--,1)
|
|
13
|
-
var u=o()
|
|
14
|
-
void 0!==u&&(r=u)}}return r}E=E||0
|
|
15
|
-
for(var _=e.length;_>0&&e[_-1][2]>E;_--)e[_]=e[_-1]
|
|
16
|
-
e[_]=[t,o,E]},n.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e
|
|
17
|
-
return n.d(r,{a:r}),r},n.d=(e,r)=>{for(var t in r)n.o(r,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},n.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),n.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e={524:0,582:0}
|
|
18
|
-
n.O.j=r=>0===e[r]
|
|
19
|
-
var r=(r,t)=>{var o,E,[m,i,s]=t,u=0
|
|
20
|
-
if(m.some(r=>0!==e[r])){for(o in i)n.o(i,o)&&(n.m[o]=i[o])
|
|
21
|
-
if(s)var _=s(n)}for(r&&r(t);u<m.length;u++)E=m[u],n.o(e,E)&&e[E]&&e[E][0](),e[E]=0
|
|
22
|
-
return n.O(_)},t=globalThis.webpackChunk_ember_auto_import_=globalThis.webpackChunk_ember_auto_import_||[]
|
|
23
|
-
t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),n.O(void 0,[211,481],()=>n(n.s=89800))
|
|
24
|
-
var o=n.O(void 0,[211,481],()=>n(n.s=42579))
|
|
25
|
-
o=n.O(o),__ember_auto_import__=o})()
|
|
26
|
-
|
|
27
|
-
//# sourceMappingURL=chunk.582.eebf0d0b2d202bb746a5.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-Bb3IsNbi.js";import{t as n}from"./jsx-runtime-DX3WBWVO.js";import{g as r}from"./framework-provider-CmtnPXIT.js";import{i,n as a,t as o}from"./hooks-CixO01lL.js";import{t as s}from"./nql-BsgFMd93.js";import{g as c,t as l}from"./chunk-KS7C4IRE-DG9HTHQ3.js";import{c as u,f as d,m as f}from"./dist-DGzPJ_bO.js";import{t as p}from"./box-BWbhXh21.js";import{t as m}from"./container-BYz2Ed39.js";import{i as h,n as g,r as _,t as v}from"./tabs-CCEgKYzq.js";import{n as y,r as b}from"./filters-CUXJ2Nm9.js";import{t as x}from"./checkbox-CWa28lgO.js";import{t as S}from"./empty-indicator-oX1u1Pkn.js";import{t as C}from"./label-DS8Mi6G5.js";import{$n as w,$o as T,Aa as E,Ao as D,Ar as O,Cr as k,Dr as ee,Eo as te,Er as A,Fn as ne,Fo as re,Ga as ie,In as ae,Io as oe,Ir as j,Ja as se,Jn as ce,Jr as le,Lo as ue,Ni as de,O as fe,Or as M,Po as pe,Qi as me,Qn as he,Qr as N,Rn as ge,Sr as _e,Vr as P,Wa as F,Xr as ve,Zi as ye,Zn as be,bo as xe,br as I,ii as Se,j as Ce,ja as L,jo as we,ki as Te,kn as Ee,kr as R,m as De,ns as Oe,qa as ke,qo as Ae,rr as z,us as je,wo as Me,wr as B,xa as Ne,xr as V,zn as Pe,zo as H}from"./index-BGG7NckO.js";import{t as U}from"./page-header-B3Wb9Jqv.js";import{C as Fe,_ as Ie,a as Le,b as Re,c as ze,f as W,g as Be,h as Ve,i as He,l as Ue,m as We,n as Ge,o as Ke,r as qe,s as Je,t as Ye,u as Xe,v as Ze,w as Qe,x as $e,y as et}from"./filters-DfbIWc_l.js";import{t as G}from"./list-page-B6ANtzkd.js";import{c as tt,n as nt,r as rt}from"./filter-sources-BV2rnpfA.js";import{i as it,n as at,r as ot,t as st}from"./virtual-list-CvnC9zF2.js";import{t as ct}from"./get-site-timezone-HgL0jI_F.js";var K=e(t(),1),q=Ye({status:{operators:[`is`],ui:{label:`Status`,type:`select`,searchable:!1,hideOperatorSelect:!0},options:[{value:`published`,label:`Published`},{value:`hidden`,label:`Hidden`}],codec:W()},created_at:Fe({operators:Ve,ui:{label:`Date`,defaultOperator:Ie,type:`date`},codec:Xe()}),body:{operators:[`contains`,`does-not-contain`],parseKeys:[`html`],ui:{label:`Text`,type:`text`,placeholder:`Search comment text...`,defaultOperator:`contains`,className:`w-full max-w-48`,popoverContentClassName:`w-full max-w-48`},codec:We({field:`html`})},post:{operators:[`is`,`is-not`],parseKeys:[`post_id`],ui:{label:`Post`,type:`select`,searchable:!0,className:`w-full max-w-80`,popoverContentClassName:`w-full max-w-[calc(100vw-32px)] max-w-80`},codec:W({field:`post_id`})},author:{operators:[`is`,`is-not`],parseKeys:[`member_id`],ui:{label:`Author`,type:`select`,searchable:!0,className:`w-80`,popoverContentClassName:`w-80`},codec:W({field:`member_id`})},reported:{operators:[`is`],parseKeys:[`count.reports`],ui:{label:`Reported`,type:`select`,searchable:!1,hideOperatorSelect:!0},options:[{value:`true`,label:`Yes`},{value:`false`,label:`No`}],codec:{parse(e,t){let n=Ze(e);return!n||n.field!==`count.reports`?null:n.operator===`$eq`&&n.value===0?{field:t.key,operator:`is`,values:[`false`]}:n.operator===`$gt`&&n.value===0?{field:t.key,operator:`is`,values:[`true`]}:null},serialize(e){let t=e.values[0];return e.operator===`is`?t===`true`?[`count.reports:>0`]:t===`false`?[`count.reports:0`]:null:null}}}}),lt=[`author`,`post`,`body`,`status`,`reported`,`created_at`],ut={...Be,...Re};function dt(e){switch(e){case`author`:return K.createElement(de,{className:`size-4`});case`post`:return K.createElement(we,{className:`size-4`});case`body`:return K.createElement(ie,{className:`size-4`});case`status`:return K.createElement(Ae,{className:`size-4`});case`reported`:return K.createElement(D,{className:`size-4`});case`created_at`:return K.createElement(je,{className:`size-4`});default:return}}function ft({postValueSource:e,memberValueSource:t,siteTimezone:n=`UTC`}){return(0,K.useMemo)(()=>{let r=tt(n);return lt.map(n=>{let i=q[n],a=n===`created_at`?{defaultValue:r,...$e(i)?{customRenderer:et(r)}:{}}:{};return{key:n,...i.ui,icon:dt(n),operators:Ue(i.operators,{labels:ut}),...`options`in i&&i.options?{options:i.options}:{},...a,...n===`author`?{valueSource:t}:{},...n===`post`?{valueSource:e}:{}}})},[t,e,n])}var J=n(),pt=({filters:e,siteTimezone:t,onFiltersChange:n})=>{let r=nt(),i=ft({memberValueSource:rt(),postValueSource:r,siteTimezone:t}),a=e.length>0;return(0,J.jsx)(y,{addButtonIcon:a?(0,J.jsx)(te,{}):(0,J.jsx)(Me,{}),addButtonText:a?`Add filter`:`Filter`,allowMultiple:!1,className:`[&>button]:order-last ${a?`[&>button]:border-none`:`w-auto`}`,clearButtonClassName:`font-normal text-muted-foreground`,clearButtonIcon:(0,J.jsx)(Te,{}),clearButtonText:`Clear`,fields:i,filters:e,keyboardShortcut:`f`,popoverAlign:a?`start`:`end`,showClearButton:a,showSearchInput:!1,onChange:n})},Y=`CommentsResponseType`,mt=`count.dislikes`,X=e=>[`member`,`post`,`count.replies`,`count.direct_replies`,`count.likes`,...e?[mt]:[],`count.reports`,`parent`,`in_reply_to`].join(`,`),ht=e=>[`member`,`post`,`count.direct_replies`,`count.likes`,...e?[mt]:[],`count.reports`,`parent`,`in_reply_to`].join(`,`),gt=o({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}}}),_t=e=>gt({...e,searchParams:{limit:`100`,order:`created_at desc`,include:`member,post,parent`,...e?.searchParams}}),vt=a({method:`PUT`,path:({id:e})=>`/comments/${e}/`,body:({id:e})=>({comments:[{id:e,status:`hidden`}]}),invalidateQueries:{dataType:Y}}),yt=a({method:`PUT`,path:({id:e})=>`/comments/${e}/`,body:({id:e})=>({comments:[{id:e,status:`published`}]}),invalidateQueries:{dataType:Y}});a({method:`PUT`,path:({id:e})=>`/comments/${e}/`,body:({id:e})=>({comments:[{id:e,status:`deleted`}]}),invalidateQueries:{dataType:Y}});var bt=a({method:`PUT`,path:({id:e})=>`/comments/${e}/`,body:({id:e})=>({comments:[{id:e,pinned:!0}]}),invalidateQueries:{dataType:Y}}),Z=a({method:`PUT`,path:({id:e})=>`/comments/${e}/`,body:({id:e})=>({comments:[{id:e,pinned:!1}]}),invalidateQueries:{dataType:Y}});i({dataType:Y,path:e=>`/comments/${e}/replies/`,defaultSearchParams:{include:`member,post,count.replies,count.likes,count.reports,parent`,limit:`100`}});var xt=i({dataType:Y,path:e=>`/comments/${e}/`,defaultSearchParams:{include:X(!1)}}),St=(e,t)=>{let{dislikesEnabled:n=!1,searchParams:r,...i}=t||{};return xt(e,{...i,searchParams:{include:X(n),...r}})},Ct=i({dataType:`CommentReportsResponseType`,path:e=>`/comments/${e}/reports/`}),wt=(e,t)=>Ct(e,{...t}),Tt=i({dataType:`CommentLikesResponseType`,path:e=>`/comments/${e}/likes/`,defaultSearchParams:{include:`member`,limit:`100`,order:`created_at desc`}}),Et=(e,t)=>Tt(e,{...t}),Dt=i({dataType:`CommentDislikesResponseType`,path:e=>`/comments/${e}/dislikes/`,defaultSearchParams:{include:`member`,limit:`100`,order:`created_at desc`}}),Ot=(e,t)=>Dt(e,{...t}),kt=(e,t)=>{let{dislikesEnabled:n=!1,...r}=t||{};return _t({...r,searchParams:{filter:`(parent_id:${e}+in_reply_to_id:null),in_reply_to_id:${e}`,order:`created_at asc`,include:ht(n),limit:`100`}})};function At({onClick:e,expanded:t}){return(0,J.jsxs)(j,{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)(T,{}):(0,J.jsx)(Oe,{})]})}function jt({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:u(`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)(At,{expanded:i,onClick:()=>a(!i)})]})})}function Mt(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`)}var Nt=u(he({variant:`warning`}),`gap-1 hover:bg-state-warning/30`);function Pt({memberName:e,memberId:t,createdAt:n,isHidden:r,canComment:i,isPinned:a,onAuthorClick:o,postTitle:s,onPostClick:c,onUnpinClick:l,className:d}){return(0,J.jsxs)(`div`,{className:u(`flex items-center gap-2`,d),children:[(0,J.jsxs)(`div`,{className:u(`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)(j,{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)(I,{children:[(0,J.jsx)(k,{asChild:!0,children:(0,J.jsx)(`span`,{"data-testid":`commenting-disabled-indicator`,children:(0,J.jsx)(se,{className:`size-3.5 text-muted-foreground`})})}),(0,J.jsx)(V,{children:`Comments disabled`})]}),(0,J.jsx)(H,{className:`shrink-0 text-muted-foreground/50`,size:16}),(0,J.jsx)(`div`,{className:`shrink-0 whitespace-nowrap`,children:n&&(0,J.jsxs)(I,{children:[(0,J.jsx)(k,{asChild:!0,children:(0,J.jsx)(`span`,{className:`cursor-default text-sm text-muted-foreground`,children:f(n)})}),(0,J.jsx)(V,{children:Mt(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)(j,{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)(be,{variant:`secondary`,children:`Hidden`}),a&&(l?(0,J.jsxs)(`button`,{"aria-label":`Unpin comment`,className:u(`group`,Nt),type:`button`,onClick:e=>{e.stopPropagation(),l?.()},children:[(0,J.jsxs)(`span`,{className:`grid size-3 shrink-0`,children:[(0,J.jsx)(L,{className:`col-start-1 row-start-1 size-3 group-hover:opacity-0 group-focus-visible:opacity-0`}),(0,J.jsx)(E,{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)(be,{className:`gap-1`,variant:`warning`,children:[(0,J.jsx)(L,{className:`size-3`}),`Pinned`]}))]})}function Ft({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)(B,{open:e,onOpenChange:o,children:(0,J.jsxs)(A,{className:`gap-5`,children:[(0,J.jsxs)(R,{children:[(0,J.jsx)(O,{children:`Disable comments`}),(0,J.jsxs)(ee,{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)(x,{checked:i,id:`hide-comments`,onCheckedChange:e=>a(e===!0)}),(0,J.jsx)(C,{htmlFor:`hide-comments`,children:`Hide all previous comments`})]}),(0,J.jsxs)(M,{children:[(0,J.jsx)(j,{variant:`outline`,onClick:()=>o(!1),children:`Cancel`}),(0,J.jsx)(j,{onClick:()=>{r(i),a(!1)},children:`Disable comments`})]})]})})}var It=()=>De(`commentsPinning`);function Lt({comment:e}){let{mutate:t}=fe(),{mutate:n}=Ce(),{mutate:r}=bt(),{mutate:i}=Z(),[a,o]=(0,K.useState)(!1),s=It(),{id:c,post:l,member:u}=e,d=l?.url,f=u?.id,p=u?.can_comment,m=s&&!e.parent_id&&e.status!==`deleted`;return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(le,{children:[(0,J.jsx)(Se,{asChild:!0,children:(0,J.jsx)(j,{className:`relative z-10 text-gray-800 hover:bg-secondary [&_svg]:size-4`,size:`sm`,variant:`ghost`,children:(0,J.jsx)(ue,{})})}),(0,J.jsxs)(ve,{align:`start`,children:[d&&(0,J.jsx)(N,{asChild:!0,children:(0,J.jsxs)(`a`,{href:`${d}#ghost-comments-${c}`,rel:`noopener noreferrer`,target:`_blank`,children:[(0,J.jsx)(oe,{className:`size-4`}),`View on post`]})}),f&&(0,J.jsx)(N,{asChild:!0,children:(0,J.jsxs)(`a`,{href:`#/members/${f}`,children:[(0,J.jsx)(de,{className:`size-4`}),`View member`]})}),m&&(e.pinned?(0,J.jsxs)(N,{onClick:()=>i({id:c}),children:[(0,J.jsx)(E,{className:`size-4`}),`Unpin comment`]}):(0,J.jsxs)(N,{onClick:()=>r({id:c}),children:[(0,J.jsx)(L,{className:`size-4`}),`Pin comment`]})),f&&(p===!1?(0,J.jsxs)(N,{onClick:()=>{f&&n({id:f})},children:[(0,J.jsx)(ke,{className:`size-4`}),`Enable commenting`]}):(0,J.jsxs)(N,{onClick:()=>o(!0),children:[(0,J.jsx)(se,{className:`size-4`}),`Disable commenting`]}))]})]}),(0,J.jsx)(Ft,{memberName:u?.name,open:a,onConfirm:e=>{f&&(t({id:f,reason:`Disabled from comment ${c}`,hideComments:e}),o(!1))},onOpenChange:o})]})}function Rt({comment:e,dislikesEnabled:t,open:n,defaultTab:r=`likes`,onOpenChange:i}){let{data:a,isLoading:o}=Et(e.id,{enabled:n}),{data:s,isLoading:c}=Ot(e.id,{enabled:n&&t}),l=a?.comment_likes??[],u=t?s?.comment_dislikes??[]:[],p=e.count?.likes??0,m=t?e.count?.dislikes??0:0,y=Math.max(0,p-l.length),b=Math.max(0,m-u.length);return(0,J.jsx)(B,{open:n,onOpenChange:i,children:(0,J.jsxs)(A,{"aria-describedby":void 0,children:[(0,J.jsx)(R,{children:(0,J.jsx)(O,{children:t?(0,J.jsxs)(J.Fragment,{children:[d(p),` `,p===1?`like`:`likes`,` and `,d(m),` `,m===1?`dislike`:`dislikes`]}):(0,J.jsxs)(J.Fragment,{children:[d(p),` `,p===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)(w,{className:`shrink-0`,email:e.member?.email,name:e.member?.name,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?P(e.member):`Deleted member`}),(0,J.jsx)(H,{className:`shrink-0 text-muted-foreground/50`,size:16}),(0,J.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:e.created_at&&f(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)(v,{defaultValue:r,variant:`segmented`,children:[(0,J.jsxs)(_,{className:`grid w-full grid-cols-2`,children:[(0,J.jsx)(h,{value:`likes`,children:`Likes`}),(0,J.jsx)(h,{value:`dislikes`,children:`Dislikes`})]}),(0,J.jsx)(g,{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)(z,{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)(w,{email:e.member?.email,name:e.member?.name,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)(ye,{className:`size-2.5`,fill:`currentColor`})})]}),(0,J.jsx)(`span`,{className:`font-medium`,children:e.member?P(e.member):`Deleted member`})]}),(0,J.jsx)(`span`,{className:`shrink-0 text-sm text-muted-foreground`,children:f(e.created_at)})]},e.id)),y>0&&(0,J.jsxs)(`div`,{className:`pt-1 text-center text-sm text-muted-foreground`,children:[`and `,d(y),` more`]})]})})}),(0,J.jsx)(g,{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)(z,{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)(w,{email:e.member?.email,name:e.member?.name,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)(me,{className:`size-2.5`,fill:`currentColor`})})]}),(0,J.jsx)(`span`,{className:`font-medium`,children:e.member?P(e.member):`Deleted member`})]}),(0,J.jsx)(`span`,{className:`shrink-0 text-sm text-muted-foreground`,children:f(e.created_at)})]},e.id)),b>0&&(0,J.jsxs)(`div`,{className:`pt-1 text-center text-sm text-muted-foreground`,children:[`and `,d(b),` 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)(z,{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)(w,{email:e.member?.email,name:e.member?.name,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)(xe,{className:`size-2.5`,fill:`currentColor`})})]}),(0,J.jsx)(`span`,{className:`font-medium`,children:e.member?P(e.member):`Deleted member`})]}),(0,J.jsx)(`span`,{className:`shrink-0 text-sm text-muted-foreground`,children:f(e.created_at)})]},e.id)),y>0&&(0,J.jsxs)(`div`,{className:`pt-1 text-center text-sm text-muted-foreground`,children:[`and `,d(y),` more`]})]})}),(0,J.jsx)(M,{children:(0,J.jsx)(j,{onClick:()=>i(!1),children:`OK`})})]})})}function zt({comment:e,open:t,onOpenChange:n}){let{data:r,isLoading:i}=wt(e.id,{enabled:t}),a=r?.comment_reports??[],o=e.count?.reports??a.length;return(0,J.jsx)(B,{open:t,onOpenChange:n,children:(0,J.jsxs)(A,{"aria-describedby":void 0,children:[(0,J.jsx)(R,{children:(0,J.jsxs)(O,{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)(w,{className:`shrink-0`,email:e.member?.email,name:e.member?.name,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?P(e.member):`Deleted member`}),(0,J.jsx)(H,{className:`shrink-0 text-muted-foreground/50`,size:16}),(0,J.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:e.created_at&&f(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)(z,{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)(w,{email:e.member?.email,name:e.member?.name,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)(D,{className:`size-2.5`,fill:`currentColor`})})]}),(0,J.jsx)(`span`,{className:`font-medium`,children:e.member?P(e.member):`Deleted member`})]}),(0,J.jsx)(`span`,{className:`shrink-0 text-sm text-muted-foreground`,children:f(e.created_at)})]},e.id))})}),(0,J.jsx)(M,{children:(0,J.jsx)(j,{onClick:()=>n(!1),children:`OK`})})]})})}function Bt(e,t){if(!t)return;let n=new URLSearchParams(e);return n.set(`thread`,`is:${t}`),`?${n.toString()}`}function Q({icon:e,count:t,label:n,to:r,onClick:i,className:a,testId:o}){let s=u(`flex items-center gap-1 text-xs text-gray-800`,a),c=(0,J.jsxs)(J.Fragment,{children:[e,(0,J.jsx)(`span`,{children:d(t)})]}),f=r||i;return(0,J.jsxs)(I,{children:[(0,J.jsx)(k,{asChild:!0,children:r?(0,J.jsx)(l,{className:u(s,`cursor-pointer hover:opacity-70`),"data-testid":o,to:r,onClick:e=>{e.stopPropagation()},children:c}):i?(0,J.jsx)(`button`,{className:u(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)(V,{children:f?`View ${n.toLowerCase()}`:n})]})}function Vt({comment:e,dislikesEnabled:t,className:n}){let[r]=c(),[i,a]=(0,K.useState)(!1),[o,s]=(0,K.useState)(`likes`),[l,d]=(0,K.useState)(!1),f=Bt(r,e.id),p=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,_=p>0,v=m>0,y=h>0,b=g>0;return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`div`,{className:u(`flex items-center gap-6`,n),children:[(0,J.jsx)(Q,{count:p,icon:(0,J.jsx)(Ne,{size:16,strokeWidth:1.5}),label:`Replies`,testId:`replies-metric`,to:_?f:void 0}),t?(0,J.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,J.jsx)(Q,{count:m,icon:(0,J.jsx)(ye,{size:16,strokeWidth:1.5}),label:`Likes`,testId:`likes-metric`,onClick:v?()=>{s(`likes`),a(!0)}:void 0}),(0,J.jsx)(Q,{count:h,icon:(0,J.jsx)(me,{size:16,strokeWidth:1.5}),label:`Dislikes`,testId:`dislikes-metric`,onClick:y?()=>{s(`dislikes`),a(!0)}:void 0})]}):(0,J.jsx)(Q,{count:m,icon:(0,J.jsx)(xe,{size:16,strokeWidth:1.5}),label:`Likes`,onClick:v?()=>a(!0):void 0}),(0,J.jsx)(Q,{className:b?`font-semibold text-red`:void 0,count:g,icon:(0,J.jsx)(D,{size:16,strokeWidth:1.5}),label:`Reports`,onClick:b?()=>d(!0):void 0})]}),(0,J.jsx)(Rt,{comment:e,defaultTab:o,dislikesEnabled:t,open:i,onOpenChange:a}),(0,J.jsx)(zt,{comment:e,open:l,onOpenChange:d})]})}function Ht({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 Ut({comment:e,dislikesEnabled:t,isReply:n=!1,isSelectedComment:r=!1,selectedCommentId:i}){let[a]=c(),{mutate:o}=vt(),{mutate:s}=yt(),{mutate:d}=Z(),f=It(),p=(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 ${!p||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)(w,{className:u(`mb-3 size-6 md:mb-4 md:size-8`,e.status===`hidden`&&`opacity-50`),email:e.member?.email,name:e.member?.name,src:e.member?.avatar_image}),(0,J.jsx)(Ht,{hasReplies:p&&!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)(Pt,{canComment:e.member?.can_comment,createdAt:e.created_at,isHidden:e.status===`hidden`,isPinned:f&&e.pinned,memberId:e.member?.id,memberName:e.member?.name,onUnpinClick:f?()=>d({id:e.id}):void 0}),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)(l,{className:`text-sm font-normal text-muted-foreground hover:text-foreground`,"data-testid":`replied-to-link`,to:Bt(a,e.in_reply_to_id||e.parent_id)||``,onClick:e=>{e.stopPropagation()},children:e.in_reply_to_snippet})]}),(0,J.jsx)(jt,{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)(j,{className:`text-gray-800`,size:`sm`,variant:`outline`,onClick:()=>o({id:e.id}),children:[(0,J.jsx)(re,{}),(0,J.jsx)(`span`,{className:`max-md:hidden`,children:`Hide`})]}),e.status===`hidden`&&(0,J.jsxs)(j,{className:`text-gray-800`,size:`sm`,variant:`outline`,onClick:()=>s({id:e.id}),children:[(0,J.jsx)(pe,{}),(0,J.jsx)(`span`,{className:`max-md:hidden`,children:`Show`})]}),(0,J.jsx)(Vt,{comment:e,dislikesEnabled:t}),(0,J.jsx)(Lt,{comment:e})]})]}),p&&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)(Ut,{comment:e,dislikesEnabled:t,isReply:!0,selectedCommentId:i},e.id))})]})})]})}var Wt=({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)(Ut,{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)(j,{disabled:o,variant:`outline`,onClick:()=>i(),children:o?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(z,{size:`sm`}),`Loading...`]}):`Load more replies`})})]}),Gt=({commentId:e,dislikesEnabled:t,open:n,onOpenChange:r})=>{let{data:i,isLoading:a,isError:o,fetchNextPage:s,hasNextPage:c,isFetchingNextPage:l}=kt(e??``,{dislikesEnabled:t,enabled:n&&!!e}),{data:u,isLoading:d,isError:f}=St(e??``,{dislikesEnabled:t,enabled:n&&!!e}),p=a||d,m=f||o&&!u,h=u?.comments?.[0],g=i?.comments||[];return(0,J.jsx)(ne,{open:n,onOpenChange:r,children:(0,J.jsxs)(ae,{className:`overflow-y-auto px-6 pt-0 sm:max-w-[420px]`,children:[(0,J.jsx)(ge,{className:`sticky top-0 z-40 -mx-6 bg-surface-elevated/60 p-6 backdrop-blur`,children:(0,J.jsx)(Pe,{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)(ce,{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)(z,{size:`lg`})}):m||!h?(0,J.jsx)(`div`,{className:`flex h-full items-center justify-center py-8`,children:(0,J.jsx)(S,{actions:(0,J.jsx)(j,{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)(F,{})})}):(0,J.jsx)(Wt,{dislikesEnabled:t,fetchNextPage:()=>void s(),hasNextPage:c,isFetchingNextPage:l,replies:g,selectedComment:h,selectedCommentId:e??``})})]})})},Kt=({height:e})=>(0,J.jsx)(`div`,{"aria-hidden":`true`,className:`flex`,children:(0,J.jsx)(`div`,{className:`flex`,style:{height:e}})}),qt=(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 Jt({items:e,totalItems:t,hasNextPage:n,isFetchingNextPage:r,fetchNextPage:i,resetKey:a,onAddFilter:o,isLoading:s,dislikesEnabled:d}){let f=(0,K.useRef)(null),{visibleItemCount:p,canLoadMore:m,loadMore:h}=ot(t,{resetKey:a}),[g,_]=c(),[v,y]=(0,K.useState)(!1),[b,x]=(0,K.useState)(null),{mutate:S}=vt(),{mutate:C}=yt(),{mutate:T}=Z(),E=It(),D=e=>{if(y(e),!e){let e=new URLSearchParams(g);e.delete(`thread`),_(e,{replace:!0})}};(0,K.useEffect)(()=>{let e=g.get(`thread`);if(e){let t=e.match(/^is:(.+)$/);if(t&&t[1]){let e=t[1];x(e),y(!0)}else y(!1),x(null)}else y(!1),x(null)},[g]),at({parentRef:f,isLoading:s});let{visibleItems:O,spaceBefore:k,spaceAfter:ee}=it({items:e,totalItems:p,hasNextPage:n,isFetchingNextPage:r,fetchNextPage:i,parentRef:f});return(0,J.jsx)(_e,{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)(Kt,{height:k}),O.map(({key:t,virtualItem:n,item:r,props:i})=>n.index>e.length-1?(0,J.jsx)(qt,{...i},t):(0,J.jsxs)(`div`,{...i,className:`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:()=>{v&&D(!1)},children:[(0,J.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,J.jsx)(w,{className:u(`mt-0.5 size-6 md:size-8`,r.status===`hidden`&&`opacity-50`),email:r.member?.email,name:r.member?.name,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)(Pt,{canComment:r.member?.can_comment,createdAt:r.created_at,isHidden:r.status===`hidden`,isPinned:E&&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:E?()=>T({id:r.id}):void 0}),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)(l,{className:`text-sm font-normal text-muted-foreground hover:text-foreground`,"data-testid":`replied-to-link`,to:Bt(g,r.in_reply_to_id||r.parent_id)||``,onClick:e=>{e.stopPropagation()},children:r.in_reply_to_snippet})]})]}),(0,J.jsx)(jt,{item:r}),(0,J.jsxs)(`div`,{className:`flex flex-row flex-nowrap items-center gap-3`,children:[r.status===`published`&&(0,J.jsxs)(j,{className:`text-foreground`,size:`sm`,variant:`outline`,onClick:()=>S({id:r.id}),children:[(0,J.jsx)(re,{}),`Hide`]}),r.status===`hidden`&&(0,J.jsxs)(j,{className:`text-foreground`,size:`sm`,variant:`outline`,onClick:()=>C({id:r.id}),children:[(0,J.jsx)(pe,{}),`Show`]}),(0,J.jsx)(Vt,{className:`ml-2`,comment:r,dislikesEnabled:d}),(0,J.jsx)(Lt,{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)(Kt,{height:ee})]})}),m&&(0,J.jsx)(st,{isLoading:r,onClick:h}),(0,J.jsx)(Gt,{commentId:b,dislikesEnabled:d,open:v,onOpenChange:D})]})})}var Yt=qe(q,`date`);function Xt(e){return ze(q,e.field,`UTC`)?.definition.operators.includes(e.operator)??!1}function Zt(e,t){return Array.isArray(e.$and)?e.$and.flatMap(e=>Zt(e,t)):Ge([e],q,t)}function Qt(e,t){let n=Le(e??``);return n?Je(Zt(n,t).filter(Xt)):[]}function $t(e){let t=Le(e??``);return t?He(t,Yt):!1}function $(e,t){return Ke(e.filter(Xt),q,t)}var en=[`status`,`created_at`,`body`,`post`,`author`,`reported`],tn={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 nn(e){let t=e.indexOf(`:`);if(t<=0)return null;let n=e.substring(0,t),r=e.substring(t+1);return r?{operator:tn[n]??n,value:r}:null}function rn(e){let t=[];for(let[n,r]of e.entries()){if(!en.includes(n))continue;let e=nn(r);e&&t.push({id:`${n}:${t.length+1}`,field:n,operator:e.operator,values:[e.value]})}return t}function an(e){en.forEach(t=>e.delete(t))}function on(e,t,n){let r=new URLSearchParams(e),i=$(t,n);return r.delete(`filter`),an(r),i&&r.set(`filter`,i),r}function sn(e,t,n=!t){return!!e&&n&&!t&&$t(e)}function cn(e){let[t,n]=c(),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?rn(t):Qt(i,e),[i,t,e]),[s,l]=(0,K.useState)(o),u=(0,K.useMemo)(()=>$(s,e),[s,e]);return(0,K.useEffect)(()=>{a!==r.current&&(l(o),r.current=a)},[a,o]),(0,K.useEffect)(()=>{if(r.current!==null&&a!==r.current)return;let i=on(t,s,e),o=i.toString();o!==a&&(r.current=o,n(i,{replace:!0}))},[a,s,t,n,e]),{filters:s,nql:u,setFilters:(0,K.useCallback)((i,a={})=>{let o=typeof i==`function`?i(s):i,c=on(t,o,e),u=a.replace??!0;l(o),r.current=c.toString(),n(c,{replace:u})},[s,t,n,e]),clearFilters:(0,K.useCallback)(({replace:e=!0}={})=>{let i=new URLSearchParams(t);i.delete(`filter`),an(i),l([]),r.current=i.toString(),n(i,{replace:e})},[t,n])}}function ln(e){return e.get(`id`)?.match(/^is:(.+)$/)?.[1]}var un=({timezone:e,singleCommentId:t})=>{let[n,i]=c(),{filters:a,nql:o,setFilters:l}=cn(e),u=(0,K.useCallback)((r,o,s=`is`)=>{let c=[...a.filter(e=>e.field!==r),b(r,s,[o])];if(!t){l(c,{replace:!1});return}let u=new URLSearchParams(n),d=$(c,e);u.delete(`id`),u.delete(`filter`),d&&u.set(`filter`,d),i(u,{replace:!1})},[a,n,l,i,t,e]),d=(0,K.useMemo)(()=>t?`id:${s(t)}`:o,[o,t]),f=(0,K.useCallback)(()=>{i(new URLSearchParams,{replace:!1})},[i]),{data:h,isError:g,isFetching:_,isFetchingNextPage:v,isRefetching:y,fetchNextPage:x,hasNextPage:C}=_t({searchParams:{include:X(!0),...d?{filter:d}:{}},placeholderData:r}),w=_&&!v&&!y,T=d??``,E=a.length>0;return(0,J.jsx)(p,{className:`size-full`,children:(0,J.jsx)(m,{className:`relative flex h-full flex-col`,size:`page`,children:(0,J.jsxs)(G,{"data-testid":`comments-page`,children:[(0,J.jsxs)(G.Header,{children:[(0,J.jsxs)(U,{blurredBackground:!1,sticky:!1,children:[(0,J.jsx)(U.Left,{children:(0,J.jsx)(U.Title,{children:`Comments`})}),!t&&!E&&(0,J.jsx)(U.Actions,{children:(0,J.jsx)(U.ActionGroup,{children:(0,J.jsx)(pt,{filters:a,siteTimezone:e,onFiltersChange:l})})})]}),!t&&E&&(0,J.jsx)(Qe,{children:(0,J.jsx)(pt,{filters:a,siteTimezone:e,onFiltersChange:l})})]}),(0,J.jsx)(G.Body,{children:w?(0,J.jsx)(`div`,{className:`flex flex-1 items-center justify-center`,children:(0,J.jsx)(z,{size:`lg`})}):g?(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)(j,{onClick:()=>window.location.reload(),children:`Reload page`})]}):h?.comments.length?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(Jt,{dislikesEnabled:!0,fetchNextPage:()=>void x(),hasNextPage:C,isFetchingNextPage:v,isLoading:_&&!v,items:h?.comments??[],resetKey:T,totalItems:h?.meta?.pagination?.total??0,onAddFilter:u}),t&&(0,J.jsx)(`div`,{className:`flex justify-center py-8`,children:(0,J.jsx)(j,{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)(S,{title:`Comment not found`,children:(0,J.jsx)(F,{})}),(0,J.jsx)(j,{className:`mt-4`,variant:`outline`,onClick:f,children:`Show all comments`})]}):(0,J.jsx)(S,{title:`No comments yet`,children:(0,J.jsx)(F,{})})})})]})})})},dn=()=>{let[e]=c(),{data:t,isLoading:n}=Ee({}),r=(0,K.useMemo)(()=>ln(e),[e]),i=e.get(`filter`)??void 0;if(!r&&sn(i,!!t,n))return(0,J.jsx)(p,{className:`size-full`,children:(0,J.jsx)(m,{className:`relative flex h-full flex-col`,size:`page`,children:(0,J.jsxs)(G,{children:[(0,J.jsx)(G.Header,{children:(0,J.jsx)(U,{blurredBackground:!1,sticky:!1,children:(0,J.jsx)(U.Left,{children:(0,J.jsx)(U.Title,{children:`Comments`})})})}),(0,J.jsx)(G.Body,{children:(0,J.jsx)(`div`,{className:`flex flex-1 items-center justify-center`,children:(0,J.jsx)(z,{size:`lg`})})})]})})});let a=ct(t?.settings??[]);return(0,J.jsx)(un,{singleCommentId:r,timezone:a})};export{dn as default};
|