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.
- package/dist/lib/addons/feature-event-formatter-md.d.ts.map +1 -1
- package/dist/lib/addons/feature-event-formatter-md.js +5 -3
- package/dist/lib/addons/feature-event-formatter-md.js.map +1 -1
- package/dist/lib/addons/feature-event-formatter-md.test.js +3 -1
- package/dist/lib/addons/feature-event-formatter-md.test.js.map +1 -1
- package/dist/lib/addons/webhook.d.ts.map +1 -1
- package/dist/lib/addons/webhook.js +28 -2
- package/dist/lib/addons/webhook.js.map +1 -1
- package/dist/lib/addons/webhook.test.js +72 -0
- package/dist/lib/addons/webhook.test.js.map +1 -1
- package/dist/lib/app.d.ts.map +1 -1
- package/dist/lib/app.js +2 -0
- package/dist/lib/app.js.map +1 -1
- package/dist/lib/create-config.d.ts.map +1 -1
- package/dist/lib/create-config.js +1 -0
- package/dist/lib/create-config.js.map +1 -1
- package/dist/lib/features/context/context-field-store.d.ts +1 -1
- package/dist/lib/features/context/context-field-store.d.ts.map +1 -1
- package/dist/lib/features/context/context-field-store.js +1 -5
- package/dist/lib/features/context/context-field-store.js.map +1 -1
- package/dist/lib/features/context/context-service.d.ts +5 -4
- package/dist/lib/features/context/context-service.d.ts.map +1 -1
- package/dist/lib/features/context/context-service.js +20 -27
- package/dist/lib/features/context/context-service.js.map +1 -1
- package/dist/lib/features/context/context-service.test.d.ts +2 -0
- package/dist/lib/features/context/context-service.test.d.ts.map +1 -0
- package/dist/lib/features/context/context-service.test.js +24 -0
- package/dist/lib/features/context/context-service.test.js.map +1 -0
- package/dist/lib/features/context/context.d.ts +1 -0
- package/dist/lib/features/context/context.d.ts.map +1 -1
- package/dist/lib/features/context/context.js +22 -10
- package/dist/lib/features/context/context.js.map +1 -1
- package/dist/lib/features/context/context.test.js +15 -1
- package/dist/lib/features/context/context.test.js.map +1 -1
- package/dist/lib/features/context/createContextService.d.ts +4 -1
- package/dist/lib/features/context/createContextService.d.ts.map +1 -1
- package/dist/lib/features/context/createContextService.js +2 -1
- package/dist/lib/features/context/createContextService.js.map +1 -1
- package/dist/lib/features/context/fake-context-field-store.d.ts +1 -1
- package/dist/lib/features/context/fake-context-field-store.d.ts.map +1 -1
- package/dist/lib/features/context/fake-context-field-store.js +1 -6
- package/dist/lib/features/context/fake-context-field-store.js.map +1 -1
- package/dist/lib/features/export-import-toggles/createExportImportService.js +1 -1
- package/dist/lib/features/export-import-toggles/createExportImportService.js.map +1 -1
- package/dist/lib/features/feature-toggle/converters/feature-toggle-row-converter.d.ts +1 -1
- package/dist/lib/features/feature-toggle/fakes/fake-feature-strategies-store.d.ts +2 -1
- package/dist/lib/features/feature-toggle/fakes/fake-feature-strategies-store.d.ts.map +1 -1
- package/dist/lib/features/feature-toggle/fakes/fake-feature-strategies-store.js +5 -0
- package/dist/lib/features/feature-toggle/fakes/fake-feature-strategies-store.js.map +1 -1
- package/dist/lib/features/feature-toggle/feature-toggle-controller.d.ts +1 -1
- package/dist/lib/features/feature-toggle/feature-toggle-controller.d.ts.map +1 -1
- package/dist/lib/features/feature-toggle/feature-toggle-controller.js +22 -2
- package/dist/lib/features/feature-toggle/feature-toggle-controller.js.map +1 -1
- package/dist/lib/features/feature-toggle/feature-toggle-service.d.ts +3 -2
- package/dist/lib/features/feature-toggle/feature-toggle-service.d.ts.map +1 -1
- package/dist/lib/features/feature-toggle/feature-toggle-service.js +11 -4
- package/dist/lib/features/feature-toggle/feature-toggle-service.js.map +1 -1
- package/dist/lib/features/feature-toggle/feature-toggle-strategies-store.d.ts +2 -0
- package/dist/lib/features/feature-toggle/feature-toggle-strategies-store.d.ts.map +1 -1
- package/dist/lib/features/feature-toggle/feature-toggle-strategies-store.js +7 -0
- package/dist/lib/features/feature-toggle/feature-toggle-strategies-store.js.map +1 -1
- package/dist/lib/features/feature-toggle/tests/feature-toggles.e2e.test.js +4 -0
- package/dist/lib/features/feature-toggle/tests/feature-toggles.e2e.test.js.map +1 -1
- package/dist/lib/features/feature-toggle/types/feature-toggle-strategies-store-type.d.ts +6 -0
- package/dist/lib/features/feature-toggle/types/feature-toggle-strategies-store-type.d.ts.map +1 -1
- package/dist/lib/features/playground/feature-evaluator/constraint.d.ts +2 -0
- package/dist/lib/features/playground/feature-evaluator/constraint.d.ts.map +1 -1
- package/dist/lib/features/playground/feature-evaluator/constraint.js +11 -1
- package/dist/lib/features/playground/feature-evaluator/constraint.js.map +1 -1
- package/dist/lib/features/playground/playground.test.js +2 -3
- package/dist/lib/features/playground/playground.test.js.map +1 -1
- package/dist/lib/features/release-plans/release-plan-template-store.d.ts +4 -0
- package/dist/lib/features/release-plans/release-plan-template-store.d.ts.map +1 -1
- package/dist/lib/features/release-plans/release-plan-template-store.js +25 -2
- package/dist/lib/features/release-plans/release-plan-template-store.js.map +1 -1
- package/dist/lib/features/release-plans/release-plan-template-store.test.js +75 -16
- package/dist/lib/features/release-plans/release-plan-template-store.test.js.map +1 -1
- package/dist/lib/features/release-plans/release-plan-template.d.ts +1 -0
- package/dist/lib/features/release-plans/release-plan-template.d.ts.map +1 -1
- package/dist/lib/features/scheduler/scheduler-service.test.js +1 -0
- package/dist/lib/features/scheduler/scheduler-service.test.js.map +1 -1
- package/dist/lib/features/unique-connection/unique-connection-store.e2e.test.js +3 -0
- package/dist/lib/features/unique-connection/unique-connection-store.e2e.test.js.map +1 -1
- package/dist/lib/middleware/rbac-middleware.d.ts.map +1 -1
- package/dist/lib/middleware/rbac-middleware.js +3 -4
- package/dist/lib/middleware/rbac-middleware.js.map +1 -1
- package/dist/lib/middleware/rbac-middleware.test.js +62 -24
- package/dist/lib/middleware/rbac-middleware.test.js.map +1 -1
- package/dist/lib/middleware/session-context.d.ts +20 -0
- package/dist/lib/middleware/session-context.d.ts.map +1 -0
- package/dist/lib/middleware/session-context.js +38 -0
- package/dist/lib/middleware/session-context.js.map +1 -0
- package/dist/lib/openapi/spec/admin-segment-schema.d.ts +1 -1
- package/dist/lib/openapi/spec/advanced-playground-environment-feature-schema.d.ts +4 -4
- package/dist/lib/openapi/spec/advanced-playground-feature-schema.d.ts +8 -8
- package/dist/lib/openapi/spec/advanced-playground-response-schema.d.ts +17 -17
- package/dist/lib/openapi/spec/client-feature-schema.d.ts +2 -2
- package/dist/lib/openapi/spec/client-features-delta-schema.d.ts +5 -5
- package/dist/lib/openapi/spec/client-features-schema.d.ts +5 -5
- package/dist/lib/openapi/spec/client-segment-schema.d.ts +1 -1
- package/dist/lib/openapi/spec/constraint-schema.d.ts +2 -2
- package/dist/lib/openapi/spec/create-feature-strategy-schema.d.ts +1 -1
- package/dist/lib/openapi/spec/environment-project-schema.d.ts +2 -2
- package/dist/lib/openapi/spec/environments-project-schema.d.ts +4 -4
- package/dist/lib/openapi/spec/export-result-schema.d.ts +68 -68
- package/dist/lib/openapi/spec/feature-environment-schema.d.ts +17 -17
- package/dist/lib/openapi/spec/feature-schema.d.ts +34 -34
- package/dist/lib/openapi/spec/feature-search-environment-schema.d.ts +34 -34
- package/dist/lib/openapi/spec/feature-search-response-schema.d.ts +68 -68
- package/dist/lib/openapi/spec/feature-strategy-schema.d.ts +1 -1
- package/dist/lib/openapi/spec/health-overview-schema.d.ts +69 -69
- package/dist/lib/openapi/spec/health-report-schema.d.ts +69 -69
- package/dist/lib/openapi/spec/playground-constraint-schema.d.ts +1 -1
- package/dist/lib/openapi/spec/playground-feature-schema.arbitraries.d.ts +4 -0
- package/dist/lib/openapi/spec/playground-feature-schema.arbitraries.d.ts.map +1 -0
- package/dist/lib/openapi/spec/playground-feature-schema.arbitraries.js +91 -0
- package/dist/lib/openapi/spec/playground-feature-schema.arbitraries.js.map +1 -0
- package/dist/lib/openapi/spec/playground-feature-schema.d.ts +4 -4
- package/dist/lib/openapi/spec/playground-feature-schema.test.d.ts +1 -3
- package/dist/lib/openapi/spec/playground-feature-schema.test.d.ts.map +1 -1
- package/dist/lib/openapi/spec/playground-feature-schema.test.js +1 -89
- package/dist/lib/openapi/spec/playground-feature-schema.test.js.map +1 -1
- package/dist/lib/openapi/spec/playground-request-schema.arbitraries.d.ts +4 -0
- package/dist/lib/openapi/spec/playground-request-schema.arbitraries.d.ts.map +1 -0
- package/dist/lib/openapi/spec/playground-request-schema.arbitraries.js +9 -0
- package/dist/lib/openapi/spec/playground-request-schema.arbitraries.js.map +1 -0
- package/dist/lib/openapi/spec/playground-request-schema.test.d.ts +1 -3
- package/dist/lib/openapi/spec/playground-request-schema.test.d.ts.map +1 -1
- package/dist/lib/openapi/spec/playground-request-schema.test.js +1 -8
- package/dist/lib/openapi/spec/playground-request-schema.test.js.map +1 -1
- package/dist/lib/openapi/spec/playground-response-schema.d.ts +9 -9
- package/dist/lib/openapi/spec/playground-response-schema.test.js +2 -3
- package/dist/lib/openapi/spec/playground-response-schema.test.js.map +1 -1
- package/dist/lib/openapi/spec/playground-segment-schema.d.ts +1 -1
- package/dist/lib/openapi/spec/playground-strategy-schema.d.ts +2 -2
- package/dist/lib/openapi/spec/profile-schema.d.ts +34 -34
- package/dist/lib/openapi/spec/project-environment-schema.d.ts +1 -1
- package/dist/lib/openapi/spec/project-overview-schema.d.ts +69 -69
- package/dist/lib/openapi/spec/release-plan-milestone-schema.d.ts +4 -4
- package/dist/lib/openapi/spec/release-plan-milestone-strategy-schema.d.ts +2 -2
- package/dist/lib/openapi/spec/release-plan-schema.d.ts +8 -8
- package/dist/lib/openapi/spec/release-plan-template-schema.d.ts +14 -8
- package/dist/lib/openapi/spec/release-plan-template-schema.d.ts.map +1 -1
- package/dist/lib/openapi/spec/release-plan-template-schema.js +6 -0
- package/dist/lib/openapi/spec/release-plan-template-schema.js.map +1 -1
- package/dist/lib/openapi/spec/release-plan-templates-schema.d.ts +22 -16
- package/dist/lib/openapi/spec/release-plan-templates-schema.d.ts.map +1 -1
- package/dist/lib/openapi/spec/release-plans-schema.d.ts +16 -16
- package/dist/lib/openapi/spec/sdk-context-schema.arbitraries.d.ts +4 -0
- package/dist/lib/openapi/spec/sdk-context-schema.arbitraries.d.ts.map +1 -0
- package/dist/lib/openapi/spec/sdk-context-schema.arbitraries.js +12 -0
- package/dist/lib/openapi/spec/sdk-context-schema.arbitraries.js.map +1 -0
- package/dist/lib/openapi/spec/sdk-context-schema.test.d.ts +1 -3
- package/dist/lib/openapi/spec/sdk-context-schema.test.d.ts.map +1 -1
- package/dist/lib/openapi/spec/sdk-context-schema.test.js +1 -11
- package/dist/lib/openapi/spec/sdk-context-schema.test.js.map +1 -1
- package/dist/lib/openapi/spec/search-features-schema.d.ts +104 -104
- package/dist/lib/openapi/spec/segment-schema.d.ts +1 -1
- package/dist/lib/openapi/spec/segments-schema.d.ts +2 -2
- package/dist/lib/openapi/spec/ui-config-schema.d.ts +5 -0
- package/dist/lib/openapi/spec/ui-config-schema.d.ts.map +1 -1
- package/dist/lib/openapi/spec/ui-config-schema.js +5 -0
- package/dist/lib/openapi/spec/ui-config-schema.js.map +1 -1
- package/dist/lib/openapi/spec/update-feature-schema.d.ts +1 -1
- package/dist/lib/openapi/spec/update-feature-strategy-schema.d.ts +1 -1
- package/dist/lib/openapi/spec/upsert-segment-schema.d.ts +1 -1
- package/dist/lib/schema/feature-schema.test.js +1 -1
- package/dist/lib/schema/feature-schema.test.js.map +1 -1
- package/dist/lib/schema/html-input.d.ts +1 -1
- package/dist/lib/schema/html-input.d.ts.map +1 -1
- package/dist/lib/schema/html-input.js +5 -2
- package/dist/lib/schema/html-input.js.map +1 -1
- package/dist/lib/schema/html-input.test.js +1 -1
- package/dist/lib/schema/html-input.test.js.map +1 -1
- package/dist/lib/services/feature-tag-service.d.ts +1 -1
- package/dist/lib/services/feature-tag-service.d.ts.map +1 -1
- package/dist/lib/services/feature-tag-service.js +5 -1
- package/dist/lib/services/feature-tag-service.js.map +1 -1
- package/dist/lib/services/index.d.ts.map +1 -1
- package/dist/lib/services/index.js +1 -1
- package/dist/lib/services/index.js.map +1 -1
- package/dist/lib/services/project-schema.js +1 -1
- package/dist/lib/services/project-schema.js.map +1 -1
- package/dist/lib/types/events.d.ts +8 -0
- package/dist/lib/types/events.d.ts.map +1 -1
- package/dist/lib/types/events.js +4 -0
- package/dist/lib/types/events.js.map +1 -1
- package/dist/lib/types/experimental.d.ts +1 -1
- package/dist/lib/types/experimental.d.ts.map +1 -1
- package/dist/lib/types/experimental.js +6 -1
- package/dist/lib/types/experimental.js.map +1 -1
- package/dist/lib/types/option.d.ts +1 -0
- package/dist/lib/types/option.d.ts.map +1 -1
- package/dist/lib/types/permissions.d.ts +1 -0
- package/dist/lib/types/permissions.d.ts.map +1 -1
- package/dist/lib/types/permissions.js +2 -0
- package/dist/lib/types/permissions.js.map +1 -1
- package/dist/lib/types/stores.d.ts +1 -0
- package/dist/lib/types/stores.d.ts.map +1 -1
- package/dist/lib/types/stores.js.map +1 -1
- package/dist/lib/ui-config/ui-config-controller.d.ts +1 -2
- package/dist/lib/ui-config/ui-config-controller.d.ts.map +1 -1
- package/dist/lib/ui-config/ui-config-controller.js +3 -1
- package/dist/lib/ui-config/ui-config-controller.js.map +1 -1
- package/dist/lib/ui-config/ui-config-service.d.ts +3 -2
- package/dist/lib/ui-config/ui-config-service.d.ts.map +1 -1
- package/dist/lib/ui-config/ui-config-service.js +7 -1
- package/dist/lib/ui-config/ui-config-service.js.map +1 -1
- package/dist/lib/ui-config/ui-config.test.js +4 -0
- package/dist/lib/ui-config/ui-config.test.js.map +1 -1
- package/dist/lib/util/constants.d.ts +3 -1
- package/dist/lib/util/constants.d.ts.map +1 -1
- package/dist/lib/util/constants.js +11 -1
- package/dist/lib/util/constants.js.map +1 -1
- package/dist/mailtemplates/requested-cr-approval/requested-cr-approval.html.mustache +1 -1
- package/dist/migrations/20260706100000-add-project-column-to-release-plan-definitions.d.ts +3 -0
- package/dist/migrations/20260706100000-add-project-column-to-release-plan-definitions.d.ts.map +1 -0
- package/dist/migrations/20260706100000-add-project-column-to-release-plan-definitions.js +8 -0
- package/dist/migrations/20260706100000-add-project-column-to-release-plan-definitions.js.map +1 -0
- package/dist/migrations/20260708100000-add-project-release-template-permission.d.ts +3 -0
- package/dist/migrations/20260708100000-add-project-release-template-permission.d.ts.map +1 -0
- package/dist/migrations/20260708100000-add-project-release-template-permission.js +15 -0
- package/dist/migrations/20260708100000-add-project-release-template-permission.js.map +1 -0
- package/dist/server-dev.js +5 -1
- package/dist/server-dev.js.map +1 -1
- package/dist/test/arbitraries.d.ts +25 -0
- package/dist/test/arbitraries.d.ts.map +1 -0
- package/dist/test/arbitraries.js +143 -0
- package/dist/test/arbitraries.js.map +1 -0
- package/dist/test/arbitraries.test.d.ts +1 -24
- package/dist/test/arbitraries.test.d.ts.map +1 -1
- package/dist/test/arbitraries.test.js +1 -142
- package/dist/test/arbitraries.test.js.map +1 -1
- package/dist/test/e2e/api/admin/playground.e2e.test.js +2 -2
- package/dist/test/e2e/api/admin/playground.e2e.test.js.map +1 -1
- package/dist/test/e2e/services/playground-service.test.js +2 -2
- package/dist/test/e2e/services/playground-service.test.js.map +1 -1
- package/dist/test/fixtures/fake-segment-store.d.ts +1 -1
- package/dist/test/fixtures/fake-segment-store.d.ts.map +1 -1
- package/dist/test/fixtures/fake-segment-store.js +2 -2
- package/dist/test/fixtures/fake-segment-store.js.map +1 -1
- package/dist/test/prom-last-wins.d.ts +2 -0
- package/dist/test/prom-last-wins.d.ts.map +1 -0
- package/dist/test/prom-last-wins.js +25 -0
- package/dist/test/prom-last-wins.js.map +1 -0
- package/dist/test/reset-cross-file-state.d.ts +2 -0
- package/dist/test/reset-cross-file-state.d.ts.map +1 -0
- package/dist/test/reset-cross-file-state.js +57 -0
- package/dist/test/reset-cross-file-state.js.map +1 -0
- package/dist/test-setup.d.ts.map +1 -1
- package/dist/test-setup.js +4 -0
- package/dist/test-setup.js.map +1 -1
- package/frontend/build/index.html +1 -1
- package/frontend/build/static/AccordionSummary-KVRcLxLK.js +1 -0
- package/frontend/build/static/AdvancedPlayground-Cls80com.js +3 -0
- package/frontend/build/static/Alert-DQgOzmJF.js +1 -0
- package/frontend/build/static/Avatar-xU_puYmY.js +1 -0
- package/frontend/build/static/BackendConnections-CkI8tLcv.js +1 -0
- package/frontend/build/static/Box-rSzdGLLJ.js +1 -0
- package/frontend/build/static/Button-yGjgMTJI.js +1 -0
- package/frontend/build/static/Button.story-CBE27I2T.js +1 -0
- package/frontend/build/static/CircularProgress-CmGBJn6I.js +124 -0
- package/frontend/build/static/Close-DKD1r3T7.js +1 -0
- package/frontend/build/static/Close-nISwbNAY.js +1 -0
- package/frontend/build/static/CodeRenderer-RNHlNPBl.js +1094 -0
- package/frontend/build/static/CodeRenderer.story-Vw214z1Z.js +2 -0
- package/frontend/build/static/Collapse-COunT4rQ.js +1 -0
- package/frontend/build/static/ConditionallyRender-CEffh9Z-.js +1 -0
- package/frontend/build/static/ConnectSdkStep-DnH4iwnu.js +1 -0
- package/frontend/build/static/ConnectSdkStep.story-DeWPTOZK.js +1 -0
- package/frontend/build/static/CreateProject-eo1TZ1so.js +1 -0
- package/frontend/build/static/Dialog-DLpX4v6X.js +1 -0
- package/frontend/build/static/DialogWithAside-BxVspeMV.js +1 -0
- package/frontend/build/static/DialogWithAside.story-Dqmr9MnM.js +1 -0
- package/frontend/build/static/Divider-BYq1CcT0.js +1 -0
- package/frontend/build/static/EnterpriseEdge-D-g3JGCd.js +6 -0
- package/frontend/build/static/FeatureCard.story-B2Q-SD_-.js +1 -0
- package/frontend/build/static/FeatureMetricsChart-ETalRWKx.js +2 -0
- package/frontend/build/static/FeatureStaleDialog-CvD9ojNj.js +8 -0
- package/frontend/build/static/{FeatureViewLazyExport-8eQKTvdS.js → FeatureViewLazyExport-10Z3_Wda.js} +3 -3
- package/frontend/build/static/FileCopy-D1ZqmNek.js +1 -0
- package/frontend/build/static/FlagMetricsChart-dLfSDZ_x.js +2 -0
- package/frontend/build/static/FlagUsageSnippet-DOGwaqPZ.js +2 -0
- package/frontend/build/static/FlagUsageSnippet.story-tfMvt3kG.js +1 -0
- package/frontend/build/static/FormControlLabel-BrOlsUbv.js +1 -0
- package/frontend/build/static/FormField-CRXe4g4R.js +1 -0
- package/frontend/build/static/FrontendNetworkTrafficUsage-DGEwK1Qg.js +1 -0
- package/frontend/build/static/GenerateApiKey-C1aJtPh-.js +1 -0
- package/frontend/build/static/GenerateApiKey.story-DNMZG0qg.js +1 -0
- package/frontend/build/static/GenerateApiKeySummary-DkPI02tH.js +1 -0
- package/frontend/build/static/GenerateApiKeySummary.story-CruMFwTQ.js +1 -0
- package/frontend/build/static/{GridLayoutWrapper-B_YyjZ7l.js → GridLayoutWrapper-B3BIpxoE.js} +3 -3
- package/frontend/build/static/Grow-CuQu7Z-P.js +1 -0
- package/frontend/build/static/HelpOutlineOutlined-HDH1hus2.js +1 -0
- package/frontend/build/static/HelpResources.story-warJFqf6.js +1 -0
- package/frontend/build/static/Highlighter-BS0Ow0vZ.js +1 -0
- package/frontend/build/static/HtmlTooltip-3YsoM_F5.js +1 -0
- package/frontend/build/static/IconButton-BveFD3PF.js +1 -0
- package/frontend/build/static/ImpactMetricsPage-C57istn7.js +1 -0
- package/frontend/build/static/ImpactViewsPage-MKEHnt2w.js +1 -0
- package/frontend/build/static/LazyAdminExport-DfIYVWQD.js +38 -0
- package/frontend/build/static/LazyProjectExport-30GlUH0L.js +46 -0
- package/frontend/build/static/LifecycleChartComponent-Tj1pN5Tj.js +2 -0
- package/frontend/build/static/LineChartComponent-_RiDjL2-.js +1 -0
- package/frontend/build/static/Link-wv6er_Jy.js +1 -0
- package/frontend/build/static/Loader-CnLypnQx.js +1 -0
- package/frontend/build/static/{LogRocketRunner-Duzg1Kzh.js → LogRocketRunner-BS6AEpSK.js} +1 -1
- package/frontend/build/static/MarkCompletedDialogue-BeIA6eMj.js +1 -0
- package/frontend/build/static/Menu-DUeb4XP8.js +1 -0
- package/frontend/build/static/MenuBook-DZFyn--3.js +1 -0
- package/frontend/build/static/MenuItem-DNlBQQYG.js +1 -0
- package/frontend/build/static/Modal-DdH902AP.js +1 -0
- package/frontend/build/static/NetworkOverview-DF8c0k1P.js +1 -0
- package/frontend/build/static/{NetworkPrometheusAPIWarning-Bq62ygkV.js → NetworkPrometheusAPIWarning-B0v-FihJ.js} +1 -1
- package/frontend/build/static/NetworkTraffic-C1I4wwcb.js +1 -0
- package/frontend/build/static/NetworkTrafficUsage-DkdQx64o.js +1 -0
- package/frontend/build/static/NotificationStack.story-CdeU4r0p.js +1 -0
- package/frontend/build/static/OnboardingProgress-BuWQ2rjB.js +1 -0
- package/frontend/build/static/OnboardingProgress.story-CmQztiFV.js +1 -0
- package/frontend/build/static/OpenInNew-CHcHAi4B.js +1 -0
- package/frontend/build/static/PageContent-lT51j8jO.js +1 -0
- package/frontend/build/static/Paper-BvPQ0Zq6.js +1 -0
- package/frontend/build/static/PercentageDonut-CZVWd5fE.js +1 -0
- package/frontend/build/static/PermissionButton-Tj54K9Kc.js +1 -0
- package/frontend/build/static/Popover-FHiFav9d.js +1 -0
- package/frontend/build/static/Popper-Cut-_j4A.js +1 -0
- package/frontend/build/static/Portal-kwmlgXGI.js +1 -0
- package/frontend/build/static/Radio-Cj82h8o5.js +1 -0
- package/frontend/build/static/RadioGroup-BWTZb8iE.js +1 -0
- package/frontend/build/static/ReactJSONEditor-D65iiPmM.js +4 -0
- package/frontend/build/static/ReactJSONEditor.story-Bt3pxUGO.js +1 -0
- package/frontend/build/static/RoleCell-tqHUOlI7.js +1 -0
- package/frontend/build/static/RtlProvider-D1AlROju.js +1 -0
- package/frontend/build/static/Safeguard-DFEQulxy.js +1 -0
- package/frontend/build/static/SdkEvaluationStatus-B1rMywp-.js +17 -0
- package/frontend/build/static/SdkEvaluationStatus.story-BxgqLICz.js +1 -0
- package/frontend/build/static/Select-DdG1oq6O.js +3 -0
- package/frontend/build/static/SelectSdk-Boj2Ug-2.js +1 -0
- package/frontend/build/static/SelectSdk-CzRoKDb5.js +1 -0
- package/frontend/build/static/SelectSdk.story-BT9ke5Eb.js +1 -0
- package/frontend/build/static/SelectSdk.story-CdzotYoq.js +1 -0
- package/frontend/build/static/Spacing.story-CB6GkN5Z.js +1 -0
- package/frontend/build/static/StoriesPage-luLnHVc2.js +1 -0
- package/frontend/build/static/SwitchBase-cxExIOp0.js +1 -0
- package/frontend/build/static/TextField-Cf03Ror7.js +1 -0
- package/frontend/build/static/ThemeColors.story-Cx9bv5pL.js +1 -0
- package/frontend/build/static/TokenExplanation-CJjBSQ07.js +1 -0
- package/frontend/build/static/TokenExplanation.story-BoOaHRrQ.js +1 -0
- package/frontend/build/static/Tooltip-DPzrXyNS.js +1 -0
- package/frontend/build/static/TooltipResolver-CIBfA4vm.js +1 -0
- package/frontend/build/static/Truncator-CF0-SVks.js +1 -0
- package/frontend/build/static/Typography-nCkGT67u.js +1 -0
- package/frontend/build/static/Typography.story-CofmlvJB.js +1 -0
- package/frontend/build/static/UIContext-Dsr0TY8K.js +1 -0
- package/frontend/build/static/WhatsNewLayout.story-p4Cm8bgx.js +1 -0
- package/frontend/build/static/aggregateFeatureMetrics-D7AXsd2U.js +1 -0
- package/frontend/build/static/capitalize-DfXJDj8P.js +1 -0
- package/frontend/build/static/chartjs-plugin-annotation.esm-tsR8Pv5a.js +1 -0
- package/frontend/build/static/chunk-KS7C4IRE-PUpsdS_b.js +3 -0
- package/frontend/build/static/code-block-BZePA-4e.js +1 -0
- package/frontend/build/static/copy-to-clipboard-BCU4eeSw.js +1 -0
- package/frontend/build/static/createBox-DaDvp7MB.js +1 -0
- package/frontend/build/static/createSimplePaletteValueFilter-Bt9IjErz.js +1 -0
- package/frontend/build/static/createSvgIcon-D-6jHYkf.js +1 -0
- package/frontend/build/static/dividerClasses-DcI5JVLQ.js +1 -0
- package/frontend/build/static/{enterpriseEdgeCloud-C5u35XAw.js → enterpriseEdgeCloud-qnOcFE1S.js} +1 -1
- package/frontend/build/static/esm-DViSjNxt.js +12 -0
- package/frontend/build/static/formatAccessText-BhC1wtCg.js +1 -0
- package/frontend/build/static/httpErrorResponseHandler-BzpwldnE.js +1 -0
- package/frontend/build/static/impact-metrics-DrmGy_gn.png +0 -0
- package/frontend/build/static/{impact-metrics-icon-6dt-ye-h.js → impact-metrics-icon-Cg_ki-2e.js} +1 -1
- package/frontend/build/static/index-C2zVj2FI.js +287 -0
- package/frontend/build/static/{jsx-runtime-BnvnyDTF.js → jsx-runtime-DYfQNk55.js} +1 -1
- package/frontend/build/static/mcp-ADx0Sju7.png +0 -0
- package/frontend/build/static/{metricsFormatters-DhX-aU17.js → metricsFormatters-BmjW0KTj.js} +1 -1
- package/frontend/build/static/milestone-CciNgBhP.png +0 -0
- package/frontend/build/static/{mui-CoU2c-id.js → mui-C_omlwxE.js} +1 -1
- package/frontend/build/static/networkTrafficUsageHighlightPlugin-DPi6id5j.js +1 -0
- package/frontend/build/static/react-Ca03aNmg.js +1 -0
- package/frontend/build/static/resolveProps-CAVsjga5.js +1 -0
- package/frontend/build/static/servicenow-BmgZtZjb.svg +13 -0
- package/frontend/build/static/sharedTypes-CXnpeg4U.js +1 -0
- package/frontend/build/static/styled-CY_-vLWk.js +1 -0
- package/frontend/build/static/theme-DDCs0xPV.js +1 -0
- package/frontend/build/static/{themeStyles-DGVpwkcv.js → themeStyles-B99HStK1.js} +1 -1
- package/frontend/build/static/useApi-B7ZLy5tN.js +1 -0
- package/frontend/build/static/useApiGetter-C41iZzl2.js +1 -0
- package/frontend/build/static/useApiTokens-BQWPDfv2.js +1 -0
- package/frontend/build/static/useConditionalSWR-QWHOvx6V.js +1 -0
- package/frontend/build/static/useConditionallyHiddenColumns-DbQbB4u7.js +5 -0
- package/frontend/build/static/useCustomEvent-BnWpZ2E1.js +1 -0
- package/frontend/build/static/useEnhancedEffect-BBMUaXin.js +1 -0
- package/frontend/build/static/useEnvironments-Gu7r2cpc.js +2 -0
- package/frontend/build/static/useEventTracker-B0ILyjZB.js +1 -0
- package/frontend/build/static/useGroupedImpactMetricsData-jQ7IYFK3.js +1 -0
- package/frontend/build/static/useId-Bg4oXGUa.js +1 -0
- package/frontend/build/static/{useImpactMetrics-9qDSEpTn.js → useImpactMetrics-DXxTQl6p.js} +2 -2
- package/frontend/build/static/{useImpactMetricsEnabled-wRNO6-Oh.js → useImpactMetricsEnabled-B3om8V0b.js} +1 -1
- package/frontend/build/static/{useInstanceTrafficMetrics-CRCDB4TX.js → useInstanceTrafficMetrics-DkgcWjVM.js} +1 -1
- package/frontend/build/static/useLocationSettings-vlEPA_j3.js +1 -0
- package/frontend/build/static/useMediaQuery-BFm2lR-0.js +2 -0
- package/frontend/build/static/useOptionalPathParam-Cmh3Ejbi.js +1 -0
- package/frontend/build/static/{usePageTitle-CHzzFshF.js → usePageTitle-DD1IHvCw.js} +1 -1
- package/frontend/build/static/useSlot-Ce59-xJL.js +1 -0
- package/frontend/build/static/useSlotProps-v77xI-e5.js +1 -0
- package/frontend/build/static/useTheme-CTychWp2.js +10 -0
- package/frontend/build/static/useTimeout-B2sc1jSE.js +1 -0
- package/frontend/build/static/useToast-BUHn_9TC.js +1 -0
- package/frontend/build/static/{useUiConfig-DbVjTDpE.js → useUiConfig-BcfEDPWc.js} +1 -1
- package/frontend/build/static/useUiFlag-PbKW1iMa.js +1 -0
- package/frontend/package.json +13 -14
- package/package.json +6 -5
- package/frontend/build/static/AccordionSummary-wye3oOm6.js +0 -1
- package/frontend/build/static/AdvancedPlayground-DdeMb-6I.js +0 -3
- package/frontend/build/static/Alert-_bLyWbvx.js +0 -1
- package/frontend/build/static/BackendConnections-kgR0xyIH.js +0 -1
- package/frontend/build/static/Box-BQsxfFmC.js +0 -1
- package/frontend/build/static/Button-CebB8EPB.js +0 -1
- package/frontend/build/static/CircularProgress-C_LUU3DK.js +0 -101
- package/frontend/build/static/Close-DyTASMSq.js +0 -1
- package/frontend/build/static/Collapse-DPPTUMpf.js +0 -1
- package/frontend/build/static/ConditionallyRender---uTpMBn.js +0 -1
- package/frontend/build/static/CreateProject-BSlg0WYM.js +0 -1
- package/frontend/build/static/Dialog-C-xQxqWX.js +0 -1
- package/frontend/build/static/DialogWithAside-DzCSDyWo.js +0 -1110
- package/frontend/build/static/Divider-CsdWvu5F.js +0 -1
- package/frontend/build/static/EnterpriseEdge-CjslqYDM.js +0 -6
- package/frontend/build/static/FeatureMetricsChart-B4WryxcW.js +0 -2
- package/frontend/build/static/FeatureStaleDialog-EzReRTI5.js +0 -8
- package/frontend/build/static/FileCopy-B8HZEA83.js +0 -1
- package/frontend/build/static/FlagMetricsChart-hNQuwOxW.js +0 -2
- package/frontend/build/static/FormControlLabel-F5gDLixN.js +0 -1
- package/frontend/build/static/FrontendNetworkTrafficUsage-pcr83PWo.js +0 -1
- package/frontend/build/static/Grow-BIbmvKVy.js +0 -1
- package/frontend/build/static/HelpOutlineOutlined-CpMsVJZu.js +0 -1
- package/frontend/build/static/Highlighter-MomUaQww.js +0 -1
- package/frontend/build/static/HtmlTooltip-B9jv1G1R.js +0 -1
- package/frontend/build/static/ImpactMetricsPage-DGH_S9oz.js +0 -1
- package/frontend/build/static/ImpactViewsPage-DZqKPFvE.js +0 -1
- package/frontend/build/static/LazyAdminExport-B1ReAViz.js +0 -38
- package/frontend/build/static/LazyProjectExport-BMVcGpNI.js +0 -46
- package/frontend/build/static/LifecycleChartComponent-BeoRUO9q.js +0 -2
- package/frontend/build/static/LineChartComponent-BbCMbJ-m.js +0 -1
- package/frontend/build/static/Link-CfIScd2f.js +0 -1
- package/frontend/build/static/Loader-DdgXftPc.js +0 -1
- package/frontend/build/static/MarkCompletedDialogue-CcXyp8UE.js +0 -1
- package/frontend/build/static/NetworkOverview-0mBnFAZX.js +0 -1
- package/frontend/build/static/NetworkTraffic-DmG5Iv25.js +0 -1
- package/frontend/build/static/NetworkTrafficUsage-DccaVLYs.js +0 -1
- package/frontend/build/static/OnboardingProgress-Bp9sZ-ZM.js +0 -1
- package/frontend/build/static/PageContent-c0NDm5oD.js +0 -1
- package/frontend/build/static/PercentageDonut-DBDGNJlh.js +0 -1
- package/frontend/build/static/PermissionButton-B-IfzChn.js +0 -1
- package/frontend/build/static/Popover-CUTnSn2h.js +0 -1
- package/frontend/build/static/Radio-DL8ja0ll.js +0 -1
- package/frontend/build/static/RadioGroup-Ci3WHaOy.js +0 -1
- package/frontend/build/static/ReactJSONEditor-DeBI7JPg.js +0 -4
- package/frontend/build/static/RoleCell-DhYvu4YH.js +0 -1
- package/frontend/build/static/Safeguard-DErU6fSK.js +0 -1
- package/frontend/build/static/SelectSdk-Dr_pzQgX.js +0 -2
- package/frontend/build/static/StoriesPage-frGP1Bfr.js +0 -2
- package/frontend/build/static/SwitchBase-DWPIxZnN.js +0 -1
- package/frontend/build/static/TextField-oipjeg6n.js +0 -3
- package/frontend/build/static/Tooltip-BaILXXti.js +0 -1
- package/frontend/build/static/TooltipResolver-4A1YhwBy.js +0 -1
- package/frontend/build/static/Truncator-D2bO9ub6.js +0 -1
- package/frontend/build/static/Typography-BTdLWIUX.js +0 -1
- package/frontend/build/static/aggregateFeatureMetrics-B-67HaIZ.js +0 -1
- package/frontend/build/static/chartjs-plugin-annotation.esm-DP4wCpdA.js +0 -1
- package/frontend/build/static/chunk-QUQL4437-Dr42NpoL.js +0 -3
- package/frontend/build/static/createBox-Cf2UJsmc.js +0 -1
- package/frontend/build/static/createSimplePaletteValueFilter-BRAMrHWJ.js +0 -1
- package/frontend/build/static/dividerClasses-Cc45lyWo.js +0 -1
- package/frontend/build/static/esm-DdgY1Q5s.js +0 -12
- package/frontend/build/static/httpErrorResponseHandler-FMtt7Zqh.js +0 -1
- package/frontend/build/static/index-C04TEs4k.js +0 -290
- package/frontend/build/static/networkTrafficUsageHighlightPlugin-DlOtHZg3.js +0 -1
- package/frontend/build/static/react-GZhdek4G.js +0 -1
- package/frontend/build/static/useApiGetter-7FP8Avm4.js +0 -1
- package/frontend/build/static/useApiTokens-C8Dqw_X1.js +0 -1
- package/frontend/build/static/useConditionalSWR-DGgzun6i.js +0 -1
- package/frontend/build/static/useConditionallyHiddenColumns-C5q9zdfJ.js +0 -5
- package/frontend/build/static/useCustomEvent-Dj2V5RVb.js +0 -1
- package/frontend/build/static/useEnvironments-CTguhgy0.js +0 -2
- package/frontend/build/static/useGroupedImpactMetricsData-CW9qnV2y.js +0 -1
- package/frontend/build/static/useMediaQuery-DGx8zAkf.js +0 -2
- package/frontend/build/static/useOptionalPathParam-Cx3ru9yC.js +0 -1
- package/frontend/build/static/useTheme-CQqAmDLr.js +0 -9
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{o as e,t}from"./react-Ca03aNmg.js";import{f as n,r}from"./chunk-KS7C4IRE-PUpsdS_b.js";import{t as i}from"./useTheme-CTychWp2.js";import{t as a}from"./jsx-runtime-DYfQNk55.js";import{t as o}from"./styled-CY_-vLWk.js";import{A as s,D as c,E as l,L as u,M as d,N as f,O as p,R as m,T as h,U as g,_,a as v,c as y,f as b,g as x,j as S,k as C,l as w,n as T,o as E,r as D,s as ee,t as O,v as te,w as k}from"./useConditionallyHiddenColumns-DbQbB4u7.js";import{t as A}from"./useMediaQuery-BFm2lR-0.js";import{o as j,s as ne,t as M}from"./TextField-Cf03Ror7.js";import{t as N}from"./Popover-FHiFav9d.js";import{t as P}from"./createSvgIcon-D-6jHYkf.js";import{t as re}from"./Paper-BvPQ0Zq6.js";import{t as F}from"./Alert-DQgOzmJF.js";import{t as I}from"./IconButton-BveFD3PF.js";import{t as L}from"./Typography-nCkGT67u.js";import{t as R}from"./Box-rSzdGLLJ.js";import{t as z}from"./Button-yGjgMTJI.js";import{t as ie}from"./Divider-BYq1CcT0.js";import{t as ae}from"./Tooltip-DPzrXyNS.js";import{a as oe,n as se,t as ce}from"./useEnvironments-Gu7r2cpc.js";import{u as le}from"./themeStyles-B99HStK1.js";import{t as B}from"./ConditionallyRender-CEffh9Z-.js";import{t as ue}from"./Close-nISwbNAY.js";import{r as de}from"./httpErrorResponseHandler-BzpwldnE.js";import{t as fe}from"./createLocalStorage-WS-MCMlG.js";import{n as pe,r as me,t as he}from"./PageContent-lT51j8jO.js";import{t as ge}from"./useEventTracker-B0ILyjZB.js";import{t as _e}from"./useToast-BUHn_9TC.js";import{n as V,t as ve}from"./useApi-B7ZLy5tN.js";import{n as ye,t as be}from"./Loader-CnLypnQx.js";import{Bt as xe,Ca as H,Eo as Se,Gn as Ce,Is as we,Kr as Te,Mi as U,Ni as Ee,St as De,Wn as Oe,Wo as ke,Zn as Ae,_i as je,_o as Me,_t as Ne,bt as Pe,co as Fe,ct as Ie,ft as Le,gi as Re,ht as ze,ja as W,ka as G,ms as Be,no as K,qr as Ve,sc as He,ss as Ue,uo as We,xt as Ge,ya as Ke,yt as qe,zr as Je}from"./index-C2zVj2FI.js";import{t as Ye}from"./useApiTokens-BQWPDfv2.js";import{a as Xe,c as q,o as Ze,r as Qe,s as $e,t as et}from"./esm-DViSjNxt.js";var J=e(t(),1),tt=()=>{let{makeRequest:e,createRequest:t,errors:n,loading:r}=ve({propagateErrors:!0}),i=`api/admin/playground`;return{evaluateAdvancedPlayground:async n=>{let r=t(`${i}/advanced`,{method:`POST`,body:JSON.stringify(n)});return(await e(r.caller,r.id)).json()},evaluateChangeRequestPlayground:async(n,r)=>{let a=`${i}/change-request/${n}`,o=t(a,{method:`POST`,body:JSON.stringify(r)});return(await e(o.caller,o.id)).json()},errors:n,loading:r}},nt=e(x(),1),rt=e=>{var t=e.theme,n=e.settings,r=n===void 0?{}:n,i=e.styles,a=i===void 0?[]:i,o={".cm-gutters":{}},s={};r.background&&(s.backgroundColor=r.background),r.backgroundImage&&(s.backgroundImage=r.backgroundImage),r.foreground&&(s.color=r.foreground),r.fontSize&&(s.fontSize=r.fontSize),(r.background||r.foreground)&&(o[`&`]=s),r.fontFamily&&(o[`&.cm-editor .cm-scroller`]={fontFamily:r.fontFamily}),r.gutterBackground&&(o[`.cm-gutters`].backgroundColor=r.gutterBackground),r.gutterForeground&&(o[`.cm-gutters`].color=r.gutterForeground),r.gutterBorder&&(o[`.cm-gutters`].borderRightColor=r.gutterBorder),r.caret&&(o[`.cm-content`]={caretColor:r.caret},o[`.cm-cursor, .cm-dropCursor`]={borderLeftColor:r.caret});var c={};return r.gutterActiveForeground&&(c.color=r.gutterActiveForeground),r.lineHighlight&&(o[`.cm-activeLine`]={backgroundColor:r.lineHighlight},c.backgroundColor=r.lineHighlight),o[`.cm-activeLineGutter`]=c,r.selection&&(o[`&.cm-focused .cm-selectionBackground, & .cm-line::selection, & .cm-selectionLayer .cm-selectionBackground, .cm-content ::selection`]={background:r.selection+` !important`}),r.selectionMatch&&(o[`& .cm-selectionMatch`]={backgroundColor:r.selectionMatch}),[$e.theme(o,{dark:t===`dark`}),Ze(Xe.define(a))]},it={background:`#faf8f5`,foreground:`#b29762`,caret:`#93abdc`,selection:`#e3dcce`,selectionMatch:`#e3dcce`,gutterBackground:`#faf8f5`,gutterForeground:`#cdc4b1`,gutterBorder:`transparent`,lineHighlight:`#ddceb154`},at=[{tag:[q.comment,q.bracket],color:`#b6ad9a`},{tag:[q.atom,q.number,q.keyword,q.link,q.attributeName,q.quote],color:`#063289`},{tag:[q.emphasis,q.heading,q.tagName,q.propertyName,q.variableName],color:`#2d2006`},{tag:[q.typeName,q.url,q.string],color:`#896724`},{tag:[q.operator,q.string],color:`#1659df`},{tag:[q.propertyName],color:`#b29762`},{tag:[q.unit,q.punctuation],color:`#063289`}],ot=(e=>{var t=e||{},n=t.theme,r=n===void 0?`light`:n,i=t.settings,a=i===void 0?{}:i,o=t.styles,s=o===void 0?[]:o;return rt({theme:r,settings:ke({},it,a),styles:[...at,...s]})})(),st={background:`#2a2734`,foreground:`#6c6783`,caret:`#ffad5c`,selection:`#91ff6c26`,selectionMatch:`#91ff6c26`,gutterBackground:`#2a2734`,gutterForeground:`#545167`,lineHighlight:`#36334280`},ct=[{tag:[q.comment,q.bracket],color:`#6c6783`},{tag:[q.atom,q.number,q.keyword,q.link,q.attributeName,q.quote],color:`#ffcc99`},{tag:[q.emphasis,q.heading,q.tagName,q.propertyName,q.className,q.variableName],color:`#eeebff`},{tag:[q.typeName,q.url],color:`#7a63ee`},{tag:q.operator,color:`#ffad5c`},{tag:q.string,color:`#ffb870`},{tag:[q.propertyName],color:`#9a86fd`},{tag:[q.unit,q.punctuation],color:`#e09142`}],lt=(e=>{var t=e||{},n=t.theme,r=n===void 0?`dark`:n,i=t.settings,a=i===void 0?{}:i,o=t.styles,s=o===void 0?[]:o;return rt({theme:r,settings:ke({},st,a),styles:[...ct,...s]})})(),Y=a(),ut=o(`aside`)(({theme:e})=>({height:`50px`,backgroundColor:e.palette.background.paper,borderTopRightRadius:e.shape.borderRadiusMedium,borderTopLeftRadius:e.shape.borderRadiusMedium,padding:e.spacing(1,2),color:e.palette.text.primary,display:`flex`,justifyContent:`space-between`,alignItems:`center`,border:`1px solid ${e.palette.divider}`})),dt=o(`div`)(({theme:e,style:t})=>({width:e.spacing(3),height:e.spacing(3),display:`flex`,alignItems:`center`,color:e.palette.background.paper,justifyContent:`center`,transition:`background-color 0.5s ease-in-out`,borderRadius:`50%`,...t})),ft=o(`div`)(({theme:e})=>({fontSize:e.fontSizes.smallBody,color:e.palette.error.dark,marginRight:e.spacing(1)})),pt=()=>{let e=i();return(0,Y.jsx)(dt,{style:{backgroundColor:e.palette.success.main},children:(0,Y.jsx)(we,{sx:e=>({width:e.spacing(2),height:e.spacing(2)})})})},mt=()=>{let e=i();return(0,Y.jsx)(dt,{style:{backgroundColor:e.palette.error.main},children:(0,Y.jsx)(Ie,{})})},ht=({context:e,setContext:t,error:n})=>{let r=i(),a=(0,J.useCallback)(e=>{t(e)},[t]),o=`calc(6 * ${r.typography.body1.fontSize} * ${r.typography.body1.lineHeight}) + 8px`;return(0,Y.jsxs)(R,{sx:{width:`100%`},children:[(0,Y.jsxs)(ut,{children:[`JSON`,(0,Y.jsx)(B,{condition:!!n,show:(0,Y.jsxs)(R,{sx:e=>({display:`flex`,alignItems:`center`}),children:[(0,Y.jsx)(ft,{children:n}),(0,Y.jsx)(mt,{})]}),elseShow:(0,Y.jsx)(pt,{})})]}),(0,Y.jsx)(et,{value:e,minHeight:o,theme:r.mode===`dark`?lt:ot,extensions:[Qe()],onChange:a,style:{border:`1px solid ${r.palette.divider}`,borderTop:`none`},placeholder:JSON.stringify({currentTime:`2022-07-04T14:13:03.929Z`,appName:`playground`,userId:`test`,remoteAddress:`127.0.0.1`},null,2)})]})};function gt(e){return Array.isArray(e)?e:[e]}var _t=e=>!e||e.length===0||e.length===1&&e[0]===`*`?`*`:gt(e),vt=e=>gt(e),yt=e=>{let t=bt(e);return t.length>0?t[0]:``},bt=e=>e.filter(({enabled:e})=>!!e).sort((e,t)=>e.sortOrder-t.sortOrder).map(({name:e})=>e),xt=(e,t)=>e?`100%`:t&&!e?`60%`:`50%`,St=e=>typeof e==`string`?!0:Array.isArray(e)?e.every(e=>typeof e==`string`):!1,Ct=e=>{let t=new Set([`appName`,`environment`,`userId`,`sessionId`,`remoteAddress`,`currentTime`,`properties`]),n={...e},r=!1;for(let i in e)t.has(i)||(n.properties||={},n.properties[i]=e[i],delete n[i],r=!0);return!r&&!e.properties&&delete n.properties,n},wt=e=>{let[t]=e.split(`.`),[n,r]=t.split(`:`);if(!n||!r)throw Error(`Invalid token format`);if(r===`*`)throw Error(`Admin tokens are not supported in the playground`)},Tt=e=>{let[t]=e.split(`.`);return t.split(`:`)},Et=e=>Ke({mode:`all`},e),Dt=e=>{let t=e=>e.toSorted((e,t)=>e.sortOrder-t.sortOrder).map(e=>({key:e.name,label:e.name})),n=e.reduce(({project:e,global:t},n)=>(n.project?e.push(n):t.push(n),{project:e,global:t}),{project:[],global:[]}),r=[];return n.project.length&&r.push({groupHeader:`Project context fields`,options:t(n.project)}),n.global.length&&r.push({groupHeader:`Global context fields`,options:t(n.global)}),r},Ot=({context:e,setContext:t})=>{let n=i(),{setToastData:r}=_e(),{context:a}=Et(),o=Dt(a),[s,c]=(0,J.useState)(),[l,d]=(0,J.useState)(!1),[f,p]=(0,J.useState)(``),[h,g]=(0,J.useState)(``),_=(0,J.useMemo)(()=>(0,nt.default)(e=>{if(!e)return c(void 0);try{let t=JSON.parse(e);d(t[f]!==void 0||t?.properties?.[f]!==void 0)}catch(e){return c(V(e))}return c(void 0)},250),[c,f,d]);(0,J.useEffect)(()=>{_(e)},[_,e]);let v=()=>{try{let n=JSON.parse(e||`{}`);t(JSON.stringify(Ct({...n,[f]:h}),null,2));let r=a.find(e=>e.name===f);if(r?.legalValues&&r.legalValues.length>0||f===`currentTime`)return g(``)}catch(e){r({type:`error`,text:`Error parsing context: ${V(e)}`})}},y=(e,t)=>{if(St(t)){if(Array.isArray(t)){let e=(t||[]).length>1?t.join(`,`):t[0];return g(e)}g(t)}},b=()=>{if(!h||h===``)return[];let e=(a.find(e=>e.name===f)?.legalValues||[]).length>1;return h.includes(`,`)&&e?h.split(`,`):[h]};return(0,Y.jsxs)(R,{children:[(0,Y.jsx)(R,{sx:{display:`flex`,alignItems:`center`,mb:2},children:(0,Y.jsx)(L,{variant:`body2`,color:n.palette.text.primary,sx:{ml:1},children:`Unleash context`})}),(0,Y.jsxs)(R,{sx:{display:`flex`,gap:2,flexWrap:`wrap`,mb:2},children:[(0,Y.jsx)(Ue,{label:`Context field`,labelId:`context-field-label`,id:`context-field`,value:f,onChange:e=>{if(p(e||``),e===`currentTime`)return g(new Date().toISOString());g(``)},variant:`outlined`,size:`small`,sx:{width:200,maxWidth:`100%`},options:o}),(()=>{if(f===`currentTime`){let e=m(h);return(0,Y.jsx)(M,{id:`date`,label:`Date`,size:`small`,type:`datetime-local`,value:u(e?e.toISOString():new Date().toISOString()),sx:{width:200,maxWidth:`100%`},onChange:e=>{let t=m(e.target.value)?.toISOString();t&&g(t)},required:!0,slotProps:{inputLabel:{shrink:!0}}})}let e=a.find(e=>e.name===f);return e?.legalValues&&e.legalValues.length>0?(0,Y.jsx)(j,{disablePortal:!0,limitTags:3,id:`context-legal-values`,multiple:!0,options:e.legalValues.map(({value:e})=>e),disableCloseOnSelect:!0,size:`small`,value:b(),onChange:y,getOptionLabel:e=>e,renderOption:(e,t,{selected:n})=>(0,Y.jsxs)(`li`,{...e,children:[(0,Y.jsx)(He,{icon:(0,Y.jsx)(Ve,{fontSize:`small`}),checkedIcon:(0,Y.jsx)(Te,{fontSize:`small`}),sx:e=>({marginRight:e.spacing(.5)}),checked:n}),t]}),sx:{width:370,maxWidth:`100%`},renderInput:e=>(0,Y.jsx)(M,{...e,label:`Value`})}):(0,Y.jsx)(M,{label:`Value`,id:`context-value`,sx:{width:370,maxWidth:`100%`},placeholder:`value1,value2,value3`,size:`small`,value:h,onChange:e=>g(e.target.value||``)})})(),(0,Y.jsx)(z,{variant:`outlined`,disabled:!f||!!s,onClick:v,sx:{width:`95px`,maxHeight:`40px`},children:`${l?`Replace`:`Add`} `})]}),(0,Y.jsx)(ht,{context:e,setContext:t,error:s})]})},kt=({environments:e,setEnvironments:t,availableEnvironments:n,disabled:r})=>{let i=[...n.map(e=>({label:e,id:e}))],a=i.filter(({id:t})=>e.includes(t));return(0,Y.jsx)(j,{disablePortal:!0,limitTags:3,id:`environment`,multiple:!0,options:i,sx:{flex:1},renderInput:e=>(0,Y.jsx)(M,{...e,label:`Environments`}),renderOption:Ce,renderValue:(e,t)=>e.map((e,n)=>{let{key:r,...i}=t({index:n});return(0,Y.jsx)(ne,{size:`small`,...i,label:e.label},r)}),getOptionLabel:({label:e})=>e,disableCloseOnSelect:!1,size:`small`,value:a,onChange:(e,n,r)=>{let i=n;return r===`clear`||i===null?t([]):Array.isArray(i)?i.length===0?t([]):t(i.map(({id:e})=>e)):t([i.id])},disabled:r,"data-testid":`PLAYGROUND_ENVIRONMENT_SELECT`})},X={label:`ALL`,id:`*`},At=o(D)({fontSize:`1.25rem`}),jt=o(y)(()=>({width:`100%`})),Mt=o(R)(({theme:e})=>({display:`grid`,columnGap:e.spacing(2),rowGap:e.spacing(2),gridTemplateColumns:`1fr`,[e.breakpoints.up(`md`)]:{gridTemplateColumns:`1fr 1fr`}})),Nt=o(jt)(({theme:e})=>({"& label":{WebkitTextFillColor:e.palette.text.secondary},"& input.Mui-disabled":{WebkitTextFillColor:e.palette.text.secondary}})),Pt=({environments:e,projects:t,token:n,setProjects:a,setEnvironments:o,setToken:s,availableEnvironments:c,changeRequest:l,onClearChangeRequest:u})=>{let d=i(),{tokens:f}=Ye(),[p,m]=(0,J.useState)(),{projects:h}=ye(),_=[X,...h.map(({name:e,id:t})=>({label:e,id:t}))],v=async e=>{let t=e.target.value;if(s?.(t),t===``){w();return}try{wt(t),m(void 0),y(t)}catch(e){m(e.message)}},y=e=>{let[t,n]=Tt(e);switch(o([n]),t){case`[]`:x(e);break;case`*`:S();break;default:C(t)}},b=e=>{!e.projects||e.projects===`*`?a([X.id]):typeof e.projects==`string`?a([e.projects]):Array.isArray(e.projects)&&a(e.projects)},x=e=>{let t=f.find(({secret:t})=>t===e);t?b(t):m(`Invalid token. Ensure you use a valid token from this Unleash instance.`)},S=()=>{a([X.id])},C=e=>{_.map(e=>e.id).includes(e)?a([e]):m(`Invalid token. Project ${e} does not exist.`)},w=()=>{m(void 0)};return(0,Y.jsxs)(R,{sx:{pb:2},children:[(0,Y.jsx)(R,{sx:{display:`flex`,alignItems:`center`,mb:2},children:(0,Y.jsx)(L,{variant:`body2`,color:d.palette.text.primary,sx:{ml:1},children:`Access configuration`})}),(0,Y.jsxs)(Mt,{children:[(0,Y.jsx)(R,{children:(0,Y.jsx)(ae,{arrow:!0,title:n?`Environment is automatically selected because you are using a token`:`Select environments to use in the playground`,children:(0,Y.jsx)(R,{children:(0,Y.jsx)(kt,{environments:e,setEnvironments:o,availableEnvironments:c,disabled:!!(n||l)})})})}),(0,Y.jsx)(R,{children:(0,Y.jsx)(ae,{arrow:!0,title:n?`Project is automatically selected because you are using a token`:`Select projects to use in the playground`,children:(0,Y.jsx)(Oe,{selectedProjects:t,onChange:a,dataTestId:`PLAYGROUND_PROJECT_SELECT`,disabled:!!(n||l),limitTags:3})})}),(0,Y.jsx)(R,{children:(0,Y.jsx)(jt,{label:`API token`,value:n||(l?` `:``),onChange:v,type:`text`,error:!!p,errorText:p,placeholder:`Enter your API token`,"data-testid":`PLAYGROUND_TOKEN_INPUT`,slotProps:{input:{endAdornment:n?(0,Y.jsx)(g,{position:`end`,"data-testid":`TOKEN_INPUT_CLEAR_BTN`,children:(0,Y.jsx)(I,{"aria-label":`clear API token`,onClick:()=>{s?.(``),w()},edge:`end`,children:(0,Y.jsx)(At,{})})}):null}},disabled:!!l})}),(0,Y.jsx)(B,{condition:!!l,show:(0,Y.jsxs)(R,{sx:{display:`flex`,gap:2},children:[(0,Y.jsx)(R,{sx:{flex:1},children:(0,Y.jsx)(Nt,{label:`Change request`,value:l?`Change request #${l}`:``,onChange:()=>{},type:`text`,disabled:!0,slotProps:{input:{endAdornment:(0,Y.jsx)(g,{position:`end`,children:(0,Y.jsx)(I,{"aria-label":`clear Change request results`,onClick:u,edge:`end`,children:(0,Y.jsx)(At,{})})})}}})}),(0,Y.jsx)(z,{variant:`outlined`,size:`medium`,to:`/projects/${t[0]}/change-requests/${l}`,component:r,nativeButton:!1,children:`View change request`})]})})]})]})},Ft=({availableEnvironments:e,environments:t,onSubmit:n,projects:r,token:i,setToken:a,setProjects:o,setEnvironments:s,context:c,setContext:l,changeRequest:u,onClearChangeRequest:d})=>(0,Y.jsxs)(R,{component:`form`,onSubmit:n,sx:{display:`flex`,flexDirection:`column`},children:[(0,Y.jsx)(Pt,{environments:Array.isArray(t)?t:[t],projects:r,token:i,setToken:a,setEnvironments:s,setProjects:o,availableEnvironments:e.map(({name:e})=>e),changeRequest:u,onClearChangeRequest:d}),(0,Y.jsx)(Ot,{context:c,setContext:l}),(0,Y.jsx)(R,{sx:{mt:2,display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:(0,Y.jsx)(z,{variant:`contained`,size:`large`,type:`submit`,sx:{marginLeft:`auto`},children:`Try configuration`})})]}),It=o(`div`)(({style:e,theme:t})=>({width:`25px`,height:`25px`,borderRadius:`50%`,color:t.palette.common.white,display:`flex`,alignItems:`center`,justifyContent:`center`,fontWeight:`bold`,...e})),Lt=({style:e,children:t,type:n})=>{let r=i(),a={backgroundColor:r.palette.background.alternative,color:r.palette.common.white};return n===`secondary`&&(a.backgroundColor=r.palette.background.paper,a.color=r.palette.text.secondary),(0,Y.jsx)(It,{style:{...a,...e},children:t})},Z=({headerText:e,bodyText:t,sectionNumber:n})=>(0,Y.jsx)(R,{sx:{display:`flex`,alignItems:`flex-start`,mt:2,flexDirection:`column`},children:(0,Y.jsxs)(R,{sx:{display:`flex`},children:[(0,Y.jsx)(R,{children:(0,Y.jsx)(Lt,{children:n})}),(0,Y.jsxs)(R,{sx:{ml:2,display:`flex`,flexDirection:`column`},children:[(0,Y.jsx)(L,{variant:`body1`,sx:{fontWeight:`bold`},children:e}),(0,Y.jsx)(B,{condition:!!t,show:(0,Y.jsx)(L,{variant:`body1`,sx:{mt:1},children:t})})]})]})}),Rt=()=>(0,Y.jsxs)(R,{sx:{ml:4},children:[(0,Y.jsx)(L,{variant:`body1`,children:`Unleash playground is for helping you to understand how Unleash works, how feature flags are evaluated and for you to easily debug your feature flags.`}),(0,Y.jsx)(ie,{sx:{mt:2,mb:2}}),(0,Y.jsx)(L,{variant:`body1`,sx:{mb:1},children:`What you need to do is:`}),(0,Y.jsx)(Z,{headerText:`Select in which environment you want to test your
|
|
2
|
+
feature flag configuration`,bodyText:`You can also specify specific projects, or check
|
|
3
|
+
flags in all projects.`,sectionNumber:`1`}),(0,Y.jsx)(Z,{headerText:`Select a context field that you'd like to check`,bodyText:`You can configure as many context fields as you want. You can also leave the context empty to test against an empty context.`,sectionNumber:`2`}),(0,Y.jsx)(Z,{headerText:`Submit the form to try the configuration`,bodyText:`The results of evaluating your feature flags will appear after you submit the form. Then view the results.`,sectionNumber:`3`})]}),zt=P((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 2m1 17h-2v-2h2zm2.07-7.75-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25`}),`Help`),Bt=o(N)(({theme:e})=>({"& .MuiPaper-root":{borderRadius:e.shape.borderRadiusExtraLarge,border:`1px solid ${e.palette.divider}`,padding:e.spacing(8,4),maxWidth:`500px`}})),Vt=()=>{let[e,t]=(0,J.useState)(null),n=e=>t(e.currentTarget),r=()=>t(null);return(0,Y.jsxs)(R,{children:[(0,Y.jsx)(I,{onClick:n,"aria-label":`Open Playground guidance`,children:(0,Y.jsx)(zt,{})}),(0,Y.jsxs)(Bt,{open:!!e,anchorEl:e,onClose:r,anchorOrigin:{vertical:`bottom`,horizontal:`center`},transformOrigin:{vertical:`top`,horizontal:`center`},sx:e=>({zIndex:e.zIndex.tooltip,background:`none`}),children:[(0,Y.jsx)(I,{onClick:r,sx:{position:`absolute`,right:25,top:15},children:(0,Y.jsx)(ue,{})}),(0,Y.jsx)(Rt,{})]})]})},Ht=e=>(0,Y.jsx)(`svg`,{width:14,height:14,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,Y.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M8.84818 0.184159C8.56367 -0.0789547 8.1234 -0.0575747 7.86482 0.231912C7.60623 0.521399 7.62724 0.96937 7.91175 1.23248C9.48292 2.68551 10.6076 4.74934 10.6076 7C10.6076 9.25066 9.48292 11.3145 7.91175 12.7675C7.62724 13.0306 7.60623 13.4786 7.86482 13.7681C8.1234 14.0576 8.56367 14.079 8.84818 13.8158C10.6396 12.1592 11.9998 9.73702 11.9998 7C11.9998 4.26298 10.6396 1.84083 8.84818 0.184159ZM6.04105 2.23302C6.29109 1.93586 6.73054 1.90121 7.02259 2.15563C8.33146 3.29586 9.35426 5.02309 9.35426 6.99995C9.35426 8.97682 8.33145 10.7039 7.02259 11.8441C6.73054 12.0986 6.29109 12.0639 6.04105 11.7668C5.79101 11.4696 5.82506 11.0225 6.11711 10.768C7.19425 9.82969 7.96199 8.46967 7.96199 6.99995C7.96199 5.53021 7.19423 4.17007 6.11711 3.23173C5.82506 2.97731 5.79101 2.53017 6.04105 2.23302ZM6.56908 7.00015C6.56908 8.56492 5.3224 9.83342 3.78454 9.83342C2.24668 9.83342 1 8.56492 1 7.00015C1 5.43539 2.24668 4.16689 3.78454 4.16689C5.3224 4.16689 6.56908 5.43539 6.56908 7.00015Z`,fill:`currentColor`})}),Ut=e=>(0,Y.jsx)(`svg`,{width:14,height:14,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,Y.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M8.84835 0.184159C8.56384 -0.0789547 8.12358 -0.0575747 7.86499 0.231912C7.6064 0.521399 7.62741 0.96937 7.91192 1.23248C9.4831 2.68551 10.6078 4.74934 10.6078 7C10.6078 7.40738 10.5709 7.80863 10.5012 8.20125L11.6597 9.35972C11.8783 8.60937 12 7.81877 12 7C12 4.26298 10.6397 1.84083 8.84835 0.184159ZM9.35443 6.99995L9.35418 7.0542L7.63252 5.33255C7.30901 4.52372 6.76993 3.80029 6.11728 3.23173C5.82523 2.97731 5.79118 2.53017 6.04122 2.23302C6.29127 1.93586 6.73072 1.90121 7.02276 2.15563C8.33164 3.29586 9.35443 5.02309 9.35443 6.99995ZM7.57827 8.79752L6.48307 7.70233C6.17606 8.92745 5.08437 9.83342 3.78471 9.83342C2.24685 9.83342 1.00017 8.56492 1.00017 7.00015C1.00017 5.69492 1.8676 4.59583 3.04789 4.26714L0.458225 1.67748C0.172794 1.39205 0.178843 0.923223 0.471736 0.63033C0.764629 0.337437 1.23345 0.331388 1.51889 0.616819L13.2132 12.3111C13.4986 12.5965 13.4926 13.0654 13.1997 13.3583C12.9068 13.6511 12.4379 13.6572 12.1525 13.3718L10.556 11.7753C10.0694 12.539 9.48623 13.2259 8.84835 13.8158C8.56384 14.079 8.12358 14.0576 7.86499 13.7681C7.6064 13.4786 7.62741 13.0306 7.91192 12.7675C8.54021 12.1865 9.0971 11.5078 9.53922 10.7585L8.62356 9.84281C8.20906 10.6195 7.64861 11.2989 7.02276 11.8441C6.73072 12.0986 6.29127 12.0639 6.04122 11.7668C5.79118 11.4696 5.82523 11.0225 6.11728 10.768C6.73471 10.2302 7.25048 9.55374 7.57827 8.79752Z`,fill:`currentColor`})}),Wt=e=>e===`unknown`||e===`unevaluated`?[W,`info`]:e===!0?[Ht,`success`]:[Ut,`error`],Q=({enabled:e,label:t,showIcon:n=!0})=>{let[r,i]=Wt(e);return(0,Y.jsx)(Se,{color:i,icon:n?(0,Y.jsx)(r,{"aria-hidden":!0,color:i,strokeWidth:`0.25`}):void 0,children:t})},Gt=o(R)(({theme:e})=>({display:`flex`,alignItems:`center`,padding:e.spacing(1,0,1,2)})),Kt=o(R)(()=>({marginRight:`auto`})),qt=({feature:e})=>{let[t,n]=e?.isEnabled?[!0,`True`]:e?.strategies?.result===`unknown`?[`unknown`,`Unknown`]:[!1,`False`];return(0,Y.jsx)(Gt,{children:(0,Y.jsx)(Kt,{"data-loading":!0,children:(0,Y.jsx)(Q,{enabled:t,label:n,showIcon:t!==`unknown`})})})};function Jt(e){return e===void 0?!0:Object.values(e).every(e=>e&&typeof e==`object`?Jt(e):e===null)}var Yt=e=>e.strategies?.data?.find(e=>!Fe.includes(e.name)),Xt=e=>e.strategies?.data?.length>0&&!e.strategies?.data?.find(e=>Fe.includes(e.name)),Zt=o(`div`)({display:`flex`,justifyContent:`space-between`,width:`100%`}),Qt=o(`hgroup`)(({theme:e})=>({display:`inline-flex`,alignItems:`center`,gap:e.spacing(1.5)})),$t=o(`h3`)(({theme:e})=>({fontWeight:`bold`,fontSize:e.typography.subtitle1.fontSize,margin:0})),en=({feature:e,input:t,onClose:n})=>{let r=i(),[a,o,s]=e.isEnabled?[`This feature flag is True in ${t?.environment} because `,`at least one strategy is True`,r.palette.success.contrastText]:e.hasUnsatisfiedDependency&&!e.isEnabledInCurrentEnvironment?[`This feature flag is False in ${t?.environment} because `,`parent dependency is not satisfied and the environment is disabled`,r.palette.error.contrastText]:e.isEnabledInCurrentEnvironment?Xt(e)?[`This feature flag is Unknown in ${t?.environment} because `,`no strategies could be fully evaluated`,r.palette.warning.contrastText]:Yt(e)?[`This feature flag is Unknown in ${t?.environment} because `,`not all strategies could be fully evaluated`,r.palette.warning.contrastText]:e.hasUnsatisfiedDependency?[`This feature flag is False in ${t?.environment} because `,`parent dependency is not satisfied`,r.palette.error.contrastText]:[`This feature flag is False in ${t?.environment} because `,`all strategies are either False or could not be fully evaluated`,r.palette.error.contrastText]:[`This feature flag is False in ${t?.environment} because `,`the environment is disabled`,r.palette.error.contrastText],c=Jt(t?.context)?`You did not provide a value for your context field in step 2 of the configuration`:void 0,l=Yt(e)?`This feature uses custom strategies. Custom strategies can't be evaluated, so they will be marked accordingly.`:void 0,u=n&&(e=>{e.stopPropagation(),n()});return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(Zt,{children:[(0,Y.jsxs)(Qt,{children:[(0,Y.jsx)($t,{children:e.name}),(0,Y.jsx)(`p`,{children:e?.strategies?.result===`unknown`?(0,Y.jsx)(Q,{enabled:`unknown`,label:`Unknown`,showIcon:!1}):(0,Y.jsx)(Q,{enabled:e.isEnabled,label:e.isEnabled?`True`:`False`})})]}),(0,Y.jsx)(I,{"aria-label":`Close`,onClick:u,children:(0,Y.jsx)(Je,{})})]}),(0,Y.jsxs)(`p`,{children:[a,(0,Y.jsx)(L,{color:s,component:`span`,children:o}),`.`]}),c?(0,Y.jsx)(F,{color:`info`,children:c}):null,l?(0,Y.jsx)(F,{severity:`warning`,color:`info`,children:l}):null]})},tn=o(`div`,{shouldForwardProp:e=>e!==`variant`})(({theme:e,variant:t})=>({"--font-size":e.typography.body2.fontSize,display:`flex`,alignItems:`center`,gap:e.spacing(1),padding:e.spacing(.5,.25),color:t===`ok`?e.palette.success.dark:e.palette.error.dark,fontSize:`var(--font-size)`,svg:{fontSize:`calc(var(--font-size) * 1.25)`}})),nn=()=>(0,Y.jsxs)(tn,{variant:`ok`,children:[(0,Y.jsx)(xe,{"aria-hidden":`true`}),(0,Y.jsx)(`p`,{children:`Constraint met by value in context`})]}),rn=({text:e})=>(0,Y.jsxs)(tn,{variant:`error`,children:[(0,Y.jsx)(v,{"aria-hidden":`true`}),(0,Y.jsx)(`p`,{children:e})]}),an=({constraint:e,input:t})=>{if(!e)return null;let n=()=>{let n=t?.context[e.contextName];return e.operator===`REGEX`&&n&&e.value?`Constraint not met – the value in the context ${e.contextName}: { ${n} } is not matching ${e.operator} ${e.value}`:n?`Constraint not met – the value in the context: { ${n} } is not ${e.operator} ${e.contextName}`:`Constraint not met – no value was specified for ${e.contextName}`};return(0,Y.jsx)(U,{children:(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(je,{...e}),e.result?(0,Y.jsx)(nn,{}):(0,Y.jsx)(rn,{text:n()})]})})},on=o(R)(({theme:e})=>({width:`auto`,height:`auto`,padding:e.spacing(2,3),borderRadius:e.shape.borderRadiusMedium,border:`1px solid ${e.palette.divider}`})),sn=({segment:e,input:t})=>(0,Y.jsx)(Re,{segment:e,constraintList:e.constraints.length>0?(0,Y.jsx)(Ee,{children:e.constraints.map(e=>(0,Y.jsx)(an,{constraint:e,input:t},G(e)))}):void 0,isExpanded:!0}),cn=({strategyResult:e,input:t})=>{let{name:n,constraints:r,segments:i,parameters:a}=e,o=Pe(e),{strategies:s}=Me(),{isCustomStrategy:c,customStrategyParameters:l}=Ge(e,s),u=!!(i&&i.length>0),d=!!(r&&r?.length>0),f=n!=="default"&&Object.keys(We).includes(n);if(!a)return null;let p=[...u?i.map(e=>(0,Y.jsx)(sn,{segment:e,input:t},G(e))):[],...d?r.map(e=>(0,Y.jsx)(an,{constraint:e,input:t},G(e))):[],f&&o.map((e,t)=>(0,Y.jsx)(U,{children:e},t)),c&&l.map((e,t)=>(0,Y.jsx)(U,{children:e},t)),n==="default"&&(0,Y.jsxs)(on,{sx:{width:`100%`},children:[`The standard strategy is `,(0,Y.jsx)(Se,{color:`success`,children:`ON`}),` for all users.`]},`default-on`)].filter(Boolean),{variant:m,variants:h}=e.result;return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(Ee,{children:p}),h?.length?(0,Y.jsx)(qe,{variants:h,selected:m?.name}):null]})},ln=({strategy:e,input:t,className:n})=>{let{result:r}=e,i=r.evaluationStatus===`incomplete`||r.evaluationStatus===`unevaluated`?`Not evaluated`:r.enabled?`True`:`False`;return(0,Y.jsx)(Ne,{strategy:{...e,id:`${G(e)}`},strategyHeaderLevel:4,className:n,headerItemsLeft:e.disabled?null:(0,Y.jsx)(Q,{showIcon:!1,enabled:r.enabled,label:i}),children:(0,Y.jsx)(cn,{strategyResult:e,input:t})})},un=o(`hgroup`)(({theme:e})=>({paddingBottom:e.spacing(2)})),dn=o(`h4`)(({theme:e})=>({fontWeight:`normal`,fontSize:e.typography.body1.fontSize,margin:0})),fn=o(`p`)(({theme:e})=>({fontWeight:`bold`,fontSize:e.typography.body2.fontSize})),pn=o(ze)(({theme:e})=>({marginInline:`calc(var(--popover-inline-padding) * -1)`,borderTop:`1px solid ${e.palette.divider}`,"> li:last-of-type":{paddingBottom:0}})),mn=({strategies:e,input:t,titlePrefix:n,infoText:r})=>e.length===0?null:(0,Y.jsxs)(`div`,{children:[(0,Y.jsxs)(un,{children:[(0,Y.jsx)(dn,{children:`${n?n.concat(` strategies`):`Strategies`} (${e?.length})`}),r?(0,Y.jsx)(fn,{children:r}):null]}),(0,Y.jsx)(pn,{children:e?.map((e,n)=>(0,Y.jsxs)(Le,{children:[n>0?(0,Y.jsx)(De,{}):``,(0,Y.jsx)(ln,{strategy:e,input:t})]},e.id))})]}),hn=({feature:e})=>{if(!e?.strategies?.data)return null;let t;if(e.hasUnsatisfiedDependency&&!e.isEnabledInCurrentEnvironment)t=`If the environment was enabled and parent dependencies were satisfied`;else if(e.hasUnsatisfiedDependency)t=`If parent dependencies were satisfied`;else if(!e.isEnabledInCurrentEnvironment)t=`If the environment was enabled`;else return;return(0,Y.jsxs)(F,{severity:`info`,color:`info`,children:[t,`, then this feature flag would be`,` `,e.strategies?.result?`TRUE`:`FALSE`,` with strategies evaluated like this:`]})},gn=({feature:e,input:t})=>{let n=e.strategies?.data?.filter(e=>!e.disabled),r=e.strategies?.data?.filter(e=>e.disabled),i=r?.length>0;return(e?.strategies?.data.length??0)===0?(0,Y.jsx)(F,{severity:`info`,children:`There are no strategies added to this feature flag in the selected environment.`}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(hn,{feature:e}),(0,Y.jsx)(mn,{strategies:n||[],input:t,titlePrefix:i?`Enabled`:void 0}),i?(0,Y.jsx)(mn,{strategies:r,input:t,titlePrefix:`Disabled`,infoText:`Disabled strategies are not evaluated for the overall result.`}):null]})},_n=o(`div`)(({theme:e})=>({alignItems:`flex-end`,color:e.palette.divider})),vn=({feature:e,input:t})=>{let[n,r]=(0,J.useState)(!1),i=(0,J.useRef)(null);return(0,Y.jsxs)(_n,{children:[(0,Y.jsx)(I,{onClick:()=>{r(!n)},children:(0,Y.jsx)(W,{ref:i})}),(0,Y.jsxs)(N,{open:n,onClose:()=>r(!1),anchorEl:i.current,anchorOrigin:{vertical:`top`,horizontal:`right`},transformOrigin:{vertical:`center`,horizontal:`left`},slotProps:{paper:{sx:e=>({"--popover-inline-padding":e.spacing(4),paddingInline:`var(--popover-inline-padding)`,paddingBlock:e.spacing(3),display:`flex`,flexDirection:`column`,width:728,maxWidth:`100%`,height:`auto`,gap:e.spacing(3),overflowY:`auto`,backgroundColor:e.palette.background.elevation1,borderRadius:e.shape.borderRadius})}},children:[(0,Y.jsx)(en,{feature:e,input:t,onClose:()=>r(!1)}),(0,Y.jsx)(gn,{feature:e,input:t})]})]})},yn=e=>e.feature?(0,Y.jsx)(vn,{...e}):null,bn=P((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 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m4.59-12.42L10 14.17l-2.59-2.58L6 13l4 4 8-8z`}),`CheckCircleOutlined`),xn=o(`div`)(({theme:e})=>({padding:e.spacing(4),maxWidth:`400px`})),$=o(L)(({theme:e})=>({marginBottom:e.spacing(2)})),Sn=o(bn)(({theme:e})=>({color:e.palette.success.main})),Cn=[{id:`Icon`,cell:({row:{original:{selected:e}}})=>(0,Y.jsx)(B,{condition:e,show:(0,Y.jsx)(T,{icon:(0,Y.jsx)(Sn,{})})}),meta:{maxWidth:25}},{id:`name`,header:`Name`,accessorKey:`name`,cell:({row:{original:{name:e}}})=>(0,Y.jsx)(_,{children:e}),meta:{maxWidth:175,width:175}},{id:`weight`,header:`Weight`,accessorKey:`weight`,sortingFn:`alphanumeric`,cell:({row:{original:{weight:e}}})=>(0,Y.jsx)(_,{children:e}),meta:{maxWidth:75}}],wn=({variants:e,selectedVariant:t})=>{let n=i(),r=p({columns:Cn,data:(0,J.useMemo)(()=>e.map(e=>({name:e.name,weight:`${f(e.weight)}%`,selected:e.name===t})),[e,t]),initialState:{sorting:[{id:`name`,desc:!1}]},getCoreRowModel:s(),getSortedRowModel:d(),autoResetAll:!1,enableSortingRemoval:!1});return(0,Y.jsxs)(xn,{children:[(0,Y.jsx)($,{variant:`subtitle2`,children:`Variant Information`}),(0,Y.jsx)($,{variant:`body2`,children:`The following table shows the variants defined on this feature toggle and the variant result based on your context configuration.`}),(0,Y.jsx)($,{variant:`body2`,children:`If you include "userId" or "sessionId" in your context, the variant will be the same every time because unleash uses these properties to ensure that the user receives the same experience.`}),(0,Y.jsxs)(l,{rowHeight:`dense`,children:[(0,Y.jsx)(ee,{tableInstance:r}),(0,Y.jsx)(oe,{children:r.getRowModel().rows.map(e=>{let t={};return e.original.selected||(t.color=n.palette.text.secondary),(0,Y.jsx)(se,{hover:!0,children:e.getVisibleCells().map(e=>(0,Y.jsx)(h,{style:t,children:c(e.column.columnDef.cell,e.getContext())},e.id))},e.id)})})]})]})},Tn=o(`div`)(()=>({maxWidth:`100%`,display:`flex`,alignItems:`center`,wordBreak:`break-all`})),En=({variant:e,variants:t,feature:n,isEnabled:r})=>{let a=i(),[o,s]=(0,J.useState)(null),c=e=>s(e.currentTarget),l=()=>s(null),u=!!o;return(0,Y.jsxs)(Tn,{children:[e,(0,Y.jsx)(B,{condition:!!t&&t.length>0&&r,show:(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(I,{onClick:c,children:(0,Y.jsx)(W,{})}),(0,Y.jsx)(N,{open:u,id:`${n}-result-variants`,onClose:l,anchorEl:o,anchorOrigin:{vertical:`bottom`,horizontal:-320},slotProps:{paper:{sx:{borderRadius:`${a.shape.borderRadiusLarge}px`}}},children:(0,Y.jsx)(wn,{variants:t,selectedVariant:e})})]})})]})},Dn=({features:e})=>{let t=A(i().breakpoints.down(`sm`)),n=C(),r=(0,J.useMemo)(()=>[...Object.keys(e[0].context).map(e=>n.accessor(t=>t.context?.[e],{id:`context_${e}`,header:K(e),cell:({getValue:e})=>(0,Y.jsx)(E,{value:String(e()??``)}),meta:{minWidth:160}})),n.accessor(e=>e.variant?.name??``,{id:`variant`,header:`Variant`,sortingFn:`alphanumeric`,cell:({getValue:e,row:{original:{variant:t,name:n,variants:r,isEnabled:i}}})=>(0,Y.jsx)(En,{variant:t?.enabled?String(e()):``,variants:r,feature:n,isEnabled:i}),meta:{maxWidth:200}}),n.accessor(e=>e?.isEnabled?`true`:e?.strategies?.result===`unknown`?`unknown`:`false`,{id:`isEnabled`,header:`isEnabled`,cell:({row:e})=>(0,Y.jsx)(qt,{feature:e.original}),sortingFn:Ae.playgroundResultState,sortDescFirst:!0,meta:{maxWidth:120}}),n.display({id:`info`,header:``,cell:({row:e})=>(0,Y.jsx)(yn,{feature:e.original,input:{environment:e.original.environment,context:e.original.context}}),meta:{maxWidth:70}})],[]),a=p({columns:r,data:e,getCoreRowModel:s(),getSortedRowModel:d(),getFilteredRowModel:S(),autoResetAll:!1,enableSortingRemoval:!1,enableMultiSort:!1});O([{condition:t,columns:[`variant`]}],a.setColumnVisibility,r);let o=(0,J.useRef)(null);return(0,Y.jsx)(R,{ref:o,sx:{overflow:`auto`,maxHeight:`800px`},children:(0,Y.jsx)(H,{parentRef:o,tableInstance:a})})},On=o(`div`,{})(({theme:e})=>({flexGrow:0,...le,justifyContent:`flex-start`,margin:e.spacing(0,1.5)})),kn=o(R)(({theme:e})=>({display:`flex`,flexDirection:`row`,gap:e.spacing(1)})),An=({value:e})=>{let t=i(),[n,r]=(0,J.useState)(null),a=e=>r(e.currentTarget),o=()=>r(null),s=!!n,c=(e||[]).filter(e=>e.isEnabled),l=(e||[]).filter(e=>!e.isEnabled);return(0,Y.jsxs)(On,{children:[(0,Y.jsxs)(kn,{children:[(0,Y.jsx)(B,{condition:c.length>0,show:(0,Y.jsx)(Q,{enabled:!0,label:`${c.length}`,showIcon:!0})}),(0,Y.jsx)(B,{condition:l.length>0,show:(0,Y.jsx)(Q,{enabled:!1,label:`${l.length}`,showIcon:!0})})]}),(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(I,{onClick:a,children:(0,Y.jsx)(W,{})}),(0,Y.jsxs)(N,{open:s,id:`${e}-result-details`,onClose:o,anchorEl:n,anchorOrigin:{vertical:`bottom`,horizontal:-320},slotProps:{paper:{sx:{borderRadius:`${t.shape.borderRadiusLarge}px`,padding:t.spacing(3)}}},children:[(0,Y.jsx)(L,{variant:`subtitle2`,sx:{mb:3},children:e[0].environment}),(0,Y.jsx)(Dn,{features:e})]})]})]})},jn=({features:e})=>{let t=Object.keys(e),n=e[t[0]],r=n[0].context,i=(0,J.useMemo)(()=>n.map((n,r)=>({...Object.fromEntries(t.map(t=>[t,e[t][r]]))})),[JSON.stringify(e)]),a=C(),o=p({columns:(0,J.useMemo)(()=>{let e=Object.keys(r).map(e=>a.accessor(n=>n[t[0]].context[e],{id:`context_${e}`,header:K(e),cell:({getValue:e})=>(0,Y.jsx)(E,{value:String(e()??``)}),meta:{minWidth:160}})),n=t.map(e=>a.accessor(t=>t[e]?.isEnabled?`true`:t[e]?.strategies?.result===`unknown`?`unknown`:`false`,{id:e,header:e,cell:({row:t})=>(0,Y.jsxs)(R,{sx:{display:`flex`},children:[(0,Y.jsx)(qt,{feature:t.original[e]}),(0,Y.jsx)(yn,{feature:t.original[e],input:{environment:t.original[e].environment,context:t.original[e].context}})]}),sortingFn:Ae.playgroundResultState,meta:{maxWidth:140}}));return[...e,...n]},[]),data:i,getCoreRowModel:s(),getSortedRowModel:d(),getFilteredRowModel:S(),autoResetAll:!1,enableSortingRemoval:!1,enableMultiSort:!1}),c=(0,J.useRef)(null);return(0,Y.jsx)(R,{ref:c,sx:{overflow:`auto`,maxHeight:`800px`},children:(0,Y.jsx)(H,{parentRef:c,tableInstance:o})})},Mn=o(`div`,{})(({theme:e})=>({flexGrow:0,...le,justifyContent:`flex-start`,margin:e.spacing(0,1.5)})),Nn=o(z)(({theme:e})=>({textAlign:`left`,textDecorationStyle:`dotted`,textDecorationLine:`underline`,textUnderlineOffset:e.spacing(.75),color:e.palette.neutral.dark,padding:0,fontWeight:`normal`})),Pn=({value:e})=>{let t=i(),[n,r]=(0,J.useState)(null);return(0,Y.jsx)(Mn,{children:(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(Nn,{variant:`text`,onClick:e=>r(e.currentTarget),children:`View diff`}),(0,Y.jsxs)(N,{open:!!n,id:`${e}-result-details`,onClose:()=>r(null),anchorEl:n,anchorOrigin:{vertical:`bottom`,horizontal:-320},slotProps:{paper:{sx:{borderRadius:`${t.shape.borderRadiusLarge}px`,padding:t.spacing(3)}}},children:[(0,Y.jsx)(L,{variant:`subtitle2`,sx:{mb:3},children:`Environments diff`}),(0,Y.jsx)(jn,{features:e})]})]})})},Fn=e=>e.reduce((e,t)=>e+Object.values(t.environments).flatMap(e=>Object.keys(e)).length,0),In=e=>e<0?`invalid bucket`:e>=2e4?`20000+`:e>=1e4?`10000-20000`:e>=1e3?`1000-10000`:e>=100?`100-1000`:`0-100`,{value:Ln,setValue:Rn}=fe(`AdvancedPlaygroundResultsTable:v1`,{id:`name`,desc:!1}),zn=({features:e,input:t,loading:r})=>{let{trackEvent:a}=ge();e&&a(`playground`,{props:{eventType:`number-of-combinations`,count:In(Fn(e))}});let[o,c]=n(),l=pe(r),[u,f]=(0,J.useState)(o.get(`search`)||``),m=A(i().breakpoints.down(`md`)),h=e&&e.length>0?Object.keys(e[0].environments).length:0,g=(0,J.useMemo)(()=>{let e=[{id:`name`,header:`Name`,accessorKey:`name`,cell:({getValue:e,row:{original:t}})=>(0,Y.jsx)(Be,{title:String(e()??``),to:`/projects/${t?.projectId}/features/${e()}`}),meta:{searchable:!0,minWidth:160}},{id:`projectId`,header:`Project ID`,accessorKey:`projectId`,sortingFn:`alphanumeric`,cell:({getValue:e})=>{let t=String(e()??``);return(0,Y.jsx)(Be,{title:t,to:`/projects/${t}`})},meta:{filterName:`projectId`,searchable:!0,minWidth:150}},...t?.environments?.map(e=>({id:`environments.${e}`,header:r?``:K(e),cell:({row:t})=>(0,Y.jsx)(An,{value:t.original.environments[e]}),meta:{maxWidth:150,align:`left`}}))||[]];return h>1&&e.push({id:`diff`,header:`Diff`,cell:({row:e})=>(0,Y.jsx)(Pn,{value:e.original.environments}),meta:{minWidth:150,align:`left`}}),e},[t,r]),{data:_,getSearchText:v,getSearchContext:y}=b(g,u,e||[]),x=(0,J.useMemo)(()=>r?[,,,,,].fill({name:`Feature name`,projectId:`Feature Project`,environments:{name:`Feature Environments`,variants:[]},enabled:!0}):_,[_,r]),[S]=(0,J.useState)(()=>({sorting:[{id:o.get(`sort`)||Ln.id,desc:o.has(`order`)?o.get(`order`)===`desc`:Ln.desc}]})),C=p({columns:g,data:x,initialState:S,defaultColumn:{cell:({getValue:e})=>(0,Y.jsx)(E,{value:String(e()??``)})},getCoreRowModel:s(),getSortedRowModel:d(),autoResetAll:!1,enableSortingRemoval:!1,enableMultiSort:!1});O([{condition:m,columns:[`projectId`]}],C.setColumnVisibility,g);let T=C.getState().sorting,D=C.getRowModel().rows;return(0,J.useEffect)(()=>{if(r)return;let e=T[0];if(!e)return;let t=Object.fromEntries(o);t.sort=e.id,e.desc?t.order=`desc`:t.order&&delete t.order,u?t.search=u:delete t.search,c(t,{replace:!0}),Rn({id:e.id,desc:e.desc||!1})},[r,T,u]),(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(R,{sx:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,mb:3},children:[(0,Y.jsx)(L,{variant:`subtitle1`,sx:{ml:1},children:e!==void 0&&!r?`Results (${D.length<x.length?`${D.length} of ${x.length}`:x.length})`:`Results`}),(0,Y.jsx)(w,{initialValue:u,onChange:f,hasFilters:!0,getSearchContext:y,disabled:r,containerStyles:{marginLeft:`1rem`,maxWidth:`400px`}})]}),(0,Y.jsx)(B,{condition:!r&&!x,show:()=>(0,Y.jsx)(k,{children:x===void 0?`None of the feature flags were evaluated yet.`:`No results found.`}),elseShow:()=>(0,Y.jsxs)(R,{ref:l,sx:{overflow:`auto`},children:[(0,Y.jsx)(te,{value:v(u),children:(0,Y.jsx)(H,{tableInstance:C})}),(0,Y.jsx)(B,{condition:x.length===0&&u?.length>0,show:(0,Y.jsxs)(k,{children:[`No feature flags found matching “`,u,`”`]})}),(0,Y.jsx)(B,{condition:x&&x.length===0&&!u,show:(0,Y.jsx)(k,{children:`No features flags to display`})})]})})]})},Bn=o(F)(({theme:e})=>({marginBottom:e.spacing(3)})),Vn=({response:e})=>{let t=e?.warnings?.invalidContextProperties;if(t&&t.length>0){t.sort();let e=o(`details`)(({theme:e})=>({"* + *":{marginBlockStart:e.spacing(1)}}));return(0,Y.jsx)(Bn,{severity:`warning`,children:(0,Y.jsxs)(e,{children:[(0,Y.jsx)(`summary`,{children:`Some context properties were not taken into account during evaluation`}),(0,Y.jsx)(`p`,{children:`The context you provided for this query contained top-level properties with invalid values. These properties were not taken into consideration when evaluating your query. The properties are:`}),(0,Y.jsx)(`ul`,{children:t.map(e=>(0,Y.jsx)(`li`,{"data-testid":`context-warning-list-element`,children:(0,Y.jsx)(`code`,{children:e})},e))}),(0,Y.jsxs)(`p`,{children:[`Remember that context fields (with the exception of the`,` `,(0,Y.jsx)(`code`,{children:`properties`}),` object) must be strings.`]}),(0,Y.jsx)(`p`,{children:`Because we didn't take these properties into account during the feature flag evaluation, they will not appear in the results table.`})]})})}else return null},Hn=({FormComponent:e=Ft})=>{let{value:t,setValue:r}=fe(`AdvancedPlayground:v1`,{projects:[],environments:[]}),{trackEvent:a}=ge(),{environments:o}=ce(),s=i(),[c,l]=(0,J.useState)(),[u,d]=(0,J.useState)(t.environments),[f,p]=(0,J.useState)(t.projects),[m,h]=(0,J.useState)(t.token),[g,_]=(0,J.useState)(t.context),[v,y]=(0,J.useState)(),{setToastData:b}=_e(),[x,S]=n(),[C,w]=(0,J.useState)(),{evaluateAdvancedPlayground:T,evaluateChangeRequestPlayground:E,loading:D,errors:ee}=tt(),[O,te]=(0,J.useState)(!1);(0,J.useEffect)(()=>{u?.length===0&&o.length>0&&d([yt(o)])},[JSON.stringify(u),JSON.stringify(o)]),(0,J.useEffect)(()=>{k()},[]);let k=async()=>{try{let e=A(),t=j(),n=ne();M(),N(),e&&n&&await P(e||[],t||`*`,n)}catch(e){b({type:`error`,text:`Failed to parse URL parameters: ${V(e)}`})}},A=()=>{let e=null,t=x.get(`environments`);return t&&(e=t.split(`,`),d(e)),e},j=()=>{let e=null,t=x.get(`projects`);return t&&(e=t.split(`,`),p(e)),e},ne=()=>{let e=x.get(`context`);return e&&(e=decodeURI(e),_(e)),e},M=()=>{let e=x.get(`token`);return e&&(e=decodeURI(e),h(e)),e},N=()=>{let e=x.get(`changeRequest`);e&&w(e)},P=async(e,t,n,r)=>{try{l(void 0);let i={appName:`playground`,...JSON.parse(n||`{}`)},a=C?await E(C,{context:i}):await T({environments:vt(e),projects:_t(t),context:i});r&&typeof r==`function`&&r(),y(a)}catch(e){e instanceof de?l(e.message):e instanceof SyntaxError?b({type:`error`,text:`Error parsing context: ${V(e)}`}):b({type:`error`,text:V(e)})}},F=()=>{let e=`default`;m&&m!==``?e=`api_token`:C&&(e=`change_request`),a(`playground`,{props:{eventType:`try-configuration`,mode:e}})},I=async e=>{e.preventDefault(),te(!0),F(),await P(u,f,g,()=>{z(),C||r({environments:u,projects:f,context:g})})},L=()=>{w(void 0)},z=()=>{x.set(`context`,encodeURI(g||``)),Array.isArray(u)&&u.length>0&&!(u.length===1&&u[0]===`*`)?x.set(`environments`,u.join(`,`)):x.delete(`projects`),Array.isArray(f)&&f.length>0&&!(f.length===1&&f[0]===`*`)?x.set(`projects`,f.join(`,`)):x.delete(`projects`),C?x.set(`changeRequest`,C):x.delete(`changeRequest`),S(x)},ie=xt(!0,v);return(0,Y.jsx)(he,{header:(0,Y.jsx)(me,{title:`Unleash playground`,actions:(0,Y.jsx)(Vt,{})}),disableLoading:!0,bodyClass:`no-padding`,children:(0,Y.jsxs)(R,{sx:{display:`flex`,flexDirection:`column`},children:[(0,Y.jsx)(R,{sx:{background:s.palette.background.elevation2,borderBottomLeftRadius:s.shape.borderRadiusMedium,isolation:`isolate`,zIndex:2},children:(0,Y.jsx)(re,{elevation:0,sx:{px:4,py:3,background:s.palette.background.elevation2,transition:`width 0.4s ease`,minWidth:`auto`,width:`auto`,position:`sticky`,top:0},children:(0,Y.jsx)(e,{onSubmit:I,context:g,setContext:_,availableEnvironments:o,projects:f,environments:u,token:m,setToken:h,setProjects:p,setEnvironments:d,changeRequest:C||void 0,onClearChangeRequest:L})})}),(0,Y.jsxs)(R,{sx:e=>({width:ie,transition:`width 0.4s ease`,padding:e.spacing(4,4),isolation:`isolate`,zIndex:1}),children:[(0,Y.jsx)(B,{condition:!!c,show:(0,Y.jsx)(Bn,{severity:`warning`,children:c})}),(0,Y.jsx)(B,{condition:D,show:(0,Y.jsx)(be,{}),elseShow:(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(B,{condition:!!v&&Object.values(ee).length===0,show:(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(Vn,{response:v}),(0,Y.jsx)(zn,{loading:D,features:v?.features,input:v?.input})]})}),(0,Y.jsx)(B,{condition:!v&&!O,show:(0,Y.jsx)(Rt,{})})]})})]})]})})};export{Hn as AdvancedPlayground,Hn as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e,t}from"./react-Ca03aNmg.js";import{t as n}from"./jsx-runtime-DYfQNk55.js";import{a as r,c as i,n as a,r as o,s,t as c}from"./capitalize-DfXJDj8P.js";import{n as l}from"./resolveProps-CAVsjga5.js";import{t as u}from"./styled-CY_-vLWk.js";import{t as d}from"./useSlot-Ce59-xJL.js";import{t as f}from"./createSvgIcon-D-6jHYkf.js";import{t as p}from"./Paper-BvPQ0Zq6.js";import{t as m}from"./createSimplePaletteValueFilter-Bt9IjErz.js";import{t as h}from"./IconButton-BveFD3PF.js";import{t as g}from"./Close-DKD1r3T7.js";var _=e(t(),1);function v(e){return i(`MuiAlert`,e)}var y=s(`MuiAlert`,[`root`,`action`,`icon`,`message`,`filled`,`colorSuccess`,`colorInfo`,`colorWarning`,`colorError`,`outlined`,`standard`]),b=n(),x=f((0,b.jsx)(`path`,{d:`M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z`}),`SuccessOutlined`),S=f((0,b.jsx)(`path`,{d:`M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z`}),`ReportProblemOutlined`),C=f((0,b.jsx)(`path`,{d:`M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z`}),`ErrorOutline`),w=f((0,b.jsx)(`path`,{d:`M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z`}),`InfoOutlined`),T=e=>{let{variant:t,color:n,severity:i,classes:a}=e;return r({root:[`root`,`color${c(n||i)}`,`${t}`],icon:[`icon`],message:[`message`],action:[`action`]},v,a)},E=u(p,{name:`MuiAlert`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant]]}})(o(({theme:e})=>{let t=e.palette.mode===`light`?e.darken:e.lighten,n=e.palette.mode===`light`?e.lighten:e.darken;return{...e.typography.body2,backgroundColor:`transparent`,display:`flex`,padding:`6px 16px`,variants:[...Object.entries(e.palette).filter(m([`light`])).map(([r])=>({props:{colorSeverity:r,variant:`standard`},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),backgroundColor:e.vars?e.vars.palette.Alert[`${r}StandardBg`]:n(e.palette[r].light,.9),[`& .${y.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(m([`light`])).map(([n])=>({props:{colorSeverity:n,variant:`outlined`},style:{color:e.vars?e.vars.palette.Alert[`${n}Color`]:t(e.palette[n].light,.6),border:`1px solid ${(e.vars||e).palette[n].light}`,[`& .${y.icon}`]:e.vars?{color:e.vars.palette.Alert[`${n}IconColor`]}:{color:e.palette[n].main}}})),...Object.entries(e.palette).filter(m([`dark`])).map(([t])=>({props:{colorSeverity:t,variant:`filled`},style:{fontWeight:e.typography.fontWeightMedium,...e.vars?{color:e.vars.palette.Alert[`${t}FilledColor`],backgroundColor:e.vars.palette.Alert[`${t}FilledBg`]}:{backgroundColor:e.palette.mode===`dark`?e.palette[t].dark:e.palette[t].main,color:e.palette.getContrastText(e.palette[t].main)}}}))]}})),D=u(`div`,{name:`MuiAlert`,slot:`Icon`})({marginRight:12,padding:`7px 0`,display:`flex`,fontSize:22,opacity:.9}),O=u(`div`,{name:`MuiAlert`,slot:`Message`})({padding:`8px 0`,minWidth:0,overflow:`auto`}),k=u(`div`,{name:`MuiAlert`,slot:`Action`})({display:`flex`,alignItems:`flex-start`,padding:`4px 0 0 16px`,marginLeft:`auto`,marginRight:-8}),A={success:(0,b.jsx)(x,{fontSize:`inherit`}),warning:(0,b.jsx)(S,{fontSize:`inherit`}),error:(0,b.jsx)(C,{fontSize:`inherit`}),info:(0,b.jsx)(w,{fontSize:`inherit`})},j=_.forwardRef(function(e,t){let n=a({props:e,name:`MuiAlert`}),{action:r,children:i,className:o,closeText:s=`Close`,color:c,icon:u,iconMapping:f=A,onClose:p,role:m=`alert`,severity:_=`success`,slotProps:v={},slots:y={},variant:x=`standard`,...S}=n,C={...n,color:c,severity:_,variant:x,colorSeverity:c||_},w=T(C),j={slots:y,slotProps:v},[M,N]=d(`root`,{ref:t,shouldForwardComponentProp:!0,className:l(w.root,o),elementType:E,externalForwardedProps:{...j,...S},ownerState:C,additionalProps:{role:m,elevation:0}}),[P,F]=d(`icon`,{className:w.icon,elementType:D,externalForwardedProps:j,ownerState:C}),[I,L]=d(`message`,{className:w.message,elementType:O,externalForwardedProps:j,ownerState:C}),[R,z]=d(`action`,{className:w.action,elementType:k,externalForwardedProps:j,ownerState:C}),[B,V]=d(`closeButton`,{elementType:h,externalForwardedProps:j,ownerState:C}),[H,U]=d(`closeIcon`,{elementType:g,externalForwardedProps:j,ownerState:C});return(0,b.jsxs)(M,{...N,children:[u===!1?null:(0,b.jsx)(P,{...F,children:u||f[_]||A[_]}),(0,b.jsx)(I,{...L,children:i}),r==null?null:(0,b.jsx)(R,{...z,children:r}),r==null&&p?(0,b.jsx)(R,{...z,children:(0,b.jsx)(B,{size:`small`,"aria-label":s,title:s,color:`inherit`,onClick:p,...V,children:(0,b.jsx)(H,{fontSize:`small`,...U})})}):null]})});export{j as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e,t}from"./react-Ca03aNmg.js";import{t as n}from"./jsx-runtime-DYfQNk55.js";import{a as r,c as i,n as a,r as o,s}from"./capitalize-DfXJDj8P.js";import{n as c}from"./resolveProps-CAVsjga5.js";import{t as l}from"./styled-CY_-vLWk.js";import{t as u}from"./useSlot-Ce59-xJL.js";import{t as d}from"./createSvgIcon-D-6jHYkf.js";var f=e(t(),1),p=n(),m=d((0,p.jsx)(`path`,{d:`M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z`}),`Person`);function h(e){return i(`MuiAvatar`,e)}s(`MuiAvatar`,[`root`,`colorDefault`,`circular`,`rounded`,`square`,`img`,`fallback`]);var g=e=>{let{classes:t,variant:n,colorDefault:i}=e;return r({root:[`root`,n,i&&`colorDefault`],img:[`img`],fallback:[`fallback`]},h,t)},_=l(`div`,{name:`MuiAvatar`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],n.colorDefault&&t.colorDefault]}})(o(({theme:e})=>({position:`relative`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0,width:40,height:40,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(20),lineHeight:1,borderRadius:`50%`,overflow:`hidden`,userSelect:`none`,variants:[{props:{variant:`rounded`},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:{variant:`square`},style:{borderRadius:0}},{props:{colorDefault:!0},style:{color:(e.vars||e).palette.background.default,"@media (forced-colors: active)":{boxSizing:`border-box`,border:`1px solid ButtonBorder`},...e.vars?{backgroundColor:e.vars.palette.Avatar.defaultBg}:{backgroundColor:e.palette.grey[400],...e.applyStyles(`dark`,{backgroundColor:e.palette.grey[600]})}}}]}))),v=l(`img`,{name:`MuiAvatar`,slot:`Img`})({width:`100%`,height:`100%`,textAlign:`center`,objectFit:`cover`,color:`transparent`,textIndent:1e4}),y=l(m,{name:`MuiAvatar`,slot:`Fallback`})({width:`75%`,height:`75%`});function b(e,t,n,r){let[i,a]=f.useState(!1);return f.useEffect(()=>{if(!e&&!t)return;a(!1);let i=!0,o=new Image;return o.onload=()=>{i&&a(`loaded`)},o.onerror=()=>{i&&a(`error`)},o.crossOrigin=n,o.referrerPolicy=r,o.src=e,t&&(o.srcset=t),()=>{i=!1}},[n,r,e,t]),i}var x=f.forwardRef(function(e,t){let n=a({props:e,name:`MuiAvatar`}),{alt:r,children:i,className:o,component:s=`div`,slots:l={},slotProps:d={},sizes:f,src:m,srcSet:h,variant:x=`circular`,...S}=n,C=null,w={...n,component:s,variant:x},{crossOrigin:T,referrerPolicy:E}=(typeof d.img==`function`?d.img(w):d.img)??{},D=b(m,h,T,E),O=m||h,k=O&&D!==`error`;w.colorDefault=!k,delete w.ownerState;let A=g(w),j={slots:l,slotProps:d},[M,N]=u(`root`,{ref:t,className:c(A.root,o),elementType:_,externalForwardedProps:{...j,component:s,...S},ownerState:w}),[P,F]=u(`img`,{className:A.img,elementType:v,externalForwardedProps:j,additionalProps:{alt:r,src:m,srcSet:h,sizes:f},ownerState:w}),[I,L]=u(`fallback`,{className:A.fallback,elementType:y,externalForwardedProps:j,shouldForwardComponentProp:!0,ownerState:w});return C=k?(0,p.jsx)(P,{...F}):i||i===0?i:O&&r?r[0]:(0,p.jsx)(I,{...L}),(0,p.jsx)(M,{...N,children:C})});export{x as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./jsx-runtime-DYfQNk55.js";import{t}from"./styled-CY_-vLWk.js";import{t as n}from"./Alert-DQgOzmJF.js";import{t as r}from"./Typography-nCkGT67u.js";import{t as i}from"./Box-rSzdGLLJ.js";import{t as a}from"./Tooltip-DPzrXyNS.js";import{t as o}from"./ConditionallyRender-CEffh9Z-.js";import{t as s}from"./useUiConfig-BcfEDPWc.js";import{t as c}from"./usePageTitle-DD1IHvCw.js";import{t as l}from"./HelpOutlineOutlined-HDH1hus2.js";import{Gt as u,cn as d,fn as f,in as p,mn as m,nn as h,pn as g,rn as _}from"./index-C2zVj2FI.js";import{a as v,i as y,l as b,n as x,o as S,t as C,u as w}from"./networkTrafficUsageHighlightPlugin-DPi6id5j.js";import{t as T}from"./chartjs-plugin-annotation.esm-tsR8Pv5a.js";var E=e(),D=t(i)(({theme:e})=>({display:`flex`,alignItems:`center`,gap:e.spacing(.5)})),O=()=>{c(`Network - Backend Connections`);let{isOss:e}=s(),{chartDataSelection:t,setChartDataSelection:d,options:f}=x(),{chartData:p}=S(t);return(0,E.jsx)(o,{condition:e(),show:(0,E.jsx)(n,{severity:`warning`,children:`Not enabled.`}),elseShow:(0,E.jsx)(E.Fragment,{children:(0,E.jsxs)(y,{children:[(0,E.jsxs)(v,{children:[(0,E.jsx)(i,{children:(0,E.jsx)(n,{severity:`info`,icon:!1,children:(0,E.jsxs)(D,{children:[(0,E.jsx)(r,{children:`1 connection = 7200 backend SDK requests per day`}),(0,E.jsx)(a,{title:`1 connection involves polling every 15 seconds and sending metrics every 60 seconds. This translates to 5 requests per minute, 300 requests per hour, and 7200 requests per day.`,children:(0,E.jsx)(l,{})})]})})}),(0,E.jsx)(w,{selectedPeriod:t,setPeriod:d})]}),(0,E.jsx)(u,{data:p,plugins:[C],options:f,"aria-label":b(t)})]})})})};p.register(T,_,d,h,g,m,f);export{O as BackendConnections,O as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{B as e,r as t}from"./useTheme-CTychWp2.js";import{l as n,s as r}from"./capitalize-DfXJDj8P.js";import{t as i}from"./createBox-DaDvp7MB.js";var a=r(`MuiBox`,[`root`]),o=i({themeId:e,defaultTheme:t(),defaultClassName:a.root,generateClassName:n.generate});export{o as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e,t}from"./react-Ca03aNmg.js";import{t as n}from"./jsx-runtime-DYfQNk55.js";import{a as r,c as i,n as a,r as o,s,t as c}from"./capitalize-DfXJDj8P.js";import{n as l,t as u}from"./resolveProps-CAVsjga5.js";import{n as d,t as f}from"./styled-CY_-vLWk.js";import{c as p,f as m}from"./useTimeout-B2sc1jSE.js";import{n as h,t as g}from"./CircularProgress-CmGBJn6I.js";import{t as _}from"./createSimplePaletteValueFilter-Bt9IjErz.js";var v=e(t(),1);function y(e){return i(`MuiButton`,e)}var b=s(`MuiButton`,`root.text.outlined.contained.disableElevation.focusVisible.disabled.colorInherit.colorPrimary.colorSecondary.colorSuccess.colorError.colorInfo.colorWarning.sizeMedium.sizeSmall.sizeLarge.fullWidth.startIcon.endIcon.icon.loading.loadingWrapper.loadingIconPlaceholder.loadingIndicator.loadingPositionCenter.loadingPositionStart.loadingPositionEnd`.split(`.`)),x=v.createContext({}),S=v.createContext(void 0),C=n(),w=e=>{let{color:t,disableElevation:n,fullWidth:i,size:a,variant:o,loading:s,loadingPosition:l,classes:u}=e,d=r({root:[`root`,s&&`loading`,o,`size${c(a)}`,`color${c(t)}`,n&&`disableElevation`,i&&`fullWidth`,s&&`loadingPosition${c(l)}`],startIcon:[`icon`,`startIcon`],endIcon:[`icon`,`endIcon`],loadingIndicator:[`loadingIndicator`],loadingWrapper:[`loadingWrapper`]},y,u);return{...u,...d}},T=[{props:{size:`small`},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:`medium`},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:`large`},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],E=f(h,{shouldForwardProp:e=>d(e)||e===`classes`,name:`MuiButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`size${c(n.size)}`],n.color===`inherit`&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(o(({theme:e})=>{let t=e.palette.mode===`light`?e.palette.grey[300]:e.palette.grey[800],n=e.palette.mode===`light`?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:`6px 16px`,border:0,borderRadius:(e.vars||e).shape.borderRadius,...m(e,[`background-color`,`box-shadow`,`border-color`,`color`],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:`none`},[`&.${b.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:`contained`},style:{color:`var(--variant-containedColor)`,backgroundColor:`var(--variant-containedBg)`,boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${b.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${b.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:`outlined`},style:{padding:`5px 15px`,border:`1px solid currentColor`,borderColor:`var(--variant-outlinedBorder, currentColor)`,backgroundColor:`var(--variant-outlinedBg)`,color:`var(--variant-outlinedColor)`,[`&.${b.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:`text`},style:{padding:`6px 8px`,color:`var(--variant-textColor)`,backgroundColor:`var(--variant-textBg)`}},...Object.entries(e.palette).filter(_()).map(([t])=>({props:{color:t},style:{"--variant-textColor":(e.vars||e).palette[t].main,"--variant-outlinedColor":(e.vars||e).palette[t].main,"--variant-outlinedBorder":e.alpha((e.vars||e).palette[t].main,.5),"--variant-containedColor":(e.vars||e).palette[t].contrastText,"--variant-containedBg":(e.vars||e).palette[t].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[t].dark,"--variant-textBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[t].main,"--variant-outlinedBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}}})),{props:{color:`inherit`},style:{color:`inherit`,borderColor:`currentColor`,"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity)}}}},{props:{size:`small`,variant:`text`},style:{padding:`4px 5px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`text`},style:{padding:`8px 11px`,fontSize:e.typography.pxToRem(15)}},{props:{size:`small`,variant:`outlined`},style:{padding:`3px 9px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`outlined`},style:{padding:`7px 21px`,fontSize:e.typography.pxToRem(15)}},{props:{size:`small`,variant:`contained`},style:{padding:`4px 10px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`contained`},style:{padding:`8px 22px`,fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:`none`,"&:hover":{boxShadow:`none`},[`&.${b.focusVisible}`]:{boxShadow:`none`},"&:active":{boxShadow:`none`},[`&.${b.disabled}`]:{boxShadow:`none`}}},{props:{fullWidth:!0},style:{width:`100%`}},{props:{loadingPosition:`center`},style:{...m(e,[`background-color`,`box-shadow`,`border-color`],{duration:e.transitions.duration.short}),[`&.${b.loading}`]:{color:`transparent`}}}]}})),D=f(`span`,{name:`MuiButton`,slot:`StartIcon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart]}})(({theme:e})=>({display:`inherit`,alignItems:`center`,marginRight:8,marginLeft:-4,"&::before":{content:`"\\200b"`,width:0,overflow:`hidden`},variants:[{props:{size:`small`},style:{marginLeft:-2}},{props:{loadingPosition:`start`,loading:!0},style:{...m(e,[`opacity`],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:`start`,loading:!0,fullWidth:!0},style:{marginRight:-8}},...T]})),O=f(`span`,{name:`MuiButton`,slot:`EndIcon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd]}})(({theme:e})=>({display:`inherit`,marginRight:-4,marginLeft:8,variants:[{props:{size:`small`},style:{marginRight:-2}},{props:{loadingPosition:`end`,loading:!0},style:{...m(e,[`opacity`],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:`end`,loading:!0,fullWidth:!0},style:{marginLeft:-8}},...T]})),k=f(`span`,{name:`MuiButton`,slot:`LoadingIndicator`})(({theme:e})=>({display:`none`,position:`absolute`,visibility:`visible`,variants:[{props:{loading:!0},style:{display:`flex`}},{props:{loadingPosition:`start`},style:{left:14}},{props:{loadingPosition:`start`,size:`small`},style:{left:10}},{props:{variant:`text`,loadingPosition:`start`},style:{left:6}},{props:{loadingPosition:`center`},style:{left:`50%`,transform:`translate(-50%)`,color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:`end`},style:{right:14}},{props:{loadingPosition:`end`,size:`small`},style:{right:10}},{props:{variant:`text`,loadingPosition:`end`},style:{right:6}},{props:{loadingPosition:`start`,fullWidth:!0},style:{position:`relative`,left:-10}},{props:{loadingPosition:`end`,fullWidth:!0},style:{position:`relative`,right:-10}}]})),A=f(`span`,{name:`MuiButton`,slot:`LoadingIconPlaceholder`})({display:`inline-block`,width:`1em`,height:`1em`}),j=v.forwardRef(function(e,t){let n=v.useContext(x),r=v.useContext(S),i=a({props:u(n,e),name:`MuiButton`}),{children:o,color:s=`primary`,component:c=`button`,className:d,disabled:f=!1,disableElevation:m=!1,disableFocusRipple:h=!1,endIcon:_,focusVisibleClassName:y,fullWidth:b=!1,id:T,loading:j=null,loadingIndicator:M,loadingPosition:N=`center`,size:P=`medium`,startIcon:F,type:I,variant:L=`text`,...R}=i,z=p(T),B=M??(0,C.jsx)(g,{"aria-labelledby":z,color:`inherit`,size:16}),V={...i,color:s,component:c,disabled:f,disableElevation:m,disableFocusRipple:h,fullWidth:b,loading:j,loadingIndicator:B,loadingPosition:N,size:P,type:I,variant:L},H=w(V),U=(F||j&&N===`start`)&&(0,C.jsx)(D,{className:H.startIcon,ownerState:V,children:F||(0,C.jsx)(A,{className:H.loadingIconPlaceholder,ownerState:V})}),W=(_||j&&N===`end`)&&(0,C.jsx)(O,{className:H.endIcon,ownerState:V,children:_||(0,C.jsx)(A,{className:H.loadingIconPlaceholder,ownerState:V})}),G=r||``,K=typeof j==`boolean`?(0,C.jsx)(`span`,{className:H.loadingWrapper,style:{display:`contents`},children:j&&(0,C.jsx)(k,{className:H.loadingIndicator,ownerState:V,children:B})}):null,{root:q,...J}=H;return(0,C.jsxs)(E,{ownerState:V,className:l(n.className,H.root,d,G),component:c,disabled:f||j,focusRipple:!h,focusVisibleClassName:l(H.focusVisible,y),ref:t,internalNativeButton:!0,type:I,id:j?z:T,...R,classes:J,children:[U,N!==`end`&&K,o,N===`end`&&K,W]})});export{j as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./jsx-runtime-DYfQNk55.js";import{t}from"./styled-CY_-vLWk.js";import{t as n}from"./Button-yGjgMTJI.js";var r=e(),i={title:`Theme / Button`,background:`application`},a=t(`div`)(({theme:e})=>({display:`flex`,alignItems:`center`,gap:e.spacing(2),flexWrap:`wrap`})),o=()=>(0,r.jsxs)(a,{children:[(0,r.jsx)(n,{variant:`text`,children:`Text`}),(0,r.jsx)(n,{variant:`outlined`,children:`Outlined`}),(0,r.jsx)(n,{variant:`contained`,children:`Contained`})]}),s=()=>(0,r.jsxs)(a,{children:[(0,r.jsx)(n,{size:`small`,variant:`text`,children:`Text`}),(0,r.jsx)(n,{size:`small`,variant:`outlined`,children:`Outlined`}),(0,r.jsx)(n,{size:`small`,variant:`contained`,children:`Contained`})]}),c=()=>(0,r.jsxs)(a,{children:[(0,r.jsx)(n,{size:`medium`,variant:`text`,children:`Text`}),(0,r.jsx)(n,{size:`medium`,variant:`outlined`,children:`Outlined`}),(0,r.jsx)(n,{size:`medium`,variant:`contained`,children:`Contained`})]}),l=()=>(0,r.jsxs)(a,{children:[(0,r.jsx)(n,{size:`large`,variant:`text`,children:`Text`}),(0,r.jsx)(n,{size:`large`,variant:`outlined`,children:`Outlined`}),(0,r.jsx)(n,{size:`large`,variant:`contained`,children:`Contained`})]}),u=()=>(0,r.jsxs)(a,{children:[(0,r.jsx)(n,{disabled:!0,variant:`text`,children:`Text`}),(0,r.jsx)(n,{disabled:!0,variant:`outlined`,children:`Outlined`}),(0,r.jsx)(n,{disabled:!0,variant:`contained`,children:`Contained`})]});export{o as Default,u as Disabled,l as Large,c as Medium,s as Small,i as meta};
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import{o as e,t}from"./react-Ca03aNmg.js";import{A as n,j as r,t as i}from"./useTheme-CTychWp2.js";import{t as a}from"./jsx-runtime-DYfQNk55.js";import{a as o,c as s,n as c,r as l,s as u,t as d}from"./capitalize-DfXJDj8P.js";import{n as f}from"./resolveProps-CAVsjga5.js";import{t as p}from"./styled-CY_-vLWk.js";import{a as m,f as h,g,i as _,l as v,n as y,o as b,r as x,s as S}from"./useTimeout-B2sc1jSE.js";import{t as C}from"./createSimplePaletteValueFilter-Bt9IjErz.js";var w=e(t(),1);function T(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return w.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||s)&&(e.disabled=n),e},[r,n,t,o,s,a,i])}var E={};function D(e){let{nativeButton:t,nativeButtonProp:n,internalNativeButton:r=t,allowInferredHostMismatch:i=!1,disabled:a,type:o,hasFormAction:s=!1,tabIndex:c=0,focusableWhenDisabled:l,stopEventPropagation:u=!1,onBeforeKeyDown:d,onBeforeKeyUp:f}=e,p=w.useRef(null),m=l===!0,h=T({focusableWhenDisabled:m,disabled:a,isNativeButton:t,tabIndex:c}),g=w.useCallback(()=>{let e=p.current;return e==null?t:e.tagName===`BUTTON`?!0:!!(e.tagName===`A`&&e.href)},[t]),_=w.useMemo(()=>{let e=m?{}:{tabIndex:a?-1:c};return t?(e.type=o===void 0&&!s?`button`:o,m||(e.disabled=a)):(e.role=`button`,!m&&a&&(e[`aria-disabled`]=a)),m?{...e,...h}:e},[a,m,h,s,t,c,o]);return{getButtonProps:w.useCallback((e=E)=>{let{onClick:t,onKeyDown:n,onKeyUp:r,...i}=e,o=e=>{if(u&&e.stopPropagation(),a){e.preventDefault();return}t?.(e)},s=e=>{if(m&&h.onKeyDown(e),!a&&(d?.(e),n?.(e),!(e.target!==e.currentTarget||g()))){if(e.key===` `){e.preventDefault();return}e.key===`Enter`&&(e.preventDefault(),e.currentTarget.click())}},c=e=>{a||(f?.(e),r?.(e),e.target===e.currentTarget&&!g()&&e.key===` `&&!e.defaultPrevented&&e.currentTarget.click())};return{..._,...i,onClick:o,onKeyDown:s,onKeyUp:c}},[_,a,m,h,g,d,f,u]),rootRef:p}}var O=class e{static create(){return new e}static use(){let t=b(e.create).current,[n,r]=w.useState(!1);return t.shouldMount=n,t.setShouldMount=r,w.useEffect(t.mountEffect,[n]),t}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=A(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())};start(...e){this.mount().then(()=>this.ref.current?.start(...e))}stop(...e){this.mount().then(()=>this.ref.current?.stop(...e))}pulsate(...e){this.mount().then(()=>this.ref.current?.pulsate(...e))}};function k(){return O.use()}function A(){let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n}var j=a();function M(e){let{className:t,classes:n,pulsate:r=!1,rippleX:i,rippleY:a,rippleSize:o,in:s,onExited:c,timeout:l}=e,[u,d]=w.useState(!1),p=y(),m=w.useRef(!1),h=w.useRef(c);h.current=c;let g=c!=null,_=f(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),v={width:o,height:o,top:-(o/2)+a,left:-(o/2)+i},b=f(n.child,u&&n.childLeaving,r&&n.childPulsate);return!s&&!u&&d(!0),w.useEffect(()=>{!s&&g?m.current||(m.current=!0,p.start(l,()=>{m.current=!1,h.current?.()})):(m.current=!1,p.clear())},[p,g,s,l]),(0,j.jsx)(`span`,{className:_,style:v,children:(0,j.jsx)(`span`,{className:b})})}var N=u(`MuiTouchRipple`,[`root`,`ripple`,`rippleVisible`,`ripplePulsate`,`child`,`childLeaving`,`childPulsate`]),P=550,F={},I=[],ee=()=>{};function L(e,t){let n=new Set(t),r=new Map,i=[];for(let t of e)n.has(t)?i.length>0&&(r.set(t,i),i=[]):i.push(t);let a=[];for(let e of t){let t=r.get(e);t&&a.push(...t),a.push(e)}return a.push(...i),a}function te({event:e,element:t,center:n}){let r=t?t.getBoundingClientRect():{width:0,height:0,left:0,top:0},i,a;if(n||e===void 0||e.clientX===0&&e.clientY===0||!e.clientX&&!e.touches)i=Math.round(r.width/2),a=Math.round(r.height/2);else{let{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;i=Math.round(t-r.left),a=Math.round(n-r.top)}let o;if(n)o=Math.sqrt((2*r.width**2+r.height**2)/3),o%2==0&&(o+=1);else{let e=Math.max(Math.abs((t?t.clientWidth:0)-i),i)*2+2,n=Math.max(Math.abs((t?t.clientHeight:0)-a),a)*2+2;o=Math.sqrt(e**2+n**2)}return{rippleX:i,rippleY:a,rippleSize:o}}var R=r`
|
|
2
|
+
0% {
|
|
3
|
+
transform: scale(0);
|
|
4
|
+
opacity: 0.1;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
100% {
|
|
8
|
+
transform: scale(1);
|
|
9
|
+
opacity: 0.3;
|
|
10
|
+
}
|
|
11
|
+
`,z=r`
|
|
12
|
+
0% {
|
|
13
|
+
opacity: 1;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
100% {
|
|
17
|
+
opacity: 0;
|
|
18
|
+
}
|
|
19
|
+
`,ne=r`
|
|
20
|
+
0% {
|
|
21
|
+
transform: scale(1);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
50% {
|
|
25
|
+
transform: scale(0.92);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
100% {
|
|
29
|
+
transform: scale(1);
|
|
30
|
+
}
|
|
31
|
+
`;function re(e){if(e.motion.reducedMotion===`always`)return null;let t=n`
|
|
32
|
+
&.${N.rippleVisible} {
|
|
33
|
+
animation-name: ${R};
|
|
34
|
+
animation-duration: ${P}ms;
|
|
35
|
+
animation-timing-function: ${e.transitions.easing.easeInOut};
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&.${N.ripplePulsate} {
|
|
39
|
+
animation-duration: ${e.transitions.duration.shorter}ms;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
& .${N.childLeaving} {
|
|
43
|
+
animation-name: ${z};
|
|
44
|
+
animation-duration: ${P}ms;
|
|
45
|
+
animation-timing-function: ${e.transitions.easing.easeInOut};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
& .${N.childPulsate} {
|
|
49
|
+
animation-name: ${ne};
|
|
50
|
+
animation-duration: 2500ms;
|
|
51
|
+
animation-timing-function: ${e.transitions.easing.easeInOut};
|
|
52
|
+
animation-iteration-count: infinite;
|
|
53
|
+
animation-delay: 200ms;
|
|
54
|
+
}
|
|
55
|
+
`;return e.motion.reducedMotion===`system`?n`
|
|
56
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
57
|
+
${t}
|
|
58
|
+
}
|
|
59
|
+
`:t}var B=p(`span`,{name:`MuiTouchRipple`,slot:`Root`})({overflow:`hidden`,pointerEvents:`none`,position:`absolute`,zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:`inherit`}),V=p(M,{name:`MuiTouchRipple`,slot:`Ripple`})`
|
|
60
|
+
opacity: 0;
|
|
61
|
+
position: absolute;
|
|
62
|
+
|
|
63
|
+
&.${N.rippleVisible} {
|
|
64
|
+
opacity: 0.3;
|
|
65
|
+
transform: scale(1);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/*
|
|
69
|
+
* Order matters: 'child', 'childLeaving' and 'childPulsate' apply to the same
|
|
70
|
+
* element with equal specificity, so the later rule wins. 'child' must come
|
|
71
|
+
* before 'childLeaving' so the leaving 'opacity: 0' takes precedence. A focus
|
|
72
|
+
* (pulsate) ripple keeps 'pulsateKeyframe' (no opacity animation) on exit, so
|
|
73
|
+
* it relies on this static 'opacity: 0' to disappear on blur instead of
|
|
74
|
+
* lingering until removal.
|
|
75
|
+
*/
|
|
76
|
+
& .${N.child} {
|
|
77
|
+
opacity: 1;
|
|
78
|
+
display: block;
|
|
79
|
+
width: 100%;
|
|
80
|
+
height: 100%;
|
|
81
|
+
border-radius: 50%;
|
|
82
|
+
background-color: currentColor;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
& .${N.childLeaving} {
|
|
86
|
+
opacity: 0;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
& .${N.childPulsate} {
|
|
90
|
+
position: absolute;
|
|
91
|
+
/* @noflip */
|
|
92
|
+
left: 0px;
|
|
93
|
+
top: 0;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
${({theme:e})=>re(e)}
|
|
97
|
+
`,ie=w.forwardRef(function(e,t){let n=c({props:e,name:`MuiTouchRipple`}),r=m(i().motion.reducedMotion,!1),{center:a=!1,classes:o=F,className:s,...l}=n,[u,d]=w.useState({items:I,order:I}),p=u.items,h=w.useRef(0),g=w.useRef(null),_=w.useRef(!1);x(()=>(_.current=!0,()=>{_.current=!1})),w.useEffect(()=>{g.current&&=(g.current(),null)},[p]);let v=w.useRef(!1),b=y(),C=w.useRef(null),T=w.useRef(null),E=S(e=>{_.current&&d(t=>{let n=t.items.filter(t=>t.key!==e);return{items:n,order:L(t.order.filter(t=>t!==e),n.filter(e=>!e.exiting).map(e=>e.key))}})}),D=S(e=>{let{pulsate:t,rippleX:n,rippleY:r,rippleSize:i,cb:a}=e,o=h.current;h.current+=1,d(e=>{let a=[...e.items,{key:o,pulsate:t,rippleX:n,rippleY:r,rippleSize:i,exiting:!1}];return{items:a,order:L(e.order,a.filter(e=>!e.exiting).map(e=>e.key))}}),g.current=a}),O=S((e=F,t=F,n=ee)=>{let{pulsate:r=!1,center:i=a||t.pulsate,fakeElement:o=!1}=t;if(e?.type===`mousedown`&&v.current){v.current=!1;return}e?.type===`touchstart`&&(v.current=!0);let{rippleX:s,rippleY:c,rippleSize:l}=te({event:e,element:o?null:T.current,center:i});e?.touches?C.current===null&&(C.current=()=>{D({pulsate:r,rippleX:s,rippleY:c,rippleSize:l,cb:n})},b.start(80,()=>{C.current&&=(C.current(),null)})):D({pulsate:r,rippleX:s,rippleY:c,rippleSize:l,cb:n})}),k=S(()=>{O(F,{pulsate:!0})}),A=S((e,t)=>{if(b.clear(),e?.type===`touchend`&&C.current){C.current(),C.current=null,b.start(0,()=>{A(e,t)});return}C.current=null,d(e=>{let t=e.items.findIndex(e=>!e.exiting);if(t===-1)return e;let n=e.items.slice();return n[t]={...n[t],exiting:!0},{items:n,order:L(e.order,n.filter(e=>!e.exiting).map(e=>e.key))}}),g.current=t});w.useImperativeHandle(t,()=>({pulsate:k,start:O,stop:A}),[k,O,A]);let M=new Map(p.map(e=>[e.key,e])),R=u.order.map(e=>M.get(e)).filter(Boolean);return(0,j.jsx)(B,{className:f(N.root,o.root,s),ref:T,...l,children:R.map(e=>(0,j.jsx)(V,{classes:{ripple:f(o.ripple,N.ripple),rippleVisible:f(o.rippleVisible,N.rippleVisible),ripplePulsate:f(o.ripplePulsate,N.ripplePulsate),child:f(o.child,N.child),childLeaving:f(o.childLeaving,N.childLeaving),childPulsate:f(o.childPulsate,N.childPulsate)},timeout:r.shouldReduceMotion?0:P,pulsate:e.pulsate,rippleX:e.rippleX,rippleY:e.rippleY,rippleSize:e.rippleSize,in:!e.exiting,onExited:()=>E(e.key)},e.key))})});function H(e){return s(`MuiButtonBase`,e)}var U=u(`MuiButtonBase`,[`root`,`disabled`,`focusVisible`]),ae=e=>{let{disabled:t,focusVisible:n,focusVisibleClassName:r,suppressFocusVisible:i,classes:a}=e,s=o({root:[`root`,t&&`disabled`,n&&!i&&`focusVisible`]},H,a);return n&&!i&&r&&(s.root+=` ${r}`),s},oe=p(`button`,{name:`MuiButtonBase`,slot:`Root`})({display:`inline-flex`,alignItems:`center`,justifyContent:`center`,position:`relative`,boxSizing:`border-box`,WebkitTapHighlightColor:`transparent`,backgroundColor:`transparent`,outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:`pointer`,userSelect:`none`,verticalAlign:`middle`,MozAppearance:`none`,WebkitAppearance:`none`,textDecoration:`none`,color:`inherit`,"&::-moz-focus-inner":{borderStyle:`none`},[`&.${U.disabled}`]:{pointerEvents:`none`,cursor:`default`},"@media print":{colorAdjust:`exact`}}),W=w.forwardRef(function(e,t){let n=c({props:e,name:`MuiButtonBase`}),{action:r,centerRipple:i=!1,children:a,className:o,component:s=`button`,disabled:l=!1,disableRipple:u=!1,disableTouchRipple:d=!1,focusRipple:p=!1,focusVisibleClassName:m,focusableWhenDisabled:h,suppressFocusVisible:v=!1,internalNativeButton:y,LinkComponent:b=`a`,nativeButton:x,onBlur:C,onClick:T,onContextMenu:E,onDragLeave:O,onFocus:A,onFocusVisible:M,onKeyDown:N,onKeyUp:P,onMouseDown:F,onMouseLeave:I,onMouseUp:ee,onTouchEnd:L,onTouchMove:te,onTouchStart:R,tabIndex:z=0,TouchRippleProps:ne,touchRippleRef:re,type:B,...V}=n,H=!!(V.href||V.to),U=!!V.formAction,W=s;W===`button`&&H&&(W=b);let K=typeof W==`string`?W===`button`:y??!1,q=x??K,J=k(),Y=g(J.ref,re),[X,Z]=w.useState(!1);(l||v)&&X&&Z(!1);let se=S(e=>{p&&!e.repeat&&X&&e.key===` `&&J.stop(e,()=>{J.start(e)})}),ce=S(e=>{p&&e.key===` `&&X&&!e.defaultPrevented&&J.stop(e,()=>{J.pulsate(e)})}),{getButtonProps:le,rootRef:Q}=D({nativeButton:q,nativeButtonProp:x,internalNativeButton:K,allowInferredHostMismatch:H||typeof W==`string`,disabled:l,type:B,hasFormAction:U,tabIndex:z,onBeforeKeyDown:se,onBeforeKeyUp:ce}),{onClick:ue,onKeyDown:de,onKeyUp:fe,...pe}=le({onClick:T,onKeyDown:N,onKeyUp:P});w.useImperativeHandle(r,()=>({focusVisible:()=>{Z(!0),Q.current.focus()}}),[Q]);let me=J.shouldMount&&!u&&!l;w.useEffect(()=>{X&&p&&!u&&J.pulsate()},[u,p,X,J]);let he=G(J,`start`,F,d),ge=G(J,`stop`,E,d),_e=G(J,`stop`,O,d),ve=G(J,`stop`,ee,d),ye=G(J,`stop`,e=>{X&&e.preventDefault(),I&&I(e)},d),be=G(J,`start`,R,d),xe=G(J,`stop`,L,d),Se=G(J,`stop`,te,d),Ce=G(J,`stop`,e=>{_(e.target)||Z(!1),C&&C(e)},!1),we=S(e=>{Q.current||=e.currentTarget,!v&&_(e.target)&&(Z(!0),M&&M(e)),A&&A(e)}),$={};H&&($.tabIndex=l?-1:z,l&&($[`aria-disabled`]=l),$.type=B);let Te=g(t,Q),Ee={...n,centerRipple:i,component:s,disabled:l,disableRipple:u,disableTouchRipple:d,focusRipple:p,suppressFocusVisible:v,tabIndex:z,focusVisible:X},De=ae(Ee);return(0,j.jsxs)(oe,{as:W,className:f(De.root,o),ownerState:Ee,onBlur:Ce,onClick:ue,onContextMenu:ge,onFocus:we,onKeyDown:de,onKeyUp:fe,onMouseDown:he,onMouseLeave:ye,onMouseUp:ve,onDragLeave:_e,onTouchEnd:xe,onTouchMove:Se,onTouchStart:be,ref:Te,...H?$:pe,...V,children:[a,me?(0,j.jsx)(ie,{ref:Y,center:i,...ne}):null]})});function G(e,t,n,r=!1){return S(i=>(n&&n(i),r||e[t](i),!0))}function K(e){return s(`MuiCircularProgress`,e)}u(`MuiCircularProgress`,[`root`,`determinate`,`indeterminate`,`colorPrimary`,`colorSecondary`,`svg`,`track`,`circle`,`circleDisableShrink`]);var q=44,J=r`
|
|
98
|
+
0% {
|
|
99
|
+
transform: rotate(0deg);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
100% {
|
|
103
|
+
transform: rotate(360deg);
|
|
104
|
+
}
|
|
105
|
+
`,Y=r`
|
|
106
|
+
0% {
|
|
107
|
+
stroke-dasharray: 1px, 200px;
|
|
108
|
+
stroke-dashoffset: 0;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
50% {
|
|
112
|
+
stroke-dasharray: 100px, 200px;
|
|
113
|
+
stroke-dashoffset: -15px;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
100% {
|
|
117
|
+
stroke-dasharray: 1px, 200px;
|
|
118
|
+
stroke-dashoffset: -126px;
|
|
119
|
+
}
|
|
120
|
+
`,X=typeof J==`string`?null:n`
|
|
121
|
+
animation: ${J} 1.4s linear infinite;
|
|
122
|
+
`,Z=typeof Y==`string`?null:n`
|
|
123
|
+
animation: ${Y} 1.4s ease-in-out infinite;
|
|
124
|
+
`,se=e=>{let{classes:t,variant:n,color:r,disableShrink:i}=e;return o({root:[`root`,n,`color${d(r)}`],svg:[`svg`],track:[`track`],circle:[`circle`,i&&`circleDisableShrink`]},K,t)},ce=p(`span`,{name:`MuiCircularProgress`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`color${d(n.color)}`]]}})(l(({theme:e})=>{let t=v(e,{animation:`none`});return{display:`inline-block`,variants:[{props:{variant:`determinate`},style:{...h(e,`transform`)}},{props:{variant:`indeterminate`},style:X||{animation:`${J} 1.4s linear infinite`}},...t?[{props:{variant:`indeterminate`},style:t}]:[],...Object.entries(e.palette).filter(C()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}})),le=p(`svg`,{name:`MuiCircularProgress`,slot:`Svg`})({display:`block`}),Q=p(`circle`,{name:`MuiCircularProgress`,slot:`Circle`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.circle,n.disableShrink&&t.circleDisableShrink]}})(l(({theme:e})=>{let t=v(e,{animation:`none`});return{stroke:`currentColor`,variants:[{props:{variant:`determinate`},style:{...h(e,`stroke-dashoffset`)}},{props:{variant:`indeterminate`},style:{strokeDasharray:`80px, 200px`,strokeDashoffset:0}},{props:({ownerState:e})=>e.variant===`indeterminate`&&!e.disableShrink,style:Z||{animation:`${Y} 1.4s ease-in-out infinite`}},...t?[{props:({ownerState:e})=>e.variant===`indeterminate`&&!e.disableShrink,style:t}]:[]]}})),ue=p(`circle`,{name:`MuiCircularProgress`,slot:`Track`})(l(({theme:e})=>({stroke:`currentColor`,opacity:(e.vars||e).palette.action.activatedOpacity}))),de=w.forwardRef(function(e,t){let n=c({props:e,name:`MuiCircularProgress`}),{className:r,color:i=`primary`,disableShrink:a=!1,enableTrackSlot:o=!1,min:s,max:l,size:u=40,style:d,thickness:p=3.6,value:m=n.min??0,variant:h=`indeterminate`,...g}=n,_=s??0,v=l??100,y={...n,color:i,disableShrink:a,size:u,thickness:p,value:m,variant:h,enableTrackSlot:o},b=se(y),x={},S={},C={};if(h===`determinate`){let e=2*Math.PI*((q-p)/2),t=v-_;x.strokeDasharray=e.toFixed(3),x.strokeDashoffset=t>0?`${((v-m)/t*e).toFixed(3)}px`:`${e.toFixed(3)}px`,S.transform=`rotate(-90deg)`,C[`aria-valuenow`]=m,C[`aria-valuemin`]=_,C[`aria-valuemax`]=v}return(0,j.jsx)(ce,{className:f(b.root,r),style:{width:u,height:u,...S,...d},ownerState:y,ref:t,role:`progressbar`,...C,...g,children:(0,j.jsxs)(le,{className:b.svg,ownerState:y,viewBox:`${q/2} ${q/2} ${q} ${q}`,children:[o?(0,j.jsx)(ue,{className:b.track,ownerState:y,cx:q,cy:q,r:(q-p)/2,fill:`none`,strokeWidth:p,"aria-hidden":`true`}):null,(0,j.jsx)(Q,{className:b.circle,style:x,ownerState:y,cx:q,cy:q,r:(q-p)/2,fill:`none`,strokeWidth:p})]})})});export{W as n,de as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./jsx-runtime-DYfQNk55.js";import{t}from"./createSvgIcon-D-6jHYkf.js";var n=t((0,e().jsx)(`path`,{d:`M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z`}),`Close`);export{n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./jsx-runtime-DYfQNk55.js";import{t}from"./createSvgIcon-D-6jHYkf.js";var n=t((0,e().jsx)(`path`,{d:`M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z`}),`Close`);export{n as t};
|