@alfadocs/ui-kit-debug 1.104.0 → 1.105.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 (324) hide show
  1. package/dist/_chunks/{ai-credits-exhausted-notice-CwZnSACy.js → ai-credits-exhausted-notice-Lws3113e.js} +2 -2
  2. package/dist/_chunks/{ai-credits-exhausted-notice-CwZnSACy.js.map → ai-credits-exhausted-notice-Lws3113e.js.map} +1 -1
  3. package/dist/_chunks/{ai-permission-notice-VNh3W57L.js → ai-permission-notice-BkgcGmu8.js} +2 -2
  4. package/dist/_chunks/{ai-permission-notice-VNh3W57L.js.map → ai-permission-notice-BkgcGmu8.js.map} +1 -1
  5. package/dist/_chunks/{alert-9kEwDza3.js → alert-C4WKViaS.js} +59 -50
  6. package/dist/_chunks/alert-C4WKViaS.js.map +1 -0
  7. package/dist/_chunks/{anamnesis-summary-rows-B9HqOGd7.js → anamnesis-summary-rows-QhbDdY7b.js} +4 -4
  8. package/dist/_chunks/{anamnesis-summary-rows-B9HqOGd7.js.map → anamnesis-summary-rows-QhbDdY7b.js.map} +1 -1
  9. package/dist/_chunks/{audio-recorder-BOm2FgEu.js → audio-recorder-BlDozxdU.js} +2 -2
  10. package/dist/_chunks/{audio-recorder-BOm2FgEu.js.map → audio-recorder-BlDozxdU.js.map} +1 -1
  11. package/dist/_chunks/{auth-form-parts-B3GWChvG.js → auth-form-parts-DVHfqnp6.js} +2 -2
  12. package/dist/_chunks/{auth-form-parts-B3GWChvG.js.map → auth-form-parts-DVHfqnp6.js.map} +1 -1
  13. package/dist/_chunks/{balance-badge-cell-DGFm2jfP.js → balance-badge-cell-wJ6cTD_h.js} +3 -3
  14. package/dist/_chunks/{balance-badge-cell-DGFm2jfP.js.map → balance-badge-cell-wJ6cTD_h.js.map} +1 -1
  15. package/dist/_chunks/{calendar-appointment-editor-dialog-DqyATSh3.js → calendar-appointment-editor-dialog-D8DblVjW.js} +8 -8
  16. package/dist/_chunks/{calendar-appointment-editor-dialog-DqyATSh3.js.map → calendar-appointment-editor-dialog-D8DblVjW.js.map} +1 -1
  17. package/dist/_chunks/{care-plan-card-YWKV8Kjq.js → care-plan-card-DMjlYlFc.js} +2 -2
  18. package/dist/_chunks/{care-plan-card-YWKV8Kjq.js.map → care-plan-card-DMjlYlFc.js.map} +1 -1
  19. package/dist/_chunks/{care-plan-entry-card-CApivtMW.js → care-plan-entry-card-3hguBW45.js} +2 -2
  20. package/dist/_chunks/{care-plan-entry-card-CApivtMW.js.map → care-plan-entry-card-3hguBW45.js.map} +1 -1
  21. package/dist/_chunks/{contact-profile-card-uExd3pKC.js → contact-profile-card-CAL66GaH.js} +120 -111
  22. package/dist/_chunks/contact-profile-card-CAL66GaH.js.map +1 -0
  23. package/dist/_chunks/{data-table-C5uN4ato.js → data-table-zXBxFYpJ.js} +761 -715
  24. package/dist/_chunks/data-table-zXBxFYpJ.js.map +1 -0
  25. package/dist/_chunks/{date-range-picker-B_j4VQlV.js → date-range-picker-DCADIR8o.js} +2 -2
  26. package/dist/_chunks/{date-range-picker-B_j4VQlV.js.map → date-range-picker-DCADIR8o.js.map} +1 -1
  27. package/dist/_chunks/{date-time-picker-cwsWiB4q.js → date-time-picker-CT2bC7-A.js} +2 -2
  28. package/dist/_chunks/{date-time-picker-cwsWiB4q.js.map → date-time-picker-CT2bC7-A.js.map} +1 -1
  29. package/dist/_chunks/{document-preview-U8H6tnDJ.js → document-preview-BalyZqnn.js} +2 -2
  30. package/dist/_chunks/{document-preview-U8H6tnDJ.js.map → document-preview-BalyZqnn.js.map} +1 -1
  31. package/dist/_chunks/{document-scanner-Bf3VUp00.js → document-scanner-5p-Uu8dy.js} +2 -2
  32. package/dist/_chunks/{document-scanner-Bf3VUp00.js.map → document-scanner-5p-Uu8dy.js.map} +1 -1
  33. package/dist/_chunks/{entity-summary-BKfR4Vws.js → entity-summary-BbqqYqF1.js} +2 -2
  34. package/dist/_chunks/{entity-summary-BKfR4Vws.js.map → entity-summary-BbqqYqF1.js.map} +1 -1
  35. package/dist/_chunks/{error-summary-mGxIyDAY.js → error-summary-DxNhwf_G.js} +2 -2
  36. package/dist/_chunks/{error-summary-mGxIyDAY.js.map → error-summary-DxNhwf_G.js.map} +1 -1
  37. package/dist/_chunks/{face-scheme-DdVLQ5dP.js → face-scheme-e2M2HJGz.js} +2 -2
  38. package/dist/_chunks/{face-scheme-DdVLQ5dP.js.map → face-scheme-e2M2HJGz.js.map} +1 -1
  39. package/dist/_chunks/{file-manager-CnGBVX_q.js → file-manager-BDKe59sg.js} +2 -2
  40. package/dist/_chunks/{file-manager-CnGBVX_q.js.map → file-manager-BDKe59sg.js.map} +1 -1
  41. package/dist/_chunks/{forgot-password-form-CeTb5p-x.js → forgot-password-form-vfCO2-Tt.js} +4 -4
  42. package/dist/_chunks/{forgot-password-form-CeTb5p-x.js.map → forgot-password-form-vfCO2-Tt.js.map} +1 -1
  43. package/dist/_chunks/{freemium-paywall-CM0zQSDE.js → freemium-paywall-BDeq9QWR.js} +2 -2
  44. package/dist/_chunks/{freemium-paywall-CM0zQSDE.js.map → freemium-paywall-BDeq9QWR.js.map} +1 -1
  45. package/dist/_chunks/{gestational-age-calculator-CXcDKQqC.js → gestational-age-calculator-AnaH00nk.js} +2 -2
  46. package/dist/_chunks/{gestational-age-calculator-CXcDKQqC.js.map → gestational-age-calculator-AnaH00nk.js.map} +1 -1
  47. package/dist/_chunks/{hcg-doubling-BJFR3onB.js → hcg-doubling-DdyUt4gz.js} +2 -2
  48. package/dist/_chunks/{hcg-doubling-BJFR3onB.js.map → hcg-doubling-DdyUt4gz.js.map} +1 -1
  49. package/dist/_chunks/{heatmap-Cz0Krieg.js → heatmap-D4qqpCEj.js} +1550 -1547
  50. package/dist/_chunks/{heatmap-Cz0Krieg.js.map → heatmap-D4qqpCEj.js.map} +1 -1
  51. package/dist/_chunks/{help-me-write-templates-ra5a__Yy.js → help-me-write-templates-YmceSxf5.js} +3 -3
  52. package/dist/_chunks/{help-me-write-templates-ra5a__Yy.js.map → help-me-write-templates-YmceSxf5.js.map} +1 -1
  53. package/dist/_chunks/info-tip-C-MPkShR.js +266 -0
  54. package/dist/_chunks/info-tip-C-MPkShR.js.map +1 -0
  55. package/dist/_chunks/{kit-extensions-C4o_tFN4.js → kit-extensions-BOnTM4Yf.js} +3 -3
  56. package/dist/_chunks/{kit-extensions-C4o_tFN4.js.map → kit-extensions-BOnTM4Yf.js.map} +1 -1
  57. package/dist/_chunks/{link-cell-renderer-BRek9kz7.js → link-cell-renderer-C8vfCOEp.js} +2 -2
  58. package/dist/_chunks/{link-cell-renderer-BRek9kz7.js.map → link-cell-renderer-C8vfCOEp.js.map} +1 -1
  59. package/dist/_chunks/{login-dev-card-D5BV5j1i.js → login-dev-card-Cz1Clugq.js} +3 -3
  60. package/dist/_chunks/{login-dev-card-D5BV5j1i.js.map → login-dev-card-Cz1Clugq.js.map} +1 -1
  61. package/dist/_chunks/{marketplace-app-shell-BsctSegT.js → marketplace-app-shell-C-4QF6mp.js} +2 -2
  62. package/dist/_chunks/{marketplace-app-shell-BsctSegT.js.map → marketplace-app-shell-C-4QF6mp.js.map} +1 -1
  63. package/dist/_chunks/{notes-panel-BjTpaz8d.js → notes-panel-SlzUL8in.js} +4 -4
  64. package/dist/_chunks/{notes-panel-BjTpaz8d.js.map → notes-panel-SlzUL8in.js.map} +1 -1
  65. package/dist/_chunks/{notice-group-DkYzKyAZ.js → notice-group-B-trhof8.js} +3 -3
  66. package/dist/_chunks/{notice-group-DkYzKyAZ.js.map → notice-group-B-trhof8.js.map} +1 -1
  67. package/dist/_chunks/{patient-details-BXM3dRKb.js → patient-details-wMgTFtpp.js} +2 -2
  68. package/dist/_chunks/{patient-details-BXM3dRKb.js.map → patient-details-wMgTFtpp.js.map} +1 -1
  69. package/dist/_chunks/{patient-field-row--dCDO5oB.js → patient-field-row-Bhm2Ig1P.js} +2 -2
  70. package/dist/_chunks/{patient-field-row--dCDO5oB.js.map → patient-field-row-Bhm2Ig1P.js.map} +1 -1
  71. package/dist/_chunks/{patient-summary-card-DB7fv-Tr.js → patient-summary-card-DMdPPG3n.js} +2 -2
  72. package/dist/_chunks/{patient-summary-card-DB7fv-Tr.js.map → patient-summary-card-DMdPPG3n.js.map} +1 -1
  73. package/dist/_chunks/{payment-automation-upsell-BPF0c-5D.js → payment-automation-upsell-u5EuFyCY.js} +2 -2
  74. package/dist/_chunks/{payment-automation-upsell-BPF0c-5D.js.map → payment-automation-upsell-u5EuFyCY.js.map} +1 -1
  75. package/dist/_chunks/{payment-form-PBuh8PIa.js → payment-form-C-s1x-bU.js} +2 -2
  76. package/dist/_chunks/{payment-form-PBuh8PIa.js.map → payment-form-C-s1x-bU.js.map} +1 -1
  77. package/dist/_chunks/{pdf-viewer-DlceXkfW.js → pdf-viewer-BnBKdx0y.js} +2 -2
  78. package/dist/_chunks/{pdf-viewer-DlceXkfW.js.map → pdf-viewer-BnBKdx0y.js.map} +1 -1
  79. package/dist/_chunks/{practice-profile-hero-BAvGdQmt.js → practice-profile-hero-Bb4YyxHA.js} +31 -29
  80. package/dist/_chunks/practice-profile-hero-Bb4YyxHA.js.map +1 -0
  81. package/dist/_chunks/{practice-results-ChBP9x2r.js → practice-results-BXz01sti.js} +485 -445
  82. package/dist/_chunks/practice-results-BXz01sti.js.map +1 -0
  83. package/dist/_chunks/{pregnancy-dating-D0Kf9s7s.js → pregnancy-dating-D6dLkMpl.js} +2 -2
  84. package/dist/_chunks/{pregnancy-dating-D0Kf9s7s.js.map → pregnancy-dating-D6dLkMpl.js.map} +1 -1
  85. package/dist/_chunks/{progress-notice-DiHWZ8Ms.js → progress-notice-F7ao70ZP.js} +2 -2
  86. package/dist/_chunks/{progress-notice-DiHWZ8Ms.js.map → progress-notice-F7ao70ZP.js.map} +1 -1
  87. package/dist/_chunks/{radiograph-panel.agent-BQ95uFCd.js → radiograph-panel.agent-0ngF2sGS.js} +2 -2
  88. package/dist/_chunks/{radiograph-panel.agent-BQ95uFCd.js.map → radiograph-panel.agent-0ngF2sGS.js.map} +1 -1
  89. package/dist/_chunks/{registration-form-JzzTomhd.js → registration-form-CEJRUS9G.js} +3 -3
  90. package/dist/_chunks/{registration-form-JzzTomhd.js.map → registration-form-CEJRUS9G.js.map} +1 -1
  91. package/dist/_chunks/{reserved.agent-BxD0gnbt.js → reserved.agent-C-C9cvO5.js} +2 -2
  92. package/dist/_chunks/{reserved.agent-BxD0gnbt.js.map → reserved.agent-C-C9cvO5.js.map} +1 -1
  93. package/dist/_chunks/{reset-password-form-DDdGEoIL.js → reset-password-form-B0acanDD.js} +4 -4
  94. package/dist/_chunks/{reset-password-form-DDdGEoIL.js.map → reset-password-form-B0acanDD.js.map} +1 -1
  95. package/dist/_chunks/{rich-text-editor-F04przIt.js → rich-text-editor-C3nANKZt.js} +2 -2
  96. package/dist/_chunks/{rich-text-editor-F04przIt.js.map → rich-text-editor-C3nANKZt.js.map} +1 -1
  97. package/dist/_chunks/{send-registration-link-form-DHCQpA4C.js → send-registration-link-form-Nn0jf65G.js} +3 -3
  98. package/dist/_chunks/{send-registration-link-form-DHCQpA4C.js.map → send-registration-link-form-Nn0jf65G.js.map} +1 -1
  99. package/dist/_chunks/{sign-document-B5qZhthO.js → sign-document-CQZVzfpk.js} +2 -2
  100. package/dist/_chunks/{sign-document-B5qZhthO.js.map → sign-document-CQZVzfpk.js.map} +1 -1
  101. package/dist/_chunks/{signature-request-DB6kePIm.js → signature-request-DtLph5Z4.js} +3 -3
  102. package/dist/_chunks/{signature-request-DB6kePIm.js.map → signature-request-DtLph5Z4.js.map} +1 -1
  103. package/dist/_chunks/{switch-D--x7n6h.js → switch-DO6uC4HJ.js} +40 -36
  104. package/dist/_chunks/switch-DO6uC4HJ.js.map +1 -0
  105. package/dist/_chunks/{task-editor-BiPGFXtB.js → task-editor-CmXcj6cC.js} +4 -4
  106. package/dist/_chunks/{task-editor-BiPGFXtB.js.map → task-editor-CmXcj6cC.js.map} +1 -1
  107. package/dist/_chunks/{tasks-panel-iVeuu9a8.js → tasks-panel-CFo5uIHx.js} +3 -3
  108. package/dist/_chunks/{tasks-panel-iVeuu9a8.js.map → tasks-panel-CFo5uIHx.js.map} +1 -1
  109. package/dist/_chunks/{theme-toggle-jZRbAidE.js → theme-toggle-Czq3K9jB.js} +2 -2
  110. package/dist/_chunks/{theme-toggle-jZRbAidE.js.map → theme-toggle-Czq3K9jB.js.map} +1 -1
  111. package/dist/_chunks/{time-picker-DSt-ns5F.js → time-picker-DDr5vhwQ.js} +344 -332
  112. package/dist/_chunks/time-picker-DDr5vhwQ.js.map +1 -0
  113. package/dist/_chunks/{tooth-scheme-Bd7xECuj.js → tooth-scheme-C-ALCHaV.js} +2 -2
  114. package/dist/_chunks/{tooth-scheme-Bd7xECuj.js.map → tooth-scheme-C-ALCHaV.js.map} +1 -1
  115. package/dist/_chunks/{use-appointment-details-read-CmqGGYCy.js → use-appointment-details-read-VI26Z-pc.js} +3 -3
  116. package/dist/_chunks/{use-appointment-details-read-CmqGGYCy.js.map → use-appointment-details-read-VI26Z-pc.js.map} +1 -1
  117. package/dist/_chunks/{voice-control-panel-BGJjUwnY.js → voice-control-panel-B0TUZAiP.js} +3 -3
  118. package/dist/_chunks/{voice-control-panel-BGJjUwnY.js.map → voice-control-panel-B0TUZAiP.js.map} +1 -1
  119. package/dist/_chunks/{warning-stack-3S7e2q07.js → warning-stack-Dx7cpj10.js} +2 -2
  120. package/dist/_chunks/{warning-stack-3S7e2q07.js.map → warning-stack-Dx7cpj10.js.map} +1 -1
  121. package/dist/_chunks/week-availability-CsTiwtYj.js +318 -0
  122. package/dist/_chunks/week-availability-CsTiwtYj.js.map +1 -0
  123. package/dist/_chunks/weekly-hours-editor-BsVsgeOc.js +252 -0
  124. package/dist/_chunks/weekly-hours-editor-BsVsgeOc.js.map +1 -0
  125. package/dist/_chunks/{workflow-map-B1jf6QaB.js → workflow-map-DWk-rZse.js} +2 -2
  126. package/dist/_chunks/{workflow-map-B1jf6QaB.js.map → workflow-map-DWk-rZse.js.map} +1 -1
  127. package/dist/_chunks/{workflow-webhook-action-B_52rH7O.js → workflow-webhook-action-DILFqAVd.js} +2 -2
  128. package/dist/_chunks/{workflow-webhook-action-B_52rH7O.js.map → workflow-webhook-action-DILFqAVd.js.map} +1 -1
  129. package/dist/ag-grid.css +5 -1
  130. package/dist/agent-catalog.json +1 -1
  131. package/dist/components/ai-credits-notice/index.js +1 -1
  132. package/dist/components/ai-permission-notice/index.js +1 -1
  133. package/dist/components/alert/alert.d.ts.map +1 -1
  134. package/dist/components/alert/index.js +1 -1
  135. package/dist/components/appointment-details-panel/index.js +1 -1
  136. package/dist/components/audio-recorder/index.js +1 -1
  137. package/dist/components/booking/index.js +1 -1
  138. package/dist/components/care-plan-card/index.js +1 -1
  139. package/dist/components/care-plan-entry-card/index.js +1 -1
  140. package/dist/components/contact-profile-card/contact-profile-card.d.ts +8 -0
  141. package/dist/components/contact-profile-card/contact-profile-card.d.ts.map +1 -1
  142. package/dist/components/contact-profile-card/index.js +1 -1
  143. package/dist/components/data-table/data-table.d.ts +6 -0
  144. package/dist/components/data-table/data-table.d.ts.map +1 -1
  145. package/dist/components/data-table/header-min-width.d.ts +21 -0
  146. package/dist/components/data-table/header-min-width.d.ts.map +1 -0
  147. package/dist/components/data-table/index.js +2 -2
  148. package/dist/components/date-range-picker/index.js +1 -1
  149. package/dist/components/date-time-picker/index.js +1 -1
  150. package/dist/components/document-preview/index.js +1 -1
  151. package/dist/components/document-scanner/index.js +1 -1
  152. package/dist/components/entity-summary/index.js +1 -1
  153. package/dist/components/error-summary/index.js +1 -1
  154. package/dist/components/face-scheme/index.js +1 -1
  155. package/dist/components/file-manager/index.js +1 -1
  156. package/dist/components/freemium-paywall/index.js +1 -1
  157. package/dist/components/gestational-age-calculator/index.js +1 -1
  158. package/dist/components/hcg-doubling/index.js +1 -1
  159. package/dist/components/heatmap/heatmap.d.ts +5 -0
  160. package/dist/components/heatmap/heatmap.d.ts.map +1 -1
  161. package/dist/components/heatmap/index.js +1 -1
  162. package/dist/components/index.d.ts +2 -0
  163. package/dist/components/index.d.ts.map +1 -1
  164. package/dist/components/info-tip/index.js +1 -1
  165. package/dist/components/info-tip/info-tip.d.ts +10 -0
  166. package/dist/components/info-tip/info-tip.d.ts.map +1 -1
  167. package/dist/components/notes-panel/index.js +1 -1
  168. package/dist/components/notice-group/index.js +1 -1
  169. package/dist/components/patient-details/index.js +1 -1
  170. package/dist/components/patient-summary-card/index.js +1 -1
  171. package/dist/components/patient-table/index.js +1 -1
  172. package/dist/components/payment-form/index.js +1 -1
  173. package/dist/components/pdf-viewer/index.js +1 -1
  174. package/dist/components/practice-profile-hero/index.js +1 -1
  175. package/dist/components/practice-profile-hero/practice-profile-hero.d.ts +7 -0
  176. package/dist/components/practice-profile-hero/practice-profile-hero.d.ts.map +1 -1
  177. package/dist/components/practice-results/index.js +1 -1
  178. package/dist/components/practice-results/practice-results.d.ts +13 -0
  179. package/dist/components/practice-results/practice-results.d.ts.map +1 -1
  180. package/dist/components/pregnancy-dating/index.js +1 -1
  181. package/dist/components/progress-notice/index.js +1 -1
  182. package/dist/components/radiograph-panel/index.js +1 -1
  183. package/dist/components/rich-text-editor/index.js +2 -2
  184. package/dist/components/sign-document/index.js +1 -1
  185. package/dist/components/switch/index.js +1 -1
  186. package/dist/components/switch/switch.d.ts +2 -0
  187. package/dist/components/switch/switch.d.ts.map +1 -1
  188. package/dist/components/task-editor/index.js +1 -1
  189. package/dist/components/tasks-panel/index.js +1 -1
  190. package/dist/components/theme-toggle/index.js +1 -1
  191. package/dist/components/time-picker/index.js +1 -1
  192. package/dist/components/time-picker/time-picker.d.ts.map +1 -1
  193. package/dist/components/tooth-scheme/index.js +1 -1
  194. package/dist/components/voice-control-panel/index.js +1 -1
  195. package/dist/components/warning-stack/index.js +1 -1
  196. package/dist/components/week-availability/index.d.ts +3 -0
  197. package/dist/components/week-availability/index.d.ts.map +1 -0
  198. package/dist/components/week-availability/index.js +10 -0
  199. package/dist/components/week-availability/index.js.map +1 -0
  200. package/dist/components/week-availability/week-availability.d.ts +68 -0
  201. package/dist/components/week-availability/week-availability.d.ts.map +1 -0
  202. package/dist/components/weekly-hours-editor/index.d.ts +3 -0
  203. package/dist/components/weekly-hours-editor/index.d.ts.map +1 -0
  204. package/dist/components/weekly-hours-editor/index.js +9 -0
  205. package/dist/components/weekly-hours-editor/index.js.map +1 -0
  206. package/dist/components/weekly-hours-editor/weekly-hours-editor.d.ts +42 -0
  207. package/dist/components/weekly-hours-editor/weekly-hours-editor.d.ts.map +1 -0
  208. package/dist/components/workflow/index.js +1 -1
  209. package/dist/core.css +1 -1
  210. package/dist/i18n/locales/ar.d.ts +34 -0
  211. package/dist/i18n/locales/ar.d.ts.map +1 -1
  212. package/dist/i18n/locales/ar.js +34 -0
  213. package/dist/i18n/locales/ar.js.map +1 -1
  214. package/dist/i18n/locales/de.d.ts +34 -0
  215. package/dist/i18n/locales/de.d.ts.map +1 -1
  216. package/dist/i18n/locales/de.js +34 -0
  217. package/dist/i18n/locales/de.js.map +1 -1
  218. package/dist/i18n/locales/el.d.ts +34 -0
  219. package/dist/i18n/locales/el.d.ts.map +1 -1
  220. package/dist/i18n/locales/el.js +34 -0
  221. package/dist/i18n/locales/el.js.map +1 -1
  222. package/dist/i18n/locales/en.d.ts +34 -0
  223. package/dist/i18n/locales/en.d.ts.map +1 -1
  224. package/dist/i18n/locales/en.js +34 -0
  225. package/dist/i18n/locales/en.js.map +1 -1
  226. package/dist/i18n/locales/es.d.ts +34 -0
  227. package/dist/i18n/locales/es.d.ts.map +1 -1
  228. package/dist/i18n/locales/es.js +34 -0
  229. package/dist/i18n/locales/es.js.map +1 -1
  230. package/dist/i18n/locales/fr.d.ts +34 -0
  231. package/dist/i18n/locales/fr.d.ts.map +1 -1
  232. package/dist/i18n/locales/fr.js +34 -0
  233. package/dist/i18n/locales/fr.js.map +1 -1
  234. package/dist/i18n/locales/hi.d.ts +34 -0
  235. package/dist/i18n/locales/hi.d.ts.map +1 -1
  236. package/dist/i18n/locales/hi.js +34 -0
  237. package/dist/i18n/locales/hi.js.map +1 -1
  238. package/dist/i18n/locales/it.d.ts +34 -0
  239. package/dist/i18n/locales/it.d.ts.map +1 -1
  240. package/dist/i18n/locales/it.js +34 -0
  241. package/dist/i18n/locales/it.js.map +1 -1
  242. package/dist/i18n/locales/ja.d.ts +34 -0
  243. package/dist/i18n/locales/ja.d.ts.map +1 -1
  244. package/dist/i18n/locales/ja.js +34 -0
  245. package/dist/i18n/locales/ja.js.map +1 -1
  246. package/dist/i18n/locales/nl.d.ts +34 -0
  247. package/dist/i18n/locales/nl.d.ts.map +1 -1
  248. package/dist/i18n/locales/nl.js +34 -0
  249. package/dist/i18n/locales/nl.js.map +1 -1
  250. package/dist/i18n/locales/pl.d.ts +34 -0
  251. package/dist/i18n/locales/pl.d.ts.map +1 -1
  252. package/dist/i18n/locales/pl.js +34 -0
  253. package/dist/i18n/locales/pl.js.map +1 -1
  254. package/dist/i18n/locales/pt.d.ts +34 -0
  255. package/dist/i18n/locales/pt.d.ts.map +1 -1
  256. package/dist/i18n/locales/pt.js +34 -0
  257. package/dist/i18n/locales/pt.js.map +1 -1
  258. package/dist/i18n/locales/ro.d.ts +34 -0
  259. package/dist/i18n/locales/ro.d.ts.map +1 -1
  260. package/dist/i18n/locales/ro.js +34 -0
  261. package/dist/i18n/locales/ro.js.map +1 -1
  262. package/dist/i18n/locales/ru.d.ts +34 -0
  263. package/dist/i18n/locales/ru.d.ts.map +1 -1
  264. package/dist/i18n/locales/ru.js +34 -0
  265. package/dist/i18n/locales/ru.js.map +1 -1
  266. package/dist/i18n/locales/sq.d.ts +34 -0
  267. package/dist/i18n/locales/sq.d.ts.map +1 -1
  268. package/dist/i18n/locales/sq.js +34 -0
  269. package/dist/i18n/locales/sq.js.map +1 -1
  270. package/dist/i18n/locales/sv.d.ts +34 -0
  271. package/dist/i18n/locales/sv.d.ts.map +1 -1
  272. package/dist/i18n/locales/sv.js +34 -0
  273. package/dist/i18n/locales/sv.js.map +1 -1
  274. package/dist/i18n/locales/tr.d.ts +34 -0
  275. package/dist/i18n/locales/tr.d.ts.map +1 -1
  276. package/dist/i18n/locales/tr.js +34 -0
  277. package/dist/i18n/locales/tr.js.map +1 -1
  278. package/dist/i18n/locales/zh.d.ts +34 -0
  279. package/dist/i18n/locales/zh.d.ts.map +1 -1
  280. package/dist/i18n/locales/zh.js +34 -0
  281. package/dist/i18n/locales/zh.js.map +1 -1
  282. package/dist/index.js +879 -866
  283. package/dist/index.js.map +1 -1
  284. package/dist/locales/ar.json +34 -0
  285. package/dist/locales/de.json +34 -0
  286. package/dist/locales/el.json +34 -0
  287. package/dist/locales/en.json +34 -0
  288. package/dist/locales/es.json +34 -0
  289. package/dist/locales/fr.json +34 -0
  290. package/dist/locales/hi.json +34 -0
  291. package/dist/locales/it.json +34 -0
  292. package/dist/locales/ja.json +34 -0
  293. package/dist/locales/nl.json +34 -0
  294. package/dist/locales/pl.json +34 -0
  295. package/dist/locales/pt.json +34 -0
  296. package/dist/locales/ro.json +34 -0
  297. package/dist/locales/ru.json +34 -0
  298. package/dist/locales/sq.json +34 -0
  299. package/dist/locales/sv.json +34 -0
  300. package/dist/locales/tr.json +34 -0
  301. package/dist/locales/zh.json +34 -0
  302. package/dist/patterns/anamnesis/index.js +1 -1
  303. package/dist/patterns/calendar/index.js +1 -1
  304. package/dist/patterns/forgot-password-form/index.js +1 -1
  305. package/dist/patterns/help-me-write-templates/index.js +2 -2
  306. package/dist/patterns/login-form/index.js +1 -1
  307. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  308. package/dist/patterns/payment-automation-upsell/index.js +1 -1
  309. package/dist/patterns/registration-form/index.js +1 -1
  310. package/dist/patterns/reset-password-form/index.js +1 -1
  311. package/dist/patterns/send-registration-link-form/index.js +1 -1
  312. package/dist/patterns/signature-request/index.js +1 -1
  313. package/dist/patterns/workflow-webhook-action/index.js +1 -1
  314. package/dist/tokens.css +3 -1
  315. package/package.json +9 -1
  316. package/dist/_chunks/alert-9kEwDza3.js.map +0 -1
  317. package/dist/_chunks/contact-profile-card-uExd3pKC.js.map +0 -1
  318. package/dist/_chunks/data-table-C5uN4ato.js.map +0 -1
  319. package/dist/_chunks/info-tip-1Xsq9GLi.js +0 -230
  320. package/dist/_chunks/info-tip-1Xsq9GLi.js.map +0 -1
  321. package/dist/_chunks/practice-profile-hero-BAvGdQmt.js.map +0 -1
  322. package/dist/_chunks/practice-results-ChBP9x2r.js.map +0 -1
  323. package/dist/_chunks/switch-D--x7n6h.js.map +0 -1
  324. package/dist/_chunks/time-picker-DSt-ns5F.js.map +0 -1
@@ -1,5 +1,5 @@
1
- import { jsx as C, jsxs as le, Fragment as Gn } from "react/jsx-runtime";
2
- import { useContext as Vn, createContext as $n, useId as Pn, useRef as ie, useMemo as X, useState as we, useCallback as ae, useEffect as gt, memo as jn, forwardRef as Mn, lazy as Sn, Suspense as qn } from "react";
1
+ import { jsx as H, jsxs as ce, Fragment as Gn } from "react/jsx-runtime";
2
+ import { useContext as Vn, createContext as $n, useId as Pn, useRef as le, useMemo as X, useState as ve, useCallback as ae, useEffect as gt, memo as jn, forwardRef as Mn, lazy as Sn, Suspense as qn } from "react";
3
3
  import { useTranslation as wt } from "react-i18next";
4
4
  import { u as Wn } from "./registry-DvAUVLHh.js";
5
5
  import { f as Nn } from "./intl-locale-FWh-Y5_3.js";
@@ -9,9 +9,9 @@ import { L as Jn } from "./live-region-C41SO3cA.js";
9
9
  import { S as qt } from "./skeleton-tTWJpvAq.js";
10
10
  import { T as An, a as Qn } from "./tooltip-uEBdD1-5.js";
11
11
  import { p as Xn } from "./privacy-mask-DbEKI-Jv.js";
12
- import { u as nt } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
12
+ import { u as ot } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
13
13
  import { i as Zn } from "./is-development-CLUAnsU7.js";
14
- import { c as ge } from "./index-D2ZczOXr.js";
14
+ import { c as he } from "./index-D2ZczOXr.js";
15
15
  import { C as eo } from "./chevron-down-DWE7GSq9.js";
16
16
  import { E as to } from "./error-boundary-tAn_GuCu.js";
17
17
  import { I as no } from "./icon-button-group-mXvYDaba.js";
@@ -321,11 +321,11 @@ const ro = [
321
321
  description: 'On every data cell: "<rowId>:<columnId>", built from the opaque ids, never from labels. A group header row and its cells carry data-heatmap-group-id, the group id as in groupIds.'
322
322
  }
323
323
  }
324
- }, Tt = $n(null);
325
- function Tn() {
326
- return Vn(Tt);
324
+ }, Ot = $n(null);
325
+ function Rn() {
326
+ return Vn(Ot);
327
327
  }
328
- function Rn(e, t) {
328
+ function Tn(e, t) {
329
329
  const n = new Intl.NumberFormat(
330
330
  e,
331
331
  t === "rate" ? { style: "percent", maximumFractionDigits: 0 } : { maximumFractionDigits: 2 }
@@ -342,11 +342,11 @@ function co({
342
342
  privacyMode: t,
343
343
  privacyScope: n = "rows",
344
344
  valueType: o,
345
- formatValue: s,
345
+ formatValue: r,
346
346
  formatCount: a,
347
- groups: i
347
+ groups: s
348
348
  }) {
349
- const u = new Map(i == null ? void 0 : i.map((p) => [p.id, p.label])), d = Xn(), l = t, v = t && n === "all", m = t && n === "all", w = (p) => p.status === "empty" ? e("heatmap.noData") : p.status === "low-sample" ? p.withheld ? e("heatmap.totalWithheld") : e("heatmap.lowSample") : p.label !== void 0 && !t ? p.label : p.value === null ? e("heatmap.noData") : s(p.value), b = (p) => p.count === void 0 ? null : o === "rate" && p.status === "value" && p.value !== null ? e("heatmap.countOf", {
349
+ const u = new Map(s == null ? void 0 : s.map((p) => [p.id, p.label])), d = Xn(), l = t, v = t && n === "all", m = t && n === "all", w = (p) => p.status === "empty" ? e("heatmap.noData") : p.status === "low-sample" ? p.withheld ? e("heatmap.totalWithheld") : e("heatmap.lowSample") : p.label !== void 0 && !t ? p.label : p.value === null ? e("heatmap.noData") : r(p.value), y = (p) => p.count === void 0 ? null : o === "rate" && p.status === "value" && p.value !== null ? e("heatmap.countOf", {
350
350
  part: a(Math.round(p.value * p.count)),
351
351
  total: a(p.count)
352
352
  }) : e("heatmap.records", {
@@ -362,35 +362,35 @@ function co({
362
362
  // A group missing from `groups` has only its id to show, which may be a
363
363
  // name, so privacy mode masks it whatever the scope.
364
364
  groupLabel: (p) => m ? d : u.get(p) ?? (t ? d : p),
365
- cellName: (p, N) => e("heatmap.cellName", { row: p, column: N }),
366
- groupRowText: (p, N) => e("heatmap.groupRow", {
365
+ cellName: (p, S) => e("heatmap.cellName", { row: p, column: S }),
366
+ groupRowText: (p, S) => e("heatmap.groupRow", {
367
367
  group: p,
368
- method: e(N === "sum" ? "heatmap.totals.sum" : "heatmap.totals.mean")
368
+ method: e(S === "sum" ? "heatmap.totals.sum" : "heatmap.totals.mean")
369
369
  }),
370
370
  tableText: (p) => {
371
- const N = p.status === "empty" ? null : b(p), O = w(p);
372
- return N === null ? O : e("heatmap.valueWithCount", { value: O, count: N });
371
+ const S = p.status === "empty" ? null : y(p), R = w(p);
372
+ return S === null ? R : e("heatmap.valueWithCount", { value: R, count: S });
373
373
  },
374
374
  methodLabel: (p) => e(p === "sum" ? "heatmap.totals.sum" : "heatmap.totals.mean"),
375
375
  valueText: w,
376
376
  visibleText: (p) => p.status === "empty" ? lo : p.status === "low-sample" ? "" : w(p),
377
- countText: b,
378
- sentence: (p, N, O) => {
379
- const D = b(O), y = w(O);
380
- return D === null || O.status === "empty" ? e("heatmap.cell", { row: p, column: N, value: y }) : e("heatmap.cellWithCount", {
377
+ countText: y,
378
+ sentence: (p, S, R) => {
379
+ const D = y(R), k = w(R);
380
+ return D === null || R.status === "empty" ? e("heatmap.cell", { row: p, column: S, value: k }) : e("heatmap.cellWithCount", {
381
381
  row: p,
382
- column: N,
383
- value: y,
382
+ column: S,
383
+ value: k,
384
384
  count: D
385
385
  });
386
386
  },
387
- formatValue: s
387
+ formatValue: r
388
388
  };
389
389
  }
390
- const Ee = 1e12, uo = 5e6, po = uo;
391
- let Lt = 0;
392
- const tn = new Error("heatmap audit: work limit"), mo = 32, Le = (e) => {
393
- if (Lt += e, Lt > po) throw tn;
390
+ const He = 1e12, uo = 5e6, po = uo;
391
+ let Dt = 0;
392
+ const tn = new Error("heatmap audit: work limit"), mo = 32, De = (e) => {
393
+ if (Dt += e, Dt > po) throw tn;
394
394
  };
395
395
  function Wt(e, t) {
396
396
  return {
@@ -405,65 +405,65 @@ function ht(e, t, n) {
405
405
  const o = e.edges;
406
406
  return e.to[o] = n, e.next[o] = e.head[t], e.head[t] = o, e.to[o + 1] = t, e.next[o + 1] = e.head[n], e.head[n] = o + 1, e.edges += 2, o;
407
407
  }
408
- function nn(e, t, n, o, s, a, i, u, d) {
409
- if (n === o) return s;
408
+ function nn(e, t, n, o, r, a, s, u, d) {
409
+ if (n === o) return r;
410
410
  const l = a >= 0 ? a >> 1 : -1;
411
411
  let v = 0, m = 0;
412
- for (; v < s - i; ) {
412
+ for (; v < r - s; ) {
413
413
  u.fill(-2), u[n] = -1;
414
- let w = 0, b = 0;
415
- d[b++] = n;
414
+ let w = 0, y = 0;
415
+ d[y++] = n;
416
416
  let p = !1;
417
- for (; w < b && !p; ) {
418
- const O = d[w++];
419
- for (let D = e.head[O]; D !== -1; D = e.next[D]) {
420
- if (m += 1, t[D] <= i || D >> 1 === l) continue;
421
- const y = e.to[D];
422
- if (u[y] === -2) {
423
- if (u[y] = D, y === o) {
417
+ for (; w < y && !p; ) {
418
+ const R = d[w++];
419
+ for (let D = e.head[R]; D !== -1; D = e.next[D]) {
420
+ if (m += 1, t[D] <= s || D >> 1 === l) continue;
421
+ const k = e.to[D];
422
+ if (u[k] === -2) {
423
+ if (u[k] = D, k === o) {
424
424
  p = !0;
425
425
  break;
426
426
  }
427
- d[b++] = y;
427
+ d[y++] = k;
428
428
  }
429
429
  }
430
430
  }
431
- if (Le(m), m = 0, !p) break;
432
- let N = s - v;
433
- for (let O = o; O !== n; O = e.to[u[O] ^ 1])
434
- N = Math.min(N, t[u[O]]);
435
- for (let O = o; O !== n; O = e.to[u[O] ^ 1])
436
- t[u[O]] -= N, t[u[O] ^ 1] += N;
437
- v += N;
431
+ if (De(m), m = 0, !p) break;
432
+ let S = r - v;
433
+ for (let R = o; R !== n; R = e.to[u[R] ^ 1])
434
+ S = Math.min(S, t[u[R]]);
435
+ for (let R = o; R !== n; R = e.to[u[R] ^ 1])
436
+ t[u[R]] -= S, t[u[R] ^ 1] += S;
437
+ v += S;
438
438
  }
439
439
  return v;
440
440
  }
441
- function fo(e, t, n, o, s, a) {
442
- const i = new Uint8Array(e.n), u = -1;
443
- i[n] = 1;
441
+ function fo(e, t, n, o, r, a) {
442
+ const s = new Uint8Array(e.n), u = -1;
443
+ s[n] = 1;
444
444
  let d = 0, l = 0;
445
445
  a[l++] = n;
446
446
  let v = 0;
447
447
  for (; d < l; ) {
448
448
  const m = a[d++];
449
449
  for (let w = e.head[m]; w !== -1; w = e.next[w]) {
450
- if (v += 1, t[w] <= s || w >> 1 === u) continue;
451
- const b = e.to[w];
452
- i[b] || (i[b] = 1, a[l++] = b);
450
+ if (v += 1, t[w] <= r || w >> 1 === u) continue;
451
+ const y = e.to[w];
452
+ s[y] || (s[y] = 1, a[l++] = y);
453
453
  }
454
454
  }
455
- return Le(v), i;
455
+ return De(v), s;
456
456
  }
457
457
  const ho = (e, t) => e.integral ? Math.max(1, Math.ceil(t / 2 - 1e-9)) : Math.max(t / 2, 1e-6);
458
458
  function go(e, t) {
459
- const n = e.totals.length + e.cells.length + 1, o = new Float64Array(n), s = new Float64Array(n), a = e.mode === "free";
459
+ const n = e.totals.length + e.cells.length + 1, o = new Float64Array(n), r = new Float64Array(n), a = e.mode === "free";
460
460
  e.totals.forEach((u, d) => {
461
- t[d] ? (o[d] = u.value, s[d] = u.value) : (o[d] = a ? -Ee : 0, s[d] = Ee);
461
+ t[d] ? (o[d] = u.value, r[d] = u.value) : (o[d] = a ? -He : 0, r[d] = He);
462
462
  });
463
- const i = e.totals.length;
463
+ const s = e.totals.length;
464
464
  return e.cells.forEach((u, d) => {
465
- o[i + d] = a ? -Ee : Math.max(u.lo, -Ee), s[i + d] = a ? Ee : Math.min(u.hi, Ee);
466
- }), o[n - 1] = a ? -Ee : 0, s[n - 1] = Ee, { lo: o, hi: s };
465
+ o[s + d] = a ? -He : Math.max(u.lo, -He), r[s + d] = a ? He : Math.min(u.hi, He);
466
+ }), o[n - 1] = a ? -He : 0, r[n - 1] = He, { lo: o, hi: r };
467
467
  }
468
468
  function vt(e, t) {
469
469
  const n = e.totals.length;
@@ -475,18 +475,18 @@ function vt(e, t) {
475
475
  return [e.sink, e.source];
476
476
  }
477
477
  function vo(e, t, n) {
478
- const { lo: o, hi: s } = go(e, t), a = o.length, i = e.nodeCount;
479
- Le(a * 4);
480
- const u = Wt(i + 2, a + i), d = new Float64Array((a + i) * 2), l = new Float64Array(i);
481
- for (let g = 0; g < a; g += 1) {
482
- const [T, L] = vt(e, g), G = ht(u, T, L);
483
- d[G] = s[g] - o[g], l[L] += o[g], l[T] -= o[g];
478
+ const { lo: o, hi: r } = go(e, t), a = o.length, s = e.nodeCount;
479
+ De(a * 4);
480
+ const u = Wt(s + 2, a + s), d = new Float64Array((a + s) * 2), l = new Float64Array(s);
481
+ for (let h = 0; h < a; h += 1) {
482
+ const [O, N] = vt(e, h), V = ht(u, O, N);
483
+ d[V] = r[h] - o[h], l[N] += o[h], l[O] -= o[h];
484
484
  }
485
- const v = i, m = i + 1;
485
+ const v = s, m = s + 1;
486
486
  let w = 0;
487
- for (let g = 0; g < i; g += 1)
488
- l[g] > 0 ? (d[ht(u, v, g)] = l[g], w += l[g]) : l[g] < 0 && (d[ht(u, g, m)] = -l[g]);
489
- const b = new Int32Array(i + 2), p = new Int32Array(i + 2);
487
+ for (let h = 0; h < s; h += 1)
488
+ l[h] > 0 ? (d[ht(u, v, h)] = l[h], w += l[h]) : l[h] < 0 && (d[ht(u, h, m)] = -l[h]);
489
+ const y = new Int32Array(s + 2), p = new Int32Array(s + 2);
490
490
  if (nn(
491
491
  u,
492
492
  d,
@@ -495,325 +495,325 @@ function vo(e, t, n) {
495
495
  1 / 0,
496
496
  -1,
497
497
  n,
498
- b,
498
+ y,
499
499
  p
500
500
  ) < w - n * Math.max(1, a)) return null;
501
- const O = new Float64Array(a);
502
- for (let g = 0; g < a; g += 1)
503
- O[g] = o[g] + (s[g] - o[g] - d[2 * g]);
504
- const D = Wt(i, a), y = new Float64Array(a * 2);
505
- for (let g = 0; g < a; g += 1) {
506
- const [T, L] = vt(e, g), G = ht(D, T, L), J = g < e.totals.length && t[g];
507
- y[G] = J ? 0 : Math.max(0, s[g] - O[g]), y[G + 1] = J ? 0 : Math.max(0, O[g] - o[g]);
501
+ const R = new Float64Array(a);
502
+ for (let h = 0; h < a; h += 1)
503
+ R[h] = o[h] + (r[h] - o[h] - d[2 * h]);
504
+ const D = Wt(s, a), k = new Float64Array(a * 2);
505
+ for (let h = 0; h < a; h += 1) {
506
+ const [O, N] = vt(e, h), V = ht(D, O, N), Z = h < e.totals.length && t[h];
507
+ k[V] = Z ? 0 : Math.max(0, r[h] - R[h]), k[V + 1] = Z ? 0 : Math.max(0, R[h] - o[h]);
508
508
  }
509
- const R = e.totals.length;
509
+ const E = e.totals.length;
510
510
  return {
511
511
  graph: D,
512
- cap: y,
513
- flow: O,
512
+ cap: k,
513
+ flow: R,
514
514
  closing: a - 1,
515
- cellArc: (g) => R + g
515
+ cellArc: (h) => E + h
516
516
  };
517
517
  }
518
- function Ut(e, t, n, o, s, a, i, u) {
518
+ function Ut(e, t, n, o, r, a, s, u) {
519
519
  if (n === o) return !0;
520
520
  u.fill(0);
521
- const d = s >> 1;
521
+ const d = r >> 1;
522
522
  u[n] = 1;
523
523
  let l = 0, v = 0, m = 0;
524
- for (i[v++] = n; l < v; ) {
525
- const w = i[l++];
526
- for (let b = e.head[w]; b !== -1; b = e.next[b]) {
527
- if (m += 1, t[b] <= a || b >> 1 === d) continue;
528
- const p = e.to[b];
524
+ for (s[v++] = n; l < v; ) {
525
+ const w = s[l++];
526
+ for (let y = e.head[w]; y !== -1; y = e.next[y]) {
527
+ if (m += 1, t[y] <= a || y >> 1 === d) continue;
528
+ const p = e.to[y];
529
529
  if (!u[p]) {
530
530
  if (p === o)
531
- return Le(m), !0;
532
- u[p] = 1, i[v++] = p;
531
+ return De(m), !0;
532
+ u[p] = 1, s[v++] = p;
533
533
  }
534
534
  }
535
535
  }
536
- return Le(m), !1;
536
+ return De(m), !1;
537
537
  }
538
538
  function wo(e, t, n, o) {
539
- const s = Array.from(
539
+ const r = Array.from(
540
540
  { length: n },
541
541
  () => []
542
542
  );
543
- return e.totals.forEach((a, i) => {
544
- t[i] && (s[a.from].push([a.to, a.records, i]), a.value > o && s[a.to].push([a.from, a.records, i]));
545
- }), Le(e.totals.length), s;
543
+ return e.totals.forEach((a, s) => {
544
+ t[s] && (r[a.from].push([a.to, a.records, s]), a.value > o && r[a.to].push([a.from, a.records, s]));
545
+ }), De(e.totals.length), r;
546
546
  }
547
- function sn(e, t, n, o, s, a) {
548
- const { graph: i, cap: u } = e, d = i.n, l = s >> 1, v = new Float64Array(d).fill(1 / 0), m = new Int32Array(d).fill(-1), w = new Int32Array(d).fill(-1), b = new Uint8Array(d);
547
+ function sn(e, t, n, o, r, a) {
548
+ const { graph: s, cap: u } = e, d = s.n, l = r >> 1, v = new Float64Array(d).fill(1 / 0), m = new Int32Array(d).fill(-1), w = new Int32Array(d).fill(-1), y = new Uint8Array(d);
549
549
  v[n] = 0;
550
- const p = [[0, n]], N = (y) => {
551
- p.push(y);
552
- let R = p.length - 1;
553
- for (; R > 0; ) {
554
- const g = R - 1 >> 1;
555
- if (p[g][0] < y[0] || p[g][0] === y[0] && p[g][1] <= y[1])
550
+ const p = [[0, n]], S = (k) => {
551
+ p.push(k);
552
+ let E = p.length - 1;
553
+ for (; E > 0; ) {
554
+ const h = E - 1 >> 1;
555
+ if (p[h][0] < k[0] || p[h][0] === k[0] && p[h][1] <= k[1])
556
556
  break;
557
- p[R] = p[g], R = g;
557
+ p[E] = p[h], E = h;
558
558
  }
559
- p[R] = y;
560
- }, O = () => {
561
- const y = p[0], R = p.pop();
559
+ p[E] = k;
560
+ }, R = () => {
561
+ const k = p[0], E = p.pop();
562
562
  if (p.length) {
563
- let g = 0;
563
+ let h = 0;
564
564
  for (; ; ) {
565
- const T = 2 * g + 1, L = T + 1;
566
- let G = g;
567
- const J = (Y, E) => p[Y][0] < E[0] || p[Y][0] === E[0] && p[Y][1] < E[1];
568
- let z = R;
569
- if (T < p.length && J(T, z) && (G = T, z = p[T]), L < p.length && J(L, z) && (G = L, z = p[L]), G === g) break;
570
- p[g] = p[G], g = G;
565
+ const O = 2 * h + 1, N = O + 1;
566
+ let V = h;
567
+ const Z = (W, _) => p[W][0] < _[0] || p[W][0] === _[0] && p[W][1] < _[1];
568
+ let $ = E;
569
+ if (O < p.length && Z(O, $) && (V = O, $ = p[O]), N < p.length && Z(N, $) && (V = N, $ = p[N]), V === h) break;
570
+ p[h] = p[V], h = V;
571
571
  }
572
- p[g] = R;
572
+ p[h] = E;
573
573
  }
574
- return y;
574
+ return k;
575
575
  };
576
576
  for (; p.length; ) {
577
- const [y, R] = O();
578
- if (b[R]) continue;
579
- b[R] = 1;
580
- let g = 2 + t[R].length;
581
- for (let T = i.head[R]; T !== -1; T = i.next[T]) g += 1;
582
- if (Le(g), R === o) break;
583
- for (let T = i.head[R]; T !== -1; T = i.next[T]) {
584
- if (u[T] <= a || T >> 1 === l) continue;
585
- const L = i.to[T];
586
- y < v[L] && (v[L] = y, m[L] = -1, w[L] = R, N([y, L]));
577
+ const [k, E] = R();
578
+ if (y[E]) continue;
579
+ y[E] = 1;
580
+ let h = 2 + t[E].length;
581
+ for (let O = s.head[E]; O !== -1; O = s.next[O]) h += 1;
582
+ if (De(h), E === o) break;
583
+ for (let O = s.head[E]; O !== -1; O = s.next[O]) {
584
+ if (u[O] <= a || O >> 1 === l) continue;
585
+ const N = s.to[O];
586
+ k < v[N] && (v[N] = k, m[N] = -1, w[N] = E, S([k, N]));
587
587
  }
588
- for (const [T, L, G] of t[R])
589
- y + L < v[T] && (v[T] = y + L, m[T] = G, w[T] = R, N([y + L, T]));
588
+ for (const [O, N, V] of t[E])
589
+ k + N < v[O] && (v[O] = k + N, m[O] = V, w[O] = E, S([k + N, O]));
590
590
  }
591
591
  if (!Number.isFinite(v[o])) return [];
592
592
  const D = [];
593
- for (let y = o; y !== n; y = w[y])
594
- m[y] >= 0 && D.push(m[y]);
595
- return D.sort((y, R) => y - R);
593
+ for (let k = o; k !== n; k = w[k])
594
+ m[k] >= 0 && D.push(m[k]);
595
+ return D.sort((k, E) => k - E);
596
596
  }
597
- function bo(e, t, n, o, s, a) {
598
- const i = [], { graph: u, cap: d } = n, l = new Int32Array(u.n), v = new Int32Array(u.n), m = new Uint8Array(u.n), w = [], b = n.flow.length, p = new Uint8Array(b), N = e.mode === "rate" && e.integral, O = (g, T, L, G) => L <= o ? 0 : N && L <= 1 + o ? Ut(u, d, g, T, G, o, v, m) ? L : 0 : (Le(d.length >> 2), nn(u, d.slice(), g, T, L, G, o, l, v));
597
+ function bo(e, t, n, o, r, a) {
598
+ const s = [], { graph: u, cap: d } = n, l = new Int32Array(u.n), v = new Int32Array(u.n), m = new Uint8Array(u.n), w = [], y = n.flow.length, p = new Uint8Array(y), S = e.mode === "rate" && e.integral, R = (h, O, N, V) => N <= o ? 0 : S && N <= 1 + o ? Ut(u, d, h, O, V, o, v, m) ? N : 0 : (De(d.length >> 2), nn(u, d.slice(), h, O, N, V, o, l, v));
599
599
  let D = null;
600
- const y = () => (D = D ?? wo(e, t, u.n, o), D);
601
- let R = 0;
602
- for (const g of s) {
603
- const T = e.cells[g], L = n.cellArc(g), [G, J] = vt(e, L), z = 2 * L;
604
- let Y, E, A, K, F;
600
+ const k = () => (D = D ?? wo(e, t, u.n, o), D);
601
+ let E = 0;
602
+ for (const h of r) {
603
+ const O = e.cells[h], N = n.cellArc(h), [V, Z] = vt(e, N), $ = 2 * N;
604
+ let W, _, A, z, q;
605
605
  if (e.mode === "rate") {
606
- const c = ho(e, T.records);
607
- E = Math.min(d[z], c), K = O(J, G, E, z), A = Math.min(d[z + 1], c - K), F = O(G, J, A, z), Y = K + F >= c - o;
606
+ const c = ho(e, O.records);
607
+ _ = Math.min(d[$], c), z = R(Z, V, _, $), A = Math.min(d[$ + 1], c - z), q = R(V, Z, A, $), W = z + q >= c - o;
608
608
  } else {
609
- const c = n.flow[L];
610
- A = d[z + 1], F = O(G, J, A, z);
611
- const I = Math.max(c - 2 * F, F > o ? 0 : o * 4);
612
- E = Math.min(d[z], I), K = I > 0 ? O(J, G, E, z) : 0, Y = I <= 0 || K >= I - o;
609
+ const c = n.flow[N];
610
+ A = d[$ + 1], q = R(V, Z, A, $);
611
+ const x = Math.max(c - 2 * q, q > o ? 0 : o * 4);
612
+ _ = Math.min(d[$], x), z = x > 0 ? R(Z, V, _, $) : 0, W = x <= 0 || z >= x - o;
613
613
  }
614
- if (K + F <= o && (p[L] = 1), Y) continue;
615
- if (i.push(g), a) {
614
+ if (z + q <= o && (p[N] = 1), W) continue;
615
+ if (s.push(h), a) {
616
616
  w.push({ allOf: [] });
617
617
  break;
618
618
  }
619
- if (R >= mo) continue;
620
- R += 1;
621
- const $ = /* @__PURE__ */ new Set();
622
- if (K < E - o)
623
- for (const c of sn(n, y(), J, G, z, o))
624
- $.add(c);
625
- if (F < A - o)
626
- for (const c of sn(n, y(), G, J, z, o))
627
- $.add(c);
628
- if ($.size === 0)
629
- for (const c of e.cellTotals[g]) t[c] && $.add(c);
630
- w.push({ allOf: [...$].sort((c, I) => c - I) });
619
+ if (E >= mo) continue;
620
+ E += 1;
621
+ const B = /* @__PURE__ */ new Set();
622
+ if (z < _ - o)
623
+ for (const c of sn(n, k(), Z, V, $, o))
624
+ B.add(c);
625
+ if (q < A - o)
626
+ for (const c of sn(n, k(), V, Z, $, o))
627
+ B.add(c);
628
+ if (B.size === 0)
629
+ for (const c of e.cellTotals[h]) t[c] && B.add(c);
630
+ w.push({ allOf: [...B].sort((c, x) => c - x) });
631
631
  }
632
- return { disclosures: w, failed: i, pinned: p };
632
+ return { disclosures: w, failed: s, pinned: p };
633
633
  }
634
- function yo(e, t, n, o, s) {
635
- const { graph: a, cap: i } = n, u = new Int32Array(a.n), d = new Uint8Array(a.n), l = (v) => {
636
- const [m, w] = vt(e, v), b = 2 * v;
637
- i[b] > s && Ut(a, i, w, m, b, s, u, d) || i[b + 1] > s && Ut(a, i, m, w, b, s, u, d) || (o[v] = 1);
634
+ function yo(e, t, n, o, r) {
635
+ const { graph: a, cap: s } = n, u = new Int32Array(a.n), d = new Uint8Array(a.n), l = (v) => {
636
+ const [m, w] = vt(e, v), y = 2 * v;
637
+ s[y] > r && Ut(a, s, w, m, y, r, u, d) || s[y + 1] > r && Ut(a, s, m, w, y, r, u, d) || (o[v] = 1);
638
638
  };
639
639
  e.totals.forEach((v, m) => {
640
640
  t[m] || l(m);
641
641
  }), l(n.closing);
642
642
  }
643
643
  function ln(e, t, n, o) {
644
- const s = e.nodeCount, a = new Int32Array(s);
645
- for (let c = 0; c < s; c += 1) a[c] = c;
646
- const i = (c) => {
647
- let I = c;
648
- for (; a[I] !== I; ) I = a[I];
649
- for (; a[c] !== I; ) {
644
+ const r = e.nodeCount, a = new Int32Array(r);
645
+ for (let c = 0; c < r; c += 1) a[c] = c;
646
+ const s = (c) => {
647
+ let x = c;
648
+ for (; a[x] !== x; ) x = a[x];
649
+ for (; a[c] !== x; ) {
650
650
  const P = a[c];
651
- a[c] = I, c = P;
651
+ a[c] = x, c = P;
652
652
  }
653
- return I;
654
- }, u = (c, I) => {
655
- const P = i(c), H = i(I);
656
- P !== H && (a[Math.max(P, H)] = Math.min(P, H));
653
+ return x;
654
+ }, u = (c, x) => {
655
+ const P = s(c), K = s(x);
656
+ P !== K && (a[Math.max(P, K)] = Math.min(P, K));
657
657
  };
658
- e.totals.forEach((c, I) => {
659
- !t[I] && !o[I] && u(c.from, c.to);
658
+ e.totals.forEach((c, x) => {
659
+ !t[x] && !o[x] && u(c.from, c.to);
660
660
  }), o[n.closing] || u(e.sink, e.source);
661
661
  const d = /* @__PURE__ */ new Map();
662
- e.cells.forEach((c, I) => {
663
- if (o[n.cellArc(I)]) return;
664
- const P = i(c.from), H = i(c.to);
665
- if (P === H) return;
666
- const Q = P * s + H, te = d.get(Q) ?? { from: P, to: H, weight: 0, cells: [] };
667
- te.weight += c.records > 0 ? c.records : e.minCount, te.cells.push(I), d.set(Q, te);
662
+ e.cells.forEach((c, x) => {
663
+ if (o[n.cellArc(x)]) return;
664
+ const P = s(c.from), K = s(c.to);
665
+ if (P === K) return;
666
+ const J = P * r + K, ne = d.get(J) ?? { from: P, to: K, weight: 0, cells: [] };
667
+ ne.weight += c.records > 0 ? c.records : e.minCount, ne.cells.push(x), d.set(J, ne);
668
668
  });
669
669
  const l = [...d.values()].sort(
670
- (c, I) => c.from - I.from || c.to - I.to
670
+ (c, x) => c.from - x.from || c.to - x.to
671
671
  );
672
672
  if (l.length === 0) return [];
673
673
  const v = [...new Set(l.flatMap((c) => [c.from, c.to]))].sort(
674
- (c, I) => c - I
675
- ), m = new Map(v.map((c, I) => [c, I])), w = v.length, b = Array.from({ length: w }, () => []);
676
- l.forEach((c, I) => b[m.get(c.from)].push(I));
674
+ (c, x) => c - x
675
+ ), m = new Map(v.map((c, x) => [c, x])), w = v.length, y = Array.from({ length: w }, () => []);
676
+ l.forEach((c, x) => y[m.get(c.from)].push(x));
677
677
  const p = new Int32Array(w).fill(-1);
678
678
  {
679
- const c = new Int32Array(w).fill(-1), I = new Int32Array(w), P = new Uint8Array(w), H = [];
680
- let Q = 0, te = 0;
681
- for (let x = 0; x < w; x += 1) {
682
- if (c[x] !== -1) continue;
683
- const _ = [[x, 0]];
684
- for (c[x] = I[x] = Q++, H.push(x), P[x] = 1; _.length; ) {
685
- const W = _[_.length - 1], [V, q] = W;
686
- if (q < b[V].length) {
687
- W[1] += 1;
688
- const B = m.get(l[b[V][q]].to);
689
- c[B] === -1 ? (c[B] = I[B] = Q++, H.push(B), P[B] = 1, _.push([B, 0])) : P[B] && (I[V] = Math.min(I[V], c[B]));
679
+ const c = new Int32Array(w).fill(-1), x = new Int32Array(w), P = new Uint8Array(w), K = [];
680
+ let J = 0, ne = 0;
681
+ for (let I = 0; I < w; I += 1) {
682
+ if (c[I] !== -1) continue;
683
+ const G = [[I, 0]];
684
+ for (c[I] = x[I] = J++, K.push(I), P[I] = 1; G.length; ) {
685
+ const C = G[G.length - 1], [j, ee] = C;
686
+ if (ee < y[j].length) {
687
+ C[1] += 1;
688
+ const L = m.get(l[y[j][ee]].to);
689
+ c[L] === -1 ? (c[L] = x[L] = J++, K.push(L), P[L] = 1, G.push([L, 0])) : P[L] && (x[j] = Math.min(x[j], c[L]));
690
690
  } else {
691
- if (_.pop(), _.length) {
692
- const B = _[_.length - 1][0];
693
- I[B] = Math.min(I[B], I[V]);
691
+ if (G.pop(), G.length) {
692
+ const L = G[G.length - 1][0];
693
+ x[L] = Math.min(x[L], x[j]);
694
694
  }
695
- if (I[V] === c[V]) {
696
- let B;
695
+ if (x[j] === c[j]) {
696
+ let L;
697
697
  do
698
- B = H.pop(), P[B] = 0, p[B] = te;
699
- while (B !== V);
700
- te += 1;
698
+ L = K.pop(), P[L] = 0, p[L] = ne;
699
+ while (L !== j);
700
+ ne += 1;
701
701
  }
702
702
  }
703
703
  }
704
704
  }
705
705
  }
706
- const N = /* @__PURE__ */ new Map(), O = /* @__PURE__ */ new Map();
706
+ const S = /* @__PURE__ */ new Map(), R = /* @__PURE__ */ new Map();
707
707
  for (const c of l) {
708
- const I = p[m.get(c.from)], P = p[m.get(c.to)];
709
- if (I === P) continue;
710
- const H = `${I}>${P}`, Q = N.get(H) ?? { a: I, b: P, weight: 0 };
711
- Q.weight += c.weight, N.set(H, Q), O.set(H, [...O.get(H) ?? [], ...c.cells]);
708
+ const x = p[m.get(c.from)], P = p[m.get(c.to)];
709
+ if (x === P) continue;
710
+ const K = `${x}>${P}`, J = S.get(K) ?? { a: x, b: P, weight: 0 };
711
+ J.weight += c.weight, S.set(K, J), R.set(K, [...R.get(K) ?? [], ...c.cells]);
712
712
  }
713
- if (N.size === 0) return [];
714
- const D = [...N.entries()].sort(([c], [I]) => c < I ? -1 : 1), y = [...new Set(D.flatMap(([, c]) => [c.a, c.b]))].sort(
715
- (c, I) => c - I
716
- ), R = new Map(y.map((c, I) => [c, I])), g = y.length, T = new Int32Array(g);
717
- for (let c = 0; c < g; c += 1) T[c] = c;
718
- const L = (c) => {
719
- for (; T[c] !== c; )
720
- T[c] = T[T[c]], c = T[c];
713
+ if (S.size === 0) return [];
714
+ const D = [...S.entries()].sort(([c], [x]) => c < x ? -1 : 1), k = [...new Set(D.flatMap(([, c]) => [c.a, c.b]))].sort(
715
+ (c, x) => c - x
716
+ ), E = new Map(k.map((c, x) => [c, x])), h = k.length, O = new Int32Array(h);
717
+ for (let c = 0; c < h; c += 1) O[c] = c;
718
+ const N = (c) => {
719
+ for (; O[c] !== c; )
720
+ O[c] = O[O[c]], c = O[c];
721
721
  return c;
722
722
  };
723
723
  for (const [, c] of D) {
724
- const I = L(R.get(c.a)), P = L(R.get(c.b));
725
- I !== P && (T[Math.max(I, P)] = Math.min(I, P));
724
+ const x = N(E.get(c.a)), P = N(E.get(c.b));
725
+ x !== P && (O[Math.max(x, P)] = Math.min(x, P));
726
726
  }
727
- const G = Wt(g, D.length), J = new Float64Array(D.length * 2);
727
+ const V = Wt(h, D.length), Z = new Float64Array(D.length * 2);
728
728
  for (const [, c] of D) {
729
- const I = ht(
730
- G,
731
- R.get(c.a),
732
- R.get(c.b)
729
+ const x = ht(
730
+ V,
731
+ E.get(c.a),
732
+ E.get(c.b)
733
733
  );
734
- J[I] = c.weight, J[I + 1] = Ee;
734
+ Z[x] = c.weight, Z[x + 1] = He;
735
735
  }
736
- const z = new Int32Array(g), Y = new Int32Array(g), E = /* @__PURE__ */ new Map(), A = (c) => {
737
- const I = new Uint8Array(s), P = new Uint8Array(s), H = /* @__PURE__ */ new Map();
738
- y.forEach((Q, te) => H.set(Q, c[te]));
739
- for (let Q = 0; Q < s; Q += 1) {
740
- const te = m.get(i(Q));
741
- te !== void 0 && (P[Q] = 1, I[Q] = H.get(p[te]) ?? 0);
736
+ const $ = new Int32Array(h), W = new Int32Array(h), _ = /* @__PURE__ */ new Map(), A = (c) => {
737
+ const x = new Uint8Array(r), P = new Uint8Array(r), K = /* @__PURE__ */ new Map();
738
+ k.forEach((J, ne) => K.set(J, c[ne]));
739
+ for (let J = 0; J < r; J += 1) {
740
+ const ne = m.get(s(J));
741
+ ne !== void 0 && (P[J] = 1, x[J] = K.get(p[ne]) ?? 0);
742
742
  }
743
- return { nodeSide: I, inGraph: P };
744
- }, K = (c) => {
745
- const I = [];
746
- for (const [W, V] of D) {
747
- const q = R.get(V.a), B = R.get(V.b);
748
- c[q] === 1 && c[B] === 0 && I.push(...O.get(W) ?? []);
743
+ return { nodeSide: x, inGraph: P };
744
+ }, z = (c) => {
745
+ const x = [];
746
+ for (const [C, j] of D) {
747
+ const ee = E.get(j.a), L = E.get(j.b);
748
+ c[ee] === 1 && c[L] === 0 && x.push(...R.get(C) ?? []);
749
749
  }
750
- I.sort((W, V) => W - V);
751
- const P = I.join(",");
752
- if (E.has(P)) return;
753
- const { nodeSide: H, inGraph: Q } = A(c), te = /* @__PURE__ */ new Set(), x = /* @__PURE__ */ new Set();
754
- e.totals.forEach((W, V) => {
755
- !t[V] || H[W.from] === H[W.to] || (Q[W.from] && Q[W.to] ? te.add(V) : x.add(V));
750
+ x.sort((C, j) => C - j);
751
+ const P = x.join(",");
752
+ if (_.has(P)) return;
753
+ const { nodeSide: K, inGraph: J } = A(c), ne = /* @__PURE__ */ new Set(), I = /* @__PURE__ */ new Set();
754
+ e.totals.forEach((C, j) => {
755
+ !t[j] || K[C.from] === K[C.to] || (J[C.from] && J[C.to] ? ne.add(j) : I.add(j));
756
756
  });
757
- const _ = te.size > 0 ? te : x;
758
- if (_.size === 0)
759
- for (const W of I)
760
- for (const V of e.cellTotals[W]) t[V] && _.add(V);
761
- E.set(P, { anyOf: [..._].sort((W, V) => W - V) });
762
- }, F = e.minCount, $ = /* @__PURE__ */ new Map();
763
- for (let c = 0; c < g; c += 1) {
764
- const I = L(c);
765
- $.has(I) || $.set(I, c);
757
+ const G = ne.size > 0 ? ne : I;
758
+ if (G.size === 0)
759
+ for (const C of x)
760
+ for (const j of e.cellTotals[C]) t[j] && G.add(j);
761
+ _.set(P, { anyOf: [...G].sort((C, j) => C - j) });
762
+ }, q = e.minCount, B = /* @__PURE__ */ new Map();
763
+ for (let c = 0; c < h; c += 1) {
764
+ const x = N(c);
765
+ B.has(x) || B.set(x, c);
766
766
  }
767
- for (let c = 0; c < g; c += 1) {
768
- const I = $.get(L(c));
769
- if (I !== c)
770
- for (const [P, H] of [
771
- [I, c],
772
- [c, I]
767
+ for (let c = 0; c < h; c += 1) {
768
+ const x = B.get(N(c));
769
+ if (x !== c)
770
+ for (const [P, K] of [
771
+ [x, c],
772
+ [c, x]
773
773
  ]) {
774
- Le(J.length >> 2);
775
- const Q = J.slice();
776
- if (nn(G, Q, P, H, F, -1, 1e-9, z, Y) < F - 1e-9) {
777
- const x = fo(G, Q, P, -1, 1e-9, Y);
778
- K(x);
774
+ De(Z.length >> 2);
775
+ const J = Z.slice();
776
+ if (nn(V, J, P, K, q, -1, 1e-9, $, W) < q - 1e-9) {
777
+ const I = fo(V, J, P, -1, 1e-9, W);
778
+ z(I);
779
779
  }
780
780
  }
781
781
  }
782
- return [...E.values()];
782
+ return [..._.values()];
783
783
  }
784
784
  function xo(e, t) {
785
- const n = e.nodeCount, o = e.totals.length + e.cells.length + 1, s = Array.from({ length: n }, () => []);
785
+ const n = e.nodeCount, o = e.totals.length + e.cells.length + 1, r = Array.from({ length: n }, () => []);
786
786
  for (let l = 0; l < o; l += 1) {
787
787
  if (l < e.totals.length && t[l]) continue;
788
788
  const [v, m] = vt(e, l);
789
- s[v].push([m, l]), s[m].push([v, l]);
789
+ r[v].push([m, l]), r[m].push([v, l]);
790
790
  }
791
- const a = new Uint8Array(o), i = new Int32Array(n).fill(-1), u = new Int32Array(n);
791
+ const a = new Uint8Array(o), s = new Int32Array(n).fill(-1), u = new Int32Array(n);
792
792
  let d = 0;
793
793
  for (let l = 0; l < n; l += 1) {
794
- if (i[l] !== -1) continue;
794
+ if (s[l] !== -1) continue;
795
795
  const v = [[l, -1, 0]];
796
- for (i[l] = u[l] = d++; v.length; ) {
797
- const m = v[v.length - 1], [w, b, p] = m;
798
- if (p < s[w].length) {
796
+ for (s[l] = u[l] = d++; v.length; ) {
797
+ const m = v[v.length - 1], [w, y, p] = m;
798
+ if (p < r[w].length) {
799
799
  m[2] += 1;
800
- const [N, O] = s[w][p];
801
- if (O === b) continue;
802
- i[N] === -1 ? (i[N] = u[N] = d++, v.push([N, O, 0])) : u[w] = Math.min(u[w], i[N]);
800
+ const [S, R] = r[w][p];
801
+ if (R === y) continue;
802
+ s[S] === -1 ? (s[S] = u[S] = d++, v.push([S, R, 0])) : u[w] = Math.min(u[w], s[S]);
803
803
  } else if (v.pop(), v.length) {
804
- const N = v[v.length - 1][0];
805
- u[N] = Math.min(u[N], u[w]), u[w] > i[N] && (a[b] = 1);
804
+ const S = v[v.length - 1][0];
805
+ u[S] = Math.min(u[S], u[w]), u[w] > s[S] && (a[y] = 1);
806
806
  }
807
807
  }
808
808
  }
809
809
  return a;
810
810
  }
811
- function Ln(e, t, n, o, s = !1) {
811
+ function Ln(e, t, n, o, r = !1) {
812
812
  if (e.mode === "free") {
813
813
  const u = xo(e, t), d = [], l = [];
814
814
  for (const m of o)
815
815
  if (u[e.totals.length + m]) {
816
- if (s) return { disclosures: [{ allOf: [] }], cells: [m] };
816
+ if (r) return { disclosures: [{ allOf: [] }], cells: [m] };
817
817
  l.push(m), d.push({
818
818
  anyOf: e.cellTotals[m].filter((w) => t[w])
819
819
  });
@@ -830,45 +830,45 @@ function Ln(e, t, n, o, s = !1) {
830
830
  }
831
831
  const a = vo(e, t, n);
832
832
  if (!a) return null;
833
- const i = bo(e, t, a, n, o, s);
834
- return i.disclosures.length ? { disclosures: i.disclosures, cells: i.failed } : (yo(e, t, a, i.pinned, n), {
835
- disclosures: ln(e, t, a, i.pinned),
833
+ const s = bo(e, t, a, n, o, r);
834
+ return s.disclosures.length ? { disclosures: s.disclosures, cells: s.failed } : (yo(e, t, a, s.pinned, n), {
835
+ disclosures: ln(e, t, a, s.pinned),
836
836
  cells: []
837
837
  });
838
838
  }
839
839
  function Io(e, t) {
840
840
  const n = /* @__PURE__ */ new Set();
841
- for (const s of t) for (const a of s.allOf ?? []) n.add(a);
841
+ for (const r of t) for (const a of r.allOf ?? []) n.add(a);
842
842
  let o = t.filter(
843
- (s) => s.anyOf && s.anyOf.length > 0 && !s.anyOf.some((a) => n.has(a))
843
+ (r) => r.anyOf && r.anyOf.length > 0 && !r.anyOf.some((a) => n.has(a))
844
844
  );
845
845
  for (; o.length; ) {
846
- const s = /* @__PURE__ */ new Map();
847
- for (const i of o)
848
- for (const u of i.anyOf ?? []) s.set(u, (s.get(u) ?? 0) + 1);
846
+ const r = /* @__PURE__ */ new Map();
847
+ for (const s of o)
848
+ for (const u of s.anyOf ?? []) r.set(u, (r.get(u) ?? 0) + 1);
849
849
  let a = -1;
850
- for (const [i, u] of s) {
851
- const d = s.get(a) ?? -1;
852
- (a === -1 || u > d || u === d && (e.totals[i].records < e.totals[a].records || e.totals[i].records === e.totals[a].records && i < a)) && (a = i);
850
+ for (const [s, u] of r) {
851
+ const d = r.get(a) ?? -1;
852
+ (a === -1 || u > d || u === d && (e.totals[s].records < e.totals[a].records || e.totals[s].records === e.totals[a].records && s < a)) && (a = s);
853
853
  }
854
- n.add(a), o = o.filter((i) => !(i.anyOf ?? []).includes(a));
854
+ n.add(a), o = o.filter((s) => !(s.anyOf ?? []).includes(a));
855
855
  }
856
- return [...n].sort((s, a) => s - a);
856
+ return [...n].sort((r, a) => r - a);
857
857
  }
858
858
  function ko(e, t = 0) {
859
- Lt = t;
859
+ Dt = t;
860
860
  try {
861
861
  return So(e);
862
862
  } catch (n) {
863
863
  if (n !== tn) throw n;
864
864
  const o = new Uint8Array(e.totals.length);
865
- for (const s of e.cellTotals)
866
- for (const a of s) o[a] = 1;
867
- return e.totals.map((s, a) => s.shown && !o[a]);
865
+ for (const r of e.cellTotals)
866
+ for (const a of r) o[a] = 1;
867
+ return e.totals.map((r, a) => r.shown && !o[a]);
868
868
  }
869
869
  }
870
870
  function Mo() {
871
- return Lt;
871
+ return Dt;
872
872
  }
873
873
  function So(e) {
874
874
  const t = e.totals.map((m) => m.shown);
@@ -878,20 +878,20 @@ function So(e) {
878
878
  m.shown && (n = Math.max(n, Math.abs(m.value)));
879
879
  for (const m of e.cells)
880
880
  Number.isFinite(m.hi) && (n = Math.max(n, Math.abs(m.hi)));
881
- const o = 1e-9 * n, s = new Uint8Array(e.totals.length);
881
+ const o = 1e-9 * n, r = new Uint8Array(e.totals.length);
882
882
  for (const m of e.cellTotals)
883
- for (const w of m) s[w] = 1;
884
- const a = () => t.map((m, w) => m && !s[w]), i = e.cells.map((m, w) => w);
885
- let u = i;
883
+ for (const w of m) r[w] = 1;
884
+ const a = () => t.map((m, w) => m && !r[w]), s = e.cells.map((m, w) => w);
885
+ let u = s;
886
886
  const d = [], l = e.totals.length + 1;
887
887
  for (let m = 0; ; m += 1) {
888
888
  if (m > l) return a();
889
889
  const w = Ln(e, t, o, u);
890
890
  if (w === null) return a();
891
891
  if (w.disclosures.length === 0) break;
892
- const b = Io(e, w.disclosures);
893
- if (b.length === 0) return a();
894
- for (const p of b)
892
+ const y = Io(e, w.disclosures);
893
+ if (y.length === 0) return a();
894
+ for (const p of y)
895
895
  t[p] = !1, d.push(p);
896
896
  u = w.cells;
897
897
  }
@@ -899,23 +899,23 @@ function So(e) {
899
899
  (m, w) => e.totals[w].records - e.totals[m].records || m - w
900
900
  );
901
901
  for (const m of v)
902
- t[m] = !0, No(e, t, m, i, o) || (t[m] = !1);
902
+ t[m] = !0, No(e, t, m, s, o) || (t[m] = !1);
903
903
  return t;
904
904
  }
905
- function No(e, t, n, o, s) {
905
+ function No(e, t, n, o, r) {
906
906
  try {
907
907
  const a = /* @__PURE__ */ new Set();
908
908
  e.cellTotals.forEach((d, l) => {
909
909
  d.includes(n) && a.add(l);
910
910
  });
911
- const i = [...a, ...o.filter((d) => !a.has(d))], u = Ln(e, t, s, i, !0);
911
+ const s = [...a, ...o.filter((d) => !a.has(d))], u = Ln(e, t, r, s, !0);
912
912
  return u !== null && u.disclosures.length === 0;
913
913
  } catch (a) {
914
914
  if (a !== tn) throw a;
915
915
  return !1;
916
916
  }
917
917
  }
918
- const Te = 10, on = Math.floor(Te / 2), ot = Te - 1, et = Te / 2, rt = (e, t, n) => Math.min(n, Math.max(t, e)), cn = /* @__PURE__ */ new Set();
918
+ const _e = 10, on = Math.floor(_e / 2), at = _e - 1, tt = _e / 2, st = (e, t, n) => Math.min(n, Math.max(t, e)), cn = /* @__PURE__ */ new Set();
919
919
  function Yt(e) {
920
920
  !Zn() || cn.has(e) || (cn.add(e), console.warn(`Heatmap: ${e}`));
921
921
  }
@@ -936,18 +936,18 @@ function Ao(e) {
936
936
  }
937
937
  function _o(e, t, n) {
938
938
  if (!(n > t)) return on;
939
- const o = rt((e - t) / (n - t), 0, 1);
940
- return Math.min(ot, Math.floor(o * Te));
939
+ const o = st((e - t) / (n - t), 0, 1);
940
+ return Math.min(at, Math.floor(o * _e));
941
941
  }
942
- function To(e, t, n, o) {
942
+ function Ro(e, t, n, o) {
943
943
  if (e < n) {
944
- const i = n - t, u = i > 0 ? rt((n - e) / i, 0, 1) : 1;
945
- return et - 1 - Math.min(et - 1, Math.floor(u * et));
944
+ const s = n - t, u = s > 0 ? st((n - e) / s, 0, 1) : 1;
945
+ return tt - 1 - Math.min(tt - 1, Math.floor(u * tt));
946
946
  }
947
- const s = o - n, a = s > 0 ? rt((e - n) / s, 0, 1) : e > n ? 1 : 0;
948
- return et + Math.min(et - 1, Math.floor(a * et));
947
+ const r = o - n, a = r > 0 ? st((e - n) / r, 0, 1) : e > n ? 1 : 0;
948
+ return tt + Math.min(tt - 1, Math.floor(a * tt));
949
949
  }
950
- function Ro(e, t) {
950
+ function To(e, t) {
951
951
  if (e.type !== "diverging" || e.midpoint === void 0) return !1;
952
952
  const n = Math.max(
953
953
  Math.abs(e.midpoint),
@@ -960,145 +960,145 @@ function Eo(e, t) {
960
960
  const n = e.length;
961
961
  if (n === 0) return NaN;
962
962
  if (n === 1) return e[0];
963
- const o = rt(t, 0, 1) * (n - 1), s = Math.floor(o), a = Math.min(n - 1, s + 1);
964
- return e[s] + (e[a] - e[s]) * (o - s);
963
+ const o = st(t, 0, 1) * (n - 1), r = Math.floor(o), a = Math.min(n - 1, r + 1);
964
+ return e[r] + (e[a] - e[r]) * (o - r);
965
965
  }
966
966
  function Lo(e, t) {
967
967
  const n = Math.max(1, Math.round(t)), o = [];
968
- for (let s = 1; s < n; s += 1)
969
- o.push(Eo(e, s / n));
968
+ for (let r = 1; r < n; r += 1)
969
+ o.push(Eo(e, r / n));
970
970
  return o;
971
971
  }
972
972
  function Oo(e, t) {
973
973
  if (e.length === 0) return [];
974
- const n = e[0], o = (s) => {
975
- let a = 0, i = e.length - 1;
976
- for (; a < i; ) {
977
- const u = a + i >>> 1;
978
- e[u] < s ? a = u + 1 : i = u;
974
+ const n = e[0], o = (r) => {
975
+ let a = 0, s = e.length - 1;
976
+ for (; a < s; ) {
977
+ const u = a + s >>> 1;
978
+ e[u] < r ? a = u + 1 : s = u;
979
979
  }
980
980
  return e[a];
981
981
  };
982
982
  return On(
983
983
  Lo(e, t).map(o)
984
- ).filter((s) => s > n);
984
+ ).filter((r) => r > n);
985
985
  }
986
986
  function un(e, t) {
987
987
  let n = 0, o = t.length;
988
988
  for (; n < o; ) {
989
- const s = n + o >>> 1;
990
- t[s] <= e ? n = s + 1 : o = s;
989
+ const r = n + o >>> 1;
990
+ t[r] <= e ? n = r + 1 : o = r;
991
991
  }
992
992
  return n;
993
993
  }
994
994
  function Jt(e, t) {
995
995
  return t <= 1 ? on : Math.round(
996
- rt(e, 0, t - 1) * ot / (t - 1)
996
+ st(e, 0, t - 1) * at / (t - 1)
997
997
  );
998
998
  }
999
999
  function Qt(e, t) {
1000
1000
  const n = Ao(t);
1001
1001
  switch (e.type) {
1002
1002
  case "diverging": {
1003
- const o = e.domain && e.domain !== "auto" ? dn(e.domain) : null, s = e.midpoint ?? (o && (o[0] > 0 || o[1] < 0) ? (o[0] + o[1]) / 2 : 0);
1004
- let a, i;
1003
+ const o = e.domain && e.domain !== "auto" ? dn(e.domain) : null, r = e.midpoint ?? (o && (o[0] > 0 || o[1] < 0) ? (o[0] + o[1]) / 2 : 0);
1004
+ let a, s;
1005
1005
  if (o)
1006
- [a, i] = o;
1006
+ [a, s] = o;
1007
1007
  else {
1008
1008
  const u = n ? Math.max(
1009
- Math.abs(n[0] - s),
1010
- Math.abs(n[1] - s)
1009
+ Math.abs(n[0] - r),
1010
+ Math.abs(n[1] - r)
1011
1011
  ) : 0;
1012
- a = s - u, i = s + u;
1012
+ a = r - u, s = r + u;
1013
1013
  }
1014
1014
  return {
1015
1015
  type: "diverging",
1016
1016
  min: a,
1017
- max: i,
1018
- midpoint: s,
1017
+ max: s,
1018
+ midpoint: r,
1019
1019
  thresholds: [],
1020
- stepOf: (u) => To(u, a, s, i)
1020
+ stepOf: (u) => Ro(u, a, r, s)
1021
1021
  };
1022
1022
  }
1023
1023
  case "quantile": {
1024
- const o = t.filter(Number.isFinite).slice().sort((i, u) => i - u), s = rt(
1025
- Math.round(e.buckets ?? Te),
1024
+ const o = t.filter(Number.isFinite).slice().sort((s, u) => s - u), r = st(
1025
+ Math.round(e.buckets ?? _e),
1026
1026
  2,
1027
- Te
1028
- ), a = Oo(o, s);
1027
+ _e
1028
+ ), a = Oo(o, r);
1029
1029
  return {
1030
1030
  type: "quantile",
1031
1031
  min: (n == null ? void 0 : n[0]) ?? null,
1032
1032
  max: (n == null ? void 0 : n[1]) ?? null,
1033
1033
  thresholds: a,
1034
- stepOf: (i) => Jt(un(i, a), a.length + 1)
1034
+ stepOf: (s) => Jt(un(s, a), a.length + 1)
1035
1035
  };
1036
1036
  }
1037
1037
  case "threshold": {
1038
- const o = e.thresholds.filter(Number.isFinite), s = On(o);
1039
- s.length !== o.length && Yt("duplicate thresholds merged."), s.length > ot && Yt(
1040
- `${s.length} thresholds given; ten steps take at most ${ot}, so the highest ${s.length - ot} are dropped.`
1038
+ const o = e.thresholds.filter(Number.isFinite), r = On(o);
1039
+ r.length !== o.length && Yt("duplicate thresholds merged."), r.length > at && Yt(
1040
+ `${r.length} thresholds given; ten steps take at most ${at}, so the highest ${r.length - at} are dropped.`
1041
1041
  );
1042
- const a = s.slice(0, ot);
1042
+ const a = r.slice(0, at);
1043
1043
  return {
1044
1044
  type: "threshold",
1045
1045
  min: (n == null ? void 0 : n[0]) ?? null,
1046
1046
  max: (n == null ? void 0 : n[1]) ?? null,
1047
1047
  thresholds: a,
1048
- stepOf: (i) => Jt(un(i, a), a.length + 1)
1048
+ stepOf: (s) => Jt(un(s, a), a.length + 1)
1049
1049
  };
1050
1050
  }
1051
1051
  case "sequential":
1052
1052
  default: {
1053
- const o = e.domain && e.domain !== "auto" ? dn(e.domain) : null, s = o ? o[0] : (n == null ? void 0 : n[0]) ?? null, a = o ? o[1] : (n == null ? void 0 : n[1]) ?? null;
1053
+ const o = e.domain && e.domain !== "auto" ? dn(e.domain) : null, r = o ? o[0] : (n == null ? void 0 : n[0]) ?? null, a = o ? o[1] : (n == null ? void 0 : n[1]) ?? null;
1054
1054
  return {
1055
1055
  type: "sequential",
1056
- min: s,
1056
+ min: r,
1057
1057
  max: a,
1058
1058
  thresholds: [],
1059
- stepOf: (i) => s === null || a === null ? on : _o(i, s, a)
1059
+ stepOf: (s) => r === null || a === null ? on : _o(s, r, a)
1060
1060
  };
1061
1061
  }
1062
1062
  }
1063
1063
  }
1064
1064
  function Co(e) {
1065
- let t = 0, n = !1, o = 0, s = !1;
1065
+ let t = 0, n = !1, o = 0, r = !1;
1066
1066
  for (const a of e)
1067
- a.value === null || !Number.isFinite(a.value) || (t += a.value, n = !0, a.count !== void 0 && (o += a.count, s = !0));
1068
- return { value: n ? t : null, count: s ? o : void 0 };
1067
+ a.value === null || !Number.isFinite(a.value) || (t += a.value, n = !0, a.count !== void 0 && (o += a.count, r = !0));
1068
+ return { value: n ? t : null, count: r ? o : void 0 };
1069
1069
  }
1070
1070
  function Ho(e) {
1071
- let t = 0, n = 0, o = 0, s = !1;
1071
+ let t = 0, n = 0, o = 0, r = !1;
1072
1072
  for (const a of e) {
1073
1073
  if (a.value === null || !Number.isFinite(a.value)) continue;
1074
- const i = a.count ?? 1;
1075
- t += a.value * i, n += i, a.count !== void 0 && (o += a.count, s = !0);
1074
+ const s = a.count ?? 1;
1075
+ t += a.value * s, n += s, a.count !== void 0 && (o += a.count, r = !0);
1076
1076
  }
1077
1077
  return {
1078
1078
  value: n > 0 ? t / n : null,
1079
- count: s ? o : void 0
1079
+ count: r ? o : void 0
1080
1080
  };
1081
1081
  }
1082
1082
  function Do(e, t) {
1083
1083
  return t === "sum" ? Co(e) : Ho(e);
1084
1084
  }
1085
1085
  function Ko(e, t) {
1086
- const n = new Set(t == null ? void 0 : t.map((i) => i.id)), o = new Set(n), s = /* @__PURE__ */ new Map();
1086
+ const n = new Set(t == null ? void 0 : t.map((s) => s.id)), o = new Set(n), r = /* @__PURE__ */ new Map();
1087
1087
  let a = 0;
1088
- for (const i of e) {
1089
- const u = i.group;
1090
- if (u === void 0 || s.has(u)) continue;
1088
+ for (const s of e) {
1089
+ const u = s.group;
1090
+ if (u === void 0 || r.has(u)) continue;
1091
1091
  if (n.has(u)) {
1092
- s.set(u, u);
1092
+ r.set(u, u);
1093
1093
  continue;
1094
1094
  }
1095
1095
  let d;
1096
1096
  do
1097
1097
  a += 1, d = `group-${a}`;
1098
1098
  while (o.has(d));
1099
- o.add(d), s.set(u, d);
1099
+ o.add(d), r.set(u, d);
1100
1100
  }
1101
- return s;
1101
+ return r;
1102
1102
  }
1103
1103
  function Cn(e, t) {
1104
1104
  return t !== void 0 && e !== void 0 && e < t;
@@ -1106,17 +1106,17 @@ function Cn(e, t) {
1106
1106
  function Hn(e, t) {
1107
1107
  if (e == null)
1108
1108
  return { value: null, status: "empty" };
1109
- const n = typeof e == "number" ? { value: e } : e, o = n.value === null || !Number.isFinite(n.value) ? null : n.value, s = Cn(n.count, t) && (o !== null || (n.count ?? 0) > 0) ? "low-sample" : o === null ? "empty" : "value";
1110
- return { value: o, count: n.count, label: n.label, status: s };
1109
+ const n = typeof e == "number" ? { value: e } : e, o = n.value === null || !Number.isFinite(n.value) ? null : n.value, r = Cn(n.count, t) && (o !== null || (n.count ?? 0) > 0) ? "low-sample" : o === null ? "empty" : "value";
1110
+ return { value: o, count: n.count, label: n.label, status: r };
1111
1111
  }
1112
- function Fo(e, t, n, o, s) {
1112
+ function Fo(e, t, n, o, r) {
1113
1113
  return e.map(
1114
- (a, i) => t.map(
1114
+ (a, s) => t.map(
1115
1115
  (u, d) => {
1116
1116
  var l;
1117
1117
  return Hn(
1118
- n ? n(a, u, i, d) : (l = o == null ? void 0 : o[i]) == null ? void 0 : l[d],
1119
- s
1118
+ n ? n(a, u, s, d) : (l = o == null ? void 0 : o[s]) == null ? void 0 : l[d],
1119
+ r
1120
1120
  );
1121
1121
  }
1122
1122
  )
@@ -1153,88 +1153,88 @@ function $o(e, t, n) {
1153
1153
  }
1154
1154
  function Po(e, t, n, o) {
1155
1155
  const {
1156
- rowMethod: s,
1156
+ rowMethod: r,
1157
1157
  columnMethod: a,
1158
- groupColumnMethod: i,
1158
+ groupColumnMethod: s,
1159
1159
  groups: u,
1160
1160
  minCount: d,
1161
1161
  getTotal: l,
1162
1162
  valueType: v = "number"
1163
- } = o, m = o.shown ?? Vo, w = t.map((E, A) => A), b = n.map((E, A) => A), p = [], N = (E, A, K, F, $) => {
1163
+ } = o, m = o.shown ?? Vo, w = t.map((_, A) => A), y = n.map((_, A) => A), p = [], S = (_, A, z, q, B) => {
1164
1164
  const c = [];
1165
- for (const x of K)
1166
- for (const _ of F) c.push(e[x][_]);
1167
- let I = 0, P = !1, H = !1;
1168
- for (const x of c)
1169
- x.status === "low-sample" && (P = !0, I += x.count ?? 0, x.value === null && (H = !0));
1170
- const Q = E === void 0 ? $o(c, A, d) : Hn(E, d), te = Q.status === "low-sample" || E === void 0 && H || d !== void 0 && I > 0 && I < d;
1165
+ for (const I of z)
1166
+ for (const G of q) c.push(e[I][G]);
1167
+ let x = 0, P = !1, K = !1;
1168
+ for (const I of c)
1169
+ I.status === "low-sample" && (P = !0, x += I.count ?? 0, I.value === null && (K = !0));
1170
+ const J = _ === void 0 ? $o(c, A, d) : Hn(_, d), ne = J.status === "low-sample" || _ === void 0 && K || d !== void 0 && x > 0 && x < d;
1171
1171
  return p.push({
1172
1172
  method: A,
1173
- rowIndexes: K,
1174
- columnIndexes: F,
1175
- own: Q,
1176
- primary: te,
1177
- visible: $,
1173
+ rowIndexes: z,
1174
+ columnIndexes: q,
1175
+ own: J,
1176
+ primary: ne,
1177
+ visible: B,
1178
1178
  holdsHidden: P
1179
1179
  }), p.length - 1;
1180
- }, O = t.map(
1181
- (E, A) => N(
1180
+ }, R = t.map(
1181
+ (_, A) => S(
1182
1182
  l == null ? void 0 : l({
1183
1183
  kind: "row",
1184
- method: s,
1185
- row: E,
1186
- rowId: E.id,
1184
+ method: r,
1185
+ row: _,
1186
+ rowId: _.id,
1187
1187
  rowIndex: A
1188
1188
  }),
1189
- s,
1189
+ r,
1190
1190
  [A],
1191
- b,
1191
+ y,
1192
1192
  m.rows
1193
1193
  )
1194
1194
  ), D = /* @__PURE__ */ new Map();
1195
- t.forEach((E, A) => {
1196
- if (E.group === void 0) return;
1197
- const K = D.get(E.group) ?? [];
1198
- K.push(A), D.set(E.group, K);
1195
+ t.forEach((_, A) => {
1196
+ if (_.group === void 0) return;
1197
+ const z = D.get(_.group) ?? [];
1198
+ z.push(A), D.set(_.group, z);
1199
1199
  });
1200
- const y = new Map(u == null ? void 0 : u.map((E) => [E.id, E])), R = (E, A) => {
1201
- const K = y.get(E);
1200
+ const k = new Map(u == null ? void 0 : u.map((_) => [_.id, _])), E = (_, A) => {
1201
+ const z = k.get(_);
1202
1202
  return {
1203
- groupId: E,
1204
- ...K === void 0 ? {} : { group: K },
1205
- rows: A.map((F) => t[F]),
1203
+ groupId: _,
1204
+ ...z === void 0 ? {} : { group: z },
1205
+ rows: A.map((q) => t[q]),
1206
1206
  rowIndexes: A
1207
1207
  };
1208
- }, g = /* @__PURE__ */ new Map();
1209
- for (const [E, A] of D) {
1210
- const K = R(E, A);
1211
- g.set(
1212
- E,
1208
+ }, h = /* @__PURE__ */ new Map();
1209
+ for (const [_, A] of D) {
1210
+ const z = E(_, A);
1211
+ h.set(
1212
+ _,
1213
1213
  n.map(
1214
- (F, $) => N(
1214
+ (q, B) => S(
1215
1215
  l == null ? void 0 : l({
1216
1216
  kind: "group-column",
1217
- method: i,
1218
- ...K,
1219
- column: F,
1220
- columnId: F.id,
1221
- columnIndex: $
1217
+ method: s,
1218
+ ...z,
1219
+ column: q,
1220
+ columnId: q.id,
1221
+ columnIndex: B
1222
1222
  }),
1223
- i,
1223
+ s,
1224
1224
  A,
1225
- [$],
1225
+ [B],
1226
1226
  m.groupColumns
1227
1227
  )
1228
1228
  )
1229
1229
  );
1230
1230
  }
1231
- const T = n.map(
1232
- (E, A) => N(
1231
+ const O = n.map(
1232
+ (_, A) => S(
1233
1233
  l == null ? void 0 : l({
1234
1234
  kind: "column",
1235
1235
  method: a,
1236
- column: E,
1237
- columnId: E.id,
1236
+ column: _,
1237
+ columnId: _.id,
1238
1238
  columnIndex: A
1239
1239
  }),
1240
1240
  a,
@@ -1242,209 +1242,209 @@ function Po(e, t, n, o) {
1242
1242
  [A],
1243
1243
  m.columns
1244
1244
  )
1245
- ), L = /* @__PURE__ */ new Map();
1246
- for (const [E, A] of D)
1247
- L.set(
1248
- E,
1249
- N(
1245
+ ), N = /* @__PURE__ */ new Map();
1246
+ for (const [_, A] of D)
1247
+ N.set(
1248
+ _,
1249
+ S(
1250
1250
  l == null ? void 0 : l({
1251
1251
  kind: "group",
1252
- method: s,
1253
- ...R(E, A)
1252
+ method: r,
1253
+ ...E(_, A)
1254
1254
  }),
1255
- s,
1255
+ r,
1256
1256
  A,
1257
- b,
1257
+ y,
1258
1258
  m.groups
1259
1259
  )
1260
1260
  );
1261
- const G = N(
1262
- l == null ? void 0 : l({ kind: "grand", method: s }),
1263
- s,
1261
+ const V = S(
1262
+ l == null ? void 0 : l({ kind: "grand", method: r }),
1263
+ r,
1264
1264
  w,
1265
- b,
1265
+ y,
1266
1266
  m.grand
1267
- ), J = p.map((E) => E.primary);
1267
+ ), Z = p.map((_) => _.primary);
1268
1268
  jo({
1269
1269
  matrix: e,
1270
1270
  rows: t,
1271
1271
  drafts: p,
1272
- rowDrafts: O,
1273
- columnDrafts: T,
1274
- groupDrafts: L,
1275
- groupColumnDrafts: g,
1276
- grandDraft: G,
1272
+ rowDrafts: R,
1273
+ columnDrafts: O,
1274
+ groupDrafts: N,
1275
+ groupColumnDrafts: h,
1276
+ grandDraft: V,
1277
1277
  members: D,
1278
1278
  valueType: v,
1279
1279
  minCount: d
1280
- }).forEach((E, A) => {
1281
- E || (J[A] = !0);
1280
+ }).forEach((_, A) => {
1281
+ _ || (Z[A] = !0);
1282
1282
  });
1283
- const Y = (E) => J[E] ? Go : p[E].own;
1283
+ const W = (_) => Z[_] ? Go : p[_].own;
1284
1284
  return {
1285
- rows: O.map(Y),
1286
- columns: T.map(Y),
1287
- grand: Y(G),
1285
+ rows: R.map(W),
1286
+ columns: O.map(W),
1287
+ grand: W(V),
1288
1288
  groupColumns: new Map(
1289
- [...g].map(([E, A]) => [
1290
- E,
1291
- A.map(Y)
1289
+ [...h].map(([_, A]) => [
1290
+ _,
1291
+ A.map(W)
1292
1292
  ])
1293
1293
  ),
1294
1294
  groups: new Map(
1295
- [...L].map(([E, A]) => [E, Y(A)])
1295
+ [...N].map(([_, A]) => [_, W(A)])
1296
1296
  )
1297
1297
  };
1298
1298
  }
1299
1299
  function jo(e) {
1300
- const { matrix: t, rows: n, drafts: o, members: s, valueType: a, minCount: i } = e, u = o.map(() => !0);
1301
- if (i === void 0) return u;
1300
+ const { matrix: t, rows: n, drafts: o, members: r, valueType: a, minCount: s } = e, u = o.map(() => !0);
1301
+ if (s === void 0) return u;
1302
1302
  const d = o.map(
1303
- (x) => x.visible && !x.primary && x.own.value !== null
1303
+ (I) => I.visible && !I.primary && I.own.value !== null
1304
1304
  ), l = new Set(
1305
- o.filter((x, _) => d[_] && x.holdsHidden).map((x) => x.method)
1305
+ o.filter((I, G) => d[G] && I.holdsHidden).map((I) => I.method)
1306
1306
  );
1307
1307
  if (l.size === 0) return u;
1308
- const v = () => o.map((x, _) => !(d[_] && x.holdsHidden));
1308
+ const v = () => o.map((I, G) => !(d[G] && I.holdsHidden));
1309
1309
  if (l.size > 1) return v();
1310
1310
  const m = [...l][0];
1311
1311
  if (a === "rate" && m === "sum") return v();
1312
- const w = (x) => m === "mean" ? x.count ?? 1 : 1, b = a === "rate";
1313
- if (!b && m === "mean") return v();
1314
- const p = (x) => x.status === "low-sample" && (m === "sum" || (x.count ?? 0) > 0), N = 0, O = 1, D = 2;
1315
- let y = 3;
1316
- const R = /* @__PURE__ */ new Map();
1317
- for (const x of s.keys()) R.set(x, y++);
1318
- const g = n.map(() => y++), T = /* @__PURE__ */ new Map(), L = e.columnDrafts.length;
1319
- for (const x of s.keys())
1320
- T.set(
1321
- x,
1322
- Array.from({ length: L }, () => y++)
1312
+ const w = (I) => m === "mean" ? I.count ?? 1 : 1, y = a === "rate";
1313
+ if (!y && m === "mean") return v();
1314
+ const p = (I) => I.status === "low-sample" && (m === "sum" || (I.count ?? 0) > 0), S = 0, R = 1, D = 2;
1315
+ let k = 3;
1316
+ const E = /* @__PURE__ */ new Map();
1317
+ for (const I of r.keys()) E.set(I, k++);
1318
+ const h = n.map(() => k++), O = /* @__PURE__ */ new Map(), N = e.columnDrafts.length;
1319
+ for (const I of r.keys())
1320
+ O.set(
1321
+ I,
1322
+ Array.from({ length: N }, () => k++)
1323
1323
  );
1324
- const G = e.columnDrafts.map(() => y++), J = (x) => n[x].group, z = o.map(() => [0, 0]);
1325
- e.rowDrafts.forEach((x, _) => {
1326
- const W = J(_);
1327
- z[x] = [
1328
- W === void 0 ? D : R.get(W),
1329
- g[_]
1324
+ const V = e.columnDrafts.map(() => k++), Z = (I) => n[I].group, $ = o.map(() => [0, 0]);
1325
+ e.rowDrafts.forEach((I, G) => {
1326
+ const C = Z(G);
1327
+ $[I] = [
1328
+ C === void 0 ? D : E.get(C),
1329
+ h[G]
1330
1330
  ];
1331
1331
  });
1332
- for (const [x, _] of e.groupDrafts)
1333
- z[_] = [D, R.get(x)];
1334
- for (const [x, _] of e.groupColumnDrafts)
1335
- _.forEach((W, V) => {
1336
- z[W] = [T.get(x)[V], G[V]];
1332
+ for (const [I, G] of e.groupDrafts)
1333
+ $[G] = [D, E.get(I)];
1334
+ for (const [I, G] of e.groupColumnDrafts)
1335
+ G.forEach((C, j) => {
1336
+ $[C] = [O.get(I)[j], V[j]];
1337
1337
  });
1338
- e.columnDrafts.forEach((x, _) => {
1339
- z[x] = [G[_], O];
1340
- }), z[e.grandDraft] = [N, D];
1341
- const Y = [], E = [];
1342
- let A = !0, K = !0;
1343
- if (t.forEach((x, _) => {
1344
- x.forEach((W, V) => {
1345
- if (W.value !== null && W.value < 0 && (K = !1), !p(W)) return;
1346
- Number.isInteger(W.count ?? 0) || (A = !1);
1347
- const q = J(_);
1348
- Y.push({
1349
- from: g[_],
1350
- to: q === void 0 ? G[V] : T.get(q)[V],
1338
+ e.columnDrafts.forEach((I, G) => {
1339
+ $[I] = [V[G], R];
1340
+ }), $[e.grandDraft] = [S, D];
1341
+ const W = [], _ = [];
1342
+ let A = !0, z = !0;
1343
+ if (t.forEach((I, G) => {
1344
+ I.forEach((C, j) => {
1345
+ if (C.value !== null && C.value < 0 && (z = !1), !p(C)) return;
1346
+ Number.isInteger(C.count ?? 0) || (A = !1);
1347
+ const ee = Z(G);
1348
+ W.push({
1349
+ from: h[G],
1350
+ to: ee === void 0 ? V[j] : O.get(ee)[j],
1351
1351
  lo: 0,
1352
- hi: a === "rate" ? W.count ?? 0 : 1 / 0,
1353
- records: W.count ?? 0
1352
+ hi: a === "rate" ? C.count ?? 0 : 1 / 0,
1353
+ records: C.count ?? 0
1354
1354
  });
1355
- const B = [
1356
- e.rowDrafts[_],
1357
- e.columnDrafts[V],
1355
+ const L = [
1356
+ e.rowDrafts[G],
1357
+ e.columnDrafts[j],
1358
1358
  e.grandDraft
1359
1359
  ];
1360
- q !== void 0 && B.push(
1361
- e.groupDrafts.get(q),
1362
- e.groupColumnDrafts.get(q)[V]
1363
- ), E.push(B.sort((re, ne) => re - ne));
1360
+ ee !== void 0 && L.push(
1361
+ e.groupDrafts.get(ee),
1362
+ e.groupColumnDrafts.get(ee)[j]
1363
+ ), _.push(L.sort((oe, ie) => oe - ie));
1364
1364
  });
1365
- }), Y.length === 0) return u;
1366
- const F = (x) => Math.abs(x - Math.round(x)) <= 1e-9 * Math.max(1, Math.abs(x));
1367
- let $ = !0, c = !1;
1368
- const I = (x, _) => x.count === void 0 ? _ : Math.round(_), P = o.map((x, _) => {
1369
- let W = 0, V = 0, q = 0, B = 0, re = 0;
1370
- for (const Ae of x.rowIndexes)
1371
- for (const be of x.columnIndexes) {
1372
- const Z = t[Ae][be];
1373
- if (Z.status !== "empty") {
1374
- if (V += w(Z), W += Z.count ?? 1, p(Z)) re += 1;
1375
- else if (Z.value !== null) {
1376
- const pe = w(Z) * Z.value;
1377
- F(pe) || ($ = !1), q += pe, B += I(Z, pe);
1365
+ }), W.length === 0) return u;
1366
+ const q = (I) => Math.abs(I - Math.round(I)) <= 1e-9 * Math.max(1, Math.abs(I));
1367
+ let B = !0, c = !1;
1368
+ const x = (I, G) => I.count === void 0 ? G : Math.round(G), P = o.map((I, G) => {
1369
+ let C = 0, j = 0, ee = 0, L = 0, oe = 0;
1370
+ for (const xe of I.rowIndexes)
1371
+ for (const Ke of I.columnIndexes) {
1372
+ const de = t[xe][Ke];
1373
+ if (de.status !== "empty") {
1374
+ if (j += w(de), C += de.count ?? 1, p(de)) oe += 1;
1375
+ else if (de.value !== null) {
1376
+ const re = w(de) * de.value;
1377
+ q(re) || (B = !1), ee += re, L += x(de, re);
1378
1378
  }
1379
1379
  }
1380
1380
  }
1381
- let ne = 0, Me = 0;
1382
- if (d[_] && re > 0) {
1383
- const Ae = x.own.value;
1384
- ne = m === "mean" ? Ae * V : Ae, F(ne) || ($ = !1), m === "mean" && x.own.count !== void 0 && Math.abs(x.own.count - V) > 1e-9 * Math.max(1, V) && (c = !0), Me = x.own.count === void 0 ? ne : Math.round(ne);
1381
+ let ie = 0, me = 0;
1382
+ if (d[G] && oe > 0) {
1383
+ const xe = I.own.value;
1384
+ ie = m === "mean" ? xe * j : xe, q(ie) || (B = !1), m === "mean" && I.own.count !== void 0 && Math.abs(I.own.count - j) > 1e-9 * Math.max(1, j) && (c = !0), me = I.own.count === void 0 ? ie : Math.round(ie);
1385
1385
  }
1386
- return { records: W, exact: q, rounded: B, unknowns: re, whole: ne, wholeRounded: Me };
1386
+ return { records: C, exact: ee, rounded: L, unknowns: oe, whole: ie, wholeRounded: me };
1387
1387
  });
1388
1388
  if (c) return v();
1389
- o.forEach((x, _) => {
1390
- d[_] && x.own.value < 0 && (K = !1);
1389
+ o.forEach((I, G) => {
1390
+ d[G] && I.own.value < 0 && (z = !1);
1391
1391
  });
1392
- const H = a === "rate" ? "rate" : K ? "scaled" : "free", Q = (x, _, W) => {
1393
- const V = o.map((q, B) => {
1394
- const re = P[B];
1395
- let ne = 0;
1396
- if (_[B] && re.unknowns > 0) {
1397
- ne = x ? re.wholeRounded - re.rounded : re.whole - re.exact;
1398
- const Me = 1e-9 * Math.max(1, Math.abs(re.whole), Math.abs(re.exact));
1399
- ne < 0 && ne > -Me && (ne = 0);
1392
+ const K = a === "rate" ? "rate" : z ? "scaled" : "free", J = (I, G, C) => {
1393
+ const j = o.map((ee, L) => {
1394
+ const oe = P[L];
1395
+ let ie = 0;
1396
+ if (G[L] && oe.unknowns > 0) {
1397
+ ie = I ? oe.wholeRounded - oe.rounded : oe.whole - oe.exact;
1398
+ const me = 1e-9 * Math.max(1, Math.abs(oe.whole), Math.abs(oe.exact));
1399
+ ie < 0 && ie > -me && (ie = 0);
1400
1400
  }
1401
1401
  return {
1402
- from: z[B][0],
1403
- to: z[B][1],
1404
- value: ne,
1405
- shown: _[B],
1406
- records: re.records
1402
+ from: $[L][0],
1403
+ to: $[L][1],
1404
+ value: ie,
1405
+ shown: G[L],
1406
+ records: oe.records
1407
1407
  };
1408
1408
  });
1409
1409
  return ko(
1410
1410
  {
1411
- nodeCount: y,
1412
- sink: O,
1413
- source: N,
1414
- cells: Y,
1415
- totals: V,
1416
- cellTotals: E,
1417
- mode: H,
1418
- integral: b && A && (x || $),
1419
- minCount: i
1411
+ nodeCount: k,
1412
+ sink: R,
1413
+ source: S,
1414
+ cells: W,
1415
+ totals: j,
1416
+ cellTotals: _,
1417
+ mode: K,
1418
+ integral: y && A && (I || B),
1419
+ minCount: s
1420
1420
  },
1421
- W
1421
+ C
1422
1422
  );
1423
1423
  };
1424
- let te;
1425
- if (!b || $)
1426
- te = Q(b, d, 0);
1424
+ let ne;
1425
+ if (!y || B)
1426
+ ne = J(y, d, 0);
1427
1427
  else {
1428
- const x = Q(!0, d, 0);
1429
- te = Q(
1428
+ const I = J(!0, d, 0);
1429
+ ne = J(
1430
1430
  !1,
1431
- d.map((_, W) => _ && x[W]),
1431
+ d.map((G, C) => G && I[C]),
1432
1432
  Mo()
1433
1433
  );
1434
1434
  }
1435
- return o.map((x, _) => !d[_] || te[_]);
1435
+ return o.map((I, G) => !d[G] || ne[G]);
1436
1436
  }
1437
- const Gt = (e) => `d:${e}`, qo = (e) => `g:${e}`, At = "f";
1438
- function Wo(e, t, n, o, s) {
1437
+ const Gt = (e) => `d:${e}`, qo = (e) => `g:${e}`, Et = "f";
1438
+ function Wo(e, t, n, o, r) {
1439
1439
  const a = [...e];
1440
1440
  if (o === "label")
1441
- return a.sort((i, u) => s.compare(t[i].label, t[u].label));
1441
+ return a.sort((s, u) => r.compare(t[s].label, t[u].label));
1442
1442
  if (o === "total-asc" || o === "total-desc") {
1443
- const i = o === "total-asc" ? 1 : -1;
1443
+ const s = o === "total-asc" ? 1 : -1;
1444
1444
  return a.sort((u, d) => {
1445
1445
  var m, w;
1446
1446
  const l = (m = n[u]) == null ? void 0 : m.value, v = (w = n[d]) == null ? void 0 : w.value;
1447
- return l == null ? v == null ? 0 : 1 : v == null ? -1 : (l - v) * i;
1447
+ return l == null ? v == null ? 0 : 1 : v == null ? -1 : (l - v) * s;
1448
1448
  });
1449
1449
  }
1450
1450
  return a;
@@ -1458,16 +1458,16 @@ function pn(e, t, n, o) {
1458
1458
  rowIndex: l,
1459
1459
  groupId: e[l].group
1460
1460
  }));
1461
- const s = [], a = /* @__PURE__ */ new Map(), i = [];
1461
+ const r = [], a = /* @__PURE__ */ new Map(), s = [];
1462
1462
  e.forEach((l) => {
1463
- l.group !== void 0 && !a.has(l.group) && (a.set(l.group, []), s.push(l.group));
1463
+ l.group !== void 0 && !a.has(l.group) && (a.set(l.group, []), r.push(l.group));
1464
1464
  });
1465
1465
  for (const l of t) {
1466
1466
  const v = e[l].group;
1467
- v === void 0 ? i.push(l) : (d = a.get(v)) == null || d.push(l);
1467
+ v === void 0 ? s.push(l) : (d = a.get(v)) == null || d.push(l);
1468
1468
  }
1469
1469
  const u = [];
1470
- for (const l of s) {
1470
+ for (const l of r) {
1471
1471
  const v = a.get(l) ?? [], m = o.has(l);
1472
1472
  if (u.push({
1473
1473
  kind: "group",
@@ -1484,7 +1484,7 @@ function pn(e, t, n, o) {
1484
1484
  groupId: l
1485
1485
  });
1486
1486
  }
1487
- for (const l of i)
1487
+ for (const l of s)
1488
1488
  u.push({ kind: "data", key: Gt(e[l].id), rowIndex: l });
1489
1489
  return u;
1490
1490
  }
@@ -1493,17 +1493,17 @@ function Dn({
1493
1493
  label: t,
1494
1494
  open: n,
1495
1495
  onOpenChange: o,
1496
- side: s = "top",
1496
+ side: r = "top",
1497
1497
  children: a
1498
1498
  }) {
1499
- const i = Tn(), u = t ?? (i == null ? void 0 : i.tooltipText(e)) ?? "";
1500
- return /* @__PURE__ */ C(
1499
+ const s = Rn(), u = t ?? (s == null ? void 0 : s.tooltipText(e)) ?? "";
1500
+ return /* @__PURE__ */ H(
1501
1501
  An,
1502
1502
  {
1503
1503
  label: u,
1504
1504
  open: n,
1505
1505
  onOpenChange: o,
1506
- side: s,
1506
+ side: r,
1507
1507
  delayDuration: 0,
1508
1508
  children: a
1509
1509
  }
@@ -1514,7 +1514,7 @@ function mn({
1514
1514
  label: e,
1515
1515
  onOpenChange: t
1516
1516
  }) {
1517
- return /* @__PURE__ */ C(An, { label: e, open: !0, onOpenChange: t, delayDuration: 0, children: /* @__PURE__ */ C(
1517
+ return /* @__PURE__ */ H(An, { label: e, open: !0, onOpenChange: t, delayDuration: 0, children: /* @__PURE__ */ H(
1518
1518
  "span",
1519
1519
  {
1520
1520
  "aria-hidden": "true",
@@ -1524,31 +1524,31 @@ function mn({
1524
1524
  ) });
1525
1525
  }
1526
1526
  const Uo = 1e3, Yo = 3;
1527
- function fn({ offset: e, viewport: t, lead: n, pitch: o, count: s }, a = Yo) {
1528
- if (s <= 0) return [0, 0];
1529
- if (!(o > 0)) return [0, s];
1530
- const i = Math.abs(e) - n, u = Math.floor(i / o) - a, d = Math.ceil((i + t) / o) + a, l = Math.max(0, Math.min(s - 1, u)), v = Math.max(l + 1, Math.min(s, d));
1527
+ function fn({ offset: e, viewport: t, lead: n, pitch: o, count: r }, a = Yo) {
1528
+ if (r <= 0) return [0, 0];
1529
+ if (!(o > 0)) return [0, r];
1530
+ const s = Math.abs(e) - n, u = Math.floor(s / o) - a, d = Math.ceil((s + t) / o) + a, l = Math.max(0, Math.min(r - 1, u)), v = Math.max(l + 1, Math.min(r, d));
1531
1531
  return [l, v];
1532
1532
  }
1533
1533
  function hn(e, t, n) {
1534
- const [o, s] = e, a = [];
1535
- for (let i = o; i < s; i += 1) a.push(i);
1534
+ const [o, r] = e, a = [];
1535
+ for (let s = o; s < r; s += 1) a.push(s);
1536
1536
  return n === null || n < 0 || n >= t ? {
1537
1537
  indexes: a,
1538
1538
  lead: o,
1539
1539
  middle: 0,
1540
1540
  middleAfter: 0,
1541
- tail: Math.max(0, t - s)
1541
+ tail: Math.max(0, t - r)
1542
1542
  } : n < o ? {
1543
1543
  indexes: [n, ...a],
1544
1544
  lead: n,
1545
1545
  middle: o - n - 1,
1546
1546
  middleAfter: 1,
1547
- tail: Math.max(0, t - s)
1548
- } : n >= s ? {
1547
+ tail: Math.max(0, t - r)
1548
+ } : n >= r ? {
1549
1549
  indexes: [...a, n],
1550
1550
  lead: o,
1551
- middle: n - s,
1551
+ middle: n - r,
1552
1552
  middleAfter: a.length,
1553
1553
  tail: t - n - 1
1554
1554
  } : {
@@ -1556,10 +1556,10 @@ function hn(e, t, n) {
1556
1556
  lead: o,
1557
1557
  middle: 0,
1558
1558
  middleAfter: 0,
1559
- tail: Math.max(0, t - s)
1559
+ tail: Math.max(0, t - r)
1560
1560
  };
1561
1561
  }
1562
- function _t(e) {
1562
+ function Lt(e) {
1563
1563
  return {
1564
1564
  indexes: Array.from({ length: e }, (t, n) => n),
1565
1565
  lead: 0,
@@ -1629,11 +1629,11 @@ const Xt = (e, t) => `${e}-${Math.min(9, Math.max(0, Math.round(t)))}`, Kn = {
1629
1629
  empty: "ds:border ds:border-dashed ds:border-[color:var(--heatmap-empty-border)] ds:bg-[var(--heatmap-empty)] ds:text-[color:var(--heatmap-empty-foreground)]",
1630
1630
  "low-sample": "ds:border ds:border-[color:var(--heatmap-empty-border)] ds:bg-[var(--heatmap-low-sample-surface)] ds:bg-[image:var(--heatmap-low-sample)] ds:text-[color:var(--heatmap-empty-foreground)]",
1631
1631
  aggregate: "ds:bg-[var(--muted)] ds:text-[color:var(--foreground)] ds:font-semibold"
1632
- }, wn = ge(
1632
+ }, wn = he(
1633
1633
  "ds:flex ds:min-w-0 ds:max-w-full ds:flex-col ds:gap-[var(--spacing-sm)] ds:text-[color:var(--foreground)]"
1634
- ), Jo = ge(
1634
+ ), Jo = he(
1635
1635
  "ds:flex ds:flex-wrap ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]"
1636
- ), Qo = ge(
1636
+ ), Qo = he(
1637
1637
  [
1638
1638
  "ds:relative ds:max-w-full ds:overflow-auto ds:overscroll-contain",
1639
1639
  "ds:max-h-[var(--heatmap-max-block-size)]",
@@ -1642,7 +1642,7 @@ const Xt = (e, t) => `${e}-${Math.min(9, Math.max(0, Math.round(t)))}`, Kn = {
1642
1642
  // row-header column. The sizes are measured and set on this element.
1643
1643
  "ds:scroll-pt-[var(--heatmap-sticky-block-start)] ds:scroll-pb-[var(--heatmap-sticky-block-end)] ds:scroll-ps-[var(--heatmap-sticky-inline-start)]"
1644
1644
  ].join(" ")
1645
- ), Xo = ge(
1645
+ ), Xo = he(
1646
1646
  // Focusable only to hold focus during a retry; not a control, so no ring.
1647
1647
  "ds:min-w-0 ds:max-w-full ds:outline-none",
1648
1648
  {
@@ -1654,7 +1654,7 @@ const Xt = (e, t) => `${e}-${Math.min(9, Math.max(0, Math.round(t)))}`, Kn = {
1654
1654
  },
1655
1655
  defaultVariants: { capped: !1 }
1656
1656
  }
1657
- ), Zo = ge(
1657
+ ), Zo = he(
1658
1658
  [
1659
1659
  "ds:grid ds:w-max ds:min-w-full",
1660
1660
  "ds:[grid-template-rows:auto] ds:auto-rows-[var(--heatmap-row-track)]",
@@ -1688,7 +1688,7 @@ const Xt = (e, t) => `${e}-${Math.min(9, Math.max(0, Math.round(t)))}`, Kn = {
1688
1688
  totalsColumn: !1
1689
1689
  }
1690
1690
  }
1691
- ), Ot = ge(
1691
+ ), Kt = he(
1692
1692
  "ds:col-span-full ds:grid ds:grid-cols-subgrid",
1693
1693
  {
1694
1694
  variants: {
@@ -1704,7 +1704,7 @@ const Xt = (e, t) => `${e}-${Math.min(9, Math.max(0, Math.round(t)))}`, Kn = {
1704
1704
  },
1705
1705
  defaultVariants: { position: "body" }
1706
1706
  }
1707
- ), at = ge("ds:pointer-events-none", {
1707
+ ), rt = he("ds:pointer-events-none", {
1708
1708
  variants: {
1709
1709
  axis: {
1710
1710
  "row-lead": "ds:col-span-full ds:row-span-[var(--heatmap-row-lead)]",
@@ -1717,7 +1717,7 @@ const Xt = (e, t) => `${e}-${Math.min(9, Math.max(0, Math.round(t)))}`, Kn = {
1717
1717
  "col-tail": "ds:col-span-[var(--heatmap-col-tail)]"
1718
1718
  }
1719
1719
  }
1720
- }), Fn = "ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none ds:data-[highlighted=true]:bg-[var(--muted)] ds:data-[highlighted=true]:text-[color:var(--foreground)]", Vt = ge(
1720
+ }), Fn = "ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none ds:data-[highlighted=true]:bg-[var(--muted)] ds:data-[highlighted=true]:text-[color:var(--foreground)]", Vt = he(
1721
1721
  [
1722
1722
  "ds:flex ds:min-w-0 ds:items-end ds:justify-center ds:text-center",
1723
1723
  "ds:rounded-[var(--radius-sm)] ds:px-[var(--spacing-2xs)] ds:py-[var(--spacing-xs)]",
@@ -1734,7 +1734,7 @@ const Xt = (e, t) => `${e}-${Math.min(9, Math.max(0, Math.round(t)))}`, Kn = {
1734
1734
  },
1735
1735
  defaultVariants: { corner: !1 }
1736
1736
  }
1737
- ), Zt = ge(
1737
+ ), Zt = he(
1738
1738
  [
1739
1739
  "ds:sticky ds:start-0 ds:z-[var(--z-sticky)] ds:flex ds:min-w-0 ds:items-center",
1740
1740
  "ds:max-w-[calc(var(--spacing-2xl)*4)] ds:gap-[var(--spacing-xs)]",
@@ -1765,7 +1765,7 @@ const Xt = (e, t) => `${e}-${Math.min(9, Math.max(0, Math.round(t)))}`, Kn = {
1765
1765
  },
1766
1766
  defaultVariants: { kind: "data", virtualised: !1 }
1767
1767
  }
1768
- ), bn = ge("ds:min-w-0", {
1768
+ ), bn = he("ds:min-w-0", {
1769
1769
  variants: {
1770
1770
  virtualised: {
1771
1771
  true: "ds:overflow-hidden ds:text-ellipsis",
@@ -1773,7 +1773,7 @@ const Xt = (e, t) => `${e}-${Math.min(9, Math.max(0, Math.round(t)))}`, Kn = {
1773
1773
  }
1774
1774
  },
1775
1775
  defaultVariants: { virtualised: !1 }
1776
- }), Rt = ge(
1776
+ }), Ct = he(
1777
1777
  [
1778
1778
  "ds:relative ds:flex ds:min-w-0 ds:items-center ds:justify-center",
1779
1779
  "ds:min-h-[var(--heatmap-cell-block)] ds:overflow-hidden ds:px-[var(--spacing-2xs)]",
@@ -1796,9 +1796,9 @@ const Xt = (e, t) => `${e}-${Math.min(9, Math.max(0, Math.round(t)))}`, Kn = {
1796
1796
  },
1797
1797
  defaultVariants: { tone: "empty", interactive: !1 }
1798
1798
  }
1799
- ), ea = ge(
1799
+ ), ea = he(
1800
1800
  "ds:flex ds:min-w-0 ds:flex-wrap ds:items-center ds:gap-x-[var(--spacing-md)] ds:gap-y-[var(--spacing-xs)] type-meta ds:text-[color:var(--muted-foreground)]"
1801
- ), ta = ge(
1801
+ ), ta = he(
1802
1802
  "ds:flex ds:w-[calc(var(--spacing-xl)*6)] ds:min-w-0 ds:max-w-full ds:shrink ds:items-stretch",
1803
1803
  {
1804
1804
  variants: {
@@ -1809,7 +1809,7 @@ const Xt = (e, t) => `${e}-${Math.min(9, Math.max(0, Math.round(t)))}`, Kn = {
1809
1809
  },
1810
1810
  defaultVariants: { variant: "stepped" }
1811
1811
  }
1812
- ), tt = ge(
1812
+ ), nt = he(
1813
1813
  "ds:inline-block ds:forced-colors:[forced-color-adjust:none]",
1814
1814
  {
1815
1815
  variants: {
@@ -1823,42 +1823,42 @@ const Xt = (e, t) => `${e}-${Math.min(9, Math.max(0, Math.round(t)))}`, Kn = {
1823
1823
  },
1824
1824
  defaultVariants: { tone: "empty", shape: "key" }
1825
1825
  }
1826
- ), zn = "", Ct = (e, t) => `${e}${zn}${String(t)}`, Et = (e) => {
1826
+ ), zn = "", Ft = (e, t) => `${e}${zn}${String(t)}`, Ht = (e) => {
1827
1827
  const t = e.indexOf(zn);
1828
1828
  return [e.slice(0, t), e.slice(t + 1)];
1829
1829
  };
1830
1830
  function na(e, t, n) {
1831
- return e.status === "low-sample" ? "low-sample" : e.status === "empty" || e.value === null ? "empty" : Ro(t, e.value) ? "midpoint" : Xt(n, t.stepOf(e.value));
1831
+ return e.status === "low-sample" ? "low-sample" : e.status === "empty" || e.value === null ? "empty" : To(t, e.value) ? "midpoint" : Xt(n, t.stepOf(e.value));
1832
1832
  }
1833
1833
  const oa = { value: null, status: "empty" }, en = (e) => e.status === "value" ? "aggregate" : e.status;
1834
- function Ht(e, t) {
1834
+ function zt(e, t) {
1835
1835
  const n = [];
1836
1836
  return e.lead > 0 && n.push(
1837
- /* @__PURE__ */ C(
1837
+ /* @__PURE__ */ H(
1838
1838
  "div",
1839
1839
  {
1840
1840
  "aria-hidden": "true",
1841
- className: at({ axis: "col-lead" })
1841
+ className: rt({ axis: "col-lead" })
1842
1842
  },
1843
1843
  "lead"
1844
1844
  )
1845
- ), e.indexes.forEach((o, s) => {
1846
- e.middle > 0 && s === e.middleAfter && n.push(
1847
- /* @__PURE__ */ C(
1845
+ ), e.indexes.forEach((o, r) => {
1846
+ e.middle > 0 && r === e.middleAfter && n.push(
1847
+ /* @__PURE__ */ H(
1848
1848
  "div",
1849
1849
  {
1850
1850
  "aria-hidden": "true",
1851
- className: at({ axis: "col-middle" })
1851
+ className: rt({ axis: "col-middle" })
1852
1852
  },
1853
1853
  "middle"
1854
1854
  )
1855
1855
  ), n.push(t(o));
1856
1856
  }), e.tail > 0 && n.push(
1857
- /* @__PURE__ */ C(
1857
+ /* @__PURE__ */ H(
1858
1858
  "div",
1859
1859
  {
1860
1860
  "aria-hidden": "true",
1861
- className: at({ axis: "col-tail" })
1861
+ className: rt({ axis: "col-tail" })
1862
1862
  },
1863
1863
  "tail"
1864
1864
  )
@@ -1868,81 +1868,81 @@ const aa = jn(function({
1868
1868
  ctx: t,
1869
1869
  row: n,
1870
1870
  ariaRowIndex: o,
1871
- highlighted: s,
1871
+ highlighted: r,
1872
1872
  activeCol: a,
1873
- tooltipCol: i,
1873
+ tooltipCol: s,
1874
1874
  selectedCols: u
1875
1875
  }) {
1876
- var O, D;
1876
+ var R, D;
1877
1877
  const d = t.columns.length, l = X(
1878
1878
  () => new Set(u === "" ? [] : u.split(",").map(Number)),
1879
1879
  [u]
1880
1880
  );
1881
1881
  if (n.kind === "group") {
1882
- const y = t.describer.groupLabel(n.groupId), R = t.groupIds.get(n.groupId), g = `${t.idBase}-label-${o}`, T = ((O = t.totals) == null ? void 0 : O.groupColumns.get(n.groupId)) ?? [], L = (D = t.totals) == null ? void 0 : D.groups.get(n.groupId), G = (z, Y, E, A) => {
1883
- const K = z ?? oa, F = E(K);
1884
- return /* @__PURE__ */ le(
1882
+ const k = t.describer.groupLabel(n.groupId), E = t.groupIds.get(n.groupId), h = `${t.idBase}-label-${o}`, O = ((R = t.totals) == null ? void 0 : R.groupColumns.get(n.groupId)) ?? [], N = (D = t.totals) == null ? void 0 : D.groups.get(n.groupId), V = ($, W, _, A) => {
1883
+ const z = $ ?? oa, q = _(z);
1884
+ return /* @__PURE__ */ ce(
1885
1885
  "div",
1886
1886
  {
1887
1887
  role: "gridcell",
1888
- "aria-colindex": Y + 2,
1888
+ "aria-colindex": W + 2,
1889
1889
  "aria-expanded": !n.collapsed,
1890
- "aria-label": F,
1891
- tabIndex: a === Y ? 0 : -1,
1892
- "data-heatmap-group-id": R,
1893
- className: Rt({
1894
- tone: en(K),
1890
+ "aria-label": q,
1891
+ tabIndex: a === W ? 0 : -1,
1892
+ "data-heatmap-group-id": E,
1893
+ className: Ct({
1894
+ tone: en(z),
1895
1895
  interactive: !0
1896
1896
  }),
1897
1897
  children: [
1898
- t.describer.visibleText(K),
1899
- A && i === Y ? /* @__PURE__ */ C(
1898
+ t.describer.visibleText(z),
1899
+ A && s === W ? /* @__PURE__ */ H(
1900
1900
  mn,
1901
1901
  {
1902
- label: F,
1902
+ label: q,
1903
1903
  onOpenChange: t.onTooltipOpenChange
1904
1904
  }
1905
1905
  ) : null
1906
1906
  ]
1907
1907
  },
1908
- Y
1908
+ W
1909
1909
  );
1910
- }, J = t.describer.groupRowText(
1911
- y,
1910
+ }, Z = t.describer.groupRowText(
1911
+ k,
1912
1912
  t.groupColumnMethod
1913
1913
  );
1914
- return /* @__PURE__ */ le(
1914
+ return /* @__PURE__ */ ce(
1915
1915
  "div",
1916
1916
  {
1917
1917
  role: "row",
1918
1918
  "aria-rowindex": o,
1919
1919
  "data-heatmap-body-row": "",
1920
- "data-heatmap-group-id": R,
1921
- className: Ot({ position: "body" }),
1920
+ "data-heatmap-group-id": E,
1921
+ className: Kt({ position: "body" }),
1922
1922
  children: [
1923
- /* @__PURE__ */ le(
1923
+ /* @__PURE__ */ ce(
1924
1924
  "div",
1925
1925
  {
1926
1926
  role: "rowheader",
1927
1927
  "aria-colindex": 1,
1928
- "aria-labelledby": g,
1929
- "data-highlighted": s,
1928
+ "aria-labelledby": h,
1929
+ "data-highlighted": r,
1930
1930
  className: Zt({
1931
1931
  kind: "group",
1932
1932
  virtualised: t.virtualised
1933
1933
  }),
1934
1934
  children: [
1935
- /* @__PURE__ */ C(
1935
+ /* @__PURE__ */ H(
1936
1936
  "button",
1937
1937
  {
1938
1938
  type: "button",
1939
1939
  tabIndex: -1,
1940
1940
  "aria-expanded": !n.collapsed,
1941
- "aria-label": n.collapsed ? t.expandLabel(y) : t.collapseLabel(y),
1942
- onMouseDown: (z) => z.preventDefault(),
1941
+ "aria-label": n.collapsed ? t.expandLabel(k) : t.collapseLabel(k),
1942
+ onMouseDown: ($) => $.preventDefault(),
1943
1943
  onClick: () => t.onToggleGroup(n.groupId),
1944
1944
  className: "ds:inline-flex ds:size-[var(--spacing-lg)] ds:shrink-0 ds:cursor-pointer ds:items-center ds:justify-center ds:rounded-[var(--radius-sm)] ds:bg-transparent ds:text-[color:inherit] ds:hover:bg-[var(--muted)] ds:focus-visible:outline-solid ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-ring ds:forced-colors:focus-visible:outline-[Highlight]",
1945
- children: /* @__PURE__ */ C(
1945
+ children: /* @__PURE__ */ H(
1946
1946
  eo,
1947
1947
  {
1948
1948
  "aria-hidden": "true",
@@ -1954,39 +1954,39 @@ const aa = jn(function({
1954
1954
  )
1955
1955
  }
1956
1956
  ),
1957
- /* @__PURE__ */ C(
1957
+ /* @__PURE__ */ H(
1958
1958
  "span",
1959
1959
  {
1960
- id: g,
1960
+ id: h,
1961
1961
  className: bn({
1962
1962
  virtualised: t.virtualised
1963
1963
  }),
1964
- children: y
1964
+ children: k
1965
1965
  }
1966
1966
  )
1967
1967
  ]
1968
1968
  }
1969
1969
  ),
1970
- Ht(
1970
+ zt(
1971
1971
  t.colWindow,
1972
- (z) => G(
1973
- T[z],
1974
- z,
1975
- (Y) => t.describer.sentence(
1976
- J,
1977
- t.describer.columnLabel(t.columns[z]),
1978
- Y
1972
+ ($) => V(
1973
+ O[$],
1974
+ $,
1975
+ (W) => t.describer.sentence(
1976
+ Z,
1977
+ t.describer.columnLabel(t.columns[$]),
1978
+ W
1979
1979
  ),
1980
1980
  !0
1981
1981
  )
1982
1982
  ),
1983
- t.rowTotals ? G(
1984
- L,
1983
+ t.rowTotals ? V(
1984
+ N,
1985
1985
  d,
1986
- (z) => t.describer.sentence(
1987
- y,
1986
+ ($) => t.describer.sentence(
1987
+ k,
1988
1988
  t.describer.methodLabel(t.rowTotals || "mean"),
1989
- z
1989
+ $
1990
1990
  ),
1991
1991
  !1
1992
1992
  ) : null
@@ -1994,45 +1994,45 @@ const aa = jn(function({
1994
1994
  }
1995
1995
  );
1996
1996
  }
1997
- const v = n.rowIndex, m = t.rows[v], w = t.describer.rowLabel(m), b = t.matrix[v], p = (y) => {
1998
- const R = b[y], g = t.columns[y], T = l.has(y);
1999
- return /* @__PURE__ */ le(
1997
+ const v = n.rowIndex, m = t.rows[v], w = t.describer.rowLabel(m), y = t.matrix[v], p = (k) => {
1998
+ const E = y[k], h = t.columns[k], O = l.has(k);
1999
+ return /* @__PURE__ */ ce(
2000
2000
  "div",
2001
2001
  {
2002
2002
  role: "gridcell",
2003
- "aria-colindex": y + 2,
2003
+ "aria-colindex": k + 2,
2004
2004
  "aria-label": t.describer.sentence(
2005
2005
  w,
2006
- t.describer.columnLabel(g),
2007
- R
2006
+ t.describer.columnLabel(h),
2007
+ E
2008
2008
  ),
2009
- "aria-describedby": a === y ? t.describedBy : void 0,
2010
- "aria-selected": t.selectable ? T : void 0,
2011
- tabIndex: a === y ? 0 : -1,
2012
- "data-heatmap-cell-id": `${m.id}:${String(g.id)}`,
2013
- "data-status": R.status,
2014
- className: Rt({
2015
- tone: na(R, t.scale, t.palette),
2009
+ "aria-describedby": a === k ? t.describedBy : void 0,
2010
+ "aria-selected": t.selectable ? O : void 0,
2011
+ tabIndex: a === k ? 0 : -1,
2012
+ "data-heatmap-cell-id": `${m.id}:${String(h.id)}`,
2013
+ "data-status": E.status,
2014
+ className: Ct({
2015
+ tone: na(E, t.scale, t.palette),
2016
2016
  interactive: t.interactive
2017
2017
  }),
2018
2018
  children: [
2019
- t.showValues || R.status === "empty" ? t.describer.visibleText(R) : null,
2020
- i === y ? /* @__PURE__ */ C(
2019
+ t.showValues || E.status === "empty" ? t.describer.visibleText(E) : null,
2020
+ s === k ? /* @__PURE__ */ H(
2021
2021
  mn,
2022
2022
  {
2023
- label: t.tooltipText(t.cellInfo(v, y)),
2023
+ label: t.tooltipText(t.cellInfo(v, k)),
2024
2024
  onOpenChange: t.onTooltipOpenChange
2025
2025
  }
2026
2026
  ) : null
2027
2027
  ]
2028
2028
  },
2029
- y
2029
+ k
2030
2030
  );
2031
2031
  };
2032
- let N = null;
2032
+ let S = null;
2033
2033
  if (t.rowTotals && t.totals) {
2034
- const y = t.totals.rows[v];
2035
- N = /* @__PURE__ */ C(
2034
+ const k = t.totals.rows[v];
2035
+ S = /* @__PURE__ */ H(
2036
2036
  "div",
2037
2037
  {
2038
2038
  role: "gridcell",
@@ -2040,34 +2040,34 @@ const aa = jn(function({
2040
2040
  "aria-label": t.describer.sentence(
2041
2041
  w,
2042
2042
  t.describer.methodLabel(t.rowTotals),
2043
- y
2043
+ k
2044
2044
  ),
2045
2045
  tabIndex: a === d ? 0 : -1,
2046
- className: Rt({ tone: en(y) }),
2047
- children: t.describer.visibleText(y)
2046
+ className: Ct({ tone: en(k) }),
2047
+ children: t.describer.visibleText(k)
2048
2048
  }
2049
2049
  );
2050
2050
  }
2051
- return /* @__PURE__ */ le(
2051
+ return /* @__PURE__ */ ce(
2052
2052
  "div",
2053
2053
  {
2054
2054
  role: "row",
2055
2055
  "aria-rowindex": o,
2056
2056
  "data-heatmap-body-row": "",
2057
2057
  "data-heatmap-row-id": m.id,
2058
- className: Ot({ position: "body" }),
2058
+ className: Kt({ position: "body" }),
2059
2059
  children: [
2060
- /* @__PURE__ */ C(
2060
+ /* @__PURE__ */ H(
2061
2061
  "div",
2062
2062
  {
2063
2063
  role: "rowheader",
2064
2064
  "aria-colindex": 1,
2065
- "data-highlighted": s,
2065
+ "data-highlighted": r,
2066
2066
  className: Zt({
2067
2067
  kind: "data",
2068
2068
  virtualised: t.virtualised
2069
2069
  }),
2070
- children: /* @__PURE__ */ C(
2070
+ children: /* @__PURE__ */ H(
2071
2071
  "span",
2072
2072
  {
2073
2073
  className: bn({ virtualised: t.virtualised }),
@@ -2076,8 +2076,8 @@ const aa = jn(function({
2076
2076
  )
2077
2077
  }
2078
2078
  ),
2079
- Ht(t.colWindow, p),
2080
- N
2079
+ zt(t.colWindow, p),
2080
+ S
2081
2081
  ]
2082
2082
  }
2083
2083
  );
@@ -2100,320 +2100,320 @@ function ra(e) {
2100
2100
  title: t,
2101
2101
  rowsLabel: n,
2102
2102
  rows: o,
2103
- columns: s,
2103
+ columns: r,
2104
2104
  matrix: a,
2105
- body: i,
2105
+ body: s,
2106
2106
  scale: u,
2107
2107
  palette: d,
2108
2108
  describer: l,
2109
2109
  showValues: v,
2110
2110
  totals: m,
2111
2111
  rowTotals: w,
2112
- columnTotals: b,
2112
+ columnTotals: y,
2113
2113
  groupColumnMethod: p,
2114
- groupIds: N,
2115
- selectionMode: O,
2114
+ groupIds: S,
2115
+ selectionMode: R,
2116
2116
  selected: D,
2117
- columnIndexOfKey: y,
2118
- interactive: R,
2119
- virtualised: g,
2120
- size: T,
2121
- density: L,
2122
- cellInfo: G,
2123
- tooltipText: J,
2124
- describeFocused: z,
2125
- onActivate: Y,
2126
- onRange: E,
2117
+ columnIndexOfKey: k,
2118
+ interactive: E,
2119
+ virtualised: h,
2120
+ size: O,
2121
+ density: N,
2122
+ cellInfo: V,
2123
+ tooltipText: Z,
2124
+ describeFocused: $,
2125
+ onActivate: W,
2126
+ onRange: _,
2127
2127
  onToggleGroup: A
2128
- } = e, { t: K } = wt("ui"), F = Pn(), $ = ie(null), c = ie(null), I = ie(null), P = ie(null), H = s.length, Q = H + (w ? 1 : 0), te = !!(b && m), x = X(
2128
+ } = e, { t: z } = wt("ui"), q = Pn(), B = le(null), c = le(null), x = le(null), P = le(null), K = r.length, J = K + (w ? 1 : 0), ne = !!(y && m), I = X(
2129
2129
  () => [
2130
- ...i.map((f) => f.key),
2131
- ...te ? [At] : []
2130
+ ...s.map((f) => f.key),
2131
+ ...ne ? [Et] : []
2132
2132
  ],
2133
- [i, te]
2134
- ), _ = X(() => {
2133
+ [s, ne]
2134
+ ), G = X(() => {
2135
2135
  const f = /* @__PURE__ */ new Map();
2136
- return x.forEach((r, h) => f.set(r, h)), f;
2137
- }, [x]), [W, V] = we(() => ({
2138
- rowKey: x[0] ?? At,
2136
+ return I.forEach((b, i) => f.set(b, i)), f;
2137
+ }, [I]), [C, j] = ve(() => ({
2138
+ rowKey: I[0] ?? Et,
2139
2139
  col: 0
2140
- })), q = (() => {
2141
- const f = _.get(W.rowKey);
2140
+ })), ee = (() => {
2141
+ const f = G.get(C.rowKey);
2142
2142
  if (f !== void 0) return f;
2143
- const r = o.find((M) => `d:${M.id}` === W.rowKey);
2144
- return ((r == null ? void 0 : r.group) === void 0 ? void 0 : _.get(`g:${r.group}`)) ?? 0;
2145
- })(), B = Math.min(
2146
- Math.max(0, W.col),
2147
- Math.max(0, Q - 1)
2148
- ), re = x[q], ne = ie(!1), [Me, Ae] = we(!1), be = ie(!1), Z = ie("pointer"), [pe, je] = we(null), qe = ie(null), [bt, Oe] = we(!1), We = ae((f) => {
2149
- const r = qe.current;
2150
- r === f || r && f && r.rowKey === f.rowKey && r.col === f.col || (qe.current = f, je(f), Oe(!1));
2151
- }, []), me = pe ?? (Me && re ? { rowKey: re, col: B } : null), Ce = bt ? null : pe ?? (Me && Z.current === "keyboard" && re ? { rowKey: re, col: B } : null), [fe, Dt] = we($t), ve = ie(fe);
2152
- ve.current = fe;
2153
- const st = ae(() => {
2154
- var ce, Ne;
2155
- const f = $.current, r = c.current;
2156
- if (!f || !r) return;
2157
- const h = window.getComputedStyle(r), M = parseFloat(h.rowGap) || 0, S = parseFloat(h.columnGap) || 0, k = h.gridTemplateColumns.split(" ").map((Ze) => parseFloat(Ze)).filter((Ze) => Number.isFinite(Ze)), U = ((ce = I.current) == null ? void 0 : ce.getBoundingClientRect().height) ?? 0, j = r.querySelector(
2143
+ const b = o.find((g) => `d:${g.id}` === C.rowKey);
2144
+ return ((b == null ? void 0 : b.group) === void 0 ? void 0 : G.get(`g:${b.group}`)) ?? 0;
2145
+ })(), L = Math.min(
2146
+ Math.max(0, C.col),
2147
+ Math.max(0, J - 1)
2148
+ ), oe = I[ee], ie = le(!1), [me, xe] = ve(!1), Ke = le(!1), de = le("pointer"), [re, Re] = ve(null), Fe = le(null), [bt, $e] = ve(!1), Pe = ae((f) => {
2149
+ const b = Fe.current;
2150
+ b === f || b && f && b.rowKey === f.rowKey && b.col === f.col || (Fe.current = f, Re(f), $e(!1));
2151
+ }, []), we = re ?? (me && oe ? { rowKey: oe, col: L } : null), Me = bt ? null : re ?? (me && de.current === "keyboard" && oe ? { rowKey: oe, col: L } : null), [Te, Ee] = ve($t), je = le(Te);
2152
+ je.current = Te;
2153
+ const Ie = ae(() => {
2154
+ var se, Ve;
2155
+ const f = B.current, b = c.current;
2156
+ if (!f || !b) return;
2157
+ const i = window.getComputedStyle(b), g = parseFloat(i.rowGap) || 0, M = parseFloat(i.columnGap) || 0, F = i.gridTemplateColumns.split(" ").map((ge) => parseFloat(ge)).filter((ge) => Number.isFinite(ge)), T = ((se = x.current) == null ? void 0 : se.getBoundingClientRect().height) ?? 0, U = b.querySelector(
2158
2158
  "[data-heatmap-body-row]"
2159
- ), oe = (j == null ? void 0 : j.getBoundingClientRect().height) ?? 0, se = {
2160
- headerBlock: U + M,
2161
- footerBlock: ((Ne = P.current) == null ? void 0 : Ne.getBoundingClientRect().height) ?? 0,
2162
- rowPitch: (oe || U || $t.rowPitch) + M,
2163
- leadInline: (k[0] ?? 0) + S,
2164
- colPitch: (k[1] ?? $t.colPitch) + S,
2159
+ ), Y = (U == null ? void 0 : U.getBoundingClientRect().height) ?? 0, Q = {
2160
+ headerBlock: T + g,
2161
+ footerBlock: ((Ve = P.current) == null ? void 0 : Ve.getBoundingClientRect().height) ?? 0,
2162
+ rowPitch: (Y || T || $t.rowPitch) + g,
2163
+ leadInline: (F[0] ?? 0) + M,
2164
+ colPitch: (F[1] ?? $t.colPitch) + M,
2165
2165
  viewportBlock: f.clientHeight,
2166
2166
  viewportInline: f.clientWidth
2167
- }, ue = ve.current;
2168
- Object.keys(se).some(
2169
- (Ze) => Math.abs(se[Ze] - ue[Ze]) > 0.5
2170
- ) && Dt(se);
2167
+ }, pe = je.current;
2168
+ Object.keys(Q).some(
2169
+ (ge) => Math.abs(Q[ge] - pe[ge]) > 0.5
2170
+ ) && Ee(Q);
2171
2171
  }, []);
2172
- nt(() => {
2173
- st();
2174
- const f = $.current;
2172
+ ot(() => {
2173
+ Ie();
2174
+ const f = B.current;
2175
2175
  if (!f || typeof ResizeObserver > "u") return;
2176
- const r = new ResizeObserver(() => st());
2177
- return r.observe(f), c.current && r.observe(c.current), () => r.disconnect();
2178
- }, [st, i.length, H, T, L]);
2179
- const it = re === At ? null : q, yt = B < H ? B : null, lt = ae(() => {
2180
- if (!g)
2181
- return { rows: _t(i.length), cols: _t(H) };
2182
- const f = $.current, r = ve.current, h = fn({
2176
+ const b = new ResizeObserver(() => Ie());
2177
+ return b.observe(f), c.current && b.observe(c.current), () => b.disconnect();
2178
+ }, [Ie, s.length, K, O, N]);
2179
+ const yt = oe === Et ? null : ee, it = L < K ? L : null, lt = ae(() => {
2180
+ if (!h)
2181
+ return { rows: Lt(s.length), cols: Lt(K) };
2182
+ const f = B.current, b = je.current, i = fn({
2183
2183
  offset: (f == null ? void 0 : f.scrollTop) ?? 0,
2184
- viewport: r.viewportBlock,
2185
- lead: r.headerBlock,
2186
- pitch: r.rowPitch,
2187
- count: i.length
2188
- }), M = fn({
2184
+ viewport: b.viewportBlock,
2185
+ lead: b.headerBlock,
2186
+ pitch: b.rowPitch,
2187
+ count: s.length
2188
+ }), g = fn({
2189
2189
  offset: (f == null ? void 0 : f.scrollLeft) ?? 0,
2190
- viewport: r.viewportInline,
2191
- lead: r.leadInline,
2192
- pitch: r.colPitch,
2193
- count: H
2190
+ viewport: b.viewportInline,
2191
+ lead: b.leadInline,
2192
+ pitch: b.colPitch,
2193
+ count: K
2194
2194
  });
2195
2195
  return {
2196
- rows: hn(h, i.length, it),
2197
- cols: hn(M, H, yt)
2196
+ rows: hn(i, s.length, yt),
2197
+ cols: hn(g, K, it)
2198
2198
  };
2199
- }, [g, i.length, H, it, yt]), [De, Kt] = we(lt), _e = X(() => _t(i.length), [i.length]), xt = X(() => _t(H), [H]), ye = X(
2200
- () => g ? {
2201
- rows: gn(De.rows, i.length),
2202
- cols: gn(De.cols, H)
2203
- } : { rows: _e, cols: xt },
2204
- [g, De, i.length, H, _e, xt]
2205
- ), Ue = ae(() => {
2199
+ }, [h, s.length, K, yt, it]), [ct, dt] = ve(lt), xt = X(() => Lt(s.length), [s.length]), Se = X(() => Lt(K), [K]), Ne = X(
2200
+ () => h ? {
2201
+ rows: gn(ct.rows, s.length),
2202
+ cols: gn(ct.cols, K)
2203
+ } : { rows: xt, cols: Se },
2204
+ [h, ct, s.length, K, xt, Se]
2205
+ ), ze = ae(() => {
2206
2206
  const f = lt();
2207
- Kt(
2208
- (r) => vn(r.rows, f.rows) && vn(r.cols, f.cols) ? r : f
2207
+ dt(
2208
+ (b) => vn(b.rows, f.rows) && vn(b.cols, f.cols) ? b : f
2209
2209
  );
2210
2210
  }, [lt]);
2211
- nt(() => {
2212
- Ue();
2213
- }, [Ue, fe]);
2214
- const Ke = ie(0), It = ae(() => {
2215
- !g || Ke.current || (Ke.current = window.requestAnimationFrame(() => {
2216
- Ke.current = 0, Ue();
2211
+ ot(() => {
2212
+ ze();
2213
+ }, [ze, Te]);
2214
+ const We = le(0), It = ae(() => {
2215
+ !h || We.current || (We.current = window.requestAnimationFrame(() => {
2216
+ We.current = 0, ze();
2217
2217
  }));
2218
- }, [g, Ue]);
2219
- gt(() => () => window.cancelAnimationFrame(Ke.current), []), nt(() => {
2220
- re !== void 0 && re !== W.rowKey && V({ rowKey: re, col: B });
2221
- }), nt(() => {
2222
- if (!be.current || ne.current) return;
2218
+ }, [h, ze]);
2219
+ gt(() => () => window.cancelAnimationFrame(We.current), []), ot(() => {
2220
+ oe !== void 0 && oe !== C.rowKey && j({ rowKey: oe, col: L });
2221
+ }), ot(() => {
2222
+ if (!Ke.current || ie.current) return;
2223
2223
  const f = document.activeElement;
2224
- f && f !== document.body && f.isConnected || (ne.current = !0);
2224
+ f && f !== document.body && f.isConnected || (ie.current = !0);
2225
2225
  });
2226
- const xe = ae(
2227
- (f, r) => {
2228
- var h;
2229
- return ((h = c.current) == null ? void 0 : h.querySelector(
2230
- `[role="row"][aria-rowindex="${f + 2}"] > [aria-colindex="${r + 2}"]`
2226
+ const kt = ae(
2227
+ (f, b) => {
2228
+ var i;
2229
+ return ((i = c.current) == null ? void 0 : i.querySelector(
2230
+ `[role="row"][aria-rowindex="${f + 2}"] > [aria-colindex="${b + 2}"]`
2231
2231
  )) ?? null;
2232
2232
  },
2233
2233
  []
2234
2234
  );
2235
- nt(() => {
2236
- var r;
2237
- if (!ne.current) return;
2238
- const f = xe(q, B);
2239
- f && (ne.current = !1, f.focus({ preventScroll: !0 }), (r = f.scrollIntoView) == null || r.call(f, { block: "nearest", inline: "nearest" }));
2235
+ ot(() => {
2236
+ var b;
2237
+ if (!ie.current) return;
2238
+ const f = kt(ee, L);
2239
+ f && (ie.current = !1, f.focus({ preventScroll: !0 }), (b = f.scrollIntoView) == null || b.call(f, { block: "nearest", inline: "nearest" }));
2240
2240
  });
2241
- const Ye = () => c.current ? window.getComputedStyle(c.current).direction === "rtl" : !1, de = ie(null), Fe = (f) => {
2242
- const r = i[f];
2243
- return r && r.kind === "data" ? r.rowIndex : null;
2244
- }, Ie = ie(!1), Se = (f, r) => {
2245
- const h = Math.max(0, Math.min(x.length - 1, f)), M = Math.max(0, Math.min(Q - 1, r));
2246
- return ne.current = !0, Oe(!1), V({ rowKey: x[h], col: M }), { row: h, col: M };
2247
- }, ct = (f, r, h) => {
2248
- const M = i[f];
2249
- if (M) {
2250
- if (M.kind === "group") {
2251
- A(M.groupId);
2241
+ const be = () => c.current ? window.getComputedStyle(c.current).direction === "rtl" : !1, ue = le(null), Be = (f) => {
2242
+ const b = s[f];
2243
+ return b && b.kind === "data" ? b.rowIndex : null;
2244
+ }, Le = le(!1), Oe = (f, b) => {
2245
+ const i = Math.max(0, Math.min(I.length - 1, f)), g = Math.max(0, Math.min(J - 1, b));
2246
+ return ie.current = !0, $e(!1), j({ rowKey: I[i], col: g }), { row: i, col: g };
2247
+ }, ke = (f, b, i) => {
2248
+ const g = s[f];
2249
+ if (g) {
2250
+ if (g.kind === "group") {
2251
+ A(g.groupId);
2252
2252
  return;
2253
2253
  }
2254
- if (!(r >= H)) {
2255
- if (O === "range" && h && de.current) {
2256
- E(de.current, { rowIndex: M.rowIndex, col: r });
2254
+ if (!(b >= K)) {
2255
+ if (R === "range" && i && ue.current) {
2256
+ _(ue.current, { rowIndex: g.rowIndex, col: b });
2257
2257
  return;
2258
2258
  }
2259
- de.current = { rowIndex: M.rowIndex, col: r }, Y(M.rowIndex, r, !0);
2259
+ ue.current = { rowIndex: g.rowIndex, col: b }, W(g.rowIndex, b, !0);
2260
2260
  }
2261
2261
  }
2262
- }, ze = (f) => {
2262
+ }, Bt = (f) => {
2263
2263
  if (f.target instanceof Element && f.target.closest("button"))
2264
2264
  return;
2265
- Z.current = "keyboard";
2266
- const r = x.length - 1, h = Q - 1, M = Ye() ? -1 : 1;
2267
- let S = q, k = B;
2268
- const U = f.ctrlKey || f.metaKey;
2265
+ de.current = "keyboard";
2266
+ const b = I.length - 1, i = J - 1, g = be() ? -1 : 1;
2267
+ let M = ee, F = L;
2268
+ const T = f.ctrlKey || f.metaKey;
2269
2269
  switch (f.key) {
2270
2270
  case "ArrowRight":
2271
- k += M;
2271
+ F += g;
2272
2272
  break;
2273
2273
  case "ArrowLeft":
2274
- k -= M;
2274
+ F -= g;
2275
2275
  break;
2276
2276
  case "ArrowDown":
2277
- S += 1;
2277
+ M += 1;
2278
2278
  break;
2279
2279
  case "ArrowUp":
2280
- S -= 1;
2280
+ M -= 1;
2281
2281
  break;
2282
2282
  case "Home":
2283
- k = 0, U && (S = 0);
2283
+ F = 0, T && (M = 0);
2284
2284
  break;
2285
2285
  case "End":
2286
- k = h, U && (S = r);
2286
+ F = i, T && (M = b);
2287
2287
  break;
2288
2288
  case "PageDown": {
2289
- const se = i.findIndex(
2290
- (ce, Ne) => Ne > q && ce.kind === "group"
2289
+ const Q = s.findIndex(
2290
+ (se, Ve) => Ve > ee && se.kind === "group"
2291
2291
  );
2292
- S = i.some((ce) => ce.kind === "group") ? se === -1 ? r : se : q + yn(ve.current);
2292
+ M = s.some((se) => se.kind === "group") ? Q === -1 ? b : Q : ee + yn(je.current);
2293
2293
  break;
2294
2294
  }
2295
2295
  case "PageUp": {
2296
- let se = -1;
2297
- for (let ce = Math.min(q, i.length) - 1; ce >= 0; ce -= 1)
2298
- if (i[ce].kind === "group") {
2299
- se = ce;
2296
+ let Q = -1;
2297
+ for (let se = Math.min(ee, s.length) - 1; se >= 0; se -= 1)
2298
+ if (s[se].kind === "group") {
2299
+ Q = se;
2300
2300
  break;
2301
2301
  }
2302
- S = i.some((ce) => ce.kind === "group") ? se === -1 ? 0 : se : q - yn(ve.current);
2302
+ M = s.some((se) => se.kind === "group") ? Q === -1 ? 0 : Q : ee - yn(je.current);
2303
2303
  break;
2304
2304
  }
2305
2305
  case "Enter":
2306
2306
  case " ":
2307
- f.preventDefault(), ct(q, B, f.shiftKey);
2307
+ f.preventDefault(), ke(ee, L, f.shiftKey);
2308
2308
  return;
2309
2309
  case "Escape":
2310
- Ce && (f.preventDefault(), Oe(!0));
2310
+ Me && (f.preventDefault(), $e(!0));
2311
2311
  return;
2312
2312
  default:
2313
2313
  return;
2314
2314
  }
2315
2315
  f.preventDefault();
2316
- const j = Se(S, k), oe = f.key.startsWith("Arrow");
2317
- if (O === "range" && f.shiftKey && oe) {
2318
- const se = Fe(j.row), ue = de.current ?? (() => {
2319
- const ce = Fe(q);
2320
- return ce === null || B >= H ? null : { rowIndex: ce, col: B };
2316
+ const U = Oe(M, F), Y = f.key.startsWith("Arrow");
2317
+ if (R === "range" && f.shiftKey && Y) {
2318
+ const Q = Be(U.row), pe = ue.current ?? (() => {
2319
+ const se = Be(ee);
2320
+ return se === null || L >= K ? null : { rowIndex: se, col: L };
2321
2321
  })();
2322
- ue && se !== null && j.col < H && (de.current = ue, E(ue, { rowIndex: se, col: j.col }));
2322
+ pe && Q !== null && U.col < K && (ue.current = pe, _(pe, { rowIndex: Q, col: U.col }));
2323
2323
  }
2324
- }, Je = (f) => {
2325
- var k;
2324
+ }, Ce = (f) => {
2325
+ var F;
2326
2326
  if (!(f instanceof Element)) return null;
2327
- const r = f.closest('[role="gridcell"]'), h = r == null ? void 0 : r.parentElement;
2328
- if (!r || !h || !((k = c.current) != null && k.contains(r))) return null;
2329
- const M = Number(h.getAttribute("aria-rowindex")) - 2, S = Number(r.getAttribute("aria-colindex")) - 2;
2330
- return !Number.isInteger(M) || M < 0 || S < 0 ? null : { row: M, col: S };
2331
- }, Be = ie(!1), Ge = ie("mouse"), kt = (f) => {
2332
- if (Z.current = "pointer", Ge.current = f.pointerType, O !== "range" || f.pointerType !== "mouse" || f.button !== 0)
2327
+ const b = f.closest('[role="gridcell"]'), i = b == null ? void 0 : b.parentElement;
2328
+ if (!b || !i || !((F = c.current) != null && F.contains(b))) return null;
2329
+ const g = Number(i.getAttribute("aria-rowindex")) - 2, M = Number(b.getAttribute("aria-colindex")) - 2;
2330
+ return !Number.isInteger(g) || g < 0 || M < 0 ? null : { row: g, col: M };
2331
+ }, Ue = le(!1), Ye = le("mouse"), Je = (f) => {
2332
+ if (de.current = "pointer", Ye.current = f.pointerType, R !== "range" || f.pointerType !== "mouse" || f.button !== 0)
2333
2333
  return;
2334
- const r = Je(f.target);
2335
- if (Ie.current = !1, !r) return;
2336
- const h = Fe(r.row);
2337
- if (h === null || r.col >= H) return;
2338
- if (f.shiftKey && de.current)
2339
- E(de.current, { rowIndex: h, col: r.col });
2334
+ const b = Ce(f.target);
2335
+ if (Le.current = !1, !b) return;
2336
+ const i = Be(b.row);
2337
+ if (i === null || b.col >= K) return;
2338
+ if (f.shiftKey && ue.current)
2339
+ _(ue.current, { rowIndex: i, col: b.col });
2340
2340
  else {
2341
- de.current = { rowIndex: h, col: r.col };
2342
- const S = Ct(o[h].id, s[r.col].id);
2343
- D.size === 1 && D.has(S) ? Ie.current = !0 : E(de.current, de.current);
2341
+ ue.current = { rowIndex: i, col: b.col };
2342
+ const M = Ft(o[i].id, r[b.col].id);
2343
+ D.size === 1 && D.has(M) ? Le.current = !0 : _(ue.current, ue.current);
2344
2344
  }
2345
- Be.current = !0;
2346
- const M = () => {
2347
- Be.current = !1, window.removeEventListener("pointerup", M), window.removeEventListener("pointercancel", M);
2345
+ Ue.current = !0;
2346
+ const g = () => {
2347
+ Ue.current = !1, window.removeEventListener("pointerup", g), window.removeEventListener("pointercancel", g);
2348
2348
  };
2349
- window.addEventListener("pointerup", M), window.addEventListener("pointercancel", M);
2350
- }, Ft = (f) => {
2349
+ window.addEventListener("pointerup", g), window.addEventListener("pointercancel", g);
2350
+ }, Mt = (f) => {
2351
2351
  if (f.pointerType !== "mouse") return;
2352
- const r = Je(f.target);
2353
- if (We(
2354
- r ? { rowKey: x[r.row], col: r.col } : null
2355
- ), Be.current && r && de.current) {
2356
- const h = Fe(r.row);
2357
- h !== null && r.col < H && ((h !== de.current.rowIndex || r.col !== de.current.col) && (Ie.current = !1), Ie.current || E(de.current, { rowIndex: h, col: r.col }));
2352
+ const b = Ce(f.target);
2353
+ if (Pe(
2354
+ b ? { rowKey: I[b.row], col: b.col } : null
2355
+ ), Ue.current && b && ue.current) {
2356
+ const i = Be(b.row);
2357
+ i !== null && b.col < K && ((i !== ue.current.rowIndex || b.col !== ue.current.col) && (Le.current = !1), Le.current || _(ue.current, { rowIndex: i, col: b.col }));
2358
2358
  }
2359
- }, he = ie(null), Ve = ae(() => {
2360
- he.current && (document.removeEventListener("pointerover", he.current), he.current = null);
2359
+ }, Qe = le(null), fe = ae(() => {
2360
+ Qe.current && (document.removeEventListener("pointerover", Qe.current), Qe.current = null);
2361
2361
  }, []);
2362
- gt(() => Ve, [Ve]);
2363
- const Mt = (f) => {
2364
- Ve();
2365
- const r = f.relatedTarget;
2366
- if (r instanceof Element && r.closest('[data-component="tooltip"]')) {
2367
- const h = (M) => {
2368
- var k;
2369
- const S = M.target;
2370
- S instanceof Element && S.closest('[data-component="tooltip"]') || (Ve(), S instanceof Node && ((k = c.current) != null && k.contains(S)) || We(null));
2362
+ gt(() => fe, [fe]);
2363
+ const St = (f) => {
2364
+ fe();
2365
+ const b = f.relatedTarget;
2366
+ if (b instanceof Element && b.closest('[data-component="tooltip"]')) {
2367
+ const i = (g) => {
2368
+ var F;
2369
+ const M = g.target;
2370
+ M instanceof Element && M.closest('[data-component="tooltip"]') || (fe(), M instanceof Node && ((F = c.current) != null && F.contains(M)) || Pe(null));
2371
2371
  };
2372
- he.current = h, document.addEventListener("pointerover", h);
2372
+ Qe.current = i, document.addEventListener("pointerover", i);
2373
2373
  return;
2374
2374
  }
2375
- We(null);
2376
- }, He = (f) => {
2377
- var M;
2378
- const r = f.target instanceof Element ? f.target.closest("button") : null;
2379
- if (r) {
2380
- const S = Number((M = r.closest('[role="row"]')) == null ? void 0 : M.getAttribute("aria-rowindex")) - 2;
2381
- Number.isInteger(S) && S >= 0 && Se(S, B);
2375
+ Pe(null);
2376
+ }, Nt = (f) => {
2377
+ var g;
2378
+ const b = f.target instanceof Element ? f.target.closest("button") : null;
2379
+ if (b) {
2380
+ const M = Number((g = b.closest('[role="row"]')) == null ? void 0 : g.getAttribute("aria-rowindex")) - 2;
2381
+ Number.isInteger(M) && M >= 0 && Oe(M, L);
2382
2382
  return;
2383
2383
  }
2384
- const h = Je(f.target);
2385
- if (h) {
2386
- if (Se(h.row, h.col), ne.current = !1, O === "range" && Ge.current === "mouse") {
2387
- const S = i[h.row];
2388
- (S == null ? void 0 : S.kind) === "group" ? ct(h.row, h.col, !1) : (S == null ? void 0 : S.kind) === "data" && h.col < H && Y(S.rowIndex, h.col, Ie.current), Ie.current = !1;
2384
+ const i = Ce(f.target);
2385
+ if (i) {
2386
+ if (Oe(i.row, i.col), ie.current = !1, R === "range" && Ye.current === "mouse") {
2387
+ const M = s[i.row];
2388
+ (M == null ? void 0 : M.kind) === "group" ? ke(i.row, i.col, !1) : (M == null ? void 0 : M.kind) === "data" && i.col < K && W(M.rowIndex, i.col, Le.current), Le.current = !1;
2389
2389
  return;
2390
2390
  }
2391
- ct(h.row, h.col, f.shiftKey);
2391
+ ke(i.row, i.col, f.shiftKey);
2392
2392
  }
2393
- }, $e = ie(!1);
2393
+ }, Ae = le(!1);
2394
2394
  gt(() => {
2395
2395
  let f = 0;
2396
- const r = () => {
2397
- $e.current = !0, window.cancelAnimationFrame(f), f = window.requestAnimationFrame(() => {
2398
- $e.current = !1;
2396
+ const b = () => {
2397
+ Ae.current = !0, window.cancelAnimationFrame(f), f = window.requestAnimationFrame(() => {
2398
+ Ae.current = !1;
2399
2399
  });
2400
2400
  };
2401
- return window.addEventListener("scroll", r, { capture: !0 }), () => {
2402
- window.removeEventListener("scroll", r, { capture: !0 }), window.cancelAnimationFrame(f);
2401
+ return window.addEventListener("scroll", b, { capture: !0 }), () => {
2402
+ window.removeEventListener("scroll", b, { capture: !0 }), window.cancelAnimationFrame(f);
2403
2403
  };
2404
2404
  }, []);
2405
- const Pe = ae((f) => {
2406
- f || $e.current && qe.current === null || Oe(!0);
2407
- }, []), Qe = ae(
2408
- (f) => K("heatmap.expandGroup", { group: f }),
2409
- [K]
2410
- ), St = ae(
2411
- (f) => K("heatmap.collapseGroup", { group: f }),
2412
- [K]
2413
- ), dt = `${F}-description`, Xe = i[q], ut = z && (Xe == null ? void 0 : Xe.kind) === "data" && B < H ? J(G(Xe.rowIndex, B)) : null, ee = X(
2405
+ const Xe = ae((f) => {
2406
+ f || Ae.current && Fe.current === null || $e(!0);
2407
+ }, []), qe = ae(
2408
+ (f) => z("heatmap.expandGroup", { group: f }),
2409
+ [z]
2410
+ ), Ze = ae(
2411
+ (f) => z("heatmap.collapseGroup", { group: f }),
2412
+ [z]
2413
+ ), ut = `${q}-description`, et = s[ee], At = $ && (et == null ? void 0 : et.kind) === "data" && L < K ? Z(V(et.rowIndex, L)) : null, _t = X(
2414
2414
  () => ({
2415
2415
  rows: o,
2416
- columns: s,
2416
+ columns: r,
2417
2417
  matrix: a,
2418
2418
  scale: u,
2419
2419
  palette: d,
@@ -2422,23 +2422,23 @@ function ra(e) {
2422
2422
  totals: m,
2423
2423
  rowTotals: w,
2424
2424
  groupColumnMethod: p,
2425
- groupIds: N,
2426
- selectable: O !== "none",
2427
- interactive: R,
2428
- virtualised: g,
2429
- colWindow: ye.cols,
2430
- idBase: F,
2431
- describedBy: z ? dt : void 0,
2432
- cellInfo: G,
2433
- tooltipText: J,
2434
- onTooltipOpenChange: Pe,
2425
+ groupIds: S,
2426
+ selectable: R !== "none",
2427
+ interactive: E,
2428
+ virtualised: h,
2429
+ colWindow: Ne.cols,
2430
+ idBase: q,
2431
+ describedBy: $ ? ut : void 0,
2432
+ cellInfo: V,
2433
+ tooltipText: Z,
2434
+ onTooltipOpenChange: Xe,
2435
2435
  onToggleGroup: A,
2436
- expandLabel: Qe,
2437
- collapseLabel: St
2436
+ expandLabel: qe,
2437
+ collapseLabel: Ze
2438
2438
  }),
2439
2439
  [
2440
2440
  o,
2441
- s,
2441
+ r,
2442
2442
  a,
2443
2443
  u,
2444
2444
  d,
@@ -2447,67 +2447,67 @@ function ra(e) {
2447
2447
  m,
2448
2448
  w,
2449
2449
  p,
2450
- N,
2451
- O,
2450
+ S,
2452
2451
  R,
2453
- g,
2454
- ye.cols,
2455
- F,
2456
- z,
2457
- dt,
2458
- G,
2459
- J,
2460
- Pe,
2452
+ E,
2453
+ h,
2454
+ Ne.cols,
2455
+ q,
2456
+ $,
2457
+ ut,
2458
+ V,
2459
+ Z,
2460
+ Xe,
2461
2461
  A,
2462
- Qe,
2463
- St
2462
+ qe,
2463
+ Ze
2464
2464
  ]
2465
- ), zt = X(() => {
2465
+ ), te = X(() => {
2466
2466
  const f = /* @__PURE__ */ new Map();
2467
- for (const h of D) {
2468
- const [M, S] = Et(h), k = y(S);
2469
- if (k === void 0) continue;
2470
- const U = f.get(M) ?? [];
2471
- U.push(k), f.set(M, U);
2467
+ for (const i of D) {
2468
+ const [g, M] = Ht(i), F = k(M);
2469
+ if (F === void 0) continue;
2470
+ const T = f.get(g) ?? [];
2471
+ T.push(F), f.set(g, T);
2472
2472
  }
2473
- const r = /* @__PURE__ */ new Map();
2474
- for (const [h, M] of f)
2475
- r.set(h, M.sort((S, k) => S - k).join(","));
2476
- return r;
2477
- }, [D, y]), pt = (me == null ? void 0 : me.col) ?? -1, Nt = /* @__PURE__ */ le(
2473
+ const b = /* @__PURE__ */ new Map();
2474
+ for (const [i, g] of f)
2475
+ b.set(i, g.sort((M, F) => M - F).join(","));
2476
+ return b;
2477
+ }, [D, k]), Rt = (we == null ? void 0 : we.col) ?? -1, Tt = /* @__PURE__ */ ce(
2478
2478
  "div",
2479
2479
  {
2480
- ref: I,
2480
+ ref: x,
2481
2481
  role: "row",
2482
2482
  "aria-rowindex": 1,
2483
- className: Ot({ position: "header" }),
2483
+ className: Kt({ position: "header" }),
2484
2484
  children: [
2485
- /* @__PURE__ */ C(
2485
+ /* @__PURE__ */ H(
2486
2486
  "div",
2487
2487
  {
2488
2488
  role: "columnheader",
2489
2489
  "aria-colindex": 1,
2490
2490
  className: Vt({ corner: !0 }),
2491
- children: n ?? /* @__PURE__ */ C("span", { className: "ds:sr-only", children: K("heatmap.rowsHeader") })
2491
+ children: n ?? /* @__PURE__ */ H("span", { className: "ds:sr-only", children: z("heatmap.rowsHeader") })
2492
2492
  }
2493
2493
  ),
2494
- Ht(ye.cols, (f) => /* @__PURE__ */ C(
2494
+ zt(Ne.cols, (f) => /* @__PURE__ */ H(
2495
2495
  "div",
2496
2496
  {
2497
2497
  role: "columnheader",
2498
2498
  "aria-colindex": f + 2,
2499
- "data-highlighted": pt === f,
2499
+ "data-highlighted": Rt === f,
2500
2500
  className: Vt(),
2501
- children: l.columnLabel(s[f])
2501
+ children: l.columnLabel(r[f])
2502
2502
  },
2503
2503
  f
2504
2504
  )),
2505
- w ? /* @__PURE__ */ C(
2505
+ w ? /* @__PURE__ */ H(
2506
2506
  "div",
2507
2507
  {
2508
2508
  role: "columnheader",
2509
- "aria-colindex": H + 2,
2510
- "data-highlighted": pt === H,
2509
+ "aria-colindex": K + 2,
2510
+ "data-highlighted": Rt === K,
2511
2511
  className: Vt(),
2512
2512
  children: l.methodLabel(w)
2513
2513
  }
@@ -2515,165 +2515,165 @@ function ra(e) {
2515
2515
  ]
2516
2516
  }
2517
2517
  );
2518
- let mt = null;
2519
- if (b && m) {
2520
- const f = i.length, r = l.methodLabel(b), h = q === f, M = (S, k, U, j = r) => /* @__PURE__ */ C(
2518
+ let pt = null;
2519
+ if (y && m) {
2520
+ const f = s.length, b = l.methodLabel(y), i = ee === f, g = (M, F, T, U = b) => /* @__PURE__ */ H(
2521
2521
  "div",
2522
2522
  {
2523
2523
  role: "gridcell",
2524
- "aria-colindex": k + 2,
2525
- "aria-label": l.sentence(j, U, S),
2526
- tabIndex: h && B === k ? 0 : -1,
2527
- className: Rt({ tone: en(S) }),
2528
- children: l.visibleText(S)
2524
+ "aria-colindex": F + 2,
2525
+ "aria-label": l.sentence(U, T, M),
2526
+ tabIndex: i && L === F ? 0 : -1,
2527
+ className: Ct({ tone: en(M) }),
2528
+ children: l.visibleText(M)
2529
2529
  },
2530
- k
2530
+ F
2531
2531
  );
2532
- mt = /* @__PURE__ */ le(
2532
+ pt = /* @__PURE__ */ ce(
2533
2533
  "div",
2534
2534
  {
2535
2535
  ref: P,
2536
2536
  role: "row",
2537
2537
  "aria-rowindex": f + 2,
2538
- className: Ot({ position: "footer" }),
2538
+ className: Kt({ position: "footer" }),
2539
2539
  children: [
2540
- /* @__PURE__ */ C(
2540
+ /* @__PURE__ */ H(
2541
2541
  "div",
2542
2542
  {
2543
2543
  role: "rowheader",
2544
2544
  "aria-colindex": 1,
2545
- "data-highlighted": (me == null ? void 0 : me.rowKey) === At,
2546
- className: Zt({ kind: "total", virtualised: g }),
2547
- children: r
2545
+ "data-highlighted": (we == null ? void 0 : we.rowKey) === Et,
2546
+ className: Zt({ kind: "total", virtualised: h }),
2547
+ children: b
2548
2548
  }
2549
2549
  ),
2550
- Ht(
2551
- ye.cols,
2552
- (S) => M(m.columns[S], S, l.columnLabel(s[S]))
2550
+ zt(
2551
+ Ne.cols,
2552
+ (M) => g(m.columns[M], M, l.columnLabel(r[M]))
2553
2553
  ),
2554
- w ? M(
2554
+ w ? g(
2555
2555
  m.grand,
2556
- H,
2556
+ K,
2557
2557
  l.methodLabel(w),
2558
2558
  // The corner aggregates every cell by the row method, so it
2559
2559
  // is named for all cells, not for the footer's own method.
2560
- K("heatmap.allCells")
2560
+ z("heatmap.allCells")
2561
2561
  ) : null
2562
2562
  ]
2563
2563
  }
2564
2564
  );
2565
2565
  }
2566
- const Re = [], ke = ye.rows;
2567
- ke.lead > 0 && Re.push(
2568
- /* @__PURE__ */ C(
2566
+ const Ge = [], ye = Ne.rows;
2567
+ ye.lead > 0 && Ge.push(
2568
+ /* @__PURE__ */ H(
2569
2569
  "div",
2570
2570
  {
2571
2571
  "aria-hidden": "true",
2572
- className: at({ axis: "row-lead" })
2572
+ className: rt({ axis: "row-lead" })
2573
2573
  },
2574
2574
  "row-lead"
2575
2575
  )
2576
- ), ke.indexes.forEach((f, r) => {
2577
- ke.middle > 0 && r === ke.middleAfter && Re.push(
2578
- /* @__PURE__ */ C(
2576
+ ), ye.indexes.forEach((f, b) => {
2577
+ ye.middle > 0 && b === ye.middleAfter && Ge.push(
2578
+ /* @__PURE__ */ H(
2579
2579
  "div",
2580
2580
  {
2581
2581
  "aria-hidden": "true",
2582
- className: at({ axis: "row-middle" })
2582
+ className: rt({ axis: "row-middle" })
2583
2583
  },
2584
2584
  "row-middle"
2585
2585
  )
2586
2586
  );
2587
- const h = i[f];
2588
- if (!h) return;
2589
- const M = f === q;
2590
- Re.push(
2591
- /* @__PURE__ */ C(
2587
+ const i = s[f];
2588
+ if (!i) return;
2589
+ const g = f === ee;
2590
+ Ge.push(
2591
+ /* @__PURE__ */ H(
2592
2592
  aa,
2593
2593
  {
2594
- ctx: ee,
2595
- row: h,
2594
+ ctx: _t,
2595
+ row: i,
2596
2596
  ariaRowIndex: f + 2,
2597
- highlighted: (me == null ? void 0 : me.rowKey) === h.key,
2598
- activeCol: M ? B : -1,
2599
- tooltipCol: (Ce == null ? void 0 : Ce.rowKey) === h.key ? Ce.col : -1,
2600
- selectedCols: h.kind === "data" ? zt.get(o[h.rowIndex].id) ?? "" : ""
2597
+ highlighted: (we == null ? void 0 : we.rowKey) === i.key,
2598
+ activeCol: g ? L : -1,
2599
+ tooltipCol: (Me == null ? void 0 : Me.rowKey) === i.key ? Me.col : -1,
2600
+ selectedCols: i.kind === "data" ? te.get(o[i.rowIndex].id) ?? "" : ""
2601
2601
  },
2602
- h.key
2602
+ i.key
2603
2603
  )
2604
2604
  );
2605
- }), ke.tail > 0 && Re.push(
2606
- /* @__PURE__ */ C(
2605
+ }), ye.tail > 0 && Ge.push(
2606
+ /* @__PURE__ */ H(
2607
2607
  "div",
2608
2608
  {
2609
2609
  "aria-hidden": "true",
2610
- className: at({ axis: "row-tail" })
2610
+ className: rt({ axis: "row-tail" })
2611
2611
  },
2612
2612
  "row-tail"
2613
2613
  )
2614
2614
  );
2615
- const Bt = {
2616
- "--heatmap-columns": String(Math.max(1, H)),
2617
- "--heatmap-row-lead": String(ke.lead),
2618
- "--heatmap-row-middle": String(ke.middle),
2619
- "--heatmap-row-tail": String(ke.tail),
2620
- "--heatmap-col-lead": String(ye.cols.lead),
2621
- "--heatmap-col-middle": String(ye.cols.middle),
2622
- "--heatmap-col-tail": String(ye.cols.tail),
2623
- "--heatmap-sticky-block-start": `${fe.headerBlock}px`,
2624
- "--heatmap-sticky-block-end": `${fe.footerBlock}px`,
2625
- "--heatmap-sticky-inline-start": `${fe.leadInline}px`
2615
+ const mt = {
2616
+ "--heatmap-columns": String(Math.max(1, K)),
2617
+ "--heatmap-row-lead": String(ye.lead),
2618
+ "--heatmap-row-middle": String(ye.middle),
2619
+ "--heatmap-row-tail": String(ye.tail),
2620
+ "--heatmap-col-lead": String(Ne.cols.lead),
2621
+ "--heatmap-col-middle": String(Ne.cols.middle),
2622
+ "--heatmap-col-tail": String(Ne.cols.tail),
2623
+ "--heatmap-sticky-block-start": `${Te.headerBlock}px`,
2624
+ "--heatmap-sticky-block-end": `${Te.footerBlock}px`,
2625
+ "--heatmap-sticky-inline-start": `${Te.leadInline}px`
2626
2626
  };
2627
- return /* @__PURE__ */ le(
2627
+ return /* @__PURE__ */ ce(
2628
2628
  "div",
2629
2629
  {
2630
- ref: $,
2630
+ ref: B,
2631
2631
  onScroll: It,
2632
- style: Bt,
2632
+ style: mt,
2633
2633
  "data-component": "heatmap-grid",
2634
2634
  className: Qo(),
2635
2635
  children: [
2636
- /* @__PURE__ */ le(
2636
+ /* @__PURE__ */ ce(
2637
2637
  "div",
2638
2638
  {
2639
2639
  ref: c,
2640
2640
  role: "grid",
2641
2641
  tabIndex: -1,
2642
2642
  "aria-label": t,
2643
- "aria-rowcount": x.length + 1,
2644
- "aria-colcount": Q + 1,
2645
- "aria-multiselectable": O === "multiple" || O === "range" ? !0 : void 0,
2643
+ "aria-rowcount": I.length + 1,
2644
+ "aria-colcount": J + 1,
2645
+ "aria-multiselectable": R === "multiple" || R === "range" ? !0 : void 0,
2646
2646
  "data-heatmap-grid": "",
2647
2647
  className: Zo({
2648
- size: T,
2649
- density: L,
2650
- virtualised: g,
2648
+ size: O,
2649
+ density: N,
2650
+ virtualised: h,
2651
2651
  totalsColumn: !!w
2652
2652
  }),
2653
- onKeyDown: ze,
2654
- onPointerDown: kt,
2655
- onPointerMove: Ft,
2656
- onPointerLeave: Mt,
2657
- onClick: He,
2653
+ onKeyDown: Bt,
2654
+ onPointerDown: Je,
2655
+ onPointerMove: Mt,
2656
+ onPointerLeave: St,
2657
+ onClick: Nt,
2658
2658
  onFocus: (f) => {
2659
- f.target.matches(":focus-visible") && (Z.current = "keyboard"), be.current = !0, Ae(!0);
2659
+ f.target.matches(":focus-visible") && (de.current = "keyboard"), Ke.current = !0, xe(!0);
2660
2660
  },
2661
2661
  onBlur: (f) => {
2662
- f.currentTarget.contains(f.relatedTarget) || (be.current = !1, Ae(!1));
2662
+ f.currentTarget.contains(f.relatedTarget) || (Ke.current = !1, xe(!1));
2663
2663
  },
2664
2664
  children: [
2665
- Nt,
2666
- Re,
2667
- mt
2665
+ Tt,
2666
+ Ge,
2667
+ pt
2668
2668
  ]
2669
2669
  }
2670
2670
  ),
2671
- ut !== null ? /* @__PURE__ */ C("span", { id: dt, hidden: !0, children: ut }) : null
2671
+ At !== null ? /* @__PURE__ */ H("span", { id: ut, hidden: !0, children: At }) : null
2672
2672
  ]
2673
2673
  }
2674
2674
  );
2675
2675
  }
2676
- const Pt = Array.from({ length: Te }, (e, t) => t);
2676
+ const Pt = Array.from({ length: _e }, (e, t) => t);
2677
2677
  function sa(e, t) {
2678
2678
  return {
2679
2679
  start: e.min === null ? "" : t(e.min),
@@ -2687,43 +2687,43 @@ const an = Mn(
2687
2687
  palette: t,
2688
2688
  scale: n,
2689
2689
  values: o,
2690
- valueFormatter: s,
2690
+ valueFormatter: r,
2691
2691
  showEmpty: a,
2692
- showLowSample: i,
2692
+ showLowSample: s,
2693
2693
  showWithheldTotal: u,
2694
2694
  minCount: d,
2695
2695
  className: l
2696
2696
  }, v) => {
2697
- const { t: m, i18n: w } = wt("ui"), b = Tn(), p = Nn(w.resolvedLanguage ?? w.language), N = X(
2698
- () => n ? Qt(n, o ?? []) : (b == null ? void 0 : b.scale) ?? Qt({ type: "sequential" }, o ?? []),
2699
- [n, o, b == null ? void 0 : b.scale]
2700
- ), O = t ?? (b == null ? void 0 : b.palette) ?? (N.type === "diverging" ? "diverging" : "primary"), D = s ?? (b == null ? void 0 : b.describer.formatValue) ?? Rn(p, "number"), y = (N.type === "quantile" || N.type === "threshold") && N.thresholds.length > 0, R = N.thresholds.length + 1, g = y ? Array.from(
2701
- { length: R },
2702
- ($, c) => Jt(c, R)
2703
- ) : [], T = N.thresholds.map(D), L = sa(N, D), G = y ? m("heatmap.legend.descriptionBands", {
2704
- count: R,
2705
- formatted: En(p)(R),
2697
+ const { t: m, i18n: w } = wt("ui"), y = Rn(), p = Nn(w.resolvedLanguage ?? w.language), S = X(
2698
+ () => n ? Qt(n, o ?? []) : (y == null ? void 0 : y.scale) ?? Qt({ type: "sequential" }, o ?? []),
2699
+ [n, o, y == null ? void 0 : y.scale]
2700
+ ), R = t ?? (y == null ? void 0 : y.palette) ?? (S.type === "diverging" ? "diverging" : "primary"), D = r ?? (y == null ? void 0 : y.describer.formatValue) ?? Tn(p, "number"), k = (S.type === "quantile" || S.type === "threshold") && S.thresholds.length > 0, E = S.thresholds.length + 1, h = k ? Array.from(
2701
+ { length: E },
2702
+ (B, c) => Jt(c, E)
2703
+ ) : [], O = S.thresholds.map(D), N = sa(S, D), V = k ? m("heatmap.legend.descriptionBands", {
2704
+ count: E,
2705
+ formatted: En(p)(E),
2706
2706
  edges: new Intl.ListFormat(p, {
2707
2707
  type: "conjunction"
2708
- }).format(T)
2709
- }) : L.middle !== void 0 ? m("heatmap.legend.descriptionDiverging", {
2710
- min: L.start,
2711
- max: L.end,
2712
- midpoint: L.middle
2708
+ }).format(O)
2709
+ }) : N.middle !== void 0 ? m("heatmap.legend.descriptionDiverging", {
2710
+ min: N.start,
2711
+ max: N.end,
2712
+ midpoint: N.middle
2713
2713
  }) : m("heatmap.legend.description", {
2714
- min: L.start,
2715
- max: L.end
2716
- }), J = (N.type === "quantile" || N.type === "threshold") && !y ? [N.min === null ? Te / 2 : N.stepOf(N.min)] : null, z = a ?? (b == null ? void 0 : b.hasEmpty) ?? !1, Y = i ?? (b == null ? void 0 : b.hasLowSample) ?? !1, E = u ?? (b == null ? void 0 : b.hasWithheldTotal) ?? !1, A = d ?? (b == null ? void 0 : b.minCount), K = e === "continuous" ? "continuous" : "stepped", F = ($) => /* @__PURE__ */ C("span", { className: ta({ variant: e }), children: $.map((c) => /* @__PURE__ */ C(
2714
+ min: N.start,
2715
+ max: N.end
2716
+ }), Z = (S.type === "quantile" || S.type === "threshold") && !k ? [S.min === null ? _e / 2 : S.stepOf(S.min)] : null, $ = a ?? (y == null ? void 0 : y.hasEmpty) ?? !1, W = s ?? (y == null ? void 0 : y.hasLowSample) ?? !1, _ = u ?? (y == null ? void 0 : y.hasWithheldTotal) ?? !1, A = d ?? (y == null ? void 0 : y.minCount), z = e === "continuous" ? "continuous" : "stepped", q = (B) => /* @__PURE__ */ H("span", { className: ta({ variant: e }), children: B.map((c) => /* @__PURE__ */ H(
2717
2717
  "span",
2718
2718
  {
2719
- className: tt({
2720
- tone: Xt(O, c),
2721
- shape: K
2719
+ className: nt({
2720
+ tone: Xt(R, c),
2721
+ shape: z
2722
2722
  })
2723
2723
  },
2724
2724
  c
2725
2725
  )) });
2726
- return /* @__PURE__ */ le(
2726
+ return /* @__PURE__ */ ce(
2727
2727
  "div",
2728
2728
  {
2729
2729
  ref: v,
@@ -2732,88 +2732,88 @@ const an = Mn(
2732
2732
  "data-component": "heatmap-legend",
2733
2733
  className: ea({ className: l }),
2734
2734
  children: [
2735
- /* @__PURE__ */ C("span", { className: "ds:sr-only", children: G }),
2736
- y ? /* @__PURE__ */ C(
2735
+ /* @__PURE__ */ H("span", { className: "ds:sr-only", children: V }),
2736
+ k ? /* @__PURE__ */ H(
2737
2737
  "span",
2738
2738
  {
2739
2739
  "aria-hidden": "true",
2740
2740
  "data-legend": "bands",
2741
2741
  className: "ds:flex ds:min-w-0 ds:max-w-full ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)] ds:tabular-nums",
2742
- children: g.map(($, c) => /* @__PURE__ */ le(
2742
+ children: h.map((B, c) => /* @__PURE__ */ ce(
2743
2743
  "span",
2744
2744
  {
2745
2745
  className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]",
2746
2746
  children: [
2747
- /* @__PURE__ */ C(
2747
+ /* @__PURE__ */ H(
2748
2748
  "span",
2749
2749
  {
2750
- "data-step": $,
2751
- className: tt({
2752
- tone: Xt(O, $),
2750
+ "data-step": B,
2751
+ className: nt({
2752
+ tone: Xt(R, B),
2753
2753
  shape: "key"
2754
2754
  })
2755
2755
  }
2756
2756
  ),
2757
- c < T.length ? /* @__PURE__ */ C("span", { className: "ds:shrink-0", children: T[c] }) : null
2757
+ c < O.length ? /* @__PURE__ */ H("span", { className: "ds:shrink-0", children: O[c] }) : null
2758
2758
  ]
2759
2759
  },
2760
- $
2760
+ B
2761
2761
  ))
2762
2762
  }
2763
- ) : /* @__PURE__ */ le(
2763
+ ) : /* @__PURE__ */ ce(
2764
2764
  "span",
2765
2765
  {
2766
2766
  "aria-hidden": "true",
2767
2767
  className: "ds:flex ds:min-w-0 ds:max-w-full ds:items-center ds:gap-[var(--spacing-xs)] ds:tabular-nums",
2768
2768
  children: [
2769
- /* @__PURE__ */ C("span", { className: "ds:shrink-0", children: L.start }),
2770
- L.middle !== void 0 ? /* @__PURE__ */ le(Gn, { children: [
2771
- F(Pt.slice(0, Te / 2)),
2772
- /* @__PURE__ */ C(
2769
+ /* @__PURE__ */ H("span", { className: "ds:shrink-0", children: N.start }),
2770
+ N.middle !== void 0 ? /* @__PURE__ */ ce(Gn, { children: [
2771
+ q(Pt.slice(0, _e / 2)),
2772
+ /* @__PURE__ */ H(
2773
2773
  "span",
2774
2774
  {
2775
2775
  "data-legend": "midpoint",
2776
- className: tt({
2776
+ className: nt({
2777
2777
  tone: "midpoint",
2778
2778
  shape: "label"
2779
2779
  }),
2780
- children: L.middle
2780
+ children: N.middle
2781
2781
  }
2782
2782
  ),
2783
- F(Pt.slice(Te / 2))
2784
- ] }) : F(J ?? Pt),
2785
- /* @__PURE__ */ C("span", { className: "ds:shrink-0", children: L.end })
2783
+ q(Pt.slice(_e / 2))
2784
+ ] }) : q(Z ?? Pt),
2785
+ /* @__PURE__ */ H("span", { className: "ds:shrink-0", children: N.end })
2786
2786
  ]
2787
2787
  }
2788
2788
  ),
2789
- z ? /* @__PURE__ */ le("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
2790
- /* @__PURE__ */ C(
2789
+ $ ? /* @__PURE__ */ ce("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
2790
+ /* @__PURE__ */ H(
2791
2791
  "span",
2792
2792
  {
2793
2793
  "aria-hidden": "true",
2794
- className: tt({ tone: "empty" })
2794
+ className: nt({ tone: "empty" })
2795
2795
  }
2796
2796
  ),
2797
2797
  m("heatmap.legend.noData")
2798
2798
  ] }) : null,
2799
- Y ? /* @__PURE__ */ le("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
2800
- /* @__PURE__ */ C(
2799
+ W ? /* @__PURE__ */ ce("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
2800
+ /* @__PURE__ */ H(
2801
2801
  "span",
2802
2802
  {
2803
2803
  "aria-hidden": "true",
2804
- className: tt({ tone: "low-sample" })
2804
+ className: nt({ tone: "low-sample" })
2805
2805
  }
2806
2806
  ),
2807
2807
  A === void 0 ? m("heatmap.legend.lowSample") : m("heatmap.legend.lowSampleUnder", {
2808
2808
  value: new Intl.NumberFormat(p).format(A)
2809
2809
  })
2810
2810
  ] }) : null,
2811
- E ? /* @__PURE__ */ le("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
2812
- /* @__PURE__ */ C(
2811
+ _ ? /* @__PURE__ */ ce("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
2812
+ /* @__PURE__ */ H(
2813
2813
  "span",
2814
2814
  {
2815
2815
  "aria-hidden": "true",
2816
- className: tt({ tone: "low-sample" })
2816
+ className: nt({ tone: "low-sample" })
2817
2817
  }
2818
2818
  ),
2819
2819
  m("heatmap.legend.totalWithheld")
@@ -2824,17 +2824,17 @@ const an = Mn(
2824
2824
  }
2825
2825
  );
2826
2826
  an.displayName = "HeatmapLegend";
2827
- const rn = () => import("./data-table-C5uN4ato.js").then((e) => e.h).then((e) => {
2827
+ const rn = () => import("./data-table-zXBxFYpJ.js").then((e) => e.h).then((e) => {
2828
2828
  const t = e.DataTable;
2829
2829
  function n(o) {
2830
- const { t: s } = wt("ui");
2831
- return /* @__PURE__ */ C(t, { ...o, children: /* @__PURE__ */ C("div", { className: "data-table-toolbar ds:flex ds:justify-end", children: /* @__PURE__ */ C(
2830
+ const { t: r } = wt("ui");
2831
+ return /* @__PURE__ */ H(t, { ...o, children: /* @__PURE__ */ H("div", { className: "data-table-toolbar ds:flex ds:justify-end", children: /* @__PURE__ */ H(
2832
2832
  no,
2833
2833
  {
2834
2834
  role: "toolbar",
2835
- "aria-label": s("dataTable.tableActions"),
2835
+ "aria-label": r("dataTable.tableActions"),
2836
2836
  className: "ds:bg-[var(--background)]",
2837
- children: /* @__PURE__ */ C(e.DataTable.Toolbar.ExportMenu, {})
2837
+ children: /* @__PURE__ */ H(e.DataTable.Toolbar.ExportMenu, {})
2838
2838
  }
2839
2839
  ) }) });
2840
2840
  }
@@ -2850,20 +2850,20 @@ function la({
2850
2850
  rowsLabel: t,
2851
2851
  rows: n,
2852
2852
  columns: o,
2853
- matrix: s,
2853
+ matrix: r,
2854
2854
  body: a,
2855
- grouped: i,
2855
+ grouped: s,
2856
2856
  groupIds: u,
2857
2857
  describer: d,
2858
2858
  totals: l,
2859
2859
  rowTotals: v,
2860
2860
  columnTotals: m,
2861
2861
  groupColumnMethod: w,
2862
- onLoadError: b
2862
+ onLoadError: y
2863
2863
  }) {
2864
- const { t: p } = wt("ui"), N = X(
2864
+ const { t: p } = wt("ui"), S = X(
2865
2865
  () => [
2866
- ...i ? [
2866
+ ...s ? [
2867
2867
  {
2868
2868
  colId: "group",
2869
2869
  field: "group",
@@ -2876,15 +2876,15 @@ function la({
2876
2876
  colId: "row",
2877
2877
  field: "row",
2878
2878
  headerName: t ?? p("heatmap.rowsHeader"),
2879
- sortable: !i
2879
+ sortable: !s
2880
2880
  },
2881
2881
  ...o.map(
2882
- (A, K) => ({
2883
- colId: `c${K}`,
2882
+ (A, z) => ({
2883
+ colId: `c${z}`,
2884
2884
  headerName: d.columnLabel(A),
2885
- valueGetter: (F) => {
2886
- var $;
2887
- return (($ = F.data) == null ? void 0 : $.cells[K]) ?? "";
2885
+ valueGetter: (q) => {
2886
+ var B;
2887
+ return ((B = q.data) == null ? void 0 : B.cells[z]) ?? "";
2888
2888
  },
2889
2889
  sortable: !1
2890
2890
  })
@@ -2898,38 +2898,38 @@ function la({
2898
2898
  }
2899
2899
  ] : []
2900
2900
  ],
2901
- [i, t, o, d, v, p]
2902
- ), O = X(
2901
+ [s, t, o, d, v, p]
2902
+ ), R = X(
2903
2903
  () => a.map((A) => {
2904
2904
  if (A.kind === "group") {
2905
- const $ = d.groupLabel(A.groupId), c = (l == null ? void 0 : l.groupColumns.get(A.groupId)) ?? [];
2905
+ const B = d.groupLabel(A.groupId), c = (l == null ? void 0 : l.groupColumns.get(A.groupId)) ?? [];
2906
2906
  return {
2907
2907
  id: `group:${u.get(A.groupId) ?? ""}`,
2908
- group: $,
2909
- row: d.groupRowText($, w),
2908
+ group: B,
2909
+ row: d.groupRowText(B, w),
2910
2910
  cells: o.map(
2911
- (I, P) => d.tableText(c[P] ?? In)
2911
+ (x, P) => d.tableText(c[P] ?? In)
2912
2912
  ),
2913
2913
  total: v && l ? d.tableText(
2914
2914
  l.groups.get(A.groupId) ?? In
2915
2915
  ) : void 0
2916
2916
  };
2917
2917
  }
2918
- const K = A.rowIndex, F = n[K].group;
2918
+ const z = A.rowIndex, q = n[z].group;
2919
2919
  return {
2920
- id: `row:${n[K].id}`,
2921
- group: i && F !== void 0 ? d.groupLabel(F) : void 0,
2922
- row: d.rowLabel(n[K]),
2923
- cells: s[K].map(($) => d.tableText($)),
2924
- total: v && l ? d.tableText(l.rows[K]) : void 0
2920
+ id: `row:${n[z].id}`,
2921
+ group: s && q !== void 0 ? d.groupLabel(q) : void 0,
2922
+ row: d.rowLabel(n[z]),
2923
+ cells: r[z].map((B) => d.tableText(B)),
2924
+ total: v && l ? d.tableText(l.rows[z]) : void 0
2925
2925
  };
2926
2926
  }),
2927
2927
  [
2928
2928
  a,
2929
2929
  n,
2930
2930
  o,
2931
+ r,
2931
2932
  s,
2932
- i,
2933
2933
  u,
2934
2934
  d,
2935
2935
  v,
@@ -2947,74 +2947,74 @@ function la({
2947
2947
  }
2948
2948
  ] : void 0,
2949
2949
  [m, v, l, d]
2950
- ), y = O.length + ((D == null ? void 0 : D.length) ?? 0), R = ie(y);
2951
- R.current = y;
2952
- const [g, T] = we(null), L = g === y, G = ie(null);
2953
- nt(() => {
2954
- const A = G.current;
2955
- if (L || !A || typeof ResizeObserver > "u") return;
2956
- const K = new ResizeObserver(() => {
2957
- A.scrollHeight > A.clientHeight + 1 && T(R.current);
2958
- }), F = () => {
2959
- K.observe(A);
2960
- for (const c of Array.from(A.children)) K.observe(c);
2950
+ ), k = R.length + ((D == null ? void 0 : D.length) ?? 0), E = le(k);
2951
+ E.current = k;
2952
+ const [h, O] = ve(null), N = h === k, V = le(null);
2953
+ ot(() => {
2954
+ const A = V.current;
2955
+ if (N || !A || typeof ResizeObserver > "u") return;
2956
+ const z = new ResizeObserver(() => {
2957
+ A.scrollHeight > A.clientHeight + 1 && O(E.current);
2958
+ }), q = () => {
2959
+ z.observe(A);
2960
+ for (const c of Array.from(A.children)) z.observe(c);
2961
2961
  };
2962
- F();
2963
- const $ = new MutationObserver(F);
2964
- return $.observe(A, { childList: !0 }), () => {
2965
- K.disconnect(), $.disconnect();
2962
+ q();
2963
+ const B = new MutationObserver(q);
2964
+ return B.observe(A, { childList: !0 }), () => {
2965
+ z.disconnect(), B.disconnect();
2966
2966
  };
2967
- }, [L]);
2968
- const J = X(
2967
+ }, [N]);
2968
+ const Z = X(
2969
2969
  () => ({
2970
2970
  getRowId: (A) => A.data.id,
2971
- domLayout: L ? "normal" : "autoHeight",
2971
+ domLayout: N ? "normal" : "autoHeight",
2972
2972
  // Every value is already on screen in its row and column: no filters.
2973
2973
  defaultColDef: { filter: !1, floatingFilter: !1 }
2974
2974
  }),
2975
- [L]
2976
- ), [z, Y] = we(0), E = X(
2977
- () => z === 0 ? ia : Sn(rn),
2978
- [z]
2975
+ [N]
2976
+ ), [$, W] = ve(0), _ = X(
2977
+ () => $ === 0 ? ia : Sn(rn),
2978
+ [$]
2979
2979
  );
2980
- return /* @__PURE__ */ C(
2980
+ return /* @__PURE__ */ H(
2981
2981
  "div",
2982
2982
  {
2983
- ref: G,
2983
+ ref: V,
2984
2984
  role: "group",
2985
2985
  "aria-label": e,
2986
2986
  tabIndex: -1,
2987
2987
  "data-component": "heatmap-table",
2988
- "data-layout": L ? "capped" : "fit",
2989
- className: Xo({ capped: L }),
2990
- children: /* @__PURE__ */ C(
2988
+ "data-layout": N ? "capped" : "fit",
2989
+ className: Xo({ capped: N }),
2990
+ children: /* @__PURE__ */ H(
2991
2991
  to,
2992
2992
  {
2993
2993
  size: "sm",
2994
- onError: () => b == null ? void 0 : b(),
2994
+ onError: () => y == null ? void 0 : y(),
2995
2995
  onRetry: () => {
2996
2996
  var A;
2997
- Y((K) => K + 1), (A = G.current) == null || A.focus();
2997
+ W((z) => z + 1), (A = V.current) == null || A.focus();
2998
2998
  },
2999
- children: /* @__PURE__ */ C(
2999
+ children: /* @__PURE__ */ H(
3000
3000
  qn,
3001
3001
  {
3002
- fallback: /* @__PURE__ */ C("div", { role: "status", "aria-label": p("heatmap.loadingTable"), children: /* @__PURE__ */ C(
3002
+ fallback: /* @__PURE__ */ H("div", { role: "status", "aria-label": p("heatmap.loadingTable"), children: /* @__PURE__ */ H(
3003
3003
  qt,
3004
3004
  {
3005
3005
  variant: "rectangular",
3006
3006
  className: "ds:h-[calc(var(--min-target-size)*4)] ds:w-full"
3007
3007
  }
3008
3008
  ) }),
3009
- children: /* @__PURE__ */ C(
3010
- E,
3009
+ children: /* @__PURE__ */ H(
3010
+ _,
3011
3011
  {
3012
- columnDefs: N,
3013
- rowData: O,
3012
+ columnDefs: S,
3013
+ rowData: R,
3014
3014
  pinnedBottomRowData: D,
3015
3015
  density: "compact",
3016
- heightClass: L ? "ds:min-h-0 ds:flex-1" : "",
3017
- gridOptions: J
3016
+ heightClass: N ? "ds:min-h-0 ds:flex-1" : "",
3017
+ gridOptions: Z
3018
3018
  }
3019
3019
  )
3020
3020
  }
@@ -3024,515 +3024,518 @@ function la({
3024
3024
  }
3025
3025
  );
3026
3026
  }
3027
- const ca = { type: "sequential", domain: "auto" }, jt = (e) => new Set((e ?? []).map((t) => Ct(t.rowId, t.columnId))), kn = { text: "", privacyMode: !1, repeat: 0 }, Bn = Mn(
3027
+ const ca = { type: "sequential", domain: "auto" }, jt = (e) => new Set((e ?? []).map((t) => Ft(t.rowId, t.columnId))), kn = { text: "", privacyMode: !1, repeat: 0 }, Bn = Mn(
3028
3028
  ({
3029
3029
  title: e,
3030
3030
  rows: t,
3031
3031
  columns: n,
3032
3032
  getCell: o,
3033
- cells: s,
3033
+ cells: r,
3034
3034
  groups: a,
3035
- scale: i = ca,
3035
+ scale: s = ca,
3036
3036
  palette: u,
3037
3037
  valueType: d = "number",
3038
3038
  minCount: l,
3039
3039
  getTotal: v,
3040
3040
  valueFormatter: m,
3041
3041
  showValues: w = !1,
3042
- legend: b = "stepped",
3043
- rowTotals: p = !1,
3044
- columnTotals: N = !1,
3045
- sortRows: O,
3046
- defaultSortRows: D = "none",
3047
- onSortRowsChange: y,
3048
- groupRows: R = !1,
3049
- defaultCollapsedGroups: g,
3050
- selection: T = "none",
3051
- selectedCells: L,
3052
- defaultSelectedCells: G,
3053
- onSelectionChange: J,
3054
- onCellClick: z,
3055
- renderTooltip: Y,
3056
- density: E = "default",
3057
- size: A = "md",
3058
- loading: K = !1,
3059
- privacyMode: F = !1,
3060
- privacyScope: $ = "rows",
3061
- rowsLabel: c,
3062
- defaultView: I = "heatmap",
3063
- onViewChange: P,
3064
- id: H,
3065
- className: Q,
3066
- children: te
3067
- }, x) => {
3068
- const { t: _, i18n: W } = wt("ui"), V = Nn(W.resolvedLanguage ?? W.language), q = X(
3069
- () => Fo(t, n, o, s, l),
3070
- [t, n, o, s, l]
3071
- ), B = X(() => zo(q), [q]), re = JSON.stringify(i), ne = X(
3072
- () => Qt(i, B),
3042
+ legend: y = "stepped",
3043
+ tableToggle: p = !0,
3044
+ rowTotals: S = !1,
3045
+ columnTotals: R = !1,
3046
+ sortRows: D,
3047
+ defaultSortRows: k = "none",
3048
+ onSortRowsChange: E,
3049
+ groupRows: h = !1,
3050
+ defaultCollapsedGroups: O,
3051
+ selection: N = "none",
3052
+ selectedCells: V,
3053
+ defaultSelectedCells: Z,
3054
+ onSelectionChange: $,
3055
+ onCellClick: W,
3056
+ renderTooltip: _,
3057
+ density: A = "default",
3058
+ size: z = "md",
3059
+ loading: q = !1,
3060
+ privacyMode: B = !1,
3061
+ privacyScope: c = "rows",
3062
+ rowsLabel: x,
3063
+ defaultView: P = "heatmap",
3064
+ onViewChange: K,
3065
+ id: J,
3066
+ className: ne,
3067
+ children: I
3068
+ }, G) => {
3069
+ const { t: C, i18n: j } = wt("ui"), ee = Nn(j.resolvedLanguage ?? j.language), L = X(
3070
+ () => Fo(t, n, o, r, l),
3071
+ [t, n, o, r, l]
3072
+ ), oe = X(() => zo(L), [L]), ie = JSON.stringify(s), me = X(
3073
+ () => Qt(s, oe),
3073
3074
  // eslint-disable-next-line react-hooks/exhaustive-deps -- keyed by content
3074
- [re, B]
3075
- ), Me = u ?? (ne.type === "diverging" ? "diverging" : "primary"), Ae = X(
3076
- () => m ?? Rn(V, d),
3077
- [m, V, d]
3078
- ), be = X(() => En(V), [V]), Z = X(
3075
+ [ie, oe]
3076
+ ), xe = u ?? (me.type === "diverging" ? "diverging" : "primary"), Ke = X(
3077
+ () => m ?? Tn(ee, d),
3078
+ [m, ee, d]
3079
+ ), de = X(() => En(ee), [ee]), re = X(
3079
3080
  () => co({
3080
- t: _,
3081
- privacyMode: F,
3082
- privacyScope: $,
3081
+ t: C,
3082
+ privacyMode: B,
3083
+ privacyScope: c,
3083
3084
  valueType: d,
3084
- formatValue: Ae,
3085
- formatCount: be,
3085
+ formatValue: Ke,
3086
+ formatCount: de,
3086
3087
  groups: a
3087
3088
  }),
3088
3089
  [
3089
- _,
3090
- F,
3091
- $,
3090
+ C,
3091
+ B,
3092
+ c,
3092
3093
  d,
3093
- Ae,
3094
- be,
3094
+ Ke,
3095
+ de,
3095
3096
  a
3096
3097
  ]
3097
- ), pe = X(
3098
+ ), Re = X(
3098
3099
  () => Ko(t, a),
3099
3100
  [t, a]
3100
- ), je = N || p || "mean", qe = p || N || "mean", bt = N || p || "mean", [Oe, We] = we(kn), me = ie(0), Ce = ie(F);
3101
- Ce.current = F;
3102
- const fe = ae((r, h = !1) => {
3103
- window.clearTimeout(me.current);
3104
- const M = Ce.current, S = () => We((k) => ({
3105
- text: r,
3101
+ ), Fe = R || S || "mean", bt = S || R || "mean", $e = R || S || "mean", [Pe, we] = ve(kn), Me = le(0), Te = le(B);
3102
+ Te.current = B;
3103
+ const Ee = ae((i, g = !1) => {
3104
+ window.clearTimeout(Me.current);
3105
+ const M = Te.current, F = () => we((T) => ({
3106
+ text: i,
3106
3107
  privacyMode: M,
3107
- repeat: k.text === r ? k.repeat + 1 : 0
3108
+ repeat: T.text === i ? T.repeat + 1 : 0
3108
3109
  }));
3109
- h ? me.current = window.setTimeout(S, 300) : S();
3110
+ g ? Me.current = window.setTimeout(F, 300) : F();
3110
3111
  }, []);
3111
- gt(() => () => window.clearTimeout(me.current), []), gt(() => {
3112
- window.clearTimeout(me.current), We((r) => r.text === "" ? r : kn);
3113
- }, [F]);
3114
- const Dt = Oe.privacyMode === F ? (
3112
+ gt(() => () => window.clearTimeout(Me.current), []), gt(() => {
3113
+ window.clearTimeout(Me.current), we((i) => i.text === "" ? i : kn);
3114
+ }, [B]);
3115
+ const je = Pe.privacyMode === B ? (
3115
3116
  // The same words twice leave the DOM unchanged and a screen reader
3116
3117
  // silent: a trailing no-break space on every other repeat changes
3117
3118
  // the text without changing what is read.
3118
- `${Oe.text}${Oe.repeat % 2 === 1 ? " " : ""}`
3119
- ) : "", [ve, st] = we(I), it = ae(
3120
- (r) => {
3121
- st(r), P == null || P(r), fe(
3122
- _(r === "table" ? "heatmap.announce.tableView" : "heatmap.announce.heatmapView")
3123
- );
3119
+ `${Pe.text}${Pe.repeat % 2 === 1 ? " " : ""}`
3120
+ ) : "", [Ie, yt] = ve(
3121
+ p ? P : "heatmap"
3122
+ ), it = ae(
3123
+ (i) => {
3124
+ i === "table" && !p || (yt(i), K == null || K(i), Ee(
3125
+ C(i === "table" ? "heatmap.announce.tableView" : "heatmap.announce.heatmapView")
3126
+ ));
3124
3127
  },
3125
- [P, fe, _]
3126
- ), [yt, lt] = we(D), De = O ?? yt, Kt = ae(
3127
- (r) => {
3128
- O === void 0 && lt(r), y == null || y(r);
3128
+ [K, Ee, C, p]
3129
+ ), [lt, ct] = ve(k), dt = D ?? lt, xt = ae(
3130
+ (i) => {
3131
+ D === void 0 && ct(i), E == null || E(i);
3129
3132
  },
3130
- [O, y]
3131
- ), [_e, xt] = we(
3132
- () => new Set(g ?? [])
3133
- ), ye = ae(
3134
- (r, h) => {
3135
- if (_e.has(r) === h) return;
3136
- xt((S) => {
3137
- if (S.has(r) === h) return S;
3138
- const k = new Set(S);
3139
- return h ? k.add(r) : k.delete(r), k;
3133
+ [D, E]
3134
+ ), [Se, Ne] = ve(
3135
+ () => new Set(O ?? [])
3136
+ ), ze = ae(
3137
+ (i, g) => {
3138
+ if (Se.has(i) === g) return;
3139
+ Ne((F) => {
3140
+ if (F.has(i) === g) return F;
3141
+ const T = new Set(F);
3142
+ return g ? T.add(i) : T.delete(i), T;
3140
3143
  });
3141
- const M = Z.groupLabel(r);
3142
- fe(
3143
- h ? _("heatmap.announce.groupCollapsed", { group: M }) : _("heatmap.announce.groupExpanded", { group: M })
3144
+ const M = re.groupLabel(i);
3145
+ Ee(
3146
+ g ? C("heatmap.announce.groupCollapsed", { group: M }) : C("heatmap.announce.groupExpanded", { group: M })
3144
3147
  );
3145
3148
  },
3146
- [_e, fe, Z, _]
3147
- ), Ue = ae(
3148
- (r) => ye(r, !_e.has(r)),
3149
- [_e, ye]
3150
- ), Ke = X(
3151
- () => new Intl.Collator(V, { numeric: !0, sensitivity: "base" }),
3152
- [V]
3153
- ), It = De === "label" && Z.masksRows ? "none" : De, xe = X(
3154
- () => Po(q, t, n, {
3155
- rowMethod: qe,
3156
- columnMethod: bt,
3157
- groupColumnMethod: je,
3149
+ [Se, Ee, re, C]
3150
+ ), We = ae(
3151
+ (i) => ze(i, !Se.has(i)),
3152
+ [Se, ze]
3153
+ ), It = X(
3154
+ () => new Intl.Collator(ee, { numeric: !0, sensitivity: "base" }),
3155
+ [ee]
3156
+ ), kt = dt === "label" && re.masksRows ? "none" : dt, be = X(
3157
+ () => Po(L, t, n, {
3158
+ rowMethod: bt,
3159
+ columnMethod: $e,
3160
+ groupColumnMethod: Fe,
3158
3161
  groups: a,
3159
3162
  minCount: l,
3160
3163
  getTotal: v,
3161
3164
  valueType: d
3162
3165
  }),
3163
3166
  [
3164
- q,
3167
+ L,
3165
3168
  t,
3166
3169
  n,
3167
- qe,
3168
3170
  bt,
3169
- je,
3171
+ $e,
3172
+ Fe,
3170
3173
  a,
3171
3174
  l,
3172
3175
  v,
3173
3176
  d
3174
3177
  ]
3175
- ), Ye = X(
3178
+ ), ue = X(
3176
3179
  () => Wo(
3177
- t.map((r, h) => h),
3180
+ t.map((i, g) => g),
3178
3181
  t,
3179
- xe.rows,
3180
- It,
3181
- Ke
3182
+ be.rows,
3183
+ kt,
3184
+ It
3182
3185
  ),
3183
- [t, xe.rows, It, Ke]
3184
- ), de = X(
3185
- () => pn(t, Ye, R, _e),
3186
- [t, Ye, R, _e]
3187
- ), Fe = X(
3188
- () => pn(t, Ye, R, /* @__PURE__ */ new Set()),
3189
- [t, Ye, R]
3190
- ), Ie = X(
3191
- () => new Map(t.map((r, h) => [r.id, h])),
3186
+ [t, be.rows, kt, It]
3187
+ ), Be = X(
3188
+ () => pn(t, ue, h, Se),
3189
+ [t, ue, h, Se]
3190
+ ), Le = X(
3191
+ () => pn(t, ue, h, /* @__PURE__ */ new Set()),
3192
+ [t, ue, h]
3193
+ ), Oe = X(
3194
+ () => new Map(t.map((i, g) => [i.id, g])),
3192
3195
  [t]
3193
- ), Se = X(
3194
- () => new Map(n.map((r, h) => [String(r.id), h])),
3196
+ ), ke = X(
3197
+ () => new Map(n.map((i, g) => [String(i.id), g])),
3195
3198
  [n]
3196
- ), ct = ae(
3197
- (r) => Se.get(r),
3198
- [Se]
3199
- ), ze = ae(
3200
- (r, h) => {
3201
- const M = t[r], S = n[h], k = q[r][h];
3199
+ ), Bt = ae(
3200
+ (i) => ke.get(i),
3201
+ [ke]
3202
+ ), Ce = ae(
3203
+ (i, g) => {
3204
+ const M = t[i], F = n[g], T = L[i][g];
3202
3205
  return {
3203
3206
  rowId: M.id,
3204
- columnId: S.id,
3207
+ columnId: F.id,
3205
3208
  row: M,
3206
- column: S,
3207
- rowIndex: r,
3208
- columnIndex: h,
3209
- value: k.value,
3210
- count: k.count,
3211
- label: k.label,
3212
- status: k.status,
3213
- step: k.status === "value" && k.value !== null ? ne.stepOf(k.value) : null
3209
+ column: F,
3210
+ rowIndex: i,
3211
+ columnIndex: g,
3212
+ value: T.value,
3213
+ count: T.count,
3214
+ label: T.label,
3215
+ status: T.status,
3216
+ step: T.status === "value" && T.value !== null ? me.stepOf(T.value) : null
3214
3217
  };
3215
3218
  },
3216
- [t, n, q, ne]
3217
- ), Je = ae(
3218
- (r) => {
3219
- const h = r.row.group === void 0 ? void 0 : pe.get(r.row.group);
3219
+ [t, n, L, me]
3220
+ ), Ue = ae(
3221
+ (i) => {
3222
+ const g = i.row.group === void 0 ? void 0 : Re.get(i.row.group);
3220
3223
  return {
3221
- rowId: r.rowId,
3222
- columnId: r.columnId,
3224
+ rowId: i.rowId,
3225
+ columnId: i.columnId,
3223
3226
  row: {
3224
- id: r.row.id,
3225
- label: Z.rowLabel(r.row),
3226
- ...h === void 0 ? {} : { group: h }
3227
+ id: i.row.id,
3228
+ label: re.rowLabel(i.row),
3229
+ ...g === void 0 ? {} : { group: g }
3227
3230
  },
3228
3231
  column: {
3229
- id: r.column.id,
3230
- label: Z.columnLabel(r.column)
3232
+ id: i.column.id,
3233
+ label: re.columnLabel(i.column)
3231
3234
  },
3232
- rowIndex: r.rowIndex,
3233
- columnIndex: r.columnIndex,
3234
- value: r.value,
3235
- count: r.count,
3236
- status: r.status,
3237
- step: r.step
3235
+ rowIndex: i.rowIndex,
3236
+ columnIndex: i.columnIndex,
3237
+ value: i.value,
3238
+ count: i.count,
3239
+ status: i.status,
3240
+ step: i.step
3238
3241
  };
3239
3242
  },
3240
- [Z, pe]
3241
- ), Be = ae(
3242
- (r) => Y ? Y(F ? Je(r) : r, {
3243
- privacyMode: F
3244
- }) : Z.sentence(
3245
- Z.rowLabel(r.row),
3246
- Z.columnLabel(r.column),
3247
- q[r.rowIndex][r.columnIndex]
3243
+ [re, Re]
3244
+ ), Ye = ae(
3245
+ (i) => _ ? _(B ? Ue(i) : i, {
3246
+ privacyMode: B
3247
+ }) : re.sentence(
3248
+ re.rowLabel(i.row),
3249
+ re.columnLabel(i.column),
3250
+ L[i.rowIndex][i.columnIndex]
3248
3251
  ),
3249
- [Y, F, Je, Z, q]
3250
- ), Ge = L !== void 0, [kt, Ft] = we(
3251
- () => jt(G)
3252
- ), he = X(() => {
3253
- const r = Ge ? jt(L) : kt, h = /* @__PURE__ */ new Set();
3254
- for (const M of r) {
3255
- const [S, k] = Et(M);
3256
- Ie.has(S) && Se.has(k) && h.add(M);
3252
+ [_, B, Ue, re, L]
3253
+ ), Je = V !== void 0, [Mt, Qe] = ve(
3254
+ () => jt(Z)
3255
+ ), fe = X(() => {
3256
+ const i = Je ? jt(V) : Mt, g = /* @__PURE__ */ new Set();
3257
+ for (const M of i) {
3258
+ const [F, T] = Ht(M);
3259
+ Oe.has(F) && ke.has(T) && g.add(M);
3257
3260
  }
3258
- return h;
3261
+ return g;
3259
3262
  }, [
3260
- Ge,
3261
- L,
3262
- kt,
3263
- Ie,
3264
- Se
3265
- ]), Ve = ae(
3266
- (r) => {
3267
- const h = [];
3268
- for (const M of r) {
3269
- const [S, k] = Et(M), U = Ie.get(S), j = Se.get(k);
3270
- U !== void 0 && j !== void 0 && h.push(ze(U, j));
3263
+ Je,
3264
+ V,
3265
+ Mt,
3266
+ Oe,
3267
+ ke
3268
+ ]), St = ae(
3269
+ (i) => {
3270
+ const g = [];
3271
+ for (const M of i) {
3272
+ const [F, T] = Ht(M), U = Oe.get(F), Y = ke.get(T);
3273
+ U !== void 0 && Y !== void 0 && g.push(Ce(U, Y));
3271
3274
  }
3272
- return h;
3275
+ return g;
3273
3276
  },
3274
- [Ie, Se, ze]
3275
- ), Mt = ae(
3276
- (r, h) => Z.cellName(
3277
- Z.rowLabel(t[r]),
3278
- Z.columnLabel(n[h])
3277
+ [Oe, ke, Ce]
3278
+ ), Nt = ae(
3279
+ (i, g) => re.cellName(
3280
+ re.rowLabel(t[i]),
3281
+ re.columnLabel(n[g])
3279
3282
  ),
3280
- [Z, t, n]
3281
- ), He = ae(
3282
- (r, h, M = !1) => {
3283
- Ge || Ft(r), J == null || J(Ve(r)), fe(h, M);
3283
+ [re, t, n]
3284
+ ), Ae = ae(
3285
+ (i, g, M = !1) => {
3286
+ Je || Qe(i), $ == null || $(St(i)), Ee(g, M);
3284
3287
  },
3285
- [Ge, J, Ve, fe]
3286
- ), $e = ae(
3287
- (r) => r === 0 ? _("heatmap.announce.cleared") : _("heatmap.announce.count", {
3288
- count: r,
3289
- formatted: be(r)
3288
+ [Je, $, St, Ee]
3289
+ ), Xe = ae(
3290
+ (i) => i === 0 ? C("heatmap.announce.cleared") : C("heatmap.announce.count", {
3291
+ count: i,
3292
+ formatted: de(i)
3290
3293
  }),
3291
- [_, be]
3292
- ), Pe = X(
3293
- () => de.flatMap((r) => r.kind === "data" ? [r.rowIndex] : []),
3294
- [de]
3295
- ), Qe = ae(
3296
- (r, h) => {
3297
- const M = Pe.indexOf(r.rowIndex), S = Pe.indexOf(h.rowIndex), k = /* @__PURE__ */ new Set();
3298
- if (M === -1 || S === -1) return k;
3299
- const [U, j] = M <= S ? [M, S] : [S, M], [oe, se] = r.col <= h.col ? [r.col, h.col] : [h.col, r.col];
3300
- for (let ue = U; ue <= j; ue += 1) {
3301
- const ce = t[Pe[ue]].id;
3302
- for (let Ne = oe; Ne <= se; Ne += 1)
3303
- k.add(Ct(ce, n[Ne].id));
3294
+ [C, de]
3295
+ ), qe = X(
3296
+ () => Be.flatMap((i) => i.kind === "data" ? [i.rowIndex] : []),
3297
+ [Be]
3298
+ ), Ze = ae(
3299
+ (i, g) => {
3300
+ const M = qe.indexOf(i.rowIndex), F = qe.indexOf(g.rowIndex), T = /* @__PURE__ */ new Set();
3301
+ if (M === -1 || F === -1) return T;
3302
+ const [U, Y] = M <= F ? [M, F] : [F, M], [Q, pe] = i.col <= g.col ? [i.col, g.col] : [g.col, i.col];
3303
+ for (let se = U; se <= Y; se += 1) {
3304
+ const Ve = t[qe[se]].id;
3305
+ for (let ge = Q; ge <= pe; ge += 1)
3306
+ T.add(Ft(Ve, n[ge].id));
3304
3307
  }
3305
- return k;
3308
+ return T;
3306
3309
  },
3307
- [Pe, t, n]
3308
- ), St = ae(
3309
- (r, h, M) => {
3310
- if (z == null || z(ze(r, h)), !M || T === "none") return;
3311
- const S = Ct(t[r].id, n[h].id), k = Mt(r, h);
3312
- if (T === "multiple") {
3313
- const j = new Set(he), oe = !j.has(S);
3314
- oe ? j.add(S) : j.delete(S), He(
3315
- j,
3316
- _(oe ? "heatmap.announce.added" : "heatmap.announce.removed", {
3317
- cell: k,
3318
- count: j.size,
3319
- formatted: be(j.size)
3310
+ [qe, t, n]
3311
+ ), ut = ae(
3312
+ (i, g, M) => {
3313
+ if (W == null || W(Ce(i, g)), !M || N === "none") return;
3314
+ const F = Ft(t[i].id, n[g].id), T = Nt(i, g);
3315
+ if (N === "multiple") {
3316
+ const Y = new Set(fe), Q = !Y.has(F);
3317
+ Q ? Y.add(F) : Y.delete(F), Ae(
3318
+ Y,
3319
+ C(Q ? "heatmap.announce.added" : "heatmap.announce.removed", {
3320
+ cell: T,
3321
+ count: Y.size,
3322
+ formatted: de(Y.size)
3320
3323
  })
3321
3324
  );
3322
3325
  return;
3323
3326
  }
3324
- const U = he.size === 1 && he.has(S);
3325
- He(
3326
- U ? /* @__PURE__ */ new Set() : /* @__PURE__ */ new Set([S]),
3327
- U ? _("heatmap.announce.cleared") : _("heatmap.announce.selected", { cell: k })
3327
+ const U = fe.size === 1 && fe.has(F);
3328
+ Ae(
3329
+ U ? /* @__PURE__ */ new Set() : /* @__PURE__ */ new Set([F]),
3330
+ U ? C("heatmap.announce.cleared") : C("heatmap.announce.selected", { cell: T })
3328
3331
  );
3329
3332
  },
3330
3333
  [
3331
- z,
3332
- ze,
3333
- T,
3334
+ W,
3335
+ Ce,
3336
+ N,
3334
3337
  t,
3335
3338
  n,
3336
- Mt,
3337
- he,
3338
- He,
3339
- be,
3340
- _
3339
+ Nt,
3340
+ fe,
3341
+ Ae,
3342
+ de,
3343
+ C
3341
3344
  ]
3342
- ), dt = ae(
3343
- (r, h) => {
3344
- if (T !== "range" && T !== "multiple") return;
3345
- const M = Qe(r, h);
3346
- M.size === he.size && [...M].every((S) => he.has(S)) || He(M, $e(M.size), !0);
3345
+ ), et = ae(
3346
+ (i, g) => {
3347
+ if (N !== "range" && N !== "multiple") return;
3348
+ const M = Ze(i, g);
3349
+ M.size === fe.size && [...M].every((F) => fe.has(F)) || Ae(M, Xe(M.size), !0);
3347
3350
  },
3348
- [T, Qe, he, He, $e]
3349
- ), Xe = X(
3350
- () => new Map([...pe].map(([r, h]) => [h, r])),
3351
- [pe]
3352
- ), ut = {
3353
- selected: he,
3354
- selection: T,
3355
- view: ve,
3356
- sortRows: De,
3357
- collapsed: _e,
3358
- groupRows: R,
3351
+ [N, Ze, fe, Ae, Xe]
3352
+ ), At = X(
3353
+ () => new Map([...Re].map(([i, g]) => [g, i])),
3354
+ [Re]
3355
+ ), _t = {
3356
+ selected: fe,
3357
+ selection: N,
3358
+ view: Ie,
3359
+ sortRows: dt,
3360
+ collapsed: Se,
3361
+ groupRows: h,
3359
3362
  rows: t,
3360
3363
  columns: n,
3361
- expandedBody: Fe,
3362
- groupIds: pe,
3363
- groupByPublicId: Xe,
3364
- rowIndexById: Ie,
3365
- columnIndexById: Se,
3366
- matrix: q,
3367
- scale: ne,
3364
+ expandedBody: Le,
3365
+ groupIds: Re,
3366
+ groupByPublicId: At,
3367
+ rowIndexById: Oe,
3368
+ columnIndexById: ke,
3369
+ matrix: L,
3370
+ scale: me,
3368
3371
  setView: it,
3369
- setSortRows: Kt,
3370
- setGroupCollapsed: ye,
3371
- commitSelection: He,
3372
- rectangle: Qe,
3373
- countMessage: $e
3374
- }, ee = ie(ut);
3375
- ee.current = ut;
3376
- const zt = X(() => {
3377
- const r = (k) => {
3378
- const { columns: U, columnIndexById: j } = ee.current, oe = [];
3379
- for (const se of k) {
3380
- const [ue, ce] = Et(se), Ne = j.get(ce);
3381
- Ne !== void 0 && oe.push({ rowId: ue, columnId: U[Ne].id });
3372
+ setSortRows: xt,
3373
+ setGroupCollapsed: ze,
3374
+ commitSelection: Ae,
3375
+ rectangle: Ze,
3376
+ countMessage: Xe
3377
+ }, te = le(_t);
3378
+ te.current = _t;
3379
+ const Rt = X(() => {
3380
+ const i = (T) => {
3381
+ const { columns: U, columnIndexById: Y } = te.current, Q = [];
3382
+ for (const pe of T) {
3383
+ const [se, Ve] = Ht(pe), ge = Y.get(Ve);
3384
+ ge !== void 0 && Q.push({ rowId: se, columnId: U[ge].id });
3382
3385
  }
3383
- return oe;
3384
- }, h = (k) => {
3385
- const { rowIndexById: U, columnIndexById: j } = ee.current, oe = U.get(k.rowId), se = j.get(String(k.columnId));
3386
- return oe === void 0 || se === void 0 ? null : { rowIndex: oe, col: se };
3387
- }, M = (k) => {
3388
- const U = h(k);
3386
+ return Q;
3387
+ }, g = (T) => {
3388
+ const { rowIndexById: U, columnIndexById: Y } = te.current, Q = U.get(T.rowId), pe = Y.get(String(T.columnId));
3389
+ return Q === void 0 || pe === void 0 ? null : { rowIndex: Q, col: pe };
3390
+ }, M = (T) => {
3391
+ const U = g(T);
3389
3392
  if (!U)
3390
3393
  throw new Error(
3391
- `Heatmap: no cell at row "${k.rowId}", column "${String(k.columnId)}".`
3394
+ `Heatmap: no cell at row "${T.rowId}", column "${String(T.columnId)}".`
3392
3395
  );
3393
3396
  return U;
3394
- }, S = () => {
3395
- if (ee.current.selection === "none")
3397
+ }, F = () => {
3398
+ if (te.current.selection === "none")
3396
3399
  throw new Error('Heatmap: selection is off (selection="none").');
3397
3400
  };
3398
3401
  return {
3399
- getSelection: () => r(ee.current.selected),
3400
- getSelectionMode: () => ee.current.selection,
3401
- selectCells: (k) => {
3402
- S(), k.forEach(M);
3403
- const { selection: U } = ee.current, j = U === "single" ? k.slice(0, 1) : k, oe = jt(j);
3404
- ee.current.commitSelection(
3405
- oe,
3406
- ee.current.countMessage(oe.size)
3402
+ getSelection: () => i(te.current.selected),
3403
+ getSelectionMode: () => te.current.selection,
3404
+ selectCells: (T) => {
3405
+ F(), T.forEach(M);
3406
+ const { selection: U } = te.current, Y = U === "single" ? T.slice(0, 1) : T, Q = jt(Y);
3407
+ te.current.commitSelection(
3408
+ Q,
3409
+ te.current.countMessage(Q.size)
3407
3410
  );
3408
3411
  },
3409
- selectRange: (k, U) => {
3410
- const { selection: j } = ee.current;
3411
- if (j !== "range" && j !== "multiple")
3412
+ selectRange: (T, U) => {
3413
+ const { selection: Y } = te.current;
3414
+ if (Y !== "range" && Y !== "multiple")
3412
3415
  throw new Error(
3413
3416
  'Heatmap: select_range needs selection="range" or "multiple".'
3414
3417
  );
3415
- const oe = M(k), se = M(U), ue = ee.current.rectangle(oe, se);
3416
- ee.current.commitSelection(
3417
- ue,
3418
- ee.current.countMessage(ue.size)
3418
+ const Q = M(T), pe = M(U), se = te.current.rectangle(Q, pe);
3419
+ te.current.commitSelection(
3420
+ se,
3421
+ te.current.countMessage(se.size)
3419
3422
  );
3420
3423
  },
3421
3424
  clearSelection: () => {
3422
- S(), ee.current.selected.size !== 0 && ee.current.commitSelection(
3425
+ F(), te.current.selected.size !== 0 && te.current.commitSelection(
3423
3426
  /* @__PURE__ */ new Set(),
3424
- ee.current.countMessage(0)
3427
+ te.current.countMessage(0)
3425
3428
  );
3426
3429
  },
3427
- readCell: (k) => {
3428
- const U = h(k);
3430
+ readCell: (T) => {
3431
+ const U = g(T);
3429
3432
  if (!U) return null;
3430
- const j = ee.current.matrix[U.rowIndex][U.col];
3433
+ const Y = te.current.matrix[U.rowIndex][U.col];
3431
3434
  return {
3432
- value: j.value,
3433
- count: j.count,
3434
- status: j.status,
3435
- step: j.status === "value" && j.value !== null ? ee.current.scale.stepOf(j.value) : null
3435
+ value: Y.value,
3436
+ count: Y.count,
3437
+ status: Y.status,
3438
+ step: Y.status === "value" && Y.value !== null ? te.current.scale.stepOf(Y.value) : null
3436
3439
  };
3437
3440
  },
3438
- getView: () => ee.current.view,
3439
- setView: (k) => ee.current.setView(k),
3440
- getSortRows: () => ee.current.sortRows,
3441
- setSortRows: (k) => ee.current.setSortRows(k),
3441
+ getView: () => te.current.view,
3442
+ setView: (T) => te.current.setView(T),
3443
+ getSortRows: () => te.current.sortRows,
3444
+ setSortRows: (T) => te.current.setSortRows(T),
3442
3445
  getRowIds: () => {
3443
- const { expandedBody: k, rows: U } = ee.current;
3444
- return k.flatMap(
3445
- (j) => j.kind === "data" ? [U[j.rowIndex].id] : []
3446
+ const { expandedBody: T, rows: U } = te.current;
3447
+ return T.flatMap(
3448
+ (Y) => Y.kind === "data" ? [U[Y.rowIndex].id] : []
3446
3449
  );
3447
3450
  },
3448
- getColumnIds: () => ee.current.columns.map((k) => k.id),
3451
+ getColumnIds: () => te.current.columns.map((T) => T.id),
3449
3452
  getGroupIds: () => {
3450
3453
  const {
3451
- groupRows: k,
3454
+ groupRows: T,
3452
3455
  expandedBody: U,
3453
- groupIds: j
3454
- } = ee.current;
3455
- return k ? U.flatMap(
3456
- (oe) => oe.kind === "group" ? [j.get(oe.groupId) ?? ""] : []
3456
+ groupIds: Y
3457
+ } = te.current;
3458
+ return T ? U.flatMap(
3459
+ (Q) => Q.kind === "group" ? [Y.get(Q.groupId) ?? ""] : []
3457
3460
  ) : [];
3458
3461
  },
3459
3462
  getCollapsedGroups: () => {
3460
- const { collapsed: k, groupIds: U } = ee.current;
3461
- return [...k].flatMap((j) => {
3462
- const oe = U.get(j);
3463
- return oe === void 0 ? [] : [oe];
3463
+ const { collapsed: T, groupIds: U } = te.current;
3464
+ return [...T].flatMap((Y) => {
3465
+ const Q = U.get(Y);
3466
+ return Q === void 0 ? [] : [Q];
3464
3467
  });
3465
3468
  },
3466
- setGroupCollapsed: (k, U) => {
3467
- const { groupRows: j, groupByPublicId: oe } = ee.current;
3468
- if (!j)
3469
+ setGroupCollapsed: (T, U) => {
3470
+ const { groupRows: Y, groupByPublicId: Q } = te.current;
3471
+ if (!Y)
3469
3472
  throw new Error(
3470
3473
  "Heatmap: rows are not grouped (groupRows is off)."
3471
3474
  );
3472
- const se = oe.get(k);
3473
- if (se === void 0)
3474
- throw new Error(`Heatmap: no group "${k}".`);
3475
- ee.current.setGroupCollapsed(se, U);
3475
+ const pe = Q.get(T);
3476
+ if (pe === void 0)
3477
+ throw new Error(`Heatmap: no group "${T}".`);
3478
+ te.current.setGroupCollapsed(pe, U);
3476
3479
  }
3477
3480
  };
3478
3481
  }, []);
3479
- Wn(io, zt, H);
3480
- const pt = X(
3481
- () => q.some((r) => r.some((h) => h.status === "empty")),
3482
- [q]
3483
- ), Nt = X(() => {
3484
- const r = (S) => S.status === "low-sample", h = R ? [...xe.groupColumns.values()].flat() : [], M = R ? [...xe.groups.values()] : [];
3485
- return h.some(r) || p !== !1 && (xe.rows.some(r) || M.some(r)) || N !== !1 && (xe.columns.some(r) || p !== !1 && r(xe.grand));
3486
- }, [xe, p, N, R]), mt = X(
3487
- () => q.some((r) => r.some((h) => h.status === "low-sample")),
3488
- [q]
3489
- ), Re = X(
3482
+ Wn(io, Rt, J);
3483
+ const Tt = X(
3484
+ () => L.some((i) => i.some((g) => g.status === "empty")),
3485
+ [L]
3486
+ ), pt = X(() => {
3487
+ const i = (F) => F.status === "low-sample", g = h ? [...be.groupColumns.values()].flat() : [], M = h ? [...be.groups.values()] : [];
3488
+ return g.some(i) || S !== !1 && (be.rows.some(i) || M.some(i)) || R !== !1 && (be.columns.some(i) || S !== !1 && i(be.grand));
3489
+ }, [be, S, R, h]), Ge = X(
3490
+ () => L.some((i) => i.some((g) => g.status === "low-sample")),
3491
+ [L]
3492
+ ), ye = X(
3490
3493
  () => ({
3491
- palette: Me,
3492
- scale: ne,
3493
- describer: Z,
3494
- hasEmpty: pt,
3495
- hasLowSample: mt,
3496
- hasWithheldTotal: Nt,
3494
+ palette: xe,
3495
+ scale: me,
3496
+ describer: re,
3497
+ hasEmpty: Tt,
3498
+ hasLowSample: Ge,
3499
+ hasWithheldTotal: pt,
3497
3500
  minCount: l,
3498
- tooltipText: Be
3501
+ tooltipText: Ye
3499
3502
  }),
3500
3503
  [
3501
- Me,
3502
- ne,
3503
- Z,
3504
+ xe,
3505
+ me,
3506
+ re,
3507
+ Tt,
3508
+ Ge,
3504
3509
  pt,
3505
- mt,
3506
- Nt,
3507
3510
  l,
3508
- Be
3511
+ Ye
3509
3512
  ]
3510
- ), ke = wn({ className: Q });
3511
- if (K)
3512
- return /* @__PURE__ */ C(Tt.Provider, { value: Re, children: /* @__PURE__ */ le(
3513
+ ), mt = wn({ className: ne });
3514
+ if (q)
3515
+ return /* @__PURE__ */ H(Ot.Provider, { value: ye, children: /* @__PURE__ */ ce(
3513
3516
  "div",
3514
3517
  {
3515
- ref: x,
3518
+ ref: G,
3516
3519
  "data-component": "heatmap",
3517
- "data-component-id": H,
3518
- className: ke,
3520
+ "data-component-id": J,
3521
+ className: mt,
3519
3522
  children: [
3520
- /* @__PURE__ */ le(
3523
+ /* @__PURE__ */ ce(
3521
3524
  "div",
3522
3525
  {
3523
3526
  role: "status",
3524
- "aria-label": _("heatmap.loading"),
3527
+ "aria-label": C("heatmap.loading"),
3525
3528
  "aria-busy": "true",
3526
3529
  className: wn(),
3527
3530
  children: [
3528
- /* @__PURE__ */ C(
3531
+ /* @__PURE__ */ H(
3529
3532
  qt,
3530
3533
  {
3531
3534
  variant: "rectangular",
3532
3535
  className: "ds:h-[var(--spacing-md)] ds:w-[calc(var(--spacing-xl)*6)] ds:max-w-full"
3533
3536
  }
3534
3537
  ),
3535
- /* @__PURE__ */ C(
3538
+ /* @__PURE__ */ H(
3536
3539
  qt,
3537
3540
  {
3538
3541
  variant: "rectangular",
@@ -3542,111 +3545,111 @@ const ca = { type: "sequential", domain: "auto" }, jt = (e) => new Set((e ?? [])
3542
3545
  ]
3543
3546
  }
3544
3547
  ),
3545
- te
3548
+ I
3546
3549
  ]
3547
3550
  }
3548
3551
  ) });
3549
- if (t.length === 0 || n.length === 0 || !Bo(q))
3550
- return /* @__PURE__ */ C(Tt.Provider, { value: Re, children: /* @__PURE__ */ le(
3552
+ if (t.length === 0 || n.length === 0 || !Bo(L))
3553
+ return /* @__PURE__ */ H(Ot.Provider, { value: ye, children: /* @__PURE__ */ ce(
3551
3554
  "div",
3552
3555
  {
3553
- ref: x,
3556
+ ref: G,
3554
3557
  "data-component": "heatmap",
3555
- "data-component-id": H,
3556
- className: ke,
3558
+ "data-component-id": J,
3559
+ className: mt,
3557
3560
  children: [
3558
- /* @__PURE__ */ C(
3561
+ /* @__PURE__ */ H(
3559
3562
  Yn,
3560
3563
  {
3561
3564
  variant: "no-results",
3562
3565
  size: "sm",
3563
- title: _("heatmap.empty.title"),
3564
- description: _("heatmap.empty.description")
3566
+ title: C("heatmap.empty.title"),
3567
+ description: C("heatmap.empty.description")
3565
3568
  }
3566
3569
  ),
3567
- te
3570
+ I
3568
3571
  ]
3569
3572
  }
3570
3573
  ) });
3571
- const Bt = t.length * n.length > Uo, f = T !== "none" || z !== void 0;
3572
- return /* @__PURE__ */ C(Tt.Provider, { value: Re, children: /* @__PURE__ */ le(
3574
+ const f = t.length * n.length > Uo, b = N !== "none" || W !== void 0;
3575
+ return /* @__PURE__ */ H(Ot.Provider, { value: ye, children: /* @__PURE__ */ ce(
3573
3576
  "div",
3574
3577
  {
3575
- ref: x,
3578
+ ref: G,
3576
3579
  "data-component": "heatmap",
3577
- "data-component-id": H,
3578
- className: ke,
3580
+ "data-component-id": J,
3581
+ className: mt,
3579
3582
  children: [
3580
- /* @__PURE__ */ le("div", { className: Jo(), children: [
3581
- b !== !1 ? /* @__PURE__ */ C(an, { variant: b }) : null,
3582
- /* @__PURE__ */ C(
3583
+ /* @__PURE__ */ ce("div", { className: Jo(), children: [
3584
+ y !== !1 ? /* @__PURE__ */ H(an, { variant: y }) : null,
3585
+ p ? /* @__PURE__ */ H(
3583
3586
  Un,
3584
3587
  {
3585
3588
  intent: "outline",
3586
3589
  size: "sm",
3587
3590
  className: "ds:ms-auto",
3588
- startIcon: ve === "table" ? /* @__PURE__ */ C(ao, { "aria-hidden": "true" }) : /* @__PURE__ */ C(so, { "aria-hidden": "true" }),
3589
- onPointerEnter: ve === "table" ? void 0 : xn,
3590
- onFocus: ve === "table" ? void 0 : xn,
3591
- onClick: () => it(ve === "table" ? "heatmap" : "table"),
3592
- children: _(ve === "table" ? "heatmap.viewAsHeatmap" : "heatmap.viewAsTable")
3591
+ startIcon: Ie === "table" ? /* @__PURE__ */ H(ao, { "aria-hidden": "true" }) : /* @__PURE__ */ H(so, { "aria-hidden": "true" }),
3592
+ onPointerEnter: Ie === "table" ? void 0 : xn,
3593
+ onFocus: Ie === "table" ? void 0 : xn,
3594
+ onClick: () => it(Ie === "table" ? "heatmap" : "table"),
3595
+ children: C(Ie === "table" ? "heatmap.viewAsHeatmap" : "heatmap.viewAsTable")
3593
3596
  }
3594
- )
3597
+ ) : null
3595
3598
  ] }),
3596
- ve === "table" ? /* @__PURE__ */ C(
3599
+ Ie === "table" ? /* @__PURE__ */ H(
3597
3600
  la,
3598
3601
  {
3599
- onLoadError: () => fe(_("heatmap.announce.tableFailed")),
3602
+ onLoadError: () => Ee(C("heatmap.announce.tableFailed")),
3600
3603
  title: e,
3601
- rowsLabel: c,
3604
+ rowsLabel: x,
3602
3605
  rows: t,
3603
3606
  columns: n,
3604
- matrix: q,
3605
- body: Fe,
3606
- grouped: R,
3607
- groupIds: pe,
3608
- describer: Z,
3609
- totals: xe,
3610
- rowTotals: p,
3611
- columnTotals: N,
3612
- groupColumnMethod: je
3607
+ matrix: L,
3608
+ body: Le,
3609
+ grouped: h,
3610
+ groupIds: Re,
3611
+ describer: re,
3612
+ totals: be,
3613
+ rowTotals: S,
3614
+ columnTotals: R,
3615
+ groupColumnMethod: Fe
3613
3616
  },
3614
- `${F}-${$}`
3615
- ) : /* @__PURE__ */ C(Qn, { delayDuration: 0, children: /* @__PURE__ */ C(
3617
+ `${B}-${c}`
3618
+ ) : /* @__PURE__ */ H(Qn, { delayDuration: 0, children: /* @__PURE__ */ H(
3616
3619
  ra,
3617
3620
  {
3618
3621
  title: e,
3619
- rowsLabel: c,
3622
+ rowsLabel: x,
3620
3623
  rows: t,
3621
3624
  columns: n,
3622
- matrix: q,
3623
- body: de,
3624
- scale: ne,
3625
- palette: Me,
3626
- describer: Z,
3625
+ matrix: L,
3626
+ body: Be,
3627
+ scale: me,
3628
+ palette: xe,
3629
+ describer: re,
3627
3630
  showValues: w,
3628
- totals: xe,
3629
- rowTotals: p,
3630
- columnTotals: N,
3631
- groupColumnMethod: je,
3632
- groupIds: pe,
3633
- selectionMode: T,
3634
- selected: he,
3635
- columnIndexOfKey: ct,
3636
- interactive: f,
3637
- virtualised: Bt,
3638
- size: A,
3639
- density: E,
3640
- cellInfo: ze,
3641
- tooltipText: Be,
3642
- describeFocused: Y !== void 0,
3643
- onActivate: St,
3644
- onRange: dt,
3645
- onToggleGroup: Ue
3631
+ totals: be,
3632
+ rowTotals: S,
3633
+ columnTotals: R,
3634
+ groupColumnMethod: Fe,
3635
+ groupIds: Re,
3636
+ selectionMode: N,
3637
+ selected: fe,
3638
+ columnIndexOfKey: Bt,
3639
+ interactive: b,
3640
+ virtualised: f,
3641
+ size: z,
3642
+ density: A,
3643
+ cellInfo: Ce,
3644
+ tooltipText: Ye,
3645
+ describeFocused: _ !== void 0,
3646
+ onActivate: ut,
3647
+ onRange: et,
3648
+ onToggleGroup: We
3646
3649
  }
3647
3650
  ) }),
3648
- te,
3649
- /* @__PURE__ */ C(Jn, { children: Dt }, String(F))
3651
+ I,
3652
+ /* @__PURE__ */ H(Jn, { children: je }, String(B))
3650
3653
  ]
3651
3654
  }
3652
3655
  ) });
@@ -3663,4 +3666,4 @@ export {
3663
3666
  Dn as b,
3664
3667
  io as h
3665
3668
  };
3666
- //# sourceMappingURL=heatmap-Cz0Krieg.js.map
3669
+ //# sourceMappingURL=heatmap-D4qqpCEj.js.map