agentroam-runtime-darwin-arm64 0.2.0-preview.82 → 0.2.0-preview.83
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 +19 -18
- package/runtime/.next/app-path-routes-manifest.json +1 -1
- package/runtime/.next/build-manifest.json +7 -7
- package/runtime/.next/prerender-manifest.json +1 -1
- package/runtime/.next/react-loadable-manifest.json +4 -4
- 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/engine-threads.body +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/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 +39 -39
- package/runtime/.next/server/middleware-build-manifest.js +1 -1
- package/runtime/.next/server/middleware-react-loadable-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/20.2eb9bc3a5b4d410b.js +1 -0
- package/runtime/.next/static/chunks/325-0818ba5a4060a0e8.js +1 -0
- package/runtime/.next/static/chunks/34.c7dbf7ffc8914be9.js +1 -0
- package/runtime/.next/static/chunks/686.7b5c444243fcf29a.js +1 -0
- package/runtime/.next/static/chunks/app/web/page-8adf166584b0088e.js +1 -0
- package/runtime/.next/static/chunks/{webpack-f51a057f833e73eb.js → webpack-040c7a20dd455025.js} +1 -1
- package/runtime/.next/static/css/645d4c94ea111811.css +1 -0
- package/runtime/lib/tunnel-control.mjs +1 -1
- 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 +3 -3
- package/runtime/node_modules/@agent/core/dist/index.js +10 -3
- package/runtime/node_modules/@agent/native-runtime/dist/index.js +55 -24
- package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.cjs +41 -10
- package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.min.cjs +9 -9
- package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.min.mjs +10 -10
- package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.mjs +41 -10
- package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.node.cjs +41 -10
- package/runtime/node_modules/mediabunny/dist/modules/src/isobmff/isobmff-demuxer.js +50 -11
- 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 +59 -13
- package/runtime/node_modules/mediabunny/src/metadata.ts +1 -0
- package/runtime/node_modules/mediabunny/src/version.ts +1 -1
- package/runtime/package-lock.json +3 -3
- package/runtime/webapp/dist/assets/AIHubView-HV2FIroL.js +1 -0
- package/runtime/webapp/dist/assets/{AgentManager-B8TTqJaL.js → AgentManager-C4zPGI-Y.js} +1 -1
- package/runtime/webapp/dist/assets/AiHubPane-CEjQjdqT.js +1 -0
- package/runtime/webapp/dist/assets/App-CS2wVlfV.js +68 -0
- package/runtime/webapp/dist/assets/{BrowserLivePanel-DnzJOz5w.js → BrowserLivePanel-BwtEM-IV.js} +2 -2
- package/runtime/webapp/dist/assets/CalendarPage-DY8pZK7d.js +1 -0
- package/runtime/webapp/dist/assets/{CalendarView-QXZbXnXA.js → CalendarView-CuBzp-g8.js} +3 -3
- package/runtime/webapp/dist/assets/CollaborationCreateDialog-DsXkxAd1.js +1 -0
- package/runtime/webapp/dist/assets/CollaborationDashboard-CvE5vaOh.js +1 -0
- package/runtime/webapp/dist/assets/{CollaborationPage-B2mIAc-h.js → CollaborationPage-Cjeo60S0.js} +2 -2
- package/runtime/webapp/dist/assets/{FilePreview-BCEiERA1.js → FilePreview-CyXKv1Cu.js} +5 -5
- package/runtime/webapp/dist/assets/{FileTree-CMbs1Gj3.js → FileTree-DNI9VhEp.js} +2 -2
- package/runtime/webapp/dist/assets/FileWorkspaceDrawer-DRluuYWn.js +1 -0
- package/runtime/webapp/dist/assets/FlowStudioPane-CKlzxza_.js +5 -0
- package/runtime/webapp/dist/assets/HostProjectPicker-CjlxN2ct.js +1 -0
- package/runtime/webapp/dist/assets/{LSPServerList-COMVmsvb.js → LSPServerList-BbAS_sm-.js} +1 -1
- package/runtime/webapp/dist/assets/{MCPServerList-C_juD6B4.js → MCPServerList-DkVUlKEJ.js} +1 -1
- package/runtime/webapp/dist/assets/{MemoryViewer-Et2vysSN.js → MemoryViewer-Ywl80xth.js} +1 -1
- package/runtime/webapp/dist/assets/NewSessionWindow-B4H26X5c.js +1 -0
- package/runtime/webapp/dist/assets/RemoteDesktopPage-B4q2I23i.js +1 -0
- package/runtime/webapp/dist/assets/{RemoteDesktopTabBridge-BFzNwpUn.js → RemoteDesktopTabBridge-B_cCKi7K.js} +1 -1
- package/runtime/webapp/dist/assets/{RunningSessionsIcon-D_cOqmmk.js → RunningSessionsIcon-Cz8_524L.js} +1 -1
- package/runtime/webapp/dist/assets/{SessionDashboard-yjdEKypJ.js → SessionDashboard-DXPSvNsY.js} +2 -2
- package/runtime/webapp/dist/assets/{SessionDashboardBridge-Kc_1Et9r.js → SessionDashboardBridge-7BjKdfN8.js} +1 -1
- package/runtime/webapp/dist/assets/{SettingsPanel-t26XhKHP.js → SettingsPanel-C78O9_ho.js} +1 -1
- package/runtime/webapp/dist/assets/{SkillManager-nZU7b1sc.js → SkillManager-BdkBUxhH.js} +1 -1
- package/runtime/webapp/dist/assets/{TaskPaneTerminal-BPaCKman.js → TaskPaneTerminal-B2WKBysj.js} +1 -1
- package/runtime/webapp/dist/assets/{TerminalPane-CiIpI1Id.js → TerminalPane-CxGcN85G.js} +1 -1
- package/runtime/webapp/dist/assets/TodoPage-CdzjZR2O.js +1 -0
- package/runtime/webapp/dist/assets/{abnfDiagram-VCTEODGH-DmKjGVfG.js → abnfDiagram-VCTEODGH-DFIXyU71.js} +1 -1
- package/runtime/webapp/dist/assets/{arc-D6bpvBke.js → arc-CLpaLEla.js} +1 -1
- package/runtime/webapp/dist/assets/{architectureDiagram-5GKGNRK7-NEKc2BYf.js → architectureDiagram-5GKGNRK7-Df8T0lx0.js} +1 -1
- package/runtime/webapp/dist/assets/{blockDiagram-I7D4REHJ-V6G00twZ.js → blockDiagram-I7D4REHJ-jCoyPZhV.js} +1 -1
- package/runtime/webapp/dist/assets/{c4Diagram-7LVT6UL2-CojA33V5.js → c4Diagram-7LVT6UL2-DsZuTCuo.js} +1 -1
- package/runtime/webapp/dist/assets/{calendar-days-DXE_2mLa.js → calendar-days-BIRmYMrW.js} +1 -1
- package/runtime/webapp/dist/assets/channel-0IyV-PVi.js +1 -0
- package/runtime/webapp/dist/assets/{check-UipgMBET.js → check-DCU8YHqr.js} +1 -1
- package/runtime/webapp/dist/assets/{chevron-down-Dvinwg2S.js → chevron-down-BUEiUZA7.js} +1 -1
- package/runtime/webapp/dist/assets/{chevron-right-BGU3tcLA.js → chevron-right-B_ITnckH.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-2Q5K7J3B-DObpPEgk.js → chunk-2Q5K7J3B-BEZp3wuG.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-5VM5RSS4-PaTzAg6w.js → chunk-5VM5RSS4-BGGDhFwD.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-F27PBJKO-Pn4gut94.js → chunk-F27PBJKO-Mqzm4ODE.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-IMKFNOWR-nRaVFzK9.js → chunk-IMKFNOWR-DtnGgUQJ.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-JWPE2WC7-CxssjKKN.js → chunk-JWPE2WC7-By3kXE4y.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-POPQ4Y6H-CweDXr-B.js → chunk-POPQ4Y6H-BTHuMHN1.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-SVP7TREG-C7T3FGE-.js → chunk-SVP7TREG-BeWH1pvB.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-TICWLB2K-Nc0H-0_V.js → chunk-TICWLB2K-oiekJTZh.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-XXDRQBXY-D_GQGF5g.js → chunk-XXDRQBXY-B7CKqUBs.js} +1 -1
- package/runtime/webapp/dist/assets/classDiagram-ZZMXUADV-Dm5zwUmQ.js +1 -0
- package/runtime/webapp/dist/assets/classDiagram-v2-VYDZK3BY-Dm5zwUmQ.js +1 -0
- package/runtime/webapp/dist/assets/{client-Bb0hpbIR.js → client-BpqlZTm2.js} +1 -1
- package/runtime/webapp/dist/assets/{codeSyntax-DHonp3tF.js → codeSyntax-GjP28nDI.js} +1 -1
- package/runtime/webapp/dist/assets/{collaboration-e_iziKU1.js → collaboration-CYS2Soeh.js} +1 -1
- package/runtime/webapp/dist/assets/{composer-file-routing-CWyT7leB.js → composer-file-routing-DHdpFYk8.js} +2 -2
- package/runtime/webapp/dist/assets/{cose-bilkent-JH36ORCC-Ac_FBan4.js → cose-bilkent-JH36ORCC-BmhhO76e.js} +1 -1
- package/runtime/webapp/dist/assets/{cynefin-OW5HDTMX-vr6c389q.js → cynefin-OW5HDTMX-BesIxLGS.js} +1 -1
- package/runtime/webapp/dist/assets/{cynefinDiagram-5FMLGOSQ-sXmUCrp_.js → cynefinDiagram-5FMLGOSQ-DdF6XhwX.js} +1 -1
- package/runtime/webapp/dist/assets/{dagre-GXQ25YYZ-B0DmGxDv.js → dagre-GXQ25YYZ-CxUfRr5w.js} +1 -1
- package/runtime/webapp/dist/assets/{diagram-S7CK7UJ4-Dn-2jJ6S.js → diagram-S7CK7UJ4-zSD7nygh.js} +1 -1
- package/runtime/webapp/dist/assets/{diagram-UQ7AKVKN-BcasYsju.js → diagram-UQ7AKVKN-CgirUu7t.js} +1 -1
- package/runtime/webapp/dist/assets/{diagram-VSXAHHWV-DCgGkc82.js → diagram-VSXAHHWV-CkI9kDpP.js} +1 -1
- package/runtime/webapp/dist/assets/{diagram-VX7I27RA-Cjs0Ny4i.js → diagram-VX7I27RA-ZfbGJBGR.js} +1 -1
- package/runtime/webapp/dist/assets/{diagram-Z3DM3KII-0nyddp0v.js → diagram-Z3DM3KII-CA44IJP4.js} +1 -1
- package/runtime/webapp/dist/assets/{ebnfDiagram-PWID7BFC-By7gCUsz.js → ebnfDiagram-PWID7BFC-CVwSxyot.js} +1 -1
- package/runtime/webapp/dist/assets/{erDiagram-RLTQ6QDP-DdwBp45A.js → erDiagram-RLTQ6QDP-DwjlVHEs.js} +1 -1
- package/runtime/webapp/dist/assets/{file-types-nujx8XUw.js → file-types-Dj25tuty.js} +1 -1
- package/runtime/webapp/dist/assets/{flowDiagram-HODETNUW-DbOwRaT9.js → flowDiagram-HODETNUW-CEt0pwA8.js} +1 -1
- package/runtime/webapp/dist/assets/{ganttDiagram-EL5Y4UJY-CG8obc7O.js → ganttDiagram-EL5Y4UJY-CNsj7gWS.js} +1 -1
- package/runtime/webapp/dist/assets/{gitGraphDiagram-WWUBYQGX-ru6aSu_g.js → gitGraphDiagram-WWUBYQGX-ERbll1_Q.js} +1 -1
- package/runtime/webapp/dist/assets/{history-DaBh5_SJ.js → history-DTS97eAH.js} +1 -1
- package/runtime/webapp/dist/assets/{image-plus-Cm9jq1yo.js → image-plus-BmlwMe18.js} +1 -1
- package/runtime/webapp/dist/assets/index-C30NoLsn.js +500 -0
- package/runtime/webapp/dist/assets/{index-BAGzBXQc.css → index-COFV-DUC.css} +1 -1
- package/runtime/webapp/dist/assets/{infoDiagram-27XIBGKW-Crx1iSbW.js → infoDiagram-27XIBGKW-BiMEmJW5.js} +1 -1
- package/runtime/webapp/dist/assets/{ishikawaDiagram-5VMMS53U-ClQPMEk5.js → ishikawaDiagram-5VMMS53U-CPlJXmF2.js} +1 -1
- package/runtime/webapp/dist/assets/{journeyDiagram-3NMN7TZE-DHso2Xht.js → journeyDiagram-3NMN7TZE-DJJ-qvlw.js} +1 -1
- package/runtime/webapp/dist/assets/{kanban-definition-UXKFOSKX-D6psIAhv.js → kanban-definition-UXKFOSKX-PHmavvDJ.js} +1 -1
- package/runtime/webapp/dist/assets/{layout-B6AVZ9v9.js → layout-DH5OfcVL.js} +1 -1
- package/runtime/webapp/dist/assets/{linear-CEZOUjlB.js → linear-DQek-QDQ.js} +1 -1
- package/runtime/webapp/dist/assets/{list-todo-D9ChIz0f.js → list-todo-DULblcsU.js} +1 -1
- package/runtime/webapp/dist/assets/{locate-fixed-2R48MVg_.js → locate-fixed-B3zScPI-.js} +1 -1
- package/runtime/webapp/dist/assets/{mermaid.core-DH0df9xk.js → mermaid.core-D6eHnLLU.js} +5 -5
- package/runtime/webapp/dist/assets/{mindmap-definition-YA3MSWOX-QWt8leZC.js → mindmap-definition-YA3MSWOX-D0TkZusX.js} +1 -1
- package/runtime/webapp/dist/assets/{mobileViewport-CKvpvxYc.js → mobileViewport-BhIxH-zP.js} +1 -1
- package/runtime/webapp/dist/assets/{new-session-window-CiRwM3Od.js → new-session-window-bxVA-U3Y.js} +56 -56
- package/runtime/webapp/dist/assets/page-DyPXAvyj.js +86 -0
- package/runtime/webapp/dist/assets/{pause-ddt7BLlm.js → pause-C793N3J1.js} +1 -1
- package/runtime/webapp/dist/assets/{pegDiagram-XKGWAZYB-JNBt0nDx.js → pegDiagram-XKGWAZYB-DMIjPBzH.js} +1 -1
- package/runtime/webapp/dist/assets/{pieDiagram-E7YTZNPT-g0hnDqNp.js → pieDiagram-E7YTZNPT-DctF47JZ.js} +1 -1
- package/runtime/webapp/dist/assets/{pin-BTP5lC_c.js → pin-BLVakDSL.js} +1 -1
- package/runtime/webapp/dist/assets/{quadrantDiagram-AXDQQJYC-mLZASjSm.js → quadrantDiagram-AXDQQJYC-JnwbWWwT.js} +1 -1
- package/runtime/webapp/dist/assets/{railroadDiagram-O6MQD6OU-CAXNAZhB.js → railroadDiagram-O6MQD6OU-DcpHMNVP.js} +1 -1
- package/runtime/webapp/dist/assets/{requirementDiagram-BXWQKSXE-BC8y1ZXE.js → requirementDiagram-BXWQKSXE-C-fRbIOI.js} +1 -1
- package/runtime/webapp/dist/assets/{rotate-ccw-CHFTy38a.js → rotate-ccw-CyZK_Om1.js} +1 -1
- package/runtime/webapp/dist/assets/{rotate-cw-CFCtRFDl.js → rotate-cw-ChAt9mcI.js} +1 -1
- package/runtime/webapp/dist/assets/{sankeyDiagram-P5KCCOFB-Boi5NPjT.js → sankeyDiagram-P5KCCOFB-Sb34Y9Ep.js} +1 -1
- package/runtime/webapp/dist/assets/{send-CzCncLlt.js → send-DlrISC4K.js} +1 -1
- package/runtime/webapp/dist/assets/{sequenceDiagram-WJ2MYXX4-D4ccoVEB.js → sequenceDiagram-WJ2MYXX4-BeHoOpkJ.js} +1 -1
- package/runtime/webapp/dist/assets/{session-dashboard-C0KfSCDl.js → session-dashboard-D1JY1ka0.js} +1 -1
- package/runtime/webapp/dist/assets/{session-tree-CTzXmV6R.js → session-tree-Q-jABJNB.js} +1 -1
- package/runtime/webapp/dist/assets/{shield-check-Da6EGdIt.js → shield-check-Bzd1i1OQ.js} +1 -1
- package/runtime/webapp/dist/assets/{sizeCapture-INFHLROL-Cd5jIVgK.js → sizeCapture-INFHLROL-DspvE2eQ.js} +1 -1
- package/runtime/webapp/dist/assets/{stateDiagram-D77RDMKH-DXlmaNwu.js → stateDiagram-D77RDMKH-oBIvmRy9.js} +1 -1
- package/runtime/webapp/dist/assets/stateDiagram-v2-MP3YSRHH-DXD2F0in.js +1 -0
- package/runtime/webapp/dist/assets/{swimlanes-42K2YHIH-DyhRB_e0.js → swimlanes-42K2YHIH-CAdrbVmI.js} +1 -1
- package/runtime/webapp/dist/assets/swimlanesDiagram-VR7AAH4N-CXpNu-5Z.js +8 -0
- package/runtime/webapp/dist/assets/{timeline-definition-24CTP7MA-Bkfs9Mi-.js → timeline-definition-24CTP7MA-BtWjc4KI.js} +1 -1
- package/runtime/webapp/dist/assets/{trash-2-C682LDDA.js → trash-2-DwFoTvHX.js} +1 -1
- package/runtime/webapp/dist/assets/{types-CfOuS-6l.js → types-COzZsLPY.js} +1 -1
- package/runtime/webapp/dist/assets/{use-session-activity-C9Cn92Hj.js → use-session-activity-BRhj0V5U.js} +1 -1
- package/runtime/webapp/dist/assets/{vennDiagram-4TSXK5OY-APWT64sw.js → vennDiagram-4TSXK5OY-Be4H6PYr.js} +1 -1
- package/runtime/webapp/dist/assets/{wardleyDiagram-VM6X3IG4-H7xLoxwM.js → wardleyDiagram-VM6X3IG4-COVxCAu8.js} +1 -1
- package/runtime/webapp/dist/assets/{web-CT8e03DV.js → web-BdMHTzmo.js} +1 -1
- package/runtime/webapp/dist/assets/{web-DG022HwJ.js → web-Qg6ZVe1T.js} +1 -1
- package/runtime/webapp/dist/assets/{loader-circle-CAHZbD5s.js → x-CoIXF2eL.js} +2 -2
- package/runtime/webapp/dist/assets/{xychartDiagram-S5SC5T6Z-DIrxZ4UJ.js → xychartDiagram-S5SC5T6Z-J_S9eMK9.js} +1 -1
- package/runtime/webapp/dist/assets/{zoom-out-CRN76HNZ.js → zoom-out-C10hb0zX.js} +1 -1
- package/runtime/webapp/dist/index.html +2 -2
- package/runtime/.next/static/chunks/106.b2050e53421795af.js +0 -1
- package/runtime/.next/static/chunks/20.7bd5212774091396.js +0 -1
- package/runtime/.next/static/chunks/34.40a88b70750502fb.js +0 -1
- package/runtime/.next/static/chunks/753-90c7dd1ba08be9be.js +0 -1
- package/runtime/.next/static/chunks/app/web/page-f008ab6dfeab7ce7.js +0 -1
- package/runtime/webapp/dist/assets/AIHubView-CNKanNZa.js +0 -1
- package/runtime/webapp/dist/assets/AiHubPane-Coyn3P-J.js +0 -1
- package/runtime/webapp/dist/assets/App-BGIGpBp3.js +0 -68
- package/runtime/webapp/dist/assets/CalendarPage-D0oaq2_l.js +0 -1
- package/runtime/webapp/dist/assets/CollaborationCreateDialog-CE8OML-A.js +0 -1
- package/runtime/webapp/dist/assets/CollaborationDashboard-CV18iiBO.js +0 -1
- package/runtime/webapp/dist/assets/FileWorkspaceDrawer-BxFS-0sF.js +0 -1
- package/runtime/webapp/dist/assets/FlowStudioPane-CVP0Q6zR.js +0 -5
- package/runtime/webapp/dist/assets/HostProjectPicker-DUUgM2Cm.js +0 -1
- package/runtime/webapp/dist/assets/NewSessionWindow-DwJhkRJd.js +0 -1
- package/runtime/webapp/dist/assets/RemoteDesktopPage-Cqsea4X7.js +0 -1
- package/runtime/webapp/dist/assets/TodoPage-CG__S6_l.js +0 -1
- package/runtime/webapp/dist/assets/channel-D66Qxmo0.js +0 -1
- package/runtime/webapp/dist/assets/classDiagram-ZZMXUADV-BAX0-S6b.js +0 -1
- package/runtime/webapp/dist/assets/classDiagram-v2-VYDZK3BY-BAX0-S6b.js +0 -1
- package/runtime/webapp/dist/assets/index-YrEOkxAg.js +0 -500
- package/runtime/webapp/dist/assets/page-Cd9ci9uo.js +0 -86
- package/runtime/webapp/dist/assets/stateDiagram-v2-MP3YSRHH-Dh6coc1l.js +0 -1
- package/runtime/webapp/dist/assets/swimlanesDiagram-VR7AAH4N-BzriATjP.js +0 -8
- /package/runtime/.next/static/{_rMvYWpbWkNWrFkCQx3rK → XwGGZtJQeU5VoGqV-1dyI}/_buildManifest.js +0 -0
- /package/runtime/.next/static/{_rMvYWpbWkNWrFkCQx3rK → XwGGZtJQeU5VoGqV-1dyI}/_ssgManifest.js +0 -0
- /package/runtime/.next/static/chunks/{183-dbd3e343da4ba103.js → 183-5019797f0b42210b.js} +0 -0
- /package/runtime/.next/static/chunks/{3cc391f0-4ff886cecc4d6d79.js → 3cc391f0-6cd083946ece156d.js} +0 -0
- /package/runtime/.next/static/chunks/app/_not-found/{page-c0fc9b6684d4f0ca.js → page-cffe4d626dcef5fd.js} +0 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./TerminalPane-CxGcN85G.js","./index-C30NoLsn.js","./index-COFV-DUC.css","./mobileViewport-BhIxH-zP.js","./RemoteDesktopTabBridge-B_cCKi7K.js","./TerminalPane-6GBZ9nXN.css","./FileTree-DNI9VhEp.js","./file-types-Dj25tuty.js","./locate-fixed-B3zScPI-.js","./x-CoIXF2eL.js","./chevron-down-BUEiUZA7.js","./chevron-right-B_ITnckH.js","./trash-2-DwFoTvHX.js","./FilePreview-CyXKv1Cu.js","./rotate-ccw-CyZK_Om1.js","./check-DCU8YHqr.js","./FilePreview-B7Ab2X_E.css","./AiHubPane-CEjQjdqT.js","./image-plus-BmlwMe18.js","./send-DlrISC4K.js","./FlowStudioPane-CKlzxza_.js","./rotate-cw-ChAt9mcI.js","./RunningSessionsIcon-Cz8_524L.js","./calendar-days-BIRmYMrW.js","./pin-BLVakDSL.js","./CollaborationTabBridge-Dxq4G1Uk.js","./SessionDashboardBridge-7BjKdfN8.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{c as wr,r,j as e,h as Je,a as Ae,R as ye,G as xr,I as yr,J as De,K as Fn,O as vr,e as Me,Q as xe,U as vt,F as dt,P as Bn,S as kr,T as $n,V as kt,X as jr,Y as Er,Z as hn,x as Sr,_ as Cr,$ as Tr,a0 as Nr,a1 as gn,a2 as Rr,a3 as Lr,a4 as Pr,a5 as Ir,a6 as ut,a7 as Ar,a8 as Ge,a9 as _r,aa as Dr,ab as Mr,ac as zr,d as pt,ad as Or,ae as lt,af as Wr,ag as Fr,ah as Br,ai as $r,aj as Ur,ak as Hr,y as qr,al as Vr,am as bn,an as ze,o as wn}from"./index-C30NoLsn.js";import{S as Un,R as Hn,M as xn,a as Yr,G as mt,b as Kr,c as Gr,C as Xr}from"./RunningSessionsIcon-Cz8_524L.js";import{X as Te}from"./x-CoIXF2eL.js";import{C as qn}from"./calendar-days-BIRmYMrW.js";import{C as Jr}from"./chevron-down-BUEiUZA7.js";import{C as ft}from"./check-DCU8YHqr.js";import{T as jt,P as ht,A as Qr,F as Zr}from"./trash-2-DwFoTvHX.js";import{E as Et,c as eo,e as to,f as yn,R as no,b as ro}from"./RemoteDesktopTabBridge-B_cCKi7K.js";import{C as oo}from"./chevron-right-B_ITnckH.js";import{u as io,r as ao,a as so}from"./mobileViewport-BhIxH-zP.js";import{P as lo}from"./pin-BLVakDSL.js";import{r as co,d as uo,e as po}from"./CollaborationTabBridge-Dxq4G1Uk.js";import{b as mo,r as fo,c as vn}from"./SessionDashboardBridge-7BjKdfN8.js";/**
|
|
3
|
+
* @license lucide-react v0.468.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the ISC license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/const ho=wr("TextCursorInput",[["path",{d:"M5 4h1a3 3 0 0 1 3 3 3 3 0 0 1 3-3h1",key:"18xjzo"}],["path",{d:"M13 20h-1a3 3 0 0 1-3-3 3 3 0 0 1-3 3H5",key:"fj48gi"}],["path",{d:"M5 16H4a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2h1",key:"1n9rhb"}],["path",{d:"M13 8h7a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-7",key:"13ksps"}],["path",{d:"M9 7v10",key:"1vc8ob"}]]);function Oe(t,o){const a=r.lazy(t);return function(l){var d;return e.jsx(r.Suspense,{fallback:((d=o==null?void 0:o.loading)==null?void 0:d.call(o))??null,children:e.jsx(a,{...l})})}}const go={background:"color-mix(in srgb, var(--ui-tab-accent) 88%, var(--ui-text))",borderColor:"color-mix(in srgb, var(--ui-tab-accent) 88%, var(--ui-text))",color:"var(--ui-primary-text)"};function bo(){const[t,o]=r.useState(!1),[a,s]=r.useState(!1),[l,d]=r.useState(null),u=r.useRef(null);return r.useEffect(()=>{d(document.querySelector(".web-root")??document.body);const h=g=>{var j;return o(!!((j=g.detail)!=null&&j.installed))},S=()=>s(!0);return window.addEventListener("agentroam:pwa-state",h),window.addEventListener("agentroam:pwa-guide",S),window.dispatchEvent(new Event("agentroam:pwa-query")),()=>{window.removeEventListener("agentroam:pwa-state",h),window.removeEventListener("agentroam:pwa-guide",S)}},[]),r.useEffect(()=>{var h,S;a&&!((h=u.current)!=null&&h.open)&&((S=u.current)==null||S.showModal())},[a]),e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"file-drawer-toggle pwa-install-button",title:t?"已添加到主屏幕":"添加到主屏幕","aria-label":t?"已添加到主屏幕":"添加到主屏幕",onClick:()=>t?s(!0):window.dispatchEvent(new Event("agentroam:pwa-install")),children:e.jsxs("span",{style:{position:"relative",display:"flex"},children:[e.jsx(Un,{size:17,"aria-hidden":"true"}),e.jsx(Je,{size:9,strokeWidth:3,"aria-hidden":"true",style:{position:"absolute",right:-4,bottom:-2}})]})}),a&&l&&Ae.createPortal(e.jsxs("dialog",{ref:u,"data-toolbar-overlay":!0,onClose:()=>s(!1),"aria-labelledby":"pwa-install-title",style:{maxWidth:340,width:"calc(100% - 40px)",margin:"auto",padding:24,borderRadius:16,border:"1px solid var(--ui-tabbar-border)",background:"var(--ui-root-bg)",color:"var(--ui-text)",whiteSpace:"normal",font:"14px/1.8 system-ui"},children:[e.jsx("h2",{id:"pwa-install-title",style:{margin:"0 0 12px",fontSize:18},children:t?"已添加到主屏幕":"添加到主屏幕"}),t&&e.jsx("p",{children:"当前已在主屏幕应用中打开。"}),e.jsx("p",{children:"iPhone / iPad:在 Safari 点击分享按钮,选择“添加到主屏幕”,再点“添加”。"}),e.jsx("p",{children:"Android:打开浏览器菜单,选择“安装应用”或“添加到主屏幕”。"}),e.jsx("p",{style:{color:"var(--ui-muted-text)"},children:"浏览器需要你确认,网页无法自动添加。从主屏幕打开后,如提示未配对,请重新扫码。"}),e.jsx("button",{type:"button",style:{...go,width:"100%",padding:"10px 14px",borderStyle:"solid",borderWidth:1,borderRadius:8,cursor:"pointer"},onClick:()=>{var h;return(h=u.current)==null?void 0:h.close()},children:"知道了"})]}),l)]})}const kn={shared:"已共享",independent:"独立后台",failed:"连接失败",stopped:"桌面未启动","not-installed":"桌面未安装",unsupported:"暂不支持"};function wo({csrfToken:t}){const[o,a]=r.useState(null),[s,l]=r.useState(!1),d=r.useRef(!1),u=r.useRef(0),h=r.useCallback(async(c=!1,y=!1,E=!1)=>{var m;if(d.current)return;d.current=!0;const T=u.current;l(!0);try{const v=await fetch("/api/agent/codex-sharing",{method:c||y?"POST":"GET",credentials:"same-origin",cache:"no-store",headers:c||y?{"x-csrf-token":t,...y?{"content-type":"application/json"}:{}}:void 0,body:y?JSON.stringify({action:"share",restartConfirmed:E}):void 0,signal:AbortSignal.timeout(18e4)}),x=await v.json();if(!v.ok||!Object.hasOwn(kn,x==null?void 0:x.state))throw new Error(((m=x==null?void 0:x.error)==null?void 0:m.message)||"共享状态读取失败,请重试。");if(T!==u.current)return;a(x)}catch(v){if(T!==u.current)return;a({state:"failed",configured:!1,autoStart:!1,daemonReachable:!1,runtimeMode:null,message:v instanceof Error?v.message:"无法连接当前电脑。"})}finally{d.current=!1,T===u.current&&l(!1)}},[t]);r.useEffect(()=>{h();const c=()=>{document.hidden||h()},y=window.setInterval(c,15e3);return window.addEventListener("online",c),()=>{u.current++,window.clearInterval(y),window.removeEventListener("online",c)}},[h]);const S=o?kn[o.state]:"检查中",g=()=>{const c=(o==null?void 0:o.state)!=="stopped";c&&!window.confirm("切换将强制重启 Codex 桌面,中断桌面任务并可能丢失未发送内容,不再显示 Codex 退出确认框。共享后端和手机会话不会被结束。是否继续?")||h(!1,!0,c)},j=o&&o.state!=="unsupported"&&(o.state!=="shared"||!o.configured||!o.autoStart||!o.daemonReachable);return e.jsxs("div",{className:"codex-sharing",children:[e.jsx("style",{children:xo}),e.jsxs("div",{className:"codex-sharing-title",role:"status",children:[e.jsx("span",{className:"codex-sharing-indicator","aria-hidden":"true",children:e.jsx("span",{className:"codex-sharing-dot","data-state":o==null?void 0:o.state})}),e.jsxs("span",{children:["Codex · ",S]})]}),j&&e.jsxs(e.Fragment,{children:[e.jsx("p",{children:o.state==="shared"?"共享连接可用,启动配置需要修复。":o.message}),e.jsxs("div",{className:"codex-sharing-actions",children:[e.jsxs("button",{type:"button",disabled:s,onClick:()=>{h()},"aria-label":"刷新 Codex 共享状态",children:[e.jsx(ye,{size:12}),"刷新"]}),e.jsx("button",{type:"button",disabled:s,onClick:()=>{h(!0)},children:s?"正在修复…":"检查并修复"}),!["shared","not-installed"].includes(o.state)&&e.jsx("button",{type:"button",disabled:s,onClick:g,children:s?"正在处理…":o.state==="stopped"?"以共享模式启动 Codex":"切换到共享后端"})]})]})]})}const xo=`
|
|
8
|
+
.codex-sharing{padding:10px 14px;margin-bottom:6px;border-bottom:1px solid var(--ui-tabbar-border,#303442);color:var(--ui-text,#e8e8ee);font-size:13px;line-height:20px}
|
|
9
|
+
.codex-sharing-title{display:flex;align-items:center;gap:10px}
|
|
10
|
+
.codex-sharing-indicator{display:grid;place-items:center;flex:0 0 17px;height:17px}
|
|
11
|
+
.codex-sharing-dot{width:6px;height:6px;border-radius:50%;background:var(--ui-muted-text,#999dab)}
|
|
12
|
+
.codex-sharing-dot[data-state=shared]{background:var(--ui-success,#22c55e)}
|
|
13
|
+
.codex-sharing-dot[data-state=failed]{background:var(--ui-danger,#ef4444)}
|
|
14
|
+
.codex-sharing-dot[data-state=independent]{background:var(--ui-warning,#f59e0b)}
|
|
15
|
+
.codex-sharing p{margin:6px 0 0;color:var(--ui-muted-text,#999dab);font-size:12px;line-height:18px;overflow-wrap:anywhere}
|
|
16
|
+
.codex-sharing-actions{display:flex;flex-wrap:wrap;gap:4px 12px;margin-top:4px}
|
|
17
|
+
.codex-sharing-actions button{display:flex;align-items:center;gap:5px;min-height:32px;padding:0;border:0;border-radius:4px;background:transparent;color:inherit;font:inherit;font-size:12px;cursor:pointer}
|
|
18
|
+
.codex-sharing-actions button:focus-visible{outline:2px solid var(--ui-tab-accent,#7aa2f7);outline-offset:3px}
|
|
19
|
+
.codex-sharing-actions button:disabled{opacity:.5;cursor:wait}
|
|
20
|
+
@media(pointer:coarse){.codex-sharing-actions button{min-height:44px}}
|
|
21
|
+
`;function yo({computerName:t,page:o,onClose:a,onSave:s}){const[l,d]=r.useState((o==null?void 0:o.name)??""),[u,h]=r.useState((o==null?void 0:o.url)??""),[S,g]=r.useState((o==null?void 0:o.openMode)??"current"),[j,c]=r.useState(!!o),[y,E]=r.useState(""),[T,m]=r.useState(!1),v=r.useRef(!1),x=r.useRef(null);return r.useEffect(()=>{var C,N;(N=(C=x.current)==null?void 0:C.querySelector("input"))==null||N.focus();const b=L=>{var K;if(L.key==="Escape"&&!v.current&&a(),L.key!=="Tab")return;const D=(K=x.current)==null?void 0:K.querySelectorAll("button:not(:disabled), input:not(:disabled), select:not(:disabled)");if(!(D!=null&&D.length))return;const Z=D[0],te=D[D.length-1];L.shiftKey&&document.activeElement===Z?(L.preventDefault(),te.focus()):!L.shiftKey&&document.activeElement===te&&(L.preventDefault(),Z.focus())};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[a]),e.jsx("div",{className:"computer-dialog-backdrop","data-toolbar-overlay":!0,onClick:b=>{b.target===b.currentTarget&&!v.current&&a()},children:e.jsxs("section",{ref:x,className:"computer-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"computer-page-title",children:[e.jsxs("div",{className:"computer-dialog-heading",children:[e.jsx("h2",{id:"computer-page-title",children:o?"编辑页面":"添加页面"}),e.jsx("button",{type:"button",className:"computer-close","aria-label":"关闭",disabled:T,onClick:a,children:e.jsx(Te,{size:20})})]}),e.jsxs("p",{className:"computer-hint",children:["所属电脑:",t]}),e.jsxs("form",{onSubmit:async b=>{if(b.preventDefault(),!v.current){v.current=!0,m(!0),E("");try{const C=yr(u),N=(o==null?void 0:o.id)??Array.from(crypto.getRandomValues(new Uint8Array(16)),L=>L.toString(16).padStart(2,"0")).join("");await s({id:N,name:l.trim(),url:C,openMode:S})}catch(C){E(C.message)}finally{v.current=!1,m(!1)}}},children:[e.jsx("label",{htmlFor:"computer-page-name",children:"页面名称"}),e.jsx("input",{id:"computer-page-name",maxLength:60,required:!0,disabled:T,value:l,onChange:b=>d(b.target.value),placeholder:"例如:Zcode / Qoder",autoComplete:"off"}),e.jsx("label",{htmlFor:"computer-page-url",children:"页面地址"}),e.jsx("input",{id:"computer-page-url",required:!0,disabled:T,value:u,onChange:b=>{h(b.target.value),j||g(xr(b.target.value))},placeholder:"https://…",autoComplete:"off",spellCheck:!1}),e.jsx("label",{htmlFor:"computer-page-mode",children:"打开方式"}),e.jsxs("select",{id:"computer-page-mode",disabled:T,value:S,onChange:b=>{g(b.target.value),c(!0)},children:[e.jsx("option",{value:"current",children:"当前页面打开,保留顶部图标栏"}),e.jsx("option",{value:"new-tab",children:"新页面打开,保留原会话页"})]}),e.jsx("p",{className:"computer-hint",children:"当前页面会显示网站自己的界面。若网站禁止内嵌(如 Qoder),可改为新页面打开。"}),y&&e.jsx("p",{className:"computer-error",role:"alert",children:y}),e.jsx("button",{type:"submit",className:"computer-action computer-primary",disabled:T||!l.trim()||!u.trim(),children:T?"正在保存…":"保存页面"})]})]})})}async function vo(t,o){const a=new AbortController,s=()=>a.abort();if(o!=null&&o.aborted)return"offline";o==null||o.addEventListener("abort",s,{once:!0});const l=setTimeout(s,4e3);try{const d=new URL("/pwa/icon-192.png",t);d.searchParams.set("online",String(Date.now()));const u=await fetch(d,{mode:"no-cors",credentials:"omit",cache:"no-store",referrerPolicy:"no-referrer",signal:a.signal});return u.type==="opaque"||u.ok?"online":"offline"}catch{return"offline"}finally{clearTimeout(l),o==null||o.removeEventListener("abort",s)}}const ko=20;function gt(t){if(!Array.isArray(t)||t.length>ko)throw new Error("最多可添加 20 台电脑。");const o=new Set;return t.map(a=>{if(!a||typeof a!="object"||Array.isArray(a)||Object.keys(a).some(l=>!["origin","name"].includes(l))||typeof a.origin!="string"||a.origin.length>2048)throw new Error("电脑地址无效。");let s;try{s=new URL(a.origin)}catch{throw new Error("电脑地址无效。")}if(!["http:","https:"].includes(s.protocol)||s.username||s.password||s.pathname!=="/"||s.search||s.hash||o.has(s.origin))throw new Error("电脑地址无效或重复。");if(typeof a.name!="string"||!a.name.trim()||a.name.trim().length>60)throw new Error("电脑名称需为 1–60 个字符。");return o.add(s.origin),{origin:s.origin,name:a.name.trim()}})}async function jn(t,o="GET",a){var d;const s=await fetch("/api/web-console/computers",{method:o,credentials:"same-origin",cache:"no-store",headers:a?{"content-type":"application/json","x-csrf-token":t}:void 0,body:a?JSON.stringify(a):void 0,signal:AbortSignal.timeout(15e3)}).catch(()=>{throw new Error("无法连接当前电脑,请检查连接后重试。")}),l=await s.json().catch(()=>null);if(!s.ok)throw new Error(((d=l==null?void 0:l.error)==null?void 0:d.message)??"电脑列表保存失败,请重试。");return gt(l==null?void 0:l.computers)}function jo(t){const[o,a]=r.useState([]),[s,l]=r.useState(!1),[d,u]=r.useState(!1),[h,S]=r.useState(""),g=r.useRef(!0),j=r.useRef(!1),c=r.useRef(0),y=r.useRef(!1),E=r.useCallback(C=>{if(g.current){a(N=>N.length===C.length&&N.every((L,D)=>L.origin===C[D].origin&&L.name===C[D].name)?N:C),l(!0);try{const N=De();Fn(C.map(L=>({...N.find(D=>D.origin===L.origin),...L})))}catch{}}},[]),T=r.useCallback(async()=>{if(j.current)return;const C=++c.current;try{const N=y.current?void 0:vr(Me(),void 0).map(({origin:D,name:Z})=>({origin:D,name:Z})),L=await jn(t,N?"POST":"GET",N?{computers:N}:void 0);if(!g.current||C!==c.current)return;y.current=!0,E(L),S("")}catch(N){g.current&&C===c.current&&S(N instanceof Error?N.message:"无法读取电脑列表。")}},[E,t]);r.useEffect(()=>{g.current=!0,T();const C=()=>{document.hidden||T()};window.addEventListener("focus",C),window.addEventListener("pageshow",C);const N=window.setInterval(C,15e3);return()=>{g.current=!1,c.current++,window.removeEventListener("focus",C),window.removeEventListener("pageshow",C),window.clearInterval(N)}},[T]);const m=r.useCallback(async(C,N)=>{if(!s||j.current)throw new Error("电脑列表尚未就绪,请稍后重试。");j.current=!0,c.current++,u(!0),S("");try{E(await jn(t,C,N))}catch(L){const D=L instanceof Error?L.message:"电脑列表保存失败,请重试。";throw g.current&&S(D),new Error(D)}finally{j.current=!1,g.current&&u(!1)}},[E,t,s]),v=r.useCallback((C,N)=>m("PATCH",gt([{origin:C,name:N}])[0]),[m]),x=r.useCallback(async C=>{if(new URL(C).origin===Me())throw new Error("不能删除当前连接的电脑。");await m("DELETE",{origin:C})},[m]),b=r.useCallback((C,N)=>m("POST",{computers:gt([{origin:C,name:N}]),restore:!0}),[m]);return{computers:o,loaded:s,saving:d,error:h,reload:T,rename:v,remove:x,add:b}}let En;function Vn(){return window.jsQR?Promise.resolve():En||(En=new Promise((t,o)=>{const a=document.createElement("script");a.src="/pwa/qr-decoder.js";const s=()=>{clearTimeout(l),En=null,a.remove(),o(new Error("二维码识别器加载失败,请重试。"))},l=setTimeout(s,1e4);a.onload=()=>{clearTimeout(l),t()},a.onerror=s,document.head.append(a)}))}function bt(){var t;return!!(window.isSecureContext&&((t=navigator.mediaDevices)!=null&&t.getUserMedia))}function Xe(t,o,a,s,l,d,u,h){var j;const S=Math.min(1,h/Math.max(d,u));t.width=Math.max(1,Math.round(d*S)),t.height=Math.max(1,Math.round(u*S)),o.drawImage(a,s,l,d,u,0,0,t.width,t.height);const g=o.getImageData(0,0,t.width,t.height);return(j=window.jsQR(g.data,g.width,g.height))==null?void 0:j.data}async function Eo(t){if(!t||t.type&&!t.type.startsWith("image/"))throw new Error("请选择二维码照片。");if(t.size>20*1024*1024)throw new Error("照片过大,请重新拍摄二维码。");await Vn();const o=new Image,a=URL.createObjectURL(t);try{await new Promise((E,T)=>{const m=setTimeout(()=>T(new Error("照片加载超时,请重新拍摄。")),1e4);o.onload=()=>{clearTimeout(m),E()},o.onerror=()=>{clearTimeout(m),T(new Error("无法读取照片,请重新拍摄二维码。"))},o.src=a});const s=document.createElement("canvas"),l=s.getContext("2d",{willReadFrequently:!0}),d=o.naturalWidth,u=o.naturalHeight,h=Xe(s,l,o,0,0,d,u,1600);if(h)return h;const S=Math.ceil(d*.58),g=Math.ceil(u*.58),j=d-S,c=u-g,y=[[Math.floor(j/2),Math.floor(c/2)],[0,0],[j,0],[0,c],[j,c]];for(const[E,T]of y){const m=Xe(s,l,o,E,T,S,g,1920);if(m)return m}for(const E of[1024,640]){if(Math.max(d,u)<=E)continue;const T=Xe(s,l,o,0,0,d,u,E);if(T)return T}throw new Error("照片中没有识别到二维码,请靠近电脑屏幕重新拍摄。")}finally{o.onload=null,o.onerror=null,URL.revokeObjectURL(a)}}function So(t,o,a){let s,l=0,d;const u=()=>{l++,clearTimeout(d),s==null||s.getTracks().forEach(j=>j.stop()),s=null,t.srcObject=null},h=(j,c)=>{j===l&&(u(),a((c==null?void 0:c.name)==="NotAllowedError"?"相机权限未开启,请允许相机或粘贴二维码链接。":(c==null?void 0:c.message)||"无法启动扫码,请重试。"))},S=async()=>{u();const j=l;if(!bt()){a("实时扫码需要 HTTPS,请使用拍照扫码。");return}try{const c=await navigator.mediaDevices.getUserMedia({video:{facingMode:{ideal:"environment"}},audio:!1});if(j!==l){c.getTracks().forEach(v=>v.stop());return}if(s=c,t.srcObject=c,await Vn(),j!==l)return;let y;try{await Promise.race([t.play(),new Promise((v,x)=>{y=setTimeout(()=>x(new Error("相机没有返回画面,请重试。")),1e4)})])}finally{clearTimeout(y)}if(j!==l)return;const E=document.createElement("canvas"),T=E.getContext("2d",{willReadFrequently:!0}),m=()=>{if(j===l)try{const v=t.videoWidth,x=t.videoHeight;if(v&&x){const b=Xe(E,T,t,0,0,v,x,960);if(b){u(),o(b);return}}d=setTimeout(m,250)}catch(v){u(),a((v==null?void 0:v.message)||"二维码识别失败,请重试。")}};m()}catch(c){h(j,c)}},g=()=>{document.hidden&&u()};return window.addEventListener("pagehide",u),document.addEventListener("visibilitychange",g),{start:S,stop:u,dispose(){u(),window.removeEventListener("pagehide",u),document.removeEventListener("visibilitychange",g)}}}const Sn=[{id:"refresh",name:"刷新",Icon:ye},{id:"dashboard",name:"进行中的会话",Icon:Hn},{id:"collaboration",name:"群聊列表",Icon:vt},{id:"remote",name:"远程桌面",Icon:dt},{id:"theme",name:"皮肤",Icon:Bn},{id:"files",name:"文件树",Icon:kr},{id:"calendar",name:"日历",Icon:qn},{id:"ai-hub",name:"AI Hub",Icon:$n},{id:"flow",name:"数字人",Icon:kt},{id:"install",name:"添加到主屏幕",Icon:Un}];function Co({username:t,connected:o,accent:a,accentText:s,selectedPageId:l,onSelectPage:d,onUpdatePage:u,configuration:h,csrfToken:S}){const g=r.useRef(null),j=r.useRef(null),c=jo(S),y=c.computers,[E,T]=r.useState(""),[m,v]=r.useState(null),[x,b]=r.useState(!1),[C,N]=r.useState("home"),[L,D]=r.useState(!1),[Z,te]=r.useState({top:48,right:12}),[K,ne]=r.useState(null),[M,O]=r.useState(null),[Y,W]=r.useState(""),[Q,G]=r.useState({}),H=y.find(p=>p.origin===E),ie=h.settings.savedPages??[],fe=L||xe()?Sn.filter(({id:p})=>p!=="flow"):Sn;r.useEffect(()=>{var p;h.loaded&&l&&u(((p=h.settings.savedPages)==null?void 0:p.find(R=>R.id===l))??null)},[h.loaded,h.settings.savedPages,l,u]),r.useEffect(()=>{var q;T(Me()),v(((q=g.current)==null?void 0:q.closest(".web-root"))??document.body);const p=window.matchMedia("(max-width: 600px)"),R=()=>D(p.matches);return R(),p.addEventListener("change",R),()=>{p.removeEventListener("change",R)}},[]),r.useEffect(()=>{if(!x)return;const p=z=>{var F,B;!((F=j.current)!=null&&F.contains(z.target))&&!((B=g.current)!=null&&B.contains(z.target))&&b(!1)},R=z=>{var We,Fe;if(z.key==="Escape"&&(b(!1),(We=g.current)==null||We.focus()),!L||z.key!=="Tab")return;const F=(Fe=j.current)==null?void 0:Fe.querySelectorAll("button:not(:disabled), input:not(:disabled)");if(!(F!=null&&F.length))return;const B=F[0],ve=F[F.length-1];z.shiftKey&&document.activeElement===B?(z.preventDefault(),ve.focus()):!z.shiftKey&&document.activeElement===ve&&(z.preventDefault(),B.focus())},q=()=>{var B;const z=(B=g.current)==null?void 0:B.getBoundingClientRect();if(!z)return;const F=Math.min(292,innerWidth-24);te({top:z.bottom+8,right:Math.max(12,Math.min(innerWidth-F-12,innerWidth-z.right))})};return document.addEventListener("pointerdown",p),document.addEventListener("keydown",R),window.addEventListener("resize",q),()=>{document.removeEventListener("pointerdown",p),document.removeEventListener("keydown",R),window.removeEventListener("resize",q)}},[x,L]),r.useEffect(()=>{var p,R;x&&((R=(p=j.current)==null?void 0:p.querySelector("button"))==null||R.focus())},[x,C]),r.useEffect(()=>{if(!x)return;const p=new AbortController,R=()=>{for(const z of y)z.origin!==E&&vo(z.origin,p.signal).then(F=>{p.signal.aborted||G(B=>({...B,[z.origin]:F}))})};R();const q=window.setInterval(R,15e3);return window.addEventListener("online",R),()=>{p.abort(),window.clearInterval(q),window.removeEventListener("online",R)}},[x,y,E]);const A=r.useCallback(()=>{var p;ne(null),(p=g.current)==null||p.focus()},[]),$=r.useCallback(()=>{var p;O(null),(p=g.current)==null||p.focus()},[]),Ne=r.useCallback(async(p,R)=>{var B;if(xe()){await xe().pair(p);return}const q=jr(p),z={origin:q.origin,name:R.trim()||((B=y.find(ve=>ve.origin===q.origin))==null?void 0:B.name)||q.hostname},F=Er(p,hn(De(),y,[z]),R);await c.add(z.origin,z.name),location.assign(F)},[y,c.add]),P=r.useCallback(async p=>{await c.rename(Me(),p),A()},[A,c.rename]);return e.jsxs(e.Fragment,{children:[e.jsx("style",{children:No}),e.jsxs("div",{className:"theme-avatar-with-status",children:[e.jsx("button",{ref:g,type:"button",className:"theme-avatar","aria-label":`电脑与连接状态(${t})`,title:t,style:{border:`1px solid ${a}`,background:a,color:s},"aria-expanded":x,"aria-haspopup":"true",onClick:()=>{const p=g.current.getBoundingClientRect(),R=Math.min(292,innerWidth-24);te({top:p.bottom+8,right:Math.max(12,Math.min(innerWidth-R-12,innerWidth-p.right))}),x||(N("home"),W(""),h.reload(),c.reload()),b(q=>!q)},children:(t.trim()[0]??"?").toUpperCase()}),e.jsx("span",{className:"theme-avatar-status","data-connected":o,"aria-label":o?"已连接":"未连接"})]}),x&&m&&Ae.createPortal(e.jsx("div",{className:"computer-menu-backdrop","data-toolbar-overlay":!0,children:e.jsxs("div",{ref:j,className:"computer-menu",style:L?void 0:Z,role:"dialog","aria-modal":L,"aria-label":C==="tools"?"配置顶部工具":C==="computers"?"选择电脑":"电脑与保存页面",children:[e.jsx("div",{className:"computer-menu-grip","aria-hidden":"true"}),e.jsxs("div",{className:"computer-menu-heading",children:[C!=="home"&&e.jsx("button",{type:"button",className:"computer-close","aria-label":"返回电脑菜单",onClick:()=>N("home"),children:e.jsx(Sr,{size:20})}),C==="home"?e.jsxs("button",{type:"button",className:"computer-menu-item computer-current","aria-label":"选择电脑",onClick:()=>N("computers"),children:[e.jsx(xn,{size:17}),e.jsxs("span",{children:[e.jsx("strong",{children:(H==null?void 0:H.name)||"当前电脑"}),e.jsx("small",{children:o?"当前 · 在线":"当前 · 未连接"})]}),e.jsx(Jr,{size:16})]}):e.jsx("strong",{children:C==="tools"?`${(H==null?void 0:H.name)||"当前电脑"} · 顶部工具`:"选择电脑"}),e.jsx("button",{type:"button",className:"computer-close","aria-label":"关闭电脑菜单",onClick:()=>{var p;b(!1),(p=g.current)==null||p.focus()},children:e.jsx(Te,{size:20})})]}),C==="computers"&&e.jsxs(e.Fragment,{children:[!c.loaded&&e.jsx("p",{className:"computer-save-status",role:"status",children:c.error?"电脑列表尚未加载":"正在读取电脑列表…"}),y.map(p=>{const R=p.origin===E?o?"online":"offline":Q[p.origin]??"checking",q=R==="online"?"在线":R==="offline"?"无法连接":"检测中";return e.jsxs("div",{className:"computer-menu-row",children:[e.jsxs("button",{type:"button",className:"computer-menu-item","data-computer-origin":p.origin,"aria-label":`${p.name},${q}${p.origin===E?",当前电脑":""}`,"aria-current":p.origin===E?"true":void 0,onClick:()=>{if(p.origin===E)N("home");else try{const z=xe();z?z.switchComputer(p.origin).catch(F=>W(F.message)):location.assign(Cr(p.origin,hn(De(),y)))}catch(z){W(z.message)}},children:[e.jsx(xn,{size:17,"aria-hidden":"true"}),e.jsxs("span",{children:[e.jsx("strong",{children:p.name}),e.jsx("small",{children:p.origin})]}),e.jsx("span",{className:"computer-status-dot","data-status":R,role:"img","aria-label":q,title:q}),p.origin===E&&e.jsx(ft,{size:16,"aria-label":"当前电脑"})]}),p.origin!==E&&e.jsx("button",{type:"button",className:"computer-page-control computer-delete-control","aria-label":`删除电脑:${p.name}`,title:`删除电脑:${p.name}`,disabled:c.saving,onClick:()=>{c.remove(p.origin).catch(()=>{})},children:e.jsx(jt,{size:15})})]},p.origin)}),e.jsx("div",{className:"computer-menu-divider"}),e.jsxs("button",{type:"button",className:"computer-menu-item",disabled:!c.loaded||c.saving,onClick:()=>{const p=xe();p?p.scan().catch(R=>W(R.message)):(b(!1),ne("add"))},children:[e.jsx(Je,{size:17,"aria-hidden":"true"}),e.jsx("span",{children:"扫码添加电脑"})]}),e.jsxs("button",{type:"button",className:"computer-menu-item",disabled:!c.loaded||c.saving||!H,onClick:()=>{b(!1),ne("rename")},children:[e.jsx(ht,{size:16,"aria-hidden":"true"}),e.jsx("span",{children:"修改当前电脑名称"})]}),c.error&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"computer-error",role:"alert",children:c.error}),e.jsxs("button",{type:"button",className:"computer-menu-item",onClick:()=>{c.reload()},children:[e.jsx(ye,{size:16}),e.jsx("span",{children:"重新加载电脑列表"})]})]})]}),C==="home"&&e.jsxs(e.Fragment,{children:[e.jsx(wo,{csrfToken:S}),e.jsxs("div",{className:"computer-menu-label computer-pages-heading",children:[e.jsx("span",{children:"保存的页面"}),e.jsx("button",{type:"button",className:"computer-page-control","aria-label":"添加页面",disabled:!h.loaded||h.saving,onClick:()=>{b(!1),O({computer:H??{origin:E,name:"当前电脑"}})},children:e.jsx(Je,{size:17})})]}),e.jsxs("button",{type:"button",className:"computer-menu-item","aria-current":l?void 0:"true",onClick:()=>{b(!1),d(null)},children:[e.jsx(Yr,{size:17}),e.jsx("span",{children:"电脑会话"}),!l&&e.jsx(ft,{size:16})]}),ie.map(p=>e.jsxs("div",{className:"computer-menu-row",children:[e.jsxs("button",{type:"button",className:"computer-menu-item","aria-label":`打开 ${p.name}`,"aria-current":l===p.id?"true":void 0,onClick:()=>{b(!1),d(p)},children:[e.jsx(mt,{size:15,"aria-hidden":"true"}),e.jsxs("span",{children:[e.jsx("strong",{children:p.name}),e.jsxs("small",{children:[p.openMode==="current"?"当前页面":"新页面"," · ",new URL(p.url).hostname]})]}),p.openMode==="new-tab"&&e.jsx(Et,{size:13,"aria-hidden":"true"})]}),e.jsx("button",{type:"button",className:"computer-page-control","aria-label":`编辑 ${p.name}`,disabled:h.saving,onClick:()=>{b(!1),O({computer:H??{origin:E,name:"当前电脑"},page:p})},children:e.jsx(ht,{size:14})}),e.jsx("button",{type:"button",className:"computer-page-control","aria-label":`删除 ${p.name}`,disabled:h.saving,onClick:()=>{h.setSavedPages(ie.filter(R=>R.id!==p.id)).catch(()=>{})},children:e.jsx(Te,{size:15})})]},p.id)),e.jsx("div",{className:"computer-menu-divider"}),e.jsxs("button",{type:"button",className:"computer-menu-item",onClick:()=>N("tools"),children:[e.jsx(Kr,{size:17}),e.jsx("span",{children:"配置顶部工具"}),e.jsx(oo,{size:16})]})]}),C==="tools"&&e.jsx("div",{className:"computer-tools-list",children:fe.map(({id:p,name:R,Icon:q})=>e.jsxs("label",{className:"computer-tool-option",children:[e.jsx(q,{size:17,"aria-hidden":"true"}),e.jsx("span",{children:R}),e.jsx("input",{type:"checkbox","aria-label":`显示${R}`,checked:h.settings.visibleTools.includes(p),disabled:!h.loaded||h.saving,onChange:z=>{const F=h.settings.visibleTools;h.setVisibleTools(z.target.checked?[...F,p]:F.filter(B=>B!==p)).catch(()=>{})}})]},p))}),C!=="computers"&&e.jsx("p",{className:"computer-save-status",role:"status",children:h.loaded?h.saving?"正在保存…":h.notice:h.error?"配置尚未加载":"正在读取电脑配置…"}),h.error&&C!=="computers"&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"computer-error",role:"alert",children:h.error}),e.jsxs("button",{type:"button",className:"computer-menu-item",onClick:()=>{h.reload()},children:[e.jsx(ye,{size:16}),e.jsx("span",{children:"重新加载配置"})]})]}),Y&&e.jsx("p",{className:"computer-error",role:"alert",children:Y})]})}),m),K&&m&&Ae.createPortal(e.jsx(To,{mode:K,currentName:(H==null?void 0:H.name)||"",onClose:A,onNavigate:Ne,onRename:P}),m),M&&m&&Ae.createPortal(e.jsx(yo,{computerName:M.computer.name,page:M.page,onClose:$,onSave:async p=>{if(M.page&&!ie.some(R=>R.id===p.id))throw new Error("这个页面已在其他设备删除,请重新添加。");await h.setSavedPages(M.page?ie.map(R=>R.id===p.id?p:R):[...ie,p]),$()}}),m)]})}function To({mode:t,currentName:o,onClose:a,onNavigate:s,onRename:l}){const[d,u]=r.useState(t==="rename"?o:""),h=r.useRef(d);h.current=d;const[S,g]=r.useState(""),[j,c]=r.useState(""),[y,E]=r.useState(!1),[T,m]=r.useState(!1),[v,x]=r.useState(!1),[b,C]=r.useState(!1),N=r.useRef(null),L=r.useRef(null),D=r.useRef(0),Z=r.useRef(null),te=r.useRef(null),K=r.useRef(null),ne=r.useCallback(async M=>{var O;E(!0),(O=K.current)==null||O.stop(),m(!1),c("");try{await s(M,h.current)}catch(Y){c(Y.message)}finally{E(!1)}},[s]);return r.useEffect(()=>{var Y,W,Q;x(bt()),t==="rename"?(Y=Z.current)==null||Y.focus():(Q=(W=te.current)==null?void 0:W.querySelector("button"))==null||Q.focus();const M=G=>{var A;if(G.key==="Escape"&&a(),G.key!=="Tab")return;const H=(A=te.current)==null?void 0:A.querySelectorAll("button:not(:disabled), input:not(:disabled)");if(!(H!=null&&H.length))return;const ie=H[0],fe=H[H.length-1];G.shiftKey&&document.activeElement===ie?(G.preventDefault(),fe.focus()):!G.shiftKey&&document.activeElement===fe&&(G.preventDefault(),ie.focus())},O=()=>{document.hidden&&m(!1)};return document.addEventListener("keydown",M),document.addEventListener("visibilitychange",O),t==="add"&&N.current&&(K.current=So(N.current,ne,G=>{m(!1),c(G)})),()=>{var G;D.current++,document.removeEventListener("keydown",M),document.removeEventListener("visibilitychange",O),(G=K.current)==null||G.dispose(),K.current=null}},[t,ne,a]),e.jsx("div",{className:"computer-dialog-backdrop","data-toolbar-overlay":!0,onClick:M=>{M.target===M.currentTarget&&a()},children:e.jsxs("section",{ref:te,className:"computer-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"computer-dialog-title",children:[e.jsxs("div",{className:"computer-dialog-heading",children:[e.jsx("h2",{id:"computer-dialog-title",children:t==="add"?"添加电脑":"修改电脑名称"}),e.jsx("button",{type:"button",className:"computer-close","aria-label":"关闭",onClick:a,children:e.jsx(Te,{size:20})})]}),e.jsxs("form",{onSubmit:async M=>{if(M.preventDefault(),!y)if(t==="add")await ne(S);else{E(!0);try{await l(d.trim())}catch(O){c(O.message)}finally{E(!1)}}},children:[e.jsxs("label",{htmlFor:"computer-name",children:["电脑名称",t==="add"?"(选填)":""]}),e.jsx("input",{ref:Z,id:"computer-name",maxLength:60,value:d,required:t==="rename",disabled:y,onChange:M=>u(M.target.value),placeholder:"例如:A 电脑 / 家里的电脑",autoComplete:"off"}),t==="add"&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"computer-hint",children:"扫描另一台电脑上的 AgentRoam 授权二维码,连接后会保留已有电脑。"}),e.jsx("input",{ref:L,type:"file",accept:"image/*",capture:"environment",hidden:!0,"aria-label":"拍摄授权二维码",onChange:async M=>{var W,Q;const O=(W=M.currentTarget.files)==null?void 0:W[0];if(M.currentTarget.value="",!O)return;const Y=++D.current;(Q=K.current)==null||Q.stop(),m(!1),C(!0),c("");try{const G=await Eo(O);Y===D.current&&ne(G)}catch(G){Y===D.current&&c(G.message)}finally{Y===D.current&&C(!1)}}}),e.jsx("video",{ref:N,playsInline:!0,muted:!0,hidden:!T,"aria-label":"扫码相机画面"}),e.jsxs("button",{className:"computer-action",type:"button",disabled:b,onClick:()=>{var M,O,Y;c(""),T?((M=K.current)==null||M.stop(),m(!1)):bt()?(m(!0),(Y=K.current)==null||Y.start()):(O=L.current)==null||O.click()},children:[e.jsx(Tr,{size:17,"aria-hidden":"true"}),b?"正在识别二维码…":T?"取消扫码":v?"打开相机扫码":"拍照扫码"]}),v&&e.jsx("button",{className:"computer-action",type:"button",disabled:b,onClick:()=>{var M,O;(M=K.current)==null||M.stop(),m(!1),(O=L.current)==null||O.click()},children:"拍照识别二维码"}),e.jsx("label",{htmlFor:"computer-link",children:"或粘贴授权二维码链接"}),e.jsx("input",{id:"computer-link",value:S,onChange:M=>g(M.target.value),placeholder:"http(s)://…/pair#pair=…",autoComplete:"off",spellCheck:!1})]}),j&&e.jsx("p",{className:"computer-error",role:"alert",children:j}),e.jsx("button",{className:"computer-action computer-primary",type:"submit",disabled:y||(t==="add"?!S.trim()||b:!d.trim()),children:t==="add"?"连接这台电脑":y?"正在保存…":"保存名称"})]})]})})}const No=`
|
|
22
|
+
.computer-menu-backdrop{position:fixed;inset:0;z-index:10000}
|
|
23
|
+
.computer-menu-heading{display:flex;align-items:center;gap:4px;padding:2px 4px}.computer-menu-heading>strong{flex:1;min-width:0;font-size:14px;font-weight:500;overflow-wrap:anywhere}.computer-menu-heading>.computer-current{flex:1;min-width:0}.computer-menu-heading>.computer-close{flex-shrink:0}
|
|
24
|
+
.computer-menu-grip{display:none}.computer-pages-heading{display:flex;align-items:center;justify-content:space-between}.computer-tool-option{display:flex;align-items:center;gap:12px;min-height:44px;padding:8px 12px;cursor:pointer}.computer-tool-option span{flex:1;font-size:14px}.computer-tool-option input{width:18px;height:18px;accent-color:var(--ui-tab-accent,#7aa2f7)}.computer-tool-option svg{flex-shrink:0}.computer-save-status{margin:6px 10px 2px;line-height:18px;color:var(--ui-muted-text,#999dab);font-size:12px}.computer-save-status:empty{display:none}.computer-menu button:disabled,.computer-tool-option:has(input:disabled){opacity:.55;cursor:default}
|
|
25
|
+
@media(max-width:600px){.computer-menu-backdrop{background:#0006}.computer-menu-backdrop .computer-menu{top:auto;bottom:0;left:0;right:0;width:100%;max-height:calc(100dvh - 64px);border-radius:18px 18px 0 0;padding:9px 10px calc(14px + env(safe-area-inset-bottom,0px));overscroll-behavior:contain}.computer-menu-grip{display:block;width:32px;height:4px;border-radius:4px;background:var(--ui-tabbar-border,#303442);margin:0 auto 10px}.computer-menu .computer-page-control,.computer-menu .computer-close{width:44px;height:44px;flex-basis:44px}.computer-menu .computer-menu-item{min-height:44px}}
|
|
26
|
+
.computer-menu,.computer-dialog{background:var(--ui-tree-bg,#121218);color:var(--ui-text,#e8e8ee);border:1px solid var(--ui-tabbar-border,#303442);border-radius:12px;box-shadow:0 12px 40px #0006;font-family:system-ui,sans-serif}
|
|
27
|
+
.computer-menu{position:fixed;z-index:10000;width:min(292px,calc(100vw - 24px));padding:7px;box-sizing:border-box;max-height:calc(100dvh - 76px);overflow-y:auto}
|
|
28
|
+
.computer-menu-label{padding:7px 9px;color:var(--ui-muted-text,#999dab);font-size:12px}.computer-menu-divider{height:1px;background:var(--ui-tabbar-border,#303442);margin:6px}
|
|
29
|
+
.computer-menu-row{display:flex;align-items:center;min-width:0;border-radius:8px}
|
|
30
|
+
.computer-page-row{padding-left:20px}
|
|
31
|
+
.computer-page-control{display:grid;place-items:center;flex:0 0 30px;width:30px;height:36px;border:0;border-radius:6px;color:var(--ui-muted-text,#999dab);background:transparent;cursor:pointer}
|
|
32
|
+
.computer-delete-control{margin-inline-end:8px}
|
|
33
|
+
.computer-menu-item{display:flex;align-items:center;gap:10px;width:100%;padding:10px;border:0;border-radius:8px;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}
|
|
34
|
+
.computer-menu-item svg{flex-shrink:0}.computer-menu-item span{flex:1;min-width:0;font-size:13px}.computer-menu-item strong{display:block;font-weight:500;overflow-wrap:anywhere}.computer-menu-item small{display:block;color:var(--ui-muted-text,#999dab);font-size:11px;font-weight:400;overflow-wrap:anywhere;margin-top:3px}
|
|
35
|
+
.computer-menu-item[aria-current=true],.computer-menu-row:has(>.computer-menu-item[aria-current=true]){background:color-mix(in srgb,var(--ui-tab-accent,#7aa2f7) 9%,transparent);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--ui-tab-accent,#7aa2f7) 22%,transparent)}
|
|
36
|
+
.computer-menu-item[aria-current=true]>svg{color:var(--ui-tab-accent,#7aa2f7)}.computer-menu-item[aria-current=true]>span{font-weight:600}
|
|
37
|
+
.computer-menu-row>.computer-menu-item{flex:1;min-width:0;background:transparent;box-shadow:none}
|
|
38
|
+
.computer-menu-item:focus-visible,.computer-page-control:focus-visible,.computer-close:focus-visible{outline:2px solid var(--ui-tab-accent,#7aa2f7);outline-offset:-2px}
|
|
39
|
+
@media(hover:hover){
|
|
40
|
+
.computer-menu-item:hover,.computer-menu-row:hover{background:color-mix(in srgb,var(--ui-text,#e8e8ee) 5%,transparent)}
|
|
41
|
+
.computer-menu-item[aria-current=true]:hover,.computer-menu-row:has(>.computer-menu-item[aria-current=true]):hover{background:color-mix(in srgb,var(--ui-tab-accent,#7aa2f7) 12%,transparent)}
|
|
42
|
+
.computer-menu-row>.computer-menu-item:hover{background:transparent}
|
|
43
|
+
.computer-page-control:hover{background:color-mix(in srgb,var(--ui-text,#e8e8ee) 7%,transparent);color:var(--ui-text,#e8e8ee)}
|
|
44
|
+
}
|
|
45
|
+
.computer-menu-item .computer-status-dot{width:6px;height:6px;flex:0 0 6px;border-radius:50%;background:var(--ui-connection-text,#777b8c)}.computer-status-dot[data-status=online]{background:var(--ui-success,#7dcf96)}.computer-status-dot[data-status=offline]{background:var(--ui-error,#f7768e)}
|
|
46
|
+
.computer-dialog-backdrop{position:fixed;inset:0;z-index:10001;background:#0008;display:flex;align-items:center;justify-content:center;padding:16px;box-sizing:border-box}
|
|
47
|
+
.computer-dialog{width:100%;max-width:400px;max-height:calc(100dvh - 32px);overflow-y:auto;padding:20px;box-sizing:border-box}.computer-dialog-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}.computer-dialog h2{margin:0;font-size:18px;font-weight:500}.computer-close{display:grid;place-items:center;border:0;background:transparent;color:inherit;width:36px;height:36px;cursor:pointer}
|
|
48
|
+
.computer-dialog label{display:block;font-size:13px;margin:16px 0 8px}.computer-dialog input{width:100%;box-sizing:border-box;padding:11px 12px;border:1px solid var(--ui-panel-input-border,#30303a);border-radius:8px;background:var(--ui-panel-input-bg,#0f0f15);color:inherit;font:inherit;font-size:16px}.computer-dialog video{width:100%;max-height:240px;border-radius:8px;background:#000;margin:4px 0}.computer-dialog video[hidden]{display:none}
|
|
49
|
+
.computer-dialog select{width:100%;padding:11px 8px;border:1px solid var(--ui-panel-input-border,#30303a);border-radius:8px;background:var(--ui-panel-input-bg,#0f0f15);color:inherit;font:inherit;font-size:14px}
|
|
50
|
+
.computer-hint{color:var(--ui-muted-text,#999dab);font-size:13px;line-height:1.7}.computer-action{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;padding:12px;margin-top:12px;border:1px solid var(--ui-panel-input-border,#30303a);border-radius:8px;background:var(--ui-tab-bg,#1b1e28);color:inherit;font:inherit;cursor:pointer}.computer-primary{background:var(--ui-tab-accent,#7aa2f7);color:var(--ui-root-bg,#0b0b10);border-color:transparent}.computer-action:disabled{opacity:.45;cursor:default}.computer-error{font-size:13px;line-height:1.6;color:var(--ui-danger,#ffb2a7);padding:0 8px}
|
|
51
|
+
@media(pointer:coarse){.computer-menu-item{min-height:44px}.computer-close{width:44px;height:44px}.computer-page-control{height:44px;flex-basis:36px;width:36px}}
|
|
52
|
+
`;function Ze({label:t="FLOW STUDIO",title:o="正在打开 Flow Studio",caption:a="即将进入你的创作空间",icon:s=e.jsx(kt,{size:36,strokeWidth:1.5})}={}){return e.jsxs("div",{className:"flow-loading",role:"status","aria-live":"polite",children:[e.jsxs("div",{className:"flow-loader-art","aria-hidden":"true",children:[e.jsx("div",{className:"flow-loader-halo"}),e.jsx("div",{className:"flow-loader-orbit orbit-outer",children:e.jsx("i",{})}),e.jsx("div",{className:"flow-loader-orbit orbit-inner",children:e.jsx("i",{})}),e.jsx("div",{className:"flow-loader-core",children:s}),e.jsx("span",{className:"flow-loader-node node-one"}),e.jsx("span",{className:"flow-loader-node node-two"}),e.jsx("span",{className:"flow-loader-node node-three"})]}),e.jsxs("div",{className:"flow-loader-copy",children:[e.jsx("span",{className:"flow-loader-label",children:t}),e.jsx("strong",{children:o}),e.jsx("span",{className:"flow-loader-caption",children:a})]}),e.jsx("div",{className:"flow-loader-track","aria-hidden":"true",children:e.jsx("span",{})}),e.jsx("style",{jsx:!0,children:`
|
|
53
|
+
.flow-loading { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; overflow:hidden; gap:26px; color:var(--ui-text, #e5e7eb); background:var(--ui-term-col-bg, #101014); animation:flow-appear 280ms ease-out both; }
|
|
54
|
+
.flow-loader-art { position:relative; width:200px; height:200px; flex-shrink:0; }
|
|
55
|
+
.flow-loader-halo { position:absolute; inset:-40px; border-radius:50%; background:radial-gradient(circle, #54e5cf26, #54e5cf08 45%, transparent 70%); animation:flow-breathe 3s ease-in-out infinite; }
|
|
56
|
+
.flow-loader-orbit { position:absolute; border-radius:50%; border:1px solid #54e5cf26; }
|
|
57
|
+
.orbit-outer { inset:8px; border-top-color:#54e5cf; border-right-color:#54e5cf70; animation:flow-orbit 3.2s linear infinite; }
|
|
58
|
+
.orbit-inner { inset:30px; border-bottom-color:#8bbcff; border-left-color:#8bbcff60; animation:flow-orbit 2.4s linear infinite reverse; }
|
|
59
|
+
.flow-loader-orbit i { position:absolute; top:13%; left:13%; width:7px; height:7px; border-radius:50%; background:#77f8df; box-shadow:0 0 14px #54e5cf; }
|
|
60
|
+
.orbit-inner i { background:#8bbcff; box-shadow:0 0 14px #8bbcff; }
|
|
61
|
+
.flow-loader-core { position:absolute; inset:62px; display:grid; place-items:center; border-radius:24px; color:#64e9d3; border:1px solid #54e5cf66; background:linear-gradient(145deg, #54e5cf20, #8bbcff0d); box-shadow:0 0 35px #54e5cf15, inset 0 0 18px #54e5cf0d; animation:flow-breathe 3s ease-in-out infinite; }
|
|
62
|
+
.flow-loader-node { position:absolute; width:5px; height:5px; border-radius:50%; background:#8bbcff; animation:flow-node 2s ease-in-out infinite; }
|
|
63
|
+
.node-one { left:0; top:100px; } .node-two { right:17px; top:38px; animation-delay:.5s; } .node-three { bottom:9px; right:57px; animation-delay:1s; }
|
|
64
|
+
.flow-loader-copy { display:flex; flex-direction:column; align-items:center; gap:10px; text-align:center; padding:0 20px; }
|
|
65
|
+
.flow-loader-label { font:10px ui-monospace, monospace; letter-spacing:.3em; color:#64cbbb; }
|
|
66
|
+
.flow-loader-copy strong { font-size:18px; font-weight:500; letter-spacing:.02em; }
|
|
67
|
+
.flow-loader-caption { font-size:12px; color:var(--ui-text-muted, #9399aa); }
|
|
68
|
+
.flow-loader-track { width:128px; height:2px; overflow:hidden; background:#54e5cf20; border-radius:2px; }
|
|
69
|
+
.flow-loader-track span { display:block; width:45%; height:100%; background:linear-gradient(90deg, transparent, #64e9d3, #8bbcff); animation:flow-travel 1.8s ease-in-out infinite; }
|
|
70
|
+
@keyframes flow-orbit { to { transform:rotate(360deg); } }
|
|
71
|
+
@keyframes flow-breathe { 50% { transform:scale(1.05); opacity:.7; } }
|
|
72
|
+
@keyframes flow-node { 50% { opacity:.25; transform:scale(.65); } }
|
|
73
|
+
@keyframes flow-travel { from { transform:translateX(-110%); } to { transform:translateX(330%); } }
|
|
74
|
+
@keyframes flow-appear { from { opacity:0; } to { opacity:1; } }
|
|
75
|
+
@media (max-height:420px) { .flow-loading { gap:12px; } .flow-loader-art { width:200px; height:200px; zoom:.65; } }
|
|
76
|
+
@media (prefers-reduced-motion:reduce) { .flow-loading, .flow-loader-halo, .flow-loader-orbit, .flow-loader-core, .flow-loader-node, .flow-loader-track span { animation:none; } }
|
|
77
|
+
`})]})}function Ro(t){const o=new URL(t).hostname;return o==="qoder.com"||o.endsWith(".qoder.com")}function Lo({page:t,reloadKey:o}){const[a,s]=r.useState(!0),[l,d]=r.useState(!1);return r.useEffect(()=>{s(!0),d(!1);const u=window.setTimeout(()=>d(!0),12e3);return()=>window.clearTimeout(u)},[t.id,t.url,o]),Ro(t.url)?e.jsxs("main",{className:"computer-page-blocked",children:[e.jsx(mt,{size:36,strokeWidth:1.5,"aria-hidden":"true"}),e.jsxs("h2",{children:[t.name," 不允许内嵌"]}),e.jsx("p",{children:"这个网站限制了当前页面打开。可以在新页面使用,也可以在电脑菜单中修改打开方式。"}),e.jsxs("a",{href:t.url,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(Et,{size:16,"aria-hidden":"true"}),"打开新页面"]})]}):e.jsxs("main",{className:"computer-page-pane","aria-label":t.name,"aria-busy":a,children:[e.jsx("iframe",{title:t.name,src:t.url,referrerPolicy:"no-referrer",allow:"clipboard-read; clipboard-write; microphone; camera",sandbox:"allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox allow-downloads allow-modals",onLoad:()=>s(!1),onError:()=>{s(!1),d(!0)},style:{visibility:a?"hidden":"visible"}},`${t.id}:${o}`),a&&e.jsx(Ze,{label:"REMOTE PAGE",title:`正在打开 ${t.name}`,caption:"正在连接页面",icon:e.jsx(mt,{size:36,strokeWidth:1.5})}),l&&e.jsx("a",{className:"computer-page-fallback",href:t.url,target:"_blank",rel:"noopener noreferrer",children:"打开原页面"})]})}function Po(t,o,a){const s=t.indexOf(o),l=t.indexOf(a);if(s<0||l<0||s===l)return[...t];const d=[...t];return d.splice(s,1),d.splice(l,0,o),d}const Cn=["refresh","dashboard","collaboration","remote","theme","files","ai-hub","flow","install","calendar"],Io=["refresh","remote","theme","files","calendar"];function Ao(t){return{userId:t,revision:0,visibleTools:[...Io],savedPages:null,updatedAt:""}}function Yn(t){if(!Array.isArray(t)||t.length>Cn.length+1||t.some(o=>o!=="messaging"&&!Cn.includes(o)))throw new Error("顶部工具包含未知选项。");if(new Set(t).size!==t.length)throw new Error("顶部工具不能重复。");return t.filter(o=>o!=="messaging")}function Kn(t){if(!Array.isArray(t)||t.length>20)throw new Error("每台电脑最多可添加 20 个页面。");const o=new Set;return t.map(a=>{if(!a||typeof a.id!="string"||!/^[A-Za-z0-9_-]{1,80}$/.test(a.id)||o.has(a.id))throw new Error("页面标识无效或重复。");if(typeof a.name!="string"||!a.name.trim()||a.name.trim().length>60)throw new Error("页面名称需为 1–60 个字符。");if(!["current","new-tab"].includes(a.openMode))throw new Error("页面打开方式无效。");if(typeof a.url!="string"||a.url.length>8192)throw new Error("请填写有效的 http(s) 页面地址。");let s;try{s=new URL(a.url.trim())}catch{throw new Error("请填写有效的 http(s) 页面地址。")}if(!["http:","https:"].includes(s.protocol)||s.username||s.password)throw new Error("请填写无账号密码的 http(s) 页面地址。");return o.add(a.id),{id:a.id,name:a.name.trim(),url:s.href,openMode:a.openMode}})}class wt extends Error{constructor(o,a){super(o),this.status=a}}async function Ie(t,o){var l;const a=await fetch("/api/web-console/computer-settings",{method:o?"PATCH":"GET",credentials:"same-origin",cache:"no-store",headers:o?{"content-type":"application/json","x-csrf-token":t}:void 0,body:o?JSON.stringify(o):void 0,signal:AbortSignal.timeout(15e3)}).catch(d=>{throw new Error((d==null?void 0:d.name)==="TimeoutError"?"电脑响应超时,请检查连接后重试。":"无法连接当前电脑,请检查连接后重试。")}),s=await a.json().catch(()=>null);if(!a.ok)throw new wt(((l=s==null?void 0:s.error)==null?void 0:l.message)??"电脑配置保存失败,请检查连接后重试。",a.status);if(!(s!=null&&s.settings)||!Number.isSafeInteger(s.settings.revision))throw new Error("无法读取电脑配置,请重新加载。");return{...s.settings,visibleTools:Yn(s.settings.visibleTools),savedPages:s.settings.savedPages===null?null:Kn(s.settings.savedPages)}}function _o(t){const[o,a]=r.useState(()=>Ao("")),s=r.useRef(o),[l,d]=r.useState(!1),[u,h]=r.useState(!1),S=r.useRef(!1),g=r.useRef(!0),j=r.useRef(0),[c,y]=r.useState(""),[E,T]=r.useState(""),m=r.useCallback(b=>{s.current=b,g.current&&a(b)},[]),v=r.useCallback(async()=>{var C;if(S.current)return;const b=++j.current;y(""),T("");try{let N=await Ie(t);if(N.savedPages===null){const L=((C=De().find(D=>D.origin===location.origin))==null?void 0:C.pages)??[];try{N=await Ie(t,{expectedRevision:N.revision,initializePages:L})}catch(D){if(!(D instanceof wt)||D.status!==409)throw D;if(N=await Ie(t),N.savedPages===null)throw new Error("电脑配置已更新,请重试旧页面导入。")}}if(!g.current||b!==j.current)return;m(N),d(!0);try{Fn(De().map(L=>{if(L.origin!==location.origin)return L;const{pages:D,...Z}=L;return{...Z,pagesMigrated:!0}}))}catch{}}catch(N){g.current&&b===j.current&&y(N instanceof Error?N.message:"无法读取电脑配置。")}},[m,t]);r.useEffect(()=>{g.current=!0,v();const b=()=>{v()};return window.addEventListener("focus",b),()=>{g.current=!1,j.current++,window.removeEventListener("focus",b)}},[v]);const x=r.useCallback(async b=>{if(!l||S.current)throw new Error("配置尚未就绪,请稍后重试。");S.current=!0,j.current++,h(!0),y(""),T("");const C=s.current;b.visibleTools&&m({...C,visibleTools:b.visibleTools});try{m(await Ie(t,{...b,expectedRevision:C.revision})),g.current&&T("已保存到当前电脑")}catch(N){if(m(C),N instanceof wt&&N.status===409)try{m(await Ie(t))}catch{}const L=N instanceof Error?N.message:"电脑配置保存失败,请重试。";throw g.current&&y(L),new Error(L)}finally{S.current=!1,g.current&&h(!1)}},[m,t,l]);return{settings:o,loaded:l,saving:u,error:c,notice:E,reload:v,setVisibleTools:b=>x({visibleTools:Yn(b)}),setSavedPages:b=>x({savedPages:Kn(b)})}}const Do=["codex","claude agents","opencode","agent-tui"];function Mo(){return Do.map((t,o)=>({id:`default-${o+1}`,command:t}))}async function zo(t,o,a,s){const l=a.find(u=>u&&u===t.source);if(!l)return!1;const d=Nr(t,o,l);if(!d)return!1;try{const u=await s(d.method,d.payload);l.postMessage({type:gn,id:d.id,ok:!0,result:u},o)}catch(u){const h=u;l.postMessage({type:gn,id:d.id,ok:!1,error:h.message||"项目操作失败",code:h.code},o)}return!0}const Tn="agent-web-shell:open-terminal:v1",Oo="#new-terminal";function Wo(t,o,a){var s;return!a||t.origin!==o||t.source!==a?null:((s=t.data)==null?void 0:s.type)===Tn?{type:Tn}:null}const Fo=1,xt={watcherFrame:4,producerFrame:5},Nn=10;function Bo(t){const o=t instanceof Uint8Array?t:new Uint8Array(t.buffer,t.byteOffset,t.byteLength);if(o.byteLength<Nn||o[0]!==Fo||o[1]!==xt.watcherFrame&&o[1]!==xt.producerFrame)return null;const a=new DataView(o.buffer,o.byteOffset,o.byteLength);return{type:o[1],channelId:a.getUint32(2,!1),sequence:a.getUint32(6,!1),payload:o.subarray(Nn)}}function $o(t,o,a){r.useEffect(()=>{const s=()=>{var h;return Array.from(((h=t.current)==null?void 0:h.querySelectorAll("iframe"))??[])},l=h=>{var g,j;const S=a&&!document.hidden&&((g=h.closest("[data-console-tab]"))==null?void 0:g.dataset.consoleTab)===o;(j=h.contentWindow)==null||j.postMessage({type:Lr,active:S},window.location.origin)},d=()=>s().forEach(l),u=h=>{var g;if(h.origin!==window.location.origin||((g=h.data)==null?void 0:g.type)!==Rr)return;const S=s().find(j=>j.contentWindow===h.source);S&&l(S)};return window.addEventListener("message",u),document.addEventListener("visibilitychange",d),d(),()=>{window.removeEventListener("message",u),document.removeEventListener("visibilitychange",d)}},[t,o,a])}function Uo(){const[t,o]=r.useState("loading"),[a,s]=r.useState(null),[l]=r.useState("same-origin"),[d,u]=r.useState(null),h=r.useCallback(async()=>{o("loading"),u(null);try{const c=await fetch("/api/web-console/bootstrap",{credentials:"same-origin",cache:"no-store"});if(c.status===401||c.status===423){window.location.reload();return}if(!c.ok)throw new Error(`HTTP ${c.status}`);const y=await c.json();s(y.user),o("authenticated")}catch{u("无法连接远程控制台"),o("needsLogin")}},[]);r.useEffect(()=>{h()},[h]);const S=r.useCallback(async()=>{const c=await fetch("/api/web-console/bootstrap",{credentials:"same-origin",cache:"no-store"});if((c.status===401||c.status===423)&&window.location.reload(),!c.ok)throw new Error("bootstrap failed");const y=await c.json();return s(y.user),o("authenticated"),y.wsNonce},[]),g=r.useCallback(async()=>(window.location.reload(),!1),[]),j=r.useCallback(async()=>{const c=await fetch("/api/pairing/logout",{method:"POST",credentials:"same-origin"});c.ok||c.status===401||c.status===423?window.location.reload():u("退出失败,请重试")},[]);return{status:t,user:a,error:d,csrfToken:l,setup:g,login:g,logout:j,refresh:h,getWsNonce:S}}function Ho({children:t}){const o=Uo(),[a,s]=r.useState(!1),l=o.status==="authenticated",d=r.useCallback(()=>s(!0),[]);return r.useEffect(()=>{l||s(!1)},[l]),e.jsxs(e.Fragment,{children:[l?t(o,d):null,e.jsx(Pr,{ready:l&&a,error:o.error,onRetry:()=>void o.refresh()})]})}function Rn(t,o,a){const s=t.findIndex(h=>h.id===o),l=t.findIndex(h=>h.id===a);if(s<0||l<0||s===l)return[...t];const d=[...t],[u]=d.splice(s,1);return d.splice(l,0,u),d}function qo(){return typeof crypto.randomUUID=="function"?crypto.randomUUID():Array.from(crypto.getRandomValues(new Uint8Array(16)),t=>t.toString(16).padStart(2,"0")).join("")}function Gn(t,o=qo()){return{id:o,command:t.trim()}}function Vo({commands:t,onChange:o,onExecute:a}){const[s,l]=r.useState(null),[d,u]=r.useState(""),[h,S]=r.useState(null),g=r.useRef(null),j=()=>{if(!s)return;const m=s.value.trim();if(!m)return u("命令不能为空");if(m.length>1e3)return u("命令最多 1000 个字符");if(/[\r\n\0]/.test(m))return u("命令只能包含一行");s.id?o(t.map(v=>v.id===s.id?{...v,command:m}:v)):o([...t,Gn(m)]),l(null),u("")},c=(m,v)=>{m.preventDefault(),m.stopPropagation(),g.current=v,S(v),m.currentTarget.setPointerCapture(m.pointerId)},y=m=>{var b;if(!g.current)return;const v=(b=document.elementFromPoint(m.clientX,m.clientY))==null?void 0:b.closest("[data-pinned-id]"),x=v==null?void 0:v.dataset.pinnedId;x&&x!==g.current&&o(Rn(t,g.current,x))},E=m=>{m.currentTarget.hasPointerCapture(m.pointerId)&&m.currentTarget.releasePointerCapture(m.pointerId),g.current=null,S(null)},T=(m,v)=>{if(m.key!=="ArrowUp"&&m.key!=="ArrowDown")return;m.preventDefault();const x=t.findIndex(C=>C.id===v),b=t[x+(m.key==="ArrowUp"?-1:1)];b&&o(Rn(t,v,b.id))};return e.jsxs("section",{className:"pinned-commands","aria-labelledby":"pinned-command-title",children:[e.jsxs("div",{className:"pinned-command-head",children:[e.jsx("span",{id:"pinned-command-title",children:"置顶命令"}),e.jsx("button",{className:"history-icon-button",onClick:()=>{l({id:null,value:""}),u("")},"aria-label":"新增置顶命令",title:"新增置顶命令",children:e.jsx(Je,{size:14,"aria-hidden":"true"})})]}),t.map(m=>(s==null?void 0:s.id)===m.id?e.jsx(Ln,{editor:s,error:d,onChange:v=>{l({...s,value:v}),u("")},onSave:j,onCancel:()=>{l(null),u("")}},m.id):e.jsxs("div",{className:`pinned-command-row${h===m.id?" pinned-command-dragging":""}`,"data-pinned-id":m.id,role:"button",tabIndex:0,onClick:()=>a(m.command),onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),a(m.command))},children:[e.jsx("button",{className:"pinned-command-grip",onPointerDown:v=>c(v,m.id),onPointerMove:y,onPointerUp:E,onPointerCancel:E,onKeyDown:v=>T(v,m.id),onClick:v=>v.stopPropagation(),"aria-label":`调整 ${m.command} 的顺序`,title:"拖动排序,或按上下方向键",children:e.jsx(Gr,{size:14,"aria-hidden":"true"})}),e.jsx("code",{children:m.command}),e.jsxs("div",{className:"pinned-command-actions",onClick:v=>v.stopPropagation(),children:[e.jsx("button",{className:"history-icon-button",onClick:()=>{l({id:m.id,value:m.command}),u("")},"aria-label":`编辑 ${m.command}`,title:"编辑",children:e.jsx(ht,{size:12,"aria-hidden":"true"})}),e.jsx("button",{className:"history-icon-button history-icon-danger",onClick:()=>o(t.filter(v=>v.id!==m.id)),"aria-label":`删除 ${m.command}`,title:"删除",children:e.jsx(jt,{size:12,"aria-hidden":"true"})})]})]},m.id)),(s==null?void 0:s.id)===null&&e.jsx(Ln,{editor:s,error:d,onChange:m=>{l({...s,value:m}),u("")},onSave:j,onCancel:()=>{l(null),u("")}})]})}function Ln({editor:t,error:o,onChange:a,onSave:s,onCancel:l}){return e.jsxs("div",{className:"pinned-command-editor",children:[e.jsx("input",{autoFocus:!0,value:t.value,maxLength:1e3,onChange:d=>a(d.target.value),onKeyDown:d=>{d.key==="Enter"&&s(),d.key==="Escape"&&l()},"aria-label":t.id?"编辑置顶命令":"新增置顶命令"}),e.jsx("button",{className:"history-icon-button",onClick:s,"aria-label":"保存命令",title:"保存",children:e.jsx(ft,{size:13,"aria-hidden":"true"})}),e.jsx("button",{className:"history-icon-button",onClick:l,"aria-label":"取消编辑",title:"取消",children:e.jsx(Te,{size:13,"aria-hidden":"true"})}),o&&e.jsx("small",{role:"alert",children:o})]})}function Yo({csrfToken:t,terminalId:o,pinnedCommands:a,onPinnedCommandsChange:s,onFill:l,onExecute:d}){const[u,h]=r.useState([]),[S,g]=r.useState(""),[j,c]=r.useState(""),y=r.useCallback(async()=>{const x=new URLSearchParams({q:S,limit:"200"}),b=await fetch(`/api/web-console/history?${x}`,{credentials:"same-origin"});b.ok&&h((await b.json()).history)},[S]);r.useEffect(()=>{const x=setTimeout(y,200);return()=>clearTimeout(x)},[y]);const E=async x=>{await fetch("/api/web-console/history",{method:"DELETE",credentials:"same-origin",headers:{"content-type":"application/json","x-csrf-token":t},body:JSON.stringify({id:x})}),y()},T=x=>{o&&l(x)},m=r.useCallback(x=>{x==="[REDACTED]"||a.some(b=>b.command===x)||s([...a,Gn(x)])},[s,a]),v=async x=>{const b=await eo(x);c(b?"已复制命令":"复制失败,请长按命令手动复制")};return e.jsxs("div",{className:"history-panel",children:[e.jsx(Vo,{commands:a,onChange:s,onExecute:d}),e.jsxs("div",{className:"history-search",children:[e.jsx("input",{value:S,onChange:x=>g(x.target.value),placeholder:"搜索命令"}),e.jsx("button",{className:"history-icon-button",onClick:y,"aria-label":"刷新历史",title:"刷新历史",children:e.jsx(ye,{size:13,"aria-hidden":"true"})})]}),j&&e.jsx("div",{className:"terminal-clipboard-notice",role:"status",children:j}),u.map(x=>e.jsxs("div",{className:`history-item${o?"":" history-item-disabled"}`,role:"button",tabIndex:o?0:-1,onClick:()=>T(x.command),onKeyDown:b=>{b.target===b.currentTarget&&(b.key==="Enter"||b.key===" ")&&o&&(b.preventDefault(),T(x.command))},children:[e.jsx("code",{children:x.command}),e.jsxs("small",{children:[x.cwd," · ",new Date(x.executedAt).toLocaleString()]}),e.jsxs("div",{className:"history-item-actions",onClick:b=>b.stopPropagation(),onPointerDown:b=>b.stopPropagation(),children:[e.jsx("button",{className:"history-icon-button",onClick:()=>void v(x.command),"aria-label":"复制命令",title:"复制",children:e.jsx(Xr,{size:12,"aria-hidden":"true"})}),e.jsx("button",{className:"history-icon-button",disabled:!o,onClick:()=>T(x.command),"aria-label":"填入命令",title:"填入",children:e.jsx(ho,{size:12,"aria-hidden":"true"})}),e.jsx("button",{className:"history-icon-button",disabled:x.command==="[REDACTED]"||a.some(b=>b.command===x.command),onClick:()=>m(x.command),"aria-label":"置顶命令",title:"置顶",children:e.jsx(lo,{size:12,"aria-hidden":"true"})}),e.jsx("button",{className:"history-icon-button history-icon-danger",onClick:()=>E(x.id),"aria-label":"删除历史",title:"删除",children:e.jsx(jt,{size:12,"aria-hidden":"true"})})]})]},x.id)),!u.length&&e.jsx("div",{className:"history-empty",children:"暂无 Shell 命令历史"}),!o&&!!u.length&&e.jsx("div",{className:"history-empty",children:"请先打开一个终端页签"})]})}function Ko(t,o,a){const s=t.bottom+6,l=s+o<=a-8?s:t.top-o-6;return Math.max(8,Math.min(l,a-o-8))}function Go({themeId:t,onThemeChange:o}){const[a,s]=r.useState(!1),l=r.useRef(null),d=r.useRef(null),u=r.useRef(null),[h,S]=r.useState(null),[g,j]=r.useState({top:-1e3,left:0});return r.useEffect(()=>{var c;S(((c=l.current)==null?void 0:c.closest(".web-root"))??document.body)},[]),r.useLayoutEffect(()=>{if(!a)return;const c=()=>{var v,x,b;const E=(v=d.current)==null?void 0:v.getBoundingClientRect();if(!E)return;const T=Math.min(176,innerWidth-16),m=(x=l.current)!=null&&x.closest(".compact-tools-panel, .glass-tools-sheet")?Ko(E,((b=u.current)==null?void 0:b.offsetHeight)??0,innerHeight):E.bottom+6;j({top:m,left:Math.max(8,Math.min(innerWidth-T-8,E.right-T))})};c();const y=new ResizeObserver(c);return u.current&&y.observe(u.current),window.addEventListener("resize",c),window.addEventListener("scroll",c,!0),()=>{y.disconnect(),window.removeEventListener("resize",c),window.removeEventListener("scroll",c,!0)}},[a]),r.useEffect(()=>{if(!a)return;const c=E=>{var T,m;!((T=l.current)!=null&&T.contains(E.target))&&!((m=u.current)!=null&&m.contains(E.target))&&s(!1)},y=E=>{var T;E.key==="Escape"&&(s(!1),(T=d.current)==null||T.focus())};return document.addEventListener("pointerdown",c),document.addEventListener("keydown",y),()=>{document.removeEventListener("pointerdown",c),document.removeEventListener("keydown",y)}},[a]),e.jsxs("div",{ref:l,className:"theme-picker",children:[e.jsx("button",{ref:d,type:"button",className:"file-drawer-toggle","aria-label":"换肤",title:"换肤","aria-expanded":a,"aria-haspopup":"dialog",onClick:()=>s(c=>!c),children:e.jsx(Bn,{size:17,"aria-hidden":"true"})}),a&&h&&Ae.createPortal(e.jsxs("div",{ref:u,className:"theme-popover",role:"dialog","aria-label":"选择皮肤","data-toolbar-overlay":!0,style:{position:"fixed",...g,zIndex:210,width:Math.min(176,innerWidth-16),maxHeight:"calc(100dvh - 16px)",overflowY:"auto",boxSizing:"border-box",padding:8,borderRadius:10,border:"1px solid var(--ui-tabbar-border, #282b36)",background:"var(--ui-tab-active-bg, #262b38)",boxShadow:"0 10px 28px rgba(0,0,0,.45)"},children:[e.jsx("div",{style:{fontSize:10,color:"var(--ui-connection-text, #777b8c)",margin:"2px 4px 6px",letterSpacing:.5},children:"皮肤"}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:2},children:Ir.map(c=>{const y=c.id===t;return e.jsxs("button",{type:"button",className:"theme-popover-item","aria-label":c.label,"aria-pressed":y,onPointerDown:E=>E.stopPropagation(),onClick:()=>{o(c.id),s(!1)},style:{background:y?"color-mix(in srgb, var(--ui-tab-accent, #7aa2f7) 14%, transparent)":"transparent"},children:[e.jsx("span",{style:{width:18,height:18,borderRadius:5,flexShrink:0,background:`linear-gradient(135deg, ${c.preview[0]} 55%, ${c.preview[1]} 55%)`,boxShadow:"inset 0 0 0 1px rgba(128,128,160,.25)"}}),e.jsx("span",{style:{flex:1,textAlign:"left",fontSize:12,fontWeight:y?600:400,color:y?"var(--ui-tab-active-text, #edf0f7)":"var(--ui-tab-text, #8f93a4)"},children:c.label}),y&&e.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--ui-tab-accent, #7aa2f7)",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:e.jsx("path",{d:"m5 12 4 4L19 6"})})]},c.id)})})]}),h)]})}const Xn="agent-ui-prefs";function Xo(t){var o;try{const a=JSON.parse((t==null?void 0:t.getItem(Xn))??"null");return Ar((o=a==null?void 0:a.state)==null?void 0:o.navigationLayout)?a.state.navigationLayout:ut}catch{return ut}}const Jo="agent-webapp:tab-swipe:v1";function Qo(t){if(!t||typeof t!="object")return null;const o=t;return o.type!==Jo||o.phase!=="move"&&o.phase!=="end"&&o.phase!=="cancel"||typeof o.deltaX!="number"||!Number.isFinite(o.deltaX)?null:o}function Zo(t,o,a){return t.origin!==o||t.source!==a?null:Qo(t.data)}const Pn="agent-webapp:ready:v1";function ei(t){return!t||typeof t!="object"||t.type!==Pn?null:{type:Pn}}function In(t,o,a){return t.origin!==o||t.source!==a?null:ei(t.data)}function ct({groupId:t,title:o,onFrame:a,onLoad:s,view:l,discussionId:d}){const u=r.useRef(null),[h,S]=r.useState("loading"),[g,j]=r.useState(0),c=t===void 0;return r.useEffect(()=>{const y=E=>{var T,m,v;if(l==="sessions"){E.origin===window.location.origin&&E.source===((T=u.current)==null?void 0:T.contentWindow)&&((m=E.data)==null?void 0:m.type)===mo&&S("ready");return}co(E,window.location.origin,((v=u.current)==null?void 0:v.contentWindow)??null,t??null)&&S("ready")};return window.addEventListener("message",y),()=>window.removeEventListener("message",y)},[t,l]),r.useEffect(()=>{if(h!=="loading")return;const y=window.setTimeout(()=>S(E=>E==="loading"?"error":E),3e4);return()=>window.clearTimeout(y)},[h,g]),e.jsxs("div",{className:"collaboration-pane","aria-busy":h==="loading",children:[e.jsx("iframe",{ref:y=>{u.current=y,a(y)},className:`webapp-frame collaboration-frame${h==="ready"?" is-ready":""}`,style:{visibility:h==="ready"?"visible":"hidden"},src:Ge(l==="sessions"?"/app/?view=session-dashboard":c?"/app/?view=collaboration-dashboard":`/app/?view=collaboration&groupId=${encodeURIComponent(t)}${d?`&discussionId=${encodeURIComponent(d)}`:""}`),title:o,onLoad:s,onError:()=>S("error")},g),h==="loading"&&e.jsx(Ze,{label:"AGENT COLLABORATION",title:l==="sessions"?"正在打开会话 Dashboard":c?"正在打开群聊列表":"正在进入群聊",caption:l==="sessions"?"正在核对运行会话与待决策事项":c?"正在加载已保存的群聊":"正在加载群成员与聊天记录",icon:e.jsx(vt,{size:36,strokeWidth:1.5})}),h==="error"&&e.jsxs("div",{className:"collaboration-load-error",role:"alert",children:[e.jsx("strong",{children:l==="sessions"?"暂时无法打开会话 Dashboard":c?"暂时无法打开群聊列表":"暂时无法打开群聊"}),e.jsx("span",{children:"请检查连接后重试。"}),e.jsxs("button",{onClick:()=>{S("loading"),j(y=>y+1)},children:[e.jsx(ye,{size:15}),"重新加载"]})]}),e.jsx("style",{jsx:!0,children:`
|
|
78
|
+
.collaboration-pane { position:relative; height:100%; background:var(--ui-term-col-bg, #101014); }
|
|
79
|
+
.collaboration-frame.is-ready { animation:collaboration-appear 220ms ease-out both; }
|
|
80
|
+
.collaboration-load-error { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; color:var(--ui-text, #e5e7eb); background:var(--ui-term-col-bg, #101014); padding:20px; text-align:center; }
|
|
81
|
+
.collaboration-load-error span { font-size:13px; color:var(--ui-text-muted, #9399aa); }
|
|
82
|
+
.collaboration-load-error button { display:inline-flex; align-items:center; gap:8px; margin-top:6px; min-height:44px; padding:10px 16px; border:1px solid var(--ui-muted-border, #ffffff24); border-radius:9px; background:transparent; color:inherit; font:inherit; cursor:pointer; }
|
|
83
|
+
.collaboration-load-error button:focus-visible { outline:2px solid currentColor; outline-offset:3px; }
|
|
84
|
+
@keyframes collaboration-appear { from { opacity:0; } to { opacity:1; } }
|
|
85
|
+
@media (prefers-reduced-motion:reduce) { .collaboration-frame.is-ready { animation:none; } }
|
|
86
|
+
`})]})}function ti({active:t,children:o}){const[a,s]=r.useState(t);return r.useEffect(()=>{t&&s(!0)},[t]),t||a?o:null}function An(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"]),l=[];for(const d of o.tabs.slice(0,100))!d||typeof d.id!="string"||typeof d.title!="string"||a.has(d.id)||d.kind!==void 0&&!s.has(d.kind)||d.kind==="collaboration"&&typeof d.groupId!="string"||(a.add(d.id),l.push({id:d.id,title:d.title,...d.kind?{kind:d.kind}:{},...typeof d.groupId=="string"?{groupId:d.groupId}:{},...typeof d.discussionId=="string"&&/^[\w-]{1,200}$/.test(d.discussionId)?{discussionId:d.discussionId}:{}}));return{tabs:l,activeTerminalId:typeof o.activeTerminalId=="string"&&o.activeTerminalId!=="messaging"?o.activeTerminalId:null}}catch{return null}}function ni(t,o,a){const s=new Map(o.filter(u=>u.status==="active"||u.status==="detached").map(u=>[u.id,{id:u.id,title:u.title}])),l=[],d=new Set;for(const u of[...(t==null?void 0:t.tabs)??[],...a,...s.values()])d.has(u.id)||!u.kind&&!s.has(u.id)||(d.add(u.id),l.push(u.kind?u:s.get(u.id)));return l}const Ce={id:"remote-desktop",title:"远程桌面",kind:"remote-desktop"};function _n(t){const o=t.find(a=>a.kind==="remote-desktop");return o?t.map(a=>a===o?{...Ce}:a):[...t,{...Ce}]}const _e={id:"collaboration-dashboard",title:"群聊列表",kind:"collaboration-dashboard"};function Dn(t){return t.some(o=>o.id===_e.id)?t:[...t,{..._e}]}const Qe={id:"session-dashboard",title:"Dashboard",kind:"session-dashboard"};function Mn(t){return t.some(o=>o.id===Qe.id)?t:[...t,{...Qe}]}const yt={id:"calendar",title:"日历",kind:"calendar"};function ri(t){return t.some(o=>o.id===yt.id)?t:[...t,{...yt}]}const oi=Oe(()=>ze(()=>import("./TerminalPane-CxGcN85G.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),{ssr:!1}),ii=Oe(()=>ze(()=>import("./FileTree-DNI9VhEp.js"),__vite__mapDeps([6,1,2,7,8,9,10,11,12]),import.meta.url),{ssr:!1}),ai=Oe(()=>ze(()=>import("./FilePreview-CyXKv1Cu.js").then(t=>t.b),__vite__mapDeps([13,1,2,14,12,15,9,16]),import.meta.url),{ssr:!1}),si=Oe(()=>ze(()=>import("./AiHubPane-CEjQjdqT.js"),__vite__mapDeps([17,1,2,9,10,18,19]),import.meta.url),{ssr:!1}),li=Oe(()=>ze(()=>import("./FlowStudioPane-CKlzxza_.js"),__vite__mapDeps([20,1,2,21,22,9,23,10,15,12,4,11,3,24,25,26]),import.meta.url),{ssr:!1,loading:()=>e.jsx(Ze,{})}),ci=Dr(new Mr);function di(){return e.jsx(Ho,{children:(t,o)=>xe()?e.jsx(Wn,{auth:t,onWorkspaceReady:o}):e.jsx(_r,{api:ci,product:"电脑上的 AgentRoam CLI",scope:"cli",hint:"更新期间当前连接的电脑服务会短暂重启。此页面会继续检查更新结果。",installLabel:"更新这台电脑",children:e.jsx(Wn,{auth:t,onWorkspaceReady:o})})})}const oe={id:"webapp-agent",title:"智能助手",kind:"webapp"},zn={id:"ai-hub",title:"AI Hub",kind:"aihub"},On={id:"flow-studio",title:"Flow Studio",kind:"flowstudio"};function ui(){var t;return typeof document>"u"?$r:pt((t=document.getElementById("web-theme-root"))==null?void 0:t.dataset.webTheme).id}const pi="agent-web-shell:skin:v1";function Wn({auth:t,onWorkspaceReady:o}){var Ht,qt,Vt,Yt;const[a,s]=r.useState(null),l=r.useRef(null),[d,u]=r.useState(0),h=r.useCallback(n=>{if((n==null?void 0:n.openMode)==="new-tab"){window.open(n.url,"_blank","noopener,noreferrer");return}s(n)},[]),S=r.useCallback(n=>s((n==null?void 0:n.openMode)==="current"?n:null),[]),g=r.useRef(null),j=r.useRef(null),c=r.useRef(null),y=r.useRef(null),E=r.useRef(null),T=r.useRef(!1),[m,v]=r.useState({}),x=r.useRef(new Map),[b,C]=r.useState(0),[N,L]=r.useState(!1),[D,Z]=r.useState(!1),[te,K]=r.useState(!1),ne=r.useRef(()=>{}),M=r.useCallback(n=>{var f;const i=Bo(n);if(!(!i||i.type!==xt.watcherFrame)){ne.current(i.channelId,i.sequence);for(const w of[g,j]){if(!((f=w.current)!=null&&f.contentWindow))continue;const k=i.payload.slice().buffer;w.current.contentWindow.postMessage({type:zr,channelId:i.channelId,sequence:i.sequence,data:k},window.location.origin,[k])}}},[]),{state:O,epoch:Y,rpc:W,onEvent:Q,onTerminalData:G,onTerminalReset:H,sendTerminalInput:ie}=io(M,t.getWsNonce,t.refresh),fe=r.useMemo(()=>({request:(n,i,f)=>W(n,i,f),subscribe:(n,i)=>Q("fs:event",i)}),[Q,W]);ne.current=(n,i)=>{W("browser:frame-ack",{channelId:n,sequence:i}).catch(()=>{})};const[A,$]=r.useState([{...oe}]),Ne=r.useRef(A);Ne.current=A;const[P,p]=r.useState(oe.id),R=r.useCallback(()=>{if(A.length>=8)return;const n=`t-web-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`;$(i=>i.length>=8?i:[...i,{id:n,title:`Terminal ${i.length+1}`}]),p(n)},[A.length]);$o(l,P,!a);const[q,z]=r.useState({}),F=r.useRef(!1),[B,ve]=r.useState(!1),[We,Fe]=r.useState(0),Be=`agentroam:workspace:${typeof window>"u"?"":Me()}:${((Ht=t.user)==null?void 0:Ht.id)??""}`,St=r.useRef(null),ke=r.useRef(new Map),$e=r.useRef(new Map),Jn=r.useCallback((n,i)=>{ke.current.set(n,i);const f=window.setTimeout(()=>{if(ke.current.get(n)!==i)return;const w=$e.current.get(n);w&&($e.current.delete(n),i(w,!0))},180);return()=>{window.clearTimeout(f),ke.current.get(n)===i&&ke.current.delete(n)}},[]),Qn=r.useCallback(n=>{var f;if(!P||(f=A.find(w=>w.id===P))!=null&&f.kind)return;const i=ke.current.get(P);i?i(n):W("term:input",{id:P,data:`${n}`}).catch(()=>{}),ce(!1)},[P,W,A]),[je,Zn]=r.useState(!1),[Re,et]=r.useState({}),[de,Ue]=r.useState(null),[le,ce]=r.useState(!1),[he,He]=r.useState("files"),[Le,Ct]=r.useState(null),[Pe,Tt]=r.useState(!0),[qe,Nt]=r.useState(null),[tt,Rt]=r.useState(!1),[nt,Lt]=r.useState([]),[rt,Pt]=r.useState(Mo()),[Ee,It]=r.useState(ui),[At,er]=r.useState(ut),[_t,tr]=r.useState(!1);r.useEffect(()=>{const n=()=>{try{er(Xo(window.localStorage))}catch{}tr(!0)},i=f=>{(f.key===Xn||f.key===null)&&n()};return n(),window.addEventListener("storage",i),()=>window.removeEventListener("storage",i)},[]);const[Dt,nr]=r.useState(!1),ue=_o(t.csrfToken),[Mt,rr]=r.useState(!1),ee=pt(Ee),Se=r.useRef(null),[or,ot]=r.useState(0),[ir,it]=r.useState(!1),at=r.useRef(null),zt=r.useRef(null),Ot=r.useCallback(n=>{var f;const i=[g.current,j.current,c.current,y.current,...x.current.values()];for(const w of i)(f=w==null?void 0:w.contentWindow)==null||f.postMessage({type:pi,skin:n},window.location.origin)},[]),re=r.useCallback(()=>{var i;if(Ot(Ee),!_t)return;const n=[g.current,j.current,c.current,y.current,...x.current.values()];for(const f of n)(i=f==null?void 0:f.contentWindow)==null||i.postMessage({type:Or,navigationLayout:At},window.location.origin)},[Ee,At,_t,Ot]);r.useEffect(()=>{re()},[re]),r.useEffect(()=>{const n=ee.cssVars["--ui-root-bg"],i=ee.cssVars["--ui-color-scheme"],f=document.getElementById("web-theme-root");for(const[k,_]of Object.entries(ee.cssVars))f==null||f.style.setProperty(k,_);f&&(f.dataset.webTheme=ee.id),document.documentElement.style.background=n,document.documentElement.style.colorScheme=i,document.body.style.background=n,document.body.style.colorScheme=i;let w=document.querySelector('meta[name="theme-color"]');w||(w=document.createElement("meta"),w.name="theme-color",document.head.append(w)),w.content=ee.cssVars["--ui-tabbar-bg"]},[ee]),r.useEffect(()=>{const n=i=>{var Kt,Gt,Xt,Jt,Qt,Zt,en,tn,nn,rn,on,an,sn,ln,cn,dn,un,pn,mn,fn;const f=((Kt=c.current)==null?void 0:Kt.contentWindow)??null,w=[(Gt=g.current)==null?void 0:Gt.contentWindow,f,(Xt=y.current)==null?void 0:Xt.contentWindow,...[...x.current.values()].map(I=>I.contentWindow)].find(I=>I&&I===i.source)??null,k=fo(i,window.location.origin,w);if(k){if(s(null),k.kind==="dashboard")$(Mn),p(Qe.id);else if(k.kind==="groups")$(Dn),p(_e.id);else if(k.kind==="group"){const I=`collaboration-${k.groupId}`,V={id:I,title:k.title,kind:"collaboration",groupId:k.groupId,discussionId:k.discussionId};$(me=>me.some(Ke=>Ke.id===I)?me.map(Ke=>Ke.id===I?V:Ke):[...me,V]),p(I)}else T.current?(Qt=(Jt=g.current)==null?void 0:Jt.contentWindow)==null||Qt.postMessage({type:vn,intent:k},window.location.origin):E.current=k,p(oe.id);return}const _=uo(i,window.location.origin,f);if(_){$(I=>_.deleted?I.filter(V=>V.groupId!==_.groupId):I.map(V=>V.groupId===_.groupId?{...V,title:_.title}:V)),_.deleted?p(I=>I===`collaboration-${_.groupId}`?_e.id:I):v(I=>({...I,[_.groupId]:(I[_.groupId]||0)+1}));return}const U=po(i,window.location.origin,i.source===f?f:((Zt=g.current)==null?void 0:Zt.contentWindow)??null);if(U){const I=`collaboration-${U.groupId}`;$(V=>V.some(me=>me.id===I)?V:[...V,{id:I,title:U.title,kind:"collaboration",groupId:U.groupId}]),p(I);return}if(Wo(i,window.location.origin,((en=g.current)==null?void 0:en.contentWindow)??null)){s(null),R();return}const X=((tn=j.current)==null?void 0:tn.contentWindow)??null,J=yn(i,window.location.origin,X);if(J!==null){L(J);return}const ae=yn(i,window.location.origin,((nn=g.current)==null?void 0:nn.contentWindow)??null);if(ae!==null){Z(ae);return}if(In(i,window.location.origin,X)){L(!1),C(I=>I+1),K(!1),re();return}if(X&&i.origin===window.location.origin&&i.source===X&&((rn=i.data)==null?void 0:rn.type)===no){K(!0);return}if(i.origin===window.location.origin&&i.source===X&&X&&((on=i.data)==null?void 0:on.type)===ro){L(!1),W("browser:unwatch").catch(()=>{}),$(I=>I.filter(V=>V.kind!=="remote-desktop")),C(0),K(!1),p(oe.id);return}if(Ur(i,window.location.origin,((an=g.current)==null?void 0:an.contentWindow)??null)){$(_n),p(Ce.id);return}if(In(i,window.location.origin,((sn=g.current)==null?void 0:sn.contentWindow)??null)){Z(!1),T.current=!0,rr(!0),re(),o(),E.current&&((cn=(ln=g.current)==null?void 0:ln.contentWindow)==null||cn.postMessage({type:vn,intent:E.current},window.location.origin),E.current=null);return}const br=(dn=[...x.current.values()].find(I=>I.contentWindow===i.source))==null?void 0:dn.contentWindow,ge=Hr(i,window.location.origin,br??((un=g.current)==null?void 0:un.contentWindow)??null);if(ge){const I=V=>{He("files"),ce(!wn(V)),Ue(ge.revealOnly?null:V),Nt(wn(V)?null:{path:V,requestId:ge.requestId,rootAtParent:ge.revealOnly})};ge.path.startsWith("~/")?W("hello").then(({home:V})=>{const me=qr(ge.path,null,V);me&&I(me)}).catch(()=>{}):I(ge.path);return}const be=i.source===X&&X?X:((pn=g.current)==null?void 0:pn.contentWindow)??null,we=Vr(i,window.location.origin,be);if(we){W(we.method,{...we.payload,...we.method==="browser:watch"||we.method==="browser:desktop-watch"?{frameAck:!0}:{}}).then(I=>{be==null||be.postMessage({type:bn,id:we.id,ok:!0,result:I},window.location.origin)},I=>{be==null||be.postMessage({type:bn,id:we.id,ok:!1,error:I.message||"浏览器操作失败",code:I.code},window.location.origin)});return}zo(i,window.location.origin,[((mn=g.current)==null?void 0:mn.contentWindow)??null,f,((fn=y.current)==null?void 0:fn.contentWindow)??null,...[...x.current.values()].map(I=>I.contentWindow)],W)};return window.addEventListener("message",n),()=>window.removeEventListener("message",n)},[R,o,W,re]),r.useEffect(()=>{const n=w=>{var k,_;for(const U of[g,j])(_=(k=U.current)==null?void 0:k.contentWindow)==null||_.postMessage({type:lt,event:w},window.location.origin)},f=["browser:session","browser:frame","browser:state","browser:closed","browser:webrtc","browser:desktop-activity"].map(w=>Q(w,n));return()=>f.forEach(w=>w())},[Q]),r.useEffect(()=>{var n,i;Mt&&((i=(n=g.current)==null?void 0:n.contentWindow)==null||i.postMessage({type:lt,event:{type:"browser:connection",connected:O.connected,epoch:Y}},window.location.origin))},[O.connected,Y,Mt]),r.useEffect(()=>{var n,i;b&&((i=(n=j.current)==null?void 0:n.contentWindow)==null||i.postMessage({type:to,visible:P===Ce.id},window.location.origin))},[P,b]),r.useEffect(()=>{var n,i;b&&((i=(n=j.current)==null?void 0:n.contentWindow)==null||i.postMessage({type:lt,event:{type:"browser:connection",connected:O.connected,epoch:Y}},window.location.origin))},[O.connected,Y,b]);const Wt=r.useRef(0),Ft=P?q[P]??null:null;r.useEffect(()=>{const n=window.visualViewport;let i=null,f="";const w=()=>{const k=so(n,{height:window.innerHeight,width:window.innerWidth}),_=`${k.width}x${k.height}+${k.top}+${k.left}`;_!==f&&(f=_,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(w,250))};return w(),n==null||n.addEventListener("resize",w),n==null||n.addEventListener("scroll",w),window.addEventListener("orientationchange",w),window.addEventListener("resize",w),document.addEventListener("visibilitychange",w),window.addEventListener("pageshow",w),()=>{n==null||n.removeEventListener("resize",w),n==null||n.removeEventListener("scroll",w),window.removeEventListener("orientationchange",w),window.removeEventListener("resize",w),document.removeEventListener("visibilitychange",w),window.removeEventListener("pageshow",w),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,f,w,k;typeof((i=n.preferences)==null?void 0:i.keybarHidden)=="boolean"&&Rt(n.preferences.keybarHidden),Array.isArray((f=n.preferences)==null?void 0:f.keyOrder)&&Lt(n.preferences.keyOrder),Array.isArray((w=n.preferences)==null?void 0:w.pinnedCommands)&&Pt(n.preferences.pinnedCommands),(k=n.preferences)!=null&&k.theme&&It(pt(n.preferences.theme).id)}).catch(()=>{}).finally(()=>nr(!0)),fetch("/api/web-console/device-state",{credentials:"same-origin"}).then(n=>n.json()).then(n=>{const i=n.deviceState;i!=null&&i.drawerTab&&He(i.drawerTab),i!=null&&i.activeTerminalId&&(St.current=i.activeTerminalId),typeof(i==null?void 0:i.drawerOpen)=="boolean"&&ce(i.drawerOpen),i!=null&&i.fileTreeRoot&&Ct(i.fileTreeRoot),typeof(i==null?void 0:i.fileTreeFollowMode)=="boolean"&&Tt(i.fileTreeFollowMode),i!=null&&i.selectedFile&&Ue(i.selectedFile),i!=null&&i.terminalScroll&&typeof i.terminalScroll=="object"&&et(i.terminalScroll)}).catch(()=>{}).finally(()=>Zn(!0))},[]);const Bt=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(!Dt)return;const n=setTimeout(()=>Bt({keybarHidden:tt,keyOrder:nt,pinnedCommands:rt,theme:Ee}),500);return()=>clearTimeout(n)},[tt,nt,rt,Ee,Dt,Bt]);const Ve=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||!B||!je)return;const n=setTimeout(()=>Ve({activeTerminalId:P,drawerOpen:le,drawerTab:he,fileTreeRoot:Le,fileTreeFollowMode:Pe,selectedFile:de,terminalScroll:Re}),500);return()=>clearTimeout(n)},[P,le,he,Le,Pe,de,Re,t.csrfToken,Ve,B,je]),r.useEffect(()=>{if(!t.csrfToken||!B||!je)return;const n=()=>Ve({activeTerminalId:P,drawerOpen:le,drawerTab:he,fileTreeRoot:Le,fileTreeFollowMode:Pe,selectedFile:de,terminalScroll:Re});return window.addEventListener("pagehide",n),()=>window.removeEventListener("pagehide",n)},[P,le,he,Le,Pe,de,Re,t.csrfToken,Ve,B,je]);const ar=r.useCallback(n=>{Nt(null),Ue(n),ce(!1)},[]),sr=r.useCallback(n=>{const i=A.find(k=>k.id===P);if(i!=null&&i.kind&&i.kind!=="webapp")return;if(i&&!i.kind){const k=ke.current.get(i.id);k?k(n,!0):$e.current.set(i.id,n),ce(!1);return}const f=A.length>=8?A.find(k=>!k.kind):null,w=(f==null?void 0:f.id)??`t-web-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`;f?$e.current.set(w,n):$(k=>[...k,{id:w,title:`Terminal ${k.length+1}`,initialCommand:n}]),p(w),ce(!1)},[P,A]);r.useEffect(()=>{if(!O.connected||!je||F.current)return;F.current=!0;let n=!1,i=!1,f;return W("term:list").then(w=>{if(n)return;let k=null;try{k=An(localStorage.getItem(Be))}catch{}const _=ni(k,w.tabs,Ne.current);$(_),p(U=>{const X=Ne.current.find(ae=>ae.id===U&&ae.kind&&ae.kind!=="webapp");if(X)return X.id;const J=(k==null?void 0:k.activeTerminalId)||St.current||U||oe.id;return J===oe.id?oe.id:_.some(ae=>ae.id===J)?J:oe.id}),i=!0,ve(!0)}).catch(()=>{n||(F.current=!1,f=setTimeout(()=>Fe(w=>w+1),2e3))}),()=>{n=!0,clearTimeout(f),i||(F.current=!1)}},[O.connected,je,W,Be,We]),r.useEffect(()=>{if(!B||window.location.hash!==Oo)return;const n=new URL(window.location.href);n.hash="",window.history.replaceState(window.history.state,"",n),R()},[B,R]),r.useLayoutEffect(()=>{if(B)try{const n=An(JSON.stringify({tabs:A,activeTerminalId:P}));localStorage.setItem(Be,JSON.stringify(n))}catch{}},[A,P,B,Be]);const lr=n=>{var f;if(n===oe.id)return;const i=(f=A.find(w=>w.id===n))==null?void 0:f.kind;i==="remote-desktop"&&(C(0),K(!1),W("browser:unwatch").catch(()=>{})),!(!i&&!window.confirm("关闭页签会终止该终端进程,确认关闭?"))&&($(w=>{var _;const k=w.filter(U=>U.id!==n);return P===n&&p(((_=k[0])==null?void 0:_.id)??null),k}),i||W("term:kill",{id:n}).catch(()=>{}))},cr=r.useCallback(()=>{$(n=>{const i=n.find(f=>f.kind==="aihub");return i?(p(i.id),n):(p(zn.id),[...n,{...zn}])})},[]),dr=r.useCallback(()=>{$(n=>{const i=n.find(f=>f.kind==="flowstudio");return i?(p(i.id),n):(p(On.id),[...n,{...On}])})},[]),ur=r.useCallback(()=>{$(_n),p(Ce.id)},[]),pr=r.useCallback(()=>{$(ri),p(yt.id)},[]);r.useEffect(()=>{const n=Q("term:exited",i=>{const f=i==null?void 0:i.id;f&&($(w=>{const k=w.filter(_=>_.id!==f);return p(_=>{var U;return _===f?((U=k[0])==null?void 0:U.id)??null:_}),k}),et(w=>{if(!(f in w))return w;const k={...w};return delete k[f],k}))});return()=>{n()}},[Q]);const $t=r.useCallback(n=>{if(!P||A.length<2)return;const f=(A.findIndex(w=>w.id===P)+n+A.length)%A.length;p(A[f].id)},[P,A]),Ut=Math.max(0,A.findIndex(n=>n.id===P)),mr=((qt=A[Ut])==null?void 0:qt.kind)==="webapp"?ee.cssVars["--ui-term-col-bg"]:ee.termHostBg,fr={...se.root,...ee.cssVars,"--ui-active-content-bg":mr,"--ui-terminal-bg":ee.termHostBg,"--ui-primary-text":ee.keybar.accentText,background:"var(--ui-root-bg)",color:"var(--ui-text)"},pe=r.useCallback(()=>{Se.current=null,ot(0),it(!1)},[]),st=r.useCallback(n=>{Math.abs(n)>=64&&A.length>1&&$t(n<0?1:-1),pe()},[A.length,$t,pe]),hr=n=>n instanceof Element&&!!n.closest(".terminal-screen");r.useEffect(()=>{const n=i=>{var w;if(P!==oe.id)return;const f=Zo(i,window.location.origin,((w=g.current)==null?void 0:w.contentWindow)??null);f&&(f.phase==="move"?(it(!0),ot(f.deltaX)):f.phase==="end"?st(f.deltaX):pe())};return window.addEventListener("message",n),()=>window.removeEventListener("message",n)},[P,st,pe]);const Ye=r.useCallback((n="smooth")=>{const i=zt.current;if(!i||!P)return;const f=i.querySelector(`[data-terminal-id="${P}"]`);if(!f)return;if(f===i.querySelector("[data-terminal-id]")){ao(i);return}const w=i.querySelector(".terminal-connection"),k=(w==null?void 0:w.offsetWidth)??0,_=8,U=f.offsetLeft,X=U+f.offsetWidth,J=i.scrollLeft,ae=J+i.clientWidth-k;U<J+_?i.scrollTo({left:Math.max(0,U-_),behavior:n}):X>ae-_&&i.scrollTo({left:X-i.clientWidth+k+_,behavior:n})},[P]);r.useLayoutEffect(()=>{if(!P)return;const n=A.length>Wt.current;Wt.current=A.length,Ye(n?"auto":"smooth")},[P,A.length,Ye]),r.useEffect(()=>{const n=()=>requestAnimationFrame(()=>Ye("auto"));return window.addEventListener("pageshow",n),()=>window.removeEventListener("pageshow",n)},[Ye]);const gr=!a&&(N&&P===Ce.id||D&&P===oe.id);return e.jsxs("div",{className:`web-root ${gr?"is-remote-fullscreen":""}`,style:fr,children:[e.jsx("style",{dangerouslySetInnerHTML:{__html:Wr}}),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(Qr,{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(Et,{size:16})})]}),e.jsx("div",{className:"terminal-tab-list",ref:zt,hidden:!!a,children:A.map(n=>e.jsxs("div",{"data-terminal-id":n.id,draggable:!0,className:`terminal-tab ${n.id===P?"active":""}`,onDragStart:()=>{at.current=n.id},onDragOver:i=>i.preventDefault(),onDrop:i=>{i.preventDefault();const f=at.current;at.current=null,!(!f||f===n.id)&&$(w=>{const k=w.findIndex(J=>J.id===f),_=w.findIndex(J=>J.id===n.id);if(k<0||_<0)return w;const U=[...w],[X]=U.splice(k,1);return U.splice(_,0,X),W("term:reorder",{ids:U.filter(J=>!J.kind).map(J=>J.id)}).catch(()=>{}),U})},onClick:()=>p(n.id),onDoubleClick:()=>{var f;if(n.kind)return;const i=(f=window.prompt("页签名称",n.title))==null?void 0:f.trim();i&&W("term:rename",{id:n.id,title:i}).then(()=>$(w=>w.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(),lr(n.id)},children:"×"})]},n.id))}),e.jsx("button",{className:"terminal-add","aria-label":"新建终端页签",hidden:!!a,disabled:A.length>=8,onClick:R,children:"+"}),e.jsxs("div",{className:"terminal-connection",children:[e.jsx(Fr,{iconOnly:!xe()}),e.jsx(Br,{sortingDisabled:!ue.loaded||ue.saving,onReorder:(n,i)=>{const f=ue.settings.visibleTools;return ue.setVisibleTools(Po(f,n,i))},avatar:e.jsx(Co,{username:((Vt=t.user)==null?void 0:Vt.username)??"?",connected:O.connected,accent:ee.keybar.accent,accentText:ee.keybar.accentText,selectedPageId:a==null?void 0:a.id,onSelectPage:h,onUpdatePage:S,configuration:ue,csrfToken:t.csrfToken}),items:[{id:"refresh",content:e.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":"刷新页面",title:"刷新页面",onClick:()=>a?u(n=>n+1):window.location.reload(),children:e.jsx(ye,{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),$(Mn),p(Qe.id)},children:e.jsx(Hn,{size:17,"aria-hidden":"true"})})},{id:"collaboration",content:e.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":"打开群聊列表",title:"群聊列表",onClick:()=>{s(null),$(Dn),p(_e.id)},children:e.jsx(vt,{size:17,"aria-hidden":"true"})})},{id:"install",content:e.jsx(bo,{})},{id:"remote",content:e.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":"打开远程桌面",title:"远程桌面 · 浏览器直播",onClick:()=>{s(null),ur()},children:e.jsx(dt,{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),cr()},children:e.jsx($n,{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),dr()},children:e.jsx(kt,{size:17,"aria-hidden":"true"})})},{id:"theme",content:e.jsx(Go,{themeId:Ee,onThemeChange:It})},{id:"files",content:e.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":le?"关闭我的文件":"打开我的文件",title:"我的文件","aria-expanded":le,onClick:()=>{s(null),ce(n=>!n)},children:e.jsx(Zr,{size:17,"aria-hidden":"true"})})},{id:"calendar",content:e.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":"打开智能体日历",title:"日历 · 定时任务与待办",onClick:()=>{s(null),pr()},children:e.jsx(qn,{size:17,"aria-hidden":"true"})})}].filter(n=>ue.settings.visibleTools.some(i=>i===n.id)).sort((n,i)=>ue.settings.visibleTools.findIndex(f=>f===n.id)-ue.settings.visibleTools.findIndex(f=>f===i.id))})]})]}),e.jsxs("main",{className:`workspace ${le?"show-tree":""} ${de?"has-preview":""}`,hidden:!!a,style:se.workspace,children:[e.jsx("section",{className:"term-col",style:se.termCol,onPointerDownCapture:n=>{n.pointerType!=="touch"||!hr(n.target)||(pe(),Se.current={x:n.clientX,y:n.clientY,axis:"pending",pointerId:n.pointerId})},onPointerMoveCapture:n=>{const i=Se.current;if(!i||n.pointerId!==i.pointerId||n.pointerType!=="touch")return;const f=n.clientX-i.x,w=n.clientY-i.y;if(i.axis==="pending"){if(Math.max(Math.abs(f),Math.abs(w))<=8)return;if(Math.abs(w)>=Math.abs(f)*1.2){Se.current=null;return}i.axis="horizontal",it(!0);const k=_=>{window.removeEventListener("pointerup",k),window.removeEventListener("pointercancel",k),Se.current===i&&pe()};window.addEventListener("pointerup",k),window.addEventListener("pointercancel",k)}i.axis==="horizontal"&&(n.preventDefault(),ot(f))},onPointerUpCapture:n=>{const i=Se.current;if(!i||n.pointerId!==i.pointerId)return;const f=n.clientX-i.x;i.axis==="horizontal"&&Math.abs(f)>=64?st(f):pe()},onPointerCancelCapture:pe,children:e.jsx("div",{ref:l,className:"terminal-track",style:{transform:`translate3d(calc(${-Ut*100}% + ${or}px),0,0)`,transition:ir?"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(ti,{active:n.kind==="webapp"||!n.kind||n.id===P,children:n.kind==="webapp"?e.jsx("iframe",{ref:g,className:"webapp-frame",src:Ge("/app/"),title:n.title,onLoad:re}):n.kind==="session-dashboard"?e.jsx(ct,{view:"sessions",title:"会话 Dashboard",onFrame:i=>{y.current=i},onLoad:re}):n.kind==="collaboration-dashboard"?e.jsx(ct,{title:"群聊列表",onFrame:i=>{c.current=i},onLoad:re}):n.kind==="collaboration"?e.jsx(ct,{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??""}-${m[n.groupId||""]||0}`):n.kind==="remote-desktop"?e.jsxs("div",{style:{height:"100%",background:"var(--ui-term-col-bg, #101014)"},"aria-busy":!te,children:[e.jsx("iframe",{ref:j,className:"webapp-frame",style:{visibility:te?"visible":"hidden"},src:Ge("/app/?view=remote-desktop"),title:"远程桌面",onLoad:re}),!te&&e.jsx(Ze,{label:"REMOTE DESKTOP",title:"正在打开远程桌面",caption:"正在准备桌面与连接",icon:e.jsx(dt,{size:36,strokeWidth:1.5})})]}):n.kind==="calendar"?e.jsx("iframe",{className:"webapp-frame",src:Ge("/app/?view=calendar"),title:"智能体日历",onLoad:re}):n.kind==="aihub"?e.jsx(si,{visible:n.id===P,rpc:W}):n.kind==="flowstudio"?e.jsx(li,{visible:n.id===P}):e.jsx(oi,{terminalId:n.id,title:n.title,initialCommand:n.initialCommand,visible:n.id===P,state:O,rpc:W,onEvent:Q,onTerminalData:G,onTerminalReset:H,sendTerminalInput:ie,keyOrder:nt,keybarHidden:tt,onKeyOrderChange:Lt,onKeybarHiddenChange:Rt,terminalTheme:ee,initialScrollLine:Re[n.id]??null,onScrollLineChange:i=>et(f=>f[n.id]===i?f:{...f,[n.id]:i}),onRegisterFill:i=>Jn(n.id,i),onCwdChange:i=>i&&z(f=>({...f,[n.id]:i}))})})},n.id))})}),le&&e.jsx("div",{className:"drawer-mask",onClick:()=>ce(!1)}),e.jsxs("aside",{className:`tree-col ${le?"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:()=>He("files"),children:"文件"}),e.jsx("button",{className:he==="history"?"drawer-tab-active":"",onClick:()=>He("history"),children:"历史"}),e.jsx("span",{className:"tree-cwd",style:se.treeCwd,children:Ft??""}),e.jsx("button",{style:{...se.iconBtn,marginLeft:"auto",flexShrink:0},onClick:()=>ce(!1),"aria-label":"close drawer",children:e.jsx(Te,{size:15,"aria-hidden":"true"})})]}),he==="files"?e.jsx(ii,{ready:Y>0,followCwd:!0,cwd:Ft,gateway:fe,onOpenFile:ar,selectedPath:de??(qe==null?void 0:qe.path)??null,initialRoot:Le,initialFollow:Pe,revealRequest:qe,onTreeStateChange:(n,i)=>{Ct(n),Tt(i)}}):e.jsx(Yo,{csrfToken:t.csrfToken,terminalId:((Yt=A.find(n=>n.id===P))==null?void 0:Yt.kind)==="webapp"?null:P,pinnedCommands:rt,onPinnedCommandsChange:Pt,onFill:Qn,onExecute:sr}),e.jsxs("div",{className:"tree-foot",style:se.treeFoot,children:[e.jsx("span",{style:se.treeFootDot}),e.jsx("span",{children:"实时同步"})]})]}),de&&e.jsx("section",{className:"preview-col",style:se.previewCol,children:e.jsx(ai,{path:de,gateway:fe,onClose:()=>Ue(null)})})]}),a&&e.jsx(Lo,{page:a,reloadKey:d},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}},Ti=Object.freeze(Object.defineProperty({__proto__:null,default:di},Symbol.toStringTag,{value:"Module"}));export{Ze as F,Ti 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-BeWH1pvB.js";import{p}from"./chunk-JWPE2WC7-By3kXE4y.js";import{_ as t,l as o}from"./mermaid.core-D6eHnLLU.js";import{M as u,d as c}from"./cynefin-OW5HDTMX-BesIxLGS.js";import"./index-C30NoLsn.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-By3kXE4y.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-D6eHnLLU.js";import{p as xt}from"./cynefin-OW5HDTMX-BesIxLGS.js";import{d as J}from"./arc-CLpaLEla.js";import{o as St}from"./ordinal-BENe2yWM.js";import"./index-C30NoLsn.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-D6eHnLLU.js";import{l as ie}from"./linear-DQek-QDQ.js";import"./index-C30NoLsn.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-BeWH1pvB.js";import{p as m}from"./chunk-JWPE2WC7-By3kXE4y.js";import{_ as n,l as i}from"./mermaid.core-D6eHnLLU.js";import{M as p,c as u}from"./cynefin-OW5HDTMX-BesIxLGS.js";import"./index-C30NoLsn.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-D_GQGF5g.js";import{s as Xe}from"./chunk-POPQ4Y6H-CweDXr-B.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-DH0df9xk.js";import"./index-YrEOkxAg.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-B7CKqUBs.js";import{s as Xe}from"./chunk-POPQ4Y6H-BTHuMHN1.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-D6eHnLLU.js";import"./index-C30NoLsn.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()+`
|