@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
@@ -7,7 +7,7 @@ import { P as A } from "./progress-DA413-zn.js";
7
7
  import { T as C } from "./timestamp-BV2lC-wV.js";
8
8
  import { T as L } from "./transaction-chip-DJCstquX.js";
9
9
  import { A as O, b as G, c as Y, a as $ } from "./accordion-C11v9ouP.js";
10
- import { C as q } from "./care-plan-entry-card-CRbS-G00.js";
10
+ import { C as q } from "./care-plan-entry-card-DWEdCQM3.js";
11
11
  import { u as J } from "./registry-DvAUVLHh.js";
12
12
  import { C as Q, e as W } from "./entity-card-9_62gY7l.js";
13
13
  import { i as X } from "./is-safe-url-DkETxeHz.js";
@@ -253,4 +253,4 @@ export {
253
253
  de as C,
254
254
  Z as c
255
255
  };
256
- //# sourceMappingURL=care-plan-card-CfIP3Vc1.js.map
256
+ //# sourceMappingURL=care-plan-card-BrwhyIJI.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"care-plan-card-CfIP3Vc1.js","sources":["../../src/components/care-plan-card/care-plan-card.agent.ts","../../src/components/care-plan-card/care-plan-card.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — CarePlanCard. */\n/* */\n/* Read-only surface: expose the plan's lifecycle state and line-progress */\n/* counts so an agent can introspect a care plan's status. State enum + */\n/* counts only — never the plan name, operator, treatment names, or any */\n/* patient identity. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { CarePlanCardHandle } from './care-plan-card';\n\nexport const carePlanCardAgent: AgentAdapter<CarePlanCardHandle> = {\n id: 'care-plan-card',\n // `expand` is host-delegated: the treatment-line list is an in-component\n // Accordion the user (or a host) drives directly — there is no handle\n // method for it, so no backing action is registered. `view_change` was\n // dropped: the card has no view modes to switch between.\n capabilities: ['expand'],\n state: {\n state: {\n type: \"'estimate' | 'accepted' | 'discarded' | 'closed'\",\n descriptionKey: 'ui.agent.carePlanCard.state.state',\n description:\n 'The plan lifecycle state. Enum value only — never the localised label or any PHI.',\n read: (handle) => handle.getState(),\n },\n progress: {\n type: '{ done: number; total: number }',\n descriptionKey: 'ui.agent.carePlanCard.state.progress',\n description:\n 'Line progress as done / total counts. Counts only — never treatment names or operator identity.',\n read: (handle) => handle.getProgress(),\n },\n },\n actions: {},\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'care-plan-card',\n description: 'Marks the CarePlanCard root region.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop. Addresses a specific plan.',\n },\n },\n};\n","import { forwardRef, useId, type HTMLAttributes } from 'react';\nimport { type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { Badge } from '../badge/badge';\nimport { Link } from '../link/link';\nimport { Progress } from '../progress/progress';\nimport { Timestamp } from '../timestamp/timestamp';\nimport { TransactionChip } from '../transaction-chip/transaction-chip';\nimport {\n Accordion,\n AccordionItem,\n AccordionTrigger,\n AccordionContent,\n} from '../accordion/accordion';\nimport {\n CarePlanEntryCard,\n type CarePlanEntryCardProps,\n} from '../care-plan-entry-card';\nimport {\n entitySurfaceVariants,\n CARE_PLAN_STATE_BADGE,\n isSafeEntityUrl,\n type CarePlanState,\n} from '../_shared/entity-card';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { carePlanCardAgent } from './care-plan-card.agent';\n\n/* -------------------------------------------------------------------- */\n/* CarePlanCard */\n/* */\n/* The summary card for a whole care plan / estimate (\"preventivo\"). */\n/* Replaces the hand-rolled platform care-plan header that interleaves */\n/* the plan number + name, a lifecycle badge, the financial figures */\n/* (billed / due / overdue), an acceptance/closure date, a phase- */\n/* progress bar, an optional deep link, and an expandable list of the */\n/* plan's treatment lines. */\n/* */\n/* Composes: entitySurfaceVariants (shared card surface) + Badge */\n/* (lifecycle state) + TransactionChip (money) + Progress (done/total) */\n/* + Timestamp (dates) + Link (deep link) + Accordion (entries rendered */\n/* as <CarePlanEntryCard> rows). */\n/* */\n/* All visible text flows through useTranslation('ui') against the */\n/* `carePlanCard.*` namespace — the lifecycle state is ALWAYS shown as a */\n/* localised label, never the raw server string. Identifiers + structural */\n/* state only reach the agent layer — never patient identity. */\n/* -------------------------------------------------------------------- */\n\n/* -------------------------------------------------------------------- */\n/* Public types */\n/* -------------------------------------------------------------------- */\n\n/**\n * A single treatment line within the plan. Each ref is forwarded straight\n * to a `<CarePlanEntryCard>` rendered inside the Accordion. `entryId` keys\n * the row and surfaces as the line's `data-component-id`.\n */\nexport interface CarePlanEntryRef extends Omit<\n CarePlanEntryCardProps,\n 'id' | 'surface'\n> {\n /** Stable line id — identifier only, never PHI. */\n entryId: string;\n}\n\n/** Financial figures for the plan, all amounts in integer cents. */\nexport interface CarePlanAmounts {\n /** Full list price in cents (non-negative). */\n priceCents?: number;\n /** Discounted / agreed price in cents (non-negative). */\n discountedPriceCents?: number;\n /** Amount already invoiced in cents (non-negative). */\n billedAmountCents?: number;\n /** Outstanding amount still due in cents (non-negative). */\n dueCents?: number;\n /** How many days the due amount is overdue (non-negative). */\n overdueDays?: number;\n}\n\n/** Phase / line progress for the plan. */\nexport interface CarePlanProgress {\n /** Number of executed / completed lines. */\n done: number;\n /** Total number of lines. */\n total: number;\n}\n\n/** Lifecycle dates for the plan, all ISO-8601 strings. */\nexport interface CarePlanDates {\n /** When the plan was accepted. */\n acceptedIso?: string;\n /** When the plan was closed. */\n closedIso?: string;\n /** When the plan was discarded / rejected. */\n discardedIso?: string;\n}\n\n/** Curated read-only handle exposed to the agent registry. */\nexport interface CarePlanCardHandle {\n /** The plan's lifecycle state. */\n getState: () => CarePlanState;\n /** Line progress as `{ done, total }` — counts only, no PHI. */\n getProgress: () => { done: number; total: number };\n}\n\nexport interface CarePlanCardProps extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'aria-label' | 'title' | 'children'\n> {\n /**\n * Stable instance id — surfaced as `data-component-id` for the agent\n * registry and mirrored to the DOM `id`; also wires the heading ↔ region\n * relationship.\n */\n id?: string;\n /** Plan number (e.g. estimate number). Rendered beside the name. */\n number: string | number;\n /** Plan name / title. Rendered as the card heading. */\n name?: string;\n /** Lifecycle state — drives a localised Badge label. */\n state: CarePlanState;\n /** Optional deep link to the full plan. Guarded by `isSafeEntityUrl`. */\n url?: string;\n /** Financial figures (billed / due / overdue …). */\n amounts?: CarePlanAmounts;\n /** Line progress (done / total). */\n progress?: CarePlanProgress;\n /** Lifecycle dates (accepted / closed / discarded). */\n dates?: CarePlanDates;\n /** Reason the plan was discarded — shown only when `state === 'discarded'`. */\n discardReason?: string;\n /**\n * Dentition the plan applies to — forwarded to each entry card's tooth\n * display where relevant. Structural only.\n */\n dentitionMode?: 'permanent' | 'deciduous';\n /** Treatment lines — rendered as `<CarePlanEntryCard>` rows in an Accordion. */\n entries?: CarePlanEntryRef[];\n /** BCP 47 locale override for dates / currency. Defaults to i18n.language. */\n locale?: string;\n /** ISO 4217 currency code for the money chips. Defaults to `EUR`. */\n currency?: string;\n /**\n * `elevated` (default) paints the kit card chrome; `flat` drops it for use\n * inside an existing Card / Sheet.\n */\n surface?: 'flat' | 'elevated';\n /** Fires when the plan deep link / heading is activated. */\n onActivate?: () => void;\n /** Accessible label override for the plan region. */\n 'aria-label'?: string;\n}\n\n/* -------------------------------------------------------------------- */\n/* Helpers */\n/* -------------------------------------------------------------------- */\n\nconst DEFAULT_CURRENCY = 'EUR';\n\n/**\n * English fallbacks for the lifecycle-state labels. The canonical strings\n * live in the `ui.carePlanCard.state.*` bundle; these inline defaults guard\n * against a stale / not-yet-wired bundle so a raw key never reaches the UI.\n */\nconst STATE_LABEL_FALLBACK: Record<CarePlanState, string> = {\n estimate: 'Estimate',\n accepted: 'Accepted',\n discarded: 'Discarded',\n closed: 'Closed',\n};\n\n/* -------------------------------------------------------------------- */\n/* Component */\n/* -------------------------------------------------------------------- */\n\nexport const CarePlanCard = forwardRef<HTMLDivElement, CarePlanCardProps>(\n (\n {\n id,\n number,\n name,\n state,\n url,\n amounts,\n progress,\n dates,\n discardReason,\n dentitionMode: _dentitionMode,\n entries,\n locale,\n currency = DEFAULT_CURRENCY,\n surface = 'elevated',\n onActivate,\n 'aria-label': ariaLabel,\n className,\n ...rest\n },\n ref,\n ) => {\n const { t, i18n } = useTranslation();\n const headingId = useId();\n const progressLabelId = useId();\n const activeLocale = locale ?? i18n.language ?? 'en';\n\n useAgentRegistration(\n carePlanCardAgent,\n {\n getState: () => state,\n getProgress: () => ({\n done: progress?.done ?? 0,\n total: progress?.total ?? 0,\n }),\n },\n id,\n );\n\n const stateLabel = t(`carePlanCard.state.${state}`, {\n defaultValue: STATE_LABEL_FALLBACK[state],\n });\n const stateBadgeVariant = CARE_PLAN_STATE_BADGE[state];\n const hasSafeUrl = !!url && isSafeEntityUrl(url);\n const hasEntries = !!entries && entries.length > 0;\n\n // Money: prefer the outstanding \"due\" chip; mark it overdue when it has\n // run past its term. Anything billed shows a settled chip alongside.\n const dueCents = amounts?.dueCents;\n const billedCents = amounts?.billedAmountCents;\n const overdueDays = amounts?.overdueDays;\n const isOverdue =\n typeof overdueDays === 'number' &&\n overdueDays > 0 &&\n typeof dueCents === 'number' &&\n dueCents > 0;\n\n const headingNode = (\n <h3\n id={headingId}\n className=\"type-title-card ds:m-0 ds:text-[color:var(--foreground)]\"\n >\n {name ?? t('carePlanCard.untitled', 'Untitled plan')}\n </h3>\n );\n\n return (\n <div\n ref={ref}\n role=\"region\"\n aria-label={ariaLabel}\n aria-labelledby={ariaLabel ? undefined : headingId}\n data-component=\"care-plan-card\"\n data-component-id={id}\n data-state={state}\n id={id}\n className={entitySurfaceVariants({ surface, className })}\n {...rest}\n >\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-md)]\">\n {/* Heading row: number + name + lifecycle badge */}\n <div className=\"ds:flex ds:items-start ds:gap-[var(--spacing-sm)]\">\n <div className=\"ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]\">\n <span className=\"type-eyebrow ds:text-[color:var(--muted-foreground)] ds:tabular-nums\">\n {t('carePlanCard.number', {\n number,\n defaultValue: 'Plan #{{number}}',\n })}\n </span>\n {hasSafeUrl ? (\n <Link\n href={url as string}\n weight=\"strong\"\n onClick={(event) => {\n if (\n event.defaultPrevented ||\n event.metaKey ||\n event.ctrlKey ||\n event.shiftKey\n ) {\n return;\n }\n onActivate?.();\n }}\n >\n {headingNode}\n </Link>\n ) : (\n headingNode\n )}\n </div>\n\n <Badge\n variant={stateBadgeVariant}\n size=\"sm\"\n withDot\n className=\"ds:shrink-0\"\n >\n {stateLabel}\n </Badge>\n </div>\n\n {/* Discard reason — only when discarded */}\n {state === 'discarded' && discardReason ? (\n <p className=\"type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]\">\n <span className=\"ds:font-medium ds:text-[color:var(--foreground)]\">\n {t('carePlanCard.discardReasonLabel', 'Discard reason:')}\n </span>{' '}\n {discardReason}\n </p>\n ) : null}\n\n {/* Lifecycle date line */}\n {dates ? (\n <div className=\"type-body-sm ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-md)] ds:text-[color:var(--muted-foreground)]\">\n {dates.acceptedIso ? (\n <span className=\"ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]\">\n <span>{t('carePlanCard.date.accepted', 'Accepted')}</span>\n <Timestamp\n value={dates.acceptedIso}\n format=\"absolute\"\n locale={activeLocale}\n />\n </span>\n ) : null}\n {dates.closedIso ? (\n <span className=\"ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]\">\n <span>{t('carePlanCard.date.closed', 'Closed')}</span>\n <Timestamp\n value={dates.closedIso}\n format=\"absolute\"\n locale={activeLocale}\n />\n </span>\n ) : null}\n {dates.discardedIso ? (\n <span className=\"ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]\">\n <span>{t('carePlanCard.date.discarded', 'Discarded')}</span>\n <Timestamp\n value={dates.discardedIso}\n format=\"absolute\"\n locale={activeLocale}\n />\n </span>\n ) : null}\n </div>\n ) : null}\n\n {/* Money: due / overdue / billed chips */}\n {typeof dueCents === 'number' || typeof billedCents === 'number' ? (\n <div className=\"ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]\">\n {typeof dueCents === 'number' && dueCents > 0 ? (\n <div className=\"ds:flex ds:items-center ds:gap-[var(--spacing-xs)]\">\n <TransactionChip\n state=\"debt\"\n amount={dueCents / 100}\n currency={currency}\n locale={activeLocale}\n showLabel\n size=\"md\"\n />\n {isOverdue ? (\n <Badge variant=\"error\" size=\"sm\" withDot>\n {t('carePlanCard.overdue', {\n count: overdueDays,\n defaultValue: 'Overdue {{count}}d',\n })}\n </Badge>\n ) : null}\n </div>\n ) : null}\n {typeof billedCents === 'number' && billedCents > 0 ? (\n <TransactionChip\n state=\"settled\"\n amount={billedCents / 100}\n currency={currency}\n locale={activeLocale}\n showLabel\n size=\"md\"\n />\n ) : null}\n </div>\n ) : null}\n\n {/* Line / phase progress */}\n {progress && progress.total > 0 ? (\n <Progress\n value={progress.done}\n max={progress.total}\n size=\"sm\"\n aria-label={t('carePlanCard.progressLabel', {\n done: progress.done,\n total: progress.total,\n defaultValue: 'Progress: {{done}} of {{total}} completed',\n })}\n >\n <div className=\"ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]\">\n <Progress.Label id={progressLabelId}>\n {t('carePlanCard.progressHeading', 'Progress')}\n </Progress.Label>\n <span className=\"type-body-sm ds:tabular-nums ds:text-[color:var(--muted-foreground)]\">\n {t('carePlanCard.progressCount', {\n done: progress.done,\n total: progress.total,\n defaultValue: '{{done}} / {{total}}',\n })}\n </span>\n </div>\n </Progress>\n ) : null}\n\n {/* Entries — expandable list of treatment lines */}\n {hasEntries ? (\n <Accordion type=\"single\" collapsible variant=\"separated\">\n <AccordionItem value=\"entries\">\n <AccordionTrigger>\n {t('carePlanCard.entries.toggle', {\n count: entries.length,\n defaultValue: 'Treatment lines ({{count}})',\n })}\n </AccordionTrigger>\n <AccordionContent>\n <ul className=\"ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-0\">\n {entries.map(({ entryId, ...entry }) => (\n <li key={entryId}>\n <CarePlanEntryCard\n id={entryId}\n surface=\"flat\"\n locale={activeLocale}\n currency={currency}\n {...entry}\n />\n </li>\n ))}\n </ul>\n </AccordionContent>\n </AccordionItem>\n </Accordion>\n ) : null}\n </div>\n </div>\n );\n },\n);\n\nCarePlanCard.displayName = 'CarePlanCard';\n\nexport type CarePlanCardSurface = NonNullable<\n VariantProps<typeof entitySurfaceVariants>['surface']\n>;\n\n/** The dentition the plan applies to. */\nexport type CarePlanCardDentition = NonNullable<\n CarePlanCardProps['dentitionMode']\n>;\n\n/* Re-export the shared lifecycle-state type for downstream typing. */\nexport type { CarePlanState } from '../_shared/entity-card';\n"],"names":["carePlanCardAgent","handle","DEFAULT_CURRENCY","STATE_LABEL_FALLBACK","CarePlanCard","forwardRef","id","number","name","state","url","amounts","progress","dates","discardReason","_dentitionMode","entries","locale","currency","surface","onActivate","ariaLabel","className","rest","ref","t","i18n","useTranslation","headingId","useId","progressLabelId","activeLocale","useAgentRegistration","stateLabel","stateBadgeVariant","CARE_PLAN_STATE_BADGE","hasSafeUrl","isSafeEntityUrl","hasEntries","dueCents","billedCents","overdueDays","isOverdue","headingNode","jsx","entitySurfaceVariants","jsxs","Link","event","Badge","Timestamp","TransactionChip","Progress","Accordion","AccordionItem","AccordionTrigger","AccordionContent","entryId","entry","CarePlanEntryCard"],"mappings":";;;;;;;;;;;;;AAYO,MAAMA,IAAsD;AAAA,EACjE,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA,EAKJ,cAAc,CAAC,QAAQ;AAAA,EACvB,OAAO;AAAA,IACL,OAAO;AAAA,MACL,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACC,MAAWA,EAAO,SAAA;AAAA,IAAS;AAAA,IAEpC,UAAU;AAAA,MACR,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACA,MAAWA,EAAO,YAAA;AAAA,IAAY;AAAA,EACvC;AAAA,EAEF,SAAS,CAAA;AAAA,EACT,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,OAAO;AAAA,MACP,aAAa;AAAA,IAAA;AAAA,IAEf,YAAY;AAAA,MACV,MAAM;AAAA,MACN,YAAY;AAAA,MACZ,aAAa;AAAA,IAAA;AAAA,EACf;AAEJ,GC6GMC,KAAmB,OAOnBC,KAAsD;AAAA,EAC1D,UAAU;AAAA,EACV,UAAU;AAAA,EACV,WAAW;AAAA,EACX,QAAQ;AACV,GAMaC,KAAeC;AAAA,EAC1B,CACE;AAAA,IACE,IAAAC;AAAA,IACA,QAAAC;AAAA,IACA,MAAAC;AAAA,IACA,OAAAC;AAAA,IACA,KAAAC;AAAA,IACA,SAAAC;AAAA,IACA,UAAAC;AAAA,IACA,OAAAC;AAAA,IACA,eAAAC;AAAA,IACA,eAAeC;A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EAACS,GAAA,EAAU,MAAK,UAAS,aAAW,IAAC,SAAQ,aAC3C,UAAA,gBAAAP,EAACQ,GAAA,EAAc,OAAM,WACnB,UAAA;AAAA,YAAA,gBAAAV,EAACW,GAAA,EACE,YAAE,+BAA+B;AAAA,cAChC,OAAOvC,EAAQ;AAAA,cACf,cAAc;AAAA,YAAA,CACf,GACH;AAAA,YACA,gBAAA4B,EAACY,GAAA,EACC,UAAA,gBAAAZ,EAAC,MAAA,EAAG,WAAU,6EACX,UAAA5B,EAAQ,IAAI,CAAC,EAAE,SAAAyC,GAAS,GAAGC,EAAA,wBACzB,MAAA,EACC,UAAA,gBAAAd;AAAA,cAACe;AAAA,cAAA;AAAA,gBACC,IAAIF;AAAA,gBACJ,SAAQ;AAAA,gBACR,QAAQ1B;AAAA,gBACR,UAAAb;AAAA,gBACC,GAAGwC;AAAA,cAAA;AAAA,YAAA,KANCD,CAQT,CACD,EAAA,CACH,EAAA,CACF;AAAA,UAAA,EAAA,CACF,GACF,IACE;AAAA,QAAA,EAAA,CACN;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AAEArD,GAAa,cAAc;"}
1
+ {"version":3,"file":"care-plan-card-BrwhyIJI.js","sources":["../../src/components/care-plan-card/care-plan-card.agent.ts","../../src/components/care-plan-card/care-plan-card.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — CarePlanCard. */\n/* */\n/* Read-only surface: expose the plan's lifecycle state and line-progress */\n/* counts so an agent can introspect a care plan's status. State enum + */\n/* counts only — never the plan name, operator, treatment names, or any */\n/* patient identity. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { CarePlanCardHandle } from './care-plan-card';\n\nexport const carePlanCardAgent: AgentAdapter<CarePlanCardHandle> = {\n id: 'care-plan-card',\n // `expand` is host-delegated: the treatment-line list is an in-component\n // Accordion the user (or a host) drives directly — there is no handle\n // method for it, so no backing action is registered. `view_change` was\n // dropped: the card has no view modes to switch between.\n capabilities: ['expand'],\n state: {\n state: {\n type: \"'estimate' | 'accepted' | 'discarded' | 'closed'\",\n descriptionKey: 'ui.agent.carePlanCard.state.state',\n description:\n 'The plan lifecycle state. Enum value only — never the localised label or any PHI.',\n read: (handle) => handle.getState(),\n },\n progress: {\n type: '{ done: number; total: number }',\n descriptionKey: 'ui.agent.carePlanCard.state.progress',\n description:\n 'Line progress as done / total counts. Counts only — never treatment names or operator identity.',\n read: (handle) => handle.getProgress(),\n },\n },\n actions: {},\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'care-plan-card',\n description: 'Marks the CarePlanCard root region.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop. Addresses a specific plan.',\n },\n },\n};\n","import { forwardRef, useId, type HTMLAttributes } from 'react';\nimport { type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { Badge } from '../badge/badge';\nimport { Link } from '../link/link';\nimport { Progress } from '../progress/progress';\nimport { Timestamp } from '../timestamp/timestamp';\nimport { TransactionChip } from '../transaction-chip/transaction-chip';\nimport {\n Accordion,\n AccordionItem,\n AccordionTrigger,\n AccordionContent,\n} from '../accordion/accordion';\nimport {\n CarePlanEntryCard,\n type CarePlanEntryCardProps,\n} from '../care-plan-entry-card';\nimport {\n entitySurfaceVariants,\n CARE_PLAN_STATE_BADGE,\n isSafeEntityUrl,\n type CarePlanState,\n} from '../_shared/entity-card';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { carePlanCardAgent } from './care-plan-card.agent';\n\n/* -------------------------------------------------------------------- */\n/* CarePlanCard */\n/* */\n/* The summary card for a whole care plan / estimate (\"preventivo\"). */\n/* Replaces the hand-rolled platform care-plan header that interleaves */\n/* the plan number + name, a lifecycle badge, the financial figures */\n/* (billed / due / overdue), an acceptance/closure date, a phase- */\n/* progress bar, an optional deep link, and an expandable list of the */\n/* plan's treatment lines. */\n/* */\n/* Composes: entitySurfaceVariants (shared card surface) + Badge */\n/* (lifecycle state) + TransactionChip (money) + Progress (done/total) */\n/* + Timestamp (dates) + Link (deep link) + Accordion (entries rendered */\n/* as <CarePlanEntryCard> rows). */\n/* */\n/* All visible text flows through useTranslation('ui') against the */\n/* `carePlanCard.*` namespace — the lifecycle state is ALWAYS shown as a */\n/* localised label, never the raw server string. Identifiers + structural */\n/* state only reach the agent layer — never patient identity. */\n/* -------------------------------------------------------------------- */\n\n/* -------------------------------------------------------------------- */\n/* Public types */\n/* -------------------------------------------------------------------- */\n\n/**\n * A single treatment line within the plan. Each ref is forwarded straight\n * to a `<CarePlanEntryCard>` rendered inside the Accordion. `entryId` keys\n * the row and surfaces as the line's `data-component-id`.\n */\nexport interface CarePlanEntryRef extends Omit<\n CarePlanEntryCardProps,\n 'id' | 'surface'\n> {\n /** Stable line id — identifier only, never PHI. */\n entryId: string;\n}\n\n/** Financial figures for the plan, all amounts in integer cents. */\nexport interface CarePlanAmounts {\n /** Full list price in cents (non-negative). */\n priceCents?: number;\n /** Discounted / agreed price in cents (non-negative). */\n discountedPriceCents?: number;\n /** Amount already invoiced in cents (non-negative). */\n billedAmountCents?: number;\n /** Outstanding amount still due in cents (non-negative). */\n dueCents?: number;\n /** How many days the due amount is overdue (non-negative). */\n overdueDays?: number;\n}\n\n/** Phase / line progress for the plan. */\nexport interface CarePlanProgress {\n /** Number of executed / completed lines. */\n done: number;\n /** Total number of lines. */\n total: number;\n}\n\n/** Lifecycle dates for the plan, all ISO-8601 strings. */\nexport interface CarePlanDates {\n /** When the plan was accepted. */\n acceptedIso?: string;\n /** When the plan was closed. */\n closedIso?: string;\n /** When the plan was discarded / rejected. */\n discardedIso?: string;\n}\n\n/** Curated read-only handle exposed to the agent registry. */\nexport interface CarePlanCardHandle {\n /** The plan's lifecycle state. */\n getState: () => CarePlanState;\n /** Line progress as `{ done, total }` — counts only, no PHI. */\n getProgress: () => { done: number; total: number };\n}\n\nexport interface CarePlanCardProps extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'aria-label' | 'title' | 'children'\n> {\n /**\n * Stable instance id — surfaced as `data-component-id` for the agent\n * registry and mirrored to the DOM `id`; also wires the heading ↔ region\n * relationship.\n */\n id?: string;\n /** Plan number (e.g. estimate number). Rendered beside the name. */\n number: string | number;\n /** Plan name / title. Rendered as the card heading. */\n name?: string;\n /** Lifecycle state — drives a localised Badge label. */\n state: CarePlanState;\n /** Optional deep link to the full plan. Guarded by `isSafeEntityUrl`. */\n url?: string;\n /** Financial figures (billed / due / overdue …). */\n amounts?: CarePlanAmounts;\n /** Line progress (done / total). */\n progress?: CarePlanProgress;\n /** Lifecycle dates (accepted / closed / discarded). */\n dates?: CarePlanDates;\n /** Reason the plan was discarded — shown only when `state === 'discarded'`. */\n discardReason?: string;\n /**\n * Dentition the plan applies to — forwarded to each entry card's tooth\n * display where relevant. Structural only.\n */\n dentitionMode?: 'permanent' | 'deciduous';\n /** Treatment lines — rendered as `<CarePlanEntryCard>` rows in an Accordion. */\n entries?: CarePlanEntryRef[];\n /** BCP 47 locale override for dates / currency. Defaults to i18n.language. */\n locale?: string;\n /** ISO 4217 currency code for the money chips. Defaults to `EUR`. */\n currency?: string;\n /**\n * `elevated` (default) paints the kit card chrome; `flat` drops it for use\n * inside an existing Card / Sheet.\n */\n surface?: 'flat' | 'elevated';\n /** Fires when the plan deep link / heading is activated. */\n onActivate?: () => void;\n /** Accessible label override for the plan region. */\n 'aria-label'?: string;\n}\n\n/* -------------------------------------------------------------------- */\n/* Helpers */\n/* -------------------------------------------------------------------- */\n\nconst DEFAULT_CURRENCY = 'EUR';\n\n/**\n * English fallbacks for the lifecycle-state labels. The canonical strings\n * live in the `ui.carePlanCard.state.*` bundle; these inline defaults guard\n * against a stale / not-yet-wired bundle so a raw key never reaches the UI.\n */\nconst STATE_LABEL_FALLBACK: Record<CarePlanState, string> = {\n estimate: 'Estimate',\n accepted: 'Accepted',\n discarded: 'Discarded',\n closed: 'Closed',\n};\n\n/* -------------------------------------------------------------------- */\n/* Component */\n/* -------------------------------------------------------------------- */\n\nexport const CarePlanCard = forwardRef<HTMLDivElement, CarePlanCardProps>(\n (\n {\n id,\n number,\n name,\n state,\n url,\n amounts,\n progress,\n dates,\n discardReason,\n dentitionMode: _dentitionMode,\n entries,\n locale,\n currency = DEFAULT_CURRENCY,\n surface = 'elevated',\n onActivate,\n 'aria-label': ariaLabel,\n className,\n ...rest\n },\n ref,\n ) => {\n const { t, i18n } = useTranslation();\n const headingId = useId();\n const progressLabelId = useId();\n const activeLocale = locale ?? i18n.language ?? 'en';\n\n useAgentRegistration(\n carePlanCardAgent,\n {\n getState: () => state,\n getProgress: () => ({\n done: progress?.done ?? 0,\n total: progress?.total ?? 0,\n }),\n },\n id,\n );\n\n const stateLabel = t(`carePlanCard.state.${state}`, {\n defaultValue: STATE_LABEL_FALLBACK[state],\n });\n const stateBadgeVariant = CARE_PLAN_STATE_BADGE[state];\n const hasSafeUrl = !!url && isSafeEntityUrl(url);\n const hasEntries = !!entries && entries.length > 0;\n\n // Money: prefer the outstanding \"due\" chip; mark it overdue when it has\n // run past its term. Anything billed shows a settled chip alongside.\n const dueCents = amounts?.dueCents;\n const billedCents = amounts?.billedAmountCents;\n const overdueDays = amounts?.overdueDays;\n const isOverdue =\n typeof overdueDays === 'number' &&\n overdueDays > 0 &&\n typeof dueCents === 'number' &&\n dueCents > 0;\n\n const headingNode = (\n <h3\n id={headingId}\n className=\"type-title-card ds:m-0 ds:text-[color:var(--foreground)]\"\n >\n {name ?? t('carePlanCard.untitled', 'Untitled plan')}\n </h3>\n );\n\n return (\n <div\n ref={ref}\n role=\"region\"\n aria-label={ariaLabel}\n aria-labelledby={ariaLabel ? undefined : headingId}\n data-component=\"care-plan-card\"\n data-component-id={id}\n data-state={state}\n id={id}\n className={entitySurfaceVariants({ surface, className })}\n {...rest}\n >\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-md)]\">\n {/* Heading row: number + name + lifecycle badge */}\n <div className=\"ds:flex ds:items-start ds:gap-[var(--spacing-sm)]\">\n <div className=\"ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]\">\n <span className=\"type-eyebrow ds:text-[color:var(--muted-foreground)] ds:tabular-nums\">\n {t('carePlanCard.number', {\n number,\n defaultValue: 'Plan #{{number}}',\n })}\n </span>\n {hasSafeUrl ? (\n <Link\n href={url as string}\n weight=\"strong\"\n onClick={(event) => {\n if (\n event.defaultPrevented ||\n event.metaKey ||\n event.ctrlKey ||\n event.shiftKey\n ) {\n return;\n }\n onActivate?.();\n }}\n >\n {headingNode}\n </Link>\n ) : (\n headingNode\n )}\n </div>\n\n <Badge\n variant={stateBadgeVariant}\n size=\"sm\"\n withDot\n className=\"ds:shrink-0\"\n >\n {stateLabel}\n </Badge>\n </div>\n\n {/* Discard reason — only when discarded */}\n {state === 'discarded' && discardReason ? (\n <p className=\"type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]\">\n <span className=\"ds:font-medium ds:text-[color:var(--foreground)]\">\n {t('carePlanCard.discardReasonLabel', 'Discard reason:')}\n </span>{' '}\n {discardReason}\n </p>\n ) : null}\n\n {/* Lifecycle date line */}\n {dates ? (\n <div className=\"type-body-sm ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-md)] ds:text-[color:var(--muted-foreground)]\">\n {dates.acceptedIso ? (\n <span className=\"ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]\">\n <span>{t('carePlanCard.date.accepted', 'Accepted')}</span>\n <Timestamp\n value={dates.acceptedIso}\n format=\"absolute\"\n locale={activeLocale}\n />\n </span>\n ) : null}\n {dates.closedIso ? (\n <span className=\"ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]\">\n <span>{t('carePlanCard.date.closed', 'Closed')}</span>\n <Timestamp\n value={dates.closedIso}\n format=\"absolute\"\n locale={activeLocale}\n />\n </span>\n ) : null}\n {dates.discardedIso ? (\n <span className=\"ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]\">\n <span>{t('carePlanCard.date.discarded', 'Discarded')}</span>\n <Timestamp\n value={dates.discardedIso}\n format=\"absolute\"\n locale={activeLocale}\n />\n </span>\n ) : null}\n </div>\n ) : null}\n\n {/* Money: due / overdue / billed chips */}\n {typeof dueCents === 'number' || typeof billedCents === 'number' ? (\n <div className=\"ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]\">\n {typeof dueCents === 'number' && dueCents > 0 ? (\n <div className=\"ds:flex ds:items-center ds:gap-[var(--spacing-xs)]\">\n <TransactionChip\n state=\"debt\"\n amount={dueCents / 100}\n currency={currency}\n locale={activeLocale}\n showLabel\n size=\"md\"\n />\n {isOverdue ? (\n <Badge variant=\"error\" size=\"sm\" withDot>\n {t('carePlanCard.overdue', {\n count: overdueDays,\n defaultValue: 'Overdue {{count}}d',\n })}\n </Badge>\n ) : null}\n </div>\n ) : null}\n {typeof billedCents === 'number' && billedCents > 0 ? (\n <TransactionChip\n state=\"settled\"\n amount={billedCents / 100}\n currency={currency}\n locale={activeLocale}\n showLabel\n size=\"md\"\n />\n ) : null}\n </div>\n ) : null}\n\n {/* Line / phase progress */}\n {progress && progress.total > 0 ? (\n <Progress\n value={progress.done}\n max={progress.total}\n size=\"sm\"\n aria-label={t('carePlanCard.progressLabel', {\n done: progress.done,\n total: progress.total,\n defaultValue: 'Progress: {{done}} of {{total}} completed',\n })}\n >\n <div className=\"ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]\">\n <Progress.Label id={progressLabelId}>\n {t('carePlanCard.progressHeading', 'Progress')}\n </Progress.Label>\n <span className=\"type-body-sm ds:tabular-nums ds:text-[color:var(--muted-foreground)]\">\n {t('carePlanCard.progressCount', {\n done: progress.done,\n total: progress.total,\n defaultValue: '{{done}} / {{total}}',\n })}\n </span>\n </div>\n </Progress>\n ) : null}\n\n {/* Entries — expandable list of treatment lines */}\n {hasEntries ? (\n <Accordion type=\"single\" collapsible variant=\"separated\">\n <AccordionItem value=\"entries\">\n <AccordionTrigger>\n {t('carePlanCard.entries.toggle', {\n count: entries.length,\n defaultValue: 'Treatment lines ({{count}})',\n })}\n </AccordionTrigger>\n <AccordionContent>\n <ul className=\"ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-0\">\n {entries.map(({ entryId, ...entry }) => (\n <li key={entryId}>\n <CarePlanEntryCard\n id={entryId}\n surface=\"flat\"\n locale={activeLocale}\n currency={currency}\n {...entry}\n />\n </li>\n ))}\n </ul>\n </AccordionContent>\n </AccordionItem>\n </Accordion>\n ) : null}\n </div>\n </div>\n );\n },\n);\n\nCarePlanCard.displayName = 'CarePlanCard';\n\nexport type CarePlanCardSurface = NonNullable<\n VariantProps<typeof entitySurfaceVariants>['surface']\n>;\n\n/** The dentition the plan applies to. */\nexport type CarePlanCardDentition = NonNullable<\n CarePlanCardProps['dentitionMode']\n>;\n\n/* Re-export the shared lifecycle-state type for downstream typing. */\nexport type { CarePlanState } from '../_shared/entity-card';\n"],"names":["carePlanCardAgent","handle","DEFAULT_CURRENCY","STATE_LABEL_FALLBACK","CarePlanCard","forwardRef","id","number","name","state","url","amounts","progress","dates","discardReason","_dentitionMode","entries","locale","currency","surface","onActivate","ariaLabel","className","rest","ref","t","i18n","useTranslation","headingId","useId","progressLabelId","activeLocale","useAgentRegistration","stateLabel","stateBadgeVariant","CARE_PLAN_STATE_BADGE","hasSafeUrl","isSafeEntityUrl","hasEntries","dueCents","billedCents","overdueDays","isOverdue","headingNode","jsx","entitySurfaceVariants","jsxs","Link","event","Badge","Timestamp","TransactionChip","Progress","Accordion","AccordionItem","AccordionTrigger","AccordionContent","entryId","entry","CarePlanEntryCard"],"mappings":";;;;;;;;;;;;;AAYO,MAAMA,IAAsD;AAAA,EACjE,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA,EAKJ,cAAc,CAAC,QAAQ;AAAA,EACvB,OAAO;AAAA,IACL,OAAO;AAAA,MACL,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM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,gBACC,GAAGwC;AAAA,cAAA;AAAA,YAAA,KANCD,CAQT,CACD,EAAA,CACH,EAAA,CACF;AAAA,UAAA,EAAA,CACF,GACF,IACE;AAAA,QAAA,EAAA,CACN;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AAEArD,GAAa,cAAc;"}
@@ -6,7 +6,7 @@ import { P as O } from "./progress-DA413-zn.js";
6
6
  import { T as q } from "./tag-3wgkwwDB.js";
7
7
  import { T as b } from "./timestamp-BV2lC-wV.js";
8
8
  import { T as G } from "./transaction-chip-DJCstquX.js";
9
- import { T as J } from "./tooth-scheme-CX49GycY.js";
9
+ import { T as J } from "./tooth-scheme-BzJ6rcte.js";
10
10
  import { C as Q, b as X, a as Z } from "./collapsible-BrnRiCC6.js";
11
11
  import { u as ee } from "./registry-DvAUVLHh.js";
12
12
  import { C as ae } from "./chevron-down-DWE7GSq9.js";
@@ -319,4 +319,4 @@ export {
319
319
  le as C,
320
320
  re as c
321
321
  };
322
- //# sourceMappingURL=care-plan-entry-card-CRbS-G00.js.map
322
+ //# sourceMappingURL=care-plan-entry-card-DWEdCQM3.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"care-plan-entry-card-CRbS-G00.js","sources":["../../src/components/care-plan-entry-card/care-plan-entry-card.agent.ts","../../src/components/care-plan-entry-card/care-plan-entry-card.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — CarePlanEntryCard. */\n/* */\n/* Read-only surface: expose the execution flag and phase-progress */\n/* counts so an agent can introspect a treatment line's status. Counts + */\n/* booleans only — never the treatment name, operator, or any patient */\n/* identity. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { CarePlanEntryCardHandle } from './care-plan-entry-card';\n\nexport const carePlanEntryCardAgent: AgentAdapter<CarePlanEntryCardHandle> = {\n id: 'care-plan-entry-card',\n // `expand` is host-delegated: the per-phase breakdown is an in-component\n // Collapsible the user (or a host) drives directly — there is no handle\n // method for it, so no backing action is registered. `view_change` was\n // dropped: the card has no view modes to switch between.\n capabilities: ['expand'],\n state: {\n done: {\n type: 'boolean',\n descriptionKey: 'ui.agent.carePlanEntryCard.state.done',\n description: 'Whether the treatment line is marked executed.',\n read: (handle) => handle.isDone(),\n },\n phaseProgress: {\n type: '{ executed: number; total: number }',\n descriptionKey: 'ui.agent.carePlanEntryCard.state.phaseProgress',\n description:\n 'Phase progress as executed / total counts. Counts only — never phase labels or operator identity.',\n read: (handle) => handle.getPhaseProgress(),\n },\n },\n actions: {},\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'care-plan-entry-card',\n description: 'Marks the CarePlanEntryCard root region.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop. Addresses a specific line.',\n },\n },\n};\n","import { forwardRef, useId, type HTMLAttributes, type ReactNode } from 'react';\nimport { type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { ChevronDown } from 'lucide-react';\nimport { Badge } from '../badge/badge';\nimport { Progress } from '../progress/progress';\nimport { Tag } from '../tag/tag';\nimport { Timestamp } from '../timestamp/timestamp';\nimport { TransactionChip } from '../transaction-chip/transaction-chip';\nimport { ToothScheme } from '../tooth-scheme/tooth-scheme';\nimport type { FdiId, ToothCondition } from '../tooth-scheme/tooth-data';\nimport {\n Collapsible,\n CollapsibleContent,\n CollapsibleTrigger,\n} from '../collapsible/collapsible';\nimport { entitySurfaceVariants } from '../_shared/entity-card';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { carePlanEntryCardAgent } from './care-plan-entry-card.agent';\n\n/* -------------------------------------------------------------------- */\n/* CarePlanEntryCard */\n/* */\n/* A single granular treatment line within a care plan / estimate */\n/* (\"voce di preventivo\"). Replaces the hand-rolled platform treatment */\n/* row that interleaves the treatment label, FDI tooth codes, an */\n/* execution badge, a phase-progress bar, a price chip, and an */\n/* expandable per-phase breakdown. */\n/* */\n/* Composes: entitySurfaceVariants (shared card surface) + Tag / ToothScheme*/\n/* (elements) + Badge (lifecycle flags) + Timestamp (execution / planned) */\n/* + Progress (phases) + TransactionChip (price) + Collapsible (per-phase */\n/* detail). */\n/* */\n/* All visible text flows through useTranslation('ui') against the */\n/* `carePlanEntryCard.*` namespace. Identifiers + structural state only */\n/* reach the agent layer — never patient identity. */\n/* -------------------------------------------------------------------- */\n\n/* -------------------------------------------------------------------- */\n/* Public types */\n/* -------------------------------------------------------------------- */\n\n/** A planned (not-yet-executed) appointment the line is scheduled into. */\nexport interface CarePlanEntryPlannedAppointment {\n /** ISO-8601 date / datetime string. */\n dateIso: string;\n /** Stable appointment id (identifier only — never PHI). */\n appointmentId: string;\n /** Optional deep link to the appointment. */\n url?: string;\n}\n\n/** Price breakdown for the line, all amounts in integer cents. */\nexport interface CarePlanEntryPrice {\n /** List price in cents (non-negative). */\n priceCents?: number;\n /** Discounted price in cents (non-negative), when a discount applies. */\n discountedPriceCents?: number;\n /** Discount percentage (0–100), for the discount label. */\n discountPercentage?: number;\n}\n\n/** One row of the per-phase execution breakdown. */\nexport interface CarePlanEntryPhaseDetail {\n /** Short localised phase label (consumer-localised). */\n label: string;\n /** Whether this phase has been executed. */\n executed: boolean;\n /** ISO-8601 execution date, when executed. */\n executionDateIso?: string;\n /** Operator display name for the phase. */\n operator?: string;\n /** Unique Device Identifier / lot string for traceable materials. */\n udi?: string;\n}\n\n/** Phase progress summary + optional drill-down detail. */\nexport interface CarePlanEntryPhases {\n /** Number of executed phases. */\n executed: number;\n /** Total number of phases. */\n total: number;\n /** Optional per-phase breakdown rendered inside the Collapsible. */\n detail?: CarePlanEntryPhaseDetail[];\n}\n\n/** Operator the line is assigned to. */\nexport interface CarePlanEntryOperator {\n /** Operator display name (consumer-localised). */\n name: string;\n}\n\n/** Curated read-only handle exposed to the agent registry. */\nexport interface CarePlanEntryCardHandle {\n /** Whether the line is marked executed. */\n isDone: () => boolean;\n /** Phase progress as `{ executed, total }` — counts only, no PHI. */\n getPhaseProgress: () => { executed: number; total: number };\n}\n\nexport interface CarePlanEntryCardProps extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'aria-label' | 'title' | 'children'\n> {\n /**\n * Stable instance id — surfaced as `data-component-id` for the agent\n * registry and used to wire up the heading ↔ region relationship.\n */\n id?: string;\n /** Treatment / service name. Rendered as the line heading. */\n careName: string;\n /** Optional treatment code (e.g. tariff code) shown beside the name. */\n code?: string;\n /** Optional secondary label (e.g. category) under the name. */\n label?: string;\n /** FDI tooth codes the line applies to (e.g. `['16', '36']`). */\n elements?: string[];\n /** Whether the line has been executed / completed. */\n done?: boolean;\n /** ISO-8601 execution date — rendered next to the \"done\" badge. */\n executionDateIso?: string;\n /** A planned appointment the line is scheduled into, when not yet done. */\n plannedAppointment?: CarePlanEntryPlannedAppointment;\n /** Operator the line is assigned to. */\n operator?: CarePlanEntryOperator;\n /** Price breakdown (list / discounted). */\n price?: CarePlanEntryPrice;\n /** Phase progress + optional drill-down detail. */\n phases?: CarePlanEntryPhases;\n /** Whether the line has been billed / invoiced. */\n billed?: boolean;\n /** Whether the line falls outside the accepted estimate. */\n outsideOfEstimate?: boolean;\n /** Count of attached notes — rendered as a neutral count badge when > 0. */\n notesCount?: number;\n /**\n * How to render `elements`: `'chips'` (default) lists each FDI code as a\n * Tag; `'scheme'` renders a read-only `ToothScheme` highlighting them.\n */\n toothDisplay?: 'scheme' | 'chips';\n /** BCP 47 locale override for dates / currency. Defaults to i18n.language. */\n locale?: string;\n /** ISO 4217 currency code for the price chip. Defaults to `EUR`. */\n currency?: string;\n /**\n * `elevated` (default) paints the kit card chrome; `flat` drops it for use\n * inside an existing Card / Sheet.\n */\n surface?: 'flat' | 'elevated';\n /** Accessible label override for the line region. */\n 'aria-label'?: string;\n}\n\n/* -------------------------------------------------------------------- */\n/* Helpers */\n/* -------------------------------------------------------------------- */\n\nconst DEFAULT_CURRENCY = 'EUR';\n\n/**\n * Map the FDI element codes to a `ToothScheme` conditions shortcut. Codes\n * outside the FDI vocabulary are dropped (the scheme ignores unknown ids).\n * Every applied tooth is flagged `filled` so the display-mode chart marks\n * them with both colour and pattern — colour-not-alone.\n */\nfunction elementsToConditions(\n elements: string[],\n): Partial<Record<FdiId, ToothCondition[]>> {\n const conditions: Partial<Record<FdiId, ToothCondition[]>> = {};\n for (const code of elements) {\n conditions[code as FdiId] = ['filled'];\n }\n return conditions;\n}\n\n/* -------------------------------------------------------------------- */\n/* Component */\n/* -------------------------------------------------------------------- */\n\nexport const CarePlanEntryCard = forwardRef<\n HTMLDivElement,\n CarePlanEntryCardProps\n>(\n (\n {\n id,\n careName,\n code,\n label,\n elements,\n done = false,\n executionDateIso,\n plannedAppointment,\n operator,\n price,\n phases,\n billed = false,\n outsideOfEstimate = false,\n notesCount,\n toothDisplay = 'chips',\n locale,\n currency = DEFAULT_CURRENCY,\n surface = 'elevated',\n 'aria-label': ariaLabel,\n className,\n ...rest\n },\n ref,\n ) => {\n const { t, i18n } = useTranslation();\n const headingId = useId();\n const phasesLabelId = useId();\n const detailTriggerId = useId();\n const detailContentId = useId();\n const activeLocale = locale ?? i18n.language ?? 'en';\n\n useAgentRegistration(\n carePlanEntryCardAgent,\n {\n isDone: () => done,\n getPhaseProgress: () => ({\n executed: phases?.executed ?? 0,\n total: phases?.total ?? 0,\n }),\n },\n id,\n );\n\n const hasElements = !!elements && elements.length > 0;\n const hasPhaseDetail = !!phases?.detail && phases.detail.length > 0;\n\n // Price: prefer the discounted amount when present; show the list price\n // struck through beside it. Both are \"to-invoice\" until billed, then\n // settled.\n const priceState = billed ? 'settled' : 'to-invoice';\n const listCents = price?.priceCents;\n const discountedCents = price?.discountedPriceCents;\n const hasDiscount =\n discountedCents !== undefined &&\n listCents !== undefined &&\n discountedCents < listCents;\n const payableCents = discountedCents ?? listCents;\n\n const formatMoney = (cents: number): string =>\n new Intl.NumberFormat(activeLocale, {\n style: 'currency',\n currency,\n }).format(cents / 100);\n\n return (\n <div\n ref={ref}\n role=\"region\"\n aria-label={ariaLabel}\n aria-labelledby={ariaLabel ? undefined : headingId}\n data-component=\"care-plan-entry-card\"\n data-component-id={id}\n data-done={done ? 'true' : 'false'}\n id={id}\n className={entitySurfaceVariants({ surface, className })}\n {...rest}\n >\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]\">\n {/* Heading row: name + code + trailing status flags */}\n <div className=\"ds:flex ds:items-start ds:gap-[var(--spacing-sm)]\">\n <div className=\"ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]\">\n <div className=\"ds:flex ds:flex-wrap ds:items-baseline ds:gap-[var(--spacing-xs)]\">\n <h3\n id={headingId}\n className=\"type-title-item ds:m-0 ds:text-[color:var(--foreground)]\"\n >\n {careName}\n </h3>\n {code ? (\n <span className=\"type-meta ds:text-[color:var(--muted-foreground)] ds:tabular-nums\">\n {code}\n </span>\n ) : null}\n </div>\n {label ? (\n <span className=\"type-body-sm ds:text-[color:var(--muted-foreground)]\">\n {label}\n </span>\n ) : null}\n </div>\n\n <div className=\"ds:flex ds:shrink-0 ds:flex-wrap ds:items-center ds:justify-end ds:gap-[var(--spacing-2xs)]\">\n {done ? (\n <Badge variant=\"success\" size=\"sm\" withDot>\n {t('carePlanEntryCard.flag.done', 'Done')}\n </Badge>\n ) : null}\n {outsideOfEstimate ? (\n <Badge variant=\"warning\" size=\"sm\" withDot>\n {t(\n 'carePlanEntryCard.flag.outsideOfEstimate',\n 'Outside estimate',\n )}\n </Badge>\n ) : null}\n {billed ? (\n <Badge variant=\"neutral\" size=\"sm\">\n {t('carePlanEntryCard.flag.billed', 'Billed')}\n </Badge>\n ) : null}\n {typeof notesCount === 'number' && notesCount > 0 ? (\n <Badge\n variant=\"neutral\"\n size=\"sm\"\n aria-label={t('carePlanEntryCard.notesLabel', {\n count: notesCount,\n defaultValue: '{{count}} notes',\n })}\n >\n {notesCount}\n </Badge>\n ) : null}\n </div>\n </div>\n\n {/* Elements: tooth scheme (display mode) or FDI tag chips */}\n {hasElements ? (\n toothDisplay === 'scheme' ? (\n <ToothScheme\n mode=\"display\"\n conditions={elementsToConditions(elements)}\n ariaLabel={t('carePlanEntryCard.toothSchemeLabel', {\n count: elements.length,\n defaultValue: 'Teeth involved: {{count}}',\n })}\n />\n ) : (\n <div\n role=\"list\"\n aria-label={t(\n 'carePlanEntryCard.elementsLabel',\n 'Teeth involved',\n )}\n className=\"ds:flex ds:flex-wrap ds:gap-[var(--spacing-2xs)]\"\n >\n {elements.map((element) => (\n <div role=\"listitem\" key={element}>\n <Tag label={element} variant=\"info\" size=\"sm\" />\n </div>\n ))}\n </div>\n )\n ) : null}\n\n {/* Schedule / execution line */}\n {done && executionDateIso ? (\n <p className=\"type-body-sm ds:m-0 ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)] ds:text-[color:var(--muted-foreground)]\">\n <span>{t('carePlanEntryCard.executedOn', 'Executed on')}</span>\n <Timestamp\n value={executionDateIso}\n format=\"absolute\"\n locale={activeLocale}\n />\n {operator ? (\n <span>\n {t('carePlanEntryCard.byOperator', {\n operator: operator.name,\n defaultValue: 'by {{operator}}',\n })}\n </span>\n ) : null}\n </p>\n ) : plannedAppointment ? (\n <p className=\"type-body-sm ds:m-0 ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)] ds:text-[color:var(--muted-foreground)]\">\n <span>{t('carePlanEntryCard.plannedFor', 'Planned for')}</span>\n <Timestamp\n value={plannedAppointment.dateIso}\n format=\"absolute\"\n locale={activeLocale}\n />\n {operator ? (\n <span>\n {t('carePlanEntryCard.byOperator', {\n operator: operator.name,\n defaultValue: 'by {{operator}}',\n })}\n </span>\n ) : null}\n </p>\n ) : operator ? (\n <p className=\"type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]\">\n {t('carePlanEntryCard.assignedTo', {\n operator: operator.name,\n defaultValue: 'Assigned to {{operator}}',\n })}\n </p>\n ) : null}\n\n {/* Phase progress */}\n {phases && phases.total > 0 ? (\n <Progress\n value={phases.executed}\n max={phases.total}\n size=\"sm\"\n aria-label={t('carePlanEntryCard.phasesLabel', {\n executed: phases.executed,\n total: phases.total,\n defaultValue: 'Phases: {{executed}} of {{total}} executed',\n })}\n >\n <div className=\"ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]\">\n <Progress.Label id={phasesLabelId}>\n {t('carePlanEntryCard.phasesHeading', 'Phases')}\n </Progress.Label>\n <span className=\"type-body-sm ds:tabular-nums ds:text-[color:var(--muted-foreground)]\">\n {t('carePlanEntryCard.phasesCount', {\n executed: phases.executed,\n total: phases.total,\n defaultValue: '{{executed}} / {{total}}',\n })}\n </span>\n </div>\n </Progress>\n ) : null}\n\n {/* Footer: price + (optional) phase-detail disclosure */}\n {payableCents !== undefined || hasPhaseDetail ? (\n <div className=\"ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]\">\n {payableCents !== undefined ? (\n <div className=\"ds:flex ds:items-center ds:gap-[var(--spacing-xs)]\">\n <TransactionChip\n state={priceState}\n amount={payableCents / 100}\n currency={currency}\n locale={activeLocale}\n size=\"md\"\n />\n {hasDiscount && listCents !== undefined ? (\n <span className=\"type-meta ds:text-[color:var(--muted-foreground)] ds:line-through ds:tabular-nums\">\n {formatMoney(listCents)}\n </span>\n ) : null}\n {hasDiscount && price?.discountPercentage !== undefined ? (\n <Badge variant=\"success\" size=\"sm\">\n {t('carePlanEntryCard.discountLabel', {\n percentage: price.discountPercentage,\n defaultValue: '-{{percentage}}%',\n })}\n </Badge>\n ) : null}\n </div>\n ) : null}\n\n {hasPhaseDetail ? (\n <Collapsible\n variant=\"default\"\n className=\"ds:ms-auto ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]\"\n >\n <CollapsibleTrigger asChild>\n <button\n type=\"button\"\n id={detailTriggerId}\n aria-controls={detailContentId}\n className=\"ds:group ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)] ds:rounded-[var(--radius-sm)] ds:border-0 ds:bg-transparent type-body-sm ds:text-[color:var(--foreground)] ds:cursor-pointer ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]\"\n >\n <span>\n {t(\n 'carePlanEntryCard.phaseDetail.toggle',\n 'Phase detail',\n )}\n </span>\n <ChevronDown\n aria-hidden=\"true\"\n className=\"ds:size-4 ds:shrink-0 ds:text-[color:var(--muted-foreground)] ds:transition-transform ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none ds:group-data-[state=open]:rotate-180\"\n />\n </button>\n </CollapsibleTrigger>\n <CollapsibleContent\n id={detailContentId}\n aria-labelledby={detailTriggerId}\n >\n <ul className=\"ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-xs)] ds:p-0\">\n {phases?.detail?.map((phase, index) => (\n <PhaseDetailRow\n key={`${phase.label}-${index}`}\n phase={phase}\n locale={activeLocale}\n />\n ))}\n </ul>\n </CollapsibleContent>\n </Collapsible>\n ) : null}\n </div>\n ) : null}\n </div>\n </div>\n );\n },\n);\n\nCarePlanEntryCard.displayName = 'CarePlanEntryCard';\n\n/* -------------------------------------------------------------------- */\n/* PhaseDetailRow — one row inside the per-phase Collapsible */\n/* -------------------------------------------------------------------- */\n\nfunction PhaseDetailRow({\n phase,\n locale,\n}: {\n phase: CarePlanEntryPhaseDetail;\n locale: string;\n}): ReactNode {\n const { t } = useTranslation();\n return (\n <li className=\"ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]\">\n <Badge variant={phase.executed ? 'success' : 'neutral'} size=\"sm\" withDot>\n {phase.executed\n ? t('carePlanEntryCard.phaseDetail.executed', 'Executed')\n : t('carePlanEntryCard.phaseDetail.pending', 'Pending')}\n </Badge>\n <span className=\"type-body-sm ds:text-[color:var(--foreground)]\">\n {phase.label}\n </span>\n {phase.executed && phase.executionDateIso ? (\n <Timestamp\n value={phase.executionDateIso}\n format=\"absolute\"\n locale={locale}\n />\n ) : null}\n {phase.operator ? (\n <span className=\"type-meta ds:text-[color:var(--muted-foreground)]\">\n {t('carePlanEntryCard.byOperator', {\n operator: phase.operator,\n defaultValue: 'by {{operator}}',\n })}\n </span>\n ) : null}\n {phase.udi ? (\n <span className=\"type-meta ds:text-[color:var(--muted-foreground)] ds:tabular-nums\">\n {t('carePlanEntryCard.phaseDetail.udi', {\n udi: phase.udi,\n defaultValue: 'UDI {{udi}}',\n })}\n </span>\n ) : null}\n </li>\n );\n}\n\nexport type CarePlanEntryCardSurface = NonNullable<\n VariantProps<typeof entitySurfaceVariants>['surface']\n>;\n"],"names":["carePlanEntryCardAgent","handle","DEFAULT_CURRENCY","elementsToConditions","elements","conditions","code","CarePlanEntryCard","forwardRef","id","careName","label","done","executionDateIso","plannedAppointment","operator","price","phases","billed","outsideOfEstimate","notesCount","toothDisplay","locale","currency","surface","ariaLabel","className","rest","ref","t","i18n","useTranslation","headingId","useId","phasesLabelId","detailTriggerId","detailContentId","activeLocale","useAgentRegistration","hasElements","hasPhaseDetail","priceState","listCents","discountedCents","hasDiscount","payableCents","formatMoney","cents","jsx","entitySurfaceVariants","jsxs","Badge","ToothScheme","element","Tag","Timestamp","Progress","TransactionChip","Collapsible","CollapsibleTrigger","ChevronDown","CollapsibleContent","phase","index","PhaseDetailRow"],"mappings":";;;;;;;;;;;;;AAYO,MAAMA,KAAgE;AAAA,EAC3E,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA,EAKJ,cAAc,CAAC,QAAQ;AAAA,EACvB,OAAO;AAAA,IACL,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,MAAM,CAACC,MAAWA,EAAO,OAAA;AAAA,IAAO;AAAA,IAElC,eAAe;AAAA,MACb,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACA,MAAWA,EAAO,iBAAA;AAAA,IAAiB;AAAA,EAC5C;AAAA,EAEF,SAAS,CAAA;AAAA,EACT,UAAU;AAAA,IAC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AACG,KAAM,SAASW,EAAM,WAAW,YAAY,WAAW,MAAK,MAAK,SAAO,IACtE,UAAAA,EAAM,WACHjC,EAAE,0CAA0C,UAAU,IACtDA,EAAE,yCAAyC,SAAS,GAC1D;AAAA,IACA,gBAAAmB,EAAC,QAAA,EAAK,WAAU,kDACb,YAAM,OACT;AAAA,IACCc,EAAM,YAAYA,EAAM,mBACvB,gBAAAd;AAAA,MAACO;AAAA,MAAA;AAAA,QACC,OAAOO,EAAM;AAAA,QACb,QAAO;AAAA,QACP,QAAAxC;AAAA,MAAA;AAAA,IAAA,IAEA;AAAA,IACHwC,EAAM,WACL,gBAAAd,EAAC,UAAK,WAAU,qDACb,YAAE,gCAAgC;AAAA,MACjC,UAAUc,EAAM;AAAA,MAChB,cAAc;AAAA,IAAA,CACf,GACH,IACE;AAAA,IACHA,EAAM,MACL,gBAAAd,EAAC,UAAK,WAAU,qEACb,YAAE,qCAAqC;AAAA,MACtC,KAAKc,EAAM;AAAA,MACX,cAAc;AAAA,IAAA,CACf,GACH,IACE;AAAA,EAAA,GACN;AAEJ;"}
1
+ {"version":3,"file":"care-plan-entry-card-DWEdCQM3.js","sources":["../../src/components/care-plan-entry-card/care-plan-entry-card.agent.ts","../../src/components/care-plan-entry-card/care-plan-entry-card.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — CarePlanEntryCard. */\n/* */\n/* Read-only surface: expose the execution flag and phase-progress */\n/* counts so an agent can introspect a treatment line's status. Counts + */\n/* booleans only — never the treatment name, operator, or any patient */\n/* identity. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { CarePlanEntryCardHandle } from './care-plan-entry-card';\n\nexport const carePlanEntryCardAgent: AgentAdapter<CarePlanEntryCardHandle> = {\n id: 'care-plan-entry-card',\n // `expand` is host-delegated: the per-phase breakdown is an in-component\n // Collapsible the user (or a host) drives directly — there is no handle\n // method for it, so no backing action is registered. `view_change` was\n // dropped: the card has no view modes to switch between.\n capabilities: ['expand'],\n state: {\n done: {\n type: 'boolean',\n descriptionKey: 'ui.agent.carePlanEntryCard.state.done',\n description: 'Whether the treatment line is marked executed.',\n read: (handle) => handle.isDone(),\n },\n phaseProgress: {\n type: '{ executed: number; total: number }',\n descriptionKey: 'ui.agent.carePlanEntryCard.state.phaseProgress',\n description:\n 'Phase progress as executed / total counts. Counts only — never phase labels or operator identity.',\n read: (handle) => handle.getPhaseProgress(),\n },\n },\n actions: {},\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'care-plan-entry-card',\n description: 'Marks the CarePlanEntryCard root region.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop. Addresses a specific line.',\n },\n },\n};\n","import { forwardRef, useId, type HTMLAttributes, type ReactNode } from 'react';\nimport { type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { ChevronDown } from 'lucide-react';\nimport { Badge } from '../badge/badge';\nimport { Progress } from '../progress/progress';\nimport { Tag } from '../tag/tag';\nimport { Timestamp } from '../timestamp/timestamp';\nimport { TransactionChip } from '../transaction-chip/transaction-chip';\nimport { ToothScheme } from '../tooth-scheme/tooth-scheme';\nimport type { FdiId, ToothCondition } from '../tooth-scheme/tooth-data';\nimport {\n Collapsible,\n CollapsibleContent,\n CollapsibleTrigger,\n} from '../collapsible/collapsible';\nimport { entitySurfaceVariants } from '../_shared/entity-card';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { carePlanEntryCardAgent } from './care-plan-entry-card.agent';\n\n/* -------------------------------------------------------------------- */\n/* CarePlanEntryCard */\n/* */\n/* A single granular treatment line within a care plan / estimate */\n/* (\"voce di preventivo\"). Replaces the hand-rolled platform treatment */\n/* row that interleaves the treatment label, FDI tooth codes, an */\n/* execution badge, a phase-progress bar, a price chip, and an */\n/* expandable per-phase breakdown. */\n/* */\n/* Composes: entitySurfaceVariants (shared card surface) + Tag / ToothScheme*/\n/* (elements) + Badge (lifecycle flags) + Timestamp (execution / planned) */\n/* + Progress (phases) + TransactionChip (price) + Collapsible (per-phase */\n/* detail). */\n/* */\n/* All visible text flows through useTranslation('ui') against the */\n/* `carePlanEntryCard.*` namespace. Identifiers + structural state only */\n/* reach the agent layer — never patient identity. */\n/* -------------------------------------------------------------------- */\n\n/* -------------------------------------------------------------------- */\n/* Public types */\n/* -------------------------------------------------------------------- */\n\n/** A planned (not-yet-executed) appointment the line is scheduled into. */\nexport interface CarePlanEntryPlannedAppointment {\n /** ISO-8601 date / datetime string. */\n dateIso: string;\n /** Stable appointment id (identifier only — never PHI). */\n appointmentId: string;\n /** Optional deep link to the appointment. */\n url?: string;\n}\n\n/** Price breakdown for the line, all amounts in integer cents. */\nexport interface CarePlanEntryPrice {\n /** List price in cents (non-negative). */\n priceCents?: number;\n /** Discounted price in cents (non-negative), when a discount applies. */\n discountedPriceCents?: number;\n /** Discount percentage (0–100), for the discount label. */\n discountPercentage?: number;\n}\n\n/** One row of the per-phase execution breakdown. */\nexport interface CarePlanEntryPhaseDetail {\n /** Short localised phase label (consumer-localised). */\n label: string;\n /** Whether this phase has been executed. */\n executed: boolean;\n /** ISO-8601 execution date, when executed. */\n executionDateIso?: string;\n /** Operator display name for the phase. */\n operator?: string;\n /** Unique Device Identifier / lot string for traceable materials. */\n udi?: string;\n}\n\n/** Phase progress summary + optional drill-down detail. */\nexport interface CarePlanEntryPhases {\n /** Number of executed phases. */\n executed: number;\n /** Total number of phases. */\n total: number;\n /** Optional per-phase breakdown rendered inside the Collapsible. */\n detail?: CarePlanEntryPhaseDetail[];\n}\n\n/** Operator the line is assigned to. */\nexport interface CarePlanEntryOperator {\n /** Operator display name (consumer-localised). */\n name: string;\n}\n\n/** Curated read-only handle exposed to the agent registry. */\nexport interface CarePlanEntryCardHandle {\n /** Whether the line is marked executed. */\n isDone: () => boolean;\n /** Phase progress as `{ executed, total }` — counts only, no PHI. */\n getPhaseProgress: () => { executed: number; total: number };\n}\n\nexport interface CarePlanEntryCardProps extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'aria-label' | 'title' | 'children'\n> {\n /**\n * Stable instance id — surfaced as `data-component-id` for the agent\n * registry and used to wire up the heading ↔ region relationship.\n */\n id?: string;\n /** Treatment / service name. Rendered as the line heading. */\n careName: string;\n /** Optional treatment code (e.g. tariff code) shown beside the name. */\n code?: string;\n /** Optional secondary label (e.g. category) under the name. */\n label?: string;\n /** FDI tooth codes the line applies to (e.g. `['16', '36']`). */\n elements?: string[];\n /** Whether the line has been executed / completed. */\n done?: boolean;\n /** ISO-8601 execution date — rendered next to the \"done\" badge. */\n executionDateIso?: string;\n /** A planned appointment the line is scheduled into, when not yet done. */\n plannedAppointment?: CarePlanEntryPlannedAppointment;\n /** Operator the line is assigned to. */\n operator?: CarePlanEntryOperator;\n /** Price breakdown (list / discounted). */\n price?: CarePlanEntryPrice;\n /** Phase progress + optional drill-down detail. */\n phases?: CarePlanEntryPhases;\n /** Whether the line has been billed / invoiced. */\n billed?: boolean;\n /** Whether the line falls outside the accepted estimate. */\n outsideOfEstimate?: boolean;\n /** Count of attached notes — rendered as a neutral count badge when > 0. */\n notesCount?: number;\n /**\n * How to render `elements`: `'chips'` (default) lists each FDI code as a\n * Tag; `'scheme'` renders a read-only `ToothScheme` highlighting them.\n */\n toothDisplay?: 'scheme' | 'chips';\n /** BCP 47 locale override for dates / currency. Defaults to i18n.language. */\n locale?: string;\n /** ISO 4217 currency code for the price chip. Defaults to `EUR`. */\n currency?: string;\n /**\n * `elevated` (default) paints the kit card chrome; `flat` drops it for use\n * inside an existing Card / Sheet.\n */\n surface?: 'flat' | 'elevated';\n /** Accessible label override for the line region. */\n 'aria-label'?: string;\n}\n\n/* -------------------------------------------------------------------- */\n/* Helpers */\n/* -------------------------------------------------------------------- */\n\nconst DEFAULT_CURRENCY = 'EUR';\n\n/**\n * Map the FDI element codes to a `ToothScheme` conditions shortcut. Codes\n * outside the FDI vocabulary are dropped (the scheme ignores unknown ids).\n * Every applied tooth is flagged `filled` so the display-mode chart marks\n * them with both colour and pattern — colour-not-alone.\n */\nfunction elementsToConditions(\n elements: string[],\n): Partial<Record<FdiId, ToothCondition[]>> {\n const conditions: Partial<Record<FdiId, ToothCondition[]>> = {};\n for (const code of elements) {\n conditions[code as FdiId] = ['filled'];\n }\n return conditions;\n}\n\n/* -------------------------------------------------------------------- */\n/* Component */\n/* -------------------------------------------------------------------- */\n\nexport const CarePlanEntryCard = forwardRef<\n HTMLDivElement,\n CarePlanEntryCardProps\n>(\n (\n {\n id,\n careName,\n code,\n label,\n elements,\n done = false,\n executionDateIso,\n plannedAppointment,\n operator,\n price,\n phases,\n billed = false,\n outsideOfEstimate = false,\n notesCount,\n toothDisplay = 'chips',\n locale,\n currency = DEFAULT_CURRENCY,\n surface = 'elevated',\n 'aria-label': ariaLabel,\n className,\n ...rest\n },\n ref,\n ) => {\n const { t, i18n } = useTranslation();\n const headingId = useId();\n const phasesLabelId = useId();\n const detailTriggerId = useId();\n const detailContentId = useId();\n const activeLocale = locale ?? i18n.language ?? 'en';\n\n useAgentRegistration(\n carePlanEntryCardAgent,\n {\n isDone: () => done,\n getPhaseProgress: () => ({\n executed: phases?.executed ?? 0,\n total: phases?.total ?? 0,\n }),\n },\n id,\n );\n\n const hasElements = !!elements && elements.length > 0;\n const hasPhaseDetail = !!phases?.detail && phases.detail.length > 0;\n\n // Price: prefer the discounted amount when present; show the list price\n // struck through beside it. Both are \"to-invoice\" until billed, then\n // settled.\n const priceState = billed ? 'settled' : 'to-invoice';\n const listCents = price?.priceCents;\n const discountedCents = price?.discountedPriceCents;\n const hasDiscount =\n discountedCents !== undefined &&\n listCents !== undefined &&\n discountedCents < listCents;\n const payableCents = discountedCents ?? listCents;\n\n const formatMoney = (cents: number): string =>\n new Intl.NumberFormat(activeLocale, {\n style: 'currency',\n currency,\n }).format(cents / 100);\n\n return (\n <div\n ref={ref}\n role=\"region\"\n aria-label={ariaLabel}\n aria-labelledby={ariaLabel ? undefined : headingId}\n data-component=\"care-plan-entry-card\"\n data-component-id={id}\n data-done={done ? 'true' : 'false'}\n id={id}\n className={entitySurfaceVariants({ surface, className })}\n {...rest}\n >\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]\">\n {/* Heading row: name + code + trailing status flags */}\n <div className=\"ds:flex ds:items-start ds:gap-[var(--spacing-sm)]\">\n <div className=\"ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]\">\n <div className=\"ds:flex ds:flex-wrap ds:items-baseline ds:gap-[var(--spacing-xs)]\">\n <h3\n id={headingId}\n className=\"type-title-item ds:m-0 ds:text-[color:var(--foreground)]\"\n >\n {careName}\n </h3>\n {code ? (\n <span className=\"type-meta ds:text-[color:var(--muted-foreground)] ds:tabular-nums\">\n {code}\n </span>\n ) : null}\n </div>\n {label ? (\n <span className=\"type-body-sm ds:text-[color:var(--muted-foreground)]\">\n {label}\n </span>\n ) : null}\n </div>\n\n <div className=\"ds:flex ds:shrink-0 ds:flex-wrap ds:items-center ds:justify-end ds:gap-[var(--spacing-2xs)]\">\n {done ? (\n <Badge variant=\"success\" size=\"sm\" withDot>\n {t('carePlanEntryCard.flag.done', 'Done')}\n </Badge>\n ) : null}\n {outsideOfEstimate ? (\n <Badge variant=\"warning\" size=\"sm\" withDot>\n {t(\n 'carePlanEntryCard.flag.outsideOfEstimate',\n 'Outside estimate',\n )}\n </Badge>\n ) : null}\n {billed ? (\n <Badge variant=\"neutral\" size=\"sm\">\n {t('carePlanEntryCard.flag.billed', 'Billed')}\n </Badge>\n ) : null}\n {typeof notesCount === 'number' && notesCount > 0 ? (\n <Badge\n variant=\"neutral\"\n size=\"sm\"\n aria-label={t('carePlanEntryCard.notesLabel', {\n count: notesCount,\n defaultValue: '{{count}} notes',\n })}\n >\n {notesCount}\n </Badge>\n ) : null}\n </div>\n </div>\n\n {/* Elements: tooth scheme (display mode) or FDI tag chips */}\n {hasElements ? (\n toothDisplay === 'scheme' ? (\n <ToothScheme\n mode=\"display\"\n conditions={elementsToConditions(elements)}\n ariaLabel={t('carePlanEntryCard.toothSchemeLabel', {\n count: elements.length,\n defaultValue: 'Teeth involved: {{count}}',\n })}\n />\n ) : (\n <div\n role=\"list\"\n aria-label={t(\n 'carePlanEntryCard.elementsLabel',\n 'Teeth involved',\n )}\n className=\"ds:flex ds:flex-wrap ds:gap-[var(--spacing-2xs)]\"\n >\n {elements.map((element) => (\n <div role=\"listitem\" key={element}>\n <Tag label={element} variant=\"info\" size=\"sm\" />\n </div>\n ))}\n </div>\n )\n ) : null}\n\n {/* Schedule / execution line */}\n {done && executionDateIso ? (\n <p className=\"type-body-sm ds:m-0 ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)] ds:text-[color:var(--muted-foreground)]\">\n <span>{t('carePlanEntryCard.executedOn', 'Executed on')}</span>\n <Timestamp\n value={executionDateIso}\n format=\"absolute\"\n locale={activeLocale}\n />\n {operator ? (\n <span>\n {t('carePlanEntryCard.byOperator', {\n operator: operator.name,\n defaultValue: 'by {{operator}}',\n })}\n </span>\n ) : null}\n </p>\n ) : plannedAppointment ? (\n <p className=\"type-body-sm ds:m-0 ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)] ds:text-[color:var(--muted-foreground)]\">\n <span>{t('carePlanEntryCard.plannedFor', 'Planned for')}</span>\n <Timestamp\n value={plannedAppointment.dateIso}\n format=\"absolute\"\n locale={activeLocale}\n />\n {operator ? (\n <span>\n {t('carePlanEntryCard.byOperator', {\n operator: operator.name,\n defaultValue: 'by {{operator}}',\n })}\n </span>\n ) : null}\n </p>\n ) : operator ? (\n <p className=\"type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]\">\n {t('carePlanEntryCard.assignedTo', {\n operator: operator.name,\n defaultValue: 'Assigned to {{operator}}',\n })}\n </p>\n ) : null}\n\n {/* Phase progress */}\n {phases && phases.total > 0 ? (\n <Progress\n value={phases.executed}\n max={phases.total}\n size=\"sm\"\n aria-label={t('carePlanEntryCard.phasesLabel', {\n executed: phases.executed,\n total: phases.total,\n defaultValue: 'Phases: {{executed}} of {{total}} executed',\n })}\n >\n <div className=\"ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]\">\n <Progress.Label id={phasesLabelId}>\n {t('carePlanEntryCard.phasesHeading', 'Phases')}\n </Progress.Label>\n <span className=\"type-body-sm ds:tabular-nums ds:text-[color:var(--muted-foreground)]\">\n {t('carePlanEntryCard.phasesCount', {\n executed: phases.executed,\n total: phases.total,\n defaultValue: '{{executed}} / {{total}}',\n })}\n </span>\n </div>\n </Progress>\n ) : null}\n\n {/* Footer: price + (optional) phase-detail disclosure */}\n {payableCents !== undefined || hasPhaseDetail ? (\n <div className=\"ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]\">\n {payableCents !== undefined ? (\n <div className=\"ds:flex ds:items-center ds:gap-[var(--spacing-xs)]\">\n <TransactionChip\n state={priceState}\n amount={payableCents / 100}\n currency={currency}\n locale={activeLocale}\n size=\"md\"\n />\n {hasDiscount && listCents !== undefined ? (\n <span className=\"type-meta ds:text-[color:var(--muted-foreground)] ds:line-through ds:tabular-nums\">\n {formatMoney(listCents)}\n </span>\n ) : null}\n {hasDiscount && price?.discountPercentage !== undefined ? (\n <Badge variant=\"success\" size=\"sm\">\n {t('carePlanEntryCard.discountLabel', {\n percentage: price.discountPercentage,\n defaultValue: '-{{percentage}}%',\n })}\n </Badge>\n ) : null}\n </div>\n ) : null}\n\n {hasPhaseDetail ? (\n <Collapsible\n variant=\"default\"\n className=\"ds:ms-auto ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]\"\n >\n <CollapsibleTrigger asChild>\n <button\n type=\"button\"\n id={detailTriggerId}\n aria-controls={detailContentId}\n className=\"ds:group ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)] ds:rounded-[var(--radius-sm)] ds:border-0 ds:bg-transparent type-body-sm ds:text-[color:var(--foreground)] ds:cursor-pointer ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]\"\n >\n <span>\n {t(\n 'carePlanEntryCard.phaseDetail.toggle',\n 'Phase detail',\n )}\n </span>\n <ChevronDown\n aria-hidden=\"true\"\n className=\"ds:size-4 ds:shrink-0 ds:text-[color:var(--muted-foreground)] ds:transition-transform ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none ds:group-data-[state=open]:rotate-180\"\n />\n </button>\n </CollapsibleTrigger>\n <CollapsibleContent\n id={detailContentId}\n aria-labelledby={detailTriggerId}\n >\n <ul className=\"ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-xs)] ds:p-0\">\n {phases?.detail?.map((phase, index) => (\n <PhaseDetailRow\n key={`${phase.label}-${index}`}\n phase={phase}\n locale={activeLocale}\n />\n ))}\n </ul>\n </CollapsibleContent>\n </Collapsible>\n ) : null}\n </div>\n ) : null}\n </div>\n </div>\n );\n },\n);\n\nCarePlanEntryCard.displayName = 'CarePlanEntryCard';\n\n/* -------------------------------------------------------------------- */\n/* PhaseDetailRow — one row inside the per-phase Collapsible */\n/* -------------------------------------------------------------------- */\n\nfunction PhaseDetailRow({\n phase,\n locale,\n}: {\n phase: CarePlanEntryPhaseDetail;\n locale: string;\n}): ReactNode {\n const { t } = useTranslation();\n return (\n <li className=\"ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]\">\n <Badge variant={phase.executed ? 'success' : 'neutral'} size=\"sm\" withDot>\n {phase.executed\n ? t('carePlanEntryCard.phaseDetail.executed', 'Executed')\n : t('carePlanEntryCard.phaseDetail.pending', 'Pending')}\n </Badge>\n <span className=\"type-body-sm ds:text-[color:var(--foreground)]\">\n {phase.label}\n </span>\n {phase.executed && phase.executionDateIso ? (\n <Timestamp\n value={phase.executionDateIso}\n format=\"absolute\"\n locale={locale}\n />\n ) : null}\n {phase.operator ? (\n <span className=\"type-meta ds:text-[color:var(--muted-foreground)]\">\n {t('carePlanEntryCard.byOperator', {\n operator: phase.operator,\n defaultValue: 'by {{operator}}',\n })}\n </span>\n ) : null}\n {phase.udi ? (\n <span className=\"type-meta ds:text-[color:var(--muted-foreground)] ds:tabular-nums\">\n {t('carePlanEntryCard.phaseDetail.udi', {\n udi: phase.udi,\n defaultValue: 'UDI {{udi}}',\n })}\n </span>\n ) : null}\n </li>\n );\n}\n\nexport type CarePlanEntryCardSurface = NonNullable<\n VariantProps<typeof entitySurfaceVariants>['surface']\n>;\n"],"names":["carePlanEntryCardAgent","handle","DEFAULT_CURRENCY","elementsToConditions","elements","conditions","code","CarePlanEntryCard","forwardRef","id","careName","label","done","executionDateIso","plannedAppointment","operator","price","phases","billed","outsideOfEstimate","notesCount","toothDisplay","locale","currency","surface","ariaLabel","className","rest","ref","t","i18n","useTranslation","headingId","useId","phasesLabelId","detailTriggerId","detailContentId","activeLocale","useAgentRegistration","hasElements","hasPhaseDetail","priceState","listCents","discountedCents","hasDiscount","payableCents","formatMoney","cents","jsx","entitySurfaceVariants","jsxs","Badge","ToothScheme","element","Tag","Timestamp","Progress","TransactionChip","Collapsible","CollapsibleTrigger","ChevronDown","CollapsibleContent","phase","index","PhaseDetailRow"],"mappings":";;;;;;;;;;;;;AAYO,MAAMA,KAAgE;AAAA,EAC3E,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA,EAKJ,cAAc,CAAC,QAAQ;AAAA,EACvB,OAAO;AAAA,IACL,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,MAAM,CAACC,MAAWA,EAAO,OAAA;AAAA,IAAO;AAAA,IAElC,eAAe;AAAA,MACb,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACA,MAAWA,EAAO,iBAAA;AAAA,IAAiB;AAAA,EAC5C;AAAA,EAEF,SAAS,CAAA;AAAA,EACT,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,O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W,MAAK,MAAK,SAAO,IACtE,UAAAA,EAAM,WACHjC,EAAE,0CAA0C,UAAU,IACtDA,EAAE,yCAAyC,SAAS,GAC1D;AAAA,IACA,gBAAAmB,EAAC,QAAA,EAAK,WAAU,kDACb,YAAM,OACT;AAAA,IACCc,EAAM,YAAYA,EAAM,mBACvB,gBAAAd;AAAA,MAACO;AAAA,MAAA;AAAA,QACC,OAAOO,EAAM;AAAA,QACb,QAAO;AAAA,QACP,QAAAxC;AAAA,MAAA;AAAA,IAAA,IAEA;AAAA,IACHwC,EAAM,WACL,gBAAAd,EAAC,UAAK,WAAU,qDACb,YAAE,gCAAgC;AAAA,MACjC,UAAUc,EAAM;AAAA,MAChB,cAAc;AAAA,IAAA,CACf,GACH,IACE;AAAA,IACHA,EAAM,MACL,gBAAAd,EAAC,UAAK,WAAU,qEACb,YAAE,qCAAqC;AAAA,MACtC,KAAKc,EAAM;AAAA,MACX,cAAc;AAAA,IAAA,CACf,GACH,IACE;AAAA,EAAA,GACN;AAEJ;"}
@@ -2,7 +2,7 @@ import { jsx as O } from "react/jsx-runtime";
2
2
  import { forwardRef as P, useMemo as n, useCallback as x, useRef as aa, useEffect as ea } from "react";
3
3
  import { useTranslation as ra } from "react-i18next";
4
4
  import { C as ia } from "./combobox-DiMLItyu.js";
5
- import { h as ca, a as sa } from "./flag-DZ6V7-hU.js";
5
+ import { h as ca, a as sa } from "./flag-Cnmivlrl.js";
6
6
  import { u as ta } from "./use-controllable-state-BiY4xTzM.js";
7
7
  import { u as oa } from "./registry-DvAUVLHh.js";
8
8
  const N = {
@@ -706,4 +706,4 @@ export {
706
706
  ua as c,
707
707
  Aa as r
708
708
  };
709
- //# sourceMappingURL=country-select-DYHDLEjG.js.map
709
+ //# sourceMappingURL=country-select-BN9nedAp.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"country-select-DYHDLEjG.js","sources":["../../src/components/country-select/iso-3166.ts","../../src/components/country-select/country-select.agent.ts","../../src/components/country-select/country-select.tsx"],"sourcesContent":["/**\n * Bundled closed dataset for CountrySelect — ISO 3166-1 alpha-2 codes mapped to\n * UN geoscheme continental region. Localised country *names* are resolved at render\n * via Intl.DisplayNames and are never bundled here.\n *\n * Source: ISO 3166-1 (249 entries, current as of 2025).\n * Region assignment follows the UN M.49 geoscheme with the following project-level\n * overrides: Russia → 'Europe'; Turkey and Cyprus → 'Asia'; Greenland → 'Americas';\n * Antarctica territories (aq, bv, gs, hm, tf) → 'Antarctica'.\n */\n\nexport type CountryRegion =\n | 'Africa'\n | 'Americas'\n | 'Asia'\n | 'Europe'\n | 'Oceania'\n | 'Antarctica';\n\nexport const ISO_3166_REGIONS: Record<string, CountryRegion> = {\n ad: 'Europe', // Andorra\n ae: 'Asia', // United Arab Emirates\n af: 'Asia', // Afghanistan\n ag: 'Americas', // Antigua and Barbuda\n ai: 'Americas', // Anguilla\n al: 'Europe', // Albania\n am: 'Asia', // Armenia\n ao: 'Africa', // Angola\n aq: 'Antarctica', // Antarctica\n ar: 'Americas', // Argentina\n as: 'Oceania', // American Samoa\n at: 'Europe', // Austria\n au: 'Oceania', // Australia\n aw: 'Americas', // Aruba\n ax: 'Europe', // Åland Islands\n az: 'Asia', // Azerbaijan\n ba: 'Europe', // Bosnia and Herzegovina\n bb: 'Americas', // Barbados\n bd: 'Asia', // Bangladesh\n be: 'Europe', // Belgium\n bf: 'Africa', // Burkina Faso\n bg: 'Europe', // Bulgaria\n bh: 'Asia', // Bahrain\n bi: 'Africa', // Burundi\n bj: 'Africa', // Benin\n bl: 'Americas', // Saint Barthélemy\n bm: 'Americas', // Bermuda\n bn: 'Asia', // Brunei Darussalam\n bo: 'Americas', // Bolivia, Plurinational State of\n bq: 'Americas', // Bonaire, Sint Eustatius and Saba\n br: 'Americas', // Brazil\n bs: 'Americas', // Bahamas\n bt: 'Asia', // Bhutan\n bv: 'Antarctica', // Bouvet Island\n bw: 'Africa', // Botswana\n by: 'Europe', // Belarus\n bz: 'Americas', // Belize\n ca: 'Americas', // Canada\n cc: 'Oceania', // Cocos (Keeling) Islands\n cd: 'Africa', // Congo, Democratic Republic of the\n cf: 'Africa', // Central African Republic\n cg: 'Africa', // Congo\n ch: 'Europe', // Switzerland\n ci: 'Africa', // Côte d'Ivoire\n ck: 'Oceania', // Cook Islands\n cl: 'Americas', // Chile\n cm: 'Africa', // Cameroon\n cn: 'Asia', // China\n co: 'Americas', // Colombia\n cr: 'Americas', // Costa Rica\n cu: 'Americas', // Cuba\n cv: 'Africa', // Cabo Verde\n cw: 'Americas', // Curaçao\n cx: 'Oceania', // Christmas Island\n cy: 'Asia', // Cyprus\n cz: 'Europe', // Czechia\n de: 'Europe', // Germany\n dj: 'Africa', // Djibouti\n dk: 'Europe', // Denmark\n dm: 'Americas', // Dominica\n do: 'Americas', // Dominican Republic\n dz: 'Africa', // Algeria\n ec: 'Americas', // Ecuador\n ee: 'Europe', // Estonia\n eg: 'Africa', // Egypt\n eh: 'Africa', // Western Sahara\n er: 'Africa', // Eritrea\n es: 'Europe', // Spain\n et: 'Africa', // Ethiopia\n fi: 'Europe', // Finland\n fj: 'Oceania', // Fiji\n fk: 'Americas', // Falkland Islands (Malvinas)\n fm: 'Oceania', // Micronesia, Federated States of\n fo: 'Europe', // Faroe Islands\n fr: 'Europe', // France\n ga: 'Africa', // Gabon\n gb: 'Europe', // United Kingdom\n gd: 'Americas', // Grenada\n ge: 'Asia', // Georgia\n gf: 'Americas', // French Guiana\n gg: 'Europe', // Guernsey\n gh: 'Africa', // Ghana\n gi: 'Europe', // Gibraltar\n gl: 'Americas', // Greenland\n gm: 'Africa', // Gambia\n gn: 'Africa', // Guinea\n gp: 'Americas', // Guadeloupe\n gq: 'Africa', // Equatorial Guinea\n gr: 'Europe', // Greece\n gs: 'Antarctica', // South Georgia and the South Sandwich Islands\n gt: 'Americas', // Guatemala\n gu: 'Oceania', // Guam\n gw: 'Africa', // Guinea-Bissau\n gy: 'Americas', // Guyana\n hk: 'Asia', // Hong Kong\n hm: 'Antarctica', // Heard Island and McDonald Islands\n hn: 'Americas', // Honduras\n hr: 'Europe', // Croatia\n ht: 'Americas', // Haiti\n hu: 'Europe', // Hungary\n id: 'Asia', // Indonesia\n ie: 'Europe', // Ireland\n il: 'Asia', // Israel\n im: 'Europe', // Isle of Man\n in: 'Asia', // India\n io: 'Africa', // British Indian Ocean Territory\n iq: 'Asia', // Iraq\n ir: 'Asia', // Iran, Islamic Republic of\n is: 'Europe', // Iceland\n it: 'Europe', // Italy\n je: 'Europe', // Jersey\n jm: 'Americas', // Jamaica\n jo: 'Asia', // Jordan\n jp: 'Asia', // Japan\n ke: 'Africa', // Kenya\n kg: 'Asia', // Kyrgyzstan\n kh: 'Asia', // Cambodia\n ki: 'Oceania', // Kiribati\n km: 'Africa', // Comoros\n kn: 'Americas', // Saint Kitts and Nevis\n kp: 'Asia', // Korea, Democratic People's Republic of\n kr: 'Asia', // Korea, Republic of\n kw: 'Asia', // Kuwait\n ky: 'Americas', // Cayman Islands\n kz: 'Asia', // Kazakhstan\n la: 'Asia', // Lao People's Democratic Republic\n lb: 'Asia', // Lebanon\n lc: 'Americas', // Saint Lucia\n li: 'Europe', // Liechtenstein\n lk: 'Asia', // Sri Lanka\n lr: 'Africa', // Liberia\n ls: 'Africa', // Lesotho\n lt: 'Europe', // Lithuania\n lu: 'Europe', // Luxembourg\n lv: 'Europe', // Latvia\n ly: 'Africa', // Libya\n ma: 'Africa', // Morocco\n mc: 'Europe', // Monaco\n md: 'Europe', // Moldova, Republic of\n me: 'Europe', // Montenegro\n mf: 'Americas', // Saint Martin (French part)\n mg: 'Africa', // Madagascar\n mh: 'Oceania', // Marshall Islands\n mk: 'Europe', // North Macedonia\n ml: 'Africa', // Mali\n mm: 'Asia', // Myanmar\n mn: 'Asia', // Mongolia\n mo: 'Asia', // Macao\n mp: 'Oceania', // Northern Mariana Islands\n mq: 'Americas', // Martinique\n mr: 'Africa', // Mauritania\n ms: 'Americas', // Montserrat\n mt: 'Europe', // Malta\n mu: 'Africa', // Mauritius\n mv: 'Asia', // Maldives\n mw: 'Africa', // Malawi\n mx: 'Americas', // Mexico\n my: 'Asia', // Malaysia\n mz: 'Africa', // Mozambique\n na: 'Africa', // Namibia\n nc: 'Oceania', // New Caledonia\n ne: 'Africa', // Niger\n nf: 'Oceania', // Norfolk Island\n ng: 'Africa', // Nigeria\n ni: 'Americas', // Nicaragua\n nl: 'Europe', // Netherlands\n no: 'Europe', // Norway\n np: 'Asia', // Nepal\n nr: 'Oceania', // Nauru\n nu: 'Oceania', // Niue\n nz: 'Oceania', // New Zealand\n om: 'Asia', // Oman\n pa: 'Americas', // Panama\n pe: 'Americas', // Peru\n pf: 'Oceania', // French Polynesia\n pg: 'Oceania', // Papua New Guinea\n ph: 'Asia', // Philippines\n pk: 'Asia', // Pakistan\n pl: 'Europe', // Poland\n pm: 'Americas', // Saint Pierre and Miquelon\n pn: 'Oceania', // Pitcairn\n pr: 'Americas', // Puerto Rico\n ps: 'Asia', // Palestine, State of\n pt: 'Europe', // Portugal\n pw: 'Oceania', // Palau\n py: 'Americas', // Paraguay\n qa: 'Asia', // Qatar\n re: 'Africa', // Réunion\n ro: 'Europe', // Romania\n rs: 'Europe', // Serbia\n ru: 'Europe', // Russian Federation\n rw: 'Africa', // Rwanda\n sa: 'Asia', // Saudi Arabia\n sb: 'Oceania', // Solomon Islands\n sc: 'Africa', // Seychelles\n sd: 'Africa', // Sudan\n se: 'Europe', // Sweden\n sg: 'Asia', // Singapore\n sh: 'Africa', // Saint Helena, Ascension and Tristan da Cunha\n si: 'Europe', // Slovenia\n sj: 'Europe', // Svalbard and Jan Mayen\n sk: 'Europe', // Slovakia\n sl: 'Africa', // Sierra Leone\n sm: 'Europe', // San Marino\n sn: 'Africa', // Senegal\n so: 'Africa', // Somalia\n sr: 'Americas', // Suriname\n ss: 'Africa', // South Sudan\n st: 'Africa', // Sao Tome and Principe\n sv: 'Americas', // El Salvador\n sx: 'Americas', // Sint Maarten (Dutch part)\n sy: 'Asia', // Syrian Arab Republic\n sz: 'Africa', // Eswatini\n tc: 'Americas', // Turks and Caicos Islands\n td: 'Africa', // Chad\n tf: 'Antarctica', // French Southern Territories\n tg: 'Africa', // Togo\n th: 'Asia', // Thailand\n tj: 'Asia', // Tajikistan\n tk: 'Oceania', // Tokelau\n tl: 'Asia', // Timor-Leste\n tm: 'Asia', // Turkmenistan\n tn: 'Africa', // Tunisia\n to: 'Oceania', // Tonga\n tr: 'Asia', // Türkiye\n tt: 'Americas', // Trinidad and Tobago\n tv: 'Oceania', // Tuvalu\n tw: 'Asia', // Taiwan, Province of China\n tz: 'Africa', // Tanzania, United Republic of\n ua: 'Europe', // Ukraine\n ug: 'Africa', // Uganda\n um: 'Oceania', // United States Minor Outlying Islands\n us: 'Americas', // United States of America\n uy: 'Americas', // Uruguay\n uz: 'Asia', // Uzbekistan\n va: 'Europe', // Holy See\n vc: 'Americas', // Saint Vincent and the Grenadines\n ve: 'Americas', // Venezuela, Bolivarian Republic of\n vg: 'Americas', // Virgin Islands (British)\n vi: 'Americas', // Virgin Islands (U.S.)\n vn: 'Asia', // Viet Nam\n vu: 'Oceania', // Vanuatu\n wf: 'Oceania', // Wallis and Futuna\n ws: 'Oceania', // Samoa\n ye: 'Asia', // Yemen\n yt: 'Africa', // Mayotte\n za: 'Africa', // South Africa\n zm: 'Africa', // Zambia\n zw: 'Africa', // Zimbabwe\n};\n\nexport const ISO_3166_ALPHA2: readonly string[] =\n Object.keys(ISO_3166_REGIONS).sort();\n\nexport function regionForCountry(code: string): CountryRegion | undefined {\n return ISO_3166_REGIONS[code.toLowerCase()];\n}\n","import type { AgentAdapter } from '../../agent/types';\n\n// Curated agent-readiness handle — the country-select wrapper owns the\n// selection; the inner Combobox registers its own `combobox` adapter for\n// the mechanical open/filter/close concerns.\nexport interface CountrySelectHandle {\n getValue: () => string | null;\n setValue: (value: string | null) => void;\n clear: () => void;\n}\n\nexport const countrySelectAgent: AgentAdapter<CountrySelectHandle> = {\n id: 'country-select',\n // Persisted single choice of an ISO country code.\n capabilities: ['select_single', 'set_value'],\n state: {\n value: {\n type: 'string | null',\n descriptionKey: 'ui.agent.countrySelect.state.value',\n description:\n 'Selected ISO 3166-1 alpha-2 country code (lowercased), or null when nothing is selected.',\n read: (handle) => handle.getValue(),\n },\n },\n actions: {\n set_value: {\n safety: 'write',\n argsType: '{ value: string | null }',\n argsSchema: {\n type: 'object',\n properties: {\n value: {\n type: ['string', 'null'],\n description:\n 'ISO 3166-1 alpha-2 country code (lowercased) to select, or null to clear.',\n },\n },\n required: ['value'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.countrySelect.actions.setValue',\n description: 'Set the selected country by ISO alpha-2 code.',\n examples: [{ args: { value: 'it' }, note: 'Select Italy.' }],\n invoke: (handle, args: { value: string | null }) => {\n handle.setValue(args.value);\n },\n },\n clear_selection: {\n safety: 'destructive',\n idempotent: true,\n descriptionKey: 'ui.agent.countrySelect.actions.clearSelection',\n description: 'Clear the selected country.',\n invoke: (handle) => {\n handle.clear();\n },\n },\n },\n domHooks: {\n root: { attr: 'data-component', value: 'country-select' },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop.',\n },\n // The inner Combobox emits `data-option-id` and registers its own\n // `combobox` adapter; both adapters intentionally coexist (the registry\n // keys by id + instanceId), so this hook is reachable from this root too.\n item: {\n attr: 'data-option-id',\n description:\n 'Each country option emits its alpha-2 code as data-option-id.',\n },\n },\n};\n","import {\n forwardRef,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n type ReactNode,\n} from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { Combobox, type ComboboxOption } from '../combobox/combobox';\nimport { Flag, hasFlag } from '../flag/flag';\nimport { useControllableState } from '../../hooks/use-controllable-state';\nimport { useAgentRegistration } from '../../agent';\nimport {\n ISO_3166_ALPHA2,\n regionForCountry,\n type CountryRegion,\n} from './iso-3166';\nimport {\n countrySelectAgent,\n type CountrySelectHandle,\n} from './country-select.agent';\n\n/* ------------------------------------------------------------------ */\n/* Public API */\n/* */\n/* A searchable country picker built on Combobox. Country NAMES are */\n/* resolved per-locale at render via `Intl.DisplayNames` (zero bundled */\n/* name data, switches with the active language); only the ISO code */\n/* list + region grouping are bundled. The value is the ISO 3166-1 */\n/* alpha-2 code, LOWERCASED, matching `StructuredAddress.country`. */\n/* ------------------------------------------------------------------ */\n\nexport interface CountrySelectProps {\n /** Selected country — ISO 3166-1 alpha-2, lowercased (e.g. `'it'`). */\n value?: string;\n /** Uncontrolled initial value. Ignored once `value` is set. */\n defaultValue?: string;\n /** Fires with the new lowercased alpha-2 code (or `''` when cleared). */\n onValueChange?: (code: string) => void;\n /**\n * Restrict the list to these codes (lowercase alpha-2). Default: every\n * ISO 3166-1 alpha-2 country.\n */\n countries?: string[];\n /**\n * Float these countries to the top under a \"Popular\" heading, in the\n * given order (lowercase alpha-2). They are removed from their region\n * group so they never appear twice.\n */\n popularCountries?: string[];\n /** Group the remaining countries by world region. Default `true`. */\n grouped?: boolean;\n /**\n * Override the localized display name for specific codes — e.g. to pin\n * politically-sensitive wording. Keyed by lowercase alpha-2.\n */\n nameOverrides?: Record<string, string>;\n /** Show a flag before each country name. Default `true`. */\n showFlag?: boolean;\n placeholder?: string;\n clearable?: boolean;\n disabled?: boolean;\n readOnly?: boolean;\n required?: boolean;\n name?: string;\n id?: string;\n size?: 'sm' | 'md' | 'lg';\n tone?: 'default' | 'error';\n /**\n * Accessible name. REQUIRED when used inside a `<FormField>`: cmdk labels\n * the input through its own hidden element, so the visible FormField label\n * is not the computed accessible name unless this is passed. Set it to the\n * visible label text (e.g. `\"Country\"`).\n */\n 'aria-label'?: string;\n /** Invalid-state fallback for use outside a `<FormField>` (inline editors). */\n 'aria-invalid'?: boolean;\n /** Error-message id fallback for use outside a `<FormField>`. */\n 'aria-describedby'?: string;\n className?: string;\n}\n\n// Display order for region groups — broad-to-narrow by AlfaDocs relevance.\nconst REGION_ORDER: readonly CountryRegion[] = [\n 'Europe',\n 'Americas',\n 'Asia',\n 'Africa',\n 'Oceania',\n 'Antarctica',\n];\n\nexport const CountrySelect = forwardRef<HTMLInputElement, CountrySelectProps>(\n function CountrySelect(\n {\n value: valueProp,\n defaultValue,\n onValueChange,\n countries,\n popularCountries,\n grouped = true,\n nameOverrides,\n showFlag = true,\n placeholder,\n clearable,\n disabled,\n readOnly,\n required,\n name,\n id,\n size = 'md',\n tone = 'default',\n 'aria-label': ariaLabel,\n 'aria-invalid': ariaInvalid,\n 'aria-describedby': ariaDescribedBy,\n className,\n },\n ref,\n ) {\n const { t, i18n } = useTranslation();\n\n const [value, setValue] = useControllableState<string>({\n // Normalise incoming codes — a consumer may pass `'IT'` from a server\n // payload, but option values are lowercase, so an un-normalised value\n // would never match and the field would render blank.\n value: valueProp?.toLowerCase(),\n defaultValue: defaultValue?.toLowerCase(),\n onChange: onValueChange,\n });\n\n const displayNames = useMemo(() => {\n try {\n return new Intl.DisplayNames([i18n.language], { type: 'region' });\n } catch {\n return new Intl.DisplayNames(['en'], { type: 'region' });\n }\n }, [i18n.language]);\n\n const collator = useMemo(\n () => new Intl.Collator(i18n.language),\n [i18n.language],\n );\n\n const codes = useMemo(\n () => (countries ?? ISO_3166_ALPHA2).map((c) => c.toLowerCase()),\n [countries],\n );\n\n const nameFor = useCallback(\n (code: string): string =>\n nameOverrides?.[code] ??\n displayNames.of(code.toUpperCase()) ??\n code.toUpperCase(),\n [nameOverrides, displayNames],\n );\n\n const flagFor = useCallback(\n (code: string): ReactNode =>\n showFlag && hasFlag(code) ? (\n <Flag country={code} size=\"sm\" rounded=\"sm\" />\n ) : undefined,\n [showFlag],\n );\n\n const options = useMemo<ComboboxOption[]>(() => {\n const codeSet = new Set(codes);\n const popular = (popularCountries ?? [])\n .map((c) => c.toLowerCase())\n .filter((c) => codeSet.has(c));\n const popularSet = new Set(popular);\n\n const makeOption = (code: string, group?: string): ComboboxOption => ({\n value: code,\n label: nameFor(code),\n group,\n startAdornment: flagFor(code),\n });\n\n const popularGroup = grouped\n ? t('inputs.countrySelect.popular', 'Popular')\n : undefined;\n const popularOptions = popular.map((c) => makeOption(c, popularGroup));\n\n const rest = codes.filter((c) => !popularSet.has(c));\n\n if (!grouped) {\n const sorted = [...rest].sort((a, b) =>\n collator.compare(nameFor(a), nameFor(b)),\n );\n return [...popularOptions, ...sorted.map((c) => makeOption(c))];\n }\n\n const byRegion = new Map<CountryRegion, string[]>();\n for (const code of rest) {\n const region = regionForCountry(code) ?? 'Antarctica';\n const list = byRegion.get(region);\n if (list) list.push(code);\n else byRegion.set(region, [code]);\n }\n\n const groupedOptions: ComboboxOption[] = [];\n for (const region of REGION_ORDER) {\n const list = byRegion.get(region);\n if (!list) continue;\n list.sort((a, b) => collator.compare(nameFor(a), nameFor(b)));\n const heading = t(\n `inputs.countrySelect.regions.${region.toLowerCase()}`,\n region,\n );\n for (const code of list) groupedOptions.push(makeOption(code, heading));\n }\n return [...popularOptions, ...groupedOptions];\n }, [codes, popularCountries, grouped, nameFor, flagFor, collator, t]);\n\n /* ----------------------------------------------------------------- */\n /* Agent adapter */\n /* ----------------------------------------------------------------- */\n\n const valueRef = useRef(value);\n useEffect(() => {\n valueRef.current = value;\n }, [value]);\n\n const agentHandle = useMemo<CountrySelectHandle>(\n () => ({\n getValue: () => valueRef.current || null,\n setValue: (next) => setValue(next ?? ''),\n clear: () => setValue(''),\n }),\n [setValue],\n );\n useAgentRegistration(countrySelectAgent, agentHandle, id);\n\n return (\n <div\n data-component=\"country-select\"\n data-component-id={id}\n className={['ds:w-full', className].filter(Boolean).join(' ')}\n >\n <Combobox\n ref={ref}\n options={options}\n value={value ?? ''}\n onValueChange={(next) => setValue(next)}\n placeholder={\n placeholder ??\n t('inputs.countrySelect.placeholder', 'Search countries')\n }\n emptyMessage={t('inputs.countrySelect.empty', 'No countries found')}\n clearable={clearable}\n disabled={disabled}\n readOnly={readOnly}\n required={required}\n name={name}\n id={id}\n size={size}\n tone={tone}\n autoComplete=\"country\"\n aria-label={ariaLabel}\n aria-invalid={ariaInvalid}\n aria-describedby={ariaDescribedBy}\n />\n </div>\n );\n },\n);\n\nCountrySelect.displayName = 'CountrySelect';\n"],"names":["ISO_3166_REGIONS","ISO_3166_ALPHA2","regionForCountry","code","countrySelectAgent","handle","args","REGION_ORDER","CountrySelect","forwardRef","valueProp","defaultValue","onValueChange","countries","popularCountries","grouped","nameOverrides","showFlag","placeholder","clearable","disabled","readOnly","required","name","id","size","tone","ariaLabel","ariaInvalid","ariaDescribedBy","className","ref","t","i18n","useTranslation","value","setValue","useControllableState","displayNames","useMemo","collator","codes","c","nameFor","useCallback","flagFor","hasFlag","jsx","Flag","options","codeSet","popular","popularSet","makeOption","group","popularGroup","popularOptions","rest","sorted","a","b","byRegion","region","list","groupedOptions","heading","valueRef","useRef","useEffect","agentHandle","next","useAgentRegistration","Combobox"],"mappings":";;;;;;;AAmBO,MAAMA,IAAkD;AAAA,EAC7D,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,I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AAiC,GAAU,MAAM;AACd,MAAAF,EAAS,UAAU/B;AAAA,IACrB,GAAG,CAACA,CAAK,CAAC;AAEV,UAAMkC,IAAc9B;AAAA,MAClB,OAAO;AAAA,QACL,UAAU,MAAM2B,EAAS,WAAW;AAAA,QACpC,UAAU,CAACI,MAASlC,EAASkC,KAAQ,EAAE;AAAA,QACvC,OAAO,MAAMlC,EAAS,EAAE;AAAA,MAAA;AAAA,MAE1B,CAACA,CAAQ;AAAA,IAAA;AAEX,WAAAmC,GAAqBnE,IAAoBiE,GAAa7C,CAAE,GAGtD,gBAAAuB;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,kBAAe;AAAA,QACf,qBAAmBvB;AAAA,QACnB,WAAW,CAAC,aAAaM,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA,QAE5D,UAAA,gBAAAiB;AAAA,UAACyB;AAAA,UAAA;AAAA,YACC,KAAAzC;AAAA,YACA,SAAAkB;AAAA,YACA,OAAOd,KAAS;AAAA,YAChB,eAAe,CAACmC,MAASlC,EAASkC,CAAI;AAAA,YACtC,aACEpD,KACAc,EAAE,oCAAoC,kBAAkB;AAAA,YAE1D,cAAcA,EAAE,8BAA8B,oBAAoB;AAAA,YAClE,WAAAb;AAAA,YACA,UAAAC;AAAA,YACA,UAAAC;AAAA,YACA,UAAAC;AAAA,YACA,MAAAC;AAAA,YACA,IAAAC;AAAA,YACA,MAAAC;AAAA,YACA,MAAAC;AAAA,YACA,cAAa;AAAA,YACb,cAAYC;AAAA,YACZ,gBAAcC;AAAA,YACd,oBAAkBC;AAAA,UAAA;AAAA,QAAA;AAAA,MACpB;AAAA,IAAA;AAAA,EAGN;AACF;AAEArB,GAAc,cAAc;"}
1
+ {"version":3,"file":"country-select-BN9nedAp.js","sources":["../../src/components/country-select/iso-3166.ts","../../src/components/country-select/country-select.agent.ts","../../src/components/country-select/country-select.tsx"],"sourcesContent":["/**\n * Bundled closed dataset for CountrySelect — ISO 3166-1 alpha-2 codes mapped to\n * UN geoscheme continental region. Localised country *names* are resolved at render\n * via Intl.DisplayNames and are never bundled here.\n *\n * Source: ISO 3166-1 (249 entries, current as of 2025).\n * Region assignment follows the UN M.49 geoscheme with the following project-level\n * overrides: Russia → 'Europe'; Turkey and Cyprus → 'Asia'; Greenland → 'Americas';\n * Antarctica territories (aq, bv, gs, hm, tf) → 'Antarctica'.\n */\n\nexport type CountryRegion =\n | 'Africa'\n | 'Americas'\n | 'Asia'\n | 'Europe'\n | 'Oceania'\n | 'Antarctica';\n\nexport const ISO_3166_REGIONS: Record<string, CountryRegion> = {\n ad: 'Europe', // Andorra\n ae: 'Asia', // United Arab Emirates\n af: 'Asia', // Afghanistan\n ag: 'Americas', // Antigua and Barbuda\n ai: 'Americas', // Anguilla\n al: 'Europe', // Albania\n am: 'Asia', // Armenia\n ao: 'Africa', // Angola\n aq: 'Antarctica', // Antarctica\n ar: 'Americas', // Argentina\n as: 'Oceania', // American Samoa\n at: 'Europe', // Austria\n au: 'Oceania', // Australia\n aw: 'Americas', // Aruba\n ax: 'Europe', // Åland Islands\n az: 'Asia', // Azerbaijan\n ba: 'Europe', // Bosnia and Herzegovina\n bb: 'Americas', // Barbados\n bd: 'Asia', // Bangladesh\n be: 'Europe', // Belgium\n bf: 'Africa', // Burkina Faso\n bg: 'Europe', // Bulgaria\n bh: 'Asia', // Bahrain\n bi: 'Africa', // Burundi\n bj: 'Africa', // Benin\n bl: 'Americas', // Saint Barthélemy\n bm: 'Americas', // Bermuda\n bn: 'Asia', // Brunei Darussalam\n bo: 'Americas', // Bolivia, Plurinational State of\n bq: 'Americas', // Bonaire, Sint Eustatius and Saba\n br: 'Americas', // Brazil\n bs: 'Americas', // Bahamas\n bt: 'Asia', // Bhutan\n bv: 'Antarctica', // Bouvet Island\n bw: 'Africa', // Botswana\n by: 'Europe', // Belarus\n bz: 'Americas', // Belize\n ca: 'Americas', // Canada\n cc: 'Oceania', // Cocos (Keeling) Islands\n cd: 'Africa', // Congo, Democratic Republic of the\n cf: 'Africa', // Central African Republic\n cg: 'Africa', // Congo\n ch: 'Europe', // Switzerland\n ci: 'Africa', // Côte d'Ivoire\n ck: 'Oceania', // Cook Islands\n cl: 'Americas', // Chile\n cm: 'Africa', // Cameroon\n cn: 'Asia', // China\n co: 'Americas', // Colombia\n cr: 'Americas', // Costa Rica\n cu: 'Americas', // Cuba\n cv: 'Africa', // Cabo Verde\n cw: 'Americas', // Curaçao\n cx: 'Oceania', // Christmas Island\n cy: 'Asia', // Cyprus\n cz: 'Europe', // Czechia\n de: 'Europe', // Germany\n dj: 'Africa', // Djibouti\n dk: 'Europe', // Denmark\n dm: 'Americas', // Dominica\n do: 'Americas', // Dominican Republic\n dz: 'Africa', // Algeria\n ec: 'Americas', // Ecuador\n ee: 'Europe', // Estonia\n eg: 'Africa', // Egypt\n eh: 'Africa', // Western Sahara\n er: 'Africa', // Eritrea\n es: 'Europe', // Spain\n et: 'Africa', // Ethiopia\n fi: 'Europe', // Finland\n fj: 'Oceania', // Fiji\n fk: 'Americas', // Falkland Islands (Malvinas)\n fm: 'Oceania', // Micronesia, Federated States of\n fo: 'Europe', // Faroe Islands\n fr: 'Europe', // France\n ga: 'Africa', // Gabon\n gb: 'Europe', // United Kingdom\n gd: 'Americas', // Grenada\n ge: 'Asia', // Georgia\n gf: 'Americas', // French Guiana\n gg: 'Europe', // Guernsey\n gh: 'Africa', // Ghana\n gi: 'Europe', // Gibraltar\n gl: 'Americas', // Greenland\n gm: 'Africa', // Gambia\n gn: 'Africa', // Guinea\n gp: 'Americas', // Guadeloupe\n gq: 'Africa', // Equatorial Guinea\n gr: 'Europe', // Greece\n gs: 'Antarctica', // South Georgia and the South Sandwich Islands\n gt: 'Americas', // Guatemala\n gu: 'Oceania', // Guam\n gw: 'Africa', // Guinea-Bissau\n gy: 'Americas', // Guyana\n hk: 'Asia', // Hong Kong\n hm: 'Antarctica', // Heard Island and McDonald Islands\n hn: 'Americas', // Honduras\n hr: 'Europe', // Croatia\n ht: 'Americas', // Haiti\n hu: 'Europe', // Hungary\n id: 'Asia', // Indonesia\n ie: 'Europe', // Ireland\n il: 'Asia', // Israel\n im: 'Europe', // Isle of Man\n in: 'Asia', // India\n io: 'Africa', // British Indian Ocean Territory\n iq: 'Asia', // Iraq\n ir: 'Asia', // Iran, Islamic Republic of\n is: 'Europe', // Iceland\n it: 'Europe', // Italy\n je: 'Europe', // Jersey\n jm: 'Americas', // Jamaica\n jo: 'Asia', // Jordan\n jp: 'Asia', // Japan\n ke: 'Africa', // Kenya\n kg: 'Asia', // Kyrgyzstan\n kh: 'Asia', // Cambodia\n ki: 'Oceania', // Kiribati\n km: 'Africa', // Comoros\n kn: 'Americas', // Saint Kitts and Nevis\n kp: 'Asia', // Korea, Democratic People's Republic of\n kr: 'Asia', // Korea, Republic of\n kw: 'Asia', // Kuwait\n ky: 'Americas', // Cayman Islands\n kz: 'Asia', // Kazakhstan\n la: 'Asia', // Lao People's Democratic Republic\n lb: 'Asia', // Lebanon\n lc: 'Americas', // Saint Lucia\n li: 'Europe', // Liechtenstein\n lk: 'Asia', // Sri Lanka\n lr: 'Africa', // Liberia\n ls: 'Africa', // Lesotho\n lt: 'Europe', // Lithuania\n lu: 'Europe', // Luxembourg\n lv: 'Europe', // Latvia\n ly: 'Africa', // Libya\n ma: 'Africa', // Morocco\n mc: 'Europe', // Monaco\n md: 'Europe', // Moldova, Republic of\n me: 'Europe', // Montenegro\n mf: 'Americas', // Saint Martin (French part)\n mg: 'Africa', // Madagascar\n mh: 'Oceania', // Marshall Islands\n mk: 'Europe', // North Macedonia\n ml: 'Africa', // Mali\n mm: 'Asia', // Myanmar\n mn: 'Asia', // Mongolia\n mo: 'Asia', // Macao\n mp: 'Oceania', // Northern Mariana Islands\n mq: 'Americas', // Martinique\n mr: 'Africa', // Mauritania\n ms: 'Americas', // Montserrat\n mt: 'Europe', // Malta\n mu: 'Africa', // Mauritius\n mv: 'Asia', // Maldives\n mw: 'Africa', // Malawi\n mx: 'Americas', // Mexico\n my: 'Asia', // Malaysia\n mz: 'Africa', // Mozambique\n na: 'Africa', // Namibia\n nc: 'Oceania', // New Caledonia\n ne: 'Africa', // Niger\n nf: 'Oceania', // Norfolk Island\n ng: 'Africa', // Nigeria\n ni: 'Americas', // Nicaragua\n nl: 'Europe', // Netherlands\n no: 'Europe', // Norway\n np: 'Asia', // Nepal\n nr: 'Oceania', // Nauru\n nu: 'Oceania', // Niue\n nz: 'Oceania', // New Zealand\n om: 'Asia', // Oman\n pa: 'Americas', // Panama\n pe: 'Americas', // Peru\n pf: 'Oceania', // French Polynesia\n pg: 'Oceania', // Papua New Guinea\n ph: 'Asia', // Philippines\n pk: 'Asia', // Pakistan\n pl: 'Europe', // Poland\n pm: 'Americas', // Saint Pierre and Miquelon\n pn: 'Oceania', // Pitcairn\n pr: 'Americas', // Puerto Rico\n ps: 'Asia', // Palestine, State of\n pt: 'Europe', // Portugal\n pw: 'Oceania', // Palau\n py: 'Americas', // Paraguay\n qa: 'Asia', // Qatar\n re: 'Africa', // Réunion\n ro: 'Europe', // Romania\n rs: 'Europe', // Serbia\n ru: 'Europe', // Russian Federation\n rw: 'Africa', // Rwanda\n sa: 'Asia', // Saudi Arabia\n sb: 'Oceania', // Solomon Islands\n sc: 'Africa', // Seychelles\n sd: 'Africa', // Sudan\n se: 'Europe', // Sweden\n sg: 'Asia', // Singapore\n sh: 'Africa', // Saint Helena, Ascension and Tristan da Cunha\n si: 'Europe', // Slovenia\n sj: 'Europe', // Svalbard and Jan Mayen\n sk: 'Europe', // Slovakia\n sl: 'Africa', // Sierra Leone\n sm: 'Europe', // San Marino\n sn: 'Africa', // Senegal\n so: 'Africa', // Somalia\n sr: 'Americas', // Suriname\n ss: 'Africa', // South Sudan\n st: 'Africa', // Sao Tome and Principe\n sv: 'Americas', // El Salvador\n sx: 'Americas', // Sint Maarten (Dutch part)\n sy: 'Asia', // Syrian Arab Republic\n sz: 'Africa', // Eswatini\n tc: 'Americas', // Turks and Caicos Islands\n td: 'Africa', // Chad\n tf: 'Antarctica', // French Southern Territories\n tg: 'Africa', // Togo\n th: 'Asia', // Thailand\n tj: 'Asia', // Tajikistan\n tk: 'Oceania', // Tokelau\n tl: 'Asia', // Timor-Leste\n tm: 'Asia', // Turkmenistan\n tn: 'Africa', // Tunisia\n to: 'Oceania', // Tonga\n tr: 'Asia', // Türkiye\n tt: 'Americas', // Trinidad and Tobago\n tv: 'Oceania', // Tuvalu\n tw: 'Asia', // Taiwan, Province of China\n tz: 'Africa', // Tanzania, United Republic of\n ua: 'Europe', // Ukraine\n ug: 'Africa', // Uganda\n um: 'Oceania', // United States Minor Outlying Islands\n us: 'Americas', // United States of America\n uy: 'Americas', // Uruguay\n uz: 'Asia', // Uzbekistan\n va: 'Europe', // Holy See\n vc: 'Americas', // Saint Vincent and the Grenadines\n ve: 'Americas', // Venezuela, Bolivarian Republic of\n vg: 'Americas', // Virgin Islands (British)\n vi: 'Americas', // Virgin Islands (U.S.)\n vn: 'Asia', // Viet Nam\n vu: 'Oceania', // Vanuatu\n wf: 'Oceania', // Wallis and Futuna\n ws: 'Oceania', // Samoa\n ye: 'Asia', // Yemen\n yt: 'Africa', // Mayotte\n za: 'Africa', // South Africa\n zm: 'Africa', // Zambia\n zw: 'Africa', // Zimbabwe\n};\n\nexport const ISO_3166_ALPHA2: readonly string[] =\n Object.keys(ISO_3166_REGIONS).sort();\n\nexport function regionForCountry(code: string): CountryRegion | undefined {\n return ISO_3166_REGIONS[code.toLowerCase()];\n}\n","import type { AgentAdapter } from '../../agent/types';\n\n// Curated agent-readiness handle — the country-select wrapper owns the\n// selection; the inner Combobox registers its own `combobox` adapter for\n// the mechanical open/filter/close concerns.\nexport interface CountrySelectHandle {\n getValue: () => string | null;\n setValue: (value: string | null) => void;\n clear: () => void;\n}\n\nexport const countrySelectAgent: AgentAdapter<CountrySelectHandle> = {\n id: 'country-select',\n // Persisted single choice of an ISO country code.\n capabilities: ['select_single', 'set_value'],\n state: {\n value: {\n type: 'string | null',\n descriptionKey: 'ui.agent.countrySelect.state.value',\n description:\n 'Selected ISO 3166-1 alpha-2 country code (lowercased), or null when nothing is selected.',\n read: (handle) => handle.getValue(),\n },\n },\n actions: {\n set_value: {\n safety: 'write',\n argsType: '{ value: string | null }',\n argsSchema: {\n type: 'object',\n properties: {\n value: {\n type: ['string', 'null'],\n description:\n 'ISO 3166-1 alpha-2 country code (lowercased) to select, or null to clear.',\n },\n },\n required: ['value'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.countrySelect.actions.setValue',\n description: 'Set the selected country by ISO alpha-2 code.',\n examples: [{ args: { value: 'it' }, note: 'Select Italy.' }],\n invoke: (handle, args: { value: string | null }) => {\n handle.setValue(args.value);\n },\n },\n clear_selection: {\n safety: 'destructive',\n idempotent: true,\n descriptionKey: 'ui.agent.countrySelect.actions.clearSelection',\n description: 'Clear the selected country.',\n invoke: (handle) => {\n handle.clear();\n },\n },\n },\n domHooks: {\n root: { attr: 'data-component', value: 'country-select' },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop.',\n },\n // The inner Combobox emits `data-option-id` and registers its own\n // `combobox` adapter; both adapters intentionally coexist (the registry\n // keys by id + instanceId), so this hook is reachable from this root too.\n item: {\n attr: 'data-option-id',\n description:\n 'Each country option emits its alpha-2 code as data-option-id.',\n },\n },\n};\n","import {\n forwardRef,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n type ReactNode,\n} from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { Combobox, type ComboboxOption } from '../combobox/combobox';\nimport { Flag, hasFlag } from '../flag/flag';\nimport { useControllableState } from '../../hooks/use-controllable-state';\nimport { useAgentRegistration } from '../../agent';\nimport {\n ISO_3166_ALPHA2,\n regionForCountry,\n type CountryRegion,\n} from './iso-3166';\nimport {\n countrySelectAgent,\n type CountrySelectHandle,\n} from './country-select.agent';\n\n/* ------------------------------------------------------------------ */\n/* Public API */\n/* */\n/* A searchable country picker built on Combobox. Country NAMES are */\n/* resolved per-locale at render via `Intl.DisplayNames` (zero bundled */\n/* name data, switches with the active language); only the ISO code */\n/* list + region grouping are bundled. The value is the ISO 3166-1 */\n/* alpha-2 code, LOWERCASED, matching `StructuredAddress.country`. */\n/* ------------------------------------------------------------------ */\n\nexport interface CountrySelectProps {\n /** Selected country — ISO 3166-1 alpha-2, lowercased (e.g. `'it'`). */\n value?: string;\n /** Uncontrolled initial value. Ignored once `value` is set. */\n defaultValue?: string;\n /** Fires with the new lowercased alpha-2 code (or `''` when cleared). */\n onValueChange?: (code: string) => void;\n /**\n * Restrict the list to these codes (lowercase alpha-2). Default: every\n * ISO 3166-1 alpha-2 country.\n */\n countries?: string[];\n /**\n * Float these countries to the top under a \"Popular\" heading, in the\n * given order (lowercase alpha-2). They are removed from their region\n * group so they never appear twice.\n */\n popularCountries?: string[];\n /** Group the remaining countries by world region. Default `true`. */\n grouped?: boolean;\n /**\n * Override the localized display name for specific codes — e.g. to pin\n * politically-sensitive wording. Keyed by lowercase alpha-2.\n */\n nameOverrides?: Record<string, string>;\n /** Show a flag before each country name. Default `true`. */\n showFlag?: boolean;\n placeholder?: string;\n clearable?: boolean;\n disabled?: boolean;\n readOnly?: boolean;\n required?: boolean;\n name?: string;\n id?: string;\n size?: 'sm' | 'md' | 'lg';\n tone?: 'default' | 'error';\n /**\n * Accessible name. REQUIRED when used inside a `<FormField>`: cmdk labels\n * the input through its own hidden element, so the visible FormField label\n * is not the computed accessible name unless this is passed. Set it to the\n * visible label text (e.g. `\"Country\"`).\n */\n 'aria-label'?: string;\n /** Invalid-state fallback for use outside a `<FormField>` (inline editors). */\n 'aria-invalid'?: boolean;\n /** Error-message id fallback for use outside a `<FormField>`. */\n 'aria-describedby'?: string;\n className?: string;\n}\n\n// Display order for region groups — broad-to-narrow by AlfaDocs relevance.\nconst REGION_ORDER: readonly CountryRegion[] = [\n 'Europe',\n 'Americas',\n 'Asia',\n 'Africa',\n 'Oceania',\n 'Antarctica',\n];\n\nexport const CountrySelect = forwardRef<HTMLInputElement, CountrySelectProps>(\n function CountrySelect(\n {\n value: valueProp,\n defaultValue,\n onValueChange,\n countries,\n popularCountries,\n grouped = true,\n nameOverrides,\n showFlag = true,\n placeholder,\n clearable,\n disabled,\n readOnly,\n required,\n name,\n id,\n size = 'md',\n tone = 'default',\n 'aria-label': ariaLabel,\n 'aria-invalid': ariaInvalid,\n 'aria-describedby': ariaDescribedBy,\n className,\n },\n ref,\n ) {\n const { t, i18n } = useTranslation();\n\n const [value, setValue] = useControllableState<string>({\n // Normalise incoming codes — a consumer may pass `'IT'` from a server\n // payload, but option values are lowercase, so an un-normalised value\n // would never match and the field would render blank.\n value: valueProp?.toLowerCase(),\n defaultValue: defaultValue?.toLowerCase(),\n onChange: onValueChange,\n });\n\n const displayNames = useMemo(() => {\n try {\n return new Intl.DisplayNames([i18n.language], { type: 'region' });\n } catch {\n return new Intl.DisplayNames(['en'], { type: 'region' });\n }\n }, [i18n.language]);\n\n const collator = useMemo(\n () => new Intl.Collator(i18n.language),\n [i18n.language],\n );\n\n const codes = useMemo(\n () => (countries ?? ISO_3166_ALPHA2).map((c) => c.toLowerCase()),\n [countries],\n );\n\n const nameFor = useCallback(\n (code: string): string =>\n nameOverrides?.[code] ??\n displayNames.of(code.toUpperCase()) ??\n code.toUpperCase(),\n [nameOverrides, displayNames],\n );\n\n const flagFor = useCallback(\n (code: string): ReactNode =>\n showFlag && hasFlag(code) ? (\n <Flag country={code} size=\"sm\" rounded=\"sm\" />\n ) : undefined,\n [showFlag],\n );\n\n const options = useMemo<ComboboxOption[]>(() => {\n const codeSet = new Set(codes);\n const popular = (popularCountries ?? [])\n .map((c) => c.toLowerCase())\n .filter((c) => codeSet.has(c));\n const popularSet = new Set(popular);\n\n const makeOption = (code: string, group?: string): ComboboxOption => ({\n value: code,\n label: nameFor(code),\n group,\n startAdornment: flagFor(code),\n });\n\n const popularGroup = grouped\n ? t('inputs.countrySelect.popular', 'Popular')\n : undefined;\n const popularOptions = popular.map((c) => makeOption(c, popularGroup));\n\n const rest = codes.filter((c) => !popularSet.has(c));\n\n if (!grouped) {\n const sorted = [...rest].sort((a, b) =>\n collator.compare(nameFor(a), nameFor(b)),\n );\n return [...popularOptions, ...sorted.map((c) => makeOption(c))];\n }\n\n const byRegion = new Map<CountryRegion, string[]>();\n for (const code of rest) {\n const region = regionForCountry(code) ?? 'Antarctica';\n const list = byRegion.get(region);\n if (list) list.push(code);\n else byRegion.set(region, [code]);\n }\n\n const groupedOptions: ComboboxOption[] = [];\n for (const region of REGION_ORDER) {\n const list = byRegion.get(region);\n if (!list) continue;\n list.sort((a, b) => collator.compare(nameFor(a), nameFor(b)));\n const heading = t(\n `inputs.countrySelect.regions.${region.toLowerCase()}`,\n region,\n );\n for (const code of list) groupedOptions.push(makeOption(code, heading));\n }\n return [...popularOptions, ...groupedOptions];\n }, [codes, popularCountries, grouped, nameFor, flagFor, collator, t]);\n\n /* ----------------------------------------------------------------- */\n /* Agent adapter */\n /* ----------------------------------------------------------------- */\n\n const valueRef = useRef(value);\n useEffect(() => {\n valueRef.current = value;\n }, [value]);\n\n const agentHandle = useMemo<CountrySelectHandle>(\n () => ({\n getValue: () => valueRef.current || null,\n setValue: (next) => setValue(next ?? ''),\n clear: () => setValue(''),\n }),\n [setValue],\n );\n useAgentRegistration(countrySelectAgent, agentHandle, id);\n\n return (\n <div\n data-component=\"country-select\"\n data-component-id={id}\n className={['ds:w-full', className].filter(Boolean).join(' ')}\n >\n <Combobox\n ref={ref}\n options={options}\n value={value ?? ''}\n onValueChange={(next) => setValue(next)}\n placeholder={\n placeholder ??\n t('inputs.countrySelect.placeholder', 'Search countries')\n }\n emptyMessage={t('inputs.countrySelect.empty', 'No countries found')}\n clearable={clearable}\n disabled={disabled}\n readOnly={readOnly}\n required={required}\n name={name}\n id={id}\n size={size}\n tone={tone}\n autoComplete=\"country\"\n aria-label={ariaLabel}\n aria-invalid={ariaInvalid}\n aria-describedby={ariaDescribedBy}\n />\n </div>\n );\n },\n);\n\nCountrySelect.displayName = 'CountrySelect';\n"],"names":["ISO_3166_REGIONS","ISO_3166_ALPHA2","regionForCountry","code","countrySelectAgent","handle","args","REGION_ORDER","CountrySelect","forwardRef","valueProp","defaultValue","onValueChange","countries","popularCountries","grouped","nameOverrides","showFlag","placeholder","clearable","disabled","readOnly","required","name","id","size","tone","ariaLabel","ariaInvalid","ariaDescribedBy","className","ref","t","i18n","useTranslation","value","setValue","useControllableState","displayNames","useMemo","collator","codes","c","nameFor","useCallback","flagFor","hasFlag","jsx","Flag","options","codeSet","popular","popularSet","makeOption","group","popularGroup","popularOptions","rest","sorted","a","b","byRegion","region","list","groupedOptions","heading","valueRef","useRef","useEffect","agentHandle","next","useAgentRegistration","Combobox"],"mappings":";;;;;;;AAmBO,MAAMA,IAAkD;AAAA,EAC7D,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AA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