@alfadocs/ui-kit 1.115.0 → 1.117.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 (339) hide show
  1. package/dist/_chunks/accessible-target-D3j6F-AG.js +7 -0
  2. package/dist/_chunks/{actions-cell-renderer-bI27uXXC.js → actions-cell-renderer-DTaIQKp9.js} +3 -3
  3. package/dist/_chunks/{address-autocomplete-DC-H-MZw.js → address-autocomplete-Bnc9ieKO.js} +2 -2
  4. package/dist/_chunks/{address-fields-D5Ije0S2.js → address-fields-RIaGnpnm.js} +4 -4
  5. package/dist/_chunks/{anamnesis-card-Ddnrdfx3.js → anamnesis-card-sUFT0dpF.js} +2 -2
  6. package/dist/_chunks/{anamnesis-summary-card-S1H_AARG.js → anamnesis-summary-card-BtFPpegp.js} +2 -2
  7. package/dist/_chunks/{anamnesis-summary-rows-BZ36ULQk.js → anamnesis-summary-rows-BbAREK-3.js} +7 -7
  8. package/dist/_chunks/{antenatal-schedule-timeline-va9zx7tJ.js → antenatal-schedule-timeline-86YVlMYJ.js} +2 -2
  9. package/dist/_chunks/{appointment-card-D_-aBrx5.js → appointment-card-0PebvrOS.js} +3 -3
  10. package/dist/_chunks/{appointment-peek-DWfcpoGy.js → appointment-peek-DdUhqfEi.js} +2 -2
  11. package/dist/_chunks/{appointment-timeline-DxLu3afn.js → appointment-timeline-CC7nmBOH.js} +3 -3
  12. package/dist/_chunks/{appointment-tray-BhXOJpIJ.js → appointment-tray-B04zKY7g.js} +2 -2
  13. package/dist/_chunks/arrow-down-left-DECv-dJt.js +15 -0
  14. package/dist/_chunks/{balance-badge-cell-CXHihM22.js → balance-badge-cell-DPjab0eJ.js} +6 -6
  15. package/dist/_chunks/bill-line-table-vCnVo7_a.js +1565 -0
  16. package/dist/_chunks/{bishop-score-QJu-sM1y.js → bishop-score-CKztphVz.js} +2 -2
  17. package/dist/_chunks/{bmi-calculator-Ba4yoR31.js → bmi-calculator-rri5vvMt.js} +3 -3
  18. package/dist/_chunks/{button-group-CUnNnt8a.js → button-group-B2MJo0Se.js} +2 -2
  19. package/dist/_chunks/{calculator-dialog-D4TyJwqy.js → calculator-dialog-BGX5XQCM.js} +2 -2
  20. package/dist/_chunks/{calendar-appointment-editor-dialog-BVzFi4hH.js → calendar-appointment-editor-dialog-BEmBcb61.js} +18 -18
  21. package/dist/_chunks/{card-DVO3x8E-.js → card-n6W6LW-N.js} +78 -47
  22. package/dist/_chunks/{care-plan-card-BA3MfdfZ.js → care-plan-card-bGTIliXc.js} +3 -3
  23. package/dist/_chunks/{care-plan-entry-card-CUtFZ813.js → care-plan-entry-card-cdojypxu.js} +3 -3
  24. package/dist/_chunks/{chart-DebrFZ6L.js → chart-Aue_2dMb.js} +2 -2
  25. package/dist/_chunks/circle-off-DuT9pVy2.js +16 -0
  26. package/dist/_chunks/{clinical-note-card-Zz5_GEz-.js → clinical-note-card-DHn5W_bv.js} +2 -2
  27. package/dist/_chunks/combobox-BBCVQS-S.js +935 -0
  28. package/dist/_chunks/{compact-editor-fields-cP6yh7xv.js → compact-editor-fields-6sTWRLtf.js} +3 -3
  29. package/dist/_chunks/{connection-status-DjarASoU.js → connection-status-DWClakYw.js} +2 -2
  30. package/dist/_chunks/{contact-card-Cv-Nwvac.js → contact-card-CGpbYuxl.js} +2 -2
  31. package/dist/_chunks/{contact-profile-card-DMXWBBkU.js → contact-profile-card-BubJPyRB.js} +3 -3
  32. package/dist/_chunks/{country-select-CUuGOAoZ.js → country-select-C2GdvRtS.js} +2 -2
  33. package/dist/_chunks/{cycle-calculator-C68V9rdH.js → cycle-calculator-C8nWAeTk.js} +3 -3
  34. package/dist/_chunks/{dashboard-grid-DrOkTtya.js → dashboard-grid-CaxgaEgI.js} +2 -2
  35. package/dist/_chunks/{toolbar-Bc3pjfG5.js → data-grid-DiBSbN2Y.js} +3017 -3106
  36. package/dist/_chunks/{data-grid-tabs-CsLbIv0h.js → data-grid-tabs-D9Y4DeeH.js} +2 -2
  37. package/dist/_chunks/{data-table-DXaE2Ret.js → data-table-DhYx-hCD.js} +101 -100
  38. package/dist/_chunks/{date-range-panel-CBFfkgmz.js → date-range-panel-CT6nXjRM.js} +7 -7
  39. package/dist/_chunks/default-tabs-CD285u0C.js +2250 -0
  40. package/dist/_chunks/dialog-CIUn5oLb.js +348 -0
  41. package/dist/_chunks/{document-preview-WvJKHJOP.js → document-preview-BWDTCEHI.js} +3 -3
  42. package/dist/_chunks/dropdown-menu-Dw6sgQwJ.js +679 -0
  43. package/dist/_chunks/{due-date-calculator-C1UA5jpS.js → due-date-calculator-c1NJPw9F.js} +4 -4
  44. package/dist/_chunks/{editable-currency-cell-renderer-CtlMhLai.js → editable-currency-cell-renderer-BlK-8A7b.js} +2 -2
  45. package/dist/_chunks/{entity-summary-DGCBQDt1.js → entity-summary-BanguTa6.js} +2 -2
  46. package/dist/_chunks/export-files-BByoK9Cg.js +248 -0
  47. package/dist/_chunks/{face-scheme-DkoxiDCh.js → face-scheme-Bt07zQJU.js} +20 -19
  48. package/dist/_chunks/{fetal-weight-DmZzMRzB.js → fetal-weight-D0KofJJw.js} +3 -3
  49. package/dist/_chunks/{file-manager-DFFExyym.js → file-manager-CV1_GtjC.js} +5 -5
  50. package/dist/_chunks/{finished-terminal-BKTFUk3S.js → finished-terminal-FR8uc_Ws.js} +2 -2
  51. package/dist/_chunks/{forgot-password-form-Bc_UPax6.js → forgot-password-form-YvI9vX-G.js} +2 -2
  52. package/dist/_chunks/format-price-CIX0YJZn.js +179 -0
  53. package/dist/_chunks/{gestational-age-calculator-60y1RyQL.js → gestational-age-calculator-Cg4Gq42R.js} +3 -3
  54. package/dist/_chunks/{grid-context-AwsLJRhH.js → grid-context-jn9y8tNE.js} +4 -4
  55. package/dist/_chunks/{hcg-doubling-CC-dbKE8.js → hcg-doubling-BjTa_77t.js} +3 -3
  56. package/dist/_chunks/{header-settings-Df9q1uHt.js → header-settings-DsvheAOt.js} +160 -147
  57. package/dist/_chunks/{heatmap-eXdtmEoU.js → heatmap-BurtKmeu.js} +3 -3
  58. package/dist/_chunks/{help-me-write-templates-CWxgjDZl.js → help-me-write-templates-C28E_rOt.js} +2 -2
  59. package/dist/_chunks/highlighter-DSkckT2Q.js +15 -0
  60. package/dist/_chunks/{icon-button-group-C9mPK-bX.js → icon-button-group-BKtkVZ1W.js} +2 -2
  61. package/dist/_chunks/{kit-extensions-CzG0RmhQ.js → kit-extensions-C3oL0WTp.js} +7 -7
  62. package/dist/_chunks/{link-cell-renderer-Ditt5mvT.js → link-cell-renderer-NFNGdAGt.js} +4 -4
  63. package/dist/_chunks/{login-dev-card-CPndtWdz.js → login-dev-card-Dz3ezx1o.js} +2 -2
  64. package/dist/_chunks/map-view-Frj8vE7n.js +1105 -0
  65. package/dist/_chunks/{maps-core-gate-DkNqGkm3.js → maps-core-gate-Dgs7jXxy.js} +6 -6
  66. package/dist/_chunks/{marketplace-app-shell-CcEHJgDd.js → marketplace-app-shell-BOBWmzoT.js} +6 -6
  67. package/dist/_chunks/money-OE6_oDPH.js +138 -0
  68. package/dist/_chunks/{muscle-scheme-BkmDUTmk.js → muscle-scheme-C9dnSxzw.js} +2 -2
  69. package/dist/_chunks/{notes-panel-BVYG_MJE.js → notes-panel-CHR-Jv6N.js} +5 -5
  70. package/dist/_chunks/{notification-card-CPW4poUr.js → notification-card-DRMv2_pW.js} +20 -20
  71. package/dist/_chunks/{notification-tray-CQK3lw87.js → notification-tray-mlCfxNRH.js} +2 -2
  72. package/dist/_chunks/number-input-DUSvP7Dq.js +625 -0
  73. package/dist/_chunks/{operator-hero-BWayX73x.js → operator-hero-CnfWckNQ.js} +2 -2
  74. package/dist/_chunks/{optical-prescription-CvbN8yD2.js → optical-prescription-Da_r8pMr.js} +2 -2
  75. package/dist/_chunks/parts-CcyRkB8t.js +869 -0
  76. package/dist/_chunks/{patient-details-DlT-vpSe.js → patient-details-C4dHR4iu.js} +3 -3
  77. package/dist/_chunks/{patient-field-row-B54uzvu-.js → patient-field-row-0QP8KCVp.js} +5 -5
  78. package/dist/_chunks/{patient-search-DDRDCjZi.js → patient-search-D_S7joff.js} +3 -3
  79. package/dist/_chunks/{patient-summary-card-Dy9-CzON.js → patient-summary-card-x0-AhCyC.js} +4 -4
  80. package/dist/_chunks/{payment-automation-upsell-D7yaD4u1.js → payment-automation-upsell-CGdG2Mwk.js} +2 -2
  81. package/dist/_chunks/{payment-request-card-BmV2pLoM.js → payment-request-card-CEIalOtr.js} +15 -14
  82. package/dist/_chunks/{periodontal-chart-Bjz7O4wT.js → periodontal-chart-DqHrQY4e.js} +2 -2
  83. package/dist/_chunks/{periodontal-chart-card-CxEXHl2x.js → periodontal-chart-card-q9WSHRC2.js} +2 -2
  84. package/dist/_chunks/{periodontal-diagnosis-DnZuZD14.js → periodontal-diagnosis-CJPWluQU.js} +2 -2
  85. package/dist/_chunks/{periodontal-risk-chart-BBPB9wf1.js → periodontal-risk-chart-CKkyOROk.js} +2 -2
  86. package/dist/_chunks/{practice-profile-hero-Cw4NZp0A.js → practice-profile-hero-BFS6lO2a.js} +2 -2
  87. package/dist/_chunks/{practice-results-BlxfBx-D.js → practice-results-CzHWprX4.js} +922 -787
  88. package/dist/_chunks/{pregnancy-dating-qZpw3zj8.js → pregnancy-dating-BO6diQMZ.js} +4 -4
  89. package/dist/_chunks/{pregnancy-weight-gain-DQoOM8QV.js → pregnancy-weight-gain-DkGcEc_l.js} +3 -3
  90. package/dist/_chunks/{privacy-mask-BlJK51MD.js → privacy-mask-DJ1gee4c.js} +2 -2
  91. package/dist/_chunks/{province-select-cVOlwEc5.js → province-select-CTM8A9SM.js} +2 -2
  92. package/dist/_chunks/{radiograph-panel.agent-C1LGeX-G.js → radiograph-panel.agent-9jwXlOXB.js} +2 -2
  93. package/dist/_chunks/{registration-form-DW-0X7S4.js → registration-form-CMXefBnC.js} +2 -2
  94. package/dist/_chunks/{reserved.agent-6p3Hm4oH.js → reserved.agent-TaZfI3yj.js} +5 -5
  95. package/dist/_chunks/{reset-password-form-C93SH0Tx.js → reset-password-form-D_TePSM1.js} +2 -2
  96. package/dist/_chunks/{reviews-panel-CfJPEkH7.js → reviews-panel-CdHUSndF.js} +2 -2
  97. package/dist/_chunks/{rich-text-editor-efaMWbYz.js → rich-text-editor-CMPA5Wgy.js} +12 -11
  98. package/dist/_chunks/row-actions-Dpf9CrCP.js +213 -0
  99. package/dist/_chunks/{section-card-DFr2wGal.js → section-card-CYfeQ6EQ.js} +2 -2
  100. package/dist/_chunks/{send-registration-link-form-DWxWa_cJ.js → send-registration-link-form-DuZQuKnI.js} +2 -2
  101. package/dist/_chunks/{signature-request-BnTihryS.js → signature-request-Dzs0jZsd.js} +3 -3
  102. package/dist/_chunks/{tab-bar-C_pggqVr.js → tab-bar-CF8R38Og.js} +2 -2
  103. package/dist/_chunks/{tabs-CXYjr_8O.js → tabs-P4qFmxk5.js} +2 -2
  104. package/dist/_chunks/{task-editor-CSa6vQ9r.js → task-editor-WdDCqbIL.js} +168 -178
  105. package/dist/_chunks/{tasks-panel-CVjY1d7Q.js → tasks-panel-DBSm3WjK.js} +2 -2
  106. package/dist/_chunks/{theme-toggle-CObX2Ffa.js → theme-toggle-CeKl8f_f.js} +3 -3
  107. package/dist/_chunks/{timeline-AMqE-c2T.js → timeline-DXko0M1t.js} +2 -2
  108. package/dist/_chunks/{token-insert-menu-Dl3x2ekR.js → token-insert-menu-BrK5NQIq.js} +2 -2
  109. package/dist/_chunks/toolbar-z8vXnpXz.js +159 -0
  110. package/dist/_chunks/{tooth-scheme-C-ALCHaV.js → tooth-scheme-DHRxV2sE.js} +2 -2
  111. package/dist/_chunks/{transaction-chip-CohY6sTA.js → transaction-chip-CkYd-3ky.js} +47 -57
  112. package/dist/_chunks/{treatment-receipt-BydbojdD.js → treatment-receipt-1VnuinhY.js} +2 -2
  113. package/dist/_chunks/undo-2-EBxWjj1W.js +15 -0
  114. package/dist/_chunks/{unit-converter-D77vmlzN.js → unit-converter-YKlHyUC2.js} +2 -2
  115. package/dist/_chunks/{use-appointment-details-read-BMAiQYo6.js → use-appointment-details-read-B-SXnszJ.js} +10 -10
  116. package/dist/_chunks/{verify-identity-types-C85EXNzy.js → verify-identity-types-D_LdByCp.js} +2 -2
  117. package/dist/_chunks/{widget-picker-U4JsEhQE.js → widget-picker-DrxJjEkv.js} +2 -2
  118. package/dist/_chunks/{workflow-map-B4XkcET0.js → workflow-map-DCjkRuS_.js} +3 -3
  119. package/dist/_chunks/{workflow-status-9wb7iWUd.js → workflow-status-D0avpoeS.js} +2 -2
  120. package/dist/_chunks/{workflow-webhook-action-DNSe65yd.js → workflow-webhook-action-dgUjv9T7.js} +3 -3
  121. package/dist/agent-catalog.json +1080 -1
  122. package/dist/agent-i18n/en.json +50 -0
  123. package/dist/browser-support.js +2 -0
  124. package/dist/components/_shared/accessible-target.d.ts +19 -0
  125. package/dist/components/_shared/decimal.d.ts +171 -0
  126. package/dist/components/_shared/focus-visible.d.ts +8 -0
  127. package/dist/components/_shared/format-price.d.ts +54 -2
  128. package/dist/components/address-autocomplete/index.js +1 -1
  129. package/dist/components/address-fields/index.js +1 -1
  130. package/dist/components/anamnesis-card/index.js +1 -1
  131. package/dist/components/anamnesis-summary-card/index.js +1 -1
  132. package/dist/components/appointment-card/index.js +2 -2
  133. package/dist/components/appointment-details-panel/index.js +1 -1
  134. package/dist/components/appointment-peek/index.js +1 -1
  135. package/dist/components/appointment-timeline/index.js +1 -1
  136. package/dist/components/bill-line-table/bill-line-table.agent.d.ts +4 -0
  137. package/dist/components/bill-line-table/bill-line-table.columns.d.ts +49 -0
  138. package/dist/components/bill-line-table/bill-line-table.d.ts +4 -0
  139. package/dist/components/bill-line-table/bill-line-table.model.d.ts +173 -0
  140. package/dist/components/bill-line-table/bill-line-table.types.d.ts +443 -0
  141. package/dist/components/bill-line-table/bill-line-table.variants.d.ts +36 -0
  142. package/dist/components/bill-line-table/index.d.ts +6 -0
  143. package/dist/components/bill-line-table/index.js +23 -0
  144. package/dist/components/bill-table/bill-table.agent.d.ts +4 -0
  145. package/dist/components/bill-table/bill-table.d.ts +13 -0
  146. package/dist/components/bill-table/bill-table.variants.d.ts +55 -0
  147. package/dist/components/bill-table/cells.d.ts +89 -0
  148. package/dist/components/bill-table/columns.d.ts +21 -0
  149. package/dist/components/bill-table/default-tabs.d.ts +21 -0
  150. package/dist/components/bill-table/handle.d.ts +19 -0
  151. package/dist/components/bill-table/index.d.ts +7 -0
  152. package/dist/components/bill-table/index.js +19 -0
  153. package/dist/components/bill-table/model.d.ts +103 -0
  154. package/dist/components/bill-table/row-actions.d.ts +27 -0
  155. package/dist/components/bill-table/status-maps.d.ts +225 -0
  156. package/dist/components/bill-table/types.d.ts +542 -0
  157. package/dist/components/bishop-score/index.js +1 -1
  158. package/dist/components/bmi-calculator/index.js +1 -1
  159. package/dist/components/booking/index.js +1 -1
  160. package/dist/components/button-group/index.js +1 -1
  161. package/dist/components/calculator-dialog/index.js +1 -1
  162. package/dist/components/card/card.d.ts +9 -2
  163. package/dist/components/card/index.js +1 -1
  164. package/dist/components/care-plan-card/index.js +1 -1
  165. package/dist/components/care-plan-entry-card/index.js +1 -1
  166. package/dist/components/chart/index.js +1 -1
  167. package/dist/components/clinical-note-card/index.js +1 -1
  168. package/dist/components/combobox/combobox.d.ts +59 -1
  169. package/dist/components/combobox/index.d.ts +1 -1
  170. package/dist/components/combobox/index.js +1 -1
  171. package/dist/components/connection-status/index.js +1 -1
  172. package/dist/components/contact-card/index.js +1 -1
  173. package/dist/components/contact-profile-card/index.js +1 -1
  174. package/dist/components/country-select/index.js +1 -1
  175. package/dist/components/cycle-calculator/index.js +1 -1
  176. package/dist/components/dashboard-grid/index.js +1 -1
  177. package/dist/components/data-grid/body.d.ts +6 -0
  178. package/dist/components/data-grid/data-grid.variants.d.ts +1 -9
  179. package/dist/components/data-grid/editors.d.ts +7 -1
  180. package/dist/components/data-grid/index.js +9 -8
  181. package/dist/components/data-grid/selection.d.ts +10 -0
  182. package/dist/components/data-grid/types.d.ts +61 -11
  183. package/dist/components/data-grid-tabs/index.js +1 -1
  184. package/dist/components/data-table/index.js +4 -4
  185. package/dist/components/dialog/focus-return.d.ts +12 -0
  186. package/dist/components/dialog/index.js +1 -1
  187. package/dist/components/document-preview/index.js +1 -1
  188. package/dist/components/dropdown-menu/dropdown-menu.d.ts +11 -0
  189. package/dist/components/dropdown-menu/index.js +1 -1
  190. package/dist/components/due-date-calculator/index.js +2 -2
  191. package/dist/components/entity-summary/index.js +1 -1
  192. package/dist/components/face-scheme/index.js +1 -1
  193. package/dist/components/fetal-weight/index.js +1 -1
  194. package/dist/components/file-manager/index.js +1 -1
  195. package/dist/components/finished-terminal/index.js +1 -1
  196. package/dist/components/gestational-age-calculator/index.js +1 -1
  197. package/dist/components/hcg-doubling/index.js +1 -1
  198. package/dist/components/header-settings/header-settings.d.ts +7 -3
  199. package/dist/components/header-settings/index.js +1 -1
  200. package/dist/components/heatmap/index.js +1 -1
  201. package/dist/components/icon-button-group/index.js +1 -1
  202. package/dist/components/index.d.ts +6 -0
  203. package/dist/components/map-view/index.d.ts +1 -1
  204. package/dist/components/map-view/index.js +1 -1
  205. package/dist/components/map-view/map-view.d.ts +48 -0
  206. package/dist/components/money/index.js +1 -1
  207. package/dist/components/money/money.d.ts +39 -6
  208. package/dist/components/muscle-scheme/index.js +1 -1
  209. package/dist/components/notes-panel/index.js +1 -1
  210. package/dist/components/notification-card/index.js +1 -1
  211. package/dist/components/notification-card/notification-card.d.ts +2 -1
  212. package/dist/components/notification-tray/index.js +1 -1
  213. package/dist/components/number-input/index.d.ts +2 -2
  214. package/dist/components/number-input/index.js +1 -1
  215. package/dist/components/number-input/number-input.d.ts +43 -2
  216. package/dist/components/number-input/use-locale-number.d.ts +67 -3
  217. package/dist/components/operator-hero/index.js +1 -1
  218. package/dist/components/optical-prescription/index.js +1 -1
  219. package/dist/components/patient-details/index.js +1 -1
  220. package/dist/components/patient-search/index.js +1 -1
  221. package/dist/components/patient-summary-card/index.js +1 -1
  222. package/dist/components/patient-table/index.js +1 -1
  223. package/dist/components/payment-card/index.js +1 -1
  224. package/dist/components/periodontal-chart/index.js +1 -1
  225. package/dist/components/periodontal-chart-card/index.js +1 -1
  226. package/dist/components/periodontal-diagnosis/index.js +1 -1
  227. package/dist/components/periodontal-risk-chart/index.js +1 -1
  228. package/dist/components/practice-profile-hero/index.js +1 -1
  229. package/dist/components/practice-results/index.js +1 -1
  230. package/dist/components/practice-results/practice-results.d.ts +20 -0
  231. package/dist/components/pregnancy-dating/index.js +1 -1
  232. package/dist/components/pregnancy-weight-gain/index.js +1 -1
  233. package/dist/components/province-select/index.js +1 -1
  234. package/dist/components/radiograph-panel/index.js +1 -1
  235. package/dist/components/reviews-panel/index.js +1 -1
  236. package/dist/components/rich-text-editor/index.js +2 -2
  237. package/dist/components/row-actions/index.d.ts +3 -0
  238. package/dist/components/row-actions/index.js +5 -0
  239. package/dist/components/row-actions/row-actions.d.ts +63 -0
  240. package/dist/components/section-card/index.js +1 -1
  241. package/dist/components/skeleton-scheme/index.js +1 -1
  242. package/dist/components/smart-date/smart-date.d.ts +1 -1
  243. package/dist/components/tab-bar/index.js +1 -1
  244. package/dist/components/tabs/index.js +1 -1
  245. package/dist/components/task-editor/index.js +1 -1
  246. package/dist/components/tasks-panel/index.js +1 -1
  247. package/dist/components/theme-toggle/index.js +1 -1
  248. package/dist/components/timeline/index.js +1 -1
  249. package/dist/components/token-insert-menu/index.js +1 -1
  250. package/dist/components/tooth-scheme/index.js +1 -1
  251. package/dist/components/transaction-chip/index.js +1 -1
  252. package/dist/components/transaction-chip/transaction-chip.d.ts +1 -1
  253. package/dist/components/treatment-receipt/index.js +1 -1
  254. package/dist/components/unit-converter/index.js +1 -1
  255. package/dist/components/widget-picker/index.js +1 -1
  256. package/dist/components/workflow/index.js +1 -1
  257. package/dist/components/workflow-status/index.js +1 -1
  258. package/dist/core.css +1 -1
  259. package/dist/decimal/index.js +149 -0
  260. package/dist/host-compat.css +7 -1
  261. package/dist/i18n/locales/ar.d.ts +262 -0
  262. package/dist/i18n/locales/ar.js +263 -1
  263. package/dist/i18n/locales/de.d.ts +262 -0
  264. package/dist/i18n/locales/de.js +263 -1
  265. package/dist/i18n/locales/el.d.ts +262 -0
  266. package/dist/i18n/locales/el.js +263 -1
  267. package/dist/i18n/locales/en.d.ts +262 -0
  268. package/dist/i18n/locales/en.js +263 -1
  269. package/dist/i18n/locales/es.d.ts +262 -0
  270. package/dist/i18n/locales/es.js +263 -1
  271. package/dist/i18n/locales/fr.d.ts +262 -0
  272. package/dist/i18n/locales/fr.js +263 -1
  273. package/dist/i18n/locales/hi.d.ts +262 -0
  274. package/dist/i18n/locales/hi.js +263 -1
  275. package/dist/i18n/locales/it.d.ts +262 -0
  276. package/dist/i18n/locales/it.js +263 -1
  277. package/dist/i18n/locales/ja.d.ts +262 -0
  278. package/dist/i18n/locales/ja.js +263 -1
  279. package/dist/i18n/locales/nl.d.ts +262 -0
  280. package/dist/i18n/locales/nl.js +263 -1
  281. package/dist/i18n/locales/pl.d.ts +262 -0
  282. package/dist/i18n/locales/pl.js +263 -1
  283. package/dist/i18n/locales/pt.d.ts +262 -0
  284. package/dist/i18n/locales/pt.js +263 -1
  285. package/dist/i18n/locales/ro.d.ts +262 -0
  286. package/dist/i18n/locales/ro.js +263 -1
  287. package/dist/i18n/locales/ru.d.ts +262 -0
  288. package/dist/i18n/locales/ru.js +263 -1
  289. package/dist/i18n/locales/sq.d.ts +262 -0
  290. package/dist/i18n/locales/sq.js +263 -1
  291. package/dist/i18n/locales/sv.d.ts +262 -0
  292. package/dist/i18n/locales/sv.js +263 -1
  293. package/dist/i18n/locales/tr.d.ts +262 -0
  294. package/dist/i18n/locales/tr.js +263 -1
  295. package/dist/i18n/locales/zh.d.ts +262 -0
  296. package/dist/i18n/locales/zh.js +263 -1
  297. package/dist/index.js +1298 -1246
  298. package/dist/locales/ar.json +263 -1
  299. package/dist/locales/de.json +263 -1
  300. package/dist/locales/el.json +263 -1
  301. package/dist/locales/en.json +263 -1
  302. package/dist/locales/es.json +263 -1
  303. package/dist/locales/fr.json +263 -1
  304. package/dist/locales/hi.json +263 -1
  305. package/dist/locales/it.json +263 -1
  306. package/dist/locales/ja.json +263 -1
  307. package/dist/locales/nl.json +263 -1
  308. package/dist/locales/pl.json +263 -1
  309. package/dist/locales/pt.json +263 -1
  310. package/dist/locales/ro.json +263 -1
  311. package/dist/locales/ru.json +263 -1
  312. package/dist/locales/sq.json +263 -1
  313. package/dist/locales/sv.json +263 -1
  314. package/dist/locales/tr.json +263 -1
  315. package/dist/locales/zh.json +263 -1
  316. package/dist/patterns/anamnesis/index.js +1 -1
  317. package/dist/patterns/calendar/index.js +1 -1
  318. package/dist/patterns/forgot-password-form/index.js +1 -1
  319. package/dist/patterns/help-me-write-templates/index.js +1 -1
  320. package/dist/patterns/login-form/index.js +1 -1
  321. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  322. package/dist/patterns/payment-automation-upsell/index.js +1 -1
  323. package/dist/patterns/registration-form/index.js +1 -1
  324. package/dist/patterns/reset-password-form/index.js +1 -1
  325. package/dist/patterns/send-registration-link-form/index.js +1 -1
  326. package/dist/patterns/signature-request/index.js +1 -1
  327. package/dist/patterns/verify-identity/index.js +1 -1
  328. package/dist/patterns/workflow-webhook-action/index.js +1 -1
  329. package/dist/tokens.css +1 -1
  330. package/package.json +22 -3
  331. package/dist/_chunks/combobox-duuDRI1t.js +0 -688
  332. package/dist/_chunks/dialog-BTjSQjdY.js +0 -274
  333. package/dist/_chunks/dropdown-menu-CqxBthww.js +0 -595
  334. package/dist/_chunks/format-price-BcFBa-WP.js +0 -52
  335. package/dist/_chunks/map-view-Bny79cWa.js +0 -856
  336. package/dist/_chunks/money-Tsczpjfz.js +0 -102
  337. package/dist/_chunks/number-input-CVwI1ltI.js +0 -423
  338. package/dist/_chunks/parts-Wz2LeGnH.js +0 -1113
  339. package/dist/_chunks/undo-2-CYNAzclj.js +0 -26
@@ -1,856 +0,0 @@
1
- import { jsx as l, jsxs as T } from "react/jsx-runtime";
2
- import { forwardRef as xe, useMemo as V, useRef as k, useId as Ce, useState as N, useEffect as x, useCallback as _, useImperativeHandle as Le, useLayoutEffect as Ee } from "react";
3
- import { createPortal as Ve } from "react-dom";
4
- import { c as S } from "./index-D2ZczOXr.js";
5
- import { useTranslation as q } from "react-i18next";
6
- import { M as Ie, A as Pe, a as _e, b as Te, P as oe, c as Ne, u as Se, d as ie, e as $ } from "./maps-core-gate-DkNqGkm3.js";
7
- import { B as Ge } from "./button-DohK_Ak_.js";
8
- import { S as Re } from "./skeleton-tTWJpvAq.js";
9
- import { V as Ae } from "./visually-hidden-BHxEUGyT.js";
10
- import { E as Ze } from "./error-boundary-tAn_GuCu.js";
11
- import { u as Oe } from "./registry-DvAUVLHh.js";
12
- import { l as je } from "./length-token-DwMnGEYT.js";
13
- import { M as De } from "./map-pin-BaY37-Km.js";
14
- import { E as He } from "./external-link-CY6zAXXU.js";
15
- const $e = {
16
- id: "map-view",
17
- // pan → scroll (viewport move); set_zoom → set_value; select_marker → pick
18
- // (NON-persisting marker focus, no value state slot).
19
- capabilities: ["scroll", "set_value", "pick"],
20
- // Every action routes through the imperative bridge, which only exists
21
- // once the map has loaded: consent granted (the default is
22
- // `consentGranted={false}`) and Google Maps finished loading. Until then
23
- // all three actions are silent no-ops. `consentGranted` says whether the
24
- // gate is passed, and a null `center` after it means the map is still
25
- // loading. `center` / `zoom` are read off the live
26
- // map because Google clamps zoom and animates pans, so requested is not
27
- // applied; `selectedMarkerId` is the only confirmation the host accepted
28
- // a `select_marker` proposal.
29
- //
30
- // A9: marker ids only (`MapMarker.id` is a stable opaque id). Never
31
- // `MapMarker.label`, never the `address` prop (consumer-supplied free
32
- // text, PII in any patient-address deployment), never `apiKey`.
33
- state: {
34
- consentGranted: {
35
- type: "boolean",
36
- descriptionKey: "ui.agent.mapView.state.consentGranted",
37
- description: "True when the GDPR consent gate has been passed. Read this FIRST: while it is false every action is a silent no-op against a placeholder, and nothing else in the surface says so. When it is true but `center` is still null, Google Maps is loading; wait for `center` before acting.",
38
- read: (e) => e.isConsentGranted()
39
- },
40
- markerCount: {
41
- type: "number",
42
- descriptionKey: "ui.agent.mapView.state.markerCount",
43
- description: "Number of markers the consumer passed. Zero means there is nothing for `select_marker` to select. A count only — no ids, labels or positions.",
44
- read: (e) => e.getMarkerCount()
45
- },
46
- selectedMarkerId: {
47
- type: "string | null",
48
- descriptionKey: "ui.agent.mapView.state.selectedMarkerId",
49
- description: "Id of the marker the host currently holds as selected, or null. Selection is fully controlled by the consumer, so `select_marker` only proposes — this slot is the only way to see whether the proposal was accepted.",
50
- read: (e) => e.getSelectedMarkerId()
51
- },
52
- center: {
53
- type: "{ lat: number; lng: number } | null",
54
- descriptionKey: "ui.agent.mapView.state.center",
55
- description: "Live map centre in lat/lng, or null until the map has loaded (consent not granted, or Google Maps still loading). The read-back for `pan_to`, and the sign that the map is ready.",
56
- read: (e) => e.getCenter()
57
- },
58
- zoom: {
59
- type: "number | null",
60
- descriptionKey: "ui.agent.mapView.state.zoom",
61
- description: "Live zoom level, or null until the map has loaded. Google clamps zoom to the map type's range, so this is not necessarily the value last passed to `set_zoom`.",
62
- read: (e) => e.getZoom()
63
- }
64
- },
65
- actions: {
66
- pan_to: {
67
- // Ephemeral viewport move, no data loss → read.
68
- safety: "read",
69
- argsType: "{ position: { lat: number; lng: number } }",
70
- argsSchema: {
71
- type: "object",
72
- properties: {
73
- position: {
74
- type: "object",
75
- properties: {
76
- lat: { type: "number", description: "Latitude in degrees." },
77
- lng: { type: "number", description: "Longitude in degrees." }
78
- },
79
- required: ["lat", "lng"]
80
- }
81
- },
82
- required: ["position"]
83
- },
84
- idempotent: !0,
85
- descriptionKey: "ui.agent.mapView.actions.panTo",
86
- description: "Pan the map to a new centre without changing zoom. Read the `center` slot back to confirm — Google animates the pan, so the applied centre settles after the call.",
87
- errors: [
88
- "Silent no-op until the map has loaded: while `consentGranted` is false (only the consent placeholder shows) or while `center` is still null (Google Maps is loading)."
89
- ],
90
- invoke: (e, o) => {
91
- e.panTo(o.position);
92
- }
93
- },
94
- set_zoom: {
95
- // Ephemeral viewport zoom, no data loss → read.
96
- safety: "read",
97
- argsType: "{ zoom: number }",
98
- argsSchema: {
99
- type: "object",
100
- properties: {
101
- zoom: {
102
- type: "number",
103
- description: "Zoom level, typical range 1–20."
104
- }
105
- },
106
- required: ["zoom"]
107
- },
108
- idempotent: !0,
109
- descriptionKey: "ui.agent.mapView.actions.setZoom",
110
- description: "Set the map zoom level (typical range 1–20). Read the `zoom` slot back — Google clamps the request to the map type’s supported range, so requested and applied can differ.",
111
- errors: [
112
- "Silent no-op until the map has loaded: while `consentGranted` is false (only the consent placeholder shows) or while `center` is still null (Google Maps is loading).",
113
- "Requested zoom is clamped to the map type's range; `zoom` reports what was actually applied."
114
- ],
115
- invoke: (e, o) => {
116
- e.setZoom(o.zoom);
117
- }
118
- },
119
- select_marker: {
120
- // Ephemeral marker focus, no data loss → read.
121
- safety: "read",
122
- argsType: "{ id: string | null }",
123
- argsSchema: {
124
- type: "object",
125
- properties: {
126
- id: {
127
- type: ["string", "null"],
128
- description: "Marker id to select, or null to clear the selection."
129
- }
130
- },
131
- required: ["id"]
132
- },
133
- idempotent: !0,
134
- descriptionKey: "ui.agent.mapView.actions.selectMarker",
135
- description: "Propose a marker selection by id, or pass null to clear it. Fires the host's `onMarkerClick`; selection is controlled by the host, so read the `selectedMarkerId` slot back to see whether it accepted.",
136
- errors: [
137
- "Silent no-op until the map has loaded: while `consentGranted` is false (only the consent placeholder shows) or while `center` is still null (Google Maps is loading).",
138
- "The host owns `selectedMarkerId` and may ignore the proposal; `selectedMarkerId` is unchanged when it does."
139
- ],
140
- invoke: (e, o) => {
141
- e.selectMarker(o.id);
142
- }
143
- }
144
- },
145
- domHooks: {
146
- root: {
147
- attr: "data-component",
148
- value: "map-view",
149
- description: "Marks the element as a kit MapView."
150
- },
151
- instanceId: {
152
- attr: "data-component-id",
153
- sourceProp: "id",
154
- description: "Sourced from the id prop."
155
- }
156
- }
157
- }, Ke = S(
158
- ["ds:relative ds:overflow-hidden ds:block", "ds:bg-[var(--muted)]"].join(" "),
159
- {
160
- variants: {
161
- size: {
162
- sm: "ds:[--map-block-size:14rem]",
163
- md: "ds:[--map-block-size:20rem]",
164
- lg: "ds:[--map-block-size:28rem]",
165
- // `fill` defers sizing to the parent. The outer takes
166
- // `block-size: 100%` so the inner (also 100%) has something
167
- // to inherit from. Use inside a viewport-locked column —
168
- // `<PracticeResults variant="map-first">` wires this through
169
- // automatically; standalone consumers must give the parent
170
- // a constrained block-size or the map collapses to 0.
171
- fill: "ds:[block-size:100%]"
172
- },
173
- surface: {
174
- bordered: "ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)]",
175
- elevated: "ds:rounded-[var(--radius-md)] ds:shadow-[var(--shadow-card)] ds:[:where(&)]:border-[length:var(--surface-border-width,var(--border-width-sm))] ds:border-[color:var(--card-border)]",
176
- bare: "ds:rounded-none ds:border-0"
177
- }
178
- },
179
- defaultVariants: { size: "md", surface: "bordered" }
180
- }
181
- ), We = S("ds:block ds:w-full", {
182
- variants: {
183
- size: {
184
- sm: "ds:[block-size:var(--map-block-size)]",
185
- md: "ds:[block-size:var(--map-block-size)]",
186
- lg: "ds:[block-size:var(--map-block-size)]",
187
- fill: "ds:[block-size:100%]"
188
- }
189
- },
190
- defaultVariants: { size: "md" }
191
- }), qe = S(
192
- [
193
- "ds:absolute ds:inset-0",
194
- "ds:flex ds:flex-col ds:items-center ds:justify-center",
195
- "ds:gap-[var(--spacing-sm)]",
196
- "ds:p-[var(--spacing-md)]",
197
- "ds:bg-[var(--muted)] ds:text-[var(--foreground)]",
198
- "ds:text-center"
199
- ].join(" ")
200
- ), Be = S("type-heading-3 ds:m-0"), se = S(
201
- "type-body-sm ds:text-[var(--muted-foreground)] ds:[max-inline-size:28rem] ds:m-0"
202
- );
203
- function Fe({
204
- onHandleReady: e,
205
- onMarkerSelect: o,
206
- onCameraMove: r
207
- }) {
208
- const a = $();
209
- return x(() => {
210
- if (a)
211
- return e({
212
- panTo: (t) => {
213
- r(), a.panTo(t);
214
- },
215
- setZoom: (t) => {
216
- r(), a.setZoom(t);
217
- },
218
- jumpTo: (t, i) => {
219
- r(), a.moveCamera({ center: t, zoom: i });
220
- },
221
- selectMarker: (t) => o(t),
222
- // Read straight off the live map: Google clamps `setZoom` to the
223
- // map type's range and animates `panTo`, so requested and applied
224
- // are not the same value.
225
- getCenter: () => {
226
- var t;
227
- return ((t = a.getCenter()) == null ? void 0 : t.toJSON()) ?? null;
228
- },
229
- getZoom: () => a.getZoom() ?? null
230
- }), () => e(null);
231
- }, [a, e, o, r]), null;
232
- }
233
- function Je({
234
- onBoundsChange: e,
235
- userInteraction: o
236
- }) {
237
- const r = $(), a = k(e);
238
- return a.current = e, x(() => {
239
- if (!r) return;
240
- const t = r.getDiv();
241
- let i = null;
242
- const d = () => {
243
- o.current = {
244
- pendingInput: !1,
245
- moved: !1,
246
- programmatic: !1
247
- };
248
- };
249
- d();
250
- let h;
251
- const u = /* @__PURE__ */ new Set(), m = (n) => {
252
- if (n instanceof PointerEvent && n.pointerType === "touch" && (n.type === "pointerdown" && u.add(n.pointerId), n.type === "pointerup" || n.type === "pointercancel")) {
253
- u.delete(n.pointerId);
254
- return;
255
- }
256
- if (n instanceof PointerEvent && n.type === "pointermove" && n.buttons === 0 && n.pointerType !== "touch" || n instanceof KeyboardEvent && ![
257
- "ArrowUp",
258
- "ArrowDown",
259
- "ArrowLeft",
260
- "ArrowRight",
261
- "+",
262
- "=",
263
- "-",
264
- "_",
265
- "Enter",
266
- " ",
267
- "PageUp",
268
- "PageDown"
269
- ].includes(n.key))
270
- return;
271
- const p = document.fullscreenElement, v = !!(p && (p.contains(t) || t.contains(p)));
272
- let b = n.type === "dblclick";
273
- n instanceof PointerEvent && n.type === "pointermove" && (b = n.pointerType !== "touch" || u.size >= 2 || v), n.type === "touchmove" && (b = n.touches.length >= 2 || v), n instanceof KeyboardEvent && (b = n.key !== "Enter" && n.key !== " "), n instanceof WheelEvent && (b = n.ctrlKey || n.metaKey || v), n.type === "click" && (b = n.target instanceof Element && n.target.closest('button, [role="button"]') != null), b && (o.current.programmatic = !1), o.current.pendingInput = !0, clearTimeout(h), h = setTimeout(() => {
274
- o.current.pendingInput = !1;
275
- }, 250);
276
- }, f = () => {
277
- o.current.pendingInput && !o.current.programmatic && (o.current.moved = !0);
278
- }, g = () => {
279
- var E, P;
280
- const n = (E = r.getBounds()) == null ? void 0 : E.toJSON(), p = (P = r.getCenter()) == null ? void 0 : P.toJSON(), v = r.getZoom(), b = o.current.moved;
281
- if (d(), clearTimeout(h), !n || !p || v == null) return;
282
- const z = !i || Object.keys(n).some(
283
- (G) => n[G] !== i.bounds[G]
284
- ), I = i != null && (v !== i.zoom || p.lat !== i.center.lat || p.lng !== i.center.lng);
285
- i = { bounds: n, center: p, zoom: v }, z && a.current(n, { userInteraction: b && I });
286
- }, c = [
287
- "pointerdown",
288
- "pointermove",
289
- "pointerup",
290
- "pointercancel",
291
- "touchstart",
292
- "touchmove",
293
- "click",
294
- "dblclick",
295
- "wheel",
296
- "keydown"
297
- ];
298
- c.forEach(
299
- (n) => t.addEventListener(n, m, { capture: !0, passive: !0 })
300
- );
301
- const w = [
302
- r.addListener("dragstart", () => {
303
- o.current.programmatic = !1, o.current.moved = !0;
304
- }),
305
- r.addListener("center_changed", f),
306
- r.addListener("zoom_changed", f),
307
- r.addListener("idle", g)
308
- ];
309
- return g(), () => {
310
- w.forEach((n) => n.remove()), c.forEach(
311
- (n) => t.removeEventListener(n, m, !0)
312
- ), clearTimeout(h), d();
313
- };
314
- }, [r, o]), null;
315
- }
316
- function Ue(e, o) {
317
- const r = $(), [a, t] = N(null), { lat: i, lng: d } = o;
318
- return x(() => {
319
- if (!r || typeof r.getCenter != "function") return;
320
- const h = () => {
321
- var p, v;
322
- const m = (p = r.getCenter()) == null ? void 0 : p.toJSON(), f = r.getZoom(), g = (v = r.getDiv) == null ? void 0 : v.call(r);
323
- if (!m || f == null || !g) {
324
- t(null);
325
- return;
326
- }
327
- const c = g.clientWidth, w = g.clientHeight, n = le * 2 ** f;
328
- t({
329
- id: e,
330
- width: c,
331
- height: w,
332
- x: c / 2 + (d - m.lng) / 360 * n,
333
- y: w / 2 - (H(i) - H(m.lat)) * n / (2 * Math.PI)
334
- });
335
- };
336
- h();
337
- const u = ["bounds_changed", "zoom_changed", "center_changed", "idle"].flatMap(
338
- (m) => typeof r.addListener == "function" ? [r.addListener(m, h)] : []
339
- );
340
- return () => u.forEach((m) => m.remove());
341
- }, [r, e, i, d]), (a == null ? void 0 : a.id) === e ? a : null;
342
- }
343
- function Xe({
344
- marker: e,
345
- frame: o,
346
- direction: r,
347
- children: a
348
- }) {
349
- const t = Ue(e.id, e.position);
350
- return !t || !o ? null : Ve(
351
- /* @__PURE__ */ l(et, { anchor: t, direction: r, children: a }),
352
- o
353
- );
354
- }
355
- const Ye = 52, Qe = 12, D = 8;
356
- function et({
357
- anchor: e,
358
- children: o,
359
- direction: r
360
- }) {
361
- const a = k(null), [t, i] = N(
362
- null
363
- );
364
- if (Ee(() => {
365
- const n = a.current;
366
- n && i(
367
- (p) => (p == null ? void 0 : p.width) === n.offsetWidth && p.height === n.offsetHeight ? p : { width: n.offsetWidth, height: n.offsetHeight }
368
- );
369
- }, [o, e.id]), !(e.x >= 0 && e.x <= e.width && e.y >= 0 && e.y <= e.height)) return null;
370
- const h = (t == null ? void 0 : t.width) ?? 0, u = (t == null ? void 0 : t.height) ?? 0, m = Math.max(D, e.width - h - D), f = Math.min(Math.max(e.x - h / 2, D), m), g = e.y - Ye - u, c = g < D, w = c ? e.y + Qe : g;
371
- return (
372
- // The layer is `ltr` because the map is geographic: x is always measured
373
- // from the physical left. The card inside takes the page direction.
374
- /* @__PURE__ */ l(
375
- "div",
376
- {
377
- dir: "ltr",
378
- "aria-hidden": "true",
379
- "data-component": "map-view-marker-card-layer",
380
- className: "ds:pointer-events-none ds:absolute ds:inset-0 ds:overflow-hidden",
381
- children: /* @__PURE__ */ l(
382
- "div",
383
- {
384
- ref: a,
385
- "data-component": "map-view-marker-card",
386
- "data-marker-id": e.id,
387
- "data-placement": c ? "below" : "above",
388
- style: {
389
- "--marker-card-x": `${f}px`,
390
- "--marker-card-y": `${w}px`
391
- },
392
- "data-measured": t ? "true" : "false",
393
- className: "ds:absolute ds:[inset-inline-start:var(--marker-card-x)] ds:[inset-block-start:var(--marker-card-y)] ds:[inline-size:max-content] ds:[max-inline-size:calc(100%-var(--spacing-md))] ds:data-[measured=false]:invisible",
394
- children: /* @__PURE__ */ l("div", { dir: r, children: o })
395
- }
396
- )
397
- }
398
- )
399
- );
400
- }
401
- const le = 256, tt = (e) => e * Math.PI / 180;
402
- function H(e) {
403
- const o = Math.min(Math.max(Math.sin(tt(e)), -0.9999), 0.9999);
404
- return Math.log((1 + o) / (1 - o)) / 2;
405
- }
406
- const nt = (e) => Math.atan(Math.sinh(e)) * 180 / Math.PI;
407
- function rt(e) {
408
- let o = -90, r = 90, a = -180, t = 180;
409
- for (const { lat: i, lng: d } of e)
410
- o = Math.max(o, i), r = Math.min(r, i), a = Math.max(a, d), t = Math.min(t, d);
411
- return { north: o, south: r, east: a, west: t };
412
- }
413
- function ot(e, o, r, a, t) {
414
- const { north: i, south: d, east: h, west: u } = rt(e);
415
- if (i === d && h === u)
416
- return { center: { lat: i, lng: h }, zoom: t };
417
- const m = H(i), f = H(d), g = {
418
- lat: nt((m + f) / 2),
419
- lng: (h + u) / 2
420
- }, c = (n, p) => p > 0 ? Math.log2(Math.max(n, 1) / le / p) : t, w = Math.min(
421
- c(o - 2 * a, (h - u) / 360),
422
- c(r - 2 * a, (m - f) / (2 * Math.PI)),
423
- t
424
- );
425
- return { center: g, zoom: Math.max(0, Math.floor(w)) };
426
- }
427
- const ce = ({ id: e, lat: o, lng: r }) => e != null ? `id:${e}` : `at:${o},${r}`;
428
- function st({
429
- points: e,
430
- fitKey: o,
431
- maxZoom: r,
432
- onCameraMove: a
433
- }) {
434
- const t = $(), i = k(null), d = k(!1), h = k(null);
435
- return x(() => {
436
- if (!t) return;
437
- const u = () => {
438
- var n;
439
- const f = h.current, g = (n = t.getCenter()) == null ? void 0 : n.toJSON(), c = t.getZoom();
440
- f != null && c === f.zoom && g != null && Math.abs(g.lat - f.center.lat) < 1e-6 && Math.abs(g.lng - f.center.lng) < 1e-6 || (d.current = !0);
441
- }, m = [
442
- t.addListener("dragstart", () => {
443
- d.current = !0;
444
- }),
445
- t.addListener("center_changed", u),
446
- t.addListener("zoom_changed", u)
447
- ];
448
- return () => m.forEach((f) => f.remove());
449
- }, [t]), x(() => {
450
- var v;
451
- if (!t) return;
452
- const u = ((v = i.current) == null ? void 0 : v.map) === t ? i.current : null;
453
- if ((u == null ? void 0 : u.key) === o) return;
454
- const m = new Set(e.map(ce)), f = (b, z) => {
455
- h.current = { center: b, zoom: z }, a(), t.moveCamera({ center: b, zoom: z }), d.current = !1;
456
- };
457
- if (e.length === 0) {
458
- i.current = { map: t, key: o, points: m };
459
- return;
460
- }
461
- if (u != null && u.points.size > 0 && [...u.points].every((b) => m.has(b)) && d.current) {
462
- i.current = { map: t, key: o, points: m };
463
- return;
464
- }
465
- const c = t.getDiv();
466
- if (!(c instanceof Element)) return;
467
- const w = () => {
468
- i.current = { map: t, key: o, points: m };
469
- const b = Math.min(
470
- je("--spacing-2xl", c, 48),
471
- c.clientWidth / 4,
472
- c.clientHeight / 4
473
- ), { center: z, zoom: I } = ot(
474
- e,
475
- c.clientWidth,
476
- c.clientHeight,
477
- b,
478
- r
479
- );
480
- f(z, I);
481
- }, n = () => c.clientWidth > 0 && c.clientHeight > 0;
482
- if (n() || typeof ResizeObserver > "u") {
483
- w();
484
- return;
485
- }
486
- const p = new ResizeObserver(() => {
487
- n() && (p.disconnect(), w());
488
- });
489
- return p.observe(c), () => p.disconnect();
490
- }, [t, o, e, r, a]), null;
491
- }
492
- const de = (e) => {
493
- var o, r;
494
- return typeof ((r = (o = globalThis.google) == null ? void 0 : o.maps) == null ? void 0 : r[e]) == "function";
495
- };
496
- function ue() {
497
- const { t: e } = q("ui");
498
- return /* @__PURE__ */ T(
499
- "div",
500
- {
501
- role: "status",
502
- "data-testid": "map-view-loading",
503
- className: "ds:[inline-size:100%] ds:[block-size:100%]",
504
- children: [
505
- /* @__PURE__ */ l(Re, { variant: "rectangular", width: "100%", height: "100%" }),
506
- /* @__PURE__ */ l(Ae, { children: e("common.loading") })
507
- ]
508
- }
509
- );
510
- }
511
- function at({ children: e }) {
512
- const o = Se();
513
- return ie("maps") || !o || de("Map") ? e : /* @__PURE__ */ l(ue, {});
514
- }
515
- function it({ children: e }) {
516
- return ie("marker") || de("Marker") ? e : null;
517
- }
518
- function ae({
519
- address: e,
520
- contentLang: o,
521
- description: r,
522
- onLoadMap: a,
523
- openInGoogleMapsHref: t,
524
- consentCta: i
525
- }) {
526
- const { t: d } = q("ui");
527
- return /* @__PURE__ */ T("div", { className: qe(), "data-testid": "map-view-consent", children: [
528
- /* @__PURE__ */ l(
529
- De,
530
- {
531
- "aria-hidden": "true",
532
- className: "ds:size-6 ds:text-[var(--muted-foreground)]"
533
- }
534
- ),
535
- /* @__PURE__ */ l("p", { className: Be(), children: d("mapView.consentTitle") }),
536
- e ? /* @__PURE__ */ l(
537
- "p",
538
- {
539
- className: se(),
540
- "data-testid": "map-view-address",
541
- lang: o,
542
- children: e
543
- }
544
- ) : null,
545
- /* @__PURE__ */ l("p", { className: se(), children: r }),
546
- /* @__PURE__ */ T("div", { className: "ds:flex ds:gap-[var(--spacing-sm)] ds:flex-wrap ds:items-center ds:justify-center", children: [
547
- i ?? /* @__PURE__ */ l(
548
- Ge,
549
- {
550
- type: "button",
551
- intent: "primary",
552
- size: "sm",
553
- onClick: a,
554
- "data-testid": "map-view-load-cta",
555
- children: d("mapView.consentCta")
556
- }
557
- ),
558
- /* @__PURE__ */ T(
559
- "a",
560
- {
561
- href: t,
562
- target: "_blank",
563
- rel: "noopener noreferrer",
564
- className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)] ds:text-[var(--primary-readable)] ds:underline ds:underline-offset-2",
565
- children: [
566
- d("mapView.openInGoogleMaps"),
567
- /* @__PURE__ */ l(He, { "aria-hidden": "true", className: "ds:size-3" })
568
- ]
569
- }
570
- )
571
- ] })
572
- ] });
573
- }
574
- const lt = xe(
575
- ({
576
- id: e,
577
- apiKey: o,
578
- center: r,
579
- zoom: a = 15,
580
- markers: t,
581
- selectedMarkerId: i,
582
- hoveredMarkerId: d,
583
- renderMarkerCard: h,
584
- onMarkerClick: u,
585
- onBoundsChange: m,
586
- consentGranted: f = !1,
587
- onConsentRequest: g,
588
- address: c,
589
- contentLang: w,
590
- consentDescription: n,
591
- consentCta: p,
592
- mapId: v,
593
- size: b,
594
- surface: z,
595
- ariaLabel: I,
596
- fitToPoints: E,
597
- fitKey: P,
598
- fitMaxZoom: G = 15,
599
- className: pe,
600
- ...me
601
- }, he) => {
602
- const { t: R, i18n: B } = q("ui"), A = V(() => E ?? [], [E]), fe = V(
603
- () => P ?? A.map((s) => `${ce(s)}@${s.lat},${s.lng}`).sort().join("|"),
604
- [P, A]
605
- ), C = A.length > 0, F = k(C), J = Ce(), ge = V(
606
- () => `map-${J.replace(/[^a-zA-Z0-9-_]/g, "")}`,
607
- [J]
608
- ), [U, ye] = N(!1);
609
- x(() => {
610
- if (typeof window > "u") return;
611
- const s = window.matchMedia("(prefers-reduced-motion: reduce)"), y = () => ye(s.matches);
612
- return y(), s.addEventListener("change", y), () => s.removeEventListener("change", y);
613
- }, []);
614
- const X = V(() => `https://www.google.com/maps/search/?api=1&query=${c ? encodeURIComponent(c) : `${r.lat},${r.lng}`}`, [c, r.lat, r.lng]), M = k(null), Y = k({
615
- pendingInput: !1,
616
- moved: !1,
617
- programmatic: !1
618
- }), Z = _(() => {
619
- Y.current = {
620
- pendingInput: !1,
621
- moved: !1,
622
- programmatic: !0
623
- };
624
- }, []), O = _(
625
- (s) => {
626
- Z(), u == null || u(s);
627
- },
628
- [Z, u]
629
- ), [be, ve] = N(null), K = V(
630
- () => d != null && h ? (t ?? []).find((s) => s.id === d) ?? null : null,
631
- [d, h, t]
632
- ), we = _((s) => {
633
- M.current = s;
634
- }, []), Q = k(!1), ee = k(null), te = k(0), j = _(
635
- () => ({
636
- panTo: (s) => {
637
- var y;
638
- return (y = M.current) == null ? void 0 : y.panTo(s);
639
- },
640
- setZoom: (s) => {
641
- var y;
642
- return (y = M.current) == null ? void 0 : y.setZoom(s);
643
- },
644
- selectMarker: (s) => {
645
- var y;
646
- return (y = M.current) == null ? void 0 : y.selectMarker(s);
647
- },
648
- // Without `isConsentGranted` an agent has no way to learn that
649
- // its pan / zoom / select was swallowed by the GDPR gate rather
650
- // than applied: under the default (`consentGranted={false}`) the
651
- // whole Maps subtree is unmounted and every action optional-chains
652
- // into nothing.
653
- isConsentGranted: () => Q.current,
654
- getCenter: () => {
655
- var s;
656
- return ((s = M.current) == null ? void 0 : s.getCenter()) ?? null;
657
- },
658
- getZoom: () => {
659
- var s;
660
- return ((s = M.current) == null ? void 0 : s.getZoom()) ?? null;
661
- },
662
- getSelectedMarkerId: () => ee.current,
663
- getMarkerCount: () => te.current
664
- }),
665
- []
666
- );
667
- Le(he, j, [j]);
668
- const ke = V(
669
- () => j(),
670
- [j]
671
- );
672
- Oe($e, ke, e), x(() => {
673
- var y, L;
674
- const s = F.current && !C;
675
- if (F.current = C, !C) {
676
- if (s) {
677
- (y = M.current) == null || y.jumpTo(r, a);
678
- return;
679
- }
680
- U || (L = M.current) == null || L.panTo(r);
681
- }
682
- }, [r.lat, r.lng, U, C]), x(() => {
683
- var s;
684
- C || (s = M.current) == null || s.setZoom(a);
685
- }, [a, C]);
686
- const [Me, ne] = N(!1), re = f || Me;
687
- Q.current = re, ee.current = i ?? null, te.current = (t ?? []).length;
688
- const ze = _(() => {
689
- if (g) {
690
- g(), ne(!0);
691
- return;
692
- }
693
- ne(!0);
694
- }, [g]);
695
- return /* @__PURE__ */ l(
696
- "div",
697
- {
698
- className: Ke({ size: b, surface: z, className: pe }),
699
- "data-component": "map-view",
700
- "data-component-id": e ?? ge,
701
- role: "region",
702
- "aria-label": I ?? R("mapView.label"),
703
- ...me,
704
- children: /* @__PURE__ */ l(
705
- "div",
706
- {
707
- ref: ve,
708
- className: We({ size: b, className: "ds:relative" }),
709
- children: re ? (
710
- // A provider failure shows the consent placeholder (its "Open in
711
- // Google Maps" link needs no script) with "Load map" as the
712
- // retry, instead of unmounting the host's React tree. The gate
713
- // starts the provider only once Google's `core` and `maps`
714
- // libraries have arrived.
715
- /* @__PURE__ */ l(
716
- Ze,
717
- {
718
- fallback: ({ reset: s }) => /* @__PURE__ */ l(
719
- ae,
720
- {
721
- address: c,
722
- contentLang: w,
723
- description: n ?? R("mapView.consentDescription"),
724
- onLoadMap: s,
725
- consentCta: void 0,
726
- openInGoogleMapsHref: X
727
- }
728
- ),
729
- children: /* @__PURE__ */ l(Ie, { libraries: ["maps"], pending: /* @__PURE__ */ l(ue, {}), children: /* @__PURE__ */ l(
730
- Pe,
731
- {
732
- apiKey: o,
733
- language: B.language,
734
- children: /* @__PURE__ */ l(at, { children: /* @__PURE__ */ T(
735
- _e,
736
- {
737
- defaultCenter: r,
738
- defaultZoom: a,
739
- mapId: v,
740
- gestureHandling: "cooperative",
741
- disableDefaultUI: !1,
742
- onClick: () => O(null),
743
- className: "ds:[inline-size:100%] ds:[block-size:100%]",
744
- children: [
745
- /* @__PURE__ */ l(
746
- Fe,
747
- {
748
- onHandleReady: we,
749
- onMarkerSelect: O,
750
- onCameraMove: Z
751
- }
752
- ),
753
- m ? /* @__PURE__ */ l(
754
- Je,
755
- {
756
- onBoundsChange: m,
757
- userInteraction: Y
758
- }
759
- ) : null,
760
- E ? /* @__PURE__ */ l(
761
- st,
762
- {
763
- points: A,
764
- fitKey: fe,
765
- maxZoom: G,
766
- onCameraMove: Z
767
- }
768
- ) : null,
769
- K && h ? /* @__PURE__ */ l(
770
- Xe,
771
- {
772
- marker: K,
773
- frame: be,
774
- direction: B.dir(),
775
- children: h(K.id)
776
- }
777
- ) : null,
778
- /* @__PURE__ */ l(it, { children: (t ?? []).map((s) => {
779
- const y = i != null && i === s.id, L = d != null && d === s.id, W = R("mapView.markerLabel", {
780
- label: s.label ?? s.id
781
- });
782
- return v ? /* @__PURE__ */ l(
783
- Te,
784
- {
785
- position: s.position,
786
- title: W,
787
- "aria-label": W,
788
- "data-selected": y ? "true" : "false",
789
- "data-hovered": L ? "true" : "false",
790
- zIndex: L ? 1e3 : y ? 500 : void 0,
791
- onClick: () => O(s.id),
792
- children: L ? (
793
- // Hovered pin: larger, deep ink body with a
794
- // white ring. Theme-invariant, because the
795
- // tiles do not follow the kit theme: one of
796
- // body and ring clears 3:1 on any map style.
797
- // Not `--accent`, which failed contrast.
798
- /* @__PURE__ */ l(
799
- oe,
800
- {
801
- scale: 1.4,
802
- background: "var(--map-marker-hover-color)",
803
- borderColor: "var(--map-marker-hover-ring)",
804
- glyphColor: "var(--map-marker-hover-ring)"
805
- }
806
- )
807
- ) : /* @__PURE__ */ l(
808
- oe,
809
- {
810
- background: "var(--primary)",
811
- borderColor: "var(--primary)",
812
- glyphColor: "var(--primary-foreground)"
813
- }
814
- )
815
- },
816
- s.id
817
- ) : /* @__PURE__ */ l(
818
- Ne,
819
- {
820
- position: s.position,
821
- title: W,
822
- zIndex: L ? 1e3 : y ? 500 : void 0,
823
- onClick: () => O(s.id)
824
- },
825
- s.id
826
- );
827
- }) })
828
- ]
829
- }
830
- ) })
831
- }
832
- ) })
833
- }
834
- )
835
- ) : /* @__PURE__ */ l(
836
- ae,
837
- {
838
- address: c,
839
- contentLang: w,
840
- description: n ?? R("mapView.consentDescription"),
841
- onLoadMap: ze,
842
- consentCta: p,
843
- openInGoogleMapsHref: X
844
- }
845
- )
846
- }
847
- )
848
- }
849
- );
850
- }
851
- );
852
- lt.displayName = "MapView";
853
- export {
854
- lt as M
855
- };
856
- //# sourceMappingURL=map-view-Bny79cWa.js.map