@alfadocs/ui-kit-debug 0.73.0 → 0.77.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (338) hide show
  1. package/dist/_chunks/actions-cell-renderer-DLrcSTK_.js +1546 -0
  2. package/dist/_chunks/actions-cell-renderer-DLrcSTK_.js.map +1 -0
  3. package/dist/_chunks/{address-fields-COyjgqxA.js → address-fields-7k59FnJ6.js} +2 -2
  4. package/dist/_chunks/{address-fields-COyjgqxA.js.map → address-fields-7k59FnJ6.js.map} +1 -1
  5. package/dist/_chunks/{ai-prompt-input-DFm58UjY.js → ai-prompt-input-DziJCGLe.js} +2 -2
  6. package/dist/_chunks/{ai-prompt-input-DFm58UjY.js.map → ai-prompt-input-DziJCGLe.js.map} +1 -1
  7. package/dist/_chunks/{audio-recorder-CjAY0GAc.js → audio-recorder-Cc3KuL9y.js} +2 -2
  8. package/dist/_chunks/{audio-recorder-CjAY0GAc.js.map → audio-recorder-Cc3KuL9y.js.map} +1 -1
  9. package/dist/_chunks/{bishop-score-Bs6t6Zv1.js → bishop-score-DDW5-gb9.js} +2 -2
  10. package/dist/_chunks/{bishop-score-Bs6t6Zv1.js.map → bishop-score-DDW5-gb9.js.map} +1 -1
  11. package/dist/_chunks/{booking-CWnZhZ5g.js → booking-CLmeXtGv.js} +3 -3
  12. package/dist/_chunks/{booking-CWnZhZ5g.js.map → booking-CLmeXtGv.js.map} +1 -1
  13. package/dist/_chunks/{care-plan-card-CfIP3Vc1.js → care-plan-card-BrwhyIJI.js} +2 -2
  14. package/dist/_chunks/{care-plan-card-CfIP3Vc1.js.map → care-plan-card-BrwhyIJI.js.map} +1 -1
  15. package/dist/_chunks/{care-plan-entry-card-CRbS-G00.js → care-plan-entry-card-DWEdCQM3.js} +2 -2
  16. package/dist/_chunks/{care-plan-entry-card-CRbS-G00.js.map → care-plan-entry-card-DWEdCQM3.js.map} +1 -1
  17. package/dist/_chunks/{country-select-DYHDLEjG.js → country-select-BN9nedAp.js} +2 -2
  18. package/dist/_chunks/{country-select-DYHDLEjG.js.map → country-select-BN9nedAp.js.map} +1 -1
  19. package/dist/_chunks/data-table-tabs-BEUXiRlu.js +710 -0
  20. package/dist/_chunks/data-table-tabs-BEUXiRlu.js.map +1 -0
  21. package/dist/_chunks/document-preview-CvHnHf6T.js +243 -0
  22. package/dist/_chunks/document-preview-CvHnHf6T.js.map +1 -0
  23. package/dist/_chunks/{document-scanner-BE6Jz4Ob.js → document-scanner-B6h1Ir56.js} +2 -2
  24. package/dist/_chunks/{document-scanner-BE6Jz4Ob.js.map → document-scanner-B6h1Ir56.js.map} +1 -1
  25. package/dist/_chunks/{field-value-DCXJXKab.js → field-value-DHG6gEKS.js} +2 -2
  26. package/dist/_chunks/{field-value-DCXJXKab.js.map → field-value-DHG6gEKS.js.map} +1 -1
  27. package/dist/_chunks/file-Cwe9VC1A.js +40 -0
  28. package/dist/_chunks/file-Cwe9VC1A.js.map +1 -0
  29. package/dist/_chunks/file-manager-DfTG7bxx.js +1771 -0
  30. package/dist/_chunks/file-manager-DfTG7bxx.js.map +1 -0
  31. package/dist/_chunks/{file-upload-B2SXhRiN.js → file-upload-DENvuhfs.js} +98 -129
  32. package/dist/_chunks/file-upload-DENvuhfs.js.map +1 -0
  33. package/dist/_chunks/flag-Cnmivlrl.js +641 -0
  34. package/dist/_chunks/{flag-DZ6V7-hU.js.map → flag-Cnmivlrl.js.map} +1 -1
  35. package/dist/_chunks/{gestational-age-calculator-C9Dfis4I.js → gestational-age-calculator-BpYw-WF-.js} +2 -2
  36. package/dist/_chunks/{gestational-age-calculator-C9Dfis4I.js.map → gestational-age-calculator-BpYw-WF-.js.map} +1 -1
  37. package/dist/_chunks/{header-settings-CRQDCYgr.js → header-settings-DMfdx0Vq.js} +2 -2
  38. package/dist/_chunks/{header-settings-CRQDCYgr.js.map → header-settings-DMfdx0Vq.js.map} +1 -1
  39. package/dist/_chunks/{icon-picker-BePK27S-.js → icon-picker-CM9ubkew.js} +2 -2
  40. package/dist/_chunks/{icon-picker-BePK27S-.js.map → icon-picker-CM9ubkew.js.map} +1 -1
  41. package/dist/_chunks/link-cell-renderer-BQGUs45d.js +711 -0
  42. package/dist/_chunks/link-cell-renderer-BQGUs45d.js.map +1 -0
  43. package/dist/_chunks/{locale-picker-Cbfqc0_N.js → locale-picker-EyvPrwDc.js} +3 -3
  44. package/dist/_chunks/{locale-picker-Cbfqc0_N.js.map → locale-picker-EyvPrwDc.js.map} +1 -1
  45. package/dist/_chunks/{marketplace-app-shell-Dm6S-hun.js → marketplace-app-shell-Bxq1PYAj.js} +3 -3
  46. package/dist/_chunks/{marketplace-app-shell-Dm6S-hun.js.map → marketplace-app-shell-Bxq1PYAj.js.map} +1 -1
  47. package/dist/_chunks/{muscle-scheme-B9MIkuj0.js → muscle-scheme-CFBE2dme.js} +6 -14
  48. package/dist/_chunks/{muscle-scheme-B9MIkuj0.js.map → muscle-scheme-CFBE2dme.js.map} +1 -1
  49. package/dist/_chunks/{notes-panel-B_8-Mebz.js → notes-panel-Cvdp818a.js} +2 -2
  50. package/dist/_chunks/{notes-panel-B_8-Mebz.js.map → notes-panel-Cvdp818a.js.map} +1 -1
  51. package/dist/_chunks/{optical-prescription-BQ75_kf6.js → optical-prescription-BEjYQjiO.js} +2 -2
  52. package/dist/_chunks/{optical-prescription-BQ75_kf6.js.map → optical-prescription-BEjYQjiO.js.map} +1 -1
  53. package/dist/_chunks/{patient-details-JkOI3Ijd.js → patient-details-zy76MRh7.js} +5 -5
  54. package/dist/_chunks/{patient-details-JkOI3Ijd.js.map → patient-details-zy76MRh7.js.map} +1 -1
  55. package/dist/_chunks/{patient-summary-card-CQOLMH3E.js → patient-summary-card-D6kgdTNn.js} +2 -2
  56. package/dist/_chunks/{patient-summary-card-CQOLMH3E.js.map → patient-summary-card-D6kgdTNn.js.map} +1 -1
  57. package/dist/_chunks/{patient-table-B_mOe-ZT.js → patient-table-DweKjiXg.js} +122 -118
  58. package/dist/_chunks/patient-table-DweKjiXg.js.map +1 -0
  59. package/dist/_chunks/periodontal-chart-CYBhr9vc.js +1305 -0
  60. package/dist/_chunks/periodontal-chart-CYBhr9vc.js.map +1 -0
  61. package/dist/_chunks/periodontal-diagnosis-cco40xTa.js +345 -0
  62. package/dist/_chunks/periodontal-diagnosis-cco40xTa.js.map +1 -0
  63. package/dist/_chunks/periodontal-risk-chart-bUGkMwDg.js +334 -0
  64. package/dist/_chunks/periodontal-risk-chart-bUGkMwDg.js.map +1 -0
  65. package/dist/_chunks/{phone-input-dtnrvnZf.js → phone-input-D00ZBAm-.js} +2 -2
  66. package/dist/_chunks/{phone-input-dtnrvnZf.js.map → phone-input-D00ZBAm-.js.map} +1 -1
  67. package/dist/_chunks/{popover-DGTKfLWh.js → popover-Cc0a69sw.js} +31 -28
  68. package/dist/_chunks/{popover-DGTKfLWh.js.map → popover-Cc0a69sw.js.map} +1 -1
  69. package/dist/_chunks/{pregnancy-dating-IsDVfqJX.js → pregnancy-dating-msMl_6wz.js} +2 -2
  70. package/dist/_chunks/{pregnancy-dating-IsDVfqJX.js.map → pregnancy-dating-msMl_6wz.js.map} +1 -1
  71. package/dist/_chunks/{radiograph-panel.agent-e488ooH8.js → radiograph-panel.agent-CxF9pVxd.js} +2 -2
  72. package/dist/_chunks/{radiograph-panel.agent-e488ooH8.js.map → radiograph-panel.agent-CxF9pVxd.js.map} +1 -1
  73. package/dist/_chunks/{rich-text-editor-CgA2bYwi.js → rich-text-editor-CCWjNkbx.js} +186 -177
  74. package/dist/_chunks/rich-text-editor-CCWjNkbx.js.map +1 -0
  75. package/dist/_chunks/{select-BmCbJMJS.js → select-BW5ecXlX.js} +13 -13
  76. package/dist/_chunks/{select-BmCbJMJS.js.map → select-BW5ecXlX.js.map} +1 -1
  77. package/dist/_chunks/{sidebar-CtU35PIX.js → sidebar-C0PbwJBc.js} +357 -320
  78. package/dist/_chunks/sidebar-C0PbwJBc.js.map +1 -0
  79. package/dist/_chunks/signature-request-C-mskXwi.js +318 -0
  80. package/dist/_chunks/signature-request-C-mskXwi.js.map +1 -0
  81. package/dist/_chunks/{tabs-DVQ941Sj.js → tabs-CVTukWRD.js} +2 -2
  82. package/dist/_chunks/{tabs-DVQ941Sj.js.map → tabs-CVTukWRD.js.map} +1 -1
  83. package/dist/_chunks/{tasks-panel-LCK5ZXvU.js → tasks-panel-CjGAhIN8.js} +2 -2
  84. package/dist/_chunks/{tasks-panel-LCK5ZXvU.js.map → tasks-panel-CjGAhIN8.js.map} +1 -1
  85. package/dist/_chunks/tooth-data-BwuoKFf4.js +660 -0
  86. package/dist/_chunks/tooth-data-BwuoKFf4.js.map +1 -0
  87. package/dist/_chunks/tooth-scheme-BzJ6rcte.js +1483 -0
  88. package/dist/_chunks/tooth-scheme-BzJ6rcte.js.map +1 -0
  89. package/dist/_chunks/{unit-converter-3uL_tMCm.js → unit-converter-CSLWFDQh.js} +2 -2
  90. package/dist/_chunks/{unit-converter-3uL_tMCm.js.map → unit-converter-CSLWFDQh.js.map} +1 -1
  91. package/dist/agent-catalog.json +1430 -213
  92. package/dist/agent-i18n/en.json +86 -5
  93. package/dist/components/_shared/entity-card/entity-card.d.ts +1 -1
  94. package/dist/components/address-fields/index.js +1 -1
  95. package/dist/components/ai-prompt-input/index.js +1 -1
  96. package/dist/components/anamnesis-card/anamnesis-card.d.ts +1 -1
  97. package/dist/components/appointment-card/appointment-card.d.ts +1 -1
  98. package/dist/components/audio-recorder/index.js +1 -1
  99. package/dist/components/bishop-score/index.js +1 -1
  100. package/dist/components/booking/index.js +1 -1
  101. package/dist/components/card/card.d.ts +1 -1
  102. package/dist/components/care-plan-card/index.js +1 -1
  103. package/dist/components/care-plan-entry-card/index.js +1 -1
  104. package/dist/components/clinical-note-card/clinical-note-card.d.ts +1 -1
  105. package/dist/components/contact-profile-card/contact-profile-card.d.ts +1 -1
  106. package/dist/components/country-select/index.js +1 -1
  107. package/dist/components/data-table/data-table.d.ts.map +1 -1
  108. package/dist/components/data-table/filters/number-filter.d.ts.map +1 -1
  109. package/dist/components/data-table/index.js +35 -34
  110. package/dist/components/data-table/index.js.map +1 -1
  111. package/dist/components/data-table/toolbar.d.ts +1 -1
  112. package/dist/components/data-table/toolbar.d.ts.map +1 -1
  113. package/dist/components/data-table-tabs/data-table-tabs.agent.d.ts +4 -0
  114. package/dist/components/data-table-tabs/data-table-tabs.agent.d.ts.map +1 -0
  115. package/dist/components/data-table-tabs/data-table-tabs.d.ts +93 -0
  116. package/dist/components/data-table-tabs/data-table-tabs.d.ts.map +1 -0
  117. package/dist/components/data-table-tabs/index.d.ts +5 -0
  118. package/dist/components/data-table-tabs/index.d.ts.map +1 -0
  119. package/dist/components/data-table-tabs/index.js +8 -0
  120. package/dist/components/data-table-tabs/index.js.map +1 -0
  121. package/dist/components/data-table-tabs/use-data-table-filter-tabs.d.ts +63 -0
  122. package/dist/components/data-table-tabs/use-data-table-filter-tabs.d.ts.map +1 -0
  123. package/dist/components/document-preview/document-preview.agent.d.ts +4 -0
  124. package/dist/components/document-preview/document-preview.agent.d.ts.map +1 -0
  125. package/dist/components/document-preview/document-preview.d.ts +64 -0
  126. package/dist/components/document-preview/document-preview.d.ts.map +1 -0
  127. package/dist/components/document-preview/index.d.ts +4 -0
  128. package/dist/components/document-preview/index.d.ts.map +1 -0
  129. package/dist/components/document-preview/index.js +6 -0
  130. package/dist/components/document-preview/index.js.map +1 -0
  131. package/dist/components/document-scanner/index.js +1 -1
  132. package/dist/components/file-manager/dialogs.d.ts +48 -0
  133. package/dist/components/file-manager/dialogs.d.ts.map +1 -0
  134. package/dist/components/file-manager/file-manager.agent.d.ts +4 -0
  135. package/dist/components/file-manager/file-manager.agent.d.ts.map +1 -0
  136. package/dist/components/file-manager/file-manager.d.ts +82 -0
  137. package/dist/components/file-manager/file-manager.d.ts.map +1 -0
  138. package/dist/components/file-manager/folder-tree.d.ts +12 -0
  139. package/dist/components/file-manager/folder-tree.d.ts.map +1 -0
  140. package/dist/components/file-manager/index.d.ts +5 -0
  141. package/dist/components/file-manager/index.d.ts.map +1 -0
  142. package/dist/components/file-manager/index.js +6 -0
  143. package/dist/components/file-manager/index.js.map +1 -0
  144. package/dist/components/file-manager/list-view.d.ts +49 -0
  145. package/dist/components/file-manager/list-view.d.ts.map +1 -0
  146. package/dist/components/file-manager/toolbar.d.ts +15 -0
  147. package/dist/components/file-manager/toolbar.d.ts.map +1 -0
  148. package/dist/components/file-manager/types.d.ts +167 -0
  149. package/dist/components/file-manager/types.d.ts.map +1 -0
  150. package/dist/components/file-manager/utils.d.ts +34 -0
  151. package/dist/components/file-manager/utils.d.ts.map +1 -0
  152. package/dist/components/file-upload/index.js +1 -1
  153. package/dist/components/flag/flag.d.ts.map +1 -1
  154. package/dist/components/flag/index.js +1 -1
  155. package/dist/components/gestational-age-calculator/index.js +1 -1
  156. package/dist/components/header-settings/index.js +1 -1
  157. package/dist/components/icon-picker/index.js +1 -1
  158. package/dist/components/index.d.ts +7 -0
  159. package/dist/components/index.d.ts.map +1 -1
  160. package/dist/components/locale-picker/index.js +1 -1
  161. package/dist/components/message-card/message-card.d.ts +1 -1
  162. package/dist/components/muscle-scheme/index.js +1 -1
  163. package/dist/components/muscle-scheme/muscle-scheme.d.ts.map +1 -1
  164. package/dist/components/notes-panel/index.js +1 -1
  165. package/dist/components/notification-card/notification-card.d.ts +1 -1
  166. package/dist/components/operator-hero/operator-hero.d.ts +1 -1
  167. package/dist/components/optical-prescription/index.js +1 -1
  168. package/dist/components/patient-details/index.js +1 -1
  169. package/dist/components/patient-summary-card/index.js +1 -1
  170. package/dist/components/patient-summary-card/patient-summary-card.d.ts +1 -1
  171. package/dist/components/patient-table/columns.d.ts.map +1 -1
  172. package/dist/components/patient-table/index.js +1 -1
  173. package/dist/components/payment-card/payment-card.d.ts +1 -1
  174. package/dist/components/payment-card/payment-request-card.d.ts +1 -1
  175. package/dist/components/periodontal-chart/index.d.ts +6 -0
  176. package/dist/components/periodontal-chart/index.d.ts.map +1 -0
  177. package/dist/components/periodontal-chart/index.js +23 -0
  178. package/dist/components/periodontal-chart/index.js.map +1 -0
  179. package/dist/components/periodontal-chart/periodontal-chart-data.d.ts +164 -0
  180. package/dist/components/periodontal-chart/periodontal-chart-data.d.ts.map +1 -0
  181. package/dist/components/periodontal-chart/periodontal-chart.agent.d.ts +4 -0
  182. package/dist/components/periodontal-chart/periodontal-chart.agent.d.ts.map +1 -0
  183. package/dist/components/periodontal-chart/periodontal-chart.d.ts +71 -0
  184. package/dist/components/periodontal-chart/periodontal-chart.d.ts.map +1 -0
  185. package/dist/components/periodontal-chart-card/periodontal-chart-card.d.ts +1 -1
  186. package/dist/components/periodontal-diagnosis/index.d.ts +6 -0
  187. package/dist/components/periodontal-diagnosis/index.d.ts.map +1 -0
  188. package/dist/components/periodontal-diagnosis/index.js +13 -0
  189. package/dist/components/periodontal-diagnosis/index.js.map +1 -0
  190. package/dist/components/periodontal-diagnosis/periodontal-diagnosis-data.d.ts +30 -0
  191. package/dist/components/periodontal-diagnosis/periodontal-diagnosis-data.d.ts.map +1 -0
  192. package/dist/components/periodontal-diagnosis/periodontal-diagnosis.agent.d.ts +4 -0
  193. package/dist/components/periodontal-diagnosis/periodontal-diagnosis.agent.d.ts.map +1 -0
  194. package/dist/components/periodontal-diagnosis/periodontal-diagnosis.d.ts +44 -0
  195. package/dist/components/periodontal-diagnosis/periodontal-diagnosis.d.ts.map +1 -0
  196. package/dist/components/periodontal-risk-chart/index.d.ts +6 -0
  197. package/dist/components/periodontal-risk-chart/index.d.ts.map +1 -0
  198. package/dist/components/periodontal-risk-chart/index.js +9 -0
  199. package/dist/components/periodontal-risk-chart/index.js.map +1 -0
  200. package/dist/components/periodontal-risk-chart/periodontal-risk-chart.agent.d.ts +4 -0
  201. package/dist/components/periodontal-risk-chart/periodontal-risk-chart.agent.d.ts.map +1 -0
  202. package/dist/components/periodontal-risk-chart/periodontal-risk-chart.d.ts +28 -0
  203. package/dist/components/periodontal-risk-chart/periodontal-risk-chart.d.ts.map +1 -0
  204. package/dist/components/periodontal-risk-chart/periodontal-risk-data.d.ts +47 -0
  205. package/dist/components/periodontal-risk-chart/periodontal-risk-data.d.ts.map +1 -0
  206. package/dist/components/phone-input/index.js +1 -1
  207. package/dist/components/popover/index.js +1 -1
  208. package/dist/components/popover/popover.d.ts +1 -0
  209. package/dist/components/popover/popover.d.ts.map +1 -1
  210. package/dist/components/pregnancy-dating/index.js +1 -1
  211. package/dist/components/product-hub-tray/product-hub-panel.d.ts +1 -1
  212. package/dist/components/radiograph-panel/index.js +1 -1
  213. package/dist/components/rich-text-editor/index.js +1 -1
  214. package/dist/components/select/index.js +1 -1
  215. package/dist/components/select/select.d.ts.map +1 -1
  216. package/dist/components/sidebar/index.js +1 -1
  217. package/dist/components/sidebar/sidebar.d.ts +9 -0
  218. package/dist/components/sidebar/sidebar.d.ts.map +1 -1
  219. package/dist/components/skeleton-scheme/index.js +5 -13
  220. package/dist/components/skeleton-scheme/index.js.map +1 -1
  221. package/dist/components/stat/stat.d.ts +1 -1
  222. package/dist/components/tabs/index.js +1 -1
  223. package/dist/components/tasks-panel/index.js +1 -1
  224. package/dist/components/tooth-scheme/index.js +29 -28
  225. package/dist/components/tooth-scheme/index.js.map +1 -1
  226. package/dist/components/unit-converter/index.js +1 -1
  227. package/dist/i18n/locales/ar.d.ts +321 -0
  228. package/dist/i18n/locales/ar.d.ts.map +1 -1
  229. package/dist/i18n/locales/ar.js +321 -0
  230. package/dist/i18n/locales/ar.js.map +1 -1
  231. package/dist/i18n/locales/de.d.ts +321 -0
  232. package/dist/i18n/locales/de.d.ts.map +1 -1
  233. package/dist/i18n/locales/de.js +321 -0
  234. package/dist/i18n/locales/de.js.map +1 -1
  235. package/dist/i18n/locales/el.d.ts +321 -0
  236. package/dist/i18n/locales/el.d.ts.map +1 -1
  237. package/dist/i18n/locales/el.js +321 -0
  238. package/dist/i18n/locales/el.js.map +1 -1
  239. package/dist/i18n/locales/en.d.ts +321 -0
  240. package/dist/i18n/locales/en.d.ts.map +1 -1
  241. package/dist/i18n/locales/en.js +321 -0
  242. package/dist/i18n/locales/en.js.map +1 -1
  243. package/dist/i18n/locales/es.d.ts +321 -0
  244. package/dist/i18n/locales/es.d.ts.map +1 -1
  245. package/dist/i18n/locales/es.js +321 -0
  246. package/dist/i18n/locales/es.js.map +1 -1
  247. package/dist/i18n/locales/fr.d.ts +321 -0
  248. package/dist/i18n/locales/fr.d.ts.map +1 -1
  249. package/dist/i18n/locales/fr.js +321 -0
  250. package/dist/i18n/locales/fr.js.map +1 -1
  251. package/dist/i18n/locales/hi.d.ts +321 -0
  252. package/dist/i18n/locales/hi.d.ts.map +1 -1
  253. package/dist/i18n/locales/hi.js +321 -0
  254. package/dist/i18n/locales/hi.js.map +1 -1
  255. package/dist/i18n/locales/it.d.ts +321 -0
  256. package/dist/i18n/locales/it.d.ts.map +1 -1
  257. package/dist/i18n/locales/it.js +321 -0
  258. package/dist/i18n/locales/it.js.map +1 -1
  259. package/dist/i18n/locales/ja.d.ts +321 -0
  260. package/dist/i18n/locales/ja.d.ts.map +1 -1
  261. package/dist/i18n/locales/ja.js +321 -0
  262. package/dist/i18n/locales/ja.js.map +1 -1
  263. package/dist/i18n/locales/nl.d.ts +321 -0
  264. package/dist/i18n/locales/nl.d.ts.map +1 -1
  265. package/dist/i18n/locales/nl.js +321 -0
  266. package/dist/i18n/locales/nl.js.map +1 -1
  267. package/dist/i18n/locales/pl.d.ts +321 -0
  268. package/dist/i18n/locales/pl.d.ts.map +1 -1
  269. package/dist/i18n/locales/pl.js +321 -0
  270. package/dist/i18n/locales/pl.js.map +1 -1
  271. package/dist/i18n/locales/pt.d.ts +321 -0
  272. package/dist/i18n/locales/pt.d.ts.map +1 -1
  273. package/dist/i18n/locales/pt.js +321 -0
  274. package/dist/i18n/locales/pt.js.map +1 -1
  275. package/dist/i18n/locales/ro.d.ts +321 -0
  276. package/dist/i18n/locales/ro.d.ts.map +1 -1
  277. package/dist/i18n/locales/ro.js +321 -0
  278. package/dist/i18n/locales/ro.js.map +1 -1
  279. package/dist/i18n/locales/ru.d.ts +321 -0
  280. package/dist/i18n/locales/ru.d.ts.map +1 -1
  281. package/dist/i18n/locales/ru.js +321 -0
  282. package/dist/i18n/locales/ru.js.map +1 -1
  283. package/dist/i18n/locales/sq.d.ts +321 -0
  284. package/dist/i18n/locales/sq.d.ts.map +1 -1
  285. package/dist/i18n/locales/sq.js +321 -0
  286. package/dist/i18n/locales/sq.js.map +1 -1
  287. package/dist/i18n/locales/sv.d.ts +321 -0
  288. package/dist/i18n/locales/sv.d.ts.map +1 -1
  289. package/dist/i18n/locales/sv.js +321 -0
  290. package/dist/i18n/locales/sv.js.map +1 -1
  291. package/dist/i18n/locales/tr.d.ts +321 -0
  292. package/dist/i18n/locales/tr.d.ts.map +1 -1
  293. package/dist/i18n/locales/tr.js +321 -0
  294. package/dist/i18n/locales/tr.js.map +1 -1
  295. package/dist/i18n/locales/zh.d.ts +321 -0
  296. package/dist/i18n/locales/zh.d.ts.map +1 -1
  297. package/dist/i18n/locales/zh.js +321 -0
  298. package/dist/i18n/locales/zh.js.map +1 -1
  299. package/dist/index.js +834 -783
  300. package/dist/index.js.map +1 -1
  301. package/dist/locales/ar.json +321 -0
  302. package/dist/locales/de.json +321 -0
  303. package/dist/locales/el.json +321 -0
  304. package/dist/locales/en.json +321 -0
  305. package/dist/locales/es.json +321 -0
  306. package/dist/locales/fr.json +321 -0
  307. package/dist/locales/hi.json +321 -0
  308. package/dist/locales/it.json +321 -0
  309. package/dist/locales/ja.json +321 -0
  310. package/dist/locales/nl.json +321 -0
  311. package/dist/locales/pl.json +321 -0
  312. package/dist/locales/pt.json +321 -0
  313. package/dist/locales/ro.json +321 -0
  314. package/dist/locales/ru.json +321 -0
  315. package/dist/locales/sq.json +321 -0
  316. package/dist/locales/sv.json +321 -0
  317. package/dist/locales/tr.json +321 -0
  318. package/dist/locales/zh.json +321 -0
  319. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  320. package/dist/patterns/signature-request/index.d.ts +3 -0
  321. package/dist/patterns/signature-request/index.d.ts.map +1 -0
  322. package/dist/patterns/signature-request/index.js +5 -0
  323. package/dist/patterns/signature-request/index.js.map +1 -0
  324. package/dist/patterns/signature-request/signature-request.d.ts +81 -0
  325. package/dist/patterns/signature-request/signature-request.d.ts.map +1 -0
  326. package/dist/tokens.css +1 -1
  327. package/package.json +29 -1
  328. package/dist/_chunks/columns-2-8lq4-b8e.js +0 -15
  329. package/dist/_chunks/columns-2-8lq4-b8e.js.map +0 -1
  330. package/dist/_chunks/file-upload-B2SXhRiN.js.map +0 -1
  331. package/dist/_chunks/flag-DZ6V7-hU.js +0 -637
  332. package/dist/_chunks/link-cell-renderer-CLI7sBkX.js +0 -2210
  333. package/dist/_chunks/link-cell-renderer-CLI7sBkX.js.map +0 -1
  334. package/dist/_chunks/patient-table-B_mOe-ZT.js.map +0 -1
  335. package/dist/_chunks/rich-text-editor-CgA2bYwi.js.map +0 -1
  336. package/dist/_chunks/sidebar-CtU35PIX.js.map +0 -1
  337. package/dist/_chunks/tooth-scheme-CX49GycY.js +0 -2133
  338. package/dist/_chunks/tooth-scheme-CX49GycY.js.map +0 -1
@@ -0,0 +1,1771 @@
1
+ import { jsx as n, jsxs as x } from "react/jsx-runtime";
2
+ import { useMemo as O, useState as te, useRef as ee, useEffect as ne, useId as Pe, useCallback as y, forwardRef as yt, useImperativeHandle as bt } from "react";
3
+ import { c as Ve } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as J } from "react-i18next";
5
+ import { B as vt, b as He, c as ge } from "./breadcrumb-agut0PwN.js";
6
+ import { E as kt } from "./empty-state-CrLsi0XI.js";
7
+ import { S as he } from "./skeleton-CZbwyJAA.js";
8
+ import { u as Mt } from "./use-controllable-state-BiY4xTzM.js";
9
+ import { u as Ct } from "./registry-DvAUVLHh.js";
10
+ import { B as X } from "./button-CPGiR_bH.js";
11
+ import { D as m } from "./dialog-UbKJCi1X.js";
12
+ import { a as wt, F as xt, C as St } from "./file-upload-DENvuhfs.js";
13
+ import { T as We } from "./text-input-CUvCb6ST.js";
14
+ import { c as ie } from "./createLucideIcon-DhHxpK9K.js";
15
+ import { F as Nt, a as Tt } from "./file-Cwe9VC1A.js";
16
+ import { F as Ft } from "./file-text-5yv6r2ls.js";
17
+ import { F as At } from "./file-spreadsheet-DmwyfV4O.js";
18
+ import { C as Dt } from "./chevron-right-I9AeSxH2.js";
19
+ import { A as Rt, d as It, D as Te } from "./actions-cell-renderer-DLrcSTK_.js";
20
+ import { B as $e } from "./badge-DCOqV9mI.js";
21
+ import { D as Ge } from "./download-CfYKJO_j.js";
22
+ import { P as zt } from "./pen-line-D0De5zdl.js";
23
+ import { P as Ue } from "./pencil-B1sKKyuT.js";
24
+ import { T as Ye } from "./trash-2-uumy3fy1.js";
25
+ import { I as Q } from "./icon-button-C_kbcd7I.js";
26
+ import { I as _t } from "./icon-button-group-C_lqXTAj.js";
27
+ import { U as Lt } from "./upload-BfT2hzMg.js";
28
+ import { P as Kt } from "./plus-DzMQ_c6b.js";
29
+ /**
30
+ * @license lucide-react v1.22.0 - ISC
31
+ *
32
+ * This source code is licensed under the ISC license.
33
+ * See the LICENSE file in the root directory of this source tree.
34
+ */
35
+ const Et = [
36
+ [
37
+ "path",
38
+ {
39
+ d: "M4 6.835V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-.343",
40
+ key: "1vfytu"
41
+ }
42
+ ],
43
+ ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }],
44
+ [
45
+ "path",
46
+ {
47
+ d: "M2 19a2 2 0 0 1 4 0v1a2 2 0 0 1-4 0v-4a6 6 0 0 1 12 0v4a2 2 0 0 1-4 0v-1a2 2 0 0 1 4 0",
48
+ key: "1etmh7"
49
+ }
50
+ ]
51
+ ], Bt = ie("file-headphone", Et);
52
+ /**
53
+ * @license lucide-react v1.22.0 - ISC
54
+ *
55
+ * This source code is licensed under the ISC license.
56
+ * See the LICENSE file in the root directory of this source tree.
57
+ */
58
+ const Ht = [
59
+ [
60
+ "path",
61
+ {
62
+ d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
63
+ key: "1oefj6"
64
+ }
65
+ ],
66
+ ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }],
67
+ [
68
+ "path",
69
+ {
70
+ d: "M15.033 13.44a.647.647 0 0 1 0 1.12l-4.065 2.352a.645.645 0 0 1-.968-.56v-4.704a.645.645 0 0 1 .967-.56z",
71
+ key: "1tzo1f"
72
+ }
73
+ ]
74
+ ], Ot = ie("file-play", Ht);
75
+ /**
76
+ * @license lucide-react v1.22.0 - ISC
77
+ *
78
+ * This source code is licensed under the ISC license.
79
+ * See the LICENSE file in the root directory of this source tree.
80
+ */
81
+ const qt = [
82
+ [
83
+ "path",
84
+ {
85
+ d: "M2 9V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1",
86
+ key: "fm4g5t"
87
+ }
88
+ ],
89
+ ["path", { d: "M2 13h10", key: "pgb2dq" }],
90
+ ["path", { d: "m9 16 3-3-3-3", key: "6m91ic" }]
91
+ ], Ze = ie("folder-input", qt);
92
+ /**
93
+ * @license lucide-react v1.22.0 - ISC
94
+ *
95
+ * This source code is licensed under the ISC license.
96
+ * See the LICENSE file in the root directory of this source tree.
97
+ */
98
+ const jt = [
99
+ [
100
+ "path",
101
+ {
102
+ d: "m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",
103
+ key: "usdka0"
104
+ }
105
+ ]
106
+ ], Pt = ie("folder-open", jt);
107
+ /**
108
+ * @license lucide-react v1.22.0 - ISC
109
+ *
110
+ * This source code is licensed under the ISC license.
111
+ * See the LICENSE file in the root directory of this source tree.
112
+ */
113
+ const Vt = [
114
+ ["path", { d: "M12 10v6", key: "1bos4e" }],
115
+ ["path", { d: "M9 13h6", key: "1uhe8q" }],
116
+ [
117
+ "path",
118
+ {
119
+ d: "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",
120
+ key: "1kt360"
121
+ }
122
+ ]
123
+ ], Wt = ie("folder-plus", Vt);
124
+ /**
125
+ * @license lucide-react v1.22.0 - ISC
126
+ *
127
+ * This source code is licensed under the ISC license.
128
+ * See the LICENSE file in the root directory of this source tree.
129
+ */
130
+ const $t = [
131
+ [
132
+ "path",
133
+ {
134
+ d: "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",
135
+ key: "1kt360"
136
+ }
137
+ ]
138
+ ], Xe = ie("folder", $t);
139
+ /**
140
+ * @license lucide-react v1.22.0 - ISC
141
+ *
142
+ * This source code is licensed under the ISC license.
143
+ * See the LICENSE file in the root directory of this source tree.
144
+ */
145
+ const Gt = [
146
+ ["circle", { cx: "18", cy: "5", r: "3", key: "gq8acd" }],
147
+ ["circle", { cx: "6", cy: "12", r: "3", key: "w7nqdw" }],
148
+ ["circle", { cx: "18", cy: "19", r: "3", key: "1xt0gg" }],
149
+ ["line", { x1: "8.59", x2: "15.42", y1: "13.51", y2: "17.49", key: "47mynk" }],
150
+ ["line", { x1: "15.41", x2: "8.59", y1: "6.51", y2: "10.49", key: "1n3mei" }]
151
+ ], Je = ie("share-2", Gt), Ut = {
152
+ type: "array",
153
+ items: {
154
+ type: "object",
155
+ properties: {
156
+ id: { type: "string" },
157
+ kind: { enum: ["file", "folder"] },
158
+ parentId: {
159
+ type: ["string", "null"],
160
+ description: "Parent folder id, null at the root."
161
+ },
162
+ size: { type: "number", description: "Bytes — files only." },
163
+ updatedAt: { type: "string", description: "ISO 8601 timestamp." },
164
+ documentType: {
165
+ type: "string",
166
+ description: "Document-type category (non-identifying)."
167
+ },
168
+ signatureStatus: {
169
+ enum: ["none", "pending", "signed"],
170
+ description: "Signature workflow state."
171
+ }
172
+ },
173
+ required: ["id", "kind", "parentId"]
174
+ }
175
+ }, Yt = {
176
+ id: "file-manager",
177
+ // select_multiple → select_items / clear_selection; navigate → navigate;
178
+ // filter → set_type_filter (proxied to the DataTable's documentType column);
179
+ // open → open_item. Preview is NOT an agent action — item content can be PHI.
180
+ capabilities: ["select_multiple", "navigate", "filter", "open"],
181
+ state: {
182
+ selection: {
183
+ type: "string[]",
184
+ descriptionKey: "ui.agent.fileManager.state.selection",
185
+ description: "Item ids of the currently-selected files and folders.",
186
+ read: (t) => t.getSelection()
187
+ },
188
+ currentFolder: {
189
+ type: "string | null",
190
+ descriptionKey: "ui.agent.fileManager.state.currentFolder",
191
+ description: "Id of the folder being viewed, or null for the root.",
192
+ read: (t) => t.getCurrentFolderId()
193
+ },
194
+ typeFilter: {
195
+ type: "string[]",
196
+ descriptionKey: "ui.agent.fileManager.state.typeFilter",
197
+ description: "Active document-type filter applied to the open folder (empty = no filter).",
198
+ read: (t) => t.getTypeFilter()
199
+ },
200
+ items: {
201
+ type: "Array<{ id, kind, parentId, size, updatedAt, documentType, signatureStatus }>",
202
+ descriptionKey: "ui.agent.fileManager.state.items",
203
+ description: "Structural metadata for every item — ids, kinds, sizes, dates, document types, signature states. Names are PHI and never included; read them via get_item_names.",
204
+ read: (t) => t.getItems()
205
+ },
206
+ activeAction: {
207
+ type: "'none' | 'create-folder' | 'rename' | 'delete' | 'move'",
208
+ descriptionKey: "ui.agent.fileManager.state.activeAction",
209
+ description: "The single in-flight action dialog. Only one action can be active at a time.",
210
+ read: (t) => t.getActiveAction()
211
+ }
212
+ },
213
+ actions: {
214
+ select_items: {
215
+ // Transient view selection (data-table convention) — stays read.
216
+ safety: "read",
217
+ argsType: "{ ids: string[] }",
218
+ argsSchema: {
219
+ type: "object",
220
+ properties: {
221
+ ids: {
222
+ type: "array",
223
+ items: { type: "string" },
224
+ description: "Item ids to select (replaces the current selection)."
225
+ }
226
+ },
227
+ required: ["ids"]
228
+ },
229
+ idempotent: !0,
230
+ descriptionKey: "ui.agent.fileManager.actions.selectItems",
231
+ description: "Replace the current selection with the given item ids.",
232
+ examples: [
233
+ { args: { ids: ["doc-1", "doc-2"] }, note: "Select two items." }
234
+ ],
235
+ invoke: (t, r) => {
236
+ t.setSelection(r.ids);
237
+ }
238
+ },
239
+ clear_selection: {
240
+ safety: "read",
241
+ idempotent: !0,
242
+ descriptionKey: "ui.agent.fileManager.actions.clearSelection",
243
+ description: "Deselect every item.",
244
+ invoke: (t) => {
245
+ t.clearSelection();
246
+ }
247
+ },
248
+ navigate: {
249
+ safety: "read",
250
+ argsType: "{ folderId: string | null }",
251
+ argsSchema: {
252
+ type: "object",
253
+ properties: {
254
+ folderId: {
255
+ type: ["string", "null"],
256
+ description: "Folder id to open, or null for the root."
257
+ }
258
+ },
259
+ required: ["folderId"]
260
+ },
261
+ idempotent: !0,
262
+ descriptionKey: "ui.agent.fileManager.actions.navigate",
263
+ description: "Open the given folder (null for the root). Clears the current selection.",
264
+ invoke: (t, r) => {
265
+ t.navigateTo(r.folderId);
266
+ }
267
+ },
268
+ set_type_filter: {
269
+ safety: "read",
270
+ argsType: "{ documentTypes: string[] }",
271
+ argsSchema: {
272
+ type: "object",
273
+ properties: {
274
+ documentTypes: {
275
+ type: "array",
276
+ items: { type: "string" },
277
+ description: "Document-type values to keep. Empty array clears the filter."
278
+ }
279
+ },
280
+ required: ["documentTypes"]
281
+ },
282
+ idempotent: !0,
283
+ descriptionKey: "ui.agent.fileManager.actions.setTypeFilter",
284
+ description: "Filter the open folder to the given document types (empty clears the filter).",
285
+ invoke: (t, r) => {
286
+ t.setTypeFilter(r.documentTypes);
287
+ }
288
+ },
289
+ open_item: {
290
+ safety: "read",
291
+ argsType: "{ id: string }",
292
+ argsSchema: {
293
+ type: "object",
294
+ properties: {
295
+ id: {
296
+ type: "string",
297
+ description: "Item id — folders navigate, files open via the host."
298
+ }
299
+ },
300
+ required: ["id"]
301
+ },
302
+ // Opening a file resolves through the host's onOpenFile callback,
303
+ // which may reach a viewer outside this UI.
304
+ openWorld: !0,
305
+ descriptionKey: "ui.agent.fileManager.actions.openItem",
306
+ description: "Open an item: folders navigate into the folder, files resolve through the host preview callback.",
307
+ invoke: (t, r) => {
308
+ t.openItem(r.id);
309
+ }
310
+ },
311
+ list_items: {
312
+ safety: "read",
313
+ argsType: "{ folderId?: string | null }",
314
+ argsSchema: {
315
+ type: "object",
316
+ properties: {
317
+ folderId: {
318
+ type: ["string", "null"],
319
+ description: "Folder whose children to list (null = root). Omit for every item."
320
+ }
321
+ }
322
+ },
323
+ returns: "Array<{ id, kind, parentId, size, updatedAt }>",
324
+ returnsSchema: Ut,
325
+ idempotent: !0,
326
+ descriptionKey: "ui.agent.fileManager.actions.listItems",
327
+ description: "List structural metadata (ids, kinds, sizes, dates — never names) for a folder or the whole tree.",
328
+ invoke: (t, r) => t.getItems(r == null ? void 0 : r.folderId)
329
+ },
330
+ get_item_names: {
331
+ // phi (not read): resolves display names, which can identify patients
332
+ // (e.g. "Rossi Maria — referto 2026.pdf"). PRS §26 — phi outranks read
333
+ // so the host gates it behind stricter confirm + audit. The always-on
334
+ // items snapshot stays name-free.
335
+ safety: "phi",
336
+ argsType: "{ ids: string[] }",
337
+ argsSchema: {
338
+ type: "object",
339
+ properties: {
340
+ ids: {
341
+ type: "array",
342
+ items: { type: "string" },
343
+ description: "Item ids whose display names to read."
344
+ }
345
+ },
346
+ required: ["ids"]
347
+ },
348
+ returns: "Array<{ id: string; name: string }>",
349
+ returnsSchema: {
350
+ type: "array",
351
+ items: {
352
+ type: "object",
353
+ properties: {
354
+ id: { type: "string" },
355
+ name: { type: "string" }
356
+ },
357
+ required: ["id", "name"]
358
+ }
359
+ },
360
+ idempotent: !0,
361
+ descriptionKey: "ui.agent.fileManager.actions.getItemNames",
362
+ description: "Read the display names for the given item ids. Names may identify patients (PHI).",
363
+ invoke: (t, r) => t.getItemNames(r.ids)
364
+ }
365
+ },
366
+ domHooks: {
367
+ root: {
368
+ attr: "data-component",
369
+ value: "file-manager",
370
+ description: "Marks the FileManager region."
371
+ },
372
+ instanceId: {
373
+ attr: "data-component-id",
374
+ sourceProp: "id",
375
+ description: "Sourced from the id prop."
376
+ },
377
+ item: {
378
+ attr: "data-item-id",
379
+ description: "Grid cards and folder-tree nodes carry the item id as data-item-id (ids only — never names). List-view rows are AG Grid rows inside the composed DataTable and carry its native row-id attribute keyed to the same ids."
380
+ }
381
+ }
382
+ }, Zt = [
383
+ "fileManager.units.bytes",
384
+ "fileManager.units.kilobytes",
385
+ "fileManager.units.megabytes",
386
+ "fileManager.units.gigabytes"
387
+ ], Oe = ["B", "KB", "MB", "GB"];
388
+ function Xt(t, r, l) {
389
+ let i = t, a = 0;
390
+ for (; i >= 1024 && a < Oe.length - 1; )
391
+ i /= 1024, a++;
392
+ return `${new Intl.NumberFormat(r, {
393
+ maximumFractionDigits: a === 0 ? 0 : 1
394
+ }).format(i)} ${l(Zt[a], Oe[a])}`;
395
+ }
396
+ function Jt(t) {
397
+ if (t.kind === "folder") return Xe;
398
+ const r = t.mimeType ?? "";
399
+ return r.startsWith("image/") ? Nt : r.startsWith("audio/") ? Bt : r.startsWith("video/") ? Ot : r === "application/pdf" || r.startsWith("text/") || r.includes("word") || r.includes("rtf") ? Ft : r.includes("zip") || r.includes("compressed") || r.includes("tar") ? wt : r.includes("spreadsheet") || r.includes("excel") || r === "text/csv" ? At : Tt;
400
+ }
401
+ function Qe(t, r, l) {
402
+ const i = new Intl.Collator(l, {
403
+ numeric: !0,
404
+ sensitivity: "base"
405
+ });
406
+ return t.filter((a) => a.parentId === r).sort((a, u) => a.kind !== u.kind ? a.kind === "folder" ? -1 : 1 : i.compare(a.name, u.name));
407
+ }
408
+ function Qt(t, r, l) {
409
+ const i = /* @__PURE__ */ new Set();
410
+ for (const c of t)
411
+ c.parentId === r && i.add(c.id);
412
+ let a = !0;
413
+ for (; a; ) {
414
+ a = !1;
415
+ for (const c of t)
416
+ i.has(c.id) || c.parentId !== null && i.has(c.parentId) && (i.add(c.id), a = !0);
417
+ }
418
+ const u = new Intl.Collator(l, {
419
+ numeric: !0,
420
+ sensitivity: "base"
421
+ });
422
+ return t.filter((c) => i.has(c.id)).sort((c, F) => c.kind !== F.kind ? c.kind === "folder" ? -1 : 1 : u.compare(c.name, F.name));
423
+ }
424
+ function en(t, r, l) {
425
+ const i = [];
426
+ let a = t;
427
+ const u = /* @__PURE__ */ new Set();
428
+ for (; a && !u.has(a.id) && (u.add(a.id), i.unshift(a.id), a.parentId !== l); )
429
+ a = a.parentId === null ? void 0 : r.get(a.parentId);
430
+ return i;
431
+ }
432
+ function tn(t, r) {
433
+ const l = new Map(t.map((c) => [c.id, c])), i = [];
434
+ let a = r === null ? void 0 : l.get(r);
435
+ const u = /* @__PURE__ */ new Set();
436
+ for (; a && !u.has(a.id); )
437
+ u.add(a.id), i.unshift(a), a = a.parentId === null ? void 0 : l.get(a.parentId);
438
+ return i;
439
+ }
440
+ function nn(t, r) {
441
+ const l = new Set(r);
442
+ let i = !0;
443
+ for (; i; ) {
444
+ i = !1;
445
+ for (const a of t)
446
+ a.kind === "folder" && !l.has(a.id) && a.parentId !== null && l.has(a.parentId) && (l.add(a.id), i = !0);
447
+ }
448
+ return l;
449
+ }
450
+ function et(t, r) {
451
+ if (t.length !== r.length) return !1;
452
+ const l = new Set(t);
453
+ return r.every((i) => l.has(i));
454
+ }
455
+ const pe = "__root__", se = (t) => t ?? pe, rn = Ve(
456
+ [
457
+ "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]",
458
+ "ds:min-h-[var(--min-target-size)] ds:w-full",
459
+ "ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-sm)]",
460
+ "ds:rounded-[var(--radius-md)]",
461
+ "ds:text-[length:var(--font-size-sm)]",
462
+ "ds:cursor-pointer ds:select-none",
463
+ "ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none"
464
+ ].join(" "),
465
+ {
466
+ variants: {
467
+ selected: {
468
+ true: "ds:bg-primary/10 ds:text-primary ds:font-medium",
469
+ false: "ds:text-foreground ds:hover:bg-muted/10"
470
+ }
471
+ },
472
+ defaultVariants: { selected: !1 }
473
+ }
474
+ );
475
+ function an(t, r, l) {
476
+ const i = (a) => Qe(t, a, r).filter((u) => u.kind === "folder" && !(l != null && l.has(u.id))).map((u) => ({
477
+ key: se(u.id),
478
+ folderId: u.id,
479
+ item: u,
480
+ children: i(u.id)
481
+ }));
482
+ return { key: pe, folderId: null, children: i(null) };
483
+ }
484
+ function on(t, r) {
485
+ const l = [], i = (a) => {
486
+ l.push(a), r.has(a.key) && a.children.forEach(i);
487
+ };
488
+ return i(t), l;
489
+ }
490
+ function ln(t) {
491
+ var r;
492
+ return t.folderId === null ? null : se(((r = t.item) == null ? void 0 : r.parentId) ?? null);
493
+ }
494
+ function tt({
495
+ items: t,
496
+ selectedFolderId: r,
497
+ onSelectFolder: l,
498
+ "aria-label": i,
499
+ excludeIds: a
500
+ }) {
501
+ const { t: u, i18n: c } = J(), F = c.dir() === "rtl", S = O(
502
+ () => an(t, c.language, a),
503
+ [t, c.language, a]
504
+ ), [b, k] = te(
505
+ () => /* @__PURE__ */ new Set([pe])
506
+ ), [D, z] = te(se(r)), R = ee(/* @__PURE__ */ new Map());
507
+ ne(() => {
508
+ k((o) => {
509
+ const v = new Set(o);
510
+ v.add(pe);
511
+ const A = new Map(t.map((B) => [B.id, B]));
512
+ let g = r ? A.get(r) : void 0;
513
+ const E = /* @__PURE__ */ new Set();
514
+ for (; g && !E.has(g.id); )
515
+ E.add(g.id), g.parentId !== null && v.add(se(g.parentId)), g = g.parentId === null ? void 0 : A.get(g.parentId);
516
+ return v;
517
+ }), z(se(r));
518
+ }, [r, t]);
519
+ const M = O(
520
+ () => on(S, b),
521
+ [S, b]
522
+ );
523
+ ne(() => {
524
+ var o;
525
+ M.some((v) => v.key === D) || z(((o = M[0]) == null ? void 0 : o.key) ?? pe);
526
+ }, [M, D]);
527
+ const _ = (o) => {
528
+ var v;
529
+ z(o), (v = R.current.get(o)) == null || v.focus();
530
+ }, V = (o, v) => {
531
+ k((A) => {
532
+ const g = new Set(A);
533
+ return v ?? !g.has(o) ? g.add(o) : g.delete(o), g;
534
+ });
535
+ }, P = (o) => {
536
+ const v = o.target.closest(
537
+ "[data-tree-key]"
538
+ ), A = v == null ? void 0 : v.getAttribute("data-tree-key");
539
+ if (!A) return;
540
+ const g = M.findIndex((L) => L.key === A);
541
+ if (g < 0) return;
542
+ const E = M[g], B = E.children.length > 0, G = b.has(A), re = F ? "ArrowLeft" : "ArrowRight", T = F ? "ArrowRight" : "ArrowLeft";
543
+ switch (o.key) {
544
+ case "ArrowDown":
545
+ g < M.length - 1 && _(M[g + 1].key);
546
+ break;
547
+ case "ArrowUp":
548
+ g > 0 && _(M[g - 1].key);
549
+ break;
550
+ case re:
551
+ B && !G ? V(A, !0) : B && G && _(E.children[0].key);
552
+ break;
553
+ case T: {
554
+ if (B && G)
555
+ V(A, !1);
556
+ else {
557
+ const L = ln(E);
558
+ L !== null && _(L);
559
+ }
560
+ break;
561
+ }
562
+ case "Home":
563
+ _(M[0].key);
564
+ break;
565
+ case "End":
566
+ _(M[M.length - 1].key);
567
+ break;
568
+ case "Enter":
569
+ case " ":
570
+ l(E.folderId);
571
+ break;
572
+ default:
573
+ return;
574
+ }
575
+ o.preventDefault(), o.stopPropagation();
576
+ }, W = (o) => {
577
+ var T;
578
+ const v = se(r) === o.key, A = b.has(o.key), g = o.children.length > 0, E = o.folderId === null ? u("fileManager.rootLabel", "All files") : ((T = o.item) == null ? void 0 : T.name) ?? "", B = A && g ? Pt : Xe, G = (L) => {
579
+ L.stopPropagation(), z(o.key), l(o.folderId), g && V(o.key, !0);
580
+ }, re = (L) => {
581
+ L.stopPropagation(), V(o.key);
582
+ };
583
+ return (
584
+ // eslint-disable-next-line jsx-a11y/click-events-have-key-events -- treeitem row; keyboard operation is handled at the role="tree" container via roving tabindex + onKeyDown
585
+ /* @__PURE__ */ x(
586
+ "li",
587
+ {
588
+ ref: (L) => {
589
+ L ? R.current.set(o.key, L) : R.current.delete(o.key);
590
+ },
591
+ role: "treeitem",
592
+ "aria-expanded": g ? A : void 0,
593
+ "aria-selected": v,
594
+ tabIndex: D === o.key ? 0 : -1,
595
+ "data-tree-key": o.key,
596
+ "data-item-id": o.folderId ?? void 0,
597
+ onClick: G,
598
+ onFocus: () => z(o.key),
599
+ className: [
600
+ "ds:list-none ds:rounded-[var(--radius-md)]",
601
+ "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
602
+ "ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]"
603
+ ].join(" "),
604
+ children: [
605
+ /* @__PURE__ */ x("div", { className: rn({ selected: v }), children: [
606
+ g ? /* @__PURE__ */ n(
607
+ "span",
608
+ {
609
+ "aria-hidden": "true",
610
+ onClick: re,
611
+ className: "ds:inline-flex ds:size-5 ds:shrink-0 ds:items-center ds:justify-center ds:text-muted-foreground",
612
+ children: /* @__PURE__ */ n(
613
+ Dt,
614
+ {
615
+ className: [
616
+ "ds:size-4",
617
+ "ds:transition-transform ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
618
+ A ? "ds:rotate-90" : "ds:rtl:rotate-180"
619
+ ].join(" ")
620
+ }
621
+ )
622
+ }
623
+ ) : /* @__PURE__ */ n("span", { "aria-hidden": "true", className: "ds:size-5 ds:shrink-0" }),
624
+ /* @__PURE__ */ n(
625
+ B,
626
+ {
627
+ "aria-hidden": "true",
628
+ className: "ds:size-4 ds:shrink-0 ds:text-muted-foreground"
629
+ }
630
+ ),
631
+ /* @__PURE__ */ n("span", { className: "ds:truncate ds:text-start", children: E })
632
+ ] }),
633
+ g && A && /* @__PURE__ */ n(
634
+ "ul",
635
+ {
636
+ role: "group",
637
+ className: "ds:m-0 ds:list-none ds:p-0 ds:ps-[var(--spacing-md)]",
638
+ children: o.children.map(W)
639
+ }
640
+ )
641
+ ]
642
+ },
643
+ o.key
644
+ )
645
+ );
646
+ };
647
+ return /* @__PURE__ */ n(
648
+ "ul",
649
+ {
650
+ role: "tree",
651
+ "aria-label": i,
652
+ onKeyDown: P,
653
+ className: "ds:m-0 ds:flex ds:flex-col ds:gap-px ds:list-none ds:p-0",
654
+ "data-testid": "file-manager-tree",
655
+ children: W(S)
656
+ }
657
+ );
658
+ }
659
+ const sn = /[\\/:*?"<>|]/g, Ae = 128;
660
+ function nt(t) {
661
+ return t.replace(sn, "").slice(0, Ae);
662
+ }
663
+ function dn({
664
+ open: t,
665
+ onOpenChange: r,
666
+ onSubmit: l
667
+ }) {
668
+ const { t: i } = J(), a = Pe(), [u, c] = te("");
669
+ ne(() => {
670
+ t && c("");
671
+ }, [t]);
672
+ const F = (S) => {
673
+ S.preventDefault();
674
+ const b = u.trim();
675
+ b.length !== 0 && l(b);
676
+ };
677
+ return /* @__PURE__ */ n(m.Root, { open: t, onOpenChange: r, children: /* @__PURE__ */ x(m.Content, { size: "sm", children: [
678
+ /* @__PURE__ */ n(m.Header, { children: /* @__PURE__ */ n(m.Title, { children: i("fileManager.dialogs.createFolder.title", "New folder") }) }),
679
+ /* @__PURE__ */ x("form", { onSubmit: F, children: [
680
+ /* @__PURE__ */ x(m.Body, { children: [
681
+ /* @__PURE__ */ n(
682
+ "label",
683
+ {
684
+ htmlFor: a,
685
+ className: "type-label ds:block ds:mb-[var(--spacing-xs)]",
686
+ children: i("fileManager.dialogs.createFolder.nameLabel", "Folder name")
687
+ }
688
+ ),
689
+ /* @__PURE__ */ n(
690
+ We,
691
+ {
692
+ id: a,
693
+ value: u,
694
+ maxLength: Ae,
695
+ onChange: (S) => c(nt(S.target.value)),
696
+ autoFocus: !0
697
+ }
698
+ )
699
+ ] }),
700
+ /* @__PURE__ */ x(m.Footer, { children: [
701
+ /* @__PURE__ */ n(m.Close, { asChild: !0, children: /* @__PURE__ */ n(X, { type: "button", intent: "outline", children: i("fileManager.dialogs.createFolder.cancel", "Cancel") }) }),
702
+ /* @__PURE__ */ n(
703
+ X,
704
+ {
705
+ type: "submit",
706
+ intent: "primary",
707
+ disabled: u.trim().length === 0,
708
+ children: i("fileManager.dialogs.createFolder.confirm", "Create folder")
709
+ }
710
+ )
711
+ ] })
712
+ ] })
713
+ ] }) });
714
+ }
715
+ function cn({
716
+ open: t,
717
+ onOpenChange: r,
718
+ onUpload: l,
719
+ destinationLabel: i,
720
+ config: a
721
+ }) {
722
+ const { t: u } = J();
723
+ return /* @__PURE__ */ n(m.Root, { open: t, onOpenChange: r, children: /* @__PURE__ */ x(m.Content, { size: "md", children: [
724
+ /* @__PURE__ */ n(m.Header, { children: /* @__PURE__ */ n(m.Title, { children: u("fileManager.dialogs.upload.title", "Upload to {{folder}}", {
725
+ folder: i
726
+ }) }) }),
727
+ /* @__PURE__ */ n(m.Body, { children: /* @__PURE__ */ n(
728
+ xt,
729
+ {
730
+ variant: "both",
731
+ multiple: (a == null ? void 0 : a.multiple) ?? !0,
732
+ accept: a == null ? void 0 : a.accept,
733
+ maxSize: a == null ? void 0 : a.maxSize,
734
+ onUpload: l
735
+ }
736
+ ) }),
737
+ /* @__PURE__ */ n(m.Footer, { children: /* @__PURE__ */ n(m.Close, { asChild: !0, children: /* @__PURE__ */ n(X, { type: "button", intent: "outline", children: u("fileManager.dialogs.upload.close", "Done") }) }) })
738
+ ] }) });
739
+ }
740
+ function un({
741
+ open: t,
742
+ onOpenChange: r,
743
+ initialName: l,
744
+ onSubmit: i
745
+ }) {
746
+ const { t: a } = J(), u = Pe(), [c, F] = te(l);
747
+ ne(() => {
748
+ t && F(l);
749
+ }, [t, l]);
750
+ const S = (b) => {
751
+ b.preventDefault();
752
+ const k = c.trim();
753
+ k.length !== 0 && i(k);
754
+ };
755
+ return /* @__PURE__ */ n(m.Root, { open: t, onOpenChange: r, children: /* @__PURE__ */ x(m.Content, { size: "sm", children: [
756
+ /* @__PURE__ */ n(m.Header, { children: /* @__PURE__ */ n(m.Title, { children: a("fileManager.dialogs.rename.title", "Rename") }) }),
757
+ /* @__PURE__ */ x("form", { onSubmit: S, children: [
758
+ /* @__PURE__ */ x(m.Body, { children: [
759
+ /* @__PURE__ */ n(
760
+ "label",
761
+ {
762
+ htmlFor: u,
763
+ className: "type-label ds:block ds:mb-[var(--spacing-xs)]",
764
+ children: a("fileManager.dialogs.rename.nameLabel", "New name")
765
+ }
766
+ ),
767
+ /* @__PURE__ */ n(
768
+ We,
769
+ {
770
+ id: u,
771
+ value: c,
772
+ maxLength: Ae,
773
+ onChange: (b) => F(nt(b.target.value)),
774
+ autoFocus: !0
775
+ }
776
+ )
777
+ ] }),
778
+ /* @__PURE__ */ x(m.Footer, { children: [
779
+ /* @__PURE__ */ n(m.Close, { asChild: !0, children: /* @__PURE__ */ n(X, { type: "button", intent: "outline", children: a("fileManager.dialogs.rename.cancel", "Cancel") }) }),
780
+ /* @__PURE__ */ n(
781
+ X,
782
+ {
783
+ type: "submit",
784
+ intent: "primary",
785
+ disabled: c.trim().length === 0,
786
+ children: a("fileManager.dialogs.rename.confirm", "Rename")
787
+ }
788
+ )
789
+ ] })
790
+ ] })
791
+ ] }) });
792
+ }
793
+ function fn({
794
+ open: t,
795
+ onOpenChange: r,
796
+ count: l,
797
+ onConfirm: i
798
+ }) {
799
+ const { t: a } = J();
800
+ return /* @__PURE__ */ n(m.Root, { open: t, onOpenChange: r, children: /* @__PURE__ */ x(m.Content, { size: "sm", variant: "alert", children: [
801
+ /* @__PURE__ */ n(m.Header, { children: /* @__PURE__ */ n(m.Title, { children: a("fileManager.dialogs.delete.title", "Delete {{count}} items?", {
802
+ count: l
803
+ }) }) }),
804
+ /* @__PURE__ */ n(m.Description, { children: a(
805
+ "fileManager.dialogs.delete.description",
806
+ "This action cannot be undone."
807
+ ) }),
808
+ /* @__PURE__ */ x(m.Footer, { children: [
809
+ /* @__PURE__ */ n(m.Close, { asChild: !0, children: /* @__PURE__ */ n(X, { type: "button", intent: "outline", children: a("fileManager.dialogs.delete.cancel", "Cancel") }) }),
810
+ /* @__PURE__ */ n(X, { type: "button", intent: "destructive", onClick: i, children: a("fileManager.dialogs.delete.confirm", "Delete") })
811
+ ] })
812
+ ] }) });
813
+ }
814
+ function pn({
815
+ open: t,
816
+ onOpenChange: r,
817
+ items: l,
818
+ movingIds: i,
819
+ currentFolderId: a,
820
+ onConfirm: u
821
+ }) {
822
+ const { t: c } = J(), [F, S] = te(a);
823
+ ne(() => {
824
+ t && S(a);
825
+ }, [t, a]);
826
+ const b = nn(l, i);
827
+ return /* @__PURE__ */ n(m.Root, { open: t, onOpenChange: r, children: /* @__PURE__ */ x(m.Content, { size: "sm", children: [
828
+ /* @__PURE__ */ n(m.Header, { children: /* @__PURE__ */ n(m.Title, { children: c("fileManager.dialogs.move.title", "Move {{count}} items", {
829
+ count: i.length
830
+ }) }) }),
831
+ /* @__PURE__ */ n(m.Body, { children: /* @__PURE__ */ n("div", { className: "ds:max-h-72 ds:overflow-y-auto ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)] ds:p-[var(--spacing-xs)]", children: /* @__PURE__ */ n(
832
+ tt,
833
+ {
834
+ items: l,
835
+ selectedFolderId: F,
836
+ onSelectFolder: S,
837
+ "aria-label": c(
838
+ "fileManager.dialogs.move.treeLabel",
839
+ "Destination folder"
840
+ ),
841
+ excludeIds: b
842
+ }
843
+ ) }) }),
844
+ /* @__PURE__ */ x(m.Footer, { children: [
845
+ /* @__PURE__ */ n(m.Close, { asChild: !0, children: /* @__PURE__ */ n(X, { type: "button", intent: "outline", children: c("fileManager.dialogs.move.cancel", "Cancel") }) }),
846
+ /* @__PURE__ */ n(
847
+ X,
848
+ {
849
+ type: "button",
850
+ intent: "primary",
851
+ onClick: () => u(F),
852
+ children: c("fileManager.dialogs.move.confirm", "Move here")
853
+ }
854
+ )
855
+ ] })
856
+ ] }) });
857
+ }
858
+ const mn = {
859
+ signed: "success",
860
+ pending: "warning"
861
+ };
862
+ function qe(t) {
863
+ return function(l) {
864
+ const i = l.data;
865
+ if (!i) return null;
866
+ const a = Jt(i), u = !!t && i.id === t;
867
+ return /* @__PURE__ */ x(
868
+ "span",
869
+ {
870
+ className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)] ds:[inline-size:100%] ds:[min-inline-size:0]",
871
+ "aria-current": u ? "true" : void 0,
872
+ children: [
873
+ /* @__PURE__ */ n(
874
+ a,
875
+ {
876
+ "aria-hidden": "true",
877
+ className: [
878
+ "ds:size-4 ds:shrink-0",
879
+ // Folders keep the brand primary; file glyphs take the accent, so
880
+ // they read as documents and match the DocumentPreview header icon.
881
+ i.kind === "folder" ? "ds:text-primary" : "ds:text-[color:var(--accent)]"
882
+ ].join(" ")
883
+ }
884
+ ),
885
+ /* @__PURE__ */ n("span", { className: "ds:truncate ds:[min-inline-size:0]", children: i.name })
886
+ ]
887
+ }
888
+ );
889
+ };
890
+ }
891
+ function gn(t) {
892
+ const r = t.data;
893
+ return !r || !r.documentType ? null : /* @__PURE__ */ n($e, { variant: "neutral", size: "sm", children: r.documentType });
894
+ }
895
+ function hn(t) {
896
+ return function(l) {
897
+ var a;
898
+ const i = (a = l.data) == null ? void 0 : a.signatureStatus;
899
+ return !i || i === "none" ? null : /* @__PURE__ */ n($e, { variant: mn[i], size: "sm", withDot: !0, children: t(`fileManager.signature.${i}`, i) });
900
+ };
901
+ }
902
+ function yn({
903
+ items: t,
904
+ selectedIds: r,
905
+ previewedItemId: l,
906
+ onSelectionChange: i,
907
+ onOpen: a,
908
+ onRowActivate: u,
909
+ can: c,
910
+ onRequestRename: F,
911
+ onRequestMove: S,
912
+ onRequestDelete: b,
913
+ onDownload: k,
914
+ onShare: D,
915
+ onRequestSignature: z,
916
+ itemActions: R,
917
+ groupByFolder: M = !1,
918
+ currentFolderId: _,
919
+ gridId: V,
920
+ tableRef: P,
921
+ toolbarActions: W
922
+ }) {
923
+ const { t: o, i18n: v } = J(), A = O(
924
+ () => new Map(t.map((f) => [f.id, f])),
925
+ [t]
926
+ ), g = O(
927
+ () => t.some(
928
+ (f) => f.signatureStatus && f.signatureStatus !== "none"
929
+ ),
930
+ [t]
931
+ ), E = O(
932
+ () => t.some((f) => !!f.documentType),
933
+ [t]
934
+ );
935
+ ne(() => {
936
+ var f;
937
+ (f = P.current) == null || f.setSelection(r);
938
+ }, [r, t]);
939
+ const B = O(() => {
940
+ const f = [];
941
+ if (k && f.push({
942
+ icon: /* @__PURE__ */ n(Ge, {}),
943
+ label: o("fileManager.toolbar.download", "Download"),
944
+ onClick: (d) => k([d.id]),
945
+ hidden: (d) => d.kind === "folder" || !c(d).download
946
+ }), z && f.push({
947
+ icon: /* @__PURE__ */ n(zt, {}),
948
+ label: o("fileManager.toolbar.requestSignature", "Request signature"),
949
+ onClick: (d) => z(d),
950
+ hidden: (d) => d.signatureStatus !== "pending"
951
+ }), D && f.push({
952
+ icon: /* @__PURE__ */ n(Je, {}),
953
+ label: o("fileManager.toolbar.share", "Share"),
954
+ onClick: (d) => D([d.id]),
955
+ hidden: (d) => !c(d).share
956
+ }), f.push({
957
+ icon: /* @__PURE__ */ n(Ue, {}),
958
+ label: o("fileManager.toolbar.rename", "Rename"),
959
+ onClick: (d) => F(d.id),
960
+ hidden: (d) => !c(d).rename
961
+ }), f.push({
962
+ icon: /* @__PURE__ */ n(Ze, {}),
963
+ label: o("fileManager.toolbar.move", "Move"),
964
+ onClick: (d) => S([d.id]),
965
+ hidden: (d) => !c(d).move
966
+ }), f.push({
967
+ icon: /* @__PURE__ */ n(Ye, {}),
968
+ label: o("fileManager.toolbar.delete", "Delete"),
969
+ onClick: (d) => b([d.id]),
970
+ variant: "destructive",
971
+ hidden: (d) => !c(d).delete
972
+ }), R) {
973
+ const d = /* @__PURE__ */ new Set();
974
+ for (const h of t)
975
+ for (const I of R(h)) {
976
+ if (d.has(I.id)) continue;
977
+ d.add(I.id);
978
+ const $ = I.id;
979
+ f.push({
980
+ icon: I.icon ?? /* @__PURE__ */ n("span", { "aria-hidden": "true" }),
981
+ label: I.label,
982
+ onClick: (w) => {
983
+ var K;
984
+ return (K = R(w).find((de) => de.id === $)) == null ? void 0 : K.onSelect(w);
985
+ },
986
+ variant: I.destructive ? "destructive" : "default",
987
+ hidden: (w) => !R(w).some((K) => K.id === $)
988
+ });
989
+ }
990
+ }
991
+ return f;
992
+ }, [
993
+ t,
994
+ c,
995
+ k,
996
+ D,
997
+ z,
998
+ F,
999
+ S,
1000
+ b,
1001
+ R,
1002
+ o
1003
+ ]), G = O(() => {
1004
+ const f = hn(o), d = qe(l), h = [];
1005
+ return M || h.push({
1006
+ colId: "name",
1007
+ field: "name",
1008
+ headerName: o("fileManager.columns.name", "Name"),
1009
+ cellRenderer: d,
1010
+ flex: 2,
1011
+ minWidth: 200
1012
+ }), E && h.push({
1013
+ colId: "documentType",
1014
+ field: "documentType",
1015
+ headerName: o("fileManager.columns.type", "Type"),
1016
+ cellRenderer: gn,
1017
+ flex: 1,
1018
+ minWidth: 120
1019
+ }), g && h.push({
1020
+ colId: "signatureStatus",
1021
+ field: "signatureStatus",
1022
+ headerName: o("fileManager.columns.signature", "Signature"),
1023
+ cellRenderer: f,
1024
+ flex: 1,
1025
+ minWidth: 150
1026
+ }), h.push({
1027
+ colId: "size",
1028
+ field: "size",
1029
+ headerName: o("fileManager.columns.size", "Size"),
1030
+ valueFormatter: (I) => {
1031
+ var $;
1032
+ return (($ = I.data) == null ? void 0 : $.kind) === "file" && I.data.size !== void 0 ? Xt(I.data.size, v.language, o) : o("fileManager.emptyCell", "—");
1033
+ },
1034
+ filter: !1,
1035
+ flex: 1,
1036
+ minWidth: 110
1037
+ }), h.push({
1038
+ colId: "updatedAt",
1039
+ field: "updatedAt",
1040
+ headerName: o("fileManager.columns.modified", "Modified"),
1041
+ valueFormatter: (I) => {
1042
+ var $;
1043
+ return ($ = I.data) != null && $.updatedAt ? new Intl.DateTimeFormat(v.language, {
1044
+ dateStyle: "medium"
1045
+ }).format(new Date(I.data.updatedAt)) : o("fileManager.emptyCell", "—");
1046
+ },
1047
+ filter: !1,
1048
+ flex: 1,
1049
+ minWidth: 130
1050
+ }), B.length > 0 && h.push({
1051
+ colId: "actions",
1052
+ headerName: o("fileManager.rowActions", "Item actions"),
1053
+ cellRenderer: Rt,
1054
+ cellRendererParams: {
1055
+ actions: B,
1056
+ group: !0,
1057
+ label: o("fileManager.rowActions", "Item actions")
1058
+ },
1059
+ sortable: !1,
1060
+ filter: !1,
1061
+ resizable: !1,
1062
+ width: It(B.length)
1063
+ }), h;
1064
+ }, [
1065
+ B,
1066
+ E,
1067
+ g,
1068
+ l,
1069
+ M,
1070
+ o,
1071
+ v.language
1072
+ ]), re = O(() => {
1073
+ const f = {
1074
+ getRowId: (d) => d.data.id,
1075
+ onRowClicked: (d) => {
1076
+ const h = d.event, I = h == null ? void 0 : h.target;
1077
+ I != null && I.closest(
1078
+ '.ag-selection-checkbox, .ag-checkbox-input-wrapper, [col-id="actions"], [data-item-kebab], .ag-group-contracted, .ag-group-expanded'
1079
+ ) || d.data && u(d.data);
1080
+ },
1081
+ onRowDoubleClicked: (d) => {
1082
+ d.data && a(d.data);
1083
+ }
1084
+ };
1085
+ if (M) {
1086
+ const d = qe(l);
1087
+ f.treeData = !0, f.getDataPath = (h) => en(h, A, _), f.groupDefaultExpanded = 1, f.autoGroupColumnDef = {
1088
+ headerName: o("fileManager.columns.name", "Name"),
1089
+ flex: 2,
1090
+ minWidth: 200,
1091
+ cellRendererParams: {
1092
+ suppressCount: !0,
1093
+ innerRenderer: d
1094
+ }
1095
+ };
1096
+ }
1097
+ return f;
1098
+ }, [
1099
+ a,
1100
+ u,
1101
+ M,
1102
+ l,
1103
+ o,
1104
+ A,
1105
+ _
1106
+ ]), T = (f) => {
1107
+ const d = f.map((h) => h.id);
1108
+ et(d, r) || i(d);
1109
+ }, L = y(
1110
+ (f) => {
1111
+ var d;
1112
+ return l && ((d = f.data) == null ? void 0 : d.id) === l ? "ag-row-selected" : void 0;
1113
+ },
1114
+ [l]
1115
+ );
1116
+ return /* @__PURE__ */ n(
1117
+ Te,
1118
+ {
1119
+ ref: P,
1120
+ gridId: V,
1121
+ columnDefs: G,
1122
+ rowData: t,
1123
+ rowSelection: "multiple",
1124
+ gridOptions: re,
1125
+ getRowClass: L,
1126
+ onSelectionChanged: T,
1127
+ heightClass: "ds:h-[420px]",
1128
+ children: /* @__PURE__ */ n(Te.Toolbar, { children: /* @__PURE__ */ n(Te.Toolbar.Actions, { children: W }) })
1129
+ }
1130
+ );
1131
+ }
1132
+ function bn({
1133
+ selectedIds: t,
1134
+ permissions: r,
1135
+ onRequestCreateFolder: l,
1136
+ onRequestUpload: i,
1137
+ addMenuItems: a,
1138
+ onRequestRename: u,
1139
+ onRequestMove: c,
1140
+ onRequestDelete: F,
1141
+ onDownload: S,
1142
+ onShare: b
1143
+ }) {
1144
+ const { t: k } = J(), D = t.length > 0, z = t.length === 1, R = r.upload && !!i, M = r.download && !!S, _ = r.share && !!b, V = a ?? [];
1145
+ return R || r.createFolder || V.length > 0 || M || _ || r.rename || r.move || r.delete ? /* @__PURE__ */ x(
1146
+ _t,
1147
+ {
1148
+ role: "toolbar",
1149
+ overflow: "menu",
1150
+ size: "sm",
1151
+ "aria-label": k("fileManager.toolbarLabel", "File actions"),
1152
+ "data-testid": "file-manager-toolbar",
1153
+ children: [
1154
+ R && /* @__PURE__ */ n(
1155
+ Q,
1156
+ {
1157
+ intent: "primary",
1158
+ "data-overflow-pin": !0,
1159
+ icon: /* @__PURE__ */ n(Lt, {}),
1160
+ tooltip: k("fileManager.toolbar.upload", "Upload files"),
1161
+ onClick: () => i == null ? void 0 : i()
1162
+ }
1163
+ ),
1164
+ r.createFolder && /* @__PURE__ */ n(
1165
+ Q,
1166
+ {
1167
+ icon: /* @__PURE__ */ n(Wt, {}),
1168
+ tooltip: k("fileManager.toolbar.newFolder", "New folder"),
1169
+ onClick: l
1170
+ }
1171
+ ),
1172
+ V.map((W) => /* @__PURE__ */ n(
1173
+ Q,
1174
+ {
1175
+ icon: W.icon ?? /* @__PURE__ */ n(Kt, {}),
1176
+ tooltip: W.label,
1177
+ onClick: () => W.onSelect()
1178
+ },
1179
+ W.id
1180
+ )),
1181
+ M && /* @__PURE__ */ n(
1182
+ Q,
1183
+ {
1184
+ icon: /* @__PURE__ */ n(Ge, {}),
1185
+ tooltip: k("fileManager.toolbar.download", "Download"),
1186
+ disabled: !D,
1187
+ onClick: () => S == null ? void 0 : S(t)
1188
+ }
1189
+ ),
1190
+ _ && /* @__PURE__ */ n(
1191
+ Q,
1192
+ {
1193
+ icon: /* @__PURE__ */ n(Je, {}),
1194
+ tooltip: k("fileManager.toolbar.share", "Share"),
1195
+ disabled: !D,
1196
+ onClick: () => b == null ? void 0 : b(t)
1197
+ }
1198
+ ),
1199
+ r.rename && /* @__PURE__ */ n(
1200
+ Q,
1201
+ {
1202
+ icon: /* @__PURE__ */ n(Ue, {}),
1203
+ tooltip: k("fileManager.toolbar.rename", "Rename"),
1204
+ disabled: !z,
1205
+ onClick: () => u(t[0])
1206
+ }
1207
+ ),
1208
+ r.move && /* @__PURE__ */ n(
1209
+ Q,
1210
+ {
1211
+ icon: /* @__PURE__ */ n(Ze, {}),
1212
+ tooltip: k("fileManager.toolbar.move", "Move"),
1213
+ disabled: !D,
1214
+ onClick: () => c(t)
1215
+ }
1216
+ ),
1217
+ r.delete && /* @__PURE__ */ n(
1218
+ Q,
1219
+ {
1220
+ icon: /* @__PURE__ */ n(Ye, {}),
1221
+ tooltip: k("fileManager.toolbar.delete", "Delete"),
1222
+ disabled: !D,
1223
+ onClick: () => F(t)
1224
+ }
1225
+ )
1226
+ ]
1227
+ }
1228
+ ) : null;
1229
+ }
1230
+ const je = Ve(
1231
+ "ds:relative ds:flex ds:w-full ds:min-w-0 ds:flex-col ds:gap-[var(--spacing-md)]",
1232
+ {
1233
+ variants: {
1234
+ bordered: {
1235
+ true: "ds:rounded-[var(--radius-lg)] ds:border ds:border-[color:var(--border)] ds:bg-background ds:p-[var(--spacing-md)]",
1236
+ false: ""
1237
+ }
1238
+ },
1239
+ defaultVariants: { bordered: !0 }
1240
+ }
1241
+ ), Fe = {
1242
+ createFolder: !0,
1243
+ upload: !0,
1244
+ download: !0,
1245
+ rename: !0,
1246
+ move: !0,
1247
+ delete: !0,
1248
+ share: !0
1249
+ }, vn = yt(
1250
+ ({
1251
+ id: t,
1252
+ items: r,
1253
+ permissions: l,
1254
+ folderId: i,
1255
+ defaultFolderId: a = null,
1256
+ onNavigate: u,
1257
+ onSelectionChange: c,
1258
+ showTree: F = !1,
1259
+ isLoading: S = !1,
1260
+ onOpenFile: b,
1261
+ onCreateFolder: k,
1262
+ onRenameItem: D,
1263
+ onDeleteItems: z,
1264
+ onMoveItems: R,
1265
+ onDownloadItems: M,
1266
+ onShare: _,
1267
+ onRequestSignature: V,
1268
+ onUpload: P,
1269
+ uploadConfig: W,
1270
+ onPreviewItem: o,
1271
+ previewedItemId: v,
1272
+ itemActions: A,
1273
+ addMenuItems: g,
1274
+ groupByFolder: E = !1,
1275
+ bordered: B,
1276
+ className: G
1277
+ }, re) => {
1278
+ var Be;
1279
+ const { t: T, i18n: L } = J(), f = y(
1280
+ (e) => typeof l == "function" ? e ? { ...Fe, ...l(e) } : Fe : { ...Fe, ...l ?? {} },
1281
+ [l]
1282
+ ), d = O(() => f(), [f]), h = y(
1283
+ (e) => f(e),
1284
+ [f]
1285
+ ), [I, $] = Mt({
1286
+ value: i,
1287
+ defaultValue: a,
1288
+ onChange: u
1289
+ }), w = I ?? null, [K, de] = te([]), [C, De] = te({
1290
+ type: "none"
1291
+ }), [rt, ye] = te(!1), ce = ee(0), be = ee(null), ve = ee(null), Re = y((e) => {
1292
+ ve.current && (ve.current.textContent = e);
1293
+ }, []), Ie = ee(null), ke = ee(!1), N = O(
1294
+ () => new Map(r.map((e) => [e.id, e])),
1295
+ [r]
1296
+ ), Y = y(
1297
+ (e) => {
1298
+ de((s) => {
1299
+ const p = e.filter((H) => N.has(H));
1300
+ return et(s, p) ? s : (c == null || c(p), p);
1301
+ });
1302
+ },
1303
+ [N, c]
1304
+ );
1305
+ ne(() => {
1306
+ de((e) => {
1307
+ const s = e.filter((p) => N.has(p));
1308
+ return s.length === e.length ? e : s;
1309
+ });
1310
+ }, [N]);
1311
+ const Z = y(
1312
+ (e) => {
1313
+ var p;
1314
+ if (e !== null) {
1315
+ const H = N.get(e);
1316
+ if (!H || H.kind !== "folder") return;
1317
+ }
1318
+ $(e), de([]), ke.current = !0;
1319
+ const s = e === null ? T("fileManager.rootLabel", "All files") : ((p = N.get(e)) == null ? void 0 : p.name) ?? "";
1320
+ Re(
1321
+ T("fileManager.announce.navigated", "Opened {{name}}", { name: s })
1322
+ );
1323
+ },
1324
+ [N, $, Re, T]
1325
+ );
1326
+ ne(() => {
1327
+ var e;
1328
+ ke.current && (ke.current = !1, (e = Ie.current) == null || e.focus());
1329
+ }, [w]);
1330
+ const ze = v && N.has(v) ? v : w, Me = O(
1331
+ () => tn(r, ze),
1332
+ [r, ze]
1333
+ ), ue = O(
1334
+ () => Qe(r, w, L.language),
1335
+ [r, w, L.language]
1336
+ ), at = O(
1337
+ () => E ? Qt(r, w, L.language) : ue,
1338
+ [E, r, w, L.language, ue]
1339
+ ), _e = w === null ? T("fileManager.rootLabel", "All files") : ((Be = N.get(w)) == null ? void 0 : Be.name) ?? "", U = y((e) => {
1340
+ De((s) => s.type === "none" ? e : s);
1341
+ }, []), q = y(() => {
1342
+ De({ type: "none" });
1343
+ }, []), it = y(() => {
1344
+ !d.createFolder || !k || U({ type: "create-folder" });
1345
+ }, [d.createFolder, k, U]), Ce = y(() => {
1346
+ !d.upload || !P || U({ type: "upload" });
1347
+ }, [d.upload, P, U]), oe = y(
1348
+ (e) => {
1349
+ const s = N.get(e);
1350
+ !s || !h(s).rename || !D || U({ type: "rename", itemId: e });
1351
+ },
1352
+ [h, D, N, U]
1353
+ ), me = y(
1354
+ (e) => {
1355
+ if (!z || e.length === 0) return;
1356
+ const s = e.filter((p) => {
1357
+ const H = N.get(p);
1358
+ return H ? h(H).delete : !1;
1359
+ });
1360
+ s.length !== 0 && U({ type: "delete", itemIds: s });
1361
+ },
1362
+ [h, z, N, U]
1363
+ ), Le = y(
1364
+ (e) => {
1365
+ if (!R || e.length === 0) return;
1366
+ const s = e.filter((p) => {
1367
+ const H = N.get(p);
1368
+ return H ? h(H).move : !1;
1369
+ });
1370
+ s.length !== 0 && U({ type: "move", itemIds: s });
1371
+ },
1372
+ [h, R, N, U]
1373
+ ), Ke = y(
1374
+ (e) => {
1375
+ if (!M || e.length === 0) return;
1376
+ const s = e.filter((p) => {
1377
+ const H = N.get(p);
1378
+ return H ? h(H).download : !1;
1379
+ });
1380
+ s.length > 0 && M(s);
1381
+ },
1382
+ [h, M, N]
1383
+ ), Ee = y(
1384
+ (e) => {
1385
+ if (!_ || e.length === 0) return;
1386
+ const s = e.filter((p) => {
1387
+ const H = N.get(p);
1388
+ return H ? h(H).share : !1;
1389
+ });
1390
+ s.length > 0 && _(s);
1391
+ },
1392
+ [h, _, N]
1393
+ ), fe = y(
1394
+ (e) => {
1395
+ e.kind === "folder" ? Z(e.id) : b == null || b(e);
1396
+ },
1397
+ [Z, b]
1398
+ ), we = y(
1399
+ (e) => {
1400
+ e.kind === "folder" ? Z(e.id) : (Y([e.id]), o == null || o(e));
1401
+ },
1402
+ [Z, Y, o]
1403
+ ), ot = y(
1404
+ (e) => {
1405
+ k == null || k(e, w), q();
1406
+ },
1407
+ [k, w, q]
1408
+ ), lt = y(
1409
+ (e) => {
1410
+ C.type === "rename" && (D == null || D(C.itemId, e)), q();
1411
+ },
1412
+ [C, D, q]
1413
+ ), st = y(() => {
1414
+ C.type === "delete" && (z == null || z(C.itemIds), Y([])), q();
1415
+ }, [C, z, Y, q]), dt = y(
1416
+ (e) => {
1417
+ C.type === "move" && (R == null || R(C.itemIds, e)), q();
1418
+ },
1419
+ [C, R, q]
1420
+ ), ct = y(
1421
+ (e, s) => P ? P(e, s, w) : Promise.resolve(),
1422
+ [P, w]
1423
+ ), j = d.upload && !!P, xe = (e) => {
1424
+ var s;
1425
+ return Array.from(((s = e.dataTransfer) == null ? void 0 : s.types) ?? []).includes("Files");
1426
+ }, ut = y(
1427
+ (e) => {
1428
+ !j || !xe(e) || (e.preventDefault(), ce.current += 1, ye(!0));
1429
+ },
1430
+ [j]
1431
+ ), ft = y(
1432
+ (e) => {
1433
+ !j || !xe(e) || e.preventDefault();
1434
+ },
1435
+ [j]
1436
+ ), pt = y(() => {
1437
+ j && (ce.current = Math.max(0, ce.current - 1), ce.current === 0 && ye(!1));
1438
+ }, [j]), mt = y(
1439
+ (e) => {
1440
+ !j || !xe(e) || (e.preventDefault(), ce.current = 0, ye(!1), Ce());
1441
+ },
1442
+ [j, Ce]
1443
+ ), gt = y(
1444
+ (e) => {
1445
+ if (!(C.type !== "none" || e.target.closest('input, textarea, [contenteditable="true"]')))
1446
+ if (e.key === "F2" && K.length === 1)
1447
+ e.preventDefault(), oe(K[0]);
1448
+ else if (e.key === "Delete" && K.length > 0)
1449
+ e.preventDefault(), me(K);
1450
+ else if (e.key === "Enter" && K.length === 1) {
1451
+ const p = N.get(K[0]);
1452
+ p && (e.preventDefault(), p.kind === "file" && o ? we(p) : fe(p));
1453
+ } else e.key.toLowerCase() === "a" && (e.metaKey || e.ctrlKey) && (e.preventDefault(), Y(ue.map((p) => p.id)));
1454
+ },
1455
+ [
1456
+ C.type,
1457
+ K,
1458
+ N,
1459
+ oe,
1460
+ me,
1461
+ fe,
1462
+ we,
1463
+ o,
1464
+ Y,
1465
+ ue
1466
+ ]
1467
+ ), ae = ee({
1468
+ selectedIds: K,
1469
+ currentFolderId: w,
1470
+ items: r,
1471
+ activeAction: C
1472
+ });
1473
+ ae.current = {
1474
+ selectedIds: K,
1475
+ currentFolderId: w,
1476
+ items: r,
1477
+ activeAction: C
1478
+ };
1479
+ const le = ee({
1480
+ setSelection: Y,
1481
+ navigateTo: Z,
1482
+ openItem: fe,
1483
+ requestRename: oe
1484
+ });
1485
+ le.current = {
1486
+ setSelection: Y,
1487
+ navigateTo: Z,
1488
+ openItem: fe,
1489
+ requestRename: oe
1490
+ };
1491
+ const Se = O(
1492
+ () => ({
1493
+ getSelection: () => [...ae.current.selectedIds],
1494
+ setSelection: (e) => le.current.setSelection(e),
1495
+ clearSelection: () => le.current.setSelection([]),
1496
+ getCurrentFolderId: () => ae.current.currentFolderId,
1497
+ navigateTo: (e) => le.current.navigateTo(e),
1498
+ getTypeFilter: () => {
1499
+ var p;
1500
+ const s = (((p = be.current) == null ? void 0 : p.getFilter()) ?? {}).documentType;
1501
+ return typeof (s == null ? void 0 : s.filter) == "string" ? [s.filter] : [];
1502
+ },
1503
+ setTypeFilter: (e) => {
1504
+ var p;
1505
+ const s = (p = be.current) == null ? void 0 : p.getRawApi();
1506
+ if (s) {
1507
+ if (e.length === 0) {
1508
+ s.destroyFilter("documentType");
1509
+ return;
1510
+ }
1511
+ s.setColumnFilterModel("documentType", {
1512
+ type: "equals",
1513
+ filter: e[0]
1514
+ }), s.onFilterChanged();
1515
+ }
1516
+ },
1517
+ getItems: (e) => ae.current.items.filter(
1518
+ (s) => e === void 0 ? !0 : s.parentId === e
1519
+ ).map((s) => ({
1520
+ id: s.id,
1521
+ kind: s.kind,
1522
+ parentId: s.parentId,
1523
+ size: s.size,
1524
+ updatedAt: s.updatedAt,
1525
+ documentType: s.documentType,
1526
+ signatureStatus: s.signatureStatus
1527
+ })),
1528
+ getItemNames: (e) => {
1529
+ const s = new Set(e);
1530
+ return ae.current.items.filter((p) => s.has(p.id)).map((p) => ({ id: p.id, name: p.name }));
1531
+ },
1532
+ openItem: (e) => {
1533
+ const s = ae.current.items.find((p) => p.id === e);
1534
+ s && le.current.openItem(s);
1535
+ },
1536
+ startRename: (e) => le.current.requestRename(e),
1537
+ getActiveAction: () => ae.current.activeAction.type
1538
+ }),
1539
+ []
1540
+ );
1541
+ bt(re, () => Se, [Se]), Ct(Yt, Se, t);
1542
+ const Ne = C.type === "rename" ? N.get(C.itemId) : void 0;
1543
+ if (S)
1544
+ return /* @__PURE__ */ x(
1545
+ "div",
1546
+ {
1547
+ "data-component": "file-manager",
1548
+ "data-component-id": t,
1549
+ role: "region",
1550
+ "aria-label": T("fileManager.regionLabel", "File manager"),
1551
+ "aria-busy": "true",
1552
+ className: je({ bordered: B, className: G }),
1553
+ children: [
1554
+ /* @__PURE__ */ x("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
1555
+ /* @__PURE__ */ n(he, { variant: "rectangular", size: "sm", className: "ds:w-24" }),
1556
+ /* @__PURE__ */ n(
1557
+ he,
1558
+ {
1559
+ variant: "rectangular",
1560
+ size: "sm",
1561
+ className: "ds:ms-auto ds:w-48"
1562
+ }
1563
+ )
1564
+ ] }),
1565
+ /* @__PURE__ */ n(he, { variant: "text", size: "sm", className: "ds:w-40" }),
1566
+ /* @__PURE__ */ n("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [0, 1, 2, 3, 4].map((e) => /* @__PURE__ */ n(he, { variant: "rectangular", size: "sm" }, e)) })
1567
+ ]
1568
+ }
1569
+ );
1570
+ const ht = /* @__PURE__ */ n(
1571
+ bn,
1572
+ {
1573
+ selectedIds: K,
1574
+ permissions: d,
1575
+ onRequestCreateFolder: it,
1576
+ onRequestUpload: j ? Ce : void 0,
1577
+ addMenuItems: g,
1578
+ onRequestRename: oe,
1579
+ onRequestMove: Le,
1580
+ onRequestDelete: me,
1581
+ onDownload: d.download && M ? Ke : void 0,
1582
+ onShare: d.share && _ ? Ee : void 0
1583
+ }
1584
+ );
1585
+ return (
1586
+ // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions -- container-level keyboard shortcuts + drag-and-drop upload; interactive children remain individually operable
1587
+ /* @__PURE__ */ x(
1588
+ "div",
1589
+ {
1590
+ "data-component": "file-manager",
1591
+ "data-component-id": t,
1592
+ role: "region",
1593
+ "aria-label": T("fileManager.regionLabel", "File manager"),
1594
+ onKeyDown: gt,
1595
+ onDragEnter: j ? ut : void 0,
1596
+ onDragOver: j ? ft : void 0,
1597
+ onDragLeave: j ? pt : void 0,
1598
+ onDrop: j ? mt : void 0,
1599
+ className: je({ bordered: B, className: G }),
1600
+ children: [
1601
+ /* @__PURE__ */ x("div", { className: "ds:flex ds:min-h-0 ds:items-start ds:gap-[var(--spacing-md)]", children: [
1602
+ F && /* @__PURE__ */ n("div", { className: "ds:hidden ds:w-56 ds:shrink-0 ds:md:block", children: /* @__PURE__ */ n(
1603
+ tt,
1604
+ {
1605
+ items: r,
1606
+ selectedFolderId: w,
1607
+ onSelectFolder: Z,
1608
+ "aria-label": T("fileManager.treeLabel", "Folders")
1609
+ }
1610
+ ) }),
1611
+ /* @__PURE__ */ n(
1612
+ "div",
1613
+ {
1614
+ ref: Ie,
1615
+ tabIndex: -1,
1616
+ className: "ds:min-w-0 ds:flex-1 ds:outline-none",
1617
+ children: ue.length === 0 ? /* @__PURE__ */ n(
1618
+ kt,
1619
+ {
1620
+ variant: "first-use",
1621
+ size: "sm",
1622
+ title: T(
1623
+ "fileManager.empty.folderTitle",
1624
+ "This folder is empty"
1625
+ ),
1626
+ description: T(
1627
+ "fileManager.empty.folderDescription",
1628
+ "Upload files or create a folder to get started."
1629
+ )
1630
+ }
1631
+ ) : (
1632
+ /* Remount on folder change so the DataTable's column filters
1633
+ reset cleanly for the new folder. */
1634
+ /* @__PURE__ */ n(
1635
+ yn,
1636
+ {
1637
+ items: at,
1638
+ currentFolderId: w,
1639
+ selectedIds: K,
1640
+ previewedItemId: v ?? null,
1641
+ onSelectionChange: Y,
1642
+ onOpen: fe,
1643
+ onRowActivate: we,
1644
+ can: h,
1645
+ onRequestRename: oe,
1646
+ onRequestMove: Le,
1647
+ onRequestDelete: me,
1648
+ onDownload: d.download && M ? Ke : void 0,
1649
+ onShare: d.share && _ ? Ee : void 0,
1650
+ onRequestSignature: V,
1651
+ itemActions: A,
1652
+ groupByFolder: E,
1653
+ gridId: t ? `${t}-list` : void 0,
1654
+ tableRef: be,
1655
+ toolbarActions: ht
1656
+ },
1657
+ w ?? "__root__"
1658
+ )
1659
+ )
1660
+ }
1661
+ )
1662
+ ] }),
1663
+ /* @__PURE__ */ n("div", { className: "ds:mt-[var(--spacing-sm)] ds:border-t ds:border-[color:var(--border)] ds:pt-[var(--spacing-sm)] ds:text-muted-foreground", children: /* @__PURE__ */ x(
1664
+ vt,
1665
+ {
1666
+ "aria-label": T("fileManager.breadcrumbLabel", "Folder path"),
1667
+ disableCollapse: !0,
1668
+ children: [
1669
+ /* @__PURE__ */ n(He, { children: Me.length === 0 ? /* @__PURE__ */ n(ge, { children: T("fileManager.rootLabel", "All files") }) : /* @__PURE__ */ n(ge, { asChild: !0, children: /* @__PURE__ */ n("button", { type: "button", onClick: () => Z(null), children: T("fileManager.rootLabel", "All files") }) }) }),
1670
+ Me.map((e, s) => /* @__PURE__ */ n(He, { children: s === Me.length - 1 ? /* @__PURE__ */ n(ge, { children: e.name }) : /* @__PURE__ */ n(ge, { asChild: !0, children: /* @__PURE__ */ n("button", { type: "button", onClick: () => Z(e.id), children: e.name }) }) }, e.id))
1671
+ ]
1672
+ }
1673
+ ) }),
1674
+ /* @__PURE__ */ n("p", { role: "status", "aria-live": "polite", className: "ds:sr-only", children: K.length > 0 ? T("fileManager.selected", "{{count}} items selected", {
1675
+ count: K.length
1676
+ }) : "" }),
1677
+ rt && /* @__PURE__ */ x(
1678
+ "div",
1679
+ {
1680
+ "aria-hidden": "true",
1681
+ className: "ds:pointer-events-none ds:absolute ds:inset-0 ds:z-20 ds:flex ds:flex-col ds:items-center ds:justify-center ds:gap-[var(--spacing-sm)] ds:rounded-[var(--radius-lg)] ds:border-2 ds:border-dashed ds:border-primary ds:bg-primary/10",
1682
+ children: [
1683
+ /* @__PURE__ */ n(St, { className: "ds:size-8 ds:text-primary" }),
1684
+ /* @__PURE__ */ n("span", { className: "type-label ds:text-primary", children: T(
1685
+ "fileManager.dropOverlay",
1686
+ "Drop files to upload to {{folder}}",
1687
+ {
1688
+ folder: _e
1689
+ }
1690
+ ) })
1691
+ ]
1692
+ }
1693
+ ),
1694
+ /* @__PURE__ */ n(
1695
+ "span",
1696
+ {
1697
+ ref: ve,
1698
+ role: "status",
1699
+ "aria-live": "polite",
1700
+ className: "ds:sr-only"
1701
+ }
1702
+ ),
1703
+ /* @__PURE__ */ n(
1704
+ dn,
1705
+ {
1706
+ open: C.type === "create-folder",
1707
+ onOpenChange: (e) => {
1708
+ e || q();
1709
+ },
1710
+ onSubmit: ot
1711
+ }
1712
+ ),
1713
+ /* @__PURE__ */ n(
1714
+ cn,
1715
+ {
1716
+ open: C.type === "upload",
1717
+ onOpenChange: (e) => {
1718
+ e || q();
1719
+ },
1720
+ onUpload: ct,
1721
+ destinationLabel: _e,
1722
+ config: W
1723
+ }
1724
+ ),
1725
+ /* @__PURE__ */ n(
1726
+ un,
1727
+ {
1728
+ open: C.type === "rename",
1729
+ onOpenChange: (e) => {
1730
+ e || q();
1731
+ },
1732
+ initialName: (Ne == null ? void 0 : Ne.name) ?? "",
1733
+ onSubmit: lt
1734
+ }
1735
+ ),
1736
+ /* @__PURE__ */ n(
1737
+ fn,
1738
+ {
1739
+ open: C.type === "delete",
1740
+ onOpenChange: (e) => {
1741
+ e || q();
1742
+ },
1743
+ count: C.type === "delete" ? C.itemIds.length : 0,
1744
+ onConfirm: st
1745
+ }
1746
+ ),
1747
+ /* @__PURE__ */ n(
1748
+ pn,
1749
+ {
1750
+ open: C.type === "move",
1751
+ onOpenChange: (e) => {
1752
+ e || q();
1753
+ },
1754
+ items: r,
1755
+ movingIds: C.type === "move" ? C.itemIds : [],
1756
+ currentFolderId: w,
1757
+ onConfirm: dt
1758
+ }
1759
+ )
1760
+ ]
1761
+ }
1762
+ )
1763
+ );
1764
+ }
1765
+ );
1766
+ vn.displayName = "FileManager";
1767
+ export {
1768
+ vn as F,
1769
+ Yt as f
1770
+ };
1771
+ //# sourceMappingURL=file-manager-DfTG7bxx.js.map