unleash-server 8.0.2 → 8.0.3

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 (488) hide show
  1. package/dist/lib/addons/feature-event-formatter-md.d.ts.map +1 -1
  2. package/dist/lib/addons/feature-event-formatter-md.js +5 -3
  3. package/dist/lib/addons/feature-event-formatter-md.js.map +1 -1
  4. package/dist/lib/addons/feature-event-formatter-md.test.js +3 -1
  5. package/dist/lib/addons/feature-event-formatter-md.test.js.map +1 -1
  6. package/dist/lib/addons/webhook.d.ts.map +1 -1
  7. package/dist/lib/addons/webhook.js +28 -2
  8. package/dist/lib/addons/webhook.js.map +1 -1
  9. package/dist/lib/addons/webhook.test.js +72 -0
  10. package/dist/lib/addons/webhook.test.js.map +1 -1
  11. package/dist/lib/app.d.ts.map +1 -1
  12. package/dist/lib/app.js +2 -0
  13. package/dist/lib/app.js.map +1 -1
  14. package/dist/lib/create-config.d.ts.map +1 -1
  15. package/dist/lib/create-config.js +1 -0
  16. package/dist/lib/create-config.js.map +1 -1
  17. package/dist/lib/features/context/context-field-store.d.ts +1 -1
  18. package/dist/lib/features/context/context-field-store.d.ts.map +1 -1
  19. package/dist/lib/features/context/context-field-store.js +1 -5
  20. package/dist/lib/features/context/context-field-store.js.map +1 -1
  21. package/dist/lib/features/context/context-service.d.ts +5 -4
  22. package/dist/lib/features/context/context-service.d.ts.map +1 -1
  23. package/dist/lib/features/context/context-service.js +20 -27
  24. package/dist/lib/features/context/context-service.js.map +1 -1
  25. package/dist/lib/features/context/context-service.test.d.ts +2 -0
  26. package/dist/lib/features/context/context-service.test.d.ts.map +1 -0
  27. package/dist/lib/features/context/context-service.test.js +24 -0
  28. package/dist/lib/features/context/context-service.test.js.map +1 -0
  29. package/dist/lib/features/context/context.d.ts +1 -0
  30. package/dist/lib/features/context/context.d.ts.map +1 -1
  31. package/dist/lib/features/context/context.js +22 -10
  32. package/dist/lib/features/context/context.js.map +1 -1
  33. package/dist/lib/features/context/context.test.js +15 -1
  34. package/dist/lib/features/context/context.test.js.map +1 -1
  35. package/dist/lib/features/context/createContextService.d.ts +4 -1
  36. package/dist/lib/features/context/createContextService.d.ts.map +1 -1
  37. package/dist/lib/features/context/createContextService.js +2 -1
  38. package/dist/lib/features/context/createContextService.js.map +1 -1
  39. package/dist/lib/features/context/fake-context-field-store.d.ts +1 -1
  40. package/dist/lib/features/context/fake-context-field-store.d.ts.map +1 -1
  41. package/dist/lib/features/context/fake-context-field-store.js +1 -6
  42. package/dist/lib/features/context/fake-context-field-store.js.map +1 -1
  43. package/dist/lib/features/export-import-toggles/createExportImportService.js +1 -1
  44. package/dist/lib/features/export-import-toggles/createExportImportService.js.map +1 -1
  45. package/dist/lib/features/feature-toggle/converters/feature-toggle-row-converter.d.ts +1 -1
  46. package/dist/lib/features/feature-toggle/fakes/fake-feature-strategies-store.d.ts +2 -1
  47. package/dist/lib/features/feature-toggle/fakes/fake-feature-strategies-store.d.ts.map +1 -1
  48. package/dist/lib/features/feature-toggle/fakes/fake-feature-strategies-store.js +5 -0
  49. package/dist/lib/features/feature-toggle/fakes/fake-feature-strategies-store.js.map +1 -1
  50. package/dist/lib/features/feature-toggle/feature-toggle-controller.d.ts +1 -1
  51. package/dist/lib/features/feature-toggle/feature-toggle-controller.d.ts.map +1 -1
  52. package/dist/lib/features/feature-toggle/feature-toggle-controller.js +22 -2
  53. package/dist/lib/features/feature-toggle/feature-toggle-controller.js.map +1 -1
  54. package/dist/lib/features/feature-toggle/feature-toggle-service.d.ts +3 -2
  55. package/dist/lib/features/feature-toggle/feature-toggle-service.d.ts.map +1 -1
  56. package/dist/lib/features/feature-toggle/feature-toggle-service.js +11 -4
  57. package/dist/lib/features/feature-toggle/feature-toggle-service.js.map +1 -1
  58. package/dist/lib/features/feature-toggle/feature-toggle-strategies-store.d.ts +2 -0
  59. package/dist/lib/features/feature-toggle/feature-toggle-strategies-store.d.ts.map +1 -1
  60. package/dist/lib/features/feature-toggle/feature-toggle-strategies-store.js +7 -0
  61. package/dist/lib/features/feature-toggle/feature-toggle-strategies-store.js.map +1 -1
  62. package/dist/lib/features/feature-toggle/tests/feature-toggles.e2e.test.js +4 -0
  63. package/dist/lib/features/feature-toggle/tests/feature-toggles.e2e.test.js.map +1 -1
  64. package/dist/lib/features/feature-toggle/types/feature-toggle-strategies-store-type.d.ts +6 -0
  65. package/dist/lib/features/feature-toggle/types/feature-toggle-strategies-store-type.d.ts.map +1 -1
  66. package/dist/lib/features/playground/feature-evaluator/constraint.d.ts +2 -0
  67. package/dist/lib/features/playground/feature-evaluator/constraint.d.ts.map +1 -1
  68. package/dist/lib/features/playground/feature-evaluator/constraint.js +11 -1
  69. package/dist/lib/features/playground/feature-evaluator/constraint.js.map +1 -1
  70. package/dist/lib/features/playground/playground.test.js +2 -3
  71. package/dist/lib/features/playground/playground.test.js.map +1 -1
  72. package/dist/lib/features/release-plans/release-plan-template-store.d.ts +4 -0
  73. package/dist/lib/features/release-plans/release-plan-template-store.d.ts.map +1 -1
  74. package/dist/lib/features/release-plans/release-plan-template-store.js +25 -2
  75. package/dist/lib/features/release-plans/release-plan-template-store.js.map +1 -1
  76. package/dist/lib/features/release-plans/release-plan-template-store.test.js +75 -16
  77. package/dist/lib/features/release-plans/release-plan-template-store.test.js.map +1 -1
  78. package/dist/lib/features/release-plans/release-plan-template.d.ts +1 -0
  79. package/dist/lib/features/release-plans/release-plan-template.d.ts.map +1 -1
  80. package/dist/lib/features/scheduler/scheduler-service.test.js +1 -0
  81. package/dist/lib/features/scheduler/scheduler-service.test.js.map +1 -1
  82. package/dist/lib/features/unique-connection/unique-connection-store.e2e.test.js +3 -0
  83. package/dist/lib/features/unique-connection/unique-connection-store.e2e.test.js.map +1 -1
  84. package/dist/lib/middleware/rbac-middleware.d.ts.map +1 -1
  85. package/dist/lib/middleware/rbac-middleware.js +3 -4
  86. package/dist/lib/middleware/rbac-middleware.js.map +1 -1
  87. package/dist/lib/middleware/rbac-middleware.test.js +62 -24
  88. package/dist/lib/middleware/rbac-middleware.test.js.map +1 -1
  89. package/dist/lib/middleware/session-context.d.ts +20 -0
  90. package/dist/lib/middleware/session-context.d.ts.map +1 -0
  91. package/dist/lib/middleware/session-context.js +38 -0
  92. package/dist/lib/middleware/session-context.js.map +1 -0
  93. package/dist/lib/openapi/spec/admin-segment-schema.d.ts +1 -1
  94. package/dist/lib/openapi/spec/advanced-playground-environment-feature-schema.d.ts +4 -4
  95. package/dist/lib/openapi/spec/advanced-playground-feature-schema.d.ts +8 -8
  96. package/dist/lib/openapi/spec/advanced-playground-response-schema.d.ts +17 -17
  97. package/dist/lib/openapi/spec/client-feature-schema.d.ts +2 -2
  98. package/dist/lib/openapi/spec/client-features-delta-schema.d.ts +5 -5
  99. package/dist/lib/openapi/spec/client-features-schema.d.ts +5 -5
  100. package/dist/lib/openapi/spec/client-segment-schema.d.ts +1 -1
  101. package/dist/lib/openapi/spec/constraint-schema.d.ts +2 -2
  102. package/dist/lib/openapi/spec/create-feature-strategy-schema.d.ts +1 -1
  103. package/dist/lib/openapi/spec/environment-project-schema.d.ts +2 -2
  104. package/dist/lib/openapi/spec/environments-project-schema.d.ts +4 -4
  105. package/dist/lib/openapi/spec/export-result-schema.d.ts +68 -68
  106. package/dist/lib/openapi/spec/feature-environment-schema.d.ts +17 -17
  107. package/dist/lib/openapi/spec/feature-schema.d.ts +34 -34
  108. package/dist/lib/openapi/spec/feature-search-environment-schema.d.ts +34 -34
  109. package/dist/lib/openapi/spec/feature-search-response-schema.d.ts +68 -68
  110. package/dist/lib/openapi/spec/feature-strategy-schema.d.ts +1 -1
  111. package/dist/lib/openapi/spec/health-overview-schema.d.ts +69 -69
  112. package/dist/lib/openapi/spec/health-report-schema.d.ts +69 -69
  113. package/dist/lib/openapi/spec/playground-constraint-schema.d.ts +1 -1
  114. package/dist/lib/openapi/spec/playground-feature-schema.arbitraries.d.ts +4 -0
  115. package/dist/lib/openapi/spec/playground-feature-schema.arbitraries.d.ts.map +1 -0
  116. package/dist/lib/openapi/spec/playground-feature-schema.arbitraries.js +91 -0
  117. package/dist/lib/openapi/spec/playground-feature-schema.arbitraries.js.map +1 -0
  118. package/dist/lib/openapi/spec/playground-feature-schema.d.ts +4 -4
  119. package/dist/lib/openapi/spec/playground-feature-schema.test.d.ts +1 -3
  120. package/dist/lib/openapi/spec/playground-feature-schema.test.d.ts.map +1 -1
  121. package/dist/lib/openapi/spec/playground-feature-schema.test.js +1 -89
  122. package/dist/lib/openapi/spec/playground-feature-schema.test.js.map +1 -1
  123. package/dist/lib/openapi/spec/playground-request-schema.arbitraries.d.ts +4 -0
  124. package/dist/lib/openapi/spec/playground-request-schema.arbitraries.d.ts.map +1 -0
  125. package/dist/lib/openapi/spec/playground-request-schema.arbitraries.js +9 -0
  126. package/dist/lib/openapi/spec/playground-request-schema.arbitraries.js.map +1 -0
  127. package/dist/lib/openapi/spec/playground-request-schema.test.d.ts +1 -3
  128. package/dist/lib/openapi/spec/playground-request-schema.test.d.ts.map +1 -1
  129. package/dist/lib/openapi/spec/playground-request-schema.test.js +1 -8
  130. package/dist/lib/openapi/spec/playground-request-schema.test.js.map +1 -1
  131. package/dist/lib/openapi/spec/playground-response-schema.d.ts +9 -9
  132. package/dist/lib/openapi/spec/playground-response-schema.test.js +2 -3
  133. package/dist/lib/openapi/spec/playground-response-schema.test.js.map +1 -1
  134. package/dist/lib/openapi/spec/playground-segment-schema.d.ts +1 -1
  135. package/dist/lib/openapi/spec/playground-strategy-schema.d.ts +2 -2
  136. package/dist/lib/openapi/spec/profile-schema.d.ts +34 -34
  137. package/dist/lib/openapi/spec/project-environment-schema.d.ts +1 -1
  138. package/dist/lib/openapi/spec/project-overview-schema.d.ts +69 -69
  139. package/dist/lib/openapi/spec/release-plan-milestone-schema.d.ts +4 -4
  140. package/dist/lib/openapi/spec/release-plan-milestone-strategy-schema.d.ts +2 -2
  141. package/dist/lib/openapi/spec/release-plan-schema.d.ts +8 -8
  142. package/dist/lib/openapi/spec/release-plan-template-schema.d.ts +14 -8
  143. package/dist/lib/openapi/spec/release-plan-template-schema.d.ts.map +1 -1
  144. package/dist/lib/openapi/spec/release-plan-template-schema.js +6 -0
  145. package/dist/lib/openapi/spec/release-plan-template-schema.js.map +1 -1
  146. package/dist/lib/openapi/spec/release-plan-templates-schema.d.ts +22 -16
  147. package/dist/lib/openapi/spec/release-plan-templates-schema.d.ts.map +1 -1
  148. package/dist/lib/openapi/spec/release-plans-schema.d.ts +16 -16
  149. package/dist/lib/openapi/spec/sdk-context-schema.arbitraries.d.ts +4 -0
  150. package/dist/lib/openapi/spec/sdk-context-schema.arbitraries.d.ts.map +1 -0
  151. package/dist/lib/openapi/spec/sdk-context-schema.arbitraries.js +12 -0
  152. package/dist/lib/openapi/spec/sdk-context-schema.arbitraries.js.map +1 -0
  153. package/dist/lib/openapi/spec/sdk-context-schema.test.d.ts +1 -3
  154. package/dist/lib/openapi/spec/sdk-context-schema.test.d.ts.map +1 -1
  155. package/dist/lib/openapi/spec/sdk-context-schema.test.js +1 -11
  156. package/dist/lib/openapi/spec/sdk-context-schema.test.js.map +1 -1
  157. package/dist/lib/openapi/spec/search-features-schema.d.ts +104 -104
  158. package/dist/lib/openapi/spec/segment-schema.d.ts +1 -1
  159. package/dist/lib/openapi/spec/segments-schema.d.ts +2 -2
  160. package/dist/lib/openapi/spec/ui-config-schema.d.ts +5 -0
  161. package/dist/lib/openapi/spec/ui-config-schema.d.ts.map +1 -1
  162. package/dist/lib/openapi/spec/ui-config-schema.js +5 -0
  163. package/dist/lib/openapi/spec/ui-config-schema.js.map +1 -1
  164. package/dist/lib/openapi/spec/update-feature-schema.d.ts +1 -1
  165. package/dist/lib/openapi/spec/update-feature-strategy-schema.d.ts +1 -1
  166. package/dist/lib/openapi/spec/upsert-segment-schema.d.ts +1 -1
  167. package/dist/lib/schema/feature-schema.test.js +1 -1
  168. package/dist/lib/schema/feature-schema.test.js.map +1 -1
  169. package/dist/lib/schema/html-input.d.ts +1 -1
  170. package/dist/lib/schema/html-input.d.ts.map +1 -1
  171. package/dist/lib/schema/html-input.js +5 -2
  172. package/dist/lib/schema/html-input.js.map +1 -1
  173. package/dist/lib/schema/html-input.test.js +1 -1
  174. package/dist/lib/schema/html-input.test.js.map +1 -1
  175. package/dist/lib/services/feature-tag-service.d.ts +1 -1
  176. package/dist/lib/services/feature-tag-service.d.ts.map +1 -1
  177. package/dist/lib/services/feature-tag-service.js +5 -1
  178. package/dist/lib/services/feature-tag-service.js.map +1 -1
  179. package/dist/lib/services/index.d.ts.map +1 -1
  180. package/dist/lib/services/index.js +1 -1
  181. package/dist/lib/services/index.js.map +1 -1
  182. package/dist/lib/services/project-schema.js +1 -1
  183. package/dist/lib/services/project-schema.js.map +1 -1
  184. package/dist/lib/types/events.d.ts +8 -0
  185. package/dist/lib/types/events.d.ts.map +1 -1
  186. package/dist/lib/types/events.js +4 -0
  187. package/dist/lib/types/events.js.map +1 -1
  188. package/dist/lib/types/experimental.d.ts +1 -1
  189. package/dist/lib/types/experimental.d.ts.map +1 -1
  190. package/dist/lib/types/experimental.js +6 -1
  191. package/dist/lib/types/experimental.js.map +1 -1
  192. package/dist/lib/types/option.d.ts +1 -0
  193. package/dist/lib/types/option.d.ts.map +1 -1
  194. package/dist/lib/types/permissions.d.ts +1 -0
  195. package/dist/lib/types/permissions.d.ts.map +1 -1
  196. package/dist/lib/types/permissions.js +2 -0
  197. package/dist/lib/types/permissions.js.map +1 -1
  198. package/dist/lib/types/stores.d.ts +1 -0
  199. package/dist/lib/types/stores.d.ts.map +1 -1
  200. package/dist/lib/types/stores.js.map +1 -1
  201. package/dist/lib/ui-config/ui-config-controller.d.ts +1 -2
  202. package/dist/lib/ui-config/ui-config-controller.d.ts.map +1 -1
  203. package/dist/lib/ui-config/ui-config-controller.js +3 -1
  204. package/dist/lib/ui-config/ui-config-controller.js.map +1 -1
  205. package/dist/lib/ui-config/ui-config-service.d.ts +3 -2
  206. package/dist/lib/ui-config/ui-config-service.d.ts.map +1 -1
  207. package/dist/lib/ui-config/ui-config-service.js +7 -1
  208. package/dist/lib/ui-config/ui-config-service.js.map +1 -1
  209. package/dist/lib/ui-config/ui-config.test.js +4 -0
  210. package/dist/lib/ui-config/ui-config.test.js.map +1 -1
  211. package/dist/lib/util/constants.d.ts +3 -1
  212. package/dist/lib/util/constants.d.ts.map +1 -1
  213. package/dist/lib/util/constants.js +11 -1
  214. package/dist/lib/util/constants.js.map +1 -1
  215. package/dist/mailtemplates/requested-cr-approval/requested-cr-approval.html.mustache +1 -1
  216. package/dist/migrations/20260706100000-add-project-column-to-release-plan-definitions.d.ts +3 -0
  217. package/dist/migrations/20260706100000-add-project-column-to-release-plan-definitions.d.ts.map +1 -0
  218. package/dist/migrations/20260706100000-add-project-column-to-release-plan-definitions.js +8 -0
  219. package/dist/migrations/20260706100000-add-project-column-to-release-plan-definitions.js.map +1 -0
  220. package/dist/migrations/20260708100000-add-project-release-template-permission.d.ts +3 -0
  221. package/dist/migrations/20260708100000-add-project-release-template-permission.d.ts.map +1 -0
  222. package/dist/migrations/20260708100000-add-project-release-template-permission.js +15 -0
  223. package/dist/migrations/20260708100000-add-project-release-template-permission.js.map +1 -0
  224. package/dist/server-dev.js +5 -1
  225. package/dist/server-dev.js.map +1 -1
  226. package/dist/test/arbitraries.d.ts +25 -0
  227. package/dist/test/arbitraries.d.ts.map +1 -0
  228. package/dist/test/arbitraries.js +143 -0
  229. package/dist/test/arbitraries.js.map +1 -0
  230. package/dist/test/arbitraries.test.d.ts +1 -24
  231. package/dist/test/arbitraries.test.d.ts.map +1 -1
  232. package/dist/test/arbitraries.test.js +1 -142
  233. package/dist/test/arbitraries.test.js.map +1 -1
  234. package/dist/test/e2e/api/admin/playground.e2e.test.js +2 -2
  235. package/dist/test/e2e/api/admin/playground.e2e.test.js.map +1 -1
  236. package/dist/test/e2e/services/playground-service.test.js +2 -2
  237. package/dist/test/e2e/services/playground-service.test.js.map +1 -1
  238. package/dist/test/fixtures/fake-segment-store.d.ts +1 -1
  239. package/dist/test/fixtures/fake-segment-store.d.ts.map +1 -1
  240. package/dist/test/fixtures/fake-segment-store.js +2 -2
  241. package/dist/test/fixtures/fake-segment-store.js.map +1 -1
  242. package/dist/test/prom-last-wins.d.ts +2 -0
  243. package/dist/test/prom-last-wins.d.ts.map +1 -0
  244. package/dist/test/prom-last-wins.js +25 -0
  245. package/dist/test/prom-last-wins.js.map +1 -0
  246. package/dist/test/reset-cross-file-state.d.ts +2 -0
  247. package/dist/test/reset-cross-file-state.d.ts.map +1 -0
  248. package/dist/test/reset-cross-file-state.js +57 -0
  249. package/dist/test/reset-cross-file-state.js.map +1 -0
  250. package/dist/test-setup.d.ts.map +1 -1
  251. package/dist/test-setup.js +4 -0
  252. package/dist/test-setup.js.map +1 -1
  253. package/frontend/build/index.html +1 -1
  254. package/frontend/build/static/AccordionSummary-KVRcLxLK.js +1 -0
  255. package/frontend/build/static/AdvancedPlayground-Cls80com.js +3 -0
  256. package/frontend/build/static/Alert-DQgOzmJF.js +1 -0
  257. package/frontend/build/static/Avatar-xU_puYmY.js +1 -0
  258. package/frontend/build/static/BackendConnections-CkI8tLcv.js +1 -0
  259. package/frontend/build/static/Box-rSzdGLLJ.js +1 -0
  260. package/frontend/build/static/Button-yGjgMTJI.js +1 -0
  261. package/frontend/build/static/Button.story-CBE27I2T.js +1 -0
  262. package/frontend/build/static/CircularProgress-CmGBJn6I.js +124 -0
  263. package/frontend/build/static/Close-DKD1r3T7.js +1 -0
  264. package/frontend/build/static/Close-nISwbNAY.js +1 -0
  265. package/frontend/build/static/CodeRenderer-RNHlNPBl.js +1094 -0
  266. package/frontend/build/static/CodeRenderer.story-Vw214z1Z.js +2 -0
  267. package/frontend/build/static/Collapse-COunT4rQ.js +1 -0
  268. package/frontend/build/static/ConditionallyRender-CEffh9Z-.js +1 -0
  269. package/frontend/build/static/ConnectSdkStep-DnH4iwnu.js +1 -0
  270. package/frontend/build/static/ConnectSdkStep.story-DeWPTOZK.js +1 -0
  271. package/frontend/build/static/CreateProject-eo1TZ1so.js +1 -0
  272. package/frontend/build/static/Dialog-DLpX4v6X.js +1 -0
  273. package/frontend/build/static/DialogWithAside-BxVspeMV.js +1 -0
  274. package/frontend/build/static/DialogWithAside.story-Dqmr9MnM.js +1 -0
  275. package/frontend/build/static/Divider-BYq1CcT0.js +1 -0
  276. package/frontend/build/static/EnterpriseEdge-D-g3JGCd.js +6 -0
  277. package/frontend/build/static/FeatureCard.story-B2Q-SD_-.js +1 -0
  278. package/frontend/build/static/FeatureMetricsChart-ETalRWKx.js +2 -0
  279. package/frontend/build/static/FeatureStaleDialog-CvD9ojNj.js +8 -0
  280. package/frontend/build/static/{FeatureViewLazyExport-8eQKTvdS.js → FeatureViewLazyExport-10Z3_Wda.js} +3 -3
  281. package/frontend/build/static/FileCopy-D1ZqmNek.js +1 -0
  282. package/frontend/build/static/FlagMetricsChart-dLfSDZ_x.js +2 -0
  283. package/frontend/build/static/FlagUsageSnippet-DOGwaqPZ.js +2 -0
  284. package/frontend/build/static/FlagUsageSnippet.story-tfMvt3kG.js +1 -0
  285. package/frontend/build/static/FormControlLabel-BrOlsUbv.js +1 -0
  286. package/frontend/build/static/FormField-CRXe4g4R.js +1 -0
  287. package/frontend/build/static/FrontendNetworkTrafficUsage-DGEwK1Qg.js +1 -0
  288. package/frontend/build/static/GenerateApiKey-C1aJtPh-.js +1 -0
  289. package/frontend/build/static/GenerateApiKey.story-DNMZG0qg.js +1 -0
  290. package/frontend/build/static/GenerateApiKeySummary-DkPI02tH.js +1 -0
  291. package/frontend/build/static/GenerateApiKeySummary.story-CruMFwTQ.js +1 -0
  292. package/frontend/build/static/{GridLayoutWrapper-B_YyjZ7l.js → GridLayoutWrapper-B3BIpxoE.js} +3 -3
  293. package/frontend/build/static/Grow-CuQu7Z-P.js +1 -0
  294. package/frontend/build/static/HelpOutlineOutlined-HDH1hus2.js +1 -0
  295. package/frontend/build/static/HelpResources.story-warJFqf6.js +1 -0
  296. package/frontend/build/static/Highlighter-BS0Ow0vZ.js +1 -0
  297. package/frontend/build/static/HtmlTooltip-3YsoM_F5.js +1 -0
  298. package/frontend/build/static/IconButton-BveFD3PF.js +1 -0
  299. package/frontend/build/static/ImpactMetricsPage-C57istn7.js +1 -0
  300. package/frontend/build/static/ImpactViewsPage-MKEHnt2w.js +1 -0
  301. package/frontend/build/static/LazyAdminExport-DfIYVWQD.js +38 -0
  302. package/frontend/build/static/LazyProjectExport-30GlUH0L.js +46 -0
  303. package/frontend/build/static/LifecycleChartComponent-Tj1pN5Tj.js +2 -0
  304. package/frontend/build/static/LineChartComponent-_RiDjL2-.js +1 -0
  305. package/frontend/build/static/Link-wv6er_Jy.js +1 -0
  306. package/frontend/build/static/Loader-CnLypnQx.js +1 -0
  307. package/frontend/build/static/{LogRocketRunner-Duzg1Kzh.js → LogRocketRunner-BS6AEpSK.js} +1 -1
  308. package/frontend/build/static/MarkCompletedDialogue-BeIA6eMj.js +1 -0
  309. package/frontend/build/static/Menu-DUeb4XP8.js +1 -0
  310. package/frontend/build/static/MenuBook-DZFyn--3.js +1 -0
  311. package/frontend/build/static/MenuItem-DNlBQQYG.js +1 -0
  312. package/frontend/build/static/Modal-DdH902AP.js +1 -0
  313. package/frontend/build/static/NetworkOverview-DF8c0k1P.js +1 -0
  314. package/frontend/build/static/{NetworkPrometheusAPIWarning-Bq62ygkV.js → NetworkPrometheusAPIWarning-B0v-FihJ.js} +1 -1
  315. package/frontend/build/static/NetworkTraffic-C1I4wwcb.js +1 -0
  316. package/frontend/build/static/NetworkTrafficUsage-DkdQx64o.js +1 -0
  317. package/frontend/build/static/NotificationStack.story-CdeU4r0p.js +1 -0
  318. package/frontend/build/static/OnboardingProgress-BuWQ2rjB.js +1 -0
  319. package/frontend/build/static/OnboardingProgress.story-CmQztiFV.js +1 -0
  320. package/frontend/build/static/OpenInNew-CHcHAi4B.js +1 -0
  321. package/frontend/build/static/PageContent-lT51j8jO.js +1 -0
  322. package/frontend/build/static/Paper-BvPQ0Zq6.js +1 -0
  323. package/frontend/build/static/PercentageDonut-CZVWd5fE.js +1 -0
  324. package/frontend/build/static/PermissionButton-Tj54K9Kc.js +1 -0
  325. package/frontend/build/static/Popover-FHiFav9d.js +1 -0
  326. package/frontend/build/static/Popper-Cut-_j4A.js +1 -0
  327. package/frontend/build/static/Portal-kwmlgXGI.js +1 -0
  328. package/frontend/build/static/Radio-Cj82h8o5.js +1 -0
  329. package/frontend/build/static/RadioGroup-BWTZb8iE.js +1 -0
  330. package/frontend/build/static/ReactJSONEditor-D65iiPmM.js +4 -0
  331. package/frontend/build/static/ReactJSONEditor.story-Bt3pxUGO.js +1 -0
  332. package/frontend/build/static/RoleCell-tqHUOlI7.js +1 -0
  333. package/frontend/build/static/RtlProvider-D1AlROju.js +1 -0
  334. package/frontend/build/static/Safeguard-DFEQulxy.js +1 -0
  335. package/frontend/build/static/SdkEvaluationStatus-B1rMywp-.js +17 -0
  336. package/frontend/build/static/SdkEvaluationStatus.story-BxgqLICz.js +1 -0
  337. package/frontend/build/static/Select-DdG1oq6O.js +3 -0
  338. package/frontend/build/static/SelectSdk-Boj2Ug-2.js +1 -0
  339. package/frontend/build/static/SelectSdk-CzRoKDb5.js +1 -0
  340. package/frontend/build/static/SelectSdk.story-BT9ke5Eb.js +1 -0
  341. package/frontend/build/static/SelectSdk.story-CdzotYoq.js +1 -0
  342. package/frontend/build/static/Spacing.story-CB6GkN5Z.js +1 -0
  343. package/frontend/build/static/StoriesPage-luLnHVc2.js +1 -0
  344. package/frontend/build/static/SwitchBase-cxExIOp0.js +1 -0
  345. package/frontend/build/static/TextField-Cf03Ror7.js +1 -0
  346. package/frontend/build/static/ThemeColors.story-Cx9bv5pL.js +1 -0
  347. package/frontend/build/static/TokenExplanation-CJjBSQ07.js +1 -0
  348. package/frontend/build/static/TokenExplanation.story-BoOaHRrQ.js +1 -0
  349. package/frontend/build/static/Tooltip-DPzrXyNS.js +1 -0
  350. package/frontend/build/static/TooltipResolver-CIBfA4vm.js +1 -0
  351. package/frontend/build/static/Truncator-CF0-SVks.js +1 -0
  352. package/frontend/build/static/Typography-nCkGT67u.js +1 -0
  353. package/frontend/build/static/Typography.story-CofmlvJB.js +1 -0
  354. package/frontend/build/static/UIContext-Dsr0TY8K.js +1 -0
  355. package/frontend/build/static/WhatsNewLayout.story-p4Cm8bgx.js +1 -0
  356. package/frontend/build/static/aggregateFeatureMetrics-D7AXsd2U.js +1 -0
  357. package/frontend/build/static/capitalize-DfXJDj8P.js +1 -0
  358. package/frontend/build/static/chartjs-plugin-annotation.esm-tsR8Pv5a.js +1 -0
  359. package/frontend/build/static/chunk-KS7C4IRE-PUpsdS_b.js +3 -0
  360. package/frontend/build/static/code-block-BZePA-4e.js +1 -0
  361. package/frontend/build/static/copy-to-clipboard-BCU4eeSw.js +1 -0
  362. package/frontend/build/static/createBox-DaDvp7MB.js +1 -0
  363. package/frontend/build/static/createSimplePaletteValueFilter-Bt9IjErz.js +1 -0
  364. package/frontend/build/static/createSvgIcon-D-6jHYkf.js +1 -0
  365. package/frontend/build/static/dividerClasses-DcI5JVLQ.js +1 -0
  366. package/frontend/build/static/{enterpriseEdgeCloud-C5u35XAw.js → enterpriseEdgeCloud-qnOcFE1S.js} +1 -1
  367. package/frontend/build/static/esm-DViSjNxt.js +12 -0
  368. package/frontend/build/static/formatAccessText-BhC1wtCg.js +1 -0
  369. package/frontend/build/static/httpErrorResponseHandler-BzpwldnE.js +1 -0
  370. package/frontend/build/static/impact-metrics-DrmGy_gn.png +0 -0
  371. package/frontend/build/static/{impact-metrics-icon-6dt-ye-h.js → impact-metrics-icon-Cg_ki-2e.js} +1 -1
  372. package/frontend/build/static/index-C2zVj2FI.js +287 -0
  373. package/frontend/build/static/{jsx-runtime-BnvnyDTF.js → jsx-runtime-DYfQNk55.js} +1 -1
  374. package/frontend/build/static/mcp-ADx0Sju7.png +0 -0
  375. package/frontend/build/static/{metricsFormatters-DhX-aU17.js → metricsFormatters-BmjW0KTj.js} +1 -1
  376. package/frontend/build/static/milestone-CciNgBhP.png +0 -0
  377. package/frontend/build/static/{mui-CoU2c-id.js → mui-C_omlwxE.js} +1 -1
  378. package/frontend/build/static/networkTrafficUsageHighlightPlugin-DPi6id5j.js +1 -0
  379. package/frontend/build/static/react-Ca03aNmg.js +1 -0
  380. package/frontend/build/static/resolveProps-CAVsjga5.js +1 -0
  381. package/frontend/build/static/servicenow-BmgZtZjb.svg +13 -0
  382. package/frontend/build/static/sharedTypes-CXnpeg4U.js +1 -0
  383. package/frontend/build/static/styled-CY_-vLWk.js +1 -0
  384. package/frontend/build/static/theme-DDCs0xPV.js +1 -0
  385. package/frontend/build/static/{themeStyles-DGVpwkcv.js → themeStyles-B99HStK1.js} +1 -1
  386. package/frontend/build/static/useApi-B7ZLy5tN.js +1 -0
  387. package/frontend/build/static/useApiGetter-C41iZzl2.js +1 -0
  388. package/frontend/build/static/useApiTokens-BQWPDfv2.js +1 -0
  389. package/frontend/build/static/useConditionalSWR-QWHOvx6V.js +1 -0
  390. package/frontend/build/static/useConditionallyHiddenColumns-DbQbB4u7.js +5 -0
  391. package/frontend/build/static/useCustomEvent-BnWpZ2E1.js +1 -0
  392. package/frontend/build/static/useEnhancedEffect-BBMUaXin.js +1 -0
  393. package/frontend/build/static/useEnvironments-Gu7r2cpc.js +2 -0
  394. package/frontend/build/static/useEventTracker-B0ILyjZB.js +1 -0
  395. package/frontend/build/static/useGroupedImpactMetricsData-jQ7IYFK3.js +1 -0
  396. package/frontend/build/static/useId-Bg4oXGUa.js +1 -0
  397. package/frontend/build/static/{useImpactMetrics-9qDSEpTn.js → useImpactMetrics-DXxTQl6p.js} +2 -2
  398. package/frontend/build/static/{useImpactMetricsEnabled-wRNO6-Oh.js → useImpactMetricsEnabled-B3om8V0b.js} +1 -1
  399. package/frontend/build/static/{useInstanceTrafficMetrics-CRCDB4TX.js → useInstanceTrafficMetrics-DkgcWjVM.js} +1 -1
  400. package/frontend/build/static/useLocationSettings-vlEPA_j3.js +1 -0
  401. package/frontend/build/static/useMediaQuery-BFm2lR-0.js +2 -0
  402. package/frontend/build/static/useOptionalPathParam-Cmh3Ejbi.js +1 -0
  403. package/frontend/build/static/{usePageTitle-CHzzFshF.js → usePageTitle-DD1IHvCw.js} +1 -1
  404. package/frontend/build/static/useSlot-Ce59-xJL.js +1 -0
  405. package/frontend/build/static/useSlotProps-v77xI-e5.js +1 -0
  406. package/frontend/build/static/useTheme-CTychWp2.js +10 -0
  407. package/frontend/build/static/useTimeout-B2sc1jSE.js +1 -0
  408. package/frontend/build/static/useToast-BUHn_9TC.js +1 -0
  409. package/frontend/build/static/{useUiConfig-DbVjTDpE.js → useUiConfig-BcfEDPWc.js} +1 -1
  410. package/frontend/build/static/useUiFlag-PbKW1iMa.js +1 -0
  411. package/frontend/package.json +13 -14
  412. package/package.json +6 -5
  413. package/frontend/build/static/AccordionSummary-wye3oOm6.js +0 -1
  414. package/frontend/build/static/AdvancedPlayground-DdeMb-6I.js +0 -3
  415. package/frontend/build/static/Alert-_bLyWbvx.js +0 -1
  416. package/frontend/build/static/BackendConnections-kgR0xyIH.js +0 -1
  417. package/frontend/build/static/Box-BQsxfFmC.js +0 -1
  418. package/frontend/build/static/Button-CebB8EPB.js +0 -1
  419. package/frontend/build/static/CircularProgress-C_LUU3DK.js +0 -101
  420. package/frontend/build/static/Close-DyTASMSq.js +0 -1
  421. package/frontend/build/static/Collapse-DPPTUMpf.js +0 -1
  422. package/frontend/build/static/ConditionallyRender---uTpMBn.js +0 -1
  423. package/frontend/build/static/CreateProject-BSlg0WYM.js +0 -1
  424. package/frontend/build/static/Dialog-C-xQxqWX.js +0 -1
  425. package/frontend/build/static/DialogWithAside-DzCSDyWo.js +0 -1110
  426. package/frontend/build/static/Divider-CsdWvu5F.js +0 -1
  427. package/frontend/build/static/EnterpriseEdge-CjslqYDM.js +0 -6
  428. package/frontend/build/static/FeatureMetricsChart-B4WryxcW.js +0 -2
  429. package/frontend/build/static/FeatureStaleDialog-EzReRTI5.js +0 -8
  430. package/frontend/build/static/FileCopy-B8HZEA83.js +0 -1
  431. package/frontend/build/static/FlagMetricsChart-hNQuwOxW.js +0 -2
  432. package/frontend/build/static/FormControlLabel-F5gDLixN.js +0 -1
  433. package/frontend/build/static/FrontendNetworkTrafficUsage-pcr83PWo.js +0 -1
  434. package/frontend/build/static/Grow-BIbmvKVy.js +0 -1
  435. package/frontend/build/static/HelpOutlineOutlined-CpMsVJZu.js +0 -1
  436. package/frontend/build/static/Highlighter-MomUaQww.js +0 -1
  437. package/frontend/build/static/HtmlTooltip-B9jv1G1R.js +0 -1
  438. package/frontend/build/static/ImpactMetricsPage-DGH_S9oz.js +0 -1
  439. package/frontend/build/static/ImpactViewsPage-DZqKPFvE.js +0 -1
  440. package/frontend/build/static/LazyAdminExport-B1ReAViz.js +0 -38
  441. package/frontend/build/static/LazyProjectExport-BMVcGpNI.js +0 -46
  442. package/frontend/build/static/LifecycleChartComponent-BeoRUO9q.js +0 -2
  443. package/frontend/build/static/LineChartComponent-BbCMbJ-m.js +0 -1
  444. package/frontend/build/static/Link-CfIScd2f.js +0 -1
  445. package/frontend/build/static/Loader-DdgXftPc.js +0 -1
  446. package/frontend/build/static/MarkCompletedDialogue-CcXyp8UE.js +0 -1
  447. package/frontend/build/static/NetworkOverview-0mBnFAZX.js +0 -1
  448. package/frontend/build/static/NetworkTraffic-DmG5Iv25.js +0 -1
  449. package/frontend/build/static/NetworkTrafficUsage-DccaVLYs.js +0 -1
  450. package/frontend/build/static/OnboardingProgress-Bp9sZ-ZM.js +0 -1
  451. package/frontend/build/static/PageContent-c0NDm5oD.js +0 -1
  452. package/frontend/build/static/PercentageDonut-DBDGNJlh.js +0 -1
  453. package/frontend/build/static/PermissionButton-B-IfzChn.js +0 -1
  454. package/frontend/build/static/Popover-CUTnSn2h.js +0 -1
  455. package/frontend/build/static/Radio-DL8ja0ll.js +0 -1
  456. package/frontend/build/static/RadioGroup-Ci3WHaOy.js +0 -1
  457. package/frontend/build/static/ReactJSONEditor-DeBI7JPg.js +0 -4
  458. package/frontend/build/static/RoleCell-DhYvu4YH.js +0 -1
  459. package/frontend/build/static/Safeguard-DErU6fSK.js +0 -1
  460. package/frontend/build/static/SelectSdk-Dr_pzQgX.js +0 -2
  461. package/frontend/build/static/StoriesPage-frGP1Bfr.js +0 -2
  462. package/frontend/build/static/SwitchBase-DWPIxZnN.js +0 -1
  463. package/frontend/build/static/TextField-oipjeg6n.js +0 -3
  464. package/frontend/build/static/Tooltip-BaILXXti.js +0 -1
  465. package/frontend/build/static/TooltipResolver-4A1YhwBy.js +0 -1
  466. package/frontend/build/static/Truncator-D2bO9ub6.js +0 -1
  467. package/frontend/build/static/Typography-BTdLWIUX.js +0 -1
  468. package/frontend/build/static/aggregateFeatureMetrics-B-67HaIZ.js +0 -1
  469. package/frontend/build/static/chartjs-plugin-annotation.esm-DP4wCpdA.js +0 -1
  470. package/frontend/build/static/chunk-QUQL4437-Dr42NpoL.js +0 -3
  471. package/frontend/build/static/createBox-Cf2UJsmc.js +0 -1
  472. package/frontend/build/static/createSimplePaletteValueFilter-BRAMrHWJ.js +0 -1
  473. package/frontend/build/static/dividerClasses-Cc45lyWo.js +0 -1
  474. package/frontend/build/static/esm-DdgY1Q5s.js +0 -12
  475. package/frontend/build/static/httpErrorResponseHandler-FMtt7Zqh.js +0 -1
  476. package/frontend/build/static/index-C04TEs4k.js +0 -290
  477. package/frontend/build/static/networkTrafficUsageHighlightPlugin-DlOtHZg3.js +0 -1
  478. package/frontend/build/static/react-GZhdek4G.js +0 -1
  479. package/frontend/build/static/useApiGetter-7FP8Avm4.js +0 -1
  480. package/frontend/build/static/useApiTokens-C8Dqw_X1.js +0 -1
  481. package/frontend/build/static/useConditionalSWR-DGgzun6i.js +0 -1
  482. package/frontend/build/static/useConditionallyHiddenColumns-C5q9zdfJ.js +0 -5
  483. package/frontend/build/static/useCustomEvent-Dj2V5RVb.js +0 -1
  484. package/frontend/build/static/useEnvironments-CTguhgy0.js +0 -2
  485. package/frontend/build/static/useGroupedImpactMetricsData-CW9qnV2y.js +0 -1
  486. package/frontend/build/static/useMediaQuery-DGx8zAkf.js +0 -2
  487. package/frontend/build/static/useOptionalPathParam-Cx3ru9yC.js +0 -1
  488. package/frontend/build/static/useTheme-CQqAmDLr.js +0 -9
@@ -1,2 +0,0 @@
1
- import{o as e,t}from"./react-GZhdek4G.js";import{t as n}from"./useTheme-CQqAmDLr.js";import{t as r}from"./jsx-runtime-BnvnyDTF.js";import{$t as i,En as a,Ft as o,Gt as s,Jt as c,Kt as l,Nn as u,On as d,Qt as f,Tn as p,_n as m,en as h,f as g,fn as _,in as v,kn as y,mn as ee,nn as te,ns as ne,qt as b,tn as re,wn as ie,xn as x}from"./index-C04TEs4k.js";var ae=e(t(),1),oe=e(g(),1),S=function(){if(typeof window<`u`){if(window.devicePixelRatio)return window.devicePixelRatio;var e=window.screen;if(e)return(e.deviceXDPI||1)/(e.logicalXDPI||1)}return 1}(),C={toTextLines:function(e){var t=[],n;for(e=[].concat(e);e.length;)n=e.pop(),typeof n==`string`?t.unshift.apply(t,n.split(`
2
- `)):Array.isArray(n)?e.push.apply(e,n):x(e)||t.unshift(``+n);return t},textSize:function(e,t,n){var r=[].concat(t),i=r.length,a=e.font,o=0,s;for(e.font=n.string,s=0;s<i;++s)o=Math.max(e.measureText(r[s]).width,o);return e.font=a,{height:i*n.lineHeight,width:o}},bound:function(e,t,n){return Math.max(e,Math.min(t,n))},arrayDiff:function(e,t){var n=e.slice(),r=[],i,a,o,s;for(i=0,o=t.length;i<o;++i)s=t[i],a=n.indexOf(s),a===-1?r.push([s,1]):n.splice(a,1);for(i=0,o=n.length;i<o;++i)r.push([n[i],-1]);return r},rasterize:function(e){return Math.round(e*S)/S}};function w(e,t){var n=t.x,r=t.y;if(n===null)return{x:0,y:-1};if(r===null)return{x:1,y:0};var i=e.x-n,a=e.y-r,o=Math.sqrt(i*i+a*a);return{x:o?i/o:0,y:o?a/o:-1}}function se(e,t,n,r,i){switch(i){case`center`:n=r=0;break;case`bottom`:n=0,r=1;break;case`right`:n=1,r=0;break;case`left`:n=-1,r=0;break;case`top`:n=0,r=-1;break;case`start`:n=-n,r=-r;break;case`end`:break;default:i*=Math.PI/180,n=Math.cos(i),r=Math.sin(i);break}return{x:e,y:t,vx:n,vy:r}}var T=0,E=1,D=2,O=4,k=8;function A(e,t,n){var r=T;return e<n.left?r|=E:e>n.right&&(r|=D),t<n.top?r|=k:t>n.bottom&&(r|=O),r}function ce(e,t){for(var n=e.x0,r=e.y0,i=e.x1,a=e.y1,o=A(n,r,t),s=A(i,a,t),c,l,u;!(!(o|s)||o&s);)c=o||s,c&k?(l=n+(i-n)*(t.top-r)/(a-r),u=t.top):c&O?(l=n+(i-n)*(t.bottom-r)/(a-r),u=t.bottom):c&D?(u=r+(a-r)*(t.right-n)/(i-n),l=t.right):c&E&&(u=r+(a-r)*(t.left-n)/(i-n),l=t.left),c===o?(n=l,r=u,o=A(n,r,t)):(i=l,a=u,s=A(i,a,t));return{x0:n,x1:i,y0:r,y1:a}}function j(e,t){var n=t.anchor,r=e,i,a;return t.clamp&&(r=ce(r,t.area)),n===`start`?(i=r.x0,a=r.y0):n===`end`?(i=r.x1,a=r.y1):(i=(r.x0+r.x1)/2,a=(r.y0+r.y1)/2),se(i,a,e.vx,e.vy,t.align)}var M={arc:function(e,t){var n=(e.startAngle+e.endAngle)/2,r=Math.cos(n),i=Math.sin(n),a=e.innerRadius,o=e.outerRadius;return j({x0:e.x+r*a,y0:e.y+i*a,x1:e.x+r*o,y1:e.y+i*o,vx:r,vy:i},t)},point:function(e,t){var n=w(e,t.origin),r=n.x*e.options.radius,i=n.y*e.options.radius;return j({x0:e.x-r,y0:e.y-i,x1:e.x+r,y1:e.y+i,vx:n.x,vy:n.y},t)},bar:function(e,t){var n=w(e,t.origin),r=e.x,i=e.y,a=0,o=0;return e.horizontal?(r=Math.min(e.x,e.base),a=Math.abs(e.base-e.x)):(i=Math.min(e.y,e.base),o=Math.abs(e.base-e.y)),j({x0:r,y0:i+o,x1:r+a,y1:i,vx:n.x,vy:n.y},t)},fallback:function(e,t){var n=w(e,t.origin);return j({x0:e.x,y0:e.y,x1:e.x+(e.width||0),y1:e.y+(e.height||0),vx:n.x,vy:n.y},t)}},N=C.rasterize;function le(e){var t=e.borderWidth||0,n=e.padding,r=e.size.height,i=e.size.width,a=-i/2,o=-r/2;return{frame:{x:a-n.left-t,y:o-n.top-t,w:i+n.width+t*2,h:r+n.height+t*2},text:{x:a,y:o,w:i,h:r}}}function P(e,t){var n=t.chart.getDatasetMeta(t.datasetIndex).vScale;if(!n)return null;if(n.xCenter!==void 0&&n.yCenter!==void 0)return{x:n.xCenter,y:n.yCenter};var r=n.getBasePixel();return e.horizontal?{x:r,y:null}:{x:null,y:r}}function F(e){return e instanceof s?M.arc:e instanceof i?M.point:e instanceof l?M.bar:M.fallback}function I(e,t,n,r,i,a){var o=Math.PI/2;if(a){var s=Math.min(a,i/2,r/2),c=t+s,l=n+s,u=t+r-s,d=n+i-s;e.moveTo(t,l),c<u&&l<d?(e.arc(c,l,s,-Math.PI,-o),e.arc(u,l,s,-o,0),e.arc(u,d,s,0,o),e.arc(c,d,s,o,Math.PI)):c<u?(e.moveTo(c,n),e.arc(u,l,s,-o,o),e.arc(c,l,s,o,Math.PI+o)):l<d?(e.arc(c,l,s,-Math.PI,0),e.arc(c,d,s,0,Math.PI)):e.arc(c,l,s,-Math.PI,Math.PI),e.closePath(),e.moveTo(t,n)}else e.rect(t,n,r,i)}function L(e,t,n){var r=n.backgroundColor,i=n.borderColor,a=n.borderWidth;!r&&(!i||!a)||(e.beginPath(),I(e,N(t.x)+a/2,N(t.y)+a/2,N(t.w)-a,N(t.h)-a,n.borderRadius),e.closePath(),r&&(e.fillStyle=r,e.fill()),i&&a&&(e.strokeStyle=i,e.lineWidth=a,e.lineJoin=`miter`,e.stroke()))}function R(e,t,n){var r=n.lineHeight,i=e.w,a=e.x,o=e.y+r/2;return t===`center`?a+=i/2:(t===`end`||t===`right`)&&(a+=i),{h:r,w:i,x:a,y:o}}function z(e,t,n){var r=e.shadowBlur,i=n.stroked,a=N(n.x),o=N(n.y),s=N(n.w);i&&e.strokeText(t,a,o,s),n.filled&&(r&&i&&(e.shadowBlur=0),e.fillText(t,a,o,s),r&&i&&(e.shadowBlur=r))}function B(e,t,n,r){var i=r.textAlign,a=r.color,o=!!a,s=r.font,c=t.length,l=r.textStrokeColor,u=r.textStrokeWidth,d=l&&u,f;if(!(!c||!o&&!d))for(n=R(n,i,s),e.font=s.string,e.textAlign=i,e.textBaseline=`middle`,e.shadowBlur=r.textShadowBlur,e.shadowColor=r.textShadowColor,o&&(e.fillStyle=a),d&&(e.lineJoin=`round`,e.lineWidth=u,e.strokeStyle=l),f=0,c=t.length;f<c;++f)z(e,t[f],{stroked:d,filled:o,w:n.w,x:n.x,y:n.y+n.h*f})}var V=function(e,t,n,r){var i=this;i._config=e,i._index=r,i._model=null,i._rects=null,i._ctx=t,i._el=n};p(V.prototype,{_modelize:function(e,t,n,r){var i=this,o=i._index,s=d(a([n.font,{}],r,o)),c=a([n.color,ee.color],r,o);return{align:a([n.align,`center`],r,o),anchor:a([n.anchor,`center`],r,o),area:r.chart.chartArea,backgroundColor:a([n.backgroundColor,null],r,o),borderColor:a([n.borderColor,null],r,o),borderRadius:a([n.borderRadius,0],r,o),borderWidth:a([n.borderWidth,0],r,o),clamp:a([n.clamp,!1],r,o),clip:a([n.clip,!1],r,o),color:c,display:e,font:s,lines:t,offset:a([n.offset,4],r,o),opacity:a([n.opacity,1],r,o),origin:P(i._el,r),padding:y(a([n.padding,4],r,o)),positioner:F(i._el),rotation:a([n.rotation,0],r,o)*(Math.PI/180),size:C.textSize(i._ctx,t,s),textAlign:a([n.textAlign,`start`],r,o),textShadowBlur:a([n.textShadowBlur,0],r,o),textShadowColor:a([n.textShadowColor,c],r,o),textStrokeColor:a([n.textStrokeColor,c],r,o),textStrokeWidth:a([n.textStrokeWidth,0],r,o)}},update:function(e){var t=this,n=null,r=null,i=t._index,o=t._config,s,c,l,d=a([o.display,!0],e,i);d&&(s=e.dataset.data[i],c=u(_(o.formatter,[s,e]),s),l=x(c)?[]:C.toTextLines(c),l.length&&(n=t._modelize(d,l,o,e),r=le(n))),t._model=n,t._rects=r},geometry:function(){return this._rects?this._rects.frame:{}},rotation:function(){return this._model?this._model.rotation:0},visible:function(){return this._model&&this._model.opacity},model:function(){return this._model},draw:function(e,t){var n=this,r=e.ctx,i=n._model,a=n._rects,o;this.visible()&&(r.save(),i.clip&&(o=i.area,r.beginPath(),r.rect(o.left,o.top,o.right-o.left,o.bottom-o.top),r.clip()),r.globalAlpha=C.bound(0,i.opacity,1),r.translate(N(t.x),N(t.y)),r.rotate(i.rotation),L(r,a.frame,i),B(r,i.lines,a.text,i),r.restore())}});var H=-(2**53-1)||-9007199254740991,U=2**53-1||9007199254740991;function W(e,t,n){var r=Math.cos(n),i=Math.sin(n),a=t.x,o=t.y;return{x:a+r*(e.x-a)-i*(e.y-o),y:o+i*(e.x-a)+r*(e.y-o)}}function G(e,t){var n=U,r=H,i=t.origin,a,o,s,c,l;for(a=0;a<e.length;++a)o=e[a],s=o.x-i.x,c=o.y-i.y,l=t.vx*s+t.vy*c,n=Math.min(n,l),r=Math.max(r,l);return{min:n,max:r}}function K(e,t){var n=t.x-e.x,r=t.y-e.y,i=Math.sqrt(n*n+r*r);return{vx:(t.x-e.x)/i,vy:(t.y-e.y)/i,origin:e,ln:i}}var q=function(){this._rotation=0,this._rect={x:0,y:0,w:0,h:0}};p(q.prototype,{center:function(){var e=this._rect;return{x:e.x+e.w/2,y:e.y+e.h/2}},update:function(e,t,n){this._rotation=n,this._rect={x:t.x+e.x,y:t.y+e.y,w:t.w,h:t.h}},contains:function(e){var t=this,n=1,r=t._rect;return e=W(e,t.center(),-t._rotation),!(e.x<r.x-n||e.y<r.y-n||e.x>r.x+r.w+n*2||e.y>r.y+r.h+n*2)},intersects:function(e){var t=this._points(),n=e._points(),r=[K(t[0],t[1]),K(t[0],t[3])],i,a,o;for(this._rotation!==e._rotation&&r.push(K(n[0],n[1]),K(n[0],n[3])),i=0;i<r.length;++i)if(a=G(t,r[i]),o=G(n,r[i]),a.max<o.min||o.max<a.min)return!1;return!0},_points:function(){var e=this,t=e._rect,n=e._rotation,r=e.center();return[W({x:t.x,y:t.y},r,n),W({x:t.x+t.w,y:t.y},r,n),W({x:t.x+t.w,y:t.y+t.h},r,n),W({x:t.x,y:t.y+t.h},r,n)]}});function J(e,t,n){var r=t.positioner(e,t),i=r.vx,a=r.vy;if(!i&&!a)return{x:r.x,y:r.y};var o=n.w,s=n.h,c=t.rotation,l=Math.abs(o/2*Math.cos(c))+Math.abs(s/2*Math.sin(c)),u=Math.abs(o/2*Math.sin(c))+Math.abs(s/2*Math.cos(c)),d=1/Math.max(Math.abs(i),Math.abs(a));return l*=i*d,u*=a*d,l+=t.offset*i,u+=t.offset*a,{x:r.x+l,y:r.y+u}}function ue(e,t){var n,r,i,a;for(n=e.length-1;n>=0;--n)for(i=e[n].$layout,r=n-1;r>=0&&i._visible;--r)a=e[r].$layout,a._visible&&i._box.intersects(a._box)&&t(i,a);return e}function de(e){var t,n,r,i,a,o,s;for(t=0,n=e.length;t<n;++t)r=e[t],i=r.$layout,i._visible&&(s=new Proxy(r._el,{get:(e,t)=>e.getProps([t],!0)[t]}),a=r.geometry(),o=J(s,r.model(),a),i._box.update(o,a,r.rotation()));return ue(e,function(e,t){var n=e._hidable,r=t._hidable;n&&r||r?t._visible=!1:n&&(e._visible=!1)})}var Y={prepare:function(e){var t=[],n,r,i,a,o;for(n=0,i=e.length;n<i;++n)for(r=0,a=e[n].length;r<a;++r)o=e[n][r],t.push(o),o.$layout={_box:new q,_hidable:!1,_visible:!0,_set:n,_idx:o._index};return t.sort(function(e,t){var n=e.$layout,r=t.$layout;return n._idx===r._idx?r._set-n._set:r._idx-n._idx}),this.update(t),t},update:function(e){var t=!1,n,r,i,a,o;for(n=0,r=e.length;n<r;++n)i=e[n],a=i.model(),o=i.$layout,o._hidable=a&&a.display===`auto`,o._visible=i.visible(),t|=o._hidable;t&&de(e)},lookup:function(e,t){var n,r;for(n=e.length-1;n>=0;--n)if(r=e[n].$layout,r&&r._visible&&r._box.contains(t))return e[n];return null},draw:function(e,t){var n,r,i,a,o,s;for(n=0,r=t.length;n<r;++n)i=t[n],a=i.$layout,a._visible&&(o=i.geometry(),s=J(i._el,i.model(),o),a._box.update(s,o,i.rotation()),i.draw(e,s))}},fe={align:`center`,anchor:`center`,backgroundColor:null,borderColor:null,borderRadius:0,borderWidth:0,clamp:!1,clip:!1,color:void 0,display:!0,font:{family:void 0,lineHeight:1.2,size:void 0,style:void 0,weight:null},formatter:function(e){if(x(e))return null;var t=e,n,r,i;if(ie(e))if(!x(e.label))t=e.label;else if(!x(e.r))t=e.r;else for(t=``,n=Object.keys(e),i=0,r=n.length;i<r;++i)t+=(i===0?``:`, `)+n[i]+`: `+e[n[i]];return``+t},labels:void 0,listeners:{},offset:4,opacity:1,padding:{top:4,right:4,bottom:4,left:4},rotation:0,textAlign:`start`,textStrokeColor:void 0,textStrokeWidth:0,textShadowBlur:0,textShadowColor:void 0},X=`$datalabels`,Z=`$default`;function pe(e,t){var n=e.datalabels,r={},i=[],a,o;return n===!1?null:(n===!0&&(n={}),t=p({},[t,n]),a=t.labels||{},o=Object.keys(a),delete t.labels,o.length?o.forEach(function(e){a[e]&&i.push(p({},[t,a[e],{_key:e}]))}):i.push(t),r=i.reduce(function(e,t){return m(t.listeners||{},function(n,r){e[r]=e[r]||{},e[r][t._key||Z]=n}),delete t.listeners,e},{}),{labels:i,listeners:r})}function Q(e,t,n,r){if(t){var i=n.$context,a=n.$groups,o;t[a._set]&&(o=t[a._set][a._key],o&&_(o,[i,r])===!0&&(e[X]._dirty=!0,n.update(i)))}}function me(e,t,n,r,i){var a,o;!n&&!r||(n?r?n!==r&&(o=a=!0):o=!0:a=!0,o&&Q(e,t.leave,n,i),a&&Q(e,t.enter,r,i))}function he(e,t){var n=e[X],r=n._listeners,i,a;if(!(!r.enter&&!r.leave)){if(t.type===`mousemove`)a=Y.lookup(n._labels,t);else if(t.type!==`mouseout`)return;i=n._hovered,n._hovered=a,me(e,r,i,a,t)}}function ge(e,t){var n=e[X],r=n._listeners.click,i=r&&Y.lookup(n._labels,t);i&&Q(e,r,i,t)}var _e={id:`datalabels`,defaults:fe,beforeInit:function(e){e[X]={_actives:[]}},beforeUpdate:function(e){var t=e[X];t._listened=!1,t._listeners={},t._datasets=[],t._labels=[]},afterDatasetUpdate:function(e,t,n){var r=t.index,i=e[X],a=i._datasets[r]=[],o=e.isDatasetVisible(r),s=e.data.datasets[r],c=pe(s,n),l=t.meta.data||[],u=e.ctx,d,f,m,h,g,_,v,y;for(u.save(),d=0,m=l.length;d<m;++d)if(v=l[d],v[X]=[],o&&v&&e.getDataVisibility(d)&&!v.skip)for(f=0,h=c.labels.length;f<h;++f)g=c.labels[f],_=g._key,y=new V(g,u,v,d),y.$groups={_set:r,_key:_||Z},y.$context={active:!1,chart:e,dataIndex:d,dataset:s,datasetIndex:r},y.update(y.$context),v[X].push(y),a.push(y);u.restore(),p(i._listeners,c.listeners,{merger:function(e,n,r){n[e]=n[e]||{},n[e][t.index]=r[e],i._listened=!0}})},afterUpdate:function(e){e[X]._labels=Y.prepare(e[X]._datasets)},afterDatasetsDraw:function(e){Y.draw(e,e[X]._labels)},beforeEvent:function(e,t){if(e[X]._listened){var n=t.event;switch(n.type){case`mousemove`:case`mouseout`:he(e,n);break;case`click`:ge(e,n);break}}},afterEvent:function(e){var t=e[X],n=t._actives,r=t._actives=e.getActiveElements(),i=C.arrayDiff(n,r),a,o,s,c,l,u,d;for(a=0,o=i.length;a<o;++a)if(l=i[a],l[1])for(d=l[0].element[X]||[],s=0,c=d.length;s<c;++s)u=d[s],u.$context.active=l[1]===1,u.update(u.$context);(t._dirty||i.length)&&(Y.update(t._labels),e.render()),delete t._dirty}},ve=r(),$=e=>({plugins:{legend:{position:`right`,maxWidth:150,align:`start`,labels:{color:e.palette.text.secondary,usePointStyle:!0,padding:21,boxHeight:8,font:{size:10}}},datalabels:{color:e.palette.text.primary,font:{weight:`bold`,size:10},anchor:`end`,align:`top`,offset:-6}},responsive:!0,maintainAspectRatio:!1,color:e.palette.text.secondary,scales:{y:{beginAtZero:!0,grid:{color:e.palette.divider},border:{display:!1},ticks:{stepSize:1,color:e.palette.text.disabled,font:{size:10}}},x:{grid:{display:!1},ticks:{color:e.palette.text.primary,font:{size:10}}}}});function ye(e){return oe.default.all(e.filter(e=>e))}var be=({data:e,ariaLabel:t,ariaDescription:r,overrideOptions:i})=>{let a=n(),{locationSettings:s}=ne();return(0,ve.jsx)(o,{options:(0,ae.useMemo)(()=>ye([$(a)]),[a,s,i]),data:e,"aria-label":t,"aria-description":r,plugins:[_e]})};c.register(b,f,i,l,h,v,te,re);export{$ as createOptions,be as default};
@@ -1 +0,0 @@
1
- import{o as e,t}from"./react-GZhdek4G.js";import{t as n}from"./useTheme-CQqAmDLr.js";import{t as r}from"./jsx-runtime-BnvnyDTF.js";import{v as i}from"./createSimplePaletteValueFilter-BRAMrHWJ.js";import{t as a}from"./ConditionallyRender---uTpMBn.js";import{$t as o,Bt as s,It as c,Jt as l,Lt as u,Pt as d,Qt as f,Rt as p,Vt as m,Zt as h,en as g,f as _,in as v,nn as y,ns as b,qt as x,tn as S,zt as C}from"./index-C04TEs4k.js";var w=e(t(),1),T={position:`bottom`,labels:{boxWidth:12,padding:30,generateLabels:e=>{let t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:i,color:a}}=e?.legend?.options||{labels:{}};return e._getSortedDatasetMetas().map(e=>{let o=e.controller.getStyle(n?0:void 0);return{text:t[e.index].label,fillStyle:o.borderColor,fontColor:a,hidden:!e.visible,lineWidth:0,borderRadius:6,strokeStyle:o.borderColor,pointStyle:r||o.pointStyle,textAlign:i||o.textAlign,datasetIndex:e.index}})}}},E=(e,t,n,r)=>({responsive:!0,...r?{animation:{duration:0}}:{},plugins:{legend:{...T,display:!r},tooltip:{enabled:!1,position:`nearest`,external:s(n)}},locale:t.locale,interaction:{intersect:!1,axis:`xy`,mode:`nearest`},elements:{point:{radius:0,hitRadius:15}},color:e.palette.text.secondary,scales:{y:{beginAtZero:!0,type:`linear`,grid:{color:e.palette.divider},border:{color:e.palette.divider},ticks:{color:e.palette.text.secondary,display:!r,precision:0}},x:{adapters:{date:{locale:m(t.locale)}},type:`time`,time:{unit:`week`,tooltipFormat:`P`},grid:{color:`transparent`},border:{color:`transparent`},ticks:{color:e.palette.text.secondary,display:!r,source:`data`,maxRotation:90,minRotation:23.5}}}}),D=e(_(),1),O=r(),k=i(`div`)(({theme:e})=>({position:`relative`}));function A(e){return D.default.all(e.filter(e=>e))}var j=({data:e,aspectRatio:t=2.5,cover:r,overrideOptions:i,TooltipComponent:o,chartRef:s})=>{let l=n(),{locationSettings:f}=b(),[m,h]=(0,w.useState)(null);return(0,O.jsxs)(k,{children:[(0,O.jsx)(c,{ref:e=>{s?.(e??null)},options:(0,w.useMemo)(()=>A([E(l,f,h,!!r),i??{}]),[l,f,h,i,r]),data:e,plugins:[u({width:26})],height:100,width:100*t},r?`cover`:`chart`),(0,O.jsx)(a,{condition:!r,show:o?(0,O.jsx)(C,{tooltip:m,children:(0,O.jsx)(o,{tooltip:m})}):(0,O.jsx)(p,{tooltip:m}),elseShow:(0,O.jsx)(d,{children:r===!0?` `:r})})]})};l.register(x,f,o,h,g,v,y,S);export{j as default};
@@ -1 +0,0 @@
1
- import{o as e,t}from"./react-GZhdek4G.js";import{_ as n,s as r,t as i}from"./useTheme-CQqAmDLr.js";import{t as a}from"./jsx-runtime-BnvnyDTF.js";import{D as o,O as s,_ as c,h as l,k as u,m as d,n as f,t as p,v as m,x as h}from"./createSimplePaletteValueFilter-BRAMrHWJ.js";import{t as g}from"./Typography-BTdLWIUX.js";var _=e(t(),1);function v(e){return s(`MuiLink`,e)}var y=o(`MuiLink`,[`root`,`underlineNone`,`underlineHover`,`underlineAlways`,`button`,`focusVisible`]),b=({theme:e,ownerState:t})=>{let i=t.color;if(`colorSpace`in e&&e.colorSpace){let r=n(e,`palette.${i}.main`)||n(e,`palette.${i}`)||t.color;return e.alpha(r,.4)}let a=n(e,`palette.${i}.main`,!1)||n(e,`palette.${i}`,!1)||t.color,o=n(e,`palette.${i}.mainChannel`)||n(e,`palette.${i}Channel`);return`vars`in e&&o?`rgba(${o} / 0.4)`:r(a,.4)},x=a(),S={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},C=e=>{let{classes:t,component:n,focusVisible:r,underline:i}=e;return h({root:[`root`,`underline${c(i)}`,n===`button`&&`button`,r&&`focusVisible`]},v,t)},w=m(g,{name:`MuiLink`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`underline${c(n.underline)}`],n.component===`button`&&t.button]}})(l(({theme:e})=>({variants:[{props:{underline:`none`},style:{textDecoration:`none`}},{props:{underline:`hover`},style:{textDecoration:`none`,"&:hover":{textDecoration:`underline`}}},{props:{underline:`always`},style:{textDecoration:`underline`,"&:hover":{textDecorationColor:`inherit`}}},{props:({underline:e,ownerState:t})=>e===`always`&&t.color!==`inherit`,style:{textDecorationColor:`var(--Link-underlineColor)`}},{props:({underline:e,ownerState:t})=>e===`always`&&t.color===`inherit`,style:e.colorSpace?{textDecorationColor:e.alpha(`currentColor`,.4)}:null},...Object.entries(e.palette).filter(p()).map(([t])=>({props:{underline:`always`,color:t},style:{"--Link-underlineColor":e.alpha((e.vars||e).palette[t].main,.4)}})),{props:{underline:`always`,color:`textPrimary`},style:{"--Link-underlineColor":e.alpha((e.vars||e).palette.text.primary,.4)}},{props:{underline:`always`,color:`textSecondary`},style:{"--Link-underlineColor":e.alpha((e.vars||e).palette.text.secondary,.4)}},{props:{underline:`always`,color:`textDisabled`},style:{"--Link-underlineColor":(e.vars||e).palette.text.disabled}},{props:{component:`button`},style:{position:`relative`,WebkitTapHighlightColor:`transparent`,backgroundColor:`transparent`,outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:`pointer`,userSelect:`none`,verticalAlign:`middle`,MozAppearance:`none`,WebkitAppearance:`none`,"&::-moz-focus-inner":{borderStyle:`none`},[`&.${y.focusVisible}`]:{outline:`auto`}}}]}))),T=_.forwardRef(function(e,t){let n=d({props:e,name:`MuiLink`}),r=i(),{className:a,color:o=`primary`,component:s=`a`,onBlur:c,onFocus:l,TypographyClasses:p,underline:m=`always`,variant:h=`inherit`,sx:g,...v}=n,[y,T]=_.useState(!1),E=e=>{f(e.target)||T(!1),c&&c(e)},D=e=>{f(e.target)&&T(!0),l&&l(e)},O={...n,color:o,component:s,focusVisible:y,underline:m,variant:h};return(0,x.jsx)(w,{color:o,className:u(C(O).root,a),classes:p,component:s,onBlur:E,onFocus:D,ref:t,ownerState:O,variant:h,...v,sx:[...S[o]===void 0?[{color:o}]:[],...Array.isArray(g)?g:[g]],style:{...v.style,...m===`always`&&o!==`inherit`&&!S[o]&&{"--Link-underlineColor":b({theme:r,ownerState:O})}}})});export{T as t};
@@ -1 +0,0 @@
1
- import{o as e,t}from"./react-GZhdek4G.js";import{t as n}from"./jsx-runtime-BnvnyDTF.js";import{v as r}from"./createSimplePaletteValueFilter-BRAMrHWJ.js";import{t as i,u as a,y as o}from"./httpErrorResponseHandler-FMtt7Zqh.js";import{n as s,r as c}from"./formatPath-j72gcKwy.js";import{n as l}from"./useImpactMetrics-9qDSEpTn.js";var u=e(t(),1),d=(e={})=>{let t=`api/admin/projects${e.archived?`?archived=true`:``}`,{observe:n}=l(`project_list_load_ms`,`Client-side load time for the project list`,[50,100,200,500,1e3,2e3,5e3]),{data:r,error:c}=a(t,()=>{let e=s(t),r=performance.now();return fetch(e,{method:`GET`}).then(i(`Projects`)).then(e=>(n(performance.now()-r),e.json()))},e),[d,f]=(0,u.useState)(!c&&!r);return(0,u.useEffect)(()=>{f(!c&&!r)},[r,c]),{projects:r?.projects||[],error:c,loading:d,refetch:()=>{o(t)}}},f=`/static/unleashLogoIconDarkAlpha-BbvuC13D.gif`,p=n(),m=r(`div`,{shouldForwardProp:e=>e!==`type`})(({theme:e,type:t})=>({display:`flex`,justifyContent:`center`,alignItems:`center`,height:t===`fullscreen`?`100vh`:`100%`,backgroundColor:e.palette.background.paper})),h=r(`img`)(({theme:e})=>({width:`100px`,height:`100px`})),g=({type:e=`inline`})=>(0,p.jsx)(m,{role:`alert`,"aria-label":`Loading`,type:e,children:(0,p.jsx)(h,{src:c(f),alt:``})});export{d as n,g as t};
@@ -1 +0,0 @@
1
- import{o as e,t}from"./react-GZhdek4G.js";import{r as n}from"./chunk-QUQL4437-Dr42NpoL.js";import{t as r}from"./jsx-runtime-BnvnyDTF.js";import{v as i}from"./createSimplePaletteValueFilter-BRAMrHWJ.js";import{b as a,t as o}from"./TextField-oipjeg6n.js";import{t as s}from"./Radio-DL8ja0ll.js";import{t as c}from"./ConditionallyRender---uTpMBn.js";import{t as l}from"./Alert-_bLyWbvx.js";import{t as u}from"./Typography-BTdLWIUX.js";import{t as d}from"./Box-BQsxfFmC.js";import{t as f}from"./RadioGroup-Ci3WHaOy.js";import{a as p,i as m,o as h}from"./TooltipResolver-4A1YhwBy.js";import{t as g}from"./httpErrorResponseHandler-FMtt7Zqh.js";import{n as _}from"./formatPath-j72gcKwy.js";import{H as v}from"./PermissionButton-B-IfzChn.js";import{n as y,t as b}from"./useApiGetter-7FP8Avm4.js";import{Ai as x,Io as S,Ir as C,Jo as w,Lr as T,Mi as E,Tr as D,Xs as O,co as k,ji as A,ki as j,li as M}from"./index-C04TEs4k.js";var N=e(t(),1),P=e=>fetch(e).then(g(`ChangeRequest`)).then(e=>e.json()),F=(e,t)=>{let{data:n,error:r,mutate:i}=A([],_(`api/admin/projects/${e}/change-requests/scheduled?${t.map(e=>`feature=${e}`).join(`&`)}`),P);return{changeRequests:n,loading:!r&&!n,refetch:i,error:r}},I=r(),L=()=>(0,I.jsx)(l,{severity:`warning`,sx:{m:e=>e.spacing(2,0)},children:`Archiving flags with dependencies will also remove those dependencies.`}),R=({ids:e,projectId:t})=>{let r=e=>`/projects/${t}/features/${e}`;return e?(0,I.jsxs)(l,{severity:`warning`,sx:{m:e=>e.spacing(2,0)},children:[(0,I.jsx)(u,{variant:`body2`,sx:{fontWeight:`bold`,display:`inline`},children:`${e.length} feature flags `}),(0,I.jsx)(`span`,{children:`have usage from applications. If you archive these feature flags they will not be available to Client SDKs:`}),(0,I.jsx)(`ul`,{children:e?.map(e=>(0,I.jsx)(`li`,{children:(0,I.jsx)(n,{to:r(e),children:e})},e))})]}):null},z=({ids:e,projectId:t})=>{let r=e=>`/projects/${t}/features/${e}`;return e&&e.length>1?(0,I.jsxs)(l,{severity:`error`,sx:{m:e=>e.spacing(2,0)},children:[(0,I.jsx)(u,{variant:`body2`,sx:{fontWeight:`bold`,display:`inline`},children:`${e.length} feature flags `}),(0,I.jsx)(`span`,{children:`have child features that depend on them and are not part of the archive operation. These parent features can not be archived:`}),(0,I.jsx)(`ul`,{children:e?.map(e=>(0,I.jsx)(`li`,{children:(0,I.jsx)(n,{to:r(e),children:e})},e))})]}):e&&e.length===1?(0,I.jsxs)(l,{severity:`error`,sx:{m:e=>e.spacing(2,0)},children:[(0,I.jsx)(n,{to:r(e[0]),children:e[0]}),` has child features that depend on it and are not part of the archive operation.`]}):null},B=({changeRequests:e,projectId:t})=>e&&e.length>0?(0,I.jsxs)(l,{severity:`warning`,sx:{m:e=>e.spacing(2,0)},children:[(0,I.jsxs)(`p`,{children:[`This archive operation would conflict with`,` `,e.length,` scheduled change request(s). The change request(s) that would be affected by this are:`]}),(0,I.jsx)(`ul`,{children:e.map(({id:e,title:r})=>{let i=r?`#${e} (${r})`:`Change request #${e}`;return(0,I.jsx)(`li`,{children:(0,I.jsx)(n,{to:`/projects/${t}/change-requests/${e}`,target:`_blank`,rel:`noopener noreferrer`,title:`Change request ${e}`,children:i})},e)})})]}):e===void 0?(0,I.jsx)(l,{severity:`warning`,children:(0,I.jsx)(`p`,{children:`This archive operation might conflict with one or more scheduled change requests. If you complete it, those change requests can no longer be applied.`})}):null,V=(e,t)=>{let n=D(e)(),{isChangeRequestConfiguredForReview:r}=v(e);return n&&r(n)&&t?`Add to change request`:n&&r(n)?`Add change to draft`:t?`Archive flags`:`Archive flag`},H=({projectId:e,featureIds:t,onSuccess:n,onError:r})=>{let{setToastData:i,setToastApiError:a}=p(),{archiveFeatureToggle:o}=j(),{archiveFeatures:s}=k(),{isChangeRequestConfiguredForReview:c}=v(e),{addChange:l}=E(),{refetch:u}=x(e),d=D(e),f=t?.length>1,h=d(),g=async()=>{if(!h){console.error(`No change request environment`);return}await l(e,h,t.map(e=>({action:`archiveFeature`,feature:e,payload:void 0}))),u(),i({type:`success`,text:f?`Changes added to a draft`:`Change added to a draft`})},_=async()=>{await o(e,t[0]),i({type:`success`,text:`Feature flag archived`})},y=async()=>{await s(e,t),i({type:`success`,text:`Feature flags archived`})};return async()=>{try{h&&c(h)?await g():f?await y():await _(),n()}catch(e){a(m(e)),r()}}},U=(e,t,n)=>{let[r,i]=(0,N.useState)(!0),[a,o]=(0,N.useState)([]),[s,c]=(0,N.useState)(!1),{verifyArchiveFeatures:l}=k();return(0,N.useEffect)(()=>{n&&l(t,e).then(e=>e.json()).then(({hasDeletedDependencies:e,parentsWithChildFeatures:t})=>{t.length===0?(i(!1),o(t)):(i(!0),o(t)),c(e)})},[JSON.stringify(e),n,t,o,i,c,l]),{disableArchive:r,offendingParents:a,hasDeletedDependencies:s}},W=({isOpen:e,onClose:t,onConfirm:n,projectId:r,featureIds:i,featuresWithUsage:a})=>{let o=i?.length>1,s=V(r,o),l=o?`Archive feature flags`:`Archive feature flag`,u=H({projectId:r,featureIds:i,onSuccess(){n(),t()},onError(){t()}}),{changeRequests:d}=F(r,i),{disableArchive:f,offendingParents:p,hasDeletedDependencies:m}=U(i,r,e),h=p.length===0&&m;return(0,I.jsx)(w,{onClick:u,open:e,onClose:t,primaryButtonText:s,secondaryButtonText:`Cancel`,title:l,disabledPrimaryButton:f,children:(0,I.jsx)(c,{condition:o,show:(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`p`,{children:[`Are you sure you want to archive`,` `,(0,I.jsx)(`strong`,{children:i?.length}),` feature flags?`]}),(0,I.jsx)(c,{condition:!!(a&&a?.length>0),show:(0,I.jsx)(R,{ids:a,projectId:r})}),(0,I.jsx)(c,{condition:p.length>0,show:(0,I.jsx)(z,{ids:p,projectId:r})}),(0,I.jsx)(c,{condition:h,show:(0,I.jsx)(L,{})}),(0,I.jsx)(B,{changeRequests:d,projectId:r}),(0,I.jsx)(c,{condition:i?.length<=5,show:(0,I.jsx)(`ul`,{children:i?.map(e=>(0,I.jsx)(`li`,{children:e},e))})})]}),elseShow:(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`p`,{children:[`Are you sure you want to archive`,` `,o?`these feature flags`:`this feature flag`,`?`]}),(0,I.jsx)(c,{condition:p.length>0,show:(0,I.jsx)(z,{ids:p,projectId:r})}),(0,I.jsx)(c,{condition:h,show:(0,I.jsx)(L,{})}),(0,I.jsx)(B,{changeRequests:d,projectId:r})]})})})},G=(e,t)=>`/api/admin/projects/${e}/features/${t}/parents`,K=(e,t)=>{let n=_(G(e,t)),{data:r,loading:i,error:a}=y(n,()=>b(n,`Parent Options`));return{parentOptions:r,loading:i,error:a}},q=(e,t)=>`/api/admin/projects/${e}/features/${t}/parent-variants`,J=(e,t)=>{let n=_(q(e,t)),{data:r,loading:i,error:a}=y(n,()=>b(n,`Parent Variant Options`));return{parentVariantOptions:r||[],loading:i,error:a}},Y=i(a)(({theme:e})=>({marginTop:e.spacing(2),marginBottom:e.spacing(1.5)})),X=({project:e,parent:t,onSelect:n})=>{let{parentVariantOptions:r}=J(e,t),i=(0,I.jsx)(T,{fontSize:`small`}),a=(0,I.jsx)(C,{fontSize:`small`});return(0,I.jsx)(Y,{id:`single-variant-options`,options:r,renderOption:(e,t,{selected:n})=>(0,I.jsxs)(`li`,{...e,children:[(0,I.jsx)(O,{icon:i,checkedIcon:a,style:{marginRight:8},checked:n}),t]}),renderInput:e=>(0,I.jsx)(o,{...e,placeholder:`Select variant`}),fullWidth:!0,onChange:(e,t)=>{n(String(t))}})},Z=({projectId:e,featureId:t,isOpen:n,setIsOpen:r,onComplete:i})=>{let{markFeatureCompleted:a}=S(),{parentVariantOptions:o}=J(e,t),[l,p]=(0,N.useState)(`kept`),[m,g]=(0,N.useState)(void 0),{trackEvent:_}=h();return(0,I.jsx)(w,{open:n,title:`Mark completed`,onClose:()=>{r(!1)},disabledPrimaryButton:l===`kept-with-variant`&&m===null,onClick:async()=>{let n=l===`kept-with-variant`?`kept`:l;await a(t,e,{status:n,statusValue:m}),r(!1),i(),_(`feature-lifecycle`,{props:{eventType:`complete`,status:n}})},primaryButtonText:`Mark completed`,secondaryButtonText:`Cancel`,children:(0,I.jsxs)(d,{children:[(0,I.jsxs)(d,{sx:{mt:2,mb:4},children:[`Marking the feature `,(0,I.jsx)(`b`,{children:t}),` as complete does not affect any configuration, but it moves the feature flag into it’s next life cycle stage and is an indication that you have learned what you needed in order to progress with the feature. It serves as a reminder to start cleaning up the feature flag and removing it from the code.`]}),(0,I.jsx)(u,{sx:{mb:2},children:(0,I.jsx)(`b`,{children:`What was the outcome of this feature?`})}),(0,I.jsxs)(f,{"aria-label":`selected-value`,name:`selected`,sx:{gap:e=>e.spacing(.5)},onChange:(e,t)=>{p(t)},children:[(0,I.jsx)(M,{value:`kept`,legal:{value:`We decided to keep the feature`},control:(0,I.jsx)(s,{})},`kept`),(0,I.jsx)(M,{value:`discarded`,legal:{value:`We decided to discard the feature`},control:(0,I.jsx)(s,{})},`discarded`),(0,I.jsx)(c,{condition:o.length>0,show:(0,I.jsx)(M,{value:`kept-with-variant`,legal:{value:`We decided to keep the feature variant`,description:`Choose to specify which feature variant will be kept`},control:(0,I.jsx)(s,{})},`kept-with-variant`)}),(0,I.jsx)(c,{condition:o.length>0&&l===`kept-with-variant`,show:(0,I.jsx)(X,{parent:t,project:e,onSelect:e=>{g(e)}})})]})]})})};export{W as i,K as n,J as r,Z as t};
@@ -1 +0,0 @@
1
- import{o as e,t}from"./react-GZhdek4G.js";import{t as n}from"./useTheme-CQqAmDLr.js";import{t as r}from"./jsx-runtime-BnvnyDTF.js";import{v as i}from"./createSimplePaletteValueFilter-BRAMrHWJ.js";import{t as a}from"./Alert-_bLyWbvx.js";import{t as o}from"./Typography-BTdLWIUX.js";import{t as s}from"./usePageTitle-CHzzFshF.js";import{Ms as c,Ns as l,Ts as u,jt as d}from"./index-C04TEs4k.js";import{t as f}from"./unknownify-CCAQc7w1.js";import{n as p,t as m}from"./NetworkPrometheusAPIWarning-Bq62ygkV.js";var h=d(),g=e(t(),1),_=r(),v=i(`div`)(({theme:e})=>({marginBottom:e.spacing(18),display:`flex`,justifyContent:`center`})),y=i(`div`)(({theme:e})=>({display:`flex`,justifyContent:`center`,gap:e.spacing(4),flexWrap:`wrap`})),b=i(`div`)(({theme:e})=>({borderRadius:e.shape.borderRadiusMedium,border:`1px solid`,borderColor:e.palette.secondary.border,backgroundColor:e.palette.secondary.light,display:`flex`,flexDirection:`column`,alignItems:`center`,padding:e.spacing(1.5),zIndex:1,"& > svg":{width:e.spacing(9),height:e.spacing(9)}})),x=i(o)(({theme:e})=>({fontWeight:e.fontWeight.bold})),S=i(o)(({theme:e})=>({fontSize:e.fontSizes.smallBody,color:e.palette.text.secondary})),C=i(o)(({theme:e})=>({fontSize:e.fontSizes.smallerBody,color:e.palette.text.secondary})),w=e=>e[0]*1e3>Date.now()-6e5,T=e=>{let t=(e.values||[]).filter(e=>w(e)),n=t.length?Number.parseFloat(t[t.length-1][1]):0;return{label:e.label,reqs:n,type:f(e.metric?.endpoint?.split(`/`)[2])}},E=(e,t)=>{let n=t.label+t.type;return e[n]={...t,reqs:t.reqs+(e[n]?.reqs??0)},e},D=e=>{let t=(e?.data?.result?.map(e=>({...e,label:f(e.metric?.appName)})).filter(e=>e.label!==`unknown`)||[]).map(T).reduce(E,{});return Object.values(t).map(e=>({...e,reqs:e.reqs.toFixed(2)})).filter(e=>e.reqs!==`0.00`)??[]},O=()=>{s(`Network - Overview`);let e=n(),{metrics:t}=p(),r=(0,g.useMemo)(()=>D(t),[t]);return r.length===0?(0,_.jsxs)(a,{severity:`warning`,children:[`No data available.`,(0,_.jsx)(m,{})]}):(0,_.jsxs)(h.ArcherContainer,{strokeColor:e.palette.text.primary,endShape:{arrow:{arrowLength:4,arrowThickness:4}},children:[(0,_.jsx)(v,{children:(0,_.jsx)(h.ArcherElement,{id:`unleash`,children:(0,_.jsxs)(b,{children:[(0,_.jsx)(u,{darkmode:(0,_.jsx)(c,{}),lightmode:(0,_.jsx)(l,{})}),(0,_.jsx)(o,{sx:{marginTop:e.spacing(1)},children:`Unleash`})]})})}),(0,_.jsx)(y,{children:r.map(({label:t,reqs:n,type:r},i)=>(0,_.jsx)(h.ArcherElement,{id:`${i}`,relations:[{targetId:`unleash`,targetAnchor:`bottom`,sourceAnchor:`top`,style:{strokeColor:e.palette.secondary.border}}],children:(0,_.jsxs)(b,{children:[(0,_.jsx)(x,{children:t}),(0,_.jsxs)(S,{children:[n,` req/s`]}),(0,_.jsxs)(C,{children:[r,` app`]})]})}))})]})};export{O as NetworkOverview,O as default};
@@ -1 +0,0 @@
1
- import{o as e,t}from"./react-GZhdek4G.js";import{t as n}from"./useTheme-CQqAmDLr.js";import{t as r}from"./jsx-runtime-BnvnyDTF.js";import{t as i}from"./ConditionallyRender---uTpMBn.js";import{t as a}from"./Alert-_bLyWbvx.js";import{t as o}from"./formatDate-cFuM4JYl.js";import{t as s}from"./usePageTitle-CHzzFshF.js";import{$t as c,It as l,Jt as u,Qt as d,Zt as f,en as p,ic as m,in as h,lt as g,nn as _,ns as v,qt as y,rn as b}from"./index-C04TEs4k.js";import{t as x}from"./unknownify-CCAQc7w1.js";import{n as S,t as C}from"./NetworkPrometheusAPIWarning-Bq62ygkV.js";var w=e(t(),1),T=r(),E=[`circle`,`rect`,`rectRounded`,`rectRot`,`triangle`],D=(e,t)=>e.map(e=>({x:e[0],y:t(e[1])})),O=(e,t)=>({locale:t.locale,responsive:!0,maintainAspectRatio:!1,interaction:{mode:`index`,intersect:!1},color:e.palette.text.secondary,plugins:{tooltip:{backgroundColor:e.palette.background.paper,bodyColor:e.palette.text.primary,titleColor:e.palette.action.active,borderColor:e.palette.primary.main,borderWidth:1,padding:10,boxPadding:5,usePointStyle:!0,callbacks:{title:e=>o(1e3*(e[0].parsed.x??0),t.locale)},itemSort:(e,t)=>(t.parsed.y??0)-(e.parsed.y??0)},legend:{position:`bottom`,align:`start`,labels:{boxWidth:10,boxHeight:10,usePointStyle:!0,padding:24}},title:{text:`Top 10 requests per second in the last 6 hours`,position:`top`,align:`start`,display:!0,font:{size:16,weight:400},color:e.palette.text.primary,padding:{bottom:32}}},scales:{y:{type:`linear`,title:{display:!0,text:`Requests per second`,color:e.palette.text.secondary},suggestedMin:0,ticks:{precision:0,color:e.palette.text.secondary},grid:{color:e.palette.divider},border:{color:e.palette.divider}},x:{type:`time`,time:{unit:`minute`},grid:{display:!0,color:e.palette.divider},border:{color:e.palette.divider},ticks:{callback:(e,n,r)=>o(r[n].value*1e3,t.locale)}}}}),k=class{items;picked=new Map;constructor(e){this.items=new g(e)}pick(e){return this.picked.has(e)||this.picked.set(e,this.items.next()),this.picked.get(e)}},A=(e,t)=>{if(t?.data?.result){let n=new k([e.palette.success,e.palette.error,e.palette.primary,e.palette.warning]);return t.data.result.map((e,t)=>{let r=x(e.metric?.endpoint),i=x(e.metric?.appName),a=n.pick(r),o=e.values||[];return{label:`${r}: ${i}`,borderColor:a.main,backgroundColor:a.main,data:D(o,e=>Number.parseFloat(e)),elements:{point:{radius:4,pointStyle:E[t%E.length]},line:{borderDash:[8,4]}}}})}return[]},j=()=>{let{locationSettings:e}=v(),{metrics:t}=S(),r=n(),o=(0,w.useMemo)(()=>O(r,e),[r,e]);s(`Network - Traffic`);let c=(0,w.useMemo)(()=>({datasets:A(r,t)}),[r,t,e]);return(0,T.jsx)(i,{condition:c.datasets.length===0,show:(0,T.jsxs)(a,{severity:`warning`,children:[`No data available.`,(0,T.jsx)(C,{})]}),elseShow:(0,T.jsx)(m,{sx:{display:`grid`,gap:4},children:(0,T.jsx)(`div`,{style:{height:400},children:(0,T.jsx)(l,{data:c,options:o,"aria-label":`An instance metrics line chart with two lines: requests per second for admin API and requests per second for client API`})})})})};u.register(y,d,c,f,p,_,h,b);export{j as NetworkTraffic,j as default};
@@ -1 +0,0 @@
1
- import{o as e,t}from"./react-GZhdek4G.js";import{r as n}from"./chunk-QUQL4437-Dr42NpoL.js";import{t as r}from"./jsx-runtime-BnvnyDTF.js";import{v as i}from"./createSimplePaletteValueFilter-BRAMrHWJ.js";import{t as a}from"./ConditionallyRender---uTpMBn.js";import{t as o}from"./Alert-_bLyWbvx.js";import{t as s}from"./Link-CfIScd2f.js";import{t as c,u as l}from"./httpErrorResponseHandler-FMtt7Zqh.js";import{n as u}from"./formatPath-j72gcKwy.js";import{t as d}from"./useUiConfig-DbVjTDpE.js";import{t as f}from"./usePageTitle-CHzzFshF.js";import{Es as p,Ft as m,Jt as h,Kt as g,Qt as _,in as v,nn as y,ns as b,po as x,qt as S,rn as C,ws as w}from"./index-C04TEs4k.js";import{d as T,s as E}from"./useInstanceTrafficMetrics-CRCDB4TX.js";import{a as D,c as O,i as k,l as A,n as j,r as M,t as N,u as P}from"./networkTrafficUsageHighlightPlugin-DlOtHZg3.js";import{t as F}from"./chartjs-plugin-annotation.esm-DP4wCpdA.js";var I=r(),L=i(`article`)(({theme:e})=>({minWidth:`200px`,border:`2px solid ${e.palette.divider}`,borderRadius:e.shape.borderRadiusLarge,padding:e.spacing(3),display:`flex`,flexDirection:`column`,gap:e.spacing(2)})),R=i(`h3`)(({theme:e})=>({margin:0,fontSize:e.typography.body1.fontSize})),z=i(`dl`)(({theme:e})=>({display:`flex`,flexDirection:`column`,gap:e.spacing(2.5),padding:0,margin:0})),B=i(`div`)(({theme:e})=>({display:`flex`,flexFlow:`row wrap`,justifyContent:`space-between`,gap:e.spacing(1,3),fontSize:e.typography.body2.fontSize,color:e.palette.text.secondary,"& dd":{margin:0,color:e.palette.text.primary}})),V=e=>{let t=e=>e.toLocaleString(`en-US`,{month:`short`,year:`numeric`});if(e.grouping===`monthly`){let n=new Date,r=p(n,e.monthsBack),i=p(n,1);return`Average requests from ${t(r)} to ${t(i)}`}return`Requests used in ${t(T(e.month))}`},H=({period:e,usageTotal:t,includedTraffic:n,purchasedTraffic:r,currentMonth:i})=>{let{locationSettings:a}=b();return(0,I.jsxs)(L,{children:[(0,I.jsx)(R,{children:`Number of requests to Unleash`}),(0,I.jsxs)(z,{children:[(0,I.jsxs)(B,{children:[(0,I.jsx)(`dt`,{children:V(e)}),(0,I.jsx)(`dd`,{children:(0,I.jsxs)(x,{color:n>0?t<=n?`success`:`error`:`neutral`,children:[t.toLocaleString(a.locale??`en-US`),` `,`requests`]})})]}),n>0&&(0,I.jsxs)(B,{children:[(0,I.jsx)(`dt`,{children:`Included in your plan`}),(0,I.jsxs)(`dd`,{children:[n.toLocaleString(`en-US`),` requests`]})]}),r>0&&i&&(0,I.jsxs)(B,{children:[(0,I.jsx)(`dt`,{children:`Additional traffic purchased`}),(0,I.jsxs)(`dd`,{children:[r.toLocaleString(`en-US`),` requests`]})]}),n>0&&i&&(0,I.jsxs)(B,{children:[(0,I.jsx)(`dt`,{children:`Total traffic available`}),(0,I.jsxs)(`dd`,{children:[(n+r).toLocaleString(`en-US`),` `,`requests`]})]})]})]})},U=({overages:e,overageCost:t,estimatedMonthlyCost:n})=>(0,I.jsxs)(L,{children:[(0,I.jsx)(R,{children:`Accrued traffic charges`}),(0,I.jsxs)(z,{children:[(0,I.jsxs)(B,{children:[(0,I.jsxs)(`dt`,{children:[`Request overages this month (`,(0,I.jsx)(s,{href:`https://www.getunleash.io/pricing`,children:`pricing`}),`)`]}),(0,I.jsxs)(`dd`,{children:[e.toLocaleString(),` requests`]})]}),(0,I.jsxs)(B,{children:[(0,I.jsx)(`dt`,{children:`Accrued traffic charges`}),(0,I.jsx)(`dd`,{children:(0,I.jsxs)(x,{color:`secondary`,children:[t,` USD`]})})]}),n>0&&(0,I.jsxs)(B,{children:[(0,I.jsx)(`dt`,{children:`Estimated charges based on current usage`}),(0,I.jsx)(`dd`,{children:(0,I.jsxs)(x,{color:`secondary`,children:[n,` USD`]})})]})]})]}),W=e(t(),1),G=53,K=259,q=1e6,J=(e,t)=>!e||t===`pay-as-you-go`?G:K;function Y(e,t,n){return e===void 0?J(t,n):e}function X(e){return e===void 0?0:e}var Z=()=>{let{isEnterprise:e,uiConfig:t}=d(),{data:n,error:r,mutate:i}=l(u(`/api/instance/trafficBundles`),Q);return{trafficBundles:(0,W.useMemo)(()=>({includedTraffic:Y(n?.includedTraffic,e(),t.billing)*q,purchasedTraffic:X(n?.purchasedTraffic)*q}),[n]),loading:!r&&!n,refetch:i}},Q=e=>fetch(e).then(c(`configuration`)).then(e=>e.json()),$=i(`div`)(({theme:e})=>({display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(200px, max-content))`,flex:1,gap:e.spacing(2,4)})),ee=()=>{f(`Network - Data Usage`);let e=w(`estimateTrafficDataCost`),{isOss:t}=d(),{trafficBundles:r}=Z(),i=r.includedTraffic+r.purchasedTraffic,{chartDataSelection:s,setChartDataSelection:c,options:l}=j(i),{chartData:u,usageTotal:p,overageCost:h,estimatedMonthlyCost:g,requestSummaryUsage:_}=O(i,s),v=s.grouping===`daily`&&s.month===E&&i>0&&p-i>0&&e,y=s.grouping===`daily`&&s.month===E,b=(s.grouping===`monthly`||s.month===E)&&i>0&&h>0;return(0,I.jsx)(a,{condition:t(),show:(0,I.jsx)(o,{severity:`warning`,children:`Not enabled.`}),elseShow:(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(a,{condition:b,show:(0,I.jsxs)(o,{severity:`warning`,sx:{mb:4},children:[(0,I.jsx)(M,{children:`Heads up!`}),` You are currently consuming more requests than your plan includes and will be billed according to our terms. Please see`,` `,(0,I.jsx)(n,{to:`https://www.getunleash.io/pricing`,children:`this page`}),` `,`for more information. In order to reduce your traffic consumption, you may configure an`,` `,(0,I.jsx)(n,{to:`https://docs.getunleash.io/unleash-edge`,children:`Unleash Edge instance`}),` `,`in your own datacenter.`]})}),(0,I.jsxs)(k,{children:[(0,I.jsxs)(D,{children:[(0,I.jsxs)($,{children:[(0,I.jsx)(H,{period:s,usageTotal:_,includedTraffic:r.includedTraffic,purchasedTraffic:r.purchasedTraffic,currentMonth:y}),v&&(0,I.jsx)(U,{overageCost:h,overages:p-i,estimatedMonthlyCost:g})]}),(0,I.jsx)(P,{selectedPeriod:s,setPeriod:c})]}),(0,I.jsx)(m,{data:u,plugins:[N],options:l,"aria-label":A(s)})]})]})})};h.register(F,S,_,g,C,v,y);export{ee as default};
@@ -1 +0,0 @@
1
- import{t as e}from"./jsx-runtime-BnvnyDTF.js";import{v as t}from"./createSimplePaletteValueFilter-BRAMrHWJ.js";import{t as n}from"./Typography-BTdLWIUX.js";import{t as r}from"./Button-CebB8EPB.js";import{$ as i,kt as a}from"./PermissionButton-B-IfzChn.js";import{Ss as o,Ws as s,la as c,ro as l}from"./index-C04TEs4k.js";import{g as u}from"./DialogWithAside-DzCSDyWo.js";var d=e(),f=t(`div`,{shouldForwardProp:e=>e!==`disabled`})(({theme:e,disabled:t})=>({flexBasis:`50%`,display:`flex`,gap:e.spacing(1),flexDirection:`column`,borderRight:`1px solid ${e.palette.divider}`,padding:e.spacing(2,3,3,3),...t&&{background:e.palette.background.elevation2},[e.breakpoints.down(`md`)]:{borderRight:0,borderBottom:`1px solid ${e.palette.divider}`},"&:last-child":{borderWidth:0}})),p=t(`div`)(()=>({display:`flex`,flexDirection:`row`,alignItems:`center`,justifyContent:`space-between`,width:`100%`,minHeight:32})),m=t(`div`)(()=>({width:32,height:32,borderRadius:8,display:`flex`,alignItems:`center`,justifyContent:`center`,"& svg":{fontSize:20},"& svg path":{fill:`currentColor`}})),h=t(m)(({theme:e})=>({backgroundColor:e.palette.primary.light,color:e.palette.primary.contrastText})),g=t(m)(({theme:e})=>({backgroundColor:e.palette.success.light,border:`1px solid ${e.palette.success.border}`,color:e.palette.success.main})),_=t(m)(({theme:e})=>({border:`1px solid ${e.palette.divider}`,background:e.palette.background.elevation1,color:e.palette.text.secondary})),v=t(n)(({theme:e})=>({fontSize:e.typography.caption.fontSize,fontWeight:e.typography.fontWeightBold,lineHeight:e.spacing(2),color:e.palette.text.secondary})),y=t(`div`)(({theme:e})=>({display:`flex`,flexDirection:`column`,flexGrow:1,gap:e.spacing(1)})),b=t(`div`)(({theme:e})=>({display:`flex`,flexDirection:`column`,gap:e.spacing(1)})),x=t(n,{shouldForwardProp:e=>e!==`done`})(({theme:e,done:t})=>({fontSize:e.typography.body1.fontSize,fontWeight:e.typography.fontWeightBold,color:t?e.palette.text.secondary:e.palette.text.primary,textDecoration:t?`line-through`:`none`})),S=t(n)(({theme:e})=>({fontSize:e.typography.body2.fontSize,color:e.palette.text.secondary})),C=t(`div`)(()=>({display:`flex`,alignSelf:`flex-start`,marginTop:`auto`})),w=(e,t)=>e===`done`?(0,d.jsx)(g,{children:(0,d.jsx)(o,{})}):e===`disabled`?(0,d.jsx)(_,{children:t}):(0,d.jsx)(h,{children:t}),T=({stepNumber:e,state:t,icon:n,title:r,body:i,children:a})=>{let o=t===`done`;return(0,d.jsxs)(f,{disabled:t===`disabled`,children:[(0,d.jsxs)(p,{children:[w(t,n),(0,d.jsxs)(v,{children:[`Step `,e]})]}),(0,d.jsxs)(y,{children:[(0,d.jsxs)(b,{children:[(0,d.jsx)(x,{done:o,children:r}),(0,d.jsx)(S,{children:i})]}),(0,d.jsx)(C,{children:a})]})]})},E=({projectId:e,setConnectSdkOpen:t,state:n})=>{let s=n===`done`;return(0,d.jsx)(T,{stepNumber:2,state:n,icon:(0,d.jsx)(u,{}),title:s?`Connect SDK`:`Connect SDKs`,body:s?`You can connect as many SDKs as you need.`:`To start using your feature flag, connect an SDK to the project.`,children:s?(0,d.jsx)(r,{variant:`outlined`,color:`inherit`,startIcon:(0,d.jsx)(o,{}),disabled:!0,children:`Done`}):(0,d.jsx)(c,{onClick:()=>t(!0),maxWidth:`200px`,projectId:e,Icon:l,permission:[a,i],disabled:n===`disabled`,children:`Connect SDK`})})},D=t(`div`)(({theme:e})=>({display:`flex`,flexDirection:`row`,alignItems:`center`,gap:e.spacing(1.5)})),O=t(s)(({theme:e})=>({width:`100px`,height:e.spacing(.5),borderRadius:e.shape.borderRadiusLarge})),k=({step:e,maxSteps:t,onDismiss:n})=>{let i=e>=t,a=e/t*100+10;return(0,d.jsxs)(D,{children:[e,`/`,t,` Completed`,i?(0,d.jsx)(r,{onClick:e=>{e.stopPropagation(),n()},variant:`outlined`,component:`span`,size:`medium`,children:`Dismiss`}):(0,d.jsx)(O,{variant:`determinate`,value:a})]})};export{E as n,T as r,k as t};
@@ -1 +0,0 @@
1
- import{n as e,o as t,t as n}from"./react-GZhdek4G.js";import{t as r}from"./jsx-runtime-BnvnyDTF.js";import{v as i}from"./createSimplePaletteValueFilter-BRAMrHWJ.js";import{n as a,t as o}from"./ConditionallyRender---uTpMBn.js";import{t as s}from"./Typography-BTdLWIUX.js";import{t as c}from"./Divider-CsdWvu5F.js";import{t as l}from"./mui-CoU2c-id.js";import{t as u}from"./usePageTitle-CHzzFshF.js";var d=e(((e,t)=>{(function(){var e={}.hasOwnProperty;function n(){for(var e=``,t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=i(e,r(n)))}return e}function r(t){if(typeof t==`string`||typeof t==`number`)return t;if(typeof t!=`object`)return``;if(Array.isArray(t))return n.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes(`[native code]`))return t.toString();var r=``;for(var a in t)e.call(t,a)&&t[a]&&(r=i(r,a));return r}function i(e,t){return t?e?e+` `+t:e+t:e}t!==void 0&&t.exports?(n.default=n,t.exports=n):typeof define==`function`&&typeof define.amd==`object`&&define.amd?define(`classnames`,[],function(){return n}):window.classNames=n})()})),f=t(d(),1),p=r(),m=i(c)(({theme:e})=>({height:`100%`,borderColor:e.palette.divider,width:`1px`,display:`inline-block`,marginLeft:e.spacing(2),marginRight:e.spacing(2),padding:e.spacing(.5,0),verticalAlign:`middle`})),h=i(`div`)(()=>({display:`flex`,flexDirection:`column`})),g=i(`div`)(()=>({display:`flex`,justifyContent:`space-between`,alignItems:`center`,position:`relative`})),_=i(`div`)(({theme:e})=>({overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,marginRight:e.spacing(5)})),v=i(s)(({theme:e})=>({fontSize:e.fontSizes.mainHeader,lineHeight:e.spacing(5),fontWeight:e.typography.fontWeightBold})),y=i(`div`)(({theme:e})=>({display:`flex`,flexGrow:1,justifyContent:`flex-end`,alignItems:`center`,gap:e.spacing(1)})),b=({title:e,titleElement:t,actions:n,subtitle:r,variant:i,loading:a,className:s=``,secondary:c,children:l})=>{let d=(0,f.default)({skeleton:a});return u(c?``:e),(0,p.jsxs)(h,{children:[(0,p.jsxs)(g,{children:[(0,p.jsxs)(_,{className:(0,f.default)(d),"data-loading":!0,children:[(0,p.jsx)(v,{variant:i||c?`h2`:`h1`,className:(0,f.default)(s),children:t||e}),r&&(0,p.jsx)(`small`,{children:r})]}),(0,p.jsx)(o,{condition:!!n,show:(0,p.jsx)(y,{children:n})})]}),l]})};b.Divider=({sx:e})=>(0,p.jsx)(m,{orientation:`vertical`,variant:`middle`,sx:e});var x=b,S=l()(e=>({headerPadding:{padding:e.spacing(2,4)},withTabs:{padding:e.spacing(0,2),[e.breakpoints.down(`md`)]:{padding:e.spacing(0,1)}},bodyContainer:{padding:e.spacing(4),[e.breakpoints.down(`md`)]:{padding:e.spacing(2)},overflowX:`auto`},paddingDisabled:{padding:`0`},borderDisabled:{border:`none`}})),C=t(n(),1),w=(e,t=`[data-loading=true]`)=>{let n=(0,C.createRef)();return(0,C.useLayoutEffect)(()=>{n.current&&n.current.querySelectorAll(t).forEach(t=>{e?t.classList.add(`skeleton`):setTimeout(()=>t.classList.remove(`skeleton`),10)})},[e,t,n]),n},T=i(`div`)(({theme:e})=>({borderBottomStyle:`solid`,borderBottomWidth:`1px`,borderBottomColor:e.palette.divider,[e.breakpoints.down(`md`)]:{padding:e.spacing(3,2)}})),E=i(a)(({theme:e})=>({borderRadius:e.shape.borderRadiusLarge,boxShadow:`none`})),D=({children:e,isLoading:t})=>(0,p.jsx)(`div`,{ref:w(t),"aria-busy":t,"aria-live":`polite`,children:e}),O=({children:e,header:t,disablePadding:n=!1,disableBorder:r=!1,bodyClass:i=``,headerClass:a=``,isLoading:s=!1,disableLoading:c=!1,className:l,withTabs:u,...d})=>{let{classes:m}=S(),h=(0,f.default)(`header`,a||m.headerPadding,{[m.paddingDisabled]:n,[m.borderDisabled]:r,[m.withTabs]:u}),g=(0,f.default)(`body`,i||m.bodyContainer,{[m.paddingDisabled]:n,[m.borderDisabled]:r}),_=r?{elevation:0}:{},v=(0,p.jsxs)(E,{...d,..._,className:(0,f.default)(l),children:[(0,p.jsx)(o,{condition:!!t,show:(0,p.jsx)(T,{className:h,children:(0,p.jsx)(o,{condition:typeof t==`string`,show:(0,p.jsx)(x,{title:t}),elseShow:t})})}),(0,p.jsx)(`div`,{className:g,children:e})]});return c?(0,p.jsx)(`div`,{children:v}):(0,p.jsx)(D,{isLoading:s,children:v})};export{d as i,w as n,x as r,O as t};
@@ -1 +0,0 @@
1
- import{o as e,t}from"./react-GZhdek4G.js";import{C as n,b as r,g as i,h as a,p as o,t as s,x as c,y as l}from"./useTheme-CQqAmDLr.js";import{t as u}from"./jsx-runtime-BnvnyDTF.js";import{O as d,k as f,m as p,v as m,x as h}from"./createSimplePaletteValueFilter-BRAMrHWJ.js";import{W as g}from"./useConditionallyHiddenColumns-C5q9zdfJ.js";import{rc as _}from"./index-C04TEs4k.js";var v=e(t(),1),y=u(),b=o(),x=g(`div`,{name:`MuiStack`,slot:`Root`});function S(e){return _({props:e,name:`MuiStack`,defaultTheme:b})}function C(e,t){let n=v.Children.toArray(e).filter(Boolean);return n.reduce((e,r,i)=>(e.push(r),i<n.length-1&&e.push(v.cloneElement(t,{key:`separator-${i}`})),e),[])}var w=e=>({row:`Left`,"row-reverse":`Right`,column:`Top`,"column-reverse":`Bottom`})[e],T=({ownerState:e,theme:t})=>{let o={display:`flex`,flexDirection:`column`,...l({theme:t},c({values:e.direction,breakpoints:t.breakpoints.values}),e=>({flexDirection:e}))};if(e.spacing){let r=a(t),s=Object.keys(t.breakpoints.values).reduce((t,n)=>((typeof e.spacing==`object`&&e.spacing[n]!=null||typeof e.direction==`object`&&e.direction[n]!=null)&&(t[n]=!0),t),{}),u=c({values:e.direction,base:s}),d=c({values:e.spacing,base:s});typeof u==`object`&&Object.keys(u).forEach((e,t,n)=>{u[e]||(u[e]=t>0?u[n[t-1]]:`column`)}),o=n(o,l({theme:t},d,(t,n)=>e.useFlexGap?{gap:i(r,t)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${w(n?u[n]:e.direction)}`]:i(r,t)}}))}return o=r(t.breakpoints,o),o};function E(e={}){let{createStyledComponent:t=x,useThemeProps:n=S,componentName:r=`MuiStack`}=e,i=()=>h({root:[`root`]},e=>d(r,e),{}),a=t(T);return v.forwardRef(function(e,t){let{component:r=`div`,direction:o=`column`,spacing:s=0,divider:c,children:l,className:u,useFlexGap:d=!1,...p}=n(e);return(0,y.jsx)(a,{as:r,ownerState:{direction:o,spacing:s,useFlexGap:d},ref:t,className:f(i().root,u),...p,children:c?C(l,c):l})})}var D=E({createStyledComponent:m(`div`,{name:`MuiStack`,slot:`Root`}),useThemeProps:e=>p({props:e,name:`MuiStack`})}),O=m(`div`)(()=>({display:`flex`,alignItems:`center`,justifyContent:`center`,position:`relative`,margin:0})),k=m(`div`,{shouldForwardProp:e=>e!==`color`})(({theme:e,color:t})=>({position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`,color:t,fontSize:e.fontSizes.smallerBody,margin:0})),A=({percentage:e,size:t=`4rem`,disabled:n=!1,children:r,strokeRatio:i=.2})=>{let a=s(),o={display:`block`,borderRadius:`100%`,transform:`rotate(-90deg)`,height:t,width:t},c=100/(2*Math.PI),l=2*c,u=l*i,d=n?a.palette.neutral.border:a.palette.primary.light;return(0,y.jsxs)(O,{children:[(0,y.jsxs)(`svg`,{viewBox:`0 0 ${l} ${l}`,style:o,"aria-hidden":!0,children:[(0,y.jsx)(`circle`,{r:c,cx:c,cy:c,fill:`none`,stroke:a.palette.background.elevation2,strokeWidth:u}),(0,y.jsx)(`circle`,{r:c,cx:c,cy:c,fill:`none`,stroke:d,strokeWidth:u,strokeDasharray:`${e} 100`})]}),(0,y.jsx)(k,{color:d,children:r})]})};export{D as n,A as t};
@@ -1 +0,0 @@
1
- import{o as e,t}from"./react-GZhdek4G.js";import{t as n}from"./jsx-runtime-BnvnyDTF.js";import{v as r}from"./createSimplePaletteValueFilter-BRAMrHWJ.js";import{i}from"./CircularProgress-C_LUU3DK.js";import{t as a}from"./Button-CebB8EPB.js";import{r as o,t as s}from"./TooltipResolver-4A1YhwBy.js";import{t as c,u as ee,y as te}from"./httpErrorResponseHandler-FMtt7Zqh.js";import{n as l}from"./formatPath-j72gcKwy.js";import{t as u}from"./useUiConfig-DbVjTDpE.js";import{t as d}from"./useConditionalSWR-DGgzun6i.js";var f=n(),p=e(t(),1),m=()=>{let{data:e,error:t}=ee(_,h,g);return{data:e,refetchAuth:(0,p.useCallback)(async()=>te(_).catch(console.warn),[]),loading:!t&&!e,error:t}},h=()=>fetch(_).then(e=>e.json()),g={revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1,refreshInterval:15e3},_=l(`api/admin/user`),ne=(e=`useId`)=>(0,p.useMemo)(()=>`${e}-${v++}`,[e]),v=0,re=`ADMIN`,ie=`CREATE_FEATURE`,ae=`UPDATE_FEATURE`,oe=`UPDATE_FEATURE_DEPENDENCY`,se=`DELETE_FEATURE`,ce=`CREATE_STRATEGY`,le=`UPDATE_STRATEGY`,ue=`DELETE_STRATEGY`,de=`UPDATE_APPLICATION`,fe=`CREATE_CONTEXT_FIELD`,pe=`UPDATE_CONTEXT_FIELD`,me=`CREATE_PROJECT`,he=`UPDATE_PROJECT`,ge=`DELETE_PROJECT`,_e=`CREATE_TAG_TYPE`,ve=`UPDATE_TAG_TYPE`,ye=`DELETE_TAG_TYPE`,be=`CREATE_ADDON`,xe=`UPDATE_ADDON`,Se=`DELETE_ADDON`,Ce=`DELETE_ENVIRONMENT`,we=`UPDATE_ENVIRONMENT`,y=`CREATE_FEATURE_STRATEGY`,b=`UPDATE_FEATURE_STRATEGY`,Te=`DELETE_FEATURE_STRATEGY`,x=`UPDATE_FEATURE_ENVIRONMENT`,S=`UPDATE_FEATURE_ENVIRONMENT_VARIANTS`,Ee=`MOVE_FEATURE_TOGGLE`,De=`CREATE_SEGMENT`,Oe=`UPDATE_SEGMENT`,ke=`DELETE_SEGMENT`,Ae=`APPLY_CHANGE_REQUEST`,je=`APPROVE_CHANGE_REQUEST`,Me=`SKIP_CHANGE_REQUEST`,Ne=`CREATE_PROJECT_API_TOKEN`,Pe=`UPDATE_PROJECT_SEGMENT`,Fe=`PROJECT_USER_ACCESS_READ`,Ie=`PROJECT_DEFAULT_STRATEGY_READ`,Le=`PROJECT_CHANGE_REQUEST_READ`,Re=`PROJECT_SETTINGS_READ`,ze=`PROJECT_USER_ACCESS_WRITE`,Be=`PROJECT_DEFAULT_STRATEGY_WRITE`,Ve=`PROJECT_CHANGE_REQUEST_WRITE`,He=`PROJECT_SETTINGS_WRITE`,C=p.createContext({isAdmin:!1,hasAccess:()=>{throw Error(`hasAccess called outside AccessContext`)}}),w=e=>{let{isEnterprise:t}=u(),{data:n,error:r,mutate:i}=d(!!e&&t(),[],l(`api/admin/projects/${e}/change-requests/config`),Ue);return{data:n||[],loading:!r&&!n,refetchChangeRequestConfig:i,error:r}},Ue=e=>fetch(e).then(c(`Request changes`)).then(e=>e.json()),T=e=>{let{data:t}=w(e),n=Q(e),r=p.useCallback(e=>n(`SKIP_CHANGE_REQUEST`,e)?!1:t.some(t=>t.environment===e&&t.changeRequestEnabled),[JSON.stringify(t)]),i=p.useCallback(e=>t.some(t=>t.environment===e&&t.changeRequestEnabled),[JSON.stringify(t)]);return{isChangeRequestConfigured:r,isChangeRequestConfiguredInAnyEnv:p.useCallback(()=>t.some(e=>e.changeRequestEnabled),[JSON.stringify(t)]),isChangeRequestConfiguredForReview:i}},E=`ADMIN`,We=`CREATE_ADDON`,Ge=`UPDATE_ADDON`,Ke=`DELETE_ADDON`,qe=`UPDATE_CLIENT_API_TOKEN`,D=`CREATE_CLIENT_API_TOKEN`,O=`DELETE_CLIENT_API_TOKEN`,k=`READ_CLIENT_API_TOKEN`,Je=`UPDATE_FRONTEND_API_TOKEN`,A=`CREATE_FRONTEND_API_TOKEN`,j=`DELETE_FRONTEND_API_TOKEN`,M=`READ_FRONTEND_API_TOKEN`,Ye=`UPDATE_APPLICATION`,N=`CREATE_CONTEXT_FIELD`,P=`UPDATE_CONTEXT_FIELD`,F=`DELETE_CONTEXT_FIELD`,Xe=`CREATE_PROJECT`,I=`READ_ROLE`,Ze=`CREATE_SEGMENT`,Qe=`UPDATE_SEGMENT`,$e=`DELETE_SEGMENT`,et=`CREATE_STRATEGY`,tt=`UPDATE_STRATEGY`,nt=`DELETE_STRATEGY`,rt=`CREATE_TAG_TYPE`,it=`UPDATE_TAG_TYPE`,at=`DELETE_TAG_TYPE`,L=`READ_LOGS`,R=`UPDATE_MAINTENANCE_MODE`,z=`UPDATE_INSTANCE_BANNERS`,B=`UPDATE_CORS`,V=`UPDATE_AUTH_CONFIGURATION`,ot=`CREATE_FEATURE`,H=`UPDATE_FEATURE`,st=`UPDATE_FEATURE_DEPENDENCY`,ct=`DELETE_FEATURE`,U=`UPDATE_PROJECT`,lt=`DELETE_PROJECT`,ut=`UPDATE_FEATURE_VARIANTS`,dt=`MOVE_FEATURE_TOGGLE`,W=`READ_PROJECT_API_TOKEN`,G=`CREATE_PROJECT_API_TOKEN`,K=`DELETE_PROJECT_API_TOKEN`,q=`UPDATE_PROJECT_CONTEXT`,ft=`UPDATE_PROJECT_SEGMENT`,pt=`CREATE_FEATURE_STRATEGY`,J=`UPDATE_FEATURE_STRATEGY`,Y=`DELETE_FEATURE_STRATEGY`,mt=`UPDATE_FEATURE_ENVIRONMENT_VARIANTS`,ht=`UPDATE_FEATURE_ENVIRONMENT`,gt=`PROJECT_USER_ACCESS_READ`,_t=`PROJECT_DEFAULT_STRATEGY_READ`,vt=`PROJECT_CHANGE_REQUEST_READ`,yt=`PROJECT_SETTINGS_READ`,bt=`PROJECT_USER_ACCESS_WRITE`,X=`PROJECT_DEFAULT_STRATEGY_WRITE`,xt=`PROJECT_CHANGE_REQUEST_WRITE`,St=`PROJECT_SETTINGS_WRITE`,Ct=`RELEASE_PLAN_TEMPLATE_CREATE`,wt=`RELEASE_PLAN_TEMPLATE_UPDATE`,Tt=`RELEASE_PLAN_TEMPLATE_DELETE`,Et=[{label:`Integration`,permissions:[We,Ge,Ke]},{label:`API token`,permissions:[qe,D,O,k,Je,A,j,M]},{label:`Application`,permissions:[Ye]},{label:`Context field`,permissions:[N,P,F]},{label:`Project`,permissions:[Xe]},{label:`Role`,permissions:[I]},{label:`Segment`,permissions:[Ze,Qe,$e]},{label:`Strategy`,permissions:[et,tt,nt]},{label:`Tag type`,permissions:[rt,it,at]},{label:`Release plan templates`,permissions:[Ct,Tt,wt]},{label:`Instance maintenance`,permissions:[L,R,z,B]},{label:`Authentication`,permissions:[V]}],Dt=[E,I,k,M,R,L],Ot=[{label:`Features and strategies`,permissions:[[ot],[H],[st],[ct],[ut],[dt],[pt],[J],[Y],[ht],[mt],[q],[ft]]},{label:`Project settings`,permissions:[[U],[gt,U],[bt,U],[_t,U],[X,U],[yt,U],[St,U],[lt]]},{label:`API tokens`,permissions:[[W],[G],[K]]},{label:`Change requests`,permissions:[[xt,U],[vt,U]]}],kt=(e,t)=>{let n=e.data&&`permissions`in e.data?e.data.permissions:void 0;return n&&t?.maintenanceMode&&(n=n.filter(e=>Dt.includes(e.permission))),n},At=()=>{let e=m(),{uiConfig:t}=u();return{permissions:kt(e,t),refetchPermissions:e.refetchAuth,loading:e.loading,error:e.error}},jt=e=>({fetcher:()=>{let t=l(`api/admin/projects/${e}/overview`);return fetch(t,{method:`GET`}).then(c(`Project overview`)).then(e=>e.json())},KEY:`api/admin/projects/${e}/overview`}),Mt={featureTypeCounts:[],environments:[],name:``,health:0,members:0,version:1,description:`Default`,favorite:!1,mode:`open`,defaultStickiness:`default`,stats:{archivedCurrentWindow:0,archivedPastWindow:0,avgTimeToProdCurrentWindow:0,createdCurrentWindow:0,createdPastWindow:0,projectActivityCurrentWindow:0,projectActivityPastWindow:0,projectMembersAddedCurrentWindow:0},onboardingStatus:{status:`onboarded`}},Z=(e,t={})=>Nt(e,t),Nt=(e=``,t={})=>{let{KEY:n,fetcher:r}=jt(e),{data:i,error:a,mutate:o}=d(!!e,Mt,n,r,t),s=(0,p.useCallback)(()=>{o()},[o]);return{project:i||Mt,loading:!a&&!i,error:a,refetch:s}},Pt=e=>Z(e).project.name||e,Ft=e=>e.featureTypeCounts?.map(e=>e.count).reduce((e,t)=>e+t,0),Q=e=>{let{hasAccess:t}=(0,p.useContext)(C),n=(e,n,r)=>n&&r?t(e,n,r):n?t(e,n):t(e),r=(e,t,r)=>Array.isArray(e)?e.some(e=>n(e,t,r)):n(e,t,r);return(t,n)=>r(t,e,n)},It=e=>{let{isChangeRequestConfigured:t}=T(e),n=Q(e);return(e,r)=>r&&t(r)||n(e,r)},Lt=[y,b,Te,x,S],Rt=(e,t)=>e.filter(e=>t.includes(e)).length>0,zt=e=>{let{permissions:t}=At();return t?t.find(t=>t.project===e):!1},Bt=e=>{let t=zt(e),{project:n}=Z(e);return n.mode===`protected`?t:!0},Vt=e=>Rt(Lt,[].concat(e)),Ht=(e,t,n)=>{let{isChangeRequestConfigured:r}=T(t),i=r(n),a=Bt(t);return i&&a&&Vt(e)},Ut=(e,t,n)=>{let r=Q(t);return Ht(e,t,n)||r(e,n)},Wt=(e,t,n)=>Q(t)(e,n),Gt=i((0,f.jsx)(`path`,{d:`M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1z`}),`Lock`),Kt=r(a)({justifySelf:`start`,alignSelf:`start`,"&.Mui-disabled":{pointerEvents:`auto`}}),qt=(e,t,n)=>!e&&!n?(0,f.jsx)(Gt,{titleAccess:`Locked`}):t||null,Jt=p.forwardRef((e,t)=>{let n=Ut(e.permission,e.projectId,e.environmentId);return(0,f.jsx)($,{...e,access:n,ref:t})}),Yt=p.forwardRef((e,t)=>{let n=Wt(e.permission,e.projectId,e.environmentId);return(0,f.jsx)($,{...e,access:n,ref:t})}),$=p.forwardRef(({permission:e,access:t,variant:n=`contained`,color:r=`primary`,onClick:i,children:a,disabled:c,projectId:ee,environmentId:te,tooltipProps:l,hideLockIcon:u,className:d,...p},m)=>{let h=c||!t,g=ne(),_=qt(t,p.endIcon,u),v=e=>{if(h){e.preventDefault(),e.stopPropagation();return}i?.(e)};return(0,f.jsx)(s,{...l,title:o(t,l?.title),arrow:!0,children:(0,f.jsx)(Kt,{ref:m,onClick:v,"aria-disabled":h||void 0,"aria-labelledby":g,variant:n,color:r,className:[d,h&&`Mui-disabled`].filter(Boolean).join(` `)||void 0,...p,endIcon:_,children:a})})}),Xt=p.forwardRef((e,t)=>e.projectId!==void 0&&e.environmentId!==void 0?(0,f.jsx)(Jt,{...e,environmentId:e.environmentId,projectId:e.projectId,ref:t}):(0,f.jsx)(Yt,{...e,ref:t}));export{Ne as $,Tt as A,Pe as At,U as B,Ot as C,we as Ct,W as D,S as Dt,L as E,x as Et,B as F,m as Ft,re as G,T as H,H as I,be as J,Ae as K,J as L,Et as M,le as Mt,V as N,ve as Nt,I as O,b as Ot,P,ne as Pt,me as Q,z as R,X as S,pe as St,M as T,oe as Tt,w as U,q as V,C as W,ie as X,fe as Y,y as Z,O as _,Fe as _t,Ut as a,se as at,j as b,xe as bt,Nt as c,ue as ct,At as d,Le as dt,De as et,E as f,Ve as ft,G as g,He as gt,A as h,Re as ht,Q as i,Ce as it,wt as j,Oe as jt,Ct as k,he as kt,Z as l,ye as lt,N as m,Be as mt,Gt as n,_e as nt,Wt as o,ge as ot,D as p,Ie as pt,je as q,It as r,Se as rt,Ft as s,ke as st,Xt as t,ce as tt,Pt as u,Ee as ut,F as v,ze as vt,k as w,ae as wt,K as x,de as xt,Y as y,Me as yt,R as z};
@@ -1 +0,0 @@
1
- import{o as e,t}from"./react-GZhdek4G.js";import{a as n,c as r,f as i,i as a,l as o,n as s,r as c,s as l,t as u}from"./Grow-BIbmvKVy.js";import{t as d}from"./useTheme-CQqAmDLr.js";import{t as f}from"./jsx-runtime-BnvnyDTF.js";import{D as p,O as m,f as h,h as g,k as _,l as v,m as y,u as b,v as x,x as S}from"./createSimplePaletteValueFilter-BRAMrHWJ.js";import{a as C,c as w,l as T,n as E,r as D}from"./ConditionallyRender---uTpMBn.js";function O(...e){return e.reduce((e,t)=>t==null?e:function(...n){e.apply(this,n),t.apply(this,n)},()=>{})}function k(e,t=166){let n;function r(...r){clearTimeout(n),n=setTimeout(()=>{e.apply(this,r)},t)}return r.clear=()=>{clearTimeout(n)},r}var A=e(t(),1),j=f(),M=k;function N(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}var P=N,F=i;function I(e){return i(e).defaultView||window}var L=I;function R(e,t){if(!e)return t;function n(e,t){let n={};return Object.keys(t).forEach(r=>{T(r,t[r])&&typeof e[r]==`function`&&(n[r]=(...n)=>{e[r](...n),t[r](...n)})}),n}if(typeof e==`function`||typeof t==`function`)return r=>{let i=typeof t==`function`?t(r):t,a=typeof e==`function`?e({...r,...i}):e,o=_(r?.className,i?.className,a?.className),s=n(a,i);return{...i,...a,...s,...!!o&&{className:o},...i?.style&&a?.style&&{style:{...i.style,...a.style}},...i?.sx&&a?.sx&&{sx:[...Array.isArray(i.sx)?i.sx:[i.sx],...Array.isArray(a.sx)?a.sx:[a.sx]]}}};let r=t,i=n(e,r),a=_(r?.className,e?.className);return{...t,...e,...i,...!!a&&{className:a},...r?.style&&e?.style&&{style:{...r.style,...e.style}},...r?.sx&&e?.sx&&{sx:[...Array.isArray(r.sx)?r.sx:[r.sx],...Array.isArray(e.sx)?e.sx:[e.sx]]}}}function z(e,t){if(!e||!t)return!1;if(e.contains(t))return!0;let n=t.getRootNode?.();if(n&&n instanceof ShadowRoot){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode??n.host??null}}return!1}var B={entering:{opacity:1},entered:{opacity:1},exiting:{opacity:0},exited:{opacity:0}},V={opacity:0,visibility:`hidden`},H=A.forwardRef(function(e,t){let i=d(),s={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{addEndListener:u,appear:f=!0,children:p,easing:m,in:h,onEnter:g,onEntered:_,onEntering:y,onExit:b,onExited:x,onExiting:S,style:C,timeout:w=s,...T}=e,E=A.useRef(null),D=v(E,c(p),t),O=l(E,y),k=l(E,(e,t)=>{r(e);let a=n({style:C,timeout:w,easing:m},{mode:`enter`});e.style.transition=i.transitions.create(`opacity`,a),g&&g(e,t)}),M=l(E,_),N=l(E,S),P=l(E,e=>{let t=n({style:C,timeout:w,easing:m},{mode:`exit`});e.style.transition=i.transitions.create(`opacity`,t),b&&b(e)}),F=l(E,e=>{e.style.transition=``,x&&x(e)});return(0,j.jsx)(o,{appear:f,in:h,nodeRef:E,onEnter:k,onEntered:M,onEntering:O,onExit:P,onExited:F,onExiting:N,addEndListener:e=>{u&&u(E.current,e)},timeout:w,...T,children:(e,{ownerState:t,...n})=>{let r=a(e,h,B,V,C,p.props.style);return A.cloneElement(p,{style:r,ref:D,...n})}})});function U(e){return m(`MuiBackdrop`,e)}p(`MuiBackdrop`,[`root`,`invisible`]);var W=e=>{let{classes:t,invisible:n}=e;return S({root:[`root`,n&&`invisible`]},U,t)},G=x(`div`,{name:`MuiBackdrop`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:`fixed`,display:`flex`,alignItems:`center`,justifyContent:`center`,right:0,bottom:0,top:0,left:0,backgroundColor:`rgba(0, 0, 0, 0.5)`,WebkitTapHighlightColor:`transparent`,variants:[{props:{invisible:!0},style:{backgroundColor:`transparent`}}]}),K=A.forwardRef(function(e,t){let n=y({props:e,name:`MuiBackdrop`}),{children:r,className:i,component:a=`div`,invisible:o=!1,open:s,slotProps:c={},slots:l={},transitionDuration:u,...d}=n,f={...n,component:a,invisible:o},p=W(f),m={component:a,slots:l,slotProps:c},[h,g]=D(`root`,{elementType:G,externalForwardedProps:m,className:_(p.root,i),ownerState:f}),[v,b]=D(`transition`,{elementType:H,externalForwardedProps:m,ownerState:f});return(0,j.jsx)(v,{in:s,timeout:u,...d,...b,children:(0,j.jsx)(h,{...g,ref:t,children:r})})});function q(e=window){let t=e.document.documentElement.clientWidth;return e.innerWidth-t}function J(e){let t=i(e);return t.body===e?I(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function Y(e,t){t?e.setAttribute(`aria-hidden`,`true`):e.removeAttribute(`aria-hidden`)}function X(e){return parseFloat(I(e).getComputedStyle(e).paddingRight)||0}function ee(e){let t=[`TEMPLATE`,`SCRIPT`,`STYLE`,`LINK`,`MAP`,`META`,`NOSCRIPT`,`PICTURE`,`COL`,`COLGROUP`,`PARAM`,`SLOT`,`SOURCE`,`TRACK`].includes(e.tagName),n=e.tagName===`INPUT`&&e.getAttribute(`type`)===`hidden`;return t||n}function te(e,t,n,r,i){let a=[t,n,...r];[].forEach.call(e.children,e=>{let t=!a.includes(e),n=!ee(e);t&&n&&Y(e,i)})}function Z(e,t){let n=-1;return e.some((e,r)=>t(e)?(n=r,!0):!1),n}function ne(e,t){let n=[],r=e.container;if(!t.disableScrollLock){if(J(r)){let e=q(I(r));n.push({value:r.style.paddingRight,property:`padding-right`,el:r}),r.style.paddingRight=`${X(r)+e}px`;let t=i(r).querySelectorAll(`.mui-fixed`);[].forEach.call(t,t=>{n.push({value:t.style.paddingRight,property:`padding-right`,el:t}),t.style.paddingRight=`${X(t)+e}px`})}let e;if(r.parentNode instanceof DocumentFragment)e=i(r).body;else{let t=r.parentElement,n=I(r);e=t?.nodeName===`HTML`&&n.getComputedStyle(t).overflowY===`scroll`?t:r}n.push({value:e.style.overflow,property:`overflow`,el:e},{value:e.style.overflowX,property:`overflow-x`,el:e},{value:e.style.overflowY,property:`overflow-y`,el:e}),e.style.overflow=`hidden`}return()=>{n.forEach(({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)})}}function re(e){let t=[];return[].forEach.call(e.children,e=>{e.getAttribute(`aria-hidden`)===`true`&&t.push(e)}),t}var ie=class{constructor(){this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(n!==-1)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&Y(e.modalRef,!1);let r=re(t);te(t,e.mount,e.modalRef,r,!0);let i=Z(this.containers,e=>e.container===t);return i===-1?(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n):(this.containers[i].modals.push(e),n)}mount(e,t){let n=Z(this.containers,t=>t.modals.includes(e)),r=this.containers[n];r.restore||=ne(r,t)}remove(e,t=!0){let n=this.modals.indexOf(e);if(n===-1)return n;let r=Z(this.containers,t=>t.modals.includes(e)),i=this.containers[r];if(i.modals.splice(i.modals.indexOf(e),1),this.modals.splice(n,1),i.modals.length===0)i.restore&&i.restore(),e.modalRef&&Y(e.modalRef,t),te(i.container,e.mount,e.modalRef,i.hiddenSiblings,!1),this.containers.splice(r,1);else{let e=i.modals[i.modals.length-1];e.modalRef&&Y(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}},ae=z,oe=`data-mui-focusable`;function se(e){return e?e.hasAttribute(`data-mui-focusable`)?e:e.querySelector(`[${oe}]`):null}var ce=[`input`,`select`,`textarea`,`a[href]`,`button`,`[tabindex]`,`audio[controls]`,`video[controls]`,`[contenteditable]:not([contenteditable="false"])`].join(`,`);function le(e){let t=parseInt(e.getAttribute(`tabindex`)||``,10);return Number.isNaN(t)?e.contentEditable===`true`||(e.nodeName===`AUDIO`||e.nodeName===`VIDEO`||e.nodeName===`DETAILS`)&&e.getAttribute(`tabindex`)===null?0:e.tabIndex:t}function ue(e){if(e.tagName!==`INPUT`||e.type!==`radio`||!e.name)return!1;let t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`),n=t(`[name="${e.name}"]:checked`);return n||=t(`[name="${e.name}"]`),n!==e}function de(e){return!(e.disabled||e.tagName===`INPUT`&&e.type===`hidden`||ue(e))}function fe(e){let t=[],n=[];return Array.from(e.querySelectorAll(ce)).forEach((e,r)=>{let i=le(e);i===-1||!de(e)||(i===0?t.push(e):n.push({documentOrder:r,tabIndex:i,node:e}))}),n.sort((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex).map(e=>e.node).concat(t)}function pe(){return!0}function me(e){let{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:a=!1,getTabbable:o=fe,isEnabled:s=pe,open:l}=e,u=A.useRef(!1),d=A.useRef(null),f=A.useRef(null),p=A.useRef(null),m=A.useRef(null),h=A.useRef(!1),g=A.useRef(null),_=b(c(t),g),v=A.useRef(null);A.useEffect(()=>{!l||!g.current||(h.current=!n)},[n,l]),A.useEffect(()=>{if(u.current=!1,!l||!g.current)return;let e=P(i(g.current)),t=se(g.current)??g.current;return ae(g.current,e)||(t.hasAttribute(`tabIndex`)||t.setAttribute(`tabIndex`,`-1`),h.current&&t.focus()),()=>{!a&&p.current&&(u.current=!0,p.current.focus(),p.current=null)}},[l]),A.useEffect(()=>{if(!l||!g.current)return;let e=i(g.current),t=t=>{v.current=t,!(r||!s()||t.key!==`Tab`)&&P(e)===g.current&&t.shiftKey&&(u.current=!0,f.current&&f.current.focus())},n=()=>{let t=g.current;if(t===null)return;let n=P(e);if(!e.hasFocus()||!s()||u.current){u.current=!1;return}if(ae(t,n)||r&&n!==d.current&&n!==f.current)return;if(n!==m.current)m.current=null;else if(m.current!==null)return;if(!h.current)return;let i=[];if((n===d.current||n===f.current)&&(i=o(g.current)),i.length>0){let e=!!(v.current?.shiftKey&&v.current?.key===`Tab`),t=i[0],n=i[i.length-1];typeof t!=`string`&&typeof n!=`string`&&(e?n.focus():t.focus())}else t.focus()};e.addEventListener(`focusin`,n),e.addEventListener(`keydown`,t,!0);let a=setInterval(()=>{let t=P(e);t&&t.tagName===`BODY`&&n()},50);return()=>{clearInterval(a),e.removeEventListener(`focusin`,n),e.removeEventListener(`keydown`,t,!0)}},[n,r,a,s,l,o]);let y=e=>{p.current===null&&(p.current=e.relatedTarget),h.current=!0,m.current=e.target;let n=t.props.onFocus;n&&n(e)},x=e=>{p.current===null&&(p.current=e.relatedTarget),h.current=!0};return(0,j.jsxs)(A.Fragment,{children:[(0,j.jsx)(`div`,{tabIndex:l?0:-1,onFocus:x,ref:d,"data-testid":`sentinelStart`}),A.cloneElement(t,{ref:_,onFocus:y}),(0,j.jsx)(`div`,{tabIndex:l?0:-1,onFocus:x,ref:f,"data-testid":`sentinelEnd`})]})}function he(e){return typeof e==`function`?e():e}function ge(e){return e?e.props.hasOwnProperty(`in`):!1}var _e=()=>{},Q=new ie;function ve(e){let{container:t,disableScrollLock:n=!1,closeAfterTransition:r=!1,onTransitionEnter:a,onTransitionExited:o,children:s,onClose:c,open:l,rootRef:u}=e,d=A.useRef({}),f=A.useRef(null),p=A.useRef(null),m=b(p,u),[g,_]=A.useState(!l),v=ge(s),y=!0;(e[`aria-hidden`]===`false`||e[`aria-hidden`]===!1)&&(y=!1);let x=()=>i(f.current),S=()=>(d.current.modalRef=p.current,d.current.mount=f.current,d.current),w=()=>{Q.mount(S(),{disableScrollLock:n}),p.current&&(p.current.scrollTop=0)},T=h(()=>{let e=he(t)||x().body;Q.add(S(),e),p.current&&w()}),E=()=>Q.isTopModal(S()),D=h(e=>{f.current=e,e&&(l&&E()?w():p.current&&Y(p.current,y))}),k=A.useCallback(()=>{Q.remove(S(),y)},[y]);A.useEffect(()=>()=>{k()},[k]),A.useEffect(()=>{l?T():(!v||!r)&&k()},[l,k,v,r,T]);let j=e=>t=>{e.onKeyDown?.(t),!(t.key!==`Escape`||t.which===229||!E())&&(t.stopPropagation(),c&&c(t,`escapeKeyDown`))},M=e=>t=>{e.onClick?.(t),t.target===t.currentTarget&&c&&c(t,`backdropClick`)};return{getRootProps:(t={})=>{let n=C(e);delete n.onTransitionEnter,delete n.onTransitionExited;let r={...n,...t};return{role:`presentation`,...r,onKeyDown:j(r),ref:m}},getBackdropProps:(e={})=>{let t=e;return{"aria-hidden":!0,...t,onClick:M(t),open:l}},getTransitionProps:()=>({onEnter:O(()=>{_(!1),a&&a()},s?.props.onEnter??_e),onExited:O(()=>{_(!0),o&&o(),r&&k()},s?.props.onExited??_e)}),rootRef:m,portalRef:D,isTopModal:E,exited:g,hasTransition:v}}function ye(e){return m(`MuiModal`,e)}p(`MuiModal`,[`root`,`hidden`,`backdrop`]);var be=e=>{let{open:t,exited:n,classes:r}=e;return S({root:[`root`,!t&&n&&`hidden`],backdrop:[`backdrop`]},ye,r)},xe=x(`div`,{name:`MuiModal`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(g(({theme:e})=>({position:`fixed`,zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:e})=>!e.open&&e.exited,style:{visibility:`hidden`}}]}))),Se=x(K,{name:`MuiModal`,slot:`Backdrop`})({zIndex:-1}),Ce=A.forwardRef(function(e,t){let n=y({name:`MuiModal`,props:e}),{classes:r,className:i,closeAfterTransition:a=!1,children:o,container:c,component:l,disableAutoFocus:u=!1,disableEnforceFocus:d=!1,disablePortal:f=!1,disableRestoreFocus:p=!1,disableScrollLock:m=!1,hideBackdrop:h=!1,keepMounted:g=!1,onClose:v,onTransitionEnter:b,onTransitionExited:x,open:S,slotProps:C={},slots:w={},theme:T,...E}=n,O={...n,closeAfterTransition:a,disableAutoFocus:u,disableEnforceFocus:d,disablePortal:f,disableRestoreFocus:p,disableScrollLock:m,hideBackdrop:h,keepMounted:g},{getRootProps:k,getBackdropProps:M,getTransitionProps:N,portalRef:P,isTopModal:F,exited:I,hasTransition:L}=ve({...O,rootRef:t}),R={...O,exited:I},z=be(R),B={};if(o.props.tabIndex===void 0&&(B.tabIndex=`-1`),L){let{onEnter:e,onExited:t}=N();B.onEnter=e,B.onExited=t}let V={slots:w,slotProps:C},[H,U]=D(`root`,{ref:t,elementType:xe,externalForwardedProps:{...V,...E,component:l},getSlotProps:k,ownerState:R,className:_(i,z?.root,!R.open&&R.exited&&z?.hidden)}),[W,G]=D(`backdrop`,{elementType:Se,externalForwardedProps:V,shouldForwardComponentProp:!0,getSlotProps:e=>M({...e,onClick:t=>{e?.onClick&&e.onClick(t)}}),className:z?.backdrop,ownerState:R});return!g&&!S&&(!L||I)?null:(0,j.jsx)(s,{ref:P,container:c,disablePortal:f,children:(0,j.jsxs)(H,{...U,children:[h?null:(0,j.jsx)(W,{...G}),(0,j.jsx)(me,{disableEnforceFocus:d,disableAutoFocus:u,disableRestoreFocus:p,isEnabled:F,open:S,children:A.cloneElement(o,B)})]})})});function we(e){return m(`MuiPopover`,e)}p(`MuiPopover`,[`root`,`paper`]);function Te(e,t){let n=0;return typeof t==`number`?n=t:t===`center`?n=e.height/2:t===`bottom`&&(n=e.height),n}function Ee(e,t){let n=0;return typeof t==`number`?n=t:t===`center`?n=e.width/2:t===`right`&&(n=e.width),n}function De(e){return[e.horizontal,e.vertical].map(e=>typeof e==`number`?`${e}px`:e).join(` `)}function $(e){return typeof e==`function`?e():e}var Oe=e=>{let{classes:t}=e;return S({root:[`root`],paper:[`paper`]},we,t)},ke=x(Ce,{name:`MuiPopover`,slot:`Root`})({}),Ae=x(E,{name:`MuiPopover`,slot:`Paper`})({position:`absolute`,overflowY:`auto`,overflowX:`hidden`,minWidth:16,minHeight:16,maxWidth:`calc(100% - 32px)`,maxHeight:`calc(100% - 32px)`,outline:0}),je=A.forwardRef(function(e,t){let n=y({props:e,name:`MuiPopover`}),{action:r,anchorEl:i,anchorOrigin:a={vertical:`top`,horizontal:`left`},anchorPosition:o,anchorReference:s=`anchorEl`,children:c,className:l,container:d,disableAutoFocus:f=!1,elevation:p=8,marginThreshold:m=16,open:h,slots:g={},slotProps:v={},transformOrigin:b={vertical:`top`,horizontal:`left`},transitionDuration:x=`auto`,disableScrollLock:S=!1,...C}=n,T=A.useRef(),E={...n,anchorOrigin:a,anchorReference:s,elevation:p,marginThreshold:m,transformOrigin:b,transitionDuration:x},O=Oe(E),k=A.useCallback(()=>{if(s===`anchorPosition`)return o;let e=$(i),t=(e&&e.nodeType===1?e:F(T.current).body).getBoundingClientRect();return{top:t.top+Te(t,a.vertical),left:t.left+Ee(t,a.horizontal)}},[i,a.horizontal,a.vertical,o,s]),N=A.useCallback(e=>({vertical:Te(e,b.vertical),horizontal:Ee(e,b.horizontal)}),[b.horizontal,b.vertical]),P=A.useCallback(e=>{let t={width:e.offsetWidth,height:e.offsetHeight},n=N(t);if(s===`none`)return{top:null,left:null,transformOrigin:De(n)};let r=k(),a=r.top-n.vertical,o=r.left-n.horizontal,c=a+t.height,l=o+t.width,u=L($(i)),d=u.innerHeight-m,f=u.innerWidth-m;if(m!=null&&a<m){let e=a-m;a-=e,n.vertical+=e}else if(m!=null&&c>d){let e=c-d;a-=e,n.vertical+=e}if(m!=null&&o<m){let e=o-m;o-=e,n.horizontal+=e}else if(l>f){let e=l-f;o-=e,n.horizontal+=e}return{top:`${Math.round(a)}px`,left:`${Math.round(o)}px`,transformOrigin:De(n)}},[i,s,k,N,m]),[I,z]=A.useState(h),B=A.useCallback(()=>{let e=T.current;if(!e)return;let t=P(e);t.top!=null&&e.style.setProperty(`top`,t.top),t.left!=null&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,z(!0)},[P]);A.useEffect(()=>(S&&window.addEventListener(`scroll`,B),()=>window.removeEventListener(`scroll`,B)),[i,S,B]);let V=()=>{B()},H=()=>{z(!1)};A.useEffect(()=>{h&&B()}),A.useImperativeHandle(r,()=>h?{updatePosition:()=>{B()}}:null,[h,B]),A.useEffect(()=>{if(!h)return;let e=M(()=>{B()}),t=L($(i));return t.addEventListener(`resize`,e),()=>{e.clear(),t.removeEventListener(`resize`,e)}},[i,h,B]);let U=x,W={slots:g,slotProps:v},[G,K]=D(`transition`,{elementType:u,externalForwardedProps:W,ownerState:E,getSlotProps:e=>({...e,onEntering:(t,n)=>{e.onEntering?.(t,n),V()},onExited:t=>{e.onExited?.(t),H()}}),additionalProps:{appear:!0,in:h}});x===`auto`&&!G.muiSupportAuto&&(U=void 0);let q=d||(i?F($(i)).body:void 0),[J,{slots:Y,slotProps:X,...ee}]=D(`root`,{ref:t,elementType:ke,externalForwardedProps:{...W,...C},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:g.backdrop},slotProps:{backdrop:R(typeof v.backdrop==`function`?v.backdrop(E):v.backdrop,{invisible:!0})},container:q,open:h},ownerState:E,className:_(O.root,l)}),[te,Z]=D(`paper`,{ref:T,className:O.paper,elementType:Ae,externalForwardedProps:W,shouldForwardComponentProp:!0,additionalProps:{elevation:p,style:I?void 0:{opacity:0}},ownerState:E});return(0,j.jsx)(J,{...ee,...!w(J)&&{slots:Y,slotProps:X,disableAutoFocus:f,disableScrollLock:S},children:(0,j.jsx)(G,{...K,timeout:U,children:(0,j.jsx)(te,{...Z,children:c})})})});export{k as _,ae as a,H as c,L as d,I as f,M as g,N as h,oe as i,z as l,P as m,Ae as n,q as o,F as p,Ce as r,K as s,je as t,R as u,O as v};
@@ -1 +0,0 @@
1
- import{o as e,t}from"./react-GZhdek4G.js";import{t as n}from"./jsx-runtime-BnvnyDTF.js";import{D as r,O as i,_ as a,h as o,k as s,m as c,t as l,v as u,x as d,y as f}from"./createSimplePaletteValueFilter-BRAMrHWJ.js";import{S as p}from"./TextField-oipjeg6n.js";import{v as m}from"./Popover-CUTnSn2h.js";import{i as h}from"./CircularProgress-C_LUU3DK.js";import{r as g}from"./ConditionallyRender---uTpMBn.js";import{t as _}from"./SwitchBase-DWPIxZnN.js";var v=e(t(),1),y=n(),b=m,x=h((0,y.jsx)(`path`,{d:`M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z`}),`RadioButtonUnchecked`),S=h((0,y.jsx)(`path`,{d:`M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z`}),`RadioButtonChecked`),C=u(`span`,{name:`MuiRadioButtonIcon`,shouldForwardProp:f})({position:`relative`,display:`flex`}),w=u(x,{name:`MuiRadioButtonIcon`})({transform:`scale(1)`}),T=u(S,{name:`MuiRadioButtonIcon`})(o(({theme:e})=>({left:0,position:`absolute`,transform:`scale(0)`,transition:e.transitions.create(`transform`,{easing:e.transitions.easing.easeIn,duration:e.transitions.duration.shortest}),variants:[{props:{checked:!0},style:{transform:`scale(1)`,transition:e.transitions.create(`transform`,{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.shortest})}}]})));function E(e){let{checked:t=!1,classes:n={},fontSize:r}=e,i={...e,checked:t};return(0,y.jsxs)(C,{className:n.root,ownerState:i,children:[(0,y.jsx)(w,{fontSize:r,className:n.background,ownerState:i}),(0,y.jsx)(T,{fontSize:r,className:n.dot,ownerState:i})]})}var D=v.createContext(void 0);function O(){return v.useContext(D)}function k(e){return i(`MuiRadio`,e)}var A=r(`MuiRadio`,[`root`,`checked`,`disabled`,`colorPrimary`,`colorSecondary`,`sizeSmall`]),j=e=>{let{classes:t,color:n,size:r}=e,i={root:[`root`,`color${a(n)}`,r!==`medium`&&`size${a(r)}`]};return{...t,...d(i,k,t)}},M=u(_,{shouldForwardProp:e=>f(e)||e===`classes`,name:`MuiRadio`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.size!==`medium`&&t[`size${a(n.size)}`],t[`color${a(n.color)}`]]}})(o(({theme:e})=>({color:(e.vars||e).palette.text.secondary,[`&.${A.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{color:`default`,disabled:!1,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(l()).map(([t])=>({props:{color:t,disabled:!1,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(l()).map(([t])=>({props:{color:t,disabled:!1},style:{[`&.${A.checked}`]:{color:(e.vars||e).palette[t].main}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:`transparent`}}}}]})));function N(e,t){return typeof t==`object`&&t?e===t:String(e)===String(t)}var P=(0,y.jsx)(E,{checked:!0}),F=(0,y.jsx)(E,{}),I=v.forwardRef(function(e,t){let n=c({props:e,name:`MuiRadio`}),{checked:r,checkedIcon:i=P,color:a=`primary`,icon:o=F,name:l,onChange:u,size:d=`medium`,className:f,disabled:m,disableRipple:h=!1,slots:_={},slotProps:x={},...S}=n,C=p(),w=m;C&&w===void 0&&(w=C.disabled),w??=!1;let T={...n,disabled:w,disableRipple:h,color:a,size:d},E=j(T),D=O(),k=r,A=b(u,D&&D.onChange),I=l;D&&(k===void 0&&(k=N(D.value,n.value)),I===void 0&&(I=D.name));let L=x.input,[R,z]=g(`root`,{ref:t,elementType:M,className:s(E.root,f),shouldForwardComponentProp:!0,externalForwardedProps:{slots:_,slotProps:x,...S},getSlotProps:e=>({...e,onChange:(t,...n)=>{e.onChange?.(t,...n),A(t,...n)}}),ownerState:T,additionalProps:{type:`radio`,icon:v.cloneElement(o,{fontSize:o.props.fontSize??d}),checkedIcon:v.cloneElement(i,{fontSize:i.props.fontSize??d}),disabled:w,name:I,checked:k,slots:_,slotProps:{input:typeof L==`function`?L(T):L}}});return(0,y.jsx)(R,{...z,classes:E})});export{D as n,I as t};
@@ -1 +0,0 @@
1
- import{o as e,t}from"./react-GZhdek4G.js";import{t as n}from"./jsx-runtime-BnvnyDTF.js";import{D as r,O as i,k as a,l as o,m as s,p as c,v as l,x as u}from"./createSimplePaletteValueFilter-BRAMrHWJ.js";import{a as d}from"./Tooltip-BaILXXti.js";import{C as f}from"./TextField-oipjeg6n.js";import{n as p}from"./Radio-DL8ja0ll.js";var m=e(t(),1);function h(e){return i(`MuiFormGroup`,e)}r(`MuiFormGroup`,[`root`,`row`,`error`]);var g=n(),_=e=>{let{classes:t,row:n,error:r}=e;return u({root:[`root`,n&&`row`,r&&`error`]},h,t)},v=l(`div`,{name:`MuiFormGroup`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.row&&t.row]}})({display:`flex`,flexDirection:`column`,flexWrap:`wrap`,variants:[{props:{row:!0},style:{flexDirection:`row`}}]}),y=m.forwardRef(function(e,t){let n=s({props:e,name:`MuiFormGroup`}),{className:r,row:i=!1,...o}=n,[c]=f({props:n,states:[`error`]}),l={...n,row:i,error:c.error};return(0,g.jsx)(v,{className:a(_(l).root,r),ownerState:l,ref:t,...o})});function b(e){return i(`MuiRadioGroup`,e)}r(`MuiRadioGroup`,[`root`,`row`,`error`]);var x=e=>{let{classes:t,row:n,error:r}=e;return u({root:[`root`,n&&`row`,r&&`error`]},b,t)},S=m.forwardRef(function(e,t){let{actions:n,children:r,className:i,defaultValue:s,name:l,onChange:u,value:f,...h}=e,_=m.useRef(null),v=x(e),[b,S]=d({controlled:f,default:s,name:`RadioGroup`});m.useImperativeHandle(n,()=>({focus:()=>{let e=_.current.querySelector(`input:not(:disabled):checked`);e||=_.current.querySelector(`input:not(:disabled)`),e&&e.focus()}}),[]);let C=o(t,_),w=c(l),T=m.useMemo(()=>({name:w,onChange(e){S(e.target.value),u&&u(e,e.target.value)},value:b}),[w,u,S,b]);return(0,g.jsx)(p.Provider,{value:T,children:(0,g.jsx)(y,{role:`radiogroup`,ref:C,className:a(v.root,i),...h,children:r})})});export{S as t};
@@ -1,4 +0,0 @@
1
- import{i as e,o as t,t as n}from"./react-GZhdek4G.js";import{t as r}from"./useTheme-CQqAmDLr.js";import{t as i}from"./jsx-runtime-BnvnyDTF.js";import{v as a}from"./createSimplePaletteValueFilter-BRAMrHWJ.js";import{i as o}from"./CircularProgress-C_LUU3DK.js";import{t as s}from"./Box-BQsxfFmC.js";import{t as c}from"./Button-CebB8EPB.js";import{ct as l}from"./index-C04TEs4k.js";import{a as u,i as d,r as f,t as p}from"./esm-DdgY1Q5s.js";var m=i(),h=o((0,m.jsx)(`path`,{d:`M3 21h18v-2H3zM3 8v8l4-4zm8 9h10v-2H11zM3 3v2h18V3zm8 6h10V7H11zm0 4h10v-2H11z`}),`FormatIndentIncrease`),g=e({default:()=>T}),_=t(n(),1),v=a(s,{shouldForwardProp:e=>e!==`editorStyle`&&e!==`hasError`})(({theme:e,editorStyle:t,hasError:n})=>({border:`1px solid ${n?e.palette.error.main:e.palette.divider}`,borderRadius:e.shape.borderRadiusMedium,overflow:`hidden`,position:`relative`,backgroundColor:e.palette.background.paper,minHeight:t===`sidePanel`?void 0:e.spacing(8),"&:hover":{borderColor:e.palette.action.disabled},"& .cm-cursor":{borderLeftWidth:e.spacing(.2),borderLeftColor:e.palette.text.primary},"&:focus-within":{borderColor:n?e.palette.error.main:e.palette.primary.main},"& .cm-editor":{backgroundColor:e.palette.background.paper,color:e.palette.text.primary,fontSize:e.fontSizes.smallBody,minHeight:`inherit`,outline:0,position:`relative`,zIndex:0},"& .cm-focused":{outline:0},"& .cm-content":{paddingTop:e.spacing(1),paddingRight:e.spacing(12),paddingBottom:e.spacing(1),minHeight:`inherit`},"& .cm-gutters":{backgroundColor:e.palette.background.alternative,borderRight:`1px solid ${e.palette.divider}`,color:e.palette.text.secondary,minHeight:`inherit`},"& .cm-lineNumbers .cm-gutterElement":{paddingLeft:e.spacing(.75),paddingRight:e.spacing(.75),textAlign:`center`},"& .cm-gutter":{minHeight:`inherit`},"& .cm-line":{paddingLeft:e.spacing(1),paddingRight:e.spacing(1)},"& .cm-scroller":{fontFamily:e.typography.fontFamily,minHeight:`inherit`},"& .cm-activeLine, & .cm-activeLineGutter":{backgroundColor:`transparent`},"& .cm-selectionBackground, & .cm-content ::selection":{backgroundColor:`${e.palette.primary.light} !important`},"& .cm-tooltip":{backgroundColor:e.palette.background.paper,border:`1px solid ${e.palette.divider}`,borderRadius:e.shape.borderRadiusMedium,boxShadow:e.shadows[3]},"& .cm-lintRange-error":{backgroundImage:`linear-gradient(45deg, transparent 65%, ${e.palette.error.main} 80%, transparent 90%),
2
- linear-gradient(135deg, transparent 5%, ${e.palette.error.main} 15%, transparent 25%),
3
- linear-gradient(135deg, transparent 45%, ${e.palette.error.main} 55%, transparent 65%),
4
- linear-gradient(45deg, transparent 25%, ${e.palette.error.main} 35%, transparent 50%)`,backgroundPosition:`0 100%`,backgroundRepeat:`repeat-x`,backgroundSize:`8px 3px`},"& .cm-diagnostic-error":{borderLeftColor:e.palette.error.main},...t===`sidePanel`&&{height:`100%`,border:0,backgroundColor:`transparent`,"&:hover, &:focus-within":{borderColor:`transparent`},"& .cm-editor":{height:`100%`,backgroundColor:`transparent`},"& .cm-gutters":{backgroundColor:`transparent`,color:e.palette.text.secondary}}})),y=a(c)(({theme:e})=>({position:`absolute`,top:e.spacing(.75),right:e.spacing(.75),zIndex:1,backgroundColor:e.palette.background.paper,"&:hover":{backgroundColor:e.palette.background.elevation1}})),b=a(`div`)(({theme:e})=>({padding:e.spacing(.5,1),borderTop:`1px solid ${e.palette.divider}`,backgroundColor:e.palette.background.alternative,color:e.palette.text.secondary,fontSize:e.fontSizes.smallBody})),x=a(`div`)(({theme:e})=>({display:`flex`,alignItems:`center`,gap:e.spacing(1),marginTop:e.spacing(.75),padding:e.spacing(1,1.5),border:`1px solid ${e.palette.error.border}`,borderRadius:e.shape.borderRadiusMedium,backgroundColor:e.palette.error.light,color:e.palette.error.dark,fontSize:e.fontSizes.smallBody,lineHeight:1.4})),S=a(`div`)({width:`100%`}),C=e=>`text`in e?e.text:JSON.stringify(e.json,void 0,2)??``,w=e=>{if(e.trim()!==``)try{JSON.parse(e);return}catch(e){return e instanceof Error?e.message:`Invalid JSON`}},T=({content:e,onChange:t,onBlur:n,validationError:i,readOnly:a=!1,statusBar:o=!1,editorStyle:s=`default`})=>{let c=r(),g=(0,_.useMemo)(()=>C(e),[e]),[T,E]=(0,_.useState)(),D=(0,_.useMemo)(()=>[d(),...a?[]:[f(u())]],[a]),O=!a&&i===void 0;(0,_.useEffect)(()=>{E(O?w(g):void 0)},[O,g]);let k=(0,_.useCallback)(e=>{O&&E(w(e)),t?.({text:e})},[t,O]),A=(0,_.useCallback)(()=>{let e;try{e=JSON.stringify(JSON.parse(g),void 0,2)}catch{return}t?.({text:e})},[t,g]),j=s===`sidePanel`?void 0:c.spacing(10),M=i??T;return(0,m.jsxs)(S,{children:[(0,m.jsxs)(v,{editorStyle:s,hasError:!!M,children:[a?null:(0,m.jsx)(y,{size:`medium`,variant:`outlined`,startIcon:(0,m.jsx)(h,{}),onClick:A,children:`Format`}),(0,m.jsx)(p,{value:g,minHeight:j,height:s===`sidePanel`?`100%`:void 0,theme:`none`,extensions:D,onChange:k,onBlur:n,readOnly:a,editable:!a,basicSetup:{foldGutter:!1,lineNumbers:!1,highlightActiveLine:!1,highlightActiveLineGutter:!1}}),o?(0,m.jsx)(b,{children:`JSON`}):null]}),M?(0,m.jsxs)(x,{role:`alert`,children:[(0,m.jsx)(l,{fontSize:`small`}),M]}):null]})};export{g as n,T as t};
@@ -1 +0,0 @@
1
- import{o as e,t}from"./react-GZhdek4G.js";import{r as n,u as r}from"./chunk-QUQL4437-Dr42NpoL.js";import{t as i}from"./jsx-runtime-BnvnyDTF.js";import{D as a,O as o,k as s,m as c,v as l,x as u}from"./createSimplePaletteValueFilter-BRAMrHWJ.js";import{A as d,M as f,O as p,_ as m,c as h,j as g,n as _,o as v,t as ee,v as te,w as y,y as ne}from"./useConditionallyHiddenColumns-C5q9zdfJ.js";import{t as re}from"./useMediaQuery-DGx8zAkf.js";import{t as ie}from"./Tooltip-BaILXXti.js";import{y as ae}from"./TextField-oipjeg6n.js";import{t as oe}from"./Radio-DL8ja0ll.js";import{i as se}from"./CircularProgress-C_LUU3DK.js";import{t as b}from"./ConditionallyRender---uTpMBn.js";import{r as ce,t as x}from"./Alert-_bLyWbvx.js";import{t as S}from"./Typography-BTdLWIUX.js";import{t as C}from"./Box-BQsxfFmC.js";import{t as w}from"./Button-CebB8EPB.js";import{t as T}from"./FormControlLabel-F5gDLixN.js";import{t as le}from"./RadioGroup-Ci3WHaOy.js";import{t as E}from"./Link-CfIScd2f.js";import{a as ue,i as D,n as O,o as de,r as fe,t as k}from"./useEnvironments-CTguhgy0.js";import{a as A,i as pe}from"./TooltipResolver-4A1YhwBy.js";import{t as j,u as me}from"./httpErrorResponseHandler-FMtt7Zqh.js";import{n as M}from"./formatPath-j72gcKwy.js";import{g as he,o as N}from"./PermissionButton-B-IfzChn.js";import{t as P}from"./useUiConfig-DbVjTDpE.js";import{t as F}from"./HtmlTooltip-B9jv1G1R.js";import{t as I}from"./Truncator-D2bO9ub6.js";import{f as L}from"./testIds-B_Ev-uQn.js";import{n as R,t as z}from"./FileCopy-B8HZEA83.js";import{t as ge}from"./useConditionalSWR-DGgzun6i.js";import{t as B}from"./Highlighter-MomUaQww.js";import{$o as _e,Aa as ve,Is as ye,Ja as be,Jo as V,Ko as xe,Wn as Se,da as Ce,ka as we,la as Te,no as H,qo as Ee,ro as De,ts as Oe,ua as ke,yr as Ae}from"./index-C04TEs4k.js";import{t as je}from"./useApiTokens-C8Dqw_X1.js";var U=e(t(),1);function Me(e){return o(`MuiTableContainer`,e)}a(`MuiTableContainer`,[`root`]);var W=i(),Ne=e=>{let{classes:t}=e;return u({root:[`root`]},Me,t)},Pe=l(`div`,{name:`MuiTableContainer`,slot:`Root`})({width:`100%`,overflowX:`auto`}),Fe=U.forwardRef(function(e,t){let n=c({props:e,name:`MuiTableContainer`}),{className:r,component:i=`div`,...a}=n,o={...n,component:i};return(0,W.jsx)(Pe,{ref:t,as:i,className:s(Ne(o).root,r),ownerState:o,...a})}),Ie=()=>(0,W.jsx)(x,{severity:`info`,children:(0,W.jsxs)(`p`,{children:[`Read the`,` `,(0,W.jsx)(`a`,{href:`https://docs.getunleash.io/sdks`,target:`_blank`,rel:`noreferrer`,children:`SDK overview`}),` `,`to connect Unleash to your application. Please note it can take up to `,(0,W.jsx)(`strong`,{children:`1 minute`}),` before a new API key is activated.`]})}),G=e(R(),1),K=({title:e,url:t})=>{let{setToastData:n}=A();return(0,W.jsxs)(O,{children:[(0,W.jsx)(D,{component:`th`,scope:`row`,children:e}),(0,W.jsx)(D,{children:(0,W.jsx)(`pre`,{style:{display:`inline`},children:t})}),(0,W.jsx)(D,{align:`center`,children:(0,W.jsx)(ie,{title:`Copy URL`,arrow:!0,children:(0,W.jsx)(ce,{onClick:(e=>()=>{(0,G.default)(e),n({type:`success`,text:`Copied to clipboard`})})(t),size:`small`,"aria-label":`Copy ${e} to clipboard`,children:(0,W.jsx)(z,{})})})})]})},q=l(D)(({theme:e})=>({color:e.palette.text.secondary})),Le=({compact:e})=>{let{uiConfig:t}=P(),[n,r]=(0,U.useState)(!e),i=t.unleashUrl&&(n||!t.edgeUrl),a=e&&t.edgeUrl&&t.unleashUrl,o=t.edgeUrl?{edgeUrl:`${t.edgeUrl}/api/`,edgeFrontendUrl:`${t.edgeUrl}/api/frontend/`}:void 0,s=`${t.unleashUrl}/api/`,c=`${t.unleashUrl}/api/frontend/`;return(0,W.jsxs)(Fe,{role:`region`,"aria-live":`polite`,children:[(0,W.jsxs)(de,{"aria-label":`API URLs`,id:`api-urls-table`,children:[(0,W.jsx)(fe,{children:(0,W.jsxs)(O,{children:[(0,W.jsx)(q,{children:`Type`}),(0,W.jsx)(q,{children:`URL`}),(0,W.jsx)(q,{align:`center`,children:`Actions`})]})}),(0,W.jsxs)(ue,{children:[o&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(K,{title:`Edge Backend`,url:o.edgeUrl}),(0,W.jsx)(K,{title:`Edge Frontend`,url:o.edgeFrontendUrl})]}),i&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(K,{title:`Backend`,url:s}),(0,W.jsx)(K,{title:`Frontend`,url:c})]})]})]}),a&&(0,W.jsx)(w,{sx:{mt:1,marginInline:1.5},variant:`text`,size:`medium`,"aria-expanded":n,"aria-controls":`api-urls-table`,onClick:()=>r(!n),children:n?`Show less`:`Show all`})]})},Re=[`Icon`,`createdAt`,`seenAt`],ze=[`Icon`,`project`,`seenAt`],J=l(S)(({theme:e})=>({margin:0,marginBottom:e.spacing(1.5),fontSize:e.fontSizes.smallBody,color:e.palette.text.primary})),Be=({compact:e=!1,table:t,columns:n,loading:r,globalFilter:i})=>{ee([{condition:re(ye.breakpoints.down(`xl`)),columns:Re},{condition:e,columns:ze}],t.setColumnVisibility,n);let a=t.getRowModel().rows.length;return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(b,{condition:a>0,show:(0,W.jsxs)(C,{sx:{mb:4},children:[(0,W.jsx)(Ie,{}),(0,W.jsxs)(C,{sx:{marginBlock:4},children:[(0,W.jsx)(J,{variant:`h2`,children:`API URLs`}),(0,W.jsx)(Le,{compact:e})]})]})}),(0,W.jsxs)(C,{sx:{overflowX:`auto`},children:[(0,W.jsx)(J,{variant:`h2`,children:`API Tokens`}),(0,W.jsx)(te,{value:i,children:(0,W.jsx)(Ce,{tableInstance:t})})]}),(0,W.jsx)(b,{condition:a===0&&!r,show:(0,W.jsx)(b,{condition:i?.length>0,show:(0,W.jsxs)(y,{children:[`No tokens found matching “`,i,`”`]}),elseShow:(0,W.jsx)(y,{children:(0,W.jsxs)(`span`,{children:[`No tokens available. Read `,(0,W.jsx)(E,{href:`https://docs.getunleash.io/api`,target:`_blank`,rel:`noreferrer`,children:`API How-to guides`}),` `,` to learn more.`]})})})})]})},Ve=(e,t)=>{let n=t>=e;return{limitReached:n,limitMessage:n?`You have reached the limit of ${e} API tokens`:void 0}},He=({path:e,permission:t,project:n})=>{let i=r(),{tokens:a,loading:o}=je(),{uiConfig:s}=P(),{limitReached:c,limitMessage:l}=Ve(s.resourceLimits.apiTokens,a.length);return(0,W.jsx)(Te,{Icon:De,onClick:()=>i(e),"data-testid":L,permission:t,projectId:n,maxWidth:`700px`,disabled:o||c,tooltipProps:{title:l},children:`New API token`})},Ue=l(n)(({theme:e})=>({textDecoration:`none`,color:e.palette.links,"&:hover, &:focus":{textDecoration:`underline`}})),We=l(`div`)({display:`flex`,alignItems:`center`}),Ge=({projects:e,project:t})=>{let{searchQuery:n}=ne(),r=e&&Array.isArray(e)&&e.length>1?e:[];if(r.length>0)return(0,W.jsx)(m,{children:(0,W.jsx)(F,{title:r.map((e,t)=>(0,W.jsxs)(U.Fragment,{children:[t>0&&`, `,!e||e===`*`?(0,W.jsx)(B,{search:n,children:`*`}):(0,W.jsx)(Ue,{to:`/projects/${e}`,children:(0,W.jsx)(B,{search:n,children:e})})]},e)),placement:`bottom-start`,arrow:!0,tabIndex:0,children:(0,W.jsxs)(`span`,{children:[`${r.length}`,` projects`]})})});if(r.length===1&&r[0]!==`*`||t&&t!==`*`){let e=t||r[0];return(0,W.jsx)(_e,{to:`/projects/${e}`,title:e})}return(0,W.jsx)(m,{children:(0,W.jsx)(F,{title:`ALL current and future projects.`,placement:`bottom`,arrow:!0,children:(0,W.jsx)(We,{children:(0,W.jsx)(B,{search:n,children:`*`})})})})},Y=se((0,W.jsx)(`path`,{d:`M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 4-4.04zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3`}),`Key`),Ke=({secret:e,project:t,projects:n})=>{let r=e?.includes(`:`)?`v2`:`v1`,i=e?.startsWith(`*:`),a=n&&n?.length>1||n?.length===1&&n[0]!==`*`||t&&t!==`*`;return r===`v2`&&!i&&!a},qe=({...e})=>Ke(e)?(0,W.jsx)(_,{icon:(0,W.jsx)(F,{title:(0,W.jsxs)(`p`,{children:[`This is an orphaned token. All of its original projects have been deleted and it now has access to all current and future projects. You should stop using this token and delete it. Read more in`,` `,(0,W.jsx)(E,{target:`_blank`,rel:`noopener noreferrer`,href:`https://github.com/Unleash/unleash/releases/tag/v6.1.0`,children:`release notes`}),`.`]}),placement:`bottom-start`,arrow:!0,children:(0,W.jsx)(ve,{"aria-label":`Orphaned token`,color:`warning`,"data-testid":`orphaned-token-icon`})})}):(0,W.jsx)(_,{icon:(0,W.jsx)(Y,{color:`disabled`})}),Je=(e,t)=>{let[n,r]=(0,U.useState)(``),i=(0,U.useMemo)(()=>({sorting:[{id:`createdAt`,desc:!0}]}),[]),a=(0,U.useMemo)(()=>[{id:`Icon`,cell:({row:e})=>(0,W.jsx)(qe,{secret:e.original.secret,project:e.original.project,projects:e.original.projects}),enableSorting:!1,enableGlobalFilter:!1,meta:{width:50}},{id:`tokenName`,header:`Token name`,accessorKey:`tokenName`,cell:v,meta:{minWidth:35}},{id:`type`,header:`Type`,accessorKey:`type`,cell:({getValue:e})=>{let t=Ye[String(e()??``).toLowerCase()];return(0,W.jsx)(v,{value:t?.label??``,subtitle:t?.title,subtitleTooltip:!0})},meta:{width:180}},{id:`project`,header:`Project`,accessorKey:`project`,cell:({row:e})=>(0,W.jsx)(Ge,{project:e.original.project,projects:e.original.projects}),meta:{width:160}},{id:`environment`,header:`Environment`,accessorKey:`environment`,cell:v,meta:{width:120}},{id:`createdAt`,header:`Created`,accessorKey:`createdAt`,cell:Oe,enableGlobalFilter:!1,meta:{width:150}},{id:`seenAt`,header:`Last seen`,accessorKey:`seenAt`,cell:ke,enableGlobalFilter:!1,meta:{width:140}},{id:`Actions`,header:`Actions`,cell:e=>t({row:e.row}),enableSorting:!1,enableGlobalFilter:!1,meta:{width:120,align:`center`}}],[]);return{table:p({columns:a,data:e,initialState:i,state:{globalFilter:n},onGlobalFilterChange:r,getCoreRowModel:d(),getSortedRowModel:f(),getFilteredRowModel:g(),autoResetAll:!1,enableSortingRemoval:!1}),columns:a,globalFilter:n,setGlobalFilter:r}},Ye={client:{label:`BACKEND`,title:`Connect backend SDK or Unleash Edge`},backend:{label:`BACKEND`,title:`Connect backend SDK or Unleash Edge`},frontend:{label:`FRONTEND`,title:`Connect frontend SDK`},admin:{label:`ADMIN`,title:`Full access for managing Unleash`}},Xe=({token:e,project:t,permission:n,track:r})=>{let{setToastData:i}=A(),a=e=>{(0,G.default)(e)&&(i({type:`success`,text:`Token copied to clipboard`}),r&&typeof r==`function`&&r())};return(0,W.jsx)(H,{permission:n,projectId:t,tooltipProps:{title:`Copy token`,arrow:!0},onClick:()=>a(e.secret),size:`large`,children:(0,W.jsx)(z,{})})},Ze=l(`ul`)({marginBottom:0}),Qe=({token:e,permission:t,onRemove:n,project:r})=>{let[i,a]=(0,U.useState)(!1),{setToastData:o,setToastApiError:s}=A();return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(H,{permission:t,projectId:r,tooltipProps:{title:`Delete token`,arrow:!0},onClick:()=>a(!0),size:`large`,children:(0,W.jsx)(be,{})}),(0,W.jsx)(V,{open:i,onClick:async()=>{try{await n(),a(!1),o({type:`success`,text:`API token removed`})}catch(e){s(pe(e))}},onClose:()=>a(!1),title:`Confirm deletion`,children:(0,W.jsxs)(`div`,{children:[`Are you sure you want to delete the following API token?`,(0,W.jsx)(`br`,{}),(0,W.jsxs)(Ze,{children:[(0,W.jsxs)(`li`,{children:[(0,W.jsx)(`strong`,{children:`name`}),`:`,` `,(0,W.jsx)(`code`,{children:e.tokenName})]}),(0,W.jsxs)(`li`,{children:[(0,W.jsx)(`strong`,{children:`type`}),`: `,(0,W.jsx)(`code`,{children:e.type})]}),(0,W.jsxs)(`li`,{children:[(0,W.jsx)(`strong`,{children:`environment`}),`:`,` `,(0,W.jsx)(`code`,{children:e.environment})]})]})]})})]})},$e=l(`div`)(()=>({maxWidth:`400px`})),et=l(`form`)(()=>({display:`flex`,flexDirection:`column`,height:`100%`})),tt=l(h)(({theme:e})=>({width:`100%`,marginBottom:e.spacing(2)})),nt=l(xe)(({theme:e})=>({marginBottom:e.spacing(2),minWidth:`400px`,[e.breakpoints.down(`sm`)]:{minWidth:`379px`}})),X=l(`p`)(({theme:e})=>({marginBottom:e.spacing(1)})),rt=l(`label`)(({theme:e})=>({marginBottom:e.spacing(1)})),Z=l(w)(({theme:e})=>({marginLeft:e.spacing(3)})),it=l(C)({marginTop:`auto`,display:`flex`,justifyContent:`flex-end`}),at=({children:e,actions:t,handleSubmit:n,handleCancel:r})=>{let{uiConfig:i}=P();return(0,W.jsxs)(et,{onSubmit:n,children:[(0,W.jsx)(b,{condition:!!i?.flags?.UNLEASH_CLOUD,show:(0,W.jsxs)(x,{severity:`info`,sx:{mb:4},children:[`Please be aware of our`,` `,(0,W.jsx)(E,{href:`https://www.getunleash.io/fair-use-policy`,children:`fair use policy`}),`.`]})}),e,(0,W.jsxs)(it,{children:[t,(0,W.jsx)(Z,{onClick:r,children:`Cancel`})]})]})},Q=function(e){return e.ADMIN=`ADMIN`,e.CLIENT=`CLIENT`,e.FRONTEND=`FRONTEND`,e}({}),ot=e=>{let{environments:t}=k(),n=t?.find(e=>e.enabled)?.name,r=N(he,e),i=[{key:Q.CLIENT,label:`Backend SDK`,title:`Creates a backend token to connect a backend SDK or Unleash Edge`,enabled:N(`CREATE_CLIENT_API_TOKEN`)||r},{key:Q.FRONTEND,label:`Frontend SDK`,title:`Creates a frontend token to connect a frontend SDK`,enabled:N(`CREATE_FRONTEND_API_TOKEN`)||r}],a=i.find(e=>e.enabled)?.key,[o,s]=(0,U.useState)(``),[c,l]=(0,U.useState)(a||Q.CLIENT),[u,d]=(0,U.useState)([e||`*`]),[f,p]=(0,U.useState)(u),[m,h]=(0,U.useState)(),[g,_]=(0,U.useState)({});return(0,U.useEffect)(()=>{h(c===`ADMIN`?`*`:n)},[c,n]),{tokenName:o,type:c,apiTokenTypes:i,projects:u,environment:m,setTokenName:s,setTokenType:e=>{e===`ADMIN`?(l(Q.ADMIN),p(u),d([`*`]),h(`*`)):(l(e),d(f),h(n))},setProjects:d,setEnvironment:h,getApiTokenPayload:()=>({tokenName:o,type:c,environment:m,projects:u}),isValid:()=>{let e={};return o||(e.tokenName=`Token name is required`),u.length===0&&(e.projects=`At least one project is required`),_(e),Object.keys(e).length===0},clearErrors:e=>{if(e){let t={...g};delete t[e],_(t)}else _({})},errors:g}},st=({open:e,setOpen:t,closeConfirm:r,token:i,type:a})=>(0,W.jsxs)(V,{open:e,setOpen:t,onClick:r,primaryButtonText:`Close`,title:`New token created`,children:[(0,W.jsx)(S,{variant:`body1`,children:`Your new token has been created successfully.`}),(0,W.jsx)(Ae,{token:i}),(0,W.jsx)(b,{condition:a===Q.FRONTEND,show:(0,W.jsxs)(x,{sx:{mt:2},severity:`info`,children:[`By default, all `,Q.FRONTEND,` tokens may be used from any CORS origin. If you'd like to configure a strict set of origins, please use the`,` `,(0,W.jsx)(n,{to:`/admin/cors`,target:`_blank`,rel:`noreferrer`,children:`CORS origins configuration page`}),`.`]})})]}),ct=({tokenName:e,setTokenName:t,errors:n,clearErrors:r})=>(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(X,{children:`What would you like to call this token?`}),(0,W.jsx)(tt,{value:e,name:`tokenName`,onChange:e=>t(e.target.value),label:`Token name`,error:n.tokenName!==void 0,errorText:n.tokenName,onFocus:()=>r(`tokenName`),autoFocus:!0})]}),lt=({type:e,setType:t,apiTokenTypes:n})=>(0,W.jsx)($e,{children:(0,W.jsxs)(ae,{sx:{mb:2,width:`100%`},children:[(0,W.jsx)(rt,{id:`token-type`,children:`What do you want to connect?`}),(0,W.jsx)(le,{"aria-labelledby":`token-type`,defaultValue:`CLIENT`,name:`radio-buttons-group`,value:e,onChange:(e,n)=>t(n),children:n.map(({key:e,label:t,title:n,enabled:r})=>(0,W.jsx)(T,{value:e,sx:{mb:1},disabled:!r,control:(0,W.jsx)(oe,{sx:{ml:.75,alignSelf:`flex-start`}}),label:(0,W.jsx)(C,{children:(0,W.jsxs)(C,{children:[(0,W.jsx)(S,{children:t}),(0,W.jsx)(S,{variant:`body2`,sx:{color:`text.secondary`},children:n})]})})},e))})]})}),ut=({type:e,environment:t,setEnvironment:n})=>{let{environments:r}=k(),i=e===Q.ADMIN?[{key:`*`,label:`ALL`}]:r.map(e=>({key:e.name,label:`${e.name.concat(e.enabled?``:` - deprecated`)}`,title:e.name,disabled:!1}));return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(X,{children:`Which environment should the token have access to?`}),(0,W.jsx)(nt,{disabled:e===Q.ADMIN,options:i,value:t,onChange:n,label:`Environment`,id:`api_key_environment`,name:`environment`,IconComponent:Ee,fullWidth:!0})]})},$=e=>e.map(e=>({...e.user,joinedAt:new Date(e.joinedAt),createdBy:e.createdBy})),dt=e=>{let{data:t,error:n,mutate:r}=me(M(`api/admin/groups/${e}`),ft);return(0,U.useMemo)(()=>({group:t&&{...t,users:$(t?.users??[])},loading:!n&&!t,refetchGroup:()=>r(),error:n}),[t,n,r])},ft=e=>fetch(e).then(j(`Group`)).then(e=>e.json()),pt=()=>{let{isEnterprise:e}=P(),{data:t,error:n,mutate:r}=ge(e(),{serviceAccounts:[],rootRoles:[]},M(`api/admin/service-account`),mt);return(0,U.useMemo)(()=>({serviceAccounts:t?.serviceAccounts??[],roles:t?.rootRoles??[],loading:!n&&!t,refetch:()=>r(),error:n}),[t,n,r])},mt=e=>fetch(e).then(j(`Service Accounts`)).then(e=>e.json()),ht=l(`div`)(({theme:e})=>({display:`flex`,flexDirection:`column`,gap:e.spacing(.5),"& > *:not(:last-child)":{borderBottom:`1px solid ${e.palette.divider}`,paddingBottom:e.spacing(1)}})),gt=l(I)(()=>({display:`block`})),_t=({role:e,roles:t,value:n})=>{let{isEnterprise:r}=P();return r()?(0,W.jsx)(m,{children:(0,W.jsx)(we,{tooltip:(0,W.jsx)(ht,{children:(t||[e]).map(e=>(0,W.jsx)(Se,{roleId:e,tooltip:!0},e))}),children:(0,W.jsx)(gt,{children:n})})}):(0,W.jsx)(m,{children:n})};export{He as _,ut as a,st as c,at as d,X as f,Y as g,Je as h,dt as i,ot as l,Xe as m,pt as n,lt as o,Qe as p,$ as r,ct as s,_t as t,Q as u,Be as v};
@@ -1 +0,0 @@
1
- import{o as e,t}from"./react-GZhdek4G.js";import{f as n}from"./chunk-QUQL4437-Dr42NpoL.js";import{t as r}from"./jsx-runtime-BnvnyDTF.js";import{v as i}from"./createSimplePaletteValueFilter-BRAMrHWJ.js";import{t as a}from"./Tooltip-BaILXXti.js";import{E as o,a as s,i as c,r as l}from"./TextField-oipjeg6n.js";import{r as u}from"./Alert-_bLyWbvx.js";import{t as d}from"./Typography-BTdLWIUX.js";import{t as f}from"./Box-BQsxfFmC.js";import{t as p}from"./Button-CebB8EPB.js";import{a as m,i as h,n as g,o as _}from"./TooltipResolver-4A1YhwBy.js";import{H as v}from"./PermissionButton-B-IfzChn.js";import{t as y}from"./HelpOutlineOutlined-CpMsVJZu.js";import{Ai as b,D as x,H as S,Jo as C,Mi as w,ft as T,po as E,ro as D,to as O}from"./index-C04TEs4k.js";var k=e(t(),1),A=r(),j=({isOpen:e,onConfirm:t,onClose:n,safeguardData:r,mode:i,safeguardType:a})=>{let{metricName:o}=r.impactMetric;return(0,A.jsx)(C,{title:`Request changes`,open:e,secondaryButtonText:`Cancel`,onClose:n,customButton:(0,A.jsx)(p,{color:`primary`,variant:`contained`,onClick:t,autoFocus:!0,children:`Add suggestion to draft`}),children:(0,A.jsxs)(`p`,{children:[i===`create`?`Add`:`Update`,` safeguard that an`,` `,a===`featureEnvironment`?`disables the environment`:`pauses automation`,` based on `,(0,A.jsx)(`strong`,{children:o})]})})},M=()=>{let{makeRequest:e,createRequest:t,errors:n,loading:r}=g({propagateErrors:!0});return{createOrUpdateReleasePlanSafeguard:async({projectId:n,featureName:r,environment:i,planId:a,body:o})=>{let s=t(`api/admin/projects/${n}/features/${r}/environments/${i}/release-plans/${a}/safeguards`,{method:`PUT`,body:JSON.stringify(o)},`createOrUpdateReleasePlanSafeguard`);await e(s.caller,s.id)},createOrUpdateFeatureEnvironmentSafeguard:async({projectId:n,featureName:r,environment:i,body:a})=>{let o=t(`api/admin/projects/${n}/features/${r}/environments/${i}/safeguards`,{method:`PUT`,body:JSON.stringify(a)},`createOrUpdateFeatureEnvironmentSafeguard`);await e(o.caller,o.id)},deleteReleasePlanSafeguard:async({projectId:n,featureName:r,environment:i,planId:a,safeguardId:o})=>{let s=t(`api/admin/projects/${n}/features/${r}/environments/${i}/release-plans/${a}/safeguards/${o}`,{method:`DELETE`},`deleteReleasePlanSafeguard`);await e(s.caller,s.id)},deleteFeatureEnvironmentSafeguard:async({projectId:n,featureName:r,environment:i,safeguardId:a})=>{let o=t(`api/admin/projects/${n}/features/${r}/environments/${i}/safeguards/${a}`,{method:`DELETE`},`deleteFeatureEnvironmentSafeguard`);await e(o.caller,o.id)},errors:n,loading:r}},N=({open:e,onClose:t,onConfirm:n,isDeleting:r=!1})=>(0,A.jsxs)(C,{title:`Remove safeguard?`,open:e,primaryButtonText:r?`Removing...`:`Remove safeguard`,secondaryButtonText:`Cancel`,onClick:n,onClose:t,disabledPrimaryButton:r,children:[(0,A.jsx)(`p`,{children:`You are about to remove the safeguard that pauses automation when conditions are met.`}),(0,A.jsx)(`br`,{}),(0,A.jsx)(`p`,{children:`This action cannot be undone.`})]}),P=i(`div`)(({theme:e})=>({display:`flex`,padding:e.spacing(.25,.25),backgroundColor:T(e),borderTop:`1px solid ${e.palette.divider}`,borderBottom:`1px solid ${e.palette.divider}`,"& > form":{borderRadius:0,border:`none`}})),F=i(`div`)(({theme:e})=>({display:`flex`,alignItems:`center`,width:`100%`,paddingRight:e.spacing(2)})),I=i(c)(({theme:e})=>({[`& .${s.paper}`]:{maxWidth:e.spacing(45)}})),L=i(o)(({theme:e})=>({padding:e.spacing(1,2,.5,2),lineHeight:1.6,textTransform:`uppercase`,letterSpacing:.5,fontSize:e.typography.caption.fontSize,fontWeight:e.typography.fontWeightBold,color:e.palette.text.secondary,backgroundColor:`transparent`})),R={whiteSpace:`normal`,alignItems:`flex-start`,py:1.25},z=i(`li`)({listStyle:`none`,padding:0,margin:0}),B=i(d)(({theme:e})=>({display:`block`,marginTop:e.spacing(.25),color:e.palette.text.secondary})),V=i(u)(({theme:e})=>({color:e.palette.action.active,padding:e.spacing(.5)})),H=()=>{let[e,t]=n(),{trackEvent:r}=_();return(0,A.jsx)(a,{title:`Learn how safeguards work`,arrow:!0,children:(0,A.jsx)(V,{onClick:()=>{r(`safeguards`,{props:{eventType:`splash opened from feature page`}}),e.set(`splash`,`impact-metrics-safeguards`),t(e)},size:`medium`,"aria-label":`Learn how safeguards work`,children:(0,A.jsx)(y,{})})})},U=({onSelect:e,releasePlan:t})=>{let[n,r]=(0,k.useState)(null),{trackEvent:i}=_();return(0,A.jsxs)(P,{children:[(0,A.jsxs)(F,{children:[(0,A.jsx)(S,{onClick:e=>{i(`safeguards`,{props:{eventType:`choose safeguard opened`}}),r(e.currentTarget)},color:`primary`,startIcon:(0,A.jsx)(D,{}),sx:{mt:2,mb:2,ml:2,mr:.5},children:`Add safeguard`}),(0,A.jsx)(H,{})]}),(0,A.jsxs)(I,{anchorEl:n,open:!!n,onClose:()=>r(null),children:[(0,A.jsx)(L,{disableSticky:!0,children:`Select safeguard action`}),(0,A.jsx)(l,{sx:R,onClick:()=>{i(`safeguards`,{props:{eventType:`form opened`,safeguardType:`featureEnvironment`}}),e(`featureEnvironment`),r(null)},children:(0,A.jsxs)(f,{children:[(0,A.jsx)(d,{variant:`body2`,children:`Disable environment`}),(0,A.jsx)(B,{variant:`caption`,children:`If your chosen metric crosses its threshold, this flag is turned off in this environment. Existing users stop seeing the flag immediately.`})]})}),(0,A.jsx)(a,{title:t?``:`Add a release plan to use this safeguard`,placement:`right`,arrow:!0,children:(0,A.jsx)(z,{children:(0,A.jsx)(l,{component:`div`,sx:R,disabled:!t,onClick:()=>{i(`safeguards`,{props:{eventType:`form opened`,safeguardType:`releasePlan`}}),e(`releasePlan`),r(null)},children:(0,A.jsxs)(f,{children:[(0,A.jsx)(d,{variant:`body2`,children:`Pause release plan automation`}),(0,A.jsx)(B,{variant:`caption`,children:`If your chosen metric crosses its threshold, automatic milestone progression stops. The current milestone keeps serving traffic.`})]})})})})]})]})},W=({projectId:e,featureId:t,environmentName:n,safeguardType:r,releasePlan:i,safeguard:a,onSafeguardChange:o})=>{let{setToastData:s,setToastApiError:c}=m(),{trackEvent:l}=_(),{addChange:u}=w(),{isChangeRequestConfigured:d}=v(e),{data:f,refetch:p}=b(e),{createOrUpdateReleasePlanSafeguard:g,deleteReleasePlanSafeguard:y,createOrUpdateFeatureEnvironmentSafeguard:x,deleteFeatureEnvironmentSafeguard:S}=M(),[C,T]=(0,k.useState)(!1),[E,D]=(0,k.useState)(!1),[O,A]=(0,k.useState)(!1),[j,N]=(0,k.useState)(null),[P,F]=(0,k.useState)(!1),I=d(n),L=r===`releasePlan`&&i?r=>g({projectId:e,featureName:t,environment:n,planId:i.id,body:r}):r=>x({projectId:e,featureName:t,environment:n,body:r}),R=r===`releasePlan`&&i?r=>y({projectId:e,featureName:t,environment:n,planId:i.id,safeguardId:r}):r=>S({projectId:e,featureName:t,environment:n,safeguardId:r}),z=async e=>{if(l(`safeguards`,{props:{eventType:`safeguard submitted`,safeguardType:r}}),I){N(e),A(!0);return}try{await L(e),s({type:`success`,text:`Safeguard added successfully`}),o()}catch(e){c(h(e))}},B=async()=>{if(j)try{if(r===`featureEnvironment`)await u(e,n,{feature:t,action:`changeFeatureEnvSafeguard`,payload:{safeguard:j}});else{if(!i)return;await u(e,n,{feature:t,action:`changeReleasePlanSafeguard`,payload:{planId:i.id,safeguard:j}})}await p(),s({type:`success`,text:`Added to draft`}),o()}catch(e){c(h(e))}finally{A(!1),N(null)}},V=()=>{a&&(I?D(!0):T(!0))},H=async()=>{if(!(!a||P)){F(!0);try{await R(a.id),s({type:`success`,text:`Safeguard deleted successfully`}),o()}catch(e){c(h(e))}finally{F(!1),T(!1)}}},U=async()=>{if(!(!a||P)){F(!0);try{if(r===`featureEnvironment`)await u(e,n,{feature:t,action:`deleteFeatureEnvSafeguard`,payload:{safeguardId:a.id}});else{if(!i)return;await u(e,n,{feature:t,action:`deleteReleasePlanSafeguard`,payload:{planId:i.id,safeguardId:a.id}})}await p(),s({type:`success`,text:`Added to draft`}),o()}catch(e){c(h(e))}finally{F(!1),D(!1)}}},W=e=>{let t=(e.action===`changeReleasePlanSafeguard`||e.action===`deleteReleasePlanSafeguard`)&&!!i&&e.payload?.planId===i.id,n=e.action===`changeFeatureEnvSafeguard`||e.action===`deleteFeatureEnvSafeguard`;return t||n};return{handleSubmit:z,handleDeleteRequest:V,pendingSafeguardAction:(0,k.useMemo)(()=>{if(!f)return null;for(let e of f){if(e.environment!==n)continue;let r=e.features.find(e=>e.name===t);if(!r)continue;let i=r.changes.find(W);if(i)return i.action}return null},[f,n,t,i?.id]),deleteDialog:{open:C,isDeleting:P,onConfirm:H,onClose:()=>{P||T(!1)}},deleteChangeRequestDialog:{open:E,isDeleting:P,onConfirm:U,onClose:()=>D(!1)},submitChangeRequestDialog:{open:O,data:j,onConfirm:B,onClose:()=>{A(!1),N(null)}}}},G=({safeguardType:e,releasePlan:t,safeguard:n,environmentName:r,featureId:i,onSafeguardChange:a,onCancel:o,headerAction:s})=>{let{handleSubmit:c,handleDeleteRequest:l,pendingSafeguardAction:u,deleteDialog:d,deleteChangeRequestDialog:f,submitChangeRequestDialog:p}=W({projectId:O(`projectId`),featureId:i,environmentName:r,safeguardType:e,releasePlan:t,safeguard:n,onSafeguardChange:a});return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(x,{safeguard:n,onSubmit:c,onCancel:o,onDelete:n?l:void 0,environment:r,featureId:i,badge:u===`deleteReleasePlanSafeguard`||u===`deleteFeatureEnvSafeguard`?(0,A.jsx)(E,{color:`error`,children:`Deleted in draft`}):u===`changeReleasePlanSafeguard`||u===`changeFeatureEnvSafeguard`?(0,A.jsx)(E,{color:`warning`,children:`Modified in draft`}):void 0,safeguardType:e,headerAction:s}),p.data&&(0,A.jsx)(j,{isOpen:p.open,onConfirm:p.onConfirm,onClose:()=>{p.onClose(),o()},safeguardData:p.data,environment:r,mode:n?`edit`:`create`,safeguardType:e}),n&&(0,A.jsx)(N,{open:d.open,onClose:d.onClose,onConfirm:d.onConfirm,isDeleting:d.isDeleting}),n&&(0,A.jsx)(C,{title:`Request changes`,open:f.open,secondaryButtonText:`Cancel`,onClose:f.onClose,primaryButtonText:`Add suggestion to draft`,onClick:f.onConfirm,disabledPrimaryButton:f.isDeleting,children:(0,A.jsxs)(`p`,{children:[(0,A.jsx)(`strong`,{children:`Remove`}),` safeguard`,t&&(0,A.jsxs)(A.Fragment,{children:[` `,`from release plan`,` `,(0,A.jsx)(`strong`,{children:t.name})]}),` `,`for `,(0,A.jsx)(`strong`,{children:i}),` in`,` `,(0,A.jsx)(`strong`,{children:r})]})})]})},K=({featureEnvSafeguard:e,releasePlan:t,environmentName:n,featureId:r,onSafeguardChange:i})=>{let a=t?.safeguards?.[0],[o,s]=(0,k.useState)(null),c=()=>{s(null),i()};return e||a?(0,A.jsxs)(A.Fragment,{children:[e&&(0,A.jsx)(P,{children:(0,A.jsx)(G,{safeguardType:`featureEnvironment`,safeguard:e,environmentName:n,featureId:r,onSafeguardChange:c,onCancel:()=>{},headerAction:(0,A.jsx)(H,{})})}),a&&(0,A.jsx)(P,{children:(0,A.jsx)(G,{safeguardType:`releasePlan`,releasePlan:t,safeguard:a,environmentName:n,featureId:r,onSafeguardChange:c,onCancel:()=>{},headerAction:(0,A.jsx)(H,{})})})]}):o===`featureEnvironment`?(0,A.jsx)(P,{children:(0,A.jsx)(G,{safeguardType:`featureEnvironment`,environmentName:n,featureId:r,onSafeguardChange:i,onCancel:()=>s(null)})}):o===`releasePlan`&&t?(0,A.jsx)(P,{children:(0,A.jsx)(G,{safeguardType:`releasePlan`,releasePlan:t,environmentName:n,featureId:r,onSafeguardChange:i,onCancel:()=>s(null)})}):(0,A.jsx)(U,{onSelect:s,releasePlan:t})};export{U as AddSafeguard,K as Safeguard,K as default};
@@ -1,2 +0,0 @@
1
- import{t as e}from"./jsx-runtime-BnvnyDTF.js";import{v as t}from"./createSimplePaletteValueFilter-BRAMrHWJ.js";import{b as n,t as r}from"./TextField-oipjeg6n.js";import{t as i}from"./Alert-_bLyWbvx.js";import{r as a}from"./formatPath-j72gcKwy.js";import{Da as o}from"./index-C04TEs4k.js";import{a as s,f as c,i as l,m as u}from"./DialogWithAside-DzCSDyWo.js";var d=(e,t)=>{let n=e.split(`---
2
- `)[3];return n?n.replaceAll(`<YOUR_FLAG>`,t):null},f=e(),p=()=>(0,f.jsx)(i,{severity:`error`,children:`This SDK is missing a flag usage example. Please let us know so we can add one!`}),m=({sdkName:e,feature:t})=>{let n=s[e],r=n?d(n,t):null;return r===null?(0,f.jsx)(p,{}):(0,f.jsx)(o,{components:{code:l},children:r})},h=new Set(u.map(e=>e.name)),g=t(`div`)(({theme:e})=>({minWidth:e.spacing(20),maxWidth:e.spacing(32.5)})),_=t(`li`)(({theme:e})=>({display:`flex`,alignItems:`center`,gap:e.spacing(1)})),v=t(`img`)(({theme:e})=>({width:e.spacing(2.5),height:e.spacing(2.5),flexShrink:0,borderRadius:e.shape.borderRadiusSmall,marginLeft:e.spacing(.5)})),y=t(`span`)({flex:1}),b=({value:e,onChange:t})=>{let i=c.map(e=>({...e,group:h.has(e.name)?`Backend SDKs`:`Frontend SDKs`})).sort((e,t)=>e.group.localeCompare(t.group)||e.name.localeCompare(t.name)),o=i.find(t=>t.name===e)?.icon;return(0,f.jsx)(g,{children:(0,f.jsx)(n,{disableClearable:!0,options:i,value:i.find(t=>t.name===e),groupBy:e=>e.group,getOptionLabel:e=>e.name,isOptionEqualToValue:(e,t)=>e.name===t.name,onChange:(e,n)=>{n?.name&&t(n.name)},renderOption:({key:e,...t},n)=>(0,f.jsxs)(_,{...t,children:[(0,f.jsx)(v,{src:a(n.icon),alt:``}),(0,f.jsx)(y,{children:n.name})]},e),renderInput:e=>(0,f.jsx)(r,{...e,label:`SDK`,size:`small`,slotProps:{...e.slotProps,input:{...e.slotProps?.input,startAdornment:o&&(0,f.jsx)(v,{src:a(o),alt:``})}}})})})};export{m as n,b as t};
@@ -1,2 +0,0 @@
1
- import{i as e,o as t,t as n}from"./react-GZhdek4G.js";import{f as r}from"./chunk-QUQL4437-Dr42NpoL.js";import{t as i}from"./useTheme-CQqAmDLr.js";import{t as a}from"./jsx-runtime-BnvnyDTF.js";import{v as o}from"./createSimplePaletteValueFilter-BRAMrHWJ.js";import{t as s}from"./Tooltip-BaILXXti.js";import{i as c}from"./CircularProgress-C_LUU3DK.js";import{r as ee}from"./Alert-_bLyWbvx.js";import{t as l}from"./Typography-BTdLWIUX.js";import{t as u}from"./Box-BQsxfFmC.js";import{t as d}from"./Button-CebB8EPB.js";import{Da as f,Fs as p,Is as m,Ps as te,Y as h,nt as ne,tc as g,tt as re,v as _}from"./index-C04TEs4k.js";import{t as v}from"./ReactJSONEditor-DeBI7JPg.js";import{a as y,c as b,d as x,f as S,i as ie,n as C,o as w,s as ae,t as T}from"./DialogWithAside-DzCSDyWo.js";import{n as E,t as D}from"./SelectSdk-Dr_pzQgX.js";import{n as O,t as k}from"./OnboardingProgress-Bp9sZ-ZM.js";var oe=e({FourRequests:()=>le,LongEmailTruncates:()=>de,SingleRequest:()=>ce,TenRequestsOnlyLatestFourShown:()=>ue,meta:()=>se}),A=a(),se={title:`Admin / AccessRequestsNotifications`,background:`application`},j=Date.parse(`2026-06-24T12:00:00Z`),M=e=>{let t=Date.now();return Array.from({length:e},(e,n)=>({id:`req-${t}-${n+1}`,email:`requester${n+1}@example.com`,requestedAt:new Date(j-n*864e5).toISOString()}))},ce=()=>(0,A.jsx)(_,{accessRequests:M(1),storageKey:`story:access-requests:single`}),le=()=>(0,A.jsx)(_,{accessRequests:M(4),storageKey:`story:access-requests:four`}),ue=()=>(0,A.jsx)(_,{accessRequests:M(10),maxVisible:4,storageKey:`story:access-requests:ten`}),de=()=>(0,A.jsx)(_,{accessRequests:[{id:`req-long`,email:`a-very-long-email-address-that-should-truncate@some-organization.example.com`,requestedAt:new Date(j).toISOString()}],storageKey:`story:access-requests:long-email`}),fe=e({Default:()=>F,WithLongContent:()=>I,meta:()=>pe}),N=t(n(),1),pe={title:`Common/DialogWithAside`,background:`application`},P=()=>(0,A.jsxs)(u,{sx:{p:3,display:`flex`,flexDirection:`column`,gap:2},children:[(0,A.jsx)(l,{variant:`body2`,sx:{fontWeight:`bold`},children:`Aside panel`}),(0,A.jsx)(l,{variant:`body2`,children:`This area is always 320 px wide and hidden below the md breakpoint. The close button in the header handles dismissal on all screen sizes.`})]}),F=()=>{let[e,t]=(0,N.useState)(!0);return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(d,{variant:`contained`,onClick:()=>t(!0),children:`Open dialog`}),(0,A.jsx)(T,{open:e,onClose:()=>t(!1),title:`Dialog title`,aside:(0,A.jsx)(P,{}),children:(0,A.jsxs)(u,{sx:{p:3,display:`flex`,flexDirection:`column`,gap:2},children:[(0,A.jsx)(l,{variant:`body1`,sx:{fontWeight:`bold`},children:`Main content`}),(0,A.jsx)(l,{variant:`body2`,children:`Children are rendered in the scrollable left column.`})]})})]})},I=()=>{let[e,t]=(0,N.useState)(!1);return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(d,{variant:`contained`,onClick:()=>t(!0),children:`Open dialog`}),(0,A.jsx)(T,{open:e,onClose:()=>t(!1),title:`Scrolling content`,aside:(0,A.jsx)(P,{}),children:(0,A.jsx)(u,{sx:{p:3,display:`flex`,flexDirection:`column`,gap:3},children:Array.from({length:12},(e,t)=>(0,A.jsxs)(u,{children:[(0,A.jsxs)(l,{variant:`body2`,sx:{fontWeight:`bold`,mb:.5},children:[`Section `,t+1]}),(0,A.jsx)(l,{variant:`body2`,children:`Content scrolls inside the left column while the aside and header stay fixed.`})]},t))})})]})},L=e({Default:()=>me,Empty:()=>be,InvalidJson:()=>ye,ReadOnly:()=>_e,WithStatusBar:()=>ge,WithValidationError:()=>ve,meta:()=>R}),R={title:`Common/ReactJSONEditor`},z={name:`example`,enabled:!0,value:42,tags:[`a`,`b`]},B=({initial:e})=>{let[t,n]=(0,N.useState)({text:e});return(0,A.jsx)(v,{content:t,onChange:e=>n(e)})},me=()=>(0,A.jsx)(B,{initial:JSON.stringify(z,void 0,2)}),he=()=>{let[e,t]=(0,N.useState)({text:JSON.stringify(z,void 0,2)});return(0,A.jsx)(v,{content:e,onChange:e=>t(e),statusBar:!0})},ge=()=>(0,A.jsx)(he,{}),_e=()=>(0,A.jsx)(v,{content:{json:z},readOnly:!0}),ve=()=>(0,A.jsx)(v,{content:{text:`{ "key": "value" }`},validationError:`Custom validation error: value must be a number`}),ye=()=>(0,A.jsx)(B,{initial:`{ invalid json }`}),be=()=>(0,A.jsx)(B,{initial:``}),xe=e({Android:()=>Ie,DotNet:()=>Te,Flutter:()=>Le,Go:()=>we,Java:()=>ke,JavaScript:()=>je,MissingSnippet:()=>Re,NodeJs:()=>Ce,Php:()=>De,Python:()=>Ae,React:()=>Me,Ruby:()=>Ee,Rust:()=>Oe,Svelte:()=>Pe,Swift:()=>Fe,Vue:()=>Ne,meta:()=>Se}),Se={title:`Onboarding/ImplementFlagDialog/FlagUsageSnippet`,background:`paper`},V=`my-feature-flag`,Ce=()=>(0,A.jsx)(E,{sdkName:`Node.js`,feature:V}),we=()=>(0,A.jsx)(E,{sdkName:`Go`,feature:V}),Te=()=>(0,A.jsx)(E,{sdkName:`.NET`,feature:V}),Ee=()=>(0,A.jsx)(E,{sdkName:`Ruby`,feature:V}),De=()=>(0,A.jsx)(E,{sdkName:`PHP`,feature:V}),Oe=()=>(0,A.jsx)(E,{sdkName:`Rust`,feature:V}),ke=()=>(0,A.jsx)(E,{sdkName:`Java`,feature:V}),Ae=()=>(0,A.jsx)(E,{sdkName:`Python`,feature:V}),je=()=>(0,A.jsx)(E,{sdkName:`JavaScript`,feature:V}),Me=()=>(0,A.jsx)(E,{sdkName:`React`,feature:V}),Ne=()=>(0,A.jsx)(E,{sdkName:`Vue`,feature:V}),Pe=()=>(0,A.jsx)(E,{sdkName:`Svelte`,feature:V}),Fe=()=>(0,A.jsx)(E,{sdkName:`Swift`,feature:V}),Ie=()=>(0,A.jsx)(E,{sdkName:`Android`,feature:V}),Le=()=>(0,A.jsx)(E,{sdkName:`Flutter`,feature:V}),Re=()=>(0,A.jsx)(E,{sdkName:`Unknown`,feature:`my-feature-flag`}),ze=e({Default:()=>He,meta:()=>Be}),Be={title:`Onboarding/ImplementFlagDialog/SelectSdk`,background:`paper`},Ve=({initial:e})=>{let[t,n]=(0,N.useState)(e);return(0,A.jsx)(D,{value:t,onChange:n})},He=()=>(0,A.jsx)(Ve,{initial:S[0].name}),Ue=e({Default:()=>Ge,meta:()=>We}),We={title:`Menu/Header/HelpResources`},Ge=()=>(0,A.jsx)(h,{}),Ke=e({Android:()=>ut,DotNet:()=>$e,Flutter:()=>dt,Go:()=>Qe,Java:()=>rt,JavaScript:()=>at,NextJs:()=>ft,NodeJs:()=>Ze,Php:()=>tt,Python:()=>it,ReactNative:()=>pt,ReactSdk:()=>ot,Ruby:()=>et,Rust:()=>nt,Svelte:()=>ct,Swift:()=>lt,Vue:()=>st,meta:()=>qe}),qe={title:`Onboarding/CodeRenderer`,background:`paper`},Je=`my-feature-flag`,Ye=`my-api-token`,Xe=`https://us.app.unleash-hosted.com/ushosted/api`,H=e=>{let[t]=(y[e]||``).replace(`<YOUR_API_TOKEN>`,Ye).replace(`<YOUR_API_URL>`,Xe).replaceAll(`<YOUR_FLAG>`,Je).split(`---
2
- `);return(0,A.jsx)(f,{components:{code:ie},children:t})},Ze=()=>H(`Node.js`),Qe=()=>H(`Go`),$e=()=>H(`.NET`),et=()=>H(`Ruby`),tt=()=>H(`PHP`),nt=()=>H(`Rust`),rt=()=>H(`Java`),it=()=>H(`Python`),at=()=>H(`JavaScript`),ot=()=>H(`React`),st=()=>H(`Vue`),ct=()=>H(`Svelte`),lt=()=>H(`Swift`),ut=()=>H(`Android`),dt=()=>H(`Flutter`),ft=()=>H(`Next.js`),pt=()=>H(`React Native`),mt=e({Default:()=>gt,meta:()=>ht}),ht={title:`Onboarding / GenerateApiKey`,background:`paper`},gt=()=>(0,A.jsx)(ae,{projectId:`my-project`,environments:[`production`,`development`,`staging`],sdk:{type:`client`},onApiKeyChange:e=>console.log(`API key changed:`,e),onNext:()=>console.log(`Next clicked`)}),_t=e({Default:()=>yt,LongKey:()=>bt,NoKey:()=>xt,meta:()=>vt}),vt={title:`Onboarding / GenerateApiKeySummary`,background:`paper`},yt=()=>(0,A.jsx)(w,{apiKey:`my-project:production.0efcb2447a1b9f417c90afea8415dd867f1998bea7db9c13714554f3`}),bt=()=>(0,A.jsx)(w,{apiKey:`my-very-long-project-name:some-environment-name.averylongsecretkeythatshouldgettruncated12345`}),xt=()=>(0,A.jsx)(w,{}),St=e({Default:()=>wt,meta:()=>Ct}),Ct={title:`Onboarding / TokenExplanation`,background:`paper`},wt=()=>(0,A.jsx)(b,{project:`my-project-here`,environment:`production`,secret:`0efcb2447a1b9f417c90afea8415dd867f1998bea7db9c13714554f3`}),Tt=e({Default:()=>Dt,WithSelection:()=>Ot,meta:()=>Et}),Et={title:`Onboarding / SelectSdk`,background:`paper`},Dt=()=>(0,A.jsx)(x,{onSelect:e=>console.log(`Selected SDK:`,e)}),Ot=()=>(0,A.jsx)(x,{sdk:{name:`Node.js`,type:`client`},onSelect:e=>console.log(`Selected SDK:`,e)}),kt=e({Default:()=>Mt,meta:()=>At}),At={title:`Onboarding/SdkEvaluationStatus`,background:`paper`},jt=o(`div`)(({theme:e})=>({display:`flex`,flexDirection:`column`,gap:e.spacing(4),maxWidth:600})),U=o(`div`)(({theme:e})=>({display:`flex`,flexDirection:`column`,gap:e.spacing(1)})),W={connectedTitle:`We received metrics from your application`,connectedBody:`Your SDK is connected and evaluating flags.`,waitingTitle:`Waiting for SDK data...`,waitingBody:`Run your app and evaluate your flag. This step completes on its own.`},G={connectedTitle:`Got the first evaluation!`,connectedBody:`Your flag is wired up. Finish setup to close this dialog.`,waitingTitle:`Listening for the first evaluation…`,waitingBody:`Run your app and evaluate your flag.`},Mt=()=>(0,A.jsxs)(jt,{children:[(0,A.jsxs)(U,{children:[(0,A.jsx)(l,{variant:`subtitle2`,children:`ConfigureSdk — waiting`}),(0,A.jsx)(C,{sdkConnected:!1,...W})]}),(0,A.jsxs)(U,{children:[(0,A.jsx)(l,{variant:`subtitle2`,children:`ConfigureSdk — waiting with troubleshooting`}),(0,A.jsx)(C,{sdkConnected:!1,showTroubleshooting:!0,troubleshootingText:`Not seeing evaluations after ~30s? Make sure your app has started and that the client was initialized with the API key from step 2.`,...W})]}),(0,A.jsxs)(U,{children:[(0,A.jsx)(l,{variant:`subtitle2`,children:`ConfigureSdk — connected`}),(0,A.jsx)(C,{sdkConnected:!0,...W})]}),(0,A.jsxs)(U,{children:[(0,A.jsx)(l,{variant:`subtitle2`,children:`ImplementFlagDialog — waiting`}),(0,A.jsx)(C,{sdkConnected:!1,...G})]}),(0,A.jsxs)(U,{children:[(0,A.jsx)(l,{variant:`subtitle2`,children:`ImplementFlagDialog — evaluated`}),(0,A.jsx)(C,{sdkConnected:!0,...G})]})]}),Nt=e({Completed:()=>Rt,FirstStep:()=>It,JustStarted:()=>Ft,SecondStep:()=>Lt,meta:()=>Pt}),Pt={title:`Onboarding / OnboardingProgress`,background:`paper`},Ft=()=>(0,A.jsx)(k,{step:0,maxSteps:3,onDismiss:()=>{}}),It=()=>(0,A.jsx)(k,{step:1,maxSteps:3,onDismiss:()=>{}}),Lt=()=>(0,A.jsx)(k,{step:2,maxSteps:3,onDismiss:()=>{}}),Rt=()=>(0,A.jsx)(k,{step:3,maxSteps:3,onDismiss:()=>{}}),zt=e({Active:()=>Ht,Disabled:()=>Vt,Done:()=>Ut,meta:()=>Bt}),Bt={title:`Onboarding / ConnectSdkStep`,background:`paper`},Vt=()=>(0,A.jsx)(O,{projectId:`my-project`,setConnectSdkOpen:(...e)=>{console.log(`Open Connect SDK`,e)},state:`disabled`}),Ht=()=>(0,A.jsx)(O,{projectId:`my-project`,setConnectSdkOpen:(...e)=>{console.log(`Open Connect SDK`,e)},state:`active`}),Ut=()=>(0,A.jsx)(O,{projectId:`my-project`,setConnectSdkOpen:(...e)=>{console.log(`Open Connect SDK`,e)},state:`done`}),Wt=e({AllColors:()=>Zt,meta:()=>Gt}),Gt={title:`Theme / Colors`,background:`application`},Kt=new Set([`mode`,`augmentColor`,`getContrastText`,`contrastThreshold`,`tonalOffset`]);function K(e,t=``){if(typeof e!=`object`||!e)return[];let n=[];for(let[r,i]of Object.entries(e)){if(Kt.has(r)||typeof i==`function`)continue;let e=t?`${t}.${r}`:r;typeof i==`string`&&qt(i)?n.push({path:e,value:i}):Array.isArray(i)&&i.length>0&&i.every(e=>typeof e==`string`)?n.push({path:e,values:i}):typeof i==`object`&&i&&!Array.isArray(i)&&n.push(...K(i,e))}return n}function qt(e){return e.startsWith(`#`)||e.startsWith(`rgb`)||e.startsWith(`hsl`)}function Jt(e){let t=new Map;for(let n of e){let e=n.path.split(`.`)[0];t.has(e)||t.set(e,[]),t.get(e).push(n)}return Array.from(t.entries())}var q=({color:e,size:t=36})=>(0,A.jsx)(u,{title:e,sx:{width:t,height:t,background:e,borderRadius:`4px`,border:`1px solid rgba(128,128,128,0.2)`,flexShrink:0}}),Yt=({path:e,value:t})=>(0,A.jsxs)(u,{sx:{display:`flex`,alignItems:`center`,gap:1.5,py:.5},children:[(0,A.jsx)(q,{color:t}),(0,A.jsxs)(u,{sx:{flex:1,minWidth:0},children:[(0,A.jsx)(l,{component:`div`,sx:{fontFamily:`monospace`,fontSize:`0.7rem`,color:`text.secondary`,wordBreak:`break-all`,lineHeight:1.4},children:e}),(0,A.jsx)(l,{component:`div`,sx:{fontFamily:`monospace`,fontSize:`0.65rem`,color:`text.disabled`,lineHeight:1.4},children:t})]})]}),Xt=({path:e,values:t})=>(0,A.jsxs)(u,{sx:{py:.75},children:[(0,A.jsxs)(l,{component:`div`,sx:{fontFamily:`monospace`,fontSize:`0.7rem`,color:`text.secondary`,mb:.5},children:[e,` (`,t.length,`)`]}),(0,A.jsx)(u,{sx:{display:`flex`,flexWrap:`wrap`,gap:.5},children:t.map((e,t)=>(0,A.jsx)(q,{color:e,size:24},t))})]}),J=({theme:e,label:t})=>{let n=Jt(K(e.palette));return(0,A.jsx)(g,{theme:e,children:(0,A.jsxs)(u,{sx:{flex:1,minWidth:0,bgcolor:`background.paper`,borderRadius:1,p:2},children:[(0,A.jsx)(l,{variant:`subtitle1`,sx:{fontWeight:700,mb:2,pb:1,borderBottom:`2px solid`,borderColor:`divider`,color:`text.primary`},children:t}),n.map(([e,t])=>(0,A.jsxs)(u,{sx:{mb:2.5},children:[(0,A.jsx)(l,{component:`div`,sx:{fontSize:`0.6rem`,fontWeight:700,letterSpacing:`0.1em`,textTransform:`uppercase`,color:`text.disabled`,mb:.5,pb:.25,borderBottom:`1px solid`,borderColor:`divider`},children:e}),t.map(e=>`value`in e?(0,A.jsx)(Yt,{path:e.path,value:e.value},e.path):(0,A.jsx)(Xt,{path:e.path,values:e.values},e.path))]},e))]})})},Zt=()=>(0,A.jsxs)(u,{sx:{display:`flex`,gap:2,alignItems:`flex-start`},children:[(0,A.jsx)(J,{theme:m,label:`Light`}),(0,A.jsx)(J,{theme:p,label:`Dark`})]}),Qt=c((0,A.jsx)(`path`,{d:`M17 7h-4v2h4c1.65 0 3 1.35 3 3s-1.35 3-3 3h-4v2h4c2.76 0 5-2.24 5-5s-2.24-5-5-5m-6 8H7c-1.65 0-3-1.35-3-3s1.35-3 3-3h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4zm-3-4h8v2H8z`}),`LinkOutlined`),$t=Object.assign({"../admin/users/AccessRequestsNotifications/NotificationStack/NotificationStack.story.tsx":oe,"../common/DialogWithAside/DialogWithAside.story.tsx":fe,"../common/ReactJSONEditor/ReactJSONEditor.story.tsx":L,"../feature/FeatureView/FeatureOverview/ImplementFlagDialog/FlagUsageSnippet.story.tsx":xe,"../feature/FeatureView/FeatureOverview/ImplementFlagDialog/SelectSdk.story.tsx":ze,"../menu/Header/HelpResources/HelpResources.story.tsx":Ue,"../onboarding/dialog/CodeRenderer.story.tsx":Ke,"../onboarding/dialog/ConnectSdkDialog/GenerateApiKey/GenerateApiKey.story.tsx":mt,"../onboarding/dialog/ConnectSdkDialog/GenerateApiKey/GenerateApiKeySummary.story.tsx":_t,"../onboarding/dialog/ConnectSdkDialog/GenerateApiKey/TokenExplanation.story.tsx":St,"../onboarding/dialog/ConnectSdkDialog/SelectSdk/SelectSdk.story.tsx":Tt,"../onboarding/dialog/SdkEvaluationStatus.story.tsx":kt,"../onboarding/flow/OnboardingProgress.story.tsx":Nt,"../onboarding/flow/steps/ConnectSdkStep.story.tsx":zt,"../../themes/ThemeColors.story.tsx":Wt});function en(){let e=[];for(let[t,n]of Object.entries($t)){if(!n.meta)continue;let r=Object.entries(n).filter(([e,t])=>e!==`meta`&&typeof t==`function`).map(([e,t])=>({name:e,component:t}));if(r.length===0)continue;let i=n.meta.title.split(`/`).map(e=>e.trim()),a=i.pop()??n.meta.title,o=i.length>0?i.join(` / `):`General`;e.push({moduleKey:t,meta:n.meta,category:o,name:a,stories:r})}return e.sort((e,t)=>e.category.localeCompare(t.category)||e.name.localeCompare(t.name))}var Y=en(),X=e=>e.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-|-$/g,``),Z=e=>e.toLowerCase().replace(/[^a-z0-9]+/g,`-`),Q=e=>`${X(e.category)}/${X(e.name)}`,$=[{key:`paper`,label:`Paper`},{key:`elevation1`,label:`Elevation 1`},{key:`elevation2`,label:`Elevation 2`},{key:`application`,label:`Application`},{key:`sidebar`,label:`Sidebar`}],tn=o(`div`)({display:`flex`,height:`100vh`,overflow:`hidden`}),nn=o(`nav`)(({theme:e})=>({width:220,flexShrink:0,borderRight:`1px solid ${e.palette.divider}`,display:`flex`,flexDirection:`column`,overflow:`hidden`,background:e.palette.background.paper})),rn=o(`div`)(({theme:e})=>({display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:e.spacing(1.5,2),borderBottom:`1px solid ${e.palette.divider}`,flexShrink:0})),an=o(`div`)({flex:1,overflowY:`auto`,padding:`8px 4px`}),on=o(`div`)(({theme:e})=>({fontSize:10,fontWeight:700,letterSpacing:`0.1em`,textTransform:`uppercase`,color:e.palette.text.disabled,padding:e.spacing(1.5,1.5,.5)})),sn=o(`button`,{shouldForwardProp:e=>e!==`isSelected`})(({theme:e,isSelected:t})=>({display:`block`,width:`100%`,textAlign:`left`,border:`none`,borderRadius:e.shape.borderRadius,padding:e.spacing(.75,1.5),cursor:`pointer`,fontSize:13,background:t?e.palette.action.selected:`transparent`,color:t?e.palette.primary.main:e.palette.text.primary,fontWeight:t?500:400,"&:hover":{background:t?e.palette.action.selected:e.palette.action.hover}})),cn=o(`a`,{shouldForwardProp:e=>e!==`isActive`})(({theme:e,isActive:t})=>({display:`block`,padding:e.spacing(.5,1.5,.5,3.5),fontSize:12,color:t?e.palette.primary.main:e.palette.text.secondary,fontWeight:t?500:400,textDecoration:`none`,borderRadius:e.shape.borderRadius,background:t?e.palette.action.selected:`transparent`,"&:hover":{color:t?e.palette.primary.main:e.palette.text.primary,background:e.palette.action.hover}})),ln=o(`main`)({flex:1,overflow:`hidden`,display:`flex`,flexDirection:`column`}),un=o(`div`)(({theme:e})=>({padding:e.spacing(1.5,3),borderBottom:`1px solid ${e.palette.divider}`,background:e.palette.background.paper,display:`flex`,alignItems:`center`,gap:e.spacing(1),flexShrink:0})),dn=o(`div`)(({theme:e})=>({flex:1,overflow:`auto`,padding:e.spacing(4)})),fn=o(`div`)(({theme:e})=>({marginBottom:e.spacing(6)})),pn=o(`div`,{shouldForwardProp:e=>e!==`isActive`})(({theme:e,isActive:t})=>({fontSize:12,fontWeight:500,fontFamily:`monospace`,color:t?e.palette.primary.main:e.palette.text.secondary,marginBottom:e.spacing(1.5),cursor:`pointer`,display:`flex`,alignItems:`center`,gap:e.spacing(.75),"& .anchor-icon":{fontSize:14,opacity:+!!t,transition:`opacity 0.15s`},"&:hover .anchor-icon":{opacity:1}})),mn=o(`div`)(({theme:e})=>({padding:e.spacing(4),borderRadius:e.shape.borderRadius,border:`1px solid ${e.palette.divider}`,width:`100%`,boxSizing:`border-box`})),hn=o(`button`,{shouldForwardProp:e=>e!==`isSelected`})(({theme:e,isSelected:t})=>({width:20,height:20,borderRadius:e.shape.borderRadius,border:`none`,cursor:`pointer`,padding:0,outline:t?`3px solid ${e.palette.primary.main}`:`1px solid ${e.palette.primary.main}`,outlineOffset:+!!t,flexShrink:0})),gn=()=>{let{themeMode:e,onSetThemeMode:t}=te(),n=i(),[a,o]=r(),[c,d]=(0,N.useState)(Y[0]?.meta.background??`application`),f=(0,N.useRef)(null),p=a.get(`c`),m=a.get(`s`),h=(p?Y.find(e=>Q(e)===p):null)??Y[0],g=m,_=Y.reduce((e,t)=>(e[t.category]||(e[t.category]=[]),e[t.category].push(t),e),{});(0,N.useEffect)(()=>{d(h?.meta.background??`application`)},[h]),(0,N.useEffect)(()=>{if(!m){f.current?.scrollTo({top:0});return}requestAnimationFrame(()=>{let e=document.getElementById(m);if(e&&f.current){let t=f.current.getBoundingClientRect().top,n=e.getBoundingClientRect().top;f.current.scrollTo({top:f.current.scrollTop+n-t-32,behavior:`smooth`})}})},[m]);let v=e=>{o({c:Q(e)})},y=(e,t,n)=>{e.preventDefault(),o({c:Q(t),s:Z(n)})},b=e=>{let t=Z(e),n=new URLSearchParams({c:Q(h),s:t});o(n),navigator.clipboard.writeText(`${window.location.origin}${window.location.pathname}?${n}`).catch(e=>{console.error(`Failed to copy link to clipboard`,e)})},x=n.palette.background[c];return(0,A.jsxs)(tn,{children:[(0,A.jsxs)(nn,{children:[(0,A.jsxs)(rn,{children:[(0,A.jsx)(l,{variant:`body2`,sx:{fontWeight:700,fontFamily:`monospace`},children:`_stories`}),(0,A.jsx)(s,{title:`${e===`light`?`Dark`:`Light`} mode`,children:(0,A.jsx)(ee,{size:`small`,onClick:t,children:e===`light`?(0,A.jsx)(ne,{sx:{fontSize:16}}):(0,A.jsx)(re,{sx:{fontSize:16}})})})]}),(0,A.jsx)(an,{children:Object.entries(_).map(([e,t])=>(0,A.jsxs)(`div`,{children:[(0,A.jsx)(on,{children:e}),t.map(e=>(0,A.jsxs)(`div`,{children:[(0,A.jsx)(sn,{isSelected:e.moduleKey===h?.moduleKey,onClick:()=>v(e),children:e.name}),e.moduleKey===h?.moduleKey&&e.stories.map(t=>(0,A.jsx)(cn,{href:`?c=${Q(e)}&s=${Z(t.name)}`,isActive:g===Z(t.name),onClick:n=>y(n,e,t.name),children:t.name},t.name))]},e.moduleKey))]},e))})]}),(0,A.jsx)(ln,{children:h?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsxs)(un,{children:[(0,A.jsx)(l,{variant:`body2`,sx:{color:`text.disabled`,fontSize:12},children:h.category}),(0,A.jsx)(l,{variant:`body2`,sx:{color:`text.disabled`,fontSize:12},children:`/`}),(0,A.jsx)(l,{variant:`body2`,sx:{fontWeight:600,fontSize:14},children:h.name}),(0,A.jsxs)(u,{sx:{ml:`auto`,display:`flex`,alignItems:`center`,gap:1},children:[(0,A.jsx)(l,{variant:`caption`,sx:{color:`text.disabled`,mr:.25},children:`Background:`}),$.map(({key:e,label:t})=>(0,A.jsx)(s,{title:t,arrow:!0,children:(0,A.jsx)(hn,{isSelected:c===e,onClick:()=>d(e),style:{background:n.palette.background[e]}})},e))]})]}),(0,A.jsx)(dn,{ref:f,sx:{background:x},children:h.stories.map(e=>{let t=e.component;return(0,A.jsxs)(fn,{children:[(0,A.jsxs)(pn,{id:Z(e.name),isActive:g===Z(e.name),onClick:()=>b(e.name),children:[e.name,(0,A.jsx)(Qt,{className:`anchor-icon`})]}),(0,A.jsx)(mn,{children:(0,A.jsx)(t,{})})]},e.name)})})]}):(0,A.jsx)(u,{sx:{p:4},children:(0,A.jsxs)(l,{sx:{color:`text.secondary`},children:[`No stories found. Create a`,` `,(0,A.jsx)(u,{component:`code`,sx:{fontFamily:`monospace`},children:`*.story.tsx`}),` `,`file anywhere under`,` `,(0,A.jsx)(u,{component:`code`,sx:{fontFamily:`monospace`},children:`frontend/src/`}),` `,`to get started.`]})})})]})};export{gn as default};
@@ -1 +0,0 @@
1
- import{o as e,t}from"./react-GZhdek4G.js";import{t as n}from"./jsx-runtime-BnvnyDTF.js";import{D as r,O as i,_ as a,v as o,x as s,y as c}from"./createSimplePaletteValueFilter-BRAMrHWJ.js";import{a as l}from"./Tooltip-BaILXXti.js";import{S as u}from"./TextField-oipjeg6n.js";import{n as d}from"./CircularProgress-C_LUU3DK.js";import{r as f}from"./ConditionallyRender---uTpMBn.js";var p=e(t(),1);function m(e){return i(`PrivateSwitchBase`,e)}r(`PrivateSwitchBase`,[`root`,`checked`,`disabled`,`input`,`edgeStart`,`edgeEnd`]);var h=n(),g=e=>{let{classes:t,checked:n,disabled:r,edge:i}=e;return s({root:[`root`,n&&`checked`,r&&`disabled`,i&&`edge${a(i)}`],input:[`input`]},m,t)},_=o(d,{name:`MuiSwitchBase`})({padding:9,borderRadius:`50%`,variants:[{props:{edge:`start`,size:`small`},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>e===`start`&&t.size!==`small`,style:{marginLeft:-12}},{props:{edge:`end`,size:`small`},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>e===`end`&&t.size!==`small`,style:{marginRight:-12}}]}),v=o(`input`,{name:`MuiSwitchBase`,shouldForwardProp:c})({cursor:`inherit`,position:`absolute`,opacity:0,width:`100%`,height:`100%`,top:0,left:0,margin:0,padding:0,zIndex:1}),y=p.forwardRef(function(e,t){let{autoFocus:n,checked:r,checkedIcon:i,defaultChecked:a,disabled:o,disableFocusRipple:s=!1,edge:c=!1,icon:d,id:p,name:m,onBlur:y,onChange:b,onFocus:x,readOnly:S,required:C=!1,tabIndex:w,type:T,value:E,slots:D={},slotProps:O={},...k}=e,{nativeButton:A,...j}=k,[M,N]=l({controlled:r,default:!!a,name:`SwitchBase`,state:`checked`}),P=u(),F=e=>{x&&x(e),P&&P.onFocus&&P.onFocus(e)},I=e=>{y&&y(e),P&&P.onBlur&&P.onBlur(e)},L=e=>{if(e.nativeEvent.defaultPrevented||S)return;let t=e.target.checked;N(t),b&&b(e,t)},R=o;P&&R===void 0&&(R=P.disabled);let z=T===`checkbox`||T===`radio`,B={...e,checked:M,disabled:R,disableFocusRipple:s,edge:c},V=g(B),H={slots:D,slotProps:O},[U,W]=f(`root`,{ref:t,elementType:_,className:V.root,shouldForwardComponentProp:!0,externalForwardedProps:{...H,component:`span`,...j},getSlotProps:e=>({...e,onFocus:t=>{e.onFocus?.(t),F(t)},onBlur:t=>{e.onBlur?.(t),I(t)}}),ownerState:B,additionalProps:{centerRipple:!0,focusRipple:!s,role:void 0,tabIndex:null}}),[G,K]=f(`input`,{elementType:v,className:V.input,externalForwardedProps:H,getSlotProps:e=>({...e,onChange:t=>{e.onChange?.(t),L(t)}}),ownerState:B,additionalProps:{autoFocus:n,checked:r,defaultChecked:a,disabled:R,id:z?p:void 0,name:m,readOnly:S,required:C,tabIndex:w,type:T,...T===`checkbox`&&E===void 0?{}:{value:E}}});return(0,h.jsxs)(U,{...W,children:[(0,h.jsx)(G,{...K}),M?i:d]})});export{y as t};