@wildo-ai/saas-frontend-lib 1.1.17 → 1.1.18

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 (586) hide show
  1. package/LICENSE +114 -26
  2. package/LICENSE.enterprise +129 -0
  3. package/dist/esm/companion-exports.d.ts +5 -2
  4. package/dist/esm/companion-exports.d.ts.map +1 -1
  5. package/dist/esm/companion-exports.js +4 -2
  6. package/dist/esm/companion-exports.js.map +1 -1
  7. package/dist/esm/components/actions/action-bar.d.ts +16 -1
  8. package/dist/esm/components/actions/action-bar.d.ts.map +1 -1
  9. package/dist/esm/components/actions/action-bar.js.map +1 -1
  10. package/dist/esm/components/app/AppLayout_AuthenticatedRoute.d.ts.map +1 -1
  11. package/dist/esm/components/app/AppLayout_AuthenticatedRoute.js +6 -14
  12. package/dist/esm/components/app/AppLayout_AuthenticatedRoute.js.map +1 -1
  13. package/dist/esm/components/app/AppLayout_DecisionInbox.d.ts.map +1 -1
  14. package/dist/esm/components/app/AppLayout_DecisionInbox.js +2 -4
  15. package/dist/esm/components/app/AppLayout_DecisionInbox.js.map +1 -1
  16. package/dist/esm/components/app/AppLayout_Home.d.ts.map +1 -1
  17. package/dist/esm/components/app/AppLayout_Home.js +14 -7
  18. package/dist/esm/components/app/AppLayout_Home.js.map +1 -1
  19. package/dist/esm/components/app/AppLayout_IdentityPortalContainer.d.ts +13 -0
  20. package/dist/esm/components/app/AppLayout_IdentityPortalContainer.d.ts.map +1 -0
  21. package/dist/esm/components/app/AppLayout_IdentityPortalContainer.js +16 -0
  22. package/dist/esm/components/app/AppLayout_IdentityPortalContainer.js.map +1 -0
  23. package/dist/esm/components/app/DecisionInboxSection.d.ts +10 -0
  24. package/dist/esm/components/app/DecisionInboxSection.d.ts.map +1 -0
  25. package/dist/esm/components/app/DecisionInboxSection.js +15 -0
  26. package/dist/esm/components/app/DecisionInboxSection.js.map +1 -0
  27. package/dist/esm/components/app/IdentityPortalLayout_AuthenticatedRoute.d.ts +13 -0
  28. package/dist/esm/components/app/IdentityPortalLayout_AuthenticatedRoute.d.ts.map +1 -0
  29. package/dist/esm/components/app/IdentityPortalLayout_AuthenticatedRoute.js +28 -0
  30. package/dist/esm/components/app/IdentityPortalLayout_AuthenticatedRoute.js.map +1 -0
  31. package/dist/esm/components/app/IdentityPortalPage_Home.d.ts +10 -0
  32. package/dist/esm/components/app/IdentityPortalPage_Home.d.ts.map +1 -0
  33. package/dist/esm/components/app/IdentityPortalPage_Home.js +40 -0
  34. package/dist/esm/components/app/IdentityPortalPage_Home.js.map +1 -0
  35. package/dist/esm/components/app/IdentityPortalPage_SettingsDestination.d.ts +16 -0
  36. package/dist/esm/components/app/IdentityPortalPage_SettingsDestination.d.ts.map +1 -0
  37. package/dist/esm/components/app/IdentityPortalPage_SettingsDestination.js +41 -0
  38. package/dist/esm/components/app/IdentityPortalPage_SettingsDestination.js.map +1 -0
  39. package/dist/esm/components/auth/Auth_DecisionEmailAnswer.d.ts +15 -0
  40. package/dist/esm/components/auth/Auth_DecisionEmailAnswer.d.ts.map +1 -0
  41. package/dist/esm/components/auth/Auth_DecisionEmailAnswer.js +268 -0
  42. package/dist/esm/components/auth/Auth_DecisionEmailAnswer.js.map +1 -0
  43. package/dist/esm/components/auth/Auth_DecisionEmailAnswer.labels.d.ts +3 -0
  44. package/dist/esm/components/auth/Auth_DecisionEmailAnswer.labels.d.ts.map +1 -0
  45. package/dist/esm/components/auth/Auth_DecisionEmailAnswer.labels.js +35 -0
  46. package/dist/esm/components/auth/Auth_DecisionEmailAnswer.labels.js.map +1 -0
  47. package/dist/esm/components/auth/Auth_Main.d.ts.map +1 -1
  48. package/dist/esm/components/auth/Auth_Main.js +5 -0
  49. package/dist/esm/components/auth/Auth_Main.js.map +1 -1
  50. package/dist/esm/components/auth/Auth_OAuthDeviceVerification.d.ts +19 -0
  51. package/dist/esm/components/auth/Auth_OAuthDeviceVerification.d.ts.map +1 -0
  52. package/dist/esm/components/auth/Auth_OAuthDeviceVerification.js +156 -0
  53. package/dist/esm/components/auth/Auth_OAuthDeviceVerification.js.map +1 -0
  54. package/dist/esm/components/auth/Auth_OAuthDeviceVerification.labels.d.ts +3 -0
  55. package/dist/esm/components/auth/Auth_OAuthDeviceVerification.labels.d.ts.map +1 -0
  56. package/dist/esm/components/auth/Auth_OAuthDeviceVerification.labels.js +107 -0
  57. package/dist/esm/components/auth/Auth_OAuthDeviceVerification.labels.js.map +1 -0
  58. package/dist/esm/components/auth/StepUpAuthDialog.d.ts +31 -10
  59. package/dist/esm/components/auth/StepUpAuthDialog.d.ts.map +1 -1
  60. package/dist/esm/components/auth/StepUpAuthDialog.js +81 -17
  61. package/dist/esm/components/auth/StepUpAuthDialog.js.map +1 -1
  62. package/dist/esm/components/auth/admin-config/AppPage_SecuritySettings.labels.d.ts.map +1 -1
  63. package/dist/esm/components/auth/admin-config/AppPage_SecuritySettings.labels.js +19 -0
  64. package/dist/esm/components/auth/admin-config/AppPage_SecuritySettings.labels.js.map +1 -1
  65. package/dist/esm/components/auth/pages/AuthPage_DecisionEmailAnswer.d.ts +11 -0
  66. package/dist/esm/components/auth/pages/AuthPage_DecisionEmailAnswer.d.ts.map +1 -0
  67. package/dist/esm/components/auth/pages/AuthPage_DecisionEmailAnswer.js +25 -0
  68. package/dist/esm/components/auth/pages/AuthPage_DecisionEmailAnswer.js.map +1 -0
  69. package/dist/esm/components/auth/pages/AuthPage_OAuthDeviceVerification.d.ts +11 -0
  70. package/dist/esm/components/auth/pages/AuthPage_OAuthDeviceVerification.d.ts.map +1 -0
  71. package/dist/esm/components/auth/pages/AuthPage_OAuthDeviceVerification.js +25 -0
  72. package/dist/esm/components/auth/pages/AuthPage_OAuthDeviceVerification.js.map +1 -0
  73. package/dist/esm/components/billing/billing-pricing-table.d.ts.map +1 -1
  74. package/dist/esm/components/billing/billing-pricing-table.js +40 -7
  75. package/dist/esm/components/billing/billing-pricing-table.js.map +1 -1
  76. package/dist/esm/components/billing/billing-subscription-status.d.ts.map +1 -1
  77. package/dist/esm/components/billing/billing-subscription-status.js +9 -1
  78. package/dist/esm/components/billing/billing-subscription-status.js.map +1 -1
  79. package/dist/esm/components/billing/billing-usage-dashboard.d.ts.map +1 -1
  80. package/dist/esm/components/billing/billing-usage-dashboard.js +3 -2
  81. package/dist/esm/components/billing/billing-usage-dashboard.js.map +1 -1
  82. package/dist/esm/components/data-display/AutomaticDisplayer.d.ts.map +1 -1
  83. package/dist/esm/components/data-display/AutomaticDisplayer.js +7 -2
  84. package/dist/esm/components/data-display/AutomaticDisplayer.js.map +1 -1
  85. package/dist/esm/components/data-display/DisplayField.d.ts.map +1 -1
  86. package/dist/esm/components/data-display/DisplayField.js +67 -45
  87. package/dist/esm/components/data-display/DisplayField.js.map +1 -1
  88. package/dist/esm/components/data-display/DisplayFieldEditable.d.ts.map +1 -1
  89. package/dist/esm/components/data-display/DisplayFieldEditable.js +4 -1
  90. package/dist/esm/components/data-display/DisplayFieldEditable.js.map +1 -1
  91. package/dist/esm/components/data-display/DisplayValueDispatcher.d.ts.map +1 -1
  92. package/dist/esm/components/data-display/DisplayValueDispatcher.js +16 -6
  93. package/dist/esm/components/data-display/DisplayValueDispatcher.js.map +1 -1
  94. package/dist/esm/components/data-display/ResourceAutomaticDisplayer.d.ts.map +1 -1
  95. package/dist/esm/components/data-display/ResourceAutomaticDisplayer.js +3 -1
  96. package/dist/esm/components/data-display/ResourceAutomaticDisplayer.js.map +1 -1
  97. package/dist/esm/components/feedback/empty-state-marker.d.ts +16 -0
  98. package/dist/esm/components/feedback/empty-state-marker.d.ts.map +1 -0
  99. package/dist/esm/components/feedback/empty-state-marker.js +16 -0
  100. package/dist/esm/components/feedback/empty-state-marker.js.map +1 -0
  101. package/dist/esm/components/feedback/empty-state.d.ts.map +1 -1
  102. package/dist/esm/components/feedback/empty-state.js +2 -1
  103. package/dist/esm/components/feedback/empty-state.js.map +1 -1
  104. package/dist/esm/components/feedback/features/feature-unavailable-prompt.d.ts +7 -1
  105. package/dist/esm/components/feedback/features/feature-unavailable-prompt.d.ts.map +1 -1
  106. package/dist/esm/components/feedback/features/feature-unavailable-prompt.js +8 -2
  107. package/dist/esm/components/feedback/features/feature-unavailable-prompt.js.map +1 -1
  108. package/dist/esm/components/feedback/resource-empty-state.d.ts.map +1 -1
  109. package/dist/esm/components/feedback/resource-empty-state.js +2 -1
  110. package/dist/esm/components/feedback/resource-empty-state.js.map +1 -1
  111. package/dist/esm/components/flows-actors/approval.d.ts +25 -1
  112. package/dist/esm/components/flows-actors/approval.d.ts.map +1 -1
  113. package/dist/esm/components/flows-actors/approval.js +14 -9
  114. package/dist/esm/components/flows-actors/approval.js.map +1 -1
  115. package/dist/esm/components/flows-actors/approval.labels.d.ts.map +1 -1
  116. package/dist/esm/components/flows-actors/approval.labels.js +30 -0
  117. package/dist/esm/components/flows-actors/approval.labels.js.map +1 -1
  118. package/dist/esm/components/flows-actors/flow-node.labels.d.ts.map +1 -1
  119. package/dist/esm/components/flows-actors/flow-node.labels.js +4 -1
  120. package/dist/esm/components/flows-actors/flow-node.labels.js.map +1 -1
  121. package/dist/esm/components/flows-actors/flow-step-visuals.d.ts.map +1 -1
  122. package/dist/esm/components/flows-actors/flow-step-visuals.js +8 -2
  123. package/dist/esm/components/flows-actors/flow-step-visuals.js.map +1 -1
  124. package/dist/esm/components/flows-actors/human-decision-form.d.ts.map +1 -1
  125. package/dist/esm/components/flows-actors/human-decision-form.js +4 -1
  126. package/dist/esm/components/flows-actors/human-decision-form.js.map +1 -1
  127. package/dist/esm/components/form/Form.d.ts +2 -0
  128. package/dist/esm/components/form/Form.d.ts.map +1 -1
  129. package/dist/esm/components/form/Form.js +1 -0
  130. package/dist/esm/components/form/Form.js.map +1 -1
  131. package/dist/esm/components/form/automated/AutomatedArrayField.d.ts.map +1 -1
  132. package/dist/esm/components/form/automated/AutomatedArrayField.js +7 -4
  133. package/dist/esm/components/form/automated/AutomatedArrayField.js.map +1 -1
  134. package/dist/esm/components/form/automated/AutosaveContext.d.ts.map +1 -1
  135. package/dist/esm/components/form/automated/AutosaveContext.js +8 -0
  136. package/dist/esm/components/form/automated/AutosaveContext.js.map +1 -1
  137. package/dist/esm/components/form/automated/FormField.d.ts +5 -3
  138. package/dist/esm/components/form/automated/FormField.d.ts.map +1 -1
  139. package/dist/esm/components/form/automated/FormField.js +38 -13
  140. package/dist/esm/components/form/automated/FormField.js.map +1 -1
  141. package/dist/esm/components/form/automated/ResourceAutomatedForm.d.ts +1 -1
  142. package/dist/esm/components/form/automated/ResourceAutomatedForm.d.ts.map +1 -1
  143. package/dist/esm/components/form/automated/ResourceAutomatedForm.js +31 -18
  144. package/dist/esm/components/form/automated/ResourceAutomatedForm.js.map +1 -1
  145. package/dist/esm/components/form/fields/form-field-file-provider-constraints.frontend.utils.d.ts +1 -1
  146. package/dist/esm/components/form/fields/form-field-file-provider-constraints.frontend.utils.js +1 -1
  147. package/dist/esm/components/form/fields/form-field-file-provider-constraints.frontend.utils.js.map +1 -1
  148. package/dist/esm/components/form/validation-errors/form-validation.d.ts +5 -7
  149. package/dist/esm/components/form/validation-errors/form-validation.d.ts.map +1 -1
  150. package/dist/esm/components/form/validation-errors/form-validation.js +7 -22
  151. package/dist/esm/components/form/validation-errors/form-validation.js.map +1 -1
  152. package/dist/esm/components/form/validation-errors/getFieldError.d.ts +25 -2
  153. package/dist/esm/components/form/validation-errors/getFieldError.d.ts.map +1 -1
  154. package/dist/esm/components/form/validation-errors/getFieldError.js +29 -2
  155. package/dist/esm/components/form/validation-errors/getFieldError.js.map +1 -1
  156. package/dist/esm/components/form/validation-errors/resource-error-notification-context.utils.d.ts +5 -0
  157. package/dist/esm/components/form/validation-errors/resource-error-notification-context.utils.d.ts.map +1 -1
  158. package/dist/esm/components/form/validation-errors/resource-error-notification-context.utils.js +3 -0
  159. package/dist/esm/components/form/validation-errors/resource-error-notification-context.utils.js.map +1 -1
  160. package/dist/esm/components/form/validation-errors/save-attempt.d.ts +9 -0
  161. package/dist/esm/components/form/validation-errors/save-attempt.d.ts.map +1 -0
  162. package/dist/esm/components/form/validation-errors/save-attempt.js +42 -0
  163. package/dist/esm/components/form/validation-errors/save-attempt.js.map +1 -0
  164. package/dist/esm/components/form/validation-errors/unstarted-field-visit.d.ts +3 -1
  165. package/dist/esm/components/form/validation-errors/unstarted-field-visit.d.ts.map +1 -1
  166. package/dist/esm/components/form/validation-errors/unstarted-field-visit.js +3 -1
  167. package/dist/esm/components/form/validation-errors/unstarted-field-visit.js.map +1 -1
  168. package/dist/esm/components/form/validation-errors/validate-fields-and-show-errors.d.ts +2 -2
  169. package/dist/esm/components/form/validation-errors/validate-fields-and-show-errors.d.ts.map +1 -1
  170. package/dist/esm/components/form/validation-errors/validate-fields-and-show-errors.js +3 -0
  171. package/dist/esm/components/form/validation-errors/validate-fields-and-show-errors.js.map +1 -1
  172. package/dist/esm/components/navigation/app-level/useMenuBarBehavior.d.ts.map +1 -1
  173. package/dist/esm/components/navigation/app-level/useMenuBarBehavior.js +5 -3
  174. package/dist/esm/components/navigation/app-level/useMenuBarBehavior.js.map +1 -1
  175. package/dist/esm/components/resources/ResourceLayout_DangerZone.d.ts +19 -0
  176. package/dist/esm/components/resources/ResourceLayout_DangerZone.d.ts.map +1 -1
  177. package/dist/esm/components/resources/ResourceLayout_DangerZone.js +47 -11
  178. package/dist/esm/components/resources/ResourceLayout_DangerZone.js.map +1 -1
  179. package/dist/esm/components/resources/ResourceLayout_InsertedViews.d.ts.map +1 -1
  180. package/dist/esm/components/resources/ResourceLayout_InsertedViews.js +17 -7
  181. package/dist/esm/components/resources/ResourceLayout_InsertedViews.js.map +1 -1
  182. package/dist/esm/components/resources/ResourceLayout_List.d.ts.map +1 -1
  183. package/dist/esm/components/resources/ResourceLayout_List.js +13 -6
  184. package/dist/esm/components/resources/ResourceLayout_List.js.map +1 -1
  185. package/dist/esm/components/resources/ResourceLayout_RecordSharing.d.ts +1 -1
  186. package/dist/esm/components/resources/ResourceLayout_RecordSharing.d.ts.map +1 -1
  187. package/dist/esm/components/resources/ResourceLayout_RecordSharing.js.map +1 -1
  188. package/dist/esm/components/resources/ResourceLayout_Search.d.ts.map +1 -1
  189. package/dist/esm/components/resources/ResourceLayout_Search.js +12 -8
  190. package/dist/esm/components/resources/ResourceLayout_Search.js.map +1 -1
  191. package/dist/esm/components/resources/ResourceOwnedViewEmbeds.d.ts +1 -1
  192. package/dist/esm/components/resources/ResourceOwnedViewEmbeds.d.ts.map +1 -1
  193. package/dist/esm/components/resources/ResourceOwnedViewEmbeds.js +11 -4
  194. package/dist/esm/components/resources/ResourceOwnedViewEmbeds.js.map +1 -1
  195. package/dist/esm/components/resources/embeds/RelatedResourceSections.d.ts +1 -1
  196. package/dist/esm/components/resources/embeds/RelatedResourceSections.js.map +1 -1
  197. package/dist/esm/components/resources/embeds/ResourceEmbeds.d.ts +5 -5
  198. package/dist/esm/components/resources/embeds/ResourceEmbeds.d.ts.map +1 -1
  199. package/dist/esm/components/resources/embeds/ResourceEmbeds.js +21 -14
  200. package/dist/esm/components/resources/embeds/ResourceEmbeds.js.map +1 -1
  201. package/dist/esm/components/resources/skeleton/DisplayLayout.d.ts.map +1 -1
  202. package/dist/esm/components/resources/skeleton/DisplayLayout.js +40 -4
  203. package/dist/esm/components/resources/skeleton/DisplayLayout.js.map +1 -1
  204. package/dist/esm/components/resources/skeleton/FormLayout.d.ts.map +1 -1
  205. package/dist/esm/components/resources/skeleton/FormLayout.js +22 -6
  206. package/dist/esm/components/resources/skeleton/FormLayout.js.map +1 -1
  207. package/dist/esm/components/resources/skeleton/ResourceHeaderTitle.d.ts +1 -1
  208. package/dist/esm/components/resources/skeleton/ResourceHeaderTitle.js +1 -1
  209. package/dist/esm/components/resources/skeleton/ResourceHeaderTitle.js.map +1 -1
  210. package/dist/esm/components/resources/skeleton/SectionFieldsContext.d.ts +21 -1
  211. package/dist/esm/components/resources/skeleton/SectionFieldsContext.d.ts.map +1 -1
  212. package/dist/esm/components/resources/skeleton/SectionFieldsContext.js +53 -9
  213. package/dist/esm/components/resources/skeleton/SectionFieldsContext.js.map +1 -1
  214. package/dist/esm/components/settings/SettingsHub.d.ts +15 -0
  215. package/dist/esm/components/settings/SettingsHub.d.ts.map +1 -1
  216. package/dist/esm/components/settings/SettingsHub.js +14 -4
  217. package/dist/esm/components/settings/SettingsHub.js.map +1 -1
  218. package/dist/esm/components/views/chart-dashboard/ChartDashboard.d.ts +3 -2
  219. package/dist/esm/components/views/chart-dashboard/ChartDashboard.d.ts.map +1 -1
  220. package/dist/esm/components/views/chart-dashboard/ChartDashboard.js +4 -3
  221. package/dist/esm/components/views/chart-dashboard/ChartDashboard.js.map +1 -1
  222. package/dist/esm/components/views/chart-dashboard/useChartDashboardLayout.d.ts +1 -1
  223. package/dist/esm/components/views/chart-dashboard/useChartDashboardLayout.d.ts.map +1 -1
  224. package/dist/esm/components/views/chart-dashboard/useChartDashboardLayout.js.map +1 -1
  225. package/dist/esm/components/views/chart-view/ChartKpiFigure.d.ts +33 -0
  226. package/dist/esm/components/views/chart-view/ChartKpiFigure.d.ts.map +1 -1
  227. package/dist/esm/components/views/chart-view/ChartKpiFigure.js +63 -4
  228. package/dist/esm/components/views/chart-view/ChartKpiFigure.js.map +1 -1
  229. package/dist/esm/components/views/chart-view/ChartView.d.ts.map +1 -1
  230. package/dist/esm/components/views/chart-view/ChartView.js +33 -7
  231. package/dist/esm/components/views/chart-view/ChartView.js.map +1 -1
  232. package/dist/esm/components/views/chart-view/ChartView.labels.d.ts.map +1 -1
  233. package/dist/esm/components/views/chart-view/ChartView.labels.js +69 -3
  234. package/dist/esm/components/views/chart-view/ChartView.labels.js.map +1 -1
  235. package/dist/esm/components/views/chart-view/ChartView.lazy.d.ts.map +1 -1
  236. package/dist/esm/components/views/chart-view/ChartView.lazy.js +2 -1
  237. package/dist/esm/components/views/chart-view/ChartView.lazy.js.map +1 -1
  238. package/dist/esm/components/views/chart-view/ChartWidget.d.ts.map +1 -1
  239. package/dist/esm/components/views/chart-view/ChartWidget.js +12 -4
  240. package/dist/esm/components/views/chart-view/ChartWidget.js.map +1 -1
  241. package/dist/esm/components/views/chart-view/chart-export.utils.d.ts +8 -0
  242. package/dist/esm/components/views/chart-view/chart-export.utils.d.ts.map +1 -1
  243. package/dist/esm/components/views/chart-view/chart-export.utils.js +15 -25
  244. package/dist/esm/components/views/chart-view/chart-export.utils.js.map +1 -1
  245. package/dist/esm/components/views/chart-view/chart-view-defaults.d.ts +6 -0
  246. package/dist/esm/components/views/chart-view/chart-view-defaults.d.ts.map +1 -0
  247. package/dist/esm/components/views/chart-view/chart-view-defaults.js +6 -0
  248. package/dist/esm/components/views/chart-view/chart-view-defaults.js.map +1 -0
  249. package/dist/esm/components/views/chart-view/option-builder/builder-utils.d.ts +35 -9
  250. package/dist/esm/components/views/chart-view/option-builder/builder-utils.d.ts.map +1 -1
  251. package/dist/esm/components/views/chart-view/option-builder/builder-utils.js +69 -21
  252. package/dist/esm/components/views/chart-view/option-builder/builder-utils.js.map +1 -1
  253. package/dist/esm/components/views/chart-view/option-builder/builders/bar-family.builder.d.ts.map +1 -1
  254. package/dist/esm/components/views/chart-view/option-builder/builders/bar-family.builder.js +6 -7
  255. package/dist/esm/components/views/chart-view/option-builder/builders/bar-family.builder.js.map +1 -1
  256. package/dist/esm/components/views/chart-view/option-builder/builders/composed.builder.js +1 -1
  257. package/dist/esm/components/views/chart-view/option-builder/builders/composed.builder.js.map +1 -1
  258. package/dist/esm/components/views/chart-view/option-builder/builders/heatmap.builder.js +2 -2
  259. package/dist/esm/components/views/chart-view/option-builder/builders/heatmap.builder.js.map +1 -1
  260. package/dist/esm/components/views/chart-view/option-builder/builders/line-family.builder.d.ts +1 -1
  261. package/dist/esm/components/views/chart-view/option-builder/builders/line-family.builder.d.ts.map +1 -1
  262. package/dist/esm/components/views/chart-view/option-builder/builders/line-family.builder.js +7 -7
  263. package/dist/esm/components/views/chart-view/option-builder/builders/line-family.builder.js.map +1 -1
  264. package/dist/esm/components/views/chart-view/option-builder/builders/pie-family.builder.d.ts +1 -1
  265. package/dist/esm/components/views/chart-view/option-builder/builders/pie-family.builder.d.ts.map +1 -1
  266. package/dist/esm/components/views/chart-view/option-builder/builders/pie-family.builder.js +6 -8
  267. package/dist/esm/components/views/chart-view/option-builder/builders/pie-family.builder.js.map +1 -1
  268. package/dist/esm/components/views/chart-view/option-builder/builders/statistical-family.builder.d.ts.map +1 -1
  269. package/dist/esm/components/views/chart-view/option-builder/builders/statistical-family.builder.js +4 -1
  270. package/dist/esm/components/views/chart-view/option-builder/builders/statistical-family.builder.js.map +1 -1
  271. package/dist/esm/components/views/chart-view/option-builder/echarts-option-builder.d.ts.map +1 -1
  272. package/dist/esm/components/views/chart-view/option-builder/echarts-option-builder.js +13 -13
  273. package/dist/esm/components/views/chart-view/option-builder/echarts-option-builder.js.map +1 -1
  274. package/dist/esm/components/views/chart-view/useResourceChartData.d.ts +1 -1
  275. package/dist/esm/components/views/chart-view/useResourceChartData.js +1 -1
  276. package/dist/esm/components/views/chart-view/useResourceChartData.js.map +1 -1
  277. package/dist/esm/components/views/composite-view/CompositeView.d.ts +6 -0
  278. package/dist/esm/components/views/composite-view/CompositeView.d.ts.map +1 -1
  279. package/dist/esm/components/views/composite-view/CompositeView.js +6 -2
  280. package/dist/esm/components/views/composite-view/CompositeView.js.map +1 -1
  281. package/dist/esm/components/views/execution-view/ExecutionView.d.ts +7 -0
  282. package/dist/esm/components/views/execution-view/ExecutionView.d.ts.map +1 -1
  283. package/dist/esm/components/views/execution-view/ExecutionView.js +11 -1
  284. package/dist/esm/components/views/execution-view/ExecutionView.js.map +1 -1
  285. package/dist/esm/components/views/flows-actors-view/FlowsActorsView.d.ts +7 -0
  286. package/dist/esm/components/views/flows-actors-view/FlowsActorsView.d.ts.map +1 -1
  287. package/dist/esm/components/views/flows-actors-view/FlowsActorsView.js +6 -2
  288. package/dist/esm/components/views/flows-actors-view/FlowsActorsView.js.map +1 -1
  289. package/dist/esm/components/views/full-custom-view/FullCustomView.d.ts +7 -0
  290. package/dist/esm/components/views/full-custom-view/FullCustomView.d.ts.map +1 -1
  291. package/dist/esm/components/views/full-custom-view/FullCustomView.js +8 -3
  292. package/dist/esm/components/views/full-custom-view/FullCustomView.js.map +1 -1
  293. package/dist/esm/components/views/onboarding-view/OnboardingView.d.ts +7 -0
  294. package/dist/esm/components/views/onboarding-view/OnboardingView.d.ts.map +1 -1
  295. package/dist/esm/components/views/onboarding-view/OnboardingView.js +11 -1
  296. package/dist/esm/components/views/onboarding-view/OnboardingView.js.map +1 -1
  297. package/dist/esm/core/app-shell/AppShellBuildingBlocks.d.ts +2 -2
  298. package/dist/esm/core/app-shell/AppShellBuildingBlocks.js +2 -2
  299. package/dist/esm/core/app-shell/AppShellBuildingBlocks.js.map +1 -1
  300. package/dist/esm/core/app-shell/shell-motion/shell-motion-vocabulary.d.ts +4 -4
  301. package/dist/esm/core/app-shell/shell-motion/shell-motion-vocabulary.js +3 -3
  302. package/dist/esm/core/app-shell/shell-motion/shell-motion-vocabulary.js.map +1 -1
  303. package/dist/esm/core/app-shell/useIdentityPortalShellLayout.d.ts +45 -0
  304. package/dist/esm/core/app-shell/useIdentityPortalShellLayout.d.ts.map +1 -0
  305. package/dist/esm/core/app-shell/useIdentityPortalShellLayout.js +72 -0
  306. package/dist/esm/core/app-shell/useIdentityPortalShellLayout.js.map +1 -0
  307. package/dist/esm/core/automated-layout/automated-layout.frontend.schemas.d.ts +4 -3
  308. package/dist/esm/core/automated-layout/automated-layout.frontend.schemas.d.ts.map +1 -1
  309. package/dist/esm/core/automated-layout/automated-layout.frontend.schemas.js +4 -3
  310. package/dist/esm/core/automated-layout/automated-layout.frontend.schemas.js.map +1 -1
  311. package/dist/esm/core/automated-layout/automated-layout.frontend.utils.d.ts +15 -8
  312. package/dist/esm/core/automated-layout/automated-layout.frontend.utils.d.ts.map +1 -1
  313. package/dist/esm/core/automated-layout/automated-layout.frontend.utils.js +22 -21
  314. package/dist/esm/core/automated-layout/automated-layout.frontend.utils.js.map +1 -1
  315. package/dist/esm/core/billing/BillingContext.d.ts +27 -4
  316. package/dist/esm/core/billing/BillingContext.d.ts.map +1 -1
  317. package/dist/esm/core/billing/BillingContext.js +61 -2
  318. package/dist/esm/core/billing/BillingContext.js.map +1 -1
  319. package/dist/esm/core/billing/useBillingAction.d.ts.map +1 -1
  320. package/dist/esm/core/billing/useBillingAction.js +3 -2
  321. package/dist/esm/core/billing/useBillingAction.js.map +1 -1
  322. package/dist/esm/core/components-registry/RegisteredComponentRoot.d.ts +19 -0
  323. package/dist/esm/core/components-registry/RegisteredComponentRoot.d.ts.map +1 -0
  324. package/dist/esm/core/components-registry/RegisteredComponentRoot.js +23 -0
  325. package/dist/esm/core/components-registry/RegisteredComponentRoot.js.map +1 -0
  326. package/dist/esm/core/components-registry/register-framework-layouts.d.ts.map +1 -1
  327. package/dist/esm/core/components-registry/register-framework-layouts.js +4 -0
  328. package/dist/esm/core/components-registry/register-framework-layouts.js.map +1 -1
  329. package/dist/esm/core/config/app-configuration-frontend.schemas.d.ts +159 -0
  330. package/dist/esm/core/config/app-configuration-frontend.schemas.d.ts.map +1 -1
  331. package/dist/esm/core/config/app-configuration-frontend.schemas.js +68 -3
  332. package/dist/esm/core/config/app-configuration-frontend.schemas.js.map +1 -1
  333. package/dist/esm/core/config/app-level-components.frontend.schemas.d.ts +2 -2
  334. package/dist/esm/core/config/app-level-components.frontend.schemas.js +2 -2
  335. package/dist/esm/core/config/app-level-components.frontend.schemas.js.map +1 -1
  336. package/dist/esm/core/config/chart-view.frontend.schemas.d.ts +59 -18
  337. package/dist/esm/core/config/chart-view.frontend.schemas.d.ts.map +1 -1
  338. package/dist/esm/core/config/chart-view.frontend.schemas.js +42 -7
  339. package/dist/esm/core/config/chart-view.frontend.schemas.js.map +1 -1
  340. package/dist/esm/core/config/composite-view.schemas.d.ts +8 -1
  341. package/dist/esm/core/config/composite-view.schemas.d.ts.map +1 -1
  342. package/dist/esm/core/config/composite-view.schemas.js +1 -0
  343. package/dist/esm/core/config/composite-view.schemas.js.map +1 -1
  344. package/dist/esm/core/config/decision-inbox-capability.frontend.utils.d.ts +1 -1
  345. package/dist/esm/core/config/decision-inbox-capability.frontend.utils.d.ts.map +1 -1
  346. package/dist/esm/core/config/decision-inbox-capability.frontend.utils.js +1 -1
  347. package/dist/esm/core/config/decision-inbox-capability.frontend.utils.js.map +1 -1
  348. package/dist/esm/core/config/engine-settings-destinations.d.ts +6 -0
  349. package/dist/esm/core/config/engine-settings-destinations.d.ts.map +1 -1
  350. package/dist/esm/core/config/engine-settings-destinations.js +12 -0
  351. package/dist/esm/core/config/engine-settings-destinations.js.map +1 -1
  352. package/dist/esm/core/config/execution-view.schemas.d.ts +1 -1
  353. package/dist/esm/core/config/execution-view.schemas.js.map +1 -1
  354. package/dist/esm/core/config/identity-portal-settings.frontend.d.ts +17 -0
  355. package/dist/esm/core/config/identity-portal-settings.frontend.d.ts.map +1 -0
  356. package/dist/esm/core/config/identity-portal-settings.frontend.js +64 -0
  357. package/dist/esm/core/config/identity-portal-settings.frontend.js.map +1 -0
  358. package/dist/esm/core/config/launcher-items.frontend.schemas.d.ts +8 -8
  359. package/dist/esm/core/config/launcher-items.frontend.schemas.d.ts.map +1 -1
  360. package/dist/esm/core/config/launcher-items.frontend.schemas.js.map +1 -1
  361. package/dist/esm/core/config/settings-hub-gating.frontend.utils.d.ts +1 -1
  362. package/dist/esm/core/config/settings-hub-gating.frontend.utils.d.ts.map +1 -1
  363. package/dist/esm/core/config/settings-hub-gating.frontend.utils.js +1 -1
  364. package/dist/esm/core/config/settings-hub-gating.frontend.utils.js.map +1 -1
  365. package/dist/esm/core/config/settings-hub.frontend.schemas.d.ts +17 -6
  366. package/dist/esm/core/config/settings-hub.frontend.schemas.d.ts.map +1 -1
  367. package/dist/esm/core/config/settings-hub.frontend.schemas.js.map +1 -1
  368. package/dist/esm/core/config/useSettingsHubConfig.d.ts.map +1 -1
  369. package/dist/esm/core/config/useSettingsHubConfig.js +1 -0
  370. package/dist/esm/core/config/useSettingsHubConfig.js.map +1 -1
  371. package/dist/esm/core/config/useVisibleSettingsHubConfig.d.ts +7 -0
  372. package/dist/esm/core/config/useVisibleSettingsHubConfig.d.ts.map +1 -1
  373. package/dist/esm/core/config/useVisibleSettingsHubConfig.js +9 -1
  374. package/dist/esm/core/config/useVisibleSettingsHubConfig.js.map +1 -1
  375. package/dist/esm/core/config/verify-launcher-content.d.ts +7 -1
  376. package/dist/esm/core/config/verify-launcher-content.d.ts.map +1 -1
  377. package/dist/esm/core/config/verify-launcher-content.js +31 -0
  378. package/dist/esm/core/config/verify-launcher-content.js.map +1 -1
  379. package/dist/esm/core/errors/GlobalErrorHandler.d.ts.map +1 -1
  380. package/dist/esm/core/errors/GlobalErrorHandler.js +10 -0
  381. package/dist/esm/core/errors/GlobalErrorHandler.js.map +1 -1
  382. package/dist/esm/core/errors/backend-refusal.frontend.d.ts +1 -1
  383. package/dist/esm/core/errors/backend-refusal.frontend.d.ts.map +1 -1
  384. package/dist/esm/core/errors/backend-refusal.frontend.js.map +1 -1
  385. package/dist/esm/core/events/NotificationContext.d.ts.map +1 -1
  386. package/dist/esm/core/events/NotificationContext.js +19 -2
  387. package/dist/esm/core/events/NotificationContext.js.map +1 -1
  388. package/dist/esm/core/events/notification-display-policy.frontend.schemas.d.ts +21 -2
  389. package/dist/esm/core/events/notification-display-policy.frontend.schemas.d.ts.map +1 -1
  390. package/dist/esm/core/events/notification-display-policy.frontend.schemas.js +25 -4
  391. package/dist/esm/core/events/notification-display-policy.frontend.schemas.js.map +1 -1
  392. package/dist/esm/core/execution/useExecution.d.ts +3 -3
  393. package/dist/esm/core/execution/useExecution.js.map +1 -1
  394. package/dist/esm/core/external-providers/ConsentBasedProviderSdks.d.ts +1 -1
  395. package/dist/esm/core/external-providers/ConsentBasedProviderSdks.js +1 -1
  396. package/dist/esm/core/external-providers/ConsentBasedProviderSdks.js.map +1 -1
  397. package/dist/esm/core/features/FeatureGate.d.ts +13 -1
  398. package/dist/esm/core/features/FeatureGate.d.ts.map +1 -1
  399. package/dist/esm/core/features/FeatureGate.js +6 -1
  400. package/dist/esm/core/features/FeatureGate.js.map +1 -1
  401. package/dist/esm/core/features/InPlaceFeatureLock.d.ts +28 -0
  402. package/dist/esm/core/features/InPlaceFeatureLock.d.ts.map +1 -0
  403. package/dist/esm/core/features/InPlaceFeatureLock.js +49 -0
  404. package/dist/esm/core/features/InPlaceFeatureLock.js.map +1 -0
  405. package/dist/esm/core/features/PlanRefusalPrompt.d.ts +12 -0
  406. package/dist/esm/core/features/PlanRefusalPrompt.d.ts.map +1 -0
  407. package/dist/esm/core/features/PlanRefusalPrompt.js +90 -0
  408. package/dist/esm/core/features/PlanRefusalPrompt.js.map +1 -0
  409. package/dist/esm/core/features/RequiredFeaturesGate.d.ts +39 -0
  410. package/dist/esm/core/features/RequiredFeaturesGate.d.ts.map +1 -0
  411. package/dist/esm/core/features/RequiredFeaturesGate.js +51 -0
  412. package/dist/esm/core/features/RequiredFeaturesGate.js.map +1 -0
  413. package/dist/esm/core/features/feature-unavailability.frontend.utils.d.ts +6 -0
  414. package/dist/esm/core/features/feature-unavailability.frontend.utils.d.ts.map +1 -1
  415. package/dist/esm/core/features/feature-unavailability.frontend.utils.js +27 -10
  416. package/dist/esm/core/features/feature-unavailability.frontend.utils.js.map +1 -1
  417. package/dist/esm/core/features/plan-refusal.frontend.d.ts +43 -0
  418. package/dist/esm/core/features/plan-refusal.frontend.d.ts.map +1 -0
  419. package/dist/esm/core/features/plan-refusal.frontend.js +67 -0
  420. package/dist/esm/core/features/plan-refusal.frontend.js.map +1 -0
  421. package/dist/esm/core/features/required-features-gate-presentation.d.ts +21 -0
  422. package/dist/esm/core/features/required-features-gate-presentation.d.ts.map +1 -0
  423. package/dist/esm/core/features/required-features-gate-presentation.js +26 -0
  424. package/dist/esm/core/features/required-features-gate-presentation.js.map +1 -0
  425. package/dist/esm/core/features/useFeatureAvailability.d.ts.map +1 -1
  426. package/dist/esm/core/features/useFeatureAvailability.js +4 -0
  427. package/dist/esm/core/features/useFeatureAvailability.js.map +1 -1
  428. package/dist/esm/core/features/useOperationFeatureAvailability.d.ts +2 -0
  429. package/dist/esm/core/features/useOperationFeatureAvailability.d.ts.map +1 -1
  430. package/dist/esm/core/features/useOperationFeatureAvailability.js +6 -1
  431. package/dist/esm/core/features/useOperationFeatureAvailability.js.map +1 -1
  432. package/dist/esm/core/flows-actors/FlowsActorsContext.d.ts +11 -0
  433. package/dist/esm/core/flows-actors/FlowsActorsContext.d.ts.map +1 -1
  434. package/dist/esm/core/flows-actors/FlowsActorsContext.js +117 -3
  435. package/dist/esm/core/flows-actors/FlowsActorsContext.js.map +1 -1
  436. package/dist/esm/core/guidance/renderers/GuidanceAnnouncement.d.ts.map +1 -1
  437. package/dist/esm/core/guidance/renderers/GuidanceAnnouncement.js +3 -1
  438. package/dist/esm/core/guidance/renderers/GuidanceAnnouncement.js.map +1 -1
  439. package/dist/esm/core/navigation/NavigationContentAreas.d.ts.map +1 -1
  440. package/dist/esm/core/navigation/NavigationContentAreas.js +28 -9
  441. package/dist/esm/core/navigation/NavigationContentAreas.js.map +1 -1
  442. package/dist/esm/{components/views/chart-dashboard/chart-dashboard.utils.d.ts → core/navigation/chart-read-gate.d.ts} +11 -7
  443. package/dist/esm/core/navigation/chart-read-gate.d.ts.map +1 -0
  444. package/dist/esm/{components/views/chart-dashboard/chart-dashboard.utils.js → core/navigation/chart-read-gate.js} +27 -11
  445. package/dist/esm/core/navigation/chart-read-gate.js.map +1 -0
  446. package/dist/esm/core/navigation/home-resolution.d.ts +36 -0
  447. package/dist/esm/core/navigation/home-resolution.d.ts.map +1 -0
  448. package/dist/esm/core/navigation/home-resolution.js +46 -0
  449. package/dist/esm/core/navigation/home-resolution.js.map +1 -0
  450. package/dist/esm/core/navigation/launcher-resolution.d.ts +2 -34
  451. package/dist/esm/core/navigation/launcher-resolution.d.ts.map +1 -1
  452. package/dist/esm/core/navigation/launcher-resolution.js +13 -18
  453. package/dist/esm/core/navigation/launcher-resolution.js.map +1 -1
  454. package/dist/esm/core/navigation/launcher-runtime-availability.d.ts +1 -1
  455. package/dist/esm/core/navigation/launcher-runtime-availability.d.ts.map +1 -1
  456. package/dist/esm/core/navigation/launcher-runtime-availability.js +7 -2
  457. package/dist/esm/core/navigation/launcher-runtime-availability.js.map +1 -1
  458. package/dist/esm/core/navigation/primary-destination-layout.d.ts +2 -2
  459. package/dist/esm/core/navigation/primary-destination-layout.d.ts.map +1 -1
  460. package/dist/esm/core/navigation/primary-destination-layout.js +1 -1
  461. package/dist/esm/core/navigation/primary-destination-layout.js.map +1 -1
  462. package/dist/esm/core/navigation/useChartReadDecision.d.ts +26 -0
  463. package/dist/esm/core/navigation/useChartReadDecision.d.ts.map +1 -0
  464. package/dist/esm/core/navigation/useChartReadDecision.js +58 -0
  465. package/dist/esm/core/navigation/useChartReadDecision.js.map +1 -0
  466. package/dist/esm/core/navigation/useCurrentOrganizationConfigurationPresence.d.ts +1 -1
  467. package/dist/esm/core/navigation/useCurrentOrganizationConfigurationPresence.d.ts.map +1 -1
  468. package/dist/esm/core/navigation/useCurrentOrganizationConfigurationPresence.js.map +1 -1
  469. package/dist/esm/core/navigation/useCurrentOrganizationHoldsUnrevokedScimToken.d.ts +1 -1
  470. package/dist/esm/core/navigation/useCurrentOrganizationHoldsUnrevokedScimToken.d.ts.map +1 -1
  471. package/dist/esm/core/navigation/useCurrentOrganizationHoldsUnrevokedScimToken.js.map +1 -1
  472. package/dist/esm/core/navigation/view-title-resolution.d.ts +21 -0
  473. package/dist/esm/core/navigation/view-title-resolution.d.ts.map +1 -1
  474. package/dist/esm/core/navigation/view-title-resolution.js +25 -0
  475. package/dist/esm/core/navigation/view-title-resolution.js.map +1 -1
  476. package/dist/esm/core/navigation/viewer-field-reader.d.ts +81 -0
  477. package/dist/esm/core/navigation/viewer-field-reader.d.ts.map +1 -0
  478. package/dist/esm/core/navigation/viewer-field-reader.js +113 -0
  479. package/dist/esm/core/navigation/viewer-field-reader.js.map +1 -0
  480. package/dist/esm/core/navigation/viewer-roles.d.ts +40 -0
  481. package/dist/esm/core/navigation/viewer-roles.d.ts.map +1 -0
  482. package/dist/esm/core/navigation/viewer-roles.js +26 -0
  483. package/dist/esm/core/navigation/viewer-roles.js.map +1 -0
  484. package/dist/esm/core/requests/user-interaction-clock.d.ts +32 -0
  485. package/dist/esm/core/requests/user-interaction-clock.d.ts.map +1 -0
  486. package/dist/esm/core/requests/user-interaction-clock.js +47 -0
  487. package/dist/esm/core/requests/user-interaction-clock.js.map +1 -0
  488. package/dist/esm/core/requests/websockets/WebSocketEventBridge.d.ts.map +1 -1
  489. package/dist/esm/core/requests/websockets/WebSocketEventBridge.js +2 -0
  490. package/dist/esm/core/requests/websockets/WebSocketEventBridge.js.map +1 -1
  491. package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.d.ts +27 -6
  492. package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.d.ts.map +1 -1
  493. package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.js +30 -7
  494. package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.js.map +1 -1
  495. package/dist/esm/core/requests/wildo-http-client.frontend.service.d.ts.map +1 -1
  496. package/dist/esm/core/requests/wildo-http-client.frontend.service.js +13 -0
  497. package/dist/esm/core/requests/wildo-http-client.frontend.service.js.map +1 -1
  498. package/dist/esm/core/resources/hooks/useOperationEnabled.d.ts.map +1 -1
  499. package/dist/esm/core/resources/hooks/useOperationEnabled.js +4 -0
  500. package/dist/esm/core/resources/hooks/useOperationEnabled.js.map +1 -1
  501. package/dist/esm/core/resources/resource-addressability.frontend.utils.d.ts +1 -1
  502. package/dist/esm/core/resources/resource-addressability.frontend.utils.d.ts.map +1 -1
  503. package/dist/esm/core/resources/resource-addressability.frontend.utils.js.map +1 -1
  504. package/dist/esm/core/resources/resources-repository.frontend.service.d.ts.map +1 -1
  505. package/dist/esm/core/resources/resources-repository.frontend.service.js +2 -0
  506. package/dist/esm/core/resources/resources-repository.frontend.service.js.map +1 -1
  507. package/dist/esm/core/resources/resources.frontend.schemas.d.ts +29 -23
  508. package/dist/esm/core/resources/resources.frontend.schemas.d.ts.map +1 -1
  509. package/dist/esm/core/resources/resources.frontend.schemas.js +20 -20
  510. package/dist/esm/core/resources/resources.frontend.schemas.js.map +1 -1
  511. package/dist/esm/core/resources/rmm/ResourceMutationManager.d.ts.map +1 -1
  512. package/dist/esm/core/resources/rmm/ResourceMutationManager.js +4 -0
  513. package/dist/esm/core/resources/rmm/ResourceMutationManager.js.map +1 -1
  514. package/dist/esm/core/resources/useResourceOperationActions.d.ts.map +1 -1
  515. package/dist/esm/core/resources/useResourceOperationActions.js +7 -7
  516. package/dist/esm/core/resources/useResourceOperationActions.js.map +1 -1
  517. package/dist/esm/core/runtime/AppRouter.d.ts.map +1 -1
  518. package/dist/esm/core/runtime/AppRouter.js +11 -33
  519. package/dist/esm/core/runtime/AppRouter.js.map +1 -1
  520. package/dist/esm/core/runtime/ApplicationMainContext.d.ts +15 -1
  521. package/dist/esm/core/runtime/ApplicationMainContext.d.ts.map +1 -1
  522. package/dist/esm/core/runtime/ApplicationMainContext.js +41 -23
  523. package/dist/esm/core/runtime/ApplicationMainContext.js.map +1 -1
  524. package/dist/esm/core/runtime/IdentityPortalRouter.d.ts +20 -0
  525. package/dist/esm/core/runtime/IdentityPortalRouter.d.ts.map +1 -0
  526. package/dist/esm/core/runtime/IdentityPortalRouter.js +31 -0
  527. package/dist/esm/core/runtime/IdentityPortalRouter.js.map +1 -0
  528. package/dist/esm/core/runtime/domain-module.frontend.definitions.d.ts +9 -0
  529. package/dist/esm/core/runtime/domain-module.frontend.definitions.d.ts.map +1 -1
  530. package/dist/esm/core/runtime/domain-module.frontend.definitions.js +3 -2
  531. package/dist/esm/core/runtime/domain-module.frontend.definitions.js.map +1 -1
  532. package/dist/esm/core/runtime/frontend-companion-resource-inputs.d.ts +21 -0
  533. package/dist/esm/core/runtime/frontend-companion-resource-inputs.d.ts.map +1 -1
  534. package/dist/esm/core/runtime/frontend-companion-resource-inputs.js +19 -1
  535. package/dist/esm/core/runtime/frontend-companion-resource-inputs.js.map +1 -1
  536. package/dist/esm/core/runtime/identity-routes.d.ts +13 -0
  537. package/dist/esm/core/runtime/identity-routes.d.ts.map +1 -0
  538. package/dist/esm/core/runtime/identity-routes.js +50 -0
  539. package/dist/esm/core/runtime/identity-routes.js.map +1 -0
  540. package/dist/esm/core/runtime/routes.frontend.definitions.d.ts +19 -0
  541. package/dist/esm/core/runtime/routes.frontend.definitions.d.ts.map +1 -1
  542. package/dist/esm/core/runtime/routes.frontend.definitions.js +20 -1
  543. package/dist/esm/core/runtime/routes.frontend.definitions.js.map +1 -1
  544. package/dist/esm/core/runtime/runtime.frontend.schemas.d.ts +3 -1
  545. package/dist/esm/core/runtime/runtime.frontend.schemas.d.ts.map +1 -1
  546. package/dist/esm/core/runtime/runtime.frontend.schemas.js +2 -0
  547. package/dist/esm/core/runtime/runtime.frontend.schemas.js.map +1 -1
  548. package/dist/esm/core/runtime/start-application.frontend.service.d.ts +7 -0
  549. package/dist/esm/core/runtime/start-application.frontend.service.d.ts.map +1 -1
  550. package/dist/esm/core/runtime/start-application.frontend.service.js +4 -2
  551. package/dist/esm/core/runtime/start-application.frontend.service.js.map +1 -1
  552. package/dist/esm/core/security/AuthSessionContext.d.ts.map +1 -1
  553. package/dist/esm/core/security/AuthSessionContext.js +4 -0
  554. package/dist/esm/core/security/AuthSessionContext.js.map +1 -1
  555. package/dist/esm/core/security/StepUpAuthContext.d.ts +3 -2
  556. package/dist/esm/core/security/StepUpAuthContext.d.ts.map +1 -1
  557. package/dist/esm/core/security/StepUpAuthContext.js +7 -2
  558. package/dist/esm/core/security/StepUpAuthContext.js.map +1 -1
  559. package/dist/esm/core/security/federated-reauthentication.frontend.d.ts +13 -2
  560. package/dist/esm/core/security/federated-reauthentication.frontend.d.ts.map +1 -1
  561. package/dist/esm/core/security/federated-reauthentication.frontend.js +21 -1
  562. package/dist/esm/core/security/federated-reauthentication.frontend.js.map +1 -1
  563. package/dist/esm/core/security/useAuthenticatedRouteEntry.d.ts +24 -0
  564. package/dist/esm/core/security/useAuthenticatedRouteEntry.d.ts.map +1 -0
  565. package/dist/esm/core/security/useAuthenticatedRouteEntry.js +37 -0
  566. package/dist/esm/core/security/useAuthenticatedRouteEntry.js.map +1 -0
  567. package/dist/esm/core/ui/design-token.utils.d.ts +9 -0
  568. package/dist/esm/core/ui/design-token.utils.d.ts.map +1 -1
  569. package/dist/esm/core/ui/design-token.utils.js +24 -3
  570. package/dist/esm/core/ui/design-token.utils.js.map +1 -1
  571. package/dist/esm/core/ui/themes/focus-indicator.d.ts +1 -1
  572. package/dist/esm/core/ui/themes/focus-indicator.js +1 -1
  573. package/dist/esm/core/ui/themes/focus-indicator.js.map +1 -1
  574. package/dist/esm/core/ui/ui.frontend.schemas.d.ts.map +1 -1
  575. package/dist/esm/index.d.ts +14 -1
  576. package/dist/esm/index.d.ts.map +1 -1
  577. package/dist/esm/index.js +17 -1
  578. package/dist/esm/index.js.map +1 -1
  579. package/dist/esm/testing/mock-builders.d.ts +1 -1
  580. package/dist/esm/testing/mock-builders.d.ts.map +1 -1
  581. package/dist/esm/testing/mock-builders.js +1 -0
  582. package/dist/esm/testing/mock-builders.js.map +1 -1
  583. package/dist/tsconfig.build.tsbuildinfo +1 -1
  584. package/package.json +9 -6
  585. package/dist/esm/components/views/chart-dashboard/chart-dashboard.utils.d.ts.map +0 -1
  586. package/dist/esm/components/views/chart-dashboard/chart-dashboard.utils.js.map +0 -1
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { withPageApiBaseUrl } from '../../core/runtime/page-api-base-url.frontend.js';
3
3
  import { CorePresetNames, FrontendComponentType } from '@wildo-ai/presets-components-models';
4
- import { mergeFeatureConfigurations, SIGNING_RETURN_PAGE_PATH, } from '@wildo-ai/saas-models';
4
+ import { AppFrontendSurface, mergeFeatureConfigurations, SIGNING_RETURN_PAGE_PATH, } from '@wildo-ai/saas-models';
5
5
  import { useCallback, useEffect, useState, useRef, useMemo } from 'react';
6
6
  import { createBrowserRouter } from 'react-router';
7
7
  // The DOM `RouterProvider` wires `react-dom`'s `flushSync` in; React Router 7 publishes it from the `/dom` subpath.
@@ -24,7 +24,9 @@ import { StepUpAuthProvider } from '../../core/security/StepUpAuthContext.js';
24
24
  import { ApplicationRoleTablesProvider } from '../../core/security/ApplicationRoleTablesContext.js';
25
25
  import { UserOrgsProvider } from '../../core/security/UserOrgsContext.js';
26
26
  import { GlobalErrorHandler } from '../../core/errors/GlobalErrorHandler.js';
27
+ import { PlanRefusalPrompt } from '../../core/features/PlanRefusalPrompt.js';
27
28
  import { AppRouter } from './AppRouter.js';
29
+ import { IdentityPortalRouter } from './IdentityPortalRouter.js';
28
30
  import { StartupFailureScreen } from './StartupFailureScreen.js';
29
31
  import { UIProvider } from '../../core/ui/UIContext.js';
30
32
  import { envLoader } from '../../core/runtime/env-variable-loader.frontend.service.js';
@@ -66,21 +68,31 @@ import { useApplication } from '../../core/runtime/useApplication.js';
66
68
  import { useEventBus } from '../../core/events/useEventBus.js';
67
69
  import { FrontendEvents } from '../../core/events/events.frontend.schemas.js';
68
70
  /**
69
- * Exact preset dependencies of the two mutually exclusive SaaS shell roots.
70
- * The full framework completeness audit remains a separate developer tool;
71
- * startup needs only the components that this composition unconditionally
72
- * delegates its root layout to.
71
+ * Exact preset dependencies of the two mutually exclusive shell roots of each surface: the signed-in shell (the
72
+ * product's, or the identity portal's) and the public one both surfaces share. The full framework completeness audit
73
+ * remains a separate developer tool; startup needs only the components that this composition unconditionally delegates
74
+ * its root layout to. A portal therefore does not require the product shell, which it never renders.
73
75
  */
74
- const SAAS_APPLICATION_REQUIRED_COMPONENTS = [
75
- {
76
- componentType: FrontendComponentType.APP_LAYOUTS_MAIN_CONTAINER,
77
- preset: CorePresetNames.DEFAULT,
78
- },
79
- {
80
- componentType: FrontendComponentType.PUBLIC_LAYOUTS_MAIN_CONTAINER,
81
- preset: CorePresetNames.DEFAULT,
82
- },
83
- ];
76
+ const REQUIRED_COMPONENTS_BY_SURFACE = {
77
+ [AppFrontendSurface.PRODUCT]: [
78
+ { componentType: FrontendComponentType.APP_LAYOUTS_MAIN_CONTAINER, preset: CorePresetNames.DEFAULT },
79
+ { componentType: FrontendComponentType.PUBLIC_LAYOUTS_MAIN_CONTAINER, preset: CorePresetNames.DEFAULT },
80
+ ],
81
+ [AppFrontendSurface.IDENTITY_PORTAL]: [
82
+ { componentType: FrontendComponentType.APP_LAYOUTS_IDENTITY_PORTAL_CONTAINER, preset: CorePresetNames.DEFAULT },
83
+ { componentType: FrontendComponentType.PUBLIC_LAYOUTS_MAIN_CONTAINER, preset: CorePresetNames.DEFAULT },
84
+ ],
85
+ };
86
+ /** The name a missing shell preset is reported under, per surface. */
87
+ const SURFACE_HOST_NAMES = {
88
+ [AppFrontendSurface.PRODUCT]: 'SaaS application',
89
+ [AppFrontendSurface.IDENTITY_PORTAL]: 'Identity portal',
90
+ };
91
+ /** The signed-in shell whose readiness the initialization gate waits on, per surface; the public shell is shared. */
92
+ const SIGNED_IN_CONTAINER_BY_SURFACE = {
93
+ [AppFrontendSurface.PRODUCT]: MainContextInitComponents.APP_MAIN_CONTAINER,
94
+ [AppFrontendSurface.IDENTITY_PORTAL]: MainContextInitComponents.IDENTITY_PORTAL_CONTAINER,
95
+ };
84
96
  /** Translate SaaS application/event contexts into the focused UI runtime binding. */
85
97
  function SaaSUIRuntimeProvider({ children }) {
86
98
  const { frontendConfiguration, markComponentInitialized } = useApplication();
@@ -323,6 +335,10 @@ export function ApplicationMainProvider(props) {
323
335
  function ApplicationMainProviderRoot({
324
336
  // children,
325
337
  options, }) {
338
+ const surface = options.surface ?? AppFrontendSurface.PRODUCT;
339
+ const requiredComponents = REQUIRED_COMPONENTS_BY_SURFACE[surface];
340
+ const hostName = SURFACE_HOST_NAMES[surface];
341
+ const signedInContainer = SIGNED_IN_CONTAINER_BY_SURFACE[surface];
326
342
  const mergedFeatureConfiguration = useMemo(() => mergeFeatureConfigurations(options.featureConfiguration), [options.featureConfiguration]);
327
343
  const logger = useMemo(() => LoggerFrontendService.getLogger(), []);
328
344
  const logDebug = useMemo(() => {
@@ -342,15 +358,16 @@ options, }) {
342
358
  [MainContextInitComponents.ROUTER]: false,
343
359
  [MainContextInitComponents.I18N]: false,
344
360
  [MainContextInitComponents.APP_MAIN_CONTAINER]: false,
345
- [MainContextInitComponents.PUBLIC_APP_CONTAINER]: false
361
+ [MainContextInitComponents.PUBLIC_APP_CONTAINER]: false,
362
+ [MainContextInitComponents.IDENTITY_PORTAL_CONTAINER]: false,
346
363
  });
347
364
  const checkAllComponentsInitialized = useCallback((status) => {
348
- // Required: main context, UI, and the two root shell containers.
365
+ // Required: main context, UI, and the surface's two root shell containers (its signed-in shell and the public one).
349
366
  return status[MainContextInitComponents.MAIN_CONTEXT] &&
350
367
  status[MainContextInitComponents.UI] &&
351
- status[MainContextInitComponents.APP_MAIN_CONTAINER] &&
368
+ status[signedInContainer] &&
352
369
  status[MainContextInitComponents.PUBLIC_APP_CONTAINER];
353
- }, []);
370
+ }, [signedInContainer]);
354
371
  // Function to mark components as initialized
355
372
  const markComponentInitialized = useCallback((component) => {
356
373
  setInitializationStatus(prev => {
@@ -406,7 +423,7 @@ options, }) {
406
423
  // They will mark themselves when rendered, but we need to allow rendering to proceed
407
424
  // This is safe because markComponentInitialized is idempotent and components will
408
425
  // call it again when they render, ensuring the status stays correct
409
- markComponentInitialized(MainContextInitComponents.APP_MAIN_CONTAINER);
426
+ markComponentInitialized(signedInContainer);
410
427
  markComponentInitialized(MainContextInitComponents.PUBLIC_APP_CONTAINER);
411
428
  logDebug('Marked container components for hot reload (they will re-mark themselves when rendered)');
412
429
  return;
@@ -447,12 +464,13 @@ options, }) {
447
464
  baseFrontendConfig: options.baseFrontendConfig,
448
465
  frontendConfigOverrides: options.frontendConfigOverrides,
449
466
  featureConfiguration: mergedFeatureConfiguration,
467
+ surface,
450
468
  componentLoader: async () => {
451
469
  await options.componentLoader();
452
470
  // Keep the strict host gate inside the component-registration
453
471
  // startup phase. A missing shell preset therefore prevents the
454
472
  // service's success callback as well as every React child mount.
455
- ComponentRegistryService.assertRequiredRegistrations('SaaS application', SAAS_APPLICATION_REQUIRED_COMPONENTS);
473
+ ComponentRegistryService.assertRequiredRegistrations(hostName, requiredComponents);
456
474
  },
457
475
  onInitialized: () => {
458
476
  logDebug('Application initialized successfully');
@@ -465,7 +483,7 @@ options, }) {
465
483
  // The startup service has a legitimate already-initialized fast path
466
484
  // that does not call the loader again. Re-assert before publishing its
467
485
  // services so HMR/remount paths retain the same fail-closed guarantee.
468
- ComponentRegistryService.assertRequiredRegistrations('SaaS application', SAAS_APPLICATION_REQUIRED_COMPONENTS);
486
+ ComponentRegistryService.assertRequiredRegistrations(hostName, requiredComponents);
469
487
  setApplicationServices(services);
470
488
  // Mark main context and core components as initialized
471
489
  markComponentInitialized(MainContextInitComponents.MAIN_CONTEXT);
@@ -554,7 +572,7 @@ options, }) {
554
572
  // AuthSessionProvider manages auth/session/WebSocket, AppScopeProvider owns primary/custom scope,
555
573
  // and UserOrgsProvider consumes AppScope for its org-facing facade APIs.
556
574
  // GlobalErrorHandler subscribes to ERROR_OCCURED events and handles auth errors (logout)
557
- const routeElement = (_jsx(ErrorBoundary, { children: _jsx(LoadingProvider, { children: _jsx(AppLoadingGate, { children: _jsx(AnonymousSessionProvider, { children: _jsxs(AuthSessionProvider, { tokenStorage: sessionTokenStorage, children: [_jsx(GlobalErrorHandler, {}), _jsx(StepUpAuthProvider, { children: _jsxs(AppScopeProvider, { children: [_jsx(ResourceReadCacheBridge, {}), _jsx(NotificationBadgeMemoryBoundary, {}), _jsx(AnalyticsScopeBridge, {}), _jsx(ApplicationRoleTablesProvider, { customRoles: options.customRoles, children: _jsx(UserOrgsProvider, { children: _jsx(AppModeProvider, { children: _jsxs(BillingProvider, { productDefinitions: options.productDefinitions, children: [_jsx(BillingErrorNotifier, {}), _jsxs(FeaturesProvider, { featureConfiguration: mergedFeatureConfiguration, children: [_jsx(OrganizationBrandingPublisher, {}), _jsx(ScopedResourceRegistryProvider, { children: _jsx(GuidanceContextProvider, { children: _jsx(FlowsActorsProvider, { children: _jsxs(NavigationProvider, { children: [_jsx(DefaultHotkeyHandler, {}), _jsx(HotkeyShortcutsHelpDialog, {}), _jsx(AppRouter, {})] }) }) }) })] })] }) }) }) })] }) })] }) }) }) }) }));
575
+ const routeElement = (_jsx(ErrorBoundary, { children: _jsx(LoadingProvider, { children: _jsx(AppLoadingGate, { children: _jsx(AnonymousSessionProvider, { children: _jsxs(AuthSessionProvider, { tokenStorage: sessionTokenStorage, children: [_jsx(GlobalErrorHandler, {}), _jsx(StepUpAuthProvider, { children: _jsxs(AppScopeProvider, { children: [_jsx(ResourceReadCacheBridge, {}), _jsx(NotificationBadgeMemoryBoundary, {}), _jsx(AnalyticsScopeBridge, {}), _jsx(ApplicationRoleTablesProvider, { customRoles: options.customRoles, children: _jsx(UserOrgsProvider, { children: _jsx(AppModeProvider, { children: _jsxs(BillingProvider, { productDefinitions: options.productDefinitions, children: [_jsx(BillingErrorNotifier, {}), _jsxs(FeaturesProvider, { featureConfiguration: mergedFeatureConfiguration, children: [_jsx(OrganizationBrandingPublisher, {}), _jsx(PlanRefusalPrompt, {}), _jsx(ScopedResourceRegistryProvider, { children: _jsx(GuidanceContextProvider, { children: _jsx(FlowsActorsProvider, { children: _jsxs(NavigationProvider, { children: [_jsx(DefaultHotkeyHandler, {}), _jsx(HotkeyShortcutsHelpDialog, {}), surface === AppFrontendSurface.IDENTITY_PORTAL ? _jsx(IdentityPortalRouter, {}) : _jsx(AppRouter, {})] }) }) }) })] })] }) }) }) })] }) })] }) }) }) }) }));
558
576
  // Create the router exactly ONCE, then reuse it across re-renders.
559
577
  //
560
578
  // `createBrowserRouter` must never run in render: a fresh router instance makes
@@ -1 +1 @@
1
- {"version":3,"file":"ApplicationMainContext.js","sourceRoot":"","sources":["../../../../src/core/runt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wB,KAAG,EAC5B,KAAC,qBAAqB,KAAG,EAczB,KAAC,OAAO,KAAG,EACX,KAAC,cAAc,IAAC,MAAM,EAAE,MAAM,GAAI,IACd,GACH,GACE,GACQ,GACV,GACJ,GACJ,GACV,GACD,GACM,GACI,GACZ,GACH,CACpB,CAAC;AACJ,CAAC","sourcesContent":["import { withPageApiBaseUrl } from '~wildo-frontend-lib/core/runtime/page-api-base-url.frontend';\nimport { ComponentPresetDefinitionType, CorePresetNames, FrontendComponentType } from '@wildo-ai/presets-components-models';\nimport {\n AppConfiguration_Shared,\n AppConfiguration_Shared_Auth,\n AppConfiguration_Shared_Compliance,\n AppConfiguration_Shared_AppIdentity,\n AppConfiguration_Shared_AppPreferencesLanguage,\n AppConfiguration_Shared_Runtime,\n ResourceConfiguration_InitializationFactory,\n ResourceRelationship,\n mergeFeatureConfigurations,\n SIGNING_RETURN_PAGE_PATH,\n type CustomFeatureConfigurationInput,\n type NotificationBadgeDefinition,\n type RolesConfiguration,\n type UserPreferences,\n} from '@wildo-ai/saas-models';\nimport type { AppConfiguration_Frontend } from '~wildo-frontend-lib/core/config/app-configuration-frontend.schemas';\nimport React, { useCallback, useEffect, useState, useRef, useMemo } from 'react';\nimport { createBrowserRouter } from 'react-router';\n// The DOM `RouterProvider` wires `react-dom`'s `flushSync` in; React Router 7 publishes it from the `/dom` subpath.\n// It is rendered WITHOUT `useTransitions`: left undefined, every router state update is wrapped in\n// `React.startTransition`, which is what v6's `future.v7_startTransition` did and what\n// `useSynchronousBrowserLocation` is written against.\nimport { RouterProvider } from 'react-router/dom';\nimport { ErrorBoundary } from '~wildo-frontend-lib/core/errors/ErrorBoundary';\nimport { ErrorProvider } from '~wildo-frontend-lib/core/errors/ErrorContext';\nimport { RouterErrorBoundary } from '~wildo-frontend-lib/core/errors/RouterErrorBoundary';\nimport { ErrorManagementService } from '~wildo-frontend-lib/core/errors/error-management.frontend.service';\nimport { I18nProvider } from '~wildo-frontend-lib/core/i18n/I18nContext';\nimport { LoadingProvider } from '~wildo-frontend-lib/core/loading/LoadingContext';\nimport { AppLoadingGate } from '~wildo-frontend-lib/core/loading/AppLoadingGate';\nimport { LoggerFrontendService } from '~wildo-frontend-lib/core/monitoring/logger.frontend.service';\nimport { WildoBackendHttpClient } from '~wildo-frontend-lib/core/requests/wildo-http-client.frontend.service';\nimport { ResourceRegistryProvider } from '~wildo-frontend-lib/core/resources/ResourceRegistryContext';\nimport { AuthSessionProvider } from '~wildo-frontend-lib/core/security/AuthSessionContext';\nimport { AnonymousSessionProvider } from '~wildo-frontend-lib/core/security/AnonymousSessionContext';\nimport { StepUpAuthProvider } from '~wildo-frontend-lib/core/security/StepUpAuthContext';\nimport { ApplicationRoleTablesProvider } from '~wildo-frontend-lib/core/security/ApplicationRoleTablesContext';\nimport { UserOrgsProvider } from '~wildo-frontend-lib/core/security/UserOrgsContext';\nimport { GlobalErrorHandler } from '~wildo-frontend-lib/core/errors/GlobalErrorHandler';\nimport { AppRouter } from './AppRouter';\nimport { StartupFailureScreen } from './StartupFailureScreen';\nimport { UIProvider } from '~wildo-frontend-lib/core/ui/UIContext';\nimport { envLoader } from '~wildo-frontend-lib/core/runtime/env-variable-loader.frontend.service';\nimport { InitializationStatus, MainContextInitComponents } from './runtime.frontend.schemas';\nimport { ApplicationServices, startApplicationService } from './start-application.frontend.service';\nimport type { GeneratedAppProviderModules } from '@wildo-ai/external-connectors-public/app';\n\nimport { EventBusProvider } from '~wildo-frontend-lib/core/events/EventBusContext';\nimport { NotificationProvider } from '~wildo-frontend-lib/core/events/NotificationContext';\nimport { AppCelebrationOverlay } from '~wildo-frontend-lib/components/feedback/celebration-overlay';\nimport { Toaster } from '~wildo-frontend-lib/components/feedback/toast';\nimport { IconRegistryBridge } from '~wildo-frontend-lib/core/icons/IconRegistryBridge';\nimport { NavigationProvider } from '~wildo-frontend-lib/core/navigation/NavigationContext';\nimport { FlowsActorsProvider } from '~wildo-frontend-lib/core/flows-actors/FlowsActorsContext';\nimport { WebSocketProvider } from '~wildo-frontend-lib/core/requests/websockets/WebSocketContext';\nimport type { FrontendConfigOverrides } from './app-config-overrides.frontend.definitions';\nimport type { ResourceUIBehavior } from '~wildo-frontend-lib/core/resources/resources.frontend.schemas';\nimport { WebSocketEventBridge } from '~wildo-frontend-lib/core/requests/websockets/WebSocketEventBridge';\nimport { ConnectionStatusNotifier } from '~wildo-frontend-lib/core/requests/websockets/ConnectionStatusNotifier';\nimport { RMMWebSocketBridge } from '~wildo-frontend-lib/core/resources/rmm/RMMWebSocketBridge';\nimport { AnalyticsScopeBridge } from '~wildo-frontend-lib/core/monitoring/analytics/AnalyticsScopeBridge';\nimport { ResourceReadCacheBridge } from '~wildo-frontend-lib/core/resources/ResourceReadCacheBridge';\nimport { NotificationBadgeMemoryBoundary } from '~wildo-frontend-lib/core/requests/websockets/useNotificationBadges';\nimport { HotkeyRegistryProvider } from '~wildo-frontend-lib/core/hotkey/HotkeyRegistryContext';\nimport { DefaultHotkeyHandler } from '~wildo-frontend-lib/core/hotkey/DefaultHotkeyHandler';\nimport { HotkeyShortcutsHelpDialog } from '~wildo-frontend-lib/core/hotkey/HotkeyShortcutsHelpDialog';\nimport { AppScopeProvider } from '~wildo-frontend-lib/core/scope/AppScopeContext';\nimport { AppModeProvider } from '~wildo-frontend-lib/core/mode/AppModeContext';\nimport { ScopedResourceRegistryProvider } from '~wildo-frontend-lib/core/resources/ScopedResourceRegistryProvider';\nimport { AnalyticsContextProvider } from '~wildo-frontend-lib/core/monitoring/analytics/AnalyticsContext';\nimport { ConsentBasedProviderSdksProvider } from '~wildo-frontend-lib/core/external-providers/ConsentBasedProviderSdks';\nimport { BillingProvider } from '~wildo-frontend-lib/core/billing/BillingContext';\nimport { BillingErrorNotifier } from '~wildo-frontend-lib/core/billing/BillingErrorNotifier';\nimport { FeaturesProvider } from '~wildo-frontend-lib/core/features/FeaturesContext';\nimport { OrganizationBrandingPublisher } from '~wildo-frontend-lib/core/branding/OrganizationBrandingPublisher';\nimport { GuidanceContextProvider } from '~wildo-frontend-lib/core/guidance/GuidanceContext';\nimport { EphemeralSessionTokenStorage } from '~wildo-frontend-lib/core/security/session-token-storage.frontend.service';\nimport { RMMRegistryProvider } from '~wildo-frontend-lib/core/resources/rmm/RMMRegistryContext';\nimport { LoadingSpinner } from '~wildo-frontend-lib/components/feedback/loading-spinner';\nimport { ApplicationContext } from './ApplicationContext.shared';\nimport { ComponentRegistryService } from '~wildo-frontend-lib/core/components-registry/component-registry.frontend.service';\nimport type { ComponentRegistrationRequirement } from '~wildo-frontend-lib/core/components-registry/component-registry.frontend.schemas';\nimport { useApplication } from '~wildo-frontend-lib/core/runtime/useApplication';\nimport { useEventBus } from '~wildo-frontend-lib/core/events/useEventBus';\nimport { FrontendEvents, type FrontendEventPayloads } from '~wildo-frontend-lib/core/events/events.frontend.schemas';\n\n\n/**\n * Application Main Context\n * Main provider that wraps all other providers and manages global application state\n */\n\n// Type for merged frontend component variant definitions\nexport type MergedFrontendComponentPresetDefinitions = {\n [K in FrontendComponentType]: ComponentPresetDefinitionType<K>[]\n};\n\nexport interface InitializationApplicationConfig {\n apiBaseUrl: string;\n}\n\nexport interface ApplicationMainProviderOptions {\n /** Browser provider CODE, joined with this service's bootstrap DATA during startup. */\n frontendProviderModules?: GeneratedAppProviderModules;\n apiBaseUrl?: string;\n /**\n * Environment variables from the consuming app.\n * Required because pre-compiled libraries don't have access to import.meta.env.\n * Pass import.meta.env from your app.\n */\n env: Record<string, string | undefined>;\n\n /**\n * Custom shared resources configuration factory map from custom-shared-lib.\n * Required for custom resources to be registered in the frontend ResourceRegistryContext.\n */\n customShared_ResourcesConfigurationsFactoryMap?: { [key: string]: ResourceConfiguration_InitializationFactory<any, any, any> };\n\n /**\n * Custom shared resource field identifiers from custom-shared-lib.\n */\n customShared_ResourceFieldIdentifier?: { [key: string]: string };\n\n /**\n * Custom shared resource relationships from custom-shared-lib.\n */\n customShared_ResourcesRelationships?: ResourceRelationship[];\n\n /**\n * Resource types to leave OUT of the registry, even though the core factory map declares them.\n *\n * Forwarded to `initializeResources`, which has always supported it. An APPLICATION normally passes\n * nothing — it wants the whole core vocabulary — so this exists for the other Wildo frontends: the\n * application-creation workbench observes an application's structure and must not register that\n * application's billing, subscription, milestone, user and organization resources.\n */\n excludedResourceTypes?: ReadonlySet<string>;\n\n /** Feature configuration from custom-shared-lib (merged with core + platform features at runtime) */\n featureConfiguration?: CustomFeatureConfigurationInput;\n\n /**\n * The application's declared custom roles (`sharedRegistry.customRoles`), so every frontend role check decides\n * against the same complete role tables the backend authorizes with (`ApplicationRoleTablesContext`).\n *\n * Required as a KEY, deliberately: with it the shell treats a role neither table knows as inert, as the backend\n * does, so an application that declared custom roles and forgot to pass them would silently hide from those roles'\n * holders the rows and actions they may use. `undefined` states that the application declares none (#2376 review).\n */\n customRoles: RolesConfiguration | undefined;\n\n /** Product catalog definitions from custom-shared-lib */\n productDefinitions?: import('@wildo-ai/saas-models').ProductDefinition[];\n\n /**\n * Final frontend resource configuration preset.\n *\n * Controls how each resource and its operations appear in the frontend:\n * labels, sections, views, empty state, guidance (resource-level) and\n * addressability, sidebar placement, layout presets (operation-level).\n *\n * Apps must pass one already-composed object. In Wonder Todos, the engine\n * module owns the framework base preset and layers any app-shell\n * overrides before the final aggregated module registry reaches startup.\n */\n resourceUIBehavior?: ResourceUIBehavior;\n\n /**\n * App-declared notification badge definitions (R8) — merged with the\n * framework's core definitions in the frontend registry so `NavigationItemBadge`\n * can resolve an app badge. Mirror the backend init config.\n */\n notificationBadgeDefinitions?: NotificationBadgeDefinition[];\n\n /**\n * SHELL COMPANIONS — components the signed-in shell mounts ONCE, for as long as it is on screen,\n * whatever page is open. They render nothing of their own; they exist for application-wide effects\n * that must live exactly as long as the shell does. The case that asked for it: a\n * `FRONTEND_PRODUCED` notification badge, whose producer (`usePublishNotificationBadgeCount`) must be\n * mounted wherever the navigation drawing the badge is, and the navigation is on every page.\n *\n * Mounted inside every provider and inside the consent and document-acceptance gates, so a companion\n * never reads before a person has agreed to what the application does. Not a place for UI: a\n * companion that renders visible content has no layout slot and will land wherever the gate puts it.\n */\n shellCompanions?: readonly React.ComponentType[];\n\n /**\n * Base frontend configuration — provided by the app via the preset layer.\n * No implicit framework defaults: apps must explicitly provide this.\n */\n baseFrontendConfig: AppConfiguration_Frontend;\n\n /** Per-section frontend config overrides (factories or partial values) */\n frontendConfigOverrides?: FrontendConfigOverrides;\n\n /** Component loader — required. Called during app init to register component presets. */\n componentLoader: () => Promise<void>;\n}\n\nexport interface ApplicationMainProviderProps {\n // children: ReactNode;\n options: ApplicationMainProviderOptions;\n}\n\n/**\n * Exact preset dependencies of the two mutually exclusive SaaS shell roots.\n * The full framework completeness audit remains a separate developer tool;\n * startup needs only the components that this composition unconditionally\n * delegates its root layout to.\n */\nconst SAAS_APPLICATION_REQUIRED_COMPONENTS: readonly ComponentRegistrationRequirement[] = [\n {\n componentType: FrontendComponentType.APP_LAYOUTS_MAIN_CONTAINER,\n preset: CorePresetNames.DEFAULT,\n },\n {\n componentType: FrontendComponentType.PUBLIC_LAYOUTS_MAIN_CONTAINER,\n preset: CorePresetNames.DEFAULT,\n },\n];\n\n/** Translate SaaS application/event contexts into the focused UI runtime binding. */\nfunction SaaSUIRuntimeProvider({ children }: { children: React.ReactNode }): React.ReactElement {\n const { frontendConfiguration, markComponentInitialized } = useApplication();\n const { on } = useEventBus();\n const subscribeToUserPreferences = useCallback(\n (listener: (preferences: UserPreferences['ui'] | null) => void): (() => void) =>\n on(FrontendEvents.USER_PREFERENCES_CHANGED, (payload: FrontendEventPayloads[FrontendEvents.USER_PREFERENCES_CHANGED]) => {\n /*\n * A payload WITHOUT the key is no news about UI preferences, and must not clear them. The event\n * carries independent fields, each present only when its sender has something to say: a member\n * whose preferences record has no `ui` block (`emitPreferencesChanged` then omits the key) used to\n * reach `UIProvider` as `null` and wipe what the person had set (found by #2242). `null` WITH the\n * key is the sign-out clearing and still clears. Same contract as `I18nContext`'s handler.\n */\n if (!Object.prototype.hasOwnProperty.call(payload, 'uiPreferences')) return;\n listener(payload.uiPreferences ?? null);\n }),\n [on],\n );\n // The current organization's branding in effect (#2306), published from inside the organization and feature contexts.\n const subscribeToOrganizationBranding = useCallback(\n (listener: (branding: { readonly primaryColor: string | null; readonly secondaryColor: string | null; readonly logoUrl: string | null; readonly productName: string | null }) => void): (() => void) =>\n on(FrontendEvents.ORGANIZATION_BRANDING_CHANGED, (payload: FrontendEventPayloads[FrontendEvents.ORGANIZATION_BRANDING_CHANGED]) => {\n listener({ primaryColor: payload.primaryColor ?? null, secondaryColor: payload.secondaryColor ?? null, logoUrl: payload.logoUrl ?? null, productName: payload.productName ?? null });\n }),\n [on],\n );\n const markInitialized = useCallback(\n (): void => markComponentInitialized(MainContextInitComponents.UI),\n [markComponentInitialized],\n );\n return (\n <UIProvider\n frontendConfiguration={frontendConfiguration}\n subscribeToUserPreferences={subscribeToUserPreferences}\n subscribeToOrganizationBranding={subscribeToOrganizationBranding}\n markInitialized={markInitialized}\n >\n {children}\n </UIProvider>\n );\n}\n\ninterface InitializationIssueLike {\n path?: unknown[];\n message?: string;\n}\n\ninterface InitializationUnresolvedForeignKeyLike {\n resourceType?: unknown;\n fieldName?: unknown;\n}\n\ninterface InitializationDiagnosticsLike {\n phase?: unknown;\n apiBaseUrl?: unknown;\n frontendServiceName?: unknown;\n errorName?: unknown;\n errorMessage?: unknown;\n stack?: unknown;\n causeMessage?: unknown;\n wildoError?: unknown;\n}\n\ninterface FormattedInitializationError {\n title: string;\n description: string;\n highlights: string[];\n technicalDetails: string;\n remainingIssueCount: number;\n contextRows: Array<{ label: string; value: string }>;\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null;\n}\n\nfunction formatUnknownValue(value: unknown): string {\n if (typeof value === 'string') {\n return value;\n }\n\n if (value instanceof Error) {\n return value.message;\n }\n\n if (value === undefined) {\n return 'undefined';\n }\n\n try {\n return JSON.stringify(value, null, 2);\n } catch {\n return String(value);\n }\n}\n\n/**\n * invented-display-text: the STARTUP-FAILURE screen, which renders because initialization did not\n * complete — so the label bundle is precisely what is not available. Every label beside this one is\n * a literal ('Application', 'Failed step', 'Frontend service') for the same reason, and this file\n * imports no `useI18n`. A diagnostic that needs the thing that failed is not a diagnostic.\n */\n// invented-display-text: startup-failure screen — see above.\nfunction titleCaseFromIdentifier(value: string): string {\n return value\n .split(/[\\s_-]+/)\n .filter(Boolean)\n .map((segment) => segment.charAt(0).toUpperCase() + segment.slice(1))\n .join(' ');\n}\n\nfunction formatInitializationPhase(phase: unknown): string | undefined {\n if (typeof phase !== 'string' || phase.trim().length === 0) {\n return undefined;\n }\n\n // invented-display-text: startup-failure screen — see `titleCaseFromIdentifier`.\n return titleCaseFromIdentifier(phase.trim());\n}\n\nfunction extractInitializationDiagnostics(rawError: unknown): InitializationDiagnosticsLike | undefined {\n if (!isRecord(rawError) || !isRecord(rawError.initializationDiagnostics)) {\n return undefined;\n }\n\n return rawError.initializationDiagnostics;\n}\n\nfunction extractWildoError(rawError: unknown, diagnostics?: InitializationDiagnosticsLike): Record<string, unknown> | undefined {\n if (diagnostics && isRecord(diagnostics.wildoError)) {\n return diagnostics.wildoError;\n }\n\n if (isRecord(rawError) && isRecord(rawError.wildoError)) {\n return rawError.wildoError;\n }\n\n return undefined;\n}\n\nfunction extractInitializationIssueArray(candidate: unknown): InitializationIssueLike[] | null {\n if (typeof candidate !== 'string') {\n return null;\n }\n\n try {\n const parsed = JSON.parse(candidate) as unknown;\n if (!Array.isArray(parsed)) {\n return null;\n }\n\n const issues = parsed.filter(\n (issue): issue is InitializationIssueLike =>\n typeof issue === 'object' && issue !== null,\n );\n\n return issues.length > 0 ? issues : null;\n } catch {\n return null;\n }\n}\n\nfunction extractPrimaryInitializationMessage(\n rawError: unknown,\n diagnostics?: InitializationDiagnosticsLike,\n wildoError?: Record<string, unknown>,\n): string {\n if (diagnostics && typeof diagnostics.errorMessage === 'string' && diagnostics.errorMessage.trim().length > 0) {\n return diagnostics.errorMessage;\n }\n\n if (wildoError && isRecord(wildoError.context) && typeof wildoError.context.message === 'string') {\n return wildoError.context.message;\n }\n\n if (rawError instanceof Error) {\n return rawError.message;\n }\n\n if (typeof rawError === 'string') {\n return rawError;\n }\n\n return formatUnknownValue(rawError);\n}\n\nfunction buildInitializationHighlights(wildoContext: Record<string, unknown> | undefined): string[] {\n if (!wildoContext) {\n return [];\n }\n\n const highlights: string[] = [];\n\n if (Array.isArray(wildoContext.unresolvedFKFields)) {\n for (const entry of wildoContext.unresolvedFKFields as InitializationUnresolvedForeignKeyLike[]) {\n const resourceType = typeof entry?.resourceType === 'string' ? entry.resourceType : 'unknown-resource';\n const fieldName = typeof entry?.fieldName === 'string' ? entry.fieldName : 'unknown-field';\n highlights.push(`${resourceType}.${fieldName}: foreign key cannot be resolved to a resource type`);\n }\n }\n\n if (typeof wildoContext.message === 'string') {\n const lines = wildoContext.message\n .split('\\n')\n .map((line) => line.trim())\n .filter((line) => line.length > 0 && !line.startsWith('[ResourcesRegistry]') && !line.startsWith('Fix:'));\n\n for (const line of lines) {\n if (line.startsWith('- ')) {\n highlights.push(line.slice(2));\n } else if (!highlights.includes(line)) {\n highlights.push(line);\n }\n }\n }\n\n const contextualEntries: Array<[string, unknown]> = [\n ['Resource type', wildoContext.resourceType],\n ['Foreign key field', wildoContext.foreignKeyField],\n ['Method', wildoContext.method],\n ['Existing type', wildoContext.existingType],\n ['New type', wildoContext.newType],\n ];\n\n for (const [label, value] of contextualEntries) {\n if (typeof value === 'string' && value.trim().length > 0) {\n highlights.push(`${label}: ${value}`);\n }\n }\n\n return Array.from(new Set(highlights)).slice(0, 6);\n}\n\nfunction buildInitializationContextRows(params: {\n diagnostics?: InitializationDiagnosticsLike;\n wildoError?: Record<string, unknown>;\n startupAppName: string;\n}): Array<{ label: string; value: string }> {\n const rows: Array<{ label: string; value: string }> = [\n { label: 'Application', value: params.startupAppName },\n ];\n\n const phase = formatInitializationPhase(params.diagnostics?.phase);\n if (phase) {\n rows.push({ label: 'Failed step', value: phase });\n }\n\n if (typeof params.diagnostics?.frontendServiceName === 'string' && params.diagnostics.frontendServiceName.trim().length > 0) {\n rows.push({ label: 'Frontend service', value: params.diagnostics.frontendServiceName });\n }\n\n if (typeof params.diagnostics?.apiBaseUrl === 'string' && params.diagnostics.apiBaseUrl.trim().length > 0) {\n rows.push({ label: 'API base URL', value: params.diagnostics.apiBaseUrl });\n }\n\n if (typeof params.wildoError?.customMessageReference === 'string' && params.wildoError.customMessageReference.trim().length > 0) {\n rows.push({ label: 'Error reference', value: params.wildoError.customMessageReference });\n }\n\n if (typeof params.wildoError?.type === 'string' && params.wildoError.type.trim().length > 0) {\n rows.push({ label: 'Error type', value: params.wildoError.type });\n }\n\n return rows;\n}\n\nfunction formatInitializationIssuePath(path: unknown[] | undefined): string {\n if (!path || path.length === 0) {\n return 'root';\n }\n\n return path\n .map((segment) => typeof segment === 'string' ? segment : String(segment))\n .join(' > ');\n}\n\nfunction formatInitializationError(rawError: unknown, startupAppName: string): FormattedInitializationError {\n const diagnostics = extractInitializationDiagnostics(rawError);\n const wildoError = extractWildoError(rawError, diagnostics);\n const primaryMessage = extractPrimaryInitializationMessage(rawError, diagnostics, wildoError);\n const issueArray = extractInitializationIssueArray(primaryMessage);\n const technicalDetails = formatUnknownValue(\n diagnostics ? {\n ...diagnostics,\n rawError: rawError instanceof Error ? {\n name: rawError.name,\n message: rawError.message,\n stack: rawError.stack,\n } : rawError,\n } : rawError,\n );\n\n if (issueArray) {\n const highlights = issueArray.slice(0, 6).map((issue) => {\n const location = formatInitializationIssuePath(issue.path);\n const message = issue.message ?? 'Invalid configuration value';\n return `${location}: ${message}`;\n });\n\n return {\n title: 'Application configuration is invalid',\n description: `Startup stopped because the frontend configuration failed validation in ${issueArray.length} place${issueArray.length === 1 ? '' : 's'}.`,\n highlights,\n technicalDetails: JSON.stringify(issueArray, null, 2),\n remainingIssueCount: Math.max(issueArray.length - highlights.length, 0),\n contextRows: buildInitializationContextRows({ diagnostics, wildoError, startupAppName }),\n };\n }\n\n const wildoContext = wildoError && isRecord(wildoError.context) ? wildoError.context : undefined;\n const highlights = buildInitializationHighlights(wildoContext);\n const phase = formatInitializationPhase(diagnostics?.phase);\n const shouldTreatAsConfigurationError = primaryMessage === 'configuration'\n || typeof wildoError?.customMessageReference === 'string' && wildoError.customMessageReference === 'configuration';\n\n const descriptionParts = [\n phase ? `Startup stopped during ${phase}.` : undefined,\n primaryMessage && primaryMessage !== 'configuration' ? primaryMessage : undefined,\n !primaryMessage || primaryMessage === 'configuration'\n ? 'Open the technical details to inspect the full startup diagnostics.'\n : undefined,\n ].filter((part): part is string => Boolean(part));\n\n return {\n title: shouldTreatAsConfigurationError ? 'Application configuration is invalid' : 'Application initialization failed',\n description: descriptionParts.join(' '),\n highlights,\n technicalDetails,\n remainingIssueCount: 0,\n contextRows: buildInitializationContextRows({ diagnostics, wildoError, startupAppName }),\n };\n}\n\n// ApplicationMainProvider component - exported directly for Fast Refresh compatibility\nexport function ApplicationMainProvider(props: ApplicationMainProviderProps): React.ReactElement {\n // Embedded signing: the vendor sends a signing frame back to this page once the person is done, and the frame that\n // loaded it only needs to see it arrive. The application must not boot inside that frame: a second instance would\n // restore the session, refresh its tokens (a rotated refresh token the parent then reuses revokes the session) and\n // open a WebSocket, all in a frame about to be removed. So the page renders nothing, before any provider mounts.\n if (window.location.pathname === SIGNING_RETURN_PAGE_PATH) return <></>;\n return <ApplicationMainProviderRoot {...props} />;\n}\n\nfunction ApplicationMainProviderRoot({\n // children,\n options,\n}: ApplicationMainProviderProps): React.ReactElement {\n const mergedFeatureConfiguration = useMemo(\n () => mergeFeatureConfigurations(options.featureConfiguration),\n [options.featureConfiguration]\n );\n\n const logger = useMemo(() => LoggerFrontendService.getLogger(), []);\n const logDebug = useMemo(() => {\n const debugFn = logger.debugByType('ApplicationMainContext');\n logger.setDebugTypeLogging('ApplicationMainContext', false); // Enable debug logging for initialization\n return debugFn;\n }, [logger]);\n\n const [isInitialized, setIsInitialized] = useState(false);\n const [initError, setInitError] = useState<unknown | null>(null);\n const [applicationServices, setApplicationServices] = useState<ApplicationServices | null>(null);\n const [config, setConfig] = useState<InitializationApplicationConfig | null>(null);\n const [initializationStatus, setInitializationStatus] = useState<InitializationStatus>({\n [MainContextInitComponents.MAIN_CONTEXT]: false,\n [MainContextInitComponents.UI]: false,\n [MainContextInitComponents.LOADER]: false,\n [MainContextInitComponents.ERRORS]: false,\n [MainContextInitComponents.ROUTER]: false,\n [MainContextInitComponents.I18N]: false,\n [MainContextInitComponents.APP_MAIN_CONTAINER]: false,\n [MainContextInitComponents.PUBLIC_APP_CONTAINER]: false\n });\n\n\n const checkAllComponentsInitialized = useCallback((status: InitializationStatus): boolean => {\n // Required: main context, UI, and the two root shell containers.\n return status[MainContextInitComponents.MAIN_CONTEXT] &&\n status[MainContextInitComponents.UI] &&\n status[MainContextInitComponents.APP_MAIN_CONTAINER] &&\n status[MainContextInitComponents.PUBLIC_APP_CONTAINER];\n }, []);\n\n // Function to mark components as initialized\n const markComponentInitialized = useCallback((component: MainContextInitComponents) => {\n setInitializationStatus(prev => {\n const newStatus = { ...prev, [component]: true };\n\n // Debug logging for initialization tracking\n const missingComponents = Object.entries(newStatus)\n .filter(([_, isInit]) => !isInit)\n .map(([name]) => name);\n\n logDebug(`Component initialized: ${component}`, {\n newStatus,\n allComponentsReady: checkAllComponentsInitialized(newStatus),\n missingComponents\n });\n\n // Check if all required components are initialized\n if (checkAllComponentsInitialized(newStatus)) {\n logDebug('All components initialized, setting isInitialized=true');\n setIsInitialized(true);\n }\n\n return newStatus;\n });\n }, [checkAllComponentsInitialized, logDebug]);\n\n // Track initialization to prevent re-initialization on hot reload\n const initializationStartedRef = useRef(false);\n\n // Track if initialization has already failed to prevent retry loops\n const initializationFailedRef = useRef(false);\n\n // Holds the single browser router instance (created once, after the bootstrap\n // gate below). Declared here at the top so the hook call is unconditional —\n // the actual creation happens past the `!applicationServices` early return,\n // where it must NOT be a hook. See the create-once comment at the router site.\n const routerRef = useRef<ReturnType<typeof createBrowserRouter> | null>(null);\n\n const startupAppName = useMemo(\n () => {\n const candidate = options.env.VITE_APP_NAME?.trim();\n return candidate && candidate.length > 0 ? candidate : 'Application';\n },\n [options.env],\n );\n const formattedInitError = useMemo(\n () => initError ? formatInitializationError(initError, startupAppName) : null,\n [initError, startupAppName],\n );\n\n useEffect(() => {\n logDebug('useEffect triggered', {\n initializationStartedRef: initializationStartedRef.current,\n initializationFailedRef: initializationFailedRef.current,\n hasApplicationServices: !!applicationServices,\n isInitialized,\n currentInitializationStatus: initializationStatus\n });\n\n // If services exist but initialization status wasn't set, restore it\n // This happens on hot reload when the component remounts but services are already initialized\n if (applicationServices && !isInitialized) {\n logDebug('Services exist but not initialized, restoring core components');\n markComponentInitialized(MainContextInitComponents.MAIN_CONTEXT);\n markComponentInitialized(MainContextInitComponents.LOADER);\n markComponentInitialized(MainContextInitComponents.ERRORS);\n markComponentInitialized(MainContextInitComponents.ROUTER);\n\n // On hot reload: Mark container components as initialized\n // They will mark themselves when rendered, but we need to allow rendering to proceed\n // This is safe because markComponentInitialized is idempotent and components will\n // call it again when they render, ensuring the status stays correct\n markComponentInitialized(MainContextInitComponents.APP_MAIN_CONTAINER);\n markComponentInitialized(MainContextInitComponents.PUBLIC_APP_CONTAINER);\n\n logDebug('Marked container components for hot reload (they will re-mark themselves when rendered)');\n return;\n }\n\n // Prevent re-initialization if already started or failed\n if (initializationStartedRef.current || initializationFailedRef.current) {\n logDebug('Skipping initialization (already started/failed)');\n\n // If already failed, don't retry automatically\n if (initializationFailedRef.current && !initError) {\n setInitError('Initialization previously failed. Click Retry to try again.');\n }\n return;\n }\n\n\n const initializeApp = async () => {\n // Mark initialization as started immediately\n initializationStartedRef.current = true;\n try {\n // Initialize global error handlers (must be done early)\n ErrorManagementService.initializeGlobalErrorHandlers();\n\n // Inject env vars from the consuming app (required for pre-compiled libraries). On an organization's custom\n // domain (#2974) the API is served on the page's own host, so every client reading the loader calls it there.\n envLoader.injectEnvironmentVariables(withPageApiBaseUrl(options.env, window.location));\n\n const envConfig = envLoader.loadEnvironmentConfig();\n\n const finalConfig: InitializationApplicationConfig = {\n apiBaseUrl: options.apiBaseUrl ?? envConfig.apiBaseUrl,\n };\n\n setConfig(finalConfig);\n\n const services = await startApplicationService.initializeApplication({\n config: finalConfig,\n autoAuth: false,\n frontendProviderModules: options.frontendProviderModules,\n customShared_ResourcesConfigurationsFactoryMap: options.customShared_ResourcesConfigurationsFactoryMap,\n customShared_ResourceFieldIdentifier: options.customShared_ResourceFieldIdentifier,\n customShared_ResourcesRelationships: options.customShared_ResourcesRelationships,\n excludedResourceTypes: options.excludedResourceTypes,\n resourceUIBehavior: options.resourceUIBehavior,\n notificationBadgeDefinitions: options.notificationBadgeDefinitions,\n baseFrontendConfig: options.baseFrontendConfig,\n frontendConfigOverrides: options.frontendConfigOverrides,\n featureConfiguration: mergedFeatureConfiguration,\n componentLoader: async () => {\n await options.componentLoader();\n // Keep the strict host gate inside the component-registration\n // startup phase. A missing shell preset therefore prevents the\n // service's success callback as well as every React child mount.\n ComponentRegistryService.assertRequiredRegistrations(\n 'SaaS application',\n SAAS_APPLICATION_REQUIRED_COMPONENTS,\n );\n },\n onInitialized: () => {\n logDebug('Application initialized successfully');\n },\n onError: (error: Error) => {\n logger.error('Application initialization failed', { error: error.message, details: error });\n setInitError(error);\n }\n });\n\n // The startup service has a legitimate already-initialized fast path\n // that does not call the loader again. Re-assert before publishing its\n // services so HMR/remount paths retain the same fail-closed guarantee.\n ComponentRegistryService.assertRequiredRegistrations(\n 'SaaS application',\n SAAS_APPLICATION_REQUIRED_COMPONENTS,\n );\n\n setApplicationServices(services);\n\n // Mark main context and core components as initialized\n markComponentInitialized(MainContextInitComponents.MAIN_CONTEXT);\n markComponentInitialized(MainContextInitComponents.LOADER);\n markComponentInitialized(MainContextInitComponents.ERRORS);\n markComponentInitialized(MainContextInitComponents.ROUTER);\n // Note: I18N will be marked as initialized by I18nProvider when translations are loaded\n // TODO: PUBLIC_APP_CONTAINER will be marked by its component when created\n\n // In cases where the underlying service was already initialized\n // (e.g., HMR/StrictMode), the onInitialized callback may not fire.\n // Note: Don't set isInitialized here anymore - wait for all components\n\n } catch (error) {\n // Mark as failed to prevent retry loops\n initializationFailedRef.current = true;\n\n const errorMessage = error instanceof Error ? error.message : 'Unknown initialization error';\n setInitError(error);\n logger.error('Application initialization failed', { error: errorMessage, details: error });\n }\n };\n\n initializeApp();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n // logDebug and logger are stable references, markComponentInitialized is memoized\n }, [options, applicationServices, isInitialized]);\n\n // Manual retry handler - resets failed state and reloads the page\n const handleManualRetry = useCallback(() => {\n // Reset the failed state before reloading to allow a fresh initialization attempt\n initializationFailedRef.current = false;\n initializationStartedRef.current = false;\n window.location.reload();\n }, []);\n\n // W7.3b: Detect one-off session entry at mount time.\n // When the tab opens on a one-off URL, AuthSessionProvider uses ephemeral (in-memory)\n // storage so the persistent session in other tabs is never touched.\n // The ref captures the initial URL — subsequent navigations within the same tab\n // (e.g., after the exchange redirects to home) do not change the storage strategy.\n // IMPORTANT: Must be above early returns to satisfy Rules of Hooks.\n const isOneOffSessionEntryRef = useRef(\n window.location.pathname.startsWith('/one-off-session/')\n );\n const sessionTokenStorage = useMemo(\n () => isOneOffSessionEntryRef.current ? new EphemeralSessionTokenStorage() : undefined,\n []\n );\n\n // Handle initialization error - early return before any providers (plain Tailwind, no useUI)\n if (initError && formattedInitError) {\n // OUTSIDE DEVELOPMENT a person gets a generic screen and a retry, and nothing derived from the failure:\n // no error-derived headline, no configuration issues, no context rows, no diagnostics JSON, no stack.\n // The full diagnostics are already in the logger (see the initialization catch above), which is where\n // OWASP's Error Handling guidance puts them. The card below stays for developers (#1181).\n //\n // The mode is read WITHOUT loading the configuration (`readEnvironmentMode`, not `isDevelopment`): a\n // missing or invalid `VITE_*` variable is one of the failures this very branch exists to report, and\n // `isDevelopment()` would re-throw it mid-render — there is no error boundary above this provider, so\n // the failure screen would become a blank page.\n //\n // The predicate is `=== 'development'` rather than `!isProduction()`, deliberately: `staging` and\n // `test` are hosts that real people reach, and OWASP's guidance is about who is LOOKING, not about how\n // the deployment is labelled. Only a developer's own machine gets the diagnostics. An unestablished\n // mode falls on the same side — unknown is not development.\n if (envLoader.readEnvironmentMode() !== 'development') {\n return <StartupFailureScreen onRetry={handleManualRetry} />;\n }\n\n return (\n <div className=\"min-h-screen w-screen bg-background px-6 py-10 md:px-10\">\n <div className=\"mx-auto flex min-h-[calc(100vh-5rem)] max-w-5xl items-center justify-center\">\n <div\n role=\"alert\"\n className=\"w-full overflow-hidden rounded-2xl border border-border bg-card shadow-sm\"\n >\n <div className=\"border-b border-border bg-muted/40 px-6 py-5 md:px-8\">\n <div className=\"flex items-start gap-4\">\n <div className=\"flex h-12 w-12 shrink-0 items-center justify-center rounded-full bg-destructive/12 text-xl text-destructive\">\n !\n </div>\n <div className=\"min-w-0\">\n <p className=\"text-sm font-medium uppercase tracking-wide text-destructive\">\n Initialization failed\n </p>\n <h1 className=\"mt-1 text-2xl font-semibold text-foreground\">\n {formattedInitError.title}\n </h1>\n <p className=\"mt-2 max-w-3xl text-sm leading-6 text-muted-foreground\">\n {formattedInitError.description}\n </p>\n </div>\n </div>\n </div>\n\n <div className=\"space-y-6 px-6 py-6 md:px-8\">\n {formattedInitError.contextRows.length > 0 ? (\n <div className=\"grid gap-3 md:grid-cols-2 xl:grid-cols-3\">\n {formattedInitError.contextRows.map((row) => (\n <div\n key={`${row.label}:${row.value}`}\n className=\"rounded-xl border border-border bg-muted/20 px-4 py-3\"\n >\n <p className=\"text-[11px] font-medium uppercase tracking-wide text-muted-foreground\">\n {row.label}\n </p>\n <p className=\"mt-1 break-all font-mono text-xs leading-5 text-foreground\">\n {row.value}\n </p>\n </div>\n ))}\n </div>\n ) : null}\n\n {formattedInitError.highlights.length > 0 ? (\n <div className=\"space-y-3\">\n <h2 className=\"text-sm font-semibold text-foreground\">\n What needs attention\n </h2>\n <div className=\"grid gap-2\">\n {formattedInitError.highlights.map((highlight) => (\n <div\n key={highlight}\n className=\"rounded-lg border border-border bg-muted/30 px-3 py-2 font-mono text-xs leading-5 text-foreground\"\n >\n {highlight}\n </div>\n ))}\n </div>\n {formattedInitError.remainingIssueCount > 0 ? (\n <p className=\"text-xs text-muted-foreground\">\n And {formattedInitError.remainingIssueCount} more issue{formattedInitError.remainingIssueCount === 1 ? '' : 's'} in the technical details below.\n </p>\n ) : null}\n </div>\n ) : null}\n\n <div className=\"rounded-xl border border-border bg-muted/20 p-4\">\n <p className=\"text-sm text-muted-foreground\">\n The application will not automatically retry. Fix the underlying issue, then reload the app to start a fresh initialization attempt.\n </p>\n <div className=\"mt-4 flex flex-wrap gap-3\">\n <button\n onClick={handleManualRetry}\n className=\"inline-flex items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-opacity hover:opacity-90\"\n >\n Retry initialization\n </button>\n </div>\n </div>\n\n <details className=\"group rounded-xl border border-border bg-background\">\n <summary className=\"cursor-pointer list-none px-4 py-3 text-sm font-medium text-foreground\">\n <span className=\"group-open:hidden\">Show technical details</span>\n <span className=\"hidden group-open:inline\">Hide technical details</span>\n </summary>\n <div className=\"border-t border-border px-4 py-4\">\n <pre className=\"max-h-80 overflow-auto whitespace-pre-wrap break-words rounded-lg bg-muted/30 p-4 font-mono text-xs leading-5 text-foreground\">\n {formattedInitError.technicalDetails}\n </pre>\n </div>\n </details>\n </div>\n </div>\n </div>\n </div>\n );\n }\n\n // Handle bootstrap loading before the provider tree can safely mount.\n // Once services/config exist, render the full tree so UIProvider and the shell\n // containers can complete their own initialization work and report readiness.\n if (!applicationServices || !config) {\n const missingComponents = Object.entries(initializationStatus)\n .filter(([_, isInit]) => !isInit)\n .map(([name]) => name);\n\n logDebug('Still loading', {\n isInitialized,\n hasApplicationServices: !!applicationServices,\n hasConfig: !!config,\n initializationStatus,\n missingComponents\n });\n\n // Pre-bootstrap loader (config/services not ready yet). Intentionally the\n // SAME minimal presentation as the Tier-1 `AppLoadingGate` \"simple loading\"\n // overlay — a centered, recipe-coloured `LoadingSpinner` on `bg-background`,\n // with no card chrome / circular badge / forced `text-primary`. The earlier\n // bespoke card duplicated the spinner SVG and hardcoded the primary colour,\n // so the very first paint looked unlike every subsequent loading state.\n return (\n <div className=\"flex min-h-screen w-screen items-center justify-center bg-background\">\n <LoadingSpinner size={48} />\n </div>\n );\n }\n\n // Route element - contains providers specific to the main app content\n // NavigationProvider must be inside RouterProvider (needs useNavigate) but wraps content\n // Note: ResourceRegistryProvider is moved outside router to wrap WebSocketEventBridge\n // AuthSessionProvider manages auth/session/WebSocket, AppScopeProvider owns primary/custom scope,\n // and UserOrgsProvider consumes AppScope for its org-facing facade APIs.\n // GlobalErrorHandler subscribes to ERROR_OCCURED events and handles auth errors (logout)\n const routeElement = (\n <ErrorBoundary>\n <LoadingProvider>\n <AppLoadingGate>\n <AnonymousSessionProvider>\n <AuthSessionProvider tokenStorage={sessionTokenStorage}>\n {/* GlobalErrorHandler must be inside AuthSessionProvider to access logout */}\n <GlobalErrorHandler />\n <StepUpAuthProvider>\n {/* AppScopeProvider manages primary + custom scope state */}\n <AppScopeProvider>\n {/* Cache coverage must observe the same organization scope as the routed application. */}\n <ResourceReadCacheBridge />\n {/* Remembered badge counts end where the user or organization changes, as cached reads do. */}\n <NotificationBadgeMemoryBoundary />\n <AnalyticsScopeBridge />\n <ApplicationRoleTablesProvider customRoles={options.customRoles}>\n <UserOrgsProvider>\n {/* AppModeProvider manages active mode — inside scope, wraps billing */}\n <AppModeProvider>\n <BillingProvider productDefinitions={options.productDefinitions}>\n <BillingErrorNotifier />\n <FeaturesProvider featureConfiguration={mergedFeatureConfiguration}>\n <OrganizationBrandingPublisher />\n <ScopedResourceRegistryProvider>\n <GuidanceContextProvider>\n <FlowsActorsProvider>\n <NavigationProvider>\n {/* DefaultHotkeyHandler registers application-level keyboard shortcuts */}\n <DefaultHotkeyHandler />\n <HotkeyShortcutsHelpDialog />\n <AppRouter />\n </NavigationProvider>\n </FlowsActorsProvider>\n </GuidanceContextProvider>\n </ScopedResourceRegistryProvider>\n </FeaturesProvider>\n </BillingProvider>\n </AppModeProvider>\n </UserOrgsProvider>\n </ApplicationRoleTablesProvider>\n </AppScopeProvider>\n </StepUpAuthProvider>\n </AuthSessionProvider>\n </AnonymousSessionProvider>\n </AppLoadingGate>\n </LoadingProvider>\n </ErrorBoundary>\n );\n\n // Create the router exactly ONCE, then reuse it across re-renders.\n //\n // `createBrowserRouter` must never run in render: a fresh router instance makes\n // `RouterProvider` remount the ENTIRE route tree (every provider below,\n // including `NavigationProvider`), discarding their state. During bootstrap\n // `ApplicationMainProvider` re-renders several times (services set, config set,\n // primary scope resolving async on deep-link), so an in-render router recreated\n // the whole tree each wave — wiping navigation/overlay state established from\n // the URL. That is why a cold deep-link to an overlay-reconstructed surface\n // (e.g. `/settings`) lost its overlay while in-session navigation (no further\n // re-renders) kept it. This code path is reached only after the\n // `!applicationServices || !config` gate above, and `routeElement`'s only props\n // (`sessionTokenStorage`, `options.productDefinitions`, `mergedFeatureConfiguration`)\n // are all stable post-init, so capturing the route element once is correct.\n // `routerRef` is declared at the top of the component (unconditional hook);\n // here we only populate it, which is safe after the bootstrap early-return.\n if (routerRef.current === null) {\n // React Router 7 made every v6 `future.v7_*` flag (relative splat paths, fetcher persistence,\n // upper-case form methods, partial hydration, no revalidation after an action error) its fixed\n // behaviour, so the router takes no future flags: this app opted into all five while on v6.\n routerRef.current = createBrowserRouter([\n { path: '/*', element: routeElement, errorElement: <RouterErrorBoundary /> }\n ]);\n }\n const router = routerRef.current;\n\n // Wrap RouterProvider with providers that both route element and error boundary need.\n // This ensures RouterErrorBoundary has access to I18nProvider, IconRegistryProvider, etc.\n // ResourceRegistryProvider must wrap WebSocketEventBridge since it uses useResourceRegistry()\n return (\n <EventBusProvider>\n <WebSocketProvider>\n <ApplicationContext.Provider value={{\n appConfig: applicationServices.appConfigFromBackend,\n appIdentity: applicationServices.appConfigFromBackend.appIdentity,\n appPreferences: applicationServices.appConfigFromBackend.appPreferences,\n runtime: applicationServices.appConfigFromBackend.runtime,\n auth: applicationServices.appConfigFromBackend.auth,\n compliance: applicationServices.appConfigFromBackend.compliance,\n frontendConfiguration: applicationServices.frontendConfiguration,\n logger: applicationServices.logger,\n httpClient: applicationServices.httpClient,\n frontendProviderRegistry: applicationServices.frontendProviderRegistry,\n providerComponentRegistry: applicationServices.providerComponentRegistry,\n ...(options.shellCompanions ? { shellCompanions: options.shellCompanions } : {}),\n isInitialized: isInitialized,\n version: applicationServices.appConfigFromBackend.appIdentity?.version ?? '1.0.0',\n initializationStatus,\n markComponentInitialized\n }}>\n <SaaSUIRuntimeProvider>\n <ErrorProvider>\n <I18nProvider>\n <NotificationProvider>\n <HotkeyRegistryProvider>\n <ResourceRegistryProvider resourcesRepository={applicationServices.resourceRepository}>\n {/*\n AnalyticsContextProvider sits BELOW ResourceRegistryProvider, deliberately, and a\n pin in `ApplicationMainProvider.composition-characterization` holds it there.\n\n The provider fetches the achieved value moments only where this consumer can REACH\n the progression store — `useResourceReachability(USER_PROGRESSION_STATE)`, the #268\n rule #1069 applied here. That hook reads the registry from context, and an ABSENT\n registry is read as ignorance (fetch), so that tests mounting the provider alone keep\n working. Mounted above the registry, the provider could only ever see \"absent\": the\n gate #1069 added was inert by construction, its pin passed because the pin mounted a\n registry the shell never did, and every consumer whose registry excludes the store —\n the application-creation workbench, served by the companion — kept fetching a route\n it does not serve, 404 and a \"no record\" toast on every load (measured 2026-09-21).\n\n Nothing between the two providers consumes analytics: `useAnalytics` is reached only\n from `useFeatureAvailability` and `AnalyticsEventBridge`, both under the router.\n */}\n {/*\n The consent-based provider phase (#1704) wraps analytics: it starts a vendor that rests\n on a consent purpose once the signed-in person grants it, stops it on withdrawal or\n sign-out, and publishes what is running — which is what AnalyticsContext dispatches to.\n */}\n <ConsentBasedProviderSdksProvider>\n <AnalyticsContextProvider>\n {/*\n IconRegistryBridge sits BELOW ResourceRegistryProvider + UIProvider\n so it can compute `customRegistry` from `useResourceRegistry()` +\n `useUI()` and pass it to the inner `IconRegistryProvider`. This\n replaces the prior pattern where `resources-repository` mutated\n `CoreIconRegistry` as a side effect — fragile because the mutation\n had to land BEFORE the `IconRegistryProvider` snapshot, which\n wasn't guaranteed when the provider sat above the registry. See\n IconRegistryBridge.tsx for the data-flow rationale.\n */}\n <IconRegistryBridge>\n <RMMRegistryProvider apiBaseUrl={config.apiBaseUrl}>\n <WebSocketEventBridge />\n <RMMWebSocketBridge />\n {/*\n Debounced connectivity notifier: surfaces AT MOST ONE\n persistent, self-dismissing toast per outage (after a\n 3s grace), replacing the former per-reconnection-attempt\n error toasts. Headless; must sit under WebSocket/I18n/\n Notification providers (all above) and beside <Toaster/>.\n */}\n <ConnectionStatusNotifier />\n <AppCelebrationOverlay />\n {/*\n Global toast host. `NotificationProvider` (above) calls\n `toast.*()` (Sonner) for every resource/custom notification —\n success, error, warning, info — per NOTIFICATION_DISPLAY_POLICY.\n Sonner's `toast()` is a module-level singleton that no-ops\n unless a `<Toaster>` is mounted in the DOM. Without this mount,\n EVERY toast app-wide was silently dropped — most visibly, form\n submission failures showed no error at all. It sits beside\n `AppCelebrationOverlay` (the other root-level feedback surface),\n inside `UIProvider` for theming. Its portal renders at\n `z-(--z-transient)` (=`--z-toast`, 500), above modal/overlay\n surfaces, so toasts raised from inside a dialog stay visible.\n */}\n <Toaster />\n <RouterProvider router={router} />\n </RMMRegistryProvider>\n </IconRegistryBridge>\n </AnalyticsContextProvider>\n </ConsentBasedProviderSdksProvider>\n </ResourceRegistryProvider>\n </HotkeyRegistryProvider>\n </NotificationProvider>\n </I18nProvider>\n </ErrorProvider>\n </SaaSUIRuntimeProvider>\n </ApplicationContext.Provider>\n </WebSocketProvider>\n </EventBusProvider>\n );\n}\n\n// useApplication hook is now in separate file: ./useApplication.ts\n// This separation is required for React Fast Refresh compatibility\n"]}
1
+ {"version":3,"file":"ApplicationMainContext.js","sourceRoot":"","sources":["../../../../src/core/runtime/ApplicationMainContext.tsx"],"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AAc,IAAC,MAAM,EAAE,MAAM,GAAI,IACd,GACH,GACE,GACQ,GACV,GACJ,GACJ,GACV,GACD,GACM,GACI,GACZ,GACH,CACpB,CAAC;AACJ,CAAC","sourcesContent":["import { withPageApiBaseUrl } from '~wildo-frontend-lib/core/runtime/page-api-base-url.frontend';\nimport { ComponentPresetDefinitionType, CorePresetNames, FrontendComponentType } from '@wildo-ai/presets-components-models';\nimport {\n AppConfiguration_Shared,\n AppConfiguration_Shared_Auth,\n AppConfiguration_Shared_Compliance,\n AppConfiguration_Shared_AppIdentity,\n AppConfiguration_Shared_AppPreferencesLanguage,\n AppConfiguration_Shared_Runtime,\n AppFrontendSurface,\n ResourceConfiguration_InitializationFactory,\n ResourceRelationship,\n mergeFeatureConfigurations,\n SIGNING_RETURN_PAGE_PATH,\n type CustomFeatureConfigurationInput,\n type NotificationBadgeDefinition,\n type RolesConfiguration,\n type UserPreferences,\n} from '@wildo-ai/saas-models';\nimport type { AppConfiguration_Frontend } from '~wildo-frontend-lib/core/config/app-configuration-frontend.schemas';\nimport React, { useCallback, useEffect, useState, useRef, useMemo } from 'react';\nimport { createBrowserRouter } from 'react-router';\n// The DOM `RouterProvider` wires `react-dom`'s `flushSync` in; React Router 7 publishes it from the `/dom` subpath.\n// It is rendered WITHOUT `useTransitions`: left undefined, every router state update is wrapped in\n// `React.startTransition`, which is what v6's `future.v7_startTransition` did and what\n// `useSynchronousBrowserLocation` is written against.\nimport { RouterProvider } from 'react-router/dom';\nimport { ErrorBoundary } from '~wildo-frontend-lib/core/errors/ErrorBoundary';\nimport { ErrorProvider } from '~wildo-frontend-lib/core/errors/ErrorContext';\nimport { RouterErrorBoundary } from '~wildo-frontend-lib/core/errors/RouterErrorBoundary';\nimport { ErrorManagementService } from '~wildo-frontend-lib/core/errors/error-management.frontend.service';\nimport { I18nProvider } from '~wildo-frontend-lib/core/i18n/I18nContext';\nimport { LoadingProvider } from '~wildo-frontend-lib/core/loading/LoadingContext';\nimport { AppLoadingGate } from '~wildo-frontend-lib/core/loading/AppLoadingGate';\nimport { LoggerFrontendService } from '~wildo-frontend-lib/core/monitoring/logger.frontend.service';\nimport { WildoBackendHttpClient } from '~wildo-frontend-lib/core/requests/wildo-http-client.frontend.service';\nimport { ResourceRegistryProvider } from '~wildo-frontend-lib/core/resources/ResourceRegistryContext';\nimport { AuthSessionProvider } from '~wildo-frontend-lib/core/security/AuthSessionContext';\nimport { AnonymousSessionProvider } from '~wildo-frontend-lib/core/security/AnonymousSessionContext';\nimport { StepUpAuthProvider } from '~wildo-frontend-lib/core/security/StepUpAuthContext';\nimport { ApplicationRoleTablesProvider } from '~wildo-frontend-lib/core/security/ApplicationRoleTablesContext';\nimport { UserOrgsProvider } from '~wildo-frontend-lib/core/security/UserOrgsContext';\nimport { GlobalErrorHandler } from '~wildo-frontend-lib/core/errors/GlobalErrorHandler';\nimport { PlanRefusalPrompt } from '~wildo-frontend-lib/core/features/PlanRefusalPrompt';\nimport { AppRouter } from './AppRouter';\nimport { IdentityPortalRouter } from './IdentityPortalRouter';\nimport { StartupFailureScreen } from './StartupFailureScreen';\nimport { UIProvider } from '~wildo-frontend-lib/core/ui/UIContext';\nimport { envLoader } from '~wildo-frontend-lib/core/runtime/env-variable-loader.frontend.service';\nimport { InitializationStatus, MainContextInitComponents } from './runtime.frontend.schemas';\nimport { ApplicationServices, startApplicationService } from './start-application.frontend.service';\nimport type { GeneratedAppProviderModules } from '@wildo-ai/external-connectors-public/app';\n\nimport { EventBusProvider } from '~wildo-frontend-lib/core/events/EventBusContext';\nimport { NotificationProvider } from '~wildo-frontend-lib/core/events/NotificationContext';\nimport { AppCelebrationOverlay } from '~wildo-frontend-lib/components/feedback/celebration-overlay';\nimport { Toaster } from '~wildo-frontend-lib/components/feedback/toast';\nimport { IconRegistryBridge } from '~wildo-frontend-lib/core/icons/IconRegistryBridge';\nimport { NavigationProvider } from '~wildo-frontend-lib/core/navigation/NavigationContext';\nimport { FlowsActorsProvider } from '~wildo-frontend-lib/core/flows-actors/FlowsActorsContext';\nimport { WebSocketProvider } from '~wildo-frontend-lib/core/requests/websockets/WebSocketContext';\nimport type { FrontendConfigOverrides } from './app-config-overrides.frontend.definitions';\nimport type { ResourceUIBehavior } from '~wildo-frontend-lib/core/resources/resources.frontend.schemas';\nimport { WebSocketEventBridge } from '~wildo-frontend-lib/core/requests/websockets/WebSocketEventBridge';\nimport { ConnectionStatusNotifier } from '~wildo-frontend-lib/core/requests/websockets/ConnectionStatusNotifier';\nimport { RMMWebSocketBridge } from '~wildo-frontend-lib/core/resources/rmm/RMMWebSocketBridge';\nimport { AnalyticsScopeBridge } from '~wildo-frontend-lib/core/monitoring/analytics/AnalyticsScopeBridge';\nimport { ResourceReadCacheBridge } from '~wildo-frontend-lib/core/resources/ResourceReadCacheBridge';\nimport { NotificationBadgeMemoryBoundary } from '~wildo-frontend-lib/core/requests/websockets/useNotificationBadges';\nimport { HotkeyRegistryProvider } from '~wildo-frontend-lib/core/hotkey/HotkeyRegistryContext';\nimport { DefaultHotkeyHandler } from '~wildo-frontend-lib/core/hotkey/DefaultHotkeyHandler';\nimport { HotkeyShortcutsHelpDialog } from '~wildo-frontend-lib/core/hotkey/HotkeyShortcutsHelpDialog';\nimport { AppScopeProvider } from '~wildo-frontend-lib/core/scope/AppScopeContext';\nimport { AppModeProvider } from '~wildo-frontend-lib/core/mode/AppModeContext';\nimport { ScopedResourceRegistryProvider } from '~wildo-frontend-lib/core/resources/ScopedResourceRegistryProvider';\nimport { AnalyticsContextProvider } from '~wildo-frontend-lib/core/monitoring/analytics/AnalyticsContext';\nimport { ConsentBasedProviderSdksProvider } from '~wildo-frontend-lib/core/external-providers/ConsentBasedProviderSdks';\nimport { BillingProvider } from '~wildo-frontend-lib/core/billing/BillingContext';\nimport { BillingErrorNotifier } from '~wildo-frontend-lib/core/billing/BillingErrorNotifier';\nimport { FeaturesProvider } from '~wildo-frontend-lib/core/features/FeaturesContext';\nimport { OrganizationBrandingPublisher } from '~wildo-frontend-lib/core/branding/OrganizationBrandingPublisher';\nimport { GuidanceContextProvider } from '~wildo-frontend-lib/core/guidance/GuidanceContext';\nimport { EphemeralSessionTokenStorage } from '~wildo-frontend-lib/core/security/session-token-storage.frontend.service';\nimport { RMMRegistryProvider } from '~wildo-frontend-lib/core/resources/rmm/RMMRegistryContext';\nimport { LoadingSpinner } from '~wildo-frontend-lib/components/feedback/loading-spinner';\nimport { ApplicationContext } from './ApplicationContext.shared';\nimport { ComponentRegistryService } from '~wildo-frontend-lib/core/components-registry/component-registry.frontend.service';\nimport type { ComponentRegistrationRequirement } from '~wildo-frontend-lib/core/components-registry/component-registry.frontend.schemas';\nimport { useApplication } from '~wildo-frontend-lib/core/runtime/useApplication';\nimport { useEventBus } from '~wildo-frontend-lib/core/events/useEventBus';\nimport { FrontendEvents, type FrontendEventPayloads } from '~wildo-frontend-lib/core/events/events.frontend.schemas';\n\n\n/**\n * Application Main Context\n * Main provider that wraps all other providers and manages global application state\n */\n\n// Type for merged frontend component variant definitions\nexport type MergedFrontendComponentPresetDefinitions = {\n [K in FrontendComponentType]: ComponentPresetDefinitionType<K>[]\n};\n\nexport interface InitializationApplicationConfig {\n apiBaseUrl: string;\n}\n\nexport interface ApplicationMainProviderOptions {\n /** Browser provider CODE, joined with this service's bootstrap DATA during startup. */\n frontendProviderModules?: GeneratedAppProviderModules;\n apiBaseUrl?: string;\n /**\n * Environment variables from the consuming app.\n * Required because pre-compiled libraries don't have access to import.meta.env.\n * Pass import.meta.env from your app.\n */\n env: Record<string, string | undefined>;\n\n /**\n * Custom shared resources configuration factory map from custom-shared-lib.\n * Required for custom resources to be registered in the frontend ResourceRegistryContext.\n */\n customShared_ResourcesConfigurationsFactoryMap?: { [key: string]: ResourceConfiguration_InitializationFactory<any, any, any> };\n\n /**\n * Custom shared resource field identifiers from custom-shared-lib.\n */\n customShared_ResourceFieldIdentifier?: { [key: string]: string };\n\n /**\n * Custom shared resource relationships from custom-shared-lib.\n */\n customShared_ResourcesRelationships?: ResourceRelationship[];\n\n /**\n * Resource types to leave OUT of the registry, even though the core factory map declares them.\n *\n * Forwarded to `initializeResources`, which has always supported it. An APPLICATION normally passes\n * nothing — it wants the whole core vocabulary — so this exists for the other Wildo frontends: the\n * application-creation workbench observes an application's structure and must not register that\n * application's billing, subscription, milestone, user and organization resources.\n */\n excludedResourceTypes?: ReadonlySet<string>;\n\n /** Feature configuration from custom-shared-lib (merged with core + platform features at runtime) */\n featureConfiguration?: CustomFeatureConfigurationInput;\n\n /**\n * The application's declared custom roles (`sharedRegistry.customRoles`), so every frontend role check decides\n * against the same complete role tables the backend authorizes with (`ApplicationRoleTablesContext`).\n *\n * Required as a KEY, deliberately: with it the shell treats a role neither table knows as inert, as the backend\n * does, so an application that declared custom roles and forgot to pass them would silently hide from those roles'\n * holders the rows and actions they may use. `undefined` states that the application declares none (#2376 review).\n */\n customRoles: RolesConfiguration | undefined;\n\n /** Product catalog definitions from custom-shared-lib */\n productDefinitions?: import('@wildo-ai/saas-models').ProductDefinition[];\n\n /**\n * Final frontend resource configuration preset.\n *\n * Controls how each resource and its operations appear in the frontend:\n * labels, sections, views, empty state, guidance (resource-level) and\n * addressability, sidebar placement, layout presets (operation-level).\n *\n * Apps must pass one already-composed object. In Wonder Todos, the engine\n * module owns the framework base preset and layers any app-shell\n * overrides before the final aggregated module registry reaches startup.\n */\n resourceUIBehavior?: ResourceUIBehavior;\n\n /**\n * App-declared notification badge definitions (R8) — merged with the\n * framework's core definitions in the frontend registry so `NavigationItemBadge`\n * can resolve an app badge. Mirror the backend init config.\n */\n notificationBadgeDefinitions?: NotificationBadgeDefinition[];\n\n /**\n * SHELL COMPANIONS — components the signed-in shell mounts ONCE, for as long as it is on screen,\n * whatever page is open. They render nothing of their own; they exist for application-wide effects\n * that must live exactly as long as the shell does. The case that asked for it: a\n * `FRONTEND_PRODUCED` notification badge, whose producer (`usePublishNotificationBadgeCount`) must be\n * mounted wherever the navigation drawing the badge is, and the navigation is on every page.\n *\n * Mounted inside every provider and inside the consent and document-acceptance gates, so a companion\n * never reads before a person has agreed to what the application does. Not a place for UI: a\n * companion that renders visible content has no layout slot and will land wherever the gate puts it.\n */\n shellCompanions?: readonly React.ComponentType[];\n\n /**\n * Base frontend configuration — provided by the app via the preset layer.\n * No implicit framework defaults: apps must explicitly provide this.\n */\n baseFrontendConfig: AppConfiguration_Frontend;\n\n /** Per-section frontend config overrides (factories or partial values) */\n frontendConfigOverrides?: FrontendConfigOverrides;\n\n /** Component loader — required. Called during app init to register component presets. */\n componentLoader: () => Promise<void>;\n\n /** @wildo_source:part:start saas.frontend.runtime.application-surface facet:layer:frontend facet:audience:app-developer */\n /**\n * What this frontend is FOR: the application's product (the default), or its identity portal, the surface of an\n * application whose product is not a browser application (`AppFrontendSurface.IDENTITY_PORTAL`).\n *\n * One runtime serves both, with the same providers. The portal mounts the public identity routes the product mounts\n * and three signed-in pages (home, the decision inbox, account security) under a slim shell, and nothing of the\n * product: no resource, view or settings-hub route, and no product shell. It requires the portal's shell preset\n * (`APP_LAYOUTS_IDENTITY_PORTAL_CONTAINER`) in place of the product's (`APP_LAYOUTS_MAIN_CONTAINER`).\n *\n * Passed in the portal member's `modules-registry.frontend.ts`, on the options of `ApplicationMainProvider` from\n * `@wildo-ai/saas-frontend-lib`; `AppFrontendSurface` comes from `@wildo-ai/saas-models`.\n */\n surface?: AppFrontendSurface;\n /** @wildo_source:part:end saas.frontend.runtime.application-surface */\n}\n\nexport interface ApplicationMainProviderProps {\n // children: ReactNode;\n options: ApplicationMainProviderOptions;\n}\n\n/**\n * Exact preset dependencies of the two mutually exclusive shell roots of each surface: the signed-in shell (the\n * product's, or the identity portal's) and the public one both surfaces share. The full framework completeness audit\n * remains a separate developer tool; startup needs only the components that this composition unconditionally delegates\n * its root layout to. A portal therefore does not require the product shell, which it never renders.\n */\nconst REQUIRED_COMPONENTS_BY_SURFACE: Readonly<Record<AppFrontendSurface, readonly ComponentRegistrationRequirement[]>> = {\n [AppFrontendSurface.PRODUCT]: [\n { componentType: FrontendComponentType.APP_LAYOUTS_MAIN_CONTAINER, preset: CorePresetNames.DEFAULT },\n { componentType: FrontendComponentType.PUBLIC_LAYOUTS_MAIN_CONTAINER, preset: CorePresetNames.DEFAULT },\n ],\n [AppFrontendSurface.IDENTITY_PORTAL]: [\n { componentType: FrontendComponentType.APP_LAYOUTS_IDENTITY_PORTAL_CONTAINER, preset: CorePresetNames.DEFAULT },\n { componentType: FrontendComponentType.PUBLIC_LAYOUTS_MAIN_CONTAINER, preset: CorePresetNames.DEFAULT },\n ],\n};\n\n/** The name a missing shell preset is reported under, per surface. */\nconst SURFACE_HOST_NAMES: Readonly<Record<AppFrontendSurface, string>> = {\n [AppFrontendSurface.PRODUCT]: 'SaaS application',\n [AppFrontendSurface.IDENTITY_PORTAL]: 'Identity portal',\n};\n\n/** The signed-in shell whose readiness the initialization gate waits on, per surface; the public shell is shared. */\nconst SIGNED_IN_CONTAINER_BY_SURFACE: Readonly<Record<AppFrontendSurface, MainContextInitComponents>> = {\n [AppFrontendSurface.PRODUCT]: MainContextInitComponents.APP_MAIN_CONTAINER,\n [AppFrontendSurface.IDENTITY_PORTAL]: MainContextInitComponents.IDENTITY_PORTAL_CONTAINER,\n};\n\n/** Translate SaaS application/event contexts into the focused UI runtime binding. */\nfunction SaaSUIRuntimeProvider({ children }: { children: React.ReactNode }): React.ReactElement {\n const { frontendConfiguration, markComponentInitialized } = useApplication();\n const { on } = useEventBus();\n const subscribeToUserPreferences = useCallback(\n (listener: (preferences: UserPreferences['ui'] | null) => void): (() => void) =>\n on(FrontendEvents.USER_PREFERENCES_CHANGED, (payload: FrontendEventPayloads[FrontendEvents.USER_PREFERENCES_CHANGED]) => {\n /*\n * A payload WITHOUT the key is no news about UI preferences, and must not clear them. The event\n * carries independent fields, each present only when its sender has something to say: a member\n * whose preferences record has no `ui` block (`emitPreferencesChanged` then omits the key) used to\n * reach `UIProvider` as `null` and wipe what the person had set (found by #2242). `null` WITH the\n * key is the sign-out clearing and still clears. Same contract as `I18nContext`'s handler.\n */\n if (!Object.prototype.hasOwnProperty.call(payload, 'uiPreferences')) return;\n listener(payload.uiPreferences ?? null);\n }),\n [on],\n );\n // The current organization's branding in effect (#2306), published from inside the organization and feature contexts.\n const subscribeToOrganizationBranding = useCallback(\n (listener: (branding: { readonly primaryColor: string | null; readonly secondaryColor: string | null; readonly logoUrl: string | null; readonly productName: string | null }) => void): (() => void) =>\n on(FrontendEvents.ORGANIZATION_BRANDING_CHANGED, (payload: FrontendEventPayloads[FrontendEvents.ORGANIZATION_BRANDING_CHANGED]) => {\n listener({ primaryColor: payload.primaryColor ?? null, secondaryColor: payload.secondaryColor ?? null, logoUrl: payload.logoUrl ?? null, productName: payload.productName ?? null });\n }),\n [on],\n );\n const markInitialized = useCallback(\n (): void => markComponentInitialized(MainContextInitComponents.UI),\n [markComponentInitialized],\n );\n return (\n <UIProvider\n frontendConfiguration={frontendConfiguration}\n subscribeToUserPreferences={subscribeToUserPreferences}\n subscribeToOrganizationBranding={subscribeToOrganizationBranding}\n markInitialized={markInitialized}\n >\n {children}\n </UIProvider>\n );\n}\n\ninterface InitializationIssueLike {\n path?: unknown[];\n message?: string;\n}\n\ninterface InitializationUnresolvedForeignKeyLike {\n resourceType?: unknown;\n fieldName?: unknown;\n}\n\ninterface InitializationDiagnosticsLike {\n phase?: unknown;\n apiBaseUrl?: unknown;\n frontendServiceName?: unknown;\n errorName?: unknown;\n errorMessage?: unknown;\n stack?: unknown;\n causeMessage?: unknown;\n wildoError?: unknown;\n}\n\ninterface FormattedInitializationError {\n title: string;\n description: string;\n highlights: string[];\n technicalDetails: string;\n remainingIssueCount: number;\n contextRows: Array<{ label: string; value: string }>;\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null;\n}\n\nfunction formatUnknownValue(value: unknown): string {\n if (typeof value === 'string') {\n return value;\n }\n\n if (value instanceof Error) {\n return value.message;\n }\n\n if (value === undefined) {\n return 'undefined';\n }\n\n try {\n return JSON.stringify(value, null, 2);\n } catch {\n return String(value);\n }\n}\n\n/**\n * invented-display-text: the STARTUP-FAILURE screen, which renders because initialization did not\n * complete — so the label bundle is precisely what is not available. Every label beside this one is\n * a literal ('Application', 'Failed step', 'Frontend service') for the same reason, and this file\n * imports no `useI18n`. A diagnostic that needs the thing that failed is not a diagnostic.\n */\n// invented-display-text: startup-failure screen — see above.\nfunction titleCaseFromIdentifier(value: string): string {\n return value\n .split(/[\\s_-]+/)\n .filter(Boolean)\n .map((segment) => segment.charAt(0).toUpperCase() + segment.slice(1))\n .join(' ');\n}\n\nfunction formatInitializationPhase(phase: unknown): string | undefined {\n if (typeof phase !== 'string' || phase.trim().length === 0) {\n return undefined;\n }\n\n // invented-display-text: startup-failure screen — see `titleCaseFromIdentifier`.\n return titleCaseFromIdentifier(phase.trim());\n}\n\nfunction extractInitializationDiagnostics(rawError: unknown): InitializationDiagnosticsLike | undefined {\n if (!isRecord(rawError) || !isRecord(rawError.initializationDiagnostics)) {\n return undefined;\n }\n\n return rawError.initializationDiagnostics;\n}\n\nfunction extractWildoError(rawError: unknown, diagnostics?: InitializationDiagnosticsLike): Record<string, unknown> | undefined {\n if (diagnostics && isRecord(diagnostics.wildoError)) {\n return diagnostics.wildoError;\n }\n\n if (isRecord(rawError) && isRecord(rawError.wildoError)) {\n return rawError.wildoError;\n }\n\n return undefined;\n}\n\nfunction extractInitializationIssueArray(candidate: unknown): InitializationIssueLike[] | null {\n if (typeof candidate !== 'string') {\n return null;\n }\n\n try {\n const parsed = JSON.parse(candidate) as unknown;\n if (!Array.isArray(parsed)) {\n return null;\n }\n\n const issues = parsed.filter(\n (issue): issue is InitializationIssueLike =>\n typeof issue === 'object' && issue !== null,\n );\n\n return issues.length > 0 ? issues : null;\n } catch {\n return null;\n }\n}\n\nfunction extractPrimaryInitializationMessage(\n rawError: unknown,\n diagnostics?: InitializationDiagnosticsLike,\n wildoError?: Record<string, unknown>,\n): string {\n if (diagnostics && typeof diagnostics.errorMessage === 'string' && diagnostics.errorMessage.trim().length > 0) {\n return diagnostics.errorMessage;\n }\n\n if (wildoError && isRecord(wildoError.context) && typeof wildoError.context.message === 'string') {\n return wildoError.context.message;\n }\n\n if (rawError instanceof Error) {\n return rawError.message;\n }\n\n if (typeof rawError === 'string') {\n return rawError;\n }\n\n return formatUnknownValue(rawError);\n}\n\nfunction buildInitializationHighlights(wildoContext: Record<string, unknown> | undefined): string[] {\n if (!wildoContext) {\n return [];\n }\n\n const highlights: string[] = [];\n\n if (Array.isArray(wildoContext.unresolvedFKFields)) {\n for (const entry of wildoContext.unresolvedFKFields as InitializationUnresolvedForeignKeyLike[]) {\n const resourceType = typeof entry?.resourceType === 'string' ? entry.resourceType : 'unknown-resource';\n const fieldName = typeof entry?.fieldName === 'string' ? entry.fieldName : 'unknown-field';\n highlights.push(`${resourceType}.${fieldName}: foreign key cannot be resolved to a resource type`);\n }\n }\n\n if (typeof wildoContext.message === 'string') {\n const lines = wildoContext.message\n .split('\\n')\n .map((line) => line.trim())\n .filter((line) => line.length > 0 && !line.startsWith('[ResourcesRegistry]') && !line.startsWith('Fix:'));\n\n for (const line of lines) {\n if (line.startsWith('- ')) {\n highlights.push(line.slice(2));\n } else if (!highlights.includes(line)) {\n highlights.push(line);\n }\n }\n }\n\n const contextualEntries: Array<[string, unknown]> = [\n ['Resource type', wildoContext.resourceType],\n ['Foreign key field', wildoContext.foreignKeyField],\n ['Method', wildoContext.method],\n ['Existing type', wildoContext.existingType],\n ['New type', wildoContext.newType],\n ];\n\n for (const [label, value] of contextualEntries) {\n if (typeof value === 'string' && value.trim().length > 0) {\n highlights.push(`${label}: ${value}`);\n }\n }\n\n return Array.from(new Set(highlights)).slice(0, 6);\n}\n\nfunction buildInitializationContextRows(params: {\n diagnostics?: InitializationDiagnosticsLike;\n wildoError?: Record<string, unknown>;\n startupAppName: string;\n}): Array<{ label: string; value: string }> {\n const rows: Array<{ label: string; value: string }> = [\n { label: 'Application', value: params.startupAppName },\n ];\n\n const phase = formatInitializationPhase(params.diagnostics?.phase);\n if (phase) {\n rows.push({ label: 'Failed step', value: phase });\n }\n\n if (typeof params.diagnostics?.frontendServiceName === 'string' && params.diagnostics.frontendServiceName.trim().length > 0) {\n rows.push({ label: 'Frontend service', value: params.diagnostics.frontendServiceName });\n }\n\n if (typeof params.diagnostics?.apiBaseUrl === 'string' && params.diagnostics.apiBaseUrl.trim().length > 0) {\n rows.push({ label: 'API base URL', value: params.diagnostics.apiBaseUrl });\n }\n\n if (typeof params.wildoError?.customMessageReference === 'string' && params.wildoError.customMessageReference.trim().length > 0) {\n rows.push({ label: 'Error reference', value: params.wildoError.customMessageReference });\n }\n\n if (typeof params.wildoError?.type === 'string' && params.wildoError.type.trim().length > 0) {\n rows.push({ label: 'Error type', value: params.wildoError.type });\n }\n\n return rows;\n}\n\nfunction formatInitializationIssuePath(path: unknown[] | undefined): string {\n if (!path || path.length === 0) {\n return 'root';\n }\n\n return path\n .map((segment) => typeof segment === 'string' ? segment : String(segment))\n .join(' > ');\n}\n\nfunction formatInitializationError(rawError: unknown, startupAppName: string): FormattedInitializationError {\n const diagnostics = extractInitializationDiagnostics(rawError);\n const wildoError = extractWildoError(rawError, diagnostics);\n const primaryMessage = extractPrimaryInitializationMessage(rawError, diagnostics, wildoError);\n const issueArray = extractInitializationIssueArray(primaryMessage);\n const technicalDetails = formatUnknownValue(\n diagnostics ? {\n ...diagnostics,\n rawError: rawError instanceof Error ? {\n name: rawError.name,\n message: rawError.message,\n stack: rawError.stack,\n } : rawError,\n } : rawError,\n );\n\n if (issueArray) {\n const highlights = issueArray.slice(0, 6).map((issue) => {\n const location = formatInitializationIssuePath(issue.path);\n const message = issue.message ?? 'Invalid configuration value';\n return `${location}: ${message}`;\n });\n\n return {\n title: 'Application configuration is invalid',\n description: `Startup stopped because the frontend configuration failed validation in ${issueArray.length} place${issueArray.length === 1 ? '' : 's'}.`,\n highlights,\n technicalDetails: JSON.stringify(issueArray, null, 2),\n remainingIssueCount: Math.max(issueArray.length - highlights.length, 0),\n contextRows: buildInitializationContextRows({ diagnostics, wildoError, startupAppName }),\n };\n }\n\n const wildoContext = wildoError && isRecord(wildoError.context) ? wildoError.context : undefined;\n const highlights = buildInitializationHighlights(wildoContext);\n const phase = formatInitializationPhase(diagnostics?.phase);\n const shouldTreatAsConfigurationError = primaryMessage === 'configuration'\n || typeof wildoError?.customMessageReference === 'string' && wildoError.customMessageReference === 'configuration';\n\n const descriptionParts = [\n phase ? `Startup stopped during ${phase}.` : undefined,\n primaryMessage && primaryMessage !== 'configuration' ? primaryMessage : undefined,\n !primaryMessage || primaryMessage === 'configuration'\n ? 'Open the technical details to inspect the full startup diagnostics.'\n : undefined,\n ].filter((part): part is string => Boolean(part));\n\n return {\n title: shouldTreatAsConfigurationError ? 'Application configuration is invalid' : 'Application initialization failed',\n description: descriptionParts.join(' '),\n highlights,\n technicalDetails,\n remainingIssueCount: 0,\n contextRows: buildInitializationContextRows({ diagnostics, wildoError, startupAppName }),\n };\n}\n\n// ApplicationMainProvider component - exported directly for Fast Refresh compatibility\nexport function ApplicationMainProvider(props: ApplicationMainProviderProps): React.ReactElement {\n // Embedded signing: the vendor sends a signing frame back to this page once the person is done, and the frame that\n // loaded it only needs to see it arrive. The application must not boot inside that frame: a second instance would\n // restore the session, refresh its tokens (a rotated refresh token the parent then reuses revokes the session) and\n // open a WebSocket, all in a frame about to be removed. So the page renders nothing, before any provider mounts.\n if (window.location.pathname === SIGNING_RETURN_PAGE_PATH) return <></>;\n return <ApplicationMainProviderRoot {...props} />;\n}\n\nfunction ApplicationMainProviderRoot({\n // children,\n options,\n}: ApplicationMainProviderProps): React.ReactElement {\n const surface = options.surface ?? AppFrontendSurface.PRODUCT;\n const requiredComponents = REQUIRED_COMPONENTS_BY_SURFACE[surface];\n const hostName = SURFACE_HOST_NAMES[surface];\n const signedInContainer = SIGNED_IN_CONTAINER_BY_SURFACE[surface];\n const mergedFeatureConfiguration = useMemo(\n () => mergeFeatureConfigurations(options.featureConfiguration),\n [options.featureConfiguration]\n );\n\n const logger = useMemo(() => LoggerFrontendService.getLogger(), []);\n const logDebug = useMemo(() => {\n const debugFn = logger.debugByType('ApplicationMainContext');\n logger.setDebugTypeLogging('ApplicationMainContext', false); // Enable debug logging for initialization\n return debugFn;\n }, [logger]);\n\n const [isInitialized, setIsInitialized] = useState(false);\n const [initError, setInitError] = useState<unknown | null>(null);\n const [applicationServices, setApplicationServices] = useState<ApplicationServices | null>(null);\n const [config, setConfig] = useState<InitializationApplicationConfig | null>(null);\n const [initializationStatus, setInitializationStatus] = useState<InitializationStatus>({\n [MainContextInitComponents.MAIN_CONTEXT]: false,\n [MainContextInitComponents.UI]: false,\n [MainContextInitComponents.LOADER]: false,\n [MainContextInitComponents.ERRORS]: false,\n [MainContextInitComponents.ROUTER]: false,\n [MainContextInitComponents.I18N]: false,\n [MainContextInitComponents.APP_MAIN_CONTAINER]: false,\n [MainContextInitComponents.PUBLIC_APP_CONTAINER]: false,\n [MainContextInitComponents.IDENTITY_PORTAL_CONTAINER]: false,\n });\n\n\n const checkAllComponentsInitialized = useCallback((status: InitializationStatus): boolean => {\n // Required: main context, UI, and the surface's two root shell containers (its signed-in shell and the public one).\n return status[MainContextInitComponents.MAIN_CONTEXT] &&\n status[MainContextInitComponents.UI] &&\n status[signedInContainer] &&\n status[MainContextInitComponents.PUBLIC_APP_CONTAINER];\n }, [signedInContainer]);\n\n // Function to mark components as initialized\n const markComponentInitialized = useCallback((component: MainContextInitComponents) => {\n setInitializationStatus(prev => {\n const newStatus = { ...prev, [component]: true };\n\n // Debug logging for initialization tracking\n const missingComponents = Object.entries(newStatus)\n .filter(([_, isInit]) => !isInit)\n .map(([name]) => name);\n\n logDebug(`Component initialized: ${component}`, {\n newStatus,\n allComponentsReady: checkAllComponentsInitialized(newStatus),\n missingComponents\n });\n\n // Check if all required components are initialized\n if (checkAllComponentsInitialized(newStatus)) {\n logDebug('All components initialized, setting isInitialized=true');\n setIsInitialized(true);\n }\n\n return newStatus;\n });\n }, [checkAllComponentsInitialized, logDebug]);\n\n // Track initialization to prevent re-initialization on hot reload\n const initializationStartedRef = useRef(false);\n\n // Track if initialization has already failed to prevent retry loops\n const initializationFailedRef = useRef(false);\n\n // Holds the single browser router instance (created once, after the bootstrap\n // gate below). Declared here at the top so the hook call is unconditional —\n // the actual creation happens past the `!applicationServices` early return,\n // where it must NOT be a hook. See the create-once comment at the router site.\n const routerRef = useRef<ReturnType<typeof createBrowserRouter> | null>(null);\n\n const startupAppName = useMemo(\n () => {\n const candidate = options.env.VITE_APP_NAME?.trim();\n return candidate && candidate.length > 0 ? candidate : 'Application';\n },\n [options.env],\n );\n const formattedInitError = useMemo(\n () => initError ? formatInitializationError(initError, startupAppName) : null,\n [initError, startupAppName],\n );\n\n useEffect(() => {\n logDebug('useEffect triggered', {\n initializationStartedRef: initializationStartedRef.current,\n initializationFailedRef: initializationFailedRef.current,\n hasApplicationServices: !!applicationServices,\n isInitialized,\n currentInitializationStatus: initializationStatus\n });\n\n // If services exist but initialization status wasn't set, restore it\n // This happens on hot reload when the component remounts but services are already initialized\n if (applicationServices && !isInitialized) {\n logDebug('Services exist but not initialized, restoring core components');\n markComponentInitialized(MainContextInitComponents.MAIN_CONTEXT);\n markComponentInitialized(MainContextInitComponents.LOADER);\n markComponentInitialized(MainContextInitComponents.ERRORS);\n markComponentInitialized(MainContextInitComponents.ROUTER);\n\n // On hot reload: Mark container components as initialized\n // They will mark themselves when rendered, but we need to allow rendering to proceed\n // This is safe because markComponentInitialized is idempotent and components will\n // call it again when they render, ensuring the status stays correct\n markComponentInitialized(signedInContainer);\n markComponentInitialized(MainContextInitComponents.PUBLIC_APP_CONTAINER);\n\n logDebug('Marked container components for hot reload (they will re-mark themselves when rendered)');\n return;\n }\n\n // Prevent re-initialization if already started or failed\n if (initializationStartedRef.current || initializationFailedRef.current) {\n logDebug('Skipping initialization (already started/failed)');\n\n // If already failed, don't retry automatically\n if (initializationFailedRef.current && !initError) {\n setInitError('Initialization previously failed. Click Retry to try again.');\n }\n return;\n }\n\n\n const initializeApp = async () => {\n // Mark initialization as started immediately\n initializationStartedRef.current = true;\n try {\n // Initialize global error handlers (must be done early)\n ErrorManagementService.initializeGlobalErrorHandlers();\n\n // Inject env vars from the consuming app (required for pre-compiled libraries). On an organization's custom\n // domain (#2974) the API is served on the page's own host, so every client reading the loader calls it there.\n envLoader.injectEnvironmentVariables(withPageApiBaseUrl(options.env, window.location));\n\n const envConfig = envLoader.loadEnvironmentConfig();\n\n const finalConfig: InitializationApplicationConfig = {\n apiBaseUrl: options.apiBaseUrl ?? envConfig.apiBaseUrl,\n };\n\n setConfig(finalConfig);\n\n const services = await startApplicationService.initializeApplication({\n config: finalConfig,\n autoAuth: false,\n frontendProviderModules: options.frontendProviderModules,\n customShared_ResourcesConfigurationsFactoryMap: options.customShared_ResourcesConfigurationsFactoryMap,\n customShared_ResourceFieldIdentifier: options.customShared_ResourceFieldIdentifier,\n customShared_ResourcesRelationships: options.customShared_ResourcesRelationships,\n excludedResourceTypes: options.excludedResourceTypes,\n resourceUIBehavior: options.resourceUIBehavior,\n notificationBadgeDefinitions: options.notificationBadgeDefinitions,\n baseFrontendConfig: options.baseFrontendConfig,\n frontendConfigOverrides: options.frontendConfigOverrides,\n featureConfiguration: mergedFeatureConfiguration,\n surface,\n componentLoader: async () => {\n await options.componentLoader();\n // Keep the strict host gate inside the component-registration\n // startup phase. A missing shell preset therefore prevents the\n // service's success callback as well as every React child mount.\n ComponentRegistryService.assertRequiredRegistrations(hostName, requiredComponents);\n },\n onInitialized: () => {\n logDebug('Application initialized successfully');\n },\n onError: (error: Error) => {\n logger.error('Application initialization failed', { error: error.message, details: error });\n setInitError(error);\n }\n });\n\n // The startup service has a legitimate already-initialized fast path\n // that does not call the loader again. Re-assert before publishing its\n // services so HMR/remount paths retain the same fail-closed guarantee.\n ComponentRegistryService.assertRequiredRegistrations(hostName, requiredComponents);\n\n setApplicationServices(services);\n\n // Mark main context and core components as initialized\n markComponentInitialized(MainContextInitComponents.MAIN_CONTEXT);\n markComponentInitialized(MainContextInitComponents.LOADER);\n markComponentInitialized(MainContextInitComponents.ERRORS);\n markComponentInitialized(MainContextInitComponents.ROUTER);\n // Note: I18N will be marked as initialized by I18nProvider when translations are loaded\n // TODO: PUBLIC_APP_CONTAINER will be marked by its component when created\n\n // In cases where the underlying service was already initialized\n // (e.g., HMR/StrictMode), the onInitialized callback may not fire.\n // Note: Don't set isInitialized here anymore - wait for all components\n\n } catch (error) {\n // Mark as failed to prevent retry loops\n initializationFailedRef.current = true;\n\n const errorMessage = error instanceof Error ? error.message : 'Unknown initialization error';\n setInitError(error);\n logger.error('Application initialization failed', { error: errorMessage, details: error });\n }\n };\n\n initializeApp();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n // logDebug and logger are stable references, markComponentInitialized is memoized\n }, [options, applicationServices, isInitialized]);\n\n // Manual retry handler - resets failed state and reloads the page\n const handleManualRetry = useCallback(() => {\n // Reset the failed state before reloading to allow a fresh initialization attempt\n initializationFailedRef.current = false;\n initializationStartedRef.current = false;\n window.location.reload();\n }, []);\n\n // W7.3b: Detect one-off session entry at mount time.\n // When the tab opens on a one-off URL, AuthSessionProvider uses ephemeral (in-memory)\n // storage so the persistent session in other tabs is never touched.\n // The ref captures the initial URL — subsequent navigations within the same tab\n // (e.g., after the exchange redirects to home) do not change the storage strategy.\n // IMPORTANT: Must be above early returns to satisfy Rules of Hooks.\n const isOneOffSessionEntryRef = useRef(\n window.location.pathname.startsWith('/one-off-session/')\n );\n const sessionTokenStorage = useMemo(\n () => isOneOffSessionEntryRef.current ? new EphemeralSessionTokenStorage() : undefined,\n []\n );\n\n // Handle initialization error - early return before any providers (plain Tailwind, no useUI)\n if (initError && formattedInitError) {\n // OUTSIDE DEVELOPMENT a person gets a generic screen and a retry, and nothing derived from the failure:\n // no error-derived headline, no configuration issues, no context rows, no diagnostics JSON, no stack.\n // The full diagnostics are already in the logger (see the initialization catch above), which is where\n // OWASP's Error Handling guidance puts them. The card below stays for developers (#1181).\n //\n // The mode is read WITHOUT loading the configuration (`readEnvironmentMode`, not `isDevelopment`): a\n // missing or invalid `VITE_*` variable is one of the failures this very branch exists to report, and\n // `isDevelopment()` would re-throw it mid-render — there is no error boundary above this provider, so\n // the failure screen would become a blank page.\n //\n // The predicate is `=== 'development'` rather than `!isProduction()`, deliberately: `staging` and\n // `test` are hosts that real people reach, and OWASP's guidance is about who is LOOKING, not about how\n // the deployment is labelled. Only a developer's own machine gets the diagnostics. An unestablished\n // mode falls on the same side — unknown is not development.\n if (envLoader.readEnvironmentMode() !== 'development') {\n return <StartupFailureScreen onRetry={handleManualRetry} />;\n }\n\n return (\n <div className=\"min-h-screen w-screen bg-background px-6 py-10 md:px-10\">\n <div className=\"mx-auto flex min-h-[calc(100vh-5rem)] max-w-5xl items-center justify-center\">\n <div\n role=\"alert\"\n className=\"w-full overflow-hidden rounded-2xl border border-border bg-card shadow-sm\"\n >\n <div className=\"border-b border-border bg-muted/40 px-6 py-5 md:px-8\">\n <div className=\"flex items-start gap-4\">\n <div className=\"flex h-12 w-12 shrink-0 items-center justify-center rounded-full bg-destructive/12 text-xl text-destructive\">\n !\n </div>\n <div className=\"min-w-0\">\n <p className=\"text-sm font-medium uppercase tracking-wide text-destructive\">\n Initialization failed\n </p>\n <h1 className=\"mt-1 text-2xl font-semibold text-foreground\">\n {formattedInitError.title}\n </h1>\n <p className=\"mt-2 max-w-3xl text-sm leading-6 text-muted-foreground\">\n {formattedInitError.description}\n </p>\n </div>\n </div>\n </div>\n\n <div className=\"space-y-6 px-6 py-6 md:px-8\">\n {formattedInitError.contextRows.length > 0 ? (\n <div className=\"grid gap-3 md:grid-cols-2 xl:grid-cols-3\">\n {formattedInitError.contextRows.map((row) => (\n <div\n key={`${row.label}:${row.value}`}\n className=\"rounded-xl border border-border bg-muted/20 px-4 py-3\"\n >\n <p className=\"text-[11px] font-medium uppercase tracking-wide text-muted-foreground\">\n {row.label}\n </p>\n <p className=\"mt-1 break-all font-mono text-xs leading-5 text-foreground\">\n {row.value}\n </p>\n </div>\n ))}\n </div>\n ) : null}\n\n {formattedInitError.highlights.length > 0 ? (\n <div className=\"space-y-3\">\n <h2 className=\"text-sm font-semibold text-foreground\">\n What needs attention\n </h2>\n <div className=\"grid gap-2\">\n {formattedInitError.highlights.map((highlight) => (\n <div\n key={highlight}\n className=\"rounded-lg border border-border bg-muted/30 px-3 py-2 font-mono text-xs leading-5 text-foreground\"\n >\n {highlight}\n </div>\n ))}\n </div>\n {formattedInitError.remainingIssueCount > 0 ? (\n <p className=\"text-xs text-muted-foreground\">\n And {formattedInitError.remainingIssueCount} more issue{formattedInitError.remainingIssueCount === 1 ? '' : 's'} in the technical details below.\n </p>\n ) : null}\n </div>\n ) : null}\n\n <div className=\"rounded-xl border border-border bg-muted/20 p-4\">\n <p className=\"text-sm text-muted-foreground\">\n The application will not automatically retry. Fix the underlying issue, then reload the app to start a fresh initialization attempt.\n </p>\n <div className=\"mt-4 flex flex-wrap gap-3\">\n <button\n onClick={handleManualRetry}\n className=\"inline-flex items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-opacity hover:opacity-90\"\n >\n Retry initialization\n </button>\n </div>\n </div>\n\n <details className=\"group rounded-xl border border-border bg-background\">\n <summary className=\"cursor-pointer list-none px-4 py-3 text-sm font-medium text-foreground\">\n <span className=\"group-open:hidden\">Show technical details</span>\n <span className=\"hidden group-open:inline\">Hide technical details</span>\n </summary>\n <div className=\"border-t border-border px-4 py-4\">\n <pre className=\"max-h-80 overflow-auto whitespace-pre-wrap break-words rounded-lg bg-muted/30 p-4 font-mono text-xs leading-5 text-foreground\">\n {formattedInitError.technicalDetails}\n </pre>\n </div>\n </details>\n </div>\n </div>\n </div>\n </div>\n );\n }\n\n // Handle bootstrap loading before the provider tree can safely mount.\n // Once services/config exist, render the full tree so UIProvider and the shell\n // containers can complete their own initialization work and report readiness.\n if (!applicationServices || !config) {\n const missingComponents = Object.entries(initializationStatus)\n .filter(([_, isInit]) => !isInit)\n .map(([name]) => name);\n\n logDebug('Still loading', {\n isInitialized,\n hasApplicationServices: !!applicationServices,\n hasConfig: !!config,\n initializationStatus,\n missingComponents\n });\n\n // Pre-bootstrap loader (config/services not ready yet). Intentionally the\n // SAME minimal presentation as the Tier-1 `AppLoadingGate` \"simple loading\"\n // overlay — a centered, recipe-coloured `LoadingSpinner` on `bg-background`,\n // with no card chrome / circular badge / forced `text-primary`. The earlier\n // bespoke card duplicated the spinner SVG and hardcoded the primary colour,\n // so the very first paint looked unlike every subsequent loading state.\n return (\n <div className=\"flex min-h-screen w-screen items-center justify-center bg-background\">\n <LoadingSpinner size={48} />\n </div>\n );\n }\n\n // Route element - contains providers specific to the main app content\n // NavigationProvider must be inside RouterProvider (needs useNavigate) but wraps content\n // Note: ResourceRegistryProvider is moved outside router to wrap WebSocketEventBridge\n // AuthSessionProvider manages auth/session/WebSocket, AppScopeProvider owns primary/custom scope,\n // and UserOrgsProvider consumes AppScope for its org-facing facade APIs.\n // GlobalErrorHandler subscribes to ERROR_OCCURED events and handles auth errors (logout)\n const routeElement = (\n <ErrorBoundary>\n <LoadingProvider>\n <AppLoadingGate>\n <AnonymousSessionProvider>\n <AuthSessionProvider tokenStorage={sessionTokenStorage}>\n {/* GlobalErrorHandler must be inside AuthSessionProvider to access logout */}\n <GlobalErrorHandler />\n <StepUpAuthProvider>\n {/* AppScopeProvider manages primary + custom scope state */}\n <AppScopeProvider>\n {/* Cache coverage must observe the same organization scope as the routed application. */}\n <ResourceReadCacheBridge />\n {/* Remembered badge counts end where the user or organization changes, as cached reads do. */}\n <NotificationBadgeMemoryBoundary />\n <AnalyticsScopeBridge />\n <ApplicationRoleTablesProvider customRoles={options.customRoles}>\n <UserOrgsProvider>\n {/* AppModeProvider manages active mode — inside scope, wraps billing */}\n <AppModeProvider>\n <BillingProvider productDefinitions={options.productDefinitions}>\n <BillingErrorNotifier />\n <FeaturesProvider featureConfiguration={mergedFeatureConfiguration}>\n <OrganizationBrandingPublisher />\n {/* A plan refusal from the backend, shown as the prompt the same fence shows when checked first. */}\n <PlanRefusalPrompt />\n <ScopedResourceRegistryProvider>\n <GuidanceContextProvider>\n <FlowsActorsProvider>\n <NavigationProvider>\n {/* DefaultHotkeyHandler registers application-level keyboard shortcuts */}\n <DefaultHotkeyHandler />\n <HotkeyShortcutsHelpDialog />\n {surface === AppFrontendSurface.IDENTITY_PORTAL ? <IdentityPortalRouter /> : <AppRouter />}\n </NavigationProvider>\n </FlowsActorsProvider>\n </GuidanceContextProvider>\n </ScopedResourceRegistryProvider>\n </FeaturesProvider>\n </BillingProvider>\n </AppModeProvider>\n </UserOrgsProvider>\n </ApplicationRoleTablesProvider>\n </AppScopeProvider>\n </StepUpAuthProvider>\n </AuthSessionProvider>\n </AnonymousSessionProvider>\n </AppLoadingGate>\n </LoadingProvider>\n </ErrorBoundary>\n );\n\n // Create the router exactly ONCE, then reuse it across re-renders.\n //\n // `createBrowserRouter` must never run in render: a fresh router instance makes\n // `RouterProvider` remount the ENTIRE route tree (every provider below,\n // including `NavigationProvider`), discarding their state. During bootstrap\n // `ApplicationMainProvider` re-renders several times (services set, config set,\n // primary scope resolving async on deep-link), so an in-render router recreated\n // the whole tree each wave — wiping navigation/overlay state established from\n // the URL. That is why a cold deep-link to an overlay-reconstructed surface\n // (e.g. `/settings`) lost its overlay while in-session navigation (no further\n // re-renders) kept it. This code path is reached only after the\n // `!applicationServices || !config` gate above, and `routeElement`'s only props\n // (`sessionTokenStorage`, `options.productDefinitions`, `mergedFeatureConfiguration`)\n // are all stable post-init, so capturing the route element once is correct.\n // `routerRef` is declared at the top of the component (unconditional hook);\n // here we only populate it, which is safe after the bootstrap early-return.\n if (routerRef.current === null) {\n // React Router 7 made every v6 `future.v7_*` flag (relative splat paths, fetcher persistence,\n // upper-case form methods, partial hydration, no revalidation after an action error) its fixed\n // behaviour, so the router takes no future flags: this app opted into all five while on v6.\n routerRef.current = createBrowserRouter([\n { path: '/*', element: routeElement, errorElement: <RouterErrorBoundary /> }\n ]);\n }\n const router = routerRef.current;\n\n // Wrap RouterProvider with providers that both route element and error boundary need.\n // This ensures RouterErrorBoundary has access to I18nProvider, IconRegistryProvider, etc.\n // ResourceRegistryProvider must wrap WebSocketEventBridge since it uses useResourceRegistry()\n return (\n <EventBusProvider>\n <WebSocketProvider>\n <ApplicationContext.Provider value={{\n appConfig: applicationServices.appConfigFromBackend,\n appIdentity: applicationServices.appConfigFromBackend.appIdentity,\n appPreferences: applicationServices.appConfigFromBackend.appPreferences,\n runtime: applicationServices.appConfigFromBackend.runtime,\n auth: applicationServices.appConfigFromBackend.auth,\n compliance: applicationServices.appConfigFromBackend.compliance,\n frontendConfiguration: applicationServices.frontendConfiguration,\n logger: applicationServices.logger,\n httpClient: applicationServices.httpClient,\n frontendProviderRegistry: applicationServices.frontendProviderRegistry,\n providerComponentRegistry: applicationServices.providerComponentRegistry,\n ...(options.shellCompanions ? { shellCompanions: options.shellCompanions } : {}),\n isInitialized: isInitialized,\n version: applicationServices.appConfigFromBackend.appIdentity?.version ?? '1.0.0',\n initializationStatus,\n markComponentInitialized\n }}>\n <SaaSUIRuntimeProvider>\n <ErrorProvider>\n <I18nProvider>\n <NotificationProvider>\n <HotkeyRegistryProvider>\n <ResourceRegistryProvider resourcesRepository={applicationServices.resourceRepository}>\n {/*\n AnalyticsContextProvider sits BELOW ResourceRegistryProvider, deliberately, and a\n pin in `ApplicationMainProvider.composition-characterization` holds it there.\n\n The provider fetches the achieved value moments only where this consumer can REACH\n the progression store — `useResourceReachability(USER_PROGRESSION_STATE)`, the #268\n rule #1069 applied here. That hook reads the registry from context, and an ABSENT\n registry is read as ignorance (fetch), so that tests mounting the provider alone keep\n working. Mounted above the registry, the provider could only ever see \"absent\": the\n gate #1069 added was inert by construction, its pin passed because the pin mounted a\n registry the shell never did, and every consumer whose registry excludes the store —\n the application-creation workbench, served by the companion — kept fetching a route\n it does not serve, 404 and a \"no record\" toast on every load (measured 2026-09-21).\n\n Nothing between the two providers consumes analytics: `useAnalytics` is reached only\n from `useFeatureAvailability` and `AnalyticsEventBridge`, both under the router.\n */}\n {/*\n The consent-based provider phase (#1704) wraps analytics: it starts a vendor that rests\n on a consent purpose once the signed-in person grants it, stops it on withdrawal or\n sign-out, and publishes what is running — which is what AnalyticsContext dispatches to.\n */}\n <ConsentBasedProviderSdksProvider>\n <AnalyticsContextProvider>\n {/*\n IconRegistryBridge sits BELOW ResourceRegistryProvider + UIProvider\n so it can compute `customRegistry` from `useResourceRegistry()` +\n `useUI()` and pass it to the inner `IconRegistryProvider`. This\n replaces the prior pattern where `resources-repository` mutated\n `CoreIconRegistry` as a side effect — fragile because the mutation\n had to land BEFORE the `IconRegistryProvider` snapshot, which\n wasn't guaranteed when the provider sat above the registry. See\n IconRegistryBridge.tsx for the data-flow rationale.\n */}\n <IconRegistryBridge>\n <RMMRegistryProvider apiBaseUrl={config.apiBaseUrl}>\n <WebSocketEventBridge />\n <RMMWebSocketBridge />\n {/*\n Debounced connectivity notifier: surfaces AT MOST ONE\n persistent, self-dismissing toast per outage (after a\n 3s grace), replacing the former per-reconnection-attempt\n error toasts. Headless; must sit under WebSocket/I18n/\n Notification providers (all above) and beside <Toaster/>.\n */}\n <ConnectionStatusNotifier />\n <AppCelebrationOverlay />\n {/*\n Global toast host. `NotificationProvider` (above) calls\n `toast.*()` (Sonner) for every resource/custom notification —\n success, error, warning, info — per NOTIFICATION_DISPLAY_POLICY.\n Sonner's `toast()` is a module-level singleton that no-ops\n unless a `<Toaster>` is mounted in the DOM. Without this mount,\n EVERY toast app-wide was silently dropped — most visibly, form\n submission failures showed no error at all. It sits beside\n `AppCelebrationOverlay` (the other root-level feedback surface),\n inside `UIProvider` for theming. Its portal renders at\n `z-(--z-transient)` (=`--z-toast`, 500), above modal/overlay\n surfaces, so toasts raised from inside a dialog stay visible.\n */}\n <Toaster />\n <RouterProvider router={router} />\n </RMMRegistryProvider>\n </IconRegistryBridge>\n </AnalyticsContextProvider>\n </ConsentBasedProviderSdksProvider>\n </ResourceRegistryProvider>\n </HotkeyRegistryProvider>\n </NotificationProvider>\n </I18nProvider>\n </ErrorProvider>\n </SaaSUIRuntimeProvider>\n </ApplicationContext.Provider>\n </WebSocketProvider>\n </EventBusProvider>\n );\n}\n\n// useApplication hook is now in separate file: ./useApplication.ts\n// This separation is required for React Fast Refresh compatibility\n"]}
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ /**
3
+ * The router of the runtime mounted as an identity portal (`AppFrontendSurface.IDENTITY_PORTAL`): the surface of an
4
+ * application whose product is not a browser application.
5
+ *
6
+ * It mounts the public identity routes the product mounts (`identityRouteElements()`, the one definition both use) and
7
+ * a few signed-in pages under the portal's slim shell, and nothing else: no resource, view or chart route and no
8
+ * Settings Hub, so a product path answers the not-found page here.
9
+ *
10
+ * - `/` is the portal home, so every default landing reaches it.
11
+ * - `/decisions` is the decision inbox, the same component the product renders, without the product's views around it.
12
+ * - `/settings/security` is the account-security page, the same component the Settings Hub renders for its Security
13
+ * section, at the path emails already link to.
14
+ * - `/settings/<destination>` (and its sub-tab) is one of the hub's destinations the portal mounts
15
+ * (`IDENTITY_PORTAL_SETTINGS_DESTINATIONS`: a member's invitations and chat accounts, the administration of OAuth
16
+ * clients, chat and agents), rendered by the hub's own renderer and gated by the hub's own checks. Any other
17
+ * destination, or one the person may not open, answers the not-found page.
18
+ */
19
+ export declare function IdentityPortalRouter(): React.JSX.Element;
20
+ //# sourceMappingURL=IdentityPortalRouter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IdentityPortalRouter.d.ts","sourceRoot":"","sources":["../../../../src/core/runtime/IdentityPortalRouter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAY1B;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,oBAAoB,IAAI,KAAK,CAAC,GAAG,CAAC,OAAO,CAcxD"}