ghost 6.24.0 → 6.25.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 (222) hide show
  1. package/components/tryghost-i18n-6.25.1.tgz +0 -0
  2. package/components/tryghost-parse-email-address-6.25.1.tgz +0 -0
  3. package/core/boot.js +3 -1
  4. package/core/built/admin/assets/{PolarAngleAxis-7TlIQL3R.js → PolarAngleAxis-C6ZeSpZB.js} +1 -1
  5. package/core/built/admin/assets/{_baseAssignValue-DJsCJz6y.js → _baseAssignValue-BKAl5FrV.js} +1 -1
  6. package/core/built/admin/assets/{a-large-small-BnBpzYwl.js → a-large-small-B_ulQCIs.js} +1 -1
  7. package/core/built/admin/assets/admin-x-settings/admin-x-settings.js +1 -1
  8. package/core/built/admin/assets/admin-x-settings/{code-editor-view-De3K_osj.mjs → code-editor-view-CBYT1gA1.mjs} +2 -2
  9. package/core/built/admin/assets/admin-x-settings/{index-bGxDzD13.mjs → index-CN5CixaU.mjs} +2 -2
  10. package/core/built/admin/assets/admin-x-settings/{index-5D8KqsFU.mjs → index-CPQODntW.mjs} +2 -2
  11. package/core/built/admin/assets/admin-x-settings/{index-BIUDn7ot.mjs → index-CgTfOd7g.mjs} +9 -9
  12. package/core/built/admin/assets/admin-x-settings/{modals-DuokUyAH.mjs → modals-_y-6HROx.mjs} +2 -2
  13. package/core/built/admin/assets/{at-sign-DC4NtDDM.js → at-sign-B8xWKM0y.js} +1 -1
  14. package/core/built/admin/assets/{audience-CC5U4UxI.js → audience-CBOR--z9.js} +1 -1
  15. package/core/built/admin/assets/{avatar-flipboard-_GQfQXQc.js → avatar-flipboard-IipGb_wZ.js} +1 -1
  16. package/core/built/admin/assets/{bluesky-sharing-BKyzPl9y.js → bluesky-sharing-CkI1QuAm.js} +1 -1
  17. package/core/built/admin/assets/{chart-BCQFlmhJ.js → chart-_slUcr-K.js} +1 -1
  18. package/core/built/admin/assets/{chunk.423.dae9a3bbe7845c3a3cfc.js → chunk.434.de8a15730373eccfeefe.js} +13 -101
  19. package/core/built/admin/assets/{chunk.524.b5e454aa74df4428420c.js → chunk.524.5b9b463506a16221fc91.js} +6 -6
  20. package/core/built/admin/assets/{chunk.582.20635869be68725e6d5c.js → chunk.582.d8eae1661d753befaefd.js} +7 -7
  21. package/core/built/admin/assets/{chunk.123.1255d9e815f933dfdc57.js → chunk.630.3dbb0231a2d871126a80.js} +8 -6
  22. package/core/built/admin/assets/{code-editor-view-BXnjo7qe.js → code-editor-view-BWMqr2JV.js} +1 -1
  23. package/core/built/admin/assets/comments-BeoA0nfK.js +1 -0
  24. package/core/built/admin/assets/{content-helpers-CQXipRWa.js → content-helpers-CmTGdEmL.js} +1 -1
  25. package/core/built/admin/assets/{copy-B-MxRWPu.js → copy-CDHcAPJw.js} +1 -1
  26. package/core/built/admin/assets/{data-list-B2sqn7IE.js → data-list-Crb1ffbp.js} +1 -1
  27. package/core/built/admin/assets/{deleted-feed-item-DQi676Dy.js → deleted-feed-item-DBW0zJQg.js} +1 -1
  28. package/core/built/admin/assets/{dropzone-GgOCfK2j.js → dropzone-B9JUsQlW.js} +3 -3
  29. package/core/built/admin/assets/{edit-profile-COx5FmF9.js → edit-profile-Dz-IhetN.js} +1 -1
  30. package/core/built/admin/assets/{empty-indicator-Bf4Dqk72.js → empty-indicator-2QGnEbtY.js} +1 -1
  31. package/core/built/admin/assets/{en-BkI47Ou-.js → en-BRQS1Z8j.js} +1 -1
  32. package/core/built/admin/assets/{feed-Dzc-8jwd.js → feed-T3kW9UJA.js} +1 -1
  33. package/core/built/admin/assets/filters-ChOMQQZW.js +1 -0
  34. package/core/built/admin/assets/{gh-chart-Ch6dYUac.js → gh-chart-fuWw60Ka.js} +1 -1
  35. package/core/built/admin/assets/{ghost-69e448feab2cb78aba64f7177fa4d6f0.js → ghost-78b4a517ac907213ab47708eef33bc6f.js} +423 -542
  36. package/core/built/admin/assets/{growth-BIBJdcm6.js → growth-D9sCnmon.js} +1 -1
  37. package/core/built/admin/assets/{hash-BGd7HEsT.js → hash-CI1pQ1UC.js} +1 -1
  38. package/core/built/admin/assets/header-OevT95FI.js +1 -0
  39. package/core/built/admin/assets/{inbox-CFzKvW3h.js → inbox-DYY8-M1K.js} +1 -1
  40. package/core/built/admin/assets/{index-Dy8dCc8t.js → index-8CZdLQzu.js} +4 -4
  41. package/core/built/admin/assets/{index-DIO8ceib.js → index-BDAOs7pI.js} +1 -1
  42. package/core/built/admin/assets/{index-BZyG96u1.js → index-BEEgMX-_.js} +1 -1
  43. package/core/built/admin/assets/index-BbveDn8H.css +1 -0
  44. package/core/built/admin/assets/{index-BYXKsmpv.js → index-C-Cpbee5.js} +1 -1
  45. package/core/built/admin/assets/{index-DDJAHYHQ.js → index-CCF2RKxR.js} +12 -12
  46. package/core/built/admin/assets/{index-ZuWSQ3L6.js → index-CEnfjH5h.js} +93 -93
  47. package/core/built/admin/assets/{index-_WMp37yL.js → index-CcFVbffG.js} +1 -1
  48. package/core/built/admin/assets/{index-DpZazR71.js → index-CyMlhfZJ.js} +1 -1
  49. package/core/built/admin/assets/{index-DM98UB_U.js → index-DBZYUfjO.js} +1 -1
  50. package/core/built/admin/assets/{index-D0gRP4Gp.js → index-DJa3pLmx.js} +1 -1
  51. package/core/built/admin/assets/{index-n5opb8tL.js → index-DVqmhe-L.js} +1 -1
  52. package/core/built/admin/assets/{index-S2DGJkmz.js → index-DW5aEj6O.js} +2 -2
  53. package/core/built/admin/assets/{index-CvX5YYEz.js → index-DcFgRUSN.js} +1 -1
  54. package/core/built/admin/assets/{index-7NTHsKgE.js → index-DjgsxHeB.js} +1 -1
  55. package/core/built/admin/assets/index-mqQc8MVd.js +1 -0
  56. package/core/built/admin/assets/{index-CsHjDdYB.js → index-qQZsxgFE.js} +1 -1
  57. package/core/built/admin/assets/{koenig-lexical-8qAZ5o1x.js → koenig-lexical-CsbE6fpi.js} +1 -1
  58. package/core/built/admin/assets/kpis-Dw04ruBN.js +1 -0
  59. package/core/built/admin/assets/{label-CofMdj8x.js → label-tBvn89sm.js} +1 -1
  60. package/core/built/admin/assets/{links-MSlYSad1.js → links-Do4jcjIh.js} +1 -1
  61. package/core/built/admin/assets/{loader-circle-CF5G2g_Z.js → loader-circle-C8exRUku.js} +4 -4
  62. package/core/built/admin/assets/{lucide-react-DZiAu6PQ.js → lucide-react-4VO5Dwow.js} +1 -1
  63. package/core/built/admin/assets/{main-layout-DEVUkqt_.js → main-layout-BAqXRgAx.js} +1 -1
  64. package/core/built/admin/assets/{member-route-mLKS-PsA.js → member-route-D4n-RbQd.js} +1 -1
  65. package/core/built/admin/assets/members-DRLgwCgJ.js +15 -0
  66. package/core/built/admin/assets/{message-square-text-DESy3kSk.js → message-square-text-CC_1bY-Q.js} +5 -5
  67. package/core/built/admin/assets/{minus-DVNwSjD6.js → minus-DSyx9DCe.js} +1 -1
  68. package/core/built/admin/assets/{modals-FYjLOMaQ.js → modals-AryZr_DA.js} +13 -13
  69. package/core/built/admin/assets/{moderation-u4WS46a-.js → moderation-DwKm9LO-.js} +1 -1
  70. package/core/built/admin/assets/{newsletter-Cj0UCg4J.js → newsletter-C0rydPGS.js} +1 -1
  71. package/core/built/admin/assets/{newsletters-_UvhdBE3.js → newsletters-DKdmxfDG.js} +1 -1
  72. package/core/built/admin/assets/{note-CRnFryTp.js → note-996Zos9G.js} +1 -1
  73. package/core/built/admin/assets/{overview-Cr0dGxEU.js → overview-r17hlWAB.js} +1 -1
  74. package/core/built/admin/assets/{pagemenu-BqoDENpI.js → pagemenu-DzpB1AkZ.js} +17 -17
  75. package/core/built/admin/assets/{post-analytics-DIr_rDtL.js → post-analytics-AwufPVFE.js} +1 -1
  76. package/core/built/admin/assets/{post-analytics-context-WA--pwK5.js → post-analytics-context-GFe0lMc-.js} +1 -1
  77. package/core/built/admin/assets/{post-analytics-header-D97SoEaV.js → post-analytics-header-DmGyNvP9.js} +1 -1
  78. package/core/built/admin/assets/{post-share-modal-DBxR7WCX.js → post-share-modal-CTpdCS2X.js} +1 -1
  79. package/core/built/admin/assets/posts/{comments-Bswx2dzs.mjs → comments-Cvt31uBs.mjs} +597 -674
  80. package/core/built/admin/assets/posts/{dialog-67vvNv8e.mjs → dialog-DaViJlnd.mjs} +3 -3
  81. package/core/built/admin/assets/posts/{dropdown-menu-BKZfsAPJ.mjs → dropdown-menu-B4KGMiRI.mjs} +5 -5
  82. package/core/built/admin/assets/posts/{empty-indicator-DTmBQa_3.mjs → empty-indicator-BaD6pCXM.mjs} +2 -2
  83. package/core/built/admin/assets/posts/filters-BsCI4RJg.mjs +2835 -0
  84. package/core/built/admin/assets/posts/{get-site-timezone-D75cHSJ1.mjs → get-site-timezone-Bo-iI2bI.mjs} +2 -2
  85. package/core/built/admin/assets/posts/{growth-BqJWjpAp.mjs → growth-BJxIDp2o.mjs} +14 -14
  86. package/core/built/admin/assets/posts/header-7zhnErbb.mjs +100 -0
  87. package/core/built/admin/assets/posts/{heading-DXxLDQ96.mjs → heading-BCDx_eVF.mjs} +2 -2
  88. package/core/built/admin/assets/posts/{hooks-pVotzebr.mjs → hooks-DQL2O_El.mjs} +2 -2
  89. package/core/built/admin/assets/posts/{index-DZ1HzbGS.mjs → index-0mEgtljt.mjs} +3 -3
  90. package/core/built/admin/assets/posts/{index-By5yPnMZ.mjs → index-BTzJVQ6S.mjs} +10 -10
  91. package/core/built/admin/assets/posts/{input-DdXe2Fjm.mjs → input-DaHXv92f.mjs} +2 -2
  92. package/core/built/admin/assets/posts/{kpis-1MXZeSC9.mjs → kpis-GRsx6fPV.mjs} +10 -10
  93. package/core/built/admin/assets/posts/{links-DGzzdzsH.mjs → links-B1q_pqE9.mjs} +4 -4
  94. package/core/built/admin/assets/posts/{loading-indicator-CSj2spwS.mjs → loading-indicator-DiYqXomj.mjs} +3 -3
  95. package/core/built/admin/assets/posts/{main-layout-CGs25JVH.mjs → main-layout-DeqPTJTe.mjs} +2 -2
  96. package/core/built/admin/assets/posts/{members-BRcED5fL.mjs → members-LABk5yI5.mjs} +4102 -3442
  97. package/core/built/admin/assets/posts/{newsletter-D706LlgM.mjs → newsletter-C_nbHBaP.mjs} +15 -15
  98. package/core/built/admin/assets/posts/{overview-5dG5ypjx.mjs → overview-AJnKv4Ze.mjs} +16 -16
  99. package/core/built/admin/assets/posts/{post-analytics-wvNuOa4c.mjs → post-analytics-b_CKsePp.mjs} +6 -6
  100. package/core/built/admin/assets/posts/{post-analytics-context-BqnFe05q.mjs → post-analytics-context-D6jtpxxm.mjs} +5 -5
  101. package/core/built/admin/assets/posts/{post-analytics-header-Dsi5l6hb.mjs → post-analytics-header-R5UF_tF0.mjs} +11 -11
  102. package/core/built/admin/assets/posts/{post-share-modal-DWe35McY.mjs → post-share-modal-y4BEOajk.mjs} +4 -4
  103. package/core/built/admin/assets/posts/posts-C2hNrf1c.mjs +37 -0
  104. package/core/built/admin/assets/posts/posts.js +1 -1
  105. package/core/built/admin/assets/posts/{reply-B4vwBMwj.mjs → reply-2Uvi3Kxb.mjs} +2 -2
  106. package/core/built/admin/assets/posts/{search-DQuB1WMm.mjs → search-se7meOnL.mjs} +2 -2
  107. package/core/built/admin/assets/posts/{select-BMPHyOdQ.mjs → select-DpUpauFg.mjs} +8 -8
  108. package/core/built/admin/assets/posts/{separator-DgZ2VF9r.mjs → separator-CdBM46dw.mjs} +3 -3
  109. package/core/built/admin/assets/posts/{settings-D-wnf7Qg.mjs → settings-Chhj9xKP.mjs} +2 -2
  110. package/core/built/admin/assets/posts/{sheet-SOdCzxUt.mjs → sheet--k3SiDko.mjs} +3 -3
  111. package/core/built/admin/assets/posts/{skeleton-Du7JXZ_1.mjs → skeleton-CUSLSLoY.mjs} +3 -3
  112. package/core/built/admin/assets/posts/{source-icon-DcBtKbCl.mjs → source-icon-BjYUIoXN.mjs} +3 -3
  113. package/core/built/admin/assets/posts/{stats-CeLav-Hu.mjs → stats-BRdXKaxM.mjs} +4 -4
  114. package/core/built/admin/assets/posts/{table-DlaJMBps.mjs → table-Bgi_UcfL.mjs} +2 -2
  115. package/core/built/admin/assets/posts/{tabs-BQQbtw2g.mjs → tabs-DT8Bh72E.mjs} +14 -14
  116. package/core/built/admin/assets/posts/tags-BCFLnZYl.mjs +399 -0
  117. package/core/built/admin/assets/posts/{tags-CLyaNf39.mjs → tags-Kv2q0o3p.mjs} +2 -2
  118. package/core/built/admin/assets/posts/use-scroll-restoration-CLAUAal3.mjs +517 -0
  119. package/core/built/admin/assets/posts/{use-infinite-virtual-scroll-B_NwiBXK.mjs → virtual-list-window-CQDEqNBL.mjs} +246 -262
  120. package/core/built/admin/assets/posts/{web-TEVKbXSI.mjs → web-CqN0MQU6.mjs} +18 -18
  121. package/core/built/admin/assets/posts-GvXDuhVG.js +1 -0
  122. package/core/built/admin/assets/{referrers-J4vexZCf.js → referrers-Bd9pW-WX.js} +1 -1
  123. package/core/built/admin/assets/{repeat-BxOK9zhN.js → repeat-y6HlMgGO.js} +2 -2
  124. package/core/built/admin/assets/{reply-BoTN-eE0.js → reply-Cc8ryI5v.js} +2 -2
  125. package/core/built/admin/assets/{select-Bd1zcqox.js → select-CGr_5qad.js} +1 -1
  126. package/core/built/admin/assets/{settings-D72z6T_a.js → settings-BPsfSgg3.js} +1 -1
  127. package/core/built/admin/assets/{settings-BGbGoa4s.js → settings-BTd0Adha.js} +19 -19
  128. package/core/built/admin/assets/{sort-button-BOLTpImz.js → sort-button-k76_5HR2.js} +1 -1
  129. package/core/built/admin/assets/{source-icon-BqEM5MvU.js → source-icon-DMt0UskC.js} +1 -1
  130. package/core/built/admin/assets/{sprout-Bf-wc2Vo.js → sprout-Td9eaOoY.js} +2 -2
  131. package/core/built/admin/assets/{square-Cj_bJ0HZ.js → square-Df8vEYlG.js} +1 -1
  132. package/core/built/admin/assets/stats/{audience-BiHYBUzT.mjs → audience-DMTObpL8.mjs} +3 -3
  133. package/core/built/admin/assets/stats/{content-helpers-CIXZiyCm.mjs → content-helpers-ReMp9KJN.mjs} +4 -4
  134. package/core/built/admin/assets/stats/{index-CkKk-p14.mjs → index-6L-yLKFX.mjs} +8 -8
  135. package/core/built/admin/assets/stats/{index-DBB8Oih1.mjs → index-CIUyjeP-.mjs} +5 -5
  136. package/core/built/admin/assets/stats/{index-9zQR4gr0.mjs → index-CMSDpQm3.mjs} +3626 -3513
  137. package/core/built/admin/assets/stats/{index-DErXBfDM.mjs → index-Ca-_KJzy.mjs} +5 -5
  138. package/core/built/admin/assets/stats/{index-DMSmQLxG.mjs → index-CfO5yPSP.mjs} +5 -5
  139. package/core/built/admin/assets/stats/{sort-button-BqY7GFaO.mjs → sort-button-BB_M2CdZ.mjs} +3 -3
  140. package/core/built/admin/assets/stats/{stats-BeJgKX2G.mjs → stats-B2nnuLeU.mjs} +4 -4
  141. package/core/built/admin/assets/stats/stats.js +1 -1
  142. package/core/built/admin/assets/stats/{tabs-CPz357mW.mjs → tabs-DjJG-d3O.mjs} +3 -3
  143. package/core/built/admin/assets/stats/{use-growth-stats-WMYXBQE3.mjs → use-growth-stats-BMT5M7l6.mjs} +3 -3
  144. package/core/built/admin/assets/{stats-DWpHtRym.js → stats-Bs9ZbmXX.js} +1 -1
  145. package/core/built/admin/assets/stats-view-BWoPuaLz.js +1 -0
  146. package/core/built/admin/assets/{step-1-Bjya9Gt0.js → step-1-BUvsuCs0.js} +1 -1
  147. package/core/built/admin/assets/{step-2-CJ6I8JNc.js → step-2-DI9ekXls.js} +1 -1
  148. package/core/built/admin/assets/{step-3-3fs6Y2Kj.js → step-3-DzT_XhaS.js} +2 -2
  149. package/core/built/admin/assets/{table-B4zlzEDP.js → table-BKqaEGAm.js} +1 -1
  150. package/core/built/admin/assets/{tabs-mR5oJGm5.js → tabs-G6Ql8vbf.js} +1 -1
  151. package/core/built/admin/assets/tags-BHm-dlBs.js +1 -0
  152. package/core/built/admin/assets/{tags-CsgMtkFL.js → tags-_taMP0sJ.js} +1 -1
  153. package/core/built/admin/assets/{textarea-CQjEvapR.js → textarea-DcVuGYYq.js} +1 -1
  154. package/core/built/admin/assets/{tiers-CQE0v797.js → tiers-kv-xBoqQ.js} +1 -1
  155. package/core/built/admin/assets/{toggle-group-CR-Z-bJL.js → toggle-group-DsatLdt7.js} +1 -1
  156. package/core/built/admin/assets/{topic-filter-_NyD55eH.js → topic-filter-DkJyIuAf.js} +1 -1
  157. package/core/built/admin/assets/{trash-BFSLkv0z.js → trash-BeZZgbn-.js} +1 -1
  158. package/core/built/admin/assets/{upload-BTxT4v2z.js → upload-BG7KNIn7.js} +4 -4
  159. package/core/built/admin/assets/{use-growth-stats-BGymNu5O.js → use-growth-stats-CNGdl44N.js} +1 -1
  160. package/core/built/admin/assets/use-scroll-restoration-CQ3w0W98.js +1 -0
  161. package/core/built/admin/assets/{use-simple-pagination-Cq7Afp_c.js → use-simple-pagination-BeIJ_5Vv.js} +1 -1
  162. package/core/built/admin/assets/{user-plus-DMl69yKl.js → user-plus-CMxR50-Y.js} +1 -1
  163. package/core/built/admin/assets/{user-round-check-CVuZXUPz.js → user-round-check-2nhPmqP3.js} +1 -1
  164. package/core/built/admin/assets/virtual-list-window-Uq8oKYVG.js +4 -0
  165. package/core/built/admin/assets/{wallet-cards-zHR_y6Sp.js → wallet-cards-CJcVzH0D.js} +1 -1
  166. package/core/built/admin/assets/{web-CmFHgeQw.js → web-BPwTFKrc.js} +1 -1
  167. package/core/built/admin/index.html +7 -7
  168. package/core/frontend/helpers/ghost_head.js +1 -4
  169. package/core/server/data/migrations/versions/6.25/2026-03-26-15-47-00-insert-default-email-design-settings-row.js +42 -0
  170. package/core/server/data/migrations/versions/6.25/2026-03-30-20-22-25-add-email-design-setting-permissions.js +44 -0
  171. package/core/server/data/migrations/versions/6.25/2026-03-30-22-16-43-add-email-design-setting-id-to-automated-emails.js +8 -0
  172. package/core/server/data/migrations/versions/6.25/2026-03-31-13-12-10-backfill-automated-emails-email-design-setting-id.js +45 -0
  173. package/core/server/data/migrations/versions/6.25/2026-03-31-20-31-19-drop-nullable-on-automated-emails-email-design-setting-id.js +3 -0
  174. package/core/server/data/schema/fixtures/fixtures.json +35 -0
  175. package/core/server/data/schema/schema.js +1 -0
  176. package/core/server/data/seeders/importers/comment-reports-importer.js +1 -3
  177. package/core/server/data/seeders/importers/comments-importer.js +3 -2
  178. package/core/server/data/seeders/importers/email-batches-importer.js +3 -3
  179. package/core/server/data/seeders/importers/email-recipients-importer.js +6 -6
  180. package/core/server/data/seeders/importers/emails-importer.js +4 -3
  181. package/core/server/data/seeders/importers/members-click-events-importer.js +1 -1
  182. package/core/server/data/seeders/importers/members-created-events-importer.js +2 -1
  183. package/core/server/data/seeders/importers/members-feedback-importer.js +3 -4
  184. package/core/server/data/seeders/importers/members-login-events-importer.js +3 -2
  185. package/core/server/data/seeders/importers/members-status-events-importer.js +1 -2
  186. package/core/server/data/seeders/importers/members-stripe-customers-importer.js +2 -1
  187. package/core/server/data/seeders/importers/members-stripe-customers-subscriptions-importer.js +4 -2
  188. package/core/server/data/seeders/importers/members-subscribe-events-importer.js +1 -2
  189. package/core/server/data/seeders/importers/members-subscription-created-events-importer.js +3 -1
  190. package/core/server/data/seeders/importers/offer-redemptions-importer.js +3 -3
  191. package/core/server/data/seeders/utils/database-date.js +26 -1
  192. package/core/server/models/automated-email.js +27 -0
  193. package/core/server/models/email-design-setting.js +27 -0
  194. package/core/server/services/members/service.js +0 -22
  195. package/core/server/services/stripe/service.js +1 -2
  196. package/core/server/services/verification/verification-webhook-service.js +2 -2
  197. package/core/server/services/verification/verification-webhook-service.ts +2 -2
  198. package/core/server/services/verification-trigger.js +34 -69
  199. package/core/server/services/webhooks/webhook-trigger.js +1 -1
  200. package/core/shared/labs.js +2 -2
  201. package/package.json +10 -28
  202. package/tsconfig.tsbuildinfo +1 -1
  203. package/yarn.lock +423 -107
  204. package/components/tryghost-i18n-6.24.0.tgz +0 -0
  205. package/components/tryghost-parse-email-address-6.24.0.tgz +0 -0
  206. package/core/built/admin/assets/comments-CteqV7ZN.js +0 -1
  207. package/core/built/admin/assets/filters-DXXaCya7.js +0 -1
  208. package/core/built/admin/assets/index-QB-va_sk.css +0 -1
  209. package/core/built/admin/assets/index-nBUk6L1X.js +0 -1
  210. package/core/built/admin/assets/kpis-Cv75oSPY.js +0 -1
  211. package/core/built/admin/assets/members-DcElgZ2t.js +0 -15
  212. package/core/built/admin/assets/posts/filters-Ds_ZaYIU.mjs +0 -2722
  213. package/core/built/admin/assets/posts/posts-DI5YQFp4.mjs +0 -17
  214. package/core/built/admin/assets/posts/tags-CjwolIiT.mjs +0 -395
  215. package/core/built/admin/assets/posts/use-scroll-restoration-YSR5jwQl.mjs +0 -232
  216. package/core/built/admin/assets/posts-CJHEP4C-.js +0 -1
  217. package/core/built/admin/assets/stats-view-CcyaLPwj.js +0 -1
  218. package/core/built/admin/assets/tags-DEFC6GpD.js +0 -1
  219. package/core/built/admin/assets/use-infinite-virtual-scroll-CNqGwgHd.js +0 -4
  220. package/core/built/admin/assets/use-scroll-restoration-BWtb0NrS.js +0 -1
  221. package/core/shared/config/env/config.testing-browser.json +0 -98
  222. /package/core/built/admin/assets/{chunk.423.dae9a3bbe7845c3a3cfc.js.LICENSE.txt → chunk.434.de8a15730373eccfeefe.js.LICENSE.txt} +0 -0
@@ -1,2722 +0,0 @@
1
- import { q as A, a as re, D as F, u as M, j as a, b as z, o as D, E as gr, F as _e, G as ke, H as nt, J as br, U as yr, v as V, B as Le, A as Me, a4 as wr, n as I, W as yt, T as W } from "./index-By5yPnMZ.mjs";
2
- import { P as He, q as wt, t as jt, r as jr, s as Cr, u as Nr, F as Pr, R as _r, b as kr, O as Sr, d as Er, C as Q, X as Ct } from "./dialog-67vvNv8e.mjs";
3
- import { h as we, b as st, d as ot, P as je, f as B, e as te, i as Tr, m as Fr, c as ge } from "./heading-DXxLDQ96.mjs";
4
- import { S as Ir, P as Ar, L as Qe, b as Or } from "./search-DQuB1WMm.mjs";
5
- import { u as zr, g as qe, R as Nt, A as lt, h as Pt, i as _t, D as Rr, a as Vr, b as $r, c as Dr } from "./dropdown-menu-BKZfsAPJ.mjs";
6
- function Lr(e) {
7
- const r = A({ value: e, previous: e });
8
- return re(() => (r.current.value !== e && (r.current.previous = r.current.value, r.current.value = e), r.current.previous), [e]);
9
- }
10
- var Be = "Switch", [Mr] = ot(Be), [Hr, qr] = Mr(Be), kt = F(
11
- (e, r) => {
12
- const {
13
- __scopeSwitch: t,
14
- name: s,
15
- checked: n,
16
- defaultChecked: o,
17
- required: l,
18
- disabled: i,
19
- value: d = "on",
20
- onCheckedChange: p,
21
- form: c,
22
- ...y
23
- } = e, [w, g] = M(null), C = we(r, (O) => g(O)), h = A(!1), x = w ? c || !!w.closest("form") : !0, [b, _] = st({
24
- prop: n,
25
- defaultProp: o ?? !1,
26
- onChange: p,
27
- caller: Be
28
- });
29
- return /* @__PURE__ */ a.jsxs(Hr, { scope: t, checked: b, disabled: i, children: [
30
- /* @__PURE__ */ a.jsx(
31
- je.button,
32
- {
33
- type: "button",
34
- role: "switch",
35
- "aria-checked": b,
36
- "aria-required": l,
37
- "data-state": Ft(b),
38
- "data-disabled": i ? "" : void 0,
39
- disabled: i,
40
- value: d,
41
- ...y,
42
- ref: C,
43
- onClick: B(e.onClick, (O) => {
44
- _((v) => !v), x && (h.current = O.isPropagationStopped(), h.current || O.stopPropagation());
45
- })
46
- }
47
- ),
48
- x && /* @__PURE__ */ a.jsx(
49
- Tt,
50
- {
51
- control: w,
52
- bubbles: !h.current,
53
- name: s,
54
- value: d,
55
- checked: b,
56
- required: l,
57
- disabled: i,
58
- form: c,
59
- style: { transform: "translateX(-100%)" }
60
- }
61
- )
62
- ] });
63
- }
64
- );
65
- kt.displayName = Be;
66
- var St = "SwitchThumb", Et = F(
67
- (e, r) => {
68
- const { __scopeSwitch: t, ...s } = e, n = qr(St, t);
69
- return /* @__PURE__ */ a.jsx(
70
- je.span,
71
- {
72
- "data-state": Ft(n.checked),
73
- "data-disabled": n.disabled ? "" : void 0,
74
- ...s,
75
- ref: r
76
- }
77
- );
78
- }
79
- );
80
- Et.displayName = St;
81
- var Br = "SwitchBubbleInput", Tt = F(
82
- ({
83
- __scopeSwitch: e,
84
- control: r,
85
- checked: t,
86
- bubbles: s = !0,
87
- ...n
88
- }, o) => {
89
- const l = A(null), i = we(l, o), d = Lr(t), p = zr(r);
90
- return z(() => {
91
- const c = l.current;
92
- if (!c) return;
93
- const y = window.HTMLInputElement.prototype, g = Object.getOwnPropertyDescriptor(
94
- y,
95
- "checked"
96
- ).set;
97
- if (d !== t && g) {
98
- const C = new Event("click", { bubbles: s });
99
- g.call(c, t), c.dispatchEvent(C);
100
- }
101
- }, [d, t, s]), /* @__PURE__ */ a.jsx(
102
- "input",
103
- {
104
- type: "checkbox",
105
- "aria-hidden": !0,
106
- defaultChecked: t,
107
- ...n,
108
- tabIndex: -1,
109
- ref: i,
110
- style: {
111
- ...n.style,
112
- ...p,
113
- position: "absolute",
114
- pointerEvents: "none",
115
- opacity: 0,
116
- margin: 0
117
- }
118
- }
119
- );
120
- }
121
- );
122
- Tt.displayName = Br;
123
- function Ft(e) {
124
- return e ? "checked" : "unchecked";
125
- }
126
- var It = kt, Wr = Et, Kr = Object.freeze({
127
- // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
128
- position: "absolute",
129
- border: 0,
130
- width: 1,
131
- height: 1,
132
- padding: 0,
133
- margin: -1,
134
- overflow: "hidden",
135
- clip: "rect(0, 0, 0, 0)",
136
- whiteSpace: "nowrap",
137
- wordWrap: "normal"
138
- }), Ur = "VisuallyHidden", At = F(
139
- (e, r) => /* @__PURE__ */ a.jsx(
140
- je.span,
141
- {
142
- ...e,
143
- ref: r,
144
- style: { ...Kr, ...e.style }
145
- }
146
- )
147
- );
148
- At.displayName = Ur;
149
- var Gr = At, [We] = ot("Tooltip", [
150
- qe
151
- ]), Ke = qe(), Ot = "TooltipProvider", Yr = 700, et = "tooltip.open", [Xr, it] = We(Ot), zt = (e) => {
152
- const {
153
- __scopeTooltip: r,
154
- delayDuration: t = Yr,
155
- skipDelayDuration: s = 300,
156
- disableHoverableContent: n = !1,
157
- children: o
158
- } = e, l = A(!0), i = A(!1), d = A(0);
159
- return z(() => {
160
- const p = d.current;
161
- return () => window.clearTimeout(p);
162
- }, []), /* @__PURE__ */ a.jsx(
163
- Xr,
164
- {
165
- scope: r,
166
- isOpenDelayedRef: l,
167
- delayDuration: t,
168
- onOpen: D(() => {
169
- window.clearTimeout(d.current), l.current = !1;
170
- }, []),
171
- onClose: D(() => {
172
- window.clearTimeout(d.current), d.current = window.setTimeout(
173
- () => l.current = !0,
174
- s
175
- );
176
- }, [s]),
177
- isPointerInTransitRef: i,
178
- onPointerInTransitChange: D((p) => {
179
- i.current = p;
180
- }, []),
181
- disableHoverableContent: n,
182
- children: o
183
- }
184
- );
185
- };
186
- zt.displayName = Ot;
187
- var Se = "Tooltip", [Zr, Ee] = We(Se), Rt = (e) => {
188
- const {
189
- __scopeTooltip: r,
190
- children: t,
191
- open: s,
192
- defaultOpen: n,
193
- onOpenChange: o,
194
- disableHoverableContent: l,
195
- delayDuration: i
196
- } = e, d = it(Se, e.__scopeTooltip), p = Ke(r), [c, y] = M(null), w = te(), g = A(0), C = l ?? d.disableHoverableContent, h = i ?? d.delayDuration, x = A(!1), [b, _] = st({
197
- prop: s,
198
- defaultProp: n ?? !1,
199
- onChange: (R) => {
200
- R ? (d.onOpen(), document.dispatchEvent(new CustomEvent(et))) : d.onClose(), o == null || o(R);
201
- },
202
- caller: Se
203
- }), O = re(() => b ? x.current ? "delayed-open" : "instant-open" : "closed", [b]), v = D(() => {
204
- window.clearTimeout(g.current), g.current = 0, x.current = !1, _(!0);
205
- }, [_]), S = D(() => {
206
- window.clearTimeout(g.current), g.current = 0, _(!1);
207
- }, [_]), E = D(() => {
208
- window.clearTimeout(g.current), g.current = window.setTimeout(() => {
209
- x.current = !0, _(!0), g.current = 0;
210
- }, h);
211
- }, [h, _]);
212
- return z(() => () => {
213
- g.current && (window.clearTimeout(g.current), g.current = 0);
214
- }, []), /* @__PURE__ */ a.jsx(Nt, { ...p, children: /* @__PURE__ */ a.jsx(
215
- Zr,
216
- {
217
- scope: r,
218
- contentId: w,
219
- open: b,
220
- stateAttribute: O,
221
- trigger: c,
222
- onTriggerChange: y,
223
- onTriggerEnter: D(() => {
224
- d.isOpenDelayedRef.current ? E() : v();
225
- }, [d.isOpenDelayedRef, E, v]),
226
- onTriggerLeave: D(() => {
227
- C ? S() : (window.clearTimeout(g.current), g.current = 0);
228
- }, [S, C]),
229
- onOpen: v,
230
- onClose: S,
231
- disableHoverableContent: C,
232
- children: t
233
- }
234
- ) });
235
- };
236
- Rt.displayName = Se;
237
- var tt = "TooltipTrigger", Vt = F(
238
- (e, r) => {
239
- const { __scopeTooltip: t, ...s } = e, n = Ee(tt, t), o = it(tt, t), l = Ke(t), i = A(null), d = we(r, i, n.onTriggerChange), p = A(!1), c = A(!1), y = D(() => p.current = !1, []);
240
- return z(() => () => document.removeEventListener("pointerup", y), [y]), /* @__PURE__ */ a.jsx(lt, { asChild: !0, ...l, children: /* @__PURE__ */ a.jsx(
241
- je.button,
242
- {
243
- "aria-describedby": n.open ? n.contentId : void 0,
244
- "data-state": n.stateAttribute,
245
- ...s,
246
- ref: d,
247
- onPointerMove: B(e.onPointerMove, (w) => {
248
- w.pointerType !== "touch" && !c.current && !o.isPointerInTransitRef.current && (n.onTriggerEnter(), c.current = !0);
249
- }),
250
- onPointerLeave: B(e.onPointerLeave, () => {
251
- n.onTriggerLeave(), c.current = !1;
252
- }),
253
- onPointerDown: B(e.onPointerDown, () => {
254
- n.open && n.onClose(), p.current = !0, document.addEventListener("pointerup", y, { once: !0 });
255
- }),
256
- onFocus: B(e.onFocus, () => {
257
- p.current || n.onOpen();
258
- }),
259
- onBlur: B(e.onBlur, n.onClose),
260
- onClick: B(e.onClick, n.onClose)
261
- }
262
- ) });
263
- }
264
- );
265
- Vt.displayName = tt;
266
- var ct = "TooltipPortal", [Jr, Qr] = We(ct, {
267
- forceMount: void 0
268
- }), $t = (e) => {
269
- const { __scopeTooltip: r, forceMount: t, children: s, container: n } = e, o = Ee(ct, r);
270
- return /* @__PURE__ */ a.jsx(Jr, { scope: r, forceMount: t, children: /* @__PURE__ */ a.jsx(He, { present: t || o.open, children: /* @__PURE__ */ a.jsx(wt, { asChild: !0, container: n, children: s }) }) });
271
- };
272
- $t.displayName = ct;
273
- var be = "TooltipContent", Dt = F(
274
- (e, r) => {
275
- const t = Qr(be, e.__scopeTooltip), { forceMount: s = t.forceMount, side: n = "top", ...o } = e, l = Ee(be, e.__scopeTooltip);
276
- return /* @__PURE__ */ a.jsx(He, { present: s || l.open, children: l.disableHoverableContent ? /* @__PURE__ */ a.jsx(Lt, { side: n, ...o, ref: r }) : /* @__PURE__ */ a.jsx(ea, { side: n, ...o, ref: r }) });
277
- }
278
- ), ea = F((e, r) => {
279
- const t = Ee(be, e.__scopeTooltip), s = it(be, e.__scopeTooltip), n = A(null), o = we(r, n), [l, i] = M(null), { trigger: d, onClose: p } = t, c = n.current, { onPointerInTransitChange: y } = s, w = D(() => {
280
- i(null), y(!1);
281
- }, [y]), g = D(
282
- (C, h) => {
283
- const x = C.currentTarget, b = { x: C.clientX, y: C.clientY }, _ = sa(b, x.getBoundingClientRect()), O = oa(b, _), v = la(h.getBoundingClientRect()), S = ca([...O, ...v]);
284
- i(S), y(!0);
285
- },
286
- [y]
287
- );
288
- return z(() => () => w(), [w]), z(() => {
289
- if (d && c) {
290
- const C = (x) => g(x, c), h = (x) => g(x, d);
291
- return d.addEventListener("pointerleave", C), c.addEventListener("pointerleave", h), () => {
292
- d.removeEventListener("pointerleave", C), c.removeEventListener("pointerleave", h);
293
- };
294
- }
295
- }, [d, c, g, w]), z(() => {
296
- if (l) {
297
- const C = (h) => {
298
- const x = h.target, b = { x: h.clientX, y: h.clientY }, _ = (d == null ? void 0 : d.contains(x)) || (c == null ? void 0 : c.contains(x)), O = !ia(b, l);
299
- _ ? w() : O && (w(), p());
300
- };
301
- return document.addEventListener("pointermove", C), () => document.removeEventListener("pointermove", C);
302
- }
303
- }, [d, c, l, p, w]), /* @__PURE__ */ a.jsx(Lt, { ...e, ref: o });
304
- }), [ta, ra] = We(Se, { isInside: !1 }), aa = Tr("TooltipContent"), Lt = F(
305
- (e, r) => {
306
- const {
307
- __scopeTooltip: t,
308
- children: s,
309
- "aria-label": n,
310
- onEscapeKeyDown: o,
311
- onPointerDownOutside: l,
312
- ...i
313
- } = e, d = Ee(be, t), p = Ke(t), { onClose: c } = d;
314
- return z(() => (document.addEventListener(et, c), () => document.removeEventListener(et, c)), [c]), z(() => {
315
- if (d.trigger) {
316
- const y = (w) => {
317
- const g = w.target;
318
- g != null && g.contains(d.trigger) && c();
319
- };
320
- return window.addEventListener("scroll", y, { capture: !0 }), () => window.removeEventListener("scroll", y, { capture: !0 });
321
- }
322
- }, [d.trigger, c]), /* @__PURE__ */ a.jsx(
323
- jt,
324
- {
325
- asChild: !0,
326
- disableOutsidePointerEvents: !1,
327
- onEscapeKeyDown: o,
328
- onPointerDownOutside: l,
329
- onFocusOutside: (y) => y.preventDefault(),
330
- onDismiss: c,
331
- children: /* @__PURE__ */ a.jsxs(
332
- Pt,
333
- {
334
- "data-state": d.stateAttribute,
335
- ...p,
336
- ...i,
337
- ref: r,
338
- style: {
339
- ...i.style,
340
- "--radix-tooltip-content-transform-origin": "var(--radix-popper-transform-origin)",
341
- "--radix-tooltip-content-available-width": "var(--radix-popper-available-width)",
342
- "--radix-tooltip-content-available-height": "var(--radix-popper-available-height)",
343
- "--radix-tooltip-trigger-width": "var(--radix-popper-anchor-width)",
344
- "--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
345
- },
346
- children: [
347
- /* @__PURE__ */ a.jsx(aa, { children: s }),
348
- /* @__PURE__ */ a.jsx(ta, { scope: t, isInside: !0, children: /* @__PURE__ */ a.jsx(Gr, { id: d.contentId, role: "tooltip", children: n || s }) })
349
- ]
350
- }
351
- )
352
- }
353
- );
354
- }
355
- );
356
- Dt.displayName = be;
357
- var Mt = "TooltipArrow", na = F(
358
- (e, r) => {
359
- const { __scopeTooltip: t, ...s } = e, n = Ke(t);
360
- return ra(
361
- Mt,
362
- t
363
- ).isInside ? null : /* @__PURE__ */ a.jsx(_t, { ...n, ...s, ref: r });
364
- }
365
- );
366
- na.displayName = Mt;
367
- function sa(e, r) {
368
- const t = Math.abs(r.top - e.y), s = Math.abs(r.bottom - e.y), n = Math.abs(r.right - e.x), o = Math.abs(r.left - e.x);
369
- switch (Math.min(t, s, n, o)) {
370
- case o:
371
- return "left";
372
- case n:
373
- return "right";
374
- case t:
375
- return "top";
376
- case s:
377
- return "bottom";
378
- default:
379
- throw new Error("unreachable");
380
- }
381
- }
382
- function oa(e, r, t = 5) {
383
- const s = [];
384
- switch (r) {
385
- case "top":
386
- s.push(
387
- { x: e.x - t, y: e.y + t },
388
- { x: e.x + t, y: e.y + t }
389
- );
390
- break;
391
- case "bottom":
392
- s.push(
393
- { x: e.x - t, y: e.y - t },
394
- { x: e.x + t, y: e.y - t }
395
- );
396
- break;
397
- case "left":
398
- s.push(
399
- { x: e.x + t, y: e.y - t },
400
- { x: e.x + t, y: e.y + t }
401
- );
402
- break;
403
- case "right":
404
- s.push(
405
- { x: e.x - t, y: e.y - t },
406
- { x: e.x - t, y: e.y + t }
407
- );
408
- break;
409
- }
410
- return s;
411
- }
412
- function la(e) {
413
- const { top: r, right: t, bottom: s, left: n } = e;
414
- return [
415
- { x: n, y: r },
416
- { x: t, y: r },
417
- { x: t, y: s },
418
- { x: n, y: s }
419
- ];
420
- }
421
- function ia(e, r) {
422
- const { x: t, y: s } = e;
423
- let n = !1;
424
- for (let o = 0, l = r.length - 1; o < r.length; l = o++) {
425
- const i = r[o], d = r[l], p = i.x, c = i.y, y = d.x, w = d.y;
426
- c > s != w > s && t < (y - p) * (s - c) / (w - c) + p && (n = !n);
427
- }
428
- return n;
429
- }
430
- function ca(e) {
431
- const r = e.slice();
432
- return r.sort((t, s) => t.x < s.x ? -1 : t.x > s.x ? 1 : t.y < s.y ? -1 : t.y > s.y ? 1 : 0), ua(r);
433
- }
434
- function ua(e) {
435
- if (e.length <= 1) return e.slice();
436
- const r = [];
437
- for (let s = 0; s < e.length; s++) {
438
- const n = e[s];
439
- for (; r.length >= 2; ) {
440
- const o = r[r.length - 1], l = r[r.length - 2];
441
- if ((o.x - l.x) * (n.y - l.y) >= (o.y - l.y) * (n.x - l.x)) r.pop();
442
- else break;
443
- }
444
- r.push(n);
445
- }
446
- r.pop();
447
- const t = [];
448
- for (let s = e.length - 1; s >= 0; s--) {
449
- const n = e[s];
450
- for (; t.length >= 2; ) {
451
- const o = t[t.length - 1], l = t[t.length - 2];
452
- if ((o.x - l.x) * (n.y - l.y) >= (o.y - l.y) * (n.x - l.x)) t.pop();
453
- else break;
454
- }
455
- t.push(n);
456
- }
457
- return t.pop(), r.length === 1 && t.length === 1 && r[0].x === t[0].x && r[0].y === t[0].y ? r : r.concat(t);
458
- }
459
- var da = zt, pa = Rt, ma = Vt, va = $t, Ht = Dt, Ue = "Popover", [qt] = ot(Ue, [
460
- qe
461
- ]), Te = qe(), [ha, ne] = qt(Ue), Bt = (e) => {
462
- const {
463
- __scopePopover: r,
464
- children: t,
465
- open: s,
466
- defaultOpen: n,
467
- onOpenChange: o,
468
- modal: l = !1
469
- } = e, i = Te(r), d = A(null), [p, c] = M(!1), [y, w] = st({
470
- prop: s,
471
- defaultProp: n ?? !1,
472
- onChange: o,
473
- caller: Ue
474
- });
475
- return /* @__PURE__ */ a.jsx(Nt, { ...i, children: /* @__PURE__ */ a.jsx(
476
- ha,
477
- {
478
- scope: r,
479
- contentId: te(),
480
- triggerRef: d,
481
- open: y,
482
- onOpenChange: w,
483
- onOpenToggle: D(() => w((g) => !g), [w]),
484
- hasCustomAnchor: p,
485
- onCustomAnchorAdd: D(() => c(!0), []),
486
- onCustomAnchorRemove: D(() => c(!1), []),
487
- modal: l,
488
- children: t
489
- }
490
- ) });
491
- };
492
- Bt.displayName = Ue;
493
- var Wt = "PopoverAnchor", fa = F(
494
- (e, r) => {
495
- const { __scopePopover: t, ...s } = e, n = ne(Wt, t), o = Te(t), { onCustomAnchorAdd: l, onCustomAnchorRemove: i } = n;
496
- return z(() => (l(), () => i()), [l, i]), /* @__PURE__ */ a.jsx(lt, { ...o, ...s, ref: r });
497
- }
498
- );
499
- fa.displayName = Wt;
500
- var Kt = "PopoverTrigger", Ut = F(
501
- (e, r) => {
502
- const { __scopePopover: t, ...s } = e, n = ne(Kt, t), o = Te(t), l = we(r, n.triggerRef), i = /* @__PURE__ */ a.jsx(
503
- je.button,
504
- {
505
- type: "button",
506
- "aria-haspopup": "dialog",
507
- "aria-expanded": n.open,
508
- "aria-controls": n.contentId,
509
- "data-state": Jt(n.open),
510
- ...s,
511
- ref: l,
512
- onClick: B(e.onClick, n.onOpenToggle)
513
- }
514
- );
515
- return n.hasCustomAnchor ? i : /* @__PURE__ */ a.jsx(lt, { asChild: !0, ...o, children: i });
516
- }
517
- );
518
- Ut.displayName = Kt;
519
- var ut = "PopoverPortal", [xa, ga] = qt(ut, {
520
- forceMount: void 0
521
- }), Gt = (e) => {
522
- const { __scopePopover: r, forceMount: t, children: s, container: n } = e, o = ne(ut, r);
523
- return /* @__PURE__ */ a.jsx(xa, { scope: r, forceMount: t, children: /* @__PURE__ */ a.jsx(He, { present: t || o.open, children: /* @__PURE__ */ a.jsx(wt, { asChild: !0, container: n, children: s }) }) });
524
- };
525
- Gt.displayName = ut;
526
- var ye = "PopoverContent", Yt = F(
527
- (e, r) => {
528
- const t = ga(ye, e.__scopePopover), { forceMount: s = t.forceMount, ...n } = e, o = ne(ye, e.__scopePopover);
529
- return /* @__PURE__ */ a.jsx(He, { present: s || o.open, children: o.modal ? /* @__PURE__ */ a.jsx(ya, { ...n, ref: r }) : /* @__PURE__ */ a.jsx(wa, { ...n, ref: r }) });
530
- }
531
- );
532
- Yt.displayName = ye;
533
- var ba = Fr("PopoverContent.RemoveScroll"), ya = F(
534
- (e, r) => {
535
- const t = ne(ye, e.__scopePopover), s = A(null), n = we(r, s), o = A(!1);
536
- return z(() => {
537
- const l = s.current;
538
- if (l) return jr(l);
539
- }, []), /* @__PURE__ */ a.jsx(Cr, { as: ba, allowPinchZoom: !0, children: /* @__PURE__ */ a.jsx(
540
- Xt,
541
- {
542
- ...e,
543
- ref: n,
544
- trapFocus: t.open,
545
- disableOutsidePointerEvents: !0,
546
- onCloseAutoFocus: B(e.onCloseAutoFocus, (l) => {
547
- var i;
548
- l.preventDefault(), o.current || (i = t.triggerRef.current) == null || i.focus();
549
- }),
550
- onPointerDownOutside: B(
551
- e.onPointerDownOutside,
552
- (l) => {
553
- const i = l.detail.originalEvent, d = i.button === 0 && i.ctrlKey === !0, p = i.button === 2 || d;
554
- o.current = p;
555
- },
556
- { checkForDefaultPrevented: !1 }
557
- ),
558
- onFocusOutside: B(
559
- e.onFocusOutside,
560
- (l) => l.preventDefault(),
561
- { checkForDefaultPrevented: !1 }
562
- )
563
- }
564
- ) });
565
- }
566
- ), wa = F(
567
- (e, r) => {
568
- const t = ne(ye, e.__scopePopover), s = A(!1), n = A(!1);
569
- return /* @__PURE__ */ a.jsx(
570
- Xt,
571
- {
572
- ...e,
573
- ref: r,
574
- trapFocus: !1,
575
- disableOutsidePointerEvents: !1,
576
- onCloseAutoFocus: (o) => {
577
- var l, i;
578
- (l = e.onCloseAutoFocus) == null || l.call(e, o), o.defaultPrevented || (s.current || (i = t.triggerRef.current) == null || i.focus(), o.preventDefault()), s.current = !1, n.current = !1;
579
- },
580
- onInteractOutside: (o) => {
581
- var d, p;
582
- (d = e.onInteractOutside) == null || d.call(e, o), o.defaultPrevented || (s.current = !0, o.detail.originalEvent.type === "pointerdown" && (n.current = !0));
583
- const l = o.target;
584
- ((p = t.triggerRef.current) == null ? void 0 : p.contains(l)) && o.preventDefault(), o.detail.originalEvent.type === "focusin" && n.current && o.preventDefault();
585
- }
586
- }
587
- );
588
- }
589
- ), Xt = F(
590
- (e, r) => {
591
- const {
592
- __scopePopover: t,
593
- trapFocus: s,
594
- onOpenAutoFocus: n,
595
- onCloseAutoFocus: o,
596
- disableOutsidePointerEvents: l,
597
- onEscapeKeyDown: i,
598
- onPointerDownOutside: d,
599
- onFocusOutside: p,
600
- onInteractOutside: c,
601
- ...y
602
- } = e, w = ne(ye, t), g = Te(t);
603
- return Nr(), /* @__PURE__ */ a.jsx(
604
- Pr,
605
- {
606
- asChild: !0,
607
- loop: !0,
608
- trapped: s,
609
- onMountAutoFocus: n,
610
- onUnmountAutoFocus: o,
611
- children: /* @__PURE__ */ a.jsx(
612
- jt,
613
- {
614
- asChild: !0,
615
- disableOutsidePointerEvents: l,
616
- onInteractOutside: c,
617
- onEscapeKeyDown: i,
618
- onPointerDownOutside: d,
619
- onFocusOutside: p,
620
- onDismiss: () => w.onOpenChange(!1),
621
- children: /* @__PURE__ */ a.jsx(
622
- Pt,
623
- {
624
- "data-state": Jt(w.open),
625
- role: "dialog",
626
- id: w.contentId,
627
- ...g,
628
- ...y,
629
- ref: r,
630
- style: {
631
- ...y.style,
632
- "--radix-popover-content-transform-origin": "var(--radix-popper-transform-origin)",
633
- "--radix-popover-content-available-width": "var(--radix-popper-available-width)",
634
- "--radix-popover-content-available-height": "var(--radix-popper-available-height)",
635
- "--radix-popover-trigger-width": "var(--radix-popper-anchor-width)",
636
- "--radix-popover-trigger-height": "var(--radix-popper-anchor-height)"
637
- }
638
- }
639
- )
640
- }
641
- )
642
- }
643
- );
644
- }
645
- ), Zt = "PopoverClose", ja = F(
646
- (e, r) => {
647
- const { __scopePopover: t, ...s } = e, n = ne(Zt, t);
648
- return /* @__PURE__ */ a.jsx(
649
- je.button,
650
- {
651
- type: "button",
652
- ...s,
653
- ref: r,
654
- onClick: B(e.onClick, () => n.onOpenChange(!1))
655
- }
656
- );
657
- }
658
- );
659
- ja.displayName = Zt;
660
- var Ca = "PopoverArrow", Na = F(
661
- (e, r) => {
662
- const { __scopePopover: t, ...s } = e, n = Te(t);
663
- return /* @__PURE__ */ a.jsx(_t, { ...n, ...s, ref: r });
664
- }
665
- );
666
- Na.displayName = Ca;
667
- function Jt(e) {
668
- return e ? "open" : "closed";
669
- }
670
- var Pa = Bt, _a = Ut, ka = Gt, Qt = Yt, vt = 1, Sa = 0.9, Ea = 0.8, Ta = 0.17, Xe = 0.1, Ze = 0.999, Fa = 0.9999, Ia = 0.99, Aa = /[\\\/_+.#"@\[\(\{&]/, Oa = /[\\\/_+.#"@\[\(\{&]/g, za = /[\s-]/, er = /[\s-]/g;
671
- function rt(e, r, t, s, n, o, l) {
672
- if (o === r.length) return n === e.length ? vt : Ia;
673
- var i = `${n},${o}`;
674
- if (l[i] !== void 0) return l[i];
675
- for (var d = s.charAt(o), p = t.indexOf(d, n), c = 0, y, w, g, C; p >= 0; ) y = rt(e, r, t, s, p + 1, o + 1, l), y > c && (p === n ? y *= vt : Aa.test(e.charAt(p - 1)) ? (y *= Ea, g = e.slice(n, p - 1).match(Oa), g && n > 0 && (y *= Math.pow(Ze, g.length))) : za.test(e.charAt(p - 1)) ? (y *= Sa, C = e.slice(n, p - 1).match(er), C && n > 0 && (y *= Math.pow(Ze, C.length))) : (y *= Ta, n > 0 && (y *= Math.pow(Ze, p - n))), e.charAt(p) !== r.charAt(o) && (y *= Fa)), (y < Xe && t.charAt(p - 1) === s.charAt(o + 1) || s.charAt(o + 1) === s.charAt(o) && t.charAt(p - 1) !== s.charAt(o)) && (w = rt(e, r, t, s, p + 1, o + 2, l), w * Xe > y && (y = w * Xe)), y > c && (c = y), p = t.indexOf(d, p + 1);
676
- return l[i] = c, c;
677
- }
678
- function ht(e) {
679
- return e.toLowerCase().replace(er, " ");
680
- }
681
- function Ra(e, r, t) {
682
- return e = t && t.length > 0 ? `${e + " " + t.join(" ")}` : e, rt(e, r, ht(e), ht(r), 0, 0, {});
683
- }
684
- var Va = Symbol.for("react.lazy"), ze = gr[" use ".trim().toString()];
685
- function $a(e) {
686
- return typeof e == "object" && e !== null && "then" in e;
687
- }
688
- function tr(e) {
689
- return e != null && typeof e == "object" && "$$typeof" in e && e.$$typeof === Va && "_payload" in e && $a(e._payload);
690
- }
691
- // @__NO_SIDE_EFFECTS__
692
- function Da(e) {
693
- const r = /* @__PURE__ */ La(e), t = F((s, n) => {
694
- let { children: o, ...l } = s;
695
- tr(o) && typeof ze == "function" && (o = ze(o._payload));
696
- const i = _e.toArray(o), d = i.find(Ha);
697
- if (d) {
698
- const p = d.props.children, c = i.map((y) => y === d ? _e.count(p) > 1 ? _e.only(null) : ke(p) ? p.props.children : null : y);
699
- return /* @__PURE__ */ a.jsx(r, { ...l, ref: n, children: ke(p) ? nt(p, void 0, c) : null });
700
- }
701
- return /* @__PURE__ */ a.jsx(r, { ...l, ref: n, children: o });
702
- });
703
- return t.displayName = `${e}.Slot`, t;
704
- }
705
- // @__NO_SIDE_EFFECTS__
706
- function La(e) {
707
- const r = F((t, s) => {
708
- let { children: n, ...o } = t;
709
- if (tr(n) && typeof ze == "function" && (n = ze(n._payload)), ke(n)) {
710
- const l = Ba(n), i = qa(o, n.props);
711
- return n.type !== br && (i.ref = s ? ge(s, l) : l), nt(n, i);
712
- }
713
- return _e.count(n) > 1 ? _e.only(null) : null;
714
- });
715
- return r.displayName = `${e}.SlotClone`, r;
716
- }
717
- var Ma = Symbol("radix.slottable");
718
- function Ha(e) {
719
- return ke(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === Ma;
720
- }
721
- function qa(e, r) {
722
- const t = { ...r };
723
- for (const s in r) {
724
- const n = e[s], o = r[s];
725
- /^on[A-Z]/.test(s) ? n && o ? t[s] = (...i) => {
726
- const d = o(...i);
727
- return n(...i), d;
728
- } : n && (t[s] = n) : s === "style" ? t[s] = { ...n, ...o } : s === "className" && (t[s] = [n, o].filter(Boolean).join(" "));
729
- }
730
- return { ...e, ...t };
731
- }
732
- function Ba(e) {
733
- var s, n;
734
- let r = (s = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : s.get, t = r && "isReactWarning" in r && r.isReactWarning;
735
- return t ? e.ref : (r = (n = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : n.get, t = r && "isReactWarning" in r && r.isReactWarning, t ? e.props.ref : e.props.ref || e.ref);
736
- }
737
- var Wa = [
738
- "a",
739
- "button",
740
- "div",
741
- "form",
742
- "h2",
743
- "h3",
744
- "img",
745
- "input",
746
- "label",
747
- "li",
748
- "nav",
749
- "ol",
750
- "p",
751
- "select",
752
- "span",
753
- "svg",
754
- "ul"
755
- ], se = Wa.reduce((e, r) => {
756
- const t = /* @__PURE__ */ Da(`Primitive.${r}`), s = F((n, o) => {
757
- const { asChild: l, ...i } = n, d = l ? t : r;
758
- return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ a.jsx(d, { ...i, ref: o });
759
- });
760
- return s.displayName = `Primitive.${r}`, { ...e, [r]: s };
761
- }, {}), Ne = '[cmdk-group=""]', Je = '[cmdk-group-items=""]', Ka = '[cmdk-group-heading=""]', rr = '[cmdk-item=""]', ft = `${rr}:not([aria-disabled="true"])`, at = "cmdk-item-select", ve = "data-value", Ua = (e, r, t) => Ra(e, r, t), ar = Me(void 0), Fe = () => Le(ar), nr = Me(void 0), dt = () => Le(nr), sr = Me(void 0), or = F((e, r) => {
762
- let t = he(() => {
763
- var m, N;
764
- return { search: "", value: (N = (m = e.value) != null ? m : e.defaultValue) != null ? N : "", selectedItemId: void 0, filtered: { count: 0, items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Set() } };
765
- }), s = he(() => /* @__PURE__ */ new Set()), n = he(() => /* @__PURE__ */ new Map()), o = he(() => /* @__PURE__ */ new Map()), l = he(() => /* @__PURE__ */ new Set()), i = lr(e), { label: d, children: p, value: c, onValueChange: y, filter: w, shouldFilter: g, loop: C, disablePointerSelection: h = !1, vimBindings: x = !0, ...b } = e, _ = te(), O = te(), v = te(), S = A(null), E = nn();
766
- de(() => {
767
- if (c !== void 0) {
768
- let m = c.trim();
769
- t.current.value = m, R.emit();
770
- }
771
- }, [c]), de(() => {
772
- E(6, J);
773
- }, []);
774
- let R = re(() => ({ subscribe: (m) => (l.current.add(m), () => l.current.delete(m)), snapshot: () => t.current, setState: (m, N, T) => {
775
- var u, f, j, k;
776
- if (!Object.is(t.current[m], N)) {
777
- if (t.current[m] = N, m === "search") K(), oe(), E(1, le);
778
- else if (m === "value") {
779
- if (document.activeElement.hasAttribute("cmdk-input") || document.activeElement.hasAttribute("cmdk-root")) {
780
- let P = document.getElementById(v);
781
- P ? P.focus() : (u = document.getElementById(_)) == null || u.focus();
782
- }
783
- if (E(7, () => {
784
- var P;
785
- t.current.selectedItemId = (P = q()) == null ? void 0 : P.id, R.emit();
786
- }), T || E(5, J), ((f = i.current) == null ? void 0 : f.value) !== void 0) {
787
- let P = N ?? "";
788
- (k = (j = i.current).onValueChange) == null || k.call(j, P);
789
- return;
790
- }
791
- }
792
- R.emit();
793
- }
794
- }, emit: () => {
795
- l.current.forEach((m) => m());
796
- } }), []), Y = re(() => ({ value: (m, N, T) => {
797
- var u;
798
- N !== ((u = o.current.get(m)) == null ? void 0 : u.value) && (o.current.set(m, { value: N, keywords: T }), t.current.filtered.items.set(m, me(N, T)), E(2, () => {
799
- oe(), R.emit();
800
- }));
801
- }, item: (m, N) => (s.current.add(m), N && (n.current.has(N) ? n.current.get(N).add(m) : n.current.set(N, /* @__PURE__ */ new Set([m]))), E(3, () => {
802
- K(), oe(), t.current.value || le(), R.emit();
803
- }), () => {
804
- o.current.delete(m), s.current.delete(m), t.current.filtered.items.delete(m);
805
- let T = q();
806
- E(4, () => {
807
- K(), (T == null ? void 0 : T.getAttribute("id")) === m && le(), R.emit();
808
- });
809
- }), group: (m) => (n.current.has(m) || n.current.set(m, /* @__PURE__ */ new Set()), () => {
810
- o.current.delete(m), n.current.delete(m);
811
- }), filter: () => i.current.shouldFilter, label: d || e["aria-label"], getDisablePointerSelection: () => i.current.disablePointerSelection, listId: _, inputId: v, labelId: O, listInnerRef: S }), []);
812
- function me(m, N) {
813
- var T, u;
814
- let f = (u = (T = i.current) == null ? void 0 : T.filter) != null ? u : Ua;
815
- return m ? f(m, t.current.search, N) : 0;
816
- }
817
- function oe() {
818
- if (!t.current.search || i.current.shouldFilter === !1) return;
819
- let m = t.current.filtered.items, N = [];
820
- t.current.filtered.groups.forEach((u) => {
821
- let f = n.current.get(u), j = 0;
822
- f.forEach((k) => {
823
- let P = m.get(k);
824
- j = Math.max(P, j);
825
- }), N.push([u, j]);
826
- });
827
- let T = S.current;
828
- ie().sort((u, f) => {
829
- var j, k;
830
- let P = u.getAttribute("id"), $ = f.getAttribute("id");
831
- return ((j = m.get($)) != null ? j : 0) - ((k = m.get(P)) != null ? k : 0);
832
- }).forEach((u) => {
833
- let f = u.closest(Je);
834
- f ? f.appendChild(u.parentElement === f ? u : u.closest(`${Je} > *`)) : T.appendChild(u.parentElement === T ? u : u.closest(`${Je} > *`));
835
- }), N.sort((u, f) => f[1] - u[1]).forEach((u) => {
836
- var f;
837
- let j = (f = S.current) == null ? void 0 : f.querySelector(`${Ne}[${ve}="${encodeURIComponent(u[0])}"]`);
838
- j == null || j.parentElement.appendChild(j);
839
- });
840
- }
841
- function le() {
842
- let m = ie().find((T) => T.getAttribute("aria-disabled") !== "true"), N = m == null ? void 0 : m.getAttribute(ve);
843
- R.setState("value", N || void 0);
844
- }
845
- function K() {
846
- var m, N, T, u;
847
- if (!t.current.search || i.current.shouldFilter === !1) {
848
- t.current.filtered.count = s.current.size;
849
- return;
850
- }
851
- t.current.filtered.groups = /* @__PURE__ */ new Set();
852
- let f = 0;
853
- for (let j of s.current) {
854
- let k = (N = (m = o.current.get(j)) == null ? void 0 : m.value) != null ? N : "", P = (u = (T = o.current.get(j)) == null ? void 0 : T.keywords) != null ? u : [], $ = me(k, P);
855
- t.current.filtered.items.set(j, $), $ > 0 && f++;
856
- }
857
- for (let [j, k] of n.current) for (let P of k) if (t.current.filtered.items.get(P) > 0) {
858
- t.current.filtered.groups.add(j);
859
- break;
860
- }
861
- t.current.filtered.count = f;
862
- }
863
- function J() {
864
- var m, N, T;
865
- let u = q();
866
- u && (((m = u.parentElement) == null ? void 0 : m.firstChild) === u && ((T = (N = u.closest(Ne)) == null ? void 0 : N.querySelector(Ka)) == null || T.scrollIntoView({ block: "nearest" })), u.scrollIntoView({ block: "nearest" }));
867
- }
868
- function q() {
869
- var m;
870
- return (m = S.current) == null ? void 0 : m.querySelector(`${rr}[aria-selected="true"]`);
871
- }
872
- function ie() {
873
- var m;
874
- return Array.from(((m = S.current) == null ? void 0 : m.querySelectorAll(ft)) || []);
875
- }
876
- function U(m) {
877
- let N = ie()[m];
878
- N && R.setState("value", N.getAttribute(ve));
879
- }
880
- function G(m) {
881
- var N;
882
- let T = q(), u = ie(), f = u.findIndex((k) => k === T), j = u[f + m];
883
- (N = i.current) != null && N.loop && (j = f + m < 0 ? u[u.length - 1] : f + m === u.length ? u[0] : u[f + m]), j && R.setState("value", j.getAttribute(ve));
884
- }
885
- function ce(m) {
886
- let N = q(), T = N == null ? void 0 : N.closest(Ne), u;
887
- for (; T && !u; ) T = m > 0 ? rn(T, Ne) : an(T, Ne), u = T == null ? void 0 : T.querySelector(ft);
888
- u ? R.setState("value", u.getAttribute(ve)) : G(m);
889
- }
890
- let X = () => U(ie().length - 1), Ce = (m) => {
891
- m.preventDefault(), m.metaKey ? X() : m.altKey ? ce(1) : G(1);
892
- }, Ae = (m) => {
893
- m.preventDefault(), m.metaKey ? U(0) : m.altKey ? ce(-1) : G(-1);
894
- };
895
- return V(se.div, { ref: r, tabIndex: -1, ...b, "cmdk-root": "", onKeyDown: (m) => {
896
- var N;
897
- (N = b.onKeyDown) == null || N.call(b, m);
898
- let T = m.nativeEvent.isComposing || m.keyCode === 229;
899
- if (!(m.defaultPrevented || T)) switch (m.key) {
900
- case "n":
901
- case "j": {
902
- x && m.ctrlKey && Ce(m);
903
- break;
904
- }
905
- case "ArrowDown": {
906
- Ce(m);
907
- break;
908
- }
909
- case "p":
910
- case "k": {
911
- x && m.ctrlKey && Ae(m);
912
- break;
913
- }
914
- case "ArrowUp": {
915
- Ae(m);
916
- break;
917
- }
918
- case "Home": {
919
- m.preventDefault(), U(0);
920
- break;
921
- }
922
- case "End": {
923
- m.preventDefault(), X();
924
- break;
925
- }
926
- case "Enter": {
927
- m.preventDefault();
928
- let u = q();
929
- if (u) {
930
- let f = new Event(at);
931
- u.dispatchEvent(f);
932
- }
933
- }
934
- }
935
- } }, V("label", { "cmdk-label": "", htmlFor: Y.inputId, id: Y.labelId, style: on }, d), Ge(e, (m) => V(nr.Provider, { value: R }, V(ar.Provider, { value: Y }, m))));
936
- }), Ga = F((e, r) => {
937
- var t, s;
938
- let n = te(), o = A(null), l = Le(sr), i = Fe(), d = lr(e), p = (s = (t = d.current) == null ? void 0 : t.forceMount) != null ? s : l == null ? void 0 : l.forceMount;
939
- de(() => {
940
- if (!p) return i.item(n, l == null ? void 0 : l.id);
941
- }, [p]);
942
- let c = ir(n, o, [e.value, e.children, o], e.keywords), y = dt(), w = ae((E) => E.value && E.value === c.current), g = ae((E) => p || i.filter() === !1 ? !0 : E.search ? E.filtered.items.get(n) > 0 : !0);
943
- z(() => {
944
- let E = o.current;
945
- if (!(!E || e.disabled)) return E.addEventListener(at, C), () => E.removeEventListener(at, C);
946
- }, [g, e.onSelect, e.disabled]);
947
- function C() {
948
- var E, R;
949
- h(), (R = (E = d.current).onSelect) == null || R.call(E, c.current);
950
- }
951
- function h() {
952
- y.setState("value", c.current, !0);
953
- }
954
- if (!g) return null;
955
- let { disabled: x, value: b, onSelect: _, forceMount: O, keywords: v, ...S } = e;
956
- return V(se.div, { ref: ge(o, r), ...S, id: n, "cmdk-item": "", role: "option", "aria-disabled": !!x, "aria-selected": !!w, "data-disabled": !!x, "data-selected": !!w, onPointerMove: x || i.getDisablePointerSelection() ? void 0 : h, onClick: x ? void 0 : C }, e.children);
957
- }), Ya = F((e, r) => {
958
- let { heading: t, children: s, forceMount: n, ...o } = e, l = te(), i = A(null), d = A(null), p = te(), c = Fe(), y = ae((g) => n || c.filter() === !1 ? !0 : g.search ? g.filtered.groups.has(l) : !0);
959
- de(() => c.group(l), []), ir(l, i, [e.value, e.heading, d]);
960
- let w = re(() => ({ id: l, forceMount: n }), [n]);
961
- return V(se.div, { ref: ge(i, r), ...o, "cmdk-group": "", role: "presentation", hidden: y ? void 0 : !0 }, t && V("div", { ref: d, "cmdk-group-heading": "", "aria-hidden": !0, id: p }, t), Ge(e, (g) => V("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": t ? p : void 0 }, V(sr.Provider, { value: w }, g))));
962
- }), Xa = F((e, r) => {
963
- let { alwaysRender: t, ...s } = e, n = A(null), o = ae((l) => !l.search);
964
- return !t && !o ? null : V(se.div, { ref: ge(n, r), ...s, "cmdk-separator": "", role: "separator" });
965
- }), Za = F((e, r) => {
966
- let { onValueChange: t, ...s } = e, n = e.value != null, o = dt(), l = ae((p) => p.search), i = ae((p) => p.selectedItemId), d = Fe();
967
- return z(() => {
968
- e.value != null && o.setState("search", e.value);
969
- }, [e.value]), V(se.input, { ref: r, ...s, "cmdk-input": "", autoComplete: "off", autoCorrect: "off", spellCheck: !1, "aria-autocomplete": "list", role: "combobox", "aria-expanded": !0, "aria-controls": d.listId, "aria-labelledby": d.labelId, "aria-activedescendant": i, id: d.inputId, type: "text", value: n ? e.value : l, onChange: (p) => {
970
- n || o.setState("search", p.target.value), t == null || t(p.target.value);
971
- } });
972
- }), Ja = F((e, r) => {
973
- let { children: t, label: s = "Suggestions", ...n } = e, o = A(null), l = A(null), i = ae((p) => p.selectedItemId), d = Fe();
974
- return z(() => {
975
- if (l.current && o.current) {
976
- let p = l.current, c = o.current, y, w = new ResizeObserver(() => {
977
- y = requestAnimationFrame(() => {
978
- let g = p.offsetHeight;
979
- c.style.setProperty("--cmdk-list-height", g.toFixed(1) + "px");
980
- });
981
- });
982
- return w.observe(p), () => {
983
- cancelAnimationFrame(y), w.unobserve(p);
984
- };
985
- }
986
- }, []), V(se.div, { ref: ge(o, r), ...n, "cmdk-list": "", role: "listbox", tabIndex: -1, "aria-activedescendant": i, "aria-label": s, id: d.listId }, Ge(e, (p) => V("div", { ref: ge(l, d.listInnerRef), "cmdk-list-sizer": "" }, p)));
987
- }), Qa = F((e, r) => {
988
- let { open: t, onOpenChange: s, overlayClassName: n, contentClassName: o, container: l, ...i } = e;
989
- return V(_r, { open: t, onOpenChange: s }, V(kr, { container: l }, V(Sr, { "cmdk-overlay": "", className: n }), V(Er, { "aria-label": e.label, "cmdk-dialog": "", className: o }, V(or, { ref: r, ...i }))));
990
- }), en = F((e, r) => ae((t) => t.filtered.count === 0) ? V(se.div, { ref: r, ...e, "cmdk-empty": "", role: "presentation" }) : null), tn = F((e, r) => {
991
- let { progress: t, children: s, label: n = "Loading...", ...o } = e;
992
- return V(se.div, { ref: r, ...o, "cmdk-loading": "", role: "progressbar", "aria-valuenow": t, "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": n }, Ge(e, (l) => V("div", { "aria-hidden": !0 }, l)));
993
- }), pe = Object.assign(or, { List: Ja, Item: Ga, Input: Za, Group: Ya, Separator: Xa, Dialog: Qa, Empty: en, Loading: tn });
994
- function rn(e, r) {
995
- let t = e.nextElementSibling;
996
- for (; t; ) {
997
- if (t.matches(r)) return t;
998
- t = t.nextElementSibling;
999
- }
1000
- }
1001
- function an(e, r) {
1002
- let t = e.previousElementSibling;
1003
- for (; t; ) {
1004
- if (t.matches(r)) return t;
1005
- t = t.previousElementSibling;
1006
- }
1007
- }
1008
- function lr(e) {
1009
- let r = A(e);
1010
- return de(() => {
1011
- r.current = e;
1012
- }), r;
1013
- }
1014
- var de = typeof window > "u" ? z : yr;
1015
- function he(e) {
1016
- let r = A();
1017
- return r.current === void 0 && (r.current = e()), r;
1018
- }
1019
- function ae(e) {
1020
- let r = dt(), t = () => e(r.snapshot());
1021
- return wr(r.subscribe, t, t);
1022
- }
1023
- function ir(e, r, t, s = []) {
1024
- let n = A(), o = Fe();
1025
- return de(() => {
1026
- var l;
1027
- let i = (() => {
1028
- var p;
1029
- for (let c of t) {
1030
- if (typeof c == "string") return c.trim();
1031
- if (typeof c == "object" && "current" in c) return c.current ? (p = c.current.textContent) == null ? void 0 : p.trim() : n.current;
1032
- }
1033
- })(), d = s.map((p) => p.trim());
1034
- o.value(e, i, d), (l = r.current) == null || l.setAttribute(ve, i), n.current = i;
1035
- }), n;
1036
- }
1037
- var nn = () => {
1038
- let [e, r] = M(), t = he(() => /* @__PURE__ */ new Map());
1039
- return de(() => {
1040
- t.current.forEach((s) => s()), t.current = /* @__PURE__ */ new Map();
1041
- }, [e]), (s, n) => {
1042
- t.current.set(s, n), r({});
1043
- };
1044
- };
1045
- function sn(e) {
1046
- let r = e.type;
1047
- return typeof r == "function" ? r(e.props) : "render" in r ? r.render(e.props) : e;
1048
- }
1049
- function Ge({ asChild: e, children: r }, t) {
1050
- return e && ke(r) ? nt(sn(r), { ref: r.ref }, t(r.props.children)) : t(r);
1051
- }
1052
- var on = { position: "absolute", width: "1px", height: "1px", padding: "0", margin: "-1px", overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0" };
1053
- function Re({ className: e, ...r }) {
1054
- return /* @__PURE__ */ a.jsx(
1055
- pe,
1056
- {
1057
- className: I(
1058
- "flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
1059
- e
1060
- ),
1061
- ...r
1062
- }
1063
- );
1064
- }
1065
- function Ve({ className: e, ...r }) {
1066
- return /* @__PURE__ */ a.jsxs("div", { className: "flex items-center border-b border-border px-3", "cmdk-input-wrapper": "", "data-slot": "command-input", children: [
1067
- /* @__PURE__ */ a.jsx(Ir, { className: "me-2 size-4 shrink-0 opacity-50" }),
1068
- /* @__PURE__ */ a.jsx(
1069
- pe.Input,
1070
- {
1071
- className: I(
1072
- "flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-hidden text-foreground placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
1073
- e
1074
- ),
1075
- ...r
1076
- }
1077
- )
1078
- ] });
1079
- }
1080
- function $e({ className: e, ...r }) {
1081
- return /* @__PURE__ */ a.jsx(
1082
- pe.List,
1083
- {
1084
- className: I("max-h-[300px] p-1 overflow-y-auto overflow-x-hidden", e),
1085
- "data-slot": "command-list",
1086
- ...r
1087
- }
1088
- );
1089
- }
1090
- function De({ ...e }) {
1091
- return /* @__PURE__ */ a.jsx(pe.Empty, { className: "py-6 text-center text-sm", "data-slot": "command-empty", ...e });
1092
- }
1093
- function ee({ className: e, ...r }) {
1094
- return /* @__PURE__ */ a.jsx(
1095
- pe.Group,
1096
- {
1097
- className: I(
1098
- "overflow-hidden p-1.5 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
1099
- e
1100
- ),
1101
- "data-slot": "command-group",
1102
- ...r
1103
- }
1104
- );
1105
- }
1106
- function xe({ className: e, ...r }) {
1107
- return /* @__PURE__ */ a.jsx(
1108
- pe.Separator,
1109
- {
1110
- className: I("-mx-1.5 h-px bg-border", e),
1111
- "data-slot": "command-separator",
1112
- ...r
1113
- }
1114
- );
1115
- }
1116
- function Z({ className: e, ...r }) {
1117
- return /* @__PURE__ */ a.jsx(
1118
- pe.Item,
1119
- {
1120
- className: I(
1121
- "relative flex text-foreground cursor-default gap-2 select-none items-center rounded-xs px-2 py-1.5 text-sm outline-hidden data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
1122
- "[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:stroke-[1.5px]",
1123
- e
1124
- ),
1125
- "data-slot": "command-item",
1126
- ...r
1127
- }
1128
- );
1129
- }
1130
- function Sn({ icon: e = Q, className: r, ...t }) {
1131
- return /* @__PURE__ */ a.jsx(
1132
- e,
1133
- {
1134
- className: I("size-4 ms-auto text-primary", r),
1135
- "data-check": "true",
1136
- "data-slot": "command-check",
1137
- ...t
1138
- }
1139
- );
1140
- }
1141
- const pt = Pa, mt = _a, Ye = F(({ className: e, align: r = "center", sideOffset: t = 4, ...s }, n) => /* @__PURE__ */ a.jsx(ka, { children: /* @__PURE__ */ a.jsx("div", { className: yt, children: /* @__PURE__ */ a.jsx(
1142
- Qt,
1143
- {
1144
- ref: n,
1145
- align: r,
1146
- className: I(
1147
- "z-50 rounded-md bg-white dark:bg-gray-950 p-5 text-popover-foreground shadow-md border outline-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-(--radix-popover-content-transform-origin)",
1148
- e
1149
- ),
1150
- sideOffset: t,
1151
- ...s
1152
- }
1153
- ) }) }));
1154
- Ye.displayName = Qt.displayName;
1155
- const ln = W(
1156
- "peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background focus-visible:outline-hidden disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
1157
- {
1158
- variants: {
1159
- size: {
1160
- default: "h-5 w-9",
1161
- sm: "h-4 w-7"
1162
- }
1163
- },
1164
- defaultVariants: {
1165
- size: "default"
1166
- }
1167
- }
1168
- ), cn = W(
1169
- "pointer-events-none block rounded-full bg-background ring-0 [filter:drop-shadow(0_1px_2px_rgba(0,0,0,0.07))] transition-transform data-[state=unchecked]:translate-x-0",
1170
- {
1171
- variants: {
1172
- size: {
1173
- default: "size-4 data-[state=checked]:translate-x-4",
1174
- sm: "size-3 data-[state=checked]:translate-x-3"
1175
- }
1176
- },
1177
- defaultVariants: {
1178
- size: "default"
1179
- }
1180
- }
1181
- ), cr = F(({ className: e, size: r, ...t }, s) => /* @__PURE__ */ a.jsx(
1182
- It,
1183
- {
1184
- className: I(ln({ size: r, className: e })),
1185
- ...t,
1186
- ref: s,
1187
- children: /* @__PURE__ */ a.jsx(
1188
- Wr,
1189
- {
1190
- className: I(cn({ size: r }))
1191
- }
1192
- )
1193
- }
1194
- ));
1195
- cr.displayName = It.displayName;
1196
- const En = da, un = pa, dn = ma, ur = F(({ className: e, sideOffset: r = 4, ...t }, s) => /* @__PURE__ */ a.jsx(va, { children: /* @__PURE__ */ a.jsx("div", { className: yt, children: /* @__PURE__ */ a.jsx(
1197
- Ht,
1198
- {
1199
- ref: s,
1200
- className: I(
1201
- "z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
1202
- e
1203
- ),
1204
- sideOffset: r,
1205
- ...t
1206
- }
1207
- ) }) }));
1208
- ur.displayName = Ht.displayName;
1209
- const fe = {
1210
- // UI Labels
1211
- addFilter: "",
1212
- clearFilters: "Clear",
1213
- searchFields: "Search fields...",
1214
- noFieldsFound: "No fields found.",
1215
- noResultsFound: "No results found.",
1216
- loading: "Loading...",
1217
- select: "Select...",
1218
- true: "True",
1219
- false: "False",
1220
- min: "Min",
1221
- max: "Max",
1222
- to: "to",
1223
- typeAndPressEnter: "Type and press Enter to add tag",
1224
- selected: "selected",
1225
- selectedCount: "selected",
1226
- percent: "%",
1227
- defaultCurrency: "$",
1228
- defaultColor: "#000000",
1229
- addFilterTitle: "",
1230
- // Operators
1231
- operators: {
1232
- is: "is",
1233
- isNot: "is not",
1234
- isAnyOf: "is any of",
1235
- isNotAnyOf: "is not any of",
1236
- includesAll: "includes all",
1237
- excludesAll: "excludes all",
1238
- before: "before",
1239
- after: "after",
1240
- between: "between",
1241
- notBetween: "not between",
1242
- contains: "contains",
1243
- notContains: "does not contain",
1244
- startsWith: "starts with",
1245
- endsWith: "ends with",
1246
- isExactly: "is exactly",
1247
- equals: "equals",
1248
- notEquals: "not equals",
1249
- greaterThan: "greater than",
1250
- lessThan: "less than",
1251
- overlaps: "overlaps",
1252
- includes: "includes",
1253
- excludes: "excludes",
1254
- includesAllOf: "includes all of",
1255
- includesAnyOf: "includes any of",
1256
- empty: "is empty",
1257
- notEmpty: "is not empty"
1258
- },
1259
- // Placeholders
1260
- placeholders: {
1261
- enterField: (e) => `Enter ${e}...`,
1262
- selectField: "Select...",
1263
- searchField: (e) => `Search ${e.toLowerCase()}...`,
1264
- enterKey: "Enter key...",
1265
- enterValue: "Enter value..."
1266
- },
1267
- // Helper functions
1268
- helpers: {
1269
- formatOperator: (e) => e.replace(/_/g, " ")
1270
- },
1271
- // Validation
1272
- validation: {
1273
- invalidEmail: "Invalid email format",
1274
- invalidUrl: "Invalid URL format",
1275
- invalidTel: "Invalid phone format",
1276
- invalid: "Invalid input format"
1277
- }
1278
- }, dr = Me({
1279
- variant: "outline",
1280
- size: "md",
1281
- radius: "md",
1282
- i18n: fe,
1283
- cursorPointer: !0,
1284
- className: void 0,
1285
- showAddButton: !0,
1286
- addButtonText: void 0,
1287
- addButtonIcon: void 0,
1288
- addButtonClassName: void 0,
1289
- addButton: void 0,
1290
- showSearchInput: !0,
1291
- trigger: void 0,
1292
- allowMultiple: !0
1293
- }), Ie = () => Le(dr), pn = W(
1294
- [
1295
- "relative flex shrink-0 items-center text-foreground outline-hidden transition",
1296
- "has-[[data-slot=filters-input]:focus-visible]:ring-ring/30",
1297
- "has-[[data-slot=filters-input]:focus-visible]:border-ring",
1298
- "has-[[data-slot=filters-input]:focus-visible]:outline-hidden",
1299
- "has-[[data-slot=filters-input]:focus-visible]:ring-[3px]",
1300
- "has-[[data-slot=filters-input]:focus-visible]:z-1",
1301
- "has-[[data-slot=filters-input]:[aria-invalid=true]]:border",
1302
- "has-[[data-slot=filters-input]:[aria-invalid=true]]:border-solid",
1303
- "has-[[data-slot=filters-input]:[aria-invalid=true]]:border-destructive/60",
1304
- "has-[[data-slot=filters-input]:[aria-invalid=true]]:ring-destructive/10",
1305
- "dark:has-[[data-slot=filters-input]:[aria-invalid=true]]:border-destructive",
1306
- "dark:has-[[data-slot=filters-input]:[aria-invalid=true]]:ring-destructive/20"
1307
- ],
1308
- {
1309
- variants: {
1310
- variant: {
1311
- solid: "border-0 bg-secondary",
1312
- outline: "border border-border bg-background"
1313
- },
1314
- size: {
1315
- lg: "h-10 px-2.5 text-sm has-[[data-slot=filters-prefix]]:ps-0 has-[[data-slot=filters-suffix]]:pe-0",
1316
- md: "h-[34px] px-2 text-sm has-[[data-slot=filters-prefix]]:ps-0 has-[[data-slot=filters-suffix]]:pe-0",
1317
- sm: "h-8 px-2 text-xs has-[[data-slot=filters-prefix]]:ps-0 has-[[data-slot=filters-suffix]]:pe-0"
1318
- },
1319
- cursorPointer: {
1320
- true: "cursor-pointer",
1321
- false: ""
1322
- }
1323
- },
1324
- defaultVariants: {
1325
- variant: "outline",
1326
- size: "md",
1327
- cursorPointer: !0
1328
- }
1329
- }
1330
- ), mn = W(
1331
- [
1332
- "inline-flex shrink-0 items-center justify-center text-muted-foreground transition hover:text-foreground",
1333
- "focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-hidden"
1334
- ],
1335
- {
1336
- variants: {
1337
- variant: {
1338
- solid: "bg-secondary",
1339
- outline: "border border-s-0 border-border hover:bg-secondary"
1340
- },
1341
- size: {
1342
- lg: "size-10 [&_svg:not([class*=size-])]:size-4",
1343
- md: "size-[34px] [&_svg:not([class*=size-])]:size-3.5",
1344
- sm: "size-8 [&_svg:not([class*=size-])]:size-3"
1345
- },
1346
- cursorPointer: {
1347
- true: "cursor-pointer",
1348
- false: ""
1349
- },
1350
- radius: {
1351
- md: "rounded-e-md",
1352
- full: "rounded-e-full"
1353
- }
1354
- },
1355
- defaultVariants: {
1356
- variant: "outline",
1357
- size: "md",
1358
- radius: "md",
1359
- cursorPointer: !0
1360
- }
1361
- }
1362
- ), xt = W(
1363
- [
1364
- "inline-flex shrink-0 items-center justify-center text-foreground transition",
1365
- "[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:stroke-[1.5px]",
1366
- "focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-hidden"
1367
- ],
1368
- {
1369
- variants: {
1370
- variant: {
1371
- solid: "border border-input hover:bg-secondary/60",
1372
- outline: "border border-border hover:bg-accent"
1373
- },
1374
- size: {
1375
- lg: "h-10 gap-1.5 px-4 text-sm [&_svg:not([class*=size-])]:size-4",
1376
- md: "h-[34px] gap-1.5 px-3 text-sm [&_svg:not([class*=size-])]:size-4",
1377
- sm: "h-8 gap-1.5 px-2.5 text-xs [&_svg:not([class*=size-])]:size-3.5"
1378
- },
1379
- radius: {
1380
- md: "rounded-md",
1381
- full: "rounded-full"
1382
- },
1383
- cursorPointer: {
1384
- true: "cursor-pointer",
1385
- false: ""
1386
- }
1387
- },
1388
- defaultVariants: {
1389
- variant: "outline",
1390
- size: "md",
1391
- cursorPointer: !0
1392
- }
1393
- }
1394
- ), vn = W(
1395
- [
1396
- "relative flex shrink-0 items-center whitespace-nowrap text-muted-foreground transition hover:text-foreground focus-visible:z-1 data-[state=open]:text-foreground",
1397
- "focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-hidden"
1398
- ],
1399
- {
1400
- variants: {
1401
- variant: {
1402
- solid: "bg-secondary",
1403
- outline: "border border-e-0 border-border bg-background hover:bg-secondary data-[state=open]:bg-secondary [&+[data-slot=filters-remove]]:border-s"
1404
- },
1405
- size: {
1406
- lg: "h-10 gap-1.5 px-4 text-sm",
1407
- md: "h-[34px] gap-0.5 px-3 text-sm",
1408
- sm: "h-8 gap-1 px-2.5 text-xs"
1409
- },
1410
- cursorPointer: {
1411
- true: "cursor-pointer",
1412
- false: ""
1413
- }
1414
- },
1415
- defaultVariants: {
1416
- variant: "outline",
1417
- size: "md",
1418
- cursorPointer: !0
1419
- }
1420
- }
1421
- ), hn = W(
1422
- [
1423
- "flex shrink-0 items-center gap-1.5 px-1.5 py-1 text-foreground",
1424
- "[&_svg:not([class*=size-])]:size-4"
1425
- ],
1426
- {
1427
- variants: {
1428
- variant: {
1429
- solid: "bg-secondary",
1430
- outline: "border border-e-0 border-border"
1431
- },
1432
- size: {
1433
- lg: "h-10 gap-1.5 px-4 text-sm [&_svg:not([class*=size-])]:size-4",
1434
- md: "h-[34px] gap-1.5 px-3 text-sm [&_svg:not([class*=size-])]:size-4",
1435
- sm: "h-8 gap-0.5 px-2.5 text-xs [&_svg:not([class*=size-])]:size-3.5"
1436
- },
1437
- radius: {
1438
- md: "rounded-s-md",
1439
- full: "rounded-s-full"
1440
- }
1441
- },
1442
- defaultVariants: {
1443
- variant: "outline",
1444
- size: "md"
1445
- }
1446
- }
1447
- ), Pe = W(
1448
- [
1449
- "relative flex min-w-0 shrink items-center gap-1 text-foreground transition focus-visible:z-1",
1450
- "focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-hidden"
1451
- ],
1452
- {
1453
- variants: {
1454
- variant: {
1455
- solid: "bg-secondary",
1456
- outline: "border border-border bg-background hover:bg-secondary has-[[data-slot=switch]]:hover:bg-transparent"
1457
- },
1458
- size: {
1459
- lg: "h-10 gap-1.5 px-4 text-sm [&_svg:not([class*=size-])]:size-4",
1460
- md: "h-[34px] gap-1.5 px-3 text-sm [&_svg:not([class*=size-])]:size-4",
1461
- sm: "h-8 gap-0.5 px-2.5 text-xs [&_svg:not([class*=size-])]:size-3.5"
1462
- },
1463
- cursorPointer: {
1464
- true: "cursor-pointer has-[[data-slot=switch]]:cursor-default",
1465
- false: ""
1466
- }
1467
- },
1468
- defaultVariants: {
1469
- variant: "outline",
1470
- size: "md",
1471
- cursorPointer: !0
1472
- }
1473
- }
1474
- ), gt = W("flex shrink-0 items-center justify-center text-foreground", {
1475
- variants: {
1476
- variant: {
1477
- solid: "",
1478
- outline: ""
1479
- },
1480
- size: {
1481
- lg: "h-10 px-4 text-sm",
1482
- md: "h-[34px] px-3 text-sm",
1483
- sm: "h-8 px-2.5 text-xs"
1484
- }
1485
- },
1486
- defaultVariants: {
1487
- variant: "outline",
1488
- size: "md"
1489
- }
1490
- }), Oe = W("flex shrink-0 items-center text-muted-foreground", {
1491
- variants: {
1492
- variant: {
1493
- solid: "bg-secondary",
1494
- outline: "border border-x-0 border-border bg-background"
1495
- },
1496
- size: {
1497
- lg: "h-10 px-4 text-sm",
1498
- md: "h-[34px] px-3 text-sm",
1499
- sm: "h-8 px-2.5 text-xs"
1500
- }
1501
- },
1502
- defaultVariants: {
1503
- variant: "outline",
1504
- size: "md"
1505
- }
1506
- }), fn = W("relative flex flex-wrap items-center", {
1507
- variants: {
1508
- variant: {
1509
- solid: "gap-2",
1510
- outline: ""
1511
- },
1512
- size: {
1513
- sm: "gap-1.5",
1514
- md: "gap-2.5",
1515
- lg: "gap-3.5"
1516
- }
1517
- },
1518
- defaultVariants: {
1519
- variant: "outline",
1520
- size: "md"
1521
- }
1522
- }), xn = W("flex max-w-[calc(100vw-32px)] items-center", {
1523
- variants: {
1524
- variant: {
1525
- solid: "gap-px",
1526
- outline: ""
1527
- }
1528
- },
1529
- defaultVariants: {
1530
- variant: "outline"
1531
- }
1532
- });
1533
- function H({
1534
- field: e,
1535
- onChange: r,
1536
- onBlur: t,
1537
- onKeyDown: s,
1538
- onInputChange: n,
1539
- className: o,
1540
- ...l
1541
- }) {
1542
- const i = Ie(), [d, p] = M(!0), [c, y] = M(""), w = (b, _) => !_ || !b ? !0 : new RegExp(_).test(b), g = (b, _ = !1) => {
1543
- if ((b === "text" || b === "number") && _)
1544
- return i.i18n.validation.invalid;
1545
- switch (b) {
1546
- case "email":
1547
- return i.i18n.validation.invalidEmail;
1548
- case "url":
1549
- return i.i18n.validation.invalidUrl;
1550
- case "tel":
1551
- return i.i18n.validation.invalidTel;
1552
- default:
1553
- return i.i18n.validation.invalid;
1554
- }
1555
- }, C = (b) => {
1556
- r == null || r(b);
1557
- }, h = (b) => {
1558
- const _ = b.target.value, O = (e == null ? void 0 : e.pattern) || l.pattern;
1559
- if (_ && O) {
1560
- let v = !0;
1561
- e != null && e.validation ? v = e.validation(_) : v = w(_, O), p(v);
1562
- const S = !!(e != null && e.pattern || l.pattern);
1563
- y(v ? "" : g((e == null ? void 0 : e.type) || "", S));
1564
- } else
1565
- p(!0), y("");
1566
- n && n(b), t == null || t(b);
1567
- }, x = (b) => {
1568
- if (!d && !["Tab", "Escape", "Enter", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"].includes(b.key) && (p(!0), y("")), b.key === "Enter" && n) {
1569
- const _ = {
1570
- ...b,
1571
- target: b.target,
1572
- currentTarget: b.currentTarget
1573
- };
1574
- n(_);
1575
- }
1576
- s == null || s(b);
1577
- };
1578
- return /* @__PURE__ */ a.jsxs(
1579
- "div",
1580
- {
1581
- className: I("w-36", pn({ variant: i.variant, size: i.size }), o),
1582
- "data-slot": "filters-input-wrapper",
1583
- children: [
1584
- (e == null ? void 0 : e.prefix) && /* @__PURE__ */ a.jsx(
1585
- "div",
1586
- {
1587
- className: gt({ variant: i.variant, size: i.size }),
1588
- "data-slot": "filters-prefix",
1589
- children: e.prefix
1590
- }
1591
- ),
1592
- /* @__PURE__ */ a.jsxs("div", { className: "flex w-full items-stretch", children: [
1593
- /* @__PURE__ */ a.jsx(
1594
- "input",
1595
- {
1596
- "aria-describedby": !d && c ? `${(e == null ? void 0 : e.key) || "input"}-error` : void 0,
1597
- "aria-invalid": !d,
1598
- className: "w-full outline-hidden",
1599
- "data-slot": "filters-input",
1600
- onBlur: h,
1601
- onChange: C,
1602
- onKeyDown: x,
1603
- ...l
1604
- }
1605
- ),
1606
- !d && c && /* @__PURE__ */ a.jsxs(un, { children: [
1607
- /* @__PURE__ */ a.jsx(dn, { asChild: !0, children: /* @__PURE__ */ a.jsx("div", { className: "absolute top-1/2 right-2 flex -translate-y-1/2 items-center", children: /* @__PURE__ */ a.jsx(Or, { className: "size-3.5 text-destructive" }) }) }),
1608
- /* @__PURE__ */ a.jsx(ur, { children: /* @__PURE__ */ a.jsx("p", { className: "text-sm", children: c }) })
1609
- ] })
1610
- ] }),
1611
- (e == null ? void 0 : e.suffix) && /* @__PURE__ */ a.jsx(
1612
- "div",
1613
- {
1614
- className: I(gt({ variant: i.variant, size: i.size })),
1615
- "data-slot": "filters-suffix",
1616
- children: e.suffix
1617
- }
1618
- )
1619
- ]
1620
- }
1621
- );
1622
- }
1623
- function gn({ className: e, icon: r = /* @__PURE__ */ a.jsx(Ct, {}), ...t }) {
1624
- const s = Ie();
1625
- return /* @__PURE__ */ a.jsx(
1626
- "button",
1627
- {
1628
- className: I(
1629
- mn({
1630
- variant: s.variant,
1631
- size: s.size,
1632
- cursorPointer: s.cursorPointer,
1633
- radius: s.radius
1634
- }),
1635
- e
1636
- ),
1637
- "data-slot": "filters-remove",
1638
- ...t,
1639
- type: "button",
1640
- children: r
1641
- }
1642
- );
1643
- }
1644
- const pr = (e) => "fields" in e && Array.isArray(e.fields), mr = (e) => !!(e.group && e.fields), vr = (e) => e.reduce((r, t) => pr(t) ? [...r, ...t.fields] : mr(t) ? [...r, ...t.fields] : [...r, t], []), bn = (e) => vr(e).reduce(
1645
- (t, s) => (s.key && (t[s.key] = s), t),
1646
- {}
1647
- ), hr = (e) => ({
1648
- select: [
1649
- { value: "is", label: e.operators.is },
1650
- { value: "is_not", label: e.operators.isNot },
1651
- { value: "empty", label: e.operators.empty },
1652
- { value: "not_empty", label: e.operators.notEmpty }
1653
- ],
1654
- multiselect: [
1655
- { value: "is_any_of", label: e.operators.isAnyOf },
1656
- { value: "is_not_any_of", label: e.operators.isNotAnyOf },
1657
- { value: "includes_all", label: e.operators.includesAll },
1658
- { value: "excludes_all", label: e.operators.excludesAll },
1659
- { value: "empty", label: e.operators.empty },
1660
- { value: "not_empty", label: e.operators.notEmpty }
1661
- ],
1662
- date: [
1663
- { value: "before", label: e.operators.before },
1664
- { value: "after", label: e.operators.after },
1665
- { value: "is", label: e.operators.is },
1666
- { value: "is_not", label: e.operators.isNot },
1667
- { value: "empty", label: e.operators.empty },
1668
- { value: "not_empty", label: e.operators.notEmpty }
1669
- ],
1670
- daterange: [
1671
- { value: "between", label: e.operators.between },
1672
- { value: "not_between", label: e.operators.notBetween },
1673
- { value: "empty", label: e.operators.empty },
1674
- { value: "not_empty", label: e.operators.notEmpty }
1675
- ],
1676
- text: [
1677
- { value: "contains", label: e.operators.contains },
1678
- { value: "not_contains", label: e.operators.notContains },
1679
- { value: "starts_with", label: e.operators.startsWith },
1680
- { value: "ends_with", label: e.operators.endsWith },
1681
- { value: "is", label: e.operators.isExactly },
1682
- { value: "empty", label: e.operators.empty },
1683
- { value: "not_empty", label: e.operators.notEmpty }
1684
- ],
1685
- number: [
1686
- { value: "equals", label: e.operators.equals },
1687
- { value: "not_equals", label: e.operators.notEquals },
1688
- { value: "greater_than", label: e.operators.greaterThan },
1689
- { value: "less_than", label: e.operators.lessThan },
1690
- { value: "between", label: e.operators.between },
1691
- { value: "empty", label: e.operators.empty },
1692
- { value: "not_empty", label: e.operators.notEmpty }
1693
- ],
1694
- numberrange: [
1695
- { value: "between", label: e.operators.between },
1696
- { value: "overlaps", label: e.operators.overlaps },
1697
- { value: "contains", label: e.operators.contains },
1698
- { value: "empty", label: e.operators.empty },
1699
- { value: "not_empty", label: e.operators.notEmpty }
1700
- ],
1701
- boolean: [
1702
- { value: "is", label: e.operators.is },
1703
- { value: "is_not", label: e.operators.isNot },
1704
- { value: "empty", label: e.operators.empty },
1705
- { value: "not_empty", label: e.operators.notEmpty }
1706
- ],
1707
- email: [
1708
- { value: "contains", label: e.operators.contains },
1709
- { value: "not_contains", label: e.operators.notContains },
1710
- { value: "starts_with", label: e.operators.startsWith },
1711
- { value: "ends_with", label: e.operators.endsWith },
1712
- { value: "is", label: e.operators.isExactly },
1713
- { value: "empty", label: e.operators.empty },
1714
- { value: "not_empty", label: e.operators.notEmpty }
1715
- ],
1716
- url: [
1717
- { value: "contains", label: e.operators.contains },
1718
- { value: "not_contains", label: e.operators.notContains },
1719
- { value: "starts_with", label: e.operators.startsWith },
1720
- { value: "ends_with", label: e.operators.endsWith },
1721
- { value: "is", label: e.operators.isExactly },
1722
- { value: "empty", label: e.operators.empty },
1723
- { value: "not_empty", label: e.operators.notEmpty }
1724
- ],
1725
- tel: [
1726
- { value: "contains", label: e.operators.contains },
1727
- { value: "not_contains", label: e.operators.notContains },
1728
- { value: "starts_with", label: e.operators.startsWith },
1729
- { value: "ends_with", label: e.operators.endsWith },
1730
- { value: "is", label: e.operators.isExactly },
1731
- { value: "empty", label: e.operators.empty },
1732
- { value: "not_empty", label: e.operators.notEmpty }
1733
- ],
1734
- time: [
1735
- { value: "before", label: e.operators.before },
1736
- { value: "after", label: e.operators.after },
1737
- { value: "is", label: e.operators.is },
1738
- { value: "between", label: e.operators.between },
1739
- { value: "empty", label: e.operators.empty },
1740
- { value: "not_empty", label: e.operators.notEmpty }
1741
- ],
1742
- datetime: [
1743
- { value: "before", label: e.operators.before },
1744
- { value: "after", label: e.operators.after },
1745
- { value: "is", label: e.operators.is },
1746
- { value: "between", label: e.operators.between },
1747
- { value: "empty", label: e.operators.empty },
1748
- { value: "not_empty", label: e.operators.notEmpty }
1749
- ]
1750
- });
1751
- hr(fe);
1752
- const yn = (e, r, t) => {
1753
- if (e.operators)
1754
- return e.operators;
1755
- const s = hr(t);
1756
- let n = e.type || "select";
1757
- return n === "select" && r.length > 1 && (n = "multiselect"), n === "multiselect" || e.type === "multiselect" ? s.multiselect : s[n] || s.select;
1758
- };
1759
- function wn({ field: e, operator: r, values: t, onChange: s }) {
1760
- var n;
1761
- const o = Ie(), l = yn(e, t, o.i18n), i = ((n = l.find((d) => d.value === r)) == null ? void 0 : n.label) || o.i18n.helpers.formatOperator(r);
1762
- return e.hideOperatorSelect ? /* @__PURE__ */ a.jsx("div", { className: "flex items-center self-stretch border border-r-[0px] px-3 text-sm whitespace-nowrap text-muted-foreground", children: i }) : /* @__PURE__ */ a.jsxs(Rr, { children: [
1763
- /* @__PURE__ */ a.jsx(Vr, { className: vn({ variant: o.variant, size: o.size }), children: i }),
1764
- /* @__PURE__ */ a.jsx($r, { align: "start", className: "w-fit min-w-fit", children: l.map((d) => /* @__PURE__ */ a.jsxs(
1765
- Dr,
1766
- {
1767
- className: "flex items-center justify-between",
1768
- onClick: () => s(d.value),
1769
- children: [
1770
- /* @__PURE__ */ a.jsx("span", { children: d.label }),
1771
- /* @__PURE__ */ a.jsx(Q, { className: `ms-auto text-primary ${d.value === r ? "opacity-100" : "opacity-0"}` })
1772
- ]
1773
- },
1774
- d.value
1775
- )) })
1776
- ] });
1777
- }
1778
- function fr({
1779
- field: e,
1780
- values: r,
1781
- onChange: t,
1782
- onClose: s,
1783
- inline: n = !1
1784
- }) {
1785
- var o;
1786
- const [l, i] = M(!1), [d, p] = M(e.searchValue || ""), [c, y] = M([]), w = Ie();
1787
- z(() => {
1788
- e.searchValue !== void 0 && p(e.searchValue);
1789
- }, [e.searchValue]);
1790
- const g = e.type === "multiselect" || r.length > 1, C = (e.value !== void 0 ? e.value : r) || [];
1791
- z(() => {
1792
- l && e.searchable !== !1 && setTimeout(() => {
1793
- const v = document.querySelector("[cmdk-input]");
1794
- v && v.focus();
1795
- }, 0);
1796
- }, [l, e.searchable]);
1797
- const h = re(
1798
- () => {
1799
- var v;
1800
- return ((v = e.options) == null ? void 0 : v.filter((S) => C.includes(S.value))) || [];
1801
- },
1802
- // eslint-disable-next-line react-hooks/exhaustive-deps
1803
- [e.options, JSON.stringify(C)]
1804
- );
1805
- z(() => {
1806
- if (C.length === 0) {
1807
- y([]);
1808
- return;
1809
- }
1810
- h.length > 0 && y((v) => {
1811
- const S = [];
1812
- for (const E of C) {
1813
- const R = h.find((Y) => Y.value === E) ?? v.find((Y) => Y.value === E);
1814
- R && S.push(R);
1815
- }
1816
- return S;
1817
- });
1818
- }, [h, C]);
1819
- const x = C.length > 0 ? c.length > 0 ? c : h : [], b = ((o = e.options) == null ? void 0 : o.filter((v) => !C.includes(v.value))) || [], _ = (v) => {
1820
- var S;
1821
- p(v), (S = e.onSearchChange) == null || S.call(e, v);
1822
- }, O = () => {
1823
- i(!1), e.searchValue === void 0 && setTimeout(() => p(""), 200), s == null || s();
1824
- };
1825
- return n ? /* @__PURE__ */ a.jsx("div", { className: "w-full", children: /* @__PURE__ */ a.jsxs(Re, { children: [
1826
- e.searchable !== !1 && /* @__PURE__ */ a.jsx(
1827
- Ve,
1828
- {
1829
- className: "h-8.5 text-sm",
1830
- placeholder: w.i18n.placeholders.searchField(e.label || ""),
1831
- value: d,
1832
- onValueChange: _
1833
- }
1834
- ),
1835
- /* @__PURE__ */ a.jsxs($e, { className: "outline-hidden", children: [
1836
- e.isLoading ? /* @__PURE__ */ a.jsxs("div", { className: "flex items-center justify-center py-6 text-sm text-muted-foreground", children: [
1837
- /* @__PURE__ */ a.jsx(Qe, { className: "mr-2 size-4 animate-spin" }),
1838
- w.i18n.loading
1839
- ] }) : /* @__PURE__ */ a.jsx(De, { children: w.i18n.noResultsFound }),
1840
- x.length > 0 && /* @__PURE__ */ a.jsx(ee, { heading: e.label || "Selected", children: x.map((v) => /* @__PURE__ */ a.jsxs(
1841
- Z,
1842
- {
1843
- className: "group flex items-center gap-2",
1844
- onSelect: () => {
1845
- if (g) {
1846
- const S = C.filter((E) => E !== v.value);
1847
- e.onValueChange ? e.onValueChange(S) : t(S);
1848
- } else
1849
- e.onValueChange ? e.onValueChange([]) : t([]);
1850
- },
1851
- children: [
1852
- v.icon && v.icon,
1853
- /* @__PURE__ */ a.jsxs("div", { className: "flex flex-col overflow-hidden", children: [
1854
- /* @__PURE__ */ a.jsx("span", { className: "truncate text-accent-foreground", title: v.label, children: v.label }),
1855
- v.detail && /* @__PURE__ */ a.jsx("span", { className: "truncate text-sm text-muted-foreground", title: v.detail, children: v.detail })
1856
- ] }),
1857
- /* @__PURE__ */ a.jsx(Q, { className: "ms-auto text-primary" })
1858
- ]
1859
- },
1860
- String(v.value)
1861
- )) }),
1862
- b.length > 0 && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1863
- x.length > 0 && /* @__PURE__ */ a.jsx(xe, {}),
1864
- /* @__PURE__ */ a.jsx(ee, { children: b.map((v) => /* @__PURE__ */ a.jsxs(
1865
- Z,
1866
- {
1867
- className: "group flex items-center gap-2",
1868
- value: v.label + (v.detail ? ` - ${v.detail}` : ""),
1869
- onSelect: () => {
1870
- if (g) {
1871
- const S = [...C, v.value];
1872
- if (e.maxSelections && S.length > e.maxSelections)
1873
- return;
1874
- e.onValueChange ? e.onValueChange(S) : t(S), e.autoCloseOnSelect && (s == null || s());
1875
- } else
1876
- e.onValueChange ? e.onValueChange([v.value]) : t([v.value]), s == null || s();
1877
- },
1878
- children: [
1879
- v.icon && v.icon,
1880
- /* @__PURE__ */ a.jsxs("div", { className: "flex flex-col overflow-hidden", children: [
1881
- /* @__PURE__ */ a.jsx("span", { className: "truncate text-accent-foreground", title: v.label, children: v.label }),
1882
- v.detail && /* @__PURE__ */ a.jsx("span", { className: "truncate text-sm text-muted-foreground", title: v.detail, children: v.detail })
1883
- ] }),
1884
- /* @__PURE__ */ a.jsx(Q, { className: "ms-auto text-primary opacity-0" })
1885
- ]
1886
- },
1887
- String(v.value)
1888
- )) })
1889
- ] })
1890
- ] })
1891
- ] }) }) : /* @__PURE__ */ a.jsxs(
1892
- pt,
1893
- {
1894
- open: l,
1895
- onOpenChange: (v) => {
1896
- i(v), !v && e.searchValue === void 0 && setTimeout(() => p(""), 200);
1897
- },
1898
- children: [
1899
- /* @__PURE__ */ a.jsx(
1900
- mt,
1901
- {
1902
- className: I(Pe({
1903
- variant: w.variant,
1904
- size: w.size,
1905
- cursorPointer: w.cursorPointer
1906
- }), e.triggerClassName ?? "max-w-[240px]"),
1907
- children: /* @__PURE__ */ a.jsx("div", { className: "flex min-w-0 items-center gap-1.5", children: e.customValueRenderer ? e.customValueRenderer(r, e.options || []) : /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1908
- x.length > 0 && x.some((v) => v.icon) && /* @__PURE__ */ a.jsx("div", { className: I("-space-x-0.5 flex shrink-0 items-center", e.selectedOptionsClassName), children: x.slice(0, 3).map((v) => /* @__PURE__ */ a.jsx("div", { children: v.icon }, String(v.value))) }),
1909
- x.length === 1 ? /* @__PURE__ */ a.jsx("span", { className: "min-w-0 truncate text-accent-foreground", title: x[0].detail ? `${x[0].label} - ${x[0].detail}` : x[0].label, children: x[0].label }) : x.length > 1 ? `${x.length} ${w.i18n.selectedCount}` : w.i18n.select
1910
- ] }) })
1911
- }
1912
- ),
1913
- /* @__PURE__ */ a.jsx(
1914
- Ye,
1915
- {
1916
- align: "start",
1917
- className: I(
1918
- "p-0 data-[state=closed]:animation-none! data-[state=closed]:duration-0!",
1919
- e.className || "w-[200px]"
1920
- ),
1921
- children: /* @__PURE__ */ a.jsxs(Re, { children: [
1922
- e.searchable !== !1 && /* @__PURE__ */ a.jsx(
1923
- Ve,
1924
- {
1925
- className: "h-[34px] text-sm",
1926
- placeholder: w.i18n.placeholders.searchField(e.label || ""),
1927
- value: d,
1928
- onValueChange: _
1929
- }
1930
- ),
1931
- /* @__PURE__ */ a.jsxs($e, { className: "outline-hidden", children: [
1932
- e.isLoading ? /* @__PURE__ */ a.jsxs("div", { className: "flex items-center justify-center py-6 text-sm text-muted-foreground", children: [
1933
- /* @__PURE__ */ a.jsx(Qe, { className: "mr-2 size-4 animate-spin" }),
1934
- w.i18n.loading
1935
- ] }) : /* @__PURE__ */ a.jsx(De, { children: w.i18n.noResultsFound }),
1936
- x.length > 0 && /* @__PURE__ */ a.jsx(ee, { children: x.map((v) => /* @__PURE__ */ a.jsxs(
1937
- Z,
1938
- {
1939
- className: "group flex items-center gap-2",
1940
- onSelect: () => {
1941
- t(g ? r.filter((S) => S !== v.value) : []), g || (i(!1), O());
1942
- },
1943
- children: [
1944
- v.icon && v.icon,
1945
- /* @__PURE__ */ a.jsxs("div", { className: "flex flex-col overflow-hidden", children: [
1946
- /* @__PURE__ */ a.jsx("span", { className: "truncate text-accent-foreground", title: v.label, children: v.label }),
1947
- v.detail && /* @__PURE__ */ a.jsx("span", { className: "truncate text-sm text-muted-foreground", title: v.detail, children: v.detail })
1948
- ] }),
1949
- /* @__PURE__ */ a.jsx(Q, { className: "ms-auto text-primary" })
1950
- ]
1951
- },
1952
- String(v.value)
1953
- )) }),
1954
- b.length > 0 && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1955
- x.length > 0 && /* @__PURE__ */ a.jsx(xe, {}),
1956
- /* @__PURE__ */ a.jsx(ee, { children: b.map((v) => /* @__PURE__ */ a.jsxs(
1957
- Z,
1958
- {
1959
- className: "group flex items-center gap-2",
1960
- value: v.label + (v.detail ? ` - ${v.detail}` : ""),
1961
- onSelect: () => {
1962
- if (g) {
1963
- const S = [...r, v.value];
1964
- if (e.maxSelections && S.length > e.maxSelections)
1965
- return;
1966
- t(S), e.autoCloseOnSelect && O();
1967
- } else
1968
- t([v.value]), i(!1), O();
1969
- },
1970
- children: [
1971
- v.icon && v.icon,
1972
- /* @__PURE__ */ a.jsxs("div", { className: "flex flex-col overflow-hidden", children: [
1973
- /* @__PURE__ */ a.jsx("span", { className: "truncate text-accent-foreground", title: v.label, children: v.label }),
1974
- v.detail && /* @__PURE__ */ a.jsx("span", { className: "truncate text-sm text-muted-foreground", title: v.detail, children: v.detail })
1975
- ] }),
1976
- /* @__PURE__ */ a.jsx(Q, { className: "ms-auto text-primary opacity-0" })
1977
- ]
1978
- },
1979
- String(v.value)
1980
- )) })
1981
- ] })
1982
- ] })
1983
- ] })
1984
- }
1985
- )
1986
- ]
1987
- }
1988
- );
1989
- }
1990
- function jn({ field: e, values: r, onChange: t, operator: s }) {
1991
- var n, o;
1992
- const [l, i] = M(!1), [d, p] = M(e.searchValue || ""), c = Ie();
1993
- z(() => {
1994
- e.searchValue !== void 0 && p(e.searchValue);
1995
- }, [e.searchValue]);
1996
- const y = (h) => {
1997
- var x;
1998
- p(h), (x = e.onSearchChange) == null || x.call(e, h);
1999
- };
2000
- if (z(() => {
2001
- l && e.searchable !== !1 && setTimeout(() => {
2002
- const h = document.querySelector("[cmdk-input]");
2003
- h && h.focus();
2004
- }, 0);
2005
- }, [l, e.searchable]), s === "empty" || s === "not_empty")
2006
- return null;
2007
- if (e.customRenderer)
2008
- return /* @__PURE__ */ a.jsx(
2009
- "div",
2010
- {
2011
- className: Pe({
2012
- variant: c.variant,
2013
- size: c.size,
2014
- cursorPointer: c.cursorPointer
2015
- }),
2016
- children: e.customRenderer({ field: e, values: r, onChange: t, operator: s })
2017
- }
2018
- );
2019
- if (e.type === "boolean") {
2020
- const h = r[0] === !0, x = e.onLabel || c.i18n.true, b = e.offLabel || c.i18n.false;
2021
- return /* @__PURE__ */ a.jsx(
2022
- "div",
2023
- {
2024
- className: Pe({
2025
- variant: c.variant,
2026
- size: c.size,
2027
- cursorPointer: c.cursorPointer
2028
- }),
2029
- children: /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-2", children: [
2030
- /* @__PURE__ */ a.jsx(cr, { checked: h, size: "sm", onCheckedChange: (_) => t([_]) }),
2031
- e.onLabel && e.offLabel && /* @__PURE__ */ a.jsx("span", { className: "text-xs text-muted-foreground", children: h ? x : b })
2032
- ] })
2033
- }
2034
- );
2035
- }
2036
- if (e.type === "time") {
2037
- if (s === "between") {
2038
- const h = r[0] || "", x = r[1] || "";
2039
- return /* @__PURE__ */ a.jsxs("div", { className: "flex items-center", "data-slot": "filters-item", children: [
2040
- /* @__PURE__ */ a.jsx(
2041
- H,
2042
- {
2043
- className: e.className,
2044
- field: e,
2045
- type: "time",
2046
- value: h,
2047
- onChange: (b) => t([b.target.value, x]),
2048
- onInputChange: e.onInputChange
2049
- }
2050
- ),
2051
- /* @__PURE__ */ a.jsx(
2052
- "div",
2053
- {
2054
- className: Oe({ variant: c.variant, size: c.size }),
2055
- "data-slot": "filters-between",
2056
- children: c.i18n.to
2057
- }
2058
- ),
2059
- /* @__PURE__ */ a.jsx(
2060
- H,
2061
- {
2062
- className: e.className,
2063
- field: e,
2064
- type: "time",
2065
- value: x,
2066
- onChange: (b) => t([h, b.target.value]),
2067
- onInputChange: e.onInputChange
2068
- }
2069
- )
2070
- ] });
2071
- }
2072
- return /* @__PURE__ */ a.jsx(
2073
- H,
2074
- {
2075
- className: e.className,
2076
- field: e,
2077
- type: "time",
2078
- value: r[0] || "",
2079
- onChange: (h) => t([h.target.value]),
2080
- onInputChange: e.onInputChange
2081
- }
2082
- );
2083
- }
2084
- if (e.type === "datetime") {
2085
- if (s === "between") {
2086
- const h = r[0] || "", x = r[1] || "";
2087
- return /* @__PURE__ */ a.jsxs("div", { className: "flex items-center", "data-slot": "filters-item", children: [
2088
- /* @__PURE__ */ a.jsx(
2089
- H,
2090
- {
2091
- className: I("w-36 max-w-full", e.className),
2092
- field: e,
2093
- type: "datetime-local",
2094
- value: h,
2095
- onChange: (b) => t([b.target.value, x]),
2096
- onInputChange: e.onInputChange
2097
- }
2098
- ),
2099
- /* @__PURE__ */ a.jsx(
2100
- "div",
2101
- {
2102
- className: Oe({ variant: c.variant, size: c.size }),
2103
- "data-slot": "filters-between",
2104
- children: c.i18n.to
2105
- }
2106
- ),
2107
- /* @__PURE__ */ a.jsx(
2108
- H,
2109
- {
2110
- className: I("w-36 max-w-full", e.className),
2111
- field: e,
2112
- type: "datetime-local",
2113
- value: x,
2114
- onChange: (b) => t([h, b.target.value]),
2115
- onInputChange: e.onInputChange
2116
- }
2117
- )
2118
- ] });
2119
- }
2120
- return /* @__PURE__ */ a.jsx(
2121
- H,
2122
- {
2123
- className: I("w-36 max-w-full", e.className),
2124
- field: e,
2125
- type: "datetime-local",
2126
- value: r[0] || "",
2127
- onChange: (h) => t([h.target.value]),
2128
- onInputChange: e.onInputChange
2129
- }
2130
- );
2131
- }
2132
- if (["email", "url", "tel"].includes(e.type || "")) {
2133
- const h = () => {
2134
- switch (e.type) {
2135
- case "email":
2136
- return "email";
2137
- case "url":
2138
- return "url";
2139
- case "tel":
2140
- return "tel";
2141
- default:
2142
- return "text";
2143
- }
2144
- }, x = () => {
2145
- switch (e.type) {
2146
- case "email":
2147
- return "^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$";
2148
- case "url":
2149
- return "^https?:\\/\\/(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_\\+.~#?&//=]*)$";
2150
- case "tel":
2151
- return "^[\\+]?[1-9][\\d]{0,15}$";
2152
- default:
2153
- return;
2154
- }
2155
- };
2156
- return /* @__PURE__ */ a.jsx(
2157
- H,
2158
- {
2159
- className: e.className,
2160
- field: e,
2161
- pattern: e.pattern || x(),
2162
- placeholder: e.placeholder || c.i18n.placeholders.enterField(e.type || "text"),
2163
- type: h(),
2164
- value: r[0] || "",
2165
- onChange: (b) => t([b.target.value]),
2166
- onInputChange: e.onInputChange
2167
- }
2168
- );
2169
- }
2170
- if (e.type === "daterange") {
2171
- const h = r[0] || "", x = r[1] || "";
2172
- return /* @__PURE__ */ a.jsxs(
2173
- "div",
2174
- {
2175
- className: Pe({
2176
- variant: c.variant,
2177
- size: c.size,
2178
- cursorPointer: c.cursorPointer
2179
- }),
2180
- children: [
2181
- /* @__PURE__ */ a.jsx(
2182
- H,
2183
- {
2184
- className: I("w-24 max-w-full", e.className),
2185
- field: e,
2186
- type: "date",
2187
- value: h,
2188
- onChange: (b) => t([b.target.value, x]),
2189
- onInputChange: e.onInputChange
2190
- }
2191
- ),
2192
- /* @__PURE__ */ a.jsx(
2193
- "div",
2194
- {
2195
- className: Oe({ variant: c.variant, size: c.size }),
2196
- "data-slot": "filters-between",
2197
- children: c.i18n.to
2198
- }
2199
- ),
2200
- /* @__PURE__ */ a.jsx(
2201
- H,
2202
- {
2203
- className: I("w-24 max-w-full", e.className),
2204
- field: e,
2205
- type: "date",
2206
- value: x,
2207
- onChange: (b) => t([h, b.target.value]),
2208
- onInputChange: e.onInputChange
2209
- }
2210
- )
2211
- ]
2212
- }
2213
- );
2214
- }
2215
- if (e.type === "text" || e.type === "number") {
2216
- if (e.type === "number" && s === "between") {
2217
- const h = r[0] || "", x = r[1] || "";
2218
- return /* @__PURE__ */ a.jsxs("div", { className: "flex items-center", "data-slot": "filters-item", children: [
2219
- /* @__PURE__ */ a.jsx(
2220
- H,
2221
- {
2222
- className: I("w-16 max-w-full", e.className),
2223
- field: e,
2224
- max: e.max,
2225
- min: e.min,
2226
- pattern: e.pattern,
2227
- placeholder: c.i18n.min,
2228
- step: e.step,
2229
- type: "number",
2230
- value: h,
2231
- onChange: (b) => t([b.target.value, x]),
2232
- onInputChange: e.onInputChange
2233
- }
2234
- ),
2235
- /* @__PURE__ */ a.jsx(
2236
- "div",
2237
- {
2238
- className: Oe({ variant: c.variant, size: c.size }),
2239
- "data-slot": "filters-between",
2240
- children: c.i18n.to
2241
- }
2242
- ),
2243
- /* @__PURE__ */ a.jsx(
2244
- H,
2245
- {
2246
- className: I("w-16 max-w-full", e.className),
2247
- field: e,
2248
- max: e.max,
2249
- min: e.min,
2250
- pattern: e.pattern,
2251
- placeholder: c.i18n.max,
2252
- step: e.step,
2253
- type: "number",
2254
- value: x,
2255
- onChange: (b) => t([h, b.target.value]),
2256
- onInputChange: e.onInputChange
2257
- }
2258
- )
2259
- ] });
2260
- }
2261
- return /* @__PURE__ */ a.jsx("div", { className: "flex items-center", "data-slot": "filters-item", children: /* @__PURE__ */ a.jsx(
2262
- H,
2263
- {
2264
- className: I("w-36", e.className),
2265
- field: e,
2266
- max: e.type === "number" ? e.max : void 0,
2267
- min: e.type === "number" ? e.min : void 0,
2268
- pattern: e.pattern,
2269
- placeholder: e.placeholder,
2270
- step: e.type === "number" ? e.step : void 0,
2271
- type: e.type === "number" ? "number" : "text",
2272
- value: r[0] || "",
2273
- onChange: (h) => t([h.target.value]),
2274
- onInputChange: e.onInputChange
2275
- }
2276
- ) });
2277
- }
2278
- if (e.type === "date")
2279
- return /* @__PURE__ */ a.jsx(
2280
- H,
2281
- {
2282
- className: I("w-16", e.className),
2283
- field: e,
2284
- type: "date",
2285
- value: r[0] || "",
2286
- onChange: (h) => t([h.target.value]),
2287
- onInputChange: e.onInputChange
2288
- }
2289
- );
2290
- if (e.type === "select" || e.type === "multiselect")
2291
- return /* @__PURE__ */ a.jsx(fr, { field: e, values: r, onChange: t });
2292
- const w = r.length > 1, g = ((n = e.options) == null ? void 0 : n.filter((h) => r.includes(h.value))) || [], C = ((o = e.options) == null ? void 0 : o.filter((h) => !r.includes(h.value))) || [];
2293
- return /* @__PURE__ */ a.jsxs(
2294
- pt,
2295
- {
2296
- open: l,
2297
- onOpenChange: (h) => {
2298
- i(h), !h && e.searchValue === void 0 && setTimeout(() => p(""), 200);
2299
- },
2300
- children: [
2301
- /* @__PURE__ */ a.jsx(
2302
- mt,
2303
- {
2304
- className: Pe({
2305
- variant: c.variant,
2306
- size: c.size,
2307
- cursorPointer: c.cursorPointer
2308
- }),
2309
- children: /* @__PURE__ */ a.jsx("div", { className: "flex w-full min-w-0 items-center gap-1.5", children: e.customValueRenderer ? e.customValueRenderer(r, e.options || []) : /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
2310
- g.length > 0 && /* @__PURE__ */ a.jsx("div", { className: "flex shrink-0 items-center -space-x-1.5", children: g.slice(0, 3).map((h) => /* @__PURE__ */ a.jsx("div", { children: h.icon }, String(h.value))) }),
2311
- g.length === 1 ? /* @__PURE__ */ a.jsx("span", { className: "min-w-0 truncate text-accent-foreground", title: g[0].detail ? `${g[0].label} - ${g[0].detail}` : g[0].label, children: g[0].label }) : g.length > 1 ? `${g.length} ${c.i18n.selectedCount}` : c.i18n.select
2312
- ] }) })
2313
- }
2314
- ),
2315
- /* @__PURE__ */ a.jsx(Ye, { className: I("w-36 p-0 data-[state=closed]:animation-none! data-[state=closed]:duration-0!", e.popoverContentClassName), children: /* @__PURE__ */ a.jsxs(Re, { children: [
2316
- e.searchable !== !1 && /* @__PURE__ */ a.jsx(
2317
- Ve,
2318
- {
2319
- className: "h-[34px] text-sm",
2320
- placeholder: c.i18n.placeholders.searchField(e.label || ""),
2321
- value: d,
2322
- onValueChange: y
2323
- }
2324
- ),
2325
- /* @__PURE__ */ a.jsxs($e, { className: "outline-hidden", children: [
2326
- e.isLoading ? /* @__PURE__ */ a.jsxs("div", { className: "flex items-center justify-center py-6 text-sm text-muted-foreground", children: [
2327
- /* @__PURE__ */ a.jsx(Qe, { className: "mr-2 size-4 animate-spin" }),
2328
- c.i18n.loading
2329
- ] }) : /* @__PURE__ */ a.jsx(De, { children: c.i18n.noResultsFound }),
2330
- g.length > 0 && /* @__PURE__ */ a.jsx(ee, { children: g.map((h) => /* @__PURE__ */ a.jsxs(
2331
- Z,
2332
- {
2333
- className: "group flex items-center gap-2",
2334
- onSelect: () => {
2335
- t(w ? r.filter((x) => x !== h.value) : []), w || i(!1);
2336
- },
2337
- children: [
2338
- h.icon && h.icon,
2339
- /* @__PURE__ */ a.jsx("span", { className: "truncate text-accent-foreground", children: h.label }),
2340
- /* @__PURE__ */ a.jsx(Q, { className: "ms-auto text-primary" })
2341
- ]
2342
- },
2343
- String(h.value)
2344
- )) }),
2345
- C.length > 0 && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
2346
- g.length > 0 && /* @__PURE__ */ a.jsx(xe, {}),
2347
- /* @__PURE__ */ a.jsx(ee, { children: C.map((h) => /* @__PURE__ */ a.jsxs(
2348
- Z,
2349
- {
2350
- className: "group flex items-center gap-2",
2351
- value: h.label,
2352
- onSelect: () => {
2353
- if (w) {
2354
- const x = [...r, h.value];
2355
- if (e.maxSelections && x.length > e.maxSelections)
2356
- return;
2357
- t(x);
2358
- } else
2359
- t([h.value]), i(!1);
2360
- },
2361
- children: [
2362
- h.icon && h.icon,
2363
- /* @__PURE__ */ a.jsx("span", { className: "truncate text-accent-foreground", children: h.label }),
2364
- /* @__PURE__ */ a.jsx(Q, { className: "ms-auto text-primary opacity-0" })
2365
- ]
2366
- },
2367
- String(h.value)
2368
- )) })
2369
- ] })
2370
- ] })
2371
- ] }) })
2372
- ]
2373
- }
2374
- );
2375
- }
2376
- function Tn({
2377
- filters: e,
2378
- fields: r,
2379
- onChange: t,
2380
- className: s,
2381
- showAddButton: n = !0,
2382
- addButtonText: o,
2383
- addButtonIcon: l,
2384
- addButtonClassName: i,
2385
- addButton: d,
2386
- showClearButton: p = !1,
2387
- clearButtonText: c,
2388
- clearButtonIcon: y,
2389
- clearButtonClassName: w,
2390
- clearButton: g,
2391
- onClear: C,
2392
- variant: h = "outline",
2393
- size: x = "md",
2394
- radius: b = "md",
2395
- i18n: _,
2396
- showSearchInput: O = !0,
2397
- cursorPointer: v = !0,
2398
- trigger: S,
2399
- allowMultiple: E = !0,
2400
- popoverContentClassName: R,
2401
- popoverAlign: Y = "start",
2402
- keyboardShortcut: me,
2403
- onActiveFieldChange: oe
2404
- }) {
2405
- const [le, K] = M(!1), [J, q] = M(null), [ie, U] = M([]);
2406
- z(() => {
2407
- oe == null || oe(J);
2408
- }, [J, oe]), z(() => {
2409
- if (!me)
2410
- return;
2411
- const u = (f) => {
2412
- const j = f.target;
2413
- j.tagName === "INPUT" || j.tagName === "TEXTAREA" || j.isContentEditable || f.key.toLowerCase() === me.toLowerCase() && !f.metaKey && !f.ctrlKey && !f.altKey && (f.preventDefault(), K((k) => !k));
2414
- };
2415
- return window.addEventListener("keydown", u), () => window.removeEventListener("keydown", u);
2416
- }, [me]), z(() => {
2417
- le && setTimeout(() => {
2418
- const u = document.querySelector("[cmdk-input]");
2419
- if (u)
2420
- u.focus();
2421
- else {
2422
- const f = document.querySelector("[cmdk-root]");
2423
- f && f.focus();
2424
- }
2425
- }, 0);
2426
- }, [le, J, O]);
2427
- const G = {
2428
- ...fe,
2429
- ..._,
2430
- operators: {
2431
- ...fe.operators,
2432
- ..._ == null ? void 0 : _.operators
2433
- },
2434
- placeholders: {
2435
- ...fe.placeholders,
2436
- ..._ == null ? void 0 : _.placeholders
2437
- },
2438
- validation: {
2439
- ...fe.validation,
2440
- ..._ == null ? void 0 : _.validation
2441
- }
2442
- }, ce = re(() => bn(r), [r]), X = J ? ce[J] : null, Ce = D(
2443
- (u, f) => {
2444
- t(
2445
- e.map((j) => {
2446
- if (j.id === u) {
2447
- const k = { ...j, ...f };
2448
- return (f.operator === "empty" || f.operator === "not_empty") && (k.values = []), k;
2449
- }
2450
- return j;
2451
- })
2452
- );
2453
- },
2454
- [e, t]
2455
- ), Ae = D(
2456
- (u) => {
2457
- t(e.filter((f) => f.id !== u));
2458
- },
2459
- [e, t]
2460
- ), m = D(
2461
- (u) => {
2462
- const f = ce[u];
2463
- if (f && f.key) {
2464
- if (f.type === "select" || f.type === "multiselect") {
2465
- q(f.key);
2466
- const L = e.find((xr) => xr.field === u), ue = f.type === "multiselect" && L ? L.values : [];
2467
- U(ue);
2468
- return;
2469
- }
2470
- const j = f.defaultOperator || (f.type === "daterange" || f.type === "numberrange" ? "between" : (f.type === "boolean", "is"));
2471
- let k = [];
2472
- f.defaultValue !== void 0 ? k = [f.defaultValue] : ["text", "number", "date", "email", "url", "tel", "time", "datetime"].includes(f.type || "") ? k = [""] : f.type === "daterange" ? k = ["", ""] : f.type === "numberrange" ? k = [f.min || 0, f.max || 100] : f.type === "boolean" && (k = [!1]);
2473
- const P = bt(u, j, k), $ = [...e, P];
2474
- t($), K(!1);
2475
- }
2476
- },
2477
- [ce, e, t]
2478
- ), N = D(
2479
- (u, f, j = !0) => {
2480
- if (!u.key)
2481
- return;
2482
- const k = e.find((L) => L.field === u.key);
2483
- if (k) {
2484
- const L = e.map((ue) => ue.id === k.id ? { ...ue, values: f } : ue);
2485
- t(L), U(f), j && (K(!1), q(null));
2486
- return;
2487
- }
2488
- const P = u.defaultOperator || (u.type === "multiselect" ? "is_any_of" : "is"), $ = e.findIndex((L) => L.field === u.key);
2489
- if ($ >= 0) {
2490
- const L = [...e];
2491
- L[$] = {
2492
- ...L[$],
2493
- values: f
2494
- }, t(L);
2495
- } else {
2496
- const L = bt(u.key, P, f), ue = [...e, L];
2497
- t(ue);
2498
- }
2499
- j ? (K(!1), q(null), U([])) : U(f);
2500
- },
2501
- [e, t]
2502
- ), T = re(() => vr(r).filter((f) => !f.key || f.type === "separator" ? !1 : E ? !0 : !e.some((j) => j.field === f.key)), [r, e, E]);
2503
- return /* @__PURE__ */ a.jsx(
2504
- dr.Provider,
2505
- {
2506
- value: {
2507
- variant: h,
2508
- size: x,
2509
- radius: b,
2510
- i18n: G,
2511
- cursorPointer: v,
2512
- className: s,
2513
- showAddButton: n,
2514
- addButtonText: o,
2515
- addButtonIcon: l,
2516
- addButtonClassName: i,
2517
- addButton: d,
2518
- showSearchInput: O,
2519
- trigger: S,
2520
- allowMultiple: E
2521
- },
2522
- children: /* @__PURE__ */ a.jsxs("div", { className: I(
2523
- fn({ variant: h, size: x }),
2524
- e.length > 0 && "w-full",
2525
- p && e.length > 0 && "sm:pr-24",
2526
- s
2527
- ), children: [
2528
- e.map((u) => {
2529
- const f = ce[u.field];
2530
- return f ? /* @__PURE__ */ a.jsxs("div", { className: xn({ variant: h }), "data-slot": "filter-item", children: [
2531
- /* @__PURE__ */ a.jsxs("div", { className: hn({ variant: h, size: x, radius: b }), children: [
2532
- f.icon,
2533
- f.label
2534
- ] }),
2535
- /* @__PURE__ */ a.jsx(
2536
- wn,
2537
- {
2538
- field: f,
2539
- operator: u.operator,
2540
- values: u.values,
2541
- onChange: (j) => Ce(u.id, { operator: j })
2542
- }
2543
- ),
2544
- /* @__PURE__ */ a.jsx(
2545
- jn,
2546
- {
2547
- field: f,
2548
- operator: u.operator,
2549
- values: u.values,
2550
- onChange: (j) => Ce(u.id, { values: j })
2551
- }
2552
- ),
2553
- /* @__PURE__ */ a.jsx(gn, { onClick: () => Ae(u.id) })
2554
- ] }, u.id) : null;
2555
- }),
2556
- n && T.length > 0 && /* @__PURE__ */ a.jsxs(
2557
- pt,
2558
- {
2559
- open: le,
2560
- onOpenChange: (u) => {
2561
- K(u), u || (q(null), U([]));
2562
- },
2563
- children: [
2564
- /* @__PURE__ */ a.jsx(mt, { asChild: !0, children: d || /* @__PURE__ */ a.jsxs(
2565
- "button",
2566
- {
2567
- className: I(
2568
- xt({
2569
- variant: h,
2570
- size: x,
2571
- cursorPointer: v,
2572
- radius: b
2573
- }),
2574
- i
2575
- ),
2576
- title: G.addFilterTitle,
2577
- type: "button",
2578
- children: [
2579
- l || /* @__PURE__ */ a.jsx(Ar, {}),
2580
- o || G.addFilter
2581
- ]
2582
- }
2583
- ) }),
2584
- /* @__PURE__ */ a.jsx(
2585
- Ye,
2586
- {
2587
- align: Y,
2588
- className: I(
2589
- "p-0 data-[state=closed]:animation-none! data-[state=closed]:duration-0!",
2590
- (X == null ? void 0 : X.className) || R || "w-[220px]"
2591
- ),
2592
- children: X ? (
2593
- // Show original select/multiselect rendering without back button
2594
- // SelectOptionsPopover renders its own Command component when inline={true}
2595
- /* @__PURE__ */ a.jsx(
2596
- fr,
2597
- {
2598
- field: X,
2599
- inline: !0,
2600
- values: ie,
2601
- onChange: (u) => {
2602
- const f = X.type === "select";
2603
- N(X, u, f);
2604
- },
2605
- onClose: () => {
2606
- K(!1), q(null), U([]);
2607
- }
2608
- }
2609
- )
2610
- ) : (
2611
- // Show field selection - needs Command wrapper for search/list
2612
- /* @__PURE__ */ a.jsxs(Re, { className: "outline-hidden", tabIndex: O ? void 0 : 0, children: [
2613
- O && /* @__PURE__ */ a.jsx(Ve, { className: "h-[34px]", placeholder: G.searchFields }),
2614
- /* @__PURE__ */ a.jsxs($e, { className: "outline-hidden", children: [
2615
- /* @__PURE__ */ a.jsx(De, { children: G.noFieldsFound }),
2616
- r.map((u, f) => {
2617
- if (pr(u)) {
2618
- const k = u.fields.filter((P) => P.type === "separator" || E ? !0 : !e.some(($) => $.field === P.key));
2619
- return k.length === 0 ? null : /* @__PURE__ */ a.jsx(ee, { heading: u.group || "Fields", children: k.map((P, $) => {
2620
- if (P.type === "separator") {
2621
- const L = P.key ?? `${u.group ?? `group-${f}`}-separator-${$}`;
2622
- return /* @__PURE__ */ a.jsx(xe, {}, L);
2623
- }
2624
- return /* @__PURE__ */ a.jsxs(
2625
- Z,
2626
- {
2627
- className: "min-w-0",
2628
- onSelect: () => P.key && m(P.key),
2629
- children: [
2630
- P.icon,
2631
- /* @__PURE__ */ a.jsx("span", { className: "truncate", children: P.label })
2632
- ]
2633
- },
2634
- P.key ?? `${u.group ?? `group-${f}`}-field-${$}`
2635
- );
2636
- }) }, u.group || `group-${f}`);
2637
- }
2638
- if (mr(u)) {
2639
- const k = u.fields.filter((P) => P.type === "separator" || E ? !0 : !e.some(($) => $.field === P.key));
2640
- return k.length === 0 ? null : /* @__PURE__ */ a.jsx(ee, { heading: u.group || "Fields", children: k.map((P) => {
2641
- if (P.type === "separator") {
2642
- const $ = P.key || `${u.group || `group-${f}`}-separator-${P.label || Math.random()}`;
2643
- return /* @__PURE__ */ a.jsx(xe, {}, $);
2644
- }
2645
- return /* @__PURE__ */ a.jsxs(Z, { className: "min-w-0", onSelect: () => P.key && m(P.key), children: [
2646
- P.icon,
2647
- /* @__PURE__ */ a.jsx("span", { className: "truncate", children: P.label })
2648
- ] }, P.key);
2649
- }) }, u.group || `group-${f}`);
2650
- }
2651
- const j = u;
2652
- if (j.type === "separator") {
2653
- const k = j.key || `flat-separator-${j.label || f}`;
2654
- return /* @__PURE__ */ a.jsx(xe, {}, k);
2655
- }
2656
- return !E && e.some((k) => k.field === j.key) ? null : /* @__PURE__ */ a.jsxs(Z, { className: "min-w-0", onSelect: () => j.key && m(j.key), children: [
2657
- j.icon,
2658
- /* @__PURE__ */ a.jsx("span", { className: "truncate", children: j.label })
2659
- ] }, j.key);
2660
- })
2661
- ] })
2662
- ] })
2663
- )
2664
- }
2665
- )
2666
- ]
2667
- }
2668
- ),
2669
- p && e.length > 0 && (g || /* @__PURE__ */ a.jsxs(
2670
- "button",
2671
- {
2672
- className: I(
2673
- xt({
2674
- variant: h,
2675
- size: x,
2676
- cursorPointer: v,
2677
- radius: b
2678
- }),
2679
- "border-0 bg-transparent hover:bg-transparent hover:text-foreground",
2680
- "sm:absolute sm:right-0 sm:top-0",
2681
- w
2682
- ),
2683
- type: "button",
2684
- onClick: () => {
2685
- C ? C() : t([]);
2686
- },
2687
- children: [
2688
- y || /* @__PURE__ */ a.jsx(Ct, {}),
2689
- c || G.clearFilters
2690
- ]
2691
- }
2692
- ))
2693
- ] })
2694
- }
2695
- );
2696
- }
2697
- const bt = (e, r, t = []) => ({
2698
- id: `${Date.now()}-${Math.random().toString(36).substring(2, 11)}`,
2699
- field: e,
2700
- operator: r || "is",
2701
- values: t
2702
- });
2703
- export {
2704
- Re as C,
2705
- Tn as F,
2706
- pt as P,
2707
- En as T,
2708
- Kr as V,
2709
- un as a,
2710
- dn as b,
2711
- bt as c,
2712
- ur as d,
2713
- mt as e,
2714
- Ye as f,
2715
- $e as g,
2716
- De as h,
2717
- ee as i,
2718
- Z as j,
2719
- Sn as k,
2720
- Lr as u
2721
- };
2722
- //# sourceMappingURL=filters-Ds_ZaYIU.mjs.map