agentroam-runtime-darwin-arm64 0.2.0-preview.78 → 0.2.0-preview.79
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/manifest.json +2 -2
- package/package.json +1 -1
- package/runtime/.next/BUILD_ID +1 -1
- package/runtime/.next/app-build-manifest.json +8 -8
- package/runtime/.next/app-path-routes-manifest.json +1 -1
- package/runtime/.next/build-manifest.json +3 -3
- package/runtime/.next/prerender-manifest.json +1 -1
- package/runtime/.next/required-server-files.json +1 -1
- package/runtime/.next/server/app/_not-found/page.js +1 -1
- package/runtime/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/runtime/.next/server/app/_not-found.html +1 -1
- package/runtime/.next/server/app/_not-found.rsc +1 -1
- package/runtime/.next/server/app/api/agent/abort/route.js +1 -1
- package/runtime/.next/server/app/api/agent/answer/route.js +1 -1
- package/runtime/.next/server/app/api/agent/codex-sharing/route.js +1 -1
- package/runtime/.next/server/app/api/agent/harness/status/route.js +1 -1
- package/runtime/.next/server/app/api/agent/model/route.js +1 -1
- package/runtime/.next/server/app/api/agent/models/route.js +1 -1
- package/runtime/.next/server/app/api/agent/run/route.js +1 -1
- package/runtime/.next/server/app/api/agent/runtime-health/route.js +1 -1
- package/runtime/.next/server/app/api/agent/steer/route.js +1 -1
- package/runtime/.next/server/app/api/agent/stream/route.js +3 -3
- package/runtime/.next/server/app/api/agent-workspaces/[workspaceId]/sessions/route.js +1 -1
- package/runtime/.next/server/app/api/agent-workspaces/route.js +1 -1
- package/runtime/.next/server/app/api/auth/verify/route.js +1 -1
- package/runtime/.next/server/app/api/business/route.js +1 -1
- package/runtime/.next/server/app/api/calendar/route.js +2 -2
- package/runtime/.next/server/app/api/client-logs/route.js +1 -1
- package/runtime/.next/server/app/api/collaboration/route.js +2 -2
- package/runtime/.next/server/app/api/engine-threads/route.js +1 -1
- package/runtime/.next/server/app/api/engine-threads.body +1 -1
- package/runtime/.next/server/app/api/flow/v1/catalog/route.js +1 -1
- package/runtime/.next/server/app/api/flow/v1/runs/[runId]/cancel/route.js +1 -1
- package/runtime/.next/server/app/api/flow/v1/runs/[runId]/events/route.js +2 -2
- package/runtime/.next/server/app/api/flow/v1/runs/route.js +1 -1
- package/runtime/.next/server/app/api/flow-studio/config/route.js +1 -1
- package/runtime/.next/server/app/api/internal/todo-bootstrap/route.js +1 -1
- package/runtime/.next/server/app/api/internal/todo-mcp/route.js +1 -1
- package/runtime/.next/server/app/api/mcp/connect/route.js +1 -1
- package/runtime/.next/server/app/api/mcp/disconnect/route.js +1 -1
- package/runtime/.next/server/app/api/mcp/servers/route.js +1 -1
- package/runtime/.next/server/app/api/memory/[key]/route.js +1 -1
- package/runtime/.next/server/app/api/memory/route.js +1 -1
- package/runtime/.next/server/app/api/messaging/route.js +1 -1
- package/runtime/.next/server/app/api/notifications/[id]/ack/route.js +1 -1
- package/runtime/.next/server/app/api/notifications/[id]/route.js +1 -1
- package/runtime/.next/server/app/api/notifications/route.js +1 -1
- package/runtime/.next/server/app/api/notifications/stream/route.js +2 -2
- package/runtime/.next/server/app/api/plugins/load/route.js +1 -1
- package/runtime/.next/server/app/api/projects/[id]/route.js +1 -1
- package/runtime/.next/server/app/api/projects/check/route.js +1 -1
- package/runtime/.next/server/app/api/projects/directories/route.js +1 -1
- package/runtime/.next/server/app/api/projects/roots/route.js +1 -1
- package/runtime/.next/server/app/api/projects/route.js +1 -1
- package/runtime/.next/server/app/api/push/subscribe/route.js +2 -2
- package/runtime/.next/server/app/api/push/unsubscribe/route.js +3 -3
- package/runtime/.next/server/app/api/push/vapid/route.js +2 -2
- package/runtime/.next/server/app/api/remote-tools/register/route.js +1 -1
- package/runtime/.next/server/app/api/session-images/[id]/route.js +1 -1
- package/runtime/.next/server/app/api/session-views/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/background-jobs/[jobId]/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/background-jobs/[jobId]/stop/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/background-jobs/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/changes/route.js +2 -2
- package/runtime/.next/server/app/api/sessions/[id]/engine-switches/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/fork/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/fork-at/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/goals/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/handoff/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/native-goal/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/query-index/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/release/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/switch-engine/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/thread-goal/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/thread-history/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/tool-result/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/parallel/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/route.js +1 -1
- package/runtime/.next/server/app/api/settings/route.js +1 -1
- package/runtime/.next/server/app/api/skills/route.js +1 -1
- package/runtime/.next/server/app/api/todos/[id]/commands/route.js +1 -1
- package/runtime/.next/server/app/api/todos/[id]/executions/route.js +1 -1
- package/runtime/.next/server/app/api/todos/[id]/route.js +1 -1
- package/runtime/.next/server/app/api/todos/route.js +1 -1
- package/runtime/.next/server/app/api/tool-policies/[policyId]/route.js +1 -1
- package/runtime/.next/server/app/api/tool-policies/route.js +1 -1
- package/runtime/.next/server/app/api/tools/route.js +1 -1
- package/runtime/.next/server/app/api/update/check/route.js +1 -1
- package/runtime/.next/server/app/api/update/install/route.js +1 -1
- package/runtime/.next/server/app/api/update/status/route.js +1 -1
- package/runtime/.next/server/app/api/web-auth/login/route.js +1 -1
- package/runtime/.next/server/app/api/web-auth/logout/route.js +1 -1
- package/runtime/.next/server/app/api/web-auth/revoke-all/route.js +1 -1
- package/runtime/.next/server/app/api/web-auth/setup/route.js +1 -1
- package/runtime/.next/server/app/api/web-auth/status/route.js +1 -1
- package/runtime/.next/server/app/api/web-console/bootstrap/route.js +1 -1
- package/runtime/.next/server/app/api/web-console/computer-settings/route.js +1 -1
- package/runtime/.next/server/app/api/web-console/computers/route.js +1 -1
- package/runtime/.next/server/app/api/web-console/device-state/route.js +1 -1
- package/runtime/.next/server/app/api/web-console/history/route.js +1 -1
- package/runtime/.next/server/app/api/web-console/preferences/route.js +1 -1
- package/runtime/.next/server/app/api/workspace-changes/route.js +1 -1
- package/runtime/.next/server/app/web/page.js +4 -4
- package/runtime/.next/server/app/web/page_client-reference-manifest.js +1 -1
- package/runtime/.next/server/app-paths-manifest.json +44 -44
- package/runtime/.next/server/chunks/1298.js +1 -1
- package/runtime/.next/server/chunks/5303.js +2 -2
- package/runtime/.next/server/chunks/6703.js +1 -1
- package/runtime/.next/server/chunks/9119.js +2 -2
- package/runtime/.next/server/chunks/9457.js +1 -1
- package/runtime/.next/server/middleware-build-manifest.js +1 -1
- package/runtime/.next/server/pages/404.html +1 -1
- package/runtime/.next/server/pages/500.html +1 -1
- package/runtime/.next/server/server-reference-manifest.json +1 -1
- package/runtime/.next/static/chunks/app/web/{error-828d278147a0619d.js → error-fac7681c6397fcd7.js} +1 -1
- package/runtime/.next/static/chunks/app/web/layout-79492e587e5930cf.js +1 -0
- package/runtime/.next/static/chunks/app/web/{page-bafdaa23fa1dc1c4.js → page-0f06deb6eb4d49e0.js} +1 -1
- package/runtime/.next/static/chunks/main-app-0c7cccb2825ad747.js +1 -0
- package/runtime/lib/mesh/headscale-client.mjs +81 -0
- package/runtime/lib/mesh/mesh-gateway.mjs +168 -0
- package/runtime/lib/mesh/mesh-service.mjs +158 -0
- package/runtime/native/Support.noindex/AgentRoam Remote Desktop.app/Contents/MacOS/agentroam-remote-desktop +0 -0
- package/runtime/native/Support.noindex/AgentRoam Remote Desktop.app/Contents/Resources/agentroam-component.json +1 -1
- package/runtime/native/Support.noindex/AgentRoam Remote Desktop.app/Contents/_CodeSignature/CodeResources +2 -2
- package/runtime/node_modules/.package-lock.json +17 -17
- package/runtime/node_modules/@agent/native-runtime/dist/index.js +46 -16
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/bridge.mjs +58 -58
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/browser-sdk.js +46 -46
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/{core-n0k9q0s3.mjs → core-2g5j09ba.mjs} +2 -2
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-59ydwk0g.mjs +17 -0
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/{core-76wf4hmr.mjs → core-664d5mmy.mjs} +2 -2
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/{core-ypdsx2xc.mjs → core-70sfhqm6.mjs} +2 -2
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-95gcz3n1.mjs +38 -0
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-ew5sfvfe.mjs +39 -0
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-gjhs7gf6.mjs +20 -0
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/{core-31xm3p73.mjs → core-kvdt1szx.mjs} +4 -4
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-p654hjkr.mjs +22 -0
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-q9bjbxkv.mjs +19 -0
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-samdvsjh.mjs +33 -0
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/{core-09fdstw7.mjs → core-x6bt758j.mjs} +3 -3
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core.mjs +12 -12
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/manifest.json +21 -21
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/manifest.zst.json +25 -25
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/package.json +22 -22
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/sdk.mjs +78 -78
- package/runtime/node_modules/caniuse-lite/package.json +1 -1
- package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.cjs +17 -3
- package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.min.cjs +3 -3
- package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.min.mjs +3 -3
- package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.mjs +17 -3
- package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.node.cjs +17 -3
- package/runtime/node_modules/mediabunny/dist/modules/src/isobmff/isobmff-demuxer.js +4 -1
- package/runtime/node_modules/mediabunny/dist/modules/src/isobmff/isobmff-muxer.js +7 -2
- package/runtime/node_modules/mediabunny/dist/modules/src/matroska/matroska-demuxer.js +3 -0
- package/runtime/node_modules/mediabunny/dist/modules/src/mpeg-ts/mpeg-ts-muxer.js +2 -2
- package/runtime/node_modules/mediabunny/dist/modules/src/tsconfig.tsbuildinfo +1 -1
- package/runtime/node_modules/mediabunny/dist/modules/src/version.js +1 -1
- package/runtime/node_modules/mediabunny/package.json +1 -1
- package/runtime/node_modules/mediabunny/src/isobmff/isobmff-demuxer.ts +5 -1
- package/runtime/node_modules/mediabunny/src/isobmff/isobmff-muxer.ts +10 -2
- package/runtime/node_modules/mediabunny/src/matroska/matroska-demuxer.ts +4 -0
- package/runtime/node_modules/mediabunny/src/mpeg-ts/mpeg-ts-muxer.ts +2 -2
- package/runtime/node_modules/mediabunny/src/version.ts +1 -1
- package/runtime/package-lock.json +41 -41
- package/runtime/server.js +1 -1
- package/runtime/webapp/dist/assets/{AIHubView-C0eIFauh.js → AIHubView-4kqTaPjO.js} +1 -1
- package/runtime/webapp/dist/assets/{AgentManager-B7kG8iLS.js → AgentManager-CDgiLqF_.js} +1 -1
- package/runtime/webapp/dist/assets/{AiHubPane-DB6b6Via.js → AiHubPane-C070jRHe.js} +1 -1
- package/runtime/webapp/dist/assets/App-iZlxRHaL.js +68 -0
- package/runtime/webapp/dist/assets/{BrowserLivePanel-BgftwEHQ.js → BrowserLivePanel-DxjgVXXK.js} +1 -1
- package/runtime/webapp/dist/assets/{CalendarPage-sg7SzvUh.js → CalendarPage-CxPVBlzd.js} +1 -1
- package/runtime/webapp/dist/assets/{CalendarView-C5z_2esa.js → CalendarView-CS-OG-13.js} +1 -1
- package/runtime/webapp/dist/assets/{CollaborationCreateDialog-DuEnjSu9.js → CollaborationCreateDialog-tI6S1cha.js} +1 -1
- package/runtime/webapp/dist/assets/{CollaborationDashboard-O13tTlEe.js → CollaborationDashboard-DSZa3Cns.js} +1 -1
- package/runtime/webapp/dist/assets/{CollaborationPage-DIKDOl8G.js → CollaborationPage-COyvllTJ.js} +1 -1
- package/runtime/webapp/dist/assets/{FilePreview-BfkF9hjw.js → FilePreview-CcJXlLge.js} +3 -3
- package/runtime/webapp/dist/assets/{FileTree-pbVSSQnM.js → FileTree-BuhW-pqR.js} +1 -1
- package/runtime/webapp/dist/assets/{FileWorkspaceDrawer-YcKPTu23.js → FileWorkspaceDrawer-ByWXnJ0B.js} +1 -1
- package/runtime/webapp/dist/assets/{FlowStudioPane-D7gzm1M_.js → FlowStudioPane-CxQ-QIOf.js} +1 -1
- package/runtime/webapp/dist/assets/{HostProjectPicker-7zvVzftL.js → HostProjectPicker--J4_JpSW.js} +1 -1
- package/runtime/webapp/dist/assets/{LSPServerList-BfbJdHYJ.js → LSPServerList-fkagcDVv.js} +1 -1
- package/runtime/webapp/dist/assets/{MCPServerList-A1SAlHdR.js → MCPServerList-w7tetX3J.js} +1 -1
- package/runtime/webapp/dist/assets/{MemoryViewer-fFtBJzgz.js → MemoryViewer-Xac9EeaV.js} +1 -1
- package/runtime/webapp/dist/assets/{NewSessionWindow-Ce2M6IVa.js → NewSessionWindow-C460-gxX.js} +1 -1
- package/runtime/webapp/dist/assets/{RemoteDesktopPage-kP5Qzh6n.js → RemoteDesktopPage-BniHztmt.js} +1 -1
- package/runtime/webapp/dist/assets/{RemoteDesktopTabBridge-tJcxPHnZ.js → RemoteDesktopTabBridge-BF1dFltY.js} +1 -1
- package/runtime/webapp/dist/assets/{RunningSessionsIcon-DuoG6Hgs.js → RunningSessionsIcon-D6rY-IzV.js} +1 -1
- package/runtime/webapp/dist/assets/{SessionDashboard-DGfTYjbZ.js → SessionDashboard-D868NjZ_.js} +1 -1
- package/runtime/webapp/dist/assets/{SessionDashboardBridge-Cw8Y0s5_.js → SessionDashboardBridge-AhmhQ1Xn.js} +1 -1
- package/runtime/webapp/dist/assets/{SettingsPanel-DCME-IZC.js → SettingsPanel-DoDRBreZ.js} +1 -1
- package/runtime/webapp/dist/assets/{SkillManager-CFHcSwEr.js → SkillManager-Da7bpT-s.js} +1 -1
- package/runtime/webapp/dist/assets/{TaskPaneTerminal-BozZNjMj.js → TaskPaneTerminal-DTDU88Rr.js} +1 -1
- package/runtime/webapp/dist/assets/{TerminalPane-CPlks8Nc.js → TerminalPane-_dVVs00I.js} +1 -1
- package/runtime/webapp/dist/assets/TodoPage-Bqu8bqNk.js +1 -0
- package/runtime/webapp/dist/assets/{abnfDiagram-VCTEODGH-DoUDteiL.js → abnfDiagram-VCTEODGH-D3GW7M1R.js} +1 -1
- package/runtime/webapp/dist/assets/{arc-Cao4pQp2.js → arc-CkEemU1L.js} +1 -1
- package/runtime/webapp/dist/assets/{architectureDiagram-5GKGNRK7-BvZ3G5rB.js → architectureDiagram-5GKGNRK7-GYQtcFLY.js} +1 -1
- package/runtime/webapp/dist/assets/{blockDiagram-I7D4REHJ-DNv3qaVA.js → blockDiagram-I7D4REHJ-D5_bj13P.js} +1 -1
- package/runtime/webapp/dist/assets/{c4Diagram-7LVT6UL2-DtL8WSam.js → c4Diagram-7LVT6UL2-Cyg1YunN.js} +1 -1
- package/runtime/webapp/dist/assets/{calendar-days-DpxojDWK.js → calendar-days-B1Mn3x8A.js} +1 -1
- package/runtime/webapp/dist/assets/channel-CnNsi-lz.js +1 -0
- package/runtime/webapp/dist/assets/{check-CY3GCzxa.js → check-D-yTByNl.js} +1 -1
- package/runtime/webapp/dist/assets/{chevron-down-FeW7FcBS.js → chevron-down-hiPnZS_M.js} +1 -1
- package/runtime/webapp/dist/assets/{chevron-right-Bnd4FK8S.js → chevron-right-DKsui_wS.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-2Q5K7J3B-Jc2d8B_h.js → chunk-2Q5K7J3B-ZYdmLJUM.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-5VM5RSS4-BbY9artS.js → chunk-5VM5RSS4-C-zA5MxE.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-F27PBJKO-B9uG6DBE.js → chunk-F27PBJKO-cWERJSPb.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-IMKFNOWR-Dta3lxIg.js → chunk-IMKFNOWR-BDqkH2_j.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-JWPE2WC7-DhBjDzbj.js → chunk-JWPE2WC7-D0hOf4wm.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-POPQ4Y6H-D51fNP6n.js → chunk-POPQ4Y6H-bGKHqXLU.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-SVP7TREG-DQ8c4Knv.js → chunk-SVP7TREG-DbzwWcno.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-TICWLB2K-BIDOV_Vx.js → chunk-TICWLB2K-CmCx8YTb.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-XXDRQBXY-C-y59lCL.js → chunk-XXDRQBXY-COAufrJq.js} +1 -1
- package/runtime/webapp/dist/assets/classDiagram-ZZMXUADV-DVRTvUTS.js +1 -0
- package/runtime/webapp/dist/assets/classDiagram-v2-VYDZK3BY-DVRTvUTS.js +1 -0
- package/runtime/webapp/dist/assets/{client-ZvcI0WiM.js → client-5Hu1eVTX.js} +1 -1
- package/runtime/webapp/dist/assets/{codeSyntax-DlCdufoQ.js → codeSyntax-Jy5nWtHv.js} +1 -1
- package/runtime/webapp/dist/assets/{collaboration-CeiB1Ihl.js → collaboration-DRFqpcAz.js} +1 -1
- package/runtime/webapp/dist/assets/{composer-file-routing-CFoCNmv7.js → composer-file-routing-BtvXnu_o.js} +1 -1
- package/runtime/webapp/dist/assets/{cose-bilkent-JH36ORCC-Do2xoVHK.js → cose-bilkent-JH36ORCC-BU8MmGqT.js} +1 -1
- package/runtime/webapp/dist/assets/{cynefin-OW5HDTMX-CRC3uGN6.js → cynefin-OW5HDTMX-BHXgPQGq.js} +1 -1
- package/runtime/webapp/dist/assets/{cynefinDiagram-5FMLGOSQ-BD90NfUx.js → cynefinDiagram-5FMLGOSQ-DSJJ_PpM.js} +1 -1
- package/runtime/webapp/dist/assets/{dagre-GXQ25YYZ-BeO7O01r.js → dagre-GXQ25YYZ-pJr8jDyF.js} +1 -1
- package/runtime/webapp/dist/assets/{diagram-S7CK7UJ4-DGvd2V5u.js → diagram-S7CK7UJ4-BZ_7PPQn.js} +1 -1
- package/runtime/webapp/dist/assets/{diagram-UQ7AKVKN-_Ns2BTM0.js → diagram-UQ7AKVKN-c8pu5Rp4.js} +1 -1
- package/runtime/webapp/dist/assets/{diagram-VSXAHHWV-D45wsjUv.js → diagram-VSXAHHWV-D1xao_j-.js} +1 -1
- package/runtime/webapp/dist/assets/{diagram-VX7I27RA-B_898k8e.js → diagram-VX7I27RA-CnBWGCHa.js} +1 -1
- package/runtime/webapp/dist/assets/{diagram-Z3DM3KII-CdbHDj9L.js → diagram-Z3DM3KII-D-TCo4OF.js} +1 -1
- package/runtime/webapp/dist/assets/{download-Cy_rpjte.js → download-B2jLl85N.js} +1 -1
- package/runtime/webapp/dist/assets/{ebnfDiagram-PWID7BFC-eqVvfCy6.js → ebnfDiagram-PWID7BFC-BGBuf1T3.js} +1 -1
- package/runtime/webapp/dist/assets/{erDiagram-RLTQ6QDP-eRQEDuTP.js → erDiagram-RLTQ6QDP-D8rCYH4y.js} +1 -1
- package/runtime/webapp/dist/assets/{file-types-BsWJSk07.js → file-types-BZ8YZAV-.js} +1 -1
- package/runtime/webapp/dist/assets/{flowDiagram-HODETNUW-BLS4V7Zd.js → flowDiagram-HODETNUW-BJGQL6in.js} +1 -1
- package/runtime/webapp/dist/assets/{ganttDiagram-EL5Y4UJY-C1JdU9e_.js → ganttDiagram-EL5Y4UJY-K9o-Kk2M.js} +1 -1
- package/runtime/webapp/dist/assets/{gitGraphDiagram-WWUBYQGX-kAprA0xM.js → gitGraphDiagram-WWUBYQGX-BC2r8pLT.js} +1 -1
- package/runtime/webapp/dist/assets/{history-BGr6tFSR.js → history-Ci0s2eVL.js} +1 -1
- package/runtime/webapp/dist/assets/{image-plus-Cr9rDqvd.js → image-plus-Cx4LQVvj.js} +1 -1
- package/runtime/webapp/dist/assets/{index-CrjQF-VW.js → index-D1AQffdA.js} +3 -3
- package/runtime/webapp/dist/assets/{infoDiagram-27XIBGKW-DzUFk2zb.js → infoDiagram-27XIBGKW-bFnrh7W7.js} +1 -1
- package/runtime/webapp/dist/assets/{ishikawaDiagram-5VMMS53U-DETvimW1.js → ishikawaDiagram-5VMMS53U-Qun77xRt.js} +1 -1
- package/runtime/webapp/dist/assets/{journeyDiagram-3NMN7TZE-ZmlLOhVV.js → journeyDiagram-3NMN7TZE-DjCfoBNX.js} +1 -1
- package/runtime/webapp/dist/assets/{kanban-definition-UXKFOSKX-Q5j9iBkD.js → kanban-definition-UXKFOSKX-BJGlhVsx.js} +1 -1
- package/runtime/webapp/dist/assets/{layout-xVYWH0Cz.js → layout-CYTxygXU.js} +1 -1
- package/runtime/webapp/dist/assets/{linear-BD5xYHq0.js → linear-CzJGOwUm.js} +1 -1
- package/runtime/webapp/dist/assets/{list-todo-BJrNf0OF.js → list-todo-CP9DqU2D.js} +1 -1
- package/runtime/webapp/dist/assets/{loader-circle-BSDHoDXf.js → loader-circle-xEKTnlp3.js} +1 -1
- package/runtime/webapp/dist/assets/{locate-fixed-BBOLeIa6.js → locate-fixed-CfEojGOl.js} +1 -1
- package/runtime/webapp/dist/assets/{mermaid.core-XNny-og5.js → mermaid.core-BTbaaIjb.js} +5 -5
- package/runtime/webapp/dist/assets/{mindmap-definition-YA3MSWOX-CCuaFOfd.js → mindmap-definition-YA3MSWOX-eiKdbp4J.js} +1 -1
- package/runtime/webapp/dist/assets/{mobileViewport-Ckhq6eml.js → mobileViewport-DF1R6qR2.js} +1 -1
- package/runtime/webapp/dist/assets/{new-session-window-ThRZvGVK.js → new-session-window-BFILhYAe.js} +24 -24
- package/runtime/webapp/dist/assets/{page-DK2ooc8J.js → page-B-CkpInM.js} +3 -3
- package/runtime/webapp/dist/assets/{pause-BF1q8wFt.js → pause-C-ecDo3W.js} +1 -1
- package/runtime/webapp/dist/assets/{pegDiagram-XKGWAZYB-Dt2wEt-q.js → pegDiagram-XKGWAZYB-BuvePvoF.js} +1 -1
- package/runtime/webapp/dist/assets/{pieDiagram-E7YTZNPT-Bv5PR_0B.js → pieDiagram-E7YTZNPT-Csgh2lYE.js} +1 -1
- package/runtime/webapp/dist/assets/{pin-ByCe4NyB.js → pin-CjmuX5Tq.js} +1 -1
- package/runtime/webapp/dist/assets/{quadrantDiagram-AXDQQJYC-mUp15pA4.js → quadrantDiagram-AXDQQJYC-8Bbl_RHv.js} +1 -1
- package/runtime/webapp/dist/assets/{railroadDiagram-O6MQD6OU-CU79-JOl.js → railroadDiagram-O6MQD6OU-CvYQkIeK.js} +1 -1
- package/runtime/webapp/dist/assets/{requirementDiagram-BXWQKSXE-DosZrbGa.js → requirementDiagram-BXWQKSXE-CytOuQX4.js} +1 -1
- package/runtime/webapp/dist/assets/{rotate-ccw-DtSpwbK7.js → rotate-ccw-HY6j6nBt.js} +1 -1
- package/runtime/webapp/dist/assets/{rotate-cw-DdQZP8we.js → rotate-cw-CyYR2IEw.js} +1 -1
- package/runtime/webapp/dist/assets/{sankeyDiagram-P5KCCOFB-BWbz07Kw.js → sankeyDiagram-P5KCCOFB-BoyI7ZhF.js} +1 -1
- package/runtime/webapp/dist/assets/{send-CtGGbUpC.js → send-jSK0YaRl.js} +1 -1
- package/runtime/webapp/dist/assets/{sequenceDiagram-WJ2MYXX4-DeUcGtwv.js → sequenceDiagram-WJ2MYXX4-Ckvtmn2N.js} +1 -1
- package/runtime/webapp/dist/assets/{session-dashboard-7G2sKgmw.js → session-dashboard-B4lyuZYF.js} +1 -1
- package/runtime/webapp/dist/assets/{session-tree-Ck5Wp7h-.js → session-tree-CEy-pW8A.js} +1 -1
- package/runtime/webapp/dist/assets/{shield-check-BIxrmOwR.js → shield-check-CFebh9do.js} +1 -1
- package/runtime/webapp/dist/assets/{sizeCapture-INFHLROL-DPrrG2Kd.js → sizeCapture-INFHLROL-yUQjHNrI.js} +1 -1
- package/runtime/webapp/dist/assets/{stateDiagram-D77RDMKH-CtlmJgrm.js → stateDiagram-D77RDMKH-Dj8oPHDB.js} +1 -1
- package/runtime/webapp/dist/assets/stateDiagram-v2-MP3YSRHH-Csg946NK.js +1 -0
- package/runtime/webapp/dist/assets/{swimlanes-42K2YHIH-rMtOxOkm.js → swimlanes-42K2YHIH-GDjg8QNS.js} +1 -1
- package/runtime/webapp/dist/assets/swimlanesDiagram-VR7AAH4N-BUnuRfXp.js +8 -0
- package/runtime/webapp/dist/assets/{timeline-definition-24CTP7MA-D0C5B_7F.js → timeline-definition-24CTP7MA-DFDHsxzp.js} +1 -1
- package/runtime/webapp/dist/assets/{trash-2-CT_MslWu.js → trash-2-BF9eI5Bh.js} +1 -1
- package/runtime/webapp/dist/assets/{types-pH-pRUSS.js → types-BuPq0iQM.js} +1 -1
- package/runtime/webapp/dist/assets/{use-session-activity-B9xAOlzA.js → use-session-activity-Ceb8OBjB.js} +1 -1
- package/runtime/webapp/dist/assets/{vennDiagram-4TSXK5OY-B8iPk0Tm.js → vennDiagram-4TSXK5OY-DR5HBqo1.js} +1 -1
- package/runtime/webapp/dist/assets/{wardleyDiagram-VM6X3IG4-Cb60IRaS.js → wardleyDiagram-VM6X3IG4-Bb6pROnE.js} +1 -1
- package/runtime/webapp/dist/assets/{web-D-dNOCeI.js → web-BV7fxnr4.js} +1 -1
- package/runtime/webapp/dist/assets/{web-DTj73nYv.js → web-C8kCU9om.js} +1 -1
- package/runtime/webapp/dist/assets/{x-3I6TKNBE.js → x-uSekqXJV.js} +1 -1
- package/runtime/webapp/dist/assets/{xychartDiagram-S5SC5T6Z-DWXthhJz.js → xychartDiagram-S5SC5T6Z-CrpaVklx.js} +1 -1
- package/runtime/webapp/dist/assets/{zoom-out-417ojKB8.js → zoom-out-B59mGU6c.js} +1 -1
- package/runtime/webapp/dist/index.html +1 -1
- package/runtime/ws-server.mjs +9 -0
- package/runtime/.next/static/chunks/app/web/layout-1127176e7e88e395.js +0 -1
- package/runtime/.next/static/chunks/main-app-07d67f2d4e96ecb8.js +0 -1
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-7sb5cs8h.mjs +0 -39
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-cfz10gtb.mjs +0 -24
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-p9759xd0.mjs +0 -22
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-rszpc155.mjs +0 -17
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-ttfdej7v.mjs +0 -20
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-y906qay4.mjs +0 -28
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-yp8w8nva.mjs +0 -38
- package/runtime/webapp/dist/assets/App-m33SPX0n.js +0 -68
- package/runtime/webapp/dist/assets/TodoPage-BuDedc75.js +0 -1
- package/runtime/webapp/dist/assets/channel-Dz0U21-m.js +0 -1
- package/runtime/webapp/dist/assets/classDiagram-ZZMXUADV-CL_0n_9Y.js +0 -1
- package/runtime/webapp/dist/assets/classDiagram-v2-VYDZK3BY-CL_0n_9Y.js +0 -1
- package/runtime/webapp/dist/assets/stateDiagram-v2-MP3YSRHH-C9bL7Wc5.js +0 -1
- package/runtime/webapp/dist/assets/swimlanesDiagram-VR7AAH4N-x5ntdS3v.js +0 -8
- /package/runtime/.next/static/{N0n_ri0ArZV5CvaOg_qnx → Ra6nQooMsDWN9-yjPL93f}/_buildManifest.js +0 -0
- /package/runtime/.next/static/{N0n_ri0ArZV5CvaOg_qnx → Ra6nQooMsDWN9-yjPL93f}/_ssgManifest.js +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./TerminalPane-
|
|
2
|
-
import{c as hr,r,j as e,h as Ge,a as Pe,R as xe,D as gr,E as br,F as Ae,G as Mn,I as wr,e as De,J as Ye,K as xr,L as yr,O as mn,w as vr,Q as kr,U as xt,z as lt,P as zn,S as jr,T as Wn,V as yt,X as Er,Y as Sr,Z as fn,_ as Cr,$ as Tr,a0 as Nr,a1 as Rr,a2 as ct,a3 as Lr,a4 as Ke,a5 as Pr,d as dt,a6 as Ir,a7 as at,a8 as Ar,a9 as Dr,aa as _r,ab as Mr,ac as zr,ad as hn,ae as _e}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./TerminalPane-_dVVs00I.js","./index-D1AQffdA.js","./index-zQk0NCEB.css","./mobileViewport-DF1R6qR2.js","./RemoteDesktopTabBridge-BF1dFltY.js","./TerminalPane-6GBZ9nXN.css","./FileTree-BuhW-pqR.js","./file-types-BZ8YZAV-.js","./locate-fixed-CfEojGOl.js","./x-uSekqXJV.js","./loader-circle-xEKTnlp3.js","./chevron-down-hiPnZS_M.js","./chevron-right-DKsui_wS.js","./trash-2-BF9eI5Bh.js","./FilePreview-CcJXlLge.js","./artifact-links-B0ApmgK6.js","./rotate-ccw-HY6j6nBt.js","./check-D-yTByNl.js","./download-B2jLl85N.js","./FilePreview-B7Ab2X_E.css","./AiHubPane-C070jRHe.js","./image-plus-Cx4LQVvj.js","./send-jSK0YaRl.js","./FlowStudioPane-CxQ-QIOf.js","./rotate-cw-CyYR2IEw.js","./RunningSessionsIcon-D6rY-IzV.js","./calendar-days-B1Mn3x8A.js","./pin-CjmuX5Tq.js","./CollaborationTabBridge-Dxq4G1Uk.js","./SessionDashboardBridge-AhmhQ1Xn.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{c as hr,r,j as e,h as Ge,a as Pe,R as xe,D as gr,E as br,F as Ae,G as Mn,I as wr,e as De,J as Ye,K as xr,L as yr,O as mn,w as vr,Q as kr,U as xt,z as lt,P as zn,S as jr,T as Wn,V as yt,X as Er,Y as Sr,Z as fn,_ as Cr,$ as Tr,a0 as Nr,a1 as Rr,a2 as ct,a3 as Lr,a4 as Ke,a5 as Pr,d as dt,a6 as Ir,a7 as at,a8 as Ar,a9 as Dr,aa as _r,ab as Mr,ac as zr,ad as hn,ae as _e}from"./index-D1AQffdA.js";import{S as On,M as gn,a as Wr,G as ut,b as Or,R as Fn,c as Fr,C as Br}from"./RunningSessionsIcon-D6rY-IzV.js";import{X as Se}from"./x-uSekqXJV.js";import{C as $r}from"./chevron-down-hiPnZS_M.js";import{C as pt}from"./check-D-yTByNl.js";import{T as vt,P as mt,A as Ur,F as Hr}from"./trash-2-BF9eI5Bh.js";import{E as kt,c as qr,e as Vr,f as bn,R as Yr,b as Kr}from"./RemoteDesktopTabBridge-BF1dFltY.js";import{C as Gr}from"./chevron-right-DKsui_wS.js";import{C as Bn}from"./calendar-days-B1Mn3x8A.js";import{a as Xr,r as Jr,i as wn}from"./artifact-links-B0ApmgK6.js";import{u as Qr,r as Zr,a as eo}from"./mobileViewport-DF1R6qR2.js";import{P as to}from"./pin-CjmuX5Tq.js";import{r as no,d as ro,e as oo}from"./CollaborationTabBridge-Dxq4G1Uk.js";import{b as io,r as ao,c as xn}from"./SessionDashboardBridge-AhmhQ1Xn.js";/**
|
|
3
3
|
* @license lucide-react v0.468.0 - ISC
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the ISC license.
|
|
@@ -83,4 +83,4 @@ import{c as hr,r,j as e,h as Ge,a as Pe,R as xe,D as gr,E as br,F as Ae,G as Mn,
|
|
|
83
83
|
.collaboration-load-error button:focus-visible { outline:2px solid currentColor; outline-offset:3px; }
|
|
84
84
|
@keyframes collaboration-appear { from { opacity:0; } to { opacity:1; } }
|
|
85
85
|
@media (prefers-reduced-motion:reduce) { .collaboration-frame.is-ready { animation:none; } }
|
|
86
|
-
`})]})}function Go({active:t,children:o}){const[a,s]=r.useState(t);return r.useEffect(()=>{t&&s(!0)},[t]),t||a?o:null}function Ln(t){try{const o=JSON.parse(t||"null");if(!o||!Array.isArray(o.tabs))return null;const a=new Set,s=new Set(["webapp","aihub","flowstudio","remote-desktop","collaboration","collaboration-dashboard","session-dashboard","calendar"]),c=[];for(const u of o.tabs.slice(0,100))!u||typeof u.id!="string"||typeof u.title!="string"||a.has(u.id)||u.kind!==void 0&&!s.has(u.kind)||u.kind==="collaboration"&&typeof u.groupId!="string"||(a.add(u.id),c.push({id:u.id,title:u.title,...u.kind?{kind:u.kind}:{},...typeof u.groupId=="string"?{groupId:u.groupId}:{},...typeof u.discussionId=="string"&&/^[\w-]{1,200}$/.test(u.discussionId)?{discussionId:u.discussionId}:{}}));return{tabs:c,activeTerminalId:typeof o.activeTerminalId=="string"&&o.activeTerminalId!=="messaging"?o.activeTerminalId:null}}catch{return null}}function Xo(t,o,a){const s=new Map(o.filter(p=>p.status==="active"||p.status==="detached").map(p=>[p.id,{id:p.id,title:p.title}])),c=[],u=new Set;for(const p of[...(t==null?void 0:t.tabs)??[],...a,...s.values()])u.has(p.id)||!p.kind&&!s.has(p.id)||(u.add(p.id),c.push(p.kind?p:s.get(p.id)));return c}const Ee={id:"remote-desktop",title:"远程桌面",kind:"remote-desktop"};function Pn(t){const o=t.find(a=>a.kind==="remote-desktop");return o?t.map(a=>a===o?{...Ee}:a):[...t,{...Ee}]}const Ie={id:"collaboration-dashboard",title:"群聊列表",kind:"collaboration-dashboard"};function In(t){return t.some(o=>o.id===Ie.id)?t:[...t,{...Ie}]}const Xe={id:"session-dashboard",title:"Dashboard",kind:"session-dashboard"};function An(t){return t.some(o=>o.id===Xe.id)?t:[...t,{...Xe}]}const wt={id:"calendar",title:"日历",kind:"calendar"};function Jo(t){return t.some(o=>o.id===wt.id)?t:[...t,{...wt}]}const Qo=Me(()=>_e(()=>import("./TerminalPane-CPlks8Nc.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),{ssr:!1}),Zo=Me(()=>_e(()=>import("./FileTree-pbVSSQnM.js"),__vite__mapDeps([6,1,2,7,8,9,10,11,12,13]),import.meta.url),{ssr:!1}),ei=Me(()=>_e(()=>import("./FilePreview-BfkF9hjw.js").then(t=>t.b),__vite__mapDeps([14,1,2,15,16,10,13,17,18,9,19]),import.meta.url),{ssr:!1}),ti=Me(()=>_e(()=>import("./AiHubPane-DB6b6Via.js"),__vite__mapDeps([20,1,2,9,11,21,10,22]),import.meta.url),{ssr:!1}),ni=Me(()=>_e(()=>import("./FlowStudioPane-D7gzm1M_.js"),__vite__mapDeps([23,1,2,24,25,9,11,17,13,4,12,26,15,3,27,28,29]),import.meta.url),{ssr:!1,loading:()=>e.jsx(Je,{})});function ri(){return e.jsx(Wo,{children:(t,o)=>e.jsx(ai,{auth:t,onWorkspaceReady:o})})}const oe={id:"webapp-agent",title:"智能助手",kind:"webapp"},Dn={id:"ai-hub",title:"AI Hub",kind:"aihub"},_n={id:"flow-studio",title:"Flow Studio",kind:"flowstudio"};function oi(){var t;return typeof document>"u"?_r:dt((t=document.getElementById("web-theme-root"))==null?void 0:t.dataset.webTheme).id}const ii="agent-web-shell:skin:v1";function ai({auth:t,onWorkspaceReady:o}){var $t,Ut,Ht,qt;const[a,s]=r.useState(null),c=r.useRef(null),[u,p]=r.useState(0),f=r.useCallback(n=>{if((n==null?void 0:n.openMode)==="new-tab"){window.open(n.url,"_blank","noopener,noreferrer");return}s(n)},[]),T=r.useCallback(n=>s((n==null?void 0:n.openMode)==="current"?n:null),[]),w=r.useRef(null),E=r.useRef(null),d=r.useRef(null),y=r.useRef(null),j=r.useRef(null),R=r.useRef(!1),[h,v]=r.useState({}),x=r.useRef(new Map),[g,C]=r.useState(0),[N,L]=r.useState(!1),[D,Q]=r.useState(!1),[ee,Y]=r.useState(!1),ne=r.useRef(()=>{}),_=r.useCallback(n=>{var m;const i=_o(n);if(!(!i||i.type!==bt.watcherFrame)){ne.current(i.channelId,i.sequence);for(const b of[w,E]){if(!((m=b.current)!=null&&m.contentWindow))continue;const k=i.payload.slice().buffer;b.current.contentWindow.postMessage({type:Pr,channelId:i.channelId,sequence:i.sequence,data:k},window.location.origin,[k])}}},[]),{state:z,epoch:q,rpc:W,onEvent:J,onTerminalData:K,onTerminalReset:U,sendTerminalInput:ie}=Qr(_,t.getWsNonce,t.refresh),le=r.useMemo(()=>({request:(n,i,m)=>W(n,i,m),subscribe:(n,i)=>J("fs:event",i)}),[J,W]);ne.current=(n,i)=>{W("browser:frame-ack",{channelId:n,sequence:i}).catch(()=>{})};const[A,B]=r.useState([{...oe}]),Ce=r.useRef(A);Ce.current=A;const[l,S]=r.useState(oe.id),O=r.useCallback(()=>{if(A.length>=8)return;const n=`t-web-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`;B(i=>i.length>=8?i:[...i,{id:n,title:`Terminal ${i.length+1}`}]),S(n)},[A.length]);Mo(c,l,!a);const[M,$]=r.useState({}),V=r.useRef(!1),[te,ze]=r.useState(!1),[We,Yn]=r.useState(0),Oe=`agentroam:workspace:${typeof window>"u"?"":De()}:${(($t=t.user)==null?void 0:$t.id)??""}`,jt=r.useRef(null),ye=r.useRef(new Map),Fe=r.useRef(new Map),Kn=r.useCallback((n,i)=>{ye.current.set(n,i);const m=window.setTimeout(()=>{if(ye.current.get(n)!==i)return;const b=Fe.current.get(n);b&&(Fe.current.delete(n),i(b,!0))},180);return()=>{window.clearTimeout(m),ye.current.get(n)===i&&ye.current.delete(n)}},[]),Gn=r.useCallback(n=>{var m;if(!l||(m=A.find(b=>b.id===l))!=null&&m.kind)return;const i=ye.current.get(l);i?i(n):W("term:input",{id:l,data:`${n}`}).catch(()=>{}),de(!1)},[l,W,A]),[ve,Xn]=r.useState(!1),[Te,Qe]=r.useState({}),[ue,Be]=r.useState(null),[ce,de]=r.useState(!1),[he,$e]=r.useState("files"),[Ne,Et]=r.useState(null),[Re,St]=r.useState(!0),[Ue,Ct]=r.useState(null),[Ze,Tt]=r.useState(!1),[et,Nt]=r.useState([]),[tt,Rt]=r.useState(Lo()),[ke,Lt]=r.useState(oi),[Pt,Jn]=r.useState(ct),[It,Qn]=r.useState(!1);r.useEffect(()=>{const n=()=>{try{Jn(Ho(window.localStorage))}catch{}Qn(!0)},i=m=>{(m.key===Vn||m.key===null)&&n()};return n(),window.addEventListener("storage",i),()=>window.removeEventListener("storage",i)},[]);const[At,Zn]=r.useState(!1),pe=No(t.csrfToken),[Dt,er]=r.useState(!1),Z=dt(ke),je=r.useRef(null),[tr,nt]=r.useState(0),[nr,rt]=r.useState(!1),ot=r.useRef(null),_t=r.useRef(null),Mt=r.useCallback(n=>{var m;const i=[w.current,E.current,d.current,y.current,...x.current.values()];for(const b of i)(m=b==null?void 0:b.contentWindow)==null||m.postMessage({type:ii,skin:n},window.location.origin)},[]),re=r.useCallback(()=>{var i;if(Mt(ke),!It)return;const n=[w.current,E.current,d.current,y.current,...x.current.values()];for(const m of n)(i=m==null?void 0:m.contentWindow)==null||i.postMessage({type:Ir,navigationLayout:Pt},window.location.origin)},[ke,Pt,It,Mt]);r.useEffect(()=>{re()},[re]),r.useEffect(()=>{const n=Z.cssVars["--ui-root-bg"],i=Z.cssVars["--ui-color-scheme"],m=document.getElementById("web-theme-root");for(const[k,I]of Object.entries(Z.cssVars))m==null||m.style.setProperty(k,I);m&&(m.dataset.webTheme=Z.id),document.documentElement.style.background=n,document.documentElement.style.colorScheme=i,document.body.style.background=n,document.body.style.colorScheme=i;let b=document.querySelector('meta[name="theme-color"]');b||(b=document.createElement("meta"),b.name="theme-color",document.head.append(b)),b.content=Z.cssVars["--ui-tabbar-bg"]},[Z]),r.useEffect(()=>{const n=i=>{var Vt,Yt,Kt,Gt,Xt,Jt,Qt,Zt,en,tn,nn,rn,on,an,sn,ln,cn,dn,un,pn;const m=((Vt=d.current)==null?void 0:Vt.contentWindow)??null,b=[(Yt=w.current)==null?void 0:Yt.contentWindow,m,(Kt=y.current)==null?void 0:Kt.contentWindow,...[...x.current.values()].map(P=>P.contentWindow)].find(P=>P&&P===i.source)??null,k=ao(i,window.location.origin,b);if(k){if(s(null),k.kind==="dashboard")B(An),S(Xe.id);else if(k.kind==="groups")B(In),S(Ie.id);else if(k.kind==="group"){const P=`collaboration-${k.groupId}`,H={id:P,title:k.title,kind:"collaboration",groupId:k.groupId,discussionId:k.discussionId};B(fe=>fe.some(Ve=>Ve.id===P)?fe.map(Ve=>Ve.id===P?H:Ve):[...fe,H]),S(P)}else R.current?(Xt=(Gt=w.current)==null?void 0:Gt.contentWindow)==null||Xt.postMessage({type:xn,intent:k},window.location.origin):j.current=k,S(oe.id);return}const I=ro(i,window.location.origin,m);if(I){B(P=>I.deleted?P.filter(H=>H.groupId!==I.groupId):P.map(H=>H.groupId===I.groupId?{...H,title:I.title}:H)),I.deleted?S(P=>P===`collaboration-${I.groupId}`?Ie.id:P):v(P=>({...P,[I.groupId]:(P[I.groupId]||0)+1}));return}const F=oo(i,window.location.origin,i.source===m?m:((Jt=w.current)==null?void 0:Jt.contentWindow)??null);if(F){const P=`collaboration-${F.groupId}`;B(H=>H.some(fe=>fe.id===P)?H:[...H,{id:P,title:F.title,kind:"collaboration",groupId:F.groupId}]),S(P);return}if(Ao(i,window.location.origin,((Qt=w.current)==null?void 0:Qt.contentWindow)??null)){s(null),O();return}const G=((Zt=E.current)==null?void 0:Zt.contentWindow)??null,X=bn(i,window.location.origin,G);if(X!==null){L(X);return}const ae=bn(i,window.location.origin,((en=w.current)==null?void 0:en.contentWindow)??null);if(ae!==null){Q(ae);return}if(Rn(i,window.location.origin,G)){L(!1),C(P=>P+1),Y(!1),re();return}if(G&&i.origin===window.location.origin&&i.source===G&&((tn=i.data)==null?void 0:tn.type)===Yr){Y(!0);return}if(i.origin===window.location.origin&&i.source===G&&G&&((nn=i.data)==null?void 0:nn.type)===Kr){L(!1),W("browser:unwatch").catch(()=>{}),B(P=>P.filter(H=>H.kind!=="remote-desktop")),C(0),Y(!1),S(oe.id);return}if(Mr(i,window.location.origin,((rn=w.current)==null?void 0:rn.contentWindow)??null)){B(Pn),S(Ee.id);return}if(Rn(i,window.location.origin,((on=w.current)==null?void 0:on.contentWindow)??null)){Q(!1),R.current=!0,er(!0),re(),o(),j.current&&((sn=(an=w.current)==null?void 0:an.contentWindow)==null||sn.postMessage({type:xn,intent:j.current},window.location.origin),j.current=null);return}const fr=(ln=[...x.current.values()].find(P=>P.contentWindow===i.source))==null?void 0:ln.contentWindow,ge=Xr(i,window.location.origin,fr??((cn=w.current)==null?void 0:cn.contentWindow)??null);if(ge){const P=H=>{$e("files"),de(!wn(H)),Be(ge.revealOnly?null:H),Ct(wn(H)?null:{path:H,requestId:ge.requestId,rootAtParent:ge.revealOnly})};ge.path.startsWith("~/")?W("hello").then(({home:H})=>{const fe=Jr(ge.path,null,H);fe&&P(fe)}).catch(()=>{}):P(ge.path);return}const be=i.source===G&&G?G:((dn=w.current)==null?void 0:dn.contentWindow)??null,we=zr(i,window.location.origin,be);if(we){W(we.method,{...we.payload,...we.method==="browser:watch"||we.method==="browser:desktop-watch"?{frameAck:!0}:{}}).then(P=>{be==null||be.postMessage({type:hn,id:we.id,ok:!0,result:P},window.location.origin)},P=>{be==null||be.postMessage({type:hn,id:we.id,ok:!1,error:P.message||"浏览器操作失败",code:P.code},window.location.origin)});return}Po(i,window.location.origin,[((un=w.current)==null?void 0:un.contentWindow)??null,m,((pn=y.current)==null?void 0:pn.contentWindow)??null,...[...x.current.values()].map(P=>P.contentWindow)],W)};return window.addEventListener("message",n),()=>window.removeEventListener("message",n)},[O,o,W,re]),r.useEffect(()=>{const n=b=>{var k,I;for(const F of[w,E])(I=(k=F.current)==null?void 0:k.contentWindow)==null||I.postMessage({type:at,event:b},window.location.origin)},m=["browser:session","browser:frame","browser:state","browser:closed","browser:webrtc","browser:desktop-activity"].map(b=>J(b,n));return()=>m.forEach(b=>b())},[J]),r.useEffect(()=>{var n,i;Dt&&((i=(n=w.current)==null?void 0:n.contentWindow)==null||i.postMessage({type:at,event:{type:"browser:connection",connected:z.connected,epoch:q}},window.location.origin))},[z.connected,q,Dt]),r.useEffect(()=>{var n,i;g&&((i=(n=E.current)==null?void 0:n.contentWindow)==null||i.postMessage({type:Vr,visible:l===Ee.id},window.location.origin))},[l,g]),r.useEffect(()=>{var n,i;g&&((i=(n=E.current)==null?void 0:n.contentWindow)==null||i.postMessage({type:at,event:{type:"browser:connection",connected:z.connected,epoch:q}},window.location.origin))},[z.connected,q,g]);const zt=r.useRef(0),Wt=l?M[l]??null:null;r.useEffect(()=>{const n=window.visualViewport;let i=null,m="";const b=()=>{const k=eo(n,{height:window.innerHeight,width:window.innerWidth}),I=`${k.width}x${k.height}+${k.top}+${k.left}`;I!==m&&(m=I,document.documentElement.style.setProperty("--vv-height",`${k.height}px`),document.documentElement.style.setProperty("--vv-width",`${k.width}px`),document.documentElement.style.setProperty("--vv-top",`${k.top}px`),document.documentElement.style.setProperty("--vv-left",`${k.left}px`),i&&window.clearTimeout(i),i=window.setTimeout(b,250))};return b(),n==null||n.addEventListener("resize",b),n==null||n.addEventListener("scroll",b),window.addEventListener("orientationchange",b),window.addEventListener("resize",b),document.addEventListener("visibilitychange",b),window.addEventListener("pageshow",b),()=>{n==null||n.removeEventListener("resize",b),n==null||n.removeEventListener("scroll",b),window.removeEventListener("orientationchange",b),window.removeEventListener("resize",b),document.removeEventListener("visibilitychange",b),window.removeEventListener("pageshow",b),i&&window.clearTimeout(i),document.documentElement.style.removeProperty("--vv-height"),document.documentElement.style.removeProperty("--vv-width"),document.documentElement.style.removeProperty("--vv-top"),document.documentElement.style.removeProperty("--vv-left")}},[]),r.useEffect(()=>{fetch("/api/web-console/preferences",{credentials:"same-origin"}).then(n=>n.json()).then(n=>{var i,m,b,k;typeof((i=n.preferences)==null?void 0:i.keybarHidden)=="boolean"&&Tt(n.preferences.keybarHidden),Array.isArray((m=n.preferences)==null?void 0:m.keyOrder)&&Nt(n.preferences.keyOrder),Array.isArray((b=n.preferences)==null?void 0:b.pinnedCommands)&&Rt(n.preferences.pinnedCommands),(k=n.preferences)!=null&&k.theme&&Lt(dt(n.preferences.theme).id)}).catch(()=>{}).finally(()=>Zn(!0)),fetch("/api/web-console/device-state",{credentials:"same-origin"}).then(n=>n.json()).then(n=>{const i=n.deviceState;i!=null&&i.drawerTab&&$e(i.drawerTab),i!=null&&i.activeTerminalId&&(jt.current=i.activeTerminalId),typeof(i==null?void 0:i.drawerOpen)=="boolean"&&de(i.drawerOpen),i!=null&&i.fileTreeRoot&&Et(i.fileTreeRoot),typeof(i==null?void 0:i.fileTreeFollowMode)=="boolean"&&St(i.fileTreeFollowMode),i!=null&&i.selectedFile&&Be(i.selectedFile),i!=null&&i.terminalScroll&&typeof i.terminalScroll=="object"&&Qe(i.terminalScroll)}).catch(()=>{}).finally(()=>Xn(!0))},[]);const Ot=r.useCallback(n=>{fetch("/api/web-console/preferences",{method:"PATCH",credentials:"same-origin",headers:{"content-type":"application/json","x-csrf-token":t.csrfToken},body:JSON.stringify(n)}).catch(()=>{})},[t.csrfToken]);r.useEffect(()=>{if(!At)return;const n=setTimeout(()=>Ot({keybarHidden:Ze,keyOrder:et,pinnedCommands:tt,theme:ke}),500);return()=>clearTimeout(n)},[Ze,et,tt,ke,At,Ot]);const He=r.useCallback(n=>{t.csrfToken&&fetch("/api/web-console/device-state",{method:"PUT",credentials:"same-origin",keepalive:!0,headers:{"content-type":"application/json","x-csrf-token":t.csrfToken},body:JSON.stringify(n)}).catch(()=>{})},[t.csrfToken]);r.useEffect(()=>{if(!t.csrfToken||!te||!ve)return;const n=setTimeout(()=>He({activeTerminalId:l,drawerOpen:ce,drawerTab:he,fileTreeRoot:Ne,fileTreeFollowMode:Re,selectedFile:ue,terminalScroll:Te}),500);return()=>clearTimeout(n)},[l,ce,he,Ne,Re,ue,Te,t.csrfToken,He,te,ve]),r.useEffect(()=>{if(!t.csrfToken||!te||!ve)return;const n=()=>He({activeTerminalId:l,drawerOpen:ce,drawerTab:he,fileTreeRoot:Ne,fileTreeFollowMode:Re,selectedFile:ue,terminalScroll:Te});return window.addEventListener("pagehide",n),()=>window.removeEventListener("pagehide",n)},[l,ce,he,Ne,Re,ue,Te,t.csrfToken,He,te,ve]);const rr=r.useCallback(n=>{Ct(null),Be(n),de(!1)},[]),or=r.useCallback(n=>{const i=A.find(k=>k.id===l);if(i!=null&&i.kind&&i.kind!=="webapp")return;if(i&&!i.kind){const k=ye.current.get(i.id);k?k(n,!0):Fe.current.set(i.id,n),de(!1);return}const m=A.length>=8?A.find(k=>!k.kind):null,b=(m==null?void 0:m.id)??`t-web-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`;m?Fe.current.set(b,n):B(k=>[...k,{id:b,title:`Terminal ${k.length+1}`,initialCommand:n}]),S(b),de(!1)},[l,A]);r.useEffect(()=>{if(!z.connected||!ve||V.current)return;V.current=!0;let n=!1,i=!1,m;return W("term:list").then(b=>{if(n)return;let k=null;try{k=Ln(localStorage.getItem(Oe))}catch{}const I=Xo(k,b.tabs,Ce.current);B(I),S(F=>{const G=Ce.current.find(ae=>ae.id===F&&ae.kind&&ae.kind!=="webapp");if(G)return G.id;const X=(k==null?void 0:k.activeTerminalId)||jt.current||F||oe.id;return X===oe.id?oe.id:I.some(ae=>ae.id===X)?X:oe.id}),i=!0,ze(!0)}).catch(()=>{n||(V.current=!1,m=setTimeout(()=>Yn(b=>b+1),2e3))}),()=>{n=!0,clearTimeout(m),i||(V.current=!1)}},[z.connected,ve,W,Oe,We]),r.useEffect(()=>{if(!te||window.location.hash!==Io)return;const n=new URL(window.location.href);n.hash="",window.history.replaceState(window.history.state,"",n),O()},[te,O]),r.useLayoutEffect(()=>{if(te)try{const n=Ln(JSON.stringify({tabs:A,activeTerminalId:l}));localStorage.setItem(Oe,JSON.stringify(n))}catch{}},[A,l,te,Oe]);const ir=n=>{var m;if(n===oe.id)return;const i=(m=A.find(b=>b.id===n))==null?void 0:m.kind;i==="remote-desktop"&&(C(0),Y(!1),W("browser:unwatch").catch(()=>{})),!(!i&&!window.confirm("关闭页签会终止该终端进程,确认关闭?"))&&(B(b=>{var I;const k=b.filter(F=>F.id!==n);return l===n&&S(((I=k[0])==null?void 0:I.id)??null),k}),i||W("term:kill",{id:n}).catch(()=>{}))},ar=r.useCallback(()=>{B(n=>{const i=n.find(m=>m.kind==="aihub");return i?(S(i.id),n):(S(Dn.id),[...n,{...Dn}])})},[]),sr=r.useCallback(()=>{B(n=>{const i=n.find(m=>m.kind==="flowstudio");return i?(S(i.id),n):(S(_n.id),[...n,{..._n}])})},[]),lr=r.useCallback(()=>{B(Pn),S(Ee.id)},[]),cr=r.useCallback(()=>{B(Jo),S(wt.id)},[]);r.useEffect(()=>{const n=J("term:exited",i=>{const m=i==null?void 0:i.id;m&&(B(b=>{const k=b.filter(I=>I.id!==m);return S(I=>{var F;return I===m?((F=k[0])==null?void 0:F.id)??null:I}),k}),Qe(b=>{if(!(m in b))return b;const k={...b};return delete k[m],k}))});return()=>{n()}},[J]);const Ft=r.useCallback(n=>{if(!l||A.length<2)return;const m=(A.findIndex(b=>b.id===l)+n+A.length)%A.length;S(A[m].id)},[l,A]),Bt=Math.max(0,A.findIndex(n=>n.id===l)),dr=((Ut=A[Bt])==null?void 0:Ut.kind)==="webapp"?Z.cssVars["--ui-term-col-bg"]:Z.termHostBg,ur={...se.root,...Z.cssVars,"--ui-active-content-bg":dr,"--ui-terminal-bg":Z.termHostBg,"--ui-primary-text":Z.keybar.accentText,background:"var(--ui-root-bg)",color:"var(--ui-text)"},me=r.useCallback(()=>{je.current=null,nt(0),rt(!1)},[]),it=r.useCallback(n=>{Math.abs(n)>=64&&A.length>1&&Ft(n<0?1:-1),me()},[A.length,Ft,me]),pr=n=>n instanceof Element&&!!n.closest(".terminal-screen");r.useEffect(()=>{const n=i=>{var b;if(l!==oe.id)return;const m=Yo(i,window.location.origin,((b=w.current)==null?void 0:b.contentWindow)??null);m&&(m.phase==="move"?(rt(!0),nt(m.deltaX)):m.phase==="end"?it(m.deltaX):me())};return window.addEventListener("message",n),()=>window.removeEventListener("message",n)},[l,it,me]);const qe=r.useCallback((n="smooth")=>{const i=_t.current;if(!i||!l)return;const m=i.querySelector(`[data-terminal-id="${l}"]`);if(!m)return;if(m===i.querySelector("[data-terminal-id]")){Zr(i);return}const b=i.querySelector(".terminal-connection"),k=(b==null?void 0:b.offsetWidth)??0,I=8,F=m.offsetLeft,G=F+m.offsetWidth,X=i.scrollLeft,ae=X+i.clientWidth-k;F<X+I?i.scrollTo({left:Math.max(0,F-I),behavior:n}):G>ae-I&&i.scrollTo({left:G-i.clientWidth+k+I,behavior:n})},[l]);r.useLayoutEffect(()=>{if(!l)return;const n=A.length>zt.current;zt.current=A.length,qe(n?"auto":"smooth")},[l,A.length,qe]),r.useEffect(()=>{const n=()=>requestAnimationFrame(()=>qe("auto"));return window.addEventListener("pageshow",n),()=>window.removeEventListener("pageshow",n)},[qe]);const mr=!a&&(N&&l===Ee.id||D&&l===oe.id);return e.jsxs("div",{className:`web-root ${mr?"is-remote-fullscreen":""}`,style:ur,children:[e.jsx("style",{dangerouslySetInnerHTML:{__html:Ar}}),e.jsxs("div",{className:"terminal-tabs",children:[a&&e.jsxs("div",{className:"computer-page-heading",children:[e.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":"返回电脑会话",title:"返回电脑会话",onClick:()=>s(null),children:e.jsx(Ur,{size:18})}),e.jsx("span",{children:a.name}),e.jsx("a",{className:"file-drawer-toggle",href:a.url,target:"_blank",rel:"noopener noreferrer","aria-label":"在新页面打开当前页面",title:"打开原页面",children:e.jsx(kt,{size:16})})]}),e.jsx("div",{className:"terminal-tab-list",ref:_t,hidden:!!a,children:A.map(n=>e.jsxs("div",{"data-terminal-id":n.id,draggable:!0,className:`terminal-tab ${n.id===l?"active":""}`,onDragStart:()=>{ot.current=n.id},onDragOver:i=>i.preventDefault(),onDrop:i=>{i.preventDefault();const m=ot.current;ot.current=null,!(!m||m===n.id)&&B(b=>{const k=b.findIndex(X=>X.id===m),I=b.findIndex(X=>X.id===n.id);if(k<0||I<0)return b;const F=[...b],[G]=F.splice(k,1);return F.splice(I,0,G),W("term:reorder",{ids:F.filter(X=>!X.kind).map(X=>X.id)}).catch(()=>{}),F})},onClick:()=>S(n.id),onDoubleClick:()=>{var m;if(n.kind)return;const i=(m=window.prompt("页签名称",n.title))==null?void 0:m.trim();i&&W("term:rename",{id:n.id,title:i}).then(()=>B(b=>b.map(k=>k.id===n.id?{...k,title:i}:k))).catch(()=>{})},children:[e.jsx("span",{children:n.title}),n.kind!=="webapp"&&e.jsx("button",{tabIndex:-1,onClick:i=>{i.stopPropagation(),ir(n.id)},children:"×"})]},n.id))}),e.jsx("button",{className:"terminal-add","aria-label":"新建终端页签",hidden:!!a,disabled:A.length>=8,onClick:O,children:"+"}),e.jsx("div",{className:"terminal-connection",children:e.jsx(Dr,{sortingDisabled:!pe.loaded||pe.saving,onReorder:(n,i)=>{const m=pe.settings.visibleTools;return pe.setVisibleTools(So(m,n,i))},avatar:e.jsx(yo,{username:((Ht=t.user)==null?void 0:Ht.username)??"?",connected:z.connected,accent:Z.keybar.accent,accentText:Z.keybar.accentText,selectedPageId:a==null?void 0:a.id,onSelectPage:f,onUpdatePage:T,configuration:pe,csrfToken:t.csrfToken}),items:[{id:"refresh",content:e.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":"刷新页面",title:"刷新页面",onClick:()=>a?p(n=>n+1):window.location.reload(),children:e.jsx(xe,{size:17,"aria-hidden":"true"})})},{id:"dashboard",content:e.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":"打开进行中的 Agent 会话",title:"进行中的 Agent 会话",onClick:()=>{s(null),B(An),S(Xe.id)},children:e.jsx(Fn,{size:17,"aria-hidden":"true"})})},{id:"collaboration",content:e.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":"打开群聊列表",title:"群聊列表",onClick:()=>{s(null),B(In),S(Ie.id)},children:e.jsx(xt,{size:17,"aria-hidden":"true"})})},{id:"install",content:e.jsx(co,{})},{id:"remote",content:e.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":"打开远程桌面",title:"远程桌面 · 浏览器直播",onClick:()=>{s(null),lr()},children:e.jsx(lt,{size:17,"aria-hidden":"true"})})},{id:"ai-hub",content:e.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":"打开 AI Hub",title:"AI Hub · 多模型对比",onClick:()=>{s(null),ar()},children:e.jsx(Wn,{size:17,"aria-hidden":"true"})})},{id:"flow",content:e.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":"打开数字人",title:"数字人 · Flow Studio",onClick:()=>{s(null),sr()},children:e.jsx(yt,{size:17,"aria-hidden":"true"})})},{id:"theme",content:e.jsx(Uo,{themeId:ke,onThemeChange:Lt})},{id:"files",content:e.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":ce?"关闭我的文件":"打开我的文件",title:"我的文件","aria-expanded":ce,onClick:()=>{s(null),de(n=>!n)},children:e.jsx(Hr,{size:17,"aria-hidden":"true"})})},{id:"calendar",content:e.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":"打开智能体日历",title:"日历 · 定时任务与待办",onClick:()=>{s(null),cr()},children:e.jsx(Bn,{size:17,"aria-hidden":"true"})})}].filter(n=>pe.settings.visibleTools.some(i=>i===n.id)).sort((n,i)=>pe.settings.visibleTools.findIndex(m=>m===n.id)-pe.settings.visibleTools.findIndex(m=>m===i.id))})})]}),e.jsxs("main",{className:`workspace ${ce?"show-tree":""} ${ue?"has-preview":""}`,hidden:!!a,style:se.workspace,children:[e.jsx("section",{className:"term-col",style:se.termCol,onPointerDownCapture:n=>{n.pointerType!=="touch"||!pr(n.target)||(me(),je.current={x:n.clientX,y:n.clientY,axis:"pending",pointerId:n.pointerId})},onPointerMoveCapture:n=>{const i=je.current;if(!i||n.pointerId!==i.pointerId||n.pointerType!=="touch")return;const m=n.clientX-i.x,b=n.clientY-i.y;if(i.axis==="pending"){if(Math.max(Math.abs(m),Math.abs(b))<=8)return;if(Math.abs(b)>=Math.abs(m)*1.2){je.current=null;return}i.axis="horizontal",rt(!0);const k=I=>{window.removeEventListener("pointerup",k),window.removeEventListener("pointercancel",k),je.current===i&&me()};window.addEventListener("pointerup",k),window.addEventListener("pointercancel",k)}i.axis==="horizontal"&&(n.preventDefault(),nt(m))},onPointerUpCapture:n=>{const i=je.current;if(!i||n.pointerId!==i.pointerId)return;const m=n.clientX-i.x;i.axis==="horizontal"&&Math.abs(m)>=64?it(m):me()},onPointerCancelCapture:me,children:e.jsx("div",{ref:c,className:"terminal-track",style:{transform:`translate3d(calc(${-Bt*100}% + ${tr}px),0,0)`,transition:nr?"none":"transform 260ms cubic-bezier(.22,.8,.32,1)"},children:A.map(n=>e.jsx("div",{className:"terminal-slide","data-console-tab":n.id,style:{position:"relative"},children:e.jsx(Go,{active:n.kind==="webapp"||!n.kind||n.id===l,children:n.kind==="webapp"?e.jsx("iframe",{ref:w,className:"webapp-frame",src:Ke("/app/"),title:n.title,onLoad:re}):n.kind==="session-dashboard"?e.jsx(st,{view:"sessions",title:"会话 Dashboard",onFrame:i=>{y.current=i},onLoad:re}):n.kind==="collaboration-dashboard"?e.jsx(st,{title:"群聊列表",onFrame:i=>{d.current=i},onLoad:re}):n.kind==="collaboration"?e.jsx(st,{groupId:n.groupId||"",discussionId:n.discussionId,title:n.title,onFrame:i=>{i?x.current.set(n.id,i):x.current.delete(n.id)},onLoad:re},`${n.id}-${n.discussionId??""}-${h[n.groupId||""]||0}`):n.kind==="remote-desktop"?e.jsxs("div",{style:{height:"100%",background:"var(--ui-term-col-bg, #101014)"},"aria-busy":!ee,children:[e.jsx("iframe",{ref:E,className:"webapp-frame",style:{visibility:ee?"visible":"hidden"},src:Ke("/app/?view=remote-desktop"),title:"远程桌面",onLoad:re}),!ee&&e.jsx(Je,{label:"REMOTE DESKTOP",title:"正在打开远程桌面",caption:"正在准备桌面与连接",icon:e.jsx(lt,{size:36,strokeWidth:1.5})})]}):n.kind==="calendar"?e.jsx("iframe",{className:"webapp-frame",src:Ke("/app/?view=calendar"),title:"智能体日历",onLoad:re}):n.kind==="aihub"?e.jsx(ti,{visible:n.id===l,rpc:W}):n.kind==="flowstudio"?e.jsx(ni,{visible:n.id===l}):e.jsx(Qo,{terminalId:n.id,title:n.title,initialCommand:n.initialCommand,visible:n.id===l,state:z,rpc:W,onEvent:J,onTerminalData:K,onTerminalReset:U,sendTerminalInput:ie,keyOrder:et,keybarHidden:Ze,onKeyOrderChange:Nt,onKeybarHiddenChange:Tt,terminalTheme:Z,initialScrollLine:Te[n.id]??null,onScrollLineChange:i=>Qe(m=>m[n.id]===i?m:{...m,[n.id]:i}),onRegisterFill:i=>Kn(n.id,i),onCwdChange:i=>i&&$(m=>({...m,[n.id]:i}))})})},n.id))})}),ce&&e.jsx("div",{className:"drawer-mask",onClick:()=>de(!1)}),e.jsxs("aside",{className:`tree-col ${ce?"tree-col-open":""}`,style:se.treeCol,children:[e.jsxs("div",{className:"tree-head",style:se.treeHead,children:[e.jsx("button",{className:he==="files"?"drawer-tab-active":"",onClick:()=>$e("files"),children:"文件"}),e.jsx("button",{className:he==="history"?"drawer-tab-active":"",onClick:()=>$e("history"),children:"历史"}),e.jsx("span",{className:"tree-cwd",style:se.treeCwd,children:Wt??""}),e.jsx("button",{style:{...se.iconBtn,marginLeft:"auto",flexShrink:0},onClick:()=>de(!1),"aria-label":"close drawer",children:e.jsx(Se,{size:15,"aria-hidden":"true"})})]}),he==="files"?e.jsx(Zo,{ready:q>0,followCwd:!0,cwd:Wt,gateway:le,onOpenFile:rr,selectedPath:ue??(Ue==null?void 0:Ue.path)??null,initialRoot:Ne,initialFollow:Re,revealRequest:Ue,onTreeStateChange:(n,i)=>{Et(n),St(i)}}):e.jsx(Bo,{csrfToken:t.csrfToken,terminalId:((qt=A.find(n=>n.id===l))==null?void 0:qt.kind)==="webapp"?null:l,pinnedCommands:tt,onPinnedCommandsChange:Rt,onFill:Gn,onExecute:or}),e.jsxs("div",{className:"tree-foot",style:se.treeFoot,children:[e.jsx("span",{style:se.treeFootDot}),e.jsx("span",{children:"实时同步"})]})]}),ue&&e.jsx("section",{className:"preview-col",style:se.previewCol,children:e.jsx(ei,{path:ue,gateway:le,onClose:()=>Be(null)})})]}),a&&e.jsx(Eo,{page:a,reloadKey:u},a.id)]})}const se={root:{height:"100dvh",display:"flex",flexDirection:"column",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", sans-serif',overflow:"hidden"},iconBtn:{minWidth:28,height:28,borderRadius:7,border:"1px solid var(--ui-tabbar-border, #303442)",background:"var(--ui-tab-bg, #202029)",color:"var(--ui-tab-text, #aaaab8)",fontSize:13},workspace:{flex:1,minHeight:0,display:"grid",position:"relative"},treeCol:{background:"var(--ui-tree-bg, #121218)",minHeight:0,flexDirection:"column"},treeHead:{display:"flex",alignItems:"center",gap:8,padding:"10px 12px 4px",fontSize:11,textTransform:"uppercase",letterSpacing:1,color:"#778",flexShrink:0},treeCwd:{fontSize:10,color:"#556",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:150,textTransform:"none",letterSpacing:0},treeFoot:{display:"flex",alignItems:"center",gap:7,minHeight:31,padding:"6px 11px calc(env(safe-area-inset-bottom) + 6px)",borderTop:"1px solid var(--ui-tabbar-border, #282832)",boxShadow:"0 -5px 16px rgba(0,0,0,.22)",background:"var(--ui-tab-bg, #15151c)",color:"var(--ui-connection-text, #777789)",fontSize:10.5,flexShrink:0},treeFootDot:{width:6,height:6,borderRadius:99,background:"var(--ui-success, #9ece6a)",boxShadow:"0 0 0 2px color-mix(in srgb, var(--ui-success, #9ece6a) 12%, transparent)",flexShrink:0},termCol:{minWidth:0,minHeight:0,display:"flex",flexDirection:"column",background:"var(--ui-term-col-bg, #101014)",gridColumn:1,overflow:"hidden"},previewCol:{minWidth:0,minHeight:0}},ki=Object.freeze(Object.defineProperty({__proto__:null,default:ri},Symbol.toStringTag,{value:"Module"}));export{Je as F,ki as p};
|
|
86
|
+
`})]})}function Go({active:t,children:o}){const[a,s]=r.useState(t);return r.useEffect(()=>{t&&s(!0)},[t]),t||a?o:null}function Ln(t){try{const o=JSON.parse(t||"null");if(!o||!Array.isArray(o.tabs))return null;const a=new Set,s=new Set(["webapp","aihub","flowstudio","remote-desktop","collaboration","collaboration-dashboard","session-dashboard","calendar"]),c=[];for(const u of o.tabs.slice(0,100))!u||typeof u.id!="string"||typeof u.title!="string"||a.has(u.id)||u.kind!==void 0&&!s.has(u.kind)||u.kind==="collaboration"&&typeof u.groupId!="string"||(a.add(u.id),c.push({id:u.id,title:u.title,...u.kind?{kind:u.kind}:{},...typeof u.groupId=="string"?{groupId:u.groupId}:{},...typeof u.discussionId=="string"&&/^[\w-]{1,200}$/.test(u.discussionId)?{discussionId:u.discussionId}:{}}));return{tabs:c,activeTerminalId:typeof o.activeTerminalId=="string"&&o.activeTerminalId!=="messaging"?o.activeTerminalId:null}}catch{return null}}function Xo(t,o,a){const s=new Map(o.filter(p=>p.status==="active"||p.status==="detached").map(p=>[p.id,{id:p.id,title:p.title}])),c=[],u=new Set;for(const p of[...(t==null?void 0:t.tabs)??[],...a,...s.values()])u.has(p.id)||!p.kind&&!s.has(p.id)||(u.add(p.id),c.push(p.kind?p:s.get(p.id)));return c}const Ee={id:"remote-desktop",title:"远程桌面",kind:"remote-desktop"};function Pn(t){const o=t.find(a=>a.kind==="remote-desktop");return o?t.map(a=>a===o?{...Ee}:a):[...t,{...Ee}]}const Ie={id:"collaboration-dashboard",title:"群聊列表",kind:"collaboration-dashboard"};function In(t){return t.some(o=>o.id===Ie.id)?t:[...t,{...Ie}]}const Xe={id:"session-dashboard",title:"Dashboard",kind:"session-dashboard"};function An(t){return t.some(o=>o.id===Xe.id)?t:[...t,{...Xe}]}const wt={id:"calendar",title:"日历",kind:"calendar"};function Jo(t){return t.some(o=>o.id===wt.id)?t:[...t,{...wt}]}const Qo=Me(()=>_e(()=>import("./TerminalPane-_dVVs00I.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),{ssr:!1}),Zo=Me(()=>_e(()=>import("./FileTree-BuhW-pqR.js"),__vite__mapDeps([6,1,2,7,8,9,10,11,12,13]),import.meta.url),{ssr:!1}),ei=Me(()=>_e(()=>import("./FilePreview-CcJXlLge.js").then(t=>t.b),__vite__mapDeps([14,1,2,15,16,10,13,17,18,9,19]),import.meta.url),{ssr:!1}),ti=Me(()=>_e(()=>import("./AiHubPane-C070jRHe.js"),__vite__mapDeps([20,1,2,9,11,21,10,22]),import.meta.url),{ssr:!1}),ni=Me(()=>_e(()=>import("./FlowStudioPane-CxQ-QIOf.js"),__vite__mapDeps([23,1,2,24,25,9,11,17,13,4,12,26,15,3,27,28,29]),import.meta.url),{ssr:!1,loading:()=>e.jsx(Je,{})});function ri(){return e.jsx(Wo,{children:(t,o)=>e.jsx(ai,{auth:t,onWorkspaceReady:o})})}const oe={id:"webapp-agent",title:"智能助手",kind:"webapp"},Dn={id:"ai-hub",title:"AI Hub",kind:"aihub"},_n={id:"flow-studio",title:"Flow Studio",kind:"flowstudio"};function oi(){var t;return typeof document>"u"?_r:dt((t=document.getElementById("web-theme-root"))==null?void 0:t.dataset.webTheme).id}const ii="agent-web-shell:skin:v1";function ai({auth:t,onWorkspaceReady:o}){var $t,Ut,Ht,qt;const[a,s]=r.useState(null),c=r.useRef(null),[u,p]=r.useState(0),f=r.useCallback(n=>{if((n==null?void 0:n.openMode)==="new-tab"){window.open(n.url,"_blank","noopener,noreferrer");return}s(n)},[]),T=r.useCallback(n=>s((n==null?void 0:n.openMode)==="current"?n:null),[]),w=r.useRef(null),E=r.useRef(null),d=r.useRef(null),y=r.useRef(null),j=r.useRef(null),R=r.useRef(!1),[h,v]=r.useState({}),x=r.useRef(new Map),[g,C]=r.useState(0),[N,L]=r.useState(!1),[D,Q]=r.useState(!1),[ee,Y]=r.useState(!1),ne=r.useRef(()=>{}),_=r.useCallback(n=>{var m;const i=_o(n);if(!(!i||i.type!==bt.watcherFrame)){ne.current(i.channelId,i.sequence);for(const b of[w,E]){if(!((m=b.current)!=null&&m.contentWindow))continue;const k=i.payload.slice().buffer;b.current.contentWindow.postMessage({type:Pr,channelId:i.channelId,sequence:i.sequence,data:k},window.location.origin,[k])}}},[]),{state:z,epoch:q,rpc:W,onEvent:J,onTerminalData:K,onTerminalReset:U,sendTerminalInput:ie}=Qr(_,t.getWsNonce,t.refresh),le=r.useMemo(()=>({request:(n,i,m)=>W(n,i,m),subscribe:(n,i)=>J("fs:event",i)}),[J,W]);ne.current=(n,i)=>{W("browser:frame-ack",{channelId:n,sequence:i}).catch(()=>{})};const[A,B]=r.useState([{...oe}]),Ce=r.useRef(A);Ce.current=A;const[l,S]=r.useState(oe.id),O=r.useCallback(()=>{if(A.length>=8)return;const n=`t-web-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`;B(i=>i.length>=8?i:[...i,{id:n,title:`Terminal ${i.length+1}`}]),S(n)},[A.length]);Mo(c,l,!a);const[M,$]=r.useState({}),V=r.useRef(!1),[te,ze]=r.useState(!1),[We,Yn]=r.useState(0),Oe=`agentroam:workspace:${typeof window>"u"?"":De()}:${(($t=t.user)==null?void 0:$t.id)??""}`,jt=r.useRef(null),ye=r.useRef(new Map),Fe=r.useRef(new Map),Kn=r.useCallback((n,i)=>{ye.current.set(n,i);const m=window.setTimeout(()=>{if(ye.current.get(n)!==i)return;const b=Fe.current.get(n);b&&(Fe.current.delete(n),i(b,!0))},180);return()=>{window.clearTimeout(m),ye.current.get(n)===i&&ye.current.delete(n)}},[]),Gn=r.useCallback(n=>{var m;if(!l||(m=A.find(b=>b.id===l))!=null&&m.kind)return;const i=ye.current.get(l);i?i(n):W("term:input",{id:l,data:`${n}`}).catch(()=>{}),de(!1)},[l,W,A]),[ve,Xn]=r.useState(!1),[Te,Qe]=r.useState({}),[ue,Be]=r.useState(null),[ce,de]=r.useState(!1),[he,$e]=r.useState("files"),[Ne,Et]=r.useState(null),[Re,St]=r.useState(!0),[Ue,Ct]=r.useState(null),[Ze,Tt]=r.useState(!1),[et,Nt]=r.useState([]),[tt,Rt]=r.useState(Lo()),[ke,Lt]=r.useState(oi),[Pt,Jn]=r.useState(ct),[It,Qn]=r.useState(!1);r.useEffect(()=>{const n=()=>{try{Jn(Ho(window.localStorage))}catch{}Qn(!0)},i=m=>{(m.key===Vn||m.key===null)&&n()};return n(),window.addEventListener("storage",i),()=>window.removeEventListener("storage",i)},[]);const[At,Zn]=r.useState(!1),pe=No(t.csrfToken),[Dt,er]=r.useState(!1),Z=dt(ke),je=r.useRef(null),[tr,nt]=r.useState(0),[nr,rt]=r.useState(!1),ot=r.useRef(null),_t=r.useRef(null),Mt=r.useCallback(n=>{var m;const i=[w.current,E.current,d.current,y.current,...x.current.values()];for(const b of i)(m=b==null?void 0:b.contentWindow)==null||m.postMessage({type:ii,skin:n},window.location.origin)},[]),re=r.useCallback(()=>{var i;if(Mt(ke),!It)return;const n=[w.current,E.current,d.current,y.current,...x.current.values()];for(const m of n)(i=m==null?void 0:m.contentWindow)==null||i.postMessage({type:Ir,navigationLayout:Pt},window.location.origin)},[ke,Pt,It,Mt]);r.useEffect(()=>{re()},[re]),r.useEffect(()=>{const n=Z.cssVars["--ui-root-bg"],i=Z.cssVars["--ui-color-scheme"],m=document.getElementById("web-theme-root");for(const[k,I]of Object.entries(Z.cssVars))m==null||m.style.setProperty(k,I);m&&(m.dataset.webTheme=Z.id),document.documentElement.style.background=n,document.documentElement.style.colorScheme=i,document.body.style.background=n,document.body.style.colorScheme=i;let b=document.querySelector('meta[name="theme-color"]');b||(b=document.createElement("meta"),b.name="theme-color",document.head.append(b)),b.content=Z.cssVars["--ui-tabbar-bg"]},[Z]),r.useEffect(()=>{const n=i=>{var Vt,Yt,Kt,Gt,Xt,Jt,Qt,Zt,en,tn,nn,rn,on,an,sn,ln,cn,dn,un,pn;const m=((Vt=d.current)==null?void 0:Vt.contentWindow)??null,b=[(Yt=w.current)==null?void 0:Yt.contentWindow,m,(Kt=y.current)==null?void 0:Kt.contentWindow,...[...x.current.values()].map(P=>P.contentWindow)].find(P=>P&&P===i.source)??null,k=ao(i,window.location.origin,b);if(k){if(s(null),k.kind==="dashboard")B(An),S(Xe.id);else if(k.kind==="groups")B(In),S(Ie.id);else if(k.kind==="group"){const P=`collaboration-${k.groupId}`,H={id:P,title:k.title,kind:"collaboration",groupId:k.groupId,discussionId:k.discussionId};B(fe=>fe.some(Ve=>Ve.id===P)?fe.map(Ve=>Ve.id===P?H:Ve):[...fe,H]),S(P)}else R.current?(Xt=(Gt=w.current)==null?void 0:Gt.contentWindow)==null||Xt.postMessage({type:xn,intent:k},window.location.origin):j.current=k,S(oe.id);return}const I=ro(i,window.location.origin,m);if(I){B(P=>I.deleted?P.filter(H=>H.groupId!==I.groupId):P.map(H=>H.groupId===I.groupId?{...H,title:I.title}:H)),I.deleted?S(P=>P===`collaboration-${I.groupId}`?Ie.id:P):v(P=>({...P,[I.groupId]:(P[I.groupId]||0)+1}));return}const F=oo(i,window.location.origin,i.source===m?m:((Jt=w.current)==null?void 0:Jt.contentWindow)??null);if(F){const P=`collaboration-${F.groupId}`;B(H=>H.some(fe=>fe.id===P)?H:[...H,{id:P,title:F.title,kind:"collaboration",groupId:F.groupId}]),S(P);return}if(Ao(i,window.location.origin,((Qt=w.current)==null?void 0:Qt.contentWindow)??null)){s(null),O();return}const G=((Zt=E.current)==null?void 0:Zt.contentWindow)??null,X=bn(i,window.location.origin,G);if(X!==null){L(X);return}const ae=bn(i,window.location.origin,((en=w.current)==null?void 0:en.contentWindow)??null);if(ae!==null){Q(ae);return}if(Rn(i,window.location.origin,G)){L(!1),C(P=>P+1),Y(!1),re();return}if(G&&i.origin===window.location.origin&&i.source===G&&((tn=i.data)==null?void 0:tn.type)===Yr){Y(!0);return}if(i.origin===window.location.origin&&i.source===G&&G&&((nn=i.data)==null?void 0:nn.type)===Kr){L(!1),W("browser:unwatch").catch(()=>{}),B(P=>P.filter(H=>H.kind!=="remote-desktop")),C(0),Y(!1),S(oe.id);return}if(Mr(i,window.location.origin,((rn=w.current)==null?void 0:rn.contentWindow)??null)){B(Pn),S(Ee.id);return}if(Rn(i,window.location.origin,((on=w.current)==null?void 0:on.contentWindow)??null)){Q(!1),R.current=!0,er(!0),re(),o(),j.current&&((sn=(an=w.current)==null?void 0:an.contentWindow)==null||sn.postMessage({type:xn,intent:j.current},window.location.origin),j.current=null);return}const fr=(ln=[...x.current.values()].find(P=>P.contentWindow===i.source))==null?void 0:ln.contentWindow,ge=Xr(i,window.location.origin,fr??((cn=w.current)==null?void 0:cn.contentWindow)??null);if(ge){const P=H=>{$e("files"),de(!wn(H)),Be(ge.revealOnly?null:H),Ct(wn(H)?null:{path:H,requestId:ge.requestId,rootAtParent:ge.revealOnly})};ge.path.startsWith("~/")?W("hello").then(({home:H})=>{const fe=Jr(ge.path,null,H);fe&&P(fe)}).catch(()=>{}):P(ge.path);return}const be=i.source===G&&G?G:((dn=w.current)==null?void 0:dn.contentWindow)??null,we=zr(i,window.location.origin,be);if(we){W(we.method,{...we.payload,...we.method==="browser:watch"||we.method==="browser:desktop-watch"?{frameAck:!0}:{}}).then(P=>{be==null||be.postMessage({type:hn,id:we.id,ok:!0,result:P},window.location.origin)},P=>{be==null||be.postMessage({type:hn,id:we.id,ok:!1,error:P.message||"浏览器操作失败",code:P.code},window.location.origin)});return}Po(i,window.location.origin,[((un=w.current)==null?void 0:un.contentWindow)??null,m,((pn=y.current)==null?void 0:pn.contentWindow)??null,...[...x.current.values()].map(P=>P.contentWindow)],W)};return window.addEventListener("message",n),()=>window.removeEventListener("message",n)},[O,o,W,re]),r.useEffect(()=>{const n=b=>{var k,I;for(const F of[w,E])(I=(k=F.current)==null?void 0:k.contentWindow)==null||I.postMessage({type:at,event:b},window.location.origin)},m=["browser:session","browser:frame","browser:state","browser:closed","browser:webrtc","browser:desktop-activity"].map(b=>J(b,n));return()=>m.forEach(b=>b())},[J]),r.useEffect(()=>{var n,i;Dt&&((i=(n=w.current)==null?void 0:n.contentWindow)==null||i.postMessage({type:at,event:{type:"browser:connection",connected:z.connected,epoch:q}},window.location.origin))},[z.connected,q,Dt]),r.useEffect(()=>{var n,i;g&&((i=(n=E.current)==null?void 0:n.contentWindow)==null||i.postMessage({type:Vr,visible:l===Ee.id},window.location.origin))},[l,g]),r.useEffect(()=>{var n,i;g&&((i=(n=E.current)==null?void 0:n.contentWindow)==null||i.postMessage({type:at,event:{type:"browser:connection",connected:z.connected,epoch:q}},window.location.origin))},[z.connected,q,g]);const zt=r.useRef(0),Wt=l?M[l]??null:null;r.useEffect(()=>{const n=window.visualViewport;let i=null,m="";const b=()=>{const k=eo(n,{height:window.innerHeight,width:window.innerWidth}),I=`${k.width}x${k.height}+${k.top}+${k.left}`;I!==m&&(m=I,document.documentElement.style.setProperty("--vv-height",`${k.height}px`),document.documentElement.style.setProperty("--vv-width",`${k.width}px`),document.documentElement.style.setProperty("--vv-top",`${k.top}px`),document.documentElement.style.setProperty("--vv-left",`${k.left}px`),i&&window.clearTimeout(i),i=window.setTimeout(b,250))};return b(),n==null||n.addEventListener("resize",b),n==null||n.addEventListener("scroll",b),window.addEventListener("orientationchange",b),window.addEventListener("resize",b),document.addEventListener("visibilitychange",b),window.addEventListener("pageshow",b),()=>{n==null||n.removeEventListener("resize",b),n==null||n.removeEventListener("scroll",b),window.removeEventListener("orientationchange",b),window.removeEventListener("resize",b),document.removeEventListener("visibilitychange",b),window.removeEventListener("pageshow",b),i&&window.clearTimeout(i),document.documentElement.style.removeProperty("--vv-height"),document.documentElement.style.removeProperty("--vv-width"),document.documentElement.style.removeProperty("--vv-top"),document.documentElement.style.removeProperty("--vv-left")}},[]),r.useEffect(()=>{fetch("/api/web-console/preferences",{credentials:"same-origin"}).then(n=>n.json()).then(n=>{var i,m,b,k;typeof((i=n.preferences)==null?void 0:i.keybarHidden)=="boolean"&&Tt(n.preferences.keybarHidden),Array.isArray((m=n.preferences)==null?void 0:m.keyOrder)&&Nt(n.preferences.keyOrder),Array.isArray((b=n.preferences)==null?void 0:b.pinnedCommands)&&Rt(n.preferences.pinnedCommands),(k=n.preferences)!=null&&k.theme&&Lt(dt(n.preferences.theme).id)}).catch(()=>{}).finally(()=>Zn(!0)),fetch("/api/web-console/device-state",{credentials:"same-origin"}).then(n=>n.json()).then(n=>{const i=n.deviceState;i!=null&&i.drawerTab&&$e(i.drawerTab),i!=null&&i.activeTerminalId&&(jt.current=i.activeTerminalId),typeof(i==null?void 0:i.drawerOpen)=="boolean"&&de(i.drawerOpen),i!=null&&i.fileTreeRoot&&Et(i.fileTreeRoot),typeof(i==null?void 0:i.fileTreeFollowMode)=="boolean"&&St(i.fileTreeFollowMode),i!=null&&i.selectedFile&&Be(i.selectedFile),i!=null&&i.terminalScroll&&typeof i.terminalScroll=="object"&&Qe(i.terminalScroll)}).catch(()=>{}).finally(()=>Xn(!0))},[]);const Ot=r.useCallback(n=>{fetch("/api/web-console/preferences",{method:"PATCH",credentials:"same-origin",headers:{"content-type":"application/json","x-csrf-token":t.csrfToken},body:JSON.stringify(n)}).catch(()=>{})},[t.csrfToken]);r.useEffect(()=>{if(!At)return;const n=setTimeout(()=>Ot({keybarHidden:Ze,keyOrder:et,pinnedCommands:tt,theme:ke}),500);return()=>clearTimeout(n)},[Ze,et,tt,ke,At,Ot]);const He=r.useCallback(n=>{t.csrfToken&&fetch("/api/web-console/device-state",{method:"PUT",credentials:"same-origin",keepalive:!0,headers:{"content-type":"application/json","x-csrf-token":t.csrfToken},body:JSON.stringify(n)}).catch(()=>{})},[t.csrfToken]);r.useEffect(()=>{if(!t.csrfToken||!te||!ve)return;const n=setTimeout(()=>He({activeTerminalId:l,drawerOpen:ce,drawerTab:he,fileTreeRoot:Ne,fileTreeFollowMode:Re,selectedFile:ue,terminalScroll:Te}),500);return()=>clearTimeout(n)},[l,ce,he,Ne,Re,ue,Te,t.csrfToken,He,te,ve]),r.useEffect(()=>{if(!t.csrfToken||!te||!ve)return;const n=()=>He({activeTerminalId:l,drawerOpen:ce,drawerTab:he,fileTreeRoot:Ne,fileTreeFollowMode:Re,selectedFile:ue,terminalScroll:Te});return window.addEventListener("pagehide",n),()=>window.removeEventListener("pagehide",n)},[l,ce,he,Ne,Re,ue,Te,t.csrfToken,He,te,ve]);const rr=r.useCallback(n=>{Ct(null),Be(n),de(!1)},[]),or=r.useCallback(n=>{const i=A.find(k=>k.id===l);if(i!=null&&i.kind&&i.kind!=="webapp")return;if(i&&!i.kind){const k=ye.current.get(i.id);k?k(n,!0):Fe.current.set(i.id,n),de(!1);return}const m=A.length>=8?A.find(k=>!k.kind):null,b=(m==null?void 0:m.id)??`t-web-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`;m?Fe.current.set(b,n):B(k=>[...k,{id:b,title:`Terminal ${k.length+1}`,initialCommand:n}]),S(b),de(!1)},[l,A]);r.useEffect(()=>{if(!z.connected||!ve||V.current)return;V.current=!0;let n=!1,i=!1,m;return W("term:list").then(b=>{if(n)return;let k=null;try{k=Ln(localStorage.getItem(Oe))}catch{}const I=Xo(k,b.tabs,Ce.current);B(I),S(F=>{const G=Ce.current.find(ae=>ae.id===F&&ae.kind&&ae.kind!=="webapp");if(G)return G.id;const X=(k==null?void 0:k.activeTerminalId)||jt.current||F||oe.id;return X===oe.id?oe.id:I.some(ae=>ae.id===X)?X:oe.id}),i=!0,ze(!0)}).catch(()=>{n||(V.current=!1,m=setTimeout(()=>Yn(b=>b+1),2e3))}),()=>{n=!0,clearTimeout(m),i||(V.current=!1)}},[z.connected,ve,W,Oe,We]),r.useEffect(()=>{if(!te||window.location.hash!==Io)return;const n=new URL(window.location.href);n.hash="",window.history.replaceState(window.history.state,"",n),O()},[te,O]),r.useLayoutEffect(()=>{if(te)try{const n=Ln(JSON.stringify({tabs:A,activeTerminalId:l}));localStorage.setItem(Oe,JSON.stringify(n))}catch{}},[A,l,te,Oe]);const ir=n=>{var m;if(n===oe.id)return;const i=(m=A.find(b=>b.id===n))==null?void 0:m.kind;i==="remote-desktop"&&(C(0),Y(!1),W("browser:unwatch").catch(()=>{})),!(!i&&!window.confirm("关闭页签会终止该终端进程,确认关闭?"))&&(B(b=>{var I;const k=b.filter(F=>F.id!==n);return l===n&&S(((I=k[0])==null?void 0:I.id)??null),k}),i||W("term:kill",{id:n}).catch(()=>{}))},ar=r.useCallback(()=>{B(n=>{const i=n.find(m=>m.kind==="aihub");return i?(S(i.id),n):(S(Dn.id),[...n,{...Dn}])})},[]),sr=r.useCallback(()=>{B(n=>{const i=n.find(m=>m.kind==="flowstudio");return i?(S(i.id),n):(S(_n.id),[...n,{..._n}])})},[]),lr=r.useCallback(()=>{B(Pn),S(Ee.id)},[]),cr=r.useCallback(()=>{B(Jo),S(wt.id)},[]);r.useEffect(()=>{const n=J("term:exited",i=>{const m=i==null?void 0:i.id;m&&(B(b=>{const k=b.filter(I=>I.id!==m);return S(I=>{var F;return I===m?((F=k[0])==null?void 0:F.id)??null:I}),k}),Qe(b=>{if(!(m in b))return b;const k={...b};return delete k[m],k}))});return()=>{n()}},[J]);const Ft=r.useCallback(n=>{if(!l||A.length<2)return;const m=(A.findIndex(b=>b.id===l)+n+A.length)%A.length;S(A[m].id)},[l,A]),Bt=Math.max(0,A.findIndex(n=>n.id===l)),dr=((Ut=A[Bt])==null?void 0:Ut.kind)==="webapp"?Z.cssVars["--ui-term-col-bg"]:Z.termHostBg,ur={...se.root,...Z.cssVars,"--ui-active-content-bg":dr,"--ui-terminal-bg":Z.termHostBg,"--ui-primary-text":Z.keybar.accentText,background:"var(--ui-root-bg)",color:"var(--ui-text)"},me=r.useCallback(()=>{je.current=null,nt(0),rt(!1)},[]),it=r.useCallback(n=>{Math.abs(n)>=64&&A.length>1&&Ft(n<0?1:-1),me()},[A.length,Ft,me]),pr=n=>n instanceof Element&&!!n.closest(".terminal-screen");r.useEffect(()=>{const n=i=>{var b;if(l!==oe.id)return;const m=Yo(i,window.location.origin,((b=w.current)==null?void 0:b.contentWindow)??null);m&&(m.phase==="move"?(rt(!0),nt(m.deltaX)):m.phase==="end"?it(m.deltaX):me())};return window.addEventListener("message",n),()=>window.removeEventListener("message",n)},[l,it,me]);const qe=r.useCallback((n="smooth")=>{const i=_t.current;if(!i||!l)return;const m=i.querySelector(`[data-terminal-id="${l}"]`);if(!m)return;if(m===i.querySelector("[data-terminal-id]")){Zr(i);return}const b=i.querySelector(".terminal-connection"),k=(b==null?void 0:b.offsetWidth)??0,I=8,F=m.offsetLeft,G=F+m.offsetWidth,X=i.scrollLeft,ae=X+i.clientWidth-k;F<X+I?i.scrollTo({left:Math.max(0,F-I),behavior:n}):G>ae-I&&i.scrollTo({left:G-i.clientWidth+k+I,behavior:n})},[l]);r.useLayoutEffect(()=>{if(!l)return;const n=A.length>zt.current;zt.current=A.length,qe(n?"auto":"smooth")},[l,A.length,qe]),r.useEffect(()=>{const n=()=>requestAnimationFrame(()=>qe("auto"));return window.addEventListener("pageshow",n),()=>window.removeEventListener("pageshow",n)},[qe]);const mr=!a&&(N&&l===Ee.id||D&&l===oe.id);return e.jsxs("div",{className:`web-root ${mr?"is-remote-fullscreen":""}`,style:ur,children:[e.jsx("style",{dangerouslySetInnerHTML:{__html:Ar}}),e.jsxs("div",{className:"terminal-tabs",children:[a&&e.jsxs("div",{className:"computer-page-heading",children:[e.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":"返回电脑会话",title:"返回电脑会话",onClick:()=>s(null),children:e.jsx(Ur,{size:18})}),e.jsx("span",{children:a.name}),e.jsx("a",{className:"file-drawer-toggle",href:a.url,target:"_blank",rel:"noopener noreferrer","aria-label":"在新页面打开当前页面",title:"打开原页面",children:e.jsx(kt,{size:16})})]}),e.jsx("div",{className:"terminal-tab-list",ref:_t,hidden:!!a,children:A.map(n=>e.jsxs("div",{"data-terminal-id":n.id,draggable:!0,className:`terminal-tab ${n.id===l?"active":""}`,onDragStart:()=>{ot.current=n.id},onDragOver:i=>i.preventDefault(),onDrop:i=>{i.preventDefault();const m=ot.current;ot.current=null,!(!m||m===n.id)&&B(b=>{const k=b.findIndex(X=>X.id===m),I=b.findIndex(X=>X.id===n.id);if(k<0||I<0)return b;const F=[...b],[G]=F.splice(k,1);return F.splice(I,0,G),W("term:reorder",{ids:F.filter(X=>!X.kind).map(X=>X.id)}).catch(()=>{}),F})},onClick:()=>S(n.id),onDoubleClick:()=>{var m;if(n.kind)return;const i=(m=window.prompt("页签名称",n.title))==null?void 0:m.trim();i&&W("term:rename",{id:n.id,title:i}).then(()=>B(b=>b.map(k=>k.id===n.id?{...k,title:i}:k))).catch(()=>{})},children:[e.jsx("span",{children:n.title}),n.kind!=="webapp"&&e.jsx("button",{tabIndex:-1,onClick:i=>{i.stopPropagation(),ir(n.id)},children:"×"})]},n.id))}),e.jsx("button",{className:"terminal-add","aria-label":"新建终端页签",hidden:!!a,disabled:A.length>=8,onClick:O,children:"+"}),e.jsx("div",{className:"terminal-connection",children:e.jsx(Dr,{sortingDisabled:!pe.loaded||pe.saving,onReorder:(n,i)=>{const m=pe.settings.visibleTools;return pe.setVisibleTools(So(m,n,i))},avatar:e.jsx(yo,{username:((Ht=t.user)==null?void 0:Ht.username)??"?",connected:z.connected,accent:Z.keybar.accent,accentText:Z.keybar.accentText,selectedPageId:a==null?void 0:a.id,onSelectPage:f,onUpdatePage:T,configuration:pe,csrfToken:t.csrfToken}),items:[{id:"refresh",content:e.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":"刷新页面",title:"刷新页面",onClick:()=>a?p(n=>n+1):window.location.reload(),children:e.jsx(xe,{size:17,"aria-hidden":"true"})})},{id:"dashboard",content:e.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":"打开进行中的 Agent 会话",title:"进行中的 Agent 会话",onClick:()=>{s(null),B(An),S(Xe.id)},children:e.jsx(Fn,{size:17,"aria-hidden":"true"})})},{id:"collaboration",content:e.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":"打开群聊列表",title:"群聊列表",onClick:()=>{s(null),B(In),S(Ie.id)},children:e.jsx(xt,{size:17,"aria-hidden":"true"})})},{id:"install",content:e.jsx(co,{})},{id:"remote",content:e.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":"打开远程桌面",title:"远程桌面 · 浏览器直播",onClick:()=>{s(null),lr()},children:e.jsx(lt,{size:17,"aria-hidden":"true"})})},{id:"ai-hub",content:e.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":"打开 AI Hub",title:"AI Hub · 多模型对比",onClick:()=>{s(null),ar()},children:e.jsx(Wn,{size:17,"aria-hidden":"true"})})},{id:"flow",content:e.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":"打开数字人",title:"数字人 · Flow Studio",onClick:()=>{s(null),sr()},children:e.jsx(yt,{size:17,"aria-hidden":"true"})})},{id:"theme",content:e.jsx(Uo,{themeId:ke,onThemeChange:Lt})},{id:"files",content:e.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":ce?"关闭我的文件":"打开我的文件",title:"我的文件","aria-expanded":ce,onClick:()=>{s(null),de(n=>!n)},children:e.jsx(Hr,{size:17,"aria-hidden":"true"})})},{id:"calendar",content:e.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":"打开智能体日历",title:"日历 · 定时任务与待办",onClick:()=>{s(null),cr()},children:e.jsx(Bn,{size:17,"aria-hidden":"true"})})}].filter(n=>pe.settings.visibleTools.some(i=>i===n.id)).sort((n,i)=>pe.settings.visibleTools.findIndex(m=>m===n.id)-pe.settings.visibleTools.findIndex(m=>m===i.id))})})]}),e.jsxs("main",{className:`workspace ${ce?"show-tree":""} ${ue?"has-preview":""}`,hidden:!!a,style:se.workspace,children:[e.jsx("section",{className:"term-col",style:se.termCol,onPointerDownCapture:n=>{n.pointerType!=="touch"||!pr(n.target)||(me(),je.current={x:n.clientX,y:n.clientY,axis:"pending",pointerId:n.pointerId})},onPointerMoveCapture:n=>{const i=je.current;if(!i||n.pointerId!==i.pointerId||n.pointerType!=="touch")return;const m=n.clientX-i.x,b=n.clientY-i.y;if(i.axis==="pending"){if(Math.max(Math.abs(m),Math.abs(b))<=8)return;if(Math.abs(b)>=Math.abs(m)*1.2){je.current=null;return}i.axis="horizontal",rt(!0);const k=I=>{window.removeEventListener("pointerup",k),window.removeEventListener("pointercancel",k),je.current===i&&me()};window.addEventListener("pointerup",k),window.addEventListener("pointercancel",k)}i.axis==="horizontal"&&(n.preventDefault(),nt(m))},onPointerUpCapture:n=>{const i=je.current;if(!i||n.pointerId!==i.pointerId)return;const m=n.clientX-i.x;i.axis==="horizontal"&&Math.abs(m)>=64?it(m):me()},onPointerCancelCapture:me,children:e.jsx("div",{ref:c,className:"terminal-track",style:{transform:`translate3d(calc(${-Bt*100}% + ${tr}px),0,0)`,transition:nr?"none":"transform 260ms cubic-bezier(.22,.8,.32,1)"},children:A.map(n=>e.jsx("div",{className:"terminal-slide","data-console-tab":n.id,style:{position:"relative"},children:e.jsx(Go,{active:n.kind==="webapp"||!n.kind||n.id===l,children:n.kind==="webapp"?e.jsx("iframe",{ref:w,className:"webapp-frame",src:Ke("/app/"),title:n.title,onLoad:re}):n.kind==="session-dashboard"?e.jsx(st,{view:"sessions",title:"会话 Dashboard",onFrame:i=>{y.current=i},onLoad:re}):n.kind==="collaboration-dashboard"?e.jsx(st,{title:"群聊列表",onFrame:i=>{d.current=i},onLoad:re}):n.kind==="collaboration"?e.jsx(st,{groupId:n.groupId||"",discussionId:n.discussionId,title:n.title,onFrame:i=>{i?x.current.set(n.id,i):x.current.delete(n.id)},onLoad:re},`${n.id}-${n.discussionId??""}-${h[n.groupId||""]||0}`):n.kind==="remote-desktop"?e.jsxs("div",{style:{height:"100%",background:"var(--ui-term-col-bg, #101014)"},"aria-busy":!ee,children:[e.jsx("iframe",{ref:E,className:"webapp-frame",style:{visibility:ee?"visible":"hidden"},src:Ke("/app/?view=remote-desktop"),title:"远程桌面",onLoad:re}),!ee&&e.jsx(Je,{label:"REMOTE DESKTOP",title:"正在打开远程桌面",caption:"正在准备桌面与连接",icon:e.jsx(lt,{size:36,strokeWidth:1.5})})]}):n.kind==="calendar"?e.jsx("iframe",{className:"webapp-frame",src:Ke("/app/?view=calendar"),title:"智能体日历",onLoad:re}):n.kind==="aihub"?e.jsx(ti,{visible:n.id===l,rpc:W}):n.kind==="flowstudio"?e.jsx(ni,{visible:n.id===l}):e.jsx(Qo,{terminalId:n.id,title:n.title,initialCommand:n.initialCommand,visible:n.id===l,state:z,rpc:W,onEvent:J,onTerminalData:K,onTerminalReset:U,sendTerminalInput:ie,keyOrder:et,keybarHidden:Ze,onKeyOrderChange:Nt,onKeybarHiddenChange:Tt,terminalTheme:Z,initialScrollLine:Te[n.id]??null,onScrollLineChange:i=>Qe(m=>m[n.id]===i?m:{...m,[n.id]:i}),onRegisterFill:i=>Kn(n.id,i),onCwdChange:i=>i&&$(m=>({...m,[n.id]:i}))})})},n.id))})}),ce&&e.jsx("div",{className:"drawer-mask",onClick:()=>de(!1)}),e.jsxs("aside",{className:`tree-col ${ce?"tree-col-open":""}`,style:se.treeCol,children:[e.jsxs("div",{className:"tree-head",style:se.treeHead,children:[e.jsx("button",{className:he==="files"?"drawer-tab-active":"",onClick:()=>$e("files"),children:"文件"}),e.jsx("button",{className:he==="history"?"drawer-tab-active":"",onClick:()=>$e("history"),children:"历史"}),e.jsx("span",{className:"tree-cwd",style:se.treeCwd,children:Wt??""}),e.jsx("button",{style:{...se.iconBtn,marginLeft:"auto",flexShrink:0},onClick:()=>de(!1),"aria-label":"close drawer",children:e.jsx(Se,{size:15,"aria-hidden":"true"})})]}),he==="files"?e.jsx(Zo,{ready:q>0,followCwd:!0,cwd:Wt,gateway:le,onOpenFile:rr,selectedPath:ue??(Ue==null?void 0:Ue.path)??null,initialRoot:Ne,initialFollow:Re,revealRequest:Ue,onTreeStateChange:(n,i)=>{Et(n),St(i)}}):e.jsx(Bo,{csrfToken:t.csrfToken,terminalId:((qt=A.find(n=>n.id===l))==null?void 0:qt.kind)==="webapp"?null:l,pinnedCommands:tt,onPinnedCommandsChange:Rt,onFill:Gn,onExecute:or}),e.jsxs("div",{className:"tree-foot",style:se.treeFoot,children:[e.jsx("span",{style:se.treeFootDot}),e.jsx("span",{children:"实时同步"})]})]}),ue&&e.jsx("section",{className:"preview-col",style:se.previewCol,children:e.jsx(ei,{path:ue,gateway:le,onClose:()=>Be(null)})})]}),a&&e.jsx(Eo,{page:a,reloadKey:u},a.id)]})}const se={root:{height:"100dvh",display:"flex",flexDirection:"column",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", sans-serif',overflow:"hidden"},iconBtn:{minWidth:28,height:28,borderRadius:7,border:"1px solid var(--ui-tabbar-border, #303442)",background:"var(--ui-tab-bg, #202029)",color:"var(--ui-tab-text, #aaaab8)",fontSize:13},workspace:{flex:1,minHeight:0,display:"grid",position:"relative"},treeCol:{background:"var(--ui-tree-bg, #121218)",minHeight:0,flexDirection:"column"},treeHead:{display:"flex",alignItems:"center",gap:8,padding:"10px 12px 4px",fontSize:11,textTransform:"uppercase",letterSpacing:1,color:"#778",flexShrink:0},treeCwd:{fontSize:10,color:"#556",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:150,textTransform:"none",letterSpacing:0},treeFoot:{display:"flex",alignItems:"center",gap:7,minHeight:31,padding:"6px 11px calc(env(safe-area-inset-bottom) + 6px)",borderTop:"1px solid var(--ui-tabbar-border, #282832)",boxShadow:"0 -5px 16px rgba(0,0,0,.22)",background:"var(--ui-tab-bg, #15151c)",color:"var(--ui-connection-text, #777789)",fontSize:10.5,flexShrink:0},treeFootDot:{width:6,height:6,borderRadius:99,background:"var(--ui-success, #9ece6a)",boxShadow:"0 0 0 2px color-mix(in srgb, var(--ui-success, #9ece6a) 12%, transparent)",flexShrink:0},termCol:{minWidth:0,minHeight:0,display:"flex",flexDirection:"column",background:"var(--ui-term-col-bg, #101014)",gridColumn:1,overflow:"hidden"},previewCol:{minWidth:0,minHeight:0}},ki=Object.freeze(Object.defineProperty({__proto__:null,default:ri},Symbol.toStringTag,{value:"Module"}));export{Je as F,ki as p};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as l,r as m,d as a}from"./chunk-SVP7TREG-
|
|
1
|
+
import{g as l,r as m,d as a}from"./chunk-SVP7TREG-DbzwWcno.js";import{p}from"./chunk-JWPE2WC7-D0hOf4wm.js";import{_ as t,l as o}from"./mermaid.core-BTbaaIjb.js";import{M as u,d as c}from"./cynefin-OW5HDTMX-BHXgPQGq.js";import"./index-D1AQffdA.js";var f=c().RailroadPeg.parser.LangiumParser,i=t(e=>{const r=e.alternatives.map(d);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformOrderedChoice"),d=t(e=>{const r=e.elements.map(P);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),P=t(e=>{const r=g(e.suffix);return e.operator?{type:"special",text:e.operator==="&"?`&${s(r)}`:`!${s(r)}`}:r},"transformPrefix"),s=t(e=>{switch(e.type){case"terminal":return`"${e.value}"`;case"nonterminal":return e.name;case"special":return e.text;default:return"(...)"}},"nodeToLabel"),g=t(e=>{const r=v(e.primary);if(!e.operator)return r;switch(e.operator){case"?":return{type:"optional",element:r};case"*":return{type:"repetition",element:r,min:0,max:1/0};case"+":return{type:"repetition",element:r,min:1,max:1/0};default:throw new Error(`Unsupported PEG suffix operator: ${e.operator}`)}},"transformSuffix"),v=t(e=>{switch(e.$type){case"PegLiteral":return{type:"terminal",value:e.value};case"PegIdentifier":return{type:"nonterminal",name:e.name};case"PegGroup":return i(e.element);case"PegAny":return{type:"special",text:e.dot};default:throw new Error(`Unsupported PEG primary node: ${e.$type}`)}},"transformPrimary"),y=t(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=t(e=>{p(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(y(r)))},"populateDb"),b={parse:t(e=>{a.clear(),o.debug("[PEG Parser] Starting Langium parse");const r=f.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const n=r.value;o.debug("[PEG Parser] Parsed rules:",n.rules.length),h(n),o.debug("[PEG Parser] Parse complete")},"parse"),parser:{yy:a}},G={parser:b,db:a,renderer:m,styles:l};export{G as diagram};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as rt}from"./chunk-JWPE2WC7-
|
|
1
|
+
import{p as rt}from"./chunk-JWPE2WC7-D0hOf4wm.js";import{L as T,O as P,b3 as nt,g as it,s as st,a as ot,b as lt,q as ct,p as ut,_ as d,l as B,c as gt,D as dt,G as pt,a2 as ht,d as ft,r as mt,E as vt}from"./mermaid.core-BTbaaIjb.js";import{p as xt}from"./cynefin-OW5HDTMX-BHXgPQGq.js";import{d as J}from"./arc-CkEemU1L.js";import{o as St}from"./ordinal-BENe2yWM.js";import"./index-D1AQffdA.js";import"./init-Gi6I4Gst.js";function yt(t,n){return n<t?-1:n>t?1:n>=t?0:NaN}function wt(t){return t}function At(){var t=wt,n=yt,y=null,b=T(0),l=T(P),p=T(0);function i(e){var r,o=(e=nt(e)).length,h,w,$=0,f=new Array(o),s=new Array(o),D=+b.apply(this,arguments),z=Math.min(P,Math.max(-P,l.apply(this,arguments)-D)),k,R=Math.min(Math.abs(z)/o,p.apply(this,arguments)),u=R*(z<0?-1:1),A;for(r=0;r<o;++r)(A=s[f[r]=r]=+t(e[r],r,e))>0&&($+=A);for(n!=null?f.sort(function(M,m){return n(s[M],s[m])}):y!=null&&f.sort(function(M,m){return y(e[M],e[m])}),r=0,w=$?(z-o*u)/$:0;r<o;++r,D=k)h=f[r],A=s[h],k=D+(A>0?A*w:0)+u,s[h]={data:e[h],index:r,value:A,startAngle:D,endAngle:k,padAngle:R};return s}return i.value=function(e){return arguments.length?(t=typeof e=="function"?e:T(+e),i):t},i.sortValues=function(e){return arguments.length?(n=e,y=null,i):n},i.sort=function(e){return arguments.length?(y=e,n=null,i):y},i.startAngle=function(e){return arguments.length?(b=typeof e=="function"?e:T(+e),i):b},i.endAngle=function(e){return arguments.length?(l=typeof e=="function"?e:T(+e),i):l},i.padAngle=function(e){return arguments.length?(p=typeof e=="function"?e:T(+e),i):p},i}var Ct=vt.pie,I={sections:new Map,showData:!1},_=I.sections,V=I.showData,$t=structuredClone(Ct),Dt=d(()=>structuredClone($t),"getConfig"),Tt=d(()=>{_=new Map,V=I.showData,mt()},"clear"),bt=d(({label:t,value:n})=>{if(n<0)throw new Error(`"${t}" has invalid value: ${n}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);_.has(t)||(_.set(t,n),B.debug(`added new section: ${t}, with value: ${n}`))},"addSection"),kt=d(()=>_,"getSections"),Et=d(t=>{V=t},"setShowData"),zt=d(()=>V,"getShowData"),K={getConfig:Dt,clear:Tt,setDiagramTitle:ut,getDiagramTitle:ct,setAccTitle:lt,getAccTitle:ot,setAccDescription:st,getAccDescription:it,addSection:bt,getSections:kt,setShowData:Et,getShowData:zt},Mt=d((t,n)=>{rt(t,n),n.setShowData(t.showData),t.sections.map(n.addSection)},"populateDb"),Lt={parse:d(async t=>{const n=await xt("pie",t);B.debug(n),Mt(n,K)},"parse")},Rt=d(t=>`
|
|
2
2
|
.pieCircle{
|
|
3
3
|
stroke: ${t.pieStrokeColor};
|
|
4
4
|
stroke-width : ${t.pieStrokeWidth};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{s as Ae,g as ke,q as ae,p as Fe,a as Pe,b as ve,_ as o,c as wt,l as At,j as zt,d as Ce,r as Le,E as z,i as Ee,X as De}from"./mermaid.core-
|
|
1
|
+
import{s as Ae,g as ke,q as ae,p as Fe,a as Pe,b as ve,_ as o,c as wt,l as At,j as zt,d as Ce,r as Le,E as z,i as Ee,X as De}from"./mermaid.core-BTbaaIjb.js";import{l as ie}from"./linear-CzJGOwUm.js";import"./index-D1AQffdA.js";import"./init-Gi6I4Gst.js";import"./defaultLocale-DX6XiGOO.js";var Vt=function(){var t=o(function(j,r,l,g){for(l=l||{},g=j.length;g--;l[j[g]]=r);return l},"o"),n=[1,3],u=[1,4],c=[1,5],h=[1,6],p=[1,7],y=[1,4,5,10,12,13,14,15,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],S=[1,4,5,10,12,13,14,15,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],a=[55,56,57],k=[2,36],d=[1,37],T=[1,36],q=[1,38],m=[1,35],b=[1,43],x=[1,41],_=[1,45],Y=[1,14],G=[1,23],yt=[1,18],Tt=[1,19],dt=[1,20],Ft=[1,21],ut=[1,22],xt=[1,24],ft=[1,25],gt=[1,26],i=[1,27],Bt=[1,28],Rt=[1,29],U=[1,32],Q=[1,33],F=[1,34],P=[1,39],v=[1,40],C=[1,42],L=[1,44],X=[1,63],H=[1,62],E=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],Nt=[1,66],Wt=[1,67],Ut=[1,68],Qt=[1,69],Ot=[1,70],Xt=[1,71],Ht=[1,72],Mt=[1,73],Yt=[1,74],jt=[1,75],Gt=[1,76],Kt=[1,77],w=[4,5,6,7,8,9,10,11,12,13,14,15,18],J=[1,91],$=[1,92],tt=[1,93],et=[1,100],it=[1,94],at=[1,97],nt=[1,95],st=[1,96],rt=[1,98],ot=[1,99],Pt=[1,103],Zt=[10,55,56,57],N=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],vt={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:o(function(r,l,g,f,A,e,pt){var s=e.length-1;switch(A){case 23:this.$=e[s];break;case 24:this.$=e[s-1]+""+e[s];break;case 26:this.$=e[s-1]+e[s];break;case 27:this.$=[e[s].trim()];break;case 28:e[s-2].push(e[s].trim()),this.$=e[s-2];break;case 29:this.$=e[s-4],f.addClass(e[s-2],e[s]);break;case 37:this.$=[];break;case 42:this.$=e[s].trim(),f.setDiagramTitle(this.$);break;case 43:this.$=e[s].trim(),f.setAccTitle(this.$);break;case 44:case 45:this.$=e[s].trim(),f.setAccDescription(this.$);break;case 46:f.addSection(e[s].substr(8)),this.$=e[s].substr(8);break;case 47:f.addPoint(e[s-3],"",e[s-1],e[s],[]);break;case 48:f.addPoint(e[s-4],e[s-3],e[s-1],e[s],[]);break;case 49:f.addPoint(e[s-4],"",e[s-2],e[s-1],e[s]);break;case 50:f.addPoint(e[s-5],e[s-4],e[s-2],e[s-1],e[s]);break;case 51:f.setXAxisLeftText(e[s-2]),f.setXAxisRightText(e[s]);break;case 52:e[s-1].text+=" ⟶ ",f.setXAxisLeftText(e[s-1]);break;case 53:f.setXAxisLeftText(e[s]);break;case 54:f.setYAxisBottomText(e[s-2]),f.setYAxisTopText(e[s]);break;case 55:e[s-1].text+=" ⟶ ",f.setYAxisBottomText(e[s-1]);break;case 56:f.setYAxisBottomText(e[s]);break;case 57:f.setQuadrant1Text(e[s]);break;case 58:f.setQuadrant2Text(e[s]);break;case 59:f.setQuadrant3Text(e[s]);break;case 60:f.setQuadrant4Text(e[s]);break;case 64:this.$={text:e[s],type:"text"};break;case 65:this.$={text:e[s-1].text+""+e[s],type:e[s-1].type};break;case 66:this.$={text:e[s],type:"text"};break;case 67:this.$={text:e[s],type:"markdown"};break;case 68:this.$=e[s];break;case 69:this.$=e[s-1]+""+e[s];break}},"anonymous"),table:[{18:n,26:1,27:2,28:u,55:c,56:h,57:p},{1:[3]},{18:n,26:8,27:2,28:u,55:c,56:h,57:p},{18:n,26:9,27:2,28:u,55:c,56:h,57:p},t(y,[2,33],{29:10}),t(S,[2,61]),t(S,[2,62]),t(S,[2,63]),{1:[2,30]},{1:[2,31]},t(a,k,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:d,5:T,10:q,12:m,13:b,14:x,15:_,18:Y,25:G,35:yt,37:Tt,39:dt,41:Ft,42:ut,48:xt,50:ft,51:gt,52:i,53:Bt,54:Rt,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(y,[2,34]),{27:46,55:c,56:h,57:p},t(a,[2,37]),t(a,k,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:d,5:T,10:q,12:m,13:b,14:x,15:_,18:Y,25:G,35:yt,37:Tt,39:dt,41:Ft,42:ut,48:xt,50:ft,51:gt,52:i,53:Bt,54:Rt,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(a,[2,39]),t(a,[2,40]),t(a,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},t(a,[2,45]),t(a,[2,46]),{18:[1,51]},{4:d,5:T,10:q,12:m,13:b,14:x,15:_,43:52,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:d,5:T,10:q,12:m,13:b,14:x,15:_,43:53,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:d,5:T,10:q,12:m,13:b,14:x,15:_,43:54,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:d,5:T,10:q,12:m,13:b,14:x,15:_,43:55,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:d,5:T,10:q,12:m,13:b,14:x,15:_,43:56,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:d,5:T,10:q,12:m,13:b,14:x,15:_,43:57,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:d,5:T,8:X,10:q,12:m,13:b,14:x,15:_,18:H,44:[1,58],47:[1,59],58:61,59:60,63:F,64:P,65:v,66:C,67:L},t(E,[2,64]),t(E,[2,66]),t(E,[2,67]),t(E,[2,70]),t(E,[2,71]),t(E,[2,72]),t(E,[2,73]),t(E,[2,74]),t(E,[2,75]),t(E,[2,76]),t(E,[2,77]),t(E,[2,78]),t(E,[2,79]),t(E,[2,80]),t(E,[2,81]),t(y,[2,35]),t(a,[2,38]),t(a,[2,42]),t(a,[2,43]),t(a,[2,44]),{3:65,4:Nt,5:Wt,6:Ut,7:Qt,8:Ot,9:Xt,10:Ht,11:Mt,12:Yt,13:jt,14:Gt,15:Kt,21:64},t(a,[2,53],{59:60,58:61,4:d,5:T,8:X,10:q,12:m,13:b,14:x,15:_,18:H,49:[1,78],63:F,64:P,65:v,66:C,67:L}),t(a,[2,56],{59:60,58:61,4:d,5:T,8:X,10:q,12:m,13:b,14:x,15:_,18:H,49:[1,79],63:F,64:P,65:v,66:C,67:L}),t(a,[2,57],{59:60,58:61,4:d,5:T,8:X,10:q,12:m,13:b,14:x,15:_,18:H,63:F,64:P,65:v,66:C,67:L}),t(a,[2,58],{59:60,58:61,4:d,5:T,8:X,10:q,12:m,13:b,14:x,15:_,18:H,63:F,64:P,65:v,66:C,67:L}),t(a,[2,59],{59:60,58:61,4:d,5:T,8:X,10:q,12:m,13:b,14:x,15:_,18:H,63:F,64:P,65:v,66:C,67:L}),t(a,[2,60],{59:60,58:61,4:d,5:T,8:X,10:q,12:m,13:b,14:x,15:_,18:H,63:F,64:P,65:v,66:C,67:L}),{45:[1,80]},{44:[1,81]},t(E,[2,65]),t(E,[2,82]),t(E,[2,83]),t(E,[2,84]),{3:83,4:Nt,5:Wt,6:Ut,7:Qt,8:Ot,9:Xt,10:Ht,11:Mt,12:Yt,13:jt,14:Gt,15:Kt,18:[1,82]},t(w,[2,23]),t(w,[2,1]),t(w,[2,2]),t(w,[2,3]),t(w,[2,4]),t(w,[2,5]),t(w,[2,6]),t(w,[2,7]),t(w,[2,8]),t(w,[2,9]),t(w,[2,10]),t(w,[2,11]),t(w,[2,12]),t(a,[2,52],{58:31,43:84,4:d,5:T,10:q,12:m,13:b,14:x,15:_,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(a,[2,55],{58:31,43:85,4:d,5:T,10:q,12:m,13:b,14:x,15:_,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),{46:[1,86]},{45:[1,87]},{4:J,5:$,6:tt,8:et,11:it,13:at,16:90,17:nt,18:st,19:rt,20:ot,22:89,23:88},t(w,[2,24]),t(a,[2,51],{59:60,58:61,4:d,5:T,8:X,10:q,12:m,13:b,14:x,15:_,18:H,63:F,64:P,65:v,66:C,67:L}),t(a,[2,54],{59:60,58:61,4:d,5:T,8:X,10:q,12:m,13:b,14:x,15:_,18:H,63:F,64:P,65:v,66:C,67:L}),t(a,[2,47],{22:89,16:90,23:101,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot}),{46:[1,102]},t(a,[2,29],{10:Pt}),t(Zt,[2,27],{16:104,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot}),t(N,[2,25]),t(N,[2,13]),t(N,[2,14]),t(N,[2,15]),t(N,[2,16]),t(N,[2,17]),t(N,[2,18]),t(N,[2,19]),t(N,[2,20]),t(N,[2,21]),t(N,[2,22]),t(a,[2,49],{10:Pt}),t(a,[2,48],{22:89,16:90,23:105,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot}),{4:J,5:$,6:tt,8:et,11:it,13:at,16:90,17:nt,18:st,19:rt,20:ot,22:106},t(N,[2,26]),t(a,[2,50],{10:Pt}),t(Zt,[2,28],{16:104,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot})],defaultActions:{8:[2,30],9:[2,31]},parseError:o(function(r,l){if(l.recoverable)this.trace(r);else{var g=new Error(r);throw g.hash=l,g}},"parseError"),parse:o(function(r){var l=this,g=[0],f=[],A=[null],e=[],pt=this.table,s="",mt=0,Jt=0,me=2,$t=1,be=e.slice.call(arguments,1),D=Object.create(this.lexer),K={yy:{}};for(var Ct in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ct)&&(K.yy[Ct]=this.yy[Ct]);D.setInput(r,K.yy),K.yy.lexer=D,K.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Lt=D.yylloc;e.push(Lt);var Se=D.options&&D.options.ranges;typeof K.yy.parseError=="function"?this.parseError=K.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function _e(R){g.length=g.length-2*R,A.length=A.length-R,e.length=e.length-R}o(_e,"popStack");function te(){var R;return R=f.pop()||D.lex()||$t,typeof R!="number"&&(R instanceof Array&&(f=R,R=f.pop()),R=l.symbols_[R]||R),R}o(te,"lex");for(var B,Z,W,Et,lt={},bt,M,ee,St;;){if(Z=g[g.length-1],this.defaultActions[Z]?W=this.defaultActions[Z]:((B===null||typeof B>"u")&&(B=te()),W=pt[Z]&&pt[Z][B]),typeof W>"u"||!W.length||!W[0]){var Dt="";St=[];for(bt in pt[Z])this.terminals_[bt]&&bt>me&&St.push("'"+this.terminals_[bt]+"'");D.showPosition?Dt="Parse error on line "+(mt+1)+`:
|
|
2
2
|
`+D.showPosition()+`
|
|
3
3
|
Expecting `+St.join(", ")+", got '"+(this.terminals_[B]||B)+"'":Dt="Parse error on line "+(mt+1)+": Unexpected "+(B==$t?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(Dt,{text:D.match,token:this.terminals_[B]||B,line:D.yylineno,loc:Lt,expected:St})}if(W[0]instanceof Array&&W.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Z+", token: "+B);switch(W[0]){case 1:g.push(B),A.push(D.yytext),e.push(D.yylloc),g.push(W[1]),B=null,Jt=D.yyleng,s=D.yytext,mt=D.yylineno,Lt=D.yylloc;break;case 2:if(M=this.productions_[W[1]][1],lt.$=A[A.length-M],lt._$={first_line:e[e.length-(M||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(M||1)].first_column,last_column:e[e.length-1].last_column},Se&&(lt._$.range=[e[e.length-(M||1)].range[0],e[e.length-1].range[1]]),Et=this.performAction.apply(lt,[s,Jt,mt,K.yy,W[1],A,e].concat(be)),typeof Et<"u")return Et;M&&(g=g.slice(0,-1*M*2),A=A.slice(0,-1*M),e=e.slice(0,-1*M)),g.push(this.productions_[W[1]][0]),A.push(lt.$),e.push(lt._$),ee=pt[g[g.length-2]][g[g.length-1]],g.push(ee);break;case 3:return!0}}return!0},"parse")},qe=function(){var j={EOF:1,parseError:o(function(l,g){if(this.yy.parser)this.yy.parser.parseError(l,g);else throw new Error(l)},"parseError"),setInput:o(function(r,l){return this.yy=l||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var l=r.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:o(function(r){var l=r.length,g=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var f=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),g.length-1&&(this.yylineno-=g.length-1);var A=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:g?(g.length===f.length?this.yylloc.first_column:0)+f[f.length-g.length].length-g[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[A[0],A[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(r){this.unput(this.match.slice(r))},"less"),pastInput:o(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var r=this.pastInput(),l=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as s,r as l,d as t}from"./chunk-SVP7TREG-
|
|
1
|
+
import{g as s,r as l,d as t}from"./chunk-SVP7TREG-DbzwWcno.js";import{p as m}from"./chunk-JWPE2WC7-D0hOf4wm.js";import{_ as n,l as i}from"./mermaid.core-BTbaaIjb.js";import{M as p,c as u}from"./cynefin-OW5HDTMX-BHXgPQGq.js";import"./index-D1AQffdA.js";var d=u().Railroad.parser.LangiumParser,a=n(e=>{switch(e.$type){case"RailroadTerminalExpr":return{type:"terminal",value:e.value};case"RailroadNonTerminalExpr":return{type:"nonterminal",name:e.name};case"RailroadSpecialExpr":return{type:"special",text:e.text};case"RailroadSequenceExpr":{const r=e.elements.map(a);return r.length===1?r[0]:{type:"sequence",elements:r}}case"RailroadChoiceExpr":{const r=e.alternatives.map(a);return r.length===1?r[0]:{type:"choice",alternatives:r}}case"RailroadOptionalExpr":return{type:"optional",element:a(e.element)};case"RailroadOneOrMoreExpr":return{type:"repetition",element:a(e.element),min:1,max:1/0};case"RailroadZeroOrMoreExpr":return{type:"repetition",element:a(e.element),min:0,max:1/0};default:throw new Error(`Unsupported railroad expression: ${e.$type}`)}},"transformExpression"),c=n(e=>({name:e.name,definition:a(e.definition)}),"transformRule"),g=n(e=>{m(e,t),e.title&&t.setTitle(e.title),e.rules.map(r=>t.addRule(c(r)))},"populateDb"),y={parse:n(e=>{t.clear(),i.debug("[Railroad Parser] Starting Langium parse");const r=d.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new p(r);const o=r.value;i.debug("[Railroad Parser] Parsed rules:",o.rules.length),g(o),i.debug("[Railroad Parser] Parse complete")},"parse"),parser:{yy:t}},x={parser:y,db:t,renderer:l,styles:s};export{x as diagram};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as Ge}from"./chunk-XXDRQBXY-C-y59lCL.js";import{s as Xe}from"./chunk-POPQ4Y6H-D51fNP6n.js";import{_ as d,A as Be,b as Je,a as Ze,s as et,g as tt,p as st,q as it,c as Ne,l as qe,r as rt,v as nt,x as at,y as lt,z as ct}from"./mermaid.core-XNny-og5.js";import"./index-CrjQF-VW.js";var Ce=function(){var e=d(function($,i,n,l){for(n=n||{},l=$.length;l--;n[$[l]]=i);return n},"o"),r=[1,3],u=[1,4],h=[1,5],o=[1,6],c=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],E=[1,22],p=[2,7],y=[1,26],f=[1,27],m=[1,28],k=[1,29],C=[1,33],V=[1,34],A=[1,35],v=[1,36],L=[1,37],x=[1,38],O=[1,24],w=[1,31],D=[1,32],M=[1,30],_=[1,39],S=[1,40],g=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],P=[1,61],X=[89,90],Ve=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Ee=[27,29],Ae=[1,70],ve=[1,71],Le=[1,72],xe=[1,73],Oe=[1,74],we=[1,75],De=[1,76],ee=[1,83],U=[1,80],te=[1,84],se=[1,85],ie=[1,86],re=[1,87],ne=[1,88],ae=[1,89],le=[1,90],ce=[1,91],oe=[1,92],pe=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Y=[63,64],Me=[1,101],Fe=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],N=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],B=[1,110],Q=[1,106],H=[1,107],K=[1,108],W=[1,109],j=[1,111],he=[1,116],ue=[1,117],fe=[1,114],me=[1,115],Se={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:d(function(i,n,l,s,R,t,de){var a=t.length-1;switch(R){case 4:this.$=t[a].trim(),s.setAccTitle(this.$);break;case 5:case 6:this.$=t[a].trim(),s.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:s.setDirection("TB");break;case 18:s.setDirection("BT");break;case 19:s.setDirection("RL");break;case 20:s.setDirection("LR");break;case 21:s.addRequirement(t[a-3],t[a-4]);break;case 22:s.addRequirement(t[a-5],t[a-6]),s.setClass([t[a-5]],t[a-3]);break;case 23:s.setNewReqId(t[a-2]);break;case 24:s.setNewReqText(t[a-2]);break;case 25:s.setNewReqRisk(t[a-2]);break;case 26:s.setNewReqVerifyMethod(t[a-2]);break;case 29:this.$=s.RequirementType.REQUIREMENT;break;case 30:this.$=s.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=s.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=s.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=s.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=s.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=s.RiskLevel.LOW_RISK;break;case 36:this.$=s.RiskLevel.MED_RISK;break;case 37:this.$=s.RiskLevel.HIGH_RISK;break;case 38:this.$=s.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=s.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=s.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=s.VerifyType.VERIFY_TEST;break;case 42:s.addElement(t[a-3]);break;case 43:s.addElement(t[a-5]),s.setClass([t[a-5]],t[a-3]);break;case 44:s.setNewElementType(t[a-2]);break;case 45:s.setNewElementDocRef(t[a-2]);break;case 48:s.addRelationship(t[a-2],t[a],t[a-4]);break;case 49:s.addRelationship(t[a-2],t[a-4],t[a]);break;case 50:this.$=s.Relationships.CONTAINS;break;case 51:this.$=s.Relationships.COPIES;break;case 52:this.$=s.Relationships.DERIVES;break;case 53:this.$=s.Relationships.SATISFIES;break;case 54:this.$=s.Relationships.VERIFIES;break;case 55:this.$=s.Relationships.REFINES;break;case 56:this.$=s.Relationships.TRACES;break;case 57:this.$=t[a-2],s.defineClass(t[a-1],t[a]);break;case 58:s.setClass(t[a-1],t[a]);break;case 59:s.setClass([t[a-2]],t[a]);break;case 60:case 62:this.$=[t[a]];break;case 61:case 63:this.$=t[a-2].concat([t[a]]);break;case 64:this.$=t[a-2],s.setCssStyle(t[a-1],t[a]);break;case 65:this.$=[t[a]];break;case 66:t[a-2].push(t[a]),this.$=t[a-2];break;case 68:this.$=t[a-1]+t[a];break}},"anonymous"),table:[{3:1,4:2,6:r,9:u,11:h,13:o},{1:[3]},{3:8,4:2,5:[1,7],6:r,9:u,11:h,13:o},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(c,[2,6]),{3:12,4:2,6:r,9:u,11:h,13:o},{1:[2,2]},{4:17,5:E,7:13,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:f,23:m,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:_,90:S},e(c,[2,4]),e(c,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:E,7:42,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:f,23:m,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:_,90:S},{4:17,5:E,7:43,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:f,23:m,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:_,90:S},{4:17,5:E,7:44,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:f,23:m,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:_,90:S},{4:17,5:E,7:45,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:f,23:m,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:_,90:S},{4:17,5:E,7:46,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:f,23:m,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:_,90:S},{4:17,5:E,7:47,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:f,23:m,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:_,90:S},{4:17,5:E,7:48,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:f,23:m,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:_,90:S},{4:17,5:E,7:49,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:f,23:m,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:_,90:S},{4:17,5:E,7:50,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:f,23:m,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:_,90:S},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(g,[2,17]),e(g,[2,18]),e(g,[2,19]),e(g,[2,20]),{30:60,33:62,75:P,89:_,90:S},{30:63,33:62,75:P,89:_,90:S},{30:64,33:62,75:P,89:_,90:S},e(X,[2,29]),e(X,[2,30]),e(X,[2,31]),e(X,[2,32]),e(X,[2,33]),e(X,[2,34]),e(Ve,[2,81]),e(Ve,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(Ee,[2,79]),e(Ee,[2,80]),{27:[1,67],29:[1,68]},e(Ee,[2,85]),e(Ee,[2,86]),{62:69,65:Ae,66:ve,67:Le,68:xe,69:Oe,70:we,71:De},{62:77,65:Ae,66:ve,67:Le,68:xe,69:Oe,70:we,71:De},{30:78,33:62,75:P,89:_,90:S},{73:79,75:ee,76:U,78:81,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},e(pe,[2,60]),e(pe,[2,62]),{73:93,75:ee,76:U,78:81,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},{30:94,33:62,75:P,76:U,89:_,90:S},{5:[1,95]},{30:96,33:62,75:P,89:_,90:S},{5:[1,97]},{30:98,33:62,75:P,89:_,90:S},{63:[1,99]},e(Y,[2,50]),e(Y,[2,51]),e(Y,[2,52]),e(Y,[2,53]),e(Y,[2,54]),e(Y,[2,55]),e(Y,[2,56]),{64:[1,100]},e(g,[2,59],{76:U}),e(g,[2,64],{76:Me}),{33:103,75:[1,102],89:_,90:S},e(Fe,[2,65],{79:104,75:ee,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe}),e(N,[2,67]),e(N,[2,69]),e(N,[2,70]),e(N,[2,71]),e(N,[2,72]),e(N,[2,73]),e(N,[2,74]),e(N,[2,75]),e(N,[2,76]),e(N,[2,77]),e(N,[2,78]),e(g,[2,57],{76:Me}),e(g,[2,58],{76:U}),{5:B,28:105,31:Q,34:H,36:K,38:W,40:j},{27:[1,112],76:U},{5:he,40:ue,56:113,57:fe,59:me},{27:[1,118],76:U},{33:119,89:_,90:S},{33:120,89:_,90:S},{75:ee,78:121,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},e(pe,[2,61]),e(pe,[2,63]),e(N,[2,68]),e(g,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:B,28:126,31:Q,34:H,36:K,38:W,40:j},e(g,[2,28]),{5:[1,127]},e(g,[2,42]),{32:[1,128]},{32:[1,129]},{5:he,40:ue,56:130,57:fe,59:me},e(g,[2,47]),{5:[1,131]},e(g,[2,48]),e(g,[2,49]),e(Fe,[2,66],{79:104,75:ee,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe}),{33:132,89:_,90:S},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(g,[2,27]),{5:B,28:145,31:Q,34:H,36:K,38:W,40:j},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(g,[2,46]),{5:he,40:ue,56:152,57:fe,59:me},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(g,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(g,[2,43]),{5:B,28:159,31:Q,34:H,36:K,38:W,40:j},{5:B,28:160,31:Q,34:H,36:K,38:W,40:j},{5:B,28:161,31:Q,34:H,36:K,38:W,40:j},{5:B,28:162,31:Q,34:H,36:K,38:W,40:j},{5:he,40:ue,56:163,57:fe,59:me},{5:he,40:ue,56:164,57:fe,59:me},e(g,[2,23]),e(g,[2,24]),e(g,[2,25]),e(g,[2,26]),e(g,[2,44]),e(g,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:d(function(i,n){if(n.recoverable)this.trace(i);else{var l=new Error(i);throw l.hash=n,l}},"parseError"),parse:d(function(i){var n=this,l=[0],s=[],R=[null],t=[],de=this.table,a="",ge=0,$e=0,Ke=2,Pe=1,We=t.slice.call(arguments,1),b=Object.create(this.lexer),z={yy:{}};for(var be in this.yy)Object.prototype.hasOwnProperty.call(this.yy,be)&&(z.yy[be]=this.yy[be]);b.setInput(i,z.yy),z.yy.lexer=b,z.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var Ie=b.yylloc;t.push(Ie);var je=b.options&&b.options.ranges;typeof z.yy.parseError=="function"?this.parseError=z.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ze(T){l.length=l.length-2*T,R.length=R.length-T,t.length=t.length-T}d(ze,"popStack");function Ue(){var T;return T=s.pop()||b.lex()||Pe,typeof T!="number"&&(T instanceof Array&&(s=T,T=s.pop()),T=n.symbols_[T]||T),T}d(Ue,"lex");for(var I,G,q,Te,J={},ye,F,Ye,_e;;){if(G=l[l.length-1],this.defaultActions[G]?q=this.defaultActions[G]:((I===null||typeof I>"u")&&(I=Ue()),q=de[G]&&de[G][I]),typeof q>"u"||!q.length||!q[0]){var ke="";_e=[];for(ye in de[G])this.terminals_[ye]&&ye>Ke&&_e.push("'"+this.terminals_[ye]+"'");b.showPosition?ke="Parse error on line "+(ge+1)+`:
|
|
1
|
+
import{g as Ge}from"./chunk-XXDRQBXY-COAufrJq.js";import{s as Xe}from"./chunk-POPQ4Y6H-bGKHqXLU.js";import{_ as d,A as Be,b as Je,a as Ze,s as et,g as tt,p as st,q as it,c as Ne,l as qe,r as rt,v as nt,x as at,y as lt,z as ct}from"./mermaid.core-BTbaaIjb.js";import"./index-D1AQffdA.js";var Ce=function(){var e=d(function($,i,n,l){for(n=n||{},l=$.length;l--;n[$[l]]=i);return n},"o"),r=[1,3],u=[1,4],h=[1,5],o=[1,6],c=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],E=[1,22],p=[2,7],y=[1,26],f=[1,27],m=[1,28],k=[1,29],C=[1,33],V=[1,34],A=[1,35],v=[1,36],L=[1,37],x=[1,38],O=[1,24],w=[1,31],D=[1,32],M=[1,30],_=[1,39],S=[1,40],g=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],P=[1,61],X=[89,90],Ve=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Ee=[27,29],Ae=[1,70],ve=[1,71],Le=[1,72],xe=[1,73],Oe=[1,74],we=[1,75],De=[1,76],ee=[1,83],U=[1,80],te=[1,84],se=[1,85],ie=[1,86],re=[1,87],ne=[1,88],ae=[1,89],le=[1,90],ce=[1,91],oe=[1,92],pe=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Y=[63,64],Me=[1,101],Fe=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],N=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],B=[1,110],Q=[1,106],H=[1,107],K=[1,108],W=[1,109],j=[1,111],he=[1,116],ue=[1,117],fe=[1,114],me=[1,115],Se={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:d(function(i,n,l,s,R,t,de){var a=t.length-1;switch(R){case 4:this.$=t[a].trim(),s.setAccTitle(this.$);break;case 5:case 6:this.$=t[a].trim(),s.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:s.setDirection("TB");break;case 18:s.setDirection("BT");break;case 19:s.setDirection("RL");break;case 20:s.setDirection("LR");break;case 21:s.addRequirement(t[a-3],t[a-4]);break;case 22:s.addRequirement(t[a-5],t[a-6]),s.setClass([t[a-5]],t[a-3]);break;case 23:s.setNewReqId(t[a-2]);break;case 24:s.setNewReqText(t[a-2]);break;case 25:s.setNewReqRisk(t[a-2]);break;case 26:s.setNewReqVerifyMethod(t[a-2]);break;case 29:this.$=s.RequirementType.REQUIREMENT;break;case 30:this.$=s.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=s.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=s.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=s.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=s.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=s.RiskLevel.LOW_RISK;break;case 36:this.$=s.RiskLevel.MED_RISK;break;case 37:this.$=s.RiskLevel.HIGH_RISK;break;case 38:this.$=s.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=s.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=s.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=s.VerifyType.VERIFY_TEST;break;case 42:s.addElement(t[a-3]);break;case 43:s.addElement(t[a-5]),s.setClass([t[a-5]],t[a-3]);break;case 44:s.setNewElementType(t[a-2]);break;case 45:s.setNewElementDocRef(t[a-2]);break;case 48:s.addRelationship(t[a-2],t[a],t[a-4]);break;case 49:s.addRelationship(t[a-2],t[a-4],t[a]);break;case 50:this.$=s.Relationships.CONTAINS;break;case 51:this.$=s.Relationships.COPIES;break;case 52:this.$=s.Relationships.DERIVES;break;case 53:this.$=s.Relationships.SATISFIES;break;case 54:this.$=s.Relationships.VERIFIES;break;case 55:this.$=s.Relationships.REFINES;break;case 56:this.$=s.Relationships.TRACES;break;case 57:this.$=t[a-2],s.defineClass(t[a-1],t[a]);break;case 58:s.setClass(t[a-1],t[a]);break;case 59:s.setClass([t[a-2]],t[a]);break;case 60:case 62:this.$=[t[a]];break;case 61:case 63:this.$=t[a-2].concat([t[a]]);break;case 64:this.$=t[a-2],s.setCssStyle(t[a-1],t[a]);break;case 65:this.$=[t[a]];break;case 66:t[a-2].push(t[a]),this.$=t[a-2];break;case 68:this.$=t[a-1]+t[a];break}},"anonymous"),table:[{3:1,4:2,6:r,9:u,11:h,13:o},{1:[3]},{3:8,4:2,5:[1,7],6:r,9:u,11:h,13:o},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(c,[2,6]),{3:12,4:2,6:r,9:u,11:h,13:o},{1:[2,2]},{4:17,5:E,7:13,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:f,23:m,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:_,90:S},e(c,[2,4]),e(c,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:E,7:42,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:f,23:m,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:_,90:S},{4:17,5:E,7:43,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:f,23:m,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:_,90:S},{4:17,5:E,7:44,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:f,23:m,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:_,90:S},{4:17,5:E,7:45,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:f,23:m,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:_,90:S},{4:17,5:E,7:46,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:f,23:m,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:_,90:S},{4:17,5:E,7:47,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:f,23:m,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:_,90:S},{4:17,5:E,7:48,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:f,23:m,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:_,90:S},{4:17,5:E,7:49,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:f,23:m,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:_,90:S},{4:17,5:E,7:50,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:f,23:m,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:_,90:S},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(g,[2,17]),e(g,[2,18]),e(g,[2,19]),e(g,[2,20]),{30:60,33:62,75:P,89:_,90:S},{30:63,33:62,75:P,89:_,90:S},{30:64,33:62,75:P,89:_,90:S},e(X,[2,29]),e(X,[2,30]),e(X,[2,31]),e(X,[2,32]),e(X,[2,33]),e(X,[2,34]),e(Ve,[2,81]),e(Ve,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(Ee,[2,79]),e(Ee,[2,80]),{27:[1,67],29:[1,68]},e(Ee,[2,85]),e(Ee,[2,86]),{62:69,65:Ae,66:ve,67:Le,68:xe,69:Oe,70:we,71:De},{62:77,65:Ae,66:ve,67:Le,68:xe,69:Oe,70:we,71:De},{30:78,33:62,75:P,89:_,90:S},{73:79,75:ee,76:U,78:81,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},e(pe,[2,60]),e(pe,[2,62]),{73:93,75:ee,76:U,78:81,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},{30:94,33:62,75:P,76:U,89:_,90:S},{5:[1,95]},{30:96,33:62,75:P,89:_,90:S},{5:[1,97]},{30:98,33:62,75:P,89:_,90:S},{63:[1,99]},e(Y,[2,50]),e(Y,[2,51]),e(Y,[2,52]),e(Y,[2,53]),e(Y,[2,54]),e(Y,[2,55]),e(Y,[2,56]),{64:[1,100]},e(g,[2,59],{76:U}),e(g,[2,64],{76:Me}),{33:103,75:[1,102],89:_,90:S},e(Fe,[2,65],{79:104,75:ee,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe}),e(N,[2,67]),e(N,[2,69]),e(N,[2,70]),e(N,[2,71]),e(N,[2,72]),e(N,[2,73]),e(N,[2,74]),e(N,[2,75]),e(N,[2,76]),e(N,[2,77]),e(N,[2,78]),e(g,[2,57],{76:Me}),e(g,[2,58],{76:U}),{5:B,28:105,31:Q,34:H,36:K,38:W,40:j},{27:[1,112],76:U},{5:he,40:ue,56:113,57:fe,59:me},{27:[1,118],76:U},{33:119,89:_,90:S},{33:120,89:_,90:S},{75:ee,78:121,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},e(pe,[2,61]),e(pe,[2,63]),e(N,[2,68]),e(g,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:B,28:126,31:Q,34:H,36:K,38:W,40:j},e(g,[2,28]),{5:[1,127]},e(g,[2,42]),{32:[1,128]},{32:[1,129]},{5:he,40:ue,56:130,57:fe,59:me},e(g,[2,47]),{5:[1,131]},e(g,[2,48]),e(g,[2,49]),e(Fe,[2,66],{79:104,75:ee,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe}),{33:132,89:_,90:S},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(g,[2,27]),{5:B,28:145,31:Q,34:H,36:K,38:W,40:j},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(g,[2,46]),{5:he,40:ue,56:152,57:fe,59:me},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(g,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(g,[2,43]),{5:B,28:159,31:Q,34:H,36:K,38:W,40:j},{5:B,28:160,31:Q,34:H,36:K,38:W,40:j},{5:B,28:161,31:Q,34:H,36:K,38:W,40:j},{5:B,28:162,31:Q,34:H,36:K,38:W,40:j},{5:he,40:ue,56:163,57:fe,59:me},{5:he,40:ue,56:164,57:fe,59:me},e(g,[2,23]),e(g,[2,24]),e(g,[2,25]),e(g,[2,26]),e(g,[2,44]),e(g,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:d(function(i,n){if(n.recoverable)this.trace(i);else{var l=new Error(i);throw l.hash=n,l}},"parseError"),parse:d(function(i){var n=this,l=[0],s=[],R=[null],t=[],de=this.table,a="",ge=0,$e=0,Ke=2,Pe=1,We=t.slice.call(arguments,1),b=Object.create(this.lexer),z={yy:{}};for(var be in this.yy)Object.prototype.hasOwnProperty.call(this.yy,be)&&(z.yy[be]=this.yy[be]);b.setInput(i,z.yy),z.yy.lexer=b,z.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var Ie=b.yylloc;t.push(Ie);var je=b.options&&b.options.ranges;typeof z.yy.parseError=="function"?this.parseError=z.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ze(T){l.length=l.length-2*T,R.length=R.length-T,t.length=t.length-T}d(ze,"popStack");function Ue(){var T;return T=s.pop()||b.lex()||Pe,typeof T!="number"&&(T instanceof Array&&(s=T,T=s.pop()),T=n.symbols_[T]||T),T}d(Ue,"lex");for(var I,G,q,Te,J={},ye,F,Ye,_e;;){if(G=l[l.length-1],this.defaultActions[G]?q=this.defaultActions[G]:((I===null||typeof I>"u")&&(I=Ue()),q=de[G]&&de[G][I]),typeof q>"u"||!q.length||!q[0]){var ke="";_e=[];for(ye in de[G])this.terminals_[ye]&&ye>Ke&&_e.push("'"+this.terminals_[ye]+"'");b.showPosition?ke="Parse error on line "+(ge+1)+`:
|
|
2
2
|
`+b.showPosition()+`
|
|
3
3
|
Expecting `+_e.join(", ")+", got '"+(this.terminals_[I]||I)+"'":ke="Parse error on line "+(ge+1)+": Unexpected "+(I==Pe?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(ke,{text:b.match,token:this.terminals_[I]||I,line:b.yylineno,loc:Ie,expected:_e})}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+G+", token: "+I);switch(q[0]){case 1:l.push(I),R.push(b.yytext),t.push(b.yylloc),l.push(q[1]),I=null,$e=b.yyleng,a=b.yytext,ge=b.yylineno,Ie=b.yylloc;break;case 2:if(F=this.productions_[q[1]][1],J.$=R[R.length-F],J._$={first_line:t[t.length-(F||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(F||1)].first_column,last_column:t[t.length-1].last_column},je&&(J._$.range=[t[t.length-(F||1)].range[0],t[t.length-1].range[1]]),Te=this.performAction.apply(J,[a,$e,ge,z.yy,q[1],R,t].concat(We)),typeof Te<"u")return Te;F&&(l=l.slice(0,-1*F*2),R=R.slice(0,-1*F),t=t.slice(0,-1*F)),l.push(this.productions_[q[1]][0]),R.push(J.$),t.push(J._$),Ye=de[l[l.length-2]][l[l.length-1]],l.push(Ye);break;case 3:return!0}}return!0},"parse")},He=function(){var $={EOF:1,parseError:d(function(n,l){if(this.yy.parser)this.yy.parser.parseError(n,l);else throw new Error(n)},"parseError"),setInput:d(function(i,n){return this.yy=n||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:d(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var n=i.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:d(function(i){var n=i.length,l=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var R=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===s.length?this.yylloc.first_column:0)+s[s.length-l.length].length-l[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[R[0],R[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:d(function(i){this.unput(this.match.slice(i))},"less"),pastInput:d(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var i=this.pastInput(),n=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as xt,q as _t,s as vt,g as bt,b as St,a as wt,_ as d,c as lt,b7 as Lt,j as H,af as Et,r as At,k as Tt}from"./mermaid.core-XNny-og5.js";import{o as Mt}from"./ordinal-BENe2yWM.js";import"./index-CrjQF-VW.js";import"./init-Gi6I4Gst.js";function Nt(t){for(var n=t.length/6|0,s=new Array(n),a=0;a<n;)s[a]="#"+t.slice(a*6,++a*6);return s}const Ct=Nt("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function ct(t,n){let s;if(n===void 0)for(const a of t)a!=null&&(s<a||s===void 0&&a>=a)&&(s=a);else{let a=-1;for(let u of t)(u=n(u,++a,t))!=null&&(s<u||s===void 0&&u>=u)&&(s=u)}return s}function pt(t,n){let s;if(n===void 0)for(const a of t)a!=null&&(s>a||s===void 0&&a>=a)&&(s=a);else{let a=-1;for(let u of t)(u=n(u,++a,t))!=null&&(s>u||s===void 0&&u>=u)&&(s=u)}return s}function nt(t,n){let s=0;if(n===void 0)for(let a of t)(a=+a)&&(s+=a);else{let a=-1;for(let u of t)(u=+n(u,++a,t))&&(s+=u)}return s}function Pt(t){return t.target.depth}function It(t){return t.depth}function Ot(t,n){return n-1-t.height}function kt(t,n){return t.sourceLinks.length?t.depth:n-1}function $t(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?pt(t.sourceLinks,Pt)-1:0}function X(t){return function(){return t}}function ut(t,n){return Q(t.source,n.source)||t.index-n.index}function ht(t,n){return Q(t.target,n.target)||t.index-n.index}function Q(t,n){return t.y0-n.y0}function it(t){return t.value}function jt(t){return t.index}function Dt(t){return t.nodes}function zt(t){return t.links}function ft(t,n){const s=t.get(n);if(!s)throw new Error("missing: "+n);return s}function yt({nodes:t}){for(const n of t){let s=n.y0,a=s;for(const u of n.sourceLinks)u.y0=s+u.width/2,s+=u.width;for(const u of n.targetLinks)u.y1=a+u.width/2,a+=u.width}}function Bt(){let t=0,n=0,s=1,a=1,u=24,y=8,p,m=jt,o=kt,l,h,x=Dt,_=zt,g=6;function v(){const i={nodes:x.apply(null,arguments),links:_.apply(null,arguments)};return T(i),A(i),M(i),I(i),S(i),yt(i),i}v.update=function(i){return yt(i),i},v.nodeId=function(i){return arguments.length?(m=typeof i=="function"?i:X(i),v):m},v.nodeAlign=function(i){return arguments.length?(o=typeof i=="function"?i:X(i),v):o},v.nodeSort=function(i){return arguments.length?(l=i,v):l},v.nodeWidth=function(i){return arguments.length?(u=+i,v):u},v.nodePadding=function(i){return arguments.length?(y=p=+i,v):y},v.nodes=function(i){return arguments.length?(x=typeof i=="function"?i:X(i),v):x},v.links=function(i){return arguments.length?(_=typeof i=="function"?i:X(i),v):_},v.linkSort=function(i){return arguments.length?(h=i,v):h},v.size=function(i){return arguments.length?(t=n=0,s=+i[0],a=+i[1],v):[s-t,a-n]},v.extent=function(i){return arguments.length?(t=+i[0][0],s=+i[1][0],n=+i[0][1],a=+i[1][1],v):[[t,n],[s,a]]},v.iterations=function(i){return arguments.length?(g=+i,v):g};function T({nodes:i,links:f}){for(const[e,r]of i.entries())r.index=e,r.sourceLinks=[],r.targetLinks=[];const c=new Map(i.map((e,r)=>[m(e,r,i),e]));for(const[e,r]of f.entries()){r.index=e;let{source:k,target:b}=r;typeof k!="object"&&(k=r.source=ft(c,k)),typeof b!="object"&&(b=r.target=ft(c,b)),k.sourceLinks.push(r),b.targetLinks.push(r)}if(h!=null)for(const{sourceLinks:e,targetLinks:r}of i)e.sort(h),r.sort(h)}function A({nodes:i}){for(const f of i)f.value=f.fixedValue===void 0?Math.max(nt(f.sourceLinks,it),nt(f.targetLinks,it)):f.fixedValue}function M({nodes:i}){const f=i.length;let c=new Set(i),e=new Set,r=0;for(;c.size;){for(const k of c){k.depth=r;for(const{target:b}of k.sourceLinks)e.add(b)}if(++r>f)throw new Error("circular link");c=e,e=new Set}}function I({nodes:i}){const f=i.length;let c=new Set(i),e=new Set,r=0;for(;c.size;){for(const k of c){k.height=r;for(const{source:b}of k.targetLinks)e.add(b)}if(++r>f)throw new Error("circular link");c=e,e=new Set}}function N({nodes:i}){const f=ct(i,r=>r.depth)+1,c=(s-t-u)/(f-1),e=new Array(f);for(const r of i){const k=Math.max(0,Math.min(f-1,Math.floor(o.call(null,r,f))));r.layer=k,r.x0=t+k*c,r.x1=r.x0+u,e[k]?e[k].push(r):e[k]=[r]}if(l)for(const r of e)r.sort(l);return e}function j(i){const f=pt(i,c=>(a-n-(c.length-1)*p)/nt(c,it));for(const c of i){let e=n;for(const r of c){r.y0=e,r.y1=e+r.value*f,e=r.y1+p;for(const k of r.sourceLinks)k.width=k.value*f}e=(a-e+p)/(c.length+1);for(let r=0;r<c.length;++r){const k=c[r];k.y0+=e*(r+1),k.y1+=e*(r+1)}w(c)}}function S(i){const f=N(i);p=Math.min(y,(a-n)/(ct(f,c=>c.length)-1)),j(f);for(let c=0;c<g;++c){const e=Math.pow(.99,c),r=Math.max(1-e,(c+1)/g);R(f,e,r),C(f,e,r)}}function C(i,f,c){for(let e=1,r=i.length;e<r;++e){const k=i[e];for(const b of k){let L=0,B=0;for(const{source:Y,value:et}of b.targetLinks){let q=et*(b.layer-Y.layer);L+=P(Y,b)*q,B+=q}if(!(B>0))continue;let U=(L/B-b.y0)*f;b.y0+=U,b.y1+=U,z(b)}l===void 0&&k.sort(Q),D(k,c)}}function R(i,f,c){for(let e=i.length,r=e-2;r>=0;--r){const k=i[r];for(const b of k){let L=0,B=0;for(const{target:Y,value:et}of b.sourceLinks){let q=et*(Y.layer-b.layer);L+=E(b,Y)*q,B+=q}if(!(B>0))continue;let U=(L/B-b.y0)*f;b.y0+=U,b.y1+=U,z(b)}l===void 0&&k.sort(Q),D(k,c)}}function D(i,f){const c=i.length>>1,e=i[c];O(i,e.y0-p,c-1,f),V(i,e.y1+p,c+1,f),O(i,a,i.length-1,f),V(i,n,0,f)}function V(i,f,c,e){for(;c<i.length;++c){const r=i[c],k=(f-r.y0)*e;k>1e-6&&(r.y0+=k,r.y1+=k),f=r.y1+p}}function O(i,f,c,e){for(;c>=0;--c){const r=i[c],k=(r.y1-f)*e;k>1e-6&&(r.y0-=k,r.y1-=k),f=r.y0-p}}function z({sourceLinks:i,targetLinks:f}){if(h===void 0){for(const{source:{sourceLinks:c}}of f)c.sort(ht);for(const{target:{targetLinks:c}}of i)c.sort(ut)}}function w(i){if(h===void 0)for(const{sourceLinks:f,targetLinks:c}of i)f.sort(ht),c.sort(ut)}function P(i,f){let c=i.y0-(i.sourceLinks.length-1)*p/2;for(const{target:e,width:r}of i.sourceLinks){if(e===f)break;c+=r+p}for(const{source:e,width:r}of f.targetLinks){if(e===i)break;c-=r}return c}function E(i,f){let c=f.y0-(f.targetLinks.length-1)*p/2;for(const{source:e,width:r}of f.targetLinks){if(e===i)break;c+=r+p}for(const{target:e,width:r}of i.sourceLinks){if(e===f)break;c-=r}return c}return v}var rt=Math.PI,st=2*rt,F=1e-6,Ft=st-F;function ot(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function mt(){return new ot}ot.prototype=mt.prototype={constructor:ot,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,s,a){this._+="Q"+ +t+","+ +n+","+(this._x1=+s)+","+(this._y1=+a)},bezierCurveTo:function(t,n,s,a,u,y){this._+="C"+ +t+","+ +n+","+ +s+","+ +a+","+(this._x1=+u)+","+(this._y1=+y)},arcTo:function(t,n,s,a,u){t=+t,n=+n,s=+s,a=+a,u=+u;var y=this._x1,p=this._y1,m=s-t,o=a-n,l=y-t,h=p-n,x=l*l+h*h;if(u<0)throw new Error("negative radius: "+u);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(x>F)if(!(Math.abs(h*m-o*l)>F)||!u)this._+="L"+(this._x1=t)+","+(this._y1=n);else{var _=s-y,g=a-p,v=m*m+o*o,T=_*_+g*g,A=Math.sqrt(v),M=Math.sqrt(x),I=u*Math.tan((rt-Math.acos((v+x-T)/(2*A*M)))/2),N=I/M,j=I/A;Math.abs(N-1)>F&&(this._+="L"+(t+N*l)+","+(n+N*h)),this._+="A"+u+","+u+",0,0,"+ +(h*_>l*g)+","+(this._x1=t+j*m)+","+(this._y1=n+j*o)}},arc:function(t,n,s,a,u,y){t=+t,n=+n,s=+s,y=!!y;var p=s*Math.cos(a),m=s*Math.sin(a),o=t+p,l=n+m,h=1^y,x=y?a-u:u-a;if(s<0)throw new Error("negative radius: "+s);this._x1===null?this._+="M"+o+","+l:(Math.abs(this._x1-o)>F||Math.abs(this._y1-l)>F)&&(this._+="L"+o+","+l),s&&(x<0&&(x=x%st+st),x>Ft?this._+="A"+s+","+s+",0,1,"+h+","+(t-p)+","+(n-m)+"A"+s+","+s+",0,1,"+h+","+(this._x1=o)+","+(this._y1=l):x>F&&(this._+="A"+s+","+s+",0,"+ +(x>=rt)+","+h+","+(this._x1=t+s*Math.cos(u))+","+(this._y1=n+s*Math.sin(u))))},rect:function(t,n,s,a){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +s+"v"+ +a+"h"+-s+"Z"},toString:function(){return this._}};function dt(t){return function(){return t}}function Rt(t){return t[0]}function Vt(t){return t[1]}var Wt=Array.prototype.slice;function Gt(t){return t.source}function Ut(t){return t.target}function Yt(t){var n=Gt,s=Ut,a=Rt,u=Vt,y=null;function p(){var m,o=Wt.call(arguments),l=n.apply(this,o),h=s.apply(this,o);if(y||(y=m=mt()),t(y,+a.apply(this,(o[0]=l,o)),+u.apply(this,o),+a.apply(this,(o[0]=h,o)),+u.apply(this,o)),m)return y=null,m+""||null}return p.source=function(m){return arguments.length?(n=m,p):n},p.target=function(m){return arguments.length?(s=m,p):s},p.x=function(m){return arguments.length?(a=typeof m=="function"?m:dt(+m),p):a},p.y=function(m){return arguments.length?(u=typeof m=="function"?m:dt(+m),p):u},p.context=function(m){return arguments.length?(y=m??null,p):y},p}function qt(t,n,s,a,u){t.moveTo(n,s),t.bezierCurveTo(n=(n+a)/2,s,n,u,a,u)}function Ht(){return Yt(qt)}function Xt(t){return[t.source.x1,t.y0]}function Qt(t){return[t.target.x0,t.y1]}function Kt(){return Ht().source(Xt).target(Qt)}var at=function(){var t=d(function(m,o,l,h){for(l=l||{},h=m.length;h--;l[m[h]]=o);return l},"o"),n=[1,9],s=[1,10],a=[1,5,10,12],u={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:d(function(o,l,h,x,_,g,v){var T=g.length-1;switch(_){case 7:const A=x.findOrCreateNode(g[T-4].trim().replaceAll('""','"')),M=x.findOrCreateNode(g[T-2].trim().replaceAll('""','"')),I=parseFloat(g[T].trim());x.addLink(A,M,I);break;case 8:case 9:case 11:this.$=g[T];break;case 10:this.$=g[T-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:n,20:s},{1:[2,6],7:11,10:[1,12]},t(s,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(a,[2,8]),t(a,[2,9]),{19:[1,16]},t(a,[2,11]),{1:[2,1]},{1:[2,5]},t(s,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:s},{15:18,16:7,17:8,18:n,20:s},{18:[1,19]},t(s,[2,3]),{12:[1,20]},t(a,[2,10]),{15:21,16:7,17:8,18:n,20:s},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:d(function(o,l){if(l.recoverable)this.trace(o);else{var h=new Error(o);throw h.hash=l,h}},"parseError"),parse:d(function(o){var l=this,h=[0],x=[],_=[null],g=[],v=this.table,T="",A=0,M=0,I=2,N=1,j=g.slice.call(arguments,1),S=Object.create(this.lexer),C={yy:{}};for(var R in this.yy)Object.prototype.hasOwnProperty.call(this.yy,R)&&(C.yy[R]=this.yy[R]);S.setInput(o,C.yy),C.yy.lexer=S,C.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var D=S.yylloc;g.push(D);var V=S.options&&S.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function O(L){h.length=h.length-2*L,_.length=_.length-L,g.length=g.length-L}d(O,"popStack");function z(){var L;return L=x.pop()||S.lex()||N,typeof L!="number"&&(L instanceof Array&&(x=L,L=x.pop()),L=l.symbols_[L]||L),L}d(z,"lex");for(var w,P,E,i,f={},c,e,r,k;;){if(P=h[h.length-1],this.defaultActions[P]?E=this.defaultActions[P]:((w===null||typeof w>"u")&&(w=z()),E=v[P]&&v[P][w]),typeof E>"u"||!E.length||!E[0]){var b="";k=[];for(c in v[P])this.terminals_[c]&&c>I&&k.push("'"+this.terminals_[c]+"'");S.showPosition?b="Parse error on line "+(A+1)+`:
|
|
1
|
+
import{p as xt,q as _t,s as vt,g as bt,b as St,a as wt,_ as d,c as lt,b7 as Lt,j as H,af as Et,r as At,k as Tt}from"./mermaid.core-BTbaaIjb.js";import{o as Mt}from"./ordinal-BENe2yWM.js";import"./index-D1AQffdA.js";import"./init-Gi6I4Gst.js";function Nt(t){for(var n=t.length/6|0,s=new Array(n),a=0;a<n;)s[a]="#"+t.slice(a*6,++a*6);return s}const Ct=Nt("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function ct(t,n){let s;if(n===void 0)for(const a of t)a!=null&&(s<a||s===void 0&&a>=a)&&(s=a);else{let a=-1;for(let u of t)(u=n(u,++a,t))!=null&&(s<u||s===void 0&&u>=u)&&(s=u)}return s}function pt(t,n){let s;if(n===void 0)for(const a of t)a!=null&&(s>a||s===void 0&&a>=a)&&(s=a);else{let a=-1;for(let u of t)(u=n(u,++a,t))!=null&&(s>u||s===void 0&&u>=u)&&(s=u)}return s}function nt(t,n){let s=0;if(n===void 0)for(let a of t)(a=+a)&&(s+=a);else{let a=-1;for(let u of t)(u=+n(u,++a,t))&&(s+=u)}return s}function Pt(t){return t.target.depth}function It(t){return t.depth}function Ot(t,n){return n-1-t.height}function kt(t,n){return t.sourceLinks.length?t.depth:n-1}function $t(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?pt(t.sourceLinks,Pt)-1:0}function X(t){return function(){return t}}function ut(t,n){return Q(t.source,n.source)||t.index-n.index}function ht(t,n){return Q(t.target,n.target)||t.index-n.index}function Q(t,n){return t.y0-n.y0}function it(t){return t.value}function jt(t){return t.index}function Dt(t){return t.nodes}function zt(t){return t.links}function ft(t,n){const s=t.get(n);if(!s)throw new Error("missing: "+n);return s}function yt({nodes:t}){for(const n of t){let s=n.y0,a=s;for(const u of n.sourceLinks)u.y0=s+u.width/2,s+=u.width;for(const u of n.targetLinks)u.y1=a+u.width/2,a+=u.width}}function Bt(){let t=0,n=0,s=1,a=1,u=24,y=8,p,m=jt,o=kt,l,h,x=Dt,_=zt,g=6;function v(){const i={nodes:x.apply(null,arguments),links:_.apply(null,arguments)};return T(i),A(i),M(i),I(i),S(i),yt(i),i}v.update=function(i){return yt(i),i},v.nodeId=function(i){return arguments.length?(m=typeof i=="function"?i:X(i),v):m},v.nodeAlign=function(i){return arguments.length?(o=typeof i=="function"?i:X(i),v):o},v.nodeSort=function(i){return arguments.length?(l=i,v):l},v.nodeWidth=function(i){return arguments.length?(u=+i,v):u},v.nodePadding=function(i){return arguments.length?(y=p=+i,v):y},v.nodes=function(i){return arguments.length?(x=typeof i=="function"?i:X(i),v):x},v.links=function(i){return arguments.length?(_=typeof i=="function"?i:X(i),v):_},v.linkSort=function(i){return arguments.length?(h=i,v):h},v.size=function(i){return arguments.length?(t=n=0,s=+i[0],a=+i[1],v):[s-t,a-n]},v.extent=function(i){return arguments.length?(t=+i[0][0],s=+i[1][0],n=+i[0][1],a=+i[1][1],v):[[t,n],[s,a]]},v.iterations=function(i){return arguments.length?(g=+i,v):g};function T({nodes:i,links:f}){for(const[e,r]of i.entries())r.index=e,r.sourceLinks=[],r.targetLinks=[];const c=new Map(i.map((e,r)=>[m(e,r,i),e]));for(const[e,r]of f.entries()){r.index=e;let{source:k,target:b}=r;typeof k!="object"&&(k=r.source=ft(c,k)),typeof b!="object"&&(b=r.target=ft(c,b)),k.sourceLinks.push(r),b.targetLinks.push(r)}if(h!=null)for(const{sourceLinks:e,targetLinks:r}of i)e.sort(h),r.sort(h)}function A({nodes:i}){for(const f of i)f.value=f.fixedValue===void 0?Math.max(nt(f.sourceLinks,it),nt(f.targetLinks,it)):f.fixedValue}function M({nodes:i}){const f=i.length;let c=new Set(i),e=new Set,r=0;for(;c.size;){for(const k of c){k.depth=r;for(const{target:b}of k.sourceLinks)e.add(b)}if(++r>f)throw new Error("circular link");c=e,e=new Set}}function I({nodes:i}){const f=i.length;let c=new Set(i),e=new Set,r=0;for(;c.size;){for(const k of c){k.height=r;for(const{source:b}of k.targetLinks)e.add(b)}if(++r>f)throw new Error("circular link");c=e,e=new Set}}function N({nodes:i}){const f=ct(i,r=>r.depth)+1,c=(s-t-u)/(f-1),e=new Array(f);for(const r of i){const k=Math.max(0,Math.min(f-1,Math.floor(o.call(null,r,f))));r.layer=k,r.x0=t+k*c,r.x1=r.x0+u,e[k]?e[k].push(r):e[k]=[r]}if(l)for(const r of e)r.sort(l);return e}function j(i){const f=pt(i,c=>(a-n-(c.length-1)*p)/nt(c,it));for(const c of i){let e=n;for(const r of c){r.y0=e,r.y1=e+r.value*f,e=r.y1+p;for(const k of r.sourceLinks)k.width=k.value*f}e=(a-e+p)/(c.length+1);for(let r=0;r<c.length;++r){const k=c[r];k.y0+=e*(r+1),k.y1+=e*(r+1)}w(c)}}function S(i){const f=N(i);p=Math.min(y,(a-n)/(ct(f,c=>c.length)-1)),j(f);for(let c=0;c<g;++c){const e=Math.pow(.99,c),r=Math.max(1-e,(c+1)/g);R(f,e,r),C(f,e,r)}}function C(i,f,c){for(let e=1,r=i.length;e<r;++e){const k=i[e];for(const b of k){let L=0,B=0;for(const{source:Y,value:et}of b.targetLinks){let q=et*(b.layer-Y.layer);L+=P(Y,b)*q,B+=q}if(!(B>0))continue;let U=(L/B-b.y0)*f;b.y0+=U,b.y1+=U,z(b)}l===void 0&&k.sort(Q),D(k,c)}}function R(i,f,c){for(let e=i.length,r=e-2;r>=0;--r){const k=i[r];for(const b of k){let L=0,B=0;for(const{target:Y,value:et}of b.sourceLinks){let q=et*(Y.layer-b.layer);L+=E(b,Y)*q,B+=q}if(!(B>0))continue;let U=(L/B-b.y0)*f;b.y0+=U,b.y1+=U,z(b)}l===void 0&&k.sort(Q),D(k,c)}}function D(i,f){const c=i.length>>1,e=i[c];O(i,e.y0-p,c-1,f),V(i,e.y1+p,c+1,f),O(i,a,i.length-1,f),V(i,n,0,f)}function V(i,f,c,e){for(;c<i.length;++c){const r=i[c],k=(f-r.y0)*e;k>1e-6&&(r.y0+=k,r.y1+=k),f=r.y1+p}}function O(i,f,c,e){for(;c>=0;--c){const r=i[c],k=(r.y1-f)*e;k>1e-6&&(r.y0-=k,r.y1-=k),f=r.y0-p}}function z({sourceLinks:i,targetLinks:f}){if(h===void 0){for(const{source:{sourceLinks:c}}of f)c.sort(ht);for(const{target:{targetLinks:c}}of i)c.sort(ut)}}function w(i){if(h===void 0)for(const{sourceLinks:f,targetLinks:c}of i)f.sort(ht),c.sort(ut)}function P(i,f){let c=i.y0-(i.sourceLinks.length-1)*p/2;for(const{target:e,width:r}of i.sourceLinks){if(e===f)break;c+=r+p}for(const{source:e,width:r}of f.targetLinks){if(e===i)break;c-=r}return c}function E(i,f){let c=f.y0-(f.targetLinks.length-1)*p/2;for(const{source:e,width:r}of f.targetLinks){if(e===i)break;c+=r+p}for(const{target:e,width:r}of i.sourceLinks){if(e===f)break;c-=r}return c}return v}var rt=Math.PI,st=2*rt,F=1e-6,Ft=st-F;function ot(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function mt(){return new ot}ot.prototype=mt.prototype={constructor:ot,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,s,a){this._+="Q"+ +t+","+ +n+","+(this._x1=+s)+","+(this._y1=+a)},bezierCurveTo:function(t,n,s,a,u,y){this._+="C"+ +t+","+ +n+","+ +s+","+ +a+","+(this._x1=+u)+","+(this._y1=+y)},arcTo:function(t,n,s,a,u){t=+t,n=+n,s=+s,a=+a,u=+u;var y=this._x1,p=this._y1,m=s-t,o=a-n,l=y-t,h=p-n,x=l*l+h*h;if(u<0)throw new Error("negative radius: "+u);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(x>F)if(!(Math.abs(h*m-o*l)>F)||!u)this._+="L"+(this._x1=t)+","+(this._y1=n);else{var _=s-y,g=a-p,v=m*m+o*o,T=_*_+g*g,A=Math.sqrt(v),M=Math.sqrt(x),I=u*Math.tan((rt-Math.acos((v+x-T)/(2*A*M)))/2),N=I/M,j=I/A;Math.abs(N-1)>F&&(this._+="L"+(t+N*l)+","+(n+N*h)),this._+="A"+u+","+u+",0,0,"+ +(h*_>l*g)+","+(this._x1=t+j*m)+","+(this._y1=n+j*o)}},arc:function(t,n,s,a,u,y){t=+t,n=+n,s=+s,y=!!y;var p=s*Math.cos(a),m=s*Math.sin(a),o=t+p,l=n+m,h=1^y,x=y?a-u:u-a;if(s<0)throw new Error("negative radius: "+s);this._x1===null?this._+="M"+o+","+l:(Math.abs(this._x1-o)>F||Math.abs(this._y1-l)>F)&&(this._+="L"+o+","+l),s&&(x<0&&(x=x%st+st),x>Ft?this._+="A"+s+","+s+",0,1,"+h+","+(t-p)+","+(n-m)+"A"+s+","+s+",0,1,"+h+","+(this._x1=o)+","+(this._y1=l):x>F&&(this._+="A"+s+","+s+",0,"+ +(x>=rt)+","+h+","+(this._x1=t+s*Math.cos(u))+","+(this._y1=n+s*Math.sin(u))))},rect:function(t,n,s,a){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +s+"v"+ +a+"h"+-s+"Z"},toString:function(){return this._}};function dt(t){return function(){return t}}function Rt(t){return t[0]}function Vt(t){return t[1]}var Wt=Array.prototype.slice;function Gt(t){return t.source}function Ut(t){return t.target}function Yt(t){var n=Gt,s=Ut,a=Rt,u=Vt,y=null;function p(){var m,o=Wt.call(arguments),l=n.apply(this,o),h=s.apply(this,o);if(y||(y=m=mt()),t(y,+a.apply(this,(o[0]=l,o)),+u.apply(this,o),+a.apply(this,(o[0]=h,o)),+u.apply(this,o)),m)return y=null,m+""||null}return p.source=function(m){return arguments.length?(n=m,p):n},p.target=function(m){return arguments.length?(s=m,p):s},p.x=function(m){return arguments.length?(a=typeof m=="function"?m:dt(+m),p):a},p.y=function(m){return arguments.length?(u=typeof m=="function"?m:dt(+m),p):u},p.context=function(m){return arguments.length?(y=m??null,p):y},p}function qt(t,n,s,a,u){t.moveTo(n,s),t.bezierCurveTo(n=(n+a)/2,s,n,u,a,u)}function Ht(){return Yt(qt)}function Xt(t){return[t.source.x1,t.y0]}function Qt(t){return[t.target.x0,t.y1]}function Kt(){return Ht().source(Xt).target(Qt)}var at=function(){var t=d(function(m,o,l,h){for(l=l||{},h=m.length;h--;l[m[h]]=o);return l},"o"),n=[1,9],s=[1,10],a=[1,5,10,12],u={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:d(function(o,l,h,x,_,g,v){var T=g.length-1;switch(_){case 7:const A=x.findOrCreateNode(g[T-4].trim().replaceAll('""','"')),M=x.findOrCreateNode(g[T-2].trim().replaceAll('""','"')),I=parseFloat(g[T].trim());x.addLink(A,M,I);break;case 8:case 9:case 11:this.$=g[T];break;case 10:this.$=g[T-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:n,20:s},{1:[2,6],7:11,10:[1,12]},t(s,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(a,[2,8]),t(a,[2,9]),{19:[1,16]},t(a,[2,11]),{1:[2,1]},{1:[2,5]},t(s,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:s},{15:18,16:7,17:8,18:n,20:s},{18:[1,19]},t(s,[2,3]),{12:[1,20]},t(a,[2,10]),{15:21,16:7,17:8,18:n,20:s},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:d(function(o,l){if(l.recoverable)this.trace(o);else{var h=new Error(o);throw h.hash=l,h}},"parseError"),parse:d(function(o){var l=this,h=[0],x=[],_=[null],g=[],v=this.table,T="",A=0,M=0,I=2,N=1,j=g.slice.call(arguments,1),S=Object.create(this.lexer),C={yy:{}};for(var R in this.yy)Object.prototype.hasOwnProperty.call(this.yy,R)&&(C.yy[R]=this.yy[R]);S.setInput(o,C.yy),C.yy.lexer=S,C.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var D=S.yylloc;g.push(D);var V=S.options&&S.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function O(L){h.length=h.length-2*L,_.length=_.length-L,g.length=g.length-L}d(O,"popStack");function z(){var L;return L=x.pop()||S.lex()||N,typeof L!="number"&&(L instanceof Array&&(x=L,L=x.pop()),L=l.symbols_[L]||L),L}d(z,"lex");for(var w,P,E,i,f={},c,e,r,k;;){if(P=h[h.length-1],this.defaultActions[P]?E=this.defaultActions[P]:((w===null||typeof w>"u")&&(w=z()),E=v[P]&&v[P][w]),typeof E>"u"||!E.length||!E[0]){var b="";k=[];for(c in v[P])this.terminals_[c]&&c>I&&k.push("'"+this.terminals_[c]+"'");S.showPosition?b="Parse error on line "+(A+1)+`:
|
|
2
2
|
`+S.showPosition()+`
|
|
3
3
|
Expecting `+k.join(", ")+", got '"+(this.terminals_[w]||w)+"'":b="Parse error on line "+(A+1)+": Unexpected "+(w==N?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(b,{text:S.match,token:this.terminals_[w]||w,line:S.yylineno,loc:D,expected:k})}if(E[0]instanceof Array&&E.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+w);switch(E[0]){case 1:h.push(w),_.push(S.yytext),g.push(S.yylloc),h.push(E[1]),w=null,M=S.yyleng,T=S.yytext,A=S.yylineno,D=S.yylloc;break;case 2:if(e=this.productions_[E[1]][1],f.$=_[_.length-e],f._$={first_line:g[g.length-(e||1)].first_line,last_line:g[g.length-1].last_line,first_column:g[g.length-(e||1)].first_column,last_column:g[g.length-1].last_column},V&&(f._$.range=[g[g.length-(e||1)].range[0],g[g.length-1].range[1]]),i=this.performAction.apply(f,[T,M,A,C.yy,E[1],_,g].concat(j)),typeof i<"u")return i;e&&(h=h.slice(0,-1*e*2),_=_.slice(0,-1*e),g=g.slice(0,-1*e)),h.push(this.productions_[E[1]][0]),_.push(f.$),g.push(f._$),r=v[h[h.length-2]][h[h.length-1]],h.push(r);break;case 3:return!0}}return!0},"parse")},y=function(){var m={EOF:1,parseError:d(function(l,h){if(this.yy.parser)this.yy.parser.parseError(l,h);else throw new Error(l)},"parseError"),setInput:d(function(o,l){return this.yy=l||this.yy||{},this._input=o,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:d(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var l=o.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:d(function(o){var l=o.length,h=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var x=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),h.length-1&&(this.yylineno-=h.length-1);var _=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:h?(h.length===x.length?this.yylloc.first_column:0)+x[x.length-h.length].length-h[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:d(function(o){this.unput(this.match.slice(o))},"less"),pastInput:d(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var o=this.pastInput(),l=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
|