@senitix/ui 0.4.1 → 0.4.2

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 (393) hide show
  1. package/dist/accordion-BcwB0wwz.cjs +2 -0
  2. package/dist/accordion-BcwB0wwz.cjs.map +1 -0
  3. package/dist/accordion-BwnJKrKm.js +360 -0
  4. package/dist/accordion-BwnJKrKm.js.map +1 -0
  5. package/dist/appointment-scheduler-BoQQO51F.cjs +2 -0
  6. package/dist/appointment-scheduler-BoQQO51F.cjs.map +1 -0
  7. package/dist/appointment-scheduler-DHAs-mF_.js +192 -0
  8. package/dist/appointment-scheduler-DHAs-mF_.js.map +1 -0
  9. package/dist/arrow-right-CM3nmiZe.js +15 -0
  10. package/dist/arrow-right-CM3nmiZe.js.map +1 -0
  11. package/dist/arrow-right-vDxRZOfm.cjs +7 -0
  12. package/dist/arrow-right-vDxRZOfm.cjs.map +1 -0
  13. package/dist/avatar-BlEcWE7T.js +191 -0
  14. package/dist/avatar-BlEcWE7T.js.map +1 -0
  15. package/dist/avatar-Cl38Ye4J.cjs +2 -0
  16. package/dist/avatar-Cl38Ye4J.cjs.map +1 -0
  17. package/dist/badge-BZcdBG5J.cjs +23 -0
  18. package/dist/badge-BZcdBG5J.cjs.map +1 -0
  19. package/dist/badge-D0C_rP2l.js +157 -0
  20. package/dist/badge-D0C_rP2l.js.map +1 -0
  21. package/dist/button-BP_ug5gP.js +126 -0
  22. package/dist/button-BP_ug5gP.js.map +1 -0
  23. package/dist/button-CPuCii0R.cjs +2 -0
  24. package/dist/button-CPuCii0R.cjs.map +1 -0
  25. package/dist/{calendar-DgnhzEfp.js → calendar-86qoSnO7.js} +368 -433
  26. package/dist/calendar-86qoSnO7.js.map +1 -0
  27. package/dist/{calendar-D3RWU0_G.cjs → calendar-BH-AuyiB.cjs} +2 -2
  28. package/dist/{calendar-D3RWU0_G.cjs.map → calendar-BH-AuyiB.cjs.map} +1 -1
  29. package/dist/calendar-CSJ060ym.cjs +2 -0
  30. package/dist/calendar-CSJ060ym.cjs.map +1 -0
  31. package/dist/{calendar-CUxm1K7J.js → calendar-JUSWONQ0.js} +2 -2
  32. package/dist/{calendar-CUxm1K7J.js.map → calendar-JUSWONQ0.js.map} +1 -1
  33. package/dist/{card-DISL3sPJ.cjs → card-CToWUN1K.cjs} +2 -2
  34. package/dist/{card-DISL3sPJ.cjs.map → card-CToWUN1K.cjs.map} +1 -1
  35. package/dist/{card-fId5vof_.js → card-yxbWFvZ1.js} +2 -2
  36. package/dist/{card-fId5vof_.js.map → card-yxbWFvZ1.js.map} +1 -1
  37. package/dist/checkbox-BmugT50K.cjs +2 -0
  38. package/dist/checkbox-BmugT50K.cjs.map +1 -0
  39. package/dist/{checkbox-BY2zxQVv.js → checkbox-CTa9e4SG.js} +95 -97
  40. package/dist/checkbox-CTa9e4SG.js.map +1 -0
  41. package/dist/chevron-left-5h87iFo_.cjs +7 -0
  42. package/dist/chevron-left-5h87iFo_.cjs.map +1 -0
  43. package/dist/chevron-left-DD5mQuvf.js +14 -0
  44. package/dist/chevron-left-DD5mQuvf.js.map +1 -0
  45. package/dist/{chevron-right-Bxf8i4gi.cjs → chevron-right-D-TdAZ7l.cjs} +2 -2
  46. package/dist/{chevron-right-Bxf8i4gi.cjs.map → chevron-right-D-TdAZ7l.cjs.map} +1 -1
  47. package/dist/{chevron-right-BLyGmyaF.js → chevron-right-Di90aqSn.js} +2 -2
  48. package/dist/{chevron-right-BLyGmyaF.js.map → chevron-right-Di90aqSn.js.map} +1 -1
  49. package/dist/chevron-up-Bq55Db6X.cjs +7 -0
  50. package/dist/{chevron-up-C3RClqXD.cjs.map → chevron-up-Bq55Db6X.cjs.map} +1 -1
  51. package/dist/{chevron-up-BmYZUtrk.js → chevron-up-Dr7EIn9V.js} +2 -2
  52. package/dist/{chevron-up-BmYZUtrk.js.map → chevron-up-Dr7EIn9V.js.map} +1 -1
  53. package/dist/clock-BjJE8PGr.js +15 -0
  54. package/dist/clock-BjJE8PGr.js.map +1 -0
  55. package/dist/clock-CnxBAA_O.cjs +7 -0
  56. package/dist/clock-CnxBAA_O.cjs.map +1 -0
  57. package/dist/command-BPtg-XK3.cjs +2 -0
  58. package/dist/command-BPtg-XK3.cjs.map +1 -0
  59. package/dist/command-VraXPLVI.js +404 -0
  60. package/dist/command-VraXPLVI.js.map +1 -0
  61. package/dist/components/builders/index.cjs.js +2 -0
  62. package/dist/components/builders/index.cjs.js.map +1 -0
  63. package/dist/components/builders/index.es.js +42 -0
  64. package/dist/components/builders/index.es.js.map +1 -0
  65. package/dist/components/charts/index.cjs.js +1 -1
  66. package/dist/components/charts/index.es.js +7 -6
  67. package/dist/components/charts/index.es.js.map +1 -1
  68. package/dist/components/data-display/index.cjs.js +1 -1
  69. package/dist/components/data-display/index.es.js +43 -20
  70. package/dist/components/dnd/index.cjs.js +1 -1
  71. package/dist/components/dnd/index.es.js +1 -1
  72. package/dist/components/feedback/index.cjs.js +1 -1
  73. package/dist/components/feedback/index.es.js +1 -1
  74. package/dist/components/forms/index.cjs.js +1 -1
  75. package/dist/components/forms/index.es.js +24 -23
  76. package/dist/components/forms/index.es.js.map +1 -1
  77. package/dist/components/layouts/index.cjs.js +1 -1
  78. package/dist/components/layouts/index.es.js +45 -21
  79. package/dist/components/messaging/index.cjs.js +2 -0
  80. package/dist/components/messaging/index.cjs.js.map +1 -0
  81. package/dist/components/messaging/index.es.js +15 -0
  82. package/dist/components/messaging/index.es.js.map +1 -0
  83. package/dist/components/navigation/index.cjs.js +1 -1
  84. package/dist/components/navigation/index.es.js +1 -1
  85. package/dist/components/scheduling/index.cjs.js +2 -0
  86. package/dist/components/scheduling/index.cjs.js.map +1 -0
  87. package/dist/components/scheduling/index.es.js +6 -0
  88. package/dist/components/scheduling/index.es.js.map +1 -0
  89. package/dist/components/ui/index.cjs.js +1 -1
  90. package/dist/components/ui/index.es.js +168 -158
  91. package/dist/components/ui/index.es.js.map +1 -1
  92. package/dist/dialog-BFBDL8_i.js +382 -0
  93. package/dist/dialog-BFBDL8_i.js.map +1 -0
  94. package/dist/dialog-DO5i1PED.cjs +6 -0
  95. package/dist/dialog-DO5i1PED.cjs.map +1 -0
  96. package/dist/dropdown-menu-CkCCV_tw.js +969 -0
  97. package/dist/dropdown-menu-CkCCV_tw.js.map +1 -0
  98. package/dist/dropdown-menu-ejikFvg2.cjs +7 -0
  99. package/dist/dropdown-menu-ejikFvg2.cjs.map +1 -0
  100. package/dist/{ellipsis-6eUne95u.js → ellipsis-CKhpjj5H.js} +2 -2
  101. package/dist/{ellipsis-6eUne95u.js.map → ellipsis-CKhpjj5H.js.map} +1 -1
  102. package/dist/{ellipsis-DkM3GBF5.cjs → ellipsis-Dk7Wfc4i.cjs} +3 -3
  103. package/dist/{ellipsis-DkM3GBF5.cjs.map → ellipsis-Dk7Wfc4i.cjs.map} +1 -1
  104. package/dist/external-link-CGBqsrbm.cjs +7 -0
  105. package/dist/external-link-CGBqsrbm.cjs.map +1 -0
  106. package/dist/external-link-UeWW0ty3.js +16 -0
  107. package/dist/external-link-UeWW0ty3.js.map +1 -0
  108. package/dist/eye-Cved4eAo.cjs +7 -0
  109. package/dist/eye-Cved4eAo.cjs.map +1 -0
  110. package/dist/eye-KdCUpmO8.js +21 -0
  111. package/dist/eye-KdCUpmO8.js.map +1 -0
  112. package/dist/{file-Cw_u_aJB.js → file-CHbdXCWO.js} +2 -2
  113. package/dist/{file-Cw_u_aJB.js.map → file-CHbdXCWO.js.map} +1 -1
  114. package/dist/{file-Cp5UoYUZ.cjs → file-CqYRamm8.cjs} +3 -3
  115. package/dist/{file-Cp5UoYUZ.cjs.map → file-CqYRamm8.cjs.map} +1 -1
  116. package/dist/file-spreadsheet-CpySxI0-.cjs +7 -0
  117. package/dist/file-spreadsheet-CpySxI0-.cjs.map +1 -0
  118. package/dist/file-spreadsheet-EqZMR-mM.js +19 -0
  119. package/dist/file-spreadsheet-EqZMR-mM.js.map +1 -0
  120. package/dist/form-preview-BGdea5K7.cjs +111 -0
  121. package/dist/form-preview-BGdea5K7.cjs.map +1 -0
  122. package/dist/form-preview-C6WfeXyD.js +12075 -0
  123. package/dist/form-preview-C6WfeXyD.js.map +1 -0
  124. package/dist/full-calendar-CZMK_rPy.cjs +18 -0
  125. package/dist/full-calendar-CZMK_rPy.cjs.map +1 -0
  126. package/dist/full-calendar-CjaDgutS.js +2631 -0
  127. package/dist/full-calendar-CjaDgutS.js.map +1 -0
  128. package/dist/funnel-chart-Dfj1pOyV.cjs +6 -0
  129. package/dist/funnel-chart-Dfj1pOyV.cjs.map +1 -0
  130. package/dist/funnel-chart-o9qcEMgg.js +2952 -0
  131. package/dist/funnel-chart-o9qcEMgg.js.map +1 -0
  132. package/dist/global-search-Dhv8goH8.js +1331 -0
  133. package/dist/global-search-Dhv8goH8.js.map +1 -0
  134. package/dist/global-search-msFICB8l.cjs +22 -0
  135. package/dist/global-search-msFICB8l.cjs.map +1 -0
  136. package/dist/hooks/index.cjs.js +1 -1
  137. package/dist/hooks/index.es.js +9 -7
  138. package/dist/hooks/index.es.js.map +1 -1
  139. package/dist/{index-DtaLkIY8.js → index-BGUveO6l.js} +84 -79
  140. package/dist/{index-DtaLkIY8.js.map → index-BGUveO6l.js.map} +1 -1
  141. package/dist/{index-gVbM3K4f.cjs → index-Bhee6XHk.cjs} +2 -2
  142. package/dist/{index-gVbM3K4f.cjs.map → index-Bhee6XHk.cjs.map} +1 -1
  143. package/dist/index-CrSlyWAA.js +1090 -0
  144. package/dist/index-CrSlyWAA.js.map +1 -0
  145. package/dist/{index-Dk_Et2WJ.js → index-D8-pHJim.js} +2 -2
  146. package/dist/{index-Dk_Et2WJ.js.map → index-D8-pHJim.js.map} +1 -1
  147. package/dist/index-Dy_9oyP3.cjs +2 -0
  148. package/dist/{index-D2U2F80P.cjs.map → index-Dy_9oyP3.cjs.map} +1 -1
  149. package/dist/index-hnbbvGmb.cjs +21 -0
  150. package/dist/index-hnbbvGmb.cjs.map +1 -0
  151. package/dist/index.cjs.js +1 -1
  152. package/dist/index.es.js +434 -319
  153. package/dist/index.es.js.map +1 -1
  154. package/dist/input-Pfq8fkiV.js +2718 -0
  155. package/dist/input-Pfq8fkiV.js.map +1 -0
  156. package/dist/input-UBp7V7li.cjs +52 -0
  157. package/dist/input-UBp7V7li.cjs.map +1 -0
  158. package/dist/label-CExiitfO.js +50 -0
  159. package/dist/label-CExiitfO.js.map +1 -0
  160. package/dist/label-F0zGAiI2.cjs +2 -0
  161. package/dist/label-F0zGAiI2.cjs.map +1 -0
  162. package/dist/loader-circle-CBVYGIRp.js +14 -0
  163. package/dist/loader-circle-CBVYGIRp.js.map +1 -0
  164. package/dist/loader-circle-IaJKvYsP.cjs +7 -0
  165. package/dist/loader-circle-IaJKvYsP.cjs.map +1 -0
  166. package/dist/locale-provider-BHGNO4j7.js +1786 -0
  167. package/dist/locale-provider-BHGNO4j7.js.map +1 -0
  168. package/dist/locale-provider-BScpm-eC.cjs +2 -0
  169. package/dist/locale-provider-BScpm-eC.cjs.map +1 -0
  170. package/dist/locale-selector-D0jV4-90.cjs +12 -0
  171. package/dist/locale-selector-D0jV4-90.cjs.map +1 -0
  172. package/dist/locale-selector-n75sM9qA.js +1740 -0
  173. package/dist/locale-selector-n75sM9qA.js.map +1 -0
  174. package/dist/map-pin-CHh0xl6i.js +46 -0
  175. package/dist/map-pin-CHh0xl6i.js.map +1 -0
  176. package/dist/map-pin-DGObSZ40.cjs +17 -0
  177. package/dist/map-pin-DGObSZ40.cjs.map +1 -0
  178. package/dist/message-square-B_xLey5D.js +14 -0
  179. package/dist/message-square-B_xLey5D.js.map +1 -0
  180. package/dist/message-square-_69ua8rH.cjs +7 -0
  181. package/dist/message-square-_69ua8rH.cjs.map +1 -0
  182. package/dist/minus-BUFkTM0k.cjs +7 -0
  183. package/dist/{minus-C0uyaz70.cjs.map → minus-BUFkTM0k.cjs.map} +1 -1
  184. package/dist/{minus-CiwV65ZG.js → minus-DJ0tmymW.js} +2 -2
  185. package/dist/{minus-CiwV65ZG.js.map → minus-DJ0tmymW.js.map} +1 -1
  186. package/dist/multi-container-CytCGxsc.cjs +7 -0
  187. package/dist/multi-container-CytCGxsc.cjs.map +1 -0
  188. package/dist/multi-container-DmkgnCJN.js +799 -0
  189. package/dist/multi-container-DmkgnCJN.js.map +1 -0
  190. package/dist/multi-select-D9akBt7B.js +224 -0
  191. package/dist/multi-select-D9akBt7B.js.map +1 -0
  192. package/dist/multi-select-DxN_LuXC.cjs +7 -0
  193. package/dist/multi-select-DxN_LuXC.cjs.map +1 -0
  194. package/dist/pencil-BJULwaDl.cjs +12 -0
  195. package/dist/pencil-BJULwaDl.cjs.map +1 -0
  196. package/dist/pencil-HL0trGIs.js +31 -0
  197. package/dist/pencil-HL0trGIs.js.map +1 -0
  198. package/dist/permission-matrix-CTQ1OiTO.js +6128 -0
  199. package/dist/permission-matrix-CTQ1OiTO.js.map +1 -0
  200. package/dist/permission-matrix-DRu-cV44.cjs +93 -0
  201. package/dist/permission-matrix-DRu-cV44.cjs.map +1 -0
  202. package/dist/phone-B0J1dGIE.js +31 -0
  203. package/dist/phone-B0J1dGIE.js.map +1 -0
  204. package/dist/phone-DPA6vucM.cjs +12 -0
  205. package/dist/phone-DPA6vucM.cjs.map +1 -0
  206. package/dist/plus-Bcuujcqd.cjs +7 -0
  207. package/dist/{plus-BsV82JJ5.cjs.map → plus-Bcuujcqd.cjs.map} +1 -1
  208. package/dist/{plus-DxD6rofl.js → plus-D7DMDKb8.js} +2 -2
  209. package/dist/{plus-DxD6rofl.js.map → plus-D7DMDKb8.js.map} +1 -1
  210. package/dist/popover-Bba1ELMX.cjs +2 -0
  211. package/dist/popover-Bba1ELMX.cjs.map +1 -0
  212. package/dist/popover-CZWAuYUL.js +281 -0
  213. package/dist/popover-CZWAuYUL.js.map +1 -0
  214. package/dist/progress-BPpsmZ48.js +218 -0
  215. package/dist/progress-BPpsmZ48.js.map +1 -0
  216. package/dist/progress-BrzjVhWG.cjs +22 -0
  217. package/dist/progress-BrzjVhWG.cjs.map +1 -0
  218. package/dist/providers/index.cjs.js +1 -1
  219. package/dist/providers/index.es.js +1 -1
  220. package/dist/radio-group-B9RM_c7e.js +244 -0
  221. package/dist/radio-group-B9RM_c7e.js.map +1 -0
  222. package/dist/radio-group-_n8TTqNQ.cjs +2 -0
  223. package/dist/radio-group-_n8TTqNQ.cjs.map +1 -0
  224. package/dist/record-dialog-footer-CQPnqhfv.js +2577 -0
  225. package/dist/record-dialog-footer-CQPnqhfv.js.map +1 -0
  226. package/dist/record-dialog-footer-DLH96eAV.cjs +37 -0
  227. package/dist/record-dialog-footer-DLH96eAV.cjs.map +1 -0
  228. package/dist/scroll-area-CGNbDUBQ.js +889 -0
  229. package/dist/scroll-area-CGNbDUBQ.js.map +1 -0
  230. package/dist/scroll-area-HsTSI_58.cjs +22 -0
  231. package/dist/scroll-area-HsTSI_58.cjs.map +1 -0
  232. package/dist/select-CEsYpjPi.cjs +2 -0
  233. package/dist/select-CEsYpjPi.cjs.map +1 -0
  234. package/dist/{select-BJpZrtep.js → select-Ce2C2acZ.js} +184 -179
  235. package/dist/select-Ce2C2acZ.js.map +1 -0
  236. package/dist/send-DIkOd-pu.js +21 -0
  237. package/dist/send-DIkOd-pu.js.map +1 -0
  238. package/dist/send-H6HC-rS8.cjs +7 -0
  239. package/dist/send-H6HC-rS8.cjs.map +1 -0
  240. package/dist/shared-inbox-Bv0AgLew.js +702 -0
  241. package/dist/shared-inbox-Bv0AgLew.js.map +1 -0
  242. package/dist/shared-inbox-DWEKfDX3.cjs +22 -0
  243. package/dist/shared-inbox-DWEKfDX3.cjs.map +1 -0
  244. package/dist/sheet-C0-aBGln.cjs +2 -0
  245. package/dist/sheet-C0-aBGln.cjs.map +1 -0
  246. package/dist/sheet-Cyq_eDFW.js +147 -0
  247. package/dist/sheet-Cyq_eDFW.js.map +1 -0
  248. package/dist/{skeleton-Bl6FAxHT.js → skeleton-C_dwS3_6.js} +2 -2
  249. package/dist/{skeleton-Bl6FAxHT.js.map → skeleton-C_dwS3_6.js.map} +1 -1
  250. package/dist/{skeleton-Cb6MWerF.cjs → skeleton-D3YsjVWD.cjs} +2 -2
  251. package/dist/{skeleton-Cb6MWerF.cjs.map → skeleton-D3YsjVWD.cjs.map} +1 -1
  252. package/dist/sparkline-chart-BP4bk24J.js +15881 -0
  253. package/dist/sparkline-chart-BP4bk24J.js.map +1 -0
  254. package/dist/sparkline-chart-D6SLZVjp.cjs +79 -0
  255. package/dist/sparkline-chart-D6SLZVjp.cjs.map +1 -0
  256. package/dist/styles.css +1 -1
  257. package/dist/switch-AEZvZSRV.cjs +2 -0
  258. package/dist/switch-AEZvZSRV.cjs.map +1 -0
  259. package/dist/switch-BF4LLvaU.js +147 -0
  260. package/dist/switch-BF4LLvaU.js.map +1 -0
  261. package/dist/table-2-Bn-YjZ9s.cjs +17 -0
  262. package/dist/table-2-Bn-YjZ9s.cjs.map +1 -0
  263. package/dist/table-2-C7E_N72K.js +52 -0
  264. package/dist/table-2-C7E_N72K.js.map +1 -0
  265. package/dist/textarea-4qZDuQ-C.js +206 -0
  266. package/dist/textarea-4qZDuQ-C.js.map +1 -0
  267. package/dist/textarea-Bq_zyt0L.cjs +2 -0
  268. package/dist/textarea-Bq_zyt0L.cjs.map +1 -0
  269. package/dist/tooltip-Dd7le9EO.cjs +2 -0
  270. package/dist/tooltip-Dd7le9EO.cjs.map +1 -0
  271. package/dist/tooltip-Dee-pNPI.js +338 -0
  272. package/dist/tooltip-Dee-pNPI.js.map +1 -0
  273. package/dist/trash-2-B3EP3JfM.js +18 -0
  274. package/dist/trash-2-B3EP3JfM.js.map +1 -0
  275. package/dist/trash-2-DWEeKlWT.cjs +7 -0
  276. package/dist/trash-2-DWEeKlWT.cjs.map +1 -0
  277. package/dist/{trending-up-BHFXgLWy.js → trending-up-ljWtN4pj.js} +2 -2
  278. package/dist/{trending-up-BHFXgLWy.js.map → trending-up-ljWtN4pj.js.map} +1 -1
  279. package/dist/{trending-up-BBjz_E69.cjs → trending-up-mLgmkp--.cjs} +2 -2
  280. package/dist/{trending-up-BBjz_E69.cjs.map → trending-up-mLgmkp--.cjs.map} +1 -1
  281. package/dist/upload-2tm-XihE.cjs +7 -0
  282. package/dist/upload-2tm-XihE.cjs.map +1 -0
  283. package/dist/upload-C_JDP8O0.js +16 -0
  284. package/dist/upload-C_JDP8O0.js.map +1 -0
  285. package/dist/use-controllable-state-3ATd6Fqd.cjs +2 -0
  286. package/dist/use-controllable-state-3ATd6Fqd.cjs.map +1 -0
  287. package/dist/use-controllable-state-CEa-Zlq6.js +23 -0
  288. package/dist/use-controllable-state-CEa-Zlq6.js.map +1 -0
  289. package/dist/use-formatters-Bb0fX1lW.cjs +2 -0
  290. package/dist/{use-formatters-CObUgipW.cjs.map → use-formatters-Bb0fX1lW.cjs.map} +1 -1
  291. package/dist/{use-formatters-Bgj3JA4i.js → use-formatters-xeMS4gdV.js} +1160 -1165
  292. package/dist/{use-formatters-Bgj3JA4i.js.map → use-formatters-xeMS4gdV.js.map} +1 -1
  293. package/dist/utils/index.cjs.js +1 -1
  294. package/dist/utils/index.es.js +1 -1
  295. package/dist/welcome-card-Ccbl_miQ.js +1007 -0
  296. package/dist/welcome-card-Ccbl_miQ.js.map +1 -0
  297. package/dist/welcome-card-D-ShMkaS.cjs +37 -0
  298. package/dist/welcome-card-D-ShMkaS.cjs.map +1 -0
  299. package/dist/x-BBkgEhUv.js +15 -0
  300. package/dist/x-BBkgEhUv.js.map +1 -0
  301. package/dist/x-D-El5XAY.cjs +7 -0
  302. package/dist/x-D-El5XAY.cjs.map +1 -0
  303. package/package.json +20 -2
  304. package/dist/avatar-BT_SPwFW.cjs +0 -18
  305. package/dist/avatar-BT_SPwFW.cjs.map +0 -1
  306. package/dist/avatar-C5-ZWIqT.js +0 -305
  307. package/dist/avatar-C5-ZWIqT.js.map +0 -1
  308. package/dist/calendar-BF5drX5u.cjs +0 -12
  309. package/dist/calendar-BF5drX5u.cjs.map +0 -1
  310. package/dist/calendar-DgnhzEfp.js.map +0 -1
  311. package/dist/checkbox-BY2zxQVv.js.map +0 -1
  312. package/dist/checkbox-CL6u7vL6.cjs +0 -2
  313. package/dist/checkbox-CL6u7vL6.cjs.map +0 -1
  314. package/dist/chevron-down-BiUlxZA-.js +0 -14
  315. package/dist/chevron-down-BiUlxZA-.js.map +0 -1
  316. package/dist/chevron-down-Ce0kqXiD.cjs +0 -7
  317. package/dist/chevron-down-Ce0kqXiD.cjs.map +0 -1
  318. package/dist/chevron-up-C3RClqXD.cjs +0 -7
  319. package/dist/createLucideIcon-BC8wu-bu.js +0 -80
  320. package/dist/createLucideIcon-BC8wu-bu.js.map +0 -1
  321. package/dist/createLucideIcon-Cv8nC2E9.cjs +0 -22
  322. package/dist/createLucideIcon-Cv8nC2E9.cjs.map +0 -1
  323. package/dist/filter-tags-DoRzXjuY.cjs +0 -48
  324. package/dist/filter-tags-DoRzXjuY.cjs.map +0 -1
  325. package/dist/filter-tags-zEQmRhEU.js +0 -2712
  326. package/dist/filter-tags-zEQmRhEU.js.map +0 -1
  327. package/dist/full-calendar-5Z4JSj8g.js +0 -3551
  328. package/dist/full-calendar-5Z4JSj8g.js.map +0 -1
  329. package/dist/full-calendar-DjAvCfuE.cjs +0 -23
  330. package/dist/full-calendar-DjAvCfuE.cjs.map +0 -1
  331. package/dist/global-search-BbZfc-VL.js +0 -1216
  332. package/dist/global-search-BbZfc-VL.js.map +0 -1
  333. package/dist/global-search-Bd74_wPV.cjs +0 -22
  334. package/dist/global-search-Bd74_wPV.cjs.map +0 -1
  335. package/dist/index-D2U2F80P.cjs +0 -2
  336. package/dist/index-DG0KV-sw.cjs +0 -11
  337. package/dist/index-DG0KV-sw.cjs.map +0 -1
  338. package/dist/index-XnFSmCuh.js +0 -299
  339. package/dist/index-XnFSmCuh.js.map +0 -1
  340. package/dist/input-BgPy-4Qu.js +0 -3658
  341. package/dist/input-BgPy-4Qu.js.map +0 -1
  342. package/dist/input-Cfr2WB-P.cjs +0 -47
  343. package/dist/input-Cfr2WB-P.cjs.map +0 -1
  344. package/dist/locale-provider-BojNdf1Y.cjs +0 -2
  345. package/dist/locale-provider-BojNdf1Y.cjs.map +0 -1
  346. package/dist/locale-provider-DzBeb-X3.js +0 -1013
  347. package/dist/locale-provider-DzBeb-X3.js.map +0 -1
  348. package/dist/locale-selector-BD1IWk6X.cjs +0 -22
  349. package/dist/locale-selector-BD1IWk6X.cjs.map +0 -1
  350. package/dist/locale-selector-DLRSyVye.js +0 -1772
  351. package/dist/locale-selector-DLRSyVye.js.map +0 -1
  352. package/dist/minus-C0uyaz70.cjs +0 -7
  353. package/dist/multi-container-BZia7HCU.js +0 -748
  354. package/dist/multi-container-BZia7HCU.js.map +0 -1
  355. package/dist/multi-container-BdNbgtPZ.cjs +0 -7
  356. package/dist/multi-container-BdNbgtPZ.cjs.map +0 -1
  357. package/dist/pipeline-Dh052Dvj.cjs +0 -27
  358. package/dist/pipeline-Dh052Dvj.cjs.map +0 -1
  359. package/dist/pipeline-DqWvleNy.js +0 -1076
  360. package/dist/pipeline-DqWvleNy.js.map +0 -1
  361. package/dist/plus-BsV82JJ5.cjs +0 -7
  362. package/dist/popover-BgLxmm1z.cjs +0 -7
  363. package/dist/popover-BgLxmm1z.cjs.map +0 -1
  364. package/dist/popover-PI9jbhnS.js +0 -775
  365. package/dist/popover-PI9jbhnS.js.map +0 -1
  366. package/dist/progress-CTTt_CP3.js +0 -260
  367. package/dist/progress-CTTt_CP3.js.map +0 -1
  368. package/dist/progress-CTWb7X1Q.cjs +0 -37
  369. package/dist/progress-CTWb7X1Q.cjs.map +0 -1
  370. package/dist/scroll-area-A3jGu-Ta.js +0 -974
  371. package/dist/scroll-area-A3jGu-Ta.js.map +0 -1
  372. package/dist/scroll-area-DzDnWIYJ.cjs +0 -12
  373. package/dist/scroll-area-DzDnWIYJ.cjs.map +0 -1
  374. package/dist/select-BJpZrtep.js.map +0 -1
  375. package/dist/select-Ii8HRuXa.cjs +0 -2
  376. package/dist/select-Ii8HRuXa.cjs.map +0 -1
  377. package/dist/separator-BzcDE0Ei.cjs +0 -2
  378. package/dist/separator-BzcDE0Ei.cjs.map +0 -1
  379. package/dist/separator-DyarVo1-.js +0 -396
  380. package/dist/separator-DyarVo1-.js.map +0 -1
  381. package/dist/sheet-DPSdOoE6.js +0 -84
  382. package/dist/sheet-DPSdOoE6.js.map +0 -1
  383. package/dist/sheet-XtjvbEMq.cjs +0 -2
  384. package/dist/sheet-XtjvbEMq.cjs.map +0 -1
  385. package/dist/sparkline-chart-CeCDeMNk.cjs +0 -102
  386. package/dist/sparkline-chart-CeCDeMNk.cjs.map +0 -1
  387. package/dist/sparkline-chart-DUS4CoW_.js +0 -19787
  388. package/dist/sparkline-chart-DUS4CoW_.js.map +0 -1
  389. package/dist/use-formatters-CObUgipW.cjs +0 -2
  390. package/dist/welcome-card-CNuEa6Ck.cjs +0 -67
  391. package/dist/welcome-card-CNuEa6Ck.cjs.map +0 -1
  392. package/dist/welcome-card-Cp6t6G3j.js +0 -1041
  393. package/dist/welcome-card-Cp6t6G3j.js.map +0 -1
@@ -1,2712 +0,0 @@
1
- import { jsx as c, jsxs as C, Fragment as J } from "react/jsx-runtime";
2
- import * as F from "react";
3
- import { c as y } from "./index-DtaLkIY8.js";
4
- import { a as N, S as Ke, X as K, B as Re } from "./scroll-area-A3jGu-Ta.js";
5
- import { C as Q } from "./checkbox-BY2zxQVv.js";
6
- import { I as Qe, D as O, a as T, b as B, d as xe, f as ce, g as Z, c as _e } from "./input-BgPy-4Qu.js";
7
- import { S as Fe, c as ye, b as $e, d as Ve, f as Me } from "./select-BJpZrtep.js";
8
- import { C as Pe } from "./chevron-down-BiUlxZA-.js";
9
- import { c as b } from "./createLucideIcon-BC8wu-bu.js";
10
- import { E as Ie } from "./ellipsis-6eUne95u.js";
11
- import { C as Ne, a as Ze, c as Je, e as De } from "./card-fId5vof_.js";
12
- import { T as We } from "./trending-up-BHFXgLWy.js";
13
- import { M as Ye } from "./minus-CiwV65ZG.js";
14
- import { A as et, a as tt, b as nt } from "./avatar-C5-ZWIqT.js";
15
- /**
16
- * @license lucide-react v0.441.0 - ISC
17
- *
18
- * This source code is licensed under the ISC license.
19
- * See the LICENSE file in the root directory of this source tree.
20
- */
21
- const ot = b("ArrowUpDown", [
22
- ["path", { d: "m21 16-4 4-4-4", key: "f6ql7i" }],
23
- ["path", { d: "M17 20V4", key: "1ejh1v" }],
24
- ["path", { d: "m3 8 4-4 4 4", key: "11wl7u" }],
25
- ["path", { d: "M7 4v16", key: "1glfcx" }]
26
- ]);
27
- /**
28
- * @license lucide-react v0.441.0 - ISC
29
- *
30
- * This source code is licensed under the ISC license.
31
- * See the LICENSE file in the root directory of this source tree.
32
- */
33
- const rt = b("EyeOff", [
34
- [
35
- "path",
36
- {
37
- d: "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",
38
- key: "ct8e1f"
39
- }
40
- ],
41
- ["path", { d: "M14.084 14.158a3 3 0 0 1-4.242-4.242", key: "151rxh" }],
42
- [
43
- "path",
44
- {
45
- d: "M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",
46
- key: "13bj9a"
47
- }
48
- ],
49
- ["path", { d: "m2 2 20 20", key: "1ooewy" }]
50
- ]);
51
- /**
52
- * @license lucide-react v0.441.0 - ISC
53
- *
54
- * This source code is licensed under the ISC license.
55
- * See the LICENSE file in the root directory of this source tree.
56
- */
57
- const lt = b("Eye", [
58
- [
59
- "path",
60
- {
61
- d: "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",
62
- key: "1nclc0"
63
- }
64
- ],
65
- ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
66
- ]);
67
- /**
68
- * @license lucide-react v0.441.0 - ISC
69
- *
70
- * This source code is licensed under the ISC license.
71
- * See the LICENSE file in the root directory of this source tree.
72
- */
73
- const it = b("Settings2", [
74
- ["path", { d: "M20 7h-9", key: "3s1dr2" }],
75
- ["path", { d: "M14 17H5", key: "gfn3mx" }],
76
- ["circle", { cx: "17", cy: "17", r: "3", key: "18b49y" }],
77
- ["circle", { cx: "7", cy: "7", r: "3", key: "dfmy0x" }]
78
- ]);
79
- /**
80
- * @license lucide-react v0.441.0 - ISC
81
- *
82
- * This source code is licensed under the ISC license.
83
- * See the LICENSE file in the root directory of this source tree.
84
- */
85
- const st = b("TrendingDown", [
86
- ["polyline", { points: "22 17 13.5 8.5 8.5 13.5 2 7", key: "1r2t7k" }],
87
- ["polyline", { points: "16 17 22 17 22 11", key: "11uiuu" }]
88
- ]);
89
- /**
90
- * table-core
91
- *
92
- * Copyright (c) TanStack
93
- *
94
- * This source code is licensed under the MIT license found in the
95
- * LICENSE.md file in the root directory of this source tree.
96
- *
97
- * @license MIT
98
- */
99
- function G(e, o) {
100
- return typeof e == "function" ? e(o) : e;
101
- }
102
- function D(e, o) {
103
- return (t) => {
104
- o.setState((n) => ({
105
- ...n,
106
- [e]: G(t, n[e])
107
- }));
108
- };
109
- }
110
- function W(e) {
111
- return e instanceof Function;
112
- }
113
- function at(e) {
114
- return Array.isArray(e) && e.every((o) => typeof o == "number");
115
- }
116
- function ut(e, o) {
117
- const t = [], n = (r) => {
118
- r.forEach((l) => {
119
- t.push(l);
120
- const i = o(l);
121
- i != null && i.length && n(i);
122
- });
123
- };
124
- return n(e), t;
125
- }
126
- function S(e, o, t) {
127
- let n = [], r;
128
- return (l) => {
129
- let i;
130
- t.key && t.debug && (i = Date.now());
131
- const a = e(l);
132
- if (!(a.length !== n.length || a.some((f, p) => n[p] !== f)))
133
- return r;
134
- n = a;
135
- let d;
136
- if (t.key && t.debug && (d = Date.now()), r = o(...a), t == null || t.onChange == null || t.onChange(r), t.key && t.debug && t != null && t.debug()) {
137
- const f = Math.round((Date.now() - i) * 100) / 100, p = Math.round((Date.now() - d) * 100) / 100, g = p / 16, s = (m, h) => {
138
- for (m = String(m); m.length < h; )
139
- m = " " + m;
140
- return m;
141
- };
142
- console.info(`%c⏱ ${s(p, 5)} /${s(f, 5)} ms`, `
143
- font-size: .6rem;
144
- font-weight: bold;
145
- color: hsl(${Math.max(0, Math.min(120 - 120 * g, 120))}deg 100% 31%);`, t == null ? void 0 : t.key);
146
- }
147
- return r;
148
- };
149
- }
150
- function w(e, o, t, n) {
151
- return {
152
- debug: () => {
153
- var r;
154
- return (r = e == null ? void 0 : e.debugAll) != null ? r : e[o];
155
- },
156
- key: process.env.NODE_ENV === "development" && t,
157
- onChange: n
158
- };
159
- }
160
- function dt(e, o, t, n) {
161
- const r = () => {
162
- var i;
163
- return (i = l.getValue()) != null ? i : e.options.renderFallbackValue;
164
- }, l = {
165
- id: `${o.id}_${t.id}`,
166
- row: o,
167
- column: t,
168
- getValue: () => o.getValue(n),
169
- renderValue: r,
170
- getContext: S(() => [e, t, o, l], (i, a, u, d) => ({
171
- table: i,
172
- column: a,
173
- row: u,
174
- cell: d,
175
- getValue: d.getValue,
176
- renderValue: d.renderValue
177
- }), w(e.options, "debugCells", "cell.getContext"))
178
- };
179
- return e._features.forEach((i) => {
180
- i.createCell == null || i.createCell(l, t, o, e);
181
- }, {}), l;
182
- }
183
- function gt(e, o, t, n) {
184
- var r, l;
185
- const a = {
186
- ...e._getDefaultColumnDef(),
187
- ...o
188
- }, u = a.accessorKey;
189
- let d = (r = (l = a.id) != null ? l : u ? typeof String.prototype.replaceAll == "function" ? u.replaceAll(".", "_") : u.replace(/\./g, "_") : void 0) != null ? r : typeof a.header == "string" ? a.header : void 0, f;
190
- if (a.accessorFn ? f = a.accessorFn : u && (u.includes(".") ? f = (g) => {
191
- let s = g;
192
- for (const h of u.split(".")) {
193
- var m;
194
- s = (m = s) == null ? void 0 : m[h], process.env.NODE_ENV !== "production" && s === void 0 && console.warn(`"${h}" in deeply nested key "${u}" returned undefined.`);
195
- }
196
- return s;
197
- } : f = (g) => g[a.accessorKey]), !d)
198
- throw process.env.NODE_ENV !== "production" ? new Error(a.accessorFn ? "Columns require an id when using an accessorFn" : "Columns require an id when using a non-string header") : new Error();
199
- let p = {
200
- id: `${String(d)}`,
201
- accessorFn: f,
202
- parent: n,
203
- depth: t,
204
- columnDef: a,
205
- columns: [],
206
- getFlatColumns: S(() => [!0], () => {
207
- var g;
208
- return [p, ...(g = p.columns) == null ? void 0 : g.flatMap((s) => s.getFlatColumns())];
209
- }, w(e.options, "debugColumns", "column.getFlatColumns")),
210
- getLeafColumns: S(() => [e._getOrderColumnsFn()], (g) => {
211
- var s;
212
- if ((s = p.columns) != null && s.length) {
213
- let m = p.columns.flatMap((h) => h.getLeafColumns());
214
- return g(m);
215
- }
216
- return [p];
217
- }, w(e.options, "debugColumns", "column.getLeafColumns"))
218
- };
219
- for (const g of e._features)
220
- g.createColumn == null || g.createColumn(p, e);
221
- return p;
222
- }
223
- const I = "debugHeaders";
224
- function Se(e, o, t) {
225
- var n;
226
- let l = {
227
- id: (n = t.id) != null ? n : o.id,
228
- column: o,
229
- index: t.index,
230
- isPlaceholder: !!t.isPlaceholder,
231
- placeholderId: t.placeholderId,
232
- depth: t.depth,
233
- subHeaders: [],
234
- colSpan: 0,
235
- rowSpan: 0,
236
- headerGroup: null,
237
- getLeafHeaders: () => {
238
- const i = [], a = (u) => {
239
- u.subHeaders && u.subHeaders.length && u.subHeaders.map(a), i.push(u);
240
- };
241
- return a(l), i;
242
- },
243
- getContext: () => ({
244
- table: e,
245
- header: l,
246
- column: o
247
- })
248
- };
249
- return e._features.forEach((i) => {
250
- i.createHeader == null || i.createHeader(l, e);
251
- }), l;
252
- }
253
- const ct = {
254
- createTable: (e) => {
255
- e.getHeaderGroups = S(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n, r) => {
256
- var l, i;
257
- const a = (l = n == null ? void 0 : n.map((p) => t.find((g) => g.id === p)).filter(Boolean)) != null ? l : [], u = (i = r == null ? void 0 : r.map((p) => t.find((g) => g.id === p)).filter(Boolean)) != null ? i : [], d = t.filter((p) => !(n != null && n.includes(p.id)) && !(r != null && r.includes(p.id)));
258
- return q(o, [...a, ...d, ...u], e);
259
- }, w(e.options, I, "getHeaderGroups")), e.getCenterHeaderGroups = S(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n, r) => (t = t.filter((l) => !(n != null && n.includes(l.id)) && !(r != null && r.includes(l.id))), q(o, t, e, "center")), w(e.options, I, "getCenterHeaderGroups")), e.getLeftHeaderGroups = S(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left], (o, t, n) => {
260
- var r;
261
- const l = (r = n == null ? void 0 : n.map((i) => t.find((a) => a.id === i)).filter(Boolean)) != null ? r : [];
262
- return q(o, l, e, "left");
263
- }, w(e.options, I, "getLeftHeaderGroups")), e.getRightHeaderGroups = S(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.right], (o, t, n) => {
264
- var r;
265
- const l = (r = n == null ? void 0 : n.map((i) => t.find((a) => a.id === i)).filter(Boolean)) != null ? r : [];
266
- return q(o, l, e, "right");
267
- }, w(e.options, I, "getRightHeaderGroups")), e.getFooterGroups = S(() => [e.getHeaderGroups()], (o) => [...o].reverse(), w(e.options, I, "getFooterGroups")), e.getLeftFooterGroups = S(() => [e.getLeftHeaderGroups()], (o) => [...o].reverse(), w(e.options, I, "getLeftFooterGroups")), e.getCenterFooterGroups = S(() => [e.getCenterHeaderGroups()], (o) => [...o].reverse(), w(e.options, I, "getCenterFooterGroups")), e.getRightFooterGroups = S(() => [e.getRightHeaderGroups()], (o) => [...o].reverse(), w(e.options, I, "getRightFooterGroups")), e.getFlatHeaders = S(() => [e.getHeaderGroups()], (o) => o.map((t) => t.headers).flat(), w(e.options, I, "getFlatHeaders")), e.getLeftFlatHeaders = S(() => [e.getLeftHeaderGroups()], (o) => o.map((t) => t.headers).flat(), w(e.options, I, "getLeftFlatHeaders")), e.getCenterFlatHeaders = S(() => [e.getCenterHeaderGroups()], (o) => o.map((t) => t.headers).flat(), w(e.options, I, "getCenterFlatHeaders")), e.getRightFlatHeaders = S(() => [e.getRightHeaderGroups()], (o) => o.map((t) => t.headers).flat(), w(e.options, I, "getRightFlatHeaders")), e.getCenterLeafHeaders = S(() => [e.getCenterFlatHeaders()], (o) => o.filter((t) => {
268
- var n;
269
- return !((n = t.subHeaders) != null && n.length);
270
- }), w(e.options, I, "getCenterLeafHeaders")), e.getLeftLeafHeaders = S(() => [e.getLeftFlatHeaders()], (o) => o.filter((t) => {
271
- var n;
272
- return !((n = t.subHeaders) != null && n.length);
273
- }), w(e.options, I, "getLeftLeafHeaders")), e.getRightLeafHeaders = S(() => [e.getRightFlatHeaders()], (o) => o.filter((t) => {
274
- var n;
275
- return !((n = t.subHeaders) != null && n.length);
276
- }), w(e.options, I, "getRightLeafHeaders")), e.getLeafHeaders = S(() => [e.getLeftHeaderGroups(), e.getCenterHeaderGroups(), e.getRightHeaderGroups()], (o, t, n) => {
277
- var r, l, i, a, u, d;
278
- return [...(r = (l = o[0]) == null ? void 0 : l.headers) != null ? r : [], ...(i = (a = t[0]) == null ? void 0 : a.headers) != null ? i : [], ...(u = (d = n[0]) == null ? void 0 : d.headers) != null ? u : []].map((f) => f.getLeafHeaders()).flat();
279
- }, w(e.options, I, "getLeafHeaders"));
280
- }
281
- };
282
- function q(e, o, t, n) {
283
- var r, l;
284
- let i = 0;
285
- const a = function(g, s) {
286
- s === void 0 && (s = 1), i = Math.max(i, s), g.filter((m) => m.getIsVisible()).forEach((m) => {
287
- var h;
288
- (h = m.columns) != null && h.length && a(m.columns, s + 1);
289
- }, 0);
290
- };
291
- a(e);
292
- let u = [];
293
- const d = (g, s) => {
294
- const m = {
295
- depth: s,
296
- id: [n, `${s}`].filter(Boolean).join("_"),
297
- headers: []
298
- }, h = [];
299
- g.forEach((v) => {
300
- const R = [...h].reverse()[0], $ = v.column.depth === m.depth;
301
- let V, _ = !1;
302
- if ($ && v.column.parent ? V = v.column.parent : (V = v.column, _ = !0), R && (R == null ? void 0 : R.column) === V)
303
- R.subHeaders.push(v);
304
- else {
305
- const P = Se(t, V, {
306
- id: [n, s, V.id, v == null ? void 0 : v.id].filter(Boolean).join("_"),
307
- isPlaceholder: _,
308
- placeholderId: _ ? `${h.filter((A) => A.column === V).length}` : void 0,
309
- depth: s,
310
- index: h.length
311
- });
312
- P.subHeaders.push(v), h.push(P);
313
- }
314
- m.headers.push(v), v.headerGroup = m;
315
- }), u.push(m), s > 0 && d(h, s - 1);
316
- }, f = o.map((g, s) => Se(t, g, {
317
- depth: i,
318
- index: s
319
- }));
320
- d(f, i - 1), u.reverse();
321
- const p = (g) => g.filter((m) => m.column.getIsVisible()).map((m) => {
322
- let h = 0, v = 0, R = [0];
323
- m.subHeaders && m.subHeaders.length ? (R = [], p(m.subHeaders).forEach((V) => {
324
- let {
325
- colSpan: _,
326
- rowSpan: P
327
- } = V;
328
- h += _, R.push(P);
329
- })) : h = 1;
330
- const $ = Math.min(...R);
331
- return v = v + $, m.colSpan = h, m.rowSpan = v, {
332
- colSpan: h,
333
- rowSpan: v
334
- };
335
- });
336
- return p((r = (l = u[0]) == null ? void 0 : l.headers) != null ? r : []), u;
337
- }
338
- const fe = (e, o, t, n, r, l, i) => {
339
- let a = {
340
- id: o,
341
- index: n,
342
- original: t,
343
- depth: r,
344
- parentId: i,
345
- _valuesCache: {},
346
- _uniqueValuesCache: {},
347
- getValue: (u) => {
348
- if (a._valuesCache.hasOwnProperty(u))
349
- return a._valuesCache[u];
350
- const d = e.getColumn(u);
351
- if (d != null && d.accessorFn)
352
- return a._valuesCache[u] = d.accessorFn(a.original, n), a._valuesCache[u];
353
- },
354
- getUniqueValues: (u) => {
355
- if (a._uniqueValuesCache.hasOwnProperty(u))
356
- return a._uniqueValuesCache[u];
357
- const d = e.getColumn(u);
358
- if (d != null && d.accessorFn)
359
- return d.columnDef.getUniqueValues ? (a._uniqueValuesCache[u] = d.columnDef.getUniqueValues(a.original, n), a._uniqueValuesCache[u]) : (a._uniqueValuesCache[u] = [a.getValue(u)], a._uniqueValuesCache[u]);
360
- },
361
- renderValue: (u) => {
362
- var d;
363
- return (d = a.getValue(u)) != null ? d : e.options.renderFallbackValue;
364
- },
365
- subRows: [],
366
- getLeafRows: () => ut(a.subRows, (u) => u.subRows),
367
- getParentRow: () => a.parentId ? e.getRow(a.parentId, !0) : void 0,
368
- getParentRows: () => {
369
- let u = [], d = a;
370
- for (; ; ) {
371
- const f = d.getParentRow();
372
- if (!f) break;
373
- u.push(f), d = f;
374
- }
375
- return u.reverse();
376
- },
377
- getAllCells: S(() => [e.getAllLeafColumns()], (u) => u.map((d) => dt(e, a, d, d.id)), w(e.options, "debugRows", "getAllCells")),
378
- _getAllCellsByColumnId: S(() => [a.getAllCells()], (u) => u.reduce((d, f) => (d[f.column.id] = f, d), {}), w(e.options, "debugRows", "getAllCellsByColumnId"))
379
- };
380
- for (let u = 0; u < e._features.length; u++) {
381
- const d = e._features[u];
382
- d == null || d.createRow == null || d.createRow(a, e);
383
- }
384
- return a;
385
- }, ft = {
386
- createColumn: (e, o) => {
387
- e._getFacetedRowModel = o.options.getFacetedRowModel && o.options.getFacetedRowModel(o, e.id), e.getFacetedRowModel = () => e._getFacetedRowModel ? e._getFacetedRowModel() : o.getPreFilteredRowModel(), e._getFacetedUniqueValues = o.options.getFacetedUniqueValues && o.options.getFacetedUniqueValues(o, e.id), e.getFacetedUniqueValues = () => e._getFacetedUniqueValues ? e._getFacetedUniqueValues() : /* @__PURE__ */ new Map(), e._getFacetedMinMaxValues = o.options.getFacetedMinMaxValues && o.options.getFacetedMinMaxValues(o, e.id), e.getFacetedMinMaxValues = () => {
388
- if (e._getFacetedMinMaxValues)
389
- return e._getFacetedMinMaxValues();
390
- };
391
- }
392
- }, Ee = (e, o, t) => {
393
- var n, r;
394
- const l = t == null || (n = t.toString()) == null ? void 0 : n.toLowerCase();
395
- return !!(!((r = e.getValue(o)) == null || (r = r.toString()) == null || (r = r.toLowerCase()) == null) && r.includes(l));
396
- };
397
- Ee.autoRemove = (e) => E(e);
398
- const Ae = (e, o, t) => {
399
- var n;
400
- return !!(!((n = e.getValue(o)) == null || (n = n.toString()) == null) && n.includes(t));
401
- };
402
- Ae.autoRemove = (e) => E(e);
403
- const He = (e, o, t) => {
404
- var n;
405
- return ((n = e.getValue(o)) == null || (n = n.toString()) == null ? void 0 : n.toLowerCase()) === (t == null ? void 0 : t.toLowerCase());
406
- };
407
- He.autoRemove = (e) => E(e);
408
- const Ge = (e, o, t) => {
409
- var n;
410
- return (n = e.getValue(o)) == null ? void 0 : n.includes(t);
411
- };
412
- Ge.autoRemove = (e) => E(e);
413
- const Le = (e, o, t) => !t.some((n) => {
414
- var r;
415
- return !((r = e.getValue(o)) != null && r.includes(n));
416
- });
417
- Le.autoRemove = (e) => E(e) || !(e != null && e.length);
418
- const ze = (e, o, t) => t.some((n) => {
419
- var r;
420
- return (r = e.getValue(o)) == null ? void 0 : r.includes(n);
421
- });
422
- ze.autoRemove = (e) => E(e) || !(e != null && e.length);
423
- const ke = (e, o, t) => e.getValue(o) === t;
424
- ke.autoRemove = (e) => E(e);
425
- const Oe = (e, o, t) => e.getValue(o) == t;
426
- Oe.autoRemove = (e) => E(e);
427
- const pe = (e, o, t) => {
428
- let [n, r] = t;
429
- const l = e.getValue(o);
430
- return l >= n && l <= r;
431
- };
432
- pe.resolveFilterValue = (e) => {
433
- let [o, t] = e, n = typeof o != "number" ? parseFloat(o) : o, r = typeof t != "number" ? parseFloat(t) : t, l = o === null || Number.isNaN(n) ? -1 / 0 : n, i = t === null || Number.isNaN(r) ? 1 / 0 : r;
434
- if (l > i) {
435
- const a = l;
436
- l = i, i = a;
437
- }
438
- return [l, i];
439
- };
440
- pe.autoRemove = (e) => E(e) || E(e[0]) && E(e[1]);
441
- const H = {
442
- includesString: Ee,
443
- includesStringSensitive: Ae,
444
- equalsString: He,
445
- arrIncludes: Ge,
446
- arrIncludesAll: Le,
447
- arrIncludesSome: ze,
448
- equals: ke,
449
- weakEquals: Oe,
450
- inNumberRange: pe
451
- };
452
- function E(e) {
453
- return e == null || e === "";
454
- }
455
- const pt = {
456
- getDefaultColumnDef: () => ({
457
- filterFn: "auto"
458
- }),
459
- getInitialState: (e) => ({
460
- columnFilters: [],
461
- ...e
462
- }),
463
- getDefaultOptions: (e) => ({
464
- onColumnFiltersChange: D("columnFilters", e),
465
- filterFromLeafRows: !1,
466
- maxLeafRowFilterDepth: 100
467
- }),
468
- createColumn: (e, o) => {
469
- e.getAutoFilterFn = () => {
470
- const t = o.getCoreRowModel().flatRows[0], n = t == null ? void 0 : t.getValue(e.id);
471
- return typeof n == "string" ? H.includesString : typeof n == "number" ? H.inNumberRange : typeof n == "boolean" || n !== null && typeof n == "object" ? H.equals : Array.isArray(n) ? H.arrIncludes : H.weakEquals;
472
- }, e.getFilterFn = () => {
473
- var t, n;
474
- return W(e.columnDef.filterFn) ? e.columnDef.filterFn : e.columnDef.filterFn === "auto" ? e.getAutoFilterFn() : (
475
- // @ts-ignore
476
- (t = (n = o.options.filterFns) == null ? void 0 : n[e.columnDef.filterFn]) != null ? t : H[e.columnDef.filterFn]
477
- );
478
- }, e.getCanFilter = () => {
479
- var t, n, r;
480
- return ((t = e.columnDef.enableColumnFilter) != null ? t : !0) && ((n = o.options.enableColumnFilters) != null ? n : !0) && ((r = o.options.enableFilters) != null ? r : !0) && !!e.accessorFn;
481
- }, e.getIsFiltered = () => e.getFilterIndex() > -1, e.getFilterValue = () => {
482
- var t;
483
- return (t = o.getState().columnFilters) == null || (t = t.find((n) => n.id === e.id)) == null ? void 0 : t.value;
484
- }, e.getFilterIndex = () => {
485
- var t, n;
486
- return (t = (n = o.getState().columnFilters) == null ? void 0 : n.findIndex((r) => r.id === e.id)) != null ? t : -1;
487
- }, e.setFilterValue = (t) => {
488
- o.setColumnFilters((n) => {
489
- const r = e.getFilterFn(), l = n == null ? void 0 : n.find((f) => f.id === e.id), i = G(t, l ? l.value : void 0);
490
- if (we(r, i, e)) {
491
- var a;
492
- return (a = n == null ? void 0 : n.filter((f) => f.id !== e.id)) != null ? a : [];
493
- }
494
- const u = {
495
- id: e.id,
496
- value: i
497
- };
498
- if (l) {
499
- var d;
500
- return (d = n == null ? void 0 : n.map((f) => f.id === e.id ? u : f)) != null ? d : [];
501
- }
502
- return n != null && n.length ? [...n, u] : [u];
503
- });
504
- };
505
- },
506
- createRow: (e, o) => {
507
- e.columnFilters = {}, e.columnFiltersMeta = {};
508
- },
509
- createTable: (e) => {
510
- e.setColumnFilters = (o) => {
511
- const t = e.getAllLeafColumns(), n = (r) => {
512
- var l;
513
- return (l = G(o, r)) == null ? void 0 : l.filter((i) => {
514
- const a = t.find((u) => u.id === i.id);
515
- if (a) {
516
- const u = a.getFilterFn();
517
- if (we(u, i.value, a))
518
- return !1;
519
- }
520
- return !0;
521
- });
522
- };
523
- e.options.onColumnFiltersChange == null || e.options.onColumnFiltersChange(n);
524
- }, e.resetColumnFilters = (o) => {
525
- var t, n;
526
- e.setColumnFilters(o ? [] : (t = (n = e.initialState) == null ? void 0 : n.columnFilters) != null ? t : []);
527
- }, e.getPreFilteredRowModel = () => e.getCoreRowModel(), e.getFilteredRowModel = () => (!e._getFilteredRowModel && e.options.getFilteredRowModel && (e._getFilteredRowModel = e.options.getFilteredRowModel(e)), e.options.manualFiltering || !e._getFilteredRowModel ? e.getPreFilteredRowModel() : e._getFilteredRowModel());
528
- }
529
- };
530
- function we(e, o, t) {
531
- return (e && e.autoRemove ? e.autoRemove(o, t) : !1) || typeof o > "u" || typeof o == "string" && !o;
532
- }
533
- const mt = (e, o, t) => t.reduce((n, r) => {
534
- const l = r.getValue(e);
535
- return n + (typeof l == "number" ? l : 0);
536
- }, 0), ht = (e, o, t) => {
537
- let n;
538
- return t.forEach((r) => {
539
- const l = r.getValue(e);
540
- l != null && (n > l || n === void 0 && l >= l) && (n = l);
541
- }), n;
542
- }, Ct = (e, o, t) => {
543
- let n;
544
- return t.forEach((r) => {
545
- const l = r.getValue(e);
546
- l != null && (n < l || n === void 0 && l >= l) && (n = l);
547
- }), n;
548
- }, St = (e, o, t) => {
549
- let n, r;
550
- return t.forEach((l) => {
551
- const i = l.getValue(e);
552
- i != null && (n === void 0 ? i >= i && (n = r = i) : (n > i && (n = i), r < i && (r = i)));
553
- }), [n, r];
554
- }, wt = (e, o) => {
555
- let t = 0, n = 0;
556
- if (o.forEach((r) => {
557
- let l = r.getValue(e);
558
- l != null && (l = +l) >= l && (++t, n += l);
559
- }), t) return n / t;
560
- }, vt = (e, o) => {
561
- if (!o.length)
562
- return;
563
- const t = o.map((l) => l.getValue(e));
564
- if (!at(t))
565
- return;
566
- if (t.length === 1)
567
- return t[0];
568
- const n = Math.floor(t.length / 2), r = t.sort((l, i) => l - i);
569
- return t.length % 2 !== 0 ? r[n] : (r[n - 1] + r[n]) / 2;
570
- }, Rt = (e, o) => Array.from(new Set(o.map((t) => t.getValue(e))).values()), xt = (e, o) => new Set(o.map((t) => t.getValue(e))).size, _t = (e, o) => o.length, Y = {
571
- sum: mt,
572
- min: ht,
573
- max: Ct,
574
- extent: St,
575
- mean: wt,
576
- median: vt,
577
- unique: Rt,
578
- uniqueCount: xt,
579
- count: _t
580
- }, Ft = {
581
- getDefaultColumnDef: () => ({
582
- aggregatedCell: (e) => {
583
- var o, t;
584
- return (o = (t = e.getValue()) == null || t.toString == null ? void 0 : t.toString()) != null ? o : null;
585
- },
586
- aggregationFn: "auto"
587
- }),
588
- getInitialState: (e) => ({
589
- grouping: [],
590
- ...e
591
- }),
592
- getDefaultOptions: (e) => ({
593
- onGroupingChange: D("grouping", e),
594
- groupedColumnMode: "reorder"
595
- }),
596
- createColumn: (e, o) => {
597
- e.toggleGrouping = () => {
598
- o.setGrouping((t) => t != null && t.includes(e.id) ? t.filter((n) => n !== e.id) : [...t ?? [], e.id]);
599
- }, e.getCanGroup = () => {
600
- var t, n;
601
- return ((t = e.columnDef.enableGrouping) != null ? t : !0) && ((n = o.options.enableGrouping) != null ? n : !0) && (!!e.accessorFn || !!e.columnDef.getGroupingValue);
602
- }, e.getIsGrouped = () => {
603
- var t;
604
- return (t = o.getState().grouping) == null ? void 0 : t.includes(e.id);
605
- }, e.getGroupedIndex = () => {
606
- var t;
607
- return (t = o.getState().grouping) == null ? void 0 : t.indexOf(e.id);
608
- }, e.getToggleGroupingHandler = () => {
609
- const t = e.getCanGroup();
610
- return () => {
611
- t && e.toggleGrouping();
612
- };
613
- }, e.getAutoAggregationFn = () => {
614
- const t = o.getCoreRowModel().flatRows[0], n = t == null ? void 0 : t.getValue(e.id);
615
- if (typeof n == "number")
616
- return Y.sum;
617
- if (Object.prototype.toString.call(n) === "[object Date]")
618
- return Y.extent;
619
- }, e.getAggregationFn = () => {
620
- var t, n;
621
- if (!e)
622
- throw new Error();
623
- return W(e.columnDef.aggregationFn) ? e.columnDef.aggregationFn : e.columnDef.aggregationFn === "auto" ? e.getAutoAggregationFn() : (t = (n = o.options.aggregationFns) == null ? void 0 : n[e.columnDef.aggregationFn]) != null ? t : Y[e.columnDef.aggregationFn];
624
- };
625
- },
626
- createTable: (e) => {
627
- e.setGrouping = (o) => e.options.onGroupingChange == null ? void 0 : e.options.onGroupingChange(o), e.resetGrouping = (o) => {
628
- var t, n;
629
- e.setGrouping(o ? [] : (t = (n = e.initialState) == null ? void 0 : n.grouping) != null ? t : []);
630
- }, e.getPreGroupedRowModel = () => e.getFilteredRowModel(), e.getGroupedRowModel = () => (!e._getGroupedRowModel && e.options.getGroupedRowModel && (e._getGroupedRowModel = e.options.getGroupedRowModel(e)), e.options.manualGrouping || !e._getGroupedRowModel ? e.getPreGroupedRowModel() : e._getGroupedRowModel());
631
- },
632
- createRow: (e, o) => {
633
- e.getIsGrouped = () => !!e.groupingColumnId, e.getGroupingValue = (t) => {
634
- if (e._groupingValuesCache.hasOwnProperty(t))
635
- return e._groupingValuesCache[t];
636
- const n = o.getColumn(t);
637
- return n != null && n.columnDef.getGroupingValue ? (e._groupingValuesCache[t] = n.columnDef.getGroupingValue(e.original), e._groupingValuesCache[t]) : e.getValue(t);
638
- }, e._groupingValuesCache = {};
639
- },
640
- createCell: (e, o, t, n) => {
641
- e.getIsGrouped = () => o.getIsGrouped() && o.id === t.groupingColumnId, e.getIsPlaceholder = () => !e.getIsGrouped() && o.getIsGrouped(), e.getIsAggregated = () => {
642
- var r;
643
- return !e.getIsGrouped() && !e.getIsPlaceholder() && !!((r = t.subRows) != null && r.length);
644
- };
645
- }
646
- };
647
- function yt(e, o, t) {
648
- if (!(o != null && o.length) || !t)
649
- return e;
650
- const n = e.filter((l) => !o.includes(l.id));
651
- return t === "remove" ? n : [...o.map((l) => e.find((i) => i.id === l)).filter(Boolean), ...n];
652
- }
653
- const $t = {
654
- getInitialState: (e) => ({
655
- columnOrder: [],
656
- ...e
657
- }),
658
- getDefaultOptions: (e) => ({
659
- onColumnOrderChange: D("columnOrder", e)
660
- }),
661
- createColumn: (e, o) => {
662
- e.getIndex = S((t) => [k(o, t)], (t) => t.findIndex((n) => n.id === e.id), w(o.options, "debugColumns", "getIndex")), e.getIsFirstColumn = (t) => {
663
- var n;
664
- return ((n = k(o, t)[0]) == null ? void 0 : n.id) === e.id;
665
- }, e.getIsLastColumn = (t) => {
666
- var n;
667
- const r = k(o, t);
668
- return ((n = r[r.length - 1]) == null ? void 0 : n.id) === e.id;
669
- };
670
- },
671
- createTable: (e) => {
672
- e.setColumnOrder = (o) => e.options.onColumnOrderChange == null ? void 0 : e.options.onColumnOrderChange(o), e.resetColumnOrder = (o) => {
673
- var t;
674
- e.setColumnOrder(o ? [] : (t = e.initialState.columnOrder) != null ? t : []);
675
- }, e._getOrderColumnsFn = S(() => [e.getState().columnOrder, e.getState().grouping, e.options.groupedColumnMode], (o, t, n) => (r) => {
676
- let l = [];
677
- if (!(o != null && o.length))
678
- l = r;
679
- else {
680
- const i = [...o], a = [...r];
681
- for (; a.length && i.length; ) {
682
- const u = i.shift(), d = a.findIndex((f) => f.id === u);
683
- d > -1 && l.push(a.splice(d, 1)[0]);
684
- }
685
- l = [...l, ...a];
686
- }
687
- return yt(l, t, n);
688
- }, w(e.options, "debugTable", "_getOrderColumnsFn"));
689
- }
690
- }, ee = () => ({
691
- left: [],
692
- right: []
693
- }), Vt = {
694
- getInitialState: (e) => ({
695
- columnPinning: ee(),
696
- ...e
697
- }),
698
- getDefaultOptions: (e) => ({
699
- onColumnPinningChange: D("columnPinning", e)
700
- }),
701
- createColumn: (e, o) => {
702
- e.pin = (t) => {
703
- const n = e.getLeafColumns().map((r) => r.id).filter(Boolean);
704
- o.setColumnPinning((r) => {
705
- var l, i;
706
- if (t === "right") {
707
- var a, u;
708
- return {
709
- left: ((a = r == null ? void 0 : r.left) != null ? a : []).filter((p) => !(n != null && n.includes(p))),
710
- right: [...((u = r == null ? void 0 : r.right) != null ? u : []).filter((p) => !(n != null && n.includes(p))), ...n]
711
- };
712
- }
713
- if (t === "left") {
714
- var d, f;
715
- return {
716
- left: [...((d = r == null ? void 0 : r.left) != null ? d : []).filter((p) => !(n != null && n.includes(p))), ...n],
717
- right: ((f = r == null ? void 0 : r.right) != null ? f : []).filter((p) => !(n != null && n.includes(p)))
718
- };
719
- }
720
- return {
721
- left: ((l = r == null ? void 0 : r.left) != null ? l : []).filter((p) => !(n != null && n.includes(p))),
722
- right: ((i = r == null ? void 0 : r.right) != null ? i : []).filter((p) => !(n != null && n.includes(p)))
723
- };
724
- });
725
- }, e.getCanPin = () => e.getLeafColumns().some((n) => {
726
- var r, l, i;
727
- return ((r = n.columnDef.enablePinning) != null ? r : !0) && ((l = (i = o.options.enableColumnPinning) != null ? i : o.options.enablePinning) != null ? l : !0);
728
- }), e.getIsPinned = () => {
729
- const t = e.getLeafColumns().map((a) => a.id), {
730
- left: n,
731
- right: r
732
- } = o.getState().columnPinning, l = t.some((a) => n == null ? void 0 : n.includes(a)), i = t.some((a) => r == null ? void 0 : r.includes(a));
733
- return l ? "left" : i ? "right" : !1;
734
- }, e.getPinnedIndex = () => {
735
- var t, n;
736
- const r = e.getIsPinned();
737
- return r ? (t = (n = o.getState().columnPinning) == null || (n = n[r]) == null ? void 0 : n.indexOf(e.id)) != null ? t : -1 : 0;
738
- };
739
- },
740
- createRow: (e, o) => {
741
- e.getCenterVisibleCells = S(() => [e._getAllVisibleCells(), o.getState().columnPinning.left, o.getState().columnPinning.right], (t, n, r) => {
742
- const l = [...n ?? [], ...r ?? []];
743
- return t.filter((i) => !l.includes(i.column.id));
744
- }, w(o.options, "debugRows", "getCenterVisibleCells")), e.getLeftVisibleCells = S(() => [e._getAllVisibleCells(), o.getState().columnPinning.left], (t, n) => (n ?? []).map((l) => t.find((i) => i.column.id === l)).filter(Boolean).map((l) => ({
745
- ...l,
746
- position: "left"
747
- })), w(o.options, "debugRows", "getLeftVisibleCells")), e.getRightVisibleCells = S(() => [e._getAllVisibleCells(), o.getState().columnPinning.right], (t, n) => (n ?? []).map((l) => t.find((i) => i.column.id === l)).filter(Boolean).map((l) => ({
748
- ...l,
749
- position: "right"
750
- })), w(o.options, "debugRows", "getRightVisibleCells"));
751
- },
752
- createTable: (e) => {
753
- e.setColumnPinning = (o) => e.options.onColumnPinningChange == null ? void 0 : e.options.onColumnPinningChange(o), e.resetColumnPinning = (o) => {
754
- var t, n;
755
- return e.setColumnPinning(o ? ee() : (t = (n = e.initialState) == null ? void 0 : n.columnPinning) != null ? t : ee());
756
- }, e.getIsSomeColumnsPinned = (o) => {
757
- var t;
758
- const n = e.getState().columnPinning;
759
- if (!o) {
760
- var r, l;
761
- return !!((r = n.left) != null && r.length || (l = n.right) != null && l.length);
762
- }
763
- return !!((t = n[o]) != null && t.length);
764
- }, e.getLeftLeafColumns = S(() => [e.getAllLeafColumns(), e.getState().columnPinning.left], (o, t) => (t ?? []).map((n) => o.find((r) => r.id === n)).filter(Boolean), w(e.options, "debugColumns", "getLeftLeafColumns")), e.getRightLeafColumns = S(() => [e.getAllLeafColumns(), e.getState().columnPinning.right], (o, t) => (t ?? []).map((n) => o.find((r) => r.id === n)).filter(Boolean), w(e.options, "debugColumns", "getRightLeafColumns")), e.getCenterLeafColumns = S(() => [e.getAllLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n) => {
765
- const r = [...t ?? [], ...n ?? []];
766
- return o.filter((l) => !r.includes(l.id));
767
- }, w(e.options, "debugColumns", "getCenterLeafColumns"));
768
- }
769
- };
770
- function Mt(e) {
771
- return e || (typeof document < "u" ? document : null);
772
- }
773
- const j = {
774
- size: 150,
775
- minSize: 20,
776
- maxSize: Number.MAX_SAFE_INTEGER
777
- }, te = () => ({
778
- startOffset: null,
779
- startSize: null,
780
- deltaOffset: null,
781
- deltaPercentage: null,
782
- isResizingColumn: !1,
783
- columnSizingStart: []
784
- }), Pt = {
785
- getDefaultColumnDef: () => j,
786
- getInitialState: (e) => ({
787
- columnSizing: {},
788
- columnSizingInfo: te(),
789
- ...e
790
- }),
791
- getDefaultOptions: (e) => ({
792
- columnResizeMode: "onEnd",
793
- columnResizeDirection: "ltr",
794
- onColumnSizingChange: D("columnSizing", e),
795
- onColumnSizingInfoChange: D("columnSizingInfo", e)
796
- }),
797
- createColumn: (e, o) => {
798
- e.getSize = () => {
799
- var t, n, r;
800
- const l = o.getState().columnSizing[e.id];
801
- return Math.min(Math.max((t = e.columnDef.minSize) != null ? t : j.minSize, (n = l ?? e.columnDef.size) != null ? n : j.size), (r = e.columnDef.maxSize) != null ? r : j.maxSize);
802
- }, e.getStart = S((t) => [t, k(o, t), o.getState().columnSizing], (t, n) => n.slice(0, e.getIndex(t)).reduce((r, l) => r + l.getSize(), 0), w(o.options, "debugColumns", "getStart")), e.getAfter = S((t) => [t, k(o, t), o.getState().columnSizing], (t, n) => n.slice(e.getIndex(t) + 1).reduce((r, l) => r + l.getSize(), 0), w(o.options, "debugColumns", "getAfter")), e.resetSize = () => {
803
- o.setColumnSizing((t) => {
804
- let {
805
- [e.id]: n,
806
- ...r
807
- } = t;
808
- return r;
809
- });
810
- }, e.getCanResize = () => {
811
- var t, n;
812
- return ((t = e.columnDef.enableResizing) != null ? t : !0) && ((n = o.options.enableColumnResizing) != null ? n : !0);
813
- }, e.getIsResizing = () => o.getState().columnSizingInfo.isResizingColumn === e.id;
814
- },
815
- createHeader: (e, o) => {
816
- e.getSize = () => {
817
- let t = 0;
818
- const n = (r) => {
819
- if (r.subHeaders.length)
820
- r.subHeaders.forEach(n);
821
- else {
822
- var l;
823
- t += (l = r.column.getSize()) != null ? l : 0;
824
- }
825
- };
826
- return n(e), t;
827
- }, e.getStart = () => {
828
- if (e.index > 0) {
829
- const t = e.headerGroup.headers[e.index - 1];
830
- return t.getStart() + t.getSize();
831
- }
832
- return 0;
833
- }, e.getResizeHandler = (t) => {
834
- const n = o.getColumn(e.column.id), r = n == null ? void 0 : n.getCanResize();
835
- return (l) => {
836
- if (!n || !r || (l.persist == null || l.persist(), ne(l) && l.touches && l.touches.length > 1))
837
- return;
838
- const i = e.getSize(), a = e ? e.getLeafHeaders().map((R) => [R.column.id, R.column.getSize()]) : [[n.id, n.getSize()]], u = ne(l) ? Math.round(l.touches[0].clientX) : l.clientX, d = {}, f = (R, $) => {
839
- typeof $ == "number" && (o.setColumnSizingInfo((V) => {
840
- var _, P;
841
- const A = o.options.columnResizeDirection === "rtl" ? -1 : 1, x = ($ - ((_ = V == null ? void 0 : V.startOffset) != null ? _ : 0)) * A, M = Math.max(x / ((P = V == null ? void 0 : V.startSize) != null ? P : 0), -0.999999);
842
- return V.columnSizingStart.forEach((Ue) => {
843
- let [Xe, Ce] = Ue;
844
- d[Xe] = Math.round(Math.max(Ce + Ce * M, 0) * 100) / 100;
845
- }), {
846
- ...V,
847
- deltaOffset: x,
848
- deltaPercentage: M
849
- };
850
- }), (o.options.columnResizeMode === "onChange" || R === "end") && o.setColumnSizing((V) => ({
851
- ...V,
852
- ...d
853
- })));
854
- }, p = (R) => f("move", R), g = (R) => {
855
- f("end", R), o.setColumnSizingInfo(($) => ({
856
- ...$,
857
- isResizingColumn: !1,
858
- startOffset: null,
859
- startSize: null,
860
- deltaOffset: null,
861
- deltaPercentage: null,
862
- columnSizingStart: []
863
- }));
864
- }, s = Mt(t), m = {
865
- moveHandler: (R) => p(R.clientX),
866
- upHandler: (R) => {
867
- s == null || s.removeEventListener("mousemove", m.moveHandler), s == null || s.removeEventListener("mouseup", m.upHandler), g(R.clientX);
868
- }
869
- }, h = {
870
- moveHandler: (R) => (R.cancelable && (R.preventDefault(), R.stopPropagation()), p(R.touches[0].clientX), !1),
871
- upHandler: (R) => {
872
- var $;
873
- s == null || s.removeEventListener("touchmove", h.moveHandler), s == null || s.removeEventListener("touchend", h.upHandler), R.cancelable && (R.preventDefault(), R.stopPropagation()), g(($ = R.touches[0]) == null ? void 0 : $.clientX);
874
- }
875
- }, v = It() ? {
876
- passive: !1
877
- } : !1;
878
- ne(l) ? (s == null || s.addEventListener("touchmove", h.moveHandler, v), s == null || s.addEventListener("touchend", h.upHandler, v)) : (s == null || s.addEventListener("mousemove", m.moveHandler, v), s == null || s.addEventListener("mouseup", m.upHandler, v)), o.setColumnSizingInfo((R) => ({
879
- ...R,
880
- startOffset: u,
881
- startSize: i,
882
- deltaOffset: 0,
883
- deltaPercentage: 0,
884
- columnSizingStart: a,
885
- isResizingColumn: n.id
886
- }));
887
- };
888
- };
889
- },
890
- createTable: (e) => {
891
- e.setColumnSizing = (o) => e.options.onColumnSizingChange == null ? void 0 : e.options.onColumnSizingChange(o), e.setColumnSizingInfo = (o) => e.options.onColumnSizingInfoChange == null ? void 0 : e.options.onColumnSizingInfoChange(o), e.resetColumnSizing = (o) => {
892
- var t;
893
- e.setColumnSizing(o ? {} : (t = e.initialState.columnSizing) != null ? t : {});
894
- }, e.resetHeaderSizeInfo = (o) => {
895
- var t;
896
- e.setColumnSizingInfo(o ? te() : (t = e.initialState.columnSizingInfo) != null ? t : te());
897
- }, e.getTotalSize = () => {
898
- var o, t;
899
- return (o = (t = e.getHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n, r) => n + r.getSize(), 0)) != null ? o : 0;
900
- }, e.getLeftTotalSize = () => {
901
- var o, t;
902
- return (o = (t = e.getLeftHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n, r) => n + r.getSize(), 0)) != null ? o : 0;
903
- }, e.getCenterTotalSize = () => {
904
- var o, t;
905
- return (o = (t = e.getCenterHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n, r) => n + r.getSize(), 0)) != null ? o : 0;
906
- }, e.getRightTotalSize = () => {
907
- var o, t;
908
- return (o = (t = e.getRightHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n, r) => n + r.getSize(), 0)) != null ? o : 0;
909
- };
910
- }
911
- };
912
- let U = null;
913
- function It() {
914
- if (typeof U == "boolean") return U;
915
- let e = !1;
916
- try {
917
- const o = {
918
- get passive() {
919
- return e = !0, !1;
920
- }
921
- }, t = () => {
922
- };
923
- window.addEventListener("test", t, o), window.removeEventListener("test", t);
924
- } catch {
925
- e = !1;
926
- }
927
- return U = e, U;
928
- }
929
- function ne(e) {
930
- return e.type === "touchstart";
931
- }
932
- const Nt = {
933
- getInitialState: (e) => ({
934
- columnVisibility: {},
935
- ...e
936
- }),
937
- getDefaultOptions: (e) => ({
938
- onColumnVisibilityChange: D("columnVisibility", e)
939
- }),
940
- createColumn: (e, o) => {
941
- e.toggleVisibility = (t) => {
942
- e.getCanHide() && o.setColumnVisibility((n) => ({
943
- ...n,
944
- [e.id]: t ?? !e.getIsVisible()
945
- }));
946
- }, e.getIsVisible = () => {
947
- var t, n;
948
- const r = e.columns;
949
- return (t = r.length ? r.some((l) => l.getIsVisible()) : (n = o.getState().columnVisibility) == null ? void 0 : n[e.id]) != null ? t : !0;
950
- }, e.getCanHide = () => {
951
- var t, n;
952
- return ((t = e.columnDef.enableHiding) != null ? t : !0) && ((n = o.options.enableHiding) != null ? n : !0);
953
- }, e.getToggleVisibilityHandler = () => (t) => {
954
- e.toggleVisibility == null || e.toggleVisibility(t.target.checked);
955
- };
956
- },
957
- createRow: (e, o) => {
958
- e._getAllVisibleCells = S(() => [e.getAllCells(), o.getState().columnVisibility], (t) => t.filter((n) => n.column.getIsVisible()), w(o.options, "debugRows", "_getAllVisibleCells")), e.getVisibleCells = S(() => [e.getLeftVisibleCells(), e.getCenterVisibleCells(), e.getRightVisibleCells()], (t, n, r) => [...t, ...n, ...r], w(o.options, "debugRows", "getVisibleCells"));
959
- },
960
- createTable: (e) => {
961
- const o = (t, n) => S(() => [n(), n().filter((r) => r.getIsVisible()).map((r) => r.id).join("_")], (r) => r.filter((l) => l.getIsVisible == null ? void 0 : l.getIsVisible()), w(e.options, "debugColumns", t));
962
- e.getVisibleFlatColumns = o("getVisibleFlatColumns", () => e.getAllFlatColumns()), e.getVisibleLeafColumns = o("getVisibleLeafColumns", () => e.getAllLeafColumns()), e.getLeftVisibleLeafColumns = o("getLeftVisibleLeafColumns", () => e.getLeftLeafColumns()), e.getRightVisibleLeafColumns = o("getRightVisibleLeafColumns", () => e.getRightLeafColumns()), e.getCenterVisibleLeafColumns = o("getCenterVisibleLeafColumns", () => e.getCenterLeafColumns()), e.setColumnVisibility = (t) => e.options.onColumnVisibilityChange == null ? void 0 : e.options.onColumnVisibilityChange(t), e.resetColumnVisibility = (t) => {
963
- var n;
964
- e.setColumnVisibility(t ? {} : (n = e.initialState.columnVisibility) != null ? n : {});
965
- }, e.toggleAllColumnsVisible = (t) => {
966
- var n;
967
- t = (n = t) != null ? n : !e.getIsAllColumnsVisible(), e.setColumnVisibility(e.getAllLeafColumns().reduce((r, l) => ({
968
- ...r,
969
- [l.id]: t || !(l.getCanHide != null && l.getCanHide())
970
- }), {}));
971
- }, e.getIsAllColumnsVisible = () => !e.getAllLeafColumns().some((t) => !(t.getIsVisible != null && t.getIsVisible())), e.getIsSomeColumnsVisible = () => e.getAllLeafColumns().some((t) => t.getIsVisible == null ? void 0 : t.getIsVisible()), e.getToggleAllColumnsVisibilityHandler = () => (t) => {
972
- var n;
973
- e.toggleAllColumnsVisible((n = t.target) == null ? void 0 : n.checked);
974
- };
975
- }
976
- };
977
- function k(e, o) {
978
- return o ? o === "center" ? e.getCenterVisibleLeafColumns() : o === "left" ? e.getLeftVisibleLeafColumns() : e.getRightVisibleLeafColumns() : e.getVisibleLeafColumns();
979
- }
980
- const Dt = {
981
- createTable: (e) => {
982
- e._getGlobalFacetedRowModel = e.options.getFacetedRowModel && e.options.getFacetedRowModel(e, "__global__"), e.getGlobalFacetedRowModel = () => e.options.manualFiltering || !e._getGlobalFacetedRowModel ? e.getPreFilteredRowModel() : e._getGlobalFacetedRowModel(), e._getGlobalFacetedUniqueValues = e.options.getFacetedUniqueValues && e.options.getFacetedUniqueValues(e, "__global__"), e.getGlobalFacetedUniqueValues = () => e._getGlobalFacetedUniqueValues ? e._getGlobalFacetedUniqueValues() : /* @__PURE__ */ new Map(), e._getGlobalFacetedMinMaxValues = e.options.getFacetedMinMaxValues && e.options.getFacetedMinMaxValues(e, "__global__"), e.getGlobalFacetedMinMaxValues = () => {
983
- if (e._getGlobalFacetedMinMaxValues)
984
- return e._getGlobalFacetedMinMaxValues();
985
- };
986
- }
987
- }, Et = {
988
- getInitialState: (e) => ({
989
- globalFilter: void 0,
990
- ...e
991
- }),
992
- getDefaultOptions: (e) => ({
993
- onGlobalFilterChange: D("globalFilter", e),
994
- globalFilterFn: "auto",
995
- getColumnCanGlobalFilter: (o) => {
996
- var t;
997
- const n = (t = e.getCoreRowModel().flatRows[0]) == null || (t = t._getAllCellsByColumnId()[o.id]) == null ? void 0 : t.getValue();
998
- return typeof n == "string" || typeof n == "number";
999
- }
1000
- }),
1001
- createColumn: (e, o) => {
1002
- e.getCanGlobalFilter = () => {
1003
- var t, n, r, l;
1004
- return ((t = e.columnDef.enableGlobalFilter) != null ? t : !0) && ((n = o.options.enableGlobalFilter) != null ? n : !0) && ((r = o.options.enableFilters) != null ? r : !0) && ((l = o.options.getColumnCanGlobalFilter == null ? void 0 : o.options.getColumnCanGlobalFilter(e)) != null ? l : !0) && !!e.accessorFn;
1005
- };
1006
- },
1007
- createTable: (e) => {
1008
- e.getGlobalAutoFilterFn = () => H.includesString, e.getGlobalFilterFn = () => {
1009
- var o, t;
1010
- const {
1011
- globalFilterFn: n
1012
- } = e.options;
1013
- return W(n) ? n : n === "auto" ? e.getGlobalAutoFilterFn() : (o = (t = e.options.filterFns) == null ? void 0 : t[n]) != null ? o : H[n];
1014
- }, e.setGlobalFilter = (o) => {
1015
- e.options.onGlobalFilterChange == null || e.options.onGlobalFilterChange(o);
1016
- }, e.resetGlobalFilter = (o) => {
1017
- e.setGlobalFilter(o ? void 0 : e.initialState.globalFilter);
1018
- };
1019
- }
1020
- }, At = {
1021
- getInitialState: (e) => ({
1022
- expanded: {},
1023
- ...e
1024
- }),
1025
- getDefaultOptions: (e) => ({
1026
- onExpandedChange: D("expanded", e),
1027
- paginateExpandedRows: !0
1028
- }),
1029
- createTable: (e) => {
1030
- let o = !1, t = !1;
1031
- e._autoResetExpanded = () => {
1032
- var n, r;
1033
- if (!o) {
1034
- e._queue(() => {
1035
- o = !0;
1036
- });
1037
- return;
1038
- }
1039
- if ((n = (r = e.options.autoResetAll) != null ? r : e.options.autoResetExpanded) != null ? n : !e.options.manualExpanding) {
1040
- if (t) return;
1041
- t = !0, e._queue(() => {
1042
- e.resetExpanded(), t = !1;
1043
- });
1044
- }
1045
- }, e.setExpanded = (n) => e.options.onExpandedChange == null ? void 0 : e.options.onExpandedChange(n), e.toggleAllRowsExpanded = (n) => {
1046
- n ?? !e.getIsAllRowsExpanded() ? e.setExpanded(!0) : e.setExpanded({});
1047
- }, e.resetExpanded = (n) => {
1048
- var r, l;
1049
- e.setExpanded(n ? {} : (r = (l = e.initialState) == null ? void 0 : l.expanded) != null ? r : {});
1050
- }, e.getCanSomeRowsExpand = () => e.getPrePaginationRowModel().flatRows.some((n) => n.getCanExpand()), e.getToggleAllRowsExpandedHandler = () => (n) => {
1051
- n.persist == null || n.persist(), e.toggleAllRowsExpanded();
1052
- }, e.getIsSomeRowsExpanded = () => {
1053
- const n = e.getState().expanded;
1054
- return n === !0 || Object.values(n).some(Boolean);
1055
- }, e.getIsAllRowsExpanded = () => {
1056
- const n = e.getState().expanded;
1057
- return typeof n == "boolean" ? n === !0 : !(!Object.keys(n).length || e.getRowModel().flatRows.some((r) => !r.getIsExpanded()));
1058
- }, e.getExpandedDepth = () => {
1059
- let n = 0;
1060
- return (e.getState().expanded === !0 ? Object.keys(e.getRowModel().rowsById) : Object.keys(e.getState().expanded)).forEach((l) => {
1061
- const i = l.split(".");
1062
- n = Math.max(n, i.length);
1063
- }), n;
1064
- }, e.getPreExpandedRowModel = () => e.getSortedRowModel(), e.getExpandedRowModel = () => (!e._getExpandedRowModel && e.options.getExpandedRowModel && (e._getExpandedRowModel = e.options.getExpandedRowModel(e)), e.options.manualExpanding || !e._getExpandedRowModel ? e.getPreExpandedRowModel() : e._getExpandedRowModel());
1065
- },
1066
- createRow: (e, o) => {
1067
- e.toggleExpanded = (t) => {
1068
- o.setExpanded((n) => {
1069
- var r;
1070
- const l = n === !0 ? !0 : !!(n != null && n[e.id]);
1071
- let i = {};
1072
- if (n === !0 ? Object.keys(o.getRowModel().rowsById).forEach((a) => {
1073
- i[a] = !0;
1074
- }) : i = n, t = (r = t) != null ? r : !l, !l && t)
1075
- return {
1076
- ...i,
1077
- [e.id]: !0
1078
- };
1079
- if (l && !t) {
1080
- const {
1081
- [e.id]: a,
1082
- ...u
1083
- } = i;
1084
- return u;
1085
- }
1086
- return n;
1087
- });
1088
- }, e.getIsExpanded = () => {
1089
- var t;
1090
- const n = o.getState().expanded;
1091
- return !!((t = o.options.getIsRowExpanded == null ? void 0 : o.options.getIsRowExpanded(e)) != null ? t : n === !0 || n != null && n[e.id]);
1092
- }, e.getCanExpand = () => {
1093
- var t, n, r;
1094
- return (t = o.options.getRowCanExpand == null ? void 0 : o.options.getRowCanExpand(e)) != null ? t : ((n = o.options.enableExpanding) != null ? n : !0) && !!((r = e.subRows) != null && r.length);
1095
- }, e.getIsAllParentsExpanded = () => {
1096
- let t = !0, n = e;
1097
- for (; t && n.parentId; )
1098
- n = o.getRow(n.parentId, !0), t = n.getIsExpanded();
1099
- return t;
1100
- }, e.getToggleExpandedHandler = () => {
1101
- const t = e.getCanExpand();
1102
- return () => {
1103
- t && e.toggleExpanded();
1104
- };
1105
- };
1106
- }
1107
- }, ie = 0, se = 10, oe = () => ({
1108
- pageIndex: ie,
1109
- pageSize: se
1110
- }), Ht = {
1111
- getInitialState: (e) => ({
1112
- ...e,
1113
- pagination: {
1114
- ...oe(),
1115
- ...e == null ? void 0 : e.pagination
1116
- }
1117
- }),
1118
- getDefaultOptions: (e) => ({
1119
- onPaginationChange: D("pagination", e)
1120
- }),
1121
- createTable: (e) => {
1122
- let o = !1, t = !1;
1123
- e._autoResetPageIndex = () => {
1124
- var n, r;
1125
- if (!o) {
1126
- e._queue(() => {
1127
- o = !0;
1128
- });
1129
- return;
1130
- }
1131
- if ((n = (r = e.options.autoResetAll) != null ? r : e.options.autoResetPageIndex) != null ? n : !e.options.manualPagination) {
1132
- if (t) return;
1133
- t = !0, e._queue(() => {
1134
- e.resetPageIndex(), t = !1;
1135
- });
1136
- }
1137
- }, e.setPagination = (n) => {
1138
- const r = (l) => G(n, l);
1139
- return e.options.onPaginationChange == null ? void 0 : e.options.onPaginationChange(r);
1140
- }, e.resetPagination = (n) => {
1141
- var r;
1142
- e.setPagination(n ? oe() : (r = e.initialState.pagination) != null ? r : oe());
1143
- }, e.setPageIndex = (n) => {
1144
- e.setPagination((r) => {
1145
- let l = G(n, r.pageIndex);
1146
- const i = typeof e.options.pageCount > "u" || e.options.pageCount === -1 ? Number.MAX_SAFE_INTEGER : e.options.pageCount - 1;
1147
- return l = Math.max(0, Math.min(l, i)), {
1148
- ...r,
1149
- pageIndex: l
1150
- };
1151
- });
1152
- }, e.resetPageIndex = (n) => {
1153
- var r, l;
1154
- e.setPageIndex(n ? ie : (r = (l = e.initialState) == null || (l = l.pagination) == null ? void 0 : l.pageIndex) != null ? r : ie);
1155
- }, e.resetPageSize = (n) => {
1156
- var r, l;
1157
- e.setPageSize(n ? se : (r = (l = e.initialState) == null || (l = l.pagination) == null ? void 0 : l.pageSize) != null ? r : se);
1158
- }, e.setPageSize = (n) => {
1159
- e.setPagination((r) => {
1160
- const l = Math.max(1, G(n, r.pageSize)), i = r.pageSize * r.pageIndex, a = Math.floor(i / l);
1161
- return {
1162
- ...r,
1163
- pageIndex: a,
1164
- pageSize: l
1165
- };
1166
- });
1167
- }, e.setPageCount = (n) => e.setPagination((r) => {
1168
- var l;
1169
- let i = G(n, (l = e.options.pageCount) != null ? l : -1);
1170
- return typeof i == "number" && (i = Math.max(-1, i)), {
1171
- ...r,
1172
- pageCount: i
1173
- };
1174
- }), e.getPageOptions = S(() => [e.getPageCount()], (n) => {
1175
- let r = [];
1176
- return n && n > 0 && (r = [...new Array(n)].fill(null).map((l, i) => i)), r;
1177
- }, w(e.options, "debugTable", "getPageOptions")), e.getCanPreviousPage = () => e.getState().pagination.pageIndex > 0, e.getCanNextPage = () => {
1178
- const {
1179
- pageIndex: n
1180
- } = e.getState().pagination, r = e.getPageCount();
1181
- return r === -1 ? !0 : r === 0 ? !1 : n < r - 1;
1182
- }, e.previousPage = () => e.setPageIndex((n) => n - 1), e.nextPage = () => e.setPageIndex((n) => n + 1), e.firstPage = () => e.setPageIndex(0), e.lastPage = () => e.setPageIndex(e.getPageCount() - 1), e.getPrePaginationRowModel = () => e.getExpandedRowModel(), e.getPaginationRowModel = () => (!e._getPaginationRowModel && e.options.getPaginationRowModel && (e._getPaginationRowModel = e.options.getPaginationRowModel(e)), e.options.manualPagination || !e._getPaginationRowModel ? e.getPrePaginationRowModel() : e._getPaginationRowModel()), e.getPageCount = () => {
1183
- var n;
1184
- return (n = e.options.pageCount) != null ? n : Math.ceil(e.getRowCount() / e.getState().pagination.pageSize);
1185
- }, e.getRowCount = () => {
1186
- var n;
1187
- return (n = e.options.rowCount) != null ? n : e.getPrePaginationRowModel().rows.length;
1188
- };
1189
- }
1190
- }, re = () => ({
1191
- top: [],
1192
- bottom: []
1193
- }), Gt = {
1194
- getInitialState: (e) => ({
1195
- rowPinning: re(),
1196
- ...e
1197
- }),
1198
- getDefaultOptions: (e) => ({
1199
- onRowPinningChange: D("rowPinning", e)
1200
- }),
1201
- createRow: (e, o) => {
1202
- e.pin = (t, n, r) => {
1203
- const l = n ? e.getLeafRows().map((u) => {
1204
- let {
1205
- id: d
1206
- } = u;
1207
- return d;
1208
- }) : [], i = r ? e.getParentRows().map((u) => {
1209
- let {
1210
- id: d
1211
- } = u;
1212
- return d;
1213
- }) : [], a = /* @__PURE__ */ new Set([...i, e.id, ...l]);
1214
- o.setRowPinning((u) => {
1215
- var d, f;
1216
- if (t === "bottom") {
1217
- var p, g;
1218
- return {
1219
- top: ((p = u == null ? void 0 : u.top) != null ? p : []).filter((h) => !(a != null && a.has(h))),
1220
- bottom: [...((g = u == null ? void 0 : u.bottom) != null ? g : []).filter((h) => !(a != null && a.has(h))), ...Array.from(a)]
1221
- };
1222
- }
1223
- if (t === "top") {
1224
- var s, m;
1225
- return {
1226
- top: [...((s = u == null ? void 0 : u.top) != null ? s : []).filter((h) => !(a != null && a.has(h))), ...Array.from(a)],
1227
- bottom: ((m = u == null ? void 0 : u.bottom) != null ? m : []).filter((h) => !(a != null && a.has(h)))
1228
- };
1229
- }
1230
- return {
1231
- top: ((d = u == null ? void 0 : u.top) != null ? d : []).filter((h) => !(a != null && a.has(h))),
1232
- bottom: ((f = u == null ? void 0 : u.bottom) != null ? f : []).filter((h) => !(a != null && a.has(h)))
1233
- };
1234
- });
1235
- }, e.getCanPin = () => {
1236
- var t;
1237
- const {
1238
- enableRowPinning: n,
1239
- enablePinning: r
1240
- } = o.options;
1241
- return typeof n == "function" ? n(e) : (t = n ?? r) != null ? t : !0;
1242
- }, e.getIsPinned = () => {
1243
- const t = [e.id], {
1244
- top: n,
1245
- bottom: r
1246
- } = o.getState().rowPinning, l = t.some((a) => n == null ? void 0 : n.includes(a)), i = t.some((a) => r == null ? void 0 : r.includes(a));
1247
- return l ? "top" : i ? "bottom" : !1;
1248
- }, e.getPinnedIndex = () => {
1249
- var t, n;
1250
- const r = e.getIsPinned();
1251
- if (!r) return -1;
1252
- const l = (t = r === "top" ? o.getTopRows() : o.getBottomRows()) == null ? void 0 : t.map((i) => {
1253
- let {
1254
- id: a
1255
- } = i;
1256
- return a;
1257
- });
1258
- return (n = l == null ? void 0 : l.indexOf(e.id)) != null ? n : -1;
1259
- };
1260
- },
1261
- createTable: (e) => {
1262
- e.setRowPinning = (o) => e.options.onRowPinningChange == null ? void 0 : e.options.onRowPinningChange(o), e.resetRowPinning = (o) => {
1263
- var t, n;
1264
- return e.setRowPinning(o ? re() : (t = (n = e.initialState) == null ? void 0 : n.rowPinning) != null ? t : re());
1265
- }, e.getIsSomeRowsPinned = (o) => {
1266
- var t;
1267
- const n = e.getState().rowPinning;
1268
- if (!o) {
1269
- var r, l;
1270
- return !!((r = n.top) != null && r.length || (l = n.bottom) != null && l.length);
1271
- }
1272
- return !!((t = n[o]) != null && t.length);
1273
- }, e._getPinnedRows = (o, t, n) => {
1274
- var r;
1275
- return ((r = e.options.keepPinnedRows) == null || r ? (
1276
- //get all rows that are pinned even if they would not be otherwise visible
1277
- //account for expanded parent rows, but not pagination or filtering
1278
- (t ?? []).map((i) => {
1279
- const a = e.getRow(i, !0);
1280
- return a.getIsAllParentsExpanded() ? a : null;
1281
- })
1282
- ) : (
1283
- //else get only visible rows that are pinned
1284
- (t ?? []).map((i) => o.find((a) => a.id === i))
1285
- )).filter(Boolean).map((i) => ({
1286
- ...i,
1287
- position: n
1288
- }));
1289
- }, e.getTopRows = S(() => [e.getRowModel().rows, e.getState().rowPinning.top], (o, t) => e._getPinnedRows(o, t, "top"), w(e.options, "debugRows", "getTopRows")), e.getBottomRows = S(() => [e.getRowModel().rows, e.getState().rowPinning.bottom], (o, t) => e._getPinnedRows(o, t, "bottom"), w(e.options, "debugRows", "getBottomRows")), e.getCenterRows = S(() => [e.getRowModel().rows, e.getState().rowPinning.top, e.getState().rowPinning.bottom], (o, t, n) => {
1290
- const r = /* @__PURE__ */ new Set([...t ?? [], ...n ?? []]);
1291
- return o.filter((l) => !r.has(l.id));
1292
- }, w(e.options, "debugRows", "getCenterRows"));
1293
- }
1294
- }, Lt = {
1295
- getInitialState: (e) => ({
1296
- rowSelection: {},
1297
- ...e
1298
- }),
1299
- getDefaultOptions: (e) => ({
1300
- onRowSelectionChange: D("rowSelection", e),
1301
- enableRowSelection: !0,
1302
- enableMultiRowSelection: !0,
1303
- enableSubRowSelection: !0
1304
- // enableGroupingRowSelection: false,
1305
- // isAdditiveSelectEvent: (e: unknown) => !!e.metaKey,
1306
- // isInclusiveSelectEvent: (e: unknown) => !!e.shiftKey,
1307
- }),
1308
- createTable: (e) => {
1309
- e.setRowSelection = (o) => e.options.onRowSelectionChange == null ? void 0 : e.options.onRowSelectionChange(o), e.resetRowSelection = (o) => {
1310
- var t;
1311
- return e.setRowSelection(o ? {} : (t = e.initialState.rowSelection) != null ? t : {});
1312
- }, e.toggleAllRowsSelected = (o) => {
1313
- e.setRowSelection((t) => {
1314
- o = typeof o < "u" ? o : !e.getIsAllRowsSelected();
1315
- const n = {
1316
- ...t
1317
- }, r = e.getPreGroupedRowModel().flatRows;
1318
- return o ? r.forEach((l) => {
1319
- l.getCanSelect() && (n[l.id] = !0);
1320
- }) : r.forEach((l) => {
1321
- delete n[l.id];
1322
- }), n;
1323
- });
1324
- }, e.toggleAllPageRowsSelected = (o) => e.setRowSelection((t) => {
1325
- const n = typeof o < "u" ? o : !e.getIsAllPageRowsSelected(), r = {
1326
- ...t
1327
- };
1328
- return e.getRowModel().rows.forEach((l) => {
1329
- ae(r, l.id, n, !0, e);
1330
- }), r;
1331
- }), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = S(() => [e.getState().rowSelection, e.getCoreRowModel()], (o, t) => Object.keys(o).length ? le(e, t) : {
1332
- rows: [],
1333
- flatRows: [],
1334
- rowsById: {}
1335
- }, w(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = S(() => [e.getState().rowSelection, e.getFilteredRowModel()], (o, t) => Object.keys(o).length ? le(e, t) : {
1336
- rows: [],
1337
- flatRows: [],
1338
- rowsById: {}
1339
- }, w(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = S(() => [e.getState().rowSelection, e.getSortedRowModel()], (o, t) => Object.keys(o).length ? le(e, t) : {
1340
- rows: [],
1341
- flatRows: [],
1342
- rowsById: {}
1343
- }, w(e.options, "debugTable", "getGroupedSelectedRowModel")), e.getIsAllRowsSelected = () => {
1344
- const o = e.getFilteredRowModel().flatRows, {
1345
- rowSelection: t
1346
- } = e.getState();
1347
- let n = !!(o.length && Object.keys(t).length);
1348
- return n && o.some((r) => r.getCanSelect() && !t[r.id]) && (n = !1), n;
1349
- }, e.getIsAllPageRowsSelected = () => {
1350
- const o = e.getPaginationRowModel().flatRows.filter((r) => r.getCanSelect()), {
1351
- rowSelection: t
1352
- } = e.getState();
1353
- let n = !!o.length;
1354
- return n && o.some((r) => !t[r.id]) && (n = !1), n;
1355
- }, e.getIsSomeRowsSelected = () => {
1356
- var o;
1357
- const t = Object.keys((o = e.getState().rowSelection) != null ? o : {}).length;
1358
- return t > 0 && t < e.getFilteredRowModel().flatRows.length;
1359
- }, e.getIsSomePageRowsSelected = () => {
1360
- const o = e.getPaginationRowModel().flatRows;
1361
- return e.getIsAllPageRowsSelected() ? !1 : o.filter((t) => t.getCanSelect()).some((t) => t.getIsSelected() || t.getIsSomeSelected());
1362
- }, e.getToggleAllRowsSelectedHandler = () => (o) => {
1363
- e.toggleAllRowsSelected(o.target.checked);
1364
- }, e.getToggleAllPageRowsSelectedHandler = () => (o) => {
1365
- e.toggleAllPageRowsSelected(o.target.checked);
1366
- };
1367
- },
1368
- createRow: (e, o) => {
1369
- e.toggleSelected = (t, n) => {
1370
- const r = e.getIsSelected();
1371
- o.setRowSelection((l) => {
1372
- var i;
1373
- if (t = typeof t < "u" ? t : !r, e.getCanSelect() && r === t)
1374
- return l;
1375
- const a = {
1376
- ...l
1377
- };
1378
- return ae(a, e.id, t, (i = n == null ? void 0 : n.selectChildren) != null ? i : !0, o), a;
1379
- });
1380
- }, e.getIsSelected = () => {
1381
- const {
1382
- rowSelection: t
1383
- } = o.getState();
1384
- return me(e, t);
1385
- }, e.getIsSomeSelected = () => {
1386
- const {
1387
- rowSelection: t
1388
- } = o.getState();
1389
- return ue(e, t) === "some";
1390
- }, e.getIsAllSubRowsSelected = () => {
1391
- const {
1392
- rowSelection: t
1393
- } = o.getState();
1394
- return ue(e, t) === "all";
1395
- }, e.getCanSelect = () => {
1396
- var t;
1397
- return typeof o.options.enableRowSelection == "function" ? o.options.enableRowSelection(e) : (t = o.options.enableRowSelection) != null ? t : !0;
1398
- }, e.getCanSelectSubRows = () => {
1399
- var t;
1400
- return typeof o.options.enableSubRowSelection == "function" ? o.options.enableSubRowSelection(e) : (t = o.options.enableSubRowSelection) != null ? t : !0;
1401
- }, e.getCanMultiSelect = () => {
1402
- var t;
1403
- return typeof o.options.enableMultiRowSelection == "function" ? o.options.enableMultiRowSelection(e) : (t = o.options.enableMultiRowSelection) != null ? t : !0;
1404
- }, e.getToggleSelectedHandler = () => {
1405
- const t = e.getCanSelect();
1406
- return (n) => {
1407
- var r;
1408
- t && e.toggleSelected((r = n.target) == null ? void 0 : r.checked);
1409
- };
1410
- };
1411
- }
1412
- }, ae = (e, o, t, n, r) => {
1413
- var l;
1414
- const i = r.getRow(o, !0);
1415
- t ? (i.getCanMultiSelect() || Object.keys(e).forEach((a) => delete e[a]), i.getCanSelect() && (e[o] = !0)) : delete e[o], n && (l = i.subRows) != null && l.length && i.getCanSelectSubRows() && i.subRows.forEach((a) => ae(e, a.id, t, n, r));
1416
- };
1417
- function le(e, o) {
1418
- const t = e.getState().rowSelection, n = [], r = {}, l = function(i, a) {
1419
- return i.map((u) => {
1420
- var d;
1421
- const f = me(u, t);
1422
- if (f && (n.push(u), r[u.id] = u), (d = u.subRows) != null && d.length && (u = {
1423
- ...u,
1424
- subRows: l(u.subRows)
1425
- }), f)
1426
- return u;
1427
- }).filter(Boolean);
1428
- };
1429
- return {
1430
- rows: l(o.rows),
1431
- flatRows: n,
1432
- rowsById: r
1433
- };
1434
- }
1435
- function me(e, o) {
1436
- var t;
1437
- return (t = o[e.id]) != null ? t : !1;
1438
- }
1439
- function ue(e, o, t) {
1440
- var n;
1441
- if (!((n = e.subRows) != null && n.length)) return !1;
1442
- let r = !0, l = !1;
1443
- return e.subRows.forEach((i) => {
1444
- if (!(l && !r) && (i.getCanSelect() && (me(i, o) ? l = !0 : r = !1), i.subRows && i.subRows.length)) {
1445
- const a = ue(i, o);
1446
- a === "all" ? l = !0 : (a === "some" && (l = !0), r = !1);
1447
- }
1448
- }), r ? "all" : l ? "some" : !1;
1449
- }
1450
- const de = /([0-9]+)/gm, zt = (e, o, t) => Te(L(e.getValue(t)).toLowerCase(), L(o.getValue(t)).toLowerCase()), kt = (e, o, t) => Te(L(e.getValue(t)), L(o.getValue(t))), Ot = (e, o, t) => he(L(e.getValue(t)).toLowerCase(), L(o.getValue(t)).toLowerCase()), Tt = (e, o, t) => he(L(e.getValue(t)), L(o.getValue(t))), Bt = (e, o, t) => {
1451
- const n = e.getValue(t), r = o.getValue(t);
1452
- return n > r ? 1 : n < r ? -1 : 0;
1453
- }, bt = (e, o, t) => he(e.getValue(t), o.getValue(t));
1454
- function he(e, o) {
1455
- return e === o ? 0 : e > o ? 1 : -1;
1456
- }
1457
- function L(e) {
1458
- return typeof e == "number" ? isNaN(e) || e === 1 / 0 || e === -1 / 0 ? "" : String(e) : typeof e == "string" ? e : "";
1459
- }
1460
- function Te(e, o) {
1461
- const t = e.split(de).filter(Boolean), n = o.split(de).filter(Boolean);
1462
- for (; t.length && n.length; ) {
1463
- const r = t.shift(), l = n.shift(), i = parseInt(r, 10), a = parseInt(l, 10), u = [i, a].sort();
1464
- if (isNaN(u[0])) {
1465
- if (r > l)
1466
- return 1;
1467
- if (l > r)
1468
- return -1;
1469
- continue;
1470
- }
1471
- if (isNaN(u[1]))
1472
- return isNaN(i) ? -1 : 1;
1473
- if (i > a)
1474
- return 1;
1475
- if (a > i)
1476
- return -1;
1477
- }
1478
- return t.length - n.length;
1479
- }
1480
- const z = {
1481
- alphanumeric: zt,
1482
- alphanumericCaseSensitive: kt,
1483
- text: Ot,
1484
- textCaseSensitive: Tt,
1485
- datetime: Bt,
1486
- basic: bt
1487
- }, qt = {
1488
- getInitialState: (e) => ({
1489
- sorting: [],
1490
- ...e
1491
- }),
1492
- getDefaultColumnDef: () => ({
1493
- sortingFn: "auto",
1494
- sortUndefined: 1
1495
- }),
1496
- getDefaultOptions: (e) => ({
1497
- onSortingChange: D("sorting", e),
1498
- isMultiSortEvent: (o) => o.shiftKey
1499
- }),
1500
- createColumn: (e, o) => {
1501
- e.getAutoSortingFn = () => {
1502
- const t = o.getFilteredRowModel().flatRows.slice(10);
1503
- let n = !1;
1504
- for (const r of t) {
1505
- const l = r == null ? void 0 : r.getValue(e.id);
1506
- if (Object.prototype.toString.call(l) === "[object Date]")
1507
- return z.datetime;
1508
- if (typeof l == "string" && (n = !0, l.split(de).length > 1))
1509
- return z.alphanumeric;
1510
- }
1511
- return n ? z.text : z.basic;
1512
- }, e.getAutoSortDir = () => {
1513
- const t = o.getFilteredRowModel().flatRows[0];
1514
- return typeof (t == null ? void 0 : t.getValue(e.id)) == "string" ? "asc" : "desc";
1515
- }, e.getSortingFn = () => {
1516
- var t, n;
1517
- if (!e)
1518
- throw new Error();
1519
- return W(e.columnDef.sortingFn) ? e.columnDef.sortingFn : e.columnDef.sortingFn === "auto" ? e.getAutoSortingFn() : (t = (n = o.options.sortingFns) == null ? void 0 : n[e.columnDef.sortingFn]) != null ? t : z[e.columnDef.sortingFn];
1520
- }, e.toggleSorting = (t, n) => {
1521
- const r = e.getNextSortingOrder(), l = typeof t < "u" && t !== null;
1522
- o.setSorting((i) => {
1523
- const a = i == null ? void 0 : i.find((s) => s.id === e.id), u = i == null ? void 0 : i.findIndex((s) => s.id === e.id);
1524
- let d = [], f, p = l ? t : r === "desc";
1525
- if (i != null && i.length && e.getCanMultiSort() && n ? a ? f = "toggle" : f = "add" : i != null && i.length && u !== i.length - 1 ? f = "replace" : a ? f = "toggle" : f = "replace", f === "toggle" && (l || r || (f = "remove")), f === "add") {
1526
- var g;
1527
- d = [...i, {
1528
- id: e.id,
1529
- desc: p
1530
- }], d.splice(0, d.length - ((g = o.options.maxMultiSortColCount) != null ? g : Number.MAX_SAFE_INTEGER));
1531
- } else f === "toggle" ? d = i.map((s) => s.id === e.id ? {
1532
- ...s,
1533
- desc: p
1534
- } : s) : f === "remove" ? d = i.filter((s) => s.id !== e.id) : d = [{
1535
- id: e.id,
1536
- desc: p
1537
- }];
1538
- return d;
1539
- });
1540
- }, e.getFirstSortDir = () => {
1541
- var t, n;
1542
- return ((t = (n = e.columnDef.sortDescFirst) != null ? n : o.options.sortDescFirst) != null ? t : e.getAutoSortDir() === "desc") ? "desc" : "asc";
1543
- }, e.getNextSortingOrder = (t) => {
1544
- var n, r;
1545
- const l = e.getFirstSortDir(), i = e.getIsSorted();
1546
- return i ? i !== l && ((n = o.options.enableSortingRemoval) == null || n) && // If enableSortRemove, enable in general
1547
- (!(t && (r = o.options.enableMultiRemove) != null) || r) ? !1 : i === "desc" ? "asc" : "desc" : l;
1548
- }, e.getCanSort = () => {
1549
- var t, n;
1550
- return ((t = e.columnDef.enableSorting) != null ? t : !0) && ((n = o.options.enableSorting) != null ? n : !0) && !!e.accessorFn;
1551
- }, e.getCanMultiSort = () => {
1552
- var t, n;
1553
- return (t = (n = e.columnDef.enableMultiSort) != null ? n : o.options.enableMultiSort) != null ? t : !!e.accessorFn;
1554
- }, e.getIsSorted = () => {
1555
- var t;
1556
- const n = (t = o.getState().sorting) == null ? void 0 : t.find((r) => r.id === e.id);
1557
- return n ? n.desc ? "desc" : "asc" : !1;
1558
- }, e.getSortIndex = () => {
1559
- var t, n;
1560
- return (t = (n = o.getState().sorting) == null ? void 0 : n.findIndex((r) => r.id === e.id)) != null ? t : -1;
1561
- }, e.clearSorting = () => {
1562
- o.setSorting((t) => t != null && t.length ? t.filter((n) => n.id !== e.id) : []);
1563
- }, e.getToggleSortingHandler = () => {
1564
- const t = e.getCanSort();
1565
- return (n) => {
1566
- t && (n.persist == null || n.persist(), e.toggleSorting == null || e.toggleSorting(void 0, e.getCanMultiSort() ? o.options.isMultiSortEvent == null ? void 0 : o.options.isMultiSortEvent(n) : !1));
1567
- };
1568
- };
1569
- },
1570
- createTable: (e) => {
1571
- e.setSorting = (o) => e.options.onSortingChange == null ? void 0 : e.options.onSortingChange(o), e.resetSorting = (o) => {
1572
- var t, n;
1573
- e.setSorting(o ? [] : (t = (n = e.initialState) == null ? void 0 : n.sorting) != null ? t : []);
1574
- }, e.getPreSortedRowModel = () => e.getGroupedRowModel(), e.getSortedRowModel = () => (!e._getSortedRowModel && e.options.getSortedRowModel && (e._getSortedRowModel = e.options.getSortedRowModel(e)), e.options.manualSorting || !e._getSortedRowModel ? e.getPreSortedRowModel() : e._getSortedRowModel());
1575
- }
1576
- }, jt = [
1577
- ct,
1578
- Nt,
1579
- $t,
1580
- Vt,
1581
- ft,
1582
- pt,
1583
- Dt,
1584
- //depends on ColumnFaceting
1585
- Et,
1586
- //depends on ColumnFiltering
1587
- qt,
1588
- Ft,
1589
- //depends on RowSorting
1590
- At,
1591
- Ht,
1592
- Gt,
1593
- Lt,
1594
- Pt
1595
- ];
1596
- function Ut(e) {
1597
- var o, t;
1598
- process.env.NODE_ENV !== "production" && (e.debugAll || e.debugTable) && console.info("Creating Table Instance...");
1599
- const n = [...jt, ...(o = e._features) != null ? o : []];
1600
- let r = {
1601
- _features: n
1602
- };
1603
- const l = r._features.reduce((g, s) => Object.assign(g, s.getDefaultOptions == null ? void 0 : s.getDefaultOptions(r)), {}), i = (g) => r.options.mergeOptions ? r.options.mergeOptions(l, g) : {
1604
- ...l,
1605
- ...g
1606
- };
1607
- let u = {
1608
- ...{},
1609
- ...(t = e.initialState) != null ? t : {}
1610
- };
1611
- r._features.forEach((g) => {
1612
- var s;
1613
- u = (s = g.getInitialState == null ? void 0 : g.getInitialState(u)) != null ? s : u;
1614
- });
1615
- const d = [];
1616
- let f = !1;
1617
- const p = {
1618
- _features: n,
1619
- options: {
1620
- ...l,
1621
- ...e
1622
- },
1623
- initialState: u,
1624
- _queue: (g) => {
1625
- d.push(g), f || (f = !0, Promise.resolve().then(() => {
1626
- for (; d.length; )
1627
- d.shift()();
1628
- f = !1;
1629
- }).catch((s) => setTimeout(() => {
1630
- throw s;
1631
- })));
1632
- },
1633
- reset: () => {
1634
- r.setState(r.initialState);
1635
- },
1636
- setOptions: (g) => {
1637
- const s = G(g, r.options);
1638
- r.options = i(s);
1639
- },
1640
- getState: () => r.options.state,
1641
- setState: (g) => {
1642
- r.options.onStateChange == null || r.options.onStateChange(g);
1643
- },
1644
- _getRowId: (g, s, m) => {
1645
- var h;
1646
- return (h = r.options.getRowId == null ? void 0 : r.options.getRowId(g, s, m)) != null ? h : `${m ? [m.id, s].join(".") : s}`;
1647
- },
1648
- getCoreRowModel: () => (r._getCoreRowModel || (r._getCoreRowModel = r.options.getCoreRowModel(r)), r._getCoreRowModel()),
1649
- // The final calls start at the bottom of the model,
1650
- // expanded rows, which then work their way up
1651
- getRowModel: () => r.getPaginationRowModel(),
1652
- //in next version, we should just pass in the row model as the optional 2nd arg
1653
- getRow: (g, s) => {
1654
- let m = (s ? r.getPrePaginationRowModel() : r.getRowModel()).rowsById[g];
1655
- if (!m && (m = r.getCoreRowModel().rowsById[g], !m))
1656
- throw process.env.NODE_ENV !== "production" ? new Error(`getRow could not find row with ID: ${g}`) : new Error();
1657
- return m;
1658
- },
1659
- _getDefaultColumnDef: S(() => [r.options.defaultColumn], (g) => {
1660
- var s;
1661
- return g = (s = g) != null ? s : {}, {
1662
- header: (m) => {
1663
- const h = m.header.column.columnDef;
1664
- return h.accessorKey ? h.accessorKey : h.accessorFn ? h.id : null;
1665
- },
1666
- // footer: props => props.header.column.id,
1667
- cell: (m) => {
1668
- var h, v;
1669
- return (h = (v = m.renderValue()) == null || v.toString == null ? void 0 : v.toString()) != null ? h : null;
1670
- },
1671
- ...r._features.reduce((m, h) => Object.assign(m, h.getDefaultColumnDef == null ? void 0 : h.getDefaultColumnDef()), {}),
1672
- ...g
1673
- };
1674
- }, w(e, "debugColumns", "_getDefaultColumnDef")),
1675
- _getColumnDefs: () => r.options.columns,
1676
- getAllColumns: S(() => [r._getColumnDefs()], (g) => {
1677
- const s = function(m, h, v) {
1678
- return v === void 0 && (v = 0), m.map((R) => {
1679
- const $ = gt(r, R, v, h), V = R;
1680
- return $.columns = V.columns ? s(V.columns, $, v + 1) : [], $;
1681
- });
1682
- };
1683
- return s(g);
1684
- }, w(e, "debugColumns", "getAllColumns")),
1685
- getAllFlatColumns: S(() => [r.getAllColumns()], (g) => g.flatMap((s) => s.getFlatColumns()), w(e, "debugColumns", "getAllFlatColumns")),
1686
- _getAllFlatColumnsById: S(() => [r.getAllFlatColumns()], (g) => g.reduce((s, m) => (s[m.id] = m, s), {}), w(e, "debugColumns", "getAllFlatColumnsById")),
1687
- getAllLeafColumns: S(() => [r.getAllColumns(), r._getOrderColumnsFn()], (g, s) => {
1688
- let m = g.flatMap((h) => h.getLeafColumns());
1689
- return s(m);
1690
- }, w(e, "debugColumns", "getAllLeafColumns")),
1691
- getColumn: (g) => {
1692
- const s = r._getAllFlatColumnsById()[g];
1693
- return process.env.NODE_ENV !== "production" && !s && console.error(`[Table] Column with id '${g}' does not exist.`), s;
1694
- }
1695
- };
1696
- Object.assign(r, p);
1697
- for (let g = 0; g < r._features.length; g++) {
1698
- const s = r._features[g];
1699
- s == null || s.createTable == null || s.createTable(r);
1700
- }
1701
- return r;
1702
- }
1703
- function Xt() {
1704
- return (e) => S(() => [e.options.data], (o) => {
1705
- const t = {
1706
- rows: [],
1707
- flatRows: [],
1708
- rowsById: {}
1709
- }, n = function(r, l, i) {
1710
- l === void 0 && (l = 0);
1711
- const a = [];
1712
- for (let d = 0; d < r.length; d++) {
1713
- const f = fe(e, e._getRowId(r[d], d, i), r[d], d, l, void 0, i == null ? void 0 : i.id);
1714
- if (t.flatRows.push(f), t.rowsById[f.id] = f, a.push(f), e.options.getSubRows) {
1715
- var u;
1716
- f.originalSubRows = e.options.getSubRows(r[d], d), (u = f.originalSubRows) != null && u.length && (f.subRows = n(f.originalSubRows, l + 1, f));
1717
- }
1718
- }
1719
- return a;
1720
- };
1721
- return t.rows = n(o), t;
1722
- }, w(e.options, "debugTable", "getRowModel", () => e._autoResetPageIndex()));
1723
- }
1724
- function Kt(e) {
1725
- const o = [], t = (n) => {
1726
- var r;
1727
- o.push(n), (r = n.subRows) != null && r.length && n.getIsExpanded() && n.subRows.forEach(t);
1728
- };
1729
- return e.rows.forEach(t), {
1730
- rows: o,
1731
- flatRows: e.flatRows,
1732
- rowsById: e.rowsById
1733
- };
1734
- }
1735
- function Qt(e, o, t) {
1736
- return t.options.filterFromLeafRows ? Zt(e, o, t) : Jt(e, o, t);
1737
- }
1738
- function Zt(e, o, t) {
1739
- var n;
1740
- const r = [], l = {}, i = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, a = function(u, d) {
1741
- d === void 0 && (d = 0);
1742
- const f = [];
1743
- for (let g = 0; g < u.length; g++) {
1744
- var p;
1745
- let s = u[g];
1746
- const m = fe(t, s.id, s.original, s.index, s.depth, void 0, s.parentId);
1747
- if (m.columnFilters = s.columnFilters, (p = s.subRows) != null && p.length && d < i) {
1748
- if (m.subRows = a(s.subRows, d + 1), s = m, o(s) && !m.subRows.length) {
1749
- f.push(s), l[s.id] = s, r.push(s);
1750
- continue;
1751
- }
1752
- if (o(s) || m.subRows.length) {
1753
- f.push(s), l[s.id] = s, r.push(s);
1754
- continue;
1755
- }
1756
- } else
1757
- s = m, o(s) && (f.push(s), l[s.id] = s, r.push(s));
1758
- }
1759
- return f;
1760
- };
1761
- return {
1762
- rows: a(e),
1763
- flatRows: r,
1764
- rowsById: l
1765
- };
1766
- }
1767
- function Jt(e, o, t) {
1768
- var n;
1769
- const r = [], l = {}, i = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, a = function(u, d) {
1770
- d === void 0 && (d = 0);
1771
- const f = [];
1772
- for (let g = 0; g < u.length; g++) {
1773
- let s = u[g];
1774
- if (o(s)) {
1775
- var p;
1776
- if ((p = s.subRows) != null && p.length && d < i) {
1777
- const h = fe(t, s.id, s.original, s.index, s.depth, void 0, s.parentId);
1778
- h.subRows = a(s.subRows, d + 1), s = h;
1779
- }
1780
- f.push(s), r.push(s), l[s.id] = s;
1781
- }
1782
- }
1783
- return f;
1784
- };
1785
- return {
1786
- rows: a(e),
1787
- flatRows: r,
1788
- rowsById: l
1789
- };
1790
- }
1791
- function Wt() {
1792
- return (e) => S(() => [e.getPreFilteredRowModel(), e.getState().columnFilters, e.getState().globalFilter], (o, t, n) => {
1793
- if (!o.rows.length || !(t != null && t.length) && !n) {
1794
- for (let g = 0; g < o.flatRows.length; g++)
1795
- o.flatRows[g].columnFilters = {}, o.flatRows[g].columnFiltersMeta = {};
1796
- return o;
1797
- }
1798
- const r = [], l = [];
1799
- (t ?? []).forEach((g) => {
1800
- var s;
1801
- const m = e.getColumn(g.id);
1802
- if (!m)
1803
- return;
1804
- const h = m.getFilterFn();
1805
- if (!h) {
1806
- process.env.NODE_ENV !== "production" && console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${m.id}.`);
1807
- return;
1808
- }
1809
- r.push({
1810
- id: g.id,
1811
- filterFn: h,
1812
- resolvedValue: (s = h.resolveFilterValue == null ? void 0 : h.resolveFilterValue(g.value)) != null ? s : g.value
1813
- });
1814
- });
1815
- const i = (t ?? []).map((g) => g.id), a = e.getGlobalFilterFn(), u = e.getAllLeafColumns().filter((g) => g.getCanGlobalFilter());
1816
- n && a && u.length && (i.push("__global__"), u.forEach((g) => {
1817
- var s;
1818
- l.push({
1819
- id: g.id,
1820
- filterFn: a,
1821
- resolvedValue: (s = a.resolveFilterValue == null ? void 0 : a.resolveFilterValue(n)) != null ? s : n
1822
- });
1823
- }));
1824
- let d, f;
1825
- for (let g = 0; g < o.flatRows.length; g++) {
1826
- const s = o.flatRows[g];
1827
- if (s.columnFilters = {}, r.length)
1828
- for (let m = 0; m < r.length; m++) {
1829
- d = r[m];
1830
- const h = d.id;
1831
- s.columnFilters[h] = d.filterFn(s, h, d.resolvedValue, (v) => {
1832
- s.columnFiltersMeta[h] = v;
1833
- });
1834
- }
1835
- if (l.length) {
1836
- for (let m = 0; m < l.length; m++) {
1837
- f = l[m];
1838
- const h = f.id;
1839
- if (f.filterFn(s, h, f.resolvedValue, (v) => {
1840
- s.columnFiltersMeta[h] = v;
1841
- })) {
1842
- s.columnFilters.__global__ = !0;
1843
- break;
1844
- }
1845
- }
1846
- s.columnFilters.__global__ !== !0 && (s.columnFilters.__global__ = !1);
1847
- }
1848
- }
1849
- const p = (g) => {
1850
- for (let s = 0; s < i.length; s++)
1851
- if (g.columnFilters[i[s]] === !1)
1852
- return !1;
1853
- return !0;
1854
- };
1855
- return Qt(o.rows, p, e);
1856
- }, w(e.options, "debugTable", "getFilteredRowModel", () => e._autoResetPageIndex()));
1857
- }
1858
- function Yt(e) {
1859
- return (o) => S(() => [o.getState().pagination, o.getPrePaginationRowModel(), o.options.paginateExpandedRows ? void 0 : o.getState().expanded], (t, n) => {
1860
- if (!n.rows.length)
1861
- return n;
1862
- const {
1863
- pageSize: r,
1864
- pageIndex: l
1865
- } = t;
1866
- let {
1867
- rows: i,
1868
- flatRows: a,
1869
- rowsById: u
1870
- } = n;
1871
- const d = r * l, f = d + r;
1872
- i = i.slice(d, f);
1873
- let p;
1874
- o.options.paginateExpandedRows ? p = {
1875
- rows: i,
1876
- flatRows: a,
1877
- rowsById: u
1878
- } : p = Kt({
1879
- rows: i,
1880
- flatRows: a,
1881
- rowsById: u
1882
- }), p.flatRows = [];
1883
- const g = (s) => {
1884
- p.flatRows.push(s), s.subRows.length && s.subRows.forEach(g);
1885
- };
1886
- return p.rows.forEach(g), p;
1887
- }, w(o.options, "debugTable", "getPaginationRowModel"));
1888
- }
1889
- function en() {
1890
- return (e) => S(() => [e.getState().sorting, e.getPreSortedRowModel()], (o, t) => {
1891
- if (!t.rows.length || !(o != null && o.length))
1892
- return t;
1893
- const n = e.getState().sorting, r = [], l = n.filter((u) => {
1894
- var d;
1895
- return (d = e.getColumn(u.id)) == null ? void 0 : d.getCanSort();
1896
- }), i = {};
1897
- l.forEach((u) => {
1898
- const d = e.getColumn(u.id);
1899
- d && (i[u.id] = {
1900
- sortUndefined: d.columnDef.sortUndefined,
1901
- invertSorting: d.columnDef.invertSorting,
1902
- sortingFn: d.getSortingFn()
1903
- });
1904
- });
1905
- const a = (u) => {
1906
- const d = u.map((f) => ({
1907
- ...f
1908
- }));
1909
- return d.sort((f, p) => {
1910
- for (let s = 0; s < l.length; s += 1) {
1911
- var g;
1912
- const m = l[s], h = i[m.id], v = h.sortUndefined, R = (g = m == null ? void 0 : m.desc) != null ? g : !1;
1913
- let $ = 0;
1914
- if (v) {
1915
- const V = f.getValue(m.id), _ = p.getValue(m.id), P = V === void 0, A = _ === void 0;
1916
- if (P || A) {
1917
- if (v === "first") return P ? -1 : 1;
1918
- if (v === "last") return P ? 1 : -1;
1919
- $ = P && A ? 0 : P ? v : -v;
1920
- }
1921
- }
1922
- if ($ === 0 && ($ = h.sortingFn(f, p, m.id)), $ !== 0)
1923
- return R && ($ *= -1), h.invertSorting && ($ *= -1), $;
1924
- }
1925
- return f.index - p.index;
1926
- }), d.forEach((f) => {
1927
- var p;
1928
- r.push(f), (p = f.subRows) != null && p.length && (f.subRows = a(f.subRows));
1929
- }), d;
1930
- };
1931
- return {
1932
- rows: a(t.rows),
1933
- flatRows: r,
1934
- rowsById: t.rowsById
1935
- };
1936
- }, w(e.options, "debugTable", "getSortedRowModel", () => e._autoResetPageIndex()));
1937
- }
1938
- /**
1939
- * react-table
1940
- *
1941
- * Copyright (c) TanStack
1942
- *
1943
- * This source code is licensed under the MIT license found in the
1944
- * LICENSE.md file in the root directory of this source tree.
1945
- *
1946
- * @license MIT
1947
- */
1948
- function ve(e, o) {
1949
- return e ? tn(e) ? /* @__PURE__ */ F.createElement(e, o) : e : null;
1950
- }
1951
- function tn(e) {
1952
- return nn(e) || typeof e == "function" || on(e);
1953
- }
1954
- function nn(e) {
1955
- return typeof e == "function" && (() => {
1956
- const o = Object.getPrototypeOf(e);
1957
- return o.prototype && o.prototype.isReactComponent;
1958
- })();
1959
- }
1960
- function on(e) {
1961
- return typeof e == "object" && typeof e.$$typeof == "symbol" && ["react.memo", "react.forward_ref"].includes(e.$$typeof.description);
1962
- }
1963
- function rn(e) {
1964
- const o = {
1965
- state: {},
1966
- // Dummy state
1967
- onStateChange: () => {
1968
- },
1969
- // noop
1970
- renderFallbackValue: null,
1971
- ...e
1972
- }, [t] = F.useState(() => ({
1973
- current: Ut(o)
1974
- })), [n, r] = F.useState(() => t.current.initialState);
1975
- return t.current.setOptions((l) => ({
1976
- ...l,
1977
- ...e,
1978
- state: {
1979
- ...n,
1980
- ...e.state
1981
- },
1982
- // Similarly, we'll maintain both our internal state and any user-provided
1983
- // state.
1984
- onStateChange: (i) => {
1985
- r(i), e.onStateChange == null || e.onStateChange(i);
1986
- }
1987
- })), t.current;
1988
- }
1989
- const Be = F.forwardRef(
1990
- ({ className: e, ...o }, t) => /* @__PURE__ */ c("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ c("table", { ref: t, className: y("w-full caption-bottom text-sm", e), ...o }) })
1991
- );
1992
- Be.displayName = "Table";
1993
- const be = F.forwardRef(({ className: e, ...o }, t) => /* @__PURE__ */ c("thead", { ref: t, className: y("[&_tr]:border-b", e), ...o }));
1994
- be.displayName = "TableHeader";
1995
- const qe = F.forwardRef(({ className: e, ...o }, t) => /* @__PURE__ */ c("tbody", { ref: t, className: y("[&_tr:last-child]:border-0", e), ...o }));
1996
- qe.displayName = "TableBody";
1997
- const ln = F.forwardRef(({ className: e, ...o }, t) => /* @__PURE__ */ c(
1998
- "tfoot",
1999
- {
2000
- ref: t,
2001
- className: y("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", e),
2002
- ...o
2003
- }
2004
- ));
2005
- ln.displayName = "TableFooter";
2006
- const X = F.forwardRef(
2007
- ({ className: e, ...o }, t) => /* @__PURE__ */ c(
2008
- "tr",
2009
- {
2010
- ref: t,
2011
- className: y(
2012
- "border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
2013
- e
2014
- ),
2015
- ...o
2016
- }
2017
- )
2018
- );
2019
- X.displayName = "TableRow";
2020
- const je = F.forwardRef(({ className: e, ...o }, t) => /* @__PURE__ */ c(
2021
- "th",
2022
- {
2023
- ref: t,
2024
- className: y(
2025
- "h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",
2026
- e
2027
- ),
2028
- ...o
2029
- }
2030
- ));
2031
- je.displayName = "TableHead";
2032
- const ge = F.forwardRef(({ className: e, ...o }, t) => /* @__PURE__ */ c(
2033
- "td",
2034
- {
2035
- ref: t,
2036
- className: y("p-4 align-middle [&:has([role=checkbox])]:pr-0", e),
2037
- ...o
2038
- }
2039
- ));
2040
- ge.displayName = "TableCell";
2041
- const sn = F.forwardRef(({ className: e, ...o }, t) => /* @__PURE__ */ c("caption", { ref: t, className: y("mt-4 text-sm text-muted-foreground", e), ...o }));
2042
- sn.displayName = "TableCaption";
2043
- const an = [10, 20, 30, 40, 50];
2044
- function Dn({
2045
- columns: e,
2046
- data: o,
2047
- searchKey: t,
2048
- searchPlaceholder: n = "Search...",
2049
- showColumnToggle: r = !0,
2050
- showPagination: l = !0,
2051
- showRowSelection: i = !1,
2052
- pageSize: a = 10,
2053
- pageSizeOptions: u = an,
2054
- onRowClick: d,
2055
- className: f
2056
- }) {
2057
- var P, A;
2058
- const [p, g] = F.useState([]), [s, m] = F.useState([]), [h, v] = F.useState({}), [R, $] = F.useState({}), V = F.useMemo(() => i ? [
2059
- {
2060
- id: "select",
2061
- header: ({ table: x }) => /* @__PURE__ */ c(
2062
- Q,
2063
- {
2064
- checked: x.getIsAllPageRowsSelected() || x.getIsSomePageRowsSelected() && "indeterminate",
2065
- onCheckedChange: (M) => x.toggleAllPageRowsSelected(!!M),
2066
- "aria-label": "Select all"
2067
- }
2068
- ),
2069
- cell: ({ row: x }) => /* @__PURE__ */ c(
2070
- Q,
2071
- {
2072
- checked: x.getIsSelected(),
2073
- onCheckedChange: (M) => x.toggleSelected(!!M),
2074
- "aria-label": "Select row"
2075
- }
2076
- ),
2077
- enableSorting: !1,
2078
- enableHiding: !1
2079
- },
2080
- ...e
2081
- ] : e, [e, i]), _ = rn({
2082
- data: o,
2083
- columns: V,
2084
- onSortingChange: g,
2085
- onColumnFiltersChange: m,
2086
- getCoreRowModel: Xt(),
2087
- getPaginationRowModel: Yt(),
2088
- getSortedRowModel: en(),
2089
- getFilteredRowModel: Wt(),
2090
- onColumnVisibilityChange: v,
2091
- onRowSelectionChange: $,
2092
- initialState: {
2093
- pagination: {
2094
- pageSize: a
2095
- }
2096
- },
2097
- state: {
2098
- sorting: p,
2099
- columnFilters: s,
2100
- columnVisibility: h,
2101
- rowSelection: R
2102
- }
2103
- });
2104
- return /* @__PURE__ */ C("div", { className: y("w-full", f), children: [
2105
- /* @__PURE__ */ C("div", { className: "flex items-center gap-4 py-4", children: [
2106
- t && /* @__PURE__ */ c(
2107
- Qe,
2108
- {
2109
- placeholder: n,
2110
- value: ((P = _.getColumn(t)) == null ? void 0 : P.getFilterValue()) ?? "",
2111
- onChange: (x) => {
2112
- var M;
2113
- return (M = _.getColumn(t)) == null ? void 0 : M.setFilterValue(x.target.value);
2114
- },
2115
- className: "max-w-sm"
2116
- }
2117
- ),
2118
- r && /* @__PURE__ */ C(O, { children: [
2119
- /* @__PURE__ */ c(T, { asChild: !0, children: /* @__PURE__ */ C(N, { variant: "outline", className: "ml-auto", children: [
2120
- "Columns ",
2121
- /* @__PURE__ */ c(Pe, { className: "ml-2 h-4 w-4" })
2122
- ] }) }),
2123
- /* @__PURE__ */ c(B, { align: "end", children: _.getAllColumns().filter((x) => x.getCanHide()).map((x) => /* @__PURE__ */ c(
2124
- xe,
2125
- {
2126
- className: "capitalize",
2127
- checked: x.getIsVisible(),
2128
- onCheckedChange: (M) => x.toggleVisibility(!!M),
2129
- children: x.id
2130
- },
2131
- x.id
2132
- )) })
2133
- ] })
2134
- ] }),
2135
- /* @__PURE__ */ c("div", { className: "rounded-md border", children: /* @__PURE__ */ C(Be, { children: [
2136
- /* @__PURE__ */ c(be, { children: _.getHeaderGroups().map((x) => /* @__PURE__ */ c(X, { children: x.headers.map((M) => /* @__PURE__ */ c(je, { children: M.isPlaceholder ? null : ve(M.column.columnDef.header, M.getContext()) }, M.id)) }, x.id)) }),
2137
- /* @__PURE__ */ c(qe, { children: (A = _.getRowModel().rows) != null && A.length ? _.getRowModel().rows.map((x) => /* @__PURE__ */ c(
2138
- X,
2139
- {
2140
- "data-state": x.getIsSelected() && "selected",
2141
- onClick: () => d == null ? void 0 : d(x.original),
2142
- className: d ? "cursor-pointer" : "",
2143
- children: x.getVisibleCells().map((M) => /* @__PURE__ */ c(ge, { children: ve(M.column.columnDef.cell, M.getContext()) }, M.id))
2144
- },
2145
- x.id
2146
- )) : /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(ge, { colSpan: V.length, className: "h-24 text-center", children: "No results." }) }) })
2147
- ] }) }),
2148
- l && /* @__PURE__ */ C("div", { className: "flex items-center justify-between space-x-2 py-4", children: [
2149
- /* @__PURE__ */ c("div", { className: "flex-1 text-sm text-muted-foreground", children: i && /* @__PURE__ */ C(J, { children: [
2150
- _.getFilteredSelectedRowModel().rows.length,
2151
- " of",
2152
- " ",
2153
- _.getFilteredRowModel().rows.length,
2154
- " row(s) selected."
2155
- ] }) }),
2156
- /* @__PURE__ */ C("div", { className: "flex items-center space-x-6 lg:space-x-8", children: [
2157
- /* @__PURE__ */ C("div", { className: "flex items-center space-x-2", children: [
2158
- /* @__PURE__ */ c("p", { className: "text-sm font-medium", children: "Rows per page" }),
2159
- /* @__PURE__ */ C(
2160
- Fe,
2161
- {
2162
- value: `${_.getState().pagination.pageSize}`,
2163
- onValueChange: (x) => {
2164
- _.setPageSize(Number(x));
2165
- },
2166
- children: [
2167
- /* @__PURE__ */ c(ye, { size: "sm", width: "sm", children: /* @__PURE__ */ c($e, { placeholder: _.getState().pagination.pageSize }) }),
2168
- /* @__PURE__ */ c(Ve, { side: "top", children: u.map((x) => /* @__PURE__ */ c(Me, { value: `${x}`, children: x }, x)) })
2169
- ]
2170
- }
2171
- )
2172
- ] }),
2173
- /* @__PURE__ */ C("div", { className: "flex w-[100px] items-center justify-center text-sm font-medium", children: [
2174
- "Page ",
2175
- _.getState().pagination.pageIndex + 1,
2176
- " of ",
2177
- _.getPageCount()
2178
- ] }),
2179
- /* @__PURE__ */ C("div", { className: "flex items-center space-x-2", children: [
2180
- /* @__PURE__ */ c(
2181
- N,
2182
- {
2183
- variant: "outline",
2184
- size: "sm",
2185
- onClick: () => _.previousPage(),
2186
- disabled: !_.getCanPreviousPage(),
2187
- children: "Previous"
2188
- }
2189
- ),
2190
- /* @__PURE__ */ c(
2191
- N,
2192
- {
2193
- variant: "outline",
2194
- size: "sm",
2195
- onClick: () => _.nextPage(),
2196
- disabled: !_.getCanNextPage(),
2197
- children: "Next"
2198
- }
2199
- )
2200
- ] })
2201
- ] })
2202
- ] })
2203
- ] });
2204
- }
2205
- function En(e) {
2206
- return ({ column: o }) => /* @__PURE__ */ C(
2207
- N,
2208
- {
2209
- variant: "ghost",
2210
- onClick: () => o.toggleSorting(o.getIsSorted() === "asc"),
2211
- children: [
2212
- e,
2213
- /* @__PURE__ */ c(ot, { className: "ml-2 h-4 w-4" })
2214
- ]
2215
- }
2216
- );
2217
- }
2218
- function An(e) {
2219
- return ({ row: o }) => /* @__PURE__ */ C(O, { children: [
2220
- /* @__PURE__ */ c(T, { asChild: !0, children: /* @__PURE__ */ C(N, { variant: "ghost", className: "h-8 w-8 p-0", children: [
2221
- /* @__PURE__ */ c("span", { className: "sr-only", children: "Open menu" }),
2222
- /* @__PURE__ */ c(Ie, { className: "h-4 w-4" })
2223
- ] }) }),
2224
- /* @__PURE__ */ C(B, { align: "end", children: [
2225
- /* @__PURE__ */ c(ce, { children: "Actions" }),
2226
- /* @__PURE__ */ c(Z, {}),
2227
- e.map((t, n) => /* @__PURE__ */ C(_e, { onClick: () => t.onClick(o.original), children: [
2228
- t.icon && /* @__PURE__ */ c("span", { className: "mr-2", children: t.icon }),
2229
- t.label
2230
- ] }, n))
2231
- ] })
2232
- ] });
2233
- }
2234
- const un = F.forwardRef(
2235
- ({ className: e, title: o, value: t, description: n, trend: r, icon: l, loading: i = !1, ...a }, u) => {
2236
- const d = (r == null ? void 0 : r.direction) || (r != null && r.value && r.value > 0 ? "up" : r != null && r.value && r.value < 0 ? "down" : "neutral"), f = d === "up" ? We : d === "down" ? st : Ye, p = d === "up" ? "text-success" : d === "down" ? "text-destructive" : "text-muted-foreground";
2237
- return /* @__PURE__ */ C(Ne, { ref: u, className: y("", e), ...a, children: [
2238
- /* @__PURE__ */ C(Ze, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
2239
- /* @__PURE__ */ c(Je, { className: "text-sm font-medium", children: o }),
2240
- l && /* @__PURE__ */ c("div", { className: "text-muted-foreground", children: l })
2241
- ] }),
2242
- /* @__PURE__ */ c(De, { children: i ? /* @__PURE__ */ C("div", { className: "space-y-2", children: [
2243
- /* @__PURE__ */ c("div", { className: "h-8 w-24 animate-pulse rounded bg-muted" }),
2244
- /* @__PURE__ */ c("div", { className: "h-4 w-32 animate-pulse rounded bg-muted" })
2245
- ] }) : /* @__PURE__ */ C(J, { children: [
2246
- /* @__PURE__ */ c("div", { className: "text-2xl font-bold", children: t }),
2247
- (n || r) && /* @__PURE__ */ C("div", { className: "flex items-center gap-2 text-xs text-muted-foreground", children: [
2248
- r && /* @__PURE__ */ C("span", { className: y("flex items-center gap-1", p), children: [
2249
- /* @__PURE__ */ c(f, { className: "h-3 w-3" }),
2250
- Math.abs(r.value),
2251
- "%",
2252
- r.label && /* @__PURE__ */ c("span", { children: r.label })
2253
- ] }),
2254
- n && /* @__PURE__ */ c("span", { children: n })
2255
- ] })
2256
- ] }) })
2257
- ] });
2258
- }
2259
- );
2260
- un.displayName = "KPICard";
2261
- const dn = F.forwardRef(
2262
- ({ className: e, title: o, value: t, subtitle: n, icon: r, iconBackground: l = "bg-primary/10", loading: i = !1, ...a }, u) => /* @__PURE__ */ c(Ne, { ref: u, className: y("", e), ...a, children: /* @__PURE__ */ C(De, { className: "flex items-center gap-4 p-6", children: [
2263
- r && /* @__PURE__ */ c("div", { className: y("flex h-12 w-12 items-center justify-center rounded-full", l), children: r }),
2264
- /* @__PURE__ */ c("div", { className: "flex-1", children: i ? /* @__PURE__ */ C("div", { className: "space-y-2", children: [
2265
- /* @__PURE__ */ c("div", { className: "h-4 w-20 animate-pulse rounded bg-muted" }),
2266
- /* @__PURE__ */ c("div", { className: "h-6 w-16 animate-pulse rounded bg-muted" })
2267
- ] }) : /* @__PURE__ */ C(J, { children: [
2268
- /* @__PURE__ */ c("p", { className: "text-sm font-medium text-muted-foreground", children: o }),
2269
- /* @__PURE__ */ c("p", { className: "text-2xl font-bold", children: t }),
2270
- n && /* @__PURE__ */ c("p", { className: "text-xs text-muted-foreground", children: n })
2271
- ] }) })
2272
- ] }) })
2273
- );
2274
- dn.displayName = "StatCard";
2275
- const gn = F.forwardRef(
2276
- ({ className: e, icon: o, title: t, description: n, action: r, ...l }, i) => /* @__PURE__ */ C(
2277
- "div",
2278
- {
2279
- ref: i,
2280
- className: y(
2281
- "flex min-h-[400px] flex-col items-center justify-center rounded-lg border border-dashed p-8 text-center",
2282
- e
2283
- ),
2284
- ...l,
2285
- children: [
2286
- o && /* @__PURE__ */ c("div", { className: "mb-4 flex h-20 w-20 items-center justify-center rounded-full bg-muted", children: o }),
2287
- /* @__PURE__ */ c("h3", { className: "mb-2 text-lg font-semibold", children: t }),
2288
- n && /* @__PURE__ */ c("p", { className: "mb-6 max-w-sm text-sm text-muted-foreground", children: n }),
2289
- r && /* @__PURE__ */ c("div", { children: r })
2290
- ]
2291
- }
2292
- )
2293
- );
2294
- gn.displayName = "EmptyState";
2295
- const cn = F.forwardRef(
2296
- ({ className: e, items: o, ...t }, n) => /* @__PURE__ */ c("div", { ref: n, className: y("relative space-y-0", e), ...t, children: o.map((r, l) => /* @__PURE__ */ C("div", { className: "relative pb-8 last:pb-0", children: [
2297
- l !== o.length - 1 && /* @__PURE__ */ c(
2298
- "span",
2299
- {
2300
- className: "absolute left-4 top-4 -ml-px h-full w-0.5 bg-border",
2301
- "aria-hidden": "true"
2302
- }
2303
- ),
2304
- /* @__PURE__ */ C("div", { className: "relative flex items-start space-x-4", children: [
2305
- /* @__PURE__ */ c(
2306
- "div",
2307
- {
2308
- className: y(
2309
- "relative flex h-8 w-8 items-center justify-center rounded-full border-2",
2310
- r.status === "completed" && "border-primary bg-primary text-primary-foreground",
2311
- r.status === "current" && "border-primary bg-background",
2312
- r.status === "upcoming" && "border-muted bg-background",
2313
- !r.status && "border-muted bg-background"
2314
- ),
2315
- children: r.icon || /* @__PURE__ */ c(
2316
- "div",
2317
- {
2318
- className: y(
2319
- "h-2.5 w-2.5 rounded-full",
2320
- r.status === "completed" && "bg-primary-foreground",
2321
- r.status === "current" && "bg-primary",
2322
- r.status === "upcoming" && "bg-muted-foreground",
2323
- !r.status && "bg-muted-foreground"
2324
- )
2325
- }
2326
- )
2327
- }
2328
- ),
2329
- /* @__PURE__ */ C("div", { className: "min-w-0 flex-1 pt-1", children: [
2330
- /* @__PURE__ */ C("div", { className: "flex items-center justify-between", children: [
2331
- /* @__PURE__ */ c(
2332
- "p",
2333
- {
2334
- className: y(
2335
- "text-sm font-medium",
2336
- r.status === "upcoming" && "text-muted-foreground"
2337
- ),
2338
- children: r.title
2339
- }
2340
- ),
2341
- r.date && /* @__PURE__ */ c("time", { className: "text-xs text-muted-foreground", children: r.date })
2342
- ] }),
2343
- r.description && /* @__PURE__ */ c("p", { className: "mt-1 text-sm text-muted-foreground", children: r.description })
2344
- ] })
2345
- ] })
2346
- ] }, r.id)) })
2347
- );
2348
- cn.displayName = "Timeline";
2349
- const fn = F.forwardRef(
2350
- ({ className: e, items: o, showAvatar: t = !0, ...n }, r) => /* @__PURE__ */ c("div", { ref: r, className: y("space-y-4", e), ...n, children: o.map((l) => /* @__PURE__ */ C("div", { className: "flex gap-4", children: [
2351
- t && /* @__PURE__ */ C(et, { className: "h-8 w-8", children: [
2352
- l.user.avatar && /* @__PURE__ */ c(tt, { src: l.user.avatar, alt: l.user.name }),
2353
- /* @__PURE__ */ c(nt, { children: l.user.initials || l.user.name.charAt(0).toUpperCase() })
2354
- ] }),
2355
- /* @__PURE__ */ C("div", { className: "flex-1 space-y-1", children: [
2356
- /* @__PURE__ */ C("p", { className: "text-sm", children: [
2357
- /* @__PURE__ */ c("span", { className: "font-medium", children: l.user.name }),
2358
- " ",
2359
- /* @__PURE__ */ c("span", { className: "text-muted-foreground", children: l.action }),
2360
- l.target && /* @__PURE__ */ C("span", { className: "font-medium", children: [
2361
- " ",
2362
- l.target
2363
- ] })
2364
- ] }),
2365
- /* @__PURE__ */ c("p", { className: "text-xs text-muted-foreground", children: l.timestamp })
2366
- ] }),
2367
- l.icon && /* @__PURE__ */ c("div", { className: "text-muted-foreground", children: l.icon })
2368
- ] }, l.id)) })
2369
- );
2370
- fn.displayName = "ActivityFeed";
2371
- const pn = F.forwardRef(
2372
- ({ columns: e, onChange: o, showSelectAll: t = !0, maxHeight: n = 300, className: r }, l) => {
2373
- const i = e.filter((p) => p.visible).length, a = e.length, u = (p) => {
2374
- const g = e.map(
2375
- (s) => s.id === p && !s.locked ? { ...s, visible: !s.visible } : s
2376
- );
2377
- o(g);
2378
- }, d = () => {
2379
- const p = e.every((s) => s.visible || s.locked), g = e.map(
2380
- (s) => s.locked ? s : { ...s, visible: !p }
2381
- );
2382
- o(g);
2383
- }, f = () => {
2384
- const p = e.map((g) => ({ ...g, visible: !0 }));
2385
- o(p);
2386
- };
2387
- return /* @__PURE__ */ C(O, { children: [
2388
- /* @__PURE__ */ c(T, { asChild: !0, children: /* @__PURE__ */ C(N, { ref: l, variant: "outline", size: "sm", className: y("gap-2", r), children: [
2389
- /* @__PURE__ */ c(it, { className: "h-4 w-4" }),
2390
- /* @__PURE__ */ c("span", { children: "Columns" }),
2391
- /* @__PURE__ */ C("span", { className: "text-xs text-muted-foreground", children: [
2392
- "(",
2393
- i,
2394
- "/",
2395
- a,
2396
- ")"
2397
- ] })
2398
- ] }) }),
2399
- /* @__PURE__ */ C(B, { align: "end", className: "w-56", children: [
2400
- /* @__PURE__ */ C(ce, { className: "flex items-center justify-between", children: [
2401
- /* @__PURE__ */ c("span", { children: "Toggle Columns" }),
2402
- /* @__PURE__ */ c(N, { variant: "ghost", size: "sm", className: "h-auto p-1 text-xs", onClick: f, children: "Reset" })
2403
- ] }),
2404
- /* @__PURE__ */ c(Z, {}),
2405
- t && /* @__PURE__ */ C(J, { children: [
2406
- /* @__PURE__ */ C("div", { className: "flex items-center gap-2 px-2 py-1.5", children: [
2407
- /* @__PURE__ */ c(
2408
- Q,
2409
- {
2410
- id: "select-all",
2411
- checked: e.every((p) => p.visible || p.locked),
2412
- onCheckedChange: d
2413
- }
2414
- ),
2415
- /* @__PURE__ */ c(
2416
- "label",
2417
- {
2418
- htmlFor: "select-all",
2419
- className: "flex-1 cursor-pointer text-sm font-medium",
2420
- children: "Select All"
2421
- }
2422
- )
2423
- ] }),
2424
- /* @__PURE__ */ c(Z, {})
2425
- ] }),
2426
- /* @__PURE__ */ c(Ke, { style: { maxHeight: n }, children: /* @__PURE__ */ c("div", { className: "space-y-1 p-1", children: e.map((p) => /* @__PURE__ */ C(
2427
- "div",
2428
- {
2429
- className: y(
2430
- "flex items-center gap-2 rounded-md px-2 py-1.5 transition-colors hover:bg-muted",
2431
- p.locked && "opacity-50"
2432
- ),
2433
- children: [
2434
- /* @__PURE__ */ c(
2435
- Q,
2436
- {
2437
- id: p.id,
2438
- checked: p.visible,
2439
- onCheckedChange: () => u(p.id),
2440
- disabled: p.locked
2441
- }
2442
- ),
2443
- /* @__PURE__ */ C(
2444
- "label",
2445
- {
2446
- htmlFor: p.id,
2447
- className: y(
2448
- "flex flex-1 cursor-pointer items-center gap-2 text-sm",
2449
- p.locked && "cursor-not-allowed"
2450
- ),
2451
- children: [
2452
- p.visible ? /* @__PURE__ */ c(lt, { className: "h-3.5 w-3.5 text-muted-foreground" }) : /* @__PURE__ */ c(rt, { className: "h-3.5 w-3.5 text-muted-foreground" }),
2453
- p.label
2454
- ]
2455
- }
2456
- )
2457
- ]
2458
- },
2459
- p.id
2460
- )) }) })
2461
- ] })
2462
- ] });
2463
- }
2464
- );
2465
- pn.displayName = "ColumnVisibility";
2466
- const mn = F.forwardRef(
2467
- ({
2468
- selectedCount: e,
2469
- selectedIds: o,
2470
- onClearSelection: t,
2471
- actions: n,
2472
- maxVisibleActions: r = 3,
2473
- className: l
2474
- }, i) => {
2475
- if (e === 0) return null;
2476
- const a = n.slice(0, r), u = n.slice(r);
2477
- return /* @__PURE__ */ C(
2478
- "div",
2479
- {
2480
- ref: i,
2481
- className: y(
2482
- "flex items-center gap-2 rounded-lg border bg-muted/50 px-3 py-2",
2483
- l
2484
- ),
2485
- children: [
2486
- /* @__PURE__ */ C("div", { className: "flex items-center gap-2", children: [
2487
- /* @__PURE__ */ c(
2488
- N,
2489
- {
2490
- variant: "ghost",
2491
- size: "icon",
2492
- className: "h-8 w-8",
2493
- onClick: t,
2494
- children: /* @__PURE__ */ c(K, { className: "h-4 w-4" })
2495
- }
2496
- ),
2497
- /* @__PURE__ */ C("span", { className: "text-sm font-medium", children: [
2498
- e,
2499
- " selected"
2500
- ] })
2501
- ] }),
2502
- /* @__PURE__ */ c("div", { className: "mx-2 h-6 w-px bg-border" }),
2503
- /* @__PURE__ */ C("div", { className: "flex items-center gap-1", children: [
2504
- a.map((d) => /* @__PURE__ */ C(
2505
- N,
2506
- {
2507
- variant: d.variant === "destructive" ? "destructive" : "ghost",
2508
- size: "sm",
2509
- className: "gap-2",
2510
- onClick: () => d.onClick(o),
2511
- disabled: d.disabled,
2512
- children: [
2513
- d.icon,
2514
- /* @__PURE__ */ c("span", { children: d.label })
2515
- ]
2516
- },
2517
- d.id
2518
- )),
2519
- u.length > 0 && /* @__PURE__ */ C(O, { children: [
2520
- /* @__PURE__ */ c(T, { asChild: !0, children: /* @__PURE__ */ c(N, { variant: "ghost", size: "icon", className: "h-8 w-8", children: /* @__PURE__ */ c(Ie, { className: "h-4 w-4" }) }) }),
2521
- /* @__PURE__ */ c(B, { align: "end", children: u.map((d) => /* @__PURE__ */ C(
2522
- _e,
2523
- {
2524
- onClick: () => d.onClick(o),
2525
- disabled: d.disabled,
2526
- className: y(
2527
- "flex items-center gap-2",
2528
- d.variant === "destructive" && "text-destructive"
2529
- ),
2530
- children: [
2531
- d.icon,
2532
- /* @__PURE__ */ c("span", { children: d.label })
2533
- ]
2534
- },
2535
- d.id
2536
- )) })
2537
- ] })
2538
- ] })
2539
- ]
2540
- }
2541
- );
2542
- }
2543
- );
2544
- mn.displayName = "BulkActionsToolbar";
2545
- const hn = F.forwardRef(
2546
- ({
2547
- value: e,
2548
- onChange: o,
2549
- options: t = [10, 20, 50, 100],
2550
- label: n = "Rows per page",
2551
- className: r
2552
- }, l) => /* @__PURE__ */ C("div", { className: y("flex items-center gap-2", r), children: [
2553
- /* @__PURE__ */ c("span", { className: "text-sm text-muted-foreground", children: n }),
2554
- /* @__PURE__ */ C(
2555
- Fe,
2556
- {
2557
- value: e.toString(),
2558
- onValueChange: (i) => o(parseInt(i, 10)),
2559
- children: [
2560
- /* @__PURE__ */ c(ye, { ref: l, size: "sm", width: "sm", children: /* @__PURE__ */ c($e, {}) }),
2561
- /* @__PURE__ */ c(Ve, { align: "end", children: t.map((i) => /* @__PURE__ */ c(Me, { value: i.toString(), children: i }, i)) })
2562
- ]
2563
- }
2564
- )
2565
- ] })
2566
- );
2567
- hn.displayName = "PerPageSelector";
2568
- const Cn = F.forwardRef(
2569
- ({ className: e, filters: o, onClearAll: t, ...n }, r) => {
2570
- const l = o.reduce((i, a) => i + a.value.length, 0);
2571
- return /* @__PURE__ */ C("div", { ref: r, className: y("flex flex-wrap items-center gap-2", e), ...n, children: [
2572
- o.map((i) => /* @__PURE__ */ C(O, { children: [
2573
- /* @__PURE__ */ c(T, { asChild: !0, children: /* @__PURE__ */ C(
2574
- N,
2575
- {
2576
- variant: i.value.length > 0 ? "secondary" : "outline",
2577
- size: "sm",
2578
- className: "gap-1",
2579
- children: [
2580
- i.label,
2581
- i.value.length > 0 && /* @__PURE__ */ c(Re, { variant: "default", className: "ml-1 h-5 px-1.5", children: i.value.length }),
2582
- /* @__PURE__ */ c(Pe, { className: "h-3.5 w-3.5 opacity-50" })
2583
- ]
2584
- }
2585
- ) }),
2586
- /* @__PURE__ */ C(B, { align: "start", className: "w-48", children: [
2587
- /* @__PURE__ */ c(ce, { children: i.label }),
2588
- /* @__PURE__ */ c(Z, {}),
2589
- i.options.map((a) => /* @__PURE__ */ C(
2590
- xe,
2591
- {
2592
- checked: i.value.includes(a.value),
2593
- onCheckedChange: (u) => {
2594
- if (i.multiple !== !1) {
2595
- const d = u ? [...i.value, a.value] : i.value.filter((f) => f !== a.value);
2596
- i.onChange(d);
2597
- } else
2598
- i.onChange(u ? [a.value] : []);
2599
- },
2600
- children: [
2601
- /* @__PURE__ */ c("span", { className: "flex-1", children: a.label }),
2602
- a.count !== void 0 && /* @__PURE__ */ c("span", { className: "text-xs text-muted-foreground", children: a.count })
2603
- ]
2604
- },
2605
- a.value
2606
- ))
2607
- ] })
2608
- ] }, i.id)),
2609
- l > 0 && t && /* @__PURE__ */ C(
2610
- N,
2611
- {
2612
- variant: "ghost",
2613
- size: "sm",
2614
- className: "gap-1 text-muted-foreground",
2615
- onClick: t,
2616
- children: [
2617
- /* @__PURE__ */ c(K, { className: "h-3.5 w-3.5" }),
2618
- "Clear all"
2619
- ]
2620
- }
2621
- )
2622
- ] });
2623
- }
2624
- );
2625
- Cn.displayName = "QuickFilters";
2626
- const Sn = F.forwardRef(
2627
- ({ className: e, tags: o, onRemove: t, onClearAll: n, maxVisible: r = 5, ...l }, i) => {
2628
- const [a, u] = F.useState(!1);
2629
- if (o.length === 0) return null;
2630
- const d = a ? o : o.slice(0, r), f = o.length - r;
2631
- return /* @__PURE__ */ C("div", { ref: i, className: y("flex flex-wrap items-center gap-2", e), ...l, children: [
2632
- /* @__PURE__ */ c("span", { className: "text-sm text-muted-foreground", children: "Active filters:" }),
2633
- d.map((p) => /* @__PURE__ */ C(Re, { variant: "secondary", className: "gap-1 pr-1", children: [
2634
- p.category && /* @__PURE__ */ C("span", { className: "text-muted-foreground", children: [
2635
- p.category,
2636
- ":"
2637
- ] }),
2638
- /* @__PURE__ */ c("span", { children: p.label }),
2639
- /* @__PURE__ */ c(
2640
- "button",
2641
- {
2642
- onClick: () => t(p.id),
2643
- className: "ml-1 rounded-full p-0.5 hover:bg-muted-foreground/20",
2644
- children: /* @__PURE__ */ c(K, { className: "h-3 w-3" })
2645
- }
2646
- )
2647
- ] }, p.id)),
2648
- !a && f > 0 && /* @__PURE__ */ C(
2649
- N,
2650
- {
2651
- variant: "ghost",
2652
- size: "sm",
2653
- className: "h-6 px-2 text-xs",
2654
- onClick: () => u(!0),
2655
- children: [
2656
- "+",
2657
- f,
2658
- " more"
2659
- ]
2660
- }
2661
- ),
2662
- a && f > 0 && /* @__PURE__ */ c(
2663
- N,
2664
- {
2665
- variant: "ghost",
2666
- size: "sm",
2667
- className: "h-6 px-2 text-xs",
2668
- onClick: () => u(!1),
2669
- children: "Show less"
2670
- }
2671
- ),
2672
- n && o.length > 1 && /* @__PURE__ */ C(
2673
- N,
2674
- {
2675
- variant: "ghost",
2676
- size: "sm",
2677
- className: "h-6 gap-1 px-2 text-xs text-muted-foreground",
2678
- onClick: n,
2679
- children: [
2680
- /* @__PURE__ */ c(K, { className: "h-3 w-3" }),
2681
- "Clear all"
2682
- ]
2683
- }
2684
- )
2685
- ] });
2686
- }
2687
- );
2688
- Sn.displayName = "FilterTags";
2689
- export {
2690
- fn as A,
2691
- mn as B,
2692
- pn as C,
2693
- Dn as D,
2694
- gn as E,
2695
- Sn as F,
2696
- un as K,
2697
- hn as P,
2698
- Cn as Q,
2699
- dn as S,
2700
- Be as T,
2701
- be as a,
2702
- qe as b,
2703
- ln as c,
2704
- je as d,
2705
- X as e,
2706
- ge as f,
2707
- sn as g,
2708
- En as h,
2709
- An as i,
2710
- cn as j
2711
- };
2712
- //# sourceMappingURL=filter-tags-zEQmRhEU.js.map