@alfadocs/ui-kit-debug 1.67.0 → 1.68.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 (499) hide show
  1. package/dist/_chunks/{address-fields-CJtu7LQU.js → address-fields-BUPRs3n-.js} +3 -3
  2. package/dist/_chunks/{address-fields-CJtu7LQU.js.map → address-fields-BUPRs3n-.js.map} +1 -1
  3. package/dist/_chunks/{agenda-card-DR9gDdKp.js → agenda-card-BDuvreCe.js} +2 -2
  4. package/dist/_chunks/{agenda-card-DR9gDdKp.js.map → agenda-card-BDuvreCe.js.map} +1 -1
  5. package/dist/_chunks/{agenda-tray-DGB1Zup-.js → agenda-tray-CfwylhWf.js} +3 -3
  6. package/dist/_chunks/{agenda-tray-DGB1Zup-.js.map → agenda-tray-CfwylhWf.js.map} +1 -1
  7. package/dist/_chunks/{ai-credits-exhausted-notice-DfAgfZDF.js → ai-credits-exhausted-notice-Bg8NpW2K.js} +2 -2
  8. package/dist/_chunks/{ai-credits-exhausted-notice-DfAgfZDF.js.map → ai-credits-exhausted-notice-Bg8NpW2K.js.map} +1 -1
  9. package/dist/_chunks/{ai-permission-notice-qsdm4Sx4.js → ai-permission-notice-C00i6VhY.js} +2 -2
  10. package/dist/_chunks/{ai-permission-notice-qsdm4Sx4.js.map → ai-permission-notice-C00i6VhY.js.map} +1 -1
  11. package/dist/_chunks/{ai-prompt-input-DSGSe4LH.js → ai-prompt-input-DzgyoKyk.js} +141 -139
  12. package/dist/_chunks/ai-prompt-input-DzgyoKyk.js.map +1 -0
  13. package/dist/_chunks/{alert-DjsJMGRE.js → alert-9kEwDza3.js} +122 -112
  14. package/dist/_chunks/alert-9kEwDza3.js.map +1 -0
  15. package/dist/_chunks/{alia-sidebar-qe0quZkB.js → alia-sidebar-B06ZSOaF.js} +3 -3
  16. package/dist/_chunks/{alia-sidebar-qe0quZkB.js.map → alia-sidebar-B06ZSOaF.js.map} +1 -1
  17. package/dist/_chunks/{anamnesis-summary-card-CMzBLTiN.js → anamnesis-summary-card-DQ3iE1gD.js} +2 -2
  18. package/dist/_chunks/{anamnesis-summary-card-CMzBLTiN.js.map → anamnesis-summary-card-DQ3iE1gD.js.map} +1 -1
  19. package/dist/_chunks/{anamnesis-summary-rows-BQ_EokKz.js → anamnesis-summary-rows-CNK0fIJk.js} +392 -388
  20. package/dist/_chunks/anamnesis-summary-rows-CNK0fIJk.js.map +1 -0
  21. package/dist/_chunks/{appointment-card-CL32sux-.js → appointment-card-5JMWi9_f.js} +2 -2
  22. package/dist/_chunks/{appointment-card-CL32sux-.js.map → appointment-card-5JMWi9_f.js.map} +1 -1
  23. package/dist/_chunks/{appointment-peek-B5mcDcXt.js → appointment-peek-D5XCfYKu.js} +2 -2
  24. package/dist/_chunks/{appointment-peek-B5mcDcXt.js.map → appointment-peek-D5XCfYKu.js.map} +1 -1
  25. package/dist/_chunks/{appointment-timeline-CCqjORFb.js → appointment-timeline-VFP6HoXT.js} +4 -4
  26. package/dist/_chunks/{appointment-timeline-CCqjORFb.js.map → appointment-timeline-VFP6HoXT.js.map} +1 -1
  27. package/dist/_chunks/{appointment-tray-qtpJt8e0.js → appointment-tray-B3PDER3I.js} +3 -3
  28. package/dist/_chunks/{appointment-tray-qtpJt8e0.js.map → appointment-tray-B3PDER3I.js.map} +1 -1
  29. package/dist/_chunks/{audio-recorder-B11RR-rC.js → audio-recorder-4Ll0pwYK.js} +3 -3
  30. package/dist/_chunks/{audio-recorder-B11RR-rC.js.map → audio-recorder-4Ll0pwYK.js.map} +1 -1
  31. package/dist/_chunks/{auth-form-parts-DwUTH6YN.js → auth-form-parts-B40zvD-a.js} +2 -2
  32. package/dist/_chunks/{auth-form-parts-DwUTH6YN.js.map → auth-form-parts-B40zvD-a.js.map} +1 -1
  33. package/dist/_chunks/avatar-BPiPL7ND.js +199 -0
  34. package/dist/_chunks/avatar-BPiPL7ND.js.map +1 -0
  35. package/dist/_chunks/{balance-badge-cell-DZNthHO1.js → balance-badge-cell-BG3DMly4.js} +4 -4
  36. package/dist/_chunks/{balance-badge-cell-DZNthHO1.js.map → balance-badge-cell-BG3DMly4.js.map} +1 -1
  37. package/dist/_chunks/{bishop-score-CaNTrikJ.js → bishop-score-Df8nF1qg.js} +2 -2
  38. package/dist/_chunks/{bishop-score-CaNTrikJ.js.map → bishop-score-Df8nF1qg.js.map} +1 -1
  39. package/dist/_chunks/{booking-tTVxKPQY.js → booking-B1pDbERi.js} +377 -335
  40. package/dist/_chunks/booking-B1pDbERi.js.map +1 -0
  41. package/dist/_chunks/{calendar-BhN-jisv.js → calendar-BvOM8rG3.js} +2 -2
  42. package/dist/_chunks/{calendar-BhN-jisv.js.map → calendar-BvOM8rG3.js.map} +1 -1
  43. package/dist/_chunks/{calendar-workspace-MRrzcxAy.js → calendar-workspace-CYK1M83j.js} +18 -18
  44. package/dist/_chunks/{calendar-workspace-MRrzcxAy.js.map → calendar-workspace-CYK1M83j.js.map} +1 -1
  45. package/dist/_chunks/{chat-message-fRLZ95O5.js → chat-message-Be-9vIIQ.js} +2 -2
  46. package/dist/_chunks/{chat-message-fRLZ95O5.js.map → chat-message-Be-9vIIQ.js.map} +1 -1
  47. package/dist/_chunks/{clinical-note-card-BnFTIs6x.js → clinical-note-card-Caidqcwa.js} +2 -2
  48. package/dist/_chunks/{clinical-note-card-BnFTIs6x.js.map → clinical-note-card-Caidqcwa.js.map} +1 -1
  49. package/dist/_chunks/{color-picker-BsggJovx.js → color-picker-AcaWuKah.js} +99 -95
  50. package/dist/_chunks/color-picker-AcaWuKah.js.map +1 -0
  51. package/dist/_chunks/{combobox-U5yfO6o0.js → combobox-vF9O-QoG.js} +92 -83
  52. package/dist/_chunks/combobox-vF9O-QoG.js.map +1 -0
  53. package/dist/_chunks/{contact-profile-card-C4-OCshj.js → contact-profile-card-CAwwOqHl.js} +40 -40
  54. package/dist/_chunks/contact-profile-card-CAwwOqHl.js.map +1 -0
  55. package/dist/_chunks/{control-room-rail-DUerqHeo.js → control-room-rail-BB6rCDWI.js} +3 -3
  56. package/dist/_chunks/{control-room-rail-DUerqHeo.js.map → control-room-rail-BB6rCDWI.js.map} +1 -1
  57. package/dist/_chunks/{country-select-DF5Bd_mn.js → country-select-CSE2Zm_s.js} +2 -2
  58. package/dist/_chunks/{country-select-DF5Bd_mn.js.map → country-select-CSE2Zm_s.js.map} +1 -1
  59. package/dist/_chunks/dashboard-grid-7JzaiKnk.js +1487 -0
  60. package/dist/_chunks/dashboard-grid-7JzaiKnk.js.map +1 -0
  61. package/dist/_chunks/{data-table-COoCQ4n_.js → data-table-Cty4-Jht.js} +3 -3
  62. package/dist/_chunks/{data-table-COoCQ4n_.js.map → data-table-Cty4-Jht.js.map} +1 -1
  63. package/dist/_chunks/{dependent-selector-DBr1AhLg.js → dependent-selector-C4kOgO8b.js} +2 -2
  64. package/dist/_chunks/{dependent-selector-DBr1AhLg.js.map → dependent-selector-C4kOgO8b.js.map} +1 -1
  65. package/dist/_chunks/{document-preview-VyQOjFVL.js → document-preview-513f3iPn.js} +4 -4
  66. package/dist/_chunks/{document-preview-VyQOjFVL.js.map → document-preview-513f3iPn.js.map} +1 -1
  67. package/dist/_chunks/{document-scanner-CXH_GYh4.js → document-scanner-Bd3wbzpI.js} +2 -2
  68. package/dist/_chunks/{document-scanner-CXH_GYh4.js.map → document-scanner-Bd3wbzpI.js.map} +1 -1
  69. package/dist/_chunks/{editable-description-ChGNdYY8.js → editable-description-DnAFi360.js} +2 -2
  70. package/dist/_chunks/{editable-description-ChGNdYY8.js.map → editable-description-DnAFi360.js.map} +1 -1
  71. package/dist/_chunks/{entity-summary-Bj-Wxq7Y.js → entity-summary-C2B8yNmc.js} +4 -4
  72. package/dist/_chunks/{entity-summary-Bj-Wxq7Y.js.map → entity-summary-C2B8yNmc.js.map} +1 -1
  73. package/dist/_chunks/{error-summary-PUE5Zxp9.js → error-summary-mGxIyDAY.js} +2 -2
  74. package/dist/_chunks/{error-summary-PUE5Zxp9.js.map → error-summary-mGxIyDAY.js.map} +1 -1
  75. package/dist/_chunks/{face-scheme-DAD-mXzM.js → face-scheme-CSJdRNad.js} +248 -244
  76. package/dist/_chunks/{face-scheme-DAD-mXzM.js.map → face-scheme-CSJdRNad.js.map} +1 -1
  77. package/dist/_chunks/{file-manager-RiV7-OEE.js → file-manager-D4cPnRhL.js} +3 -3
  78. package/dist/_chunks/{file-manager-RiV7-OEE.js.map → file-manager-D4cPnRhL.js.map} +1 -1
  79. package/dist/_chunks/{forgot-password-form-CPOfRE0C.js → forgot-password-form-Dqi7R-NL.js} +4 -4
  80. package/dist/_chunks/{forgot-password-form-CPOfRE0C.js.map → forgot-password-form-Dqi7R-NL.js.map} +1 -1
  81. package/dist/_chunks/format-number-DdzqwMs1.js +13 -0
  82. package/dist/_chunks/format-number-DdzqwMs1.js.map +1 -0
  83. package/dist/_chunks/{freemium-paywall-6DO7noHX.js → freemium-paywall-C73C8Rgd.js} +2 -2
  84. package/dist/_chunks/{freemium-paywall-6DO7noHX.js.map → freemium-paywall-C73C8Rgd.js.map} +1 -1
  85. package/dist/_chunks/{gestational-age-calculator-CZYa2D6m.js → gestational-age-calculator-Du53p8MH.js} +2 -2
  86. package/dist/_chunks/{gestational-age-calculator-CZYa2D6m.js.map → gestational-age-calculator-Du53p8MH.js.map} +1 -1
  87. package/dist/_chunks/{header-settings-BSH9Gk0J.js → header-settings-DlUbvAUx.js} +37 -36
  88. package/dist/_chunks/header-settings-DlUbvAUx.js.map +1 -0
  89. package/dist/_chunks/{heatmap-C1TeC7wT.js → heatmap-DbZIQg14.js} +4 -4
  90. package/dist/_chunks/{heatmap-C1TeC7wT.js.map → heatmap-DbZIQg14.js.map} +1 -1
  91. package/dist/_chunks/{help-me-write-templates-Bw3Q58x-.js → help-me-write-templates-5WkUfvc_.js} +3 -3
  92. package/dist/_chunks/{help-me-write-templates-Bw3Q58x-.js.map → help-me-write-templates-5WkUfvc_.js.map} +1 -1
  93. package/dist/_chunks/{kit-extensions-DWs1UEXb.js → kit-extensions-CYvLL4ee.js} +3 -3
  94. package/dist/_chunks/{kit-extensions-DWs1UEXb.js.map → kit-extensions-CYvLL4ee.js.map} +1 -1
  95. package/dist/_chunks/length-token-DwMnGEYT.js +24 -0
  96. package/dist/_chunks/length-token-DwMnGEYT.js.map +1 -0
  97. package/dist/_chunks/{link-cell-renderer-CtTsvfPY.js → link-cell-renderer-DtIsQWDO.js} +4 -4
  98. package/dist/_chunks/{link-cell-renderer-CtTsvfPY.js.map → link-cell-renderer-DtIsQWDO.js.map} +1 -1
  99. package/dist/_chunks/{login-dev-card-A-CL3mjt.js → login-dev-card-vEL-o5wq.js} +3 -3
  100. package/dist/_chunks/{login-dev-card-A-CL3mjt.js.map → login-dev-card-vEL-o5wq.js.map} +1 -1
  101. package/dist/_chunks/{map-view-BuVfJMEa.js → map-view-CtohteZD.js} +300 -191
  102. package/dist/_chunks/map-view-CtohteZD.js.map +1 -0
  103. package/dist/_chunks/{marketplace-app-shell-DtSX8sYb.js → marketplace-app-shell-CcLQ0Dn-.js} +4 -4
  104. package/dist/_chunks/{marketplace-app-shell-DtSX8sYb.js.map → marketplace-app-shell-CcLQ0Dn-.js.map} +1 -1
  105. package/dist/_chunks/{message-card-A3mJNqfy.js → message-card-C_ksqIYM.js} +2 -2
  106. package/dist/_chunks/{message-card-A3mJNqfy.js.map → message-card-C_ksqIYM.js.map} +1 -1
  107. package/dist/_chunks/{message-tray-Ft6vSr71.js → message-tray-DCoQ4GQb.js} +3 -3
  108. package/dist/_chunks/{message-tray-Ft6vSr71.js.map → message-tray-DCoQ4GQb.js.map} +1 -1
  109. package/dist/_chunks/{multi-select-CMaAQQgb.js → multi-select-BOad3za9.js} +110 -98
  110. package/dist/_chunks/multi-select-BOad3za9.js.map +1 -0
  111. package/dist/_chunks/{muscle-scheme-YoN3rYXV.js → muscle-scheme-C66WlCxG.js} +2 -2
  112. package/dist/_chunks/{muscle-scheme-YoN3rYXV.js.map → muscle-scheme-C66WlCxG.js.map} +1 -1
  113. package/dist/_chunks/{note-timeline-DDqNU46n.js → note-timeline-KzL52MmB.js} +2 -2
  114. package/dist/_chunks/{note-timeline-DDqNU46n.js.map → note-timeline-KzL52MmB.js.map} +1 -1
  115. package/dist/_chunks/{notes-panel-IdsmqRFC.js → notes-panel-BXN46XkF.js} +6 -6
  116. package/dist/_chunks/{notes-panel-IdsmqRFC.js.map → notes-panel-BXN46XkF.js.map} +1 -1
  117. package/dist/_chunks/notice-group-DkYzKyAZ.js +291 -0
  118. package/dist/_chunks/notice-group-DkYzKyAZ.js.map +1 -0
  119. package/dist/_chunks/{notification-tray-BR3seWA7.js → notification-tray-Cp18MW5b.js} +2 -2
  120. package/dist/_chunks/{notification-tray-BR3seWA7.js.map → notification-tray-Cp18MW5b.js.map} +1 -1
  121. package/dist/_chunks/{operator-hero-3_RG4Dkj.js → operator-hero-6aAIQaFZ.js} +83 -66
  122. package/dist/_chunks/operator-hero-6aAIQaFZ.js.map +1 -0
  123. package/dist/_chunks/{optical-prescription-CxfMsbxi.js → optical-prescription-ulXnDbBe.js} +525 -509
  124. package/dist/_chunks/optical-prescription-ulXnDbBe.js.map +1 -0
  125. package/dist/_chunks/panel-header-CbtlTe85.js +190 -0
  126. package/dist/_chunks/panel-header-CbtlTe85.js.map +1 -0
  127. package/dist/_chunks/{panel-subview-yP4qIbKS.js → panel-subview-BPU7220K.js} +2 -2
  128. package/dist/_chunks/{panel-subview-yP4qIbKS.js.map → panel-subview-BPU7220K.js.map} +1 -1
  129. package/dist/_chunks/{patient-details-C-EWQTms.js → patient-details-C4Dyo7Ck.js} +4 -4
  130. package/dist/_chunks/{patient-details-C-EWQTms.js.map → patient-details-C4Dyo7Ck.js.map} +1 -1
  131. package/dist/_chunks/{patient-field-row-lY-Tb5Mo.js → patient-field-row-DROvUkFu.js} +4 -4
  132. package/dist/_chunks/{patient-field-row-lY-Tb5Mo.js.map → patient-field-row-DROvUkFu.js.map} +1 -1
  133. package/dist/_chunks/{patient-search-DpAKidZ5.js → patient-search-BADdx3M1.js} +2 -2
  134. package/dist/_chunks/{patient-search-DpAKidZ5.js.map → patient-search-BADdx3M1.js.map} +1 -1
  135. package/dist/_chunks/{patient-summary-card-Bpto_VCD.js → patient-summary-card-CAimxbuI.js} +4 -4
  136. package/dist/_chunks/{patient-summary-card-Bpto_VCD.js.map → patient-summary-card-CAimxbuI.js.map} +1 -1
  137. package/dist/_chunks/{payment-automation-upsell-BQ307qEX.js → payment-automation-upsell-CiwF5UrC.js} +2 -2
  138. package/dist/_chunks/{payment-automation-upsell-BQ307qEX.js.map → payment-automation-upsell-CiwF5UrC.js.map} +1 -1
  139. package/dist/_chunks/{payment-form-XKtinW8r.js → payment-form-PBuh8PIa.js} +2 -2
  140. package/dist/_chunks/{payment-form-XKtinW8r.js.map → payment-form-PBuh8PIa.js.map} +1 -1
  141. package/dist/_chunks/{pdf-viewer-BvoVMjH4.js → pdf-viewer-gAsNUsA8.js} +2 -2
  142. package/dist/_chunks/{pdf-viewer-BvoVMjH4.js.map → pdf-viewer-gAsNUsA8.js.map} +1 -1
  143. package/dist/_chunks/{periodontal-risk-chart-CPy7CNFe.js → periodontal-risk-chart-B7S9OmPC.js} +97 -89
  144. package/dist/_chunks/periodontal-risk-chart-B7S9OmPC.js.map +1 -0
  145. package/dist/_chunks/practice-profile-hero-qfrsFQI_.js +236 -0
  146. package/dist/_chunks/practice-profile-hero-qfrsFQI_.js.map +1 -0
  147. package/dist/_chunks/{practice-results-BrUDDMXC.js → practice-results-BzThnpnm.js} +328 -298
  148. package/dist/_chunks/practice-results-BzThnpnm.js.map +1 -0
  149. package/dist/_chunks/{pregnancy-dating-B8wo4l_r.js → pregnancy-dating-EFcFUJkQ.js} +2 -2
  150. package/dist/_chunks/{pregnancy-dating-B8wo4l_r.js.map → pregnancy-dating-EFcFUJkQ.js.map} +1 -1
  151. package/dist/_chunks/{privacy-mask-Ch7743uk.js → privacy-mask-CCz9zuIh.js} +2 -2
  152. package/dist/_chunks/{privacy-mask-Ch7743uk.js.map → privacy-mask-CCz9zuIh.js.map} +1 -1
  153. package/dist/_chunks/{product-hub-panel-C_ZosrBt.js → product-hub-panel-YuFbNPlT.js} +2 -2
  154. package/dist/_chunks/{product-hub-panel-C_ZosrBt.js.map → product-hub-panel-YuFbNPlT.js.map} +1 -1
  155. package/dist/_chunks/progress-notice-DiHWZ8Ms.js +279 -0
  156. package/dist/_chunks/progress-notice-DiHWZ8Ms.js.map +1 -0
  157. package/dist/_chunks/{province-select-Bd20Z9Br.js → province-select-CDjs5obD.js} +2 -2
  158. package/dist/_chunks/{province-select-Bd20Z9Br.js.map → province-select-CDjs5obD.js.map} +1 -1
  159. package/dist/_chunks/{radiograph-panel.agent-8Ewv8-d7.js → radiograph-panel.agent-4UllIoTQ.js} +2 -2
  160. package/dist/_chunks/{radiograph-panel.agent-8Ewv8-d7.js.map → radiograph-panel.agent-4UllIoTQ.js.map} +1 -1
  161. package/dist/_chunks/{rating-C1Vrmpsi.js → rating-CGYpg5dj.js} +43 -44
  162. package/dist/_chunks/rating-CGYpg5dj.js.map +1 -0
  163. package/dist/_chunks/{registration-form-BxwqUZzk.js → registration-form-1B0PTDal.js} +4 -4
  164. package/dist/_chunks/{registration-form-BxwqUZzk.js.map → registration-form-1B0PTDal.js.map} +1 -1
  165. package/dist/_chunks/{reviews-panel-AvsVgtJu.js → reviews-panel-CosDZyow.js} +29 -7
  166. package/dist/_chunks/reviews-panel-CosDZyow.js.map +1 -0
  167. package/dist/_chunks/{rich-text-editor-aCIoptbg.js → rich-text-editor-56dSsyZI.js} +3 -3
  168. package/dist/_chunks/{rich-text-editor-aCIoptbg.js.map → rich-text-editor-56dSsyZI.js.map} +1 -1
  169. package/dist/_chunks/{select-k4gBdS8N.js → select-4S-eYZUf.js} +244 -214
  170. package/dist/_chunks/select-4S-eYZUf.js.map +1 -0
  171. package/dist/_chunks/{sign-document-D1P1nUQA.js → sign-document-BiOTs1P4.js} +2 -2
  172. package/dist/_chunks/{sign-document-D1P1nUQA.js.map → sign-document-BiOTs1P4.js.map} +1 -1
  173. package/dist/_chunks/{signature-request-3u6TvRt2.js → signature-request-DAmNj_uq.js} +5 -5
  174. package/dist/_chunks/{signature-request-3u6TvRt2.js.map → signature-request-DAmNj_uq.js.map} +1 -1
  175. package/dist/_chunks/skeleton-tTWJpvAq.js +415 -0
  176. package/dist/_chunks/skeleton-tTWJpvAq.js.map +1 -0
  177. package/dist/_chunks/{slot-grid-dj5f6R2w.js → slot-grid-D_gix9mJ.js} +2 -2
  178. package/dist/_chunks/{slot-grid-dj5f6R2w.js.map → slot-grid-D_gix9mJ.js.map} +1 -1
  179. package/dist/_chunks/{tabs-2x3L13jn.js → tabs-BTj-2qMZ.js} +2 -2
  180. package/dist/_chunks/{tabs-2x3L13jn.js.map → tabs-BTj-2qMZ.js.map} +1 -1
  181. package/dist/_chunks/{task-card-BS7Uqevr.js → task-card-Ci2XbLmq.js} +2 -2
  182. package/dist/_chunks/{task-card-BS7Uqevr.js.map → task-card-Ci2XbLmq.js.map} +1 -1
  183. package/dist/_chunks/{task-editor-Bb5MMcid.js → task-editor-BomyxGoZ.js} +8 -8
  184. package/dist/_chunks/{task-editor-Bb5MMcid.js.map → task-editor-BomyxGoZ.js.map} +1 -1
  185. package/dist/_chunks/{task-tray-eQU4KJcA.js → task-tray-Dnc72nl-.js} +3 -3
  186. package/dist/_chunks/{task-tray-eQU4KJcA.js.map → task-tray-Dnc72nl-.js.map} +1 -1
  187. package/dist/_chunks/{tasks-panel-BOb57Ysw.js → tasks-panel-ATz9JDy8.js} +6 -6
  188. package/dist/_chunks/{tasks-panel-BOb57Ysw.js.map → tasks-panel-ATz9JDy8.js.map} +1 -1
  189. package/dist/_chunks/{theme-toggle-Ctb77x6O.js → theme-toggle-DT_Jn4DC.js} +147 -138
  190. package/dist/_chunks/theme-toggle-DT_Jn4DC.js.map +1 -0
  191. package/dist/_chunks/{timeline-DEIuHrWz.js → timeline-wUuTDFY_.js} +2 -2
  192. package/dist/_chunks/{timeline-DEIuHrWz.js.map → timeline-wUuTDFY_.js.map} +1 -1
  193. package/dist/_chunks/{tool-rail-C-03rH2I.js → tool-rail-C-M3eVdY.js} +2 -2
  194. package/dist/_chunks/{tool-rail-C-03rH2I.js.map → tool-rail-C-M3eVdY.js.map} +1 -1
  195. package/dist/_chunks/{transcript-panel-XudW5l6l.js → transcript-panel-CoHHpcFg.js} +2 -2
  196. package/dist/_chunks/{transcript-panel-XudW5l6l.js.map → transcript-panel-CoHHpcFg.js.map} +1 -1
  197. package/dist/_chunks/{treatment-receipt-Cpm8tqQN.js → treatment-receipt-pFqWFyD_.js} +2 -2
  198. package/dist/_chunks/{treatment-receipt-Cpm8tqQN.js.map → treatment-receipt-pFqWFyD_.js.map} +1 -1
  199. package/dist/_chunks/{unit-converter-BPZ0Ldkb.js → unit-converter-CIoTmCmP.js} +2 -2
  200. package/dist/_chunks/{unit-converter-BPZ0Ldkb.js.map → unit-converter-CIoTmCmP.js.map} +1 -1
  201. package/dist/_chunks/{use-appointment-details-read-CVSPoP5j.js → use-appointment-details-read-CUGfE0hV.js} +12 -12
  202. package/dist/_chunks/{use-appointment-details-read-CVSPoP5j.js.map → use-appointment-details-read-CUGfE0hV.js.map} +1 -1
  203. package/dist/_chunks/use-dismissed-CTOWqA0e.js +177 -0
  204. package/dist/_chunks/use-dismissed-CTOWqA0e.js.map +1 -0
  205. package/dist/_chunks/{voice-control-panel-BJIEbDq6.js → voice-control-panel-B8Lrk0C4.js} +4 -4
  206. package/dist/_chunks/{voice-control-panel-BJIEbDq6.js.map → voice-control-panel-B8Lrk0C4.js.map} +1 -1
  207. package/dist/_chunks/{warning-stack-BdY-0bd3.js → warning-stack-BhHUmRiD.js} +2 -2
  208. package/dist/_chunks/{warning-stack-BdY-0bd3.js.map → warning-stack-BhHUmRiD.js.map} +1 -1
  209. package/dist/_chunks/{workflow-map-CYbRD9ek.js → workflow-map-ln4_OG8A.js} +2 -2
  210. package/dist/_chunks/{workflow-map-CYbRD9ek.js.map → workflow-map-ln4_OG8A.js.map} +1 -1
  211. package/dist/agent-catalog.json +172 -4
  212. package/dist/agent-i18n/en.json +25 -1
  213. package/dist/components/_shared/format-number.d.ts +20 -0
  214. package/dist/components/_shared/format-number.d.ts.map +1 -0
  215. package/dist/components/_shared/length-token.d.ts +12 -0
  216. package/dist/components/_shared/length-token.d.ts.map +1 -0
  217. package/dist/components/_shared/option.d.ts +1 -0
  218. package/dist/components/_shared/option.d.ts.map +1 -1
  219. package/dist/components/address-fields/index.js +1 -1
  220. package/dist/components/agenda-card/index.js +1 -1
  221. package/dist/components/agenda-tray/index.js +1 -1
  222. package/dist/components/ai-credits-notice/index.js +1 -1
  223. package/dist/components/ai-permission-notice/index.js +1 -1
  224. package/dist/components/ai-prompt-input/ai-prompt-input.d.ts.map +1 -1
  225. package/dist/components/ai-prompt-input/index.js +1 -1
  226. package/dist/components/alert/alert.d.ts +26 -0
  227. package/dist/components/alert/alert.d.ts.map +1 -1
  228. package/dist/components/alert/index.js +1 -1
  229. package/dist/components/anamnesis-summary-card/index.js +1 -1
  230. package/dist/components/appointment-card/index.js +2 -2
  231. package/dist/components/appointment-details-panel/index.js +1 -1
  232. package/dist/components/appointment-peek/index.js +1 -1
  233. package/dist/components/appointment-timeline/index.js +1 -1
  234. package/dist/components/audio-recorder/index.js +1 -1
  235. package/dist/components/avatar/avatar.d.ts +2 -0
  236. package/dist/components/avatar/avatar.d.ts.map +1 -1
  237. package/dist/components/avatar/index.js +1 -1
  238. package/dist/components/bishop-score/index.js +1 -1
  239. package/dist/components/booking/booking.d.ts.map +1 -1
  240. package/dist/components/booking/details-form.d.ts.map +1 -1
  241. package/dist/components/booking/index.js +1 -1
  242. package/dist/components/calendar/index.js +1 -1
  243. package/dist/components/chat-message/index.js +1 -1
  244. package/dist/components/clinical-note-card/index.js +1 -1
  245. package/dist/components/color-picker/color-picker.d.ts.map +1 -1
  246. package/dist/components/color-picker/index.js +1 -1
  247. package/dist/components/combobox/combobox.d.ts.map +1 -1
  248. package/dist/components/combobox/index.js +1 -1
  249. package/dist/components/contact-profile-card/index.js +1 -1
  250. package/dist/components/control-room-rail/index.js +1 -1
  251. package/dist/components/country-select/index.js +1 -1
  252. package/dist/components/dashboard-grid/dashboard-grid.agent.d.ts.map +1 -1
  253. package/dist/components/dashboard-grid/dashboard-grid.d.ts +20 -1
  254. package/dist/components/dashboard-grid/dashboard-grid.d.ts.map +1 -1
  255. package/dist/components/dashboard-grid/index.js +1 -1
  256. package/dist/components/data-table/index.js +2 -2
  257. package/dist/components/dependent-selector/index.js +1 -1
  258. package/dist/components/document-preview/index.js +1 -1
  259. package/dist/components/document-scanner/index.js +1 -1
  260. package/dist/components/editable-description/index.js +1 -1
  261. package/dist/components/entity-summary/index.js +1 -1
  262. package/dist/components/error-summary/index.js +1 -1
  263. package/dist/components/face-scheme/face-scheme.d.ts.map +1 -1
  264. package/dist/components/face-scheme/index.js +1 -1
  265. package/dist/components/file-manager/index.js +1 -1
  266. package/dist/components/freemium-paywall/index.js +1 -1
  267. package/dist/components/gestational-age-calculator/index.js +1 -1
  268. package/dist/components/header-settings/header-settings.d.ts.map +1 -1
  269. package/dist/components/header-settings/index.js +1 -1
  270. package/dist/components/heatmap/index.js +1 -1
  271. package/dist/components/index.d.ts +4 -2
  272. package/dist/components/index.d.ts.map +1 -1
  273. package/dist/components/map-view/index.d.ts +1 -1
  274. package/dist/components/map-view/index.d.ts.map +1 -1
  275. package/dist/components/map-view/index.js +1 -1
  276. package/dist/components/map-view/map-view.d.ts +51 -0
  277. package/dist/components/map-view/map-view.d.ts.map +1 -1
  278. package/dist/components/message-card/index.js +1 -1
  279. package/dist/components/message-tray/index.js +1 -1
  280. package/dist/components/multi-select/index.js +1 -1
  281. package/dist/components/multi-select/multi-select.d.ts.map +1 -1
  282. package/dist/components/muscle-scheme/index.js +1 -1
  283. package/dist/components/note-timeline/index.js +1 -1
  284. package/dist/components/notes-panel/index.js +1 -1
  285. package/dist/components/notice-group/index.d.ts +3 -0
  286. package/dist/components/notice-group/index.d.ts.map +1 -0
  287. package/dist/components/notice-group/index.js +6 -0
  288. package/dist/components/notice-group/index.js.map +1 -0
  289. package/dist/components/notice-group/notice-group.agent.d.ts +4 -0
  290. package/dist/components/notice-group/notice-group.agent.d.ts.map +1 -0
  291. package/dist/components/notice-group/notice-group.d.ts +43 -0
  292. package/dist/components/notice-group/notice-group.d.ts.map +1 -0
  293. package/dist/components/notification-tray/index.js +1 -1
  294. package/dist/components/operator-hero/index.js +1 -1
  295. package/dist/components/operator-hero/operator-hero.d.ts.map +1 -1
  296. package/dist/components/optical-prescription/index.js +1 -1
  297. package/dist/components/optical-prescription/optical-prescription-data.d.ts +8 -8
  298. package/dist/components/optical-prescription/optical-prescription-data.d.ts.map +1 -1
  299. package/dist/components/optical-prescription/optical-prescription.d.ts.map +1 -1
  300. package/dist/components/panel-header/index.js +1 -1
  301. package/dist/components/panel-header/panel-header.d.ts +10 -0
  302. package/dist/components/panel-header/panel-header.d.ts.map +1 -1
  303. package/dist/components/panel-subview/index.js +1 -1
  304. package/dist/components/patient-details/index.js +1 -1
  305. package/dist/components/patient-search/index.js +1 -1
  306. package/dist/components/patient-summary-card/index.js +1 -1
  307. package/dist/components/patient-table/index.js +1 -1
  308. package/dist/components/payment-form/index.js +1 -1
  309. package/dist/components/pdf-viewer/index.js +1 -1
  310. package/dist/components/periodontal-risk-chart/index.js +1 -1
  311. package/dist/components/periodontal-risk-chart/periodontal-risk-chart.d.ts.map +1 -1
  312. package/dist/components/practice-profile-hero/index.js +1 -1
  313. package/dist/components/practice-profile-hero/practice-profile-hero.d.ts +4 -1
  314. package/dist/components/practice-profile-hero/practice-profile-hero.d.ts.map +1 -1
  315. package/dist/components/practice-results/index.js +1 -1
  316. package/dist/components/practice-results/practice-results.d.ts +10 -2
  317. package/dist/components/practice-results/practice-results.d.ts.map +1 -1
  318. package/dist/components/pregnancy-dating/index.js +1 -1
  319. package/dist/components/product-hub-tray/index.js +1 -1
  320. package/dist/components/progress-notice/index.d.ts +3 -0
  321. package/dist/components/progress-notice/index.d.ts.map +1 -0
  322. package/dist/components/progress-notice/index.js +6 -0
  323. package/dist/components/progress-notice/index.js.map +1 -0
  324. package/dist/components/progress-notice/progress-notice.agent.d.ts +4 -0
  325. package/dist/components/progress-notice/progress-notice.agent.d.ts.map +1 -0
  326. package/dist/components/progress-notice/progress-notice.d.ts +81 -0
  327. package/dist/components/progress-notice/progress-notice.d.ts.map +1 -0
  328. package/dist/components/province-select/index.js +1 -1
  329. package/dist/components/radiograph-panel/index.js +1 -1
  330. package/dist/components/rating/index.js +1 -1
  331. package/dist/components/rating/rating.d.ts.map +1 -1
  332. package/dist/components/reviews-panel/index.js +1 -1
  333. package/dist/components/reviews-panel/reviews-panel.d.ts.map +1 -1
  334. package/dist/components/rich-text-editor/index.js +2 -2
  335. package/dist/components/select/index.js +1 -1
  336. package/dist/components/select/select.d.ts +6 -0
  337. package/dist/components/select/select.d.ts.map +1 -1
  338. package/dist/components/sign-document/index.js +1 -1
  339. package/dist/components/skeleton/index.d.ts +1 -1
  340. package/dist/components/skeleton/index.d.ts.map +1 -1
  341. package/dist/components/skeleton/index.js +1 -1
  342. package/dist/components/skeleton/skeleton.d.ts +41 -1
  343. package/dist/components/skeleton/skeleton.d.ts.map +1 -1
  344. package/dist/components/skeleton-scheme/index.js +1 -1
  345. package/dist/components/slot-grid/index.js +1 -1
  346. package/dist/components/tabs/index.js +1 -1
  347. package/dist/components/task-card/index.js +1 -1
  348. package/dist/components/task-editor/index.js +1 -1
  349. package/dist/components/task-tray/index.js +1 -1
  350. package/dist/components/tasks-panel/index.js +1 -1
  351. package/dist/components/theme-toggle/index.js +1 -1
  352. package/dist/components/theme-toggle/theme-toggle.d.ts.map +1 -1
  353. package/dist/components/timeline/index.js +1 -1
  354. package/dist/components/tool-rail/index.js +1 -1
  355. package/dist/components/transcript-panel/index.js +1 -1
  356. package/dist/components/treatment-receipt/index.js +1 -1
  357. package/dist/components/unit-converter/index.js +1 -1
  358. package/dist/components/voice-control-panel/index.js +1 -1
  359. package/dist/components/warning-stack/index.js +1 -1
  360. package/dist/components/workflow/index.js +1 -1
  361. package/dist/hooks/index.d.ts +1 -0
  362. package/dist/hooks/index.d.ts.map +1 -1
  363. package/dist/hooks/index.js +81 -76
  364. package/dist/hooks/index.js.map +1 -1
  365. package/dist/hooks/use-dismissed.d.ts +58 -0
  366. package/dist/hooks/use-dismissed.d.ts.map +1 -0
  367. package/dist/i18n/locales/ar.d.ts +22 -0
  368. package/dist/i18n/locales/ar.d.ts.map +1 -1
  369. package/dist/i18n/locales/ar.js +22 -0
  370. package/dist/i18n/locales/ar.js.map +1 -1
  371. package/dist/i18n/locales/de.d.ts +22 -0
  372. package/dist/i18n/locales/de.d.ts.map +1 -1
  373. package/dist/i18n/locales/de.js +22 -0
  374. package/dist/i18n/locales/de.js.map +1 -1
  375. package/dist/i18n/locales/el.d.ts +22 -0
  376. package/dist/i18n/locales/el.d.ts.map +1 -1
  377. package/dist/i18n/locales/el.js +22 -0
  378. package/dist/i18n/locales/el.js.map +1 -1
  379. package/dist/i18n/locales/en.d.ts +22 -0
  380. package/dist/i18n/locales/en.d.ts.map +1 -1
  381. package/dist/i18n/locales/en.js +22 -0
  382. package/dist/i18n/locales/en.js.map +1 -1
  383. package/dist/i18n/locales/es.d.ts +22 -0
  384. package/dist/i18n/locales/es.d.ts.map +1 -1
  385. package/dist/i18n/locales/es.js +22 -0
  386. package/dist/i18n/locales/es.js.map +1 -1
  387. package/dist/i18n/locales/fr.d.ts +22 -0
  388. package/dist/i18n/locales/fr.d.ts.map +1 -1
  389. package/dist/i18n/locales/fr.js +22 -0
  390. package/dist/i18n/locales/fr.js.map +1 -1
  391. package/dist/i18n/locales/hi.d.ts +22 -0
  392. package/dist/i18n/locales/hi.d.ts.map +1 -1
  393. package/dist/i18n/locales/hi.js +22 -0
  394. package/dist/i18n/locales/hi.js.map +1 -1
  395. package/dist/i18n/locales/it.d.ts +22 -0
  396. package/dist/i18n/locales/it.d.ts.map +1 -1
  397. package/dist/i18n/locales/it.js +22 -0
  398. package/dist/i18n/locales/it.js.map +1 -1
  399. package/dist/i18n/locales/ja.d.ts +22 -0
  400. package/dist/i18n/locales/ja.d.ts.map +1 -1
  401. package/dist/i18n/locales/ja.js +22 -0
  402. package/dist/i18n/locales/ja.js.map +1 -1
  403. package/dist/i18n/locales/nl.d.ts +22 -0
  404. package/dist/i18n/locales/nl.d.ts.map +1 -1
  405. package/dist/i18n/locales/nl.js +22 -0
  406. package/dist/i18n/locales/nl.js.map +1 -1
  407. package/dist/i18n/locales/pl.d.ts +22 -0
  408. package/dist/i18n/locales/pl.d.ts.map +1 -1
  409. package/dist/i18n/locales/pl.js +22 -0
  410. package/dist/i18n/locales/pl.js.map +1 -1
  411. package/dist/i18n/locales/pt.d.ts +22 -0
  412. package/dist/i18n/locales/pt.d.ts.map +1 -1
  413. package/dist/i18n/locales/pt.js +22 -0
  414. package/dist/i18n/locales/pt.js.map +1 -1
  415. package/dist/i18n/locales/ro.d.ts +22 -0
  416. package/dist/i18n/locales/ro.d.ts.map +1 -1
  417. package/dist/i18n/locales/ro.js +22 -0
  418. package/dist/i18n/locales/ro.js.map +1 -1
  419. package/dist/i18n/locales/ru.d.ts +22 -0
  420. package/dist/i18n/locales/ru.d.ts.map +1 -1
  421. package/dist/i18n/locales/ru.js +22 -0
  422. package/dist/i18n/locales/ru.js.map +1 -1
  423. package/dist/i18n/locales/sq.d.ts +22 -0
  424. package/dist/i18n/locales/sq.d.ts.map +1 -1
  425. package/dist/i18n/locales/sq.js +22 -0
  426. package/dist/i18n/locales/sq.js.map +1 -1
  427. package/dist/i18n/locales/sv.d.ts +22 -0
  428. package/dist/i18n/locales/sv.d.ts.map +1 -1
  429. package/dist/i18n/locales/sv.js +22 -0
  430. package/dist/i18n/locales/sv.js.map +1 -1
  431. package/dist/i18n/locales/tr.d.ts +22 -0
  432. package/dist/i18n/locales/tr.d.ts.map +1 -1
  433. package/dist/i18n/locales/tr.js +22 -0
  434. package/dist/i18n/locales/tr.js.map +1 -1
  435. package/dist/i18n/locales/zh.d.ts +22 -0
  436. package/dist/i18n/locales/zh.d.ts.map +1 -1
  437. package/dist/i18n/locales/zh.js +22 -0
  438. package/dist/i18n/locales/zh.js.map +1 -1
  439. package/dist/index.js +1194 -1183
  440. package/dist/index.js.map +1 -1
  441. package/dist/locales/ar.json +22 -0
  442. package/dist/locales/de.json +22 -0
  443. package/dist/locales/el.json +22 -0
  444. package/dist/locales/en.json +22 -0
  445. package/dist/locales/es.json +22 -0
  446. package/dist/locales/fr.json +22 -0
  447. package/dist/locales/hi.json +22 -0
  448. package/dist/locales/it.json +22 -0
  449. package/dist/locales/ja.json +22 -0
  450. package/dist/locales/nl.json +22 -0
  451. package/dist/locales/pl.json +22 -0
  452. package/dist/locales/pt.json +22 -0
  453. package/dist/locales/ro.json +22 -0
  454. package/dist/locales/ru.json +22 -0
  455. package/dist/locales/sq.json +22 -0
  456. package/dist/locales/sv.json +22 -0
  457. package/dist/locales/tr.json +22 -0
  458. package/dist/locales/zh.json +22 -0
  459. package/dist/patterns/alia-assistant/index.js +1 -1
  460. package/dist/patterns/anamnesis/anamnesis-export-pdf.d.ts.map +1 -1
  461. package/dist/patterns/anamnesis/index.js +1 -1
  462. package/dist/patterns/calendar/index.js +1 -1
  463. package/dist/patterns/forgot-password-form/index.js +1 -1
  464. package/dist/patterns/help-me-write-templates/index.js +2 -2
  465. package/dist/patterns/login-form/index.js +1 -1
  466. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  467. package/dist/patterns/payment-automation-upsell/index.js +1 -1
  468. package/dist/patterns/registration-form/index.js +1 -1
  469. package/dist/patterns/signature-request/index.js +1 -1
  470. package/dist/tokens.css +1 -1
  471. package/package.json +9 -1
  472. package/dist/_chunks/ai-prompt-input-DSGSe4LH.js.map +0 -1
  473. package/dist/_chunks/alert-DjsJMGRE.js.map +0 -1
  474. package/dist/_chunks/anamnesis-summary-rows-BQ_EokKz.js.map +0 -1
  475. package/dist/_chunks/avatar-WZY3eGE7.js +0 -123
  476. package/dist/_chunks/avatar-WZY3eGE7.js.map +0 -1
  477. package/dist/_chunks/booking-tTVxKPQY.js.map +0 -1
  478. package/dist/_chunks/color-picker-BsggJovx.js.map +0 -1
  479. package/dist/_chunks/combobox-U5yfO6o0.js.map +0 -1
  480. package/dist/_chunks/contact-profile-card-C4-OCshj.js.map +0 -1
  481. package/dist/_chunks/dashboard-grid-B2MB7SRS.js +0 -1428
  482. package/dist/_chunks/dashboard-grid-B2MB7SRS.js.map +0 -1
  483. package/dist/_chunks/header-settings-BSH9Gk0J.js.map +0 -1
  484. package/dist/_chunks/map-view-BuVfJMEa.js.map +0 -1
  485. package/dist/_chunks/multi-select-CMaAQQgb.js.map +0 -1
  486. package/dist/_chunks/operator-hero-3_RG4Dkj.js.map +0 -1
  487. package/dist/_chunks/optical-prescription-CxfMsbxi.js.map +0 -1
  488. package/dist/_chunks/panel-header-BJkaUwnl.js +0 -128
  489. package/dist/_chunks/panel-header-BJkaUwnl.js.map +0 -1
  490. package/dist/_chunks/periodontal-risk-chart-CPy7CNFe.js.map +0 -1
  491. package/dist/_chunks/practice-profile-hero-Dfc0F60y.js +0 -193
  492. package/dist/_chunks/practice-profile-hero-Dfc0F60y.js.map +0 -1
  493. package/dist/_chunks/practice-results-BrUDDMXC.js.map +0 -1
  494. package/dist/_chunks/rating-C1Vrmpsi.js.map +0 -1
  495. package/dist/_chunks/reviews-panel-AvsVgtJu.js.map +0 -1
  496. package/dist/_chunks/select-k4gBdS8N.js.map +0 -1
  497. package/dist/_chunks/skeleton-B1KTdJ4N.js +0 -116
  498. package/dist/_chunks/skeleton-B1KTdJ4N.js.map +0 -1
  499. package/dist/_chunks/theme-toggle-Ctb77x6O.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"login-dev-card-A-CL3mjt.js","sources":["../../src/patterns/login-form/login-form.tsx","../../src/patterns/login-form/login-dev-card.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* LoginForm — the sign-in card. */\n/* */\n/* One export for the card: the mark, the heading, email and password, */\n/* the button and the way to a new password. The host keeps the page */\n/* around it and every server rule. The card checks what a browser can */\n/* check, then hands the values to `onSubmit` or posts a real form to */\n/* the host's own field names. */\n/* */\n/* The email must be an email address. A server that also signs people */\n/* in by a username cannot use this card for those accounts. */\n/* -------------------------------------------------------------------- */\n\nimport {\n forwardRef,\n useEffect,\n useId,\n useRef,\n useState,\n type HTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { cva } from 'class-variance-authority';\n// The validator EmailInput itself uses, so the two never disagree.\nimport isEmail from 'validator/lib/isEmail';\nimport { Button } from '../../components/button';\nimport { Card } from '../../components/card';\nimport { EmailInput } from '../../components/email-input';\nimport { ErrorSummary } from '../../components/error-summary';\nimport { FormField } from '../../components/form-field';\nimport { PasswordInput } from '../../components/password-input';\nimport { isSafeHref } from '../../components/_shared/safe-href';\nimport { useStateBackedInput } from '../../components/_shared/use-state-backed-input';\nimport {\n AuthCardHeading,\n AuthFormMessage,\n AuthFormStatus,\n AuthTextLink,\n ExtraFields,\n useExtraFields,\n useFormAction,\n} from '../_shared/auth-form-parts';\nimport type { BrandMarkMotion } from '../_shared/brand-mark';\nimport {\n useErrorSummary,\n useFormMessageAnnounce,\n} from '../_shared/use-error-summary';\nimport { useRegistrationSubmit } from '../registration-form/use-registration-submit';\n\n/* -------------------------------------------------------------------- */\n/* Types */\n/* -------------------------------------------------------------------- */\n\n/** The fields of the form, in the order they appear. */\nexport const LOGIN_FORM_FIELDS = ['email', 'password'] as const;\n\nexport type LoginFormField = (typeof LOGIN_FORM_FIELDS)[number];\n\n/** What `onSubmit` receives once both checks have passed. */\nexport interface LoginFormValues {\n email: string;\n password: string;\n}\n\n/** Values to show when the form opens. There is no password here, on\n * purpose: a password is never sent back to the browser. */\nexport type LoginFormInitialValues = Partial<Pick<LoginFormValues, 'email'>>;\n\n/** Messages from the server, already translated: one per field, plus\n * `form` for a message about the whole form, such as \"the email or\n * password is incorrect\". */\nexport type LoginFormErrors = Partial<Record<LoginFormField | 'form', string>>;\n\n/** The host's own form field names, for a native form post. Both are\n * needed: a field without a name is not posted. */\nexport type LoginFormFieldNames = Record<LoginFormField, string>;\n\nexport interface LoginFormProps extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'title' | 'onSubmit'\n> {\n /** Replaces the heading \"Sign in to Alfadocs\". Pass it translated. */\n title?: string;\n /** A line under the heading. Pass it translated. */\n description?: string;\n /**\n * The heading's level. Default 1: a sign-in page usually has no other\n * heading. Pass 2 on a page that has its own `h1`.\n */\n headingLevel?: 1 | 2 | 3;\n /**\n * Shows the Alfadocs mark above the heading, with the heading and its\n * line centred under it. Default true. With `false` the heading sits\n * at the start edge, for a host that shows its own logo.\n */\n showLogo?: boolean;\n /**\n * How the mark arrives when the card opens: its pieces come together\n * (`assemble`, the default), it turns once (`spin`), it beats\n * (`pulse`), or it is still (`none`). It plays once and rests, and\n * holds still under reduced motion and in the accessible themes.\n */\n logoMotion?: BrandMarkMotion;\n /**\n * Host content between the heading and the fields, such as a notice\n * (\"You have been signed out\"). It sits outside the form, so nothing in\n * it is posted. Keep any heading inside it below the card's own level.\n */\n children?: ReactNode;\n /** The email to show when the form opens, such as the one last used.\n * Read once. There is never an initial password. */\n initialValues?: LoginFormInitialValues;\n /**\n * Messages from the server, already translated. A field's message\n * shows on that field until the user changes it; `form` shows above\n * the fields.\n *\n * When messages arrive, the password is emptied and focus moves: to\n * the error summary at the top of the form, which lists each field\n * with a message, or, when only `form` says something, to the\n * password, which is then described by that message. The same happens\n * for messages present when the form opens (a page the server rendered\n * after a failed post).\n *\n * Never say which of the two values was wrong: one message for both.\n * Set `submitting` while you send, so the form also notices an answer\n * that says the same as the last one.\n */\n errors?: LoginFormErrors;\n /**\n * Adds \"Forgot password?\" under the button. A path on the same site,\n * or an address written in full (`https://…`). Anything else shows no\n * link.\n */\n forgotPasswordHref?: string;\n /** Replaces the button's \"Sign in\". Pass it translated. */\n submitLabel?: string;\n /**\n * True while the host sends the values: the button shows a spinner and\n * a second submit is ignored. Set it inside `onSubmit`, before anything\n * is awaited: until it is true, a second press sends a second sign-in.\n */\n submitting?: boolean;\n /** For React hosts: called with the values once both checks have\n * passed. Not called when `fieldNames` is set. */\n onSubmit?: (values: LoginFormValues) => void;\n /**\n * For a native form post: the host's own field names, both of them,\n * e.g. `{ email: 'email', password: 'password' }`. When set, the inputs\n * carry these names and the browser posts the form.\n */\n fieldNames?: LoginFormFieldNames;\n /**\n * Where a native form post goes. Default: the current address. Only a\n * path, or an address on the page's own origin, is accepted: another\n * origin is never sent what the user typed, and the post then goes to\n * the current address. Does nothing without `fieldNames`.\n */\n action?: string;\n /**\n * Extra hidden inputs posted with a native form, by name: a CSRF token,\n * a return address. Not used with `onSubmit`. A name that is also one\n * of `fieldNames` is left out: the form's own field wins. The server\n * must check a return address itself: anyone can change a hidden input.\n */\n hiddenFields?: Readonly<Record<string, string>>;\n /**\n * A second card beside the sign-in, the same height: the development\n * quick sign-in (`LoginDevCard`). Pass it only when the server says\n * this is a development environment: the kit never decides that\n * itself. The two sit side by side where there is room and stack on a\n * phone.\n */\n devCard?: ReactNode;\n}\n\n/* -------------------------------------------------------------------- */\n/* Styles */\n/* -------------------------------------------------------------------- */\n\n// The card is 400px wide at most, written in px: a host whose root font\n// size is not 16px would stretch or squeeze a width in rem.\nconst loginFormVariants = cva(\n 'ds:flex ds:w-full ds:flex-col ds:items-center ds:justify-center ds:gap-[var(--spacing-lg)] ds:text-start ds:text-[var(--foreground)] ds:lg:flex-row ds:lg:items-stretch',\n);\n\nconst columnVariants = cva('ds:w-full ds:max-w-[400px]');\n\n/* -------------------------------------------------------------------- */\n/* Helpers */\n/* -------------------------------------------------------------------- */\n\nconst hasMessage = (errors: LoginFormErrors): boolean =>\n Object.values(errors).some(Boolean);\n\nconst hasFieldMessage = (errors: LoginFormErrors): boolean =>\n LOGIN_FORM_FIELDS.some((field) => Boolean(errors[field]));\n\n/**\n * Where to send the user for a set of server messages: the first field\n * that has one. A message about the whole form sends them to the\n * password, the field they will have to type again.\n */\nconst focusTargetFor = (\n messages: LoginFormErrors,\n): LoginFormField | undefined =>\n LOGIN_FORM_FIELDS.find((field) => messages[field]) ??\n (messages.form ? 'password' : undefined);\n\n/* -------------------------------------------------------------------- */\n/* Component */\n/* -------------------------------------------------------------------- */\n\n/**\n * The sign-in card. Mount it on the login page, inside `SignedOutFrame`\n * or the host's own chrome.\n */\nexport const LoginForm = forwardRef<HTMLDivElement, LoginFormProps>(\n (\n {\n title,\n description,\n headingLevel = 1,\n showLogo = true,\n logoMotion = 'assemble',\n children,\n initialValues,\n errors,\n forgotPasswordHref,\n submitLabel,\n submitting = false,\n onSubmit,\n fieldNames,\n action,\n hiddenFields,\n devCard,\n className,\n ...rest\n },\n ref,\n ) => {\n const { t } = useTranslation('ui');\n const titleId = useId();\n const formMessageId = useId();\n const fieldIdBase = useId();\n /** The id of a field's wrapper: where the summary's link leads. */\n const fieldId = (field: LoginFormField) => `${fieldIdBase}-${field}`;\n const native = fieldNames !== undefined;\n\n /* ------------------------------ State ----------------------------- */\n\n // Read once. The password always starts empty.\n const [email, setEmail] = useState(() => initialValues?.email ?? '');\n const [password, setPassword] = useState('');\n // A field the user has filled in and left. An email that arrives\n // filled in counts: a bad one is then flagged at once, with its\n // message. An empty field is not flagged for being passed through: a\n // keyboard user on the way to \"Forgot password?\" has made no mistake.\n // Its message waits for a submit.\n const [touched, setTouched] = useState<\n Partial<Record<LoginFormField, boolean>>\n >(() => ({ email: Boolean(initialValues?.email) }));\n const [submitted, setSubmitted] = useState(false);\n const [serverErrors, setServerErrors] = useState<LoginFormErrors>(\n () => errors ?? {},\n );\n\n const leave = (field: LoginFormField) =>\n setTouched((previous) =>\n previous[field] ? previous : { ...previous, [field]: true },\n );\n // The server's message was about the old value.\n const forget = (field: LoginFormField) =>\n setServerErrors((previous) =>\n previous[field] ? { ...previous, [field]: undefined } : previous,\n );\n\n const emailInput = useRef<HTMLInputElement>(null);\n const passwordInput = useRef<HTMLInputElement>(null);\n // The address stays out of the input's `value` attribute, where a\n // copied outerHTML or a session replay could read it.\n const emailField = useStateBackedInput(email, emailInput);\n\n const emptyPassword = () => {\n setPassword('');\n setTouched((previous) => ({ ...previous, password: false }));\n };\n /**\n * What the two inputs hold now. Read from the inputs, not from state:\n * a browser or a password manager can fill a field without telling\n * React, and the form must not refuse a field that is visibly filled.\n */\n const held = (): LoginFormValues => {\n const values = {\n email: emailInput.current?.value ?? email,\n password: passwordInput.current?.value ?? password,\n };\n if (values.email !== email) setEmail(values.email);\n if (values.password !== password) setPassword(values.password);\n return values;\n };\n\n /* ---------------------------- Validation -------------------------- */\n\n /** What stops a submit, whether or not the message shows yet. The\n * password only has to be there: its rules are for a new password. */\n const invalid: Record<LoginFormField, boolean> = {\n email: !isEmail(email),\n password: password === '',\n };\n // A message shows once the user has filled in and left the field, or\n // tried to submit.\n const due = (field: LoginFormField) => submitted || touched[field] === true;\n const ownErrors: Record<LoginFormField, string | undefined> = {\n email:\n due('email') && invalid.email\n ? email === ''\n ? t('loginForm.emailRequired')\n : t('inputs.email.invalid')\n : undefined,\n password:\n due('password') && invalid.password\n ? t('loginForm.passwordRequired')\n : undefined,\n };\n const errorFor = (field: LoginFormField) =>\n serverErrors[field] ?? ownErrors[field];\n\n /* ------------------------------ Focus ----------------------------- */\n\n // Every field with a message after a refused submit, or after a server\n // answer, is listed at the top of the form, and focus goes there. A\n // page the server rendered after a failed post opens that way too: it\n // announces nothing itself.\n const [openedWithFieldMessage] = useState(() =>\n hasFieldMessage(errors ?? {}),\n );\n const summary = useErrorSummary(\n LOGIN_FORM_FIELDS,\n errorFor,\n openedWithFieldMessage,\n );\n\n // Any other place focus goes: the password, when only the message\n // about the whole form says something. A new object for each request,\n // so asking twice for the same place moves focus twice. The effect runs\n // after the messages are drawn, so a screen reader lands on something\n // that already says what is wrong.\n const [focusRequest, setFocusRequest] = useState<{\n target: LoginFormField;\n } | null>(() => {\n const target = openedWithFieldMessage\n ? undefined\n : focusTargetFor(errors ?? {});\n return target ? { target } : null;\n });\n useEffect(() => {\n if (!focusRequest) return;\n (focusRequest.target === 'email'\n ? emailInput\n : passwordInput\n ).current?.focus();\n }, [focusRequest]);\n\n /* ------------------------------ Submit ---------------------------- */\n\n const submit = useRegistrationSubmit<LoginFormField>({\n errors,\n submitting,\n native,\n captcha: false,\n firstProblem: () => {\n const values = held();\n if (!isEmail(values.email)) return 'email';\n return values.password === '' ? 'password' : undefined;\n },\n onRefused: (field) => {\n // Both messages now show, listed in the summary, which takes focus.\n setSubmitted(true);\n summary.open(() => setFocusRequest({ target: field }));\n },\n // Only a React host gets here: a native post is the browser's own.\n deliver: () => onSubmit?.(held()),\n onAnswer: (answer) => {\n const next: LoginFormErrors = answer;\n setServerErrors(next);\n if (!hasMessage(next)) return;\n // Never keep a password the server did not accept.\n emptyPassword();\n setSubmitted(false);\n // The summary when a field has a message, else the password.\n summary.open(() => {\n const target = focusTargetFor(next);\n if (target) setFocusRequest({ target });\n });\n },\n // The page came back from the browser's cache as it was left: the\n // password must not come back with it.\n onRestore: emptyPassword,\n });\n const { busy } = submit;\n\n /* ------------------------------ Render ---------------------------- */\n\n const formAction = useFormAction('LoginForm', native, action);\n const forgotLink =\n forgotPasswordHref && isSafeHref(forgotPasswordHref)\n ? forgotPasswordHref\n : undefined;\n const extraFields = useExtraFields(\n 'LoginForm',\n native,\n fieldNames,\n hiddenFields,\n );\n const formError = serverErrors.form;\n // Quiet while the summary lists a field: the summary reads it then.\n const formMessageAnnounce = useFormMessageAnnounce(\n formError,\n summary.listed.length > 0,\n );\n\n return (\n <div\n ref={ref}\n {...rest}\n data-component=\"login-form\"\n className={loginFormVariants({ className })}\n >\n <div className={columnVariants()}>\n <Card variant=\"elevated\" className=\"ds:h-full\">\n <Card.Body className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]\">\n <AuthCardHeading\n id={titleId}\n title={title ?? t('loginForm.title')}\n description={description}\n level={headingLevel}\n showLogo={showLogo}\n logoMotion={logoMotion}\n />\n\n {children ? (\n <div\n data-slot=\"host-content\"\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-md)]\"\n >\n {children}\n </div>\n ) : null}\n\n {/* Always POST, in both modes: should the script ever fail to\n run, the browser must not put a password in the address. */}\n <form\n noValidate\n method=\"post\"\n action={formAction}\n aria-labelledby={titleId}\n aria-busy={busy || undefined}\n onSubmit={submit.handleSubmit}\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-md)]\"\n >\n <ErrorSummary\n ref={summary.ref}\n headingLevel={(headingLevel + 1) as 2 | 3 | 4}\n // The message about the whole form is read with it.\n aria-describedby={formError ? formMessageId : undefined}\n errors={summary.listed.map((field) => ({\n field,\n message: errorFor(field) ?? '',\n targetId: fieldId(field),\n }))}\n />\n\n {formError && (\n <AuthFormMessage\n id={formMessageId}\n announce={formMessageAnnounce}\n >\n {formError}\n </AuthFormMessage>\n )}\n\n <FormField\n id={fieldId('email')}\n label={t('loginForm.email')}\n required\n error={errorFor('email')}\n // Quiet while the summary lists it: the summary reads it.\n announceError={!summary.lists('email')}\n data-field=\"email\"\n >\n {/* One check, above, drives the message, the red mark and\n aria-invalid through FormField. EmailInput's own check\n is off so the two cannot disagree. `username` is the\n name browsers and password managers give the field\n that goes with `current-password`. */}\n <EmailInput\n ref={emailField.ref}\n name={native ? fieldNames.email : 'email'}\n autoComplete=\"username\"\n disableBuiltInValidation\n onChange={emailField.quiet((event) => {\n setEmail(event.target.value);\n forget('email');\n })}\n onBlur={(event) => {\n // Whatever a browser filled in without saying so.\n setEmail(event.target.value);\n if (event.target.value !== '') leave('email');\n }}\n />\n </FormField>\n\n <FormField\n id={fieldId('password')}\n label={t('loginForm.password')}\n required\n error={errorFor('password')}\n announceError={!summary.lists('password')}\n data-field=\"password\"\n >\n {/* Described by the message above the fields when there is\n one: focus lands here after a refused sign-in, and a\n screen reader then reads why. */}\n <PasswordInput\n ref={passwordInput}\n name={native ? fieldNames.password : 'password'}\n autoComplete=\"current-password\"\n aria-describedby={formError ? formMessageId : undefined}\n value={password}\n onChange={(event) => {\n setPassword(event.target.value);\n forget('password');\n }}\n onBlur={(event) => {\n setPassword(event.target.value);\n if (event.target.value !== '') leave('password');\n }}\n />\n </FormField>\n\n <ExtraFields fields={extraFields} />\n\n <Button\n type=\"submit\"\n intent=\"primary\"\n size=\"lg\"\n loading={busy}\n className=\"ds:w-full\"\n data-action=\"submit\"\n >\n {submitLabel ?? t('loginForm.submit')}\n </Button>\n\n {forgotLink && (\n <AuthTextLink href={forgotLink} action=\"forgot-password\">\n {t('loginForm.forgot')}\n </AuthTextLink>\n )}\n </form>\n {/* Outside the form: a screen reader may hold back what\n changes inside a busy region. */}\n <AuthFormStatus busy={busy} />\n </Card.Body>\n </Card>\n </div>\n {devCard ? <div className={columnVariants()}>{devCard}</div> : null}\n </div>\n );\n },\n);\nLoginForm.displayName = 'LoginForm';\n","/* -------------------------------------------------------------------- */\n/* LoginDevCard — the development quick sign-in card. */\n/* */\n/* A second card beside the login, for developers: one link per test */\n/* account the host's server can sign in. The kit only draws it. The */\n/* host decides whether it is rendered, supplies every word on it, and */\n/* its server must refuse the routes outside development. */\n/* -------------------------------------------------------------------- */\n\nimport { forwardRef, useId, type HTMLAttributes, type ReactNode } from 'react';\nimport { cva } from 'class-variance-authority';\nimport { Button } from '../../components/button';\nimport { Card } from '../../components/card';\nimport { MatrixRain } from '../../components/matrix-rain';\nimport { isSafeHref } from '../../components/_shared/safe-href';\nimport { ErrorPageIllustration } from '../error-page/error-page-illustration';\n\nexport interface LoginDevOption {\n /** The link's text, e.g. \"Sign in as admin\". The host supplies it, so\n * the kit ships no text for a card that users never see. */\n label: string;\n /** The development-only route that signs the test account in. A path\n * on the same site, or an address written in full. */\n href: string;\n /** A Lucide icon for the link, passed bare: `<ShieldUser />`. */\n icon?: ReactNode;\n}\n\nexport interface LoginDevCardProps extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'title'\n> {\n /** The card's heading, e.g. \"Developer quick login\". */\n title: string;\n /** One link per test account. An option with an unsafe address is\n * left out. */\n options: readonly LoginDevOption[];\n /** The heading's level. Default 2, under the login's own heading. */\n headingLevel?: 2 | 3;\n}\n\n// As tall as the login beside it, so the two cards read as a pair.\nconst loginDevCardVariants = cva('ds:h-full ds:w-full');\n\n/**\n * The development quick sign-in card. Render it only when the server\n * says this is a development environment: it never checks the\n * environment itself. Pass it to `LoginForm` as `devCard`.\n */\nexport const LoginDevCard = forwardRef<HTMLDivElement, LoginDevCardProps>(\n ({ title, options, headingLevel = 2, className, ...rest }, ref) => {\n const titleId = useId();\n const Heading = `h${headingLevel}` as const;\n const links = options.filter((option) => isSafeHref(option.href));\n return (\n <div\n ref={ref}\n {...rest}\n data-component=\"login-dev-card\"\n className={loginDevCardVariants({ className })}\n >\n <Card\n variant=\"elevated\"\n aria-labelledby={titleId}\n className=\"ds:relative ds:isolate ds:flex ds:h-full ds:flex-col ds:overflow-hidden\"\n >\n {/* Code rain round the edges, clear in the middle so it never runs\n behind the links. MatrixRain holds still under reduced motion by\n itself; it does not know the accessible themes, so the rain is\n taken out there, like the kit's other decorative motion. */}\n <div className=\"ds:absolute ds:inset-0 ds:z-0 ds:[display:var(--accessible-off,block)]\">\n <MatrixRain\n glyphs=\"hex\"\n decay=\"fast\"\n mask=\"center\"\n maskRadius=\"xl\"\n className=\"ds:size-full\"\n />\n </div>\n <Card.Header className=\"ds:relative ds:z-[1]\">\n <div className=\"ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-sm)] ds:text-center\">\n {/* The melting mark from the error pages, at half its size\n there. */}\n <div className=\"ds:[&>div]:w-24\">\n <ErrorPageIllustration mood=\"melt\" />\n </div>\n <Heading\n id={titleId}\n className=\"type-title-card ds:text-[var(--foreground)]\"\n >\n {title}\n </Heading>\n </div>\n </Card.Header>\n <Card.Body className=\"ds:relative ds:z-[1] ds:flex ds:flex-1 ds:flex-col ds:justify-center\">\n {/* The top margin keeps the heading clear of the links when the\n cards stack and this one is only as tall as its content. */}\n <div className=\"ds:mt-[var(--spacing-md)] ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]\">\n {links.map((option, index) => (\n <Button\n // Two options may share an address, so the place in the\n // list is part of the key.\n key={`${index}:${option.href}`}\n asChild\n intent=\"primary\"\n startIcon={option.icon}\n className=\"ds:min-h-[var(--min-target-size)] ds:w-full\"\n >\n <a href={option.href} data-action=\"dev-login\">\n {option.label}\n </a>\n </Button>\n ))}\n </div>\n </Card.Body>\n </Card>\n </div>\n );\n },\n);\nLoginDevCard.displayName = 'LoginDevCard';\n"],"names":["LOGIN_FORM_FIELDS","loginFormVariants","cva","columnVariants","hasMessage","errors","hasFieldMessage","field","focusTargetFor","messages","LoginForm","forwardRef","title","description","headingLevel","showLogo","logoMotion","children","initialValues","forgotPasswordHref","submitLabel","submitting","onSubmit","fieldNames","action","hiddenFields","devCard","className","rest","ref","t","useTranslation","titleId","useId","formMessageId","fieldIdBase","fieldId","native","email","setEmail","useState","password","setPassword","touched","setTouched","submitted","setSubmitted","serverErrors","setServerErrors","leave","previous","forget","emailInput","useRef","passwordInput","emailField","useStateBackedInput","emptyPassword","held","values","_a","_b","invalid","isEmail","due","ownErrors","errorFor","openedWithFieldMessage","summary","useErrorSummary","focusRequest","setFocusRequest","target","useEffect","submit","useRegistrationSubmit","answer","next","busy","formAction","useFormAction","forgotLink","isSafeHref","extraFields","useExtraFields","formError","formMessageAnnounce","useFormMessageAnnounce","jsxs","jsx","Card","AuthCardHeading","ErrorSummary","AuthFormMessage","FormField","EmailInput","event","PasswordInput","ExtraFields","Button","AuthTextLink","AuthFormStatus","loginDevCardVariants","LoginDevCard","options","Heading","links","option","MatrixRain","ErrorPageIllustration","index"],"mappings":";;;;;;;;;;;;;;;;AAuDO,MAAMA,IAAoB,CAAC,SAAS,UAAU,GAgI/CC,KAAoBC;AAAA,EACxB;AACF,GAEMC,KAAiBD,EAAI,4BAA4B,GAMjDE,KAAa,CAACC,MAClB,OAAO,OAAOA,CAAM,EAAE,KAAK,OA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ClB,gBAAArB;AAAA,gBAACU;AAAA,gBAAA;AAAA,kBAIC,SAAO;AAAA,kBACP,QAAO;AAAA,kBACP,WAAWQ,EAAO;AAAA,kBAClB,WAAU;AAAA,kBAEV,UAAA,gBAAAlB,EAAC,OAAE,MAAMkB,EAAO,MAAM,eAAY,aAC/B,YAAO,MAAA,CACV;AAAA,gBAAA;AAAA,gBARK,GAAGG,CAAK,IAAIH,EAAO,IAAI;AAAA,cAAA,CAU/B,GACH,EAAA,CACF;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,EAGN;AACF;AACAJ,GAAa,cAAc;"}
1
+ {"version":3,"file":"login-dev-card-vEL-o5wq.js","sources":["../../src/patterns/login-form/login-form.tsx","../../src/patterns/login-form/login-dev-card.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* LoginForm — the sign-in card. */\n/* */\n/* One export for the card: the mark, the heading, email and password, */\n/* the button and the way to a new password. The host keeps the page */\n/* around it and every server rule. The card checks what a browser can */\n/* check, then hands the values to `onSubmit` or posts a real form to */\n/* the host's own field names. */\n/* */\n/* The email must be an email address. A server that also signs people */\n/* in by a username cannot use this card for those accounts. */\n/* -------------------------------------------------------------------- */\n\nimport {\n forwardRef,\n useEffect,\n useId,\n useRef,\n useState,\n type HTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { cva } from 'class-variance-authority';\n// The validator EmailInput itself uses, so the two never disagree.\nimport isEmail from 'validator/lib/isEmail';\nimport { Button } from '../../components/button';\nimport { Card } from '../../components/card';\nimport { EmailInput } from '../../components/email-input';\nimport { ErrorSummary } from '../../components/error-summary';\nimport { FormField } from '../../components/form-field';\nimport { PasswordInput } from '../../components/password-input';\nimport { isSafeHref } from '../../components/_shared/safe-href';\nimport { useStateBackedInput } from '../../components/_shared/use-state-backed-input';\nimport {\n AuthCardHeading,\n AuthFormMessage,\n AuthFormStatus,\n AuthTextLink,\n ExtraFields,\n useExtraFields,\n useFormAction,\n} from '../_shared/auth-form-parts';\nimport type { BrandMarkMotion } from '../_shared/brand-mark';\nimport {\n useErrorSummary,\n useFormMessageAnnounce,\n} from '../_shared/use-error-summary';\nimport { useRegistrationSubmit } from '../registration-form/use-registration-submit';\n\n/* -------------------------------------------------------------------- */\n/* Types */\n/* -------------------------------------------------------------------- */\n\n/** The fields of the form, in the order they appear. */\nexport const LOGIN_FORM_FIELDS = ['email', 'password'] as const;\n\nexport type LoginFormField = (typeof LOGIN_FORM_FIELDS)[number];\n\n/** What `onSubmit` receives once both checks have passed. */\nexport interface LoginFormValues {\n email: string;\n password: string;\n}\n\n/** Values to show when the form opens. There is no password here, on\n * purpose: a password is never sent back to the browser. */\nexport type LoginFormInitialValues = Partial<Pick<LoginFormValues, 'email'>>;\n\n/** Messages from the server, already translated: one per field, plus\n * `form` for a message about the whole form, such as \"the email or\n * password is incorrect\". */\nexport type LoginFormErrors = Partial<Record<LoginFormField | 'form', string>>;\n\n/** The host's own form field names, for a native form post. Both are\n * needed: a field without a name is not posted. */\nexport type LoginFormFieldNames = Record<LoginFormField, string>;\n\nexport interface LoginFormProps extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'title' | 'onSubmit'\n> {\n /** Replaces the heading \"Sign in to Alfadocs\". Pass it translated. */\n title?: string;\n /** A line under the heading. Pass it translated. */\n description?: string;\n /**\n * The heading's level. Default 1: a sign-in page usually has no other\n * heading. Pass 2 on a page that has its own `h1`.\n */\n headingLevel?: 1 | 2 | 3;\n /**\n * Shows the Alfadocs mark above the heading, with the heading and its\n * line centred under it. Default true. With `false` the heading sits\n * at the start edge, for a host that shows its own logo.\n */\n showLogo?: boolean;\n /**\n * How the mark arrives when the card opens: its pieces come together\n * (`assemble`, the default), it turns once (`spin`), it beats\n * (`pulse`), or it is still (`none`). It plays once and rests, and\n * holds still under reduced motion and in the accessible themes.\n */\n logoMotion?: BrandMarkMotion;\n /**\n * Host content between the heading and the fields, such as a notice\n * (\"You have been signed out\"). It sits outside the form, so nothing in\n * it is posted. Keep any heading inside it below the card's own level.\n */\n children?: ReactNode;\n /** The email to show when the form opens, such as the one last used.\n * Read once. There is never an initial password. */\n initialValues?: LoginFormInitialValues;\n /**\n * Messages from the server, already translated. A field's message\n * shows on that field until the user changes it; `form` shows above\n * the fields.\n *\n * When messages arrive, the password is emptied and focus moves: to\n * the error summary at the top of the form, which lists each field\n * with a message, or, when only `form` says something, to the\n * password, which is then described by that message. The same happens\n * for messages present when the form opens (a page the server rendered\n * after a failed post).\n *\n * Never say which of the two values was wrong: one message for both.\n * Set `submitting` while you send, so the form also notices an answer\n * that says the same as the last one.\n */\n errors?: LoginFormErrors;\n /**\n * Adds \"Forgot password?\" under the button. A path on the same site,\n * or an address written in full (`https://…`). Anything else shows no\n * link.\n */\n forgotPasswordHref?: string;\n /** Replaces the button's \"Sign in\". Pass it translated. */\n submitLabel?: string;\n /**\n * True while the host sends the values: the button shows a spinner and\n * a second submit is ignored. Set it inside `onSubmit`, before anything\n * is awaited: until it is true, a second press sends a second sign-in.\n */\n submitting?: boolean;\n /** For React hosts: called with the values once both checks have\n * passed. Not called when `fieldNames` is set. */\n onSubmit?: (values: LoginFormValues) => void;\n /**\n * For a native form post: the host's own field names, both of them,\n * e.g. `{ email: 'email', password: 'password' }`. When set, the inputs\n * carry these names and the browser posts the form.\n */\n fieldNames?: LoginFormFieldNames;\n /**\n * Where a native form post goes. Default: the current address. Only a\n * path, or an address on the page's own origin, is accepted: another\n * origin is never sent what the user typed, and the post then goes to\n * the current address. Does nothing without `fieldNames`.\n */\n action?: string;\n /**\n * Extra hidden inputs posted with a native form, by name: a CSRF token,\n * a return address. Not used with `onSubmit`. A name that is also one\n * of `fieldNames` is left out: the form's own field wins. The server\n * must check a return address itself: anyone can change a hidden input.\n */\n hiddenFields?: Readonly<Record<string, string>>;\n /**\n * A second card beside the sign-in, the same height: the development\n * quick sign-in (`LoginDevCard`). Pass it only when the server says\n * this is a development environment: the kit never decides that\n * itself. The two sit side by side where there is room and stack on a\n * phone.\n */\n devCard?: ReactNode;\n}\n\n/* -------------------------------------------------------------------- */\n/* Styles */\n/* -------------------------------------------------------------------- */\n\n// The card is 400px wide at most, written in px: a host whose root font\n// size is not 16px would stretch or squeeze a width in rem.\nconst loginFormVariants = cva(\n 'ds:flex ds:w-full ds:flex-col ds:items-center ds:justify-center ds:gap-[var(--spacing-lg)] ds:text-start ds:text-[var(--foreground)] ds:lg:flex-row ds:lg:items-stretch',\n);\n\nconst columnVariants = cva('ds:w-full ds:max-w-[400px]');\n\n/* -------------------------------------------------------------------- */\n/* Helpers */\n/* -------------------------------------------------------------------- */\n\nconst hasMessage = (errors: LoginFormErrors): boolean =>\n Object.values(errors).some(Boolean);\n\nconst hasFieldMessage = (errors: LoginFormErrors): boolean =>\n LOGIN_FORM_FIELDS.some((field) => Boolean(errors[field]));\n\n/**\n * Where to send the user for a set of server messages: the first field\n * that has one. A message about the whole form sends them to the\n * password, the field they will have to type again.\n */\nconst focusTargetFor = (\n messages: LoginFormErrors,\n): LoginFormField | undefined =>\n LOGIN_FORM_FIELDS.find((field) => messages[field]) ??\n (messages.form ? 'password' : undefined);\n\n/* -------------------------------------------------------------------- */\n/* Component */\n/* -------------------------------------------------------------------- */\n\n/**\n * The sign-in card. Mount it on the login page, inside `SignedOutFrame`\n * or the host's own chrome.\n */\nexport const LoginForm = forwardRef<HTMLDivElement, LoginFormProps>(\n (\n {\n title,\n description,\n headingLevel = 1,\n showLogo = true,\n logoMotion = 'assemble',\n children,\n initialValues,\n errors,\n forgotPasswordHref,\n submitLabel,\n submitting = false,\n onSubmit,\n fieldNames,\n action,\n hiddenFields,\n devCard,\n className,\n ...rest\n },\n ref,\n ) => {\n const { t } = useTranslation('ui');\n const titleId = useId();\n const formMessageId = useId();\n const fieldIdBase = useId();\n /** The id of a field's wrapper: where the summary's link leads. */\n const fieldId = (field: LoginFormField) => `${fieldIdBase}-${field}`;\n const native = fieldNames !== undefined;\n\n /* ------------------------------ State ----------------------------- */\n\n // Read once. The password always starts empty.\n const [email, setEmail] = useState(() => initialValues?.email ?? '');\n const [password, setPassword] = useState('');\n // A field the user has filled in and left. An email that arrives\n // filled in counts: a bad one is then flagged at once, with its\n // message. An empty field is not flagged for being passed through: a\n // keyboard user on the way to \"Forgot password?\" has made no mistake.\n // Its message waits for a submit.\n const [touched, setTouched] = useState<\n Partial<Record<LoginFormField, boolean>>\n >(() => ({ email: Boolean(initialValues?.email) }));\n const [submitted, setSubmitted] = useState(false);\n const [serverErrors, setServerErrors] = useState<LoginFormErrors>(\n () => errors ?? {},\n );\n\n const leave = (field: LoginFormField) =>\n setTouched((previous) =>\n previous[field] ? previous : { ...previous, [field]: true },\n );\n // The server's message was about the old value.\n const forget = (field: LoginFormField) =>\n setServerErrors((previous) =>\n previous[field] ? { ...previous, [field]: undefined } : previous,\n );\n\n const emailInput = useRef<HTMLInputElement>(null);\n const passwordInput = useRef<HTMLInputElement>(null);\n // The address stays out of the input's `value` attribute, where a\n // copied outerHTML or a session replay could read it.\n const emailField = useStateBackedInput(email, emailInput);\n\n const emptyPassword = () => {\n setPassword('');\n setTouched((previous) => ({ ...previous, password: false }));\n };\n /**\n * What the two inputs hold now. Read from the inputs, not from state:\n * a browser or a password manager can fill a field without telling\n * React, and the form must not refuse a field that is visibly filled.\n */\n const held = (): LoginFormValues => {\n const values = {\n email: emailInput.current?.value ?? email,\n password: passwordInput.current?.value ?? password,\n };\n if (values.email !== email) setEmail(values.email);\n if (values.password !== password) setPassword(values.password);\n return values;\n };\n\n /* ---------------------------- Validation -------------------------- */\n\n /** What stops a submit, whether or not the message shows yet. The\n * password only has to be there: its rules are for a new password. */\n const invalid: Record<LoginFormField, boolean> = {\n email: !isEmail(email),\n password: password === '',\n };\n // A message shows once the user has filled in and left the field, or\n // tried to submit.\n const due = (field: LoginFormField) => submitted || touched[field] === true;\n const ownErrors: Record<LoginFormField, string | undefined> = {\n email:\n due('email') && invalid.email\n ? email === ''\n ? t('loginForm.emailRequired')\n : t('inputs.email.invalid')\n : undefined,\n password:\n due('password') && invalid.password\n ? t('loginForm.passwordRequired')\n : undefined,\n };\n const errorFor = (field: LoginFormField) =>\n serverErrors[field] ?? ownErrors[field];\n\n /* ------------------------------ Focus ----------------------------- */\n\n // Every field with a message after a refused submit, or after a server\n // answer, is listed at the top of the form, and focus goes there. A\n // page the server rendered after a failed post opens that way too: it\n // announces nothing itself.\n const [openedWithFieldMessage] = useState(() =>\n hasFieldMessage(errors ?? {}),\n );\n const summary = useErrorSummary(\n LOGIN_FORM_FIELDS,\n errorFor,\n openedWithFieldMessage,\n );\n\n // Any other place focus goes: the password, when only the message\n // about the whole form says something. A new object for each request,\n // so asking twice for the same place moves focus twice. The effect runs\n // after the messages are drawn, so a screen reader lands on something\n // that already says what is wrong.\n const [focusRequest, setFocusRequest] = useState<{\n target: LoginFormField;\n } | null>(() => {\n const target = openedWithFieldMessage\n ? undefined\n : focusTargetFor(errors ?? {});\n return target ? { target } : null;\n });\n useEffect(() => {\n if (!focusRequest) return;\n (focusRequest.target === 'email'\n ? emailInput\n : passwordInput\n ).current?.focus();\n }, [focusRequest]);\n\n /* ------------------------------ Submit ---------------------------- */\n\n const submit = useRegistrationSubmit<LoginFormField>({\n errors,\n submitting,\n native,\n captcha: false,\n firstProblem: () => {\n const values = held();\n if (!isEmail(values.email)) return 'email';\n return values.password === '' ? 'password' : undefined;\n },\n onRefused: (field) => {\n // Both messages now show, listed in the summary, which takes focus.\n setSubmitted(true);\n summary.open(() => setFocusRequest({ target: field }));\n },\n // Only a React host gets here: a native post is the browser's own.\n deliver: () => onSubmit?.(held()),\n onAnswer: (answer) => {\n const next: LoginFormErrors = answer;\n setServerErrors(next);\n if (!hasMessage(next)) return;\n // Never keep a password the server did not accept.\n emptyPassword();\n setSubmitted(false);\n // The summary when a field has a message, else the password.\n summary.open(() => {\n const target = focusTargetFor(next);\n if (target) setFocusRequest({ target });\n });\n },\n // The page came back from the browser's cache as it was left: the\n // password must not come back with it.\n onRestore: emptyPassword,\n });\n const { busy } = submit;\n\n /* ------------------------------ Render ---------------------------- */\n\n const formAction = useFormAction('LoginForm', native, action);\n const forgotLink =\n forgotPasswordHref && isSafeHref(forgotPasswordHref)\n ? forgotPasswordHref\n : undefined;\n const extraFields = useExtraFields(\n 'LoginForm',\n native,\n fieldNames,\n hiddenFields,\n );\n const formError = serverErrors.form;\n // Quiet while the summary lists a field: the summary reads it then.\n const formMessageAnnounce = useFormMessageAnnounce(\n formError,\n summary.listed.length > 0,\n );\n\n return (\n <div\n ref={ref}\n {...rest}\n data-component=\"login-form\"\n className={loginFormVariants({ className })}\n >\n <div className={columnVariants()}>\n <Card variant=\"elevated\" className=\"ds:h-full\">\n <Card.Body className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]\">\n <AuthCardHeading\n id={titleId}\n title={title ?? t('loginForm.title')}\n description={description}\n level={headingLevel}\n showLogo={showLogo}\n logoMotion={logoMotion}\n />\n\n {children ? (\n <div\n data-slot=\"host-content\"\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-md)]\"\n >\n {children}\n </div>\n ) : null}\n\n {/* Always POST, in both modes: should the script ever fail to\n run, the browser must not put a password in the address. */}\n <form\n noValidate\n method=\"post\"\n action={formAction}\n aria-labelledby={titleId}\n aria-busy={busy || undefined}\n onSubmit={submit.handleSubmit}\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-md)]\"\n >\n <ErrorSummary\n ref={summary.ref}\n headingLevel={(headingLevel + 1) as 2 | 3 | 4}\n // The message about the whole form is read with it.\n aria-describedby={formError ? formMessageId : undefined}\n errors={summary.listed.map((field) => ({\n field,\n message: errorFor(field) ?? '',\n targetId: fieldId(field),\n }))}\n />\n\n {formError && (\n <AuthFormMessage\n id={formMessageId}\n announce={formMessageAnnounce}\n >\n {formError}\n </AuthFormMessage>\n )}\n\n <FormField\n id={fieldId('email')}\n label={t('loginForm.email')}\n required\n error={errorFor('email')}\n // Quiet while the summary lists it: the summary reads it.\n announceError={!summary.lists('email')}\n data-field=\"email\"\n >\n {/* One check, above, drives the message, the red mark and\n aria-invalid through FormField. EmailInput's own check\n is off so the two cannot disagree. `username` is the\n name browsers and password managers give the field\n that goes with `current-password`. */}\n <EmailInput\n ref={emailField.ref}\n name={native ? fieldNames.email : 'email'}\n autoComplete=\"username\"\n disableBuiltInValidation\n onChange={emailField.quiet((event) => {\n setEmail(event.target.value);\n forget('email');\n })}\n onBlur={(event) => {\n // Whatever a browser filled in without saying so.\n setEmail(event.target.value);\n if (event.target.value !== '') leave('email');\n }}\n />\n </FormField>\n\n <FormField\n id={fieldId('password')}\n label={t('loginForm.password')}\n required\n error={errorFor('password')}\n announceError={!summary.lists('password')}\n data-field=\"password\"\n >\n {/* Described by the message above the fields when there is\n one: focus lands here after a refused sign-in, and a\n screen reader then reads why. */}\n <PasswordInput\n ref={passwordInput}\n name={native ? fieldNames.password : 'password'}\n autoComplete=\"current-password\"\n aria-describedby={formError ? formMessageId : undefined}\n value={password}\n onChange={(event) => {\n setPassword(event.target.value);\n forget('password');\n }}\n onBlur={(event) => {\n setPassword(event.target.value);\n if (event.target.value !== '') leave('password');\n }}\n />\n </FormField>\n\n <ExtraFields fields={extraFields} />\n\n <Button\n type=\"submit\"\n intent=\"primary\"\n size=\"lg\"\n loading={busy}\n className=\"ds:w-full\"\n data-action=\"submit\"\n >\n {submitLabel ?? t('loginForm.submit')}\n </Button>\n\n {forgotLink && (\n <AuthTextLink href={forgotLink} action=\"forgot-password\">\n {t('loginForm.forgot')}\n </AuthTextLink>\n )}\n </form>\n {/* Outside the form: a screen reader may hold back what\n changes inside a busy region. */}\n <AuthFormStatus busy={busy} />\n </Card.Body>\n </Card>\n </div>\n {devCard ? <div className={columnVariants()}>{devCard}</div> : null}\n </div>\n );\n },\n);\nLoginForm.displayName = 'LoginForm';\n","/* -------------------------------------------------------------------- */\n/* LoginDevCard — the development quick sign-in card. */\n/* */\n/* A second card beside the login, for developers: one link per test */\n/* account the host's server can sign in. The kit only draws it. The */\n/* host decides whether it is rendered, supplies every word on it, and */\n/* its server must refuse the routes outside development. */\n/* -------------------------------------------------------------------- */\n\nimport { forwardRef, useId, type HTMLAttributes, type ReactNode } from 'react';\nimport { cva } from 'class-variance-authority';\nimport { Button } from '../../components/button';\nimport { Card } from '../../components/card';\nimport { MatrixRain } from '../../components/matrix-rain';\nimport { isSafeHref } from '../../components/_shared/safe-href';\nimport { ErrorPageIllustration } from '../error-page/error-page-illustration';\n\nexport interface LoginDevOption {\n /** The link's text, e.g. \"Sign in as admin\". The host supplies it, so\n * the kit ships no text for a card that users never see. */\n label: string;\n /** The development-only route that signs the test account in. A path\n * on the same site, or an address written in full. */\n href: string;\n /** A Lucide icon for the link, passed bare: `<ShieldUser />`. */\n icon?: ReactNode;\n}\n\nexport interface LoginDevCardProps extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'title'\n> {\n /** The card's heading, e.g. \"Developer quick login\". */\n title: string;\n /** One link per test account. An option with an unsafe address is\n * left out. */\n options: readonly LoginDevOption[];\n /** The heading's level. Default 2, under the login's own heading. */\n headingLevel?: 2 | 3;\n}\n\n// As tall as the login beside it, so the two cards read as a pair.\nconst loginDevCardVariants = cva('ds:h-full ds:w-full');\n\n/**\n * The development quick sign-in card. Render it only when the server\n * says this is a development environment: it never checks the\n * environment itself. Pass it to `LoginForm` as `devCard`.\n */\nexport const LoginDevCard = forwardRef<HTMLDivElement, LoginDevCardProps>(\n ({ title, options, headingLevel = 2, className, ...rest }, ref) => {\n const titleId = useId();\n const Heading = `h${headingLevel}` as const;\n const links = options.filter((option) => isSafeHref(option.href));\n return (\n <div\n ref={ref}\n {...rest}\n data-component=\"login-dev-card\"\n className={loginDevCardVariants({ className })}\n >\n <Card\n variant=\"elevated\"\n aria-labelledby={titleId}\n className=\"ds:relative ds:isolate ds:flex ds:h-full ds:flex-col ds:overflow-hidden\"\n >\n {/* Code rain round the edges, clear in the middle so it never runs\n behind the links. MatrixRain holds still under reduced motion by\n itself; it does not know the accessible themes, so the rain is\n taken out there, like the kit's other decorative motion. */}\n <div className=\"ds:absolute ds:inset-0 ds:z-0 ds:[display:var(--accessible-off,block)]\">\n <MatrixRain\n glyphs=\"hex\"\n decay=\"fast\"\n mask=\"center\"\n maskRadius=\"xl\"\n className=\"ds:size-full\"\n />\n </div>\n <Card.Header className=\"ds:relative ds:z-[1]\">\n <div className=\"ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-sm)] ds:text-center\">\n {/* The melting mark from the error pages, at half its size\n there. */}\n <div className=\"ds:[&>div]:w-24\">\n <ErrorPageIllustration mood=\"melt\" />\n </div>\n <Heading\n id={titleId}\n className=\"type-title-card ds:text-[var(--foreground)]\"\n >\n {title}\n </Heading>\n </div>\n </Card.Header>\n <Card.Body className=\"ds:relative ds:z-[1] ds:flex ds:flex-1 ds:flex-col ds:justify-center\">\n {/* The top margin keeps the heading clear of the links when the\n cards stack and this one is only as tall as its content. */}\n <div className=\"ds:mt-[var(--spacing-md)] ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]\">\n {links.map((option, index) => (\n <Button\n // Two options may share an address, so the place in the\n // list is part of the key.\n key={`${index}:${option.href}`}\n asChild\n intent=\"primary\"\n startIcon={option.icon}\n className=\"ds:min-h-[var(--min-target-size)] ds:w-full\"\n >\n <a href={option.href} data-action=\"dev-login\">\n {option.label}\n </a>\n </Button>\n ))}\n </div>\n </Card.Body>\n </Card>\n </div>\n );\n },\n);\nLoginDevCard.displayName = 'LoginDevCard';\n"],"names":["LOGIN_FORM_FIELDS","loginFormVariants","cva","columnVariants","hasMessage","errors","hasFieldMessage","field","focusTargetFor","messages","LoginForm","forwardRef","title","description","headingLevel","showLogo","logoMotion","children","initialValues","forgotPasswordHref","submitLabel","submitting","onSubmit","fieldNames","action","hiddenFields","devCard","className","rest","ref","t","useTranslation","titleId","useId","formMessageId","fieldIdBase","fieldId","native","email","setEmail","useState","password","setPassword","touched","setTouched","submitted","setSubmitted","serverErrors","setServerErrors","leave","previous","forget","emailInput","useRef","passwordInput","emailField","useStateBackedInput","emptyPassword","held","values","_a","_b","invalid","isEmail","due","ownErrors","errorFor","openedWithFieldMessage","summary","useErrorSummary","focusRequest","setFocusRequest","target","useEffect","submit","useRegistrationSubmit","answer","next","busy","formAction","useFormAction","forgotLink","isSafeHref","extraFields","useExtraFields","formError","formMessageAnnounce","useFormMessageAnnounce","jsxs","jsx","Card","AuthCardHeading","ErrorSummary","AuthFormMessage","FormField","EmailInput","event","PasswordInput","ExtraFields","Button","AuthTextLink","AuthFormStatus","loginDevCardVariants","LoginDevCard","options","Heading","links","option","MatrixRain","ErrorPageIllustration","index"],"mappings":";;;;;;;;;;;;;;;;AAuDO,MAAMA,IAAoB,CAAC,SAAS,UAAU,GAgI/CC,KAAoBC;AAAA,EACxB;AACF,GAEMC,KAAiBD,EAAI,4BAA4B,GAMjDE,KAAa,CAACC,MAClB,OAAO,OAAOA,CAAM,EAAE,KAAK,OAAO,GAE9BC,KAAkB,CAACD,MACvBL,EAAkB,KAAK,CAACO,MAAU,EAAQF,EAAOE,CAAK,CAAE,GAOpDC,KAAiB,CACrBC,MAEAT,EAAkB,KAAK,CAACO,MAAUE,EAASF,CAAK,CAAC,MAChDE,EAAS,OAAO,aAAa,SAUnBC,KAAYC;AAAA,EACvB,CACE;AAAA,IACE,OAAAC;AAAA,IACA,aAAAC;AAAA,IACA,cAAAC,IAAe;AAAA,IACf,UAAAC,IAAW;AAAA,IACX,YAAAC,IAAa;AAAA,IACb,UAAAC;AAAA,IACA,eAAAC;AAAA,IACA,QAAAb;AAAA,IACA,oBAAAc;AAAA,IACA,aAAAC;AAAA,IACA,YAAAC,IAAa;AAAA,IACb,UAAAC;AAAA,IACA,YAAAC;AAAA,IACA,QAAAC;AAAA,IACA,cAAAC;AAAA,IACA,SAAAC;AAAA,IACA,WAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,GAELC,OACG;AACH,UAAM,EAAE,GAAAC,EAAA,IAAMC,GAAe,IAAI,GAC3BC,IAAUC,EAAA,GACVC,I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