ghost 6.17.2 → 6.18.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (211) hide show
  1. package/components/{tryghost-i18n-6.17.2.tgz → tryghost-i18n-6.18.1.tgz} +0 -0
  2. package/components/{tryghost-parse-email-address-6.17.2.tgz → tryghost-parse-email-address-6.18.1.tgz} +0 -0
  3. package/core/built/admin/assets/{PolarAngleAxis-B8JrAxf_.js → PolarAngleAxis-Dod0DwfL.js} +1 -1
  4. package/core/built/admin/assets/{_baseAssignValue-Bbalamaq.js → _baseAssignValue-DnkbkowM.js} +1 -1
  5. package/core/built/admin/assets/{a-large-small-CgWPeKpi.js → a-large-small-C5mgFBRg.js} +1 -1
  6. package/core/built/admin/assets/activitypub/activitypub.js +1 -1
  7. package/core/built/admin/assets/activitypub/{at-sign-Fsk3x72r.mjs → at-sign-BR2C2gdz.mjs} +2 -2
  8. package/core/built/admin/assets/activitypub/{avatar-flipboard-C10JfFS_.mjs → avatar-flipboard-CJV3KhLU.mjs} +2 -2
  9. package/core/built/admin/assets/activitypub/{bluesky-sharing-C1xeGSL6.mjs → bluesky-sharing-DY4KCGPZ.mjs} +4 -4
  10. package/core/built/admin/assets/activitypub/{copy-C1fElSkQ.mjs → copy-CBFwbAdE.mjs} +2 -2
  11. package/core/built/admin/assets/activitypub/{deleted-feed-item-Bun4tY2_.mjs → deleted-feed-item-DOm9GxTQ.mjs} +2 -2
  12. package/core/built/admin/assets/activitypub/{edit-profile-CYh00FZ7.mjs → edit-profile-CcbnZWkM.mjs} +3 -3
  13. package/core/built/admin/assets/activitypub/{feed-BxUqmcN9.mjs → feed-BHiZU0Q_.mjs} +4 -4
  14. package/core/built/admin/assets/activitypub/{hash-CNgwAx-U.mjs → hash-Csjloy5t.mjs} +2 -2
  15. package/core/built/admin/assets/activitypub/{inbox-DqNqII4a.mjs → inbox-DGKbBux9.mjs} +2 -2
  16. package/core/built/admin/assets/activitypub/{index-CONoLlDU.mjs → index-Bt_qFJNY.mjs} +2 -2
  17. package/core/built/admin/assets/activitypub/{index--Q6orQkb.mjs → index-CCYuVHjm.mjs} +21 -21
  18. package/core/built/admin/assets/activitypub/{index-jhjmoHwu.mjs → index-CTV39jCH.mjs} +2 -2
  19. package/core/built/admin/assets/activitypub/{index-Dvh9q3jy.mjs → index-ClNx7qzi.mjs} +4 -4
  20. package/core/built/admin/assets/activitypub/{index-C9pnotJK.mjs → index-D6Y6ywyl.mjs} +6 -6
  21. package/core/built/admin/assets/activitypub/{index-BueIufRq.mjs → index-YLvIz6pJ.mjs} +5 -5
  22. package/core/built/admin/assets/activitypub/{index-C3KJXzZE.mjs → index-tWANcGjH.mjs} +7 -7
  23. package/core/built/admin/assets/activitypub/{index-CJJXnqq1.mjs → index-vVqFEPIX.mjs} +3 -3
  24. package/core/built/admin/assets/activitypub/{moderation-CYhwUFi2.mjs → moderation-CUGqRfT1.mjs} +3 -3
  25. package/core/built/admin/assets/activitypub/{note-COVa8CMw.mjs → note-DMy39JHG.mjs} +4 -4
  26. package/core/built/admin/assets/activitypub/{reply-BHpKVBxx.mjs → reply-BboFcDsv.mjs} +2 -2
  27. package/core/built/admin/assets/activitypub/{separator-DP7q5sFH.mjs → separator-DBvIXQnV.mjs} +2 -2
  28. package/core/built/admin/assets/activitypub/{settings-3n7zo_3K.mjs → settings-D4qRhs9E.mjs} +3 -3
  29. package/core/built/admin/assets/activitypub/{step-1-BmUukywZ.mjs → step-1-C-ubwwIT.mjs} +3 -3
  30. package/core/built/admin/assets/activitypub/{step-2-C--I3xxp.mjs → step-2-Dsd2XY1_.mjs} +5 -5
  31. package/core/built/admin/assets/activitypub/{step-3-0Deh5N9c.mjs → step-3-BHz3ow0t.mjs} +7 -7
  32. package/core/built/admin/assets/activitypub/{tabs-D_vmoLBo.mjs → tabs-s_P4XeyF.mjs} +3 -3
  33. package/core/built/admin/assets/activitypub/{topic-filter-DJMrhH-c.mjs → topic-filter-CCf15CR-.mjs} +2 -2
  34. package/core/built/admin/assets/admin-x-settings/admin-x-settings.js +1 -1
  35. package/core/built/admin/assets/admin-x-settings/{code-editor-view-BzvYs1fs.mjs → code-editor-view-BWi3-ftq.mjs} +2 -2
  36. package/core/built/admin/assets/admin-x-settings/{index-DdMo_pvD.mjs → index-B3PtvbUw.mjs} +2 -2
  37. package/core/built/admin/assets/admin-x-settings/{index-DYEF3NiM.mjs → index-Did70N9h.mjs} +2 -2
  38. package/core/built/admin/assets/admin-x-settings/{index-BXChUyr6.mjs → index-JaMlaX9G.mjs} +30 -19
  39. package/core/built/admin/assets/admin-x-settings/{modals-Ck3AHDx3.mjs → modals-Bwrf9ptQ.mjs} +8060 -8067
  40. package/core/built/admin/assets/{at-sign-BottTo2X.js → at-sign-Bz-SU-S_.js} +1 -1
  41. package/core/built/admin/assets/{audience-CcGOt5Fb.js → audience-DmVdEmIe.js} +1 -1
  42. package/core/built/admin/assets/{avatar-flipboard-MxW2k124.js → avatar-flipboard-C7sxDVEM.js} +1 -1
  43. package/core/built/admin/assets/{bluesky-sharing-BBmDBlxr.js → bluesky-sharing-DJniSF6N.js} +1 -1
  44. package/core/built/admin/assets/{chart-pimL5Chk.js → chart-mYz3IJwm.js} +1 -1
  45. package/core/built/admin/assets/{chunk.524.9a8f5123fd3ecf3e4451.js → chunk.524.9d300778a63b42b0de62.js} +7 -7
  46. package/core/built/admin/assets/{chunk.582.41886d06af2895d571bd.js → chunk.582.2e363cd976d9bba998b9.js} +10 -10
  47. package/core/built/admin/assets/{code-editor-view-tCZOpc_h.js → code-editor-view-BIQWFJ01.js} +1 -1
  48. package/core/built/admin/assets/comments-B_-hdjc6.js +1 -0
  49. package/core/built/admin/assets/{copy-aC0WUVtq.js → copy-Bpq3uhnh.js} +1 -1
  50. package/core/built/admin/assets/{data-list-BOdyZGWI.js → data-list-BYNMbRIq.js} +1 -1
  51. package/core/built/admin/assets/{deleted-feed-item-BnUJ8bWP.js → deleted-feed-item-B_AwUKZy.js} +1 -1
  52. package/core/built/admin/assets/{edit-profile-CEgPhWMJ.js → edit-profile-DZo2ZcOu.js} +1 -1
  53. package/core/built/admin/assets/{empty-indicator-CR_9BHAH.js → empty-indicator-Bn5wG9-T.js} +1 -1
  54. package/core/built/admin/assets/{en-ajofhc7o.js → en-D4zIrMLN.js} +1 -1
  55. package/core/built/admin/assets/{feed-Ci-ODCHE.js → feed-Bgq4RarU.js} +1 -1
  56. package/core/built/admin/assets/{filters-CmJJOv3I.js → filters-CpVwu1Gk.js} +1 -1
  57. package/core/built/admin/assets/{gh-chart-hn7wEnik.js → gh-chart-Br7NXn_b.js} +1 -1
  58. package/core/built/admin/assets/{ghost-78b420974adc056bf1c9570275a46535.css → ghost-3c48d37b32f4fcd7eb15cfd739905a03.css} +1 -1
  59. package/core/built/admin/assets/{ghost-a9268074d0a9b02198594a05ecd7a626.js → ghost-98a3c5fd6235ebd344594f491cb6d17b.js} +241 -246
  60. package/core/built/admin/assets/{ghost-dark-12abca67e79c76fe6bfed6cb81ba2a53.css → ghost-dark-0100fe3ec7b4c3f6d8d043c904254a63.css} +1 -1
  61. package/core/built/admin/assets/{growth-CQceZQ1g.js → growth-CiPDnWxJ.js} +1 -1
  62. package/core/built/admin/assets/{hash-BcaWmkw5.js → hash-Bc1e38oH.js} +1 -1
  63. package/core/built/admin/assets/{inbox-D9hID-rO.js → inbox-BcZNBNhk.js} +1 -1
  64. package/core/built/admin/assets/{index-d_UH71zm.js → index-BFEx_ouC.js} +1 -1
  65. package/core/built/admin/assets/{index-kXF42nga.js → index-B_7QsC5T.js} +1 -1
  66. package/core/built/admin/assets/{index-CZ3lARQ2.js → index-Bm5ZeLtt.js} +1 -1
  67. package/core/built/admin/assets/{index-DJDgMk-T.js → index-BpcL7RmI.js} +2 -2
  68. package/core/built/admin/assets/{index-g4BWcHhl.js → index-Brg4tecQ.js} +1 -1
  69. package/core/built/admin/assets/{index-f5Lv9kLb.js → index-CMTzNTew.js} +29 -29
  70. package/core/built/admin/assets/{index-Cl2eSBwg.js → index-CTfJflJ2.js} +1 -1
  71. package/core/built/admin/assets/{index-BJS8H75W.js → index-Cn32t_gv.js} +1 -1
  72. package/core/built/admin/assets/{index-D8syEvSm.js → index-CsidX7Si.js} +1 -1
  73. package/core/built/admin/assets/{index-DO76vL0R.js → index-D212VvOz.js} +1 -1
  74. package/core/built/admin/assets/{index-B1rKIiOr.js → index-D67LJ_H4.js} +1 -1
  75. package/core/built/admin/assets/{index-BmK6ThYl.js → index-DU3bv9jz.js} +1 -1
  76. package/core/built/admin/assets/{index-DYM1MbXR.js → index-Dv13wKfX.js} +1 -1
  77. package/core/built/admin/assets/{index-Do091GLu.js → index-ETsoQLbU.js} +1 -1
  78. package/core/built/admin/assets/{index-rluYcfd-.js → index-ZYDRMgcT.js} +1 -1
  79. package/core/built/admin/assets/{koenig-lexical-D2XHvS2J.js → koenig-lexical-DZUWzN0P.js} +1 -1
  80. package/core/built/admin/assets/{kpi-card-Dga9rFZ5.js → kpi-card-DENsK2xK.js} +1 -1
  81. package/core/built/admin/assets/{kpis-BbnqD1za.js → kpis-CDrs2iS1.js} +1 -1
  82. package/core/built/admin/assets/{label-D8WHEOe0.js → label-BznQtEEo.js} +1 -1
  83. package/core/built/admin/assets/{links-dgwx7ko1.js → links-lpAC3T1p.js} +1 -1
  84. package/core/built/admin/assets/{lucide-react-BARFK2PZ.js → lucide-react-CBigk-fq.js} +1 -1
  85. package/core/built/admin/assets/{main-layout-CcjtCuF_.js → main-layout-_SYQRjIl.js} +1 -1
  86. package/core/built/admin/assets/{message-square-text-BxquqPhA.js → message-square-text-cV8O_qKq.js} +1 -1
  87. package/core/built/admin/assets/{minus-Ziy4LSYD.js → minus-NvnQTlW7.js} +1 -1
  88. package/core/built/admin/assets/{modals-fMQzR7L6.js → modals-XRSkribf.js} +3 -3
  89. package/core/built/admin/assets/{moderation-Ci9UNwiZ.js → moderation-BQp1GEWG.js} +1 -1
  90. package/core/built/admin/assets/{newsletter-DnrS7Fvi.js → newsletter-foM6KNNV.js} +1 -1
  91. package/core/built/admin/assets/{newsletters-D78pgnas.js → newsletters-BexdXUhn.js} +1 -1
  92. package/core/built/admin/assets/{note-BAfNweZN.js → note-DuaUGOeZ.js} +1 -1
  93. package/core/built/admin/assets/{overview-CWQPNOF0.js → overview-DgKBNqyc.js} +1 -1
  94. package/core/built/admin/assets/{pagemenu-DjSqq3Wu.js → pagemenu-CZyroidv.js} +1 -1
  95. package/core/built/admin/assets/{post-analytics-c8kRV0YB.js → post-analytics-DLK2SOSQ.js} +1 -1
  96. package/core/built/admin/assets/{post-analytics-context-CEqWyqgm.js → post-analytics-context-CF7C67-0.js} +1 -1
  97. package/core/built/admin/assets/{post-analytics-header-CpPPBAz4.js → post-analytics-header-7GtJCx0W.js} +1 -1
  98. package/core/built/admin/assets/{post-share-modal-Dln0kZhn.js → post-share-modal-D8R7DUZP.js} +1 -1
  99. package/core/built/admin/assets/posts/{comments-CHEqbZPq.mjs → comments-Bn_vn_sb.mjs} +434 -407
  100. package/core/built/admin/assets/posts/{dialog-VFomJYla.mjs → dialog-CKPcMrj7.mjs} +3 -3
  101. package/core/built/admin/assets/posts/{empty-indicator-CT9qQsMO.mjs → empty-indicator-kkrhP6K_.mjs} +2 -2
  102. package/core/built/admin/assets/posts/{filters-BXCfSKKS.mjs → filters-DHsxxy0F.mjs} +6 -6
  103. package/core/built/admin/assets/posts/{growth-xMitvyvt.mjs → growth-D7ACh-oR.mjs} +12 -12
  104. package/core/built/admin/assets/posts/{heading-DIulQwgD.mjs → heading-BrKVbOxA.mjs} +2 -2
  105. package/core/built/admin/assets/posts/{hooks-BiBMDYOA.mjs → hooks-BBEMuLiW.mjs} +3 -3
  106. package/core/built/admin/assets/posts/{index-uYyMBANY.mjs → index-C0rRguZx.mjs} +9 -9
  107. package/core/built/admin/assets/posts/{kpis-DK6j0CJA.mjs → kpis-1o524OIK.mjs} +10 -10
  108. package/core/built/admin/assets/posts/{links-CBiYZsyk.mjs → links-JpeATx1f.mjs} +4 -4
  109. package/core/built/admin/assets/posts/{loading-indicator-BPPeKpVb.mjs → loading-indicator-BHAmSf8j.mjs} +3 -3
  110. package/core/built/admin/assets/posts/{main-layout-f-PcNn-6.mjs → main-layout-BTItAOQE.mjs} +2 -2
  111. package/core/built/admin/assets/posts/{newsletter-CSOyAfvO.mjs → newsletter-CQdsCEHv.mjs} +13 -13
  112. package/core/built/admin/assets/posts/{overview-Dve3Uxt4.mjs → overview-sYh4JN1D.mjs} +15 -15
  113. package/core/built/admin/assets/posts/{post-analytics-CPKxH7yg.mjs → post-analytics-DtLt2SWx.mjs} +6 -6
  114. package/core/built/admin/assets/posts/{post-analytics-context-B5zQoflZ.mjs → post-analytics-context-CB1yM9fk.mjs} +4 -4
  115. package/core/built/admin/assets/posts/{post-analytics-header-BBxuaptK.mjs → post-analytics-header-BYaWuL9W.mjs} +9 -9
  116. package/core/built/admin/assets/posts/{post-share-modal-D_iMXvnI.mjs → post-share-modal-V0HTOBaf.mjs} +4 -4
  117. package/core/built/admin/assets/posts/{posts-DW6ne0od.mjs → posts-DeQT3knv.mjs} +2 -2
  118. package/core/built/admin/assets/posts/posts.js +1 -1
  119. package/core/built/admin/assets/posts/{search-CVlPqGMA.mjs → search-CLjC37AT.mjs} +2 -2
  120. package/core/built/admin/assets/posts/{separator-YrJkDGVP.mjs → separator-KNoTIaJx.mjs} +5 -5
  121. package/core/built/admin/assets/posts/{sheet-T5GWxxrn.mjs → sheet-DBg_SCDt.mjs} +3 -3
  122. package/core/built/admin/assets/posts/{skeleton-qnvlkDy-.mjs → skeleton-DvsoolWu.mjs} +3 -3
  123. package/core/built/admin/assets/posts/{source-icon-DBU0eZwS.mjs → source-icon-OmRaTU2G.mjs} +3 -3
  124. package/core/built/admin/assets/posts/{stats-udwJVZP8.mjs → stats-BC2DzntY.mjs} +4 -4
  125. package/core/built/admin/assets/posts/{table-Cu0BZfBU.mjs → table-CxX9OKAj.mjs} +2 -2
  126. package/core/built/admin/assets/posts/{tabs-B-RaoD3I.mjs → tabs-B1jw7cBi.mjs} +10 -10
  127. package/core/built/admin/assets/posts/{tags-DSDGzArh.mjs → tags-BBilTo1a.mjs} +11 -11
  128. package/core/built/admin/assets/posts/{tags-DByfrDKO.mjs → tags-BitrLT_j.mjs} +2 -2
  129. package/core/built/admin/assets/posts/{use-infinite-virtual-scroll-B7dD2nWW.mjs → use-infinite-virtual-scroll-DaijA1ao.mjs} +3 -3
  130. package/core/built/admin/assets/posts/{web-B9wvEtJ_.mjs → web-CKmyC4Xj.mjs} +15 -15
  131. package/core/built/admin/assets/{posts-C1Eh5Ypq.js → posts-CL9UDYoW.js} +1 -1
  132. package/core/built/admin/assets/{repeat-CN4fiG5H.js → repeat-DgH39UKE.js} +1 -1
  133. package/core/built/admin/assets/{reply-BfWgvH7y.js → reply-DAaNxiy8.js} +1 -1
  134. package/core/built/admin/assets/{select-B_0NBkLz.js → select-Cor2wFXT.js} +1 -1
  135. package/core/built/admin/assets/{settings-BqaVcJee.js → settings-BeumESEN.js} +5 -5
  136. package/core/built/admin/assets/{settings-Dk9E7Fqv.js → settings-xRx917Gj.js} +1 -1
  137. package/core/built/admin/assets/{sort-button-C2M35dLh.js → sort-button-BNW3i4Lb.js} +1 -1
  138. package/core/built/admin/assets/{source-icon-DkGi13e_.js → source-icon-DvDuzw73.js} +1 -1
  139. package/core/built/admin/assets/{sprout-BKiwQsGn.js → sprout-C3cc0c-K.js} +1 -1
  140. package/core/built/admin/assets/{square-BEpRc_fY.js → square-tZp0_n7e.js} +1 -1
  141. package/core/built/admin/assets/stats/{audience-Dfo7BmNu.mjs → audience-BWqU7WWT.mjs} +3 -3
  142. package/core/built/admin/assets/stats/{index-DUWoiDE_.mjs → index-CUuQaROI.mjs} +5 -5
  143. package/core/built/admin/assets/stats/{index-Yo58temM.mjs → index-CcCyLMxL.mjs} +7 -7
  144. package/core/built/admin/assets/stats/{index-h0rsyxDz.mjs → index-D5mlMG4l.mjs} +8 -8
  145. package/core/built/admin/assets/stats/{index-_vL3Zubi.mjs → index-DXU2rE9t.mjs} +5 -5
  146. package/core/built/admin/assets/stats/{index-Banm1wtA.mjs → index-K7ASx7EG.mjs} +6 -6
  147. package/core/built/admin/assets/stats/{sort-button-i6PS-TUn.mjs → sort-button-CELUx6Zp.mjs} +3 -3
  148. package/core/built/admin/assets/stats/{stats-CjepXEWS.mjs → stats-d_u_in4l.mjs} +2 -2
  149. package/core/built/admin/assets/stats/stats.js +2 -2
  150. package/core/built/admin/assets/stats/{tabs-Q20S1oup.mjs → tabs-3wLZsy0v.mjs} +3 -3
  151. package/core/built/admin/assets/stats/{url-helpers-DrGoeEH1.mjs → url-helpers-Drq3xg0l.mjs} +4 -4
  152. package/core/built/admin/assets/stats/{use-growth-stats-BnffY2W3.mjs → use-growth-stats-28Sr42va.mjs} +3 -3
  153. package/core/built/admin/assets/{stats-CRgy_cWm.js → stats-2Jelnn-Q.js} +1 -1
  154. package/core/built/admin/assets/{stats-view-CTQ4qO3S.js → stats-view-CESy8ELH.js} +1 -1
  155. package/core/built/admin/assets/{step-1-CNbdmB8C.js → step-1-DrqdolAh.js} +1 -1
  156. package/core/built/admin/assets/{step-2-Ddrl2uae.js → step-2-DmEpKck5.js} +1 -1
  157. package/core/built/admin/assets/{step-3-CbqkEtwh.js → step-3-Bus-0o0n.js} +1 -1
  158. package/core/built/admin/assets/{table-Dw9xFlFd.js → table-BQUcKHfm.js} +1 -1
  159. package/core/built/admin/assets/{tabs-DCHagOip.js → tabs-BmdL0X4U.js} +1 -1
  160. package/core/built/admin/assets/{tags-DV2SSdMK.js → tags-CLxXZlOO.js} +1 -1
  161. package/core/built/admin/assets/{tags-BsDlfsPN.js → tags-EchqlZUJ.js} +1 -1
  162. package/core/built/admin/assets/{tiers-tc5tafWV.js → tiers-nCGyTly9.js} +1 -1
  163. package/core/built/admin/assets/{toggle-group-DS-ZVhCr.js → toggle-group-CM5uf7J1.js} +1 -1
  164. package/core/built/admin/assets/{topic-filter-BfoEqHRD.js → topic-filter-LTRvZ8aU.js} +1 -1
  165. package/core/built/admin/assets/{trash-CpnxYen-.js → trash-u5BxolyH.js} +1 -1
  166. package/core/built/admin/assets/{url-helpers-wKPPeCtD.js → url-helpers-D41fEt51.js} +1 -1
  167. package/core/built/admin/assets/{use-growth-stats-CbHIETF_.js → use-growth-stats-BJ0O9ewi.js} +1 -1
  168. package/core/built/admin/assets/{use-infinite-virtual-scroll-DU1EUhyj.js → use-infinite-virtual-scroll-APZWciOk.js} +1 -1
  169. package/core/built/admin/assets/{use-simple-pagination-X6kmRz2u.js → use-simple-pagination-DVRHeaAR.js} +1 -1
  170. package/core/built/admin/assets/{user-round-check-DYkrjHxF.js → user-round-check-B6j98D6d.js} +1 -1
  171. package/core/built/admin/assets/{wallet-cards-CSdWOmJE.js → wallet-cards-KmOh29LP.js} +1 -1
  172. package/core/built/admin/assets/{web-C39IKnvl.js → web-Cclotbnz.js} +1 -1
  173. package/core/built/admin/index.html +5 -5
  174. package/core/frontend/meta/asset-url.js +126 -15
  175. package/core/frontend/services/asset-hash/index.js +73 -0
  176. package/core/frontend/services/theme-engine/active.js +4 -2
  177. package/core/server/api/endpoints/utils/serializers/output/utils/post-gating.js +6 -0
  178. package/core/server/data/migrations/versions/6.17/2026-02-04-10-42-20-offers-nullable-product-id.js +11 -0
  179. package/core/server/data/migrations/versions/6.18/2026-02-04-10-42-20-offers-nullable-product-id.js +4 -0
  180. package/core/server/data/schema/schema.js +1 -1
  181. package/core/server/data/tinybird/datasources/_mv_daily_pages.datasource +13 -0
  182. package/core/server/data/tinybird/endpoints/api_top_pages_v3.pipe +113 -0
  183. package/core/server/data/tinybird/pipes/mv_daily_pages.pipe +23 -0
  184. package/core/server/data/tinybird/scripts/benchmark-top-pages.sh +186 -0
  185. package/core/server/data/tinybird/scripts/compare-top-pages.sh +262 -0
  186. package/core/server/data/tinybird/tests/api_top_pages_v3.yaml +112 -0
  187. package/core/server/models/automated-email.js +34 -0
  188. package/core/server/services/koenig/node-renderers/transistor-renderer.js +3 -8
  189. package/core/server/services/lib/member-signup-contexts.js +23 -0
  190. package/core/server/services/lib/member-signup-contexts.ts +22 -0
  191. package/core/server/services/member-welcome-emails/member-welcome-email-renderer.js +13 -7
  192. package/core/server/services/member-welcome-emails/service.js +84 -15
  193. package/core/server/services/members/members-api/controllers/router-controller.js +14 -0
  194. package/core/server/services/members/members-api/repositories/member-repository.js +1 -1
  195. package/core/server/services/members/members-api/services/payments-service.js +5 -0
  196. package/core/server/services/oembed/oembed-service.js +1 -1
  197. package/core/server/services/offers/application/offer-mapper.js +6 -7
  198. package/core/server/services/offers/application/offers-api.js +3 -3
  199. package/core/server/services/offers/domain/errors/index.js +2 -0
  200. package/core/server/services/offers/domain/models/offer.js +15 -3
  201. package/core/server/services/offers/offer-bookshelf-repository.js +4 -5
  202. package/core/server/services/stats/utils/tinybird.js +5 -3
  203. package/core/server/services/stripe/services/webhook/checkout-session-event-service.js +17 -1
  204. package/core/server/services/stripe/stripe-service.js +8 -0
  205. package/core/shared/config/defaults.json +6 -0
  206. package/core/shared/labs.js +3 -3
  207. package/core/shared/url-utils.js +2 -1
  208. package/package.json +6 -6
  209. package/tsconfig.tsbuildinfo +1 -1
  210. package/yarn.lock +23 -2
  211. package/core/built/admin/assets/comments-OXqhcC0t.js +0 -1
@@ -1,118 +1,118 @@
1
- import { o as I, j as e, u as R, p as _, b as L, n as T, V as Se, F as os, G as U, H as Q, J as Pe, K as is, a as E, q as V, Q as q, v as G, e as ls, _ as oe, $ as cs } from "./index-uYyMBANY.mjs";
2
- import { u as ds, F as ms, T as te, a as re, b as ne, d as ae, c as us } from "./filters-BXCfSKKS.mjs";
3
- import { c as Y, b as X, a as hs, d as ps } from "./hooks-BiBMDYOA.mjs";
4
- import { u as fs, g as xs, b as bs } from "./posts-DW6ne0od.mjs";
5
- import { u as gs, U as ie, g as js, D as vs, b as Cs, E as ys, d as Ns, e as A, h as Ce, S as ks } from "./separator-YrJkDGVP.mjs";
6
- import { e as ws, i as _s, b as le, a as Ss, F as Ps, f as Ts, C as Rs, g as Te, D as ce, M as Is, H as Re, R as Es, d as Ie, E as Ee, h as Le } from "./search-CVlPqGMA.mjs";
7
- import { a as Ls, C as $s, X as Ms, k as de, m as me, n as ue, o as he, p as Ds, q as pe } from "./dialog-VFomJYla.mjs";
8
- import { H as ye, g as Fs, u as zs } from "./use-infinite-virtual-scroll-B7dD2nWW.mjs";
9
- import { M as Os } from "./main-layout-f-PcNn-6.mjs";
10
- import { c as Bs, P as fe, u as Hs, b as $e, e as Ne, h as As, B as P, C as Us } from "./heading-DIulQwgD.mjs";
11
- import { L as Z } from "./loading-indicator-BPPeKpVb.mjs";
12
- import { E as Me } from "./empty-indicator-CT9qQsMO.mjs";
13
- import { S as Vs, b as qs, c as Ws, d as Qs } from "./sheet-T5GWxxrn.mjs";
1
+ import { o as L, j as e, u as R, p as _, b as E, n as T, V as Se, F as is, G as U, H as K, J as Pe, K as os, a as I, q as V, Q as q, v as Y, e as ls, _ as ie, $ as cs } from "./index-C0rRguZx.mjs";
2
+ import { u as ds, F as ms, T as te, a as re, b as ne, d as ae, c as us } from "./filters-DHsxxy0F.mjs";
3
+ import { c as X, b as Z, a as hs, d as ps } from "./hooks-BBEMuLiW.mjs";
4
+ import { u as fs, g as xs, b as bs } from "./posts-DeQT3knv.mjs";
5
+ import { u as gs, U as oe, g as js, D as vs, b as Cs, E as ys, d as Ns, e as A, h as Ce, S as ks } from "./separator-KNoTIaJx.mjs";
6
+ import { e as ws, i as _s, b as le, a as Ss, F as Ps, f as Ts, C as Rs, g as Te, D as ce, M as Ls, H as Re, R as Is, d as Le, E as Ie, h as Ee } from "./search-CLjC37AT.mjs";
7
+ import { a as Es, C as $s, X as Ms, k as de, m as me, n as ue, o as he, p as Ds, q as pe } from "./dialog-CKPcMrj7.mjs";
8
+ import { H as ye, g as Fs, u as zs } from "./use-infinite-virtual-scroll-DaijA1ao.mjs";
9
+ import { M as Os } from "./main-layout-BTItAOQE.mjs";
10
+ import { c as Bs, P as fe, u as Hs, b as $e, e as Ne, h as As, B as P, C as Us } from "./heading-BrKVbOxA.mjs";
11
+ import { L as W } from "./loading-indicator-BHAmSf8j.mjs";
12
+ import { E as Me } from "./empty-indicator-kkrhP6K_.mjs";
13
+ import { S as Vs, b as qs, c as Ws, d as Qs } from "./sheet-DBg_SCDt.mjs";
14
14
  var J = "Checkbox", [Ks] = Bs(J), [Gs, xe] = Ks(J);
15
15
  function Ys(s) {
16
16
  const {
17
17
  __scopeCheckbox: t,
18
18
  checked: r,
19
- children: a,
19
+ children: i,
20
20
  defaultChecked: n,
21
- disabled: o,
21
+ disabled: a,
22
22
  form: l,
23
23
  name: c,
24
- onCheckedChange: i,
24
+ onCheckedChange: o,
25
25
  required: d,
26
26
  value: u = "on",
27
27
  // @ts-expect-error
28
28
  internal_do_not_use_render: m
29
- } = s, [h, p] = Hs({
29
+ } = s, [p, f] = Hs({
30
30
  prop: r,
31
31
  defaultProp: n ?? !1,
32
- onChange: i,
32
+ onChange: o,
33
33
  caller: J
34
- }), [b, g] = R(null), [j, v] = R(null), f = _(!1), C = b ? !!l || !!b.closest("form") : (
34
+ }), [g, h] = R(null), [v, j] = R(null), x = _(!1), C = g ? !!l || !!g.closest("form") : (
35
35
  // We set this to true by default so that events bubble to forms without JS (SSR)
36
36
  !0
37
37
  ), w = {
38
- checked: h,
39
- disabled: o,
40
- setChecked: p,
41
- control: b,
42
- setControl: g,
38
+ checked: p,
39
+ disabled: a,
40
+ setChecked: f,
41
+ control: g,
42
+ setControl: h,
43
43
  name: c,
44
44
  form: l,
45
45
  value: u,
46
- hasConsumerStoppedPropagationRef: f,
46
+ hasConsumerStoppedPropagationRef: x,
47
47
  required: d,
48
48
  defaultChecked: $(n) ? !1 : n,
49
49
  isFormControl: C,
50
- bubbleInput: j,
51
- setBubbleInput: v
50
+ bubbleInput: v,
51
+ setBubbleInput: j
52
52
  };
53
53
  return /* @__PURE__ */ e.jsx(
54
54
  Gs,
55
55
  {
56
56
  scope: t,
57
57
  ...w,
58
- children: Xs(m) ? m(w) : a
58
+ children: Xs(m) ? m(w) : i
59
59
  }
60
60
  );
61
61
  }
62
- var De = "CheckboxTrigger", Fe = I(
63
- ({ __scopeCheckbox: s, onKeyDown: t, onClick: r, ...a }, n) => {
62
+ var De = "CheckboxTrigger", Fe = L(
63
+ ({ __scopeCheckbox: s, onKeyDown: t, onClick: r, ...i }, n) => {
64
64
  const {
65
- control: o,
65
+ control: a,
66
66
  value: l,
67
67
  disabled: c,
68
- checked: i,
68
+ checked: o,
69
69
  required: d,
70
70
  setControl: u,
71
71
  setChecked: m,
72
- hasConsumerStoppedPropagationRef: h,
73
- isFormControl: p,
74
- bubbleInput: b
75
- } = xe(De, s), g = $e(n, u), j = _(i);
76
- return L(() => {
77
- const v = o == null ? void 0 : o.form;
78
- if (v) {
79
- const f = () => m(j.current);
80
- return v.addEventListener("reset", f), () => v.removeEventListener("reset", f);
72
+ hasConsumerStoppedPropagationRef: p,
73
+ isFormControl: f,
74
+ bubbleInput: g
75
+ } = xe(De, s), h = $e(n, u), v = _(o);
76
+ return E(() => {
77
+ const j = a == null ? void 0 : a.form;
78
+ if (j) {
79
+ const x = () => m(v.current);
80
+ return j.addEventListener("reset", x), () => j.removeEventListener("reset", x);
81
81
  }
82
- }, [o, m]), /* @__PURE__ */ e.jsx(
82
+ }, [a, m]), /* @__PURE__ */ e.jsx(
83
83
  fe.button,
84
84
  {
85
85
  type: "button",
86
86
  role: "checkbox",
87
- "aria-checked": $(i) ? "mixed" : i,
87
+ "aria-checked": $(o) ? "mixed" : o,
88
88
  "aria-required": d,
89
- "data-state": Ae(i),
89
+ "data-state": Ae(o),
90
90
  "data-disabled": c ? "" : void 0,
91
91
  disabled: c,
92
92
  value: l,
93
- ...a,
94
- ref: g,
95
- onKeyDown: Ne(t, (v) => {
96
- v.key === "Enter" && v.preventDefault();
93
+ ...i,
94
+ ref: h,
95
+ onKeyDown: Ne(t, (j) => {
96
+ j.key === "Enter" && j.preventDefault();
97
97
  }),
98
- onClick: Ne(r, (v) => {
99
- m((f) => $(f) ? !0 : !f), b && p && (h.current = v.isPropagationStopped(), h.current || v.stopPropagation());
98
+ onClick: Ne(r, (j) => {
99
+ m((x) => $(x) ? !0 : !x), g && f && (p.current = j.isPropagationStopped(), p.current || j.stopPropagation());
100
100
  })
101
101
  }
102
102
  );
103
103
  }
104
104
  );
105
105
  Fe.displayName = De;
106
- var be = I(
106
+ var be = L(
107
107
  (s, t) => {
108
108
  const {
109
109
  __scopeCheckbox: r,
110
- name: a,
110
+ name: i,
111
111
  checked: n,
112
- defaultChecked: o,
112
+ defaultChecked: a,
113
113
  required: l,
114
114
  disabled: c,
115
- value: i,
115
+ value: o,
116
116
  onCheckedChange: d,
117
117
  form: u,
118
118
  ...m
@@ -122,14 +122,14 @@ var be = I(
122
122
  {
123
123
  __scopeCheckbox: r,
124
124
  checked: n,
125
- defaultChecked: o,
125
+ defaultChecked: a,
126
126
  disabled: c,
127
127
  required: l,
128
128
  onCheckedChange: d,
129
- name: a,
129
+ name: i,
130
130
  form: u,
131
- value: i,
132
- internal_do_not_use_render: ({ isFormControl: h }) => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
131
+ value: o,
132
+ internal_do_not_use_render: ({ isFormControl: p }) => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
133
133
  /* @__PURE__ */ e.jsx(
134
134
  Fe,
135
135
  {
@@ -138,7 +138,7 @@ var be = I(
138
138
  __scopeCheckbox: r
139
139
  }
140
140
  ),
141
- h && /* @__PURE__ */ e.jsx(
141
+ p && /* @__PURE__ */ e.jsx(
142
142
  He,
143
143
  {
144
144
  __scopeCheckbox: r
@@ -150,18 +150,18 @@ var be = I(
150
150
  }
151
151
  );
152
152
  be.displayName = J;
153
- var ze = "CheckboxIndicator", Oe = I(
153
+ var ze = "CheckboxIndicator", Oe = L(
154
154
  (s, t) => {
155
- const { __scopeCheckbox: r, forceMount: a, ...n } = s, o = xe(ze, r);
155
+ const { __scopeCheckbox: r, forceMount: i, ...n } = s, a = xe(ze, r);
156
156
  return /* @__PURE__ */ e.jsx(
157
- Ls,
157
+ Es,
158
158
  {
159
- present: a || $(o.checked) || o.checked === !0,
159
+ present: i || $(a.checked) || a.checked === !0,
160
160
  children: /* @__PURE__ */ e.jsx(
161
161
  fe.span,
162
162
  {
163
- "data-state": Ae(o.checked),
164
- "data-disabled": o.disabled ? "" : void 0,
163
+ "data-state": Ae(a.checked),
164
+ "data-disabled": a.disabled ? "" : void 0,
165
165
  ...n,
166
166
  ref: t,
167
167
  style: { pointerEvents: "none", ...s.style }
@@ -172,51 +172,51 @@ var ze = "CheckboxIndicator", Oe = I(
172
172
  }
173
173
  );
174
174
  Oe.displayName = ze;
175
- var Be = "CheckboxBubbleInput", He = I(
175
+ var Be = "CheckboxBubbleInput", He = L(
176
176
  ({ __scopeCheckbox: s, ...t }, r) => {
177
177
  const {
178
- control: a,
178
+ control: i,
179
179
  hasConsumerStoppedPropagationRef: n,
180
- checked: o,
180
+ checked: a,
181
181
  defaultChecked: l,
182
182
  required: c,
183
- disabled: i,
183
+ disabled: o,
184
184
  name: d,
185
185
  value: u,
186
186
  form: m,
187
- bubbleInput: h,
188
- setBubbleInput: p
189
- } = xe(Be, s), b = $e(r, p), g = ds(o), j = gs(a);
190
- L(() => {
191
- const f = h;
192
- if (!f) return;
187
+ bubbleInput: p,
188
+ setBubbleInput: f
189
+ } = xe(Be, s), g = $e(r, f), h = ds(a), v = gs(i);
190
+ E(() => {
191
+ const x = p;
192
+ if (!x) return;
193
193
  const C = window.HTMLInputElement.prototype, k = Object.getOwnPropertyDescriptor(
194
194
  C,
195
195
  "checked"
196
196
  ).set, y = !n.current;
197
- if (g !== o && k) {
198
- const x = new Event("click", { bubbles: y });
199
- f.indeterminate = $(o), k.call(f, $(o) ? !1 : o), f.dispatchEvent(x);
197
+ if (h !== a && k) {
198
+ const b = new Event("click", { bubbles: y });
199
+ x.indeterminate = $(a), k.call(x, $(a) ? !1 : a), x.dispatchEvent(b);
200
200
  }
201
- }, [h, g, o, n]);
202
- const v = _($(o) ? !1 : o);
201
+ }, [p, h, a, n]);
202
+ const j = _($(a) ? !1 : a);
203
203
  return /* @__PURE__ */ e.jsx(
204
204
  fe.input,
205
205
  {
206
206
  type: "checkbox",
207
207
  "aria-hidden": !0,
208
- defaultChecked: l ?? v.current,
208
+ defaultChecked: l ?? j.current,
209
209
  required: c,
210
- disabled: i,
210
+ disabled: o,
211
211
  name: d,
212
212
  value: u,
213
213
  form: m,
214
214
  ...t,
215
215
  tabIndex: -1,
216
- ref: b,
216
+ ref: g,
217
217
  style: {
218
218
  ...t.style,
219
- ...j,
219
+ ...v,
220
220
  position: "absolute",
221
221
  pointerEvents: "none",
222
222
  opacity: 0,
@@ -260,7 +260,7 @@ const Zs = Se(
260
260
  function Js({ className: s, variant: t, ...r }) {
261
261
  return /* @__PURE__ */ e.jsx("div", { className: T(Zs({ variant: t }), s), ...r });
262
262
  }
263
- const Ue = I(({ className: s, ...t }, r) => /* @__PURE__ */ e.jsx(
263
+ const Ue = L(({ className: s, ...t }, r) => /* @__PURE__ */ e.jsx(
264
264
  be,
265
265
  {
266
266
  ref: r,
@@ -279,7 +279,7 @@ const Ue = I(({ className: s, ...t }, r) => /* @__PURE__ */ e.jsx(
279
279
  }
280
280
  ));
281
281
  Ue.displayName = be.displayName;
282
- var et = Symbol.for("react.lazy"), K = os[" use ".trim().toString()];
282
+ var et = Symbol.for("react.lazy"), G = is[" use ".trim().toString()];
283
283
  function st(s) {
284
284
  return typeof s == "object" && s !== null && "then" in s;
285
285
  }
@@ -288,25 +288,25 @@ function Ve(s) {
288
288
  }
289
289
  // @__NO_SIDE_EFFECTS__
290
290
  function tt(s) {
291
- const t = /* @__PURE__ */ rt(s), r = I((a, n) => {
292
- let { children: o, ...l } = a;
293
- Ve(o) && typeof K == "function" && (o = K(o._payload));
294
- const c = U.toArray(o), i = c.find(at);
295
- if (i) {
296
- const d = i.props.children, u = c.map((m) => m === i ? U.count(d) > 1 ? U.only(null) : Q(d) ? d.props.children : null : m);
297
- return /* @__PURE__ */ e.jsx(t, { ...l, ref: n, children: Q(d) ? Pe(d, void 0, u) : null });
291
+ const t = /* @__PURE__ */ rt(s), r = L((i, n) => {
292
+ let { children: a, ...l } = i;
293
+ Ve(a) && typeof G == "function" && (a = G(a._payload));
294
+ const c = U.toArray(a), o = c.find(at);
295
+ if (o) {
296
+ const d = o.props.children, u = c.map((m) => m === o ? U.count(d) > 1 ? U.only(null) : K(d) ? d.props.children : null : m);
297
+ return /* @__PURE__ */ e.jsx(t, { ...l, ref: n, children: K(d) ? Pe(d, void 0, u) : null });
298
298
  }
299
- return /* @__PURE__ */ e.jsx(t, { ...l, ref: n, children: o });
299
+ return /* @__PURE__ */ e.jsx(t, { ...l, ref: n, children: a });
300
300
  });
301
301
  return r.displayName = `${s}.Slot`, r;
302
302
  }
303
303
  // @__NO_SIDE_EFFECTS__
304
304
  function rt(s) {
305
- const t = I((r, a) => {
306
- let { children: n, ...o } = r;
307
- if (Ve(n) && typeof K == "function" && (n = K(n._payload)), Q(n)) {
308
- const l = it(n), c = ot(o, n.props);
309
- return n.type !== is && (c.ref = a ? As(a, l) : l), Pe(n, c);
305
+ const t = L((r, i) => {
306
+ let { children: n, ...a } = r;
307
+ if (Ve(n) && typeof G == "function" && (n = G(n._payload)), K(n)) {
308
+ const l = ot(n), c = it(a, n.props);
309
+ return n.type !== os && (c.ref = i ? As(i, l) : l), Pe(n, c);
310
310
  }
311
311
  return U.count(n) > 1 ? U.only(null) : null;
312
312
  });
@@ -314,22 +314,22 @@ function rt(s) {
314
314
  }
315
315
  var nt = Symbol("radix.slottable");
316
316
  function at(s) {
317
- return Q(s) && typeof s.type == "function" && "__radixId" in s.type && s.type.__radixId === nt;
317
+ return K(s) && typeof s.type == "function" && "__radixId" in s.type && s.type.__radixId === nt;
318
318
  }
319
- function ot(s, t) {
319
+ function it(s, t) {
320
320
  const r = { ...t };
321
- for (const a in t) {
322
- const n = s[a], o = t[a];
323
- /^on[A-Z]/.test(a) ? n && o ? r[a] = (...c) => {
324
- const i = o(...c);
325
- return n(...c), i;
326
- } : n && (r[a] = n) : a === "style" ? r[a] = { ...n, ...o } : a === "className" && (r[a] = [n, o].filter(Boolean).join(" "));
321
+ for (const i in t) {
322
+ const n = s[i], a = t[i];
323
+ /^on[A-Z]/.test(i) ? n && a ? r[i] = (...c) => {
324
+ const o = a(...c);
325
+ return n(...c), o;
326
+ } : n && (r[i] = n) : i === "style" ? r[i] = { ...n, ...a } : i === "className" && (r[i] = [n, a].filter(Boolean).join(" "));
327
327
  }
328
328
  return { ...s, ...r };
329
329
  }
330
- function it(s) {
331
- var a, n;
332
- let t = (a = Object.getOwnPropertyDescriptor(s.props, "ref")) == null ? void 0 : a.get, r = t && "isReactWarning" in t && t.isReactWarning;
330
+ function ot(s) {
331
+ var i, n;
332
+ let t = (i = Object.getOwnPropertyDescriptor(s.props, "ref")) == null ? void 0 : i.get, r = t && "isReactWarning" in t && t.isReactWarning;
333
333
  return r ? s.ref : (t = (n = Object.getOwnPropertyDescriptor(s, "ref")) == null ? void 0 : n.get, r = t && "isReactWarning" in t && t.isReactWarning, r ? s.props.ref : s.props.ref || s.ref);
334
334
  }
335
335
  var lt = [
@@ -351,12 +351,12 @@ var lt = [
351
351
  "svg",
352
352
  "ul"
353
353
  ], ct = lt.reduce((s, t) => {
354
- const r = /* @__PURE__ */ tt(`Primitive.${t}`), a = I((n, o) => {
355
- const { asChild: l, ...c } = n, i = l ? r : t;
356
- return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ e.jsx(i, { ...c, ref: o });
354
+ const r = /* @__PURE__ */ tt(`Primitive.${t}`), i = L((n, a) => {
355
+ const { asChild: l, ...c } = n, o = l ? r : t;
356
+ return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ e.jsx(o, { ...c, ref: a });
357
357
  });
358
- return a.displayName = `Primitive.${t}`, { ...s, [t]: a };
359
- }, {}), dt = "Label", qe = I((s, t) => /* @__PURE__ */ e.jsx(
358
+ return i.displayName = `Primitive.${t}`, { ...s, [t]: i };
359
+ }, {}), dt = "Label", qe = L((s, t) => /* @__PURE__ */ e.jsx(
360
360
  ct.label,
361
361
  {
362
362
  ...s,
@@ -371,7 +371,7 @@ qe.displayName = dt;
371
371
  var We = qe;
372
372
  const mt = Se(
373
373
  "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
374
- ), Qe = I(({ className: s, ...t }, r) => /* @__PURE__ */ e.jsx(
374
+ ), Qe = L(({ className: s, ...t }, r) => /* @__PURE__ */ e.jsx(
375
375
  We,
376
376
  {
377
377
  ref: r,
@@ -383,10 +383,10 @@ Qe.displayName = We.displayName;
383
383
  const ut = ({ children: s, className: t, ...r }) => /* @__PURE__ */ e.jsx("section", { className: T("flex gap-6 flex-col p-4 lg:p-8 size-full grow", t), ...r, children: s }), Ke = "MembersResponseType", ht = hs({
384
384
  dataType: Ke,
385
385
  path: "/members/"
386
- }), pt = Y({
386
+ }), pt = X({
387
387
  dataType: Ke,
388
388
  path: (s) => `/members/${s}/`
389
- }), ft = X({
389
+ }), ft = Z({
390
390
  method: "POST",
391
391
  path: ({ id: s }) => `/members/${s}/commenting/disable`,
392
392
  body: ({ reason: s, hideComments: t }) => ({
@@ -396,7 +396,7 @@ const ut = ({ children: s, className: t, ...r }) => /* @__PURE__ */ e.jsx("secti
396
396
  invalidateQueries: {
397
397
  dataType: "CommentsResponseType"
398
398
  }
399
- }), xt = X({
399
+ }), xt = Z({
400
400
  method: "POST",
401
401
  path: ({ id: s }) => `/members/${s}/commenting/enable`,
402
402
  body: () => ({}),
@@ -408,96 +408,96 @@ function ke({
408
408
  knownItems: s,
409
409
  useSearch: t,
410
410
  useGetById: r,
411
- filters: a,
411
+ filters: i,
412
412
  filterFieldName: n,
413
- searchFieldName: o,
413
+ searchFieldName: a,
414
414
  toOption: l
415
415
  }) {
416
- const [c, i] = R(""), { data: d, isLoading: u } = t(c), m = E(() => {
417
- const f = a.find((C) => C.field === n);
418
- return f != null && f.values[0] ? String(f.values[0]) : "";
419
- }, [a, n]), h = E(() => !m || s.some((C) => C.id === m) ? !1 : !((d == null ? void 0 : d[o]) ?? []).some((C) => C.id === m), [m, s, d, o]), { data: p, isLoading: b } = r(m || "", {
420
- enabled: h,
416
+ const [c, o] = R(""), { data: d, isLoading: u } = t(c), m = I(() => {
417
+ const x = i.find((C) => C.field === n);
418
+ return x != null && x.values[0] ? String(x.values[0]) : "";
419
+ }, [i, n]), p = I(() => !m || s.some((C) => C.id === m) ? !1 : !((d == null ? void 0 : d[a]) ?? []).some((C) => C.id === m), [m, s, d, a]), { data: f, isLoading: g } = r(m || "", {
420
+ enabled: p,
421
421
  defaultErrorHandler: !1
422
- }), g = u || b, j = V((f) => l(f), [l]);
422
+ }), h = u || g, v = V((x) => l(x), [l]);
423
423
  return {
424
- options: E(() => {
424
+ options: I(() => {
425
425
  var k;
426
- const f = (d == null ? void 0 : d[o]) ?? [], C = {};
426
+ const x = (d == null ? void 0 : d[a]) ?? [], C = {};
427
427
  for (const y of s)
428
- C[y.id] = j(y);
429
- for (const y of f)
430
- C[y.id] = j(y);
431
- const w = (k = p == null ? void 0 : p[o]) == null ? void 0 : k[0];
432
- return w != null && w.id && (C[w.id] = j(w)), m && !(m in C) && (C[m] = { value: m, label: `ID: ${m}` }), Object.values(C);
433
- }, [s, d, o, p, m, j]),
434
- isLoading: g,
428
+ C[y.id] = v(y);
429
+ for (const y of x)
430
+ C[y.id] = v(y);
431
+ const w = (k = f == null ? void 0 : f[a]) == null ? void 0 : k[0];
432
+ return w != null && w.id && (C[w.id] = v(w)), m && !(m in C) && (C[m] = { value: m, label: `ID: ${m}` }), Object.values(C);
433
+ }, [s, d, a, f, m, v]),
434
+ isLoading: h,
435
435
  searchValue: c,
436
- onSearchChange: i
436
+ onSearchChange: o
437
437
  };
438
438
  }
439
- function bt(s, t, r, a) {
440
- var n = this, o = _(null), l = _(0), c = _(0), i = _(null), d = _([]), u = _(), m = _(), h = _(s), p = _(!0);
441
- h.current = s;
442
- var b = typeof window < "u", g = !t && t !== 0 && b;
439
+ function bt(s, t, r, i) {
440
+ var n = this, a = _(null), l = _(0), c = _(0), o = _(null), d = _([]), u = _(), m = _(), p = _(s), f = _(!0);
441
+ p.current = s;
442
+ var g = typeof window < "u", h = !t && t !== 0 && g;
443
443
  if (typeof s != "function") throw new TypeError("Expected a function");
444
444
  t = +t || 0;
445
- var j = !!(r = r || {}).leading, v = !("trailing" in r) || !!r.trailing, f = "maxWait" in r, C = "debounceOnServer" in r && !!r.debounceOnServer, w = f ? Math.max(+r.maxWait || 0, t) : null;
446
- L(function() {
447
- return p.current = !0, function() {
448
- p.current = !1;
445
+ var v = !!(r = r || {}).leading, j = !("trailing" in r) || !!r.trailing, x = "maxWait" in r, C = "debounceOnServer" in r && !!r.debounceOnServer, w = x ? Math.max(+r.maxWait || 0, t) : null;
446
+ E(function() {
447
+ return f.current = !0, function() {
448
+ f.current = !1;
449
449
  };
450
450
  }, []);
451
- var k = E(function() {
451
+ var k = I(function() {
452
452
  var y = function(N) {
453
453
  var S = d.current, z = u.current;
454
- return d.current = u.current = null, l.current = N, c.current = c.current || N, m.current = h.current.apply(z, S);
455
- }, x = function(N, S) {
456
- g && cancelAnimationFrame(i.current), i.current = g ? requestAnimationFrame(N) : setTimeout(N, S);
454
+ return d.current = u.current = null, l.current = N, c.current = c.current || N, m.current = p.current.apply(z, S);
455
+ }, b = function(N, S) {
456
+ h && cancelAnimationFrame(o.current), o.current = h ? requestAnimationFrame(N) : setTimeout(N, S);
457
457
  }, M = function(N) {
458
- if (!p.current) return !1;
459
- var S = N - o.current;
460
- return !o.current || S >= t || S < 0 || f && N - l.current >= w;
458
+ if (!f.current) return !1;
459
+ var S = N - a.current;
460
+ return !a.current || S >= t || S < 0 || x && N - l.current >= w;
461
461
  }, H = function(N) {
462
- return i.current = null, v && d.current ? y(N) : (d.current = u.current = null, m.current);
462
+ return o.current = null, j && d.current ? y(N) : (d.current = u.current = null, m.current);
463
463
  }, D = function N() {
464
464
  var S = Date.now();
465
- if (j && c.current === l.current && O(), M(S)) return H(S);
466
- if (p.current) {
467
- var z = t - (S - o.current), W = f ? Math.min(z, w - (S - l.current)) : z;
468
- x(N, W);
465
+ if (v && c.current === l.current && O(), M(S)) return H(S);
466
+ if (f.current) {
467
+ var z = t - (S - a.current), Q = x ? Math.min(z, w - (S - l.current)) : z;
468
+ b(N, Q);
469
469
  }
470
470
  }, O = function() {
471
- a && a({});
471
+ i && i({});
472
472
  }, F = function() {
473
- if (b || C) {
473
+ if (g || C) {
474
474
  var N = Date.now(), S = M(N);
475
- if (d.current = [].slice.call(arguments), u.current = n, o.current = N, S) {
476
- if (!i.current && p.current) return l.current = o.current, x(D, t), j ? y(o.current) : m.current;
477
- if (f) return x(D, t), y(o.current);
475
+ if (d.current = [].slice.call(arguments), u.current = n, a.current = N, S) {
476
+ if (!o.current && f.current) return l.current = a.current, b(D, t), v ? y(a.current) : m.current;
477
+ if (x) return b(D, t), y(a.current);
478
478
  }
479
- return i.current || x(D, t), m.current;
479
+ return o.current || b(D, t), m.current;
480
480
  }
481
481
  };
482
482
  return F.cancel = function() {
483
- var N = i.current;
484
- N && (g ? cancelAnimationFrame(i.current) : clearTimeout(i.current)), l.current = 0, d.current = o.current = u.current = i.current = null, N && a && a({});
483
+ var N = o.current;
484
+ N && (h ? cancelAnimationFrame(o.current) : clearTimeout(o.current)), l.current = 0, d.current = a.current = u.current = o.current = null, N && i && i({});
485
485
  }, F.isPending = function() {
486
- return !!i.current;
486
+ return !!o.current;
487
487
  }, F.flush = function() {
488
- return i.current ? H(Date.now()) : m.current;
488
+ return o.current ? H(Date.now()) : m.current;
489
489
  }, F;
490
- }, [j, f, t, w, v, g, b, C, a]);
490
+ }, [v, x, t, w, j, h, g, C, i]);
491
491
  return k;
492
492
  }
493
493
  function gt(s, t) {
494
494
  return s === t;
495
495
  }
496
496
  function Ge(s, t, r) {
497
- var a = gt, n = _(s), o = R({})[1], l = bt(V(function(i) {
498
- n.current = i, o({});
499
- }, [o]), t, r, o), c = _(s);
500
- return a(c.current, s) || (l(s), c.current = s), [n.current, l];
497
+ var i = gt, n = _(s), a = R({})[1], l = bt(V(function(o) {
498
+ n.current = o, a({});
499
+ }, [a]), t, r, a), c = _(s);
500
+ return i(c.current, s) || (l(s), c.current = s), [n.current, l];
501
501
  }
502
502
  function jt(s) {
503
503
  const [t] = Ge(s, 200);
@@ -524,7 +524,7 @@ const Ct = ({
524
524
  knownPosts: s,
525
525
  knownMembers: t,
526
526
  filters: r,
527
- onFiltersChange: a
527
+ onFiltersChange: i
528
528
  }) => {
529
529
  const n = ke({
530
530
  knownItems: s,
@@ -537,7 +537,7 @@ const Ct = ({
537
537
  value: d.id,
538
538
  label: d.title || "(Untitled)"
539
539
  })
540
- }), o = ke({
540
+ }), a = ke({
541
541
  knownItems: t,
542
542
  useSearch: jt,
543
543
  useGetById: pt,
@@ -549,17 +549,17 @@ const Ct = ({
549
549
  label: d.name || "Unknown name",
550
550
  detail: d.email ?? "(Unknown email)"
551
551
  })
552
- }), l = E(
552
+ }), l = I(
553
553
  () => [
554
554
  {
555
555
  key: "author",
556
556
  label: "Author",
557
557
  type: "select",
558
- icon: /* @__PURE__ */ e.jsx(ie, { className: "size-4" }),
559
- options: o.options,
560
- isLoading: o.options.length === 0 && o.isLoading,
561
- onSearchChange: o.onSearchChange,
562
- searchValue: o.searchValue,
558
+ icon: /* @__PURE__ */ e.jsx(oe, { className: "size-4" }),
559
+ options: a.options,
560
+ isLoading: a.options.length === 0 && a.isLoading,
561
+ onSearchChange: a.onSearchChange,
562
+ searchValue: a.searchValue,
563
563
  searchable: !0,
564
564
  className: "w-80",
565
565
  popoverContentClassName: "w-80",
@@ -642,13 +642,13 @@ const Ct = ({
642
642
  ]
643
643
  }
644
644
  ],
645
- [n, o]
646
- ), c = r.length > 0, i = T(
645
+ [n, a]
646
+ ), c = r.length > 0, o = T(
647
647
  "flex flex-row",
648
648
  !c && "[grid-area:actions] pt-5 justify-start sm:justify-end sm:pt-0",
649
649
  c && "col-start-1 col-end-4 row-start-3 pt-5"
650
650
  );
651
- return /* @__PURE__ */ e.jsx("div", { className: i, children: /* @__PURE__ */ e.jsx(
651
+ return /* @__PURE__ */ e.jsx("div", { className: o, children: /* @__PURE__ */ e.jsx(
652
652
  ms,
653
653
  {
654
654
  addButtonIcon: c ? /* @__PURE__ */ e.jsx(Ps, {}) : /* @__PURE__ */ e.jsx(Ts, {}),
@@ -664,7 +664,7 @@ const Ct = ({
664
664
  popoverAlign: c ? "start" : "end",
665
665
  showClearButton: c,
666
666
  showSearchInput: !1,
667
- onChange: a
667
+ onChange: i
668
668
  }
669
669
  ) });
670
670
  }, yt = ({ children: s }) => /* @__PURE__ */ e.jsxs(ye, { className: "relative !pb-6 md:sticky", variant: "inline-nav", children: [
@@ -686,12 +686,12 @@ function kt({ onClick: s, expanded: t }) {
686
686
  );
687
687
  }
688
688
  function Ye({ item: s }) {
689
- const t = _(null), [r, a] = R(!1), [n, o] = R(!1);
690
- return L(() => {
689
+ const t = _(null), [r, i] = R(!1), [n, a] = R(!1);
690
+ return E(() => {
691
691
  if (n)
692
692
  return;
693
693
  const l = () => {
694
- t.current && a(t.current.scrollHeight > t.current.clientHeight);
694
+ t.current && i(t.current.scrollHeight > t.current.clientHeight);
695
695
  };
696
696
  return l(), window.addEventListener("resize", l), () => window.removeEventListener("resize", l);
697
697
  }, [s.html, n]), /* @__PURE__ */ e.jsx("div", { className: "mt-1 flex flex-col gap-2", children: /* @__PURE__ */ e.jsxs("div", { className: `flex max-w-full flex-col items-start ${s.status === "hidden" && "opacity-50"}`, children: [
@@ -706,25 +706,25 @@ function Ye({ item: s }) {
706
706
  )
707
707
  }
708
708
  ),
709
- r && /* @__PURE__ */ e.jsx(kt, { expanded: n, onClick: () => o(!n) })
709
+ r && /* @__PURE__ */ e.jsx(kt, { expanded: n, onClick: () => a(!n) })
710
710
  ] }) });
711
711
  }
712
712
  const ee = "CommentsResponseType", wt = ps({
713
713
  dataType: ee,
714
714
  path: "/comments/",
715
715
  defaultNextPageParams: (s, t) => {
716
- var r, a;
716
+ var r, i;
717
717
  return (r = s.meta) != null && r.pagination.next ? {
718
718
  ...t,
719
- page: (((a = s.meta) == null ? void 0 : a.pagination.next) || 1).toString()
719
+ page: (((i = s.meta) == null ? void 0 : i.pagination.next) || 1).toString()
720
720
  } : void 0;
721
721
  },
722
722
  returnData: (s) => {
723
- const { pages: t } = s, r = t.flatMap((n) => n.comments), a = t[t.length - 1].meta;
723
+ const { pages: t } = s, r = t.flatMap((n) => n.comments), i = t[t.length - 1].meta;
724
724
  return {
725
725
  comments: r,
726
- meta: a,
727
- isEnd: a ? a.pagination.pages === a.pagination.page : !0
726
+ meta: i,
727
+ isEnd: i ? i.pagination.pages === i.pagination.page : !0
728
728
  };
729
729
  }
730
730
  }), Xe = (s) => wt({
@@ -735,7 +735,7 @@ const ee = "CommentsResponseType", wt = ps({
735
735
  include: "member,post,parent",
736
736
  ...s == null ? void 0 : s.searchParams
737
737
  }
738
- }), Ze = X({
738
+ }), Ze = Z({
739
739
  method: "PUT",
740
740
  path: ({ id: s }) => `/comments/${s}/`,
741
741
  body: ({ id: s }) => ({
@@ -747,7 +747,7 @@ const ee = "CommentsResponseType", wt = ps({
747
747
  invalidateQueries: {
748
748
  dataType: ee
749
749
  }
750
- }), Je = X({
750
+ }), Je = Z({
751
751
  method: "PUT",
752
752
  path: ({ id: s }) => `/comments/${s}/`,
753
753
  body: ({ id: s }) => ({
@@ -759,16 +759,16 @@ const ee = "CommentsResponseType", wt = ps({
759
759
  invalidateQueries: {
760
760
  dataType: ee
761
761
  }
762
- }), _t = Y({
762
+ }), _t = X({
763
763
  dataType: ee,
764
764
  path: (s) => `/comments/${s}/`,
765
765
  defaultSearchParams: {
766
766
  include: "member,post,count.replies,count.direct_replies,count.likes,count.reports,parent,in_reply_to"
767
767
  }
768
- }), St = Y({
768
+ }), St = X({
769
769
  dataType: "CommentReportsResponseType",
770
770
  path: (s) => `/comments/${s}/reports/`
771
- }), Pt = (s, t) => St(s, { ...t }), Tt = Y({
771
+ }), Pt = (s, t) => St(s, { ...t }), Tt = X({
772
772
  dataType: "CommentLikesResponseType",
773
773
  path: (s) => `/comments/${s}/likes/`,
774
774
  defaultSearchParams: {
@@ -776,7 +776,7 @@ const ee = "CommentsResponseType", wt = ps({
776
776
  limit: "100",
777
777
  order: "created_at desc"
778
778
  }
779
- }), Rt = (s, t) => Tt(s, { ...t }), It = (s, t) => Xe({
779
+ }), Rt = (s, t) => Tt(s, { ...t }), Lt = (s, t) => Xe({
780
780
  ...t,
781
781
  searchParams: {
782
782
  filter: `(parent_id:${s}+in_reply_to_id:null),in_reply_to_id:${s}`,
@@ -785,17 +785,17 @@ const ee = "CommentsResponseType", wt = ps({
785
785
  limit: "100"
786
786
  }
787
787
  });
788
- function B({ avatarImage: s, memberId: t, isHidden: r, className: a }) {
788
+ function B({ avatarImage: s, memberId: t, isHidden: r, className: i }) {
789
789
  return /* @__PURE__ */ e.jsxs("div", { className: T(
790
790
  "relative flex size-6 min-w-6 items-center justify-center overflow-hidden rounded-full bg-accent md:size-8 md:min-w-8",
791
791
  r && "opacity-50",
792
- a
792
+ i
793
793
  ), children: [
794
794
  t && s && /* @__PURE__ */ e.jsx("div", { className: "absolute inset-0", children: /* @__PURE__ */ e.jsx("img", { alt: "Member avatar", src: s }) }),
795
- /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx(ie, { className: "!size-3 text-muted-foreground md:!size-4", size: 12 }) })
795
+ /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx(oe, { className: "!size-3 text-muted-foreground md:!size-4", size: 12 }) })
796
796
  ] });
797
797
  }
798
- function Et(s) {
798
+ function It(s) {
799
799
  const t = new Date(s);
800
800
  return new Intl.DateTimeFormat("en-US", {
801
801
  month: "short",
@@ -809,24 +809,24 @@ function es({
809
809
  memberName: s,
810
810
  memberId: t,
811
811
  createdAt: r,
812
- isHidden: a,
812
+ isHidden: i,
813
813
  canComment: n,
814
- onAuthorClick: o,
814
+ onAuthorClick: a,
815
815
  postTitle: l,
816
816
  onPostClick: c,
817
- className: i
817
+ className: o
818
818
  }) {
819
- return /* @__PURE__ */ e.jsxs("div", { className: T("flex items-baseline gap-4", i), children: [
819
+ return /* @__PURE__ */ e.jsxs("div", { className: T("flex items-baseline gap-4", o), children: [
820
820
  /* @__PURE__ */ e.jsxs("div", { className: T(
821
821
  "mb-1 flex min-w-0 items-center gap-x-1 text-sm",
822
- a && "opacity-50"
822
+ i && "opacity-50"
823
823
  ), children: [
824
- /* @__PURE__ */ e.jsx("div", { className: "whitespace-nowrap", children: t && o ? /* @__PURE__ */ e.jsx(
824
+ /* @__PURE__ */ e.jsx("div", { className: "whitespace-nowrap", children: t && a ? /* @__PURE__ */ e.jsx(
825
825
  P,
826
826
  {
827
827
  className: "flex h-auto items-center gap-1.5 truncate p-0 font-semibold text-primary hover:opacity-70",
828
828
  variant: "link",
829
- onClick: o,
829
+ onClick: a,
830
830
  children: s || "Unknown"
831
831
  }
832
832
  ) : /* @__PURE__ */ e.jsx("span", { className: "block truncate font-semibold", children: s || "Unknown" }) }),
@@ -842,7 +842,7 @@ function es({
842
842
  /* @__PURE__ */ e.jsx(ce, { className: "shrink-0 text-muted-foreground/50", size: 16 }),
843
843
  /* @__PURE__ */ e.jsx("div", { className: "shrink-0 whitespace-nowrap", children: r && /* @__PURE__ */ e.jsx(te, { children: /* @__PURE__ */ e.jsxs(re, { children: [
844
844
  /* @__PURE__ */ e.jsx(ne, { asChild: !0, children: /* @__PURE__ */ e.jsx("span", { className: "cursor-default text-sm text-muted-foreground", children: q(r) }) }),
845
- /* @__PURE__ */ e.jsx(ae, { children: Et(r) })
845
+ /* @__PURE__ */ e.jsx(ae, { children: It(r) })
846
846
  ] }) }) }),
847
847
  l && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
848
848
  /* @__PURE__ */ e.jsx("div", { className: "shrink-0 text-muted-foreground", children: "on" }),
@@ -857,19 +857,19 @@ function es({
857
857
  ) : /* @__PURE__ */ e.jsx("span", { className: "font-medium text-gray-800 dark:text-gray-400", children: l }) })
858
858
  ] })
859
859
  ] }),
860
- a && /* @__PURE__ */ e.jsx(Js, { variant: "secondary", children: "Hidden" })
860
+ i && /* @__PURE__ */ e.jsx(Js, { variant: "secondary", children: "Hidden" })
861
861
  ] });
862
862
  }
863
- function Lt({
863
+ function Et({
864
864
  open: s,
865
865
  memberName: t,
866
866
  onOpenChange: r,
867
- onConfirm: a
867
+ onConfirm: i
868
868
  }) {
869
- const [n, o] = R(!1), l = (i) => {
870
- i || o(!1), r(i);
869
+ const [n, a] = R(!1), l = (o) => {
870
+ o || a(!1), r(o);
871
871
  }, c = () => {
872
- a(n), o(!1);
872
+ i(n), a(!1);
873
873
  };
874
874
  return /* @__PURE__ */ e.jsx(de, { open: s, onOpenChange: l, children: /* @__PURE__ */ e.jsxs(me, { className: "gap-5", children: [
875
875
  /* @__PURE__ */ e.jsxs(ue, { children: [
@@ -885,7 +885,7 @@ function Lt({
885
885
  {
886
886
  checked: n,
887
887
  id: "hide-comments",
888
- onCheckedChange: (i) => o(i === !0)
888
+ onCheckedChange: (o) => a(o === !0)
889
889
  }
890
890
  ),
891
891
  /* @__PURE__ */ e.jsx(Qe, { htmlFor: "hide-comments", children: "Hide all previous comments" })
@@ -900,14 +900,14 @@ function ss({
900
900
  comment: s,
901
901
  commentPermalinksEnabled: t
902
902
  }) {
903
- const { mutate: r } = ft(), { mutate: a } = xt(), [n, o] = R(!1), { id: l, post: c, member: i } = s, d = c == null ? void 0 : c.url, u = i == null ? void 0 : i.id, m = i == null ? void 0 : i.can_comment, h = (b) => {
903
+ const { mutate: r } = ft(), { mutate: i } = xt(), [n, a] = R(!1), { id: l, post: c, member: o } = s, d = c == null ? void 0 : c.url, u = o == null ? void 0 : o.id, m = o == null ? void 0 : o.can_comment, p = (g) => {
904
904
  u && (r({
905
905
  id: u,
906
906
  reason: `Disabled from comment ${l}`,
907
- hideComments: b
908
- }), o(!1));
909
- }, p = () => {
910
- u && a({ id: u });
907
+ hideComments: g
908
+ }), a(!1));
909
+ }, f = () => {
910
+ u && i({ id: u });
911
911
  };
912
912
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
913
913
  /* @__PURE__ */ e.jsxs(vs, { children: [
@@ -929,32 +929,32 @@ function ss({
929
929
  "View post"
930
930
  ] }) })),
931
931
  u && /* @__PURE__ */ e.jsx(A, { asChild: !0, children: /* @__PURE__ */ e.jsxs("a", { href: `#/members/${u}`, children: [
932
- /* @__PURE__ */ e.jsx(ie, { className: "size-4" }),
932
+ /* @__PURE__ */ e.jsx(oe, { className: "size-4" }),
933
933
  "View member"
934
934
  ] }) }),
935
- u && (m !== !1 ? /* @__PURE__ */ e.jsxs(A, { onClick: () => o(!0), children: [
935
+ u && (m !== !1 ? /* @__PURE__ */ e.jsxs(A, { onClick: () => a(!0), children: [
936
936
  /* @__PURE__ */ e.jsx(Te, { className: "size-4" }),
937
937
  "Disable commenting"
938
- ] }) : /* @__PURE__ */ e.jsxs(A, { onClick: p, children: [
939
- /* @__PURE__ */ e.jsx(Is, { className: "size-4" }),
938
+ ] }) : /* @__PURE__ */ e.jsxs(A, { onClick: f, children: [
939
+ /* @__PURE__ */ e.jsx(Ls, { className: "size-4" }),
940
940
  "Enable commenting"
941
941
  ] }))
942
942
  ] })
943
943
  ] }),
944
944
  /* @__PURE__ */ e.jsx(
945
- Lt,
945
+ Et,
946
946
  {
947
- memberName: i == null ? void 0 : i.name,
947
+ memberName: o == null ? void 0 : o.name,
948
948
  open: n,
949
- onConfirm: h,
950
- onOpenChange: o
949
+ onConfirm: p,
950
+ onOpenChange: a
951
951
  }
952
952
  )
953
953
  ] });
954
954
  }
955
955
  function $t({ comment: s, open: t, onOpenChange: r }) {
956
- var i, d, u, m, h;
957
- const { data: a, isLoading: n } = Rt(s.id, { enabled: t }), o = (a == null ? void 0 : a.comment_likes) ?? [], l = ((i = s.count) == null ? void 0 : i.likes) ?? 0, c = l - o.length;
956
+ var o, d, u, m, p;
957
+ const { data: i, isLoading: n } = Rt(s.id, { enabled: t }), a = (i == null ? void 0 : i.comment_likes) ?? [], l = ((o = s.count) == null ? void 0 : o.likes) ?? 0, c = l - a.length;
958
958
  return /* @__PURE__ */ e.jsx(de, { open: t, onOpenChange: r, children: /* @__PURE__ */ e.jsxs(me, { "aria-describedby": void 0, children: [
959
959
  /* @__PURE__ */ e.jsx(ue, { children: /* @__PURE__ */ e.jsxs(he, { children: [
960
960
  l,
@@ -976,7 +976,7 @@ function $t({ comment: s, open: t, onOpenChange: r }) {
976
976
  /* @__PURE__ */ e.jsx(ce, { className: "shrink-0 text-muted-foreground/50", size: 16 }),
977
977
  /* @__PURE__ */ e.jsx("span", { className: "shrink-0 text-muted-foreground", children: s.created_at && q(s.created_at) }),
978
978
  /* @__PURE__ */ e.jsx("span", { className: "shrink-0 text-muted-foreground", children: "on" }),
979
- /* @__PURE__ */ e.jsx("span", { className: "min-w-0 truncate font-medium text-gray-800 dark:text-gray-400", children: ((h = s.post) == null ? void 0 : h.title) || "Unknown post" })
979
+ /* @__PURE__ */ e.jsx("span", { className: "min-w-0 truncate font-medium text-gray-800 dark:text-gray-400", children: ((p = s.post) == null ? void 0 : p.title) || "Unknown post" })
980
980
  ] }),
981
981
  /* @__PURE__ */ e.jsx(
982
982
  "div",
@@ -987,25 +987,25 @@ function $t({ comment: s, open: t, onOpenChange: r }) {
987
987
  )
988
988
  ] })
989
989
  ] }) }),
990
- /* @__PURE__ */ e.jsx("div", { className: "-mx-1 max-h-64 overflow-y-auto px-1", children: n ? /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-4", children: /* @__PURE__ */ e.jsx(Z, { size: "md" }) }) : /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-3 pb-1", children: [
991
- o.map((p) => {
992
- var b, g, j;
990
+ /* @__PURE__ */ e.jsx("div", { className: "-mx-1 max-h-64 overflow-y-auto px-1", children: n ? /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-4", children: /* @__PURE__ */ e.jsx(W, { size: "md" }) }) : /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-3 pb-1", children: [
991
+ a.map((f) => {
992
+ var g, h, v;
993
993
  return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between gap-3", children: [
994
994
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-3", children: [
995
995
  /* @__PURE__ */ e.jsxs("div", { className: "relative shrink-0", children: [
996
996
  /* @__PURE__ */ e.jsx(
997
997
  B,
998
998
  {
999
- avatarImage: (b = p.member) == null ? void 0 : b.avatar_image,
1000
- memberId: (g = p.member) == null ? void 0 : g.id
999
+ avatarImage: (g = f.member) == null ? void 0 : g.avatar_image,
1000
+ memberId: (h = f.member) == null ? void 0 : h.id
1001
1001
  }
1002
1002
  ),
1003
1003
  /* @__PURE__ */ e.jsx("div", { className: "absolute -bottom-0.5 -right-0.5 flex size-4 items-center justify-center rounded-full bg-pink-500 text-white", children: /* @__PURE__ */ e.jsx(Re, { className: "size-2.5", fill: "currentColor" }) })
1004
1004
  ] }),
1005
- /* @__PURE__ */ e.jsx("span", { className: "font-medium", children: ((j = p.member) == null ? void 0 : j.name) || "Deleted member" })
1005
+ /* @__PURE__ */ e.jsx("span", { className: "font-medium", children: ((v = f.member) == null ? void 0 : v.name) || "Deleted member" })
1006
1006
  ] }),
1007
- /* @__PURE__ */ e.jsx("span", { className: "shrink-0 text-sm text-muted-foreground", children: q(p.created_at) })
1008
- ] }, p.id);
1007
+ /* @__PURE__ */ e.jsx("span", { className: "shrink-0 text-sm text-muted-foreground", children: q(f.created_at) })
1008
+ ] }, f.id);
1009
1009
  }),
1010
1010
  c > 0 && /* @__PURE__ */ e.jsxs("div", { className: "pt-1 text-center text-sm text-muted-foreground", children: [
1011
1011
  "and ",
@@ -1017,8 +1017,8 @@ function $t({ comment: s, open: t, onOpenChange: r }) {
1017
1017
  ] }) });
1018
1018
  }
1019
1019
  function Mt({ comment: s, open: t, onOpenChange: r }) {
1020
- var c, i, d, u, m;
1021
- const { data: a, isLoading: n } = Pt(s.id, { enabled: t }), o = (a == null ? void 0 : a.comment_reports) ?? [], l = ((c = s.count) == null ? void 0 : c.reports) ?? o.length;
1020
+ var c, o, d, u, m;
1021
+ const { data: i, isLoading: n } = Pt(s.id, { enabled: t }), a = (i == null ? void 0 : i.comment_reports) ?? [], l = ((c = s.count) == null ? void 0 : c.reports) ?? a.length;
1022
1022
  return /* @__PURE__ */ e.jsx(de, { open: t, onOpenChange: r, children: /* @__PURE__ */ e.jsxs(me, { "aria-describedby": void 0, children: [
1023
1023
  /* @__PURE__ */ e.jsx(ue, { children: /* @__PURE__ */ e.jsxs(he, { children: [
1024
1024
  l,
@@ -1029,7 +1029,7 @@ function Mt({ comment: s, open: t, onOpenChange: r }) {
1029
1029
  /* @__PURE__ */ e.jsx(
1030
1030
  B,
1031
1031
  {
1032
- avatarImage: (i = s.member) == null ? void 0 : i.avatar_image,
1032
+ avatarImage: (o = s.member) == null ? void 0 : o.avatar_image,
1033
1033
  className: "shrink-0",
1034
1034
  memberId: (d = s.member) == null ? void 0 : d.id
1035
1035
  }
@@ -1051,44 +1051,44 @@ function Mt({ comment: s, open: t, onOpenChange: r }) {
1051
1051
  )
1052
1052
  ] })
1053
1053
  ] }) }),
1054
- /* @__PURE__ */ e.jsx("div", { className: "-mx-1 max-h-64 overflow-y-auto px-1", children: n ? /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-4", children: /* @__PURE__ */ e.jsx(Z, { size: "md" }) }) : /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-3 pb-1", children: o.map((h) => {
1055
- var p, b, g;
1054
+ /* @__PURE__ */ e.jsx("div", { className: "-mx-1 max-h-64 overflow-y-auto px-1", children: n ? /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-4", children: /* @__PURE__ */ e.jsx(W, { size: "md" }) }) : /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-3 pb-1", children: a.map((p) => {
1055
+ var f, g, h;
1056
1056
  return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between gap-3", children: [
1057
1057
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-3", children: [
1058
1058
  /* @__PURE__ */ e.jsxs("div", { className: "relative shrink-0", children: [
1059
1059
  /* @__PURE__ */ e.jsx(
1060
1060
  B,
1061
1061
  {
1062
- avatarImage: (p = h.member) == null ? void 0 : p.avatar_image,
1063
- memberId: (b = h.member) == null ? void 0 : b.id
1062
+ avatarImage: (f = p.member) == null ? void 0 : f.avatar_image,
1063
+ memberId: (g = p.member) == null ? void 0 : g.id
1064
1064
  }
1065
1065
  ),
1066
1066
  /* @__PURE__ */ e.jsx("div", { className: "absolute -bottom-0.5 -right-0.5 flex size-4 items-center justify-center rounded-full bg-red text-white", children: /* @__PURE__ */ e.jsx(le, { className: "size-2.5", fill: "currentColor" }) })
1067
1067
  ] }),
1068
- /* @__PURE__ */ e.jsx("span", { className: "font-medium", children: ((g = h.member) == null ? void 0 : g.name) || "Deleted member" })
1068
+ /* @__PURE__ */ e.jsx("span", { className: "font-medium", children: ((h = p.member) == null ? void 0 : h.name) || "Deleted member" })
1069
1069
  ] }),
1070
- /* @__PURE__ */ e.jsx("span", { className: "shrink-0 text-sm text-muted-foreground", children: q(h.created_at) })
1071
- ] }, h.id);
1070
+ /* @__PURE__ */ e.jsx("span", { className: "shrink-0 text-sm text-muted-foreground", children: q(p.created_at) })
1071
+ ] }, p.id);
1072
1072
  }) }) }),
1073
1073
  /* @__PURE__ */ e.jsx(pe, { children: /* @__PURE__ */ e.jsx(P, { onClick: () => r(!1), children: "OK" }) })
1074
1074
  ] }) });
1075
1075
  }
1076
- function se({ icon: s, count: t, label: r, to: a, onClick: n, className: o, testId: l }) {
1077
- const c = T("flex items-center gap-1 text-xs text-gray-800", o), i = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1076
+ function se({ icon: s, count: t, label: r, to: i, onClick: n, className: a, testId: l }) {
1077
+ const c = T("flex items-center gap-1 text-xs text-gray-800", a), o = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1078
1078
  s,
1079
1079
  /* @__PURE__ */ e.jsx("span", { children: ls(t) })
1080
- ] }), d = a || n;
1080
+ ] }), d = i || n;
1081
1081
  return /* @__PURE__ */ e.jsx(te, { children: /* @__PURE__ */ e.jsxs(re, { children: [
1082
- /* @__PURE__ */ e.jsx(ne, { asChild: !0, children: a ? /* @__PURE__ */ e.jsx(
1083
- oe,
1082
+ /* @__PURE__ */ e.jsx(ne, { asChild: !0, children: i ? /* @__PURE__ */ e.jsx(
1083
+ ie,
1084
1084
  {
1085
1085
  className: T(c, "cursor-pointer hover:opacity-70"),
1086
1086
  "data-testid": l,
1087
- to: a,
1087
+ to: i,
1088
1088
  onClick: (u) => {
1089
1089
  u.stopPropagation();
1090
1090
  },
1091
- children: i
1091
+ children: o
1092
1092
  }
1093
1093
  ) : n ? /* @__PURE__ */ e.jsx(
1094
1094
  "button",
@@ -1099,9 +1099,9 @@ function se({ icon: s, count: t, label: r, to: a, onClick: n, className: o, test
1099
1099
  onClick: (u) => {
1100
1100
  u.stopPropagation(), n();
1101
1101
  },
1102
- children: i
1102
+ children: o
1103
1103
  }
1104
- ) : /* @__PURE__ */ e.jsx("div", { className: c, "data-testid": l, children: i }) }),
1104
+ ) : /* @__PURE__ */ e.jsx("div", { className: c, "data-testid": l, children: o }) }),
1105
1105
  /* @__PURE__ */ e.jsx(ae, { children: d ? `View ${r.toLowerCase()}` : r })
1106
1106
  ] }) });
1107
1107
  }
@@ -1115,15 +1115,15 @@ function ts({
1115
1115
  comment: s,
1116
1116
  className: t
1117
1117
  }) {
1118
- var b, g, j, v, f;
1119
- const [r] = G(), [a, n] = R(!1), [o, l] = R(!1), c = ge(r, s.id), i = ((b = s.count) == null ? void 0 : b.direct_replies) ?? ((g = s.count) == null ? void 0 : g.replies) ?? ((j = s.replies) == null ? void 0 : j.length) ?? 0, d = ((v = s.count) == null ? void 0 : v.likes) ?? 0, u = ((f = s.count) == null ? void 0 : f.reports) ?? 0, m = i > 0, h = d > 0, p = u > 0;
1118
+ var g, h, v, j, x;
1119
+ const [r] = Y(), [i, n] = R(!1), [a, l] = R(!1), c = ge(r, s.id), o = ((g = s.count) == null ? void 0 : g.direct_replies) ?? ((h = s.count) == null ? void 0 : h.replies) ?? ((v = s.replies) == null ? void 0 : v.length) ?? 0, d = ((j = s.count) == null ? void 0 : j.likes) ?? 0, u = ((x = s.count) == null ? void 0 : x.reports) ?? 0, m = o > 0, p = d > 0, f = u > 0;
1120
1120
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1121
1121
  /* @__PURE__ */ e.jsxs("div", { className: T("flex items-center gap-6", t), children: [
1122
1122
  /* @__PURE__ */ e.jsx(
1123
1123
  se,
1124
1124
  {
1125
- count: i,
1126
- icon: /* @__PURE__ */ e.jsx(Es, { size: 16, strokeWidth: 1.5 }),
1125
+ count: o,
1126
+ icon: /* @__PURE__ */ e.jsx(Is, { size: 16, strokeWidth: 1.5 }),
1127
1127
  label: "Replies",
1128
1128
  testId: "replies-metric",
1129
1129
  to: m ? c : void 0
@@ -1135,17 +1135,17 @@ function ts({
1135
1135
  count: d,
1136
1136
  icon: /* @__PURE__ */ e.jsx(Re, { size: 16, strokeWidth: 1.5 }),
1137
1137
  label: "Likes",
1138
- onClick: h ? () => n(!0) : void 0
1138
+ onClick: p ? () => n(!0) : void 0
1139
1139
  }
1140
1140
  ),
1141
1141
  /* @__PURE__ */ e.jsx(
1142
1142
  se,
1143
1143
  {
1144
- className: p ? "font-semibold text-red" : void 0,
1144
+ className: f ? "font-semibold text-red" : void 0,
1145
1145
  count: u,
1146
1146
  icon: /* @__PURE__ */ e.jsx(le, { size: 16, strokeWidth: 1.5 }),
1147
1147
  label: "Reports",
1148
- onClick: p ? () => l(!0) : void 0
1148
+ onClick: f ? () => l(!0) : void 0
1149
1149
  }
1150
1150
  )
1151
1151
  ] }),
@@ -1153,7 +1153,7 @@ function ts({
1153
1153
  $t,
1154
1154
  {
1155
1155
  comment: s,
1156
- open: a,
1156
+ open: i,
1157
1157
  onOpenChange: n
1158
1158
  }
1159
1159
  ),
@@ -1161,7 +1161,7 @@ function ts({
1161
1161
  Mt,
1162
1162
  {
1163
1163
  comment: s,
1164
- open: o,
1164
+ open: a,
1165
1165
  onOpenChange: l
1166
1166
  }
1167
1167
  )
@@ -1176,21 +1176,21 @@ function Dt({ hasReplies: s }) {
1176
1176
  }
1177
1177
  ) : null;
1178
1178
  }
1179
- function rs({ comment: s, isReply: t = !1, isSelectedComment: r = !1, selectedCommentId: a, commentPermalinksEnabled: n }) {
1180
- var u, m, h, p, b, g, j, v;
1181
- const [o] = G(), { mutate: l } = Ze(), { mutate: c } = Je(), i = (((u = s.replies) == null ? void 0 : u.length) ?? 0) > 0 || (((m = s.count) == null ? void 0 : m.direct_replies) ?? ((h = s.count) == null ? void 0 : h.replies) ?? 0) > 0, d = !i || t ? "mb-7" : "mb-0";
1179
+ function rs({ comment: s, isReply: t = !1, isSelectedComment: r = !1, selectedCommentId: i, commentPermalinksEnabled: n }) {
1180
+ var u, m, p, f, g, h, v, j;
1181
+ const [a] = Y(), { mutate: l } = Ze(), { mutate: c } = Je(), o = (((u = s.replies) == null ? void 0 : u.length) ?? 0) > 0 || (((m = s.count) == null ? void 0 : m.direct_replies) ?? ((p = s.count) == null ? void 0 : p.replies) ?? 0) > 0, d = !o || t ? "mb-7" : "mb-0";
1182
1182
  return /* @__PURE__ */ e.jsxs("div", { className: `flex w-full flex-row ${d}`, children: [
1183
1183
  /* @__PURE__ */ e.jsxs("div", { className: "mr-2 flex shrink-0 flex-col items-center justify-start md:mr-3", children: [
1184
1184
  /* @__PURE__ */ e.jsx(
1185
1185
  B,
1186
1186
  {
1187
- avatarImage: (p = s.member) == null ? void 0 : p.avatar_image,
1187
+ avatarImage: (f = s.member) == null ? void 0 : f.avatar_image,
1188
1188
  className: "mb-3 shrink-0 md:mb-4",
1189
1189
  isHidden: s.status === "hidden",
1190
- memberId: (b = s.member) == null ? void 0 : b.id
1190
+ memberId: (g = s.member) == null ? void 0 : g.id
1191
1191
  }
1192
1192
  ),
1193
- /* @__PURE__ */ e.jsx(Dt, { hasReplies: i && !t })
1193
+ /* @__PURE__ */ e.jsx(Dt, { hasReplies: o && !t })
1194
1194
  ] }),
1195
1195
  /* @__PURE__ */ e.jsx("div", { className: "grow", children: /* @__PURE__ */ e.jsxs(
1196
1196
  "div",
@@ -1202,24 +1202,24 @@ function rs({ comment: s, isReply: t = !1, isSelectedComment: r = !1, selectedCo
1202
1202
  /* @__PURE__ */ e.jsx(
1203
1203
  es,
1204
1204
  {
1205
- canComment: (g = s.member) == null ? void 0 : g.can_comment,
1205
+ canComment: (h = s.member) == null ? void 0 : h.can_comment,
1206
1206
  createdAt: s.created_at,
1207
1207
  isHidden: s.status === "hidden",
1208
- memberId: (j = s.member) == null ? void 0 : j.id,
1209
- memberName: (v = s.member) == null ? void 0 : v.name
1208
+ memberId: (v = s.member) == null ? void 0 : v.id,
1209
+ memberName: (j = s.member) == null ? void 0 : j.name
1210
1210
  }
1211
1211
  ),
1212
1212
  s.in_reply_to_snippet && r && /* @__PURE__ */ e.jsxs("div", { className: `mb-1 line-clamp-1 text-sm ${s.status === "hidden" && "opacity-50"}`, children: [
1213
1213
  /* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: "Replied to:" }),
1214
1214
  " ",
1215
1215
  /* @__PURE__ */ e.jsx(
1216
- oe,
1216
+ ie,
1217
1217
  {
1218
1218
  className: "text-sm font-normal text-muted-foreground hover:text-foreground",
1219
1219
  "data-testid": "replied-to-link",
1220
- to: ge(o, s.in_reply_to_id || s.parent_id) || "",
1221
- onClick: (f) => {
1222
- f.stopPropagation();
1220
+ to: ge(a, s.in_reply_to_id || s.parent_id) || "",
1221
+ onClick: (x) => {
1222
+ x.stopPropagation();
1223
1223
  },
1224
1224
  children: s.in_reply_to_snippet
1225
1225
  }
@@ -1228,11 +1228,11 @@ function rs({ comment: s, isReply: t = !1, isSelectedComment: r = !1, selectedCo
1228
1228
  /* @__PURE__ */ e.jsx(Ye, { item: s }),
1229
1229
  /* @__PURE__ */ e.jsxs("div", { className: "mt-4 flex flex-row flex-wrap items-center gap-3", children: [
1230
1230
  s.status === "published" && /* @__PURE__ */ e.jsxs(P, { className: "text-gray-800", size: "sm", variant: "outline", onClick: () => l({ id: s.id }), children: [
1231
- /* @__PURE__ */ e.jsx(Ie, {}),
1231
+ /* @__PURE__ */ e.jsx(Le, {}),
1232
1232
  /* @__PURE__ */ e.jsx("span", { className: "max-md:hidden", children: "Hide" })
1233
1233
  ] }),
1234
1234
  s.status === "hidden" && /* @__PURE__ */ e.jsxs(P, { className: "text-gray-800", size: "sm", variant: "outline", onClick: () => c({ id: s.id }), children: [
1235
- /* @__PURE__ */ e.jsx(Ee, {}),
1235
+ /* @__PURE__ */ e.jsx(Ie, {}),
1236
1236
  /* @__PURE__ */ e.jsx("span", { className: "max-md:hidden", children: "Show" })
1237
1237
  ] }),
1238
1238
  /* @__PURE__ */ e.jsx(
@@ -1250,15 +1250,15 @@ function rs({ comment: s, isReply: t = !1, isSelectedComment: r = !1, selectedCo
1250
1250
  )
1251
1251
  ] })
1252
1252
  ] }),
1253
- i && s.replies && /* @__PURE__ */ e.jsx("div", { className: "-ml-2 mb-4 mt-7 pl-2 md:-ml-3 md:mb-0 md:mt-8 md:pl-3", children: s.replies.map((f) => /* @__PURE__ */ e.jsx(
1253
+ o && s.replies && /* @__PURE__ */ e.jsx("div", { className: "-ml-2 mb-4 mt-7 pl-2 md:-ml-3 md:mb-0 md:mt-8 md:pl-3", children: s.replies.map((x) => /* @__PURE__ */ e.jsx(
1254
1254
  rs,
1255
1255
  {
1256
- comment: f,
1256
+ comment: x,
1257
1257
  commentPermalinksEnabled: n,
1258
1258
  isReply: !0,
1259
- selectedCommentId: a
1259
+ selectedCommentId: i
1260
1260
  },
1261
- f.id
1261
+ x.id
1262
1262
  )) })
1263
1263
  ]
1264
1264
  }
@@ -1269,30 +1269,54 @@ const Ft = ({
1269
1269
  selectedComment: s,
1270
1270
  replies: t,
1271
1271
  selectedCommentId: r,
1272
- commentPermalinksEnabled: a
1272
+ commentPermalinksEnabled: i,
1273
+ fetchNextPage: n,
1274
+ hasNextPage: a,
1275
+ isFetchingNextPage: l
1273
1276
  }) => {
1274
- const n = { ...s, replies: t };
1275
- return /* @__PURE__ */ e.jsx("div", { className: "flex flex-col", "data-testid": "comment-thread-list", children: /* @__PURE__ */ e.jsx(
1276
- rs,
1277
- {
1278
- comment: n,
1279
- commentPermalinksEnabled: a,
1280
- isSelectedComment: !0,
1281
- selectedCommentId: r
1282
- }
1283
- ) });
1277
+ const c = { ...s, replies: t };
1278
+ return /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col", "data-testid": "comment-thread-list", children: [
1279
+ /* @__PURE__ */ e.jsx(
1280
+ rs,
1281
+ {
1282
+ comment: c,
1283
+ commentPermalinksEnabled: i,
1284
+ isSelectedComment: !0,
1285
+ selectedCommentId: r
1286
+ }
1287
+ ),
1288
+ a && /* @__PURE__ */ e.jsx("div", { className: "flex justify-center pb-4", children: /* @__PURE__ */ e.jsx(
1289
+ P,
1290
+ {
1291
+ disabled: l,
1292
+ variant: "outline",
1293
+ onClick: () => n(),
1294
+ children: l ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1295
+ /* @__PURE__ */ e.jsx(W, { size: "sm" }),
1296
+ "Loading..."
1297
+ ] }) : "Load more replies"
1298
+ }
1299
+ ) })
1300
+ ] });
1284
1301
  }, zt = ({
1285
1302
  commentId: s,
1286
1303
  open: t,
1287
1304
  onOpenChange: r,
1288
- commentPermalinksEnabled: a
1305
+ commentPermalinksEnabled: i
1289
1306
  }) => {
1290
- var b;
1291
- const { data: n, isLoading: o, isError: l } = It(s ?? "", {
1307
+ var j;
1308
+ const {
1309
+ data: n,
1310
+ isLoading: a,
1311
+ isError: l,
1312
+ fetchNextPage: c,
1313
+ hasNextPage: o,
1314
+ isFetchingNextPage: d
1315
+ } = Lt(s ?? "", {
1292
1316
  enabled: t && !!s
1293
- }), { data: c, isLoading: i, isError: d } = _t(s ?? "", {
1317
+ }), { data: u, isLoading: m, isError: p } = _t(s ?? "", {
1294
1318
  enabled: t && !!s
1295
- }), u = o || i, m = d || l && !c, h = (b = c == null ? void 0 : c.comments) == null ? void 0 : b[0], p = (n == null ? void 0 : n.comments) || [];
1319
+ }), f = a || m, g = p || l && !u, h = (j = u == null ? void 0 : u.comments) == null ? void 0 : j[0], v = (n == null ? void 0 : n.comments) || [];
1296
1320
  return /* @__PURE__ */ e.jsx(Vs, { open: t, onOpenChange: r, children: /* @__PURE__ */ e.jsxs(qs, { className: "overflow-y-auto px-6 pt-0 sm:max-w-[600px]", children: [
1297
1321
  /* @__PURE__ */ e.jsx(Ws, { className: "sticky top-0 z-40 -mx-6 bg-background/60 p-6 backdrop-blur", children: /* @__PURE__ */ e.jsx(Qs, { className: "text-md", children: "Thread" }) }),
1298
1322
  (h == null ? void 0 : h.post) && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
@@ -1312,19 +1336,22 @@ const Ft = ({
1312
1336
  ] }),
1313
1337
  /* @__PURE__ */ e.jsx(ks, { className: "-mx-6 my-6 w-auto" })
1314
1338
  ] }),
1315
- /* @__PURE__ */ e.jsx("div", { children: u ? /* @__PURE__ */ e.jsx("div", { className: "flex h-full items-center justify-center py-8", children: /* @__PURE__ */ e.jsx(Z, { size: "lg" }) }) : m || !h ? /* @__PURE__ */ e.jsx("div", { className: "flex h-full items-center justify-center py-8", children: /* @__PURE__ */ e.jsx(
1339
+ /* @__PURE__ */ e.jsx("div", { children: f ? /* @__PURE__ */ e.jsx("div", { className: "flex h-full items-center justify-center py-8", children: /* @__PURE__ */ e.jsx(W, { size: "lg" }) }) : g || !h ? /* @__PURE__ */ e.jsx("div", { className: "flex h-full items-center justify-center py-8", children: /* @__PURE__ */ e.jsx(
1316
1340
  Me,
1317
1341
  {
1318
1342
  actions: /* @__PURE__ */ e.jsx(P, { variant: "outline", onClick: () => r(!1), children: "Back to comments" }),
1319
1343
  description: "This thread may have been deleted or doesn't exist.",
1320
1344
  title: "Thread not found",
1321
- children: /* @__PURE__ */ e.jsx(Le, {})
1345
+ children: /* @__PURE__ */ e.jsx(Ee, {})
1322
1346
  }
1323
1347
  ) }) : /* @__PURE__ */ e.jsx(
1324
1348
  Ft,
1325
1349
  {
1326
- commentPermalinksEnabled: a,
1327
- replies: p,
1350
+ commentPermalinksEnabled: i,
1351
+ fetchNextPage: c,
1352
+ hasNextPage: o,
1353
+ isFetchingNextPage: d,
1354
+ replies: v,
1328
1355
  selectedComment: h,
1329
1356
  selectedCommentId: s ?? ""
1330
1357
  }
@@ -1332,45 +1359,45 @@ const Ft = ({
1332
1359
  ] }) });
1333
1360
  }, we = /* @__PURE__ */ new Map();
1334
1361
  function Ot({ parentRef: s, enabled: t = !0, isLoading: r = !1 }) {
1335
- const a = cs(), [n, o] = R(null), l = _(null);
1336
- L(() => {
1362
+ const i = cs(), [n, a] = R(null), l = _(null);
1363
+ E(() => {
1337
1364
  if (!t || !s.current)
1338
1365
  return;
1339
1366
  const c = Fs(s.current);
1340
- o(c);
1341
- }, [t, s]), L(() => {
1367
+ a(c);
1368
+ }, [t, s]), E(() => {
1342
1369
  if (!t || !n)
1343
1370
  return;
1344
- const c = a.pathname + a.search, i = () => {
1371
+ const c = i.pathname + i.search, o = () => {
1345
1372
  const d = n.scrollTop;
1346
1373
  we.set(c, d);
1347
1374
  };
1348
- return n.addEventListener("scroll", i), () => n.removeEventListener("scroll", i);
1349
- }, [t, a.pathname, a.search, n]), L(() => {
1350
- const c = a.pathname + a.search, i = we.get(c);
1375
+ return n.addEventListener("scroll", o), () => n.removeEventListener("scroll", o);
1376
+ }, [t, i.pathname, i.search, n]), E(() => {
1377
+ const c = i.pathname + i.search, o = we.get(c);
1351
1378
  if (!(!t || !n || r)) {
1352
- if (i !== void 0 && l.current !== c) {
1379
+ if (o !== void 0 && l.current !== c) {
1353
1380
  let d = 0;
1354
1381
  const u = 3, m = () => {
1355
1382
  if (d += 1, !n)
1356
1383
  return;
1357
- const p = n.scrollTop, b = n.scrollHeight, g = n.clientHeight, j = b - g;
1358
- if (i > j && d < u) {
1384
+ const f = n.scrollTop, g = n.scrollHeight, h = n.clientHeight, v = g - h;
1385
+ if (o > v && d < u) {
1359
1386
  setTimeout(m, 100);
1360
1387
  return;
1361
1388
  }
1362
- if (Math.abs(i - p) > 5) {
1363
- const v = Math.min(i, j);
1364
- n.scrollTop = v;
1389
+ if (Math.abs(o - f) > 5) {
1390
+ const j = Math.min(o, v);
1391
+ n.scrollTop = j;
1365
1392
  }
1366
- }, h = setTimeout(m, 150);
1367
- return () => clearTimeout(h);
1393
+ }, p = setTimeout(m, 150);
1394
+ return () => clearTimeout(p);
1368
1395
  }
1369
1396
  l.current = c;
1370
1397
  }
1371
- }, [t, a.pathname, a.search, n, r]);
1398
+ }, [t, i.pathname, i.search, n, r]);
1372
1399
  }
1373
- const _e = ({ height: s }) => /* @__PURE__ */ e.jsx("div", { "aria-hidden": "true", className: "flex", children: /* @__PURE__ */ e.jsx("div", { className: "flex", style: { height: s } }) }), Bt = I(function(t, r) {
1400
+ const _e = ({ height: s }) => /* @__PURE__ */ e.jsx("div", { "aria-hidden": "true", className: "flex", children: /* @__PURE__ */ e.jsx("div", { className: "flex", style: { height: s } }) }), Bt = L(function(t, r) {
1374
1401
  return /* @__PURE__ */ e.jsx(
1375
1402
  "div",
1376
1403
  {
@@ -1386,39 +1413,39 @@ function Ht({
1386
1413
  items: s,
1387
1414
  totalItems: t,
1388
1415
  hasNextPage: r,
1389
- isFetchingNextPage: a,
1416
+ isFetchingNextPage: i,
1390
1417
  fetchNextPage: n,
1391
- onAddFilter: o,
1418
+ onAddFilter: a,
1392
1419
  isLoading: l,
1393
1420
  commentPermalinksEnabled: c
1394
1421
  }) {
1395
- const i = _(null), [d, u] = G(), [m, h] = R(!1), [p, b] = R(null), { mutate: g } = Ze(), { mutate: j } = Je(), v = (k) => {
1396
- if (h(k), !k) {
1422
+ const o = _(null), [d, u] = Y(), [m, p] = R(!1), [f, g] = R(null), { mutate: h } = Ze(), { mutate: v } = Je(), j = (k) => {
1423
+ if (p(k), !k) {
1397
1424
  const y = new URLSearchParams(d);
1398
1425
  y.delete("thread"), u(y, { replace: !0 });
1399
1426
  }
1400
1427
  };
1401
- L(() => {
1428
+ E(() => {
1402
1429
  const k = d.get("thread");
1403
1430
  if (k) {
1404
1431
  const y = k.match(/^is:(.+)$/);
1405
1432
  if (y && y[1]) {
1406
- const x = y[1];
1407
- b(x), h(!0);
1433
+ const b = y[1];
1434
+ g(b), p(!0);
1408
1435
  } else
1409
- h(!1), b(null);
1436
+ p(!1), g(null);
1410
1437
  } else
1411
- h(!1), b(null);
1412
- }, [d]), Ot({ parentRef: i, isLoading: l });
1413
- const { visibleItems: f, spaceBefore: C, spaceAfter: w } = zs({
1438
+ p(!1), g(null);
1439
+ }, [d]), Ot({ parentRef: o, isLoading: l });
1440
+ const { visibleItems: x, spaceBefore: C, spaceAfter: w } = zs({
1414
1441
  items: s,
1415
1442
  totalItems: t,
1416
1443
  hasNextPage: r,
1417
- isFetchingNextPage: a,
1444
+ isFetchingNextPage: i,
1418
1445
  fetchNextPage: n,
1419
- parentRef: i
1446
+ parentRef: o
1420
1447
  });
1421
- return /* @__PURE__ */ e.jsxs("div", { ref: i, className: "overflow-hidden", children: [
1448
+ return /* @__PURE__ */ e.jsxs("div", { ref: o, className: "overflow-hidden", children: [
1422
1449
  /* @__PURE__ */ e.jsx(
1423
1450
  "div",
1424
1451
  {
@@ -1426,8 +1453,8 @@ function Ht({
1426
1453
  "data-testid": "comments-list",
1427
1454
  children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col", children: [
1428
1455
  /* @__PURE__ */ e.jsx(_e, { height: C }),
1429
- f.map(({ key: k, virtualItem: y, item: x, props: M }) => {
1430
- var D, O, F, N, S, z, W, je, ve;
1456
+ x.map(({ key: k, virtualItem: y, item: b, props: M }) => {
1457
+ var D, O, F, N, S, z, Q, je, ve;
1431
1458
  return y.index > s.length - 1 ? /* @__PURE__ */ e.jsx(Bt, { ...M }, k) : /* @__PURE__ */ e.jsxs(
1432
1459
  "div",
1433
1460
  {
@@ -1435,81 +1462,81 @@ function Ht({
1435
1462
  className: "grid w-full grid-cols-1 items-start justify-between gap-4 border-b p-3 hover:bg-muted/50 md:p-5 lg:grid-cols-[minmax(0,1fr)_144px]",
1436
1463
  "data-testid": "comment-list-row",
1437
1464
  onClick: () => {
1438
- m && v(!1);
1465
+ m && j(!1);
1439
1466
  },
1440
1467
  children: [
1441
1468
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-start gap-3", children: [
1442
1469
  /* @__PURE__ */ e.jsx(
1443
1470
  B,
1444
1471
  {
1445
- avatarImage: (D = x.member) == null ? void 0 : D.avatar_image,
1446
- isHidden: x.status === "hidden",
1447
- memberId: (O = x.member) == null ? void 0 : O.id
1472
+ avatarImage: (D = b.member) == null ? void 0 : D.avatar_image,
1473
+ isHidden: b.status === "hidden",
1474
+ memberId: (O = b.member) == null ? void 0 : O.id
1448
1475
  }
1449
1476
  ),
1450
1477
  /* @__PURE__ */ e.jsxs("div", { className: "flex min-w-0 flex-col", children: [
1451
1478
  /* @__PURE__ */ e.jsx(
1452
1479
  es,
1453
1480
  {
1454
- canComment: (F = x.member) == null ? void 0 : F.can_comment,
1455
- createdAt: x.created_at,
1456
- isHidden: x.status === "hidden",
1457
- memberId: (N = x.member) == null ? void 0 : N.id,
1458
- memberName: (S = x.member) == null ? void 0 : S.name,
1459
- postTitle: (z = x.post) == null ? void 0 : z.title,
1460
- onAuthorClick: (W = x.member) != null && W.id ? () => o("author", x.member.id) : void 0,
1461
- onPostClick: (je = x.post) != null && je.id ? () => o("post", x.post.id) : void 0
1481
+ canComment: (F = b.member) == null ? void 0 : F.can_comment,
1482
+ createdAt: b.created_at,
1483
+ isHidden: b.status === "hidden",
1484
+ memberId: (N = b.member) == null ? void 0 : N.id,
1485
+ memberName: (S = b.member) == null ? void 0 : S.name,
1486
+ postTitle: (z = b.post) == null ? void 0 : z.title,
1487
+ onAuthorClick: (Q = b.member) != null && Q.id ? () => a("author", b.member.id) : void 0,
1488
+ onPostClick: (je = b.post) != null && je.id ? () => a("post", b.post.id) : void 0
1462
1489
  }
1463
1490
  ),
1464
- x.in_reply_to_snippet && /* @__PURE__ */ e.jsxs("div", { className: `mb-1 line-clamp-1 max-w-3xl text-sm ${x.status === "hidden" && "opacity-50"}`, children: [
1491
+ b.in_reply_to_snippet && /* @__PURE__ */ e.jsxs("div", { className: `mb-1 line-clamp-1 max-w-3xl text-sm ${b.status === "hidden" && "opacity-50"}`, children: [
1465
1492
  /* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: "Replied to:" }),
1466
1493
  " ",
1467
1494
  /* @__PURE__ */ e.jsx(
1468
- oe,
1495
+ ie,
1469
1496
  {
1470
1497
  className: "text-sm font-normal text-muted-foreground hover:text-foreground",
1471
1498
  "data-testid": "replied-to-link",
1472
- to: ge(d, x.in_reply_to_id || x.parent_id) || "",
1499
+ to: ge(d, b.in_reply_to_id || b.parent_id) || "",
1473
1500
  onClick: (as) => {
1474
1501
  as.stopPropagation();
1475
1502
  },
1476
- children: x.in_reply_to_snippet
1503
+ children: b.in_reply_to_snippet
1477
1504
  }
1478
1505
  )
1479
1506
  ] }),
1480
- /* @__PURE__ */ e.jsx(Ye, { item: x }),
1507
+ /* @__PURE__ */ e.jsx(Ye, { item: b }),
1481
1508
  /* @__PURE__ */ e.jsxs("div", { className: "mt-4 flex flex-row flex-nowrap items-center gap-3", children: [
1482
- x.status === "published" && /* @__PURE__ */ e.jsxs(P, { className: "text-foreground", size: "sm", variant: "outline", onClick: () => g({ id: x.id }), children: [
1483
- /* @__PURE__ */ e.jsx(Ie, {}),
1509
+ b.status === "published" && /* @__PURE__ */ e.jsxs(P, { className: "text-foreground", size: "sm", variant: "outline", onClick: () => h({ id: b.id }), children: [
1510
+ /* @__PURE__ */ e.jsx(Le, {}),
1484
1511
  "Hide"
1485
1512
  ] }),
1486
- x.status === "hidden" && /* @__PURE__ */ e.jsxs(P, { className: "text-foreground", size: "sm", variant: "outline", onClick: () => j({ id: x.id }), children: [
1487
- /* @__PURE__ */ e.jsx(Ee, {}),
1513
+ b.status === "hidden" && /* @__PURE__ */ e.jsxs(P, { className: "text-foreground", size: "sm", variant: "outline", onClick: () => v({ id: b.id }), children: [
1514
+ /* @__PURE__ */ e.jsx(Ie, {}),
1488
1515
  "Show"
1489
1516
  ] }),
1490
1517
  /* @__PURE__ */ e.jsx(
1491
1518
  ts,
1492
1519
  {
1493
1520
  className: "ml-2",
1494
- comment: x
1521
+ comment: b
1495
1522
  }
1496
1523
  ),
1497
1524
  /* @__PURE__ */ e.jsx(
1498
1525
  ss,
1499
1526
  {
1500
- comment: x,
1527
+ comment: b,
1501
1528
  commentPermalinksEnabled: c
1502
1529
  }
1503
1530
  )
1504
1531
  ] })
1505
1532
  ] })
1506
1533
  ] }),
1507
- /* @__PURE__ */ e.jsx("div", { children: (ve = x.post) != null && ve.feature_image ? /* @__PURE__ */ e.jsx(
1534
+ /* @__PURE__ */ e.jsx("div", { children: (ve = b.post) != null && ve.feature_image ? /* @__PURE__ */ e.jsx(
1508
1535
  "img",
1509
1536
  {
1510
- alt: x.post.title || "Post feature image",
1511
- className: `hidden aspect-video w-36 rounded object-cover lg:block ${x.status === "hidden" && "opacity-50"}`,
1512
- src: x.post.feature_image
1537
+ alt: b.post.title || "Post feature image",
1538
+ className: `hidden aspect-video w-36 rounded object-cover lg:block ${b.status === "hidden" && "opacity-50"}`,
1539
+ src: b.post.feature_image
1513
1540
  }
1514
1541
  ) : null })
1515
1542
  ]
@@ -1524,10 +1551,10 @@ function Ht({
1524
1551
  /* @__PURE__ */ e.jsx(
1525
1552
  zt,
1526
1553
  {
1527
- commentId: p,
1554
+ commentId: f,
1528
1555
  commentPermalinksEnabled: c,
1529
1556
  open: m,
1530
- onOpenChange: v
1557
+ onOpenChange: j
1531
1558
  }
1532
1559
  )
1533
1560
  ] });
@@ -1550,7 +1577,7 @@ function At(s) {
1550
1577
  else if (r.operator === "after" && r.values[0])
1551
1578
  t.push(`created_at:>'${r.values[0]}'`);
1552
1579
  else if (r.operator === "is" && r.values[0]) {
1553
- const o = String(r.values[0]), l = (/* @__PURE__ */ new Date(o + "T00:00:00")).toISOString(), c = (/* @__PURE__ */ new Date(o + "T23:59:59.999")).toISOString();
1580
+ const a = String(r.values[0]), l = (/* @__PURE__ */ new Date(a + "T00:00:00")).toISOString(), c = (/* @__PURE__ */ new Date(a + "T23:59:59.999")).toISOString();
1554
1581
  t.push(`created_at:>='${l}'+created_at:<='${c}'`);
1555
1582
  }
1556
1583
  break;
@@ -1581,10 +1608,10 @@ function Ut(s) {
1581
1608
  }
1582
1609
  function Vt(s) {
1583
1610
  const t = [];
1584
- for (const [r, a] of s.entries()) {
1585
- if (!ns.includes(r) || !a)
1611
+ for (const [r, i] of s.entries()) {
1612
+ if (!ns.includes(r) || !i)
1586
1613
  continue;
1587
- const n = Ut(a);
1614
+ const n = Ut(i);
1588
1615
  n && t.push({
1589
1616
  id: r,
1590
1617
  field: r,
@@ -1598,29 +1625,29 @@ function qt(s) {
1598
1625
  const t = new URLSearchParams();
1599
1626
  for (const r of s)
1600
1627
  if (ns.includes(r.field) && r.values[0] !== void 0) {
1601
- const a = `${r.operator}:${String(r.values[0])}`;
1602
- t.set(r.field, a);
1628
+ const i = `${r.operator}:${String(r.values[0])}`;
1629
+ t.set(r.field, i);
1603
1630
  }
1604
1631
  return t;
1605
1632
  }
1606
1633
  function Wt() {
1607
- const [s, t] = G(), r = E(() => Vt(s), [s]), a = V((c, i = {}) => {
1608
- const d = typeof c == "function" ? c(r) : c, u = qt(d), m = i.replace ?? !0;
1634
+ const [s, t] = Y(), r = I(() => Vt(s), [s]), i = V((c, o = {}) => {
1635
+ const d = typeof c == "function" ? c(r) : c, u = qt(d), m = o.replace ?? !0;
1609
1636
  t(u, { replace: m });
1610
1637
  }, [r, t]), n = V(({ replace: c = !0 } = {}) => {
1611
1638
  t(new URLSearchParams(), { replace: c });
1612
- }, [t]), o = E(() => At(r), [r]), l = E(() => r.length === 1 && r[0].field === "id", [r]);
1613
- return { filters: r, nql: o, setFilters: a, clearFilters: n, isSingleIdFilter: l };
1639
+ }, [t]), a = I(() => At(r), [r]), l = I(() => r.length === 1 && r[0].field === "id", [r]);
1640
+ return { filters: r, nql: a, setFilters: i, clearFilters: n, isSingleIdFilter: l };
1614
1641
  }
1615
1642
  function Qt({ comments: s }) {
1616
- return E(() => {
1617
- var a, n, o;
1643
+ return I(() => {
1644
+ var i, n, a;
1618
1645
  const t = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
1619
1646
  for (const l of s)
1620
- (a = l.post) != null && a.id && ((n = l.post) != null && n.title) && t.set(l.post.id, {
1647
+ (i = l.post) != null && i.id && ((n = l.post) != null && n.title) && t.set(l.post.id, {
1621
1648
  id: l.post.id,
1622
1649
  title: l.post.title
1623
- }), (o = l.member) != null && o.id && r.set(l.member.id, {
1650
+ }), (a = l.member) != null && a.id && r.set(l.member.id, {
1624
1651
  id: l.member.id,
1625
1652
  name: l.member.name,
1626
1653
  email: l.member.email
@@ -1631,61 +1658,61 @@ function Qt({ comments: s }) {
1631
1658
  };
1632
1659
  }, [s]);
1633
1660
  }
1634
- const ir = () => {
1635
- var f, C, w, k;
1636
- const { filters: s, nql: t, setFilters: r, clearFilters: a, isSingleIdFilter: n } = Wt(), { data: o } = bs(), l = ((C = (f = o == null ? void 0 : o.config) == null ? void 0 : f.labs) == null ? void 0 : C.commentPermalinks) === !0, c = V((y, x, M = "is") => {
1637
- r((H) => [...H.filter((O) => O.field !== y), us(y, M, [x])], { replace: !1 });
1661
+ const or = () => {
1662
+ var x, C, w, k;
1663
+ const { filters: s, nql: t, setFilters: r, clearFilters: i, isSingleIdFilter: n } = Wt(), { data: a } = bs(), l = ((C = (x = a == null ? void 0 : a.config) == null ? void 0 : x.labs) == null ? void 0 : C.commentPermalinks) === !0, c = V((y, b, M = "is") => {
1664
+ r((H) => [...H.filter((O) => O.field !== y), us(y, M, [b])], { replace: !1 });
1638
1665
  }, [r]), {
1639
- data: i,
1666
+ data: o,
1640
1667
  isError: d,
1641
1668
  isFetching: u,
1642
1669
  isFetchingNextPage: m,
1643
- isRefetching: h,
1644
- fetchNextPage: p,
1645
- hasNextPage: b
1670
+ isRefetching: p,
1671
+ fetchNextPage: f,
1672
+ hasNextPage: g
1646
1673
  } = Xe({
1647
1674
  searchParams: t ? { filter: t } : {},
1648
1675
  keepPreviousData: !0
1649
- }), { knownPosts: g, knownMembers: j } = Qt({ comments: (i == null ? void 0 : i.comments) ?? [] }), v = u && !m && !h;
1676
+ }), { knownPosts: h, knownMembers: v } = Qt({ comments: (o == null ? void 0 : o.comments) ?? [] }), j = u && !m && !p;
1650
1677
  return /* @__PURE__ */ e.jsxs(Nt, { children: [
1651
1678
  /* @__PURE__ */ e.jsx(yt, { children: !n && /* @__PURE__ */ e.jsx(
1652
1679
  Ct,
1653
1680
  {
1654
1681
  filters: s,
1655
- knownMembers: j,
1656
- knownPosts: g,
1682
+ knownMembers: v,
1683
+ knownPosts: h,
1657
1684
  onFiltersChange: r
1658
1685
  }
1659
1686
  ) }),
1660
- /* @__PURE__ */ e.jsx(ut, { children: v ? /* @__PURE__ */ e.jsx("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e.jsx(Z, { size: "lg" }) }) : d ? /* @__PURE__ */ e.jsxs("div", { className: "mb-16 flex h-full flex-col items-center justify-center", children: [
1687
+ /* @__PURE__ */ e.jsx(ut, { children: j ? /* @__PURE__ */ e.jsx("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e.jsx(W, { size: "lg" }) }) : d ? /* @__PURE__ */ e.jsxs("div", { className: "mb-16 flex h-full flex-col items-center justify-center", children: [
1661
1688
  /* @__PURE__ */ e.jsx("h2", { className: "mb-2 text-xl font-medium", children: "Error loading comments" }),
1662
1689
  /* @__PURE__ */ e.jsx("p", { className: "mb-4 text-muted-foreground", children: "Please reload the page to try again" }),
1663
1690
  /* @__PURE__ */ e.jsx(P, { onClick: () => window.location.reload(), children: "Reload page" })
1664
- ] }) : i != null && i.comments.length ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1691
+ ] }) : o != null && o.comments.length ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1665
1692
  /* @__PURE__ */ e.jsx(
1666
1693
  Ht,
1667
1694
  {
1668
1695
  commentPermalinksEnabled: l,
1669
- fetchNextPage: p,
1670
- hasNextPage: b,
1696
+ fetchNextPage: f,
1697
+ hasNextPage: g,
1671
1698
  isFetchingNextPage: m,
1672
1699
  isLoading: u && !m,
1673
- items: (i == null ? void 0 : i.comments) ?? [],
1674
- totalItems: ((k = (w = i == null ? void 0 : i.meta) == null ? void 0 : w.pagination) == null ? void 0 : k.total) ?? 0,
1700
+ items: (o == null ? void 0 : o.comments) ?? [],
1701
+ totalItems: ((k = (w = o == null ? void 0 : o.meta) == null ? void 0 : w.pagination) == null ? void 0 : k.total) ?? 0,
1675
1702
  onAddFilter: c
1676
1703
  }
1677
1704
  ),
1678
- n && /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-8", children: /* @__PURE__ */ e.jsx(P, { variant: "outline", onClick: () => a({ replace: !1 }), children: "Show all comments" }) })
1705
+ n && /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-8", children: /* @__PURE__ */ e.jsx(P, { variant: "outline", onClick: () => i({ replace: !1 }), children: "Show all comments" }) })
1679
1706
  ] }) : /* @__PURE__ */ e.jsx("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e.jsx(
1680
1707
  Me,
1681
1708
  {
1682
1709
  title: "No comments yet",
1683
- children: /* @__PURE__ */ e.jsx(Le, {})
1710
+ children: /* @__PURE__ */ e.jsx(Ee, {})
1684
1711
  }
1685
1712
  ) }) })
1686
1713
  ] });
1687
1714
  };
1688
1715
  export {
1689
- ir as default
1716
+ or as default
1690
1717
  };
1691
- //# sourceMappingURL=comments-CHEqbZPq.mjs.map
1718
+ //# sourceMappingURL=comments-Bn_vn_sb.mjs.map