repoburg 1.3.201 → 1.3.204
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/agent-pane/backend/dist/index.js +2714 -32395
- package/agent-pane/backend/dist/server.js +45304 -0
- package/askuser-after-step5-postgres-selected.png +0 -0
- package/askuser-after-step7-answer-sent.png +0 -0
- package/askuser-card-visible.png +0 -0
- package/backend/dist/src/agent-runtime/agent-runtime-event-emitter.d.ts +16 -0
- package/backend/dist/src/agent-runtime/agent-runtime-event-emitter.js +87 -0
- package/backend/dist/src/agent-runtime/agent-runtime-event-emitter.js.map +1 -1
- package/backend/dist/src/agent-runtime/agent-runtime.types.d.ts +16 -1
- package/backend/dist/src/app.controller.d.ts +1 -0
- package/backend/dist/src/app.service.d.ts +1 -0
- package/backend/dist/src/app.service.js +4 -1
- package/backend/dist/src/app.service.js.map +1 -1
- package/backend/dist/src/interactive-chat/chat.service.d.ts +4 -0
- package/backend/dist/src/interactive-chat/chat.service.js +21 -1
- package/backend/dist/src/interactive-chat/chat.service.js.map +1 -1
- package/backend/dist/src/llm-orchestration/action-handlers/invoke-subagent.handler.js +12 -1
- package/backend/dist/src/llm-orchestration/action-handlers/invoke-subagent.handler.js.map +1 -1
- package/backend/dist/src/llm-orchestration/llm-orchestration.interfaces.d.ts +1 -0
- package/backend/dist/src/llm-orchestration/llm-orchestration.interfaces.js +1 -0
- package/backend/dist/src/llm-orchestration/llm-orchestration.interfaces.js.map +1 -1
- package/backend/dist/src/llm-orchestration/llm-turn-processor.service.js +2 -0
- package/backend/dist/src/llm-orchestration/llm-turn-processor.service.js.map +1 -1
- package/backend/dist/tsconfig.build.tsbuildinfo +1 -1
- package/daemon/dist/agentPane.js +128 -0
- package/daemon/dist/agentPane.spec.js +183 -0
- package/daemon/dist/api/services.js +4 -0
- package/daemon/dist/index.js +28 -8
- package/daemon/dist/serviceManager.js +30 -11
- package/daemon/dist/serviceManager.spec.js +26 -0
- package/daemon/dist/workspace-validation.js +63 -0
- package/daemon/dist/workspace-validation.spec.js +63 -0
- package/daemon/package.json +1 -1
- package/package.json +15 -2
- package/r2-step4-apple-banana.png +0 -0
- package/r2-step5-after-rewind-apple-last.png +0 -0
- package/r2-step7-apple-cherry.png +0 -0
- package/r2-step8-cherry-menu-no-restore.png +0 -0
- package/r3-step3-live-task-card-running.png +0 -0
- package/r3-step4-after-completion.png +0 -0
- package/r3-step5-persistence-after-reload.png +0 -0
- package/r3-step6-tasks-tab-card.png +0 -0
- package/reverify-answered-state-answer-sent.png +0 -0
- package/reverify-card-visible-after-completion.png +0 -0
- package/rewind-step3-apple-banana-turns.png +0 -0
- package/rewind-step5-ui-unchanged-after-confirmed-rewind.png +0 -0
- package/rewind-step6-apple-menu-no-restore.png +0 -0
- package/rewind-step7-final-turnlist-unchanged.png +0 -0
- package/rewind-step7-negative-error-toast.png +0 -0
- package/rewind-step7-negative-error-toast2.png +0 -0
- package/subagent-r2-step5-turn-after-reload-no-card.png +0 -0
- package/subagent-r2-step6-tasks-panel-card.png +0 -0
- package/subagent-step3-tasks-tab-done-card.png +0 -0
- package/subagent-step4-turn-stuck-no-cards.png +0 -0
- package/agent-pane/.prettierignore +0 -5
- package/agent-pane/.prettierrc +0 -8
- package/agent-pane/backend/coverage/base.css +0 -224
- package/agent-pane/backend/coverage/block-navigation.js +0 -87
- package/agent-pane/backend/coverage/clover.xml +0 -887
- package/agent-pane/backend/coverage/coverage-final.json +0 -10
- package/agent-pane/backend/coverage/favicon.png +0 -0
- package/agent-pane/backend/coverage/index.html +0 -176
- package/agent-pane/backend/coverage/prettify.css +0 -1
- package/agent-pane/backend/coverage/prettify.js +0 -2
- package/agent-pane/backend/coverage/sort-arrow-sprite.png +0 -0
- package/agent-pane/backend/coverage/sorter.js +0 -210
- package/agent-pane/backend/coverage/src/codex/codex-provider.ts.html +0 -1402
- package/agent-pane/backend/coverage/src/codex/index.html +0 -131
- package/agent-pane/backend/coverage/src/codex/item-mapper.ts.html +0 -331
- package/agent-pane/backend/coverage/src/db/index.html +0 -131
- package/agent-pane/backend/coverage/src/db/index.ts.html +0 -436
- package/agent-pane/backend/coverage/src/db/schema.ts.html +0 -175
- package/agent-pane/backend/coverage/src/index.html +0 -116
- package/agent-pane/backend/coverage/src/index.ts.html +0 -262
- package/agent-pane/backend/coverage/src/routes/index.html +0 -146
- package/agent-pane/backend/coverage/src/routes/sessions.ts.html +0 -991
- package/agent-pane/backend/coverage/src/routes/turns.ts.html +0 -256
- package/agent-pane/backend/coverage/src/routes/workspaces.ts.html +0 -406
- package/agent-pane/backend/coverage/src/ws/index.html +0 -116
- package/agent-pane/backend/coverage/src/ws/index.ts.html +0 -238
- package/agent-pane/backend/data.db +0 -0
- package/agent-pane/backend/data.db-shm +0 -0
- package/agent-pane/backend/data.db-wal +0 -0
- package/agent-pane/backend/package-lock.json +0 -5945
- package/agent-pane/backend/package.json +0 -33
- package/agent-pane/backend/scripts/backfill-from-jsonl.ts +0 -206
- package/agent-pane/backend/scripts/import-session-from-jsonl.ts +0 -264
- package/agent-pane/backend/src/claude/claude-message-mapper.test.ts +0 -271
- package/agent-pane/backend/src/claude/claude-message-mapper.ts +0 -259
- package/agent-pane/backend/src/claude/claude-provider.test.ts +0 -455
- package/agent-pane/backend/src/claude/claude-provider.ts +0 -1319
- package/agent-pane/backend/src/claude/claude-types.ts +0 -45
- package/agent-pane/backend/src/codex/app-server-client.test.ts +0 -183
- package/agent-pane/backend/src/codex/app-server-client.ts +0 -247
- package/agent-pane/backend/src/codex/app-server-types.ts +0 -259
- package/agent-pane/backend/src/codex/codex-provider-runtime-config.test.ts +0 -56
- package/agent-pane/backend/src/codex/codex-provider.test.ts +0 -60
- package/agent-pane/backend/src/codex/codex-provider.ts +0 -619
- package/agent-pane/backend/src/codex/item-mapper.test.ts +0 -221
- package/agent-pane/backend/src/codex/item-mapper.ts +0 -86
- package/agent-pane/backend/src/codex/shared-app-server.ts +0 -25
- package/agent-pane/backend/src/db/index.test.ts +0 -125
- package/agent-pane/backend/src/db/index.ts +0 -230
- package/agent-pane/backend/src/db/schema.ts +0 -34
- package/agent-pane/backend/src/index.ts +0 -89
- package/agent-pane/backend/src/integration/__fixtures__/cancel-turn.json +0 -29
- package/agent-pane/backend/src/integration/__fixtures__/delta-streaming.json +0 -40
- package/agent-pane/backend/src/integration/__fixtures__/failed-turn.json +0 -16
- package/agent-pane/backend/src/integration/__fixtures__/mcp-tool-call.json +0 -60
- package/agent-pane/backend/src/integration/__fixtures__/missing-item-started.json +0 -34
- package/agent-pane/backend/src/integration/__fixtures__/multi-item-turn.json +0 -85
- package/agent-pane/backend/src/integration/__fixtures__/multi-turn.json +0 -48
- package/agent-pane/backend/src/integration/__fixtures__/simple-turn.json +0 -35
- package/agent-pane/backend/src/integration/delta-streaming.test.ts +0 -130
- package/agent-pane/backend/src/integration/helpers/app-server-mock.ts +0 -272
- package/agent-pane/backend/src/integration/helpers/test-app.ts +0 -110
- package/agent-pane/backend/src/integration/helpers/ws-capture.ts +0 -64
- package/agent-pane/backend/src/integration/item-lifecycle.test.ts +0 -133
- package/agent-pane/backend/src/integration/mcp-tool-call.test.ts +0 -102
- package/agent-pane/backend/src/integration/missing-item-started.test.ts +0 -91
- package/agent-pane/backend/src/integration/multi-turn.test.ts +0 -121
- package/agent-pane/backend/src/integration/session-operations.test.ts +0 -175
- package/agent-pane/backend/src/integration/threads-claude-fork.test.ts +0 -241
- package/agent-pane/backend/src/integration/threads.test.ts +0 -309
- package/agent-pane/backend/src/integration/title-generation.test.ts +0 -109
- package/agent-pane/backend/src/integration/turn-cancel.test.ts +0 -111
- package/agent-pane/backend/src/integration/turn-failure.test.ts +0 -97
- package/agent-pane/backend/src/integration/turn-lifecycle.test.ts +0 -141
- package/agent-pane/backend/src/providers/index.ts +0 -16
- package/agent-pane/backend/src/providers/registry.test.ts +0 -92
- package/agent-pane/backend/src/providers/registry.ts +0 -43
- package/agent-pane/backend/src/providers/runtime-provider.ts +0 -43
- package/agent-pane/backend/src/repoburg/action-mapping.ts +0 -216
- package/agent-pane/backend/src/repoburg/agent-runtime-client.test.ts +0 -271
- package/agent-pane/backend/src/repoburg/agent-runtime-client.ts +0 -262
- package/agent-pane/backend/src/repoburg/backend-resolver.test.ts +0 -271
- package/agent-pane/backend/src/repoburg/backend-resolver.ts +0 -246
- package/agent-pane/backend/src/repoburg/repoburg-client.test.ts +0 -159
- package/agent-pane/backend/src/repoburg/repoburg-client.ts +0 -181
- package/agent-pane/backend/src/repoburg/repoburg-provider.test.ts +0 -723
- package/agent-pane/backend/src/repoburg/repoburg-provider.ts +0 -422
- package/agent-pane/backend/src/repoburg/turn-projector.test.ts +0 -475
- package/agent-pane/backend/src/repoburg/turn-projector.ts +0 -537
- package/agent-pane/backend/src/routes/files.ts +0 -31
- package/agent-pane/backend/src/routes/mcp.ts +0 -33
- package/agent-pane/backend/src/routes/models.test.ts +0 -92
- package/agent-pane/backend/src/routes/models.ts +0 -16
- package/agent-pane/backend/src/routes/plugins.ts +0 -40
- package/agent-pane/backend/src/routes/providers.test.ts +0 -86
- package/agent-pane/backend/src/routes/providers.ts +0 -86
- package/agent-pane/backend/src/routes/sessions.test.ts +0 -558
- package/agent-pane/backend/src/routes/sessions.ts +0 -504
- package/agent-pane/backend/src/routes/skills.test.ts +0 -114
- package/agent-pane/backend/src/routes/skills.ts +0 -70
- package/agent-pane/backend/src/routes/threads.ts +0 -323
- package/agent-pane/backend/src/routes/turns.test.ts +0 -196
- package/agent-pane/backend/src/routes/turns.ts +0 -103
- package/agent-pane/backend/src/routes/workspaces.test.ts +0 -197
- package/agent-pane/backend/src/routes/workspaces.ts +0 -128
- package/agent-pane/backend/src/ws/index.test.ts +0 -107
- package/agent-pane/backend/src/ws/index.ts +0 -51
- package/agent-pane/backend/tsconfig.json +0 -25
- package/agent-pane/backend/vitest.config.ts +0 -20
- package/agent-pane/eslint.config.js +0 -33
- package/agent-pane/frontend/coverage/base.css +0 -224
- package/agent-pane/frontend/coverage/block-navigation.js +0 -87
- package/agent-pane/frontend/coverage/clover.xml +0 -2962
- package/agent-pane/frontend/coverage/coverage-final.json +0 -37
- package/agent-pane/frontend/coverage/favicon.png +0 -0
- package/agent-pane/frontend/coverage/index.html +0 -251
- package/agent-pane/frontend/coverage/prettify.css +0 -1
- package/agent-pane/frontend/coverage/prettify.js +0 -2
- package/agent-pane/frontend/coverage/sort-arrow-sprite.png +0 -0
- package/agent-pane/frontend/coverage/sorter.js +0 -210
- package/agent-pane/frontend/coverage/src/App.tsx.html +0 -217
- package/agent-pane/frontend/coverage/src/AppInitializer.tsx.html +0 -223
- package/agent-pane/frontend/coverage/src/api/client.ts.html +0 -187
- package/agent-pane/frontend/coverage/src/api/index.html +0 -161
- package/agent-pane/frontend/coverage/src/api/sessions.ts.html +0 -316
- package/agent-pane/frontend/coverage/src/api/websocket.ts.html +0 -544
- package/agent-pane/frontend/coverage/src/api/workspaces.ts.html +0 -199
- package/agent-pane/frontend/coverage/src/components/CollapsibleToolCalls.tsx.html +0 -226
- package/agent-pane/frontend/coverage/src/components/CommandInputBar.tsx.html +0 -382
- package/agent-pane/frontend/coverage/src/components/CommandPalette.tsx.html +0 -715
- package/agent-pane/frontend/coverage/src/components/IdeWorkspace.tsx.html +0 -160
- package/agent-pane/frontend/coverage/src/components/ModelSelector.tsx.html +0 -478
- package/agent-pane/frontend/coverage/src/components/NewSessionDialog.tsx.html +0 -472
- package/agent-pane/frontend/coverage/src/components/RenderArea.tsx.html +0 -574
- package/agent-pane/frontend/coverage/src/components/RightPanel.tsx.html +0 -205
- package/agent-pane/frontend/coverage/src/components/RuntimeIcon.tsx.html +0 -133
- package/agent-pane/frontend/coverage/src/components/SessionTabs.tsx.html +0 -217
- package/agent-pane/frontend/coverage/src/components/StatusBar.tsx.html +0 -271
- package/agent-pane/frontend/coverage/src/components/StatusDot.tsx.html +0 -109
- package/agent-pane/frontend/coverage/src/components/Toast.tsx.html +0 -313
- package/agent-pane/frontend/coverage/src/components/TurnContent.tsx.html +0 -1216
- package/agent-pane/frontend/coverage/src/components/WorkspaceSidebar.tsx.html +0 -1138
- package/agent-pane/frontend/coverage/src/components/index.html +0 -326
- package/agent-pane/frontend/coverage/src/components/panels/ChangesPanel.tsx.html +0 -247
- package/agent-pane/frontend/coverage/src/components/panels/LogsPanel.tsx.html +0 -160
- package/agent-pane/frontend/coverage/src/components/panels/MetricsPanel.tsx.html +0 -427
- package/agent-pane/frontend/coverage/src/components/panels/TurnsPanel.tsx.html +0 -397
- package/agent-pane/frontend/coverage/src/components/panels/index.html +0 -161
- package/agent-pane/frontend/coverage/src/constants/index.html +0 -116
- package/agent-pane/frontend/coverage/src/constants/models.ts.html +0 -406
- package/agent-pane/frontend/coverage/src/hooks/index.html +0 -146
- package/agent-pane/frontend/coverage/src/hooks/useEscapeKey.ts.html +0 -124
- package/agent-pane/frontend/coverage/src/hooks/useOutsideClick.ts.html +0 -142
- package/agent-pane/frontend/coverage/src/hooks/useSessionStatus.ts.html +0 -187
- package/agent-pane/frontend/coverage/src/index.html +0 -146
- package/agent-pane/frontend/coverage/src/main.tsx.html +0 -115
- package/agent-pane/frontend/coverage/src/store/index.html +0 -116
- package/agent-pane/frontend/coverage/src/store/store.ts.html +0 -2404
- package/agent-pane/frontend/coverage/src/test/component-helpers.ts.html +0 -190
- package/agent-pane/frontend/coverage/src/test/fixtures.ts.html +0 -367
- package/agent-pane/frontend/coverage/src/test/index.html +0 -131
- package/agent-pane/frontend/coverage/src/types/index.html +0 -116
- package/agent-pane/frontend/coverage/src/types/index.ts.html +0 -466
- package/agent-pane/frontend/coverage/src/utils/changes.ts.html +0 -202
- package/agent-pane/frontend/coverage/src/utils/duration.ts.html +0 -127
- package/agent-pane/frontend/coverage/src/utils/index.html +0 -131
- package/agent-pane/frontend/dist/assets/index-34WaZYsW.css +0 -1
- package/agent-pane/frontend/dist/assets/index-y7xlT86e.js +0 -362
- package/agent-pane/frontend/dist/index.html +0 -19
- package/agent-pane/frontend/index.html +0 -18
- package/agent-pane/frontend/package-lock.json +0 -4211
- package/agent-pane/frontend/package.json +0 -35
- package/agent-pane/frontend/src/App.test.tsx +0 -74
- package/agent-pane/frontend/src/App.tsx +0 -44
- package/agent-pane/frontend/src/AppInitializer.test.tsx +0 -142
- package/agent-pane/frontend/src/AppInitializer.tsx +0 -46
- package/agent-pane/frontend/src/__tests__/ThreadsPanel.test.tsx +0 -192
- package/agent-pane/frontend/src/api/client.test.ts +0 -126
- package/agent-pane/frontend/src/api/client.ts +0 -34
- package/agent-pane/frontend/src/api/models.ts +0 -7
- package/agent-pane/frontend/src/api/providers.ts +0 -17
- package/agent-pane/frontend/src/api/sessions.test.ts +0 -245
- package/agent-pane/frontend/src/api/sessions.ts +0 -97
- package/agent-pane/frontend/src/api/skills.ts +0 -12
- package/agent-pane/frontend/src/api/websocket.test.ts +0 -288
- package/agent-pane/frontend/src/api/websocket.ts +0 -238
- package/agent-pane/frontend/src/api/workspaces.test.ts +0 -112
- package/agent-pane/frontend/src/api/workspaces.ts +0 -38
- package/agent-pane/frontend/src/components/CollapsibleToolCalls.test.tsx +0 -49
- package/agent-pane/frontend/src/components/CollapsibleToolCalls.tsx +0 -56
- package/agent-pane/frontend/src/components/CommandInputBar.test.tsx +0 -133
- package/agent-pane/frontend/src/components/CommandInputBar.tsx +0 -584
- package/agent-pane/frontend/src/components/CommandPalette.test.tsx +0 -226
- package/agent-pane/frontend/src/components/CommandPalette.tsx +0 -194
- package/agent-pane/frontend/src/components/CommentableText.test.tsx +0 -196
- package/agent-pane/frontend/src/components/CommentableText.tsx +0 -379
- package/agent-pane/frontend/src/components/IdeWorkspace.test.tsx +0 -39
- package/agent-pane/frontend/src/components/IdeWorkspace.tsx +0 -51
- package/agent-pane/frontend/src/components/ModelSelector.test.tsx +0 -129
- package/agent-pane/frontend/src/components/ModelSelector.tsx +0 -191
- package/agent-pane/frontend/src/components/NewSessionDialog.test.tsx +0 -95
- package/agent-pane/frontend/src/components/NewSessionDialog.tsx +0 -129
- package/agent-pane/frontend/src/components/RenderArea.test.tsx +0 -160
- package/agent-pane/frontend/src/components/RenderArea.tsx +0 -170
- package/agent-pane/frontend/src/components/ResizeHandle.tsx +0 -29
- package/agent-pane/frontend/src/components/RightPanel.test.tsx +0 -43
- package/agent-pane/frontend/src/components/RightPanel.tsx +0 -46
- package/agent-pane/frontend/src/components/RuntimeIcon.test.tsx +0 -32
- package/agent-pane/frontend/src/components/RuntimeIcon.tsx +0 -16
- package/agent-pane/frontend/src/components/SessionTabs.test.tsx +0 -72
- package/agent-pane/frontend/src/components/SessionTabs.tsx +0 -49
- package/agent-pane/frontend/src/components/StatusBar.test.tsx +0 -56
- package/agent-pane/frontend/src/components/StatusBar.tsx +0 -129
- package/agent-pane/frontend/src/components/StatusDot.test.tsx +0 -25
- package/agent-pane/frontend/src/components/StatusDot.tsx +0 -8
- package/agent-pane/frontend/src/components/Toast.test.tsx +0 -79
- package/agent-pane/frontend/src/components/Toast.tsx +0 -76
- package/agent-pane/frontend/src/components/TurnContent.test.tsx +0 -298
- package/agent-pane/frontend/src/components/TurnContent.tsx +0 -548
- package/agent-pane/frontend/src/components/WorkspaceSidebar.test.tsx +0 -297
- package/agent-pane/frontend/src/components/WorkspaceSidebar.tsx +0 -351
- package/agent-pane/frontend/src/components/input/OptionSubPopup.tsx +0 -32
- package/agent-pane/frontend/src/components/input/SkillMentionPopup.test.tsx +0 -63
- package/agent-pane/frontend/src/components/input/SkillMentionPopup.tsx +0 -78
- package/agent-pane/frontend/src/components/input/SlashPopup.test.tsx +0 -96
- package/agent-pane/frontend/src/components/input/SlashPopup.tsx +0 -82
- package/agent-pane/frontend/src/components/panels/ChangesPanel.test.tsx +0 -61
- package/agent-pane/frontend/src/components/panels/ChangesPanel.tsx +0 -54
- package/agent-pane/frontend/src/components/panels/TasksPanel.test.tsx +0 -97
- package/agent-pane/frontend/src/components/panels/TasksPanel.tsx +0 -208
- package/agent-pane/frontend/src/components/panels/ThreadsPanel.tsx +0 -382
- package/agent-pane/frontend/src/components/panels/TurnsPanel.test.tsx +0 -83
- package/agent-pane/frontend/src/components/panels/TurnsPanel.tsx +0 -126
- package/agent-pane/frontend/src/constants/models.test.ts +0 -97
- package/agent-pane/frontend/src/constants/models.ts +0 -166
- package/agent-pane/frontend/src/hooks/useEscapeKey.test.ts +0 -42
- package/agent-pane/frontend/src/hooks/useEscapeKey.ts +0 -13
- package/agent-pane/frontend/src/hooks/useOutsideClick.test.ts +0 -92
- package/agent-pane/frontend/src/hooks/useOutsideClick.ts +0 -19
- package/agent-pane/frontend/src/hooks/useProvider.ts +0 -44
- package/agent-pane/frontend/src/hooks/useResizable.test.ts +0 -97
- package/agent-pane/frontend/src/hooks/useResizable.ts +0 -75
- package/agent-pane/frontend/src/hooks/useSessionStatus.test.ts +0 -116
- package/agent-pane/frontend/src/hooks/useSessionStatus.ts +0 -34
- package/agent-pane/frontend/src/main.test.tsx +0 -37
- package/agent-pane/frontend/src/main.tsx +0 -10
- package/agent-pane/frontend/src/store/sessionSlice.ts +0 -440
- package/agent-pane/frontend/src/store/store.test.ts +0 -1319
- package/agent-pane/frontend/src/store/store.ts +0 -37
- package/agent-pane/frontend/src/store/threadSlice.ts +0 -136
- package/agent-pane/frontend/src/store/uiSlice.ts +0 -133
- package/agent-pane/frontend/src/store/workspaceSlice.ts +0 -77
- package/agent-pane/frontend/src/store/wsSlice.ts +0 -361
- package/agent-pane/frontend/src/styles/app.css +0 -611
- package/agent-pane/frontend/src/styles/tokens.css +0 -62
- package/agent-pane/frontend/src/test/component-helpers.ts +0 -38
- package/agent-pane/frontend/src/test/fixtures.ts +0 -100
- package/agent-pane/frontend/src/test-setup.ts +0 -5
- package/agent-pane/frontend/src/types/index.test.ts +0 -128
- package/agent-pane/frontend/src/types/index.ts +0 -132
- package/agent-pane/frontend/src/utils/changes.test.ts +0 -81
- package/agent-pane/frontend/src/utils/changes.ts +0 -39
- package/agent-pane/frontend/src/utils/duration.test.ts +0 -75
- package/agent-pane/frontend/src/utils/duration.ts +0 -14
- package/agent-pane/frontend/tsconfig.json +0 -25
- package/agent-pane/frontend/vite.config.ts +0 -22
- package/agent-pane/frontend/vitest.config.ts +0 -29
- package/agent-pane/package-lock.json +0 -1527
- package/agent-pane/package.json +0 -19
- package/agent-pane/shared/provider-types.ts +0 -67
- package/agent-pane/shared/types.ts +0 -167
|
@@ -1,362 +0,0 @@
|
|
|
1
|
-
var bh=Object.defineProperty;var zh=(s,i,l)=>i in s?bh(s,i,{enumerable:!0,configurable:!0,writable:!0,value:l}):s[i]=l;var Ge=(s,i,l)=>zh(s,typeof i!="symbol"?i+"":i,l);(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))a(d);new MutationObserver(d=>{for(const f of d)if(f.type==="childList")for(const h of f.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&a(h)}).observe(document,{childList:!0,subtree:!0});function l(d){const f={};return d.integrity&&(f.integrity=d.integrity),d.referrerPolicy&&(f.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?f.credentials="include":d.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function a(d){if(d.ep)return;d.ep=!0;const f=l(d);fetch(d.href,f)}})();function Rf(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var Na={exports:{}},ul={},Ea={exports:{}},Ce={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react.production.min.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var bd;function Oh(){if(bd)return Ce;bd=1;var s=Symbol.for("react.element"),i=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),h=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),S=Symbol.iterator;function w(N){return N===null||typeof N!="object"?null:(N=S&&N[S]||N["@@iterator"],typeof N=="function"?N:null)}var M={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},I=Object.assign,E={};function z(N,A,pe){this.props=N,this.context=A,this.refs=E,this.updater=pe||M}z.prototype.isReactComponent={},z.prototype.setState=function(N,A){if(typeof N!="object"&&typeof N!="function"&&N!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,N,A,"setState")},z.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function Z(){}Z.prototype=z.prototype;function Q(N,A,pe){this.props=N,this.context=A,this.refs=E,this.updater=pe||M}var J=Q.prototype=new Z;J.constructor=Q,I(J,z.prototype),J.isPureReactComponent=!0;var O=Array.isArray,re=Object.prototype.hasOwnProperty,fe={current:null},oe={key:!0,ref:!0,__self:!0,__source:!0};function ae(N,A,pe){var ye,Ne={},Ee=null,Re=null;if(A!=null)for(ye in A.ref!==void 0&&(Re=A.ref),A.key!==void 0&&(Ee=""+A.key),A)re.call(A,ye)&&!oe.hasOwnProperty(ye)&&(Ne[ye]=A[ye]);var Ae=arguments.length-2;if(Ae===1)Ne.children=pe;else if(1<Ae){for(var Be=Array(Ae),mt=0;mt<Ae;mt++)Be[mt]=arguments[mt+2];Ne.children=Be}if(N&&N.defaultProps)for(ye in Ae=N.defaultProps,Ae)Ne[ye]===void 0&&(Ne[ye]=Ae[ye]);return{$$typeof:s,type:N,key:Ee,ref:Re,props:Ne,_owner:fe.current}}function Te(N,A){return{$$typeof:s,type:N.type,key:A,ref:N.ref,props:N.props,_owner:N._owner}}function te(N){return typeof N=="object"&&N!==null&&N.$$typeof===s}function ve(N){var A={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(pe){return A[pe]})}var _e=/\/+/g;function je(N,A){return typeof N=="object"&&N!==null&&N.key!=null?ve(""+N.key):A.toString(36)}function ce(N,A,pe,ye,Ne){var Ee=typeof N;(Ee==="undefined"||Ee==="boolean")&&(N=null);var Re=!1;if(N===null)Re=!0;else switch(Ee){case"string":case"number":Re=!0;break;case"object":switch(N.$$typeof){case s:case i:Re=!0}}if(Re)return Re=N,Ne=Ne(Re),N=ye===""?"."+je(Re,0):ye,O(Ne)?(pe="",N!=null&&(pe=N.replace(_e,"$&/")+"/"),ce(Ne,A,pe,"",function(mt){return mt})):Ne!=null&&(te(Ne)&&(Ne=Te(Ne,pe+(!Ne.key||Re&&Re.key===Ne.key?"":(""+Ne.key).replace(_e,"$&/")+"/")+N)),A.push(Ne)),1;if(Re=0,ye=ye===""?".":ye+":",O(N))for(var Ae=0;Ae<N.length;Ae++){Ee=N[Ae];var Be=ye+je(Ee,Ae);Re+=ce(Ee,A,pe,Be,Ne)}else if(Be=w(N),typeof Be=="function")for(N=Be.call(N),Ae=0;!(Ee=N.next()).done;)Ee=Ee.value,Be=ye+je(Ee,Ae++),Re+=ce(Ee,A,pe,Be,Ne);else if(Ee==="object")throw A=String(N),Error("Objects are not valid as a React child (found: "+(A==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":A)+"). If you meant to render a collection of children, use an array instead.");return Re}function P(N,A,pe){if(N==null)return N;var ye=[],Ne=0;return ce(N,ye,"","",function(Ee){return A.call(pe,Ee,Ne++)}),ye}function q(N){if(N._status===-1){var A=N._result;A=A(),A.then(function(pe){(N._status===0||N._status===-1)&&(N._status=1,N._result=pe)},function(pe){(N._status===0||N._status===-1)&&(N._status=2,N._result=pe)}),N._status===-1&&(N._status=0,N._result=A)}if(N._status===1)return N._result.default;throw N._result}var X={current:null},$={transition:null},Y={ReactCurrentDispatcher:X,ReactCurrentBatchConfig:$,ReactCurrentOwner:fe};function H(){throw Error("act(...) is not supported in production builds of React.")}return Ce.Children={map:P,forEach:function(N,A,pe){P(N,function(){A.apply(this,arguments)},pe)},count:function(N){var A=0;return P(N,function(){A++}),A},toArray:function(N){return P(N,function(A){return A})||[]},only:function(N){if(!te(N))throw Error("React.Children.only expected to receive a single React element child.");return N}},Ce.Component=z,Ce.Fragment=l,Ce.Profiler=d,Ce.PureComponent=Q,Ce.StrictMode=a,Ce.Suspense=y,Ce.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Y,Ce.act=H,Ce.cloneElement=function(N,A,pe){if(N==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+N+".");var ye=I({},N.props),Ne=N.key,Ee=N.ref,Re=N._owner;if(A!=null){if(A.ref!==void 0&&(Ee=A.ref,Re=fe.current),A.key!==void 0&&(Ne=""+A.key),N.type&&N.type.defaultProps)var Ae=N.type.defaultProps;for(Be in A)re.call(A,Be)&&!oe.hasOwnProperty(Be)&&(ye[Be]=A[Be]===void 0&&Ae!==void 0?Ae[Be]:A[Be])}var Be=arguments.length-2;if(Be===1)ye.children=pe;else if(1<Be){Ae=Array(Be);for(var mt=0;mt<Be;mt++)Ae[mt]=arguments[mt+2];ye.children=Ae}return{$$typeof:s,type:N.type,key:Ne,ref:Ee,props:ye,_owner:Re}},Ce.createContext=function(N){return N={$$typeof:h,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},N.Provider={$$typeof:f,_context:N},N.Consumer=N},Ce.createElement=ae,Ce.createFactory=function(N){var A=ae.bind(null,N);return A.type=N,A},Ce.createRef=function(){return{current:null}},Ce.forwardRef=function(N){return{$$typeof:m,render:N}},Ce.isValidElement=te,Ce.lazy=function(N){return{$$typeof:k,_payload:{_status:-1,_result:N},_init:q}},Ce.memo=function(N,A){return{$$typeof:g,type:N,compare:A===void 0?null:A}},Ce.startTransition=function(N){var A=$.transition;$.transition={};try{N()}finally{$.transition=A}},Ce.unstable_act=H,Ce.useCallback=function(N,A){return X.current.useCallback(N,A)},Ce.useContext=function(N){return X.current.useContext(N)},Ce.useDebugValue=function(){},Ce.useDeferredValue=function(N){return X.current.useDeferredValue(N)},Ce.useEffect=function(N,A){return X.current.useEffect(N,A)},Ce.useId=function(){return X.current.useId()},Ce.useImperativeHandle=function(N,A,pe){return X.current.useImperativeHandle(N,A,pe)},Ce.useInsertionEffect=function(N,A){return X.current.useInsertionEffect(N,A)},Ce.useLayoutEffect=function(N,A){return X.current.useLayoutEffect(N,A)},Ce.useMemo=function(N,A){return X.current.useMemo(N,A)},Ce.useReducer=function(N,A,pe){return X.current.useReducer(N,A,pe)},Ce.useRef=function(N){return X.current.useRef(N)},Ce.useState=function(N){return X.current.useState(N)},Ce.useSyncExternalStore=function(N,A,pe){return X.current.useSyncExternalStore(N,A,pe)},Ce.useTransition=function(){return X.current.useTransition()},Ce.version="18.3.1",Ce}var zd;function Ja(){return zd||(zd=1,Ea.exports=Oh()),Ea.exports}/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react-jsx-runtime.production.min.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Od;function $h(){if(Od)return ul;Od=1;var s=Ja(),i=Symbol.for("react.element"),l=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,d=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,f={key:!0,ref:!0,__self:!0,__source:!0};function h(m,y,g){var k,S={},w=null,M=null;g!==void 0&&(w=""+g),y.key!==void 0&&(w=""+y.key),y.ref!==void 0&&(M=y.ref);for(k in y)a.call(y,k)&&!f.hasOwnProperty(k)&&(S[k]=y[k]);if(m&&m.defaultProps)for(k in y=m.defaultProps,y)S[k]===void 0&&(S[k]=y[k]);return{$$typeof:i,type:m,key:w,ref:M,props:S,_owner:d.current}}return ul.Fragment=l,ul.jsx=h,ul.jsxs=h,ul}var $d;function Fh(){return $d||($d=1,Na.exports=$h()),Na.exports}var c=Fh(),D=Ja();const ml=Rf(D);var Ai={},Ca={exports:{}},Ft={},ja={exports:{}},Ra={};/**
|
|
18
|
-
* @license React
|
|
19
|
-
* scheduler.production.min.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
-
*
|
|
23
|
-
* This source code is licensed under the MIT license found in the
|
|
24
|
-
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var Fd;function Uh(){return Fd||(Fd=1,(function(s){function i($,Y){var H=$.length;$.push(Y);e:for(;0<H;){var N=H-1>>>1,A=$[N];if(0<d(A,Y))$[N]=Y,$[H]=A,H=N;else break e}}function l($){return $.length===0?null:$[0]}function a($){if($.length===0)return null;var Y=$[0],H=$.pop();if(H!==Y){$[0]=H;e:for(var N=0,A=$.length,pe=A>>>1;N<pe;){var ye=2*(N+1)-1,Ne=$[ye],Ee=ye+1,Re=$[Ee];if(0>d(Ne,H))Ee<A&&0>d(Re,Ne)?($[N]=Re,$[Ee]=H,N=Ee):($[N]=Ne,$[ye]=H,N=ye);else if(Ee<A&&0>d(Re,H))$[N]=Re,$[Ee]=H,N=Ee;else break e}}return Y}function d($,Y){var H=$.sortIndex-Y.sortIndex;return H!==0?H:$.id-Y.id}if(typeof performance=="object"&&typeof performance.now=="function"){var f=performance;s.unstable_now=function(){return f.now()}}else{var h=Date,m=h.now();s.unstable_now=function(){return h.now()-m}}var y=[],g=[],k=1,S=null,w=3,M=!1,I=!1,E=!1,z=typeof setTimeout=="function"?setTimeout:null,Z=typeof clearTimeout=="function"?clearTimeout:null,Q=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function J($){for(var Y=l(g);Y!==null;){if(Y.callback===null)a(g);else if(Y.startTime<=$)a(g),Y.sortIndex=Y.expirationTime,i(y,Y);else break;Y=l(g)}}function O($){if(E=!1,J($),!I)if(l(y)!==null)I=!0,q(re);else{var Y=l(g);Y!==null&&X(O,Y.startTime-$)}}function re($,Y){I=!1,E&&(E=!1,Z(ae),ae=-1),M=!0;var H=w;try{for(J(Y),S=l(y);S!==null&&(!(S.expirationTime>Y)||$&&!ve());){var N=S.callback;if(typeof N=="function"){S.callback=null,w=S.priorityLevel;var A=N(S.expirationTime<=Y);Y=s.unstable_now(),typeof A=="function"?S.callback=A:S===l(y)&&a(y),J(Y)}else a(y);S=l(y)}if(S!==null)var pe=!0;else{var ye=l(g);ye!==null&&X(O,ye.startTime-Y),pe=!1}return pe}finally{S=null,w=H,M=!1}}var fe=!1,oe=null,ae=-1,Te=5,te=-1;function ve(){return!(s.unstable_now()-te<Te)}function _e(){if(oe!==null){var $=s.unstable_now();te=$;var Y=!0;try{Y=oe(!0,$)}finally{Y?je():(fe=!1,oe=null)}}else fe=!1}var je;if(typeof Q=="function")je=function(){Q(_e)};else if(typeof MessageChannel<"u"){var ce=new MessageChannel,P=ce.port2;ce.port1.onmessage=_e,je=function(){P.postMessage(null)}}else je=function(){z(_e,0)};function q($){oe=$,fe||(fe=!0,je())}function X($,Y){ae=z(function(){$(s.unstable_now())},Y)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function($){$.callback=null},s.unstable_continueExecution=function(){I||M||(I=!0,q(re))},s.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Te=0<$?Math.floor(1e3/$):5},s.unstable_getCurrentPriorityLevel=function(){return w},s.unstable_getFirstCallbackNode=function(){return l(y)},s.unstable_next=function($){switch(w){case 1:case 2:case 3:var Y=3;break;default:Y=w}var H=w;w=Y;try{return $()}finally{w=H}},s.unstable_pauseExecution=function(){},s.unstable_requestPaint=function(){},s.unstable_runWithPriority=function($,Y){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var H=w;w=$;try{return Y()}finally{w=H}},s.unstable_scheduleCallback=function($,Y,H){var N=s.unstable_now();switch(typeof H=="object"&&H!==null?(H=H.delay,H=typeof H=="number"&&0<H?N+H:N):H=N,$){case 1:var A=-1;break;case 2:A=250;break;case 5:A=1073741823;break;case 4:A=1e4;break;default:A=5e3}return A=H+A,$={id:k++,callback:Y,priorityLevel:$,startTime:H,expirationTime:A,sortIndex:-1},H>N?($.sortIndex=H,i(g,$),l(y)===null&&$===l(g)&&(E?(Z(ae),ae=-1):E=!0,X(O,H-N))):($.sortIndex=A,i(y,$),I||M||(I=!0,q(re))),$},s.unstable_shouldYield=ve,s.unstable_wrapCallback=function($){var Y=w;return function(){var H=w;w=Y;try{return $.apply(this,arguments)}finally{w=H}}}})(Ra)),Ra}var Ud;function Bh(){return Ud||(Ud=1,ja.exports=Uh()),ja.exports}/**
|
|
26
|
-
* @license React
|
|
27
|
-
* react-dom.production.min.js
|
|
28
|
-
*
|
|
29
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
-
*
|
|
31
|
-
* This source code is licensed under the MIT license found in the
|
|
32
|
-
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var Bd;function Wh(){if(Bd)return Ft;Bd=1;var s=Ja(),i=Bh();function l(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=new Set,d={};function f(e,t){h(e,t),h(e+"Capture",t)}function h(e,t){for(d[e]=t,e=0;e<t.length;e++)a.add(t[e])}var m=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),y=Object.prototype.hasOwnProperty,g=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,k={},S={};function w(e){return y.call(S,e)?!0:y.call(k,e)?!1:g.test(e)?S[e]=!0:(k[e]=!0,!1)}function M(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function I(e,t,n,r){if(t===null||typeof t>"u"||M(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function E(e,t,n,r,o,u,p){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=u,this.removeEmptyString=p}var z={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){z[e]=new E(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];z[t]=new E(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){z[e]=new E(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){z[e]=new E(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){z[e]=new E(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){z[e]=new E(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){z[e]=new E(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){z[e]=new E(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){z[e]=new E(e,5,!1,e.toLowerCase(),null,!1,!1)});var Z=/[\-:]([a-z])/g;function Q(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Z,Q);z[t]=new E(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Z,Q);z[t]=new E(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Z,Q);z[t]=new E(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){z[e]=new E(e,1,!1,e.toLowerCase(),null,!1,!1)}),z.xlinkHref=new E("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){z[e]=new E(e,1,!1,e.toLowerCase(),null,!0,!0)});function J(e,t,n,r){var o=z.hasOwnProperty(t)?z[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(I(t,n,o,r)&&(n=null),r||o===null?w(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var O=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,re=Symbol.for("react.element"),fe=Symbol.for("react.portal"),oe=Symbol.for("react.fragment"),ae=Symbol.for("react.strict_mode"),Te=Symbol.for("react.profiler"),te=Symbol.for("react.provider"),ve=Symbol.for("react.context"),_e=Symbol.for("react.forward_ref"),je=Symbol.for("react.suspense"),ce=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),X=Symbol.for("react.offscreen"),$=Symbol.iterator;function Y(e){return e===null||typeof e!="object"?null:(e=$&&e[$]||e["@@iterator"],typeof e=="function"?e:null)}var H=Object.assign,N;function A(e){if(N===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);N=t&&t[1]||""}return`
|
|
34
|
-
`+N+e}var pe=!1;function ye(e,t){if(!e||pe)return"";pe=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(L){var r=L}Reflect.construct(e,[],t)}else{try{t.call()}catch(L){r=L}e.call(t.prototype)}else{try{throw Error()}catch(L){r=L}e()}}catch(L){if(L&&r&&typeof L.stack=="string"){for(var o=L.stack.split(`
|
|
35
|
-
`),u=r.stack.split(`
|
|
36
|
-
`),p=o.length-1,x=u.length-1;1<=p&&0<=x&&o[p]!==u[x];)x--;for(;1<=p&&0<=x;p--,x--)if(o[p]!==u[x]){if(p!==1||x!==1)do if(p--,x--,0>x||o[p]!==u[x]){var T=`
|
|
37
|
-
`+o[p].replace(" at new "," at ");return e.displayName&&T.includes("<anonymous>")&&(T=T.replace("<anonymous>",e.displayName)),T}while(1<=p&&0<=x);break}}}finally{pe=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?A(e):""}function Ne(e){switch(e.tag){case 5:return A(e.type);case 16:return A("Lazy");case 13:return A("Suspense");case 19:return A("SuspenseList");case 0:case 2:case 15:return e=ye(e.type,!1),e;case 11:return e=ye(e.type.render,!1),e;case 1:return e=ye(e.type,!0),e;default:return""}}function Ee(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case oe:return"Fragment";case fe:return"Portal";case Te:return"Profiler";case ae:return"StrictMode";case je:return"Suspense";case ce:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ve:return(e.displayName||"Context")+".Consumer";case te:return(e._context.displayName||"Context")+".Provider";case _e:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case P:return t=e.displayName||null,t!==null?t:Ee(e.type)||"Memo";case q:t=e._payload,e=e._init;try{return Ee(e(t))}catch{}}return null}function Re(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ee(t);case 8:return t===ae?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Ae(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Be(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function mt(e){var t=Be(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,u=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(p){r=""+p,u.call(this,p)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(p){r=""+p},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function dn(e){e._valueTracker||(e._valueTracker=mt(e))}function Fe(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Be(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function fn(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function be(e,t){var n=t.checked;return H({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Un(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ae(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function He(e,t){t=t.checked,t!=null&&J(e,"checked",t,!1)}function Ut(e,t){He(e,t);var n=Ae(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?It(e,t.type,n):t.hasOwnProperty("defaultValue")&&It(e,t.type,Ae(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function pr(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function It(e,t,n){(t!=="number"||fn(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var pn=Array.isArray;function b(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Ae(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function he(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(l(91));return H({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function We(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(l(92));if(pn(n)){if(1<n.length)throw Error(l(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Ae(n)}}function Ve(e,t){var n=Ae(t.value),r=Ae(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function ot(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function kt(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function At(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?kt(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var nn,hr=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(nn=nn||document.createElement("div"),nn.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=nn.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function _n(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var qt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Vr=["Webkit","ms","Moz","O"];Object.keys(qt).forEach(function(e){Vr.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),qt[t]=qt[e]})});function mr(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||qt.hasOwnProperty(e)&&qt[e]?(""+t).trim():t+"px"}function Ns(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=mr(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var _l=H({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Gr(e,t){if(t){if(_l[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(l(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(l(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(l(61))}if(t.style!=null&&typeof t.style!="object")throw Error(l(62))}}function gr(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Bn=null;function hn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Dt=null,mn=null,Nn=null;function Es(e){if(e=qs(e)){if(typeof Dt!="function")throw Error(l(280));var t=e.stateNode;t&&(t=Ql(t),Dt(e.stateNode,e.type,t))}}function Qr(e){mn?Nn?Nn.push(e):Nn=[e]:mn=e}function Cs(){if(mn){var e=mn,t=Nn;if(Nn=mn=null,Es(e),t)for(e=0;e<t.length;e++)Es(t[e])}}function vr(e,t){return e(t)}function yr(){}var Pt=!1;function En(e,t,n){if(Pt)return e(t,n);Pt=!0;try{return vr(e,t,n)}finally{Pt=!1,(mn!==null||Nn!==null)&&(yr(),Cs())}}function Cn(e,t){var n=e.stateNode;if(n===null)return null;var r=Ql(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(l(231,t,typeof n));return n}var xr=!1;if(m)try{var kr={};Object.defineProperty(kr,"passive",{get:function(){xr=!0}}),window.addEventListener("test",kr,kr),window.removeEventListener("test",kr,kr)}catch{xr=!1}function Nl(e,t,n,r,o,u,p,x,T){var L=Array.prototype.slice.call(arguments,3);try{t.apply(n,L)}catch(B){this.onError(B)}}var jn=!1,wr=null,Wn=!1,js=null,Sr={onError:function(e){jn=!0,wr=e}};function Gi(e,t,n,r,o,u,p,x,T){jn=!1,wr=null,Nl.apply(Sr,arguments)}function Qi(e,t,n,r,o,u,p,x,T){if(Gi.apply(this,arguments),jn){if(jn){var L=wr;jn=!1,wr=null}else throw Error(l(198));Wn||(Wn=!0,js=L)}}function $e(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Rn(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function El(e){if($e(e)!==e)throw Error(l(188))}function Cl(e){var t=e.alternate;if(!t){if(t=$e(e),t===null)throw Error(l(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var u=o.alternate;if(u===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===u.child){for(u=o.child;u;){if(u===n)return El(o),e;if(u===r)return El(o),t;u=u.sibling}throw Error(l(188))}if(n.return!==r.return)n=o,r=u;else{for(var p=!1,x=o.child;x;){if(x===n){p=!0,n=o,r=u;break}if(x===r){p=!0,r=o,n=u;break}x=x.sibling}if(!p){for(x=u.child;x;){if(x===n){p=!0,n=u,r=o;break}if(x===r){p=!0,r=u,n=o;break}x=x.sibling}if(!p)throw Error(l(189))}}if(n.alternate!==r)throw Error(l(190))}if(n.tag!==3)throw Error(l(188));return n.stateNode.current===n?e:t}function qr(e){return e=Cl(e),e!==null?Rs(e):null}function Rs(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Rs(e);if(t!==null)return t;e=e.sibling}return null}var Ls=i.unstable_scheduleCallback,jl=i.unstable_cancelCallback,qi=i.unstable_shouldYield,Ki=i.unstable_requestPaint,Xe=i.unstable_now,gn=i.unstable_getCurrentPriorityLevel,Hn=i.unstable_ImmediatePriority,vn=i.unstable_UserBlockingPriority,Kr=i.unstable_NormalPriority,Tr=i.unstable_LowPriority,Rl=i.unstable_IdlePriority,_r=null,Bt=null;function Yr(e){if(Bt&&typeof Bt.onCommitFiberRoot=="function")try{Bt.onCommitFiberRoot(_r,e,void 0,(e.current.flags&128)===128)}catch{}}var Et=Math.clz32?Math.clz32:Nr,Xr=Math.log,Vn=Math.LN2;function Nr(e){return e>>>=0,e===0?32:31-(Xr(e)/Vn|0)|0}var Ct=64,Zr=4194304;function Er(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Cr(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,u=e.pingedLanes,p=n&268435455;if(p!==0){var x=p&~o;x!==0?r=Er(x):(u&=p,u!==0&&(r=Er(u)))}else p=n&~o,p!==0?r=Er(p):u!==0&&(r=Er(u));if(r===0)return 0;if(t!==0&&t!==r&&(t&o)===0&&(o=r&-r,u=t&-t,o>=u||o===16&&(u&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Et(t),o=1<<n,r|=e[n],t&=~o;return r}function Ll(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Il(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,u=e.pendingLanes;0<u;){var p=31-Et(u),x=1<<p,T=o[p];T===-1?((x&n)===0||(x&r)!==0)&&(o[p]=Ll(x,t)):T<=t&&(e.expiredLanes|=x),u&=~x}}function Is(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function As(){var e=Ct;return Ct<<=1,(Ct&4194240)===0&&(Ct=64),e}function Ds(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function jr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Et(t),e[t]=n}function Al(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-Et(n),u=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~u}}function Gn(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Et(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var De=0;function V(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var v,C,F,le,de,we=!1,Pe=[],ze=null,Ze=null,Je=null,Ln=new Map,rt=new Map,Qn=[],sp="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function xu(e,t){switch(e){case"focusin":case"focusout":ze=null;break;case"dragenter":case"dragleave":Ze=null;break;case"mouseover":case"mouseout":Je=null;break;case"pointerover":case"pointerout":Ln.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":rt.delete(t.pointerId)}}function Ps(e,t,n,r,o,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:u,targetContainers:[o]},t!==null&&(t=qs(t),t!==null&&C(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function lp(e,t,n,r,o){switch(t){case"focusin":return ze=Ps(ze,e,t,n,r,o),!0;case"dragenter":return Ze=Ps(Ze,e,t,n,r,o),!0;case"mouseover":return Je=Ps(Je,e,t,n,r,o),!0;case"pointerover":var u=o.pointerId;return Ln.set(u,Ps(Ln.get(u)||null,e,t,n,r,o)),!0;case"gotpointercapture":return u=o.pointerId,rt.set(u,Ps(rt.get(u)||null,e,t,n,r,o)),!0}return!1}function ku(e){var t=Rr(e.target);if(t!==null){var n=$e(t);if(n!==null){if(t=n.tag,t===13){if(t=Rn(n),t!==null){e.blockedOn=t,de(e.priority,function(){F(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Xi(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Bn=r,n.target.dispatchEvent(r),Bn=null}else return t=qs(n),t!==null&&C(t),e.blockedOn=n,!1;t.shift()}return!0}function wu(e,t,n){Dl(e)&&n.delete(t)}function ip(){we=!1,ze!==null&&Dl(ze)&&(ze=null),Ze!==null&&Dl(Ze)&&(Ze=null),Je!==null&&Dl(Je)&&(Je=null),Ln.forEach(wu),rt.forEach(wu)}function Ms(e,t){e.blockedOn===t&&(e.blockedOn=null,we||(we=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,ip)))}function bs(e){function t(o){return Ms(o,e)}if(0<Pe.length){Ms(Pe[0],e);for(var n=1;n<Pe.length;n++){var r=Pe[n];r.blockedOn===e&&(r.blockedOn=null)}}for(ze!==null&&Ms(ze,e),Ze!==null&&Ms(Ze,e),Je!==null&&Ms(Je,e),Ln.forEach(t),rt.forEach(t),n=0;n<Qn.length;n++)r=Qn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Qn.length&&(n=Qn[0],n.blockedOn===null);)ku(n),n.blockedOn===null&&Qn.shift()}var Jr=O.ReactCurrentBatchConfig,Pl=!0;function op(e,t,n,r){var o=De,u=Jr.transition;Jr.transition=null;try{De=1,Yi(e,t,n,r)}finally{De=o,Jr.transition=u}}function ap(e,t,n,r){var o=De,u=Jr.transition;Jr.transition=null;try{De=4,Yi(e,t,n,r)}finally{De=o,Jr.transition=u}}function Yi(e,t,n,r){if(Pl){var o=Xi(e,t,n,r);if(o===null)mo(e,t,r,Ml,n),xu(e,r);else if(lp(o,e,t,n,r))r.stopPropagation();else if(xu(e,r),t&4&&-1<sp.indexOf(e)){for(;o!==null;){var u=qs(o);if(u!==null&&v(u),u=Xi(e,t,n,r),u===null&&mo(e,t,r,Ml,n),u===o)break;o=u}o!==null&&r.stopPropagation()}else mo(e,t,r,null,n)}}var Ml=null;function Xi(e,t,n,r){if(Ml=null,e=hn(r),e=Rr(e),e!==null)if(t=$e(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Rn(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Ml=e,null}function Su(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(gn()){case Hn:return 1;case vn:return 4;case Kr:case Tr:return 16;case Rl:return 536870912;default:return 16}default:return 16}}var qn=null,Zi=null,bl=null;function Tu(){if(bl)return bl;var e,t=Zi,n=t.length,r,o="value"in qn?qn.value:qn.textContent,u=o.length;for(e=0;e<n&&t[e]===o[e];e++);var p=n-e;for(r=1;r<=p&&t[n-r]===o[u-r];r++);return bl=o.slice(e,1<r?1-r:void 0)}function zl(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Ol(){return!0}function _u(){return!1}function Wt(e){function t(n,r,o,u,p){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=u,this.target=p,this.currentTarget=null;for(var x in e)e.hasOwnProperty(x)&&(n=e[x],this[x]=n?n(u):u[x]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?Ol:_u,this.isPropagationStopped=_u,this}return H(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Ol)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ol)},persist:function(){},isPersistent:Ol}),t}var es={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ji=Wt(es),zs=H({},es,{view:0,detail:0}),up=Wt(zs),eo,to,Os,$l=H({},zs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ro,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Os&&(Os&&e.type==="mousemove"?(eo=e.screenX-Os.screenX,to=e.screenY-Os.screenY):to=eo=0,Os=e),eo)},movementY:function(e){return"movementY"in e?e.movementY:to}}),Nu=Wt($l),cp=H({},$l,{dataTransfer:0}),dp=Wt(cp),fp=H({},zs,{relatedTarget:0}),no=Wt(fp),pp=H({},es,{animationName:0,elapsedTime:0,pseudoElement:0}),hp=Wt(pp),mp=H({},es,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),gp=Wt(mp),vp=H({},es,{data:0}),Eu=Wt(vp),yp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xp={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},kp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function wp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=kp[e])?!!t[e]:!1}function ro(){return wp}var Sp=H({},zs,{key:function(e){if(e.key){var t=yp[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=zl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?xp[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ro,charCode:function(e){return e.type==="keypress"?zl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?zl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Tp=Wt(Sp),_p=H({},$l,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Cu=Wt(_p),Np=H({},zs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ro}),Ep=Wt(Np),Cp=H({},es,{propertyName:0,elapsedTime:0,pseudoElement:0}),jp=Wt(Cp),Rp=H({},$l,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Lp=Wt(Rp),Ip=[9,13,27,32],so=m&&"CompositionEvent"in window,$s=null;m&&"documentMode"in document&&($s=document.documentMode);var Ap=m&&"TextEvent"in window&&!$s,ju=m&&(!so||$s&&8<$s&&11>=$s),Ru=" ",Lu=!1;function Iu(e,t){switch(e){case"keyup":return Ip.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Au(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ts=!1;function Dp(e,t){switch(e){case"compositionend":return Au(t);case"keypress":return t.which!==32?null:(Lu=!0,Ru);case"textInput":return e=t.data,e===Ru&&Lu?null:e;default:return null}}function Pp(e,t){if(ts)return e==="compositionend"||!so&&Iu(e,t)?(e=Tu(),bl=Zi=qn=null,ts=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return ju&&t.locale!=="ko"?null:t.data;default:return null}}var Mp={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Du(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Mp[e.type]:t==="textarea"}function Pu(e,t,n,r){Qr(r),t=Hl(t,"onChange"),0<t.length&&(n=new Ji("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Fs=null,Us=null;function bp(e){Zu(e,0)}function Fl(e){var t=is(e);if(Fe(t))return e}function zp(e,t){if(e==="change")return t}var Mu=!1;if(m){var lo;if(m){var io="oninput"in document;if(!io){var bu=document.createElement("div");bu.setAttribute("oninput","return;"),io=typeof bu.oninput=="function"}lo=io}else lo=!1;Mu=lo&&(!document.documentMode||9<document.documentMode)}function zu(){Fs&&(Fs.detachEvent("onpropertychange",Ou),Us=Fs=null)}function Ou(e){if(e.propertyName==="value"&&Fl(Us)){var t=[];Pu(t,Us,e,hn(e)),En(bp,t)}}function Op(e,t,n){e==="focusin"?(zu(),Fs=t,Us=n,Fs.attachEvent("onpropertychange",Ou)):e==="focusout"&&zu()}function $p(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Fl(Us)}function Fp(e,t){if(e==="click")return Fl(t)}function Up(e,t){if(e==="input"||e==="change")return Fl(t)}function Bp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var rn=typeof Object.is=="function"?Object.is:Bp;function Bs(e,t){if(rn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!y.call(t,o)||!rn(e[o],t[o]))return!1}return!0}function $u(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Fu(e,t){var n=$u(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=$u(n)}}function Uu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Uu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Bu(){for(var e=window,t=fn();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=fn(e.document)}return t}function oo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Wp(e){var t=Bu(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Uu(n.ownerDocument.documentElement,n)){if(r!==null&&oo(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,u=Math.min(r.start,o);r=r.end===void 0?u:Math.min(r.end,o),!e.extend&&u>r&&(o=r,r=u,u=o),o=Fu(n,u);var p=Fu(n,r);o&&p&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==p.node||e.focusOffset!==p.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),u>r?(e.addRange(t),e.extend(p.node,p.offset)):(t.setEnd(p.node,p.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Hp=m&&"documentMode"in document&&11>=document.documentMode,ns=null,ao=null,Ws=null,uo=!1;function Wu(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;uo||ns==null||ns!==fn(r)||(r=ns,"selectionStart"in r&&oo(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ws&&Bs(Ws,r)||(Ws=r,r=Hl(ao,"onSelect"),0<r.length&&(t=new Ji("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ns)))}function Ul(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var rs={animationend:Ul("Animation","AnimationEnd"),animationiteration:Ul("Animation","AnimationIteration"),animationstart:Ul("Animation","AnimationStart"),transitionend:Ul("Transition","TransitionEnd")},co={},Hu={};m&&(Hu=document.createElement("div").style,"AnimationEvent"in window||(delete rs.animationend.animation,delete rs.animationiteration.animation,delete rs.animationstart.animation),"TransitionEvent"in window||delete rs.transitionend.transition);function Bl(e){if(co[e])return co[e];if(!rs[e])return e;var t=rs[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Hu)return co[e]=t[n];return e}var Vu=Bl("animationend"),Gu=Bl("animationiteration"),Qu=Bl("animationstart"),qu=Bl("transitionend"),Ku=new Map,Yu="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Kn(e,t){Ku.set(e,t),f(t,[e])}for(var fo=0;fo<Yu.length;fo++){var po=Yu[fo],Vp=po.toLowerCase(),Gp=po[0].toUpperCase()+po.slice(1);Kn(Vp,"on"+Gp)}Kn(Vu,"onAnimationEnd"),Kn(Gu,"onAnimationIteration"),Kn(Qu,"onAnimationStart"),Kn("dblclick","onDoubleClick"),Kn("focusin","onFocus"),Kn("focusout","onBlur"),Kn(qu,"onTransitionEnd"),h("onMouseEnter",["mouseout","mouseover"]),h("onMouseLeave",["mouseout","mouseover"]),h("onPointerEnter",["pointerout","pointerover"]),h("onPointerLeave",["pointerout","pointerover"]),f("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),f("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),f("onBeforeInput",["compositionend","keypress","textInput","paste"]),f("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),f("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),f("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Hs="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Qp=new Set("cancel close invalid load scroll toggle".split(" ").concat(Hs));function Xu(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Qi(r,t,void 0,e),e.currentTarget=null}function Zu(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var u=void 0;if(t)for(var p=r.length-1;0<=p;p--){var x=r[p],T=x.instance,L=x.currentTarget;if(x=x.listener,T!==u&&o.isPropagationStopped())break e;Xu(o,x,L),u=T}else for(p=0;p<r.length;p++){if(x=r[p],T=x.instance,L=x.currentTarget,x=x.listener,T!==u&&o.isPropagationStopped())break e;Xu(o,x,L),u=T}}}if(Wn)throw e=js,Wn=!1,js=null,e}function qe(e,t){var n=t[wo];n===void 0&&(n=t[wo]=new Set);var r=e+"__bubble";n.has(r)||(Ju(t,e,2,!1),n.add(r))}function ho(e,t,n){var r=0;t&&(r|=4),Ju(n,e,r,t)}var Wl="_reactListening"+Math.random().toString(36).slice(2);function Vs(e){if(!e[Wl]){e[Wl]=!0,a.forEach(function(n){n!=="selectionchange"&&(Qp.has(n)||ho(n,!1,e),ho(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Wl]||(t[Wl]=!0,ho("selectionchange",!1,t))}}function Ju(e,t,n,r){switch(Su(t)){case 1:var o=op;break;case 4:o=ap;break;default:o=Yi}n=o.bind(null,t,n,e),o=void 0,!xr||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function mo(e,t,n,r,o){var u=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var p=r.tag;if(p===3||p===4){var x=r.stateNode.containerInfo;if(x===o||x.nodeType===8&&x.parentNode===o)break;if(p===4)for(p=r.return;p!==null;){var T=p.tag;if((T===3||T===4)&&(T=p.stateNode.containerInfo,T===o||T.nodeType===8&&T.parentNode===o))return;p=p.return}for(;x!==null;){if(p=Rr(x),p===null)return;if(T=p.tag,T===5||T===6){r=u=p;continue e}x=x.parentNode}}r=r.return}En(function(){var L=u,B=hn(n),W=[];e:{var U=Ku.get(e);if(U!==void 0){var ee=Ji,se=e;switch(e){case"keypress":if(zl(n)===0)break e;case"keydown":case"keyup":ee=Tp;break;case"focusin":se="focus",ee=no;break;case"focusout":se="blur",ee=no;break;case"beforeblur":case"afterblur":ee=no;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ee=Nu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ee=dp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ee=Ep;break;case Vu:case Gu:case Qu:ee=hp;break;case qu:ee=jp;break;case"scroll":ee=up;break;case"wheel":ee=Lp;break;case"copy":case"cut":case"paste":ee=gp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ee=Cu}var ie=(t&4)!==0,st=!ie&&e==="scroll",j=ie?U!==null?U+"Capture":null:U;ie=[];for(var _=L,R;_!==null;){R=_;var G=R.stateNode;if(R.tag===5&&G!==null&&(R=G,j!==null&&(G=Cn(_,j),G!=null&&ie.push(Gs(_,G,R)))),st)break;_=_.return}0<ie.length&&(U=new ee(U,se,null,n,B),W.push({event:U,listeners:ie}))}}if((t&7)===0){e:{if(U=e==="mouseover"||e==="pointerover",ee=e==="mouseout"||e==="pointerout",U&&n!==Bn&&(se=n.relatedTarget||n.fromElement)&&(Rr(se)||se[In]))break e;if((ee||U)&&(U=B.window===B?B:(U=B.ownerDocument)?U.defaultView||U.parentWindow:window,ee?(se=n.relatedTarget||n.toElement,ee=L,se=se?Rr(se):null,se!==null&&(st=$e(se),se!==st||se.tag!==5&&se.tag!==6)&&(se=null)):(ee=null,se=L),ee!==se)){if(ie=Nu,G="onMouseLeave",j="onMouseEnter",_="mouse",(e==="pointerout"||e==="pointerover")&&(ie=Cu,G="onPointerLeave",j="onPointerEnter",_="pointer"),st=ee==null?U:is(ee),R=se==null?U:is(se),U=new ie(G,_+"leave",ee,n,B),U.target=st,U.relatedTarget=R,G=null,Rr(B)===L&&(ie=new ie(j,_+"enter",se,n,B),ie.target=R,ie.relatedTarget=st,G=ie),st=G,ee&&se)t:{for(ie=ee,j=se,_=0,R=ie;R;R=ss(R))_++;for(R=0,G=j;G;G=ss(G))R++;for(;0<_-R;)ie=ss(ie),_--;for(;0<R-_;)j=ss(j),R--;for(;_--;){if(ie===j||j!==null&&ie===j.alternate)break t;ie=ss(ie),j=ss(j)}ie=null}else ie=null;ee!==null&&ec(W,U,ee,ie,!1),se!==null&&st!==null&&ec(W,st,se,ie,!0)}}e:{if(U=L?is(L):window,ee=U.nodeName&&U.nodeName.toLowerCase(),ee==="select"||ee==="input"&&U.type==="file")var ue=zp;else if(Du(U))if(Mu)ue=Up;else{ue=$p;var me=Op}else(ee=U.nodeName)&&ee.toLowerCase()==="input"&&(U.type==="checkbox"||U.type==="radio")&&(ue=Fp);if(ue&&(ue=ue(e,L))){Pu(W,ue,n,B);break e}me&&me(e,U,L),e==="focusout"&&(me=U._wrapperState)&&me.controlled&&U.type==="number"&&It(U,"number",U.value)}switch(me=L?is(L):window,e){case"focusin":(Du(me)||me.contentEditable==="true")&&(ns=me,ao=L,Ws=null);break;case"focusout":Ws=ao=ns=null;break;case"mousedown":uo=!0;break;case"contextmenu":case"mouseup":case"dragend":uo=!1,Wu(W,n,B);break;case"selectionchange":if(Hp)break;case"keydown":case"keyup":Wu(W,n,B)}var ge;if(so)e:{switch(e){case"compositionstart":var ke="onCompositionStart";break e;case"compositionend":ke="onCompositionEnd";break e;case"compositionupdate":ke="onCompositionUpdate";break e}ke=void 0}else ts?Iu(e,n)&&(ke="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(ke="onCompositionStart");ke&&(ju&&n.locale!=="ko"&&(ts||ke!=="onCompositionStart"?ke==="onCompositionEnd"&&ts&&(ge=Tu()):(qn=B,Zi="value"in qn?qn.value:qn.textContent,ts=!0)),me=Hl(L,ke),0<me.length&&(ke=new Eu(ke,e,null,n,B),W.push({event:ke,listeners:me}),ge?ke.data=ge:(ge=Au(n),ge!==null&&(ke.data=ge)))),(ge=Ap?Dp(e,n):Pp(e,n))&&(L=Hl(L,"onBeforeInput"),0<L.length&&(B=new Eu("onBeforeInput","beforeinput",null,n,B),W.push({event:B,listeners:L}),B.data=ge))}Zu(W,t)})}function Gs(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Hl(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,u=o.stateNode;o.tag===5&&u!==null&&(o=u,u=Cn(e,n),u!=null&&r.unshift(Gs(e,u,o)),u=Cn(e,t),u!=null&&r.push(Gs(e,u,o))),e=e.return}return r}function ss(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function ec(e,t,n,r,o){for(var u=t._reactName,p=[];n!==null&&n!==r;){var x=n,T=x.alternate,L=x.stateNode;if(T!==null&&T===r)break;x.tag===5&&L!==null&&(x=L,o?(T=Cn(n,u),T!=null&&p.unshift(Gs(n,T,x))):o||(T=Cn(n,u),T!=null&&p.push(Gs(n,T,x)))),n=n.return}p.length!==0&&e.push({event:t,listeners:p})}var qp=/\r\n?/g,Kp=/\u0000|\uFFFD/g;function tc(e){return(typeof e=="string"?e:""+e).replace(qp,`
|
|
38
|
-
`).replace(Kp,"")}function Vl(e,t,n){if(t=tc(t),tc(e)!==t&&n)throw Error(l(425))}function Gl(){}var go=null,vo=null;function yo(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var xo=typeof setTimeout=="function"?setTimeout:void 0,Yp=typeof clearTimeout=="function"?clearTimeout:void 0,nc=typeof Promise=="function"?Promise:void 0,Xp=typeof queueMicrotask=="function"?queueMicrotask:typeof nc<"u"?function(e){return nc.resolve(null).then(e).catch(Zp)}:xo;function Zp(e){setTimeout(function(){throw e})}function ko(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),bs(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);bs(t)}function Yn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function rc(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var ls=Math.random().toString(36).slice(2),yn="__reactFiber$"+ls,Qs="__reactProps$"+ls,In="__reactContainer$"+ls,wo="__reactEvents$"+ls,Jp="__reactListeners$"+ls,eh="__reactHandles$"+ls;function Rr(e){var t=e[yn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[In]||n[yn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=rc(e);e!==null;){if(n=e[yn])return n;e=rc(e)}return t}e=n,n=e.parentNode}return null}function qs(e){return e=e[yn]||e[In],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function is(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(l(33))}function Ql(e){return e[Qs]||null}var So=[],os=-1;function Xn(e){return{current:e}}function Ke(e){0>os||(e.current=So[os],So[os]=null,os--)}function Qe(e,t){os++,So[os]=e.current,e.current=t}var Zn={},wt=Xn(Zn),Mt=Xn(!1),Lr=Zn;function as(e,t){var n=e.type.contextTypes;if(!n)return Zn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},u;for(u in n)o[u]=t[u];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function bt(e){return e=e.childContextTypes,e!=null}function ql(){Ke(Mt),Ke(wt)}function sc(e,t,n){if(wt.current!==Zn)throw Error(l(168));Qe(wt,t),Qe(Mt,n)}function lc(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(l(108,Re(e)||"Unknown",o));return H({},n,r)}function Kl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Zn,Lr=wt.current,Qe(wt,e),Qe(Mt,Mt.current),!0}function ic(e,t,n){var r=e.stateNode;if(!r)throw Error(l(169));n?(e=lc(e,t,Lr),r.__reactInternalMemoizedMergedChildContext=e,Ke(Mt),Ke(wt),Qe(wt,e)):Ke(Mt),Qe(Mt,n)}var An=null,Yl=!1,To=!1;function oc(e){An===null?An=[e]:An.push(e)}function th(e){Yl=!0,oc(e)}function Jn(){if(!To&&An!==null){To=!0;var e=0,t=De;try{var n=An;for(De=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}An=null,Yl=!1}catch(o){throw An!==null&&(An=An.slice(e+1)),Ls(Hn,Jn),o}finally{De=t,To=!1}}return null}var us=[],cs=0,Xl=null,Zl=0,Kt=[],Yt=0,Ir=null,Dn=1,Pn="";function Ar(e,t){us[cs++]=Zl,us[cs++]=Xl,Xl=e,Zl=t}function ac(e,t,n){Kt[Yt++]=Dn,Kt[Yt++]=Pn,Kt[Yt++]=Ir,Ir=e;var r=Dn;e=Pn;var o=32-Et(r)-1;r&=~(1<<o),n+=1;var u=32-Et(t)+o;if(30<u){var p=o-o%5;u=(r&(1<<p)-1).toString(32),r>>=p,o-=p,Dn=1<<32-Et(t)+o|n<<o|r,Pn=u+e}else Dn=1<<u|n<<o|r,Pn=e}function _o(e){e.return!==null&&(Ar(e,1),ac(e,1,0))}function No(e){for(;e===Xl;)Xl=us[--cs],us[cs]=null,Zl=us[--cs],us[cs]=null;for(;e===Ir;)Ir=Kt[--Yt],Kt[Yt]=null,Pn=Kt[--Yt],Kt[Yt]=null,Dn=Kt[--Yt],Kt[Yt]=null}var Ht=null,Vt=null,Ye=!1,sn=null;function uc(e,t){var n=en(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function cc(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ht=e,Vt=Yn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ht=e,Vt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Ir!==null?{id:Dn,overflow:Pn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=en(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ht=e,Vt=null,!0):!1;default:return!1}}function Eo(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Co(e){if(Ye){var t=Vt;if(t){var n=t;if(!cc(e,t)){if(Eo(e))throw Error(l(418));t=Yn(n.nextSibling);var r=Ht;t&&cc(e,t)?uc(r,n):(e.flags=e.flags&-4097|2,Ye=!1,Ht=e)}}else{if(Eo(e))throw Error(l(418));e.flags=e.flags&-4097|2,Ye=!1,Ht=e}}}function dc(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ht=e}function Jl(e){if(e!==Ht)return!1;if(!Ye)return dc(e),Ye=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!yo(e.type,e.memoizedProps)),t&&(t=Vt)){if(Eo(e))throw fc(),Error(l(418));for(;t;)uc(e,t),t=Yn(t.nextSibling)}if(dc(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Vt=Yn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Vt=null}}else Vt=Ht?Yn(e.stateNode.nextSibling):null;return!0}function fc(){for(var e=Vt;e;)e=Yn(e.nextSibling)}function ds(){Vt=Ht=null,Ye=!1}function jo(e){sn===null?sn=[e]:sn.push(e)}var nh=O.ReactCurrentBatchConfig;function Ks(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(l(309));var r=n.stateNode}if(!r)throw Error(l(147,e));var o=r,u=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===u?t.ref:(t=function(p){var x=o.refs;p===null?delete x[u]:x[u]=p},t._stringRef=u,t)}if(typeof e!="string")throw Error(l(284));if(!n._owner)throw Error(l(290,e))}return e}function ei(e,t){throw e=Object.prototype.toString.call(t),Error(l(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function pc(e){var t=e._init;return t(e._payload)}function hc(e){function t(j,_){if(e){var R=j.deletions;R===null?(j.deletions=[_],j.flags|=16):R.push(_)}}function n(j,_){if(!e)return null;for(;_!==null;)t(j,_),_=_.sibling;return null}function r(j,_){for(j=new Map;_!==null;)_.key!==null?j.set(_.key,_):j.set(_.index,_),_=_.sibling;return j}function o(j,_){return j=or(j,_),j.index=0,j.sibling=null,j}function u(j,_,R){return j.index=R,e?(R=j.alternate,R!==null?(R=R.index,R<_?(j.flags|=2,_):R):(j.flags|=2,_)):(j.flags|=1048576,_)}function p(j){return e&&j.alternate===null&&(j.flags|=2),j}function x(j,_,R,G){return _===null||_.tag!==6?(_=xa(R,j.mode,G),_.return=j,_):(_=o(_,R),_.return=j,_)}function T(j,_,R,G){var ue=R.type;return ue===oe?B(j,_,R.props.children,G,R.key):_!==null&&(_.elementType===ue||typeof ue=="object"&&ue!==null&&ue.$$typeof===q&&pc(ue)===_.type)?(G=o(_,R.props),G.ref=Ks(j,_,R),G.return=j,G):(G=_i(R.type,R.key,R.props,null,j.mode,G),G.ref=Ks(j,_,R),G.return=j,G)}function L(j,_,R,G){return _===null||_.tag!==4||_.stateNode.containerInfo!==R.containerInfo||_.stateNode.implementation!==R.implementation?(_=ka(R,j.mode,G),_.return=j,_):(_=o(_,R.children||[]),_.return=j,_)}function B(j,_,R,G,ue){return _===null||_.tag!==7?(_=Fr(R,j.mode,G,ue),_.return=j,_):(_=o(_,R),_.return=j,_)}function W(j,_,R){if(typeof _=="string"&&_!==""||typeof _=="number")return _=xa(""+_,j.mode,R),_.return=j,_;if(typeof _=="object"&&_!==null){switch(_.$$typeof){case re:return R=_i(_.type,_.key,_.props,null,j.mode,R),R.ref=Ks(j,null,_),R.return=j,R;case fe:return _=ka(_,j.mode,R),_.return=j,_;case q:var G=_._init;return W(j,G(_._payload),R)}if(pn(_)||Y(_))return _=Fr(_,j.mode,R,null),_.return=j,_;ei(j,_)}return null}function U(j,_,R,G){var ue=_!==null?_.key:null;if(typeof R=="string"&&R!==""||typeof R=="number")return ue!==null?null:x(j,_,""+R,G);if(typeof R=="object"&&R!==null){switch(R.$$typeof){case re:return R.key===ue?T(j,_,R,G):null;case fe:return R.key===ue?L(j,_,R,G):null;case q:return ue=R._init,U(j,_,ue(R._payload),G)}if(pn(R)||Y(R))return ue!==null?null:B(j,_,R,G,null);ei(j,R)}return null}function ee(j,_,R,G,ue){if(typeof G=="string"&&G!==""||typeof G=="number")return j=j.get(R)||null,x(_,j,""+G,ue);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case re:return j=j.get(G.key===null?R:G.key)||null,T(_,j,G,ue);case fe:return j=j.get(G.key===null?R:G.key)||null,L(_,j,G,ue);case q:var me=G._init;return ee(j,_,R,me(G._payload),ue)}if(pn(G)||Y(G))return j=j.get(R)||null,B(_,j,G,ue,null);ei(_,G)}return null}function se(j,_,R,G){for(var ue=null,me=null,ge=_,ke=_=0,ft=null;ge!==null&&ke<R.length;ke++){ge.index>ke?(ft=ge,ge=null):ft=ge.sibling;var Oe=U(j,ge,R[ke],G);if(Oe===null){ge===null&&(ge=ft);break}e&&ge&&Oe.alternate===null&&t(j,ge),_=u(Oe,_,ke),me===null?ue=Oe:me.sibling=Oe,me=Oe,ge=ft}if(ke===R.length)return n(j,ge),Ye&&Ar(j,ke),ue;if(ge===null){for(;ke<R.length;ke++)ge=W(j,R[ke],G),ge!==null&&(_=u(ge,_,ke),me===null?ue=ge:me.sibling=ge,me=ge);return Ye&&Ar(j,ke),ue}for(ge=r(j,ge);ke<R.length;ke++)ft=ee(ge,j,ke,R[ke],G),ft!==null&&(e&&ft.alternate!==null&&ge.delete(ft.key===null?ke:ft.key),_=u(ft,_,ke),me===null?ue=ft:me.sibling=ft,me=ft);return e&&ge.forEach(function(ar){return t(j,ar)}),Ye&&Ar(j,ke),ue}function ie(j,_,R,G){var ue=Y(R);if(typeof ue!="function")throw Error(l(150));if(R=ue.call(R),R==null)throw Error(l(151));for(var me=ue=null,ge=_,ke=_=0,ft=null,Oe=R.next();ge!==null&&!Oe.done;ke++,Oe=R.next()){ge.index>ke?(ft=ge,ge=null):ft=ge.sibling;var ar=U(j,ge,Oe.value,G);if(ar===null){ge===null&&(ge=ft);break}e&&ge&&ar.alternate===null&&t(j,ge),_=u(ar,_,ke),me===null?ue=ar:me.sibling=ar,me=ar,ge=ft}if(Oe.done)return n(j,ge),Ye&&Ar(j,ke),ue;if(ge===null){for(;!Oe.done;ke++,Oe=R.next())Oe=W(j,Oe.value,G),Oe!==null&&(_=u(Oe,_,ke),me===null?ue=Oe:me.sibling=Oe,me=Oe);return Ye&&Ar(j,ke),ue}for(ge=r(j,ge);!Oe.done;ke++,Oe=R.next())Oe=ee(ge,j,ke,Oe.value,G),Oe!==null&&(e&&Oe.alternate!==null&&ge.delete(Oe.key===null?ke:Oe.key),_=u(Oe,_,ke),me===null?ue=Oe:me.sibling=Oe,me=Oe);return e&&ge.forEach(function(Mh){return t(j,Mh)}),Ye&&Ar(j,ke),ue}function st(j,_,R,G){if(typeof R=="object"&&R!==null&&R.type===oe&&R.key===null&&(R=R.props.children),typeof R=="object"&&R!==null){switch(R.$$typeof){case re:e:{for(var ue=R.key,me=_;me!==null;){if(me.key===ue){if(ue=R.type,ue===oe){if(me.tag===7){n(j,me.sibling),_=o(me,R.props.children),_.return=j,j=_;break e}}else if(me.elementType===ue||typeof ue=="object"&&ue!==null&&ue.$$typeof===q&&pc(ue)===me.type){n(j,me.sibling),_=o(me,R.props),_.ref=Ks(j,me,R),_.return=j,j=_;break e}n(j,me);break}else t(j,me);me=me.sibling}R.type===oe?(_=Fr(R.props.children,j.mode,G,R.key),_.return=j,j=_):(G=_i(R.type,R.key,R.props,null,j.mode,G),G.ref=Ks(j,_,R),G.return=j,j=G)}return p(j);case fe:e:{for(me=R.key;_!==null;){if(_.key===me)if(_.tag===4&&_.stateNode.containerInfo===R.containerInfo&&_.stateNode.implementation===R.implementation){n(j,_.sibling),_=o(_,R.children||[]),_.return=j,j=_;break e}else{n(j,_);break}else t(j,_);_=_.sibling}_=ka(R,j.mode,G),_.return=j,j=_}return p(j);case q:return me=R._init,st(j,_,me(R._payload),G)}if(pn(R))return se(j,_,R,G);if(Y(R))return ie(j,_,R,G);ei(j,R)}return typeof R=="string"&&R!==""||typeof R=="number"?(R=""+R,_!==null&&_.tag===6?(n(j,_.sibling),_=o(_,R),_.return=j,j=_):(n(j,_),_=xa(R,j.mode,G),_.return=j,j=_),p(j)):n(j,_)}return st}var fs=hc(!0),mc=hc(!1),ti=Xn(null),ni=null,ps=null,Ro=null;function Lo(){Ro=ps=ni=null}function Io(e){var t=ti.current;Ke(ti),e._currentValue=t}function Ao(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function hs(e,t){ni=e,Ro=ps=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(zt=!0),e.firstContext=null)}function Xt(e){var t=e._currentValue;if(Ro!==e)if(e={context:e,memoizedValue:t,next:null},ps===null){if(ni===null)throw Error(l(308));ps=e,ni.dependencies={lanes:0,firstContext:e}}else ps=ps.next=e;return t}var Dr=null;function Do(e){Dr===null?Dr=[e]:Dr.push(e)}function gc(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,Do(t)):(n.next=o.next,o.next=n),t.interleaved=n,Mn(e,r)}function Mn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var er=!1;function Po(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function vc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function bn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function tr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(Me&2)!==0){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Mn(e,n)}return o=r.interleaved,o===null?(t.next=t,Do(r)):(t.next=o.next,o.next=t),r.interleaved=t,Mn(e,n)}function ri(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Gn(e,n)}}function yc(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,u=null;if(n=n.firstBaseUpdate,n!==null){do{var p={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};u===null?o=u=p:u=u.next=p,n=n.next}while(n!==null);u===null?o=u=t:u=u.next=t}else o=u=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:u,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function si(e,t,n,r){var o=e.updateQueue;er=!1;var u=o.firstBaseUpdate,p=o.lastBaseUpdate,x=o.shared.pending;if(x!==null){o.shared.pending=null;var T=x,L=T.next;T.next=null,p===null?u=L:p.next=L,p=T;var B=e.alternate;B!==null&&(B=B.updateQueue,x=B.lastBaseUpdate,x!==p&&(x===null?B.firstBaseUpdate=L:x.next=L,B.lastBaseUpdate=T))}if(u!==null){var W=o.baseState;p=0,B=L=T=null,x=u;do{var U=x.lane,ee=x.eventTime;if((r&U)===U){B!==null&&(B=B.next={eventTime:ee,lane:0,tag:x.tag,payload:x.payload,callback:x.callback,next:null});e:{var se=e,ie=x;switch(U=t,ee=n,ie.tag){case 1:if(se=ie.payload,typeof se=="function"){W=se.call(ee,W,U);break e}W=se;break e;case 3:se.flags=se.flags&-65537|128;case 0:if(se=ie.payload,U=typeof se=="function"?se.call(ee,W,U):se,U==null)break e;W=H({},W,U);break e;case 2:er=!0}}x.callback!==null&&x.lane!==0&&(e.flags|=64,U=o.effects,U===null?o.effects=[x]:U.push(x))}else ee={eventTime:ee,lane:U,tag:x.tag,payload:x.payload,callback:x.callback,next:null},B===null?(L=B=ee,T=W):B=B.next=ee,p|=U;if(x=x.next,x===null){if(x=o.shared.pending,x===null)break;U=x,x=U.next,U.next=null,o.lastBaseUpdate=U,o.shared.pending=null}}while(!0);if(B===null&&(T=W),o.baseState=T,o.firstBaseUpdate=L,o.lastBaseUpdate=B,t=o.shared.interleaved,t!==null){o=t;do p|=o.lane,o=o.next;while(o!==t)}else u===null&&(o.shared.lanes=0);br|=p,e.lanes=p,e.memoizedState=W}}function xc(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(l(191,o));o.call(r)}}}var Ys={},xn=Xn(Ys),Xs=Xn(Ys),Zs=Xn(Ys);function Pr(e){if(e===Ys)throw Error(l(174));return e}function Mo(e,t){switch(Qe(Zs,t),Qe(Xs,e),Qe(xn,Ys),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:At(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=At(t,e)}Ke(xn),Qe(xn,t)}function ms(){Ke(xn),Ke(Xs),Ke(Zs)}function kc(e){Pr(Zs.current);var t=Pr(xn.current),n=At(t,e.type);t!==n&&(Qe(Xs,e),Qe(xn,n))}function bo(e){Xs.current===e&&(Ke(xn),Ke(Xs))}var et=Xn(0);function li(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var zo=[];function Oo(){for(var e=0;e<zo.length;e++)zo[e]._workInProgressVersionPrimary=null;zo.length=0}var ii=O.ReactCurrentDispatcher,$o=O.ReactCurrentBatchConfig,Mr=0,tt=null,at=null,ct=null,oi=!1,Js=!1,el=0,rh=0;function St(){throw Error(l(321))}function Fo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!rn(e[n],t[n]))return!1;return!0}function Uo(e,t,n,r,o,u){if(Mr=u,tt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ii.current=e===null||e.memoizedState===null?oh:ah,e=n(r,o),Js){u=0;do{if(Js=!1,el=0,25<=u)throw Error(l(301));u+=1,ct=at=null,t.updateQueue=null,ii.current=uh,e=n(r,o)}while(Js)}if(ii.current=ci,t=at!==null&&at.next!==null,Mr=0,ct=at=tt=null,oi=!1,t)throw Error(l(300));return e}function Bo(){var e=el!==0;return el=0,e}function kn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ct===null?tt.memoizedState=ct=e:ct=ct.next=e,ct}function Zt(){if(at===null){var e=tt.alternate;e=e!==null?e.memoizedState:null}else e=at.next;var t=ct===null?tt.memoizedState:ct.next;if(t!==null)ct=t,at=e;else{if(e===null)throw Error(l(310));at=e,e={memoizedState:at.memoizedState,baseState:at.baseState,baseQueue:at.baseQueue,queue:at.queue,next:null},ct===null?tt.memoizedState=ct=e:ct=ct.next=e}return ct}function tl(e,t){return typeof t=="function"?t(e):t}function Wo(e){var t=Zt(),n=t.queue;if(n===null)throw Error(l(311));n.lastRenderedReducer=e;var r=at,o=r.baseQueue,u=n.pending;if(u!==null){if(o!==null){var p=o.next;o.next=u.next,u.next=p}r.baseQueue=o=u,n.pending=null}if(o!==null){u=o.next,r=r.baseState;var x=p=null,T=null,L=u;do{var B=L.lane;if((Mr&B)===B)T!==null&&(T=T.next={lane:0,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null}),r=L.hasEagerState?L.eagerState:e(r,L.action);else{var W={lane:B,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null};T===null?(x=T=W,p=r):T=T.next=W,tt.lanes|=B,br|=B}L=L.next}while(L!==null&&L!==u);T===null?p=r:T.next=x,rn(r,t.memoizedState)||(zt=!0),t.memoizedState=r,t.baseState=p,t.baseQueue=T,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do u=o.lane,tt.lanes|=u,br|=u,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ho(e){var t=Zt(),n=t.queue;if(n===null)throw Error(l(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,u=t.memoizedState;if(o!==null){n.pending=null;var p=o=o.next;do u=e(u,p.action),p=p.next;while(p!==o);rn(u,t.memoizedState)||(zt=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),n.lastRenderedState=u}return[u,r]}function wc(){}function Sc(e,t){var n=tt,r=Zt(),o=t(),u=!rn(r.memoizedState,o);if(u&&(r.memoizedState=o,zt=!0),r=r.queue,Vo(Nc.bind(null,n,r,e),[e]),r.getSnapshot!==t||u||ct!==null&&ct.memoizedState.tag&1){if(n.flags|=2048,nl(9,_c.bind(null,n,r,o,t),void 0,null),dt===null)throw Error(l(349));(Mr&30)!==0||Tc(n,t,o)}return o}function Tc(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=tt.updateQueue,t===null?(t={lastEffect:null,stores:null},tt.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function _c(e,t,n,r){t.value=n,t.getSnapshot=r,Ec(t)&&Cc(e)}function Nc(e,t,n){return n(function(){Ec(t)&&Cc(e)})}function Ec(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!rn(e,n)}catch{return!0}}function Cc(e){var t=Mn(e,1);t!==null&&un(t,e,1,-1)}function jc(e){var t=kn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:tl,lastRenderedState:e},t.queue=e,e=e.dispatch=ih.bind(null,tt,e),[t.memoizedState,e]}function nl(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=tt.updateQueue,t===null?(t={lastEffect:null,stores:null},tt.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Rc(){return Zt().memoizedState}function ai(e,t,n,r){var o=kn();tt.flags|=e,o.memoizedState=nl(1|t,n,void 0,r===void 0?null:r)}function ui(e,t,n,r){var o=Zt();r=r===void 0?null:r;var u=void 0;if(at!==null){var p=at.memoizedState;if(u=p.destroy,r!==null&&Fo(r,p.deps)){o.memoizedState=nl(t,n,u,r);return}}tt.flags|=e,o.memoizedState=nl(1|t,n,u,r)}function Lc(e,t){return ai(8390656,8,e,t)}function Vo(e,t){return ui(2048,8,e,t)}function Ic(e,t){return ui(4,2,e,t)}function Ac(e,t){return ui(4,4,e,t)}function Dc(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Pc(e,t,n){return n=n!=null?n.concat([e]):null,ui(4,4,Dc.bind(null,t,e),n)}function Go(){}function Mc(e,t){var n=Zt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Fo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function bc(e,t){var n=Zt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Fo(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function zc(e,t,n){return(Mr&21)===0?(e.baseState&&(e.baseState=!1,zt=!0),e.memoizedState=n):(rn(n,t)||(n=As(),tt.lanes|=n,br|=n,e.baseState=!0),t)}function sh(e,t){var n=De;De=n!==0&&4>n?n:4,e(!0);var r=$o.transition;$o.transition={};try{e(!1),t()}finally{De=n,$o.transition=r}}function Oc(){return Zt().memoizedState}function lh(e,t,n){var r=lr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},$c(e))Fc(t,n);else if(n=gc(e,t,n,r),n!==null){var o=Rt();un(n,e,r,o),Uc(n,t,r)}}function ih(e,t,n){var r=lr(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if($c(e))Fc(t,o);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var p=t.lastRenderedState,x=u(p,n);if(o.hasEagerState=!0,o.eagerState=x,rn(x,p)){var T=t.interleaved;T===null?(o.next=o,Do(t)):(o.next=T.next,T.next=o),t.interleaved=o;return}}catch{}finally{}n=gc(e,t,o,r),n!==null&&(o=Rt(),un(n,e,r,o),Uc(n,t,r))}}function $c(e){var t=e.alternate;return e===tt||t!==null&&t===tt}function Fc(e,t){Js=oi=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Uc(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Gn(e,n)}}var ci={readContext:Xt,useCallback:St,useContext:St,useEffect:St,useImperativeHandle:St,useInsertionEffect:St,useLayoutEffect:St,useMemo:St,useReducer:St,useRef:St,useState:St,useDebugValue:St,useDeferredValue:St,useTransition:St,useMutableSource:St,useSyncExternalStore:St,useId:St,unstable_isNewReconciler:!1},oh={readContext:Xt,useCallback:function(e,t){return kn().memoizedState=[e,t===void 0?null:t],e},useContext:Xt,useEffect:Lc,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ai(4194308,4,Dc.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ai(4194308,4,e,t)},useInsertionEffect:function(e,t){return ai(4,2,e,t)},useMemo:function(e,t){var n=kn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=kn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=lh.bind(null,tt,e),[r.memoizedState,e]},useRef:function(e){var t=kn();return e={current:e},t.memoizedState=e},useState:jc,useDebugValue:Go,useDeferredValue:function(e){return kn().memoizedState=e},useTransition:function(){var e=jc(!1),t=e[0];return e=sh.bind(null,e[1]),kn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=tt,o=kn();if(Ye){if(n===void 0)throw Error(l(407));n=n()}else{if(n=t(),dt===null)throw Error(l(349));(Mr&30)!==0||Tc(r,t,n)}o.memoizedState=n;var u={value:n,getSnapshot:t};return o.queue=u,Lc(Nc.bind(null,r,u,e),[e]),r.flags|=2048,nl(9,_c.bind(null,r,u,n,t),void 0,null),n},useId:function(){var e=kn(),t=dt.identifierPrefix;if(Ye){var n=Pn,r=Dn;n=(r&~(1<<32-Et(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=el++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=rh++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},ah={readContext:Xt,useCallback:Mc,useContext:Xt,useEffect:Vo,useImperativeHandle:Pc,useInsertionEffect:Ic,useLayoutEffect:Ac,useMemo:bc,useReducer:Wo,useRef:Rc,useState:function(){return Wo(tl)},useDebugValue:Go,useDeferredValue:function(e){var t=Zt();return zc(t,at.memoizedState,e)},useTransition:function(){var e=Wo(tl)[0],t=Zt().memoizedState;return[e,t]},useMutableSource:wc,useSyncExternalStore:Sc,useId:Oc,unstable_isNewReconciler:!1},uh={readContext:Xt,useCallback:Mc,useContext:Xt,useEffect:Vo,useImperativeHandle:Pc,useInsertionEffect:Ic,useLayoutEffect:Ac,useMemo:bc,useReducer:Ho,useRef:Rc,useState:function(){return Ho(tl)},useDebugValue:Go,useDeferredValue:function(e){var t=Zt();return at===null?t.memoizedState=e:zc(t,at.memoizedState,e)},useTransition:function(){var e=Ho(tl)[0],t=Zt().memoizedState;return[e,t]},useMutableSource:wc,useSyncExternalStore:Sc,useId:Oc,unstable_isNewReconciler:!1};function ln(e,t){if(e&&e.defaultProps){t=H({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Qo(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:H({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var di={isMounted:function(e){return(e=e._reactInternals)?$e(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Rt(),o=lr(e),u=bn(r,o);u.payload=t,n!=null&&(u.callback=n),t=tr(e,u,o),t!==null&&(un(t,e,o,r),ri(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Rt(),o=lr(e),u=bn(r,o);u.tag=1,u.payload=t,n!=null&&(u.callback=n),t=tr(e,u,o),t!==null&&(un(t,e,o,r),ri(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Rt(),r=lr(e),o=bn(n,r);o.tag=2,t!=null&&(o.callback=t),t=tr(e,o,r),t!==null&&(un(t,e,r,n),ri(t,e,r))}};function Bc(e,t,n,r,o,u,p){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,u,p):t.prototype&&t.prototype.isPureReactComponent?!Bs(n,r)||!Bs(o,u):!0}function Wc(e,t,n){var r=!1,o=Zn,u=t.contextType;return typeof u=="object"&&u!==null?u=Xt(u):(o=bt(t)?Lr:wt.current,r=t.contextTypes,u=(r=r!=null)?as(e,o):Zn),t=new t(n,u),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=di,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=u),t}function Hc(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&di.enqueueReplaceState(t,t.state,null)}function qo(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},Po(e);var u=t.contextType;typeof u=="object"&&u!==null?o.context=Xt(u):(u=bt(t)?Lr:wt.current,o.context=as(e,u)),o.state=e.memoizedState,u=t.getDerivedStateFromProps,typeof u=="function"&&(Qo(e,t,u,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&di.enqueueReplaceState(o,o.state,null),si(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function gs(e,t){try{var n="",r=t;do n+=Ne(r),r=r.return;while(r);var o=n}catch(u){o=`
|
|
39
|
-
Error generating stack: `+u.message+`
|
|
40
|
-
`+u.stack}return{value:e,source:t,stack:o,digest:null}}function Ko(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Yo(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var ch=typeof WeakMap=="function"?WeakMap:Map;function Vc(e,t,n){n=bn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){yi||(yi=!0,da=r),Yo(e,t)},n}function Gc(e,t,n){n=bn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){Yo(e,t)}}var u=e.stateNode;return u!==null&&typeof u.componentDidCatch=="function"&&(n.callback=function(){Yo(e,t),typeof r!="function"&&(rr===null?rr=new Set([this]):rr.add(this));var p=t.stack;this.componentDidCatch(t.value,{componentStack:p!==null?p:""})}),n}function Qc(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new ch;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=_h.bind(null,e,t,n),t.then(e,e))}function qc(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Kc(e,t,n,r,o){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=bn(-1,1),t.tag=2,tr(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var dh=O.ReactCurrentOwner,zt=!1;function jt(e,t,n,r){t.child=e===null?mc(t,null,n,r):fs(t,e.child,n,r)}function Yc(e,t,n,r,o){n=n.render;var u=t.ref;return hs(t,o),r=Uo(e,t,n,r,u,o),n=Bo(),e!==null&&!zt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,zn(e,t,o)):(Ye&&n&&_o(t),t.flags|=1,jt(e,t,r,o),t.child)}function Xc(e,t,n,r,o){if(e===null){var u=n.type;return typeof u=="function"&&!ya(u)&&u.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=u,Zc(e,t,u,r,o)):(e=_i(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,(e.lanes&o)===0){var p=u.memoizedProps;if(n=n.compare,n=n!==null?n:Bs,n(p,r)&&e.ref===t.ref)return zn(e,t,o)}return t.flags|=1,e=or(u,r),e.ref=t.ref,e.return=t,t.child=e}function Zc(e,t,n,r,o){if(e!==null){var u=e.memoizedProps;if(Bs(u,r)&&e.ref===t.ref)if(zt=!1,t.pendingProps=r=u,(e.lanes&o)!==0)(e.flags&131072)!==0&&(zt=!0);else return t.lanes=e.lanes,zn(e,t,o)}return Xo(e,t,n,r,o)}function Jc(e,t,n){var r=t.pendingProps,o=r.children,u=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Qe(ys,Gt),Gt|=n;else{if((n&1073741824)===0)return e=u!==null?u.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Qe(ys,Gt),Gt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=u!==null?u.baseLanes:n,Qe(ys,Gt),Gt|=r}else u!==null?(r=u.baseLanes|n,t.memoizedState=null):r=n,Qe(ys,Gt),Gt|=r;return jt(e,t,o,n),t.child}function ed(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Xo(e,t,n,r,o){var u=bt(n)?Lr:wt.current;return u=as(t,u),hs(t,o),n=Uo(e,t,n,r,u,o),r=Bo(),e!==null&&!zt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,zn(e,t,o)):(Ye&&r&&_o(t),t.flags|=1,jt(e,t,n,o),t.child)}function td(e,t,n,r,o){if(bt(n)){var u=!0;Kl(t)}else u=!1;if(hs(t,o),t.stateNode===null)pi(e,t),Wc(t,n,r),qo(t,n,r,o),r=!0;else if(e===null){var p=t.stateNode,x=t.memoizedProps;p.props=x;var T=p.context,L=n.contextType;typeof L=="object"&&L!==null?L=Xt(L):(L=bt(n)?Lr:wt.current,L=as(t,L));var B=n.getDerivedStateFromProps,W=typeof B=="function"||typeof p.getSnapshotBeforeUpdate=="function";W||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(x!==r||T!==L)&&Hc(t,p,r,L),er=!1;var U=t.memoizedState;p.state=U,si(t,r,p,o),T=t.memoizedState,x!==r||U!==T||Mt.current||er?(typeof B=="function"&&(Qo(t,n,B,r),T=t.memoizedState),(x=er||Bc(t,n,x,r,U,T,L))?(W||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount()),typeof p.componentDidMount=="function"&&(t.flags|=4194308)):(typeof p.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=T),p.props=r,p.state=T,p.context=L,r=x):(typeof p.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{p=t.stateNode,vc(e,t),x=t.memoizedProps,L=t.type===t.elementType?x:ln(t.type,x),p.props=L,W=t.pendingProps,U=p.context,T=n.contextType,typeof T=="object"&&T!==null?T=Xt(T):(T=bt(n)?Lr:wt.current,T=as(t,T));var ee=n.getDerivedStateFromProps;(B=typeof ee=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(x!==W||U!==T)&&Hc(t,p,r,T),er=!1,U=t.memoizedState,p.state=U,si(t,r,p,o);var se=t.memoizedState;x!==W||U!==se||Mt.current||er?(typeof ee=="function"&&(Qo(t,n,ee,r),se=t.memoizedState),(L=er||Bc(t,n,L,r,U,se,T)||!1)?(B||typeof p.UNSAFE_componentWillUpdate!="function"&&typeof p.componentWillUpdate!="function"||(typeof p.componentWillUpdate=="function"&&p.componentWillUpdate(r,se,T),typeof p.UNSAFE_componentWillUpdate=="function"&&p.UNSAFE_componentWillUpdate(r,se,T)),typeof p.componentDidUpdate=="function"&&(t.flags|=4),typeof p.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof p.componentDidUpdate!="function"||x===e.memoizedProps&&U===e.memoizedState||(t.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&U===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=se),p.props=r,p.state=se,p.context=T,r=L):(typeof p.componentDidUpdate!="function"||x===e.memoizedProps&&U===e.memoizedState||(t.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&U===e.memoizedState||(t.flags|=1024),r=!1)}return Zo(e,t,n,r,u,o)}function Zo(e,t,n,r,o,u){ed(e,t);var p=(t.flags&128)!==0;if(!r&&!p)return o&&ic(t,n,!1),zn(e,t,u);r=t.stateNode,dh.current=t;var x=p&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&p?(t.child=fs(t,e.child,null,u),t.child=fs(t,null,x,u)):jt(e,t,x,u),t.memoizedState=r.state,o&&ic(t,n,!0),t.child}function nd(e){var t=e.stateNode;t.pendingContext?sc(e,t.pendingContext,t.pendingContext!==t.context):t.context&&sc(e,t.context,!1),Mo(e,t.containerInfo)}function rd(e,t,n,r,o){return ds(),jo(o),t.flags|=256,jt(e,t,n,r),t.child}var Jo={dehydrated:null,treeContext:null,retryLane:0};function ea(e){return{baseLanes:e,cachePool:null,transitions:null}}function sd(e,t,n){var r=t.pendingProps,o=et.current,u=!1,p=(t.flags&128)!==0,x;if((x=p)||(x=e!==null&&e.memoizedState===null?!1:(o&2)!==0),x?(u=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),Qe(et,o&1),e===null)return Co(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(p=r.children,e=r.fallback,u?(r=t.mode,u=t.child,p={mode:"hidden",children:p},(r&1)===0&&u!==null?(u.childLanes=0,u.pendingProps=p):u=Ni(p,r,0,null),e=Fr(e,r,n,null),u.return=t,e.return=t,u.sibling=e,t.child=u,t.child.memoizedState=ea(n),t.memoizedState=Jo,e):ta(t,p));if(o=e.memoizedState,o!==null&&(x=o.dehydrated,x!==null))return fh(e,t,p,r,x,o,n);if(u){u=r.fallback,p=t.mode,o=e.child,x=o.sibling;var T={mode:"hidden",children:r.children};return(p&1)===0&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=T,t.deletions=null):(r=or(o,T),r.subtreeFlags=o.subtreeFlags&14680064),x!==null?u=or(x,u):(u=Fr(u,p,n,null),u.flags|=2),u.return=t,r.return=t,r.sibling=u,t.child=r,r=u,u=t.child,p=e.child.memoizedState,p=p===null?ea(n):{baseLanes:p.baseLanes|n,cachePool:null,transitions:p.transitions},u.memoizedState=p,u.childLanes=e.childLanes&~n,t.memoizedState=Jo,r}return u=e.child,e=u.sibling,r=or(u,{mode:"visible",children:r.children}),(t.mode&1)===0&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function ta(e,t){return t=Ni({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function fi(e,t,n,r){return r!==null&&jo(r),fs(t,e.child,null,n),e=ta(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function fh(e,t,n,r,o,u,p){if(n)return t.flags&256?(t.flags&=-257,r=Ko(Error(l(422))),fi(e,t,p,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(u=r.fallback,o=t.mode,r=Ni({mode:"visible",children:r.children},o,0,null),u=Fr(u,o,p,null),u.flags|=2,r.return=t,u.return=t,r.sibling=u,t.child=r,(t.mode&1)!==0&&fs(t,e.child,null,p),t.child.memoizedState=ea(p),t.memoizedState=Jo,u);if((t.mode&1)===0)return fi(e,t,p,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var x=r.dgst;return r=x,u=Error(l(419)),r=Ko(u,r,void 0),fi(e,t,p,r)}if(x=(p&e.childLanes)!==0,zt||x){if(r=dt,r!==null){switch(p&-p){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=(o&(r.suspendedLanes|p))!==0?0:o,o!==0&&o!==u.retryLane&&(u.retryLane=o,Mn(e,o),un(r,e,o,-1))}return va(),r=Ko(Error(l(421))),fi(e,t,p,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=Nh.bind(null,e),o._reactRetry=t,null):(e=u.treeContext,Vt=Yn(o.nextSibling),Ht=t,Ye=!0,sn=null,e!==null&&(Kt[Yt++]=Dn,Kt[Yt++]=Pn,Kt[Yt++]=Ir,Dn=e.id,Pn=e.overflow,Ir=t),t=ta(t,r.children),t.flags|=4096,t)}function ld(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ao(e.return,t,n)}function na(e,t,n,r,o){var u=e.memoizedState;u===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(u.isBackwards=t,u.rendering=null,u.renderingStartTime=0,u.last=r,u.tail=n,u.tailMode=o)}function id(e,t,n){var r=t.pendingProps,o=r.revealOrder,u=r.tail;if(jt(e,t,r.children,n),r=et.current,(r&2)!==0)r=r&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&ld(e,n,t);else if(e.tag===19)ld(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Qe(et,r),(t.mode&1)===0)t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&li(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),na(t,!1,o,n,u);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&li(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}na(t,!0,n,null,u);break;case"together":na(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function pi(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function zn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),br|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(l(153));if(t.child!==null){for(e=t.child,n=or(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=or(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function ph(e,t,n){switch(t.tag){case 3:nd(t),ds();break;case 5:kc(t);break;case 1:bt(t.type)&&Kl(t);break;case 4:Mo(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;Qe(ti,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Qe(et,et.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?sd(e,t,n):(Qe(et,et.current&1),e=zn(e,t,n),e!==null?e.sibling:null);Qe(et,et.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return id(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Qe(et,et.current),r)break;return null;case 22:case 23:return t.lanes=0,Jc(e,t,n)}return zn(e,t,n)}var od,ra,ad,ud;od=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},ra=function(){},ad=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Pr(xn.current);var u=null;switch(n){case"input":o=be(e,o),r=be(e,r),u=[];break;case"select":o=H({},o,{value:void 0}),r=H({},r,{value:void 0}),u=[];break;case"textarea":o=he(e,o),r=he(e,r),u=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Gl)}Gr(n,r);var p;n=null;for(L in o)if(!r.hasOwnProperty(L)&&o.hasOwnProperty(L)&&o[L]!=null)if(L==="style"){var x=o[L];for(p in x)x.hasOwnProperty(p)&&(n||(n={}),n[p]="")}else L!=="dangerouslySetInnerHTML"&&L!=="children"&&L!=="suppressContentEditableWarning"&&L!=="suppressHydrationWarning"&&L!=="autoFocus"&&(d.hasOwnProperty(L)?u||(u=[]):(u=u||[]).push(L,null));for(L in r){var T=r[L];if(x=o!=null?o[L]:void 0,r.hasOwnProperty(L)&&T!==x&&(T!=null||x!=null))if(L==="style")if(x){for(p in x)!x.hasOwnProperty(p)||T&&T.hasOwnProperty(p)||(n||(n={}),n[p]="");for(p in T)T.hasOwnProperty(p)&&x[p]!==T[p]&&(n||(n={}),n[p]=T[p])}else n||(u||(u=[]),u.push(L,n)),n=T;else L==="dangerouslySetInnerHTML"?(T=T?T.__html:void 0,x=x?x.__html:void 0,T!=null&&x!==T&&(u=u||[]).push(L,T)):L==="children"?typeof T!="string"&&typeof T!="number"||(u=u||[]).push(L,""+T):L!=="suppressContentEditableWarning"&&L!=="suppressHydrationWarning"&&(d.hasOwnProperty(L)?(T!=null&&L==="onScroll"&&qe("scroll",e),u||x===T||(u=[])):(u=u||[]).push(L,T))}n&&(u=u||[]).push("style",n);var L=u;(t.updateQueue=L)&&(t.flags|=4)}},ud=function(e,t,n,r){n!==r&&(t.flags|=4)};function rl(e,t){if(!Ye)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Tt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function hh(e,t,n){var r=t.pendingProps;switch(No(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Tt(t),null;case 1:return bt(t.type)&&ql(),Tt(t),null;case 3:return r=t.stateNode,ms(),Ke(Mt),Ke(wt),Oo(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Jl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,sn!==null&&(ha(sn),sn=null))),ra(e,t),Tt(t),null;case 5:bo(t);var o=Pr(Zs.current);if(n=t.type,e!==null&&t.stateNode!=null)ad(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(l(166));return Tt(t),null}if(e=Pr(xn.current),Jl(t)){r=t.stateNode,n=t.type;var u=t.memoizedProps;switch(r[yn]=t,r[Qs]=u,e=(t.mode&1)!==0,n){case"dialog":qe("cancel",r),qe("close",r);break;case"iframe":case"object":case"embed":qe("load",r);break;case"video":case"audio":for(o=0;o<Hs.length;o++)qe(Hs[o],r);break;case"source":qe("error",r);break;case"img":case"image":case"link":qe("error",r),qe("load",r);break;case"details":qe("toggle",r);break;case"input":Un(r,u),qe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!u.multiple},qe("invalid",r);break;case"textarea":We(r,u),qe("invalid",r)}Gr(n,u),o=null;for(var p in u)if(u.hasOwnProperty(p)){var x=u[p];p==="children"?typeof x=="string"?r.textContent!==x&&(u.suppressHydrationWarning!==!0&&Vl(r.textContent,x,e),o=["children",x]):typeof x=="number"&&r.textContent!==""+x&&(u.suppressHydrationWarning!==!0&&Vl(r.textContent,x,e),o=["children",""+x]):d.hasOwnProperty(p)&&x!=null&&p==="onScroll"&&qe("scroll",r)}switch(n){case"input":dn(r),pr(r,u,!0);break;case"textarea":dn(r),ot(r);break;case"select":case"option":break;default:typeof u.onClick=="function"&&(r.onclick=Gl)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{p=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=kt(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=p.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=p.createElement(n,{is:r.is}):(e=p.createElement(n),n==="select"&&(p=e,r.multiple?p.multiple=!0:r.size&&(p.size=r.size))):e=p.createElementNS(e,n),e[yn]=t,e[Qs]=r,od(e,t,!1,!1),t.stateNode=e;e:{switch(p=gr(n,r),n){case"dialog":qe("cancel",e),qe("close",e),o=r;break;case"iframe":case"object":case"embed":qe("load",e),o=r;break;case"video":case"audio":for(o=0;o<Hs.length;o++)qe(Hs[o],e);o=r;break;case"source":qe("error",e),o=r;break;case"img":case"image":case"link":qe("error",e),qe("load",e),o=r;break;case"details":qe("toggle",e),o=r;break;case"input":Un(e,r),o=be(e,r),qe("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=H({},r,{value:void 0}),qe("invalid",e);break;case"textarea":We(e,r),o=he(e,r),qe("invalid",e);break;default:o=r}Gr(n,o),x=o;for(u in x)if(x.hasOwnProperty(u)){var T=x[u];u==="style"?Ns(e,T):u==="dangerouslySetInnerHTML"?(T=T?T.__html:void 0,T!=null&&hr(e,T)):u==="children"?typeof T=="string"?(n!=="textarea"||T!=="")&&_n(e,T):typeof T=="number"&&_n(e,""+T):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(d.hasOwnProperty(u)?T!=null&&u==="onScroll"&&qe("scroll",e):T!=null&&J(e,u,T,p))}switch(n){case"input":dn(e),pr(e,r,!1);break;case"textarea":dn(e),ot(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Ae(r.value));break;case"select":e.multiple=!!r.multiple,u=r.value,u!=null?b(e,!!r.multiple,u,!1):r.defaultValue!=null&&b(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Gl)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Tt(t),null;case 6:if(e&&t.stateNode!=null)ud(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(l(166));if(n=Pr(Zs.current),Pr(xn.current),Jl(t)){if(r=t.stateNode,n=t.memoizedProps,r[yn]=t,(u=r.nodeValue!==n)&&(e=Ht,e!==null))switch(e.tag){case 3:Vl(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Vl(r.nodeValue,n,(e.mode&1)!==0)}u&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[yn]=t,t.stateNode=r}return Tt(t),null;case 13:if(Ke(et),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ye&&Vt!==null&&(t.mode&1)!==0&&(t.flags&128)===0)fc(),ds(),t.flags|=98560,u=!1;else if(u=Jl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!u)throw Error(l(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(l(317));u[yn]=t}else ds(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Tt(t),u=!1}else sn!==null&&(ha(sn),sn=null),u=!0;if(!u)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(et.current&1)!==0?ut===0&&(ut=3):va())),t.updateQueue!==null&&(t.flags|=4),Tt(t),null);case 4:return ms(),ra(e,t),e===null&&Vs(t.stateNode.containerInfo),Tt(t),null;case 10:return Io(t.type._context),Tt(t),null;case 17:return bt(t.type)&&ql(),Tt(t),null;case 19:if(Ke(et),u=t.memoizedState,u===null)return Tt(t),null;if(r=(t.flags&128)!==0,p=u.rendering,p===null)if(r)rl(u,!1);else{if(ut!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(p=li(e),p!==null){for(t.flags|=128,rl(u,!1),r=p.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)u=n,e=r,u.flags&=14680066,p=u.alternate,p===null?(u.childLanes=0,u.lanes=e,u.child=null,u.subtreeFlags=0,u.memoizedProps=null,u.memoizedState=null,u.updateQueue=null,u.dependencies=null,u.stateNode=null):(u.childLanes=p.childLanes,u.lanes=p.lanes,u.child=p.child,u.subtreeFlags=0,u.deletions=null,u.memoizedProps=p.memoizedProps,u.memoizedState=p.memoizedState,u.updateQueue=p.updateQueue,u.type=p.type,e=p.dependencies,u.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Qe(et,et.current&1|2),t.child}e=e.sibling}u.tail!==null&&Xe()>xs&&(t.flags|=128,r=!0,rl(u,!1),t.lanes=4194304)}else{if(!r)if(e=li(p),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),rl(u,!0),u.tail===null&&u.tailMode==="hidden"&&!p.alternate&&!Ye)return Tt(t),null}else 2*Xe()-u.renderingStartTime>xs&&n!==1073741824&&(t.flags|=128,r=!0,rl(u,!1),t.lanes=4194304);u.isBackwards?(p.sibling=t.child,t.child=p):(n=u.last,n!==null?n.sibling=p:t.child=p,u.last=p)}return u.tail!==null?(t=u.tail,u.rendering=t,u.tail=t.sibling,u.renderingStartTime=Xe(),t.sibling=null,n=et.current,Qe(et,r?n&1|2:n&1),t):(Tt(t),null);case 22:case 23:return ga(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(Gt&1073741824)!==0&&(Tt(t),t.subtreeFlags&6&&(t.flags|=8192)):Tt(t),null;case 24:return null;case 25:return null}throw Error(l(156,t.tag))}function mh(e,t){switch(No(t),t.tag){case 1:return bt(t.type)&&ql(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ms(),Ke(Mt),Ke(wt),Oo(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return bo(t),null;case 13:if(Ke(et),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(l(340));ds()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ke(et),null;case 4:return ms(),null;case 10:return Io(t.type._context),null;case 22:case 23:return ga(),null;case 24:return null;default:return null}}var hi=!1,_t=!1,gh=typeof WeakSet=="function"?WeakSet:Set,ne=null;function vs(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){nt(e,t,r)}else n.current=null}function sa(e,t,n){try{n()}catch(r){nt(e,t,r)}}var cd=!1;function vh(e,t){if(go=Pl,e=Bu(),oo(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,u=r.focusNode;r=r.focusOffset;try{n.nodeType,u.nodeType}catch{n=null;break e}var p=0,x=-1,T=-1,L=0,B=0,W=e,U=null;t:for(;;){for(var ee;W!==n||o!==0&&W.nodeType!==3||(x=p+o),W!==u||r!==0&&W.nodeType!==3||(T=p+r),W.nodeType===3&&(p+=W.nodeValue.length),(ee=W.firstChild)!==null;)U=W,W=ee;for(;;){if(W===e)break t;if(U===n&&++L===o&&(x=p),U===u&&++B===r&&(T=p),(ee=W.nextSibling)!==null)break;W=U,U=W.parentNode}W=ee}n=x===-1||T===-1?null:{start:x,end:T}}else n=null}n=n||{start:0,end:0}}else n=null;for(vo={focusedElem:e,selectionRange:n},Pl=!1,ne=t;ne!==null;)if(t=ne,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ne=e;else for(;ne!==null;){t=ne;try{var se=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(se!==null){var ie=se.memoizedProps,st=se.memoizedState,j=t.stateNode,_=j.getSnapshotBeforeUpdate(t.elementType===t.type?ie:ln(t.type,ie),st);j.__reactInternalSnapshotBeforeUpdate=_}break;case 3:var R=t.stateNode.containerInfo;R.nodeType===1?R.textContent="":R.nodeType===9&&R.documentElement&&R.removeChild(R.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(l(163))}}catch(G){nt(t,t.return,G)}if(e=t.sibling,e!==null){e.return=t.return,ne=e;break}ne=t.return}return se=cd,cd=!1,se}function sl(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var u=o.destroy;o.destroy=void 0,u!==void 0&&sa(t,n,u)}o=o.next}while(o!==r)}}function mi(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function la(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function dd(e){var t=e.alternate;t!==null&&(e.alternate=null,dd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[yn],delete t[Qs],delete t[wo],delete t[Jp],delete t[eh])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function fd(e){return e.tag===5||e.tag===3||e.tag===4}function pd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||fd(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ia(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Gl));else if(r!==4&&(e=e.child,e!==null))for(ia(e,t,n),e=e.sibling;e!==null;)ia(e,t,n),e=e.sibling}function oa(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(oa(e,t,n),e=e.sibling;e!==null;)oa(e,t,n),e=e.sibling}var gt=null,on=!1;function nr(e,t,n){for(n=n.child;n!==null;)hd(e,t,n),n=n.sibling}function hd(e,t,n){if(Bt&&typeof Bt.onCommitFiberUnmount=="function")try{Bt.onCommitFiberUnmount(_r,n)}catch{}switch(n.tag){case 5:_t||vs(n,t);case 6:var r=gt,o=on;gt=null,nr(e,t,n),gt=r,on=o,gt!==null&&(on?(e=gt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):gt.removeChild(n.stateNode));break;case 18:gt!==null&&(on?(e=gt,n=n.stateNode,e.nodeType===8?ko(e.parentNode,n):e.nodeType===1&&ko(e,n),bs(e)):ko(gt,n.stateNode));break;case 4:r=gt,o=on,gt=n.stateNode.containerInfo,on=!0,nr(e,t,n),gt=r,on=o;break;case 0:case 11:case 14:case 15:if(!_t&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var u=o,p=u.destroy;u=u.tag,p!==void 0&&((u&2)!==0||(u&4)!==0)&&sa(n,t,p),o=o.next}while(o!==r)}nr(e,t,n);break;case 1:if(!_t&&(vs(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(x){nt(n,t,x)}nr(e,t,n);break;case 21:nr(e,t,n);break;case 22:n.mode&1?(_t=(r=_t)||n.memoizedState!==null,nr(e,t,n),_t=r):nr(e,t,n);break;default:nr(e,t,n)}}function md(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new gh),t.forEach(function(r){var o=Eh.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function an(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var u=e,p=t,x=p;e:for(;x!==null;){switch(x.tag){case 5:gt=x.stateNode,on=!1;break e;case 3:gt=x.stateNode.containerInfo,on=!0;break e;case 4:gt=x.stateNode.containerInfo,on=!0;break e}x=x.return}if(gt===null)throw Error(l(160));hd(u,p,o),gt=null,on=!1;var T=o.alternate;T!==null&&(T.return=null),o.return=null}catch(L){nt(o,t,L)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)gd(t,e),t=t.sibling}function gd(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(an(t,e),wn(e),r&4){try{sl(3,e,e.return),mi(3,e)}catch(ie){nt(e,e.return,ie)}try{sl(5,e,e.return)}catch(ie){nt(e,e.return,ie)}}break;case 1:an(t,e),wn(e),r&512&&n!==null&&vs(n,n.return);break;case 5:if(an(t,e),wn(e),r&512&&n!==null&&vs(n,n.return),e.flags&32){var o=e.stateNode;try{_n(o,"")}catch(ie){nt(e,e.return,ie)}}if(r&4&&(o=e.stateNode,o!=null)){var u=e.memoizedProps,p=n!==null?n.memoizedProps:u,x=e.type,T=e.updateQueue;if(e.updateQueue=null,T!==null)try{x==="input"&&u.type==="radio"&&u.name!=null&&He(o,u),gr(x,p);var L=gr(x,u);for(p=0;p<T.length;p+=2){var B=T[p],W=T[p+1];B==="style"?Ns(o,W):B==="dangerouslySetInnerHTML"?hr(o,W):B==="children"?_n(o,W):J(o,B,W,L)}switch(x){case"input":Ut(o,u);break;case"textarea":Ve(o,u);break;case"select":var U=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!u.multiple;var ee=u.value;ee!=null?b(o,!!u.multiple,ee,!1):U!==!!u.multiple&&(u.defaultValue!=null?b(o,!!u.multiple,u.defaultValue,!0):b(o,!!u.multiple,u.multiple?[]:"",!1))}o[Qs]=u}catch(ie){nt(e,e.return,ie)}}break;case 6:if(an(t,e),wn(e),r&4){if(e.stateNode===null)throw Error(l(162));o=e.stateNode,u=e.memoizedProps;try{o.nodeValue=u}catch(ie){nt(e,e.return,ie)}}break;case 3:if(an(t,e),wn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{bs(t.containerInfo)}catch(ie){nt(e,e.return,ie)}break;case 4:an(t,e),wn(e);break;case 13:an(t,e),wn(e),o=e.child,o.flags&8192&&(u=o.memoizedState!==null,o.stateNode.isHidden=u,!u||o.alternate!==null&&o.alternate.memoizedState!==null||(ca=Xe())),r&4&&md(e);break;case 22:if(B=n!==null&&n.memoizedState!==null,e.mode&1?(_t=(L=_t)||B,an(t,e),_t=L):an(t,e),wn(e),r&8192){if(L=e.memoizedState!==null,(e.stateNode.isHidden=L)&&!B&&(e.mode&1)!==0)for(ne=e,B=e.child;B!==null;){for(W=ne=B;ne!==null;){switch(U=ne,ee=U.child,U.tag){case 0:case 11:case 14:case 15:sl(4,U,U.return);break;case 1:vs(U,U.return);var se=U.stateNode;if(typeof se.componentWillUnmount=="function"){r=U,n=U.return;try{t=r,se.props=t.memoizedProps,se.state=t.memoizedState,se.componentWillUnmount()}catch(ie){nt(r,n,ie)}}break;case 5:vs(U,U.return);break;case 22:if(U.memoizedState!==null){xd(W);continue}}ee!==null?(ee.return=U,ne=ee):xd(W)}B=B.sibling}e:for(B=null,W=e;;){if(W.tag===5){if(B===null){B=W;try{o=W.stateNode,L?(u=o.style,typeof u.setProperty=="function"?u.setProperty("display","none","important"):u.display="none"):(x=W.stateNode,T=W.memoizedProps.style,p=T!=null&&T.hasOwnProperty("display")?T.display:null,x.style.display=mr("display",p))}catch(ie){nt(e,e.return,ie)}}}else if(W.tag===6){if(B===null)try{W.stateNode.nodeValue=L?"":W.memoizedProps}catch(ie){nt(e,e.return,ie)}}else if((W.tag!==22&&W.tag!==23||W.memoizedState===null||W===e)&&W.child!==null){W.child.return=W,W=W.child;continue}if(W===e)break e;for(;W.sibling===null;){if(W.return===null||W.return===e)break e;B===W&&(B=null),W=W.return}B===W&&(B=null),W.sibling.return=W.return,W=W.sibling}}break;case 19:an(t,e),wn(e),r&4&&md(e);break;case 21:break;default:an(t,e),wn(e)}}function wn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(fd(n)){var r=n;break e}n=n.return}throw Error(l(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(_n(o,""),r.flags&=-33);var u=pd(e);oa(e,u,o);break;case 3:case 4:var p=r.stateNode.containerInfo,x=pd(e);ia(e,x,p);break;default:throw Error(l(161))}}catch(T){nt(e,e.return,T)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function yh(e,t,n){ne=e,vd(e)}function vd(e,t,n){for(var r=(e.mode&1)!==0;ne!==null;){var o=ne,u=o.child;if(o.tag===22&&r){var p=o.memoizedState!==null||hi;if(!p){var x=o.alternate,T=x!==null&&x.memoizedState!==null||_t;x=hi;var L=_t;if(hi=p,(_t=T)&&!L)for(ne=o;ne!==null;)p=ne,T=p.child,p.tag===22&&p.memoizedState!==null?kd(o):T!==null?(T.return=p,ne=T):kd(o);for(;u!==null;)ne=u,vd(u),u=u.sibling;ne=o,hi=x,_t=L}yd(e)}else(o.subtreeFlags&8772)!==0&&u!==null?(u.return=o,ne=u):yd(e)}}function yd(e){for(;ne!==null;){var t=ne;if((t.flags&8772)!==0){var n=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:_t||mi(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!_t)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:ln(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var u=t.updateQueue;u!==null&&xc(t,u,r);break;case 3:var p=t.updateQueue;if(p!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}xc(t,p,n)}break;case 5:var x=t.stateNode;if(n===null&&t.flags&4){n=x;var T=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":T.autoFocus&&n.focus();break;case"img":T.src&&(n.src=T.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var L=t.alternate;if(L!==null){var B=L.memoizedState;if(B!==null){var W=B.dehydrated;W!==null&&bs(W)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(l(163))}_t||t.flags&512&&la(t)}catch(U){nt(t,t.return,U)}}if(t===e){ne=null;break}if(n=t.sibling,n!==null){n.return=t.return,ne=n;break}ne=t.return}}function xd(e){for(;ne!==null;){var t=ne;if(t===e){ne=null;break}var n=t.sibling;if(n!==null){n.return=t.return,ne=n;break}ne=t.return}}function kd(e){for(;ne!==null;){var t=ne;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{mi(4,t)}catch(T){nt(t,n,T)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(T){nt(t,o,T)}}var u=t.return;try{la(t)}catch(T){nt(t,u,T)}break;case 5:var p=t.return;try{la(t)}catch(T){nt(t,p,T)}}}catch(T){nt(t,t.return,T)}if(t===e){ne=null;break}var x=t.sibling;if(x!==null){x.return=t.return,ne=x;break}ne=t.return}}var xh=Math.ceil,gi=O.ReactCurrentDispatcher,aa=O.ReactCurrentOwner,Jt=O.ReactCurrentBatchConfig,Me=0,dt=null,lt=null,vt=0,Gt=0,ys=Xn(0),ut=0,ll=null,br=0,vi=0,ua=0,il=null,Ot=null,ca=0,xs=1/0,On=null,yi=!1,da=null,rr=null,xi=!1,sr=null,ki=0,ol=0,fa=null,wi=-1,Si=0;function Rt(){return(Me&6)!==0?Xe():wi!==-1?wi:wi=Xe()}function lr(e){return(e.mode&1)===0?1:(Me&2)!==0&&vt!==0?vt&-vt:nh.transition!==null?(Si===0&&(Si=As()),Si):(e=De,e!==0||(e=window.event,e=e===void 0?16:Su(e.type)),e)}function un(e,t,n,r){if(50<ol)throw ol=0,fa=null,Error(l(185));jr(e,n,r),((Me&2)===0||e!==dt)&&(e===dt&&((Me&2)===0&&(vi|=n),ut===4&&ir(e,vt)),$t(e,r),n===1&&Me===0&&(t.mode&1)===0&&(xs=Xe()+500,Yl&&Jn()))}function $t(e,t){var n=e.callbackNode;Il(e,t);var r=Cr(e,e===dt?vt:0);if(r===0)n!==null&&jl(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&jl(n),t===1)e.tag===0?th(Sd.bind(null,e)):oc(Sd.bind(null,e)),Xp(function(){(Me&6)===0&&Jn()}),n=null;else{switch(V(r)){case 1:n=Hn;break;case 4:n=vn;break;case 16:n=Kr;break;case 536870912:n=Rl;break;default:n=Kr}n=Ld(n,wd.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function wd(e,t){if(wi=-1,Si=0,(Me&6)!==0)throw Error(l(327));var n=e.callbackNode;if(ks()&&e.callbackNode!==n)return null;var r=Cr(e,e===dt?vt:0);if(r===0)return null;if((r&30)!==0||(r&e.expiredLanes)!==0||t)t=Ti(e,r);else{t=r;var o=Me;Me|=2;var u=_d();(dt!==e||vt!==t)&&(On=null,xs=Xe()+500,Or(e,t));do try{Sh();break}catch(x){Td(e,x)}while(!0);Lo(),gi.current=u,Me=o,lt!==null?t=0:(dt=null,vt=0,t=ut)}if(t!==0){if(t===2&&(o=Is(e),o!==0&&(r=o,t=pa(e,o))),t===1)throw n=ll,Or(e,0),ir(e,r),$t(e,Xe()),n;if(t===6)ir(e,r);else{if(o=e.current.alternate,(r&30)===0&&!kh(o)&&(t=Ti(e,r),t===2&&(u=Is(e),u!==0&&(r=u,t=pa(e,u))),t===1))throw n=ll,Or(e,0),ir(e,r),$t(e,Xe()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(l(345));case 2:$r(e,Ot,On);break;case 3:if(ir(e,r),(r&130023424)===r&&(t=ca+500-Xe(),10<t)){if(Cr(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){Rt(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=xo($r.bind(null,e,Ot,On),t);break}$r(e,Ot,On);break;case 4:if(ir(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var p=31-Et(r);u=1<<p,p=t[p],p>o&&(o=p),r&=~u}if(r=o,r=Xe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*xh(r/1960))-r,10<r){e.timeoutHandle=xo($r.bind(null,e,Ot,On),r);break}$r(e,Ot,On);break;case 5:$r(e,Ot,On);break;default:throw Error(l(329))}}}return $t(e,Xe()),e.callbackNode===n?wd.bind(null,e):null}function pa(e,t){var n=il;return e.current.memoizedState.isDehydrated&&(Or(e,t).flags|=256),e=Ti(e,t),e!==2&&(t=Ot,Ot=n,t!==null&&ha(t)),e}function ha(e){Ot===null?Ot=e:Ot.push.apply(Ot,e)}function kh(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],u=o.getSnapshot;o=o.value;try{if(!rn(u(),o))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ir(e,t){for(t&=~ua,t&=~vi,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Et(t),r=1<<n;e[n]=-1,t&=~r}}function Sd(e){if((Me&6)!==0)throw Error(l(327));ks();var t=Cr(e,0);if((t&1)===0)return $t(e,Xe()),null;var n=Ti(e,t);if(e.tag!==0&&n===2){var r=Is(e);r!==0&&(t=r,n=pa(e,r))}if(n===1)throw n=ll,Or(e,0),ir(e,t),$t(e,Xe()),n;if(n===6)throw Error(l(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,$r(e,Ot,On),$t(e,Xe()),null}function ma(e,t){var n=Me;Me|=1;try{return e(t)}finally{Me=n,Me===0&&(xs=Xe()+500,Yl&&Jn())}}function zr(e){sr!==null&&sr.tag===0&&(Me&6)===0&&ks();var t=Me;Me|=1;var n=Jt.transition,r=De;try{if(Jt.transition=null,De=1,e)return e()}finally{De=r,Jt.transition=n,Me=t,(Me&6)===0&&Jn()}}function ga(){Gt=ys.current,Ke(ys)}function Or(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Yp(n)),lt!==null)for(n=lt.return;n!==null;){var r=n;switch(No(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&ql();break;case 3:ms(),Ke(Mt),Ke(wt),Oo();break;case 5:bo(r);break;case 4:ms();break;case 13:Ke(et);break;case 19:Ke(et);break;case 10:Io(r.type._context);break;case 22:case 23:ga()}n=n.return}if(dt=e,lt=e=or(e.current,null),vt=Gt=t,ut=0,ll=null,ua=vi=br=0,Ot=il=null,Dr!==null){for(t=0;t<Dr.length;t++)if(n=Dr[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,u=n.pending;if(u!==null){var p=u.next;u.next=o,r.next=p}n.pending=r}Dr=null}return e}function Td(e,t){do{var n=lt;try{if(Lo(),ii.current=ci,oi){for(var r=tt.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}oi=!1}if(Mr=0,ct=at=tt=null,Js=!1,el=0,aa.current=null,n===null||n.return===null){ut=1,ll=t,lt=null;break}e:{var u=e,p=n.return,x=n,T=t;if(t=vt,x.flags|=32768,T!==null&&typeof T=="object"&&typeof T.then=="function"){var L=T,B=x,W=B.tag;if((B.mode&1)===0&&(W===0||W===11||W===15)){var U=B.alternate;U?(B.updateQueue=U.updateQueue,B.memoizedState=U.memoizedState,B.lanes=U.lanes):(B.updateQueue=null,B.memoizedState=null)}var ee=qc(p);if(ee!==null){ee.flags&=-257,Kc(ee,p,x,u,t),ee.mode&1&&Qc(u,L,t),t=ee,T=L;var se=t.updateQueue;if(se===null){var ie=new Set;ie.add(T),t.updateQueue=ie}else se.add(T);break e}else{if((t&1)===0){Qc(u,L,t),va();break e}T=Error(l(426))}}else if(Ye&&x.mode&1){var st=qc(p);if(st!==null){(st.flags&65536)===0&&(st.flags|=256),Kc(st,p,x,u,t),jo(gs(T,x));break e}}u=T=gs(T,x),ut!==4&&(ut=2),il===null?il=[u]:il.push(u),u=p;do{switch(u.tag){case 3:u.flags|=65536,t&=-t,u.lanes|=t;var j=Vc(u,T,t);yc(u,j);break e;case 1:x=T;var _=u.type,R=u.stateNode;if((u.flags&128)===0&&(typeof _.getDerivedStateFromError=="function"||R!==null&&typeof R.componentDidCatch=="function"&&(rr===null||!rr.has(R)))){u.flags|=65536,t&=-t,u.lanes|=t;var G=Gc(u,x,t);yc(u,G);break e}}u=u.return}while(u!==null)}Ed(n)}catch(ue){t=ue,lt===n&&n!==null&&(lt=n=n.return);continue}break}while(!0)}function _d(){var e=gi.current;return gi.current=ci,e===null?ci:e}function va(){(ut===0||ut===3||ut===2)&&(ut=4),dt===null||(br&268435455)===0&&(vi&268435455)===0||ir(dt,vt)}function Ti(e,t){var n=Me;Me|=2;var r=_d();(dt!==e||vt!==t)&&(On=null,Or(e,t));do try{wh();break}catch(o){Td(e,o)}while(!0);if(Lo(),Me=n,gi.current=r,lt!==null)throw Error(l(261));return dt=null,vt=0,ut}function wh(){for(;lt!==null;)Nd(lt)}function Sh(){for(;lt!==null&&!qi();)Nd(lt)}function Nd(e){var t=Rd(e.alternate,e,Gt);e.memoizedProps=e.pendingProps,t===null?Ed(e):lt=t,aa.current=null}function Ed(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=hh(n,t,Gt),n!==null){lt=n;return}}else{if(n=mh(n,t),n!==null){n.flags&=32767,lt=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ut=6,lt=null;return}}if(t=t.sibling,t!==null){lt=t;return}lt=t=e}while(t!==null);ut===0&&(ut=5)}function $r(e,t,n){var r=De,o=Jt.transition;try{Jt.transition=null,De=1,Th(e,t,n,r)}finally{Jt.transition=o,De=r}return null}function Th(e,t,n,r){do ks();while(sr!==null);if((Me&6)!==0)throw Error(l(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(l(177));e.callbackNode=null,e.callbackPriority=0;var u=n.lanes|n.childLanes;if(Al(e,u),e===dt&&(lt=dt=null,vt=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||xi||(xi=!0,Ld(Kr,function(){return ks(),null})),u=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||u){u=Jt.transition,Jt.transition=null;var p=De;De=1;var x=Me;Me|=4,aa.current=null,vh(e,n),gd(n,e),Wp(vo),Pl=!!go,vo=go=null,e.current=n,yh(n),Ki(),Me=x,De=p,Jt.transition=u}else e.current=n;if(xi&&(xi=!1,sr=e,ki=o),u=e.pendingLanes,u===0&&(rr=null),Yr(n.stateNode),$t(e,Xe()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(yi)throw yi=!1,e=da,da=null,e;return(ki&1)!==0&&e.tag!==0&&ks(),u=e.pendingLanes,(u&1)!==0?e===fa?ol++:(ol=0,fa=e):ol=0,Jn(),null}function ks(){if(sr!==null){var e=V(ki),t=Jt.transition,n=De;try{if(Jt.transition=null,De=16>e?16:e,sr===null)var r=!1;else{if(e=sr,sr=null,ki=0,(Me&6)!==0)throw Error(l(331));var o=Me;for(Me|=4,ne=e.current;ne!==null;){var u=ne,p=u.child;if((ne.flags&16)!==0){var x=u.deletions;if(x!==null){for(var T=0;T<x.length;T++){var L=x[T];for(ne=L;ne!==null;){var B=ne;switch(B.tag){case 0:case 11:case 15:sl(8,B,u)}var W=B.child;if(W!==null)W.return=B,ne=W;else for(;ne!==null;){B=ne;var U=B.sibling,ee=B.return;if(dd(B),B===L){ne=null;break}if(U!==null){U.return=ee,ne=U;break}ne=ee}}}var se=u.alternate;if(se!==null){var ie=se.child;if(ie!==null){se.child=null;do{var st=ie.sibling;ie.sibling=null,ie=st}while(ie!==null)}}ne=u}}if((u.subtreeFlags&2064)!==0&&p!==null)p.return=u,ne=p;else e:for(;ne!==null;){if(u=ne,(u.flags&2048)!==0)switch(u.tag){case 0:case 11:case 15:sl(9,u,u.return)}var j=u.sibling;if(j!==null){j.return=u.return,ne=j;break e}ne=u.return}}var _=e.current;for(ne=_;ne!==null;){p=ne;var R=p.child;if((p.subtreeFlags&2064)!==0&&R!==null)R.return=p,ne=R;else e:for(p=_;ne!==null;){if(x=ne,(x.flags&2048)!==0)try{switch(x.tag){case 0:case 11:case 15:mi(9,x)}}catch(ue){nt(x,x.return,ue)}if(x===p){ne=null;break e}var G=x.sibling;if(G!==null){G.return=x.return,ne=G;break e}ne=x.return}}if(Me=o,Jn(),Bt&&typeof Bt.onPostCommitFiberRoot=="function")try{Bt.onPostCommitFiberRoot(_r,e)}catch{}r=!0}return r}finally{De=n,Jt.transition=t}}return!1}function Cd(e,t,n){t=gs(n,t),t=Vc(e,t,1),e=tr(e,t,1),t=Rt(),e!==null&&(jr(e,1,t),$t(e,t))}function nt(e,t,n){if(e.tag===3)Cd(e,e,n);else for(;t!==null;){if(t.tag===3){Cd(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(rr===null||!rr.has(r))){e=gs(n,e),e=Gc(t,e,1),t=tr(t,e,1),e=Rt(),t!==null&&(jr(t,1,e),$t(t,e));break}}t=t.return}}function _h(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Rt(),e.pingedLanes|=e.suspendedLanes&n,dt===e&&(vt&n)===n&&(ut===4||ut===3&&(vt&130023424)===vt&&500>Xe()-ca?Or(e,0):ua|=n),$t(e,t)}function jd(e,t){t===0&&((e.mode&1)===0?t=1:(t=Zr,Zr<<=1,(Zr&130023424)===0&&(Zr=4194304)));var n=Rt();e=Mn(e,t),e!==null&&(jr(e,t,n),$t(e,n))}function Nh(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),jd(e,n)}function Eh(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(l(314))}r!==null&&r.delete(t),jd(e,n)}var Rd;Rd=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Mt.current)zt=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return zt=!1,ph(e,t,n);zt=(e.flags&131072)!==0}else zt=!1,Ye&&(t.flags&1048576)!==0&&ac(t,Zl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;pi(e,t),e=t.pendingProps;var o=as(t,wt.current);hs(t,n),o=Uo(null,t,r,e,o,n);var u=Bo();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,bt(r)?(u=!0,Kl(t)):u=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Po(t),o.updater=di,t.stateNode=o,o._reactInternals=t,qo(t,r,e,n),t=Zo(null,t,r,!0,u,n)):(t.tag=0,Ye&&u&&_o(t),jt(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(pi(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=jh(r),e=ln(r,e),o){case 0:t=Xo(null,t,r,e,n);break e;case 1:t=td(null,t,r,e,n);break e;case 11:t=Yc(null,t,r,e,n);break e;case 14:t=Xc(null,t,r,ln(r.type,e),n);break e}throw Error(l(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:ln(r,o),Xo(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:ln(r,o),td(e,t,r,o,n);case 3:e:{if(nd(t),e===null)throw Error(l(387));r=t.pendingProps,u=t.memoizedState,o=u.element,vc(e,t),si(t,r,null,n);var p=t.memoizedState;if(r=p.element,u.isDehydrated)if(u={element:r,isDehydrated:!1,cache:p.cache,pendingSuspenseBoundaries:p.pendingSuspenseBoundaries,transitions:p.transitions},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){o=gs(Error(l(423)),t),t=rd(e,t,r,n,o);break e}else if(r!==o){o=gs(Error(l(424)),t),t=rd(e,t,r,n,o);break e}else for(Vt=Yn(t.stateNode.containerInfo.firstChild),Ht=t,Ye=!0,sn=null,n=mc(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ds(),r===o){t=zn(e,t,n);break e}jt(e,t,r,n)}t=t.child}return t;case 5:return kc(t),e===null&&Co(t),r=t.type,o=t.pendingProps,u=e!==null?e.memoizedProps:null,p=o.children,yo(r,o)?p=null:u!==null&&yo(r,u)&&(t.flags|=32),ed(e,t),jt(e,t,p,n),t.child;case 6:return e===null&&Co(t),null;case 13:return sd(e,t,n);case 4:return Mo(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=fs(t,null,r,n):jt(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:ln(r,o),Yc(e,t,r,o,n);case 7:return jt(e,t,t.pendingProps,n),t.child;case 8:return jt(e,t,t.pendingProps.children,n),t.child;case 12:return jt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,u=t.memoizedProps,p=o.value,Qe(ti,r._currentValue),r._currentValue=p,u!==null)if(rn(u.value,p)){if(u.children===o.children&&!Mt.current){t=zn(e,t,n);break e}}else for(u=t.child,u!==null&&(u.return=t);u!==null;){var x=u.dependencies;if(x!==null){p=u.child;for(var T=x.firstContext;T!==null;){if(T.context===r){if(u.tag===1){T=bn(-1,n&-n),T.tag=2;var L=u.updateQueue;if(L!==null){L=L.shared;var B=L.pending;B===null?T.next=T:(T.next=B.next,B.next=T),L.pending=T}}u.lanes|=n,T=u.alternate,T!==null&&(T.lanes|=n),Ao(u.return,n,t),x.lanes|=n;break}T=T.next}}else if(u.tag===10)p=u.type===t.type?null:u.child;else if(u.tag===18){if(p=u.return,p===null)throw Error(l(341));p.lanes|=n,x=p.alternate,x!==null&&(x.lanes|=n),Ao(p,n,t),p=u.sibling}else p=u.child;if(p!==null)p.return=u;else for(p=u;p!==null;){if(p===t){p=null;break}if(u=p.sibling,u!==null){u.return=p.return,p=u;break}p=p.return}u=p}jt(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,hs(t,n),o=Xt(o),r=r(o),t.flags|=1,jt(e,t,r,n),t.child;case 14:return r=t.type,o=ln(r,t.pendingProps),o=ln(r.type,o),Xc(e,t,r,o,n);case 15:return Zc(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:ln(r,o),pi(e,t),t.tag=1,bt(r)?(e=!0,Kl(t)):e=!1,hs(t,n),Wc(t,r,o),qo(t,r,o,n),Zo(null,t,r,!0,e,n);case 19:return id(e,t,n);case 22:return Jc(e,t,n)}throw Error(l(156,t.tag))};function Ld(e,t){return Ls(e,t)}function Ch(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function en(e,t,n,r){return new Ch(e,t,n,r)}function ya(e){return e=e.prototype,!(!e||!e.isReactComponent)}function jh(e){if(typeof e=="function")return ya(e)?1:0;if(e!=null){if(e=e.$$typeof,e===_e)return 11;if(e===P)return 14}return 2}function or(e,t){var n=e.alternate;return n===null?(n=en(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function _i(e,t,n,r,o,u){var p=2;if(r=e,typeof e=="function")ya(e)&&(p=1);else if(typeof e=="string")p=5;else e:switch(e){case oe:return Fr(n.children,o,u,t);case ae:p=8,o|=8;break;case Te:return e=en(12,n,t,o|2),e.elementType=Te,e.lanes=u,e;case je:return e=en(13,n,t,o),e.elementType=je,e.lanes=u,e;case ce:return e=en(19,n,t,o),e.elementType=ce,e.lanes=u,e;case X:return Ni(n,o,u,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case te:p=10;break e;case ve:p=9;break e;case _e:p=11;break e;case P:p=14;break e;case q:p=16,r=null;break e}throw Error(l(130,e==null?e:typeof e,""))}return t=en(p,n,t,o),t.elementType=e,t.type=r,t.lanes=u,t}function Fr(e,t,n,r){return e=en(7,e,r,t),e.lanes=n,e}function Ni(e,t,n,r){return e=en(22,e,r,t),e.elementType=X,e.lanes=n,e.stateNode={isHidden:!1},e}function xa(e,t,n){return e=en(6,e,null,t),e.lanes=n,e}function ka(e,t,n){return t=en(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Rh(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ds(0),this.expirationTimes=Ds(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ds(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function wa(e,t,n,r,o,u,p,x,T){return e=new Rh(e,t,n,x,T),t===1?(t=1,u===!0&&(t|=8)):t=0,u=en(3,null,null,t),e.current=u,u.stateNode=e,u.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Po(u),e}function Lh(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:fe,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Id(e){if(!e)return Zn;e=e._reactInternals;e:{if($e(e)!==e||e.tag!==1)throw Error(l(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(bt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(l(171))}if(e.tag===1){var n=e.type;if(bt(n))return lc(e,n,t)}return t}function Ad(e,t,n,r,o,u,p,x,T){return e=wa(n,r,!0,e,o,u,p,x,T),e.context=Id(null),n=e.current,r=Rt(),o=lr(n),u=bn(r,o),u.callback=t??null,tr(n,u,o),e.current.lanes=o,jr(e,o,r),$t(e,r),e}function Ei(e,t,n,r){var o=t.current,u=Rt(),p=lr(o);return n=Id(n),t.context===null?t.context=n:t.pendingContext=n,t=bn(u,p),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=tr(o,t,p),e!==null&&(un(e,o,p,u),ri(e,o,p)),p}function Ci(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Dd(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Sa(e,t){Dd(e,t),(e=e.alternate)&&Dd(e,t)}function Ih(){return null}var Pd=typeof reportError=="function"?reportError:function(e){console.error(e)};function Ta(e){this._internalRoot=e}ji.prototype.render=Ta.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(l(409));Ei(e,t,null,null)},ji.prototype.unmount=Ta.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;zr(function(){Ei(null,e,null,null)}),t[In]=null}};function ji(e){this._internalRoot=e}ji.prototype.unstable_scheduleHydration=function(e){if(e){var t=le();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Qn.length&&t!==0&&t<Qn[n].priority;n++);Qn.splice(n,0,e),n===0&&ku(e)}};function _a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ri(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Md(){}function Ah(e,t,n,r,o){if(o){if(typeof r=="function"){var u=r;r=function(){var L=Ci(p);u.call(L)}}var p=Ad(t,r,e,0,null,!1,!1,"",Md);return e._reactRootContainer=p,e[In]=p.current,Vs(e.nodeType===8?e.parentNode:e),zr(),p}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var x=r;r=function(){var L=Ci(T);x.call(L)}}var T=wa(e,0,!1,null,null,!1,!1,"",Md);return e._reactRootContainer=T,e[In]=T.current,Vs(e.nodeType===8?e.parentNode:e),zr(function(){Ei(t,T,n,r)}),T}function Li(e,t,n,r,o){var u=n._reactRootContainer;if(u){var p=u;if(typeof o=="function"){var x=o;o=function(){var T=Ci(p);x.call(T)}}Ei(t,p,e,o)}else p=Ah(n,t,e,o,r);return Ci(p)}v=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Er(t.pendingLanes);n!==0&&(Gn(t,n|1),$t(t,Xe()),(Me&6)===0&&(xs=Xe()+500,Jn()))}break;case 13:zr(function(){var r=Mn(e,1);if(r!==null){var o=Rt();un(r,e,1,o)}}),Sa(e,1)}},C=function(e){if(e.tag===13){var t=Mn(e,134217728);if(t!==null){var n=Rt();un(t,e,134217728,n)}Sa(e,134217728)}},F=function(e){if(e.tag===13){var t=lr(e),n=Mn(e,t);if(n!==null){var r=Rt();un(n,e,t,r)}Sa(e,t)}},le=function(){return De},de=function(e,t){var n=De;try{return De=e,t()}finally{De=n}},Dt=function(e,t,n){switch(t){case"input":if(Ut(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=Ql(r);if(!o)throw Error(l(90));Fe(r),Ut(r,o)}}}break;case"textarea":Ve(e,n);break;case"select":t=n.value,t!=null&&b(e,!!n.multiple,t,!1)}},vr=ma,yr=zr;var Dh={usingClientEntryPoint:!1,Events:[qs,is,Ql,Qr,Cs,ma]},al={findFiberByHostInstance:Rr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Ph={bundleType:al.bundleType,version:al.version,rendererPackageName:al.rendererPackageName,rendererConfig:al.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:O.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=qr(e),e===null?null:e.stateNode},findFiberByHostInstance:al.findFiberByHostInstance||Ih,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ii=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ii.isDisabled&&Ii.supportsFiber)try{_r=Ii.inject(Ph),Bt=Ii}catch{}}return Ft.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Dh,Ft.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!_a(t))throw Error(l(200));return Lh(e,t,null,n)},Ft.createRoot=function(e,t){if(!_a(e))throw Error(l(299));var n=!1,r="",o=Pd;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=wa(e,1,!1,null,null,n,!1,r,o),e[In]=t.current,Vs(e.nodeType===8?e.parentNode:e),new Ta(t)},Ft.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(l(188)):(e=Object.keys(e).join(","),Error(l(268,e)));return e=qr(t),e=e===null?null:e.stateNode,e},Ft.flushSync=function(e){return zr(e)},Ft.hydrate=function(e,t,n){if(!Ri(t))throw Error(l(200));return Li(null,e,t,!0,n)},Ft.hydrateRoot=function(e,t,n){if(!_a(e))throw Error(l(405));var r=n!=null&&n.hydratedSources||null,o=!1,u="",p=Pd;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(u=n.identifierPrefix),n.onRecoverableError!==void 0&&(p=n.onRecoverableError)),t=Ad(t,null,e,1,n??null,o,!1,u,p),e[In]=t.current,Vs(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new ji(t)},Ft.render=function(e,t,n){if(!Ri(t))throw Error(l(200));return Li(null,e,t,!1,n)},Ft.unmountComponentAtNode=function(e){if(!Ri(e))throw Error(l(40));return e._reactRootContainer?(zr(function(){Li(null,null,e,!1,function(){e._reactRootContainer=null,e[In]=null})}),!0):!1},Ft.unstable_batchedUpdates=ma,Ft.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ri(n))throw Error(l(200));if(e==null||e._reactInternals===void 0)throw Error(l(38));return Li(e,t,n,!1,r)},Ft.version="18.3.1-next-f1338f8080-20240426",Ft}var Wd;function Hh(){if(Wd)return Ca.exports;Wd=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(i){console.error(i)}}return s(),Ca.exports=Wh(),Ca.exports}var Hd;function Vh(){if(Hd)return Ai;Hd=1;var s=Hh();return Ai.createRoot=s.createRoot,Ai.hydrateRoot=s.hydrateRoot,Ai}var Gh=Vh();const Qh=Rf(Gh),Vd=s=>{let i;const l=new Set,a=(g,k)=>{const S=typeof g=="function"?g(i):g;if(!Object.is(S,i)){const w=i;i=k??(typeof S!="object"||S===null)?S:Object.assign({},i,S),l.forEach(M=>M(i,w))}},d=()=>i,m={setState:a,getState:d,getInitialState:()=>y,subscribe:g=>(l.add(g),()=>l.delete(g))},y=i=s(a,d,m);return m},qh=(s=>s?Vd(s):Vd),Kh=s=>s;function Yh(s,i=Kh){const l=ml.useSyncExternalStore(s.subscribe,ml.useCallback(()=>i(s.getState()),[s,i]),ml.useCallback(()=>i(s.getInitialState()),[s,i]));return ml.useDebugValue(l),l}const Xh=s=>{const i=qh(s),l=a=>Yh(i,a);return Object.assign(l,i),l},Zh=(s=>Xh),Jh="/api";async function Bi(s,i,l){const a=await fetch(`${Jh}${i}`,{method:s,headers:l?{"Content-Type":"application/json"}:void 0,body:l?JSON.stringify(l):void 0});if(!a.ok)throw new Error(`${s} ${i} failed: ${a.status} ${a.statusText}`);return a.json()}function Wr(s){return Bi("GET",s)}function Tn(s,i){return Bi("POST",s,i)}function Lf(s){return Bi("DELETE",s)}function dr(s,i){return Bi("PATCH",s,i)}function em(){return Wr("/sessions")}function Di(s){return Wr(`/sessions/${s}`)}function If(s){return Tn("/sessions",s)}function tm(s){return Lf(`/sessions/${s}`)}function nm(s,i,l){return Tn(`/sessions/${s}/turns`,{user_prompt:i,...l!=null&&l.length?{attachments:l}:{}})}function rm(s){return Tn(`/sessions/${s}/cancel`)}function sm(s,i){return dr(`/sessions/${s}`,{title:i})}function lm(s){return dr(`/sessions/${s}`,{lifecycle:"finished"})}function im(s){return dr(`/sessions/${s}`,{lifecycle:"working"})}function Gd(s){return dr(`/sessions/${s}`,{has_unreviewed:0})}function om(s,i,l,a){const d={model:i,model_reasoning_effort:l};return a!==void 0&&(d.runtime_type=a),dr(`/sessions/${s}`,d)}function am(s,i){return dr(`/sessions/${s}`,{runtime_config:i})}function um(s,i){return Tn(`/sessions/${s}/rewind`,{turn_id:i})}function cm(s){return Tn(`/sessions/${s}/restore`,{})}function dm(s,i,l){return Tn(`/sessions/${s}/branch`,{turn_id:i,title:l})}function Af(){return Wr("/workspaces")}function fm(s,i){return Tn("/workspaces",{path:s,label:i})}function pm(s){return Tn("/workspaces/hide",{path:s})}async function hm(){const s=await fetch("/api/pick-directory");if(s.status===204)return{cancelled:!0};if(!s.ok)throw new Error(`GET /api/pick-directory failed: ${s.status} ${s.statusText}`);return s.json()}const mm=(s,i)=>({sessions:[],sessionDetails:{},activeSessionId:null,openTabs:[],activeTurnIndex:0,submittingPrompt:null,restoredPrompt:null,quotedText:null,init:async()=>{try{const l=localStorage.getItem("agentpane:last-model-config");l&&s({lastModelConfig:JSON.parse(l)})}catch{}s({loading:!0,error:null});try{const[l,a]=await Promise.all([em(),Af()]);s({sessions:l,workspaces:a,loading:!1}),l.length>0&&!i().activeSessionId&&await i().selectSession(l[0].id)}catch(l){s({loading:!1,error:l.message})}},selectSession:async l=>{if(i().sessionDetails[l]){const a=i().sessionDetails[l];s({activeSessionId:l,activeTurnIndex:a.turns.length>0?a.turns.length-1:0,activeRightTab:"turns",openTabs:i().openTabs.includes(l)?i().openTabs:[...i().openTabs,l]}),a.has_unreviewed===1&&(Gd(l).catch(()=>{}),s(d=>({sessions:d.sessions.map(f=>f.id===l?{...f,has_unreviewed:0}:f),sessionDetails:{...d.sessionDetails,[l]:{...a,has_unreviewed:0}}})));return}s({loading:!0,error:null});try{const a=await Di(l);s(d=>({sessionDetails:{...d.sessionDetails,[l]:a},activeSessionId:l,activeTurnIndex:a.turns.length>0?a.turns.length-1:0,activeRightTab:"turns",loading:!1})),a.has_unreviewed===1&&(Gd(l).catch(()=>{}),s(d=>({sessions:d.sessions.map(f=>f.id===l?{...f,has_unreviewed:0}:f),sessionDetails:{...d.sessionDetails,[l]:{...a,has_unreviewed:0}}})))}catch(a){s({loading:!1,error:a.message})}},closeTab:l=>{s(a=>{const d=a.openTabs.filter(f=>f!==l);if(a.activeSessionId===l&&d.length>0){const f=d[d.length-1],h=a.sessionDetails[f];return{openTabs:d,activeSessionId:f,activeTurnIndex:h&&h.turns.length>0?h.turns.length-1:0}}return{openTabs:d,activeSessionId:a.activeSessionId===l?null:a.activeSessionId}})},updateModelConfig:async(l,a,d)=>{const f=i().activeSessionId;if(f){s({error:null});try{const h=await om(f,l,a,d),m={provider:h.runtime_type,model:h.model??"",reasoning:h.model_reasoning_effort??""};s({lastModelConfig:m}),localStorage.setItem("agentpane:last-model-config",JSON.stringify(m)),s(y=>({sessions:y.sessions.map(g=>g.id===f?h:g),sessionDetails:y.sessionDetails[f]?{...y.sessionDetails,[f]:{...y.sessionDetails[f],model:h.model,model_reasoning_effort:h.model_reasoning_effort,external_thread_id:h.external_thread_id}}:y.sessionDetails})),await i().refreshActiveSession()}catch(h){s({error:h.message}),i().addToast("error",`Failed to update model — ${h.message}`)}}},createSession:async l=>{s({error:null});try{const a=await If(l);s(f=>({sessions:[a,...f.sessions],showNewSessionDialog:!1}));const d={provider:a.runtime_type,model:a.model??"",reasoning:a.model_reasoning_effort??""};s({lastModelConfig:d}),localStorage.setItem("agentpane:last-model-config",JSON.stringify(d)),await i().selectSession(a.id),i().addLogEntry("INFO",`Session created — ${a.id.slice(0,8)}`),i().addToast("success",`Session created — ${a.title||a.id.slice(0,8)}`)}catch(a){s({error:a.message}),i().addToast("error",`Failed to create session — ${a.message}`)}},deleteSession:async l=>{var d;s({error:null});const a=(d=i().sessions.find(f=>f.id===l))==null?void 0:d.title;try{await tm(l),s(f=>{const h={...f.sessionDetails};delete h[l];const m=f.openTabs.filter(k=>k!==l);let y=f.activeSessionId,g=f.activeTurnIndex;if(f.activeSessionId===l){y=m.length>0?m[m.length-1]:null;const k=y?h[y]:null;g=k&&k.turns.length>0?k.turns.length-1:0}return{sessions:f.sessions.filter(k=>k.id!==l),sessionDetails:h,openTabs:m,activeSessionId:y,activeTurnIndex:g}}),i().addLogEntry("INFO",`Session deleted — ${l.slice(0,8)}`),i().addToast("info",`Session "${a||l.slice(0,8)}" deleted`)}catch(f){s({error:f.message}),i().addToast("error",`Failed to delete session — ${f.message}`)}},renameSession:async(l,a)=>{s({error:null});try{const d=await sm(l,a.trim());s(f=>({sessions:f.sessions.map(h=>h.id===l?d:h),sessionDetails:f.sessionDetails[l]?{...f.sessionDetails,[l]:{...f.sessionDetails[l],title:d.title}}:f.sessionDetails}))}catch(d){s({error:d.message}),i().addToast("error",`Failed to rename session — ${d.message}`)}},markFinished:async l=>{s({error:null});try{const a=await lm(l);s(d=>({sessions:d.sessions.map(f=>f.id===l?a:f)})),i().addToast("info","Session marked as finished")}catch(a){s({error:a.message}),i().addToast("error",`Failed to mark as finished — ${a.message}`)}},reopenSession:async l=>{s({error:null});try{const a=await im(l);s(d=>({sessions:d.sessions.map(f=>f.id===l?a:f)})),i().addToast("info","Session reopened")}catch(a){s({error:a.message}),i().addToast("error",`Failed to reopen session — ${a.message}`)}},submitPrompt:async(l,a)=>{const d=i().activeSessionId;if(d){s({error:null,submittingPrompt:l}),s(f=>{const h=f.sessionDetails[d];return h?{sessionDetails:{...f.sessionDetails,[d]:{...h,is_running:1,status:"running"}},sessions:f.sessions.map(m=>m.id===d?{...m,is_running:1,status:"running"}:m)}:{}});try{const f=await nm(d,l,a);i().addLogEntry("INFO",`Turn submitted — "${l.slice(0,40)}"`),s(h=>{const m=h.sessionDetails[d];if(!m)return{submittingPrompt:null};const y={...f,items:[]};return{submittingPrompt:null,sessionDetails:{...h.sessionDetails,[d]:{...m,turns:[...m.turns,y]}},activeTurnIndex:m.turns.length}})}catch(f){s({submittingPrompt:null,error:f.message}),i().addLogEntry("ERROR",`Turn failed — ${f.message}`),i().addToast("error",`Failed to send prompt — ${f.message}`),s(h=>({sessionDetails:h.sessionDetails[d]?{...h.sessionDetails,[d]:{...h.sessionDetails[d],is_running:0,status:"active"}}:h.sessionDetails,sessions:h.sessions.map(m=>m.id===d?{...m,is_running:0,status:"active"}:m)}))}}},cancelTurn:async()=>{const l=i().activeSessionId;if(l)try{await rm(l)}catch(a){s({error:a.message})}},rewindToTurn:async(l,a)=>{s({error:null});try{const d=await um(l,a),f=await Di(l);s(h=>({sessionDetails:{...h.sessionDetails,[l]:f},sessions:h.sessions.map(m=>m.id===l?{...m,external_thread_id:d.external_thread_id,is_running:0,status:"active"}:m),activeTurnIndex:f.turns.length>0?f.turns.length-1:0})),i().addToast("info","Rewound to selected turn")}catch(d){s({error:d.message}),i().addToast("error",`Failed to rewind — ${d.message}`)}},restoreSession:async l=>{s({error:null});try{const a=await cm(l),d=await Di(l);s(f=>({sessionDetails:{...f.sessionDetails,[l]:d},sessions:f.sessions.map(h=>h.id===l?{...h,external_thread_id:a.external_thread_id,is_running:0,status:"active"}:h),activeTurnIndex:d.turns.length>0?d.turns.length-1:0})),i().addToast("info","Restored rewound session")}catch(a){s({error:a.message}),i().addToast("error",`Failed to restore — ${a.message}`)}},branchFromTurn:async(l,a,d)=>{s({error:null});try{const f=await dm(l,a,d);s(h=>({sessions:[f,...h.sessions]})),await i().selectSession(f.id),i().addToast("success","Branched from selected turn")}catch(f){s({error:f.message}),i().addToast("error",`Failed to branch — ${f.message}`)}},updateRuntimeConfig:async l=>{const a=i().activeSessionId;if(a){s({error:null});try{const d=await am(a,JSON.stringify(l));s(f=>({sessions:f.sessions.map(h=>h.id===a?d:h),sessionDetails:f.sessionDetails[a]?{...f.sessionDetails,[a]:{...f.sessionDetails[a],runtime_config:d.runtime_config}}:f.sessionDetails}))}catch(d){s({error:d.message}),i().addToast("error",`Failed to update config — ${d.message}`)}}},refreshActiveSession:async()=>{const l=i().activeSessionId;if(l)try{const a=await Di(l);s(d=>({sessionDetails:{...d.sessionDetails,[l]:a},activeTurnIndex:a.turns.length>0?Math.min(d.activeTurnIndex,a.turns.length-1):0,sessions:d.sessions.map(f=>f.id===l?{...f,is_running:a.is_running,status:a.status}:f)}))}catch(a){s({error:a.message})}}}),gm=(s,i)=>({workspaces:[],addWorkspace:async l=>{s({error:null});try{const a=await fm(l.trim());s(d=>({workspaces:[...d.workspaces,a]})),i().addToast("success",`Workspace added — ${a.path}`)}catch(a){i().addToast("error",`Failed to add workspace — ${a.message}`)}},removeWorkspace:async l=>{s({error:null});try{await pm(l);const a=await Af();s({workspaces:a}),i().addToast("info","Workspace hidden")}catch(a){i().addToast("error",`Failed to hide workspace — ${a.message}`)}},createSessionInWorkspace:async l=>{s({error:null});try{const a=i().lastModelConfig,d=await If({cwd:l,runtime_type:(a==null?void 0:a.provider)??"codex",model:a==null?void 0:a.model,model_reasoning_effort:a==null?void 0:a.reasoning});s(f=>({sessions:[d,...f.sessions]})),await i().selectSession(d.id),i().addLogEntry("INFO",`Session created in ${l} — ${d.id.slice(0,8)}`),i().addToast("success",`Session created in ${l.split("/").pop()||l}`)}catch(a){s({error:a.message}),i().addToast("error",`Failed to create session — ${a.message}`)}},pickAndAddWorkspace:async()=>{try{const l=await hm();if(l.cancelled||!l.path)return;await i().addWorkspace(l.path)}catch(l){i().addToast("error",`Failed to pick directory — ${l.message}`)}}}),vm=(s,i)=>({wsConnected:!1,setWsConnected:l=>s({wsConnected:l}),onTurnStarted:(l,a)=>{i().addLogEntry("DEBUG",`turn:started — ${a.slice(0,8)}`),s(d=>{const f=d.sessionDetails[l];return f?{sessionDetails:{...d.sessionDetails,[l]:{...f,is_running:1,status:"running",turns:f.turns.map(h=>h.id===a?{...h,status:"running"}:h)}},sessions:d.sessions.map(h=>h.id===l?{...h,is_running:1,status:"running"}:h),activeTurnIndex:d.activeSessionId===l?f.turns.findIndex(h=>h.id===a):d.activeTurnIndex}:{}})},onItemStarted:(l,a,d)=>{i().addLogEntry("DEBUG",`item:started — ${d.type}`),s(f=>{const h=f.sessionDetails[l];return h?{sessionDetails:{...f.sessionDetails,[l]:La(h,a,d)}}:{}})},onItemUpdated:(l,a,d)=>{s(f=>{const h=f.sessionDetails[l];return h?{sessionDetails:{...f.sessionDetails,[l]:La(h,a,d)}}:{}})},onItemCompleted:(l,a,d)=>{if(i().addLogEntry("DEBUG",`item:completed — ${d.type}`),d.type==="background_task"&&(d.status==="completed"||d.status==="failed")){const f=d.data||{},h=f.task_type||"unknown",m=f.description||"background task",g=h==="local_agent"?"Subagent":h==="local_bash"?"Monitor":"Task";d.status==="completed"?i().addToast("success",`${g} completed: ${m}`):i().addToast("error",`${g} failed: ${m}`)}s(f=>{var g,k;const h=f.sessionDetails[l];if(!h)return{};const m=La(h,a,d);let y=m.turns;return d.type==="agent_message"&&((g=d.data)!=null&&g.text)&&(y=y.map(S=>S.id===a?{...S,agent_response:d.data.text}:S)),d.type==="reasoning"&&((k=d.data)!=null&&k.text)&&(y=y.map(S=>{if(S.id!==a)return S;const w=S.thoughts?S.thoughts+`
|
|
41
|
-
`+d.data.text:d.data.text;return{...S,thoughts:w}})),{sessionDetails:{...f.sessionDetails,[l]:{...m,turns:y}}}})},onItemDelta:(l,a,d,f)=>{s(h=>{const m=h.sessionDetails[l];return m?{sessionDetails:{...h.sessionDetails,[l]:ym(m,a,d,f)}}:{}})},onTurnCompleted:(l,a,d,f)=>{const h=(d==null?void 0:d.input_tokens)??0,m=(d==null?void 0:d.output_tokens)??0;i().addLogEntry("INFO",`turn:completed — ${h} in / ${m} out`),s(y=>{const g=y.sessionDetails[l];return g?{sessionDetails:{...y.sessionDetails,[l]:{...g,is_running:0,status:"active",has_unreviewed:f?1:g.has_unreviewed,turns:g.turns.map(k=>k.id===a?{...k,status:"completed",token_usage:d??k.token_usage??null}:k)}},sessions:y.sessions.map(k=>k.id===l?{...k,is_running:0,status:"active",has_unreviewed:f?1:k.has_unreviewed}:k)}:{}})},onTokenUsageUpdated:(l,a,d)=>{s(f=>{const h=f.sessionDetails[l];return h?{sessionDetails:{...f.sessionDetails,[l]:{...h,turns:h.turns.map(m=>m.id===a?{...m,token_usage:d}:m)}}}:{}})},onContextUsageUpdated:(l,a)=>{s(d=>{const f=d.sessionDetails[l];return f?{sessionDetails:{...d.sessionDetails,[l]:{...f,contextUsage:a}}}:{}})},onTurnFailed:(l,a,d)=>{i().addLogEntry("ERROR",`turn:failed — ${d}`),i().addToast("error",`Turn failed — ${d}`),s(f=>{const h=f.sessionDetails[l];if(!h)return{};const m=d.includes("cancelled")||d.includes("aborted"),y=m?"aborted":"failed";return{sessionDetails:{...f.sessionDetails,[l]:{...h,is_running:0,status:m?"active":"failed",turns:h.turns.map(g=>{if(g.id!==a)return g;const k=g.items.map(S=>S.status==="in_progress"?{...S,status:"failed"}:S);return{...g,status:y,error:d,items:k}})}},sessions:f.sessions.map(g=>g.id===l?{...g,is_running:0,status:m?"active":"failed"}:g)}})},onTurnCancelled:(l,a)=>{s(d=>{const f=d.sessionDetails[l];if(!f)return{};const h=f.turns.find(g=>g.id===a),m=(h==null?void 0:h.user_prompt)??null,y=f.turns.filter(g=>g.id!==a);return{restoredPrompt:m,sessionDetails:{...d.sessionDetails,[l]:{...f,is_running:0,status:"active",turns:y}},sessions:d.sessions.map(g=>g.id===l?{...g,is_running:0,status:"active"}:g),activeTurnIndex:y.length>0?Math.min(d.activeTurnIndex,y.length-1):0}})},onSessionTitle:(l,a)=>{s(d=>({sessions:d.sessions.map(f=>f.id===l?{...f,title:a}:f),sessionDetails:d.sessionDetails[l]?{...d.sessionDetails,[l]:{...d.sessionDetails[l],title:a}}:d.sessionDetails}))},onBackgroundTasksChanged:(l,a)=>{s(d=>{const f=d.sessionDetails[l];return f?{sessionDetails:{...d.sessionDetails,[l]:{...f,backgroundTasks:a}}}:{}})}});function La(s,i,l){return{...s,turns:s.turns.map(a=>{if(a.id!==i)return a;const d=a.items.findIndex(f=>f.external_item_id===l.external_item_id);if(d>=0){const f=[...a.items];return f[d]=l,{...a,items:f}}if(l.type==="agent_message"){const f=a.items.filter(h=>!(h.type==="agent_message"&&h.id.startsWith("delta-")));return{...a,items:[...f,l]}}return{...a,items:[...a.items,l]}})}}function ym(s,i,l,a){return{...s,turns:s.turns.map(d=>{var m;if(d.id!==i)return d;const f=d.items.findIndex(y=>y.external_item_id===l);if(f>=0){const y=d.items[f],k=(((m=y.data)==null?void 0:m.text)??"")+a,S=[...d.items];return S[f]={...y,data:{...y.data,text:k}},{...d,items:S,agent_response:k}}const h={id:`delta-${l}`,turn_id:i,external_item_id:l,type:"agent_message",data:{text:a},status:"in_progress",created_at:new Date().toISOString(),updated_at:new Date().toISOString()};return{...d,items:[...d.items,h],agent_response:a}})}}function xm(s){return Wr(`/providers/${s}/models`)}const Oa=160,$a=480,km=240,Fa=220,Ua=600,wm=300,Qd="agentpane:sidebar-width",qd="agentpane:right-panel-width";function Kd(s,i,l,a){try{const d=localStorage.getItem(s);if(d==null)return a;const f=Number(d);return Number.isFinite(f)?Math.min(l,Math.max(i,f)):a}catch{return a}}const Sm=(s,i)=>({activeRightTab:"turns",changesScope:"session",eventLog:[],loading:!1,error:null,showNewSessionDialog:!1,toasts:[],showCommandPalette:!1,selectedChangePath:null,lastModelConfig:null,models:[],modelsLoading:!1,showModelSelector:!1,sidebarWidth:Kd(Qd,Oa,$a,km),rightPanelWidth:Kd(qd,Fa,Ua,wm),setActiveTurnIndex:l=>s({activeTurnIndex:l}),switchRightTab:l=>s({activeRightTab:l}),setChangesScope:l=>s({changesScope:l}),setShowNewSessionDialog:l=>s({showNewSessionDialog:l}),setShowCommandPalette:l=>s({showCommandPalette:l}),setShowModelSelector:l=>s({showModelSelector:l}),setSelectedChangePath:l=>s({selectedChangePath:l}),setSidebarWidth:l=>{const a=Math.min($a,Math.max(Oa,Math.round(l)));s({sidebarWidth:a});try{localStorage.setItem(Qd,String(a))}catch{}},setRightPanelWidth:l=>{const a=Math.min(Ua,Math.max(Fa,Math.round(l)));s({rightPanelWidth:a});try{localStorage.setItem(qd,String(a))}catch{}},addToast:(l,a,d,f)=>{const h=Math.random().toString(36).slice(2,9);s(m=>({toasts:[...m.toasts,{id:h,type:l,message:a,undoAction:d,undoLabel:f}]}))},removeToast:l=>{s(a=>({toasts:a.toasts.filter(d=>d.id!==l)}))},addLogEntry:(l,a)=>{const d=new Date().toLocaleTimeString("en-GB",{hour12:!1});s(f=>({eventLog:[...f.eventLog,{time:d,level:l,message:a}]}))},loadModels:async l=>{if(!i().modelsLoading){s({modelsLoading:!0,models:[]});try{const a=await xm(l);s({models:a,modelsLoading:!1})}catch{s({modelsLoading:!1})}}}}),Tm=(s,i)=>({createThread:async(l,a)=>{try{await Tn(`/sessions/${l}/threads`,a),i().addLogEntry("INFO",`Thread created — "${a.message.slice(0,40)}"`)}catch(d){i().addToast("error",`Failed to create thread — ${d.message}`)}},followupThread:async(l,a,d)=>{try{await Tn(`/sessions/${l}/threads/${a}/followup`,{message:d}),i().addLogEntry("INFO",`Thread follow-up — "${d.slice(0,40)}"`)}catch(f){i().addToast("error",`Failed to send follow-up — ${f.message}`)}},resolveThread:async(l,a)=>{try{await dr(`/sessions/${l}/threads/${a}`,{status:"resolved"})}catch(d){i().addToast("error",`Failed to resolve thread — ${d.message}`)}},reopenThread:async(l,a)=>{try{await dr(`/sessions/${l}/threads/${a}`,{status:"open"})}catch(d){i().addToast("error",`Failed to reopen thread — ${d.message}`)}},deleteThread:async(l,a)=>{try{await Lf(`/sessions/${l}/threads/${a}`)}catch(d){i().addToast("error",`Failed to delete thread — ${d.message}`)}},onThreadCreated:(l,a,d)=>{s(f=>{const h=f.sessionDetails[l];return h?{sessionDetails:{...f.sessionDetails,[l]:{...h,threads:[...h.threads??[],a],turns:[...h.turns,{...d,items:[]}]}}}:{}})},onThreadFollowup:(l,a,d)=>{s(f=>{const h=f.sessionDetails[l];return h?{sessionDetails:{...f.sessionDetails,[l]:{...h,turns:[...h.turns,{...d,items:[]}]}}}:{}})},onThreadResolved:(l,a,d)=>{s(f=>{const h=f.sessionDetails[l];if(!h)return{};const m=(h.threads??[]).map(y=>y.id===a?{...y,status:d,resolved_at:d==="resolved"?new Date().toISOString():null}:y);return{sessionDetails:{...f.sessionDetails,[l]:{...h,threads:m}}}})},onThreadDeleted:(l,a)=>{s(d=>{const f=d.sessionDetails[l];return f?{sessionDetails:{...d.sessionDetails,[l]:{...f,threads:(f.threads??[]).filter(h=>h.id!==a),turns:f.turns.filter(h=>h.thread_id!==a)}}}:{}})}}),K=Zh()((...s)=>({...mm(...s),...gm(...s),...vm(...s),...Sm(...s),...Tm(...s)}));function Df(s){switch(s){case"claude":return{iconClass:"ic-claude",iconText:"CL"};case"codex":return{iconClass:"ic-codex",iconText:"CX"};case"repoburg":return{iconClass:"ic-repoburg",iconText:"RB"};case"cursor":return{iconClass:"ic-cursor",iconText:"CR"};default:return{iconClass:"ic-codex",iconText:"CX"}}}function _m(s,i){const l=new Date(s).getTime(),a=i?new Date(i).getTime():Date.now(),d=Math.max(0,Math.floor((a-l)/1e3));if(d<60)return`${d}s`;const f=Math.floor(d/60),h=d%60;if(f<60)return`${f}m ${h}s`;const m=Math.floor(f/60),y=f%60;return`${m}h ${y}m`}function Nm(s,i,l=!1,a="working"){if(a==="finished")return"";if(i)return"running";if(l&&s!=="failed")return"queued";switch(s){case"failed":return"error";case"aborted":return"paused";default:return"paused"}}function Em(s,i,l=!1,a="working"){if(a==="finished")return"Finished";if(i)return"Running";if(l&&s!=="failed")return"Review Pending";switch(s){case"failed":return"Failed";case"aborted":return"Aborted";case"active":return"Idle";case"completed":return"Completed";case"running":return"Running";default:return s}}function eu(s){const i=s.is_running===1,l=s.lifecycle==="finished",a=Df(s.runtime_type);return{dot:Nm(s.status,i,s.has_unreviewed===1,s.lifecycle),label:Em(s.status,i,s.has_unreviewed===1,s.lifecycle),iconClass:a.iconClass,iconText:a.iconText,isRunning:i,isFinished:l}}function tu(s,i,l=!0){D.useEffect(()=>{if(!l)return;function a(d){s.current&&!s.current.contains(d.target)&&i()}return document.addEventListener("mousedown",a),document.addEventListener("touchstart",a),()=>{document.removeEventListener("mousedown",a),document.removeEventListener("touchstart",a)}},[s,i,l])}function nu(s,i=!0){D.useEffect(()=>{if(!i)return;function l(a){a.key==="Escape"&&s()}return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[s,i])}function ru({status:s,size:i=6}){return c.jsx("span",{className:`status-dot ${s}`,style:i!==6?{width:i,height:i}:void 0})}function Pf({iconClass:s,iconText:i,size:l=20}){return c.jsx("span",{className:`runtime-icon ${s}`,style:l!==20?{width:l,height:l,fontSize:l*.45}:void 0,children:i})}/**
|
|
42
|
-
* @license lucide-react v0.469.0 - ISC
|
|
43
|
-
*
|
|
44
|
-
* This source code is licensed under the ISC license.
|
|
45
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
-
*/const Cm=s=>s.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Mf=(...s)=>s.filter((i,l,a)=>!!i&&i.trim()!==""&&a.indexOf(i)===l).join(" ").trim();/**
|
|
47
|
-
* @license lucide-react v0.469.0 - ISC
|
|
48
|
-
*
|
|
49
|
-
* This source code is licensed under the ISC license.
|
|
50
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
51
|
-
*/var jm={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
52
|
-
* @license lucide-react v0.469.0 - ISC
|
|
53
|
-
*
|
|
54
|
-
* This source code is licensed under the ISC license.
|
|
55
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
-
*/const Rm=D.forwardRef(({color:s="currentColor",size:i=24,strokeWidth:l=2,absoluteStrokeWidth:a,className:d="",children:f,iconNode:h,...m},y)=>D.createElement("svg",{ref:y,...jm,width:i,height:i,stroke:s,strokeWidth:a?Number(l)*24/Number(i):l,className:Mf("lucide",d),...m},[...h.map(([g,k])=>D.createElement(g,k)),...Array.isArray(f)?f:[f]]));/**
|
|
57
|
-
* @license lucide-react v0.469.0 - ISC
|
|
58
|
-
*
|
|
59
|
-
* This source code is licensed under the ISC license.
|
|
60
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
-
*/const Se=(s,i)=>{const l=D.forwardRef(({className:a,...d},f)=>D.createElement(Rm,{ref:f,iconNode:i,className:Mf(`lucide-${Cm(s)}`,a),...d}));return l.displayName=`${s}`,l};/**
|
|
62
|
-
* @license lucide-react v0.469.0 - ISC
|
|
63
|
-
*
|
|
64
|
-
* This source code is licensed under the ISC license.
|
|
65
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
-
*/const Lm=Se("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
|
|
67
|
-
* @license lucide-react v0.469.0 - ISC
|
|
68
|
-
*
|
|
69
|
-
* This source code is licensed under the ISC license.
|
|
70
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
-
*/const Ba=Se("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
|
|
72
|
-
* @license lucide-react v0.469.0 - ISC
|
|
73
|
-
*
|
|
74
|
-
* This source code is licensed under the ISC license.
|
|
75
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
-
*/const Im=Se("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/**
|
|
77
|
-
* @license lucide-react v0.469.0 - ISC
|
|
78
|
-
*
|
|
79
|
-
* This source code is licensed under the ISC license.
|
|
80
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
-
*/const yl=Se("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
82
|
-
* @license lucide-react v0.469.0 - ISC
|
|
83
|
-
*
|
|
84
|
-
* This source code is licensed under the ISC license.
|
|
85
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
-
*/const Wa=Se("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
87
|
-
* @license lucide-react v0.469.0 - ISC
|
|
88
|
-
*
|
|
89
|
-
* This source code is licensed under the ISC license.
|
|
90
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
-
*/const su=Se("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
92
|
-
* @license lucide-react v0.469.0 - ISC
|
|
93
|
-
*
|
|
94
|
-
* This source code is licensed under the ISC license.
|
|
95
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
-
*/const lu=Se("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
|
97
|
-
* @license lucide-react v0.469.0 - ISC
|
|
98
|
-
*
|
|
99
|
-
* This source code is licensed under the ISC license.
|
|
100
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
-
*/const Am=Se("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
102
|
-
* @license lucide-react v0.469.0 - ISC
|
|
103
|
-
*
|
|
104
|
-
* This source code is licensed under the ISC license.
|
|
105
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
-
*/const bf=Se("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
107
|
-
* @license lucide-react v0.469.0 - ISC
|
|
108
|
-
*
|
|
109
|
-
* This source code is licensed under the ISC license.
|
|
110
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
-
*/const zf=Se("Cog",[["path",{d:"M12 20a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z",key:"sobvz5"}],["path",{d:"M12 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z",key:"11i496"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 22v-2",key:"1osdcq"}],["path",{d:"m17 20.66-1-1.73",key:"eq3orb"}],["path",{d:"M11 10.27 7 3.34",key:"16pf9h"}],["path",{d:"m20.66 17-1.73-1",key:"sg0v6f"}],["path",{d:"m3.34 7 1.73 1",key:"1ulond"}],["path",{d:"M14 12h8",key:"4f43i9"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"m20.66 7-1.73 1",key:"1ow05n"}],["path",{d:"m3.34 17 1.73-1",key:"nuk764"}],["path",{d:"m17 3.34-1 1.73",key:"2wel8s"}],["path",{d:"m11 13.73-4 6.93",key:"794ttg"}]]);/**
|
|
112
|
-
* @license lucide-react v0.469.0 - ISC
|
|
113
|
-
*
|
|
114
|
-
* This source code is licensed under the ISC license.
|
|
115
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
-
*/const Yd=Se("Command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]);/**
|
|
117
|
-
* @license lucide-react v0.469.0 - ISC
|
|
118
|
-
*
|
|
119
|
-
* This source code is licensed under the ISC license.
|
|
120
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
-
*/const Dm=Se("CornerDownLeft",[["polyline",{points:"9 10 4 15 9 20",key:"r3jprv"}],["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}]]);/**
|
|
122
|
-
* @license lucide-react v0.469.0 - ISC
|
|
123
|
-
*
|
|
124
|
-
* This source code is licensed under the ISC license.
|
|
125
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
-
*/const Pm=Se("FileCode",[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]]);/**
|
|
127
|
-
* @license lucide-react v0.469.0 - ISC
|
|
128
|
-
*
|
|
129
|
-
* This source code is licensed under the ISC license.
|
|
130
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
-
*/const Mm=Se("FilePlus",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]]);/**
|
|
132
|
-
* @license lucide-react v0.469.0 - ISC
|
|
133
|
-
*
|
|
134
|
-
* This source code is licensed under the ISC license.
|
|
135
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
-
*/const Of=Se("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|
137
|
-
* @license lucide-react v0.469.0 - ISC
|
|
138
|
-
*
|
|
139
|
-
* This source code is licensed under the ISC license.
|
|
140
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
-
*/const bm=Se("FolderPlus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
|
|
142
|
-
* @license lucide-react v0.469.0 - ISC
|
|
143
|
-
*
|
|
144
|
-
* This source code is licensed under the ISC license.
|
|
145
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
-
*/const zm=Se("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
|
|
147
|
-
* @license lucide-react v0.469.0 - ISC
|
|
148
|
-
*
|
|
149
|
-
* This source code is licensed under the ISC license.
|
|
150
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
-
*/const Om=Se("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);/**
|
|
152
|
-
* @license lucide-react v0.469.0 - ISC
|
|
153
|
-
*
|
|
154
|
-
* This source code is licensed under the ISC license.
|
|
155
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
-
*/const $m=Se("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|
157
|
-
* @license lucide-react v0.469.0 - ISC
|
|
158
|
-
*
|
|
159
|
-
* This source code is licensed under the ISC license.
|
|
160
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
-
*/const Fm=Se("Layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);/**
|
|
162
|
-
* @license lucide-react v0.469.0 - ISC
|
|
163
|
-
*
|
|
164
|
-
* This source code is licensed under the ISC license.
|
|
165
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
-
*/const Um=Se("ListTodo",[["rect",{x:"3",y:"5",width:"6",height:"6",rx:"1",key:"1defrl"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]]);/**
|
|
167
|
-
* @license lucide-react v0.469.0 - ISC
|
|
168
|
-
*
|
|
169
|
-
* This source code is licensed under the ISC license.
|
|
170
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
171
|
-
*/const Bm=Se("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/**
|
|
172
|
-
* @license lucide-react v0.469.0 - ISC
|
|
173
|
-
*
|
|
174
|
-
* This source code is licensed under the ISC license.
|
|
175
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
-
*/const Wm=Se("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
|
|
177
|
-
* @license lucide-react v0.469.0 - ISC
|
|
178
|
-
*
|
|
179
|
-
* This source code is licensed under the ISC license.
|
|
180
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
-
*/const Hm=Se("MessageSquarePlus",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}],["path",{d:"M12 7v6",key:"lw1j43"}],["path",{d:"M9 10h6",key:"9gxzsh"}]]);/**
|
|
182
|
-
* @license lucide-react v0.469.0 - ISC
|
|
183
|
-
*
|
|
184
|
-
* This source code is licensed under the ISC license.
|
|
185
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
186
|
-
*/const Vm=Se("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
|
|
187
|
-
* @license lucide-react v0.469.0 - ISC
|
|
188
|
-
*
|
|
189
|
-
* This source code is licensed under the ISC license.
|
|
190
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
-
*/const Gm=Se("Minimize2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
|
|
192
|
-
* @license lucide-react v0.469.0 - ISC
|
|
193
|
-
*
|
|
194
|
-
* This source code is licensed under the ISC license.
|
|
195
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
196
|
-
*/const Qm=Se("Navigation",[["polygon",{points:"3 11 22 2 13 21 11 13 3 11",key:"1ltx0t"}]]);/**
|
|
197
|
-
* @license lucide-react v0.469.0 - ISC
|
|
198
|
-
*
|
|
199
|
-
* This source code is licensed under the ISC license.
|
|
200
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
201
|
-
*/const qm=Se("Paperclip",[["path",{d:"M13.234 20.252 21 12.3",key:"1cbrk9"}],["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 0 2.828 2 2 0 0 0 2.828 0l8.414-8.586a4 4 0 0 0 0-5.656 4 4 0 0 0-5.656 0l-8.415 8.585a6 6 0 1 0 8.486 8.486",key:"1pkts6"}]]);/**
|
|
202
|
-
* @license lucide-react v0.469.0 - ISC
|
|
203
|
-
*
|
|
204
|
-
* This source code is licensed under the ISC license.
|
|
205
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
206
|
-
*/const Km=Se("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/**
|
|
207
|
-
* @license lucide-react v0.469.0 - ISC
|
|
208
|
-
*
|
|
209
|
-
* This source code is licensed under the ISC license.
|
|
210
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
211
|
-
*/const Ym=Se("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]);/**
|
|
212
|
-
* @license lucide-react v0.469.0 - ISC
|
|
213
|
-
*
|
|
214
|
-
* This source code is licensed under the ISC license.
|
|
215
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
216
|
-
*/const xl=Se("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
217
|
-
* @license lucide-react v0.469.0 - ISC
|
|
218
|
-
*
|
|
219
|
-
* This source code is licensed under the ISC license.
|
|
220
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
221
|
-
*/const $f=Se("Quote",[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]]);/**
|
|
222
|
-
* @license lucide-react v0.469.0 - ISC
|
|
223
|
-
*
|
|
224
|
-
* This source code is licensed under the ISC license.
|
|
225
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
226
|
-
*/const Xm=Se("Rewind",[["polygon",{points:"11 19 2 12 11 5 11 19",key:"14yba5"}],["polygon",{points:"22 19 13 12 22 5 22 19",key:"1pi1cj"}]]);/**
|
|
227
|
-
* @license lucide-react v0.469.0 - ISC
|
|
228
|
-
*
|
|
229
|
-
* This source code is licensed under the ISC license.
|
|
230
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
231
|
-
*/const iu=Se("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
|
|
232
|
-
* @license lucide-react v0.469.0 - ISC
|
|
233
|
-
*
|
|
234
|
-
* This source code is licensed under the ISC license.
|
|
235
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
236
|
-
*/const Ff=Se("SatelliteDish",[["path",{d:"M4 10a7.31 7.31 0 0 0 10 10Z",key:"1fzpp3"}],["path",{d:"m9 15 3-3",key:"88sc13"}],["path",{d:"M17 13a6 6 0 0 0-6-6",key:"15cc6u"}],["path",{d:"M21 13A10 10 0 0 0 11 3",key:"11nf8s"}]]);/**
|
|
237
|
-
* @license lucide-react v0.469.0 - ISC
|
|
238
|
-
*
|
|
239
|
-
* This source code is licensed under the ISC license.
|
|
240
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
241
|
-
*/const Zm=Se("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
242
|
-
* @license lucide-react v0.469.0 - ISC
|
|
243
|
-
*
|
|
244
|
-
* This source code is licensed under the ISC license.
|
|
245
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
246
|
-
*/const ou=Se("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
|
|
247
|
-
* @license lucide-react v0.469.0 - ISC
|
|
248
|
-
*
|
|
249
|
-
* This source code is licensed under the ISC license.
|
|
250
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
251
|
-
*/const Wi=Se("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
|
|
252
|
-
* @license lucide-react v0.469.0 - ISC
|
|
253
|
-
*
|
|
254
|
-
* This source code is licensed under the ISC license.
|
|
255
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
256
|
-
*/const Uf=Se("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
|
|
257
|
-
* @license lucide-react v0.469.0 - ISC
|
|
258
|
-
*
|
|
259
|
-
* This source code is licensed under the ISC license.
|
|
260
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
261
|
-
*/const kl=Se("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
262
|
-
* @license lucide-react v0.469.0 - ISC
|
|
263
|
-
*
|
|
264
|
-
* This source code is licensed under the ISC license.
|
|
265
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
266
|
-
*/const Jm=Se("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
267
|
-
* @license lucide-react v0.469.0 - ISC
|
|
268
|
-
*
|
|
269
|
-
* This source code is licensed under the ISC license.
|
|
270
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
271
|
-
*/const eg=Se("Undo2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]);/**
|
|
272
|
-
* @license lucide-react v0.469.0 - ISC
|
|
273
|
-
*
|
|
274
|
-
* This source code is licensed under the ISC license.
|
|
275
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
276
|
-
*/const tg=Se("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
|
|
277
|
-
* @license lucide-react v0.469.0 - ISC
|
|
278
|
-
*
|
|
279
|
-
* This source code is licensed under the ISC license.
|
|
280
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
281
|
-
*/const ng=Se("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/**
|
|
282
|
-
* @license lucide-react v0.469.0 - ISC
|
|
283
|
-
*
|
|
284
|
-
* This source code is licensed under the ISC license.
|
|
285
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
286
|
-
*/const fr=Se("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
|
287
|
-
* @license lucide-react v0.469.0 - ISC
|
|
288
|
-
*
|
|
289
|
-
* This source code is licensed under the ISC license.
|
|
290
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
291
|
-
*/const Xd=Se("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);function rg(s,i){const l=new Map;for(const h of i){const m=h.cwd||"(no directory)",y=l.get(m)??[];y.push(h),l.set(m,y)}const a=new Set,d=new Set(s.filter(h=>h.deleted===1).map(h=>h.path)),f=[];for(const h of s){if(h.deleted===1){a.add(h.path);continue}a.add(h.path),f.push({path:h.path,label:h.label||h.path.split("/").pop()||h.path,sessions:l.get(h.path)??[],workspace:h})}for(const[h,m]of l)a.has(h)||d.has(h)||f.push({path:h,label:h==="(no directory)"?"Other":h.split("/").pop()||h,sessions:m,workspace:null});return f}function sg(){const{sessions:s,workspaces:i,activeSessionId:l,selectSession:a,deleteSession:d,removeWorkspace:f,createSessionInWorkspace:h,pickAndAddWorkspace:m,renameSession:y,markFinished:g,reopenSession:k}=K(),[S,w]=D.useState(new Set),[M,I]=D.useState(new Set),[E,z]=D.useState(null),[Z,Q]=D.useState(null),[J,O]=D.useState(""),re=D.useRef(null),fe=D.useRef(null);tu(re,()=>z(null),!!E),nu(()=>z(null),!!E);function oe(ce){w(P=>{const q=new Set(P);return q.has(ce)?q.delete(ce):q.add(ce),q})}function ae(ce){I(P=>{const q=new Set(P);return q.has(ce)?q.delete(ce):q.add(ce),q})}D.useEffect(()=>{Z&&fe.current&&(fe.current.focus(),fe.current.select())},[Z]);function Te(ce,P){Q(ce),O(P||ce.slice(0,8))}function te(){Z&&y(Z,J),Q(null)}function ve(){Q(null),O("")}const _e=rg(i,s);function je(ce){const P=l===ce.id,q=eu(ce);return c.jsxs("div",{className:`tree-item ${P?"active":""} ${q.isFinished?"tree-item-finished":""}`,onClick:()=>a(ce.id),onContextMenu:X=>{X.preventDefault(),z({x:X.clientX,y:X.clientY,type:"session",sessionId:ce.id,sessionTitle:ce.title,sessionLifecycle:ce.lifecycle})},children:[c.jsx(Pf,{iconClass:q.iconClass,iconText:q.iconText,size:16}),Z===ce.id?c.jsx("input",{ref:fe,className:"tree-rename-input",value:J,onChange:X=>O(X.target.value),onClick:X=>X.stopPropagation(),onKeyDown:X=>{X.key==="Enter"&&te(),X.key==="Escape"&&ve()},onBlur:te}):c.jsx("span",{className:"tree-label",children:ce.title||ce.id.slice(0,8)}),q.dot&&c.jsx(ru,{status:q.dot})]},ce.id)}return c.jsxs("div",{className:"ide-sidebar",children:[c.jsxs("div",{className:"sidebar-header",children:[c.jsx("span",{className:"sidebar-header-title",children:"Workspaces"}),c.jsx("button",{className:"sidebar-add",title:"Add workspace",onClick:()=>m(),children:c.jsx(xl,{size:14})})]}),_e.length===0?c.jsx("div",{className:"empty-state",style:{padding:"16px"},children:"No workspaces yet. Click + to add one."}):_e.map(ce=>{const P=S.has(ce.path),q=ce.sessions.filter(H=>H.lifecycle!=="finished"),X=ce.sessions.filter(H=>H.lifecycle==="finished"),$=`${ce.path}:finished`,Y=M.has($);return c.jsxs("div",{className:`tree-section ${P?"collapsed":""}`,children:[c.jsxs("div",{className:"tree-section-header",onClick:()=>oe(ce.path),onContextMenu:H=>{H.preventDefault(),z({x:H.clientX,y:H.clientY,type:"workspace",path:ce.path})},children:[c.jsx(Wa,{size:9,className:"tree-chevron"}),c.jsx(zm,{size:14}),c.jsx("span",{className:"tree-section-label",children:ce.label}),c.jsx("button",{className:"tree-section-add",title:"New session in this workspace",onClick:H=>{H.stopPropagation(),h(ce.path)},children:c.jsx(xl,{size:11})}),c.jsx("span",{className:"tree-count",children:ce.sessions.length})]}),c.jsxs("div",{className:"tree-children",children:[q.length===0&&X.length===0?c.jsx("div",{className:"tree-empty",children:"No sessions"}):q.map(je),X.length>0&&c.jsxs("div",{className:`tree-subgroup ${Y?"collapsed":""}`,children:[c.jsxs("div",{className:"tree-subgroup-header",onClick:()=>ae($),children:[c.jsx(Wa,{size:8,className:"tree-chevron"}),c.jsx("span",{className:"tree-subgroup-label",children:"Finished"}),c.jsx("span",{className:"tree-subgroup-count",children:X.length})]}),!Y&&c.jsx("div",{className:"tree-subgroup-items",children:X.map(je)})]})]})]},ce.path)}),c.jsxs("div",{className:"sidebar-footer",onClick:()=>m(),children:[c.jsx(bm,{size:14}),c.jsx("span",{children:"Add workspace"})]}),E&&c.jsxs("div",{ref:re,className:"ctx-menu",style:{position:"fixed",left:E.x,top:E.y,zIndex:500},children:[E.type==="workspace"&&c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"ctx-menu-item",onClick:()=>{h(E.path),z(null)},children:[c.jsx(xl,{size:12})," New Session"]}),c.jsxs("div",{className:"ctx-menu-item ctx-danger",onClick:()=>{f(E.path),z(null)},children:[c.jsx(kl,{size:12})," Hide Workspace"]})]}),E.type==="session"&&c.jsx(c.Fragment,{children:E.sessionLifecycle!=="finished"?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"ctx-menu-item",onClick:()=>{Te(E.sessionId,E.sessionTitle??""),z(null)},children:[c.jsx(Km,{size:12})," Rename"]}),c.jsxs("div",{className:"ctx-menu-item",onClick:()=>{g(E.sessionId),z(null)},children:[c.jsx(bf,{size:12})," Mark as Finished"]}),c.jsxs("div",{className:"ctx-menu-item ctx-danger",onClick:()=>{d(E.sessionId),z(null)},children:[c.jsx(kl,{size:12})," Delete Session"]})]}):c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"ctx-menu-item",onClick:()=>{k(E.sessionId),z(null)},children:[c.jsx(iu,{size:12})," Reopen"]}),c.jsxs("div",{className:"ctx-menu-item ctx-danger",onClick:()=>{d(E.sessionId),z(null)},children:[c.jsx(kl,{size:12})," Delete Session"]})]})})]})]})}function lg(){const s=K(h=>h.openTabs),i=K(h=>h.activeSessionId),l=K(h=>h.sessions),a=K(h=>h.selectSession),d=K(h=>h.closeTab),f=K(h=>h.setShowNewSessionDialog);return c.jsxs("div",{className:"ide-tabs",children:[s.map(h=>{const m=l.find(k=>k.id===h);if(!m)return null;const y=eu(m),g=i===h;return c.jsxs("div",{className:`ide-tab ${g?"active":""}`,onClick:()=>a(h),children:[c.jsx(Pf,{iconClass:y.iconClass,iconText:y.iconText,size:14}),m.title||h.slice(0,8),y.dot&&c.jsx(ru,{status:y.dot}),c.jsx("span",{className:"ide-tab-close",onClick:k=>{k.stopPropagation(),d(h)},children:c.jsx(fr,{size:12})})]},h)}),c.jsx("div",{className:"ide-tab-add",title:"New Session",onClick:()=>f(!0),children:c.jsx(xl,{size:14})})]})}function au(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Hr=au();function Bf(s){Hr=s}var wl={exec:()=>null};function Ue(s,i=""){let l=typeof s=="string"?s:s.source;const a={replace:(d,f)=>{let h=typeof f=="string"?f:f.source;return h=h.replace(Lt.caret,"$1"),l=l.replace(d,h),a},getRegex:()=>new RegExp(l,i)};return a}var Lt={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:s=>new RegExp(`^( {0,3}${s})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}#`),htmlBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}<(?:[a-z].*>|!--)`,"i")},ig=/^(?:[ \t]*(?:\n|$))+/,og=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,ag=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Tl=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ug=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,uu=/(?:[*+-]|\d{1,9}[.)])/,Wf=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Hf=Ue(Wf).replace(/bull/g,uu).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),cg=Ue(Wf).replace(/bull/g,uu).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),cu=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,dg=/^[^\n]+/,du=/(?!\s*\])(?:\\.|[^\[\]\\])+/,fg=Ue(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",du).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),pg=Ue(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,uu).getRegex(),Hi="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",fu=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,hg=Ue("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",fu).replace("tag",Hi).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Vf=Ue(cu).replace("hr",Tl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Hi).getRegex(),mg=Ue(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Vf).getRegex(),pu={blockquote:mg,code:og,def:fg,fences:ag,heading:ug,hr:Tl,html:hg,lheading:Hf,list:pg,newline:ig,paragraph:Vf,table:wl,text:dg},Zd=Ue("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Tl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Hi).getRegex(),gg={...pu,lheading:cg,table:Zd,paragraph:Ue(cu).replace("hr",Tl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Zd).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Hi).getRegex()},vg={...pu,html:Ue(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",fu).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:wl,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ue(cu).replace("hr",Tl).replace("heading",` *#{1,6} *[^
|
|
292
|
-
]`).replace("lheading",Hf).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},yg=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,xg=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Gf=/^( {2,}|\\)\n(?!\s*$)/,kg=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Vi=/[\p{P}\p{S}]/u,hu=/[\s\p{P}\p{S}]/u,Qf=/[^\s\p{P}\p{S}]/u,wg=Ue(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,hu).getRegex(),qf=/(?!~)[\p{P}\p{S}]/u,Sg=/(?!~)[\s\p{P}\p{S}]/u,Tg=/(?:[^\s\p{P}\p{S}]|~)/u,_g=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,Kf=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Ng=Ue(Kf,"u").replace(/punct/g,Vi).getRegex(),Eg=Ue(Kf,"u").replace(/punct/g,qf).getRegex(),Yf="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Cg=Ue(Yf,"gu").replace(/notPunctSpace/g,Qf).replace(/punctSpace/g,hu).replace(/punct/g,Vi).getRegex(),jg=Ue(Yf,"gu").replace(/notPunctSpace/g,Tg).replace(/punctSpace/g,Sg).replace(/punct/g,qf).getRegex(),Rg=Ue("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Qf).replace(/punctSpace/g,hu).replace(/punct/g,Vi).getRegex(),Lg=Ue(/\\(punct)/,"gu").replace(/punct/g,Vi).getRegex(),Ig=Ue(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Ag=Ue(fu).replace("(?:-->|$)","-->").getRegex(),Dg=Ue("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Ag).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),$i=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Pg=Ue(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",$i).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Xf=Ue(/^!?\[(label)\]\[(ref)\]/).replace("label",$i).replace("ref",du).getRegex(),Zf=Ue(/^!?\[(ref)\](?:\[\])?/).replace("ref",du).getRegex(),Mg=Ue("reflink|nolink(?!\\()","g").replace("reflink",Xf).replace("nolink",Zf).getRegex(),mu={_backpedal:wl,anyPunctuation:Lg,autolink:Ig,blockSkip:_g,br:Gf,code:xg,del:wl,emStrongLDelim:Ng,emStrongRDelimAst:Cg,emStrongRDelimUnd:Rg,escape:yg,link:Pg,nolink:Zf,punctuation:wg,reflink:Xf,reflinkSearch:Mg,tag:Dg,text:kg,url:wl},bg={...mu,link:Ue(/^!?\[(label)\]\((.*?)\)/).replace("label",$i).getRegex(),reflink:Ue(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",$i).getRegex()},Ha={...mu,emStrongRDelimAst:jg,emStrongLDelim:Eg,url:Ue(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},zg={...Ha,br:Ue(Gf).replace("{2,}","*").getRegex(),text:Ue(Ha.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Pi={normal:pu,gfm:gg,pedantic:vg},cl={normal:mu,gfm:Ha,breaks:zg,pedantic:bg},Og={"&":"&","<":"<",">":">",'"':""","'":"'"},Jd=s=>Og[s];function Sn(s,i){if(i){if(Lt.escapeTest.test(s))return s.replace(Lt.escapeReplace,Jd)}else if(Lt.escapeTestNoEncode.test(s))return s.replace(Lt.escapeReplaceNoEncode,Jd);return s}function ef(s){try{s=encodeURI(s).replace(Lt.percentDecode,"%")}catch{return null}return s}function tf(s,i){var f;const l=s.replace(Lt.findPipe,(h,m,y)=>{let g=!1,k=m;for(;--k>=0&&y[k]==="\\";)g=!g;return g?"|":" |"}),a=l.split(Lt.splitPipe);let d=0;if(a[0].trim()||a.shift(),a.length>0&&!((f=a.at(-1))!=null&&f.trim())&&a.pop(),i)if(a.length>i)a.splice(i);else for(;a.length<i;)a.push("");for(;d<a.length;d++)a[d]=a[d].trim().replace(Lt.slashPipe,"|");return a}function dl(s,i,l){const a=s.length;if(a===0)return"";let d=0;for(;d<a&&s.charAt(a-d-1)===i;)d++;return s.slice(0,a-d)}function $g(s,i){if(s.indexOf(i[1])===-1)return-1;let l=0;for(let a=0;a<s.length;a++)if(s[a]==="\\")a++;else if(s[a]===i[0])l++;else if(s[a]===i[1]&&(l--,l<0))return a;return l>0?-2:-1}function nf(s,i,l,a,d){const f=i.href,h=i.title||null,m=s[1].replace(d.other.outputLinkReplace,"$1");a.state.inLink=!0;const y={type:s[0].charAt(0)==="!"?"image":"link",raw:l,href:f,title:h,text:m,tokens:a.inlineTokens(m)};return a.state.inLink=!1,y}function Fg(s,i,l){const a=s.match(l.other.indentCodeCompensation);if(a===null)return i;const d=a[1];return i.split(`
|
|
293
|
-
`).map(f=>{const h=f.match(l.other.beginningSpace);if(h===null)return f;const[m]=h;return m.length>=d.length?f.slice(d.length):f}).join(`
|
|
294
|
-
`)}var Fi=class{constructor(s){Ge(this,"options");Ge(this,"rules");Ge(this,"lexer");this.options=s||Hr}space(s){const i=this.rules.block.newline.exec(s);if(i&&i[0].length>0)return{type:"space",raw:i[0]}}code(s){const i=this.rules.block.code.exec(s);if(i){const l=i[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:i[0],codeBlockStyle:"indented",text:this.options.pedantic?l:dl(l,`
|
|
295
|
-
`)}}}fences(s){const i=this.rules.block.fences.exec(s);if(i){const l=i[0],a=Fg(l,i[3]||"",this.rules);return{type:"code",raw:l,lang:i[2]?i[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):i[2],text:a}}}heading(s){const i=this.rules.block.heading.exec(s);if(i){let l=i[2].trim();if(this.rules.other.endingHash.test(l)){const a=dl(l,"#");(this.options.pedantic||!a||this.rules.other.endingSpaceChar.test(a))&&(l=a.trim())}return{type:"heading",raw:i[0],depth:i[1].length,text:l,tokens:this.lexer.inline(l)}}}hr(s){const i=this.rules.block.hr.exec(s);if(i)return{type:"hr",raw:dl(i[0],`
|
|
296
|
-
`)}}blockquote(s){const i=this.rules.block.blockquote.exec(s);if(i){let l=dl(i[0],`
|
|
297
|
-
`).split(`
|
|
298
|
-
`),a="",d="";const f=[];for(;l.length>0;){let h=!1;const m=[];let y;for(y=0;y<l.length;y++)if(this.rules.other.blockquoteStart.test(l[y]))m.push(l[y]),h=!0;else if(!h)m.push(l[y]);else break;l=l.slice(y);const g=m.join(`
|
|
299
|
-
`),k=g.replace(this.rules.other.blockquoteSetextReplace,`
|
|
300
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");a=a?`${a}
|
|
301
|
-
${g}`:g,d=d?`${d}
|
|
302
|
-
${k}`:k;const S=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(k,f,!0),this.lexer.state.top=S,l.length===0)break;const w=f.at(-1);if((w==null?void 0:w.type)==="code")break;if((w==null?void 0:w.type)==="blockquote"){const M=w,I=M.raw+`
|
|
303
|
-
`+l.join(`
|
|
304
|
-
`),E=this.blockquote(I);f[f.length-1]=E,a=a.substring(0,a.length-M.raw.length)+E.raw,d=d.substring(0,d.length-M.text.length)+E.text;break}else if((w==null?void 0:w.type)==="list"){const M=w,I=M.raw+`
|
|
305
|
-
`+l.join(`
|
|
306
|
-
`),E=this.list(I);f[f.length-1]=E,a=a.substring(0,a.length-w.raw.length)+E.raw,d=d.substring(0,d.length-M.raw.length)+E.raw,l=I.substring(f.at(-1).raw.length).split(`
|
|
307
|
-
`);continue}}return{type:"blockquote",raw:a,tokens:f,text:d}}}list(s){let i=this.rules.block.list.exec(s);if(i){let l=i[1].trim();const a=l.length>1,d={type:"list",raw:"",ordered:a,start:a?+l.slice(0,-1):"",loose:!1,items:[]};l=a?`\\d{1,9}\\${l.slice(-1)}`:`\\${l}`,this.options.pedantic&&(l=a?l:"[*+-]");const f=this.rules.other.listItemRegex(l);let h=!1;for(;s;){let y=!1,g="",k="";if(!(i=f.exec(s))||this.rules.block.hr.test(s))break;g=i[0],s=s.substring(g.length);let S=i[2].split(`
|
|
308
|
-
`,1)[0].replace(this.rules.other.listReplaceTabs,Z=>" ".repeat(3*Z.length)),w=s.split(`
|
|
309
|
-
`,1)[0],M=!S.trim(),I=0;if(this.options.pedantic?(I=2,k=S.trimStart()):M?I=i[1].length+1:(I=i[2].search(this.rules.other.nonSpaceChar),I=I>4?1:I,k=S.slice(I),I+=i[1].length),M&&this.rules.other.blankLine.test(w)&&(g+=w+`
|
|
310
|
-
`,s=s.substring(w.length+1),y=!0),!y){const Z=this.rules.other.nextBulletRegex(I),Q=this.rules.other.hrRegex(I),J=this.rules.other.fencesBeginRegex(I),O=this.rules.other.headingBeginRegex(I),re=this.rules.other.htmlBeginRegex(I);for(;s;){const fe=s.split(`
|
|
311
|
-
`,1)[0];let oe;if(w=fe,this.options.pedantic?(w=w.replace(this.rules.other.listReplaceNesting," "),oe=w):oe=w.replace(this.rules.other.tabCharGlobal," "),J.test(w)||O.test(w)||re.test(w)||Z.test(w)||Q.test(w))break;if(oe.search(this.rules.other.nonSpaceChar)>=I||!w.trim())k+=`
|
|
312
|
-
`+oe.slice(I);else{if(M||S.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||J.test(S)||O.test(S)||Q.test(S))break;k+=`
|
|
313
|
-
`+w}!M&&!w.trim()&&(M=!0),g+=fe+`
|
|
314
|
-
`,s=s.substring(fe.length+1),S=oe.slice(I)}}d.loose||(h?d.loose=!0:this.rules.other.doubleBlankLine.test(g)&&(h=!0));let E=null,z;this.options.gfm&&(E=this.rules.other.listIsTask.exec(k),E&&(z=E[0]!=="[ ] ",k=k.replace(this.rules.other.listReplaceTask,""))),d.items.push({type:"list_item",raw:g,task:!!E,checked:z,loose:!1,text:k,tokens:[]}),d.raw+=g}const m=d.items.at(-1);if(m)m.raw=m.raw.trimEnd(),m.text=m.text.trimEnd();else return;d.raw=d.raw.trimEnd();for(let y=0;y<d.items.length;y++)if(this.lexer.state.top=!1,d.items[y].tokens=this.lexer.blockTokens(d.items[y].text,[]),!d.loose){const g=d.items[y].tokens.filter(S=>S.type==="space"),k=g.length>0&&g.some(S=>this.rules.other.anyLine.test(S.raw));d.loose=k}if(d.loose)for(let y=0;y<d.items.length;y++)d.items[y].loose=!0;return d}}html(s){const i=this.rules.block.html.exec(s);if(i)return{type:"html",block:!0,raw:i[0],pre:i[1]==="pre"||i[1]==="script"||i[1]==="style",text:i[0]}}def(s){const i=this.rules.block.def.exec(s);if(i){const l=i[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),a=i[2]?i[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",d=i[3]?i[3].substring(1,i[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):i[3];return{type:"def",tag:l,raw:i[0],href:a,title:d}}}table(s){var h;const i=this.rules.block.table.exec(s);if(!i||!this.rules.other.tableDelimiter.test(i[2]))return;const l=tf(i[1]),a=i[2].replace(this.rules.other.tableAlignChars,"").split("|"),d=(h=i[3])!=null&&h.trim()?i[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
315
|
-
`):[],f={type:"table",raw:i[0],header:[],align:[],rows:[]};if(l.length===a.length){for(const m of a)this.rules.other.tableAlignRight.test(m)?f.align.push("right"):this.rules.other.tableAlignCenter.test(m)?f.align.push("center"):this.rules.other.tableAlignLeft.test(m)?f.align.push("left"):f.align.push(null);for(let m=0;m<l.length;m++)f.header.push({text:l[m],tokens:this.lexer.inline(l[m]),header:!0,align:f.align[m]});for(const m of d)f.rows.push(tf(m,f.header.length).map((y,g)=>({text:y,tokens:this.lexer.inline(y),header:!1,align:f.align[g]})));return f}}lheading(s){const i=this.rules.block.lheading.exec(s);if(i)return{type:"heading",raw:i[0],depth:i[2].charAt(0)==="="?1:2,text:i[1],tokens:this.lexer.inline(i[1])}}paragraph(s){const i=this.rules.block.paragraph.exec(s);if(i){const l=i[1].charAt(i[1].length-1)===`
|
|
316
|
-
`?i[1].slice(0,-1):i[1];return{type:"paragraph",raw:i[0],text:l,tokens:this.lexer.inline(l)}}}text(s){const i=this.rules.block.text.exec(s);if(i)return{type:"text",raw:i[0],text:i[0],tokens:this.lexer.inline(i[0])}}escape(s){const i=this.rules.inline.escape.exec(s);if(i)return{type:"escape",raw:i[0],text:i[1]}}tag(s){const i=this.rules.inline.tag.exec(s);if(i)return!this.lexer.state.inLink&&this.rules.other.startATag.test(i[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(i[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(i[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(i[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:i[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:i[0]}}link(s){const i=this.rules.inline.link.exec(s);if(i){const l=i[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(l)){if(!this.rules.other.endAngleBracket.test(l))return;const f=dl(l.slice(0,-1),"\\");if((l.length-f.length)%2===0)return}else{const f=$g(i[2],"()");if(f===-2)return;if(f>-1){const m=(i[0].indexOf("!")===0?5:4)+i[1].length+f;i[2]=i[2].substring(0,f),i[0]=i[0].substring(0,m).trim(),i[3]=""}}let a=i[2],d="";if(this.options.pedantic){const f=this.rules.other.pedanticHrefTitle.exec(a);f&&(a=f[1],d=f[3])}else d=i[3]?i[3].slice(1,-1):"";return a=a.trim(),this.rules.other.startAngleBracket.test(a)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(l)?a=a.slice(1):a=a.slice(1,-1)),nf(i,{href:a&&a.replace(this.rules.inline.anyPunctuation,"$1"),title:d&&d.replace(this.rules.inline.anyPunctuation,"$1")},i[0],this.lexer,this.rules)}}reflink(s,i){let l;if((l=this.rules.inline.reflink.exec(s))||(l=this.rules.inline.nolink.exec(s))){const a=(l[2]||l[1]).replace(this.rules.other.multipleSpaceGlobal," "),d=i[a.toLowerCase()];if(!d){const f=l[0].charAt(0);return{type:"text",raw:f,text:f}}return nf(l,d,l[0],this.lexer,this.rules)}}emStrong(s,i,l=""){let a=this.rules.inline.emStrongLDelim.exec(s);if(!a||a[3]&&l.match(this.rules.other.unicodeAlphaNumeric))return;if(!(a[1]||a[2]||"")||!l||this.rules.inline.punctuation.exec(l)){const f=[...a[0]].length-1;let h,m,y=f,g=0;const k=a[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(k.lastIndex=0,i=i.slice(-1*s.length+f);(a=k.exec(i))!=null;){if(h=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!h)continue;if(m=[...h].length,a[3]||a[4]){y+=m;continue}else if((a[5]||a[6])&&f%3&&!((f+m)%3)){g+=m;continue}if(y-=m,y>0)continue;m=Math.min(m,m+y+g);const S=[...a[0]][0].length,w=s.slice(0,f+a.index+S+m);if(Math.min(f,m)%2){const I=w.slice(1,-1);return{type:"em",raw:w,text:I,tokens:this.lexer.inlineTokens(I)}}const M=w.slice(2,-2);return{type:"strong",raw:w,text:M,tokens:this.lexer.inlineTokens(M)}}}}codespan(s){const i=this.rules.inline.code.exec(s);if(i){let l=i[2].replace(this.rules.other.newLineCharGlobal," ");const a=this.rules.other.nonSpaceChar.test(l),d=this.rules.other.startingSpaceChar.test(l)&&this.rules.other.endingSpaceChar.test(l);return a&&d&&(l=l.substring(1,l.length-1)),{type:"codespan",raw:i[0],text:l}}}br(s){const i=this.rules.inline.br.exec(s);if(i)return{type:"br",raw:i[0]}}del(s){const i=this.rules.inline.del.exec(s);if(i)return{type:"del",raw:i[0],text:i[2],tokens:this.lexer.inlineTokens(i[2])}}autolink(s){const i=this.rules.inline.autolink.exec(s);if(i){let l,a;return i[2]==="@"?(l=i[1],a="mailto:"+l):(l=i[1],a=l),{type:"link",raw:i[0],text:l,href:a,tokens:[{type:"text",raw:l,text:l}]}}}url(s){var l;let i;if(i=this.rules.inline.url.exec(s)){let a,d;if(i[2]==="@")a=i[0],d="mailto:"+a;else{let f;do f=i[0],i[0]=((l=this.rules.inline._backpedal.exec(i[0]))==null?void 0:l[0])??"";while(f!==i[0]);a=i[0],i[1]==="www."?d="http://"+i[0]:d=i[0]}return{type:"link",raw:i[0],text:a,href:d,tokens:[{type:"text",raw:a,text:a}]}}}inlineText(s){const i=this.rules.inline.text.exec(s);if(i){const l=this.lexer.state.inRawBlock;return{type:"text",raw:i[0],text:i[0],escaped:l}}}},$n=class Va{constructor(i){Ge(this,"tokens");Ge(this,"options");Ge(this,"state");Ge(this,"tokenizer");Ge(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=i||Hr,this.options.tokenizer=this.options.tokenizer||new Fi,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const l={other:Lt,block:Pi.normal,inline:cl.normal};this.options.pedantic?(l.block=Pi.pedantic,l.inline=cl.pedantic):this.options.gfm&&(l.block=Pi.gfm,this.options.breaks?l.inline=cl.breaks:l.inline=cl.gfm),this.tokenizer.rules=l}static get rules(){return{block:Pi,inline:cl}}static lex(i,l){return new Va(l).lex(i)}static lexInline(i,l){return new Va(l).inlineTokens(i)}lex(i){i=i.replace(Lt.carriageReturn,`
|
|
317
|
-
`),this.blockTokens(i,this.tokens);for(let l=0;l<this.inlineQueue.length;l++){const a=this.inlineQueue[l];this.inlineTokens(a.src,a.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(i,l=[],a=!1){var d,f,h;for(this.options.pedantic&&(i=i.replace(Lt.tabCharGlobal," ").replace(Lt.spaceLine,""));i;){let m;if((f=(d=this.options.extensions)==null?void 0:d.block)!=null&&f.some(g=>(m=g.call({lexer:this},i,l))?(i=i.substring(m.raw.length),l.push(m),!0):!1))continue;if(m=this.tokenizer.space(i)){i=i.substring(m.raw.length);const g=l.at(-1);m.raw.length===1&&g!==void 0?g.raw+=`
|
|
318
|
-
`:l.push(m);continue}if(m=this.tokenizer.code(i)){i=i.substring(m.raw.length);const g=l.at(-1);(g==null?void 0:g.type)==="paragraph"||(g==null?void 0:g.type)==="text"?(g.raw+=`
|
|
319
|
-
`+m.raw,g.text+=`
|
|
320
|
-
`+m.text,this.inlineQueue.at(-1).src=g.text):l.push(m);continue}if(m=this.tokenizer.fences(i)){i=i.substring(m.raw.length),l.push(m);continue}if(m=this.tokenizer.heading(i)){i=i.substring(m.raw.length),l.push(m);continue}if(m=this.tokenizer.hr(i)){i=i.substring(m.raw.length),l.push(m);continue}if(m=this.tokenizer.blockquote(i)){i=i.substring(m.raw.length),l.push(m);continue}if(m=this.tokenizer.list(i)){i=i.substring(m.raw.length),l.push(m);continue}if(m=this.tokenizer.html(i)){i=i.substring(m.raw.length),l.push(m);continue}if(m=this.tokenizer.def(i)){i=i.substring(m.raw.length);const g=l.at(-1);(g==null?void 0:g.type)==="paragraph"||(g==null?void 0:g.type)==="text"?(g.raw+=`
|
|
321
|
-
`+m.raw,g.text+=`
|
|
322
|
-
`+m.raw,this.inlineQueue.at(-1).src=g.text):this.tokens.links[m.tag]||(this.tokens.links[m.tag]={href:m.href,title:m.title});continue}if(m=this.tokenizer.table(i)){i=i.substring(m.raw.length),l.push(m);continue}if(m=this.tokenizer.lheading(i)){i=i.substring(m.raw.length),l.push(m);continue}let y=i;if((h=this.options.extensions)!=null&&h.startBlock){let g=1/0;const k=i.slice(1);let S;this.options.extensions.startBlock.forEach(w=>{S=w.call({lexer:this},k),typeof S=="number"&&S>=0&&(g=Math.min(g,S))}),g<1/0&&g>=0&&(y=i.substring(0,g+1))}if(this.state.top&&(m=this.tokenizer.paragraph(y))){const g=l.at(-1);a&&(g==null?void 0:g.type)==="paragraph"?(g.raw+=`
|
|
323
|
-
`+m.raw,g.text+=`
|
|
324
|
-
`+m.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=g.text):l.push(m),a=y.length!==i.length,i=i.substring(m.raw.length);continue}if(m=this.tokenizer.text(i)){i=i.substring(m.raw.length);const g=l.at(-1);(g==null?void 0:g.type)==="text"?(g.raw+=`
|
|
325
|
-
`+m.raw,g.text+=`
|
|
326
|
-
`+m.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=g.text):l.push(m);continue}if(i){const g="Infinite loop on byte: "+i.charCodeAt(0);if(this.options.silent){console.error(g);break}else throw new Error(g)}}return this.state.top=!0,l}inline(i,l=[]){return this.inlineQueue.push({src:i,tokens:l}),l}inlineTokens(i,l=[]){var m,y,g;let a=i,d=null;if(this.tokens.links){const k=Object.keys(this.tokens.links);if(k.length>0)for(;(d=this.tokenizer.rules.inline.reflinkSearch.exec(a))!=null;)k.includes(d[0].slice(d[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,d.index)+"["+"a".repeat(d[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(d=this.tokenizer.rules.inline.anyPunctuation.exec(a))!=null;)a=a.slice(0,d.index)+"++"+a.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(d=this.tokenizer.rules.inline.blockSkip.exec(a))!=null;)a=a.slice(0,d.index)+"["+"a".repeat(d[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let f=!1,h="";for(;i;){f||(h=""),f=!1;let k;if((y=(m=this.options.extensions)==null?void 0:m.inline)!=null&&y.some(w=>(k=w.call({lexer:this},i,l))?(i=i.substring(k.raw.length),l.push(k),!0):!1))continue;if(k=this.tokenizer.escape(i)){i=i.substring(k.raw.length),l.push(k);continue}if(k=this.tokenizer.tag(i)){i=i.substring(k.raw.length),l.push(k);continue}if(k=this.tokenizer.link(i)){i=i.substring(k.raw.length),l.push(k);continue}if(k=this.tokenizer.reflink(i,this.tokens.links)){i=i.substring(k.raw.length);const w=l.at(-1);k.type==="text"&&(w==null?void 0:w.type)==="text"?(w.raw+=k.raw,w.text+=k.text):l.push(k);continue}if(k=this.tokenizer.emStrong(i,a,h)){i=i.substring(k.raw.length),l.push(k);continue}if(k=this.tokenizer.codespan(i)){i=i.substring(k.raw.length),l.push(k);continue}if(k=this.tokenizer.br(i)){i=i.substring(k.raw.length),l.push(k);continue}if(k=this.tokenizer.del(i)){i=i.substring(k.raw.length),l.push(k);continue}if(k=this.tokenizer.autolink(i)){i=i.substring(k.raw.length),l.push(k);continue}if(!this.state.inLink&&(k=this.tokenizer.url(i))){i=i.substring(k.raw.length),l.push(k);continue}let S=i;if((g=this.options.extensions)!=null&&g.startInline){let w=1/0;const M=i.slice(1);let I;this.options.extensions.startInline.forEach(E=>{I=E.call({lexer:this},M),typeof I=="number"&&I>=0&&(w=Math.min(w,I))}),w<1/0&&w>=0&&(S=i.substring(0,w+1))}if(k=this.tokenizer.inlineText(S)){i=i.substring(k.raw.length),k.raw.slice(-1)!=="_"&&(h=k.raw.slice(-1)),f=!0;const w=l.at(-1);(w==null?void 0:w.type)==="text"?(w.raw+=k.raw,w.text+=k.text):l.push(k);continue}if(i){const w="Infinite loop on byte: "+i.charCodeAt(0);if(this.options.silent){console.error(w);break}else throw new Error(w)}}return l}},Ui=class{constructor(s){Ge(this,"options");Ge(this,"parser");this.options=s||Hr}space(s){return""}code({text:s,lang:i,escaped:l}){var f;const a=(f=(i||"").match(Lt.notSpaceStart))==null?void 0:f[0],d=s.replace(Lt.endingNewline,"")+`
|
|
327
|
-
`;return a?'<pre><code class="language-'+Sn(a)+'">'+(l?d:Sn(d,!0))+`</code></pre>
|
|
328
|
-
`:"<pre><code>"+(l?d:Sn(d,!0))+`</code></pre>
|
|
329
|
-
`}blockquote({tokens:s}){return`<blockquote>
|
|
330
|
-
${this.parser.parse(s)}</blockquote>
|
|
331
|
-
`}html({text:s}){return s}heading({tokens:s,depth:i}){return`<h${i}>${this.parser.parseInline(s)}</h${i}>
|
|
332
|
-
`}hr(s){return`<hr>
|
|
333
|
-
`}list(s){const i=s.ordered,l=s.start;let a="";for(let h=0;h<s.items.length;h++){const m=s.items[h];a+=this.listitem(m)}const d=i?"ol":"ul",f=i&&l!==1?' start="'+l+'"':"";return"<"+d+f+`>
|
|
334
|
-
`+a+"</"+d+`>
|
|
335
|
-
`}listitem(s){var l;let i="";if(s.task){const a=this.checkbox({checked:!!s.checked});s.loose?((l=s.tokens[0])==null?void 0:l.type)==="paragraph"?(s.tokens[0].text=a+" "+s.tokens[0].text,s.tokens[0].tokens&&s.tokens[0].tokens.length>0&&s.tokens[0].tokens[0].type==="text"&&(s.tokens[0].tokens[0].text=a+" "+Sn(s.tokens[0].tokens[0].text),s.tokens[0].tokens[0].escaped=!0)):s.tokens.unshift({type:"text",raw:a+" ",text:a+" ",escaped:!0}):i+=a+" "}return i+=this.parser.parse(s.tokens,!!s.loose),`<li>${i}</li>
|
|
336
|
-
`}checkbox({checked:s}){return"<input "+(s?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:s}){return`<p>${this.parser.parseInline(s)}</p>
|
|
337
|
-
`}table(s){let i="",l="";for(let d=0;d<s.header.length;d++)l+=this.tablecell(s.header[d]);i+=this.tablerow({text:l});let a="";for(let d=0;d<s.rows.length;d++){const f=s.rows[d];l="";for(let h=0;h<f.length;h++)l+=this.tablecell(f[h]);a+=this.tablerow({text:l})}return a&&(a=`<tbody>${a}</tbody>`),`<table>
|
|
338
|
-
<thead>
|
|
339
|
-
`+i+`</thead>
|
|
340
|
-
`+a+`</table>
|
|
341
|
-
`}tablerow({text:s}){return`<tr>
|
|
342
|
-
${s}</tr>
|
|
343
|
-
`}tablecell(s){const i=this.parser.parseInline(s.tokens),l=s.header?"th":"td";return(s.align?`<${l} align="${s.align}">`:`<${l}>`)+i+`</${l}>
|
|
344
|
-
`}strong({tokens:s}){return`<strong>${this.parser.parseInline(s)}</strong>`}em({tokens:s}){return`<em>${this.parser.parseInline(s)}</em>`}codespan({text:s}){return`<code>${Sn(s,!0)}</code>`}br(s){return"<br>"}del({tokens:s}){return`<del>${this.parser.parseInline(s)}</del>`}link({href:s,title:i,tokens:l}){const a=this.parser.parseInline(l),d=ef(s);if(d===null)return a;s=d;let f='<a href="'+s+'"';return i&&(f+=' title="'+Sn(i)+'"'),f+=">"+a+"</a>",f}image({href:s,title:i,text:l,tokens:a}){a&&(l=this.parser.parseInline(a,this.parser.textRenderer));const d=ef(s);if(d===null)return Sn(l);s=d;let f=`<img src="${s}" alt="${l}"`;return i&&(f+=` title="${Sn(i)}"`),f+=">",f}text(s){return"tokens"in s&&s.tokens?this.parser.parseInline(s.tokens):"escaped"in s&&s.escaped?s.text:Sn(s.text)}},gu=class{strong({text:s}){return s}em({text:s}){return s}codespan({text:s}){return s}del({text:s}){return s}html({text:s}){return s}text({text:s}){return s}link({text:s}){return""+s}image({text:s}){return""+s}br(){return""}},Fn=class Ga{constructor(i){Ge(this,"options");Ge(this,"renderer");Ge(this,"textRenderer");this.options=i||Hr,this.options.renderer=this.options.renderer||new Ui,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new gu}static parse(i,l){return new Ga(l).parse(i)}static parseInline(i,l){return new Ga(l).parseInline(i)}parse(i,l=!0){var d,f;let a="";for(let h=0;h<i.length;h++){const m=i[h];if((f=(d=this.options.extensions)==null?void 0:d.renderers)!=null&&f[m.type]){const g=m,k=this.options.extensions.renderers[g.type].call({parser:this},g);if(k!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(g.type)){a+=k||"";continue}}const y=m;switch(y.type){case"space":{a+=this.renderer.space(y);continue}case"hr":{a+=this.renderer.hr(y);continue}case"heading":{a+=this.renderer.heading(y);continue}case"code":{a+=this.renderer.code(y);continue}case"table":{a+=this.renderer.table(y);continue}case"blockquote":{a+=this.renderer.blockquote(y);continue}case"list":{a+=this.renderer.list(y);continue}case"html":{a+=this.renderer.html(y);continue}case"paragraph":{a+=this.renderer.paragraph(y);continue}case"text":{let g=y,k=this.renderer.text(g);for(;h+1<i.length&&i[h+1].type==="text";)g=i[++h],k+=`
|
|
345
|
-
`+this.renderer.text(g);l?a+=this.renderer.paragraph({type:"paragraph",raw:k,text:k,tokens:[{type:"text",raw:k,text:k,escaped:!0}]}):a+=k;continue}default:{const g='Token with "'+y.type+'" type was not found.';if(this.options.silent)return console.error(g),"";throw new Error(g)}}}return a}parseInline(i,l=this.renderer){var d,f;let a="";for(let h=0;h<i.length;h++){const m=i[h];if((f=(d=this.options.extensions)==null?void 0:d.renderers)!=null&&f[m.type]){const g=this.options.extensions.renderers[m.type].call({parser:this},m);if(g!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(m.type)){a+=g||"";continue}}const y=m;switch(y.type){case"escape":{a+=l.text(y);break}case"html":{a+=l.html(y);break}case"link":{a+=l.link(y);break}case"image":{a+=l.image(y);break}case"strong":{a+=l.strong(y);break}case"em":{a+=l.em(y);break}case"codespan":{a+=l.codespan(y);break}case"br":{a+=l.br(y);break}case"del":{a+=l.del(y);break}case"text":{a+=l.text(y);break}default:{const g='Token with "'+y.type+'" type was not found.';if(this.options.silent)return console.error(g),"";throw new Error(g)}}}return a}},za,Oi=(za=class{constructor(s){Ge(this,"options");Ge(this,"block");this.options=s||Hr}preprocess(s){return s}postprocess(s){return s}processAllTokens(s){return s}provideLexer(){return this.block?$n.lex:$n.lexInline}provideParser(){return this.block?Fn.parse:Fn.parseInline}},Ge(za,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),za),Ug=class{constructor(...s){Ge(this,"defaults",au());Ge(this,"options",this.setOptions);Ge(this,"parse",this.parseMarkdown(!0));Ge(this,"parseInline",this.parseMarkdown(!1));Ge(this,"Parser",Fn);Ge(this,"Renderer",Ui);Ge(this,"TextRenderer",gu);Ge(this,"Lexer",$n);Ge(this,"Tokenizer",Fi);Ge(this,"Hooks",Oi);this.use(...s)}walkTokens(s,i){var a,d;let l=[];for(const f of s)switch(l=l.concat(i.call(this,f)),f.type){case"table":{const h=f;for(const m of h.header)l=l.concat(this.walkTokens(m.tokens,i));for(const m of h.rows)for(const y of m)l=l.concat(this.walkTokens(y.tokens,i));break}case"list":{const h=f;l=l.concat(this.walkTokens(h.items,i));break}default:{const h=f;(d=(a=this.defaults.extensions)==null?void 0:a.childTokens)!=null&&d[h.type]?this.defaults.extensions.childTokens[h.type].forEach(m=>{const y=h[m].flat(1/0);l=l.concat(this.walkTokens(y,i))}):h.tokens&&(l=l.concat(this.walkTokens(h.tokens,i)))}}return l}use(...s){const i=this.defaults.extensions||{renderers:{},childTokens:{}};return s.forEach(l=>{const a={...l};if(a.async=this.defaults.async||a.async||!1,l.extensions&&(l.extensions.forEach(d=>{if(!d.name)throw new Error("extension name required");if("renderer"in d){const f=i.renderers[d.name];f?i.renderers[d.name]=function(...h){let m=d.renderer.apply(this,h);return m===!1&&(m=f.apply(this,h)),m}:i.renderers[d.name]=d.renderer}if("tokenizer"in d){if(!d.level||d.level!=="block"&&d.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const f=i[d.level];f?f.unshift(d.tokenizer):i[d.level]=[d.tokenizer],d.start&&(d.level==="block"?i.startBlock?i.startBlock.push(d.start):i.startBlock=[d.start]:d.level==="inline"&&(i.startInline?i.startInline.push(d.start):i.startInline=[d.start]))}"childTokens"in d&&d.childTokens&&(i.childTokens[d.name]=d.childTokens)}),a.extensions=i),l.renderer){const d=this.defaults.renderer||new Ui(this.defaults);for(const f in l.renderer){if(!(f in d))throw new Error(`renderer '${f}' does not exist`);if(["options","parser"].includes(f))continue;const h=f,m=l.renderer[h],y=d[h];d[h]=(...g)=>{let k=m.apply(d,g);return k===!1&&(k=y.apply(d,g)),k||""}}a.renderer=d}if(l.tokenizer){const d=this.defaults.tokenizer||new Fi(this.defaults);for(const f in l.tokenizer){if(!(f in d))throw new Error(`tokenizer '${f}' does not exist`);if(["options","rules","lexer"].includes(f))continue;const h=f,m=l.tokenizer[h],y=d[h];d[h]=(...g)=>{let k=m.apply(d,g);return k===!1&&(k=y.apply(d,g)),k}}a.tokenizer=d}if(l.hooks){const d=this.defaults.hooks||new Oi;for(const f in l.hooks){if(!(f in d))throw new Error(`hook '${f}' does not exist`);if(["options","block"].includes(f))continue;const h=f,m=l.hooks[h],y=d[h];Oi.passThroughHooks.has(f)?d[h]=g=>{if(this.defaults.async)return Promise.resolve(m.call(d,g)).then(S=>y.call(d,S));const k=m.call(d,g);return y.call(d,k)}:d[h]=(...g)=>{let k=m.apply(d,g);return k===!1&&(k=y.apply(d,g)),k}}a.hooks=d}if(l.walkTokens){const d=this.defaults.walkTokens,f=l.walkTokens;a.walkTokens=function(h){let m=[];return m.push(f.call(this,h)),d&&(m=m.concat(d.call(this,h))),m}}this.defaults={...this.defaults,...a}}),this}setOptions(s){return this.defaults={...this.defaults,...s},this}lexer(s,i){return $n.lex(s,i??this.defaults)}parser(s,i){return Fn.parse(s,i??this.defaults)}parseMarkdown(s){return(l,a)=>{const d={...a},f={...this.defaults,...d},h=this.onError(!!f.silent,!!f.async);if(this.defaults.async===!0&&d.async===!1)return h(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof l>"u"||l===null)return h(new Error("marked(): input parameter is undefined or null"));if(typeof l!="string")return h(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(l)+", string expected"));f.hooks&&(f.hooks.options=f,f.hooks.block=s);const m=f.hooks?f.hooks.provideLexer():s?$n.lex:$n.lexInline,y=f.hooks?f.hooks.provideParser():s?Fn.parse:Fn.parseInline;if(f.async)return Promise.resolve(f.hooks?f.hooks.preprocess(l):l).then(g=>m(g,f)).then(g=>f.hooks?f.hooks.processAllTokens(g):g).then(g=>f.walkTokens?Promise.all(this.walkTokens(g,f.walkTokens)).then(()=>g):g).then(g=>y(g,f)).then(g=>f.hooks?f.hooks.postprocess(g):g).catch(h);try{f.hooks&&(l=f.hooks.preprocess(l));let g=m(l,f);f.hooks&&(g=f.hooks.processAllTokens(g)),f.walkTokens&&this.walkTokens(g,f.walkTokens);let k=y(g,f);return f.hooks&&(k=f.hooks.postprocess(k)),k}catch(g){return h(g)}}}onError(s,i){return l=>{if(l.message+=`
|
|
346
|
-
Please report this to https://github.com/markedjs/marked.`,s){const a="<p>An error occurred:</p><pre>"+Sn(l.message+"",!0)+"</pre>";return i?Promise.resolve(a):a}if(i)return Promise.reject(l);throw l}}},Br=new Ug;function Ie(s,i){return Br.parse(s,i)}Ie.options=Ie.setOptions=function(s){return Br.setOptions(s),Ie.defaults=Br.defaults,Bf(Ie.defaults),Ie};Ie.getDefaults=au;Ie.defaults=Hr;Ie.use=function(...s){return Br.use(...s),Ie.defaults=Br.defaults,Bf(Ie.defaults),Ie};Ie.walkTokens=function(s,i){return Br.walkTokens(s,i)};Ie.parseInline=Br.parseInline;Ie.Parser=Fn;Ie.parser=Fn.parse;Ie.Renderer=Ui;Ie.TextRenderer=gu;Ie.Lexer=$n;Ie.lexer=$n.lex;Ie.Tokenizer=Fi;Ie.Hooks=Oi;Ie.parse=Ie;Ie.options;Ie.setOptions;Ie.use;Ie.walkTokens;Ie.parseInline;Fn.parse;$n.lex;/*! @license DOMPurify 3.4.13 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.13/LICENSE */function rf(s,i){(i==null||i>s.length)&&(i=s.length);for(var l=0,a=Array(i);l<i;l++)a[l]=s[l];return a}function Bg(s){if(Array.isArray(s))return s}function Wg(s,i){var l=s==null?null:typeof Symbol<"u"&&s[Symbol.iterator]||s["@@iterator"];if(l!=null){var a,d,f,h,m=[],y=!0,g=!1;try{if(f=(l=l.call(s)).next,i!==0)for(;!(y=(a=f.call(l)).done)&&(m.push(a.value),m.length!==i);y=!0);}catch(k){g=!0,d=k}finally{try{if(!y&&l.return!=null&&(h=l.return(),Object(h)!==h))return}finally{if(g)throw d}}return m}}function Hg(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
347
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vg(s,i){return Bg(s)||Wg(s,i)||Gg(s,i)||Hg()}function Gg(s,i){if(s){if(typeof s=="string")return rf(s,i);var l={}.toString.call(s).slice(8,-1);return l==="Object"&&s.constructor&&(l=s.constructor.name),l==="Map"||l==="Set"?Array.from(s):l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l)?rf(s,i):void 0}}const Jf=Object.entries,sf=Object.setPrototypeOf,Qg=Object.isFrozen,qg=Object.getPrototypeOf,Kg=Object.getOwnPropertyDescriptor;let yt=Object.freeze,xt=Object.seal,Ts=Object.create,ep=typeof Reflect<"u"&&Reflect,Qa=ep.apply,qa=ep.construct;yt||(yt=function(i){return i});xt||(xt=function(i){return i});Qa||(Qa=function(i,l){for(var a=arguments.length,d=new Array(a>2?a-2:0),f=2;f<a;f++)d[f-2]=arguments[f];return i.apply(l,d)});qa||(qa=function(i){for(var l=arguments.length,a=new Array(l>1?l-1:0),d=1;d<l;d++)a[d-1]=arguments[d];return new i(...a)});const ws=it(Array.prototype.forEach),Yg=it(Array.prototype.lastIndexOf),lf=it(Array.prototype.pop),Ss=it(Array.prototype.push),Xg=it(Array.prototype.splice),cr=Array.isArray,gl=it(String.prototype.toLowerCase),Ia=it(String.prototype.toString),of=it(String.prototype.match),fl=it(String.prototype.replace),af=it(String.prototype.indexOf),Zg=it(String.prototype.trim),Jg=it(Number.prototype.toString),ev=it(Boolean.prototype.toString),uf=typeof BigInt>"u"?null:it(BigInt.prototype.toString),cf=typeof Symbol>"u"?null:it(Symbol.prototype.toString),ht=it(Object.prototype.hasOwnProperty),pl=it(Object.prototype.toString),pt=it(RegExp.prototype.test),Ur=tv(TypeError);function it(s){return function(i){i instanceof RegExp&&(i.lastIndex=0);for(var l=arguments.length,a=new Array(l>1?l-1:0),d=1;d<l;d++)a[d-1]=arguments[d];return Qa(s,i,a)}}function tv(s){return function(){for(var i=arguments.length,l=new Array(i),a=0;a<i;a++)l[a]=arguments[a];return qa(s,l)}}function Le(s,i){let l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:gl;if(sf&&sf(s,null),!cr(i))return s;let a=i.length;for(;a--;){let d=i[a];if(typeof d=="string"){const f=l(d);f!==d&&(Qg(i)||(i[a]=f),d=f)}s[d]=!0}return s}function nv(s){for(let i=0;i<s.length;i++)ht(s,i)||(s[i]=null);return s}function Nt(s){const i=Ts(null);for(const a of Jf(s)){var l=Vg(a,2);const d=l[0],f=l[1];ht(s,d)&&(cr(f)?i[d]=nv(f):f&&typeof f=="object"&&f.constructor===Object?i[d]=Nt(f):i[d]=f)}return i}function rv(s){switch(typeof s){case"string":return s;case"number":return Jg(s);case"boolean":return ev(s);case"bigint":return uf?uf(s):"0";case"symbol":return cf?cf(s):"Symbol()";case"undefined":return pl(s);case"function":case"object":{if(s===null)return pl(s);const i=s,l=cn(i,"toString");if(typeof l=="function"){const a=l(i);return typeof a=="string"?a:pl(a)}return pl(s)}default:return pl(s)}}function cn(s,i){for(;s!==null;){const a=Kg(s,i);if(a){if(a.get)return it(a.get);if(typeof a.value=="function")return it(a.value)}s=qg(s)}function l(){return null}return l}function sv(s){try{return pt(s,""),!0}catch{return!1}}const df=yt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Aa=yt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Da=yt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),lv=yt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Pa=yt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),iv=yt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ff=yt(["#text"]),pf=yt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Ma=yt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),hf=yt(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Mi=yt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),ov=xt(/{{[\w\W]*|^[\w\W]*}}/g),av=xt(/<%[\w\W]*|^[\w\W]*%>/g),uv=xt(/\${[\w\W]*/g),cv=xt(/^data-[\-\w.\u00B7-\uFFFF]+$/),dv=xt(/^aria-[\-\w]+$/),mf=xt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),fv=xt(/^(?:\w+script|data):/i),pv=xt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),hv=xt(/^html$/i),mv=xt(/^[a-z][.\w]*(-[.\w]+)+$/i),gf=xt(/<[/\w!]/g),vf=xt(/<[/\w]/g),gv=xt(/<\/no(script|embed|frames)/i),vv=xt(/\/>/i),Qt={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},yv=function(){return typeof window>"u"?null:window},xv=function(i,l){if(typeof i!="object"||typeof i.createPolicy!="function")return null;let a=null;const d="data-tt-policy-suffix";l&&l.hasAttribute(d)&&(a=l.getAttribute(d));const f="dompurify"+(a?"#"+a:"");try{return i.createPolicy(f,{createHTML(h){return h},createScriptURL(h){return h}})}catch{return console.warn("TrustedTypes policy "+f+" could not be created."),null}},yf=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},ur=function(i,l,a,d){return ht(i,l)&&cr(i[l])?Le(d.base?Nt(d.base):{},i[l],d.transform):a};function tp(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:yv();const i=V=>tp(V);if(i.version="3.4.13",i.removed=[],!s||!s.document||s.document.nodeType!==Qt.document||!s.Element)return i.isSupported=!1,i;let l=s.document;const a=l,d=a.currentScript;s.DocumentFragment;const f=s.HTMLTemplateElement,h=s.Node,m=s.Element,y=s.NodeFilter,g=s.NamedNodeMap;g===void 0&&(s.NamedNodeMap||s.MozNamedAttrMap),s.HTMLFormElement;const k=s.DOMParser,S=s.trustedTypes,w=m.prototype,M=cn(w,"cloneNode"),I=cn(w,"remove"),E=cn(w,"nextSibling"),z=cn(w,"childNodes"),Z=cn(w,"parentNode"),Q=cn(w,"shadowRoot"),J=cn(w,"attributes"),O=h&&h.prototype?cn(h.prototype,"nodeType"):null,re=h&&h.prototype?cn(h.prototype,"nodeName"):null,fe=h&&h.prototype?cn(h.prototype,"ownerDocument"):null;if(typeof f=="function"){const V=l.createElement("template");V.content&&V.content.ownerDocument&&(l=V.content.ownerDocument)}let oe,ae="",Te,te=!1,ve=0;const _e=function(){if(ve>0)throw Ur('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},je=function(v){_e(),ve++;try{return oe.createHTML(v)}finally{ve--}},ce=function(v){_e(),ve++;try{return oe.createScriptURL(v)}finally{ve--}},P=function(){return te||(Te=xv(S,d),te=!0),Te},q=l,X=q.implementation,$=q.createNodeIterator,Y=q.createDocumentFragment,H=q.getElementsByTagName,N=a.importNode;let A=yf();i.isSupported=typeof Jf=="function"&&typeof Z=="function"&&X&&X.createHTMLDocument!==void 0;const pe=ov,ye=av,Ne=uv,Ee=cv,Re=dv,Ae=fv,Be=pv,mt=mv;let dn=mf,Fe=null;const fn=Le({},[...df,...Aa,...Da,...Pa,...ff]);let be=null;const Un=Le({},[...pf,...Ma,...hf,...Mi]);let He=Object.seal(Ts(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ut=null,pr=null;const It=Object.seal(Ts(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let pn=!0,b=!0,he=!1,We=!0,Ve=!1,ot=!0,kt=!1,At=!1,nn=null,hr=null,_n=!1,qt=!1,Vr=!1,mr=!1,Ns=!0,_l=!1;const Gr="user-content-";let gr=!0,Bn=!1,hn={},Dt=null;const mn=Le({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Nn=null;const Es=Le({},["audio","video","img","source","image","track"]);let Qr=null;const Cs=Le({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),vr="http://www.w3.org/1998/Math/MathML",yr="http://www.w3.org/2000/svg",Pt="http://www.w3.org/1999/xhtml";let En=Pt,Cn=!1,xr=null;const kr=Le({},[vr,yr,Pt],Ia),Nl=yt(["mi","mo","mn","ms","mtext"]);let jn=Le({},Nl);const wr=yt(["annotation-xml"]);let Wn=Le({},wr);const js=Le({},["title","style","font","a","script"]);let Sr=null;const Gi=["application/xhtml+xml","text/html"],Qi="text/html";let $e=null,Rn=null;const El=l.createElement("form"),Cl=function(v){return v instanceof RegExp||v instanceof Function},qr=function(){let v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Rn&&Rn===v)return;(!v||typeof v!="object")&&(v={}),v=Nt(v),Sr=Gi.indexOf(v.PARSER_MEDIA_TYPE)===-1?Qi:v.PARSER_MEDIA_TYPE,$e=Sr==="application/xhtml+xml"?Ia:gl,Fe=ur(v,"ALLOWED_TAGS",fn,{transform:$e}),be=ur(v,"ALLOWED_ATTR",Un,{transform:$e}),xr=ur(v,"ALLOWED_NAMESPACES",kr,{transform:Ia}),Qr=ur(v,"ADD_URI_SAFE_ATTR",Cs,{transform:$e,base:Cs}),Nn=ur(v,"ADD_DATA_URI_TAGS",Es,{transform:$e,base:Es}),Dt=ur(v,"FORBID_CONTENTS",mn,{transform:$e}),Ut=ur(v,"FORBID_TAGS",Nt({}),{transform:$e}),pr=ur(v,"FORBID_ATTR",Nt({}),{transform:$e}),hn=ht(v,"USE_PROFILES")?v.USE_PROFILES&&typeof v.USE_PROFILES=="object"?Nt(v.USE_PROFILES):v.USE_PROFILES:!1,pn=v.ALLOW_ARIA_ATTR!==!1,b=v.ALLOW_DATA_ATTR!==!1,he=v.ALLOW_UNKNOWN_PROTOCOLS||!1,We=v.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ve=v.SAFE_FOR_TEMPLATES||!1,ot=v.SAFE_FOR_XML!==!1,kt=v.WHOLE_DOCUMENT||!1,qt=v.RETURN_DOM||!1,Vr=v.RETURN_DOM_FRAGMENT||!1,mr=v.RETURN_TRUSTED_TYPE||!1,_n=v.FORCE_BODY||!1,Ns=v.SANITIZE_DOM!==!1,_l=v.SANITIZE_NAMED_PROPS||!1,gr=v.KEEP_CONTENT!==!1,Bn=v.IN_PLACE||!1,dn=sv(v.ALLOWED_URI_REGEXP)?v.ALLOWED_URI_REGEXP:mf,En=typeof v.NAMESPACE=="string"?v.NAMESPACE:Pt,jn=ht(v,"MATHML_TEXT_INTEGRATION_POINTS")&&v.MATHML_TEXT_INTEGRATION_POINTS&&typeof v.MATHML_TEXT_INTEGRATION_POINTS=="object"?Nt(v.MATHML_TEXT_INTEGRATION_POINTS):Le({},Nl),Wn=ht(v,"HTML_INTEGRATION_POINTS")&&v.HTML_INTEGRATION_POINTS&&typeof v.HTML_INTEGRATION_POINTS=="object"?Nt(v.HTML_INTEGRATION_POINTS):Le({},wr);const C=ht(v,"CUSTOM_ELEMENT_HANDLING")&&v.CUSTOM_ELEMENT_HANDLING&&typeof v.CUSTOM_ELEMENT_HANDLING=="object"?Nt(v.CUSTOM_ELEMENT_HANDLING):Ts(null);if(He=Ts(null),ht(C,"tagNameCheck")&&Cl(C.tagNameCheck)&&(He.tagNameCheck=C.tagNameCheck),ht(C,"attributeNameCheck")&&Cl(C.attributeNameCheck)&&(He.attributeNameCheck=C.attributeNameCheck),ht(C,"allowCustomizedBuiltInElements")&&typeof C.allowCustomizedBuiltInElements=="boolean"&&(He.allowCustomizedBuiltInElements=C.allowCustomizedBuiltInElements),xt(He),Ve&&(b=!1),Vr&&(qt=!0),hn&&(Fe=Le({},ff),be=Ts(null),hn.html===!0&&(Le(Fe,df),Le(be,pf)),hn.svg===!0&&(Le(Fe,Aa),Le(be,Ma),Le(be,Mi)),hn.svgFilters===!0&&(Le(Fe,Da),Le(be,Ma),Le(be,Mi)),hn.mathMl===!0&&(Le(Fe,Pa),Le(be,hf),Le(be,Mi))),It.tagCheck=null,It.attributeCheck=null,ht(v,"ADD_TAGS")&&(typeof v.ADD_TAGS=="function"?It.tagCheck=v.ADD_TAGS:cr(v.ADD_TAGS)&&(Fe===fn&&(Fe=Nt(Fe)),Le(Fe,v.ADD_TAGS,$e))),ht(v,"ADD_ATTR")&&(typeof v.ADD_ATTR=="function"?It.attributeCheck=v.ADD_ATTR:cr(v.ADD_ATTR)&&(be===Un&&(be=Nt(be)),Le(be,v.ADD_ATTR,$e))),ht(v,"ADD_URI_SAFE_ATTR")&&cr(v.ADD_URI_SAFE_ATTR)&&Le(Qr,v.ADD_URI_SAFE_ATTR,$e),ht(v,"FORBID_CONTENTS")&&cr(v.FORBID_CONTENTS)&&(Dt===mn&&(Dt=Nt(Dt)),Le(Dt,v.FORBID_CONTENTS,$e)),ht(v,"ADD_FORBID_CONTENTS")&&cr(v.ADD_FORBID_CONTENTS)&&(Dt===mn&&(Dt=Nt(Dt)),Le(Dt,v.ADD_FORBID_CONTENTS,$e)),gr&&(Fe["#text"]=!0),kt&&Le(Fe,["html","head","body"]),Fe.table&&(Le(Fe,["tbody"]),delete Ut.tbody),v.TRUSTED_TYPES_POLICY){if(typeof v.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ur('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof v.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ur('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const F=oe;oe=v.TRUSTED_TYPES_POLICY;try{ae=je("")}catch(le){throw oe=F,le}}else v.TRUSTED_TYPES_POLICY===null?(oe=void 0,ae=""):(oe===void 0&&(oe=P()),oe&&typeof ae=="string"&&(ae=je("")));yt&&yt(v),Rn=v},Rs=Le({},[...Aa,...Da,...lv]),Ls=Le({},[...Pa,...iv]),jl=function(v,C,F){return C.namespaceURI===Pt?v==="svg":C.namespaceURI===vr?v==="svg"&&(F==="annotation-xml"||jn[F]):!!Rs[v]},qi=function(v,C,F){return C.namespaceURI===Pt?v==="math":C.namespaceURI===yr?v==="math"&&Wn[F]:!!Ls[v]},Ki=function(v,C,F){return C.namespaceURI===yr&&!Wn[F]||C.namespaceURI===vr&&!jn[F]?!1:!Ls[v]&&(js[v]||!Rs[v])},Xe=function(v){let C=Z(v);(!C||!C.tagName)&&(C={namespaceURI:En,tagName:"template"});const F=gl(v.tagName),le=gl(C.tagName);return xr[v.namespaceURI]?v.namespaceURI===yr?jl(F,C,le):v.namespaceURI===vr?qi(F,C,le):v.namespaceURI===Pt?Ki(F,C,le):!!(Sr==="application/xhtml+xml"&&xr[v.namespaceURI]):!1},gn=function(v){Ss(i.removed,{element:v});try{Z(v).removeChild(v)}catch{if(I(v),!Z(v))throw Ur("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Hn=function(v){Tr(v);const C=z(v);if(C){const le=[];ws(C,de=>{Ss(le,de)}),ws(le,de=>{try{I(de)}catch{}})}const F=J(v);if(F)for(let le=F.length-1;le>=0;--le){const de=F[le],we=de&&de.name;if(typeof we=="string")try{v.removeAttribute(we)}catch{}}},vn=function(v,C){try{Ss(i.removed,{attribute:C.getAttributeNode(v),from:C})}catch{Ss(i.removed,{attribute:null,from:C})}if(C.removeAttribute(v),v==="is")if(qt||Vr)try{gn(C)}catch{}else try{C.setAttribute(v,"")}catch{}},Kr=function(v){const C=J(v);if(C)for(let F=C.length-1;F>=0;--F){const le=C[F],de=le&&le.name;if(!(typeof de!="string"||be[$e(de)]))try{v.removeAttribute(de)}catch{}}},Tr=function(v){const C=[v];for(;C.length>0;){const F=C.pop();(O?O(F):F.nodeType)===Qt.element&&Kr(F);const de=z(F);if(de)for(let we=de.length-1;we>=0;--we)C.push(de[we])}},Rl=function(v){if(!ot)return;const C=[v];for(;C.length>0;){const F=C.pop(),le=O?O(F):F.nodeType;if(le===Qt.processingInstruction||le===Qt.comment&&pt(vf,F.data)){try{I(F)}catch{}continue}if(le===Qt.element){const we=F,Pe=$e(re?re(F):F.nodeName);try{we.hasAttribute&&we.hasAttribute("patchsrc")&&we.removeAttribute("patchsrc"),we.hasAttribute&&we.hasAttribute("for")&&Pe!=="label"&&Pe!=="output"&&we.removeAttribute("for")}catch{}}const de=z(F);if(de)for(let we=de.length-1;we>=0;--we)C.push(de[we])}},_r=function(v){let C=null,F=null;if(_n)v="<remove></remove>"+v;else{const we=of(v,/^[\r\n\t ]+/);F=we&&we[0]}Sr==="application/xhtml+xml"&&En===Pt&&(v='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+v+"</body></html>");const le=oe?je(v):v;if(En===Pt)try{C=new k().parseFromString(le,Sr)}catch{}if(!C||!C.documentElement){C=X.createDocument(En,"template",null);try{C.documentElement.innerHTML=Cn?ae:le}catch{}}const de=C.body||C.documentElement;return v&&F&&de.insertBefore(l.createTextNode(F),de.childNodes[0]||null),En===Pt?H.call(C,kt?"html":"body")[0]:kt?C.documentElement:de},Bt=function(v){const C=fe?fe(v):v.ownerDocument;return $.call(C||v,v,y.SHOW_ELEMENT|y.SHOW_COMMENT|y.SHOW_TEXT|y.SHOW_PROCESSING_INSTRUCTION|y.SHOW_CDATA_SECTION,null)},Yr=function(v){return v=fl(v,pe," "),v=fl(v,ye," "),v=fl(v,Ne," "),v},Et=function(v){var C;v.normalize();const F=fe?fe(v):v.ownerDocument,le=$.call(F||v,v,y.SHOW_TEXT|y.SHOW_COMMENT|y.SHOW_CDATA_SECTION|y.SHOW_PROCESSING_INSTRUCTION,null);let de=le.nextNode();for(;de;)de.data=Yr(de.data),de=le.nextNode();const we=(C=v.querySelectorAll)===null||C===void 0?void 0:C.call(v,"template");we&&ws(we,Pe=>{Vn(Pe.content)&&Et(Pe.content)})},Xr=function(v){const C=re?re(v):null;return typeof C!="string"||$e(C)!=="form"?!1:typeof v.nodeName!="string"||typeof v.textContent!="string"||typeof v.removeChild!="function"||v.attributes!==J(v)||typeof v.removeAttribute!="function"||typeof v.setAttribute!="function"||typeof v.namespaceURI!="string"||typeof v.insertBefore!="function"||typeof v.hasChildNodes!="function"||v.nodeType!==O(v)||v.childNodes!==z(v)},Vn=function(v){if(!O||typeof v!="object"||v===null)return!1;try{return O(v)===Qt.documentFragment}catch{return!1}},Nr=function(v){if(!O||typeof v!="object"||v===null)return!1;try{return typeof O(v)=="number"}catch{return!1}};function Ct(V,v,C){V.length!==0&&ws(V,F=>{F.call(i,v,C,Rn)})}const Zr=function(v,C){return!!(ot&&v.hasChildNodes()&&!Nr(v.firstElementChild)&&pt(gf,v.textContent)&&pt(gf,v.innerHTML)||ot&&v.namespaceURI===Pt&&C==="style"&&Nr(v.firstElementChild)||v.nodeType===Qt.processingInstruction||ot&&v.nodeType===Qt.comment&&pt(vf,v.data))},Er=function(v,C,F){if(!Ut[C]&&As(C)&&(He.tagNameCheck instanceof RegExp&&pt(He.tagNameCheck,C)||He.tagNameCheck instanceof Function&&He.tagNameCheck(C)))return!1;if(gr&&!Dt[C]){const le=Z(v),de=z(v);if(de&&le){const we=de.length;for(let Pe=we-1;Pe>=0;--Pe){const ze=v===F?M(de[Pe],!0):de[Pe];le.insertBefore(ze,E(v))}}}return gn(v),!0},Cr=function(v,C,F,le){return v.length===0?C:C===F||C===le?Nt(C):C},Ll=function(v,C){if(Ct(A.beforeSanitizeElements,v,null),v!==C&&Z(v)===null)return Bn&&Tr(v),!0;if(Xr(v))return gn(v),!0;const F=$e(re?re(v):v.nodeName);if(Fe=Cr(A.uponSanitizeElement,Fe,fn,nn),Ct(A.uponSanitizeElement,v,{tagName:F,allowedTags:Fe}),v!==C&&Z(v)===null)return Bn&&Tr(v),!0;if(Zr(v,F))return gn(v),!0;if(Ut[F]||!(It.tagCheck instanceof Function&&It.tagCheck(F))&&!Fe[F]){const de=Er(v,F,C);return de===!1&&Ct(A.afterSanitizeElements,v,null),de}if((O?O(v):v.nodeType)===Qt.element&&!Xe(v)||(F==="noscript"||F==="noembed"||F==="noframes")&&pt(gv,v.innerHTML))return gn(v),!0;if(Ve&&v.nodeType===Qt.text){const de=Yr(v.textContent);v.textContent!==de&&(Ss(i.removed,{element:v.cloneNode()}),v.textContent=de)}return Ct(A.afterSanitizeElements,v,null),!1},Il=function(v,C,F){if(pr[C]||ot&&C==="patchsrc"||ot&&C==="for"&&v!=="label"&&v!=="output"||Ns&&(C==="id"||C==="name")&&(F in l||F in El))return!1;const le=be[C]||It.attributeCheck instanceof Function&&It.attributeCheck(C,v);if(!(b&&pt(Ee,C))){if(!(pn&&pt(Re,C))){if(le){if(!Qr[C]){if(!pt(dn,fl(F,Be,""))){if(!((C==="src"||C==="xlink:href"||C==="href")&&v!=="script"&&af(F,"data:")===0&&Nn[v])){if(!(he&&!pt(Ae,fl(F,Be,"")))){if(F)return!1}}}}}else if(!(As(v)&&(He.tagNameCheck instanceof RegExp&&pt(He.tagNameCheck,v)||He.tagNameCheck instanceof Function&&He.tagNameCheck(v))&&(He.attributeNameCheck instanceof RegExp&&pt(He.attributeNameCheck,C)||He.attributeNameCheck instanceof Function&&He.attributeNameCheck(C,v))||C==="is"&&He.allowCustomizedBuiltInElements&&(He.tagNameCheck instanceof RegExp&&pt(He.tagNameCheck,F)||He.tagNameCheck instanceof Function&&He.tagNameCheck(F))))return!1}}return!0},Is=Le({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),As=function(v){return!Is[gl(v)]&&pt(mt,v)},Ds=function(v,C,F,le){if(oe&&typeof S=="object"&&typeof S.getAttributeType=="function"&&!F)switch(S.getAttributeType(v,C)){case"TrustedHTML":return je(le);case"TrustedScriptURL":return ce(le)}return le},jr=function(v,C,F,le){try{F?v.setAttributeNS(F,C,le):v.setAttribute(C,le),Xr(v)?gn(v):lf(i.removed)}catch{vn(C,v)}},Al=function(v){Ct(A.beforeSanitizeAttributes,v,null);const C=v.attributes;if(!C||Xr(v))return;be=Cr(A.uponSanitizeAttribute,be,Un,hr);const F={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:be,forceKeepAttr:void 0};let le=C.length;const de=$e(v.nodeName);for(;le--;){const we=C[le],Pe=we.name,ze=we.namespaceURI,Ze=we.value,Je=$e(Pe),Ln=Ze;let rt=Pe==="value"?Ln:Zg(Ln);if(F.attrName=Je,F.attrValue=rt,F.keepAttr=!0,F.forceKeepAttr=void 0,Ct(A.uponSanitizeAttribute,v,F),rt=F.attrValue,_l&&(Je==="id"||Je==="name")&&af(rt,Gr)!==0&&(vn(Pe,v),rt=Gr+rt),ot&&pt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,rt)){vn(Pe,v);continue}if(Je==="attributename"&&of(rt,"href")){vn(Pe,v);continue}if(!F.forceKeepAttr){if(!F.keepAttr){vn(Pe,v);continue}if(!We&&pt(vv,rt)){vn(Pe,v);continue}if(Ve&&(rt=Yr(rt)),!Il(de,Je,rt)){vn(Pe,v);continue}rt=Ds(de,Je,ze,rt),rt!==Ln&&jr(v,Pe,ze,rt)}}Ct(A.afterSanitizeAttributes,v,null)},Gn=function(v){let C=null;const F=Bt(v);for(Ct(A.beforeSanitizeShadowDOM,v,null);C=F.nextNode();)if(Ct(A.uponSanitizeShadowNode,C,null),Ll(C,v),Al(C),Vn(C.content)&&Gn(C.content),(O?O(C):C.nodeType)===Qt.element){const de=Q(C);Vn(de)&&(De(de),Gn(de))}Ct(A.afterSanitizeShadowDOM,v,null)},De=function(v){const C=[{node:v,shadow:null}];for(;C.length>0;){const F=C.pop();if(F.shadow){Gn(F.shadow);continue}const le=F.node,we=(O?O(le):le.nodeType)===Qt.element,Pe=z(le);if(Pe)for(let ze=Pe.length-1;ze>=0;--ze)C.push({node:Pe[ze],shadow:null});if(we){const ze=re?re(le):null;if(typeof ze=="string"&&$e(ze)==="template"){const Ze=le.content;Vn(Ze)&&C.push({node:Ze,shadow:null})}}if(we){const ze=Q(le);Vn(ze)&&C.push({node:null,shadow:ze},{node:ze,shadow:null})}}};return i.sanitize=function(V){let v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},C=null,F=null,le=null,de=null;if(Cn=!V,Cn&&(V="<!-->"),typeof V!="string"&&!Nr(V)&&(V=rv(V),typeof V!="string"))throw Ur("dirty is not a string, aborting");if(!i.isSupported)return V;At?(Fe=nn,be=hr):qr(v),(A.uponSanitizeElement.length>0||A.uponSanitizeAttribute.length>0)&&(Fe=Nt(Fe)),A.uponSanitizeAttribute.length>0&&(be=Nt(be)),i.removed=[];const we=Bn&&typeof V!="string"&&Nr(V);if(we){Rl(V);const Ze=re?re(V):V.nodeName;if(typeof Ze=="string"){const Je=$e(Ze);if(!Fe[Je]||Ut[Je])throw Hn(V),Ur("root node is forbidden and cannot be sanitized in-place")}if(Xr(V))throw Hn(V),Ur("root node is clobbered and cannot be sanitized in-place");try{De(V)}catch(Je){throw Hn(V),Je}}else if(Nr(V))C=_r("<!---->"),F=C.ownerDocument.importNode(V,!0),F.nodeType===Qt.element&&F.nodeName==="BODY"||F.nodeName==="HTML"?C=F:C.appendChild(F),De(F);else{if(!qt&&!Ve&&!kt&&V.indexOf("<")===-1)return oe&&mr?je(V):V;if(C=_r(V),!C)return qt?null:mr?ae:""}C&&_n&&gn(C.firstChild);const Pe=we?V:C;try{const Ze=Bt(Pe);for(;le=Ze.nextNode();)Ll(le,Pe),Al(le),Vn(le.content)&&Gn(le.content)}catch(Ze){throw we&&(Hn(V),ws(i.removed,Je=>{Je.element&&Tr(Je.element)})),Ze}if(we)return ws(i.removed,Ze=>{Ze.element&&Tr(Ze.element)}),Ve&&Et(V),V;if(qt){if(Ve&&Et(C),Vr)for(de=Y.call(C.ownerDocument);C.firstChild;)de.appendChild(C.firstChild);else de=C;return(be.shadowroot||be.shadowrootmode)&&(de=N.call(a,de,!0)),de}let ze=kt?C.outerHTML:C.innerHTML;return kt&&Fe["!doctype"]&&C.ownerDocument&&C.ownerDocument.doctype&&C.ownerDocument.doctype.name&&pt(hv,C.ownerDocument.doctype.name)&&(ze="<!DOCTYPE "+C.ownerDocument.doctype.name+`>
|
|
348
|
-
`+ze),Ve&&(ze=Yr(ze)),oe&&mr?je(ze):ze},i.setConfig=function(){let V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};qr(V),At=!0,nn=Fe,hr=be},i.clearConfig=function(){Rn=null,At=!1,nn=null,hr=null,oe=Te,ae=""},i.isValidAttribute=function(V,v,C){Rn||qr({});const F=$e(V),le=$e(v);return Il(F,le,C)},i.addHook=function(V,v){typeof v=="function"&&ht(A,V)&&Ss(A[V],v)},i.removeHook=function(V,v){if(ht(A,V)){if(v!==void 0){const C=Yg(A[V],v);return C===-1?void 0:Xg(A[V],C,1)[0]}return lf(A[V])}},i.removeHooks=function(V){ht(A,V)&&(A[V]=[])},i.removeAllHooks=function(){A=yf()},i}var vu=tp();const kv=new Set(["command_execution","file_change","mcp_tool_call","web_search"]);function xf(s){return kv.has(s.type)}function wv({items:s,runtimeType:i,turn:l,threads:a=[]}){const[d,f]=D.useState(!1);if(s.length===0)return null;const h=s.length;return c.jsxs("div",{className:"tool-calls",children:[c.jsxs("div",{className:"tool-calls-header",onClick:()=>f(m=>!m),children:[c.jsx("span",{className:"tool-calls-icon",children:c.jsx(ng,{size:12})}),c.jsxs("span",{className:"tool-calls-summary",children:[h," tool call",h>1?"s":""]}),c.jsx(su,{size:14,className:"tool-calls-chevron",style:{transform:d?"rotate(90deg)":"none"}})]}),d&&c.jsx("div",{className:"tool-calls-body",children:s.map(m=>c.jsx(vl,{item:m,runtimeType:i,turn:l,threads:a},m.id))})]})}Ie.setOptions({breaks:!0,gfm:!0});function Sv(s){const i=Ie.parse(s);return vu.sanitize(i)}function kf(s,i){var d;const l=document.createTreeWalker(s,NodeFilter.SHOW_TEXT);let a=0;for(;l.nextNode();){const f=l.currentNode,h=((d=f.textContent)==null?void 0:d.length)??0;if(a+h>i)return{node:f,offset:i-a};a+=h}return null}function Tv(s,i){s.querySelectorAll("mark[data-thread-id]").forEach(l=>{const a=l.parentNode;if(!a)return;const d=document.createTextNode(l.textContent||"");a.replaceChild(d,l),a.normalize()});for(const l of i){const a=kf(s,l.start_offset),d=kf(s,l.end_offset);if(!a||!d)continue;const f=document.createRange();f.setStart(a.node,a.offset),f.setEnd(d.node,d.offset);const h=document.createElement("mark");h.setAttribute("data-thread-id",l.id),l.status==="resolved"&&h.classList.add("thread-mark-resolved");try{f.surroundContents(h)}catch{const m=f.extractContents();h.appendChild(m),f.insertNode(h)}}}function _v(s){const i=window.getSelection();if(!i||i.rangeCount===0)return null;const l=i.getRangeAt(0);if(l.collapsed||!s.contains(l.commonAncestorContainer))return null;const a=document.createRange();a.setStart(s,0),a.setEnd(l.startContainer,l.startOffset);const d=a.toString().length,f=l.toString();return{start:d,end:d+f.length,text:f}}function Nv({itemId:s,turnId:i,sessionId:l,content:a,threads:d}){const f=D.useRef(null),h=D.useRef(null),m=D.useRef(null),y=D.useRef(""),g=D.useRef(0),[k,S]=D.useState(!1),[w,M]=D.useState({x:0,y:0}),[I,E]=D.useState(!1),[z,Z]=D.useState({x:0,y:0}),[Q,J]=D.useState(""),[O,re]=D.useState(null),{createThread:fe,switchRightTab:oe}=K(),ae=D.useCallback(()=>{var q;if(!O)return;const P=`
|
|
349
|
-
\`\`\`QUOTE
|
|
350
|
-
${O.text}
|
|
351
|
-
\`\`\`
|
|
352
|
-
|
|
353
|
-
`;K.setState({quotedText:P}),S(!1),re(null),(q=window.getSelection())==null||q.removeAllRanges()},[O]),Te=d.filter(P=>P.item_id===s);D.useEffect(()=>{f.current&&Tv(f.current,Te)}),D.useEffect(()=>{y.current=Q},[Q]),D.useEffect(()=>{function P(q){h.current&&!h.current.contains(q.target)&&(S(!1),y.current.trim()||E(!1))}return document.addEventListener("mousedown",P),()=>document.removeEventListener("mousedown",P)},[]);const te=D.useCallback(()=>{S(!1),y.current.trim()||E(!1)},[]),ve=D.useCallback(()=>{const P=f.current;if(!P)return;const q=_v(P);if(q&&q.text.trim().length>0){const X=window.getSelection();if(X&&X.rangeCount>0&&X.anchorNode&&X.focusNode){const Y=X.getRangeAt(0).getBoundingClientRect(),H=28,N=6,A=170;let pe=!1;try{const Ee=document.createRange();Ee.setStart(X.focusNode,X.focusOffset),Ee.setEnd(X.focusNode,X.focusOffset);const Re=document.createRange();Re.setStart(X.anchorNode,X.anchorOffset),Re.setEnd(X.anchorNode,X.anchorOffset),pe=Re.compareBoundaryPoints(Range.START_TO_START,Ee)>0}catch{pe=!1}let ye=Y.top-H-N;ye<8&&(ye=Y.bottom+N);let Ne=pe?Y.left-A:Y.right;Ne=Math.max(8,Math.min(Ne,window.innerWidth-A-8)),M({x:Ne,y:ye}),S(!0),re(q)}}else S(!1)},[]);D.useEffect(()=>{function P(q){const X=q.target;X&&(X.closest(".selection-actions")||X.closest(".thread-create-popover"))||ve()}return document.addEventListener("mouseup",P),()=>document.removeEventListener("mouseup",P)},[ve]);const _e=D.useCallback(()=>{S(!1),E(!0),Z({x:w.x,y:w.y})},[w]);D.useLayoutEffect(()=>{if(!I)return;const P=m.current;if(!P)return;const q=P.offsetWidth,X=P.offsetHeight,$=8;let Y=w.x,H=w.y;Y-q<$&&(Y=q+$),Y>window.innerWidth-$&&(Y=window.innerWidth-$),H<$&&(H=$),H+X>window.innerHeight-$&&(H=window.innerHeight-X-$),Z({x:Y,y:H})},[I,w]);const je=D.useCallback(async()=>{var P;!O||!Q.trim()||(await fe(l,{itemId:s,turnId:i,startOffset:O.start,endOffset:O.end,selectedText:O.text,message:Q.trim()}),J(""),E(!1),re(null),(P=window.getSelection())==null||P.removeAllRanges(),oe("threads"))},[O,Q,fe,l,s,i,oe]),ce=D.useCallback(P=>{const q=P.target;if(q.tagName==="MARK"&&q.hasAttribute("data-thread-id")){P.preventDefault(),oe("threads");const X=q.getAttribute("data-thread-id");setTimeout(()=>{const $=document.getElementById(`thread-${X}`);$&&($.scrollIntoView({behavior:"smooth",block:"center"}),$.classList.add("thread-card-highlighted"),setTimeout(()=>$.classList.remove("thread-card-highlighted"),1500))},100)}},[oe]);return c.jsxs("div",{style:{position:"relative"},ref:h,children:[c.jsx("div",{ref:f,dangerouslySetInnerHTML:{__html:Sv(a||"…")},onMouseDown:te,onClick:ce}),k&&!I&&c.jsxs("div",{className:"selection-actions",style:{left:w.x,top:w.y},children:[c.jsxs("button",{className:"discuss-button",onClick:_e,title:"Start a discussion about this text",children:[c.jsx(Hm,{size:14}),c.jsx("span",{children:"Discuss"})]}),c.jsxs("button",{className:"discuss-button",onClick:ae,title:"Quote this text in your message",children:[c.jsx($f,{size:14}),c.jsx("span",{children:"Quote"})]})]}),I&&c.jsxs("div",{ref:m,className:"thread-create-popover",style:{left:z.x,top:z.y},children:[c.jsxs("div",{className:"thread-create-header",children:[c.jsxs("span",{className:"thread-create-quote",children:['"',O==null?void 0:O.text.slice(0,80),O&&O.text.length>80?"…":"",'"']}),c.jsx("button",{className:"thread-create-close",onClick:()=>{E(!1),re(null)},children:c.jsx(fr,{size:14})})]}),c.jsx("textarea",{className:"thread-create-input",placeholder:"Ask about this text…",value:Q,onChange:P=>J(P.target.value),autoFocus:!0,rows:2,onKeyDown:P=>{if(P.key==="Enter"&&(P.metaKey||P.ctrlKey)&&(P.preventDefault(),je()),P.key==="Escape")if(y.current.trim()){const q=Date.now();g.current&&q-g.current<400?(g.current=0,E(!1),re(null)):g.current=q}else E(!1),re(null)}}),c.jsxs("div",{className:"thread-create-footer",children:[c.jsx("span",{className:"thread-create-hint",children:"⌘↵ to send · Esc to cancel"}),c.jsxs("button",{className:"thread-create-send",onClick:je,disabled:!Q.trim(),children:[c.jsx(ou,{size:13}),c.jsx("span",{children:"Send"})]})]})]})]})}Ie.setOptions({breaks:!0,gfm:!0});function Ev({attachments:s}){const[i,l]=D.useState(null);return D.useEffect(()=>{if(!i)return;function a(d){d.key==="Escape"&&l(null)}return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[i]),!Array.isArray(s)||s.length===0?null:c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"attachment-pills",children:s.map((a,d)=>{const f=a.media_type.startsWith("image/"),h=`data:${a.media_type};base64,${a.data}`;return c.jsxs("span",{className:"attachment-pill",title:a.name,onClick:f?()=>l(h):void 0,style:f?{cursor:"pointer"}:void 0,children:[f?c.jsx("img",{src:h,alt:a.name,className:"attachment-pill-thumb"}):c.jsx(Of,{size:12,className:"attachment-pill-icon"}),c.jsx("span",{className:"attachment-pill-name",children:a.name})]},d)})}),i&&c.jsx("div",{className:"image-preview-modal",onClick:()=>l(null),children:c.jsxs("div",{className:"image-preview-content",onClick:a=>a.stopPropagation(),children:[c.jsx("img",{src:i,alt:"preview"}),c.jsx("button",{className:"image-preview-close",onClick:()=>l(null),children:c.jsx(fr,{size:20})})]})})]})}function Cv(s){const i=Ie.parse(s);return vu.sanitize(i)}function wf(s){var i;return(i=s.data)!=null&&i.text?s.data.text:""}function jv(s){const i=s.match(/^\/bin\/\w+\s+-\w+\s+"(.*)"$/s);return i?i[1]:s}const Sf=1e4;function Rv({item:s,runtimeType:i,turn:l,threads:a}){var m,y,g,k,S,w,M,I;const d=s.status==="in_progress",[f,h]=D.useState(!1);switch(s.type){case"agent_message":{const{iconClass:E,iconText:z}=Df(i??"codex");return c.jsxs("div",{className:"render-content",children:[c.jsxs("div",{className:"turn-header",children:[c.jsx("span",{className:`turn-header-icon ${E}`,children:z}),c.jsx("span",{className:"turn-header-title",children:"Agent"}),d&&c.jsx("span",{className:"turn-header-meta",children:"writing…"})]}),c.jsx(Nv,{itemId:s.id,turnId:l.id,sessionId:l.session_id,content:wf(s)||"…",threads:a,runtimeType:i})]})}case"reasoning":return c.jsxs("div",{className:"render-content",children:[c.jsxs("div",{className:"turn-header",children:[c.jsx("span",{className:"turn-header-icon",style:{background:"var(--surface-2)",color:"var(--text-3)"},children:c.jsx(Im,{size:14})}),c.jsx("span",{className:"turn-header-title",children:"Reasoning"})]}),c.jsx("div",{dangerouslySetInnerHTML:{__html:Cv(wf(s))}})]});case"command_execution":{const E=s.data||{},z=jv(E.command||""),Z=E.aggregated_output||"",Q=E.exit_code,J=d?"running…":Q!==null?`exit ${Q}`:"",O=Z.length>Sf,re=O&&!f?Z.slice(0,Sf)+`
|
|
354
|
-
… (truncated, click to expand)`:Z;return c.jsxs("div",{className:"render-content",children:[c.jsxs("div",{className:"turn-header",children:[c.jsx("span",{className:"turn-header-icon",style:{background:"var(--surface-2)",color:"var(--text-3)"},children:c.jsx(Uf,{size:14})}),c.jsx("span",{className:"turn-header-title",children:"Command"}),J&&c.jsx("span",{className:"turn-header-meta",children:J})]}),c.jsx("pre",{className:"cmd-block",children:c.jsx("code",{children:z})}),Z&&c.jsxs(c.Fragment,{children:[c.jsx("pre",{className:"cmd-output",children:c.jsx("code",{children:re})}),O&&c.jsx("button",{className:"cmd-output-toggle",onClick:()=>h(fe=>!fe),children:f?"Show less":`Show full output (${(Z.length/1024).toFixed(0)}KB)`})]})]})}case"file_change":{const E=(m=s.data)==null?void 0:m.changes,z=Array.isArray(E)?E:[],Z=`${z.length} file${z.length!==1?"s":""}`;return c.jsxs("div",{className:"render-content",children:[c.jsxs("div",{className:"turn-header",children:[c.jsx("span",{className:"turn-header-icon",style:{background:"var(--surface-2)",color:"var(--text-3)"},children:c.jsx(Mm,{size:14})}),c.jsx("span",{className:"turn-header-title",children:"File Changes"}),c.jsx("span",{className:"turn-header-meta",children:Z})]}),c.jsx("div",{className:"file-change-list",children:z.map((Q,J)=>{const O=Q.kind==="add"?"A":Q.kind==="delete"?"D":"M",re=Q.kind==="add"?"fc-add":Q.kind==="delete"?"fc-del":"fc-mod";return c.jsxs("div",{className:"file-change",children:[c.jsx("span",{className:`fc-status ${re}`,children:O}),c.jsx("span",{className:"fc-name",children:Q.path})]},J)})})]})}case"mcp_tool_call":{const E=s.data||{},z=E.tool||"mcp";if(z==="Agent"){const ae=E.arguments,Te=(ae==null?void 0:ae.description)||(ae==null?void 0:ae.prompt)||"Subagent",te=s.status==="failed",ve=d?"running…":te?"failed":"done";return c.jsxs("div",{className:"agent-call-card",children:[c.jsx("span",{className:"agent-call-icon",children:c.jsx(Ba,{size:14})}),c.jsx("span",{className:"agent-call-desc",children:Te}),c.jsx("span",{className:`agent-call-status ${d?"running":te?"failed":"done"}`,children:ve})]})}const Z=E.server||"",Q=E.arguments,J=E.result,O=E.error,re=s.status==="failed"||!!O,fe=d?"running…":re?"failed":"done",oe=((y=J==null?void 0:J.content)==null?void 0:y.filter(ae=>ae.type==="text").map(ae=>ae.text))??[];return c.jsxs("div",{className:"render-content",children:[c.jsxs("div",{className:"turn-header",children:[c.jsx("span",{className:"turn-header-icon",style:{background:"var(--surface-2)",color:"var(--text-3)"},children:c.jsx(Ym,{size:14})}),c.jsxs("span",{className:"turn-header-title",children:["MCP: ",z]}),Z&&c.jsx("span",{className:"turn-header-meta",children:Z}),c.jsx("span",{className:"turn-header-meta",style:re?{color:"var(--red)"}:void 0,children:fe})]}),Q&&Object.keys(Q).length>0&&c.jsx("div",{className:"mcp-args",children:Object.entries(Q).map(([ae,Te])=>c.jsxs("div",{className:"mcp-arg",children:[c.jsx("span",{className:"mcp-arg-key",children:ae}),ae==="code"?c.jsx("pre",{className:"cmd-block",children:c.jsx("code",{children:String(Te)})}):c.jsx("span",{className:"mcp-arg-value",children:typeof Te=="string"?Te:JSON.stringify(Te,null,2)})]},ae))}),oe.length>0&&oe.map((ae,Te)=>c.jsx("pre",{className:"cmd-output",children:c.jsx("code",{children:ae})},Te)),O&&c.jsx("pre",{className:"cmd-output",style:{color:"var(--red)"},children:c.jsx("code",{children:O})})]})}case"web_search":{const E=((g=s.data)==null?void 0:g.query)||"";return c.jsxs("div",{className:"render-content",children:[c.jsxs("div",{className:"turn-header",children:[c.jsx("span",{className:"turn-header-icon",style:{background:"var(--surface-2)",color:"var(--text-3)"},children:c.jsx(Zm,{size:14})}),c.jsx("span",{className:"turn-header-title",children:"Web Search"})]}),c.jsx("p",{className:"user-message",children:E})]})}case"todo_list":{const E=((k=s.data)==null?void 0:k.items)||[];return c.jsxs("div",{className:"render-content",children:[c.jsxs("div",{className:"turn-header",children:[c.jsx("span",{className:"turn-header-icon",style:{background:"var(--surface-2)",color:"var(--text-3)"},children:c.jsx(Um,{size:14})}),c.jsx("span",{className:"turn-header-title",children:"Todo List"})]}),c.jsx("ul",{className:"todo-list",children:E.map((z,Z)=>c.jsxs("li",{className:z.completed?"todo-done":"todo-pending",children:[z.completed?c.jsx(yl,{size:14}):c.jsx(Wi,{size:14})," ",z.text]},Z))})]})}case"background_task":{const E=s.data||{},z=E.task_type||"unknown",Z=E.subagent_type||null,Q=E.description||"",J=E.status||"running",O=E.last_tool_name||null,re=E.token_count||null,fe=z==="local_agent",oe=z==="local_bash",ae=fe?Ba:oe?Ff:zf,Te=fe?`Subagent${Z?`: ${Z}`:""}`:oe?"Monitor":"Background Task",te=J==="running"?"running…":J==="completed"?"done":J==="failed"?"failed":J==="stopped"?"stopped":J,ve=s.status==="failed"||J==="failed";return c.jsxs("div",{className:"render-content",children:[c.jsxs("div",{className:"turn-header",children:[c.jsx("span",{className:"turn-header-icon",style:{background:"var(--surface-2)",color:"var(--text-3)"},children:c.jsx(ae,{size:14})}),c.jsx("span",{className:"turn-header-title",children:Te}),c.jsx("span",{className:"turn-header-meta",style:ve?{color:"var(--red)"}:void 0,children:te})]}),Q&&c.jsx("p",{className:"user-message",style:{fontSize:"13px"},children:Q}),O&&d&&c.jsxs("div",{className:"cmd-output",style:{color:"var(--text-3)",fontSize:"12px"},children:["last tool: ",O,re!=null&&` · ${re.toLocaleString()} tokens`]}),c.jsx("div",{className:"cmd-output",style:{color:"var(--text-muted)",fontSize:"11px"},children:"Output available in Tasks panel — click the status bar indicator or the Tasks tab."})]})}case"context_compaction":{const E=((S=s.data)==null?void 0:S.trigger)??"auto",z=((w=s.data)==null?void 0:w.pre_tokens)??0,Z=((M=s.data)==null?void 0:M.post_tokens)??0,Q=z>0?Math.round((1-Z/z)*100):0,J=E==="manual"?"Context compacted (/compact)":"Context auto-compacted";return c.jsxs("div",{className:"render-content",children:[c.jsxs("div",{className:"turn-header",children:[c.jsx("span",{className:"turn-header-icon",style:{background:"var(--surface-2)",color:"var(--text-3)"},children:c.jsx(Gm,{size:14})}),c.jsx("span",{className:"turn-header-title",children:J})]}),c.jsxs("div",{className:"cmd-output",style:{color:"var(--text-3)"},children:[z.toLocaleString()," → ",Z.toLocaleString()," tokens (",Q,"% reduction)"]})]})}case"error":{const E=((I=s.data)==null?void 0:I.message)||"Unknown error";return c.jsxs("div",{className:"render-content",children:[c.jsxs("div",{className:"turn-header",children:[c.jsx("span",{className:"turn-header-icon",style:{background:"var(--red)",color:"#fff"},children:c.jsx(lu,{size:14})}),c.jsx("span",{className:"turn-header-title",children:"Error"})]}),c.jsx("pre",{className:"cmd-output",style:{color:"var(--red)"},children:c.jsx("code",{children:E})})]})}default:return null}}const vl=D.memo(Rv);function Lv({turn:s,runtimeType:i,threads:l=[]}){const[a,d]=D.useState(!1);D.useEffect(()=>{const I=s.items.some(E=>E.type==="background_task"&&E.status==="in_progress");s.status==="running"||s.status==="pending"?d(!0):s.status==="completed"&&!I&&d(!1)},[s.status,s.items]);let f=-1;for(let I=s.items.length-1;I>=0;I--)if(s.items[I].type==="agent_message"){f=I;break}const h=f>=0,g=(h?s.items.slice(0,f):s.items).filter(I=>{var E;return!(I.type==="reasoning"&&(!((E=I.data)!=null&&E.text)||I.data.text===""))}).filter(I=>I.type!=="background_task"),k=[];let S=null;for(const I of g)I.type==="agent_message"?(S&&k.push(S),S={agentMessage:I,toolItems:[],otherItems:[]}):(S||(S={agentMessage:null,toolItems:[],otherItems:[]}),xf(I)?S.toolItems.push(I):S.otherItems.push(I));S&&k.push(S);const w=g.filter(I=>xf(I)).length,M=w>0||g.length>0&&(s.status==="running"||s.status==="pending");return c.jsxs("div",{className:"turn-group",children:[c.jsxs("div",{className:"render-content",children:[c.jsxs("div",{className:"turn-header",children:[c.jsx("span",{className:"turn-header-icon",style:{background:"var(--amber)",color:"#fff"},children:"U"}),c.jsx("span",{className:"turn-header-title",children:"You"})]}),c.jsx("p",{className:"user-message",children:s.user_prompt}),Array.isArray(s.attachments)&&s.attachments.length>0&&c.jsx(Ev,{attachments:s.attachments})]}),M&&c.jsxs("div",{className:"tool-calls",children:[c.jsxs("div",{className:"tool-calls-header",onClick:()=>d(I=>!I),children:[c.jsx("span",{className:"tool-calls-icon",children:c.jsx(Fm,{size:12})}),c.jsx("span",{className:"tool-calls-summary",children:w>0?`${w} tool call${w>1?"s":""}`:"thinking…"}),c.jsx(su,{size:14,className:"tool-calls-chevron",style:{transform:a?"rotate(90deg)":"none"}})]}),a&&c.jsx("div",{className:"tool-calls-body",children:k.map((I,E)=>c.jsxs("div",{className:"intermediate-segment",children:[I.agentMessage&&c.jsx(vl,{item:I.agentMessage,runtimeType:i,turn:s,threads:l}),I.otherItems.map(z=>c.jsx(vl,{item:z,runtimeType:i,turn:s,threads:l},z.id)),I.toolItems.length>0&&c.jsx(wv,{items:I.toolItems,runtimeType:i,turn:s,threads:l})]},E))})]}),h&&c.jsx(vl,{item:s.items[f],runtimeType:i,turn:s,threads:l},s.items[f].id),h&&s.items.slice(f+1).map(I=>c.jsx(vl,{item:I,runtimeType:i,turn:s,threads:l},I.id)),s.items.length===0&&!s.error&&(s.status==="pending"||s.status==="running")&&c.jsx("div",{className:"render-content",children:c.jsx("p",{style:{color:"var(--text-muted)",fontStyle:"italic"},children:s.status==="running"?"Agent is thinking…":"Waiting to start…"})}),s.error&&c.jsx("div",{className:"render-content",children:c.jsx("pre",{className:"cmd-output",style:{color:"var(--red)"},children:c.jsx("code",{children:s.error})})})]})}const Iv=D.memo(Lv);function np(s,i="session",l=0){const a=[];if(i==="session")s.forEach((f,h)=>Tf(f,h,a));else{const f=s[l];f&&Tf(f,l,a)}const d=new Map;for(const f of a)d.set(f.path,f);return Array.from(d.values())}function Tf(s,i,l){var a;for(const d of s.items)if(d.type==="file_change"&&((a=d.data)!=null&&a.changes)){const f=d.data.changes;for(const h of f)l.push({path:h.path,kind:h.kind,turnIdx:i})}}function Av(){const{activeSessionId:s,sessionDetails:i,activeTurnIndex:l,activeRightTab:a,changesScope:d,submittingPrompt:f,loading:h,selectedChangePath:m,setSelectedChangePath:y}=K(),g=s?i[s]:null,k=(g==null?void 0:g.turns)??[],S=D.useRef(null);if(D.useEffect(()=>{S.current&&(S.current.scrollTop=S.current.scrollHeight)},[s,k.length]),D.useEffect(()=>{if(!m||a!=="changes")return;const w=setTimeout(()=>{const M=m.replace(/[^a-zA-Z0-9]/g,"-"),I=document.getElementById(`diff-${M}`);I&&(I.scrollIntoView({behavior:"smooth",block:"start"}),I.classList.add("diff-highlight"),setTimeout(()=>I.classList.remove("diff-highlight"),1500)),y(null)},50);return()=>clearTimeout(w)},[m,a,y]),a==="changes"){if(!g)return c.jsx("div",{className:"render-scroll",children:c.jsx("div",{className:"empty-state",children:"No session selected"})});const w=np(k,d,l);return w.length===0?c.jsx("div",{className:"render-scroll",children:c.jsx("div",{className:"render-content",children:c.jsx("p",{style:{color:"var(--text-muted)",fontStyle:"italic"},children:"No file changes in this scope."})})}):c.jsx("div",{className:"render-scroll",ref:S,children:c.jsxs("div",{className:"render-content",children:[c.jsxs("div",{style:{marginBottom:"20px"},children:[c.jsx("span",{style:{fontSize:"16px",fontWeight:600,color:"var(--text)"},children:d==="session"?"All Session Changes":"Current Turn Changes"}),c.jsxs("span",{style:{fontSize:"12px",color:"var(--text-muted)",marginLeft:"8px"},children:[w.length," file",w.length>1?"s":""]})]}),w.map(M=>{const I=M.path.split("/").pop()||M.path,E=M.path.replace("/"+I,""),z=M.kind==="add"?"Added":M.kind==="delete"?"Deleted":"Modified",Z=M.kind==="add"?"fc-add":M.kind==="delete"?"fc-del":"fc-mod",Q=M.kind==="add"?"A":M.kind==="delete"?"D":"M",J=M.path.replace(/[^a-zA-Z0-9]/g,"-");return c.jsxs("div",{children:[c.jsxs("div",{className:"diff-file-header",id:`diff-${J}`,children:[c.jsx("span",{className:`diff-file-status ${Z}`,children:Q}),c.jsxs("span",{className:"diff-file-name",children:[E&&c.jsxs("span",{style:{color:"var(--text-muted)"},children:[E,"/"]}),I]}),c.jsx("span",{className:"diff-file-stats",children:c.jsx("span",{className:`diff-file-badge ${Z}`,children:z})})]}),c.jsx("p",{style:{color:"var(--text-muted)",fontSize:"12px",fontStyle:"italic",padding:"8px 16px"},children:"Diff content not available (Codex SDK limitation)."})]},M.path)})]})})}return h&&!g?c.jsx("div",{className:"render-scroll",children:c.jsxs("div",{className:"skeleton-bars",children:[c.jsx("div",{className:"skeleton-bar"}),c.jsx("div",{className:"skeleton-bar"}),c.jsx("div",{className:"skeleton-bar"}),c.jsx("div",{className:"skeleton-bar"}),c.jsx("div",{className:"skeleton-bar"})]})}):g?c.jsxs("div",{className:"render-scroll",ref:S,children:[f&&c.jsx("div",{className:"turn-block",children:c.jsxs("div",{className:"turn-group",children:[c.jsxs("div",{className:"render-content",children:[c.jsxs("div",{className:"turn-header",children:[c.jsx("span",{className:"turn-header-icon",style:{background:"var(--amber)",color:"#fff"},children:"U"}),c.jsx("span",{className:"turn-header-title",children:"You"})]}),c.jsx("p",{className:"user-message",children:f})]}),c.jsx("div",{className:"render-content",children:c.jsx("p",{style:{color:"var(--text-muted)",fontStyle:"italic"},children:"Sending…"})})]})}),k.length===0&&!f&&c.jsx("div",{className:"empty-state",children:"No turns yet. Send a message below to start."}),k.filter(w=>!w.thread_id).map((w,M)=>c.jsx("div",{id:`turn-${M}`,className:"turn-block",children:c.jsx(Iv,{turn:w,runtimeType:g.runtime_type,threads:g.threads??[]})},w.id))]}):c.jsx("div",{className:"render-scroll",children:c.jsx("div",{className:"empty-state",children:"No session selected"})})}const Dv=D.memo(Av),Pv=[{id:"model",label:"/model",hint:"Change model",capability:"dynamicModels"},{id:"sandbox",label:"/sandbox",hint:"Sandbox mode",capability:"sandbox",subPopup:"sandbox"},{id:"websearch",label:"/websearch",hint:"Web search mode",capability:"webSearch",subPopup:"websearch"},{id:"network",label:"/network",hint:"Network access",capability:"networkAccess",subPopup:"network"},{id:"skills",label:"/skills",hint:"Browse skills",capability:"skills"},{id:"plugins",label:"/plugins",hint:"Browse plugins",capability:"plugins"},{id:"mcp",label:"/mcp",hint:"Browse MCP servers",capability:"mcpServers"}];function Mv(s){return s.map(i=>({id:i.name,label:`/${i.name}`,hint:i.description,capability:null,insertAsText:!0}))}function bv(s,i,l=[]){const a=[...Pv,...Mv(l)],d=new Set;return a.filter(f=>!(d.has(f.label)||(d.add(f.label),f.capability&&!i[f.capability])||s&&!f.label.toLowerCase().includes(s.toLowerCase())))}function zv({commands:s,selectedIndex:i,onSelect:l,onHover:a}){return c.jsxs("div",{className:"slash-popup",children:[c.jsx("div",{className:"slash-popup-header",children:"Commands"}),s.length===0&&c.jsx("div",{className:"slash-popup-empty",children:"No matching commands"}),s.map((d,f)=>c.jsxs("div",{className:`slash-popup-item ${f===i?"selected":""}`,onMouseEnter:()=>a(f),onClick:()=>l(d),children:[c.jsx("span",{className:"slash-popup-label",children:d.label}),c.jsx("span",{className:"slash-popup-hint",children:d.hint})]},d.id))]})}function ba({title:s,options:i,currentValue:l,onSelect:a,onClose:d}){return c.jsxs("div",{className:"slash-popup",children:[c.jsxs("div",{className:"slash-popup-header",children:[c.jsx("button",{className:"slash-popup-back",onClick:d,children:"← Back"}),c.jsx("span",{children:s})]}),i.map(f=>c.jsxs("div",{className:`slash-popup-item ${f.value===l?"selected":""}`,onClick:()=>a(f.value),children:[c.jsxs("div",{className:"slash-popup-item-main",children:[c.jsx("span",{className:"slash-popup-label",children:f.label}),f.description&&c.jsx("span",{className:"slash-popup-hint",children:f.description})]}),f.value===l&&c.jsx("span",{className:"slash-popup-check",children:"✓"})]},f.value))]})}function Ov(){return Wr("/skills")}function $v({filter:s,onSelect:i,onClose:l}){const[a,d]=D.useState([]),[f,h]=D.useState(!0),[m,y]=D.useState(0),g=D.useRef(null);D.useEffect(()=>{Ov().then(d).catch(()=>d([])).finally(()=>h(!1))},[]);const k=a.filter(S=>S.name.toLowerCase().includes(s.toLowerCase())||S.description.toLowerCase().includes(s.toLowerCase()));return D.useEffect(()=>{y(0)},[s]),D.useEffect(()=>{function S(w){w.key==="ArrowDown"?(w.preventDefault(),y(M=>Math.min(M+1,k.length-1))):w.key==="ArrowUp"?(w.preventDefault(),y(M=>Math.max(M-1,0))):w.key==="Enter"?(w.preventDefault(),k[m]&&i(k[m])):w.key==="Escape"&&(w.preventDefault(),l())}return window.addEventListener("keydown",S),()=>window.removeEventListener("keydown",S)},[k,m,i,l]),c.jsxs("div",{className:"slash-popup",ref:g,children:[c.jsxs("div",{className:"slash-popup-header",children:[c.jsx("button",{className:"slash-popup-back",onClick:l,children:"← Back"}),c.jsx("span",{children:"Skills"})]}),f&&c.jsx("div",{className:"slash-popup-empty",children:"Loading skills…"}),!f&&k.length===0&&c.jsx("div",{className:"slash-popup-empty",children:"No matching skills"}),k.map((S,w)=>c.jsxs("div",{className:`slash-popup-item ${w===m?"selected":""}`,onMouseEnter:()=>y(w),onClick:()=>i(S),children:[c.jsxs("div",{className:"slash-popup-item-main",children:[c.jsx("span",{className:"slash-popup-label",children:S.name}),S.description&&c.jsx("span",{className:"slash-popup-hint",children:S.description})]}),!!S.metadata.isSystem&&c.jsx("span",{className:"slash-popup-hint",children:"system"})]},S.id))]})}function Fv(){return Wr("/providers")}function Uv(s){return Wr(`/providers/${s}/commands`)}const Bv={dynamicModels:!1,skills:!1,plugins:!1,mcpServers:!1,imageAttachments:!1,sandbox:!1,webSearch:!1,networkAccess:!1,fileReferences:!1};function Wv(s){const[i,l]=D.useState([]),[a,d]=D.useState(!0);D.useEffect(()=>{Fv().then(l).catch(()=>l([])).finally(()=>d(!1))},[]);const f=i.find(h=>h.id===s)??null;return{provider:f,capabilities:(f==null?void 0:f.capabilities)??Bv,loading:a}}const bi=32,hl=200;function _f(s){if(!s)return{};try{return JSON.parse(s)}catch{return{}}}function Nf(s){return s<1024?`${s}B`:s<1024*1024?`${(s/1024).toFixed(1)}KB`:`${(s/(1024*1024)).toFixed(1)}MB`}let Ef=0;function Hv(){return Ef+=1,`att-${Date.now()}-${Ef}`}function Vv(){const[s,i]=D.useState(""),l=D.useRef(null),a=D.useRef(null),{submitPrompt:d,cancelTurn:f,updateRuntimeConfig:h,setShowModelSelector:m}=K(),y=K(b=>b.activeSessionId),g=K(b=>b.activeSessionId?b.sessionDetails[b.activeSessionId]:null),k=K(b=>b.restoredPrompt),S=K(b=>b.quotedText),w=(g==null?void 0:g.is_running)===1,M=!y,{capabilities:I}=Wv(g==null?void 0:g.runtime_type),E=(g==null?void 0:g.runtime_type)??null,z=I.imageAttachments,[Z,Q]=D.useState([]),[J,O]=D.useState(!1),[re,fe]=D.useState(null),[oe,ae]=D.useState([]);D.useEffect(()=>{if(!E){ae([]);return}let b=!1;return Uv(E).then(he=>{b||ae(he)}).catch(()=>{b||ae([])}),()=>{b=!0}},[E]);const[Te,te]=D.useState(!1),[ve,_e]=D.useState(""),[je,ce]=D.useState(0),[P,q]=D.useState(void 0),[X,$]=D.useState(!1),[Y,H]=D.useState(""),[N,A]=D.useState([]),pe=Te?bv(ve,I,oe):[];D.useEffect(()=>{k!==null&&(i(k),requestAnimationFrame(()=>{l.current&&(l.current.style.height="auto",l.current.style.height=Math.min(l.current.scrollHeight,hl)+"px")}),K.setState({restoredPrompt:null}))},[k]),D.useEffect(()=>{S!==null&&(i(b=>b+S),setTimeout(()=>{if(l.current){l.current.style.height="auto",l.current.style.height=Math.min(l.current.scrollHeight,hl)+"px",l.current.focus();const b=l.current.value.length;l.current.setSelectionRange(b,b)}},0),K.setState({quotedText:null}))},[S]),D.useEffect(()=>{if(!w)return;function b(he){he.key==="Escape"&&(he.preventDefault(),f())}return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[w,f]),D.useEffect(()=>{te(!1),q(void 0),$(!1),A([]),Q(b=>{for(const he of b)he.previewUrl&&URL.revokeObjectURL(he.previewUrl);return[]})},[y]),D.useEffect(()=>{if(!re)return;function b(he){he.key==="Escape"&&(he.preventDefault(),fe(null))}return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[re]);const ye=D.useCallback(b=>{if(!b)return;const he=Array.from(b);for(const We of he){const Ve=new FileReader;Ve.onload=()=>{const kt=Ve.result.split(",")[1]??"",At=We.type.startsWith("image/")?URL.createObjectURL(We):void 0;Q(nn=>[...nn,{id:Hv(),name:We.name,media_type:We.type||"application/octet-stream",data:kt,previewUrl:At,size:We.size}])},Ve.readAsDataURL(We)}},[]),Ne=D.useCallback(b=>{Q(he=>{const We=he.find(Ve=>Ve.id===b);return We!=null&&We.previewUrl&&URL.revokeObjectURL(We.previewUrl),he.filter(Ve=>Ve.id!==b)})},[]),Ee=D.useCallback(b=>{b.preventDefault(),b.stopPropagation(),!(!z||w)&&O(!0)},[z,w]),Re=D.useCallback(b=>{b.preventDefault(),b.stopPropagation(),O(!1)},[]),Ae=D.useCallback(b=>{b.preventDefault(),b.stopPropagation(),O(!1),!(!z||w)&&ye(b.dataTransfer.files)},[z,w,ye]),Be=D.useCallback(b=>{var Ve;if(!z)return;const he=(Ve=b.clipboardData)==null?void 0:Ve.items;if(!he)return;const We=[];for(let ot=0;ot<he.length;ot++){const kt=he[ot];if(kt.type.startsWith("image/")){const At=kt.getAsFile();At&&We.push(At)}}We.length>0&&(b.preventDefault(),ye(We))},[z,ye]);function mt(){const b=l.current;b&&(b.style.height="auto",b.style.height=Math.min(b.scrollHeight,hl)+"px")}function dn(){const b=s.trim();if(!b||w)return;let he=b;N.length>0&&(he=`${N.map(ot=>`$${ot.name}`).join(" ")}
|
|
355
|
-
|
|
356
|
-
${b}`);const We=Z.map(({id:Ve,previewUrl:ot,size:kt,...At})=>At);i(""),A([]),l.current&&(l.current.style.height=bi+"px"),te(!1),q(void 0),$(!1);for(const Ve of Z)Ve.previewUrl&&URL.revokeObjectURL(Ve.previewUrl);Q([]),d(he,We.length>0?We:void 0)}function Fe(b){if(b.insertAsText){const he=`/${b.id} `;i(he),te(!1),q(void 0),requestAnimationFrame(()=>{if(l.current){l.current.focus();const We=he.length;l.current.setSelectionRange(We,We),l.current.style.height="auto",l.current.style.height=Math.min(l.current.scrollHeight,hl)+"px"}});return}b.subPopup?q(b.subPopup):b.id==="skills"?($(!0),H(""),te(!1),i("")):b.id==="model"?(m(!0),te(!1),i("")):(te(!1),i(""))}function fn(b){A(he=>[...he,b]),$(!1),i(""),l.current&&(l.current.style.height=bi+"px")}function be(b){const he=_f(g==null?void 0:g.runtime_config);P==="sandbox"?he.sandboxMode=b:P==="websearch"?he.webSearchMode=b:P==="network"&&(he.networkAccessEnabled=b==="true"),h(he),q(void 0),te(!1),i(""),l.current&&(l.current.style.height=bi+"px")}function Un(b){if(Te&&!P){if(b.key==="ArrowDown"){b.preventDefault(),ce(he=>Math.min(he+1,pe.length-1));return}if(b.key==="ArrowUp"){b.preventDefault(),ce(he=>Math.max(he-1,0));return}if(b.key==="Enter"){b.preventDefault(),pe[je]&&Fe(pe[je]);return}if(b.key==="Escape"){b.preventDefault(),te(!1),i("");return}}if(P&&b.key==="Escape"){b.preventDefault(),q(void 0);return}if(b.key==="Enter"&&(b.metaKey||b.ctrlKey)&&!w){b.preventDefault(),dn();return}b.key==="Escape"&&w&&(b.preventDefault(),f())}function He(b){const he=b.target.value;i(he),mt(),he.startsWith("/")&&!he.includes(" ")&&!w?(te(!0),_e(he.slice(1)),ce(0)):(te(!1),q(void 0)),he.startsWith("$")&&!w?($(!0),H(he.slice(1))):he.startsWith("$")||$(!1)}const Ut=_f(g==null?void 0:g.runtime_config),pr=[{value:"read-only",label:"Read Only",description:"Agent can only read files"},{value:"workspace-write",label:"Workspace Write",description:"Agent can read and write in workspace"},{value:"danger-full-access",label:"Danger Full Access",description:"Agent has unrestricted access"}],It=[{value:"disabled",label:"Disabled",description:"No web search"},{value:"cached",label:"Cached",description:"Use cached search results"},{value:"live",label:"Live",description:"Perform live web searches"}],pn=[{value:"false",label:"Disabled",description:"No network access"},{value:"true",label:"Enabled",description:"Allow network access in sandbox"}];return c.jsxs("div",{className:`cmd-bar${J?" drag-over":""}`,onDragOver:Ee,onDragLeave:Re,onDrop:Ae,children:[Te&&!P&&c.jsx(zv,{commands:pe,selectedIndex:je,onSelect:Fe,onHover:ce}),Te&&P==="sandbox"&&c.jsx(ba,{title:"Sandbox Mode",options:pr,currentValue:Ut.sandboxMode,onSelect:be,onClose:()=>q(void 0)}),Te&&P==="websearch"&&c.jsx(ba,{title:"Web Search",options:It,currentValue:Ut.webSearchMode,onSelect:be,onClose:()=>q(void 0)}),Te&&P==="network"&&c.jsx(ba,{title:"Network Access",options:pn,currentValue:Ut.networkAccessEnabled===!0?"true":"false",onSelect:be,onClose:()=>q(void 0)}),X&&c.jsx($v,{filter:Y,onSelect:fn,onClose:()=>{$(!1),i("")}}),N.length>0&&c.jsx("div",{className:"skill-badges",children:N.map(b=>c.jsxs("span",{className:"skill-badge",children:["$",b.name,c.jsx("button",{className:"skill-badge-remove",onClick:()=>A(he=>he.filter(We=>We.id!==b.id)),children:"×"})]},b.id))}),Z.length>0&&c.jsx("div",{className:"attachment-preview-area",children:Z.map(b=>c.jsxs("div",{className:"attachment-chip",title:b.name,children:[b.previewUrl?c.jsx("img",{src:b.previewUrl,alt:b.name,className:"attachment-thumb",onClick:()=>fe(b),style:{cursor:"pointer"}}):c.jsx(Of,{size:20,className:"attachment-file-icon"}),c.jsxs("div",{className:"attachment-info",children:[c.jsx("span",{className:"attachment-name",children:b.name}),c.jsx("span",{className:"attachment-size",children:Nf(b.size)})]}),c.jsx("button",{className:"attachment-remove",onClick:()=>Ne(b.id),title:"Remove attachment",children:c.jsx(fr,{size:14})})]},b.id))}),z&&!w&&!M&&c.jsx("input",{ref:a,type:"file",multiple:!0,accept:"image/*,application/pdf,text/*,.ts,.js,.tsx,.jsx,.py,.go,.rs,.java,.c,.cpp,.h,.css,.html,.xml,.yml,.yaml,.toml,.ini,.sh,.sql",style:{display:"none"},onChange:b=>{ye(b.target.files),b.target.value=""}}),c.jsxs("div",{className:"cmd-input-row",children:[z&&!w&&!M&&c.jsx("button",{className:"attachment-clip-btn",onClick:()=>{var b;return(b=a.current)==null?void 0:b.click()},title:"Attach files",disabled:w,children:c.jsx(qm,{size:16})}),c.jsx("textarea",{ref:l,className:"cmd-textarea",placeholder:M?"Select or create a session…":w?"Agent is running…":"Type a message… Use / for commands",autoComplete:"off",value:s,disabled:w||M,rows:1,style:{minHeight:bi,maxHeight:hl},onChange:He,onKeyDown:Un,onPaste:Be}),w?c.jsx("button",{className:"cmd-stop-btn",onClick:()=>f(),title:"Stop (Esc)",children:c.jsx(Wi,{size:15})}):c.jsx("button",{className:"cmd-send-btn",onClick:dn,disabled:!s.trim()||M,title:"Send (⌘↵)",children:c.jsx(Lm,{size:16})})]}),re&&c.jsx("div",{className:"image-preview-modal",onClick:()=>fe(null),children:c.jsxs("div",{className:"image-preview-content",onClick:b=>b.stopPropagation(),children:[c.jsx("img",{src:re.previewUrl,alt:re.name}),c.jsxs("div",{className:"image-preview-info",children:[c.jsx("span",{children:re.name}),c.jsx("span",{children:Nf(re.size)})]}),c.jsx("button",{className:"image-preview-close",onClick:()=>fe(null),children:c.jsx(fr,{size:20})})]})})]})}function Gv(){const s=K(E=>E.activeSessionId),i=K(E=>E.sessionDetails),l=K(E=>E.activeTurnIndex),a=K(E=>E.setActiveTurnIndex),d=K(E=>E.rewindToTurn),f=K(E=>E.restoreSession),h=K(E=>E.branchFromTurn),m=s?i[s]:null,y=(m==null?void 0:m.turns)??[],g=(m==null?void 0:m.is_running)===1,k=!!(m!=null&&m.rewound_at_turn_id),[S,w]=D.useState(null),M=D.useRef(null);if(tu(M,()=>w(null),!!S),nu(()=>w(null),!!S),y.length===0)return c.jsx("div",{className:"empty-state",children:"No turns yet"});function I(E){a(E),requestAnimationFrame(()=>{var z;(z=document.getElementById(`turn-${E}`))==null||z.scrollIntoView({behavior:"smooth",block:"start"})})}return c.jsxs("div",{className:"right-section",children:[c.jsx("div",{className:"right-section-title",children:"Conversation"}),y.map((E,z)=>{const Z=z===l,Q=E.user_prompt.length>50?E.user_prompt.slice(0,50)+"…":E.user_prompt,J=E.status==="running"||E.status==="pending";return c.jsx("div",{children:c.jsxs("div",{className:`turn-item ${Z?"active":""}`,onClick:()=>I(z),onContextMenu:O=>{O.preventDefault(),w({x:O.clientX,y:O.clientY,turnId:E.id,turnIndex:z,isLast:z===y.length-1,isSlashCommand:E.user_prompt.trimStart().startsWith("/")})},children:[c.jsx("span",{className:"turn-item-icon",style:{background:"var(--amber)",color:"#fff"},children:c.jsx(tg,{size:12})}),c.jsx("span",{className:"turn-item-label",children:Q}),J&&c.jsx("span",{className:"turn-item-status",children:"running…"})]})},E.id)}),S&&c.jsxs("div",{ref:M,className:"ctx-menu",style:{position:"fixed",left:S.x,top:S.y,zIndex:500},children:[c.jsxs("div",{className:`ctx-menu-item ${S.isLast||g||S.isSlashCommand?"ctx-disabled":""}`,onClick:()=>{S.isLast||g||S.isSlashCommand||(window.confirm("Rewind to this turn? Hidden turns can be restored later.")&&d(s,S.turnId),w(null))},children:[c.jsx(Xm,{size:12})," Rewind to Here",S.isSlashCommand?" (slash command)":""]}),k&&c.jsxs("div",{className:"ctx-menu-item",onClick:()=>{f(s),w(null)},children:[c.jsx(iu,{size:12})," Restore Rewind"]}),c.jsxs("div",{className:"ctx-menu-item",onClick:()=>{h(s,S.turnId),w(null)},children:[c.jsx(Om,{size:12})," Branch from Here"]})]})]})}function Qv(){const{activeSessionId:s,sessionDetails:i,changesScope:l,setChangesScope:a,activeTurnIndex:d,setSelectedChangePath:f}=K(),h=s?i[s]:null,m=(h==null?void 0:h.turns)??[],y=np(m,l,d);return c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"changes-scope-toggle",children:[c.jsx("button",{className:`scope-btn ${l==="session"?"active":""}`,onClick:()=>a("session"),children:"Session"}),c.jsx("button",{className:`scope-btn ${l==="turngroup"?"active":""}`,onClick:()=>a("turngroup"),children:"Current Turn"})]}),y.length===0?c.jsx("div",{className:"empty-state",children:"No file changes in this scope"}):c.jsxs("div",{className:"right-section",children:[c.jsxs("div",{className:"right-section-title",children:["Changed Files (",y.length,")"]}),y.map(g=>{const k=g.kind==="add"?"fc-add":g.kind==="delete"?"fc-del":"fc-mod",S=g.kind==="add"?"A":g.kind==="delete"?"D":"M",w=g.path.split("/").pop()||g.path,M=g.path.replace("/"+w,"");return c.jsxs("div",{className:"file-change clickable",onClick:()=>f(g.path),children:[c.jsx("span",{className:`fc-status ${k}`,children:S}),c.jsxs("span",{className:"fc-name",children:[M&&c.jsxs("span",{style:{color:"var(--text-muted)"},children:[M,"/"]}),w]})]},g.path)})]})]})}const Cf=2e4;function qv(s){const i=[];return s.forEach((l,a)=>{var d;for(const f of l.items)if(f.type==="background_task"){if((((d=f.data)==null?void 0:d.task_type)||"unknown")==="local_agent")continue;i.push({item:f,turnIndex:a,turnPrompt:l.user_prompt})}}),i}function Kv({entry:s}){const{item:i,turnIndex:l,turnPrompt:a}=s,d=i.data||{},f=d.task_type||"unknown",h=d.subagent_type||null,m=d.description||"",y=d.status||"running",g=d.summary||null,k=d.last_tool_name||null,S=d.token_count||null,w=d.output||"",M=i.status==="in_progress",I=f==="local_agent",E=f==="local_bash",z=I?Ba:E?Ff:zf,Z=I?`Subagent${h?`: ${h}`:""}`:E?"Monitor":"Background Task",Q=y==="running"?"running…":y==="completed"?"done":y==="failed"?"failed":y==="stopped"?"stopped":y,J=i.status==="failed"||y==="failed",[O,re]=D.useState(M),[fe,oe]=D.useState(!1),ae=D.useRef(null);D.useEffect(()=>{M&&re(!0)},[M]),D.useEffect(()=>{O&&M&&ae.current&&(ae.current.scrollTop=ae.current.scrollHeight)},[O,M,w]);const Te=w.length>Cf,te=Te&&!fe?w.slice(0,Cf)+`
|
|
357
|
-
… (truncated, click to expand)`:w,ve=M?null:y==="completed"?c.jsx(yl,{size:12}):J?c.jsx(lu,{size:12}):c.jsx(Wi,{size:12});return c.jsxs("div",{className:`task-card ${M?"task-running":""} ${J?"task-failed":""}`,children:[c.jsxs("div",{className:"task-card-header",onClick:()=>re(_e=>!_e),style:{cursor:"pointer"},children:[c.jsx("span",{className:"task-card-icon",children:c.jsx(z,{size:14})}),c.jsx("span",{className:"task-card-type",children:Z}),c.jsxs("span",{className:`task-card-status ${J?"task-status-failed":M?"task-status-running":"task-status-done"}`,children:[ve," ",Q]}),c.jsx(su,{size:14,className:"task-card-chevron",style:{transform:O?"rotate(90deg)":"none",marginLeft:"auto"}})]}),m&&c.jsx("div",{className:"task-card-desc",children:m}),M&&k&&c.jsxs("div",{className:"task-card-meta",children:["last tool: ",k,S!=null&&` · ${S.toLocaleString()} tokens`]}),O&&c.jsxs("div",{className:"task-card-body",children:[w?c.jsxs(c.Fragment,{children:[c.jsx("pre",{className:"cmd-output task-output",ref:ae,children:c.jsx("code",{children:te})}),Te&&c.jsx("button",{className:"cmd-output-toggle",onClick:()=>oe(_e=>!_e),children:fe?"Show less":`Show full output (${(w.length/1024).toFixed(0)}KB)`})]}):g?c.jsx("pre",{className:"cmd-output task-output",children:c.jsx("code",{children:g})}):M?c.jsx("div",{className:"task-card-placeholder",children:"Waiting for output…"}):c.jsx("div",{className:"task-card-placeholder",children:"No output captured."}),c.jsxs("div",{className:"task-card-context",title:a,children:["from turn ",l+1,": ",a.length>60?a.slice(0,60)+"…":a]})]})]})}const Yv=D.memo(Kv);function Xv(){var g,k;const s=K(S=>S.activeSessionId),i=K(S=>S.sessionDetails),l=s?i[s]:null,a=(l==null?void 0:l.turns)??[],d=(l==null?void 0:l.backgroundTasks)??[],f=qv(a),h=[...f].sort((S,w)=>{const M=S.item.status==="in_progress",I=w.item.status==="in_progress";return M&&!I?-1:!M&&I?1:w.turnIndex-S.turnIndex}),m=new Map;for(const S of d)S.task_type==="local_bash"&&m.set(S.task_id,S.task_type);for(const S of f)if(S.item.status==="in_progress"){const w=((g=S.item.data)==null?void 0:g.task_id)??S.item.external_item_id,M=((k=S.item.data)==null?void 0:k.task_type)??"unknown";m.set(w,M)}const y=[...m.values()].filter(S=>S==="local_bash").length;return f.length===0?c.jsx("div",{className:"empty-state",children:"No background tasks yet"}):c.jsxs("div",{className:"right-section",children:[c.jsxs("div",{className:"right-section-title",children:["Background Tasks (",f.length,")",y>0&&c.jsxs("span",{className:"task-count-badge",style:{color:"var(--amber)"},children:[" ",y," running"]})]}),h.map(S=>c.jsx(Yv,{entry:S},S.item.id))]})}const Zv=D.memo(Xv);Ie.setOptions({breaks:!0,gfm:!0});function Jv(s){const i=Ie.parse(s);return vu.sanitize(i)}function ey(s){var i;return(i=s.data)!=null&&i.text?s.data.text:""}function ty(s){const i=s.match(/^\[Quoting from your previous response\]:\n> .*\n\n([\s\S]*)$/);return i?i[1]:s}function ny({turn:s}){const i=s.items.filter(a=>a.type==="agent_message"),l=ty(s.user_prompt);return c.jsxs("div",{className:"thread-card-turn",children:[c.jsx("div",{className:"thread-card-user-message",children:l}),i.map(a=>c.jsx("div",{className:"thread-card-ai-response",dangerouslySetInnerHTML:{__html:Jv(ey(a))}},a.id)),s.items.length===0&&(s.status==="pending"||s.status==="running")&&c.jsx("div",{className:"thread-card-pending",children:s.status==="running"?"AI is responding…":"Waiting…"})]})}function ry({thread:s,isRunning:i,threadTurns:l,onResolve:a,onReopen:d,onDelete:f,onFollowup:h,onLocate:m}){const[y,g]=D.useState(""),[k,S]=D.useState(!0),w=D.useRef(null),M=D.useRef(null),[I,E]=D.useState(!1),[z,Z]=D.useState({x:0,y:0}),[Q,J]=D.useState(""),O=28,re=120;D.useEffect(()=>{const te=M.current;te&&(te.scrollTop=te.scrollHeight)},[l.length,k]);function fe(){const te=w.current;te&&(te.style.height="auto",te.style.height=Math.min(te.scrollHeight,re)+"px")}const oe=D.useCallback(()=>{E(!1)},[]),ae=D.useCallback(()=>{const te=M.current;if(!te)return;const ve=window.getSelection();if(!ve||ve.rangeCount===0||ve.isCollapsed){E(!1);return}const _e=ve.getRangeAt(0);if(!te.contains(_e.commonAncestorContainer)){E(!1);return}const je=_e.commonAncestorContainer.nodeType===Node.TEXT_NODE?_e.commonAncestorContainer.parentElement:_e.commonAncestorContainer;if(!(je!=null&&je.closest(".thread-card-ai-response"))){E(!1);return}const ce=ve.toString();if(!ce.trim()){E(!1);return}const P=_e.getBoundingClientRect(),q=28,X=6,$=170;let Y=!1;if(ve.anchorNode&&ve.focusNode)try{const A=document.createRange();A.setStart(ve.focusNode,ve.focusOffset),A.setEnd(ve.focusNode,ve.focusOffset);const pe=document.createRange();pe.setStart(ve.anchorNode,ve.anchorOffset),pe.setEnd(ve.anchorNode,ve.anchorOffset),Y=pe.compareBoundaryPoints(Range.START_TO_START,A)>0}catch{Y=!1}let H=P.top-q-X;H<8&&(H=P.bottom+X);let N=Y?P.left-$:P.right;N=Math.max(8,Math.min(N,window.innerWidth-$-8)),Z({x:N,y:H}),J(ce),E(!0)},[]);D.useEffect(()=>{function te(ve){const _e=ve.target;_e&&_e.closest(".selection-actions")||ae()}return document.addEventListener("mouseup",te),()=>document.removeEventListener("mouseup",te)},[ae]);const Te=D.useCallback(()=>{var ve;const te=`
|
|
358
|
-
\`\`\`QUOTE
|
|
359
|
-
${Q}
|
|
360
|
-
\`\`\`
|
|
361
|
-
|
|
362
|
-
`;g(_e=>_e+te),E(!1),J(""),(ve=window.getSelection())==null||ve.removeAllRanges(),setTimeout(()=>{if(w.current){w.current.style.height="auto",w.current.style.height=Math.min(w.current.scrollHeight,re)+"px",w.current.focus();const _e=w.current.value.length;w.current.setSelectionRange(_e,_e)}},0)},[Q]);return c.jsxs("div",{className:`thread-card ${s.status==="resolved"?"thread-resolved":""}`,id:`thread-${s.id}`,children:[c.jsxs("div",{className:"thread-card-header",onClick:()=>S(te=>!te),children:[c.jsxs("div",{className:"thread-card-quote",children:["“",s.selected_text.slice(0,100),s.selected_text.length>100?"…":"","”"]}),c.jsxs("div",{className:"thread-card-header-right",children:[c.jsx("button",{className:"thread-locate-btn",onClick:te=>{te.stopPropagation(),m()},title:"Scroll to text",children:c.jsx(Qm,{size:12})}),c.jsx("span",{className:`thread-status-badge ${s.status==="open"?"thread-status-open":"thread-status-resolved"}`,children:s.status==="open"?"Open":"Resolved"})]})]}),k&&c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"thread-card-conversation",ref:M,onMouseDown:oe,children:[l.map(te=>c.jsx(ny,{turn:te},te.id)),l.length===0&&c.jsx("div",{className:"thread-card-placeholder",children:"No messages yet."})]}),I&&c.jsx("div",{className:"selection-actions",style:{left:z.x,top:z.y},children:c.jsxs("button",{className:"discuss-button",onClick:Te,title:"Quote this text in your follow-up",children:[c.jsx($f,{size:14}),c.jsx("span",{children:"Quote"})]})}),s.status==="open"&&c.jsxs("div",{className:"thread-card-followup",children:[c.jsx("textarea",{ref:w,className:"thread-card-followup-input",placeholder:i?"Agent is running…":"Type a follow-up…",value:y,onChange:te=>{g(te.target.value),fe()},disabled:i,rows:1,style:{minHeight:O,maxHeight:re},onKeyDown:te=>{te.key==="Enter"&&(te.metaKey||te.ctrlKey)&&!i&&y.trim()&&(te.preventDefault(),h(y.trim()),g(""),w.current&&(w.current.style.height=O+"px"))}}),c.jsx("button",{className:"thread-card-followup-send",disabled:i||!y.trim(),onClick:()=>{h(y.trim()),g("")},children:c.jsx(ou,{size:13})})]}),c.jsxs("div",{className:"thread-card-actions",children:[s.status==="open"?c.jsxs("button",{className:"thread-action-btn",onClick:a,title:"Resolve thread",children:[c.jsx(bf,{size:13})," Resolve"]}):c.jsxs("button",{className:"thread-action-btn",onClick:d,title:"Reopen thread",children:[c.jsx(iu,{size:13})," Reopen"]}),c.jsxs("button",{className:"thread-action-btn thread-action-danger",onClick:f,title:"Delete thread",children:[c.jsx(kl,{size:13})," Delete"]})]})]})]})}function sy(){const{activeSessionId:s,sessionDetails:i,followupThread:l,resolveThread:a,reopenThread:d,deleteThread:f,activeRightTab:h,switchRightTab:m}=K(),[y,g]=D.useState("open"),k=s?i[s]:null,S=(k==null?void 0:k.threads)??[],w=(k==null?void 0:k.turns)??[],M=(k==null?void 0:k.is_running)===1,I=S.filter(Q=>y==="open"?Q.status==="open":y==="resolved"?Q.status==="resolved":!0),E=S.filter(Q=>Q.status==="open").length,z=S.filter(Q=>Q.status==="resolved").length;function Z(Q){h==="changes"&&m("turns"),setTimeout(()=>{const J=document.querySelector(`mark[data-thread-id="${Q}"]`);J&&(J.scrollIntoView({behavior:"smooth",block:"center"}),J.classList.add("thread-mark-flash"),setTimeout(()=>J.classList.remove("thread-mark-flash"),1500))},h==="changes"?150:50)}return s?S.length===0?c.jsxs("div",{className:"empty-state",children:[c.jsx(Vm,{size:24,style:{opacity:.3,marginBottom:8}}),c.jsx("div",{children:"No threads yet."}),c.jsx("div",{style:{fontSize:"11px",marginTop:"4px"},children:"Select text in an agent response to start a discussion."})]}):c.jsxs("div",{children:[c.jsxs("div",{className:"thread-filter-tabs",children:[c.jsxs("button",{className:`thread-filter-tab ${y==="open"?"active":""}`,onClick:()=>g("open"),children:["Open (",E,")"]}),c.jsxs("button",{className:`thread-filter-tab ${y==="resolved"?"active":""}`,onClick:()=>g("resolved"),children:["Resolved (",z,")"]}),c.jsxs("button",{className:`thread-filter-tab ${y==="all"?"active":""}`,onClick:()=>g("all"),children:["All (",S.length,")"]})]}),I.length===0?c.jsxs("div",{className:"empty-state",style:{padding:"20px 0"},children:["No ",y," threads."]}):I.map(Q=>c.jsx(ry,{thread:Q,isRunning:M,threadTurns:w.filter(J=>J.thread_id===Q.id),onResolve:()=>a(s,Q.id),onReopen:()=>d(s,Q.id),onDelete:()=>f(s,Q.id),onFollowup:J=>l(s,Q.id,J),onLocate:()=>Z(Q.id)},Q.id))]}):c.jsx("div",{className:"empty-state",children:"No session selected"})}function ly(){var y,g;const{activeRightTab:s,switchRightTab:i,activeSessionId:l,sessionDetails:a}=K(),d=l?a[l]:null,f=((y=d==null?void 0:d.backgroundTasks)==null?void 0:y.length)??0,h=((g=d==null?void 0:d.threads)==null?void 0:g.filter(k=>k.status==="open").length)??0,m=[{id:"turns",label:"Turns"},{id:"changes",label:"Changes"},{id:"tasks",label:"Tasks",badge:f||void 0},{id:"threads",label:"Threads",badge:h||void 0}];return c.jsxs("div",{className:"ide-right",children:[c.jsx("div",{className:"right-tabs",children:m.map(k=>c.jsxs("div",{className:`right-tab ${s===k.id?"active":""}`,onClick:()=>i(k.id),children:[k.label,k.badge?c.jsx("span",{className:"right-tab-badge",children:k.badge}):null]},k.id))}),c.jsxs("div",{className:"right-content",children:[s==="turns"&&c.jsx(Gv,{}),s==="changes"&&c.jsx(Qv,{}),s==="tasks"&&c.jsx(Zv,{}),s==="threads"&&c.jsx(sy,{})]})]})}const xe={low:{effort:"low",label:"Low"},medium:{effort:"medium",label:"Medium"},high:{effort:"high",label:"High"},xhigh:{effort:"xhigh",label:"Extra High"},max:{effort:"max",label:"Max"},ultra:{effort:"ultra",label:"Ultra"}},Ka=[{id:"codex",label:"Codex",available:!0,models:[{slug:"gpt-5.6-sol",displayName:"GPT-5.6-Sol",description:"Flagship — complex, open-ended work",defaultReasoning:"low",reasoningLevels:[xe.low,xe.medium,xe.high,xe.xhigh,xe.max,xe.ultra]},{slug:"gpt-5.6-terra",displayName:"GPT-5.6-Terra",description:"Balanced all-rounder for everyday work",defaultReasoning:"medium",reasoningLevels:[xe.low,xe.medium,xe.high,xe.xhigh,xe.max,xe.ultra]},{slug:"gpt-5.6-luna",displayName:"GPT-5.6-Luna",description:"Fast, affordable — clear, repeatable tasks",defaultReasoning:"medium",reasoningLevels:[xe.low,xe.medium,xe.high,xe.xhigh,xe.max]},{slug:"gpt-5.5",displayName:"GPT-5.5",description:"Previous-gen frontier model",defaultReasoning:"medium",reasoningLevels:[xe.low,xe.medium,xe.high,xe.xhigh]}]},{id:"claude",label:"Claude",available:!0,models:[{slug:"claude-sonnet-5",displayName:"Claude Sonnet 5",description:"Balanced all-rounder for everyday work",defaultReasoning:"medium",reasoningLevels:[xe.low,xe.medium,xe.high,xe.xhigh,xe.max]},{slug:"claude-opus-5",displayName:"Claude Opus 5",description:"Deep reasoning for complex tasks",defaultReasoning:"medium",reasoningLevels:[xe.low,xe.medium,xe.high,xe.xhigh,xe.max]},{slug:"claude-fable-5",displayName:"Claude Fable 5",description:"Fast and efficient for simple tasks",defaultReasoning:"medium",reasoningLevels:[xe.low,xe.medium,xe.high,xe.xhigh,xe.max]}]},{id:"repoburg",label:"Repoburg",available:!0,models:[{slug:"ollama/glm-5.3:cloud",displayName:"GLM-5.3",description:"Ollama Cloud",defaultReasoning:"medium",reasoningLevels:[xe.low,xe.medium,xe.high]},{slug:"ollama/glm-5.3-flash:cloud",displayName:"GLM-5.3 Flash",description:"Ollama Cloud — fast",defaultReasoning:"medium",reasoningLevels:[xe.low,xe.medium,xe.high]},{slug:"ollama/minimax-m3:cloud",displayName:"MiniMax M3",description:"Ollama Cloud",defaultReasoning:"medium",reasoningLevels:[xe.low,xe.medium,xe.high]},{slug:"ollama/deepseek-v4-pro:cloud",displayName:"DeepSeek V4 Pro",description:"Ollama Cloud",defaultReasoning:"medium",reasoningLevels:[xe.low,xe.medium,xe.high]}]}];function iy(s){return Ka.find(i=>i.id===s)}function yu(s){const i=iy(s);return(i==null?void 0:i.models)??[]}function rp(s,i){return yu(s).find(l=>l.slug===i)}function Ya(s,i){var l;return((l=rp(s,i))==null?void 0:l.reasoningLevels)??[]}function Xa(s,i){var l;return(l=rp(s,i))==null?void 0:l.defaultReasoning}function oy(){const{activeSessionId:s,sessions:i,updateModelConfig:l}=K(),a=K(P=>P.showModelSelector),d=K(P=>P.setShowModelSelector),f=i.find(P=>P.id===s),h=K(P=>P.models),m=K(P=>P.modelsLoading),y=K(P=>P.loadModels),[g,k]=D.useState(!1),S=D.useRef(null);if(tu(S,()=>k(!1),g),nu(()=>k(!1),g),D.useEffect(()=>{a&&(k(!0),d(!1))},[a,d]),D.useEffect(()=>{f!=null&&f.runtime_type&&y(f.runtime_type)},[f==null?void 0:f.runtime_type,y]),!f)return null;const w=f.runtime_type,M=f.model??"",I=f.model_reasoning_effort??"",E=h.length>0?h:[],z=yu(w),Q=[...E.length>0?E:z];if(M&&!Q.some(P=>P.slug===M)){const P=z[0];Q.unshift({slug:M,displayName:M,description:"Custom model",defaultReasoning:(P==null?void 0:P.defaultReasoning)??"medium",reasoningLevels:(P==null?void 0:P.reasoningLevels)??[]})}function J(P){return Q.find(q=>q.slug===P)}function O(P){var q;return E.length>0?((q=J(P))==null?void 0:q.reasoningLevels)??[]:Ya(w,P)}function re(P){var q;return E.length>0?(q=J(P))==null?void 0:q.defaultReasoning:Xa(w,P)}const fe=Ka.find(P=>P.id===w),oe=J(M),ae=M?O(M):[],Te=(fe==null?void 0:fe.label)??w,te=(oe==null?void 0:oe.displayName)??(M||"Default"),ve=ae.find(P=>P.effort===I),_e=(ve==null?void 0:ve.label)??(I||"Default");function je(P){var Y;const q=O(P),$=q.some(H=>H.effort===I)?I:re(P)??((Y=q[0])==null?void 0:Y.effort)??"";l(P,$),k(!1)}function ce(P){l(M,P),k(!1)}return c.jsxs("div",{className:"model-selector",ref:S,children:[c.jsxs("button",{className:"model-selector-btn",onClick:()=>k(!g),title:"Change model and thinking level",children:[c.jsx("span",{className:"model-selector-provider",children:Te}),c.jsx("span",{className:"model-selector-sep",children:"›"}),c.jsx("span",{className:"model-selector-model",children:te}),_e!=="Default"&&c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"model-selector-sep",children:"›"}),c.jsx("span",{className:"model-selector-reasoning",children:_e})]}),c.jsx(Wa,{size:12,className:"model-selector-chevron"})]}),g&&c.jsxs("div",{className:"model-selector-popover",children:[c.jsxs("div",{className:"model-selector-column",children:[c.jsx("div",{className:"model-selector-col-header",children:"Provider"}),Ka.map(P=>c.jsxs("div",{className:`model-selector-item ${P.id===w?"selected":""} ${P.available?"":"disabled"}`,onClick:()=>{if(P.available){if(P.id===w){k(!1);return}l("","",P.id)}},children:[c.jsx("span",{children:P.label}),!P.available&&c.jsxs("span",{className:"model-selector-coming-soon",children:[c.jsx(Wm,{size:10})," Soon"]}),P.id===w&&c.jsx(yl,{size:12})]},P.id))]}),c.jsxs("div",{className:"model-selector-column",children:[c.jsx("div",{className:"model-selector-col-header",children:"Model"}),m&&c.jsx("div",{className:"model-selector-empty",children:"Loading models…"}),!m&&Q.length===0&&c.jsx("div",{className:"model-selector-empty",children:"No models available"}),Q.map(P=>c.jsxs("div",{className:`model-selector-item ${P.slug===M?"selected":""}`,onClick:()=>je(P.slug),children:[c.jsxs("div",{className:"model-selector-item-main",children:[c.jsx("span",{className:"model-selector-item-name",children:P.displayName}),c.jsx("span",{className:"model-selector-item-desc",children:P.description})]}),P.slug===M&&c.jsx(yl,{size:12})]},P.slug))]}),c.jsxs("div",{className:"model-selector-column",children:[c.jsx("div",{className:"model-selector-col-header",children:"Thinking"}),ae.length===0&&c.jsx("div",{className:"model-selector-empty",children:"Select a model first"}),ae.map(P=>c.jsxs("div",{className:`model-selector-item ${P.effort===I?"selected":""}`,onClick:()=>ce(P.effort),children:[c.jsx("span",{children:P.label}),P.effort===I&&c.jsx(yl,{size:12})]},P.effort))]})]})]})}function ay(s,i){if(!s||s.turns.length===0)return"—";const l=s.turns[0],a=s.turns[s.turns.length-1],d=i?null:a.updated_at;return _m(l.created_at,d)}function zi(s){return s>=1e6?`${(s/1e6).toFixed(s%1e6===0?0:1)}M`:s>=1e3?`${Math.round(s/1e3)}K`:String(s)}function uy(){var w,M;const s=K(I=>I.activeSessionId),i=K(I=>s?I.sessions.find(E=>E.id===s)??null:null),l=K(I=>s?I.sessionDetails[s]??null:null),a=K(I=>I.wsConnected),d=K(I=>I.switchRightTab),f=(l==null?void 0:l.contextUsage)??null;if(!i)return c.jsxs("div",{className:"ide-statusbar",children:[c.jsxs("div",{className:"sb-item",children:[c.jsx(Xd,{size:14})," AgentPane"]}),c.jsx("div",{className:"sb-divider",children:"|"}),c.jsxs("div",{className:"sb-item",title:a?"WebSocket connected":"WebSocket disconnected",children:[c.jsx("span",{className:`status-dot ${a?"done":"error"}`}),a?"Live":"Offline"]}),c.jsx("div",{className:"sb-spacer"}),c.jsxs("div",{className:"sb-item",children:[c.jsx(Yd,{size:14})," K"]})]});const h=eu(i),m=ay(l,h.isRunning),y=(l==null?void 0:l.backgroundTasks)??[],g=new Set,k=new Map;for(const I of y)g.add(I.task_id),k.set(I.task_id,I.task_type);for(const I of(l==null?void 0:l.turns)??[])for(const E of I.items)if(E.type==="background_task"&&E.status==="in_progress"){const z=((w=E.data)==null?void 0:w.task_id)??E.external_item_id,Z=((M=E.data)==null?void 0:M.task_type)??"unknown";g.add(z),k.set(z,Z)}const S=[...k.values()].filter(I=>I==="local_bash").length;return c.jsxs("div",{className:"ide-statusbar",children:[c.jsxs("div",{className:"sb-item",children:[c.jsx(Xd,{size:14})," AgentPane"]}),c.jsx("div",{className:"sb-divider",children:"|"}),c.jsx(oy,{}),S>0&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"sb-divider",children:"|"}),c.jsxs("div",{className:"sb-item",style:{color:"var(--amber)",cursor:"pointer"},title:`${S} Monitor task${S>1?"s":""} running — click to view`,onClick:()=>d("tasks"),children:[c.jsx(Uf,{size:14})," ",S]})]}),c.jsx("div",{className:"sb-spacer"}),c.jsxs("div",{className:"sb-item",title:a?"WebSocket connected":"WebSocket disconnected",children:[c.jsx("span",{className:`status-dot ${a?"done":"error"}`}),a?"Live":"Offline"]}),c.jsx("div",{className:"sb-divider",children:"|"}),c.jsxs("div",{className:"sb-item",style:i.status==="failed"?{color:"var(--red)"}:void 0,children:[c.jsx(ru,{status:h.dot})," ",h.label]}),f&&c.jsx(cy,{usage:f}),c.jsx("div",{className:"sb-divider",children:"|"}),c.jsx("div",{className:"sb-item",children:m}),c.jsx("div",{className:"sb-divider",children:"|"}),c.jsxs("div",{className:"sb-item",children:[c.jsx(Yd,{size:14})," K"]})]})}function cy({usage:s}){const i=s.percentage>=85?"var(--red)":s.percentage>=60?"var(--amber)":"var(--green)",l=`${zi(s.totalTokens)} / ${zi(s.contextWindow)} tokens`;return c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"sb-divider",children:"|"}),c.jsx("div",{className:"sb-context",title:l,children:c.jsxs("span",{className:"sb-context-text",style:{color:i},children:[Math.round(s.percentage),"% / ",zi(s.totalTokens)," / ",zi(s.contextWindow)]})})]})}function dy({side:s,minWidth:i,maxWidth:l,getWidth:a,setWidth:d}){const[f,h]=D.useState(!1),m=D.useRef(0),y=D.useRef(0),g=D.useCallback(w=>{const M=w.clientX-m.current,I=s==="left"?y.current+M:y.current-M,E=Math.min(l,Math.max(i,I));d(E)},[s,i,l,d]),k=D.useCallback(()=>{window.removeEventListener("pointermove",g),window.removeEventListener("pointerup",k),document.body.classList.remove("is-resizing"),h(!1)},[g]);return{onPointerDown:D.useCallback(w=>{w.preventDefault(),w.stopPropagation(),m.current=w.clientX,y.current=a(),h(!0),document.body.classList.add("is-resizing"),window.addEventListener("pointermove",g),window.addEventListener("pointerup",k)},[a,g,k]),dragging:f}}function jf({side:s,minWidth:i,maxWidth:l,getWidth:a,setWidth:d}){const{onPointerDown:f,dragging:h}=dy({side:s,minWidth:i,maxWidth:l,getWidth:a,setWidth:d});return c.jsx("div",{className:`resize-handle ${s}${h?" dragging":""}`,onPointerDown:f,role:"separator","aria-orientation":"vertical","aria-label":`Resize ${s} panel`,"data-resizing":h?"":void 0})}function fy(){const s=K(f=>f.sidebarWidth),i=K(f=>f.rightPanelWidth),l=K(f=>f.setSidebarWidth),a=K(f=>f.setRightPanelWidth),d=`${s}px 6px 1fr 6px ${i}px`;return c.jsxs("div",{className:"ide-root",children:[c.jsxs("div",{className:"ide-layout",style:{gridTemplateColumns:d},children:[c.jsx(sg,{}),c.jsx(jf,{side:"left",minWidth:Oa,maxWidth:$a,getWidth:()=>K.getState().sidebarWidth,setWidth:l}),c.jsxs("div",{className:"ide-center",children:[c.jsx(lg,{}),c.jsx("div",{className:"ide-render",children:c.jsx(Dv,{})}),c.jsx(Vv,{})]}),c.jsx(jf,{side:"right",minWidth:Fa,maxWidth:Ua,getWidth:()=>K.getState().rightPanelWidth,setWidth:a}),c.jsx(ly,{})]}),c.jsx(uy,{})]})}function py(){const{showNewSessionDialog:s,setShowNewSessionDialog:i,createSession:l,lastModelConfig:a}=K(),d=(a==null?void 0:a.provider)??"codex",f=(a==null?void 0:a.model)??"",h=(a==null?void 0:a.reasoning)??"",[m,y]=D.useState(""),[g,k]=D.useState(f),[S,w]=D.useState(h),[M,I]=D.useState("");if(!s)return null;const E=yu(d),z=g?Ya(d,g):[];function Z(){l({title:m.trim()||void 0,model:g||void 0,model_reasoning_effort:S||void 0,cwd:M.trim()||void 0,runtime_type:d}),y(""),I("")}function Q(O){O.key==="Escape"&&i(!1)}function J(O){var oe;k(O);const re=Ya(d,O);re.some(ae=>ae.effort===S)||w(Xa(d,O)??((oe=re[0])==null?void 0:oe.effort)??"")}return c.jsx("div",{className:"dialog-overlay",onClick:()=>i(!1),children:c.jsxs("div",{className:"dialog",onClick:O=>O.stopPropagation(),onKeyDown:Q,children:[c.jsxs("div",{className:"dialog-header",children:[c.jsx("span",{className:"dialog-title",children:"New Session"}),c.jsx("button",{className:"dialog-close",onClick:()=>i(!1),children:c.jsx(fr,{size:16})})]}),c.jsxs("div",{className:"dialog-body",children:[c.jsxs("label",{className:"dialog-label",children:["Title (optional)",c.jsx("input",{className:"dialog-input",type:"text",value:m,onChange:O=>y(O.target.value),placeholder:"e.g. refactor auth module",autoFocus:!0})]}),c.jsxs("label",{className:"dialog-label",children:["Model",c.jsxs("select",{className:"dialog-input dialog-select",value:g,onChange:O=>J(O.target.value),children:[c.jsx("option",{value:"",children:"Default (Codex picks)"}),E.map(O=>c.jsxs("option",{value:O.slug,children:[O.displayName," — ",O.description]},O.slug))]})]}),z.length>0&&c.jsxs("label",{className:"dialog-label",children:["Thinking Level",c.jsxs("select",{className:"dialog-input dialog-select",value:S,onChange:O=>w(O.target.value),children:[c.jsxs("option",{value:"",children:["Default (",Xa(d,g),")"]}),z.map(O=>c.jsx("option",{value:O.effort,children:O.label},O.effort))]})]}),c.jsxs("label",{className:"dialog-label",children:["Working Directory (optional)",c.jsx("input",{className:"dialog-input",type:"text",value:M,onChange:O=>I(O.target.value),placeholder:"e.g. /Users/me/projects/my-app"})]})]}),c.jsxs("div",{className:"dialog-footer",children:[c.jsx("button",{className:"dialog-btn-cancel",onClick:()=>i(!1),children:"Cancel"}),c.jsx("button",{className:"dialog-btn-create",onClick:Z,children:"Create"})]})]})})}function hy(){const s=K(S=>S.showCommandPalette),i=K(S=>S.setShowCommandPalette),l=K(),[a,d]=D.useState(""),[f,h]=D.useState(0),m=D.useRef(null),y=D.useMemo(()=>{const S=l.activeSessionId?l.sessionDetails[l.activeSessionId]:null,w=(S==null?void 0:S.is_running)===1;return[{id:"new-session",label:"New Session",hint:"Create a new Codex session",icon:xl,action:()=>l.setShowNewSessionDialog(!0),available:!0},{id:"delete-session",label:"Delete Session",hint:"Delete the active session",icon:kl,action:()=>{l.activeSessionId&&l.deleteSession(l.activeSessionId)},available:!!l.activeSessionId},{id:"send-message",label:"Send Message",hint:"Focus the message input",icon:ou,action:()=>{const M=document.querySelector(".cmd-input");M==null||M.focus()},available:!!l.activeSessionId&&!w},{id:"cancel-turn",label:"Cancel Turn",hint:"Cancel the running turn",icon:Wi,action:()=>l.cancelTurn(),available:w},{id:"tab-turns",label:"Switch to Turns Tab",hint:"View conversation timeline",icon:Bm,action:()=>l.switchRightTab("turns"),available:!!l.activeSessionId},{id:"tab-changes",label:"Switch to Changes Tab",hint:"View file changes",icon:Pm,action:()=>l.switchRightTab("changes"),available:!!l.activeSessionId},{id:"close-tab",label:"Close Tab",hint:"Close the active session tab",icon:fr,action:()=>{l.activeSessionId&&l.closeTab(l.activeSessionId)},available:!!l.activeSessionId}]},[l]),g=D.useMemo(()=>{const S=a.toLowerCase().trim(),w=y.filter(M=>M.available);return S?w.filter(M=>M.label.toLowerCase().includes(S)||M.hint.toLowerCase().includes(S)):w},[y,a]);D.useEffect(()=>{s&&(d(""),h(0),setTimeout(()=>{var S;return(S=m.current)==null?void 0:S.focus()},50))},[s]);function k(S){if(S.key==="ArrowDown")S.preventDefault(),h(w=>Math.min(w+1,g.length-1));else if(S.key==="ArrowUp")S.preventDefault(),h(w=>Math.max(w-1,0));else if(S.key==="Enter"){S.preventDefault();const w=g[f];w&&(w.action(),i(!1))}else S.key==="Escape"&&i(!1)}return s?c.jsx("div",{className:"palette-overlay",onClick:()=>i(!1),children:c.jsxs("div",{className:"palette",onClick:S=>S.stopPropagation(),children:[c.jsxs("div",{className:"palette-search",children:[c.jsx("input",{ref:m,type:"text",placeholder:"Type a command…",value:a,onChange:S=>{d(S.target.value),h(0)},onKeyDown:k}),c.jsx("span",{className:"palette-esc",children:"ESC"})]}),g.length===0?c.jsx("div",{className:"palette-empty",children:"No matching commands"}):c.jsx("div",{className:"palette-list",children:g.map((S,w)=>{const M=S.icon;return c.jsxs("div",{className:`palette-item ${w===f?"selected":""}`,onClick:()=>{S.action(),i(!1)},onMouseEnter:()=>h(w),children:[c.jsx("span",{className:"palette-item-icon",children:c.jsx(M,{size:16})}),c.jsx("span",{className:"palette-item-label",children:S.label}),c.jsx("span",{className:"palette-item-hint",children:S.hint}),w===f&&c.jsx(Dm,{size:12,className:"palette-item-enter"})]},S.id)})}),c.jsxs("div",{className:"palette-footer",children:[c.jsxs("span",{className:"palette-footer-hint",children:[c.jsx("span",{className:"kbd",children:"↑"}),c.jsx("span",{className:"kbd",children:"↓"})," Navigate"]}),c.jsxs("span",{className:"palette-footer-hint",children:[c.jsx("span",{className:"kbd",children:"↵"})," Select"]}),c.jsxs("span",{className:"palette-footer-hint",children:[c.jsx("span",{className:"kbd",children:"Esc"})," Close"]})]})]})}):null}const my={success:Am,error:lu,info:$m,warn:Jm},gy=4e3;function vy({toast:s}){const i=K(h=>h.removeToast),l=my[s.type],a=D.useRef(null);D.useEffect(()=>{function h(){a.current=setTimeout(()=>i(s.id),gy)}return h(),()=>{a.current&&clearTimeout(a.current)}},[s.id,i]);function d(){a.current&&(clearTimeout(a.current),a.current=null)}function f(){a.current=setTimeout(()=>i(s.id),2e3)}return c.jsxs("div",{className:`toast toast-${s.type}`,onMouseEnter:d,onMouseLeave:f,children:[c.jsx(l,{size:16}),c.jsx("span",{className:"toast-message",children:s.message}),s.undoAction&&c.jsxs("button",{className:"toast-undo",onClick:()=>{var h;(h=s.undoAction)==null||h.call(s),i(s.id)},children:[c.jsx(eg,{size:12})," ",s.undoLabel||"Undo"]}),c.jsx("button",{className:"toast-close",onClick:()=>i(s.id),children:c.jsx(fr,{size:14})})]})}function yy(){const s=K(i=>i.toasts);return s.length===0?null:c.jsx("div",{className:"toast-container",children:s.map(i=>c.jsx(vy,{toast:i},i.id))})}let tn=null,_s=null,Sl=1e3;const xy=1e4;function ky(){return`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`}function Za(){tn&&(tn.readyState===WebSocket.OPEN||tn.readyState===WebSocket.CONNECTING)||(tn=new WebSocket(ky()),tn.onopen=()=>{const s=Sl>1e3;if(Sl=1e3,K.getState().setWsConnected(!0),K.getState().addLogEntry("INFO","WebSocket connected"),s){const i=K.getState();i.activeSessionId&&(i.refreshActiveSession(),i.addToast("info","WebSocket reconnected — session state reconciled"))}},tn.onclose=()=>{K.getState().setWsConnected(!1),K.getState().addLogEntry("WARN","WebSocket disconnected"),K.getState().addToast("warn","WebSocket disconnected — reconnecting…"),Sy()},tn.onerror=()=>{},tn.onmessage=s=>{try{const i=JSON.parse(s.data),l=Ty[i.event];l&&l(i.data)}catch{}})}function wy(){_s&&(clearTimeout(_s),_s=null),tn&&(tn.onclose=null,tn.close(),tn=null),K.getState().setWsConnected(!1)}function Sy(){_s||(_s=window.setTimeout(()=>{_s=null,Za()},Sl),Sl=Math.min(Sl*2,xy))}const Ty={"turn:started":s=>{const i=s;K.getState().onTurnStarted(i.sessionId,i.turnId)},"item:started":s=>{const i=s;K.getState().onItemStarted(i.sessionId,i.turnId,i.item)},"item:updated":s=>{const i=s;K.getState().onItemUpdated(i.sessionId,i.turnId,i.item)},"item:completed":s=>{const i=s;K.getState().onItemCompleted(i.sessionId,i.turnId,i.item)},"item:delta":s=>{const i=s;K.getState().onItemDelta(i.sessionId,i.turnId,i.itemId,i.delta)},"turn:completed":s=>{const i=s;K.getState().onTurnCompleted(i.sessionId,i.turnId,i.usage,i.hasUnreviewed)},"turn:tokenUsage":s=>{const i=s;K.getState().onTokenUsageUpdated(i.sessionId,i.turnId,i.usage)},"turn:contextUsage":s=>{const i=s,l={totalTokens:i.totalTokens,contextWindow:i.contextWindow,percentage:i.percentage};K.getState().onContextUsageUpdated(i.sessionId,l)},"turn:failed":s=>{const i=s;K.getState().onTurnFailed(i.sessionId,i.turnId,i.error)},"turn:cancelled":s=>{const i=s;K.getState().onTurnCancelled(i.sessionId,i.turnId)},"session:title":s=>{const i=s;K.getState().onSessionTitle(i.sessionId,i.title)},background_tasks:s=>{const i=s;K.getState().onBackgroundTasksChanged(i.sessionId,i.tasks)},"thread:created":s=>{const i=s;K.getState().onThreadCreated(i.sessionId,i.thread,i.turn)},"thread:followup":s=>{const i=s;K.getState().onThreadFollowup(i.sessionId,i.threadId,i.turn)},"thread:resolved":s=>{const i=s;K.getState().onThreadResolved(i.sessionId,i.threadId,i.status)},"thread:deleted":s=>{const i=s;K.getState().onThreadDeleted(i.sessionId,i.threadId)}};function _y(){const s=K(i=>i.init);return D.useEffect(()=>{s(),Za();function i(){if(document.visibilityState!=="visible")return;const l=K.getState(),a=l.activeSessionId;if(!a)return;const d=l.sessionDetails[a];l.wsConnected||Za(),d&&d.is_running===1&&(l.refreshActiveSession(),l.addLogEntry("INFO","Tab returned — reconciling session state"))}return document.addEventListener("visibilitychange",i),()=>{wy(),document.removeEventListener("visibilitychange",i)}},[s]),null}function Ny(){const s=K(d=>d.loading),i=K(d=>d.error),l=K(d=>d.sessions),a=K(d=>d.setShowCommandPalette);return D.useEffect(()=>{function d(f){(f.metaKey||f.ctrlKey)&&f.key==="k"&&(f.preventDefault(),a(!0))}return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[a]),c.jsxs(c.Fragment,{children:[c.jsx(_y,{}),s&&l.length===0?c.jsx("div",{className:"empty-state",children:"Loading sessions…"}):i&&l.length===0?c.jsxs("div",{className:"empty-state",children:["Error: ",i]}):c.jsxs(c.Fragment,{children:[c.jsx(fy,{}),c.jsx(py,{}),c.jsx(hy,{}),c.jsx(yy,{})]})]})}Qh.createRoot(document.getElementById("root")).render(c.jsx(ml.StrictMode,{children:c.jsx(Ny,{})}));
|