dorkos 0.126.2 → 0.126.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/cli.js +133 -38
- package/dist/browser/native/package-manifest.json +1 -1
- package/dist/browser/source-manifest.json +1 -1
- package/dist/client/assets/{AboutPage-BQ66xWcJ.js → AboutPage-ycWTfXI8.js} +1 -1
- package/dist/client/assets/{ActivityErrorState-CPbfgXjw.js → ActivityErrorState-DBecAo4-.js} +1 -1
- package/dist/client/assets/{ActivityPage-CesljfZn.js → ActivityPage-CGuIeDGm.js} +1 -1
- package/dist/client/assets/{ActivityRow-DzhwE0ht.js → ActivityRow-BRiUvjHA.js} +1 -1
- package/dist/client/assets/{AdapterIcon-BXJkyF5g.js → AdapterIcon-z6z9LKwd.js} +1 -1
- package/dist/client/assets/{AdapterSetupWizard-CwKYl1vG.js → AdapterSetupWizard-Cp56Zx24.js} +1 -1
- package/dist/client/assets/{AgentOptionRow-0VdNzXCF.js → AgentOptionRow-BLuSwpNh.js} +1 -1
- package/dist/client/assets/{AgentPicker-Ldh64iOA.js → AgentPicker-DazquIgR.js} +1 -1
- package/dist/client/assets/{AgentRequestCard-CmAlDGTr.js → AgentRequestCard-BoRmxLKy.js} +1 -1
- package/dist/client/assets/{AppearancePage-DmsZPHst.js → AppearancePage-BMiVpe48.js} +1 -1
- package/dist/client/assets/{ApplyToOverridesDialog-Ct1W283T.js → ApplyToOverridesDialog-BHIrnfPf.js} +1 -1
- package/dist/client/assets/{AttentionSignalRow-B7gezgzA.js → AttentionSignalRow-CjN8lCWI.js} +1 -1
- package/dist/client/assets/{BaseTanStackRouterDevtoolsPanel-B-iktbLX-Nqvr65_g.js → BaseTanStackRouterDevtoolsPanel-B-iktbLX-BMBnO0fv.js} +1 -1
- package/dist/client/assets/{BindingDialog-CpBZoSZU.js → BindingDialog-Bw55sMTh.js} +1 -1
- package/dist/client/assets/{BlintzCanvas-BCtfZPrs.js → BlintzCanvas-Dd3bC9vw.js} +3 -3
- package/dist/client/assets/{CanvasCsvContent-DYksqzaf.js → CanvasCsvContent-B2S75f6B.js} +1 -1
- package/dist/client/assets/{CanvasFileContent-CqEqSxuJ.js → CanvasFileContent-CVSfg4MO.js} +2 -2
- package/dist/client/assets/{CanvasModel3dContent-vR6ze4IR.js → CanvasModel3dContent-CNmJsBTS.js} +2 -2
- package/dist/client/assets/{ChannelComposer-BVACOdph.js → ChannelComposer-7KpffyFv.js} +3 -3
- package/dist/client/assets/{ChatAppsOff-VsPP2Hye.js → ChatAppsOff-D7anOG3n.js} +1 -1
- package/dist/client/assets/{CodeMirrorDiff-CmKjH03N.js → CodeMirrorDiff-CfOmRCky.js} +1 -1
- package/dist/client/assets/{CodeMirrorEditor-BtNgazuc.js → CodeMirrorEditor-Cyz227_1.js} +1 -1
- package/dist/client/assets/{CommitmentList-D9I-CmNy.js → CommitmentList-DKo1Fb1A.js} +1 -1
- package/dist/client/assets/{CommitmentsPage-BORMYDZb.js → CommitmentsPage-DIcEZ2ka.js} +1 -1
- package/dist/client/assets/{ComputerResourceView-BZ9BxgOi.js → ComputerResourceView-Ck7rJ-SP.js} +1 -1
- package/dist/client/assets/{ComputerViewer-CbuU9tXK.js → ComputerViewer-Dw_VpNjD.js} +1 -1
- package/dist/client/assets/{ConnectionAccessLists-uE-Fzp6Y.js → ConnectionAccessLists-CETLVH7o.js} +1 -1
- package/dist/client/assets/{ConnectionsPage-D7QTHeQQ.js → ConnectionsPage-ZVWDffcl.js} +1 -1
- package/dist/client/assets/{ConventionPage-PS2WWCyB.js → ConventionPage-DkJ91wrN.js} +1 -1
- package/dist/client/assets/{ExtensionPageRoute-Cn7bYxGB.js → ExtensionPageRoute-FbJo1Qc0.js} +1 -1
- package/dist/client/assets/{FloatingTanStackRouterDevtools-CqogiFob-DKGNSXVz.js → FloatingTanStackRouterDevtools-CqogiFob-DCLR3iKw.js} +1 -1
- package/dist/client/assets/{ForwardConsentHost-CLIHtWwq.js → ForwardConsentHost-Buy5XlH7.js} +1 -1
- package/dist/client/assets/HandlePage-CByGC3B8.js +1 -0
- package/dist/client/assets/{HeartbeatPage-7MTowke-.js → HeartbeatPage-GXBEcZoJ.js} +1 -1
- package/dist/client/assets/{KeyEntry-Cf7D0Oo6.js → KeyEntry-g2VQ33KW.js} +1 -1
- package/dist/client/assets/{LexicalField-DqvzeMr3.js → LexicalField-CLd77PuB.js} +1 -1
- package/dist/client/assets/{ManagesPage-DxR4zWMf.js → ManagesPage-qCwzJ4Cx.js} +1 -1
- package/dist/client/assets/{Marketplace-V_92jKOn.js → Marketplace-DdkdIVPQ.js} +1 -1
- package/dist/client/assets/{MarketplaceSourcesView-CjCVMP_d.js → MarketplaceSourcesView-D44G21ff.js} +1 -1
- package/dist/client/assets/{McpAppFrame-4JDJsrmg.js → McpAppFrame-DVNWJHrn.js} +1 -1
- package/dist/client/assets/{McpSigninBody-DG1XX7XT.js → McpSigninBody-BO0OkvOw.js} +1 -1
- package/dist/client/assets/{Model3dViewer-DedBFHsl.js → Model3dViewer-Cvcyx2yv.js} +1 -1
- package/dist/client/assets/NamePage-5VUtswMH.js +1 -0
- package/dist/client/assets/{NewDirectMessageMenu-C8t7x-sB.js → NewDirectMessageMenu-C_hXtliM.js} +1 -1
- package/dist/client/assets/{NotificationsPage-DwGFE3F6.js → NotificationsPage-DP4HAVMA.js} +1 -1
- package/dist/client/assets/{OpenMeshSwitch-DPmTA9eg.js → OpenMeshSwitch-0Mkl8abo.js} +1 -1
- package/dist/client/assets/{OperatorIdentityForm-Cu0h8Xqy.js → OperatorIdentityForm-BRftJqRq.js} +1 -1
- package/dist/client/assets/{PermissionHistory-zD6ksrl2.js → PermissionHistory-Czl5PWN3.js} +1 -1
- package/dist/client/assets/{PermissionsPage-Durcnmie.js → PermissionsPage-DAsbrl6Q.js} +1 -1
- package/dist/client/assets/{PersonalityPopover-DuRjJuLj.js → PersonalityPopover-liTJ0Lns.js} +1 -1
- package/dist/client/assets/PhotoPage-DDcbiGjb.js +1 -0
- package/dist/client/assets/{PreviewRefusedNotice-hlYrFDQM.js → PreviewRefusedNotice-DcD1EY2c.js} +1 -1
- package/dist/client/assets/{ProfileFields-x-x8vgNo.js → ProfileFields-Bi_AfHOE.js} +1 -1
- package/dist/client/assets/{ProfilePanelContainer-8WxopRj2.js → ProfilePanelContainer-BIbOulLu.js} +1 -1
- package/dist/client/assets/{ProfileRolePicker-BfciiNpr.js → ProfileRolePicker-BadkFi4V.js} +1 -1
- package/dist/client/assets/{PromptSuggestionChips-D34Zeaq_.js → PromptSuggestionChips-C653MlaU.js} +1 -1
- package/dist/client/assets/{ReportsToPopover-BhqA5qXi.js → ReportsToPopover-dIbt6aes.js} +1 -1
- package/dist/client/assets/{RoomSurface-BlMNuQsT.js → RoomSurface-CssMcozl.js} +1 -1
- package/dist/client/assets/{RoomsPage-C52AOHIE.js → RoomsPage-CxwTRRNu.js} +1 -1
- package/dist/client/assets/{RunsOnPopover-DLhEKwXF.js → RunsOnPopover-lp8n4lgI.js} +1 -1
- package/dist/client/assets/{RuntimeConnectFlow-D3H5Fpkc.js → RuntimeConnectFlow-BAqkzthF.js} +1 -1
- package/dist/client/assets/{RuntimeSetupDialog-DPU4QIY9.js → RuntimeSetupDialog-E6f7Rd2W.js} +1 -1
- package/dist/client/assets/{SeenDevices-CDSHTsL7.js → SeenDevices-xdR3YQNr.js} +1 -1
- package/dist/client/assets/{SessionsPage-Crh3D3Jj.js → SessionsPage-BNZTufty.js} +1 -1
- package/dist/client/assets/{SettingsDialog-D0Oh-ku1.js → SettingsDialog-d7SQTDNy.js} +1 -1
- package/dist/client/assets/{SkillsPage-BPexZwnJ.js → SkillsPage-DiqUOZup.js} +1 -1
- package/dist/client/assets/{TaskDialogWrapper-D6RB8E59.js → TaskDialogWrapper-5gb-f-Uo.js} +1 -1
- package/dist/client/assets/{TasksEmptyState-Di3SbhJM.js → TasksEmptyState-g-CavcMv.js} +1 -1
- package/dist/client/assets/{TasksPage-CDLsY1Ww.js → TasksPage-BexV_pxB.js} +1 -1
- package/dist/client/assets/{TeamComputerEntry-B_q-oVSs.js → TeamComputerEntry-BFYqGL-G.js} +1 -1
- package/dist/client/assets/{ToolsPage-gvIVTnwf.js → ToolsPage-Dxt6qOdF.js} +1 -1
- package/dist/client/assets/{TopologyGraph-Bp8aL_qw.js → TopologyGraph-Cx_6gdbV.js} +1 -1
- package/dist/client/assets/{TourHost-Cg8EHvod.js → TourHost-DvAjpsug.js} +1 -1
- package/dist/client/assets/{UnlinkDialog-Ddd1Yxfk.js → UnlinkDialog-fgubvOUd.js} +1 -1
- package/dist/client/assets/{UnreadDivider-LL4_YtF0.js → UnreadDivider-BoLcTO_Z.js} +1 -1
- package/dist/client/assets/{WidgetErrorCard-BA3P7hNv.js → WidgetErrorCard-CgRMeAEO.js} +1 -1
- package/dist/client/assets/{WithheldExtensionsNotice-quqWNbus.js → WithheldExtensionsNotice-CFHBDyIh.js} +1 -1
- package/dist/client/assets/{WorkView-C_h8sclU.js → WorkView-5jzcnod5.js} +1 -1
- package/dist/client/assets/{_shell-D9q8zLfr.js → _shell-DFfXd1ys.js} +1 -1
- package/dist/client/assets/{_shell._home-CrTxBB3h.js → _shell._home-D2GJeGbi.js} +1 -1
- package/dist/client/assets/{_shell._home.activity-2M0BJkbQ.js → _shell._home.activity-DRXBBtAq.js} +1 -1
- package/dist/client/assets/{_shell._home.index-BTJhhEWN.js → _shell._home.index-CA_GnaUK.js} +1 -1
- package/dist/client/assets/{_shell._home.tasks-Dfrqv2nl.js → _shell._home.tasks-Cr4gak8T.js} +1 -1
- package/dist/client/assets/{_shell._home.workspaces-DPLQXDdH.js → _shell._home.workspaces-DbWciI1g.js} +1 -1
- package/dist/client/assets/{_shell.channels-CJqfUTZ1.js → _shell.channels-C31Txlqh.js} +1 -1
- package/dist/client/assets/{_shell.connections-Cpe1hru3.js → _shell.connections-gfevZyC-.js} +1 -1
- package/dist/client/assets/{_shell.feedback-requests-BeWCqScf.js → _shell.feedback-requests-CQc7aVrV.js} +1 -1
- package/dist/client/assets/_shell.marketplace-BepG1fJe.js +1 -0
- package/dist/client/assets/_shell.marketplace_.sources-BBQESbqU.js +1 -0
- package/dist/client/assets/_shell.session-DzeI9YIK.js +1 -0
- package/dist/client/assets/{_shell.team-EPvcS7RS.js → _shell.team-BlLU5BMC.js} +3 -3
- package/dist/client/assets/{_shell.threads-NJDzq9dv.js → _shell.threads-YmF9dQnZ.js} +1 -1
- package/dist/client/assets/_shell.x._extensionId-ByRocZjS.js +1 -0
- package/dist/client/assets/_shell.x._extensionId_._-ByRocZjS.js +1 -0
- package/dist/client/assets/{abnfDiagram-WEYOIA3C-DUHshdrR.js → abnfDiagram-WEYOIA3C-DLiXaMmC.js} +1 -1
- package/dist/client/assets/{access-copy-DHfPjN3G.js → access-copy-xWnaUps1.js} +1 -1
- package/dist/client/assets/{arc-sP6zNsGB.js → arc-AndXXvZc.js} +1 -1
- package/dist/client/assets/{architectureDiagram-ZHVYKT53-C8PTjsPx.js → architectureDiagram-ZHVYKT53-CM4tGveM.js} +1 -1
- package/dist/client/assets/{banner-CVrzHqOT.js → banner-BH1gXPTc.js} +1 -1
- package/dist/client/assets/{blockDiagram-RJAE7QA3-Cydde2fz.js → blockDiagram-RJAE7QA3-DenkdFXV.js} +1 -1
- package/dist/client/assets/{c4Diagram-XDPPPE54-DbM6KAK7.js → c4Diagram-XDPPPE54-DMAlFuoX.js} +1 -1
- package/dist/client/assets/{card-DA_Z-FYX.js → card-TbpEl6EH.js} +1 -1
- package/dist/client/assets/channel-5-dQamNX.js +1 -0
- package/dist/client/assets/{chunk-2E7WHVMD-CEbspaNh.js → chunk-2E7WHVMD-u0q5vCEc.js} +1 -1
- package/dist/client/assets/{chunk-2Q5K7J3B-DDP1SiE0.js → chunk-2Q5K7J3B-DBTggfjR.js} +1 -1
- package/dist/client/assets/{chunk-4EMNKR2T-BFjozJqd.js → chunk-4EMNKR2T-zu55wq-c.js} +1 -1
- package/dist/client/assets/{chunk-55XCU76K-0JSp6acZ.js → chunk-55XCU76K-XLIA3Qss.js} +1 -1
- package/dist/client/assets/{chunk-5VM5RSS4-DswTXnmp.js → chunk-5VM5RSS4-DmGjbtZg.js} +1 -1
- package/dist/client/assets/{chunk-JWPE2WC7-D0PYncYV.js → chunk-JWPE2WC7-ikMrk6md.js} +1 -1
- package/dist/client/assets/{chunk-VQ5W62QI-r5T-ZVBs.js → chunk-VQ5W62QI-cfwin8SC.js} +1 -1
- package/dist/client/assets/{chunk-XXDRQBXY-D8kkjktE.js → chunk-XXDRQBXY-Cn3e0QEQ.js} +1 -1
- package/dist/client/assets/{chunk-ZCHMQSOR-D6XtRzln.js → chunk-ZCHMQSOR-7RkBP94K.js} +2 -2
- package/dist/client/assets/{classDiagram-v2-4MYWR3UA-DUPDMGfm.js → classDiagram-v2-4MYWR3UA-CqVol7t8.js} +1 -1
- package/dist/client/assets/{command-BvXBgZfv.js → command-2pl_Cn7b.js} +1 -1
- package/dist/client/assets/{cose-bilkent-JH36ORCC-tiQpE-Q8.js → cose-bilkent-JH36ORCC-m0tmlDnx.js} +1 -1
- package/dist/client/assets/{cpu-mx7zDf7k.js → cpu-CdCfSlSR.js} +1 -1
- package/dist/client/assets/{cynefin-EF2NZ3EQ-BjAUxFfb.js → cynefin-EF2NZ3EQ-Cf7ajLou.js} +1 -1
- package/dist/client/assets/{cynefinDiagram-WF24UDRP-PmlyltXR.js → cynefinDiagram-WF24UDRP-Dl8GJr0l.js} +1 -1
- package/dist/client/assets/{dagre-NK4GIZVX-DDePjPkn.js → dagre-NK4GIZVX-2yAF6nW_.js} +1 -1
- package/dist/client/assets/{diagram-CBK3MWTC-D7N3T4Fx.js → diagram-CBK3MWTC-DaBb9JFm.js} +1 -1
- package/dist/client/assets/{diagram-I5XIIV2D-BfZHSbR2.js → diagram-I5XIIV2D-BMeCfhD1.js} +1 -1
- package/dist/client/assets/{diagram-ODIL2UCW-sXAa9bzN.js → diagram-ODIL2UCW-ClVKCieB.js} +1 -1
- package/dist/client/assets/{diagram-PFBEJUXE-Dfd_61WO.js → diagram-PFBEJUXE-DFIKk-tB.js} +1 -1
- package/dist/client/assets/{diagram-RJA3I4VV-BCzdEfnM.js → diagram-RJA3I4VV-DzC_xtYu.js} +1 -1
- package/dist/client/assets/{diagram-TYUNFSNR-BMqtz6sZ.js → diagram-TYUNFSNR-BroMVHm2.js} +1 -1
- package/dist/client/assets/{ebnfDiagram-V4P3TTPT-CyWj1615.js → ebnfDiagram-V4P3TTPT-GMsyIh86.js} +1 -1
- package/dist/client/assets/{elk-QONTBCTQ-BkQMBXse.js → elk-QONTBCTQ-DIpw6SW5.js} +1 -1
- package/dist/client/assets/{empty-state-Dv5iV4jb.js → empty-state-B7ufhAFk.js} +1 -1
- package/dist/client/assets/{erDiagram-KYQIGQAA-DiPsX7uU.js → erDiagram-KYQIGQAA-CsezeWpx.js} +1 -1
- package/dist/client/assets/{execution-config-Bej0Ot8e.js → execution-config-DRqIsff0.js} +1 -1
- package/dist/client/assets/{file-DXbyb23e.js → file-DHPgnMgj.js} +1 -1
- package/dist/client/assets/{file-exclamation-point-C8XqHyzY.js → file-exclamation-point-DtjBa2XX.js} +1 -1
- package/dist/client/assets/{file-text-CRTgqqkn.js → file-text-wmrSy3Io.js} +1 -1
- package/dist/client/assets/{find-latest-widget-fence-D1i7qNny.js → find-latest-widget-fence-Bv9D10ve.js} +1 -1
- package/dist/client/assets/{flowDiagram-IUGLLWBU-BSM44aJP.js → flowDiagram-IUGLLWBU-BGwNqglr.js} +1 -1
- package/dist/client/assets/{form-DYSiVEri.js → form-CA_eiUg-.js} +1 -1
- package/dist/client/assets/{format-cron-DYYwmo-o.js → format-cron-YPhIy57w.js} +1 -1
- package/dist/client/assets/{ganttDiagram-R7GPNTJY-BWCjYexX.js → ganttDiagram-R7GPNTJY-4IlzTCzA.js} +1 -1
- package/dist/client/assets/{git-branch-1zYKSuur.js → git-branch-BLIYLcM4.js} +1 -1
- package/dist/client/assets/{gitGraphDiagram-PDYL7XHY-ULC7Zunc.js → gitGraphDiagram-PDYL7XHY-HeaC8vlP.js} +1 -1
- package/dist/client/assets/{graph-BsZzo5TN.js → graph-Ch9lnHSS.js} +1 -1
- package/dist/client/assets/{heart-C4CSHUW7.js → heart-D4fTvM5q.js} +1 -1
- package/dist/client/assets/{highlighted-body-KPVGNVTW-CFECg7iB.js → highlighted-body-KPVGNVTW-KPma22SA.js} +1 -1
- package/dist/client/assets/{image-lightbox-M9t3Wulc.js → image-lightbox-DI18fB2Q.js} +1 -1
- package/dist/client/assets/{image-off-c01kxBAm.js → image-off-DRgXXpgv.js} +1 -1
- package/dist/client/assets/{index-BScgHCO_.js → index--2mMmier.js} +1 -1
- package/dist/client/assets/{index-DG13Cp5o.js → index-2J89pJxF.js} +1 -1
- package/dist/client/assets/{index-C1XazYWZ.js → index-3UGWygRZ.js} +1 -1
- package/dist/client/assets/{index-Dt7RONID.js → index-B-4XmK5Q.js} +1 -1
- package/dist/client/assets/index-B9X2-pzp.js +1 -0
- package/dist/client/assets/{index-Du4HX97h.js → index-BAd8jUzo.js} +2 -2
- package/dist/client/assets/{index-UJq1qaku.js → index-BMYGo6Ki.js} +1 -1
- package/dist/client/assets/{index-B3xeyV6n.js → index-BY0SKYuc.js} +1 -1
- package/dist/client/assets/{index-DIDUjTkq.js → index-B_56Srtt.js} +1 -1
- package/dist/client/assets/{index-uLbyd6YP.js → index-BmlBYrxT.js} +1 -1
- package/dist/client/assets/{index-Br35Gqfz.js → index-BtRM2yox.js} +1 -1
- package/dist/client/assets/{index-DyN65ufd.js → index-ButY6gKr.js} +1 -1
- package/dist/client/assets/{index-BYY8HEOz.js → index-C-X6jaVm.js} +1 -1
- package/dist/client/assets/{index-XEE1k4cl.js → index-C3IsCAxA.js} +1 -1
- package/dist/client/assets/{index-BTGRc0hC.js → index-COoO8dzi.js} +1 -1
- package/dist/client/assets/{index-BIVIHPoe.js → index-CRCfkwyN.js} +1 -1
- package/dist/client/assets/{index-BRH6C3LJ.js → index-CTTaeOCw.js} +1 -1
- package/dist/client/assets/index-CgpRBcA4.js +1 -0
- package/dist/client/assets/{index-DrENuQdJ.js → index-ClbMjgcZ.js} +1 -1
- package/dist/client/assets/{index-CnltS8ym.js → index-CucieFDK.js} +1 -1
- package/dist/client/assets/{index-DQTTC52E.js → index-D0cIffaH.js} +1 -1
- package/dist/client/assets/{index-B-7P1Q9s.js → index-D9w0FBQG.js} +1 -1
- package/dist/client/assets/{index-BqwCOIbF.js → index-DHZS9Lod.js} +1 -1
- package/dist/client/assets/{index-DsasLE1l.js → index-DSIdPh8G.js} +1 -1
- package/dist/client/assets/{index-CAAsqmfP.js → index-DTRAR0KK.js} +1 -1
- package/dist/client/assets/{index-LpaxG4VS.js → index-DbV3-jog.js} +1 -1
- package/dist/client/assets/{index-JG_0k1NX.js → index-Dbujw1c2.js} +1 -1
- package/dist/client/assets/{index-C3swXqWW.js → index-DpvGUFpV.js} +1 -1
- package/dist/client/assets/{index-CAjKQnAd.js → index-DuvW22xi.js} +1 -1
- package/dist/client/assets/{index-D847rJXW.js → index-Dy9bWvna.js} +1 -1
- package/dist/client/assets/{index-B_he44rF.js → index-EDXuyCOT.js} +1 -1
- package/dist/client/assets/{index-FwAvbbet.js → index-Ix2nCAz0.js} +1 -1
- package/dist/client/assets/{index-BSxkprTm.js → index-JoxvTUfo.js} +3 -3
- package/dist/client/assets/{index-YXyEu3Ia.js → index-QSo53dH-.js} +1 -1
- package/dist/client/assets/{index-DhkfALZp.js → index-bzM-k5lI.js} +1 -1
- package/dist/client/assets/{index-Ce3HZQem.js → index-jk2K24il.js} +1 -1
- package/dist/client/assets/{index-DzHj8lCz.js → index-mRMaqxu5.js} +9 -9
- package/dist/client/assets/{index-B6Scr7KJ.js → index-p3WivF1M.js} +226 -226
- package/dist/client/assets/{index-DrQqkQq_.js → index-qEI7Rsr1.js} +1 -1
- package/dist/client/assets/{index-DhoaVQXu.js → index-rPJ8b_DO.js} +1 -1
- package/dist/client/assets/{index-jLIoULQt.js → index-uG06zgQo.js} +1 -1
- package/dist/client/assets/{index-DhYnXLRT.js → index-uy36h8lC.js} +1 -1
- package/dist/client/assets/{index-BnXWm8Db.js → index-zvAbU6ah.js} +1 -1
- package/dist/client/assets/{index.esm-CZ68Qd2t.js → index.esm-CxXuMuQv.js} +1 -1
- package/dist/client/assets/{infoDiagram-MVDRKAX5-BCjhXqIT.js → infoDiagram-MVDRKAX5-g9EeD2xH.js} +1 -1
- package/dist/client/assets/{inline-code-BKPMIXZR.js → inline-code-14c1Gacs.js} +1 -1
- package/dist/client/assets/{ishikawaDiagram-HPEHV2GE-C9rsv2nh.js → ishikawaDiagram-HPEHV2GE-Zv5DrRnv.js} +1 -1
- package/dist/client/assets/{journeyDiagram-BOSHW7O7-BRYr1XL1.js → journeyDiagram-BOSHW7O7-COiWWTez.js} +1 -1
- package/dist/client/assets/{kanban-definition-FNSA4HC5-2ey8FXEn.js → kanban-definition-FNSA4HC5-DnQa8qXB.js} +1 -1
- package/dist/client/assets/{layers-DE3wjQuk.js → layers-D_NEJsnH.js} +1 -1
- package/dist/client/assets/{lightbulb-BXJIRUdm.js → lightbulb-EadQi_Lr.js} +1 -1
- package/dist/client/assets/{link-2-DzWm9OxA.js → link-2-DugR2HHU.js} +1 -1
- package/dist/client/assets/{list-runtime-types-BhkZkTrB.js → list-runtime-types-iJaKcim4.js} +1 -1
- package/dist/client/assets/{markdown-content-Bk9lCksw.js → markdown-content-BFHUHPgi.js} +1 -1
- package/dist/client/assets/{mention-pill-os_7QQu2.js → mention-pill-DXBno6EY.js} +1 -1
- package/dist/client/assets/{mermaid.core-BcRUBvZd.js → mermaid.core-C6ckWvkG.js} +4 -4
- package/dist/client/assets/{message-square-off-DuOiETNI.js → message-square-off-BH8wbm2a.js} +1 -1
- package/dist/client/assets/{mindmap-definition-6OY57UG3-DBhXkS2i.js → mindmap-definition-6OY57UG3-DV4PNLc-.js} +1 -1
- package/dist/client/assets/{more-details-Bt9nlPmS.js → more-details-DhdX4DGU.js} +1 -1
- package/dist/client/assets/{owner-notice-4ZSBxa2K.js → owner-notice-FMj3k7-f.js} +1 -1
- package/dist/client/assets/{package-BmOMrNwc.js → package-0mI7-RiJ.js} +1 -1
- package/dist/client/assets/{page-container-LomhzyuS.js → page-container-DRyYoDkA.js} +1 -1
- package/dist/client/assets/{pane-resize-handle-BOtzx5Q4.js → pane-resize-handle-OBc3uYxQ.js} +1 -1
- package/dist/client/assets/{paperclip-C1tkiT74.js → paperclip-BsTJpkyE.js} +1 -1
- package/dist/client/assets/{path-input-JHTlL97W.js → path-input-CFm1b1pk.js} +1 -1
- package/dist/client/assets/{pegDiagram-ECIUJNBX-B01fb3t0.js → pegDiagram-ECIUJNBX-Cboo0f6B.js} +1 -1
- package/dist/client/assets/{pieDiagram-GNMPY74T-BJ7JYrTk.js → pieDiagram-GNMPY74T-CiihSor1.js} +1 -1
- package/dist/client/assets/{plug-CsqfQsYq.js → plug-BdnJAo1j.js} +1 -1
- package/dist/client/assets/{primer-trigger-DLdK7lVr.js → primer-trigger-BV4xZfFz.js} +1 -1
- package/dist/client/assets/{profile-errors-CpvSy5wY.js → profile-errors-B08zStmk.js} +1 -1
- package/dist/client/assets/{progress-qB87L0zJ.js → progress-CpiQE0rv.js} +1 -1
- package/dist/client/assets/{quadrantDiagram-D57K4MC3-mJYGGmOV.js → quadrantDiagram-D57K4MC3-dF0oKeMn.js} +1 -1
- package/dist/client/assets/{query-error-state-MyJ1ivia.js → query-error-state-B0RUeb10.js} +1 -1
- package/dist/client/assets/{radio-DJV7l0fv.js → radio-CAGXbJK_.js} +1 -1
- package/dist/client/assets/{railroadDiagram-Y72NRBL7-BlXWwQe2.js → railroadDiagram-Y72NRBL7-ClkFJVq1.js} +1 -1
- package/dist/client/assets/{registry-tJrGs7kB.js → registry-Cog_2xvt.js} +4 -4
- package/dist/client/assets/registry-DLWJMbtY.js +1 -0
- package/dist/client/assets/{relay-trace-schemas-TH0-GYCB.js → relay-trace-schemas-CNDSmhcJ.js} +1 -1
- package/dist/client/assets/{repeat-CBnopqBr.js → repeat-Dag80z5v.js} +1 -1
- package/dist/client/assets/{requirementDiagram-EQYSW5RA-Dqr1Y74x.js → requirementDiagram-EQYSW5RA-Cey6FmFd.js} +1 -1
- package/dist/client/assets/{room-files-source-BFo0FEUP.js → room-files-source-BKUFMU_b.js} +1 -1
- package/dist/client/assets/{rotate-ccw-clock-D9XRHj5E.js → rotate-ccw-clock-egrvXlKX.js} +1 -1
- package/dist/client/assets/{rotate-cw-DNa7ENG3.js → rotate-cw-Po-L3HFe.js} +1 -1
- package/dist/client/assets/{sankeyDiagram-SY24JHO5-DGYZs_kW.js → sankeyDiagram-SY24JHO5-BsIuHjbJ.js} +1 -1
- package/dist/client/assets/{scroll-area-Bf6IGziJ.js → scroll-area-C7vKp2H4.js} +1 -1
- package/dist/client/assets/{search-x-DFBBEouE.js → search-x-C_BEqIuX.js} +1 -1
- package/dist/client/assets/{sequenceDiagram-BLEHNHQU-BW3u4L9y.js → sequenceDiagram-BLEHNHQU-BJZXJxwu.js} +1 -1
- package/dist/client/assets/{shield-x-WGxwrtNV.js → shield-x-hHpT8rAA.js} +1 -1
- package/dist/client/assets/{signed-in-eV4_EXuv.js → signed-in-BhArfIJC.js} +1 -1
- package/dist/client/assets/{sizeCapture-INFHLROL-C1TpueOu.js → sizeCapture-INFHLROL-DYCQyn7S.js} +1 -1
- package/dist/client/assets/{soul-file-e1iYX9IV.js → soul-file-Doekkv7n.js} +1 -1
- package/dist/client/assets/{stateDiagram-v2-A6IESKWZ-DvrHUauN.js → stateDiagram-v2-A6IESKWZ-C6bUDAO7.js} +1 -1
- package/dist/client/assets/{swimlanes-B3ENRKFQ-BUbTcoId.js → swimlanes-B3ENRKFQ-DGyTrJBT.js} +1 -1
- package/dist/client/assets/swimlanesDiagram-AYQRV4AK-DrZ99xGr.js +8 -0
- package/dist/client/assets/{table-DsxLk3Gx.js → table-9KRGRv_s.js} +1 -1
- package/dist/client/assets/{timeline-definition-JXYKGLGB-CzbVpGxn.js → timeline-definition-JXYKGLGB-CHAJwSq6.js} +1 -1
- package/dist/client/assets/{trust-posture-Blofy7eE.js → trust-posture-BQE9NSf_.js} +1 -1
- package/dist/client/assets/{unplug-B6dUhqA7.js → unplug-CklGWwz7.js} +1 -1
- package/dist/client/assets/untrusted-text-BDygHCRk.js +1 -0
- package/dist/client/assets/{unverified-catalog-notice-6pwZtIjx.js → unverified-catalog-notice-9mykZSlO.js} +1 -1
- package/dist/client/assets/{use-adapter-catalog-J43bUHJu.js → use-adapter-catalog-CDxy08u_.js} +1 -1
- package/dist/client/assets/{use-bindings-BgXZ0D7k.js → use-bindings-CPbqKyo6.js} +1 -1
- package/dist/client/assets/{use-composer-prefs--zO2mm_M.js → use-composer-prefs-C7v03Xx_.js} +1 -1
- package/dist/client/assets/{use-connector-management-9Q7wHb06.js → use-connector-management-COqWo76Y.js} +1 -1
- package/dist/client/assets/{use-deep-link-scroll-CXqwdwGr.js → use-deep-link-scroll-BuYR3PaO.js} +1 -1
- package/dist/client/assets/{use-delete-binding-BBQNMtUY.js → use-delete-binding-Dfz8BlLn.js} +1 -1
- package/dist/client/assets/{use-dev-links-C643CCcq.js → use-dev-links-Cu2JmM-_.js} +1 -1
- package/dist/client/assets/{use-direct-message-panel-BD_daG2E.js → use-direct-message-panel-DobIp_O4.js} +1 -1
- package/dist/client/assets/{use-external-adapter-catalog-BjbC1V6t.js → use-external-adapter-catalog-OLn4l20Q.js} +1 -1
- package/dist/client/assets/{use-full-activity-feed-DUH8r8jx.js → use-full-activity-feed-DNrhQueu.js} +1 -1
- package/dist/client/assets/use-is-below-desktop-7gY1n-47.js +1 -0
- package/dist/client/assets/{use-local-browser-P93oA-F5.js → use-local-browser-DPdkgs06.js} +1 -1
- package/dist/client/assets/{use-mesh-topology-B0k0gLoW.js → use-mesh-topology-Ci7r-pAi.js} +1 -1
- package/dist/client/assets/{use-mounted-ref-DE7EQsBF.js → use-mounted-ref-CWXhSyZ8.js} +1 -1
- package/dist/client/assets/{use-notification-prefs-B8JtshQ0.js → use-notification-prefs-GJ2coibL.js} +1 -1
- package/dist/client/assets/use-pending-read-DcVJ8fZb.js +1 -0
- package/dist/client/assets/{use-personality-commit-Dh5Sejj_.js → use-personality-commit-Da2BJ_58.js} +1 -1
- package/dist/client/assets/{use-promo-activation-C9FWA7ru.js → use-promo-activation-D4PAd7pd.js} +1 -1
- package/dist/client/assets/{use-promo-dismissals-BIfafj9f.js → use-promo-dismissals-BCBu0s3k.js} +1 -1
- package/dist/client/assets/{use-pulse-freshness-CxzVMmVK.js → use-pulse-freshness-CHLSUL-h.js} +1 -1
- package/dist/client/assets/{use-relay-config-DQE3dmJ2.js → use-relay-config-C6rPlEud.js} +1 -1
- package/dist/client/assets/{use-room-follow-claim-B1QPFaUb.js → use-room-follow-claim-BSijPV3c.js} +1 -1
- package/dist/client/assets/{use-room-sessions-CdjzO67_.js → use-room-sessions-CNqHgLVa.js} +1 -1
- package/dist/client/assets/{use-roving-tab-list-Nu-MIapD.js → use-roving-tab-list-EsqX22Ik.js} +1 -1
- package/dist/client/assets/use-session-canvas-DAGOz8a6.js +27 -0
- package/dist/client/assets/{use-status-budget-DgeTxC3h.js → use-status-budget-CHln-8aP.js} +1 -1
- package/dist/client/assets/{use-transform-CiJqtMBf.js → use-transform-BmyqpcvO.js} +1 -1
- package/dist/client/assets/{use-unclaimed-chats-Blkq6U4D.js → use-unclaimed-chats-9Clj_rwl.js} +1 -1
- package/dist/client/assets/use-update-config-T78vOnRy.js +1 -0
- package/dist/client/assets/{useMutationState-lbcdmnfE.js → useMutationState-B61VoWtY.js} +1 -1
- package/dist/client/assets/{usecaseDiagram-WPOLBNNX-BM36oESm.js → usecaseDiagram-WPOLBNNX-BUqj8rIH.js} +1 -1
- package/dist/client/assets/{vennDiagram-Q3Y3IDCW-Zrybcs91.js → vennDiagram-Q3Y3IDCW-B09oli-Z.js} +1 -1
- package/dist/client/assets/{wardleyDiagram-IVAIDKWA-CO4pzGG0.js → wardleyDiagram-IVAIDKWA-BE7gzLdw.js} +1 -1
- package/dist/client/assets/{xychartDiagram-4URNHDU4-pi_wF1CM.js → xychartDiagram-4URNHDU4-CbGKfmuW.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/index.js +5692 -4710
- package/dist/server/index.js.map +2 -2
- package/package.json +4 -4
- package/dist/client/assets/HandlePage-BjlcYr_l.js +0 -1
- package/dist/client/assets/NamePage-A8X09lY7.js +0 -1
- package/dist/client/assets/PhotoPage-DP5WoeFd.js +0 -1
- package/dist/client/assets/_shell.marketplace-CzLqm8iR.js +0 -1
- package/dist/client/assets/_shell.marketplace_.sources-DtraxnMx.js +0 -1
- package/dist/client/assets/_shell.session-72JEfodU.js +0 -1
- package/dist/client/assets/_shell.x._extensionId-CcJi8pKR.js +0 -1
- package/dist/client/assets/_shell.x._extensionId_._-CcJi8pKR.js +0 -1
- package/dist/client/assets/channel-DMgpNBDz.js +0 -1
- package/dist/client/assets/index-e6oawwKv.js +0 -1
- package/dist/client/assets/index-j30EyYIU.js +0 -1
- package/dist/client/assets/registry-BrjQCdmG.js +0 -1
- package/dist/client/assets/swimlanesDiagram-AYQRV4AK-wkooBe_N.js +0 -8
- package/dist/client/assets/untrusted-text-pHjcUwfI.js +0 -1
- package/dist/client/assets/use-is-below-desktop-DAZnwJGB.js +0 -1
- package/dist/client/assets/use-pending-read-DeGO1wGC.js +0 -1
- package/dist/client/assets/use-session-canvas-BfKGOpNy.js +0 -27
- package/dist/client/assets/use-update-config-BFFW_6Mc.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/LexicalField-
|
|
2
|
-
import{fd as Na,iD as Dn,oi as Ra,r as u,fa as Ta,O as kt,j as o,a1 as Dt,a3 as _t,a4 as _n,d$ as Ae,aP as wn,oj as za,ok as Sa,ol as Ia,om as Oa,on as jn,oo as La,op as Ba,oq as $a,or as Ma,os as Pa,ot as qa,ou as En,ov as Fn,ef as Cn,k2 as Ha,g as Ka,G as L,k1 as Va,a0 as Wa,x as Ce,ow as Tt,ox as Ga,dJ as Ua,oy as Fe,f4 as An,oz as M,R as Za,by as xe,ar as G,mb as Nn,k6 as Rn,k7 as Tn,U as Ja,k8 as zn,ka as dt,f as Ya,m4 as Xa,X as wt,J as Qa,b9 as ei,oA as ti,aZ as Sn,bX as ni,e4 as Ue,oB as jt,bx as ai,gZ as ii,fD as ri,bF as oi,kx as si,bz as li,bA as ci,bB as ui,bD as di,B as ge,i7 as zt,m5 as pi,I as mi,ga as fi,gb as gi,gc as xi,oC as pt,cu as hi,id as vi,ea as bi,eQ as yi,k9 as ki,oD as Di,mi as _i,oE as wi,ko as ji,kp as Ei,ad as Fi,jy as Ci,jz as Ai,jA as Ni,jB as Ri,oF as Ti,W as zi,oG as Si,oH as Ii,aY as Oi,oI as Li,dK as Bi,dL as $i,oJ as Mi,oK as Pi,oL as qi,a2 as Hi,oM as Ki,oN as Vi,iY as Et,hp as Wi,hq as St,oO as Gi}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/LexicalField-CLd77PuB.js","assets/index-p3WivF1M.js","assets/index-CujX3mpY.css","assets/mention-pill-DXBno6EY.js","assets/file-drag-GDx2qhdk.js","assets/file-DHPgnMgj.js","assets/find-latest-widget-fence-Bv9D10ve.js","assets/WidgetErrorCard-CgRMeAEO.js","assets/index-BY0SKYuc.js","assets/card-TbpEl6EH.js","assets/progress-CpiQE0rv.js","assets/markdown-content-BFHUHPgi.js","assets/table-9KRGRv_s.js","assets/package-0mI7-RiJ.js","assets/heart-D4fTvM5q.js","assets/git-branch-BLIYLcM4.js","assets/file-text-wmrSy3Io.js","assets/paperclip-BsTJpkyE.js","assets/index-Dbujw1c2.js","assets/RuntimeSetupDialog-E6f7Rd2W.js","assets/inline-code-14c1Gacs.js","assets/list-runtime-types-iJaKcim4.js","assets/RuntimeConnectFlow-BAqkzthF.js","assets/useMutationState-B61VoWtY.js","assets/runtime-connect-Dn0T5YWv.js","assets/use-transform-BmyqpcvO.js","assets/index-COoO8dzi.js","assets/index-DSIdPh8G.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{fd as Na,iD as Dn,oi as Ra,r as u,fa as Ta,O as kt,j as o,a1 as Dt,a3 as _t,a4 as _n,d$ as Ae,aP as wn,oj as za,ok as Sa,ol as Ia,om as Oa,on as jn,oo as La,op as Ba,oq as $a,or as Ma,os as Pa,ot as qa,ou as En,ov as Fn,ef as Cn,k2 as Ha,g as Ka,G as L,k1 as Va,a0 as Wa,x as Ce,ow as Tt,ox as Ga,dJ as Ua,oy as Fe,f4 as An,oz as M,R as Za,by as xe,ar as G,mb as Nn,k6 as Rn,k7 as Tn,U as Ja,k8 as zn,ka as dt,f as Ya,m4 as Xa,X as wt,J as Qa,b9 as ei,oA as ti,aZ as Sn,bX as ni,e4 as Ue,oB as jt,bx as ai,gZ as ii,fD as ri,bF as oi,kx as si,bz as li,bA as ci,bB as ui,bD as di,B as ge,i7 as zt,m5 as pi,I as mi,ga as fi,gb as gi,gc as xi,oC as pt,cu as hi,id as vi,ea as bi,eQ as yi,k9 as ki,oD as Di,mi as _i,oE as wi,ko as ji,kp as Ei,ad as Fi,jy as Ci,jz as Ai,jA as Ni,jB as Ri,oF as Ti,W as zi,oG as Si,oH as Ii,aY as Oi,oI as Li,dK as Bi,dL as $i,oJ as Mi,oK as Pi,oL as qi,a2 as Hi,oM as Ki,oN as Vi,iY as Et,hp as Wi,hq as St,oO as Gi}from"./index-p3WivF1M.js";import{F as Ft}from"./file-DHPgnMgj.js";import{h as Ui,r as Zi}from"./file-drag-GDx2qhdk.js";import{C as Ji,W as Yi,a as Xi}from"./find-latest-widget-fence-Bv9D10ve.js";import{P as Qi}from"./paperclip-BsTJpkyE.js";import{u as er}from"./index-Dbujw1c2.js";import{R as tr}from"./RuntimeSetupDialog-E6f7Rd2W.js";import{r as nr}from"./RuntimeConnectFlow-BAqkzthF.js";import{a as ar,b as ir}from"./markdown-content-BFHUHPgi.js";import"./WidgetErrorCard-CgRMeAEO.js";import{a as In,u as rr}from"./use-transform-BmyqpcvO.js";function or(e,t,n={}){const a=e.get();let i=null,r=a,s;const c=typeof a=="string"?a.replace(/[\d.-]/g,""):void 0,d=()=>{i&&(i.stop(),i=null),e.animation=void 0},f=()=>{const y=It(e.get()),h=It(r);if(y===h){d();return}const E=i?i.getGeneratorVelocity():e.getVelocity();d(),i=new Ra({keyframes:[y,h],velocity:E,type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:s})},m=()=>{var y;f(),e.animation=i??void 0,(y=e.events.animationStart)==null||y.notify(),i==null||i.then(()=>{var h;e.animation=void 0,(h=e.events.animationComplete)==null||h.notify()})};if(e.attach((y,h)=>{r=y,s=E=>h(nt(E,c)),Na.postRender(m)},d),Dn(t)){let y=n.skipInitialAnimation===!0;const h=t.on("change",x=>{y?(y=!1,e.jump(nt(x,c),!1)):e.set(nt(x,c))}),E=e.on("destroy",h);return()=>{h(),E()}}return d}function nt(e,t){return t?e+t:e}function It(e){return typeof e=="number"?e:parseFloat(e)}function sr(e,t={}){const{isStatic:n}=u.useContext(Ta),a=()=>Dn(e)?e.get():e;if(n)return In(a);const i=rr(a());return u.useInsertionEffect(()=>or(i,e,t),[i,JSON.stringify(t)]),i}function lr(e,t={}){return sr(e,{type:"spring",...t})}const Ct="data-feed-article",cr=['a[href]:not([tabindex="-1"])','button:not([disabled]):not([tabindex="-1"])','input:not([disabled]):not([type="file"]):not([tabindex="-1"])','select:not([disabled]):not([tabindex="-1"])','textarea:not([disabled]):not([tabindex="-1"])','[contenteditable="true"]:not([tabindex="-1"])','[tabindex]:not([tabindex="-1"])'].join(",");function Ot(e){const t=e.closest("[data-composer-card]");return(t==null?void 0:t.querySelector('textarea, [contenteditable="true"]'))??e}function ur(e,t){const n=Array.from(document.querySelectorAll(cr)).filter(r=>!e.contains(r));if(t==="after"){const r=n.find(s=>(e.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_FOLLOWING)!==0);return r===void 0?null:Ot(r)}const a=n.filter(r=>(e.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_PRECEDING)!==0),i=a[a.length-1];return i===void 0?null:Ot(i)}function dr(e){const t=u.useRef(null),n=u.useRef(e==null?void 0:e.onBeyondRendered);u.useEffect(()=>{n.current=e==null?void 0:e.onBeyondRendered},[e==null?void 0:e.onBeyondRendered]);const a=u.useCallback(i=>{var h;const r=t.current;if(r===null)return;if(i.key==="Home"||i.key==="End"){if(!i.ctrlKey&&!i.metaKey)return;i.preventDefault(),(h=ur(r,i.key==="End"?"after":"before"))==null||h.focus();return}if(i.key!=="PageDown"&&i.key!=="PageUp")return;const s=Array.from(r.querySelectorAll(`[${Ct}]`));if(s.length===0)return;const c=document.activeElement,d=s.findIndex(E=>E===c||c!==null&&E.contains(c)),f=d!==-1?d:s.reduce((E,x,D)=>c!==null&&(x.compareDocumentPosition(c)&Node.DOCUMENT_POSITION_FOLLOWING)!==0?D:E,-1),m=i.key==="PageDown"?f+1:f-1;if(m<0||m>s.length-1){const E=i.key==="PageDown",x=s[E?s.length-1:0],D=Number(x.getAttribute("aria-posinset")),g=Number(x.getAttribute("aria-setsize")),b=E?D<g:D>1,v=n.current;if(b&&Number.isFinite(D)&&v!==void 0){i.preventDefault(),v(E?"next":"previous",x);return}}const y=s[Math.min(Math.max(m,0),s.length-1)];y!==void 0&&(i.preventDefault(),y.focus())},[]);return{containerRef:t,handleKeyDown:a}}function Tc(e){return e===void 0?{}:{[Ct]:"",tabIndex:0,...e.total>=0&&{"aria-posinset":e.index,"aria-setsize":e.total},...e.total<0&&{"aria-setsize":-1}}}/**
|
|
3
3
|
* @license lucide-react v1.48.0 - ISC
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the ISC license.
|
|
@@ -20,11 +20,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
20
20
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fo(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Co(e){if(Array.isArray(e))return gt(e)}function rt(e,t){return Ro(e)||No(e,t)||ea(e,t)||Ao()}function Ao(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
21
21
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ea(e,t){if(e){if(typeof e=="string")return gt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gt(e,t)}}function gt(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function No(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a=[],i=!0,r=!1,s,c;try{for(n=n.call(e);!(i=(s=n.next()).done)&&(a.push(s.value),!(t&&a.length===t));i=!0);}catch(d){r=!0,c=d}finally{try{!i&&n.return!=null&&n.return()}finally{if(r)throw c}}return a}}function Ro(e){if(Array.isArray(e))return e}function Yt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function q(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Yt(Object(n),!0).forEach(function(a){xt(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yt(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function xt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function We(e,t){if(e==null)return{};var n=To(e,t),a,i;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}function To(e,t){if(e==null)return{};var n={},a=Object.keys(e),i,r;for(r=0;r<a.length;r++)i=a[r],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var At=u.forwardRef(function(e,t){var n=e.children,a=We(e,Do),i=na(a),r=i.open,s=We(i,_o);return u.useImperativeHandle(t,function(){return{open:r}},[r]),Za.createElement(u.Fragment,null,n(q(q({},s),{},{open:r})))});At.displayName="Dropzone";var ta={disabled:!1,getFilesFromEvent:Pr,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};At.defaultProps=ta;At.propTypes={children:M.func,accept:M.objectOf(M.arrayOf(M.string)),multiple:M.bool,preventDropOnDocument:M.bool,noClick:M.bool,noKeyboard:M.bool,noDrag:M.bool,noDragEventsBubbling:M.bool,minSize:M.number,maxSize:M.number,maxFiles:M.number,disabled:M.bool,getFilesFromEvent:M.func,onFileDialogCancel:M.func,onFileDialogOpen:M.func,useFsAccessApi:M.bool,autoFocus:M.bool,onDragEnter:M.func,onDragLeave:M.func,onDragOver:M.func,onDrop:M.func,onDropAccepted:M.func,onDropRejected:M.func,onError:M.func,validator:M.func};var ht={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,isDragGlobal:!1,acceptedFiles:[],fileRejections:[]};function na(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=q(q({},ta),e),n=t.accept,a=t.disabled,i=t.getFilesFromEvent,r=t.maxSize,s=t.minSize,c=t.multiple,d=t.maxFiles,f=t.onDragEnter,m=t.onDragLeave,y=t.onDragOver,h=t.onDrop,E=t.onDropAccepted,x=t.onDropRejected,D=t.onFileDialogCancel,g=t.onFileDialogOpen,b=t.useFsAccessApi,v=t.autoFocus,p=t.preventDropOnDocument,l=t.noClick,k=t.noKeyboard,_=t.noDrag,C=t.noDragEventsBubbling,R=t.onError,w=t.validator,j=u.useMemo(function(){return bo(n)},[n]),A=u.useMemo(function(){return vo(n)},[n]),O=u.useMemo(function(){return typeof g=="function"?g:Xt},[g]),$=u.useMemo(function(){return typeof D=="function"?D:Xt},[D]),z=u.useRef(null),I=u.useRef(null),P=u.useReducer(zo,ht),H=rt(P,2),re=H[0],N=H[1],te=re.isFocused,Q=re.isFileDialogActive,J=u.useRef(typeof window<"u"&&window.isSecureContext&&b&&ho()),De=function(){!J.current&&Q&&setTimeout(function(){if(I.current){var T=I.current.files;T.length||(N({type:"closeDialog"}),$())}},300)};u.useEffect(function(){return window.addEventListener("focus",De,!1),function(){window.removeEventListener("focus",De,!1)}},[I,Q,$,J]);var oe=u.useRef([]),Y=u.useRef([]),ee=function(T){z.current&&z.current.contains(T.target)||(T.preventDefault(),oe.current=[])};u.useEffect(function(){return p&&(document.addEventListener("dragover",Zt,!1),document.addEventListener("drop",ee,!1)),function(){p&&(document.removeEventListener("dragover",Zt),document.removeEventListener("drop",ee))}},[z,p]),u.useEffect(function(){var F=function(ue){Y.current=[].concat(Jt(Y.current),[ue.target]),Te(ue)&&N({isDragGlobal:!0,type:"setDragGlobal"})},T=function(ue){Y.current=Y.current.filter(function(fe){return fe!==ue.target&&fe!==null}),!(Y.current.length>0)&&N({isDragGlobal:!1,type:"setDragGlobal"})},K=function(){Y.current=[],N({isDragGlobal:!1,type:"setDragGlobal"})},W=function(){Y.current=[],N({isDragGlobal:!1,type:"setDragGlobal"})};return document.addEventListener("dragenter",F,!1),document.addEventListener("dragleave",T,!1),document.addEventListener("dragend",K,!1),document.addEventListener("drop",W,!1),function(){document.removeEventListener("dragenter",F),document.removeEventListener("dragleave",T),document.removeEventListener("dragend",K),document.removeEventListener("drop",W)}},[z]),u.useEffect(function(){return!a&&v&&z.current&&z.current.focus(),function(){}},[z,v,a]);var X=u.useCallback(function(F){R?R(F):console.error(F)},[R]),se=u.useCallback(function(F){F.preventDefault(),F.persist(),we(F),oe.current=[].concat(Jt(oe.current),[F.target]),Te(F)&&Promise.resolve(i(F)).then(function(T){if(!(Ve(F)&&!C)){var K=T.length,W=K>0&&mo({files:T,accept:j,minSize:s,maxSize:r,multiple:c,maxFiles:d,validator:w}),Z=K>0&&!W;N({isDragAccept:W,isDragReject:Z,isDragActive:!0,type:"setDraggedFiles"}),f&&f(F)}}).catch(function(T){return X(T)})},[i,f,X,C,j,s,r,c,d,w]),he=u.useCallback(function(F){F.preventDefault(),F.persist(),we(F);var T=Te(F);if(T&&F.dataTransfer)try{F.dataTransfer.dropEffect="copy"}catch{}return T&&y&&y(F),!1},[y,C]),ve=u.useCallback(function(F){F.preventDefault(),F.persist(),we(F);var T=oe.current.filter(function(W){return z.current&&z.current.contains(W)}),K=T.indexOf(F.target);K!==-1&&T.splice(K,1),oe.current=T,!(T.length>0)&&(N({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Te(F)&&m&&m(F))},[z,m,C]),be=u.useCallback(function(F,T){var K=[],W=[];F.forEach(function(Z){var ue=Jn(Z,j),fe=rt(ue,2),Ze=fe[0],Je=fe[1],Ye=Yn(Z,s,r),Pe=rt(Ye,2),Xe=Pe[0],Qe=Pe[1],et=w?w(Z):null;if(Ze&&Xe&&!et)K.push(Z);else{var tt=[Je,Qe];et&&(tt=tt.concat(et)),W.push({file:Z,errors:tt.filter(function(Aa){return Aa})})}}),(!c&&K.length>1||c&&d>=1&&K.length>d)&&(K.forEach(function(Z){W.push({file:Z,errors:[uo]})}),K.splice(0)),N({acceptedFiles:K,fileRejections:W,type:"setFiles"}),h&&h(K,W,T),W.length>0&&x&&x(W,T),K.length>0&&E&&E(K,T)},[N,c,j,s,r,d,h,E,x,w]),le=u.useCallback(function(F){F.preventDefault(),F.persist(),we(F),oe.current=[],Te(F)&&Promise.resolve(i(F)).then(function(T){Ve(F)&&!C||be(T,F)}).catch(function(T){return X(T)}),N({type:"reset"})},[i,be,X,C]),ie=u.useCallback(function(){if(J.current){N({type:"openDialog"}),O();var F={multiple:c,types:A};window.showOpenFilePicker(F).then(function(T){return i(T)}).then(function(T){be(T,null),N({type:"closeDialog"})}).catch(function(T){yo(T)?($(T),N({type:"closeDialog"})):ko(T)?(J.current=!1,I.current?(I.current.value=null,I.current.click()):X(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):X(T)});return}I.current&&(N({type:"openDialog"}),O(),I.current.value=null,I.current.click())},[N,O,$,b,be,X,A,c]),S=u.useCallback(function(F){!z.current||!z.current.isEqualNode(F.target)||(F.key===" "||F.key==="Enter"||F.keyCode===32||F.keyCode===13)&&(F.preventDefault(),ie())},[z,ie]),U=u.useCallback(function(){N({type:"focus"})},[]),me=u.useCallback(function(){N({type:"blur"})},[]),ce=u.useCallback(function(){l||(xo()?setTimeout(ie,0):ie())},[l,ie]),ye=function(T){return a?null:T},_e=function(T){return k?null:ye(T)},ne=function(T){return _?null:ye(T)},we=function(T){C&&T.stopPropagation()},V=u.useMemo(function(){return function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},T=F.refKey,K=T===void 0?"ref":T,W=F.role,Z=F.onKeyDown,ue=F.onFocus,fe=F.onBlur,Ze=F.onClick,Je=F.onDragEnter,Ye=F.onDragOver,Pe=F.onDragLeave,Xe=F.onDrop,Qe=We(F,wo);return q(q(xt({onKeyDown:_e(de(Z,S)),onFocus:_e(de(ue,U)),onBlur:_e(de(fe,me)),onClick:ye(de(Ze,ce)),onDragEnter:ne(de(Je,se)),onDragOver:ne(de(Ye,he)),onDragLeave:ne(de(Pe,ve)),onDrop:ne(de(Xe,le)),role:typeof W=="string"&&W!==""?W:"presentation"},K,z),!a&&!k?{tabIndex:0}:{}),Qe)}},[z,S,U,me,ce,se,he,ve,le,k,_,a]),je=u.useCallback(function(F){F.stopPropagation()},[]),Ca=u.useMemo(function(){return function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},T=F.refKey,K=T===void 0?"ref":T,W=F.onChange,Z=F.onClick,ue=We(F,jo),fe=xt({accept:j,multiple:c,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:ye(de(W,le)),onClick:ye(de(Z,je)),tabIndex:-1},K,I);return q(q({},fe),ue)}},[I,n,c,le,a]);return q(q({},re),{},{isFocused:te&&!a,getRootProps:V,getInputProps:Ca,rootRef:z,inputRef:I,open:ye(ie)})}function zo(e,t){switch(t.type){case"focus":return q(q({},e),{},{isFocused:!0});case"blur":return q(q({},e),{},{isFocused:!1});case"openDialog":return q(q({},ht),{},{isFileDialogActive:!0});case"closeDialog":return q(q({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return q(q({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return q(q({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:!1});case"setDragGlobal":return q(q({},e),{},{isDragGlobal:t.isDragGlobal});case"reset":return q({},ht);default:return e}}function Xt(){}function So({onFilesSelected:e}){const t=u.useCallback(s=>{s.length>0&&e(s)},[e]),{getRootProps:n,getInputProps:a,isDragActive:i}=na({onDrop:t,onError:s=>console.error("[composer] Could not read the dropped files.",s),noClick:!0,noKeyboard:!0}),r=u.useCallback(s=>{const c=Array.from(s.clipboardData.items).filter(d=>d.kind==="file").map(d=>d.getAsFile()).filter(d=>d!==null);c.length>0&&e(c)},[e]);return{getRootProps:n,getInputProps:a,isDragActive:i,handlePaste:r}}function aa(e){const t=u.useCallback(a=>{Ui(a.dataTransfer.types)&&(a.preventDefault(),a.dataTransfer.dropEffect="copy")},[]),n=u.useCallback(a=>{if(!e)return!1;const i=Zi(a.dataTransfer);return i===null?!1:(a.preventDefault(),e(i),!0)},[e]);return e?{onDragOver:t,onDrop:n}:null}const ia="bg-surface relative m-2 rounded-xl border p-2",ra={"data-composer-card":""};function Io({children:e,onFilesDropped:t,onPathDropped:n,className:a}){return t?o.jsx(Lo,{onFilesDropped:t,onPathDropped:n,className:a,children:e}):o.jsx(Oo,{onPathDropped:n,className:a,children:e})}function Oo({children:e,onPathDropped:t,className:n}){const a=aa(t);return o.jsx("div",{...ra,className:L(ia,n),onDragOver:a==null?void 0:a.onDragOver,onDrop:a?i=>void a.onDrop(i):void 0,children:e})}function Lo({children:e,onFilesDropped:t,onPathDropped:n,className:a}){const{getRootProps:i,getInputProps:r,isDragActive:s,handlePaste:c}=So({onFilesSelected:t}),d=aa(n),f=i();return o.jsxs("div",{...f,...ra,onDragOver:m=>{var y;d==null||d.onDragOver(m),(y=f.onDragOver)==null||y.call(f,m)},onDrop:m=>{var y;d==null||d.onDrop(m),(y=f.onDrop)==null||y.call(f,m)},onPaste:c,className:L(ia,a),children:[o.jsx("input",{...r()}),o.jsx(xe,{children:s&&o.jsx(G.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},className:"bg-primary/10 border-primary absolute inset-0 z-10 flex items-center justify-center rounded-xl border-2 border-dashed",children:o.jsx("p",{className:"text-primary text-sm font-medium",children:"Drop files to attach"})})}),e]})}const Bo=500,$o=229;function Mo(e){let t=0;for(let n=e.length-1;n>=0&&e[n]==="\\";n-=1)t+=1;return t}function Po({surface:e,value:t,isStreaming:n,isTouchOnly:a,isUploading:i=!1,onCancelUpload:r,commandPending:s=!1,canSubmit:c=!0,editingQueueItem:d,isPaletteOpen:f,paletteHasResults:m=!1,tabPicks:y=!0,queueHasItems:h,onSubmit:E,onStop:x,onEscape:D,onClear:g,onArrowUp:b,onArrowDown:v,onCommandSelect:p,onQueue:l,onSteer:k,onStage:_,onSaveEdit:C,onCancelEdit:R,onQueueNavigateUp:w,onQueueNavigateDown:j,contextKey:A}){const[O,$]=u.useState(null),z=u.useRef(null),I=O!==null&&O===(A??""),P=u.useCallback(()=>{z.current!==null&&clearTimeout(z.current),z.current=null,$(null)},[]),H=u.useCallback(()=>{z.current!==null&&clearTimeout(z.current),$(A??""),z.current=setTimeout(()=>{z.current=null,$(null)},Bo)},[A]);return u.useEffect(()=>()=>{z.current!==null&&clearTimeout(z.current)},[]),{handleKeyDown:u.useCallback(N=>{var te,Q;if(!(N.nativeEvent.isComposing||N.keyCode===$o||e.isComposing())){if(N.key==="Escape"){if(f){D==null||D(),N.preventDefault();return}if(d){R==null||R(),N.preventDefault();return}if(n){x==null||x(),N.preventDefault();return}if(i&&r){r(),N.preventDefault();return}t.trim()&&I?(e.clearThroughUndoStack(),g==null||g(),P(),N.preventDefault()):(D==null||D(),H(),t.trim()&&N.preventDefault());return}if(!f&&h){if(N.key==="ArrowUp"){const J=e.isCaretAtStart();if(!t.trim()||J){N.preventDefault(),w==null||w();return}}if(N.key==="ArrowDown"){const J=e.isCaretAtEnd();if(d&&J){N.preventDefault(),j==null||j();return}}}if(N.key==="Enter"&&N.altKey){N.preventDefault(),e.insertLineBreak();return}if(f){if(N.key==="ArrowDown"){N.preventDefault(),v==null||v();return}if(N.key==="ArrowUp"){N.preventDefault(),b==null||b();return}if(m&&(N.key==="Enter"&&!N.shiftKey||N.key==="Tab"&&y)){N.preventDefault(),p==null||p();return}}if(N.key==="Enter"&&!N.shiftKey){const J=e.textBeforeCaret();if(J!==null&&Mo(J)%2===1){N.preventDefault(),e.consumeEscapeIntoNewline();return}}if(N.key==="Enter"&&(N.metaKey||N.ctrlKey)&&!a&&n&&!d&&!s&&t.trim()){N.preventDefault(),N.shiftKey?(te=_??l)==null||te():(Q=k??l)==null||Q();return}if(N.key==="Enter"&&!N.shiftKey&&!a){if(N.preventDefault(),s)return;d&&t.trim()?C==null||C():n&&t.trim()?l==null||l():!n&&!i&&c&&t.trim()&&E()}}},[n,a,i,r,s,t,E,x,D,g,f,m,y,b,v,p,d,l,k,_,C,R,h,w,j,c,e,I,H,P]),clearArmed:I}}const qo={textBeforeCaret:()=>null,isCaretAtStart:()=>!0,isCaretAtEnd:()=>!0,insertLineBreak:()=>{},consumeEscapeIntoNewline:()=>{},clearThroughUndoStack:()=>{},isComposing:()=>!1};function oa(e,t){e.focus(),document.execCommand("insertText",!1,t)}function Ho(e){const t=e.selectionStart;e.setSelectionRange(t-1,t),oa(e,`
|
|
22
22
|
`)}function Ko(e){e.focus(),e.setSelectionRange(0,e.value.length),document.execCommand("insertText",!1,"")}function Vo(e){return{textBeforeCaret(){const t=e.current;return!t||t.selectionStart!==t.selectionEnd?null:t.value.slice(0,t.selectionStart)},isCaretAtStart(){const t=e.current;return!t||t.selectionStart===0},isCaretAtEnd(){const t=e.current;return!t||t.selectionStart===t.value.length},insertLineBreak(){const t=e.current;t&&oa(t,`
|
|
23
|
-
`)},consumeEscapeIntoNewline(){const t=e.current;t&&Ho(t)},clearThroughUndoStack(){const t=e.current;t&&Ko(t)},isComposing(){return!1}}}const Wo=200,Qt=24,Go=200;function Uo(e,t){u.useLayoutEffect(()=>{const n=e.current;if(!n)return;const a=()=>{n.style.transition="",n.style.height=""};if(t!==""){n.style.transition="",n.style.height="auto",n.style.height=`${Math.min(n.scrollHeight,Wo)}px`;return}const i=n.offsetHeight;if(i<=Qt){a();return}n.style.height=`${i}px`,n.style.transition=`height ${Go}ms ease`;const r=requestAnimationFrame(()=>{n.style.height=`${Qt}px`});return n.addEventListener("transitionend",a,{once:!0}),()=>{cancelAnimationFrame(r),n.removeEventListener("transitionend",a),a()}},[e,t])}const en=u.forwardRef(function({value:t,onChange:n,onCursorChange:a,onKeyDown:i,onFocus:r,onBlur:s,placeholder:c,placeholderOverlay:d,isPaletteOpen:f,paletteListboxId:m,activeDescendantId:y,onSurfaceChange:h},E){const x=u.useRef(null),D=Nn(),g=u.useRef(null);u.useEffect(()=>{g.current??(g.current=Vo(x)),h(g.current)},[h]),u.useImperativeHandle(E,()=>({focus:()=>{var l;return(l=x.current)==null?void 0:l.focus()},focusUnlessTouch:()=>{var l;D||(l=x.current)==null||l.focus()},focusAt:l=>{const k=x.current;k&&(k.focus(),k.setSelectionRange(l,l))}})),Uo(x,t);const b=u.useCallback(l=>{n(l.target.value),a==null||a(l.target.selectionStart)},[n,a]),v=u.useCallback(()=>{x.current&&(a==null||a(x.current.selectionStart))},[a]),p=t.trim().length>0;return o.jsxs("div",{className:"relative min-h-[24px] flex-1",children:[!p&&d,o.jsx("textarea",{ref:x,value:t,onChange:b,onKeyDown:i,onFocus:r,onBlur:s,onSelect:v,role:"combobox","aria-autocomplete":"list","aria-controls":f?m:void 0,"aria-expanded":f??!1,"aria-activedescendant":f?y:void 0,"aria-label":c,placeholder:d?"":c,className:"block max-h-[200px] min-h-[24px] w-full resize-none bg-transparent py-0.5 text-sm focus:outline-none",rows:1})]})});function Zo({onSteer:e,onStage:t}){return!e&&!t?null:o.jsxs(Rn,{children:[o.jsx(Tn,{asChild:!0,children:o.jsx("button",{type:"button",className:"focus-ring bg-muted text-muted-foreground hover:bg-muted/80 shrink-0 rounded-lg p-1.5 transition-colors max-md:p-2","aria-label":"More ways to send",children:o.jsx(Ja,{className:"size-(--size-icon-sm)"})})}),o.jsxs(zn,{align:"end",children:[e&&o.jsx(dt,{icon:pr,description:"Send it into the task now",onSelect:e,children:"Steer"}),t&&o.jsx(dt,{icon:Ya,description:"Use it next, without interrupting",onSelect:t,children:"Add context"})]})]})}const He={send:{className:"bg-primary text-primary-foreground hover:bg-primary/90",label:"Send message"},stop:{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90 dark:bg-destructive/60",label:"Stop generating"},queue:{className:"bg-muted text-muted-foreground hover:bg-muted/80",label:"Queue message"},update:{className:"bg-primary text-primary-foreground hover:bg-primary/90",label:"Save edit"},cancel:{className:"bg-muted text-muted-foreground hover:bg-muted/80",label:"Cancel edit"},"cancel-upload":{className:"bg-muted text-muted-foreground hover:bg-destructive/90 hover:text-destructive-foreground dark:hover:bg-destructive/60",label:"Cancel upload"},dispatching:{className:"bg-muted text-muted-foreground",label:"Running command"},stopping:{className:"bg-muted text-muted-foreground",label:"Stopping…"}},Jo={send:Ji,stop:$n,queue:ei,update:Qa,cancel:wt,"cancel-upload":Ce,dispatching:Ce,stopping:Ce};function Yo(e,t,n,a,i,r){return i?"dispatching":a?e?"update":"cancel":r?"stopping":t&&e?"queue":t?"stop":n?"cancel-upload":e?"send":null}function Xo(e,t){switch(e){case"send":return t.onSubmit;case"stop":return t.onStop;case"queue":return t.onQueue;case"update":return t.onSaveEdit;case"cancel":return t.onCancelEdit;case"cancel-upload":return t.onCancelUpload;default:return}}function Qo({hasText:e,isStreaming:t,commandPending:n=!1,submitDisabled:a=!1,editingQueueItem:i,queueDepth:r,isTouchOnly:s,onSubmit:c,onStop:d,onQueue:f,onSaveEdit:m,onCancelEdit:y,onCancelUpload:h,onSteer:E,onStage:x,stopPending:D=!1}){const g=Yo(e,t,h!==void 0,i,n,D),b=g==="send"&&a,v=b||g===null?void 0:Xo(g,{onSubmit:c,onStop:d,onQueue:f,onSaveEdit:m,onCancelEdit:y,onCancelUpload:h}),p=g===null?null:g==="send"&&s?Xa:Jo[g],l=g==="dispatching"||g==="stopping";return o.jsxs(o.Fragment,{children:[o.jsx(xe,{children:t&&e&&!D&&o.jsx(G.button,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.15},whileHover:{scale:1.05},whileTap:{scale:.97},onClick:d,type:"button",className:"bg-destructive text-destructive-foreground hover:bg-destructive/90 dark:bg-destructive/60 shrink-0 rounded-lg p-1.5 transition-colors max-md:p-2","aria-label":"Stop generating",children:o.jsx($n,{className:"size-(--size-icon-sm)"})})}),g==="queue"&&o.jsx(Zo,{onSteer:E,onStage:x}),o.jsxs("div",{className:"relative shrink-0",children:[g==="cancel-upload"&&o.jsx("span",{role:"status",className:"sr-only",children:"Uploading attachment"}),l&&g?o.jsxs("div",{role:"status",className:L("rounded-lg p-1.5 max-md:p-2",He[g].className),children:[o.jsx(Ce,{}),o.jsx("span",{className:"sr-only",children:He[g].label})]}):g&&p?o.jsx(G.button,{animate:{opacity:b?.5:1,scale:1},initial:!1,transition:{duration:.15},whileHover:b?void 0:{scale:1.05},whileTap:b?void 0:{scale:.97},onClick:v,disabled:b,type:"button",className:L("focus-ring rounded-lg p-1.5 transition-colors max-md:p-2",He[g].className,b&&"pointer-events-none"),"aria-label":He[g].label,children:o.jsx(p,{className:"size-(--size-icon-sm)"})}):o.jsx("div",{"aria-hidden":"true","data-testid":"action-slot-spacer",className:"p-1.5 max-md:p-2",children:o.jsx("div",{className:"size-(--size-icon-sm)"})}),r>0&&g==="queue"&&o.jsx("span",{className:"bg-foreground text-background text-3xs absolute -top-1 -right-1 flex h-4 w-4 items-center justify-center rounded-full font-medium",children:r})]})]})}const es=u.lazy(()=>Sn(()=>import("./LexicalField-DqvzeMr3.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]))),ts=u.forwardRef(function({value:t,onChange:n,onSubmit:a,isStreaming:i,isUploading:r=!1,onCancelUpload:s,commandPending:c=!1,editingQueueItem:d=!1,editingPosition:f,queueDepth:m=0,onStop:y,stopPending:h=!1,onQueue:E,onSteer:x,onStage:D,onSaveEdit:g,onCancelEdit:b,onEscape:v,onClear:p,isPaletteOpen:l,paletteHasResults:k,tabPicks:_,onArrowUp:C,onArrowDown:R,onCommandSelect:w,activeDescendantId:j,paletteListboxId:A,onCursorChange:O,onAttach:$,placeholder:z="Send a message…",placeholderOverlay:I,onQueueNavigateUp:P,onQueueNavigateDown:H,contextKey:re,onClearArmedChange:N,queueHasItems:te=!1,canSubmit:Q=!0,canSubmitReason:J,richText:De=!1,mentionSubjects:oe},Y){const ee=u.useRef(null),X=u.useRef(null),[se,he]=u.useState(!1),[ve,be]=u.useState(qo),le=Nn();u.useImperativeHandle(Y,()=>({focus:()=>{var V;return(V=ee.current)==null?void 0:V.focus()},focusUnlessTouch:()=>{var V;return(V=ee.current)==null?void 0:V.focusUnlessTouch()},focusAt:V=>{var je;return(je=ee.current)==null?void 0:je.focusAt(V)}}));const ie=u.useRef(le);u.useEffect(()=>{var V;ie.current||ti()||(V=ee.current)==null||V.focus()},[]);const S=u.useCallback(()=>{var V;(V=ee.current)==null||V.focusAt(t.length),y==null||y()},[y,t.length]),{handleKeyDown:U,clearArmed:me}=Po({surface:ve,value:t,isStreaming:i,isTouchOnly:le,isUploading:r,onCancelUpload:s,commandPending:c,canSubmit:Q,editingQueueItem:d,isPaletteOpen:l,paletteHasResults:k,tabPicks:_,queueHasItems:te,onSubmit:a,onStop:y,onEscape:v,onClear:p,onArrowUp:C,onArrowDown:R,onCommandSelect:w,onQueue:E,onSteer:x,onStage:D,onSaveEdit:g,onCancelEdit:b,onQueueNavigateUp:P,onQueueNavigateDown:H,contextKey:re}),ce=u.useCallback(()=>he(!0),[]),ye=u.useCallback(()=>{he(!1),l&&(v==null||v())},[l,v]),_e={ref:ee,value:t,onChange:n,onCursorChange:O,onKeyDown:U,onFocus:ce,onBlur:ye,placeholder:z,placeholderOverlay:I,isPaletteOpen:l,paletteHasResults:k,paletteListboxId:A,activeDescendantId:j,onSurfaceChange:be,mentionSubjects:oe},ne=t.trim().length>0,we=p!==void 0&≠return u.useEffect(()=>{N==null||N(me&&we)},[me,we,N]),o.jsxs("div",{className:"flex flex-col gap-1.5",children:[!Q&&J&&o.jsx("div",{role:"status",className:"text-muted-foreground px-1 text-xs",children:J}),d&&o.jsx("div",{className:"text-muted-foreground px-0.5 text-xs",children:f!==void 0&&m>0?`Editing message ${f} of ${m}`:"Editing message"}),o.jsxs("div",{className:L("border-input bg-background flex items-end gap-1.5 rounded-md border p-1.5 shadow-xs transition-[color,box-shadow]",se&&"border-ring ring-ring ring-[1px]",d&&"border-primary/40",!$&&"pl-3"),children:[$&&o.jsxs(o.Fragment,{children:[o.jsx("input",{ref:X,type:"file",className:"hidden",multiple:!0,onChange:V=>{const je=Array.from(V.target.files??[]);je.length>0&&$(je),V.target.value=""}}),o.jsx("button",{type:"button",onClick:()=>{var V;return(V=X.current)==null?void 0:V.click()},className:"focus-ring text-muted-foreground hover:text-foreground flex shrink-0 items-center justify-center rounded-md px-1.5 py-1 transition-colors disabled:opacity-50","aria-label":"Attach file",children:o.jsx(Qi,{className:"size-4"})})]}),De?o.jsx(u.Suspense,{fallback:o.jsx(en,{..._e}),children:o.jsx(es,{..._e})}):o.jsx(en,{..._e}),p&&o.jsx(G.button,{animate:{opacity:ne?.5:0,scale:ne?1:.8},transition:{duration:.15},whileHover:ne?{opacity:1}:void 0,onClick:p,disabled:!ne,type:"button",className:L("focus-ring text-muted-foreground hover:text-foreground shrink-0 rounded-lg p-1 transition-colors",!ne&&"pointer-events-none"),"aria-label":"Clear message",children:o.jsx(wt,{className:"size-(--size-icon-sm)"})}),o.jsx(Qo,{hasText:ne,isStreaming:i,onCancelUpload:r?s:void 0,commandPending:c,submitDisabled:!Q,editingQueueItem:d,queueDepth:m,isTouchOnly:le,onSubmit:a,onStop:S,stopPending:h,onQueue:E,onSteer:x,onStage:D,onSaveEdit:g,onCancelEdit:b})]})]})});function ns({children:e,className:t}){return o.jsx("div",{className:L("absolute right-0 bottom-full left-0 mb-2",t),children:e})}function tn(e){return e.type.startsWith("image/")}const nn="This file didn’t upload";function as({files:e,onRemove:t,onRetry:n,onCancel:a}){const i=e.filter(s=>tn(s.file)).map(s=>s.id).join(" "),r=u.useMemo(()=>{const s=new Map;for(const c of e)tn(c.file)&&s.set(c.id,URL.createObjectURL(c.file));return s},[i]);return u.useEffect(()=>()=>{for(const s of r.values())URL.revokeObjectURL(s)},[r]),o.jsx("div",{className:"flex flex-wrap gap-1.5 px-1 pb-1.5",children:o.jsx(xe,{children:e.map(s=>{const c=r.get(s.id),d=s.status==="error",f=s.status==="uploading"&&a!==void 0;return o.jsxs(G.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},transition:{duration:.15},className:L("flex items-center gap-1 rounded-md px-2 py-1 text-xs",d?"bg-destructive/10 border-destructive/40 border":"bg-muted"),children:[s.status==="uploading"?o.jsx(Ce,{size:"xs",className:"text-muted-foreground"}):d?o.jsx(ni,{className:"text-destructive size-(--size-icon-xs) shrink-0"}):c?o.jsx("img",{src:c,alt:"",className:"size-5 shrink-0 rounded object-cover"}):o.jsx(Ft,{className:"text-muted-foreground size-(--size-icon-xs)"}),o.jsx("span",{className:"max-w-32 truncate",children:s.file.name}),s.status==="uploading"&&o.jsxs("span",{className:"text-muted-foreground tabular-nums",children:[s.progress,"%"]}),d&&o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"text-destructive max-w-44 truncate",title:s.error??nn,children:s.error??nn}),n&&o.jsx("button",{type:"button",onClick:()=>n(s.id),className:"text-foreground ml-0.5 shrink-0 rounded-sm font-medium underline decoration-dotted underline-offset-2","aria-label":`Try uploading ${s.file.name} again`,children:"Try again"})]}),o.jsx("button",{type:"button",onClick:f?a:()=>t(s.id),className:"text-muted-foreground hover:text-foreground -mr-0.5 ml-0.5 shrink-0 rounded-sm p-0.5","aria-label":f?`Cancel upload of ${s.file.name}`:`Remove ${s.file.name}`,children:o.jsx(wt,{className:"size-3"})})]},s.id)})})})}function is(){const e=Ue();return o.jsx(G.div,{initial:e?!1:{opacity:0,y:3},animate:{opacity:1,y:0},transition:{duration:.12,ease:"easeOut"},"aria-hidden":"true","data-testid":"clear-armed-hint",className:"bg-popover text-muted-foreground shadow-soft pointer-events-none mt-1.5 ml-auto w-fit rounded-md border px-2 py-1 text-xs",children:"Press Esc again to clear"})}const ze={Root:Io,Input:ts,OverlayLane:ns,Attachments:as,ClearArmedHint:is};function rs({value:e,onChange:t,onSubmit:n,inputRef:a,head:i,mentionPicker:r,overlays:s,queue:c,aboveInput:d,asks:f,footer:m,children:y,className:h,onPathDropped:E,input:x}){const{capabilities:D,target:g}=Be();if(g===null)throw new Error("<Conversation.Composer> needs a target. A host that draws a composer has to say where its words go — pass `target` to <Conversation.Root>.");const[b,v]=u.useState(!1),p=D.attachments?g.attachments:null,l=(p==null?void 0:p.staged)??[],k=(p==null?void 0:p.hasFailed)===!0,_=g.canSend&&!k&&(x.canSubmit??!0),C=k?void 0:g.canSend?x.canSubmitReason:g.canSendReason,R=o.jsxs(o.Fragment,{children:[o.jsxs(ze.OverlayLane,{children:[D.mentions&&r,s,b&&o.jsx(ze.ClearArmedHint,{})]}),p!==null&&l.length>0&&o.jsx(ze.Attachments,{files:[...l],onRemove:p.remove,onRetry:p.retry,onCancel:p.cancel}),g.queue!==void 0&&c,d,o.jsx(ze.Input,{...x,ref:a,value:e,onChange:t,onSubmit:n,placeholder:x.placeholder??g.placeholder,canSubmit:_,...C===void 0?{}:{canSubmitReason:C},...p===null?{}:{onAttach:p.add,...p.holdsSendWhileUploading?{isUploading:p.isUploading,onCancelUpload:p.cancel}:{}},onClearArmedChange:v}),m]});return o.jsxs(ze.Root,{className:h,...p===null?{}:{onFilesDropped:p.add},...E===void 0?{}:{onPathDropped:E},children:[i,f===void 0?R:o.jsx(xe,{mode:"wait",children:f!==null?o.jsx(G.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},children:f},"interactive"):o.jsx(G.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},children:R},"normal")}),y]})}function os({asChild:e,children:t,className:n}){const a=e===!0?jt:"div";return o.jsx(a,{"data-slot":"conversation-footer",className:L(n),children:t})}function ss({surface:e,capabilities:t,target:n,density:a="comfortable",anchor:i="corner",children:r}){const s=u.useMemo(()=>({surface:e,capabilities:t,target:n??null,density:a,anchor:i}),[e,t,n,a,i]);return o.jsx(Pn.Provider,{value:s,children:r})}const an=1e3;function ls(e,t=Date.now){const n=Date.parse(e)+qn,[a,i]=u.useState(()=>t());return u.useEffect(()=>{const r=()=>i(t());let s,c;const d=n-t();return d>0?c=setTimeout(()=>{i(Math.max(t(),n)),s=setInterval(r,an)},d):s=setInterval(r,an),()=>{clearTimeout(c),clearInterval(s)}},[n,t]),Ar(e,a)}function sa(e){return e?"This room is gone, or you no longer have access to it.":"New messages aren’t arriving. You can still send; anything unsent will say so."}function cs(e){return e?"This room is no longer available":"Reconnecting. You can still send"}function us(e,t){switch(e.kind){case"ask":return"";case"stalled":return sa(t);case"presence":case"held":return e.sentence;case"silent-finish":return e.sentence;case"turn-waiting":return e.waitingType==="approval"?"Waiting for your approval":"Waiting for your answer";case"turn-progress":case"turn-system":return e.message;case"turn-streaming":return"Working";case"turn-complete":return"";case"empty":return""}}function rn(e){switch(e.kind){case"ask":return`ask:${e.ask.interaction.id}`;case"presence":return`presence:${e.sentence}`;case"held":return`held:${e.sentence}`;case"silent-finish":return`silent-finish:${e.sentence}`;case"turn-waiting":return`turn-waiting:${e.waitingType}`;case"turn-progress":case"turn-system":return`${e.kind}:${e.message}`;case"turn-streaming":return`turn-streaming:${e.verbKey}`;default:return e.kind}}const ds={room:"room-presence",thread:"thread-presence",session:"session-presence"},ps={room:"room-held",thread:"thread-held",session:"session-held"};function ms({state:e,onRetry:t,unavailable:n=!1,faces:a,reducedMotion:i=!1,scope:r="room"}){switch(e.kind){case"ask":return o.jsx(fs,{state:e,reducedMotion:i});case"stalled":return o.jsx(gs,{onRetry:t,unavailable:n});case"presence":return o.jsx(xs,{state:e,faces:a,reducedMotion:i,scope:r});case"held":return o.jsx(hs,{state:e,faces:a,scope:r});case"silent-finish":return o.jsx(vs,{state:e});case"turn-waiting":return o.jsx(bs,{state:e});case"turn-progress":return o.jsx(ys,{state:e,reducedMotion:i});case"turn-system":return o.jsx(ks,{state:e});case"turn-streaming":return o.jsx(Ds,{state:e,reducedMotion:i});case"turn-complete":return o.jsx(_s,{state:e});case"empty":return null}}function fs({state:e,reducedMotion:t}){return o.jsxs("span",{"data-testid":"lane-ask",className:"flex min-w-0 items-center gap-2",children:[o.jsx($e,{signal:"needs-you",reducedMotion:t}),o.jsx("span",{className:"text-foreground truncate",children:e.headline}),e.count>1&&o.jsxs("span",{"aria-hidden":"true",className:"text-muted-foreground shrink-0 tabular-nums",children:["+",e.count-1]}),o.jsx("span",{className:"text-status-warning-fg shrink-0 font-medium",children:"Answer"})]})}function gs({onRetry:e,unavailable:t}){const n=sa(t);return o.jsxs("span",{"data-testid":"room-stalled","data-unavailable":t?"true":void 0,className:"flex min-w-0 items-center gap-2",children:[o.jsx($e,{signal:"error",reducedMotion:!0}),o.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground truncate sm:hidden",children:cs(t)}),o.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground hidden truncate sm:inline",title:n,children:n}),e!==void 0&&o.jsx("button",{type:"button",onClick:e,className:"focus-ring text-muted-foreground hover:text-foreground shrink-0 rounded underline underline-offset-2",children:t?"Try again":"Reconnect"})]})}function xs({state:e,faces:t,reducedMotion:n,scope:a}){return o.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[o.jsx($e,{signal:"working",reducedMotion:n}),t,o.jsxs("span",{"data-testid":ds[a],"data-late":e.late?"true":void 0,className:"text-muted-foreground flex min-w-0 items-center",children:[o.jsx("span",{className:"truncate",children:e.line}),o.jsx(la,{since:e.since})]})]})}function hs({state:e,faces:t,scope:n}){return o.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[o.jsx($e,{signal:"working",reducedMotion:!0}),t,o.jsxs("span",{"data-testid":ps[n],className:"text-muted-foreground flex min-w-0 items-center",children:[o.jsx("span",{className:"truncate",children:e.sentence}),o.jsx(la,{since:e.since})]})]})}function vs({state:e}){return o.jsx("span",{"data-testid":"lane-silent-finish",className:"text-muted-foreground/50 flex min-w-0 items-center gap-2 opacity-60",children:o.jsx("span",{className:"truncate",children:e.sentence})})}function bs({state:e}){const t=e.waitingType==="approval"?ii:ri;return o.jsxs("span",{"data-testid":"lane-waiting",className:"flex min-w-0 items-center gap-2",children:[o.jsx(t,{"aria-hidden":"true",className:"text-status-warning-fg size-3 shrink-0"}),o.jsx("span",{className:"text-status-warning-fg truncate",children:e.waitingType==="approval"?"Waiting for your approval":"Waiting for your answer"}),o.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground/70 shrink-0 tabular-nums",children:e.elapsed})]})}function ys({state:e,reducedMotion:t}){return o.jsxs("span",{"data-testid":"lane-progress","data-determinate":e.determinate,className:"flex min-w-0 flex-1 items-center gap-2",children:[o.jsx("span",{className:"text-muted-foreground truncate",children:e.message}),o.jsx("span",{"aria-hidden":"true",className:"bg-muted/60 relative h-0.5 w-16 shrink-0 overflow-hidden rounded-full",children:e.determinate?o.jsx(G.span,{className:"bg-muted-foreground/50 absolute inset-y-0 left-0 block rounded-full",initial:!1,animate:{width:`${e.percent??0}%`},transition:t?{duration:0}:{duration:.3,ease:"easeOut"}}):o.jsx(G.span,{className:"bg-muted-foreground/50 absolute inset-y-0 block w-1/3 rounded-full",animate:t?void 0:{x:["-100%","400%"]},transition:{duration:1.4,ease:"easeInOut",repeat:1/0}})})]})}function ks({state:e}){return o.jsxs("span",{"data-testid":"lane-system",className:"flex min-w-0 items-center gap-2",children:[o.jsx(ai,{"aria-hidden":"true",className:"text-muted-foreground/60 size-3 shrink-0"}),o.jsx("span",{className:"text-muted-foreground/70 truncate",children:e.message})]})}function Ds({state:e,reducedMotion:t}){return o.jsxs("span",{"data-testid":"lane-streaming","data-bypass":e.isBypass?"true":void 0,className:"flex min-w-0 items-center gap-2",children:[e.isBypass?o.jsx("span",{"aria-hidden":"true",className:"text-status-warning-fg shrink-0 font-bold",children:"☠"}):o.jsx($e,{signal:"working",reducedMotion:t}),o.jsx("span",{"aria-hidden":"true",className:L("truncate",e.isBypass?"text-status-warning-fg":"text-muted-foreground"),children:e.verb}),o.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground/70 shrink-0 tabular-nums",children:e.elapsed}),o.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground/60 shrink-0",children:e.tokens})]})}function _s({state:e}){return o.jsxs("span",{"data-testid":"lane-complete",className:"text-muted-foreground/50 flex min-w-0 items-center gap-2 opacity-60",children:[o.jsx("span",{className:"truncate",children:e.elapsed}),o.jsx("span",{"aria-hidden":"true",children:"·"}),o.jsx("span",{className:"shrink-0",children:e.tokens})]})}function $e({signal:e,reducedMotion:t}){return o.jsx("span",{"aria-hidden":"true","data-lane-dot":e,className:L("size-1.5 shrink-0 rounded-full",si[e],e==="working"&&!t&&oi)})}function la({since:e}){const t=ls(e);return t===null?null:o.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground/70 shrink-0 tabular-nums",children:` · ${t}`})}const ws=.16,js={room:"room-presence-announcer",thread:"thread-presence-announcer",session:"session-lane-announcer"};function Es({state:e,scope:t="room",onRetry:n,unavailable:a=!1,faces:i,peek:r,onPeekOpenChange:s,peekLabel:c="Show who is working",heldPeekLabel:d="Show what is waiting",askCard:f,reducedMotionOverride:m}){const[y,h]=u.useState(!1),E=u.useRef(null),x=Ue()===!0,D=m??x,g=us(e,a),b=e.kind==="empty",v=(e.kind==="presence"||e.kind==="held")&&r!==void 0,p=e.kind==="ask"&&f!==void 0,l=v||p,k=p?f:r,_=p?"Answer this":e.kind==="held"?d:c;y&&!l&&h(!1);const C=y&&l,R=u.useRef(!1);u.useEffect(()=>{var O,$;if(R.current===C)return;const A=!C&&(((O=E.current)==null?void 0:O.contains(document.activeElement))===!0||document.activeElement===document.body);R.current=C,s==null||s(C),A&&(($=E.current)==null||$.focus())},[C,s]);const w=o.jsx(ms,{state:e,onRetry:n,unavailable:a,faces:i,reducedMotion:D,scope:t}),j=l?o.jsxs(li,{open:C,onOpenChange:h,children:[o.jsx(ci,{asChild:!0,children:o.jsx("button",{type:"button","aria-label":_,className:L("focus-ring flex min-w-0 items-center rounded text-left","hover:bg-accent/40 focus-visible:bg-accent/40"),children:w})}),o.jsxs(ui,{side:"top",align:"start",onOpenAutoFocus:p?void 0:A=>A.preventDefault(),className:"w-88 p-0",children:[o.jsx(di,{children:_}),k]})]}):w;return o.jsxs("div",{ref:E,"data-slot":"live-lane","data-lane-scope":t,tabIndex:-1,"data-lane-state":e.kind,"data-lane-motion":D?"off":"on",className:"flex h-6 shrink-0 items-center gap-2 overflow-hidden px-3 text-xs",children:[o.jsx("span",{"data-testid":js[t],role:"status","aria-live":"polite","aria-atomic":"true",className:"sr-only",children:g}),D?o.jsx("div",{"aria-hidden":b?"true":void 0,className:"flex min-w-0 flex-1 items-center",children:j},rn(e)):o.jsx(xe,{mode:"wait",initial:!1,children:o.jsx(G.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:ws},"aria-hidden":b?"true":void 0,className:"flex min-w-0 flex-1 items-center",children:j},rn(e))})]})}const Fs=1e3,Cs={working:"working",working_late:"still working",held:"waiting to start"};function As({rows:e,onScrollToRow:t,onOpenSession:n,onOpenRoom:a,onAnswerFirst:i,promoted:r,onStopAll:s,stopping:c=!1,onStopAgent:d,stoppingAgents:f}){const m=d!==void 0,y=e.length>1&&s!==void 0,h=u.useRef(new Map),E=u.useRef(null),x=u.useRef(e);return u.useEffect(()=>{var p;const D=x.current;x.current=e;const g=E.current;if(g===null||e.some(l=>l.authorId===g)||(E.current=null,document.activeElement!==document.body))return;const b=D.findIndex(l=>l.authorId===g),v=e[Math.min(Math.max(b,0),e.length-1)];v!==void 0&&((p=h.current.get(v.authorId))==null||p.focus())},[e]),o.jsxs("div",{"data-slot":"live-peek","data-testid":"live-peek",className:"flex flex-col",children:[o.jsx("ul",{className:"divide-border divide-y",children:e.map(D=>o.jsxs("li",{"data-testid":"live-peek-row",className:"flex gap-2.5 px-3 py-2.5",children:[o.jsx(Hn,{author:D.author,className:"mt-0.5 shrink-0"}),o.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[o.jsxs("p",{className:"flex min-w-0 items-center gap-1.5 text-xs",children:[o.jsx("span",{className:"text-foreground truncate font-medium",children:D.author.displayName}),o.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground/50",children:"·"}),o.jsx("span",{className:"text-muted-foreground shrink-0",children:Cs[D.state]}),o.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground/50",children:"·"}),o.jsx(Ns,{since:D.since})]}),D.doing!==null&&o.jsx("p",{"data-testid":"live-peek-doing",className:"text-muted-foreground truncate text-xs",children:D.doing}),D.replyingTo!==null&&t!==void 0&&o.jsx("button",{type:"button","data-testid":"live-peek-replying-to",onClick:()=>t(D.replyingTo.rowId),className:"focus-ring text-muted-foreground hover:text-foreground truncate rounded text-left text-xs underline underline-offset-2",children:`Replying to “${D.replyingTo.excerpt}”`}),o.jsxs("div",{className:"mt-0.5 flex items-center gap-2",children:[D.state!=="held"&&D.sessionId!==null&&n!==void 0&&o.jsxs(ge,{type:"button",variant:"outline",size:"sm","data-testid":"live-peek-open-session",onClick:()=>n(D.sessionId),className:"h-7 gap-1 px-2 text-xs",children:["Open its chat",o.jsx(zt,{"aria-hidden":"true",className:"size-3"})]}),D.state==="held"&&D.behind!=null&&D.behind.title!==null&&a!==void 0&&o.jsxs(ge,{type:"button",variant:"outline",size:"sm","data-testid":"live-peek-open-room",onClick:()=>a(D.behind.roomId),className:"h-7 gap-1 px-2 text-xs",children:["Open where it’s working",o.jsx(zt,{"aria-hidden":"true",className:"size-3"})]}),D.state==="held"&&D.othersWaiting===!0&&i!==void 0&&((r==null?void 0:r.has(D.authorId))===!0?o.jsx("span",{"data-testid":"live-peek-next-up",className:"text-muted-foreground text-xs",children:"Next up here"}):o.jsx(ge,{type:"button",variant:"ghost",size:"sm","data-testid":"live-peek-answer-first",onClick:()=>i(D.authorId),className:"h-7 px-2 text-xs",children:"Answer here first"})),m&&o.jsx(ge,{type:"button",variant:"ghost",size:"sm","data-testid":"live-peek-stop",disabled:(f==null?void 0:f.has(D.authorId))===!0,onClick:()=>d(D.authorId),onFocus:()=>E.current=D.authorId,ref:g=>{g===null?h.current.delete(D.authorId):h.current.set(D.authorId,g)},"aria-label":`Stop ${D.author.displayName}`,className:"h-7 px-2 text-xs",children:"Stop"})]})]})]},D.authorId))}),y&&o.jsx("div",{className:"border-border border-t p-2",children:o.jsxs(ge,{type:"button",variant:"ghost",size:"sm","data-testid":"live-peek-stop-all",disabled:c,onClick:s,className:"h-auto w-full flex-col items-start gap-0.5 px-2 py-1.5 text-xs",children:[o.jsx("span",{children:"Stop everything in this room"}),o.jsx("span",{className:"text-muted-foreground font-normal",children:`Stops all ${e.length}`})]})})]})}function Ns({since:e}){const[t,n]=u.useState(()=>Date.now());return u.useEffect(()=>{const a=setInterval(()=>n(Date.now()),Fs);return()=>clearInterval(a)},[e]),o.jsx("span",{className:"text-muted-foreground shrink-0 tabular-nums",children:En(Math.max(0,t-Date.parse(e)))})}function Rs(e,t,n){const a=u.useRef(null),i=u.useCallback((r,s)=>{const c=Number(s.getAttribute("aria-posinset")),d=r==="next"?c+1:c-1;if(!Number.isFinite(d)||d<1)return;let f=0;const m=e.findIndex(y=>y.kind==="message"&&++f===d);m!==-1&&(a.current=d,t.scrollToIndex(m,{align:r==="next"?"end":"start"}))},[e,t]);return u.useEffect(()=>{var c;const r=a.current;if(r===null)return;const s=(c=n.current)==null?void 0:c.querySelector(`[${Ct}][aria-posinset="${r}"]`);s!=null&&(a.current=null,s.focus())}),i}function Ts(e){const{conversationId:t,rows:n,virtualizer:a,landOn:i,landingReady:r,resumeRow:s,landOnRow:c,onTopRow:d}=e,[f,m]=u.useState(!1);u.useLayoutEffect(()=>{m(!0)},[]);const y=u.useRef(null),[h,E]=u.useState(!1),[x,D]=u.useState(null),[g,b]=u.useState(null),v=u.useRef(null);u.useLayoutEffect(()=>{if(!f||!r||n.length===0)return;const l=c==null?void 0:c(),k=y.current!==t;if(!k&&l===void 0)return;if(y.current=t,k&&(v.current=null),E(!0),l!==void 0){const R=n.findIndex(w=>w.id===l);if(R!==-1){D("requested"),b(l),a.scrollToIndex(R,{align:"center"});return}}if(!k)return;b(null);const _=s==null?void 0:s();if(_!==void 0){const R=n.findIndex(w=>w.id===_);if(R!==-1){D("remembered"),a.scrollToIndex(R,{align:"start"});return}}const C=i==="unread"?n.findIndex(R=>R.kind==="unread-divider"):-1;if(C===-1){D(_===void 0?"end":"end-row-gone"),a.scrollToEnd();return}D("unread"),a.scrollToIndex(Math.max(0,C-1),{align:"start"})},[f,r,t,n,a,i,s,c]);const p=u.useCallback((l,k)=>{var j;const _=(l==null?void 0:l.scrollTop)??0,C=a.getVirtualItems().find(A=>A.end>_),R=C===void 0||(j=n[C.index])==null?void 0:j.id,w=k?void 0:R;w!==v.current&&(v.current=w,d==null||d(w))},[a,n,d]);return{landed:h,landedOn:x,landedRow:g,reportTopRow:p}}function zs(e,t,n){const a=u.useCallback(r=>{var s;return((s=e[r])==null?void 0:s.id)??r},[e]);return er({count:e.length,getScrollElement:()=>t.current,estimateSize:()=>80,overscan:5,getItemKey:a,measureElement:(r,s,c)=>{var h;const d=(h=s==null?void 0:s.borderBoxSize)==null?void 0:h[0],f=d?Math.round(d.blockSize):r.getBoundingClientRect().height;if(f>0)return f;const m=c.indexFromElement(r),y=c.options.getItemKey(m);return c.itemSizeCache.get(y)??c.options.estimateSize(m)},anchorTo:"end",followOnAppend:!0,scrollEndThreshold:64,onChange:r=>{r.isScrolling||n==null||n()}})}const Ss=64;function Is(e){const{conversationId:t,rowCount:n}=e,a=u.useRef(null),i=u.useRef(!0),[r,s]=u.useState(!0),[c,d]=u.useState(!1),f=u.useRef(t),m=u.useCallback(()=>{const x=a.current;if(!x)return;const D=x.scrollHeight-x.scrollTop-x.clientHeight<=Ss;i.current=D,s(g=>g===D?g:D),D&&d(!1)},[]),y=u.useCallback(x=>{a.current=x},[]);u.useEffect(()=>{if(f.current===t)return;f.current=t,i.current=!0,s(!0),d(!1);const x=a.current;x&&(x.scrollTop=x.scrollHeight)},[t]);const h=u.useRef(n);u.useEffect(()=>{const x=h.current;h.current=n,n>x&&!i.current&&d(!0)},[n]);const E=u.useCallback(x=>{const D=a.current;D&&D.scrollTo({top:D.scrollHeight,behavior:(x==null?void 0:x.behavior)??"auto"}),i.current=!0,s(!0),d(!1)},[]);return{scrollRef:y,onScroll:m,isAtBottom:r,hasNewRows:c,atBottomRef:i,scrollToBottom:E}}const Os=800,on=24;function Ls({scrollRef:e}){const t=u.useRef(null),n=u.useRef(null),a=u.useRef(null),[i,r]=u.useState(!1),s=u.useRef(!1),c=u.useRef(!1),d=u.useRef(0),f=u.useRef(0),m=u.useCallback(()=>{a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{!s.current&&!c.current&&r(!1)},Os)},[]),y=u.useCallback(()=>{r(!0),m()},[m]),h=u.useCallback(()=>{c.current=!0,y()},[y]),E=u.useCallback(()=>{c.current=!1,m()},[m]),x=u.useCallback(()=>{const b=e.current,v=t.current,p=n.current;if(!b||!v||!p)return;const{scrollTop:l,scrollHeight:k,clientHeight:_}=b;if(k<=_){v.style.display="none";return}v.style.display="";const C=p.clientHeight,R=_/k,w=Math.max(R*C,on),j=C-w,O=l/(k-_)*j;v.style.height=`${w}px`,v.style.transform=`translateY(${O}px)`},[e]);u.useEffect(()=>{const b=e.current;if(!b)return;const v=()=>{y(),x()};return b.addEventListener("scroll",v,{passive:!0}),x(),()=>b.removeEventListener("scroll",v)},[e,y,x]);const D=u.useCallback(b=>{if(b.target===t.current)return;const v=e.current,p=n.current;if(!v||!p)return;const l=p.getBoundingClientRect(),k=(b.clientY-l.top)/l.height;v.scrollTop=k*(v.scrollHeight-v.clientHeight)},[e]),g=u.useCallback(b=>{var l;b.preventDefault(),b.stopPropagation(),s.current=!0,d.current=b.clientY,f.current=((l=e.current)==null?void 0:l.scrollTop)??0;const v=k=>{const _=e.current,C=n.current;if(!_||!C)return;const R=k.clientY-d.current,w=C.clientHeight,j=_.clientHeight/_.scrollHeight,A=Math.max(j*w,on),O=w-A,$=_.scrollHeight-_.clientHeight,z=R/O*$;_.scrollTop=f.current+z},p=()=>{s.current=!1,document.removeEventListener("pointermove",v),document.removeEventListener("pointerup",p),m()};document.addEventListener("pointermove",v),document.addEventListener("pointerup",p)},[e,m]);return o.jsx("div",{ref:n,role:"presentation",onClick:D,onPointerEnter:h,onPointerLeave:E,style:{top:"var(--conversation-thumb-top, 0px)"},className:"pointer-events-auto absolute right-0 bottom-0 z-10 w-2.5",children:o.jsx("div",{ref:t,onPointerDown:g,className:"bg-border hover:bg-foreground/40 absolute right-0.5 w-1.5 cursor-pointer rounded-full transition-[opacity,background-color] duration-200",style:{opacity:i?1:0}})})}function Bs({hasNewRows:e,isAtBottom:t,hasRows:n,onJump:a}){return o.jsxs(o.Fragment,{children:[o.jsx(xe,{children:e&&!t&&o.jsxs(G.button,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},exit:{opacity:0,y:4},transition:{duration:.2},onClick:a,"data-slot":"conversation-new-messages","data-testid":"conversation-new-messages",className:"bg-foreground text-background hover:bg-foreground/90 absolute bottom-4 left-1/2 z-10 -translate-x-1/2 cursor-pointer rounded-full px-3 py-1.5 text-xs font-medium shadow-sm transition-colors",children:["New messages",o.jsx("span",{role:"status","aria-live":"polite",className:"sr-only",children:"New messages"})]})}),o.jsx(xe,{children:!t&&n&&o.jsx(G.button,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:10},transition:{duration:.15},onClick:a,"data-slot":"conversation-jump-to-latest","data-testid":"conversation-jump-to-latest",className:"bg-background absolute right-4 bottom-4 rounded-full border p-2 shadow-sm transition-shadow hover:shadow-md","aria-label":"Scroll to bottom",children:o.jsx(pi,{className:"size-(--size-icon-md)"})})})]})}const $s=2200;function Ms(e){return e===null?"auto":e.scrollHeight-e.scrollTop-e.clientHeight<=e.clientHeight?"smooth":"auto"}function Ps({conversationId:e,label:t,rows:n,renderRow:a,onOpenThread:i,domIdOf:r,landOn:s="end",landingReady:c=!0,resumeRow:d,landOnRow:f,onTopRow:m,pending:y,viewerAuthorId:h,loading:E,empty:x,transcriptAnnouncement:D,approvalAnnouncement:g,onReachedBottom:b,busy:v,className:p,"data-testid":l,feedTestId:k,ref:_}){var ie;const{capabilities:C}=Be(),R=u.useRef(null),w=y??[],j=Is({conversationId:e,rowCount:n.length+w.length}),{scrollRef:A,atBottomRef:O}=j,$=u.useCallback(S=>{R.current=S,A(S)},[A]),z=u.useRef(null),I=u.useRef(!1),P=u.useCallback(()=>{var S;I.current&&((S=z.current)==null||S.call(z,R.current,O.current))},[O]),H=zs(n,R,P),{landed:re,landedOn:N,landedRow:te,reportTopRow:Q}=Ts({conversationId:e,rows:n,virtualizer:H,landOn:s,landingReady:c&&E==null,...d===void 0?{}:{resumeRow:d},...f===void 0?{}:{landOnRow:f},...m===void 0?{}:{onTopRow:m}});u.useLayoutEffect(()=>{z.current=Q,I.current=re});const J=u.useCallback(()=>{j.onScroll(),Q(R.current,O.current)},[j,Q,O]),De=H.isAtEnd();u.useEffect(()=>{re&&De&&(b==null||b())},[re,De,b]);const oe=Rs(n,H,R),Y=u.useCallback(S=>{const U=document.getElementById(S);return U===null?!1:(U.scrollIntoView({block:"center"}),U.focus({preventScroll:!0}),!0)},[]),ee=u.useRef(null),X=u.useRef(void 0),se=u.useCallback(()=>{var S;X.current!==void 0&&(clearTimeout(X.current),X.current=void 0),(S=ee.current)==null||S.removeAttribute("data-landed"),ee.current=null},[]),he=u.useRef(null);u.useEffect(()=>{if(N!=="requested"||te===null||he.current===te||r===void 0)return;const S=n.find(ce=>ce.id===te),U=S===void 0?void 0:r(S);if(U===void 0)return;const me=requestAnimationFrame(()=>{if(!Y(U))return;const ce=document.getElementById(U);ce!==null&&(he.current=te,se(),ce.setAttribute("data-landed","true"),ee.current=ce,X.current=setTimeout(se,$s))});return()=>cancelAnimationFrame(me)},[N,te,r,n,Y,se]),u.useEffect(()=>se,[se]);const ve=u.useCallback(S=>{j.scrollToBottom(S),H.scrollToEnd({behavior:(S==null?void 0:S.behavior)??"auto"})},[j,H]);u.useImperativeHandle(_,()=>({scrollToRow(S){if(Y(S))return!0;if(r===void 0)return!1;const U=n.findIndex(me=>r(me)===S);return U===-1?!1:(H.scrollToIndex(U,{align:"center"}),requestAnimationFrame(()=>Y(S)),!0)},scrollToBottom:ve}),[Y,r,n,H,ve]);const be=u.useMemo(()=>({onOpenThread:C.threads?i:void 0}),[C.threads,i]),le=u.useMemo(()=>n.reduce((S,U)=>S+(U.kind==="message"?1:0),0),[n]);return E!=null?o.jsx(o.Fragment,{children:E}):x!==void 0&&n.length===0&&w.length===0?o.jsx("div",{"data-slot":"conversation-empty",className:"flex min-h-0 flex-1 items-center justify-center overflow-y-auto",children:x}):o.jsxs("div",{"data-slot":"conversation-timeline","data-testid":l,"data-landed-on":N??void 0,"data-message-row-count":le,className:L("relative min-h-0 flex-1",p),children:[o.jsxs("div",{ref:$,onScroll:J,"data-slot":"conversation-scroller","data-testid":"conversation-scroller",className:"chat-scroll-area h-full scrollbar-none overflow-y-auto",style:{overflowAnchor:"none"},children:[o.jsx(fr,{label:t,busy:v,"data-testid":k,onBeyondRendered:oe,children:o.jsx("div",{style:{height:H.getTotalSize(),position:"relative",width:"100%"},children:o.jsx("div",{"data-slot":"conversation-window",className:"absolute left-0 w-full",style:{top:((ie=H.getVirtualItems()[0])==null?void 0:ie.start)??0},children:H.getVirtualItems().map(S=>o.jsx("div",{"data-index":S.index,ref:H.measureElement,children:a(n[S.index],{...be,index:S.index})},n[S.index].id))})})}),w.length>0&&h!==void 0&&o.jsx("div",{className:"flex flex-col",children:w.map(S=>o.jsx(Sr,{post:S,viewerAuthorId:h},S.clientId))})]}),D!==void 0&&o.jsx("div",{role:"log","aria-live":"polite","aria-atomic":"false","data-testid":"transcript-announcer",className:"sr-only",children:D}),g!==void 0&&o.jsx("div",{role:"status","aria-live":"polite","aria-atomic":"true","data-testid":"approval-announcer",className:"sr-only",children:g}),o.jsx(Ls,{scrollRef:R}),o.jsx(Bs,{hasNewRows:j.hasNewRows,isAtBottom:j.isAtBottom,hasRows:n.length>0,onJump:()=>ve({behavior:Ms(R.current)})})]})}const qs=["react","react-more","run-with","reply","copy","mention","profile"],Hs={"Yes, no, and thanks":["👍 thumbsup thumbs up yes approve like agree ok good","❤️ heart love red","🎉 tada party celebrate congrats hooray confetti","👀 eyes look watching seen reading review","🚀 rocket ship launch ship-it fast deploy","🙏 pray thanks thank you please folded hands","🔥 fire lit hot flame burn","💯 hundred perfect score full agree","✅ check tick done complete yes correct","❌ cross no wrong incorrect fail","👎 thumbsdown thumbs down no disagree bad","🙌 raised hands celebrate praise hooray","👏 clap applause bravo well done","🤝 handshake deal agreed partnership","💪 muscle strong flex power","🫡 salute yes sir acknowledged on it","✨ sparkles shiny new magic nice","⭐ star favourite favorite rating","🏆 trophy win won champion award","🎯 target bullseye exactly precise nailed it"],Faces:["😀 grin smile happy","😄 smile happy laugh joy","😂 joy laugh crying laughing funny lol","🤣 rofl rolling laughing hilarious","🙂 slight smile fine ok","😊 blush smile warm happy","😉 wink joking","😍 heart-eyes love adore","🤩 star-struck amazed wow","😎 sunglasses cool smooth","🥳 party face celebrate birthday","🤔 thinking hmm consider wondering","🧐 monocle inspect examine scrutiny","😅 sweat smile nervous phew close call","😬 grimace awkward yikes","😱 scream shocked horror fear","😮 surprised open mouth wow","🤯 mind blown exploding head whoa","😴 sleeping asleep tired zzz","🥱 yawn bored tired","😐 neutral meh straight face","🙄 eye roll unimpressed whatever","😤 triumph frustrated steam determined","😢 cry sad tear upset","😭 sob crying loudly devastated","😡 angry rage mad furious","🤒 sick ill fever unwell","🤖 robot bot agent automation machine","👻 ghost boo spooky","🤡 clown silly foolish","😇 innocent halo angel","🥲 tear smile bittersweet","🫠 melting overwhelmed hot dissolving","🤷 shrug dunno who knows unsure"],"Hands and people":["👋 wave hello hi bye greeting","🤙 call me shaka hang loose","✌️ peace victory two","🤞 fingers crossed hope luck","🫰 finger heart love money","👌 ok perfect fine good","🤌 pinched fingers italian chef what","☝️ point-up one first attention","👇 point-down below beneath","👉 point-right this next","👈 point-left back previous","✋ hand stop halt raised","🖐️ open-hand five stop","🫶 heart-hands love care","🧠 brain smart thinking mind idea","👨💻 developer coding programmer engineer","🕺 dancing celebrate dance","🏃 running run fast hurry"],"Hearts and symbols":["🧡 orange heart love","💛 yellow heart love","💚 green heart love","💙 blue heart love","💜 purple heart love","🖤 black heart love dark","🤍 white heart love","💔 broken heart sad hurt","💖 sparkling heart love shiny","❣️ heart-exclamation love","⚡ zap lightning fast power energy","💥 boom explosion collision impact","💫 dizzy stars sparkle","⚠️ warning caution careful alert","🚨 siren alert emergency urgent incident","🛑 stop sign halt blocked","♻️ recycle reuse refresh retry","🔒 lock secure locked private","🔓 unlock open unlocked","💡 idea bulb lightbulb suggestion insight","❓ question ask unknown what","❗ exclamation important attention","➕ plus add more increase","➖ minus remove less decrease","🆗 ok-button fine approved","🆕 new fresh","🔁 repeat loop again retry","⏳ hourglass waiting time slow pending","⏰ alarm clock time deadline reminder","📈 chart-up growth increase improving","📉 chart-down decline decrease regression"],"Work and things":["💻 laptop computer code work","🖥️ desktop monitor screen","📱 phone mobile device","⌨️ keyboard typing input","🐛 bug defect issue error broken","🔧 wrench fix repair tool","🔨 hammer build fix construct","🛠️ tools build fix maintenance","⚙️ gear settings config machinery","🧪 test experiment lab trial","🧹 broom clean cleanup sweep tidy","📦 package box shipment release module","🚢 ship shipping deploy release","🗑️ trash delete remove bin","📝 memo note write document","📋 clipboard copy list checklist","📌 pin pinned important stick","📎 paperclip attach link","🔍 magnifying search find look investigate","🔗 link url chain reference","🗓️ calendar date schedule plan","⏱️ stopwatch timing performance speed","🔔 bell notify notification alert ping","🔕 bell-off mute silent quiet","📮 mail post send inbox","🧾 receipt invoice record log","🗂️ files folders organise organize","🔑 key access secret credential","🧱 brick wall block foundation","🪵 log wood timber","🧯 extinguisher hotfix incident fire put out","🩹 bandage patch fix quick","🔮 crystal ball predict future guess","🧭 compass direction navigate guide","🪄 magic wand automatic magically"],"Food and drink":["☕ coffee cafe morning caffeine","🍵 tea green matcha","🍺 beer pint drink cheers","🍻 cheers beers toast celebrate","🥂 champagne toast celebrate cheers","🍕 pizza food slice","🍔 burger food hamburger","🌮 taco food mexican","🍜 noodles ramen soup food","🍎 apple fruit food","🍌 banana fruit food","🍰 cake dessert birthday sweet","🍪 cookie biscuit sweet snack","🍩 donut doughnut sweet","🧁 cupcake sweet dessert","🍫 chocolate sweet treat","🍿 popcorn watching drama entertainment","🥑 avocado food green","🌶️ chilli chili spicy hot pepper","🧊 ice cold frozen chill"],"Animals and nature":["🐶 dog puppy pet","🐱 cat kitten pet","🦊 fox clever","🐻 bear","🐼 panda","🐢 turtle slow tortoise","🐌 snail slow","🐝 bee busy buzz","🦋 butterfly transform pretty","🐙 octopus multitask arms","🐳 whale big ocean","🦄 unicorn rare magic special","🦉 owl wise night","🐘 elephant big memory","🌱 seedling growth new sprout","🌳 tree nature growth","🌸 blossom flower spring","🌊 ocean wave water sea","🌈 rainbow colour color pride hope","☀️ sun sunny bright day","🌙 moon night late evening","⛈️ storm thunder rain bad weather","❄️ snowflake cold snow winter freeze","🍂 leaves autumn fall"],"Places and travel":["🏠 house home","🏢 office building work","🌍 earth world globe europe africa","🌎 earth-americas world globe","🗺️ map plan route territory","✈️ plane flight travel","🚗 car drive travel","🚲 bike bicycle cycle","🚂 train rail","⛺ tent camping outdoors","🏝️ island holiday vacation beach","🏔️ mountain peak climb summit"]},ca=Object.entries(Hs).map(([e,t])=>({name:e,entries:t.map(n=>{const[a,...i]=n.split(" ");return{emoji:a,keywords:i}})})),ua=ca.flatMap(e=>e.entries);function Ks(e){const t=e.toLowerCase().trim().split(/\s+/).filter(Boolean);return t.length===0?[]:ua.filter(n=>n.emoji===e.trim()||t.every(a=>n.keywords.some(i=>i.startsWith(a))))}function Vs(e){return ua.find(t=>t.emoji===e)}function Le(e){var t;return((t=Vs(e))==null?void 0:t.keywords[0])??e}function da(e,t,n){const a=u.useRef([]);u.useImperativeHandle(n,()=>({focusFirst:()=>{var s;return(s=a.current[0])==null?void 0:s.focus()}}));const i=u.useCallback(s=>c=>{a.current[s]=c},[]),r=u.useCallback((s,c)=>{const d=(f,m)=>{var y;e!==0&&((y=a.current[(f+m+e)%e])==null||y.focus())};switch(s.key){case"ArrowRight":case"ArrowDown":s.preventDefault(),d(c,1);break;case"ArrowLeft":case"ArrowUp":s.preventDefault(),d(c,-1);break;case"Home":if(s.ctrlKey||s.metaKey)break;s.preventDefault(),d(0,0);break;case"End":if(s.ctrlKey||s.metaKey)break;s.preventDefault(),d(e-1,0);break;case"Escape":s.preventDefault(),s.stopPropagation(),t();break}},[e,t]);return{register:i,handleKeyDown:r}}function pa({mine:e,frequents:t,onPick:n,disabled:a}){const[i,r]=u.useState(""),s=u.useId(),c=u.useMemo(()=>Ks(i),[i]),d=i.trim().length>0,f=m=>o.jsx("button",{type:"button",disabled:a,onClick:()=>n(m),"aria-pressed":e.includes(m),"aria-label":Le(m),title:Le(m),className:L("focus-ring hover:bg-accent flex size-8 items-center justify-center rounded-md text-base",pt,"disabled:pointer-events-none disabled:opacity-50",e.includes(m)&&"bg-brand/15 ring-brand/40 ring-1"),children:o.jsx("span",{"aria-hidden":!0,children:m})},m);return o.jsxs("div",{className:"flex flex-col gap-2","data-testid":"reaction-picker",children:[o.jsx(mi,{autoFocus:!0,value:i,onChange:m=>r(m.target.value),placeholder:"Search emoji…","aria-label":"Search emoji",className:"h-8"}),a===!0&&o.jsx("p",{role:"status",className:"text-muted-foreground px-1 text-xs",children:"Reactions send once the room reconnects."}),o.jsx("div",{className:"max-h-64 overflow-y-auto pr-1",children:d?c.length===0?o.jsx("p",{className:"text-muted-foreground px-1 py-6 text-center text-xs",children:"Nothing here matches that."}):o.jsx("div",{className:"grid grid-cols-8 gap-0.5",children:c.map(m=>f(m.emoji))}):o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsxs("section",{role:"group","aria-labelledby":`${s}-frequents`,children:[o.jsx("h3",{id:`${s}-frequents`,className:"text-muted-foreground text-2xs px-1 pb-1 font-medium",children:"Your most used"}),o.jsx("div",{className:"grid grid-cols-8 gap-0.5",children:t.map(f)})]}),ca.map((m,y)=>o.jsxs("section",{role:"group","aria-labelledby":`${s}-group-${y}`,children:[o.jsx("h3",{id:`${s}-group-${y}`,className:"text-muted-foreground text-2xs px-1 pb-1 font-medium",children:m.name}),o.jsx("div",{className:"grid grid-cols-8 gap-0.5",children:m.entries.map(h=>f(h.emoji))})]},m.name))]})})]})}function ma({appearance:e="capsule",mine:t,frequents:n,onPick:a,disabled:i,triggerRef:r,onTriggerKeyDown:s}){const[c,d]=u.useState(!1),f=e==="capsule";return o.jsxs(fi,{open:c,onOpenChange:d,children:[o.jsx(gi,{asChild:!0,children:o.jsx(ge,{ref:r,type:"button",variant:"ghost",size:f?"icon-xs":"sm",tabIndex:-1,disabled:i,"data-entry-action":"react-more","data-testid":f?void 0:"entry-reactions-add","aria-label":"Pick a reaction",title:"Pick a reaction",onKeyDown:s,className:L("leading-none",f?"text-control":"text-muted-foreground/60 hover:text-foreground h-auto rounded-full px-2 py-0.5 text-xs"),children:o.jsx("span",{"aria-hidden":!0,children:"🙂+"})})}),o.jsx(xi,{align:"end",className:"w-[19rem] p-2",children:o.jsx(pa,{mine:t,frequents:n,disabled:i,onPick:m=>{a(m),d(!1)}})})]})}function Ws({prompt:e,sessionId:t,triggerRef:n,onTriggerKeyDown:a}){const i=hi(),r=Dt(),{sessions:s}=vi(),{data:c}=bi(),{data:d}=yi(),[f,m]=u.useState({open:!1}),y=s.find(v=>v.id===t),h=y==null?void 0:y.runtime,E=y==null?void 0:y.cwd,x=Di.filter(v=>v!==h),D=v=>(c?v in c.capabilities:!0)&&_i(d,v),g=v=>{wi(r,{dir:E,runtime:v,prompt:e}).then(p=>i(p)).catch(p=>{ji(r,p),Ei(E??null)})},b=v=>{if(!D(v)){m({open:!0,runtime:v});return}g(v)};return o.jsxs(o.Fragment,{children:[o.jsxs(Rn,{children:[o.jsx(Tn,{asChild:!0,children:o.jsx("button",{ref:n,type:"button","data-entry-action":"run-with","aria-label":"Run this prompt elsewhere",onKeyDown:a,className:"text-muted-foreground/60 hover:text-foreground hover:bg-muted inline-flex size-6 items-center justify-center rounded transition-colors duration-150",children:o.jsx(mr,{className:"size-3.5"})})}),o.jsxs(zn,{align:"end",className:"w-52",children:[o.jsx(ki,{children:"Run this with…"}),x.map(v=>{const p=Cn(v);return o.jsx(dt,{icon:p.icon,description:D(v)?void 0:"Connect",onSelect:()=>b(v),children:p.label},v)})]})]}),o.jsx(tr,{runtime:f.runtime,open:f.open,onOpenChange:v=>m(p=>({...p,open:v})),renderConnect:nr,onRuntimeReady:v=>{m({open:!1}),g(v)}})]})}function Gs(e,t,n){return qs.flatMap(a=>{if(a==="react")return t?t.quick.map(r=>({kind:"quick",slot:a,emoji:r,mine:t.mine.includes(r)})):[];if(a==="react-more")return t?[{kind:"picker",slot:a}]:[];if(a==="run-with")return n?[{kind:"run-with",slot:a,runWith:n}]:[];const i=e.find(r=>r.id===a);return i?[{kind:"command",slot:a,action:i}]:[]})}const Us=u.forwardRef(function({actions:t,reactions:n,runWith:a,onExit:i,className:r},s){const c=Gs(t,n,a),{register:d,handleKeyDown:f}=da(c.length,i,s);return c.length===0?null:o.jsx("div",{role:"toolbar","aria-label":"Message actions","aria-orientation":"horizontal","data-testid":"entry-actions",className:r,children:c.map((m,y)=>{const h=x=>f(x,y),E=m.kind==="command"&&y>0&&c[y-1].kind!=="command";return m.kind==="run-with"?o.jsx(Ws,{prompt:m.runWith.prompt,sessionId:m.runWith.sessionId,triggerRef:d(y),onTriggerKeyDown:h},"run-with"):m.kind==="picker"?o.jsx(ma,{mine:n.mine,frequents:n.quick,disabled:n.disabled,onPick:n.onToggle,triggerRef:d(y),onTriggerKeyDown:h},"react-more"):o.jsxs(u.Fragment,{children:[E&&o.jsx("span",{"aria-hidden":!0,className:"bg-border mx-0.5 my-1 w-px self-stretch"}),m.kind==="quick"?o.jsx(ge,{ref:d(y),type:"button",variant:"ghost",size:"icon-xs",tabIndex:-1,disabled:n.disabled,"data-entry-action":m.slot,"data-emoji":m.emoji,"data-reacted":m.mine?"true":void 0,"aria-pressed":m.mine,"aria-label":`React with ${Le(m.emoji)}`,title:`React with ${Le(m.emoji)}`,onClick:()=>n.onToggle(m.emoji),onKeyDown:h,className:L("text-control leading-none",m.mine&&"bg-brand/15 text-foreground"),children:o.jsx("span",{"aria-hidden":!0,children:m.emoji})}):o.jsx(ge,{ref:d(y),type:"button",variant:"ghost",size:"icon-xs",tabIndex:-1,"data-entry-action":m.slot,"aria-label":m.action.label,title:m.action.label,onClick:m.action.run,onKeyDown:h,children:o.jsx(m.action.icon,{"aria-hidden":!0,className:"size-3.5"})})]},m.kind==="quick"?m.emoji:m.action.id)})})});function Zs({quick:e,mine:t,onToggle:n,disabled:a}){const{close:i}=Ti(),[r,s]=u.useState(!1),c=d=>{n(d),i()};return o.jsxs("div",{className:"border-border border-b px-4 py-3","data-testid":"drawer-reactions",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[e.map(d=>o.jsx("button",{type:"button",disabled:a,onClick:()=>c(d),"data-entry-action":"react","data-emoji":d,"aria-pressed":t.includes(d),"aria-label":`React with ${Le(d)}`,className:L("focus-ring flex size-11 items-center justify-center rounded-full border text-lg",pt,"disabled:pointer-events-none disabled:opacity-50",t.includes(d)?"border-brand/70 bg-brand/12":"border-border bg-muted/60 active:bg-accent"),children:o.jsx("span",{"aria-hidden":!0,children:d})},d)),o.jsx("button",{type:"button",disabled:a,onClick:()=>s(d=>!d),"aria-expanded":r,"aria-label":"Pick a reaction",className:L("focus-ring border-border bg-muted/60 active:bg-accent flex size-11 items-center justify-center rounded-full border text-base",pt,"disabled:pointer-events-none disabled:opacity-50"),children:o.jsx("span",{"aria-hidden":!0,children:"🙂+"})})]}),r&&o.jsx("div",{className:"pt-3",children:o.jsx(pa,{mine:t,frequents:e,onPick:c,disabled:a})})]})}function Js({actions:e,reactions:t,onPressStateChange:n,children:a}){const i=Fi();return e.length===0?o.jsx(o.Fragment,{children:a}):o.jsxs(Ci,{children:[o.jsx(Ai,{asChild:!0,onPressStateChange:n,children:a}),o.jsxs(Ni,{className:"w-52",children:[i&&t&&o.jsx(Zs,{...t}),e.map(r=>o.jsxs(Ri,{onClick:r.run,children:[o.jsx(r.icon,{"aria-hidden":!0,className:"mr-2 size-4"}),r.label]},r.id))]})]})}function Ys({count:e,roll:t,mine:n}){const[a]=u.useState(t);return o.jsx("span",{"aria-hidden":!0,className:L("tabular-nums",n?"text-foreground/80":"text-muted-foreground",a&&"motion-safe:animate-reaction-roll"),children:e})}function Xs({reaction:e,mine:t,summary:n,arrived:a,rolled:i,onToggle:r,disabled:s,buttonRef:c,onKeyDown:d}){const[f]=u.useState(a),m=e.authorIds.length;return o.jsxs(G.button,{ref:c,type:"button",tabIndex:-1,onKeyDown:d,exit:{opacity:0},transition:{duration:.12},disabled:s,onClick:r,"aria-pressed":t,"aria-label":n,title:n,"data-testid":"entry-reaction","data-emoji":e.emoji,"data-mine":t?"true":void 0,className:L("focus-ring relative inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-xs","disabled:pointer-events-none disabled:opacity-50",t?"border-brand/70 bg-brand/12 text-foreground":"border-border bg-muted/60 text-muted-foreground hover:bg-muted",f&&"motion-safe:animate-reaction-pop"),children:[f&&o.jsx("span",{"aria-hidden":!0,className:"border-brand motion-safe:animate-reaction-ring pointer-events-none absolute -inset-1 rounded-full border opacity-0"}),o.jsx("span",{"aria-hidden":!0,children:e.emoji}),o.jsx(Ys,{count:m,roll:i,mine:t},m)]})}const Qs=u.forwardRef(function({reactions:t,viewerAuthorId:n,names:a,frequents:i,onToggle:r,disabled:s,onExit:c},d){const[f,m]=u.useState(!1),y=u.useRef(null),h=y.current,[E,x]=u.useState(!1),[D,g]=u.useState(t.length);D!==t.length&&(g(t.length),x(t.length===0&&D>0)),u.useEffect(()=>{y.current=new Map(t.map(j=>[j.emoji,j.authorIds.length]))});const{shown:b,hidden:v}=wr(t),p=f?t:b,l=t.filter(j=>Bt(j,n)).map(j=>j.emoji),k=v>0&&!f?1:0,_=t.length>0?1:0,{register:C,handleKeyDown:R}=da(p.length+k+_,c,d),w=u.useCallback(j=>A=>R(A,j),[R]);return t.length===0&&!E?null:o.jsxs("div",{"data-testid":"entry-reactions",className:"mt-1 flex flex-wrap items-center gap-1",role:"group","aria-label":"Reactions",children:[o.jsx(xe,{initial:!1,onExitComplete:()=>x(!1),children:p.map((j,A)=>o.jsx(Xs,{reaction:j,mine:Bt(j,n),summary:_r(j,n,a),arrived:h!==null&&!h.has(j.emoji),rolled:(h==null?void 0:h.get(j.emoji))!==void 0&&h.get(j.emoji)!==j.authorIds.length,onToggle:()=>r(j.emoji),disabled:s,buttonRef:C(A),onKeyDown:w(A)},j.emoji))}),k===1&&o.jsxs("button",{ref:C(p.length),type:"button",tabIndex:-1,onKeyDown:w(p.length),onClick:()=>m(!0),"data-testid":"entry-reactions-more",className:"focus-ring text-muted-foreground hover:text-foreground rounded-full px-2 py-0.5 text-xs",children:["+",v," more"]}),t.length>0&&o.jsx(ma,{appearance:"ghost-pill",mine:l,frequents:i,disabled:s,onPick:r,triggerRef:C(p.length+k),onTriggerKeyDown:w(p.length+k)})]})}),fa=u.createContext(null);function el({value:e,children:t}){return o.jsx(fa.Provider,{value:e,children:t})}function Me(){const e=u.useContext(fa);if(e===null)throw new Error("A Message part must be rendered inside <Message.Root>. Each part draws itself with a slot of the row’s single messageItem() call, and there is no honest default for a row that was never computed.");return e}function ga(e){return e==="first"||e==="only"}const tl=zi("",{variants:{anchor:{corner:"contents",rail:"pointer-events-none sticky top-1 z-20 order-first -mt-(--msg-actions-height) flex h-(--msg-actions-height) items-start justify-end pr-2"}}});function nl({actions:e=[],reactions:t,runWith:n,barRef:a,onExit:i}){const{capabilities:r,anchor:s}=Be(),{slots:c}=Me();return o.jsxs(o.Fragment,{children:[e.length>0&&o.jsx("button",{type:"button",tabIndex:-1,"data-testid":"entry-actions-reach","aria-label":"Message actions",onClick:()=>{var d;return(d=a==null?void 0:a.current)==null?void 0:d.focusFirst()},className:"sr-only"}),o.jsx("div",{"data-slot":"message-actions",className:tl({anchor:s}),children:o.jsx(Us,{ref:a,actions:e,reactions:r.reactions?t:void 0,runWith:r.runWith?n:void 0,onExit:i,className:c.actions()})})]})}function al({id:e,author:t,at:n,origin:a,mark:i,renderName:r,asChild:s=!1,className:c}){const{slots:d,position:f}=Me(),m=n===void 0?"":Kn(n);if(!ga(f))return null;const y=s?jt:"div",h=o.jsx("span",{className:d.authorName(),children:t.displayName});return o.jsxs(y,{id:e,"data-slot":"message-author",className:L(d.header(),c),children:[r?r(h):h,a!==void 0&&o.jsx(Si,{origin:a}),i,o.jsx(Ii,{retired:t.retired}),m.length>0&&o.jsx("time",{dateTime:n,title:Vn(n??""),className:L(d.timestamp(),"text-msg-timestamp"),children:m})]})}function il({children:e,className:t}){const{slots:n}=Me();return o.jsx("div",{"data-slot":"message-body",className:L(n.body(),t),children:e})}function rl({id:e,children:t,className:n}){const{slots:a}=Me();return o.jsx("div",{id:e,"data-slot":"message-content",className:L(a.content(),n),children:t})}function ol({author:e,at:t,onViewProfile:n,isSelf:a,renderAvatar:i,className:r}){const{slots:s,position:c}=Me(),{showTimestamps:d}=Oi(),f=t===void 0?"":Kn(t);return o.jsx("div",{"data-slot":"message-gutter",className:L(s.gutter(),r),children:ga(c)?(i??(m=>m))(o.jsx(Hn,{author:e,onViewProfile:n,isSelf:a})):f.length>0&&o.jsx("time",{dateTime:t,title:Vn(t??""),className:L(s.avatarTimestamp(),d?"text-msg-timestamp":"group-focus-within:text-msg-timestamp group-hover:text-msg-timestamp text-transparent"),children:f})})}function sl({ref:e,...t}){const{capabilities:n}=Be(),[a,i]=u.useState(t.reactions.length>0);return!a&&t.reactions.length>0&&i(!0),!n.reactions||!a?null:o.jsx("div",{"data-slot":"message-reactions",className:"contents",children:o.jsx(Qs,{ref:e,...t})})}const ll={type:"spring",stiffness:320,damping:28};function cl({role:e="assistant",position:t="only",isNew:n=!1,actions:a,reactions:i,asChild:r=!1,className:s,children:c,ref:d,...f}){const{capabilities:m,density:y,anchor:h}=Be(),[E,x]=u.useState(null),D=u.useMemo(()=>({slots:Tr({role:e,position:t,density:y,anchor:h}),position:t}),[e,t,y,h]),g=a!==void 0&&a.length>0,b=r?jt:G.div,v=o.jsx(b,{ref:d,"data-slot":"message-root",role:"article",className:L(D.slots.root(),"focus-visible:ring-ring outline-none focus-visible:ring-2","origin-center",g&&"[-webkit-touch-callout:none]",E==="pressing"&&"motion-safe:animate-press-in",E==="released"&&"motion-safe:animate-press-release",s),...r?{}:{initial:n?{opacity:0,y:8}:!1,animate:{opacity:1,y:0},transition:ll},...f,children:o.jsx(el,{value:D,children:o.jsx(Li,{children:c})})});return o.jsx(Js,{actions:a??[],reactions:m.reactions?i:void 0,onPressStateChange:x,children:v})}const Mc={Root:ss,Timeline:Ps,LiveLane:Es,LivePeek:As,Composer:rs,Footer:os},Pc={Root:cl,Gutter:ol,Author:al,Body:il,Content:rl,Attachments:Lr,Reactions:sl,Actions:nl},ul={a:$i,img:ir},xa=u.createContext({isStreaming:!1});function dl(e){const t=u.useContext(xa);return o.jsx(Xi,{...e,...t})}const pl={renderers:[{language:Yi,component:dl}]};function qc({content:e,isStreaming:t=!1,textEffect:n=gr,sessionId:a,isLatestWidgetMessage:i}){const r=hr(n),s=u.useMemo(()=>({sessionId:a,isLatestMessage:i,isStreaming:t}),[a,i,t]);return o.jsx(xa.Provider,{value:s,children:o.jsx("div",{className:L("relative",t&&"streaming-cursor"),children:o.jsx(ar,{resetKey:e,fallback:o.jsx("div",{className:"text-sm break-words whitespace-pre-wrap",children:e}),children:o.jsx(Bi,{shikiTheme:["github-light","github-dark"],components:ul,animated:r,isAnimating:t,plugins:pl,children:e})})})})}function Hc({via:e}){return o.jsxs("p",{"data-testid":"forward-via-line",className:"text-muted-foreground mb-0.5 flex min-w-0 items-center gap-1 text-xs",children:[o.jsxs("span",{className:"shrink-0",children:["via ",e.appName]}),o.jsx("span",{"aria-hidden":!0,children:"·"}),e.itemTitle?o.jsx("q",{className:"min-w-0 truncate",title:`Item title from ${e.appName}`,children:e.itemTitle}):o.jsxs("span",{className:"min-w-0 truncate",children:["item ",e.itemId]})]})}const ml={sent:[],stops:[]},fl=new Ki;function Kc(e){const t=Mi(),n=u.useContext(Pi),a=qi(e??""),{data:i}=Hi({queryKey:["chat-activity",e,a],queryFn:()=>t.getChatActivity(e),enabled:!!e&&t!==null&&n!==void 0,placeholderData:(r,s)=>(s==null?void 0:s.queryKey[1])===e?r:void 0,staleTime:3e4},n??fl);return i??ml}const Nt=u.createContext(null);function Vc({children:e,value:t}){const n=u.useMemo(()=>t,[t.sessionId,t.isStreaming,t.isLatestWidgetMessage,t.isFinalMessage,t.activeToolCallId,t.onToolRef,t.focusedOptionIndex,t.onToolDecided,t.onRetry,t.onSigninComplete,t.onChooseModel,t.inputZoneToolCallId,t.textEffect,t.runtimeLabel,t.allowsDenyReason]);return o.jsx(Nt,{value:n,children:e})}function Wc(){const e=u.useContext(Nt);if(!e)throw new Error("useMessageContext must be used within MessageProvider");return e}function Gc(){return u.useContext(Nt)}const gl=e=>typeof e=="boolean"||e instanceof Boolean,xl=e=>typeof e=="number"||e instanceof Number,hl=e=>typeof e=="bigint"||e instanceof BigInt,ha=e=>!!e&&e instanceof Date,vl=e=>typeof e=="string"||e instanceof String,bl=e=>Array.isArray(e),va=e=>typeof e=="object"&&e!==null,ba=e=>!!e&&e instanceof Object&&typeof e=="function";function Ge(e,t){return t===void 0&&(t=!1),!e||t?`"${e}"`:e}function yl(e,t,n){return n?JSON.stringify(e):t?`"${e}"`:e}function ya(e){let{field:t,value:n,data:a,lastElement:i,openBracket:r,closeBracket:s,level:c,style:d,shouldExpandNode:f,clickToExpandNode:m,outerRef:y,beforeExpandChange:h}=e;const E=u.useRef(!1),[x,D]=u.useState(()=>f(c,n,t)),g=u.useRef(null);u.useEffect(()=>{E.current?D(f(c,n,t)):E.current=!0},[f]);const b=u.useId();if(a.length===0)return kl({field:t,openBracket:r,closeBracket:s,lastElement:i,style:d});const v=x?d.collapseIcon:d.expandIcon,p=x?d.ariaLables.collapseJson:d.ariaLables.expandJson,l=c+1,k=a.length-1,_=w=>{x!==w&&(!h||h({level:c,value:n,field:t,newExpandValue:w}))&&D(w)},C=w=>{if(w.key==="ArrowRight"||w.key==="ArrowLeft")w.preventDefault(),_(w.key==="ArrowRight");else if(w.key==="ArrowUp"||w.key==="ArrowDown"){w.preventDefault();const j=w.key==="ArrowUp"?-1:1;if(!y.current)return;const A=y.current.querySelectorAll("[role=button]");let O=-1;for(let z=0;z<A.length;z++)if(A[z].tabIndex===0){O=z;break}if(O<0)return;const $=(O+j+A.length)%A.length;A[O].tabIndex=-1,A[$].tabIndex=0,A[$].focus()}},R=()=>{var w;_(!x);const j=g.current;if(!j)return;const A=(w=y.current)===null||w===void 0?void 0:w.querySelector('[role=button][tabindex="0"]');A&&(A.tabIndex=-1),j.tabIndex=0,j.focus()};return u.createElement("div",{className:d.basicChildStyle,role:"treeitem","aria-expanded":x,"aria-selected":void 0},u.createElement("span",{className:v,onClick:R,onKeyDown:C,role:"button","aria-label":p,"aria-expanded":x,"aria-controls":x?b:void 0,ref:g,tabIndex:c===0?0:-1}),(t||t==="")&&(m?u.createElement("span",{className:d.clickableLabel,onClick:R,onKeyDown:C},Ge(t,d.quotesForFieldNames),":"):u.createElement("span",{className:d.label},Ge(t,d.quotesForFieldNames),":")),u.createElement("span",{className:d.punctuation},r),x?u.createElement("ul",{id:b,role:"group",className:d.childFieldsContainer},a.map((w,j)=>u.createElement(vt,{key:w[0]||j,field:w[0],value:w[1],style:d,lastElement:j===k,level:l,shouldExpandNode:f,clickToExpandNode:m,beforeExpandChange:h,outerRef:y}))):u.createElement("span",{className:d.collapsedContent,onClick:R,onKeyDown:C}),u.createElement("span",{className:d.punctuation},s),!i&&u.createElement("span",{className:d.punctuation},","))}function kl(e){let{field:t,openBracket:n,closeBracket:a,lastElement:i,style:r}=e;return u.createElement("div",{className:r.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||t==="")&&u.createElement("span",{className:r.label},Ge(t,r.quotesForFieldNames),":"),u.createElement("span",{className:r.punctuation},n),u.createElement("span",{className:r.punctuation},a),!i&&u.createElement("span",{className:r.punctuation},","))}function Dl(e){let{field:t,value:n,style:a,lastElement:i,shouldExpandNode:r,clickToExpandNode:s,level:c,outerRef:d,beforeExpandChange:f}=e;return ya({field:t,value:n,lastElement:i||!1,level:c,openBracket:"{",closeBracket:"}",style:a,shouldExpandNode:r,clickToExpandNode:s,data:Object.keys(n).map(m=>[m,n[m]]),outerRef:d,beforeExpandChange:f})}function _l(e){let{field:t,value:n,style:a,lastElement:i,level:r,shouldExpandNode:s,clickToExpandNode:c,outerRef:d,beforeExpandChange:f}=e;return ya({field:t,value:n,lastElement:i||!1,level:r,openBracket:"[",closeBracket:"]",style:a,shouldExpandNode:s,clickToExpandNode:c,data:n.map(m=>[void 0,m]),outerRef:d,beforeExpandChange:f})}function wl(e){let{field:t,value:n,style:a,lastElement:i}=e,r,s=a.otherValue;return n===null?(r="null",s=a.nullValue):n===void 0?(r="undefined",s=a.undefinedValue):vl(n)?(r=yl(n,!a.noQuotesForStringValues,a.stringifyStringValues),s=a.stringValue):gl(n)?(r=n?"true":"false",s=a.booleanValue):xl(n)?(r=n.toString(),s=a.numberValue):hl(n)?(r=`${n.toString()}n`,s=a.numberValue):ha(n)?r=n.toISOString():ba(n)?r="function() { }":r=n.toString(),u.createElement("div",{className:a.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||t==="")&&u.createElement("span",{className:a.label},Ge(t,a.quotesForFieldNames),":"),u.createElement("span",{className:s},r),!i&&u.createElement("span",{className:a.punctuation},","))}function vt(e){const t=e.value;return bl(t)?u.createElement(_l,Object.assign({},e)):va(t)&&!ha(t)&&!ba(t)?u.createElement(Dl,Object.assign({},e)):u.createElement(wl,Object.assign({},e))}var B={"container-light":"_2IvMF _GzYRV","basic-element-style":"_2bkNM","child-fields-container":"_1BXBN","label-light":"_1MGIk","clickable-label-light":"_2YKJg _1MGIk _1MFti","punctuation-light":"_3uHL6 _3eOF8","value-null-light":"_2T6PJ","value-undefined-light":"_1Gho6","value-string-light":"_vGjyY","value-number-light":"_1bQdo","value-boolean-light":"_3zQKs","value-other-light":"_1xvuR","collapse-icon-light":"_oLqym _f10Tu _1MFti _1LId0","expand-icon-light":"_2AXVT _f10Tu _1MFti _1UmXx","collapsed-content-light":"_2KJWg _1pNG9 _1MFti","container-dark":"_11RoI _GzYRV","expand-icon-dark":"_17H2C _f10Tu _1MFti _1UmXx","collapse-icon-dark":"_3QHg2 _f10Tu _1MFti _1LId0","collapsed-content-dark":"_3fDAz _1pNG9 _1MFti","label-dark":"_2bSDX","clickable-label-dark":"_1RQEj _2bSDX _1MFti","punctuation-dark":"_gsbQL _3eOF8","value-null-dark":"_LaAZe","value-undefined-dark":"_GTKgm","value-string-dark":"_Chy1W","value-number-dark":"_2bveF","value-boolean-dark":"_2vRm-","value-other-dark":"_1prJR"};const ka={collapseJson:"collapse JSON",expandJson:"expand JSON"},ot={container:B["container-light"],basicChildStyle:B["basic-element-style"],childFieldsContainer:B["child-fields-container"],label:B["label-light"],clickableLabel:B["clickable-label-light"],nullValue:B["value-null-light"],undefinedValue:B["value-undefined-light"],stringValue:B["value-string-light"],booleanValue:B["value-boolean-light"],numberValue:B["value-number-light"],otherValue:B["value-other-light"],punctuation:B["punctuation-light"],collapseIcon:B["collapse-icon-light"],expandIcon:B["expand-icon-light"],collapsedContent:B["collapsed-content-light"],noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:ka,stringifyStringValues:!1},jl={container:B["container-dark"],basicChildStyle:B["basic-element-style"],childFieldsContainer:B["child-fields-container"],label:B["label-dark"],clickableLabel:B["clickable-label-dark"],nullValue:B["value-null-dark"],undefinedValue:B["value-undefined-dark"],stringValue:B["value-string-dark"],booleanValue:B["value-boolean-dark"],numberValue:B["value-number-dark"],otherValue:B["value-other-dark"],punctuation:B["punctuation-dark"],collapseIcon:B["collapse-icon-dark"],expandIcon:B["expand-icon-dark"],collapsedContent:B["collapsed-content-dark"],noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:ka,stringifyStringValues:!1},El=()=>!0,Fl=e=>e<1,Cl=e=>{let{data:t,style:n=ot,shouldExpandNode:a=El,clickToExpandNode:i=!1,beforeExpandChange:r,compactTopLevel:s,...c}=e;const d=u.useRef(null);return u.createElement("div",Object.assign({"aria-label":"JSON view"},c,{className:n.container,ref:d,role:"tree"}),s&&va(t)?Object.entries(t).map(f=>{let[m,y]=f;return u.createElement(vt,{key:m,field:m,value:y,style:{...ot,...n},lastElement:!0,level:1,shouldExpandNode:a,clickToExpandNode:i,beforeExpandChange:r,outerRef:d})}):u.createElement(vt,{value:t,style:{...ot,...n},lastElement:!0,level:0,shouldExpandNode:a,clickToExpandNode:i,outerRef:d,beforeExpandChange:r}))};var ae={},st,sn;function Al(){if(sn)return st;sn=1;const e=[[{color:"0, 0, 0",class:"ansi-black"},{color:"187, 0, 0",class:"ansi-red"},{color:"0, 187, 0",class:"ansi-green"},{color:"187, 187, 0",class:"ansi-yellow"},{color:"0, 0, 187",class:"ansi-blue"},{color:"187, 0, 187",class:"ansi-magenta"},{color:"0, 187, 187",class:"ansi-cyan"},{color:"255,255,255",class:"ansi-white"}],[{color:"85, 85, 85",class:"ansi-bright-black"},{color:"255, 85, 85",class:"ansi-bright-red"},{color:"0, 255, 0",class:"ansi-bright-green"},{color:"255, 255, 85",class:"ansi-bright-yellow"},{color:"85, 85, 255",class:"ansi-bright-blue"},{color:"255, 85, 255",class:"ansi-bright-magenta"},{color:"85, 255, 255",class:"ansi-bright-cyan"},{color:"255, 255, 255",class:"ansi-bright-white"}]],t=/(https?:\/\/(?:[A-Za-z0-9#;/?:@=+$',_.!~*()[\]-]|&|%[A-Fa-f0-9]{2})+)/gm;class n{static escapeForHtml(i){return new n().escapeForHtml(i)}static linkify(i){return new n().linkify(i)}static ansiToHtml(i,r){return new n().ansiToHtml(i,r)}static ansiToJson(i,r){return new n().ansiToJson(i,r)}static ansiToText(i){return new n().ansiToText(i)}constructor(){this.fg=this.bg=this.fg_truecolor=this.bg_truecolor=null,this.bright=0,this.decorations=[]}setupPalette(){this.PALETTE_COLORS=[];for(let c=0;c<2;++c)for(let d=0;d<8;++d)this.PALETTE_COLORS.push(e[c][d].color);let i=[0,95,135,175,215,255],r=(c,d,f)=>i[c]+", "+i[d]+", "+i[f];for(let c=0;c<6;++c)for(let d=0;d<6;++d)for(let f=0;f<6;++f)this.PALETTE_COLORS.push(r(c,d,f));let s=8;for(let c=0;c<24;++c,s+=10)this.PALETTE_COLORS.push(s+", "+s+", "+s)}escapeForHtml(i){return i.replace(/[&<>\"]/gm,r=>r=="&"?"&":r=='"'?""":r=="<"?"<":r==">"?">":"")}linkify(i){return i.replace(t,r=>`<a href="${r}">${r}</a>`)}ansiToHtml(i,r){return this.process(i,r,!0)}ansiToJson(i,r){return r=r||{},r.json=!0,r.clearLine=!1,this.process(i,r,!0)}ansiToText(i){return this.process(i,{},!1)}process(i,r,s){let c=this,d=i.split(/\033\[/),f=d.shift();r==null&&(r={}),r.clearLine=/\r/.test(i);let m=d.map(y=>this.processChunk(y,r,s));if(r&&r.json){let y=c.processChunkJson("");return y.content=f,y.clearLine=r.clearLine,m.unshift(y),r.remove_empty&&(m=m.filter(h=>!h.isEmpty())),m}else m.unshift(f);return m.join("")}processChunkJson(i,r,s){r=typeof r>"u"?{}:r;let c=r.use_classes=typeof r.use_classes<"u"&&r.use_classes,d=r.key=c?"class":"color",f={content:i,fg:null,bg:null,fg_truecolor:null,bg_truecolor:null,isInverted:!1,clearLine:r.clearLine,decoration:null,decorations:[],was_processed:!1,isEmpty:()=>!f.content},m=i.match(/^([!\x3c-\x3f]*)([\d;]*)([\x20-\x2c]*[\x40-\x7e])([\s\S]*)/m);if(!m)return f;f.content=m[4];let y=m[2].split(";");if(m[1]!==""||m[3]!=="m"||!s)return f;let h=this;for(;y.length>0;){let E=y.shift(),x=parseInt(E);if(isNaN(x)||x===0)h.fg=h.bg=null,h.decorations=[];else if(x===1)h.decorations.push("bold");else if(x===2)h.decorations.push("dim");else if(x===3)h.decorations.push("italic");else if(x===4)h.decorations.push("underline");else if(x===5)h.decorations.push("blink");else if(x===7)h.decorations.push("reverse");else if(x===8)h.decorations.push("hidden");else if(x===9)h.decorations.push("strikethrough");else if(x===21)h.removeDecoration("bold");else if(x===22)h.removeDecoration("bold"),h.removeDecoration("dim");else if(x===23)h.removeDecoration("italic");else if(x===24)h.removeDecoration("underline");else if(x===25)h.removeDecoration("blink");else if(x===27)h.removeDecoration("reverse");else if(x===28)h.removeDecoration("hidden");else if(x===29)h.removeDecoration("strikethrough");else if(x===39)h.fg=null;else if(x===49)h.bg=null;else if(x>=30&&x<38)h.fg=e[0][x%10][d];else if(x>=90&&x<98)h.fg=e[1][x%10][d];else if(x>=40&&x<48)h.bg=e[0][x%10][d];else if(x>=100&&x<108)h.bg=e[1][x%10][d];else if(x===38||x===48){let D=x===38;if(y.length>=1){let g=y.shift();if(g==="5"&&y.length>=1){let b=parseInt(y.shift());if(b>=0&&b<=255)if(!c)this.PALETTE_COLORS||h.setupPalette(),D?h.fg=this.PALETTE_COLORS[b]:h.bg=this.PALETTE_COLORS[b];else{let v=b>=16?"ansi-palette-"+b:e[b>7?1:0][b%8].class;D?h.fg=v:h.bg=v}}else if(g==="2"&&y.length>=3){let b=parseInt(y.shift()),v=parseInt(y.shift()),p=parseInt(y.shift());if(b>=0&&b<=255&&v>=0&&v<=255&&p>=0&&p<=255){let l=b+", "+v+", "+p;c?D?(h.fg="ansi-truecolor",h.fg_truecolor=l):(h.bg="ansi-truecolor",h.bg_truecolor=l):D?h.fg=l:h.bg=l}}}}}return h.fg===null&&h.bg===null&&h.decorations.length===0||(f.fg=h.fg,f.bg=h.bg,f.fg_truecolor=h.fg_truecolor,f.bg_truecolor=h.bg_truecolor,f.decorations=h.decorations,f.decoration=h.decorations.slice(-1).pop()||null,f.was_processed=!0),f}processChunk(i,r,s){r=r||{};let c=this.processChunkJson(i,r,s),d=r.use_classes;if(c.decorations=c.decorations.filter(x=>{if(x==="reverse"){c.fg||(c.fg=e[0][7][d?"class":"color"]),c.bg||(c.bg=e[0][0][d?"class":"color"]);let D=c.fg;c.fg=c.bg,c.bg=D;let g=c.fg_truecolor;return c.fg_truecolor=c.bg_truecolor,c.bg_truecolor=g,c.isInverted=!0,!1}return!0}),r.json)return c;if(c.isEmpty())return"";if(!c.was_processed)return c.content;let f=[],m=[],y=[],h={},E=x=>{let D=[],g;for(g in x)x.hasOwnProperty(g)&&D.push("data-"+g+'="'+this.escapeForHtml(x[g])+'"');return D.length>0?" "+D.join(" "):""};return c.isInverted&&(h["ansi-is-inverted"]="true"),c.fg&&(d?(f.push(c.fg+"-fg"),c.fg_truecolor!==null&&(h["ansi-truecolor-fg"]=c.fg_truecolor,c.fg_truecolor=null)):f.push("color:rgb("+c.fg+")")),c.bg&&(d?(f.push(c.bg+"-bg"),c.bg_truecolor!==null&&(h["ansi-truecolor-bg"]=c.bg_truecolor,c.bg_truecolor=null)):f.push("background-color:rgb("+c.bg+")")),c.decorations.forEach(x=>{if(d){m.push("ansi-"+x);return}x==="bold"?m.push("font-weight:bold"):x==="dim"?m.push("opacity:0.5"):x==="italic"?m.push("font-style:italic"):x==="hidden"?m.push("visibility:hidden"):x==="strikethrough"?y.push("line-through"):y.push(x)}),y.length&&m.push("text-decoration:"+y.join(" ")),d?'<span class="'+f.concat(m).join(" ")+'"'+E(h)+">"+c.content+"</span>":'<span style="'+f.concat(m).join(";")+'"'+E(h)+">"+c.content+"</span>"}removeDecoration(i){const r=this.decorations.indexOf(i);r>=0&&this.decorations.splice(r,1)}}return st=n,st}var Se={exports:{}},ln;function Nl(){if(ln)return Se.exports;ln=1;function e(i){if(!i)return"";if(!/\r/.test(i))return i;for(i=i.replace(/\r+\n/gm,`
|
|
23
|
+
`)},consumeEscapeIntoNewline(){const t=e.current;t&&Ho(t)},clearThroughUndoStack(){const t=e.current;t&&Ko(t)},isComposing(){return!1}}}const Wo=200,Qt=24,Go=200;function Uo(e,t){u.useLayoutEffect(()=>{const n=e.current;if(!n)return;const a=()=>{n.style.transition="",n.style.height=""};if(t!==""){n.style.transition="",n.style.height="auto",n.style.height=`${Math.min(n.scrollHeight,Wo)}px`;return}const i=n.offsetHeight;if(i<=Qt){a();return}n.style.height=`${i}px`,n.style.transition=`height ${Go}ms ease`;const r=requestAnimationFrame(()=>{n.style.height=`${Qt}px`});return n.addEventListener("transitionend",a,{once:!0}),()=>{cancelAnimationFrame(r),n.removeEventListener("transitionend",a),a()}},[e,t])}const en=u.forwardRef(function({value:t,onChange:n,onCursorChange:a,onKeyDown:i,onFocus:r,onBlur:s,placeholder:c,placeholderOverlay:d,isPaletteOpen:f,paletteListboxId:m,activeDescendantId:y,onSurfaceChange:h},E){const x=u.useRef(null),D=Nn(),g=u.useRef(null);u.useEffect(()=>{g.current??(g.current=Vo(x)),h(g.current)},[h]),u.useImperativeHandle(E,()=>({focus:()=>{var l;return(l=x.current)==null?void 0:l.focus()},focusUnlessTouch:()=>{var l;D||(l=x.current)==null||l.focus()},focusAt:l=>{const k=x.current;k&&(k.focus(),k.setSelectionRange(l,l))}})),Uo(x,t);const b=u.useCallback(l=>{n(l.target.value),a==null||a(l.target.selectionStart)},[n,a]),v=u.useCallback(()=>{x.current&&(a==null||a(x.current.selectionStart))},[a]),p=t.trim().length>0;return o.jsxs("div",{className:"relative min-h-[24px] flex-1",children:[!p&&d,o.jsx("textarea",{ref:x,value:t,onChange:b,onKeyDown:i,onFocus:r,onBlur:s,onSelect:v,role:"combobox","aria-autocomplete":"list","aria-controls":f?m:void 0,"aria-expanded":f??!1,"aria-activedescendant":f?y:void 0,"aria-label":c,placeholder:d?"":c,className:"block max-h-[200px] min-h-[24px] w-full resize-none bg-transparent py-0.5 text-sm focus:outline-none",rows:1})]})});function Zo({onSteer:e,onStage:t}){return!e&&!t?null:o.jsxs(Rn,{children:[o.jsx(Tn,{asChild:!0,children:o.jsx("button",{type:"button",className:"focus-ring bg-muted text-muted-foreground hover:bg-muted/80 shrink-0 rounded-lg p-1.5 transition-colors max-md:p-2","aria-label":"More ways to send",children:o.jsx(Ja,{className:"size-(--size-icon-sm)"})})}),o.jsxs(zn,{align:"end",children:[e&&o.jsx(dt,{icon:pr,description:"Send it into the task now",onSelect:e,children:"Steer"}),t&&o.jsx(dt,{icon:Ya,description:"Use it next, without interrupting",onSelect:t,children:"Add context"})]})]})}const He={send:{className:"bg-primary text-primary-foreground hover:bg-primary/90",label:"Send message"},stop:{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90 dark:bg-destructive/60",label:"Stop generating"},queue:{className:"bg-muted text-muted-foreground hover:bg-muted/80",label:"Queue message"},update:{className:"bg-primary text-primary-foreground hover:bg-primary/90",label:"Save edit"},cancel:{className:"bg-muted text-muted-foreground hover:bg-muted/80",label:"Cancel edit"},"cancel-upload":{className:"bg-muted text-muted-foreground hover:bg-destructive/90 hover:text-destructive-foreground dark:hover:bg-destructive/60",label:"Cancel upload"},dispatching:{className:"bg-muted text-muted-foreground",label:"Running command"},stopping:{className:"bg-muted text-muted-foreground",label:"Stopping…"}},Jo={send:Ji,stop:$n,queue:ei,update:Qa,cancel:wt,"cancel-upload":Ce,dispatching:Ce,stopping:Ce};function Yo(e,t,n,a,i,r){return i?"dispatching":a?e?"update":"cancel":r?"stopping":t&&e?"queue":t?"stop":n?"cancel-upload":e?"send":null}function Xo(e,t){switch(e){case"send":return t.onSubmit;case"stop":return t.onStop;case"queue":return t.onQueue;case"update":return t.onSaveEdit;case"cancel":return t.onCancelEdit;case"cancel-upload":return t.onCancelUpload;default:return}}function Qo({hasText:e,isStreaming:t,commandPending:n=!1,submitDisabled:a=!1,editingQueueItem:i,queueDepth:r,isTouchOnly:s,onSubmit:c,onStop:d,onQueue:f,onSaveEdit:m,onCancelEdit:y,onCancelUpload:h,onSteer:E,onStage:x,stopPending:D=!1}){const g=Yo(e,t,h!==void 0,i,n,D),b=g==="send"&&a,v=b||g===null?void 0:Xo(g,{onSubmit:c,onStop:d,onQueue:f,onSaveEdit:m,onCancelEdit:y,onCancelUpload:h}),p=g===null?null:g==="send"&&s?Xa:Jo[g],l=g==="dispatching"||g==="stopping";return o.jsxs(o.Fragment,{children:[o.jsx(xe,{children:t&&e&&!D&&o.jsx(G.button,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.15},whileHover:{scale:1.05},whileTap:{scale:.97},onClick:d,type:"button",className:"bg-destructive text-destructive-foreground hover:bg-destructive/90 dark:bg-destructive/60 shrink-0 rounded-lg p-1.5 transition-colors max-md:p-2","aria-label":"Stop generating",children:o.jsx($n,{className:"size-(--size-icon-sm)"})})}),g==="queue"&&o.jsx(Zo,{onSteer:E,onStage:x}),o.jsxs("div",{className:"relative shrink-0",children:[g==="cancel-upload"&&o.jsx("span",{role:"status",className:"sr-only",children:"Uploading attachment"}),l&&g?o.jsxs("div",{role:"status",className:L("rounded-lg p-1.5 max-md:p-2",He[g].className),children:[o.jsx(Ce,{}),o.jsx("span",{className:"sr-only",children:He[g].label})]}):g&&p?o.jsx(G.button,{animate:{opacity:b?.5:1,scale:1},initial:!1,transition:{duration:.15},whileHover:b?void 0:{scale:1.05},whileTap:b?void 0:{scale:.97},onClick:v,disabled:b,type:"button",className:L("focus-ring rounded-lg p-1.5 transition-colors max-md:p-2",He[g].className,b&&"pointer-events-none"),"aria-label":He[g].label,children:o.jsx(p,{className:"size-(--size-icon-sm)"})}):o.jsx("div",{"aria-hidden":"true","data-testid":"action-slot-spacer",className:"p-1.5 max-md:p-2",children:o.jsx("div",{className:"size-(--size-icon-sm)"})}),r>0&&g==="queue"&&o.jsx("span",{className:"bg-foreground text-background text-3xs absolute -top-1 -right-1 flex h-4 w-4 items-center justify-center rounded-full font-medium",children:r})]})]})}const es=u.lazy(()=>Sn(()=>import("./LexicalField-CLd77PuB.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]))),ts=u.forwardRef(function({value:t,onChange:n,onSubmit:a,isStreaming:i,isUploading:r=!1,onCancelUpload:s,commandPending:c=!1,editingQueueItem:d=!1,editingPosition:f,queueDepth:m=0,onStop:y,stopPending:h=!1,onQueue:E,onSteer:x,onStage:D,onSaveEdit:g,onCancelEdit:b,onEscape:v,onClear:p,isPaletteOpen:l,paletteHasResults:k,tabPicks:_,onArrowUp:C,onArrowDown:R,onCommandSelect:w,activeDescendantId:j,paletteListboxId:A,onCursorChange:O,onAttach:$,placeholder:z="Send a message…",placeholderOverlay:I,onQueueNavigateUp:P,onQueueNavigateDown:H,contextKey:re,onClearArmedChange:N,queueHasItems:te=!1,canSubmit:Q=!0,canSubmitReason:J,richText:De=!1,mentionSubjects:oe},Y){const ee=u.useRef(null),X=u.useRef(null),[se,he]=u.useState(!1),[ve,be]=u.useState(qo),le=Nn();u.useImperativeHandle(Y,()=>({focus:()=>{var V;return(V=ee.current)==null?void 0:V.focus()},focusUnlessTouch:()=>{var V;return(V=ee.current)==null?void 0:V.focusUnlessTouch()},focusAt:V=>{var je;return(je=ee.current)==null?void 0:je.focusAt(V)}}));const ie=u.useRef(le);u.useEffect(()=>{var V;ie.current||ti()||(V=ee.current)==null||V.focus()},[]);const S=u.useCallback(()=>{var V;(V=ee.current)==null||V.focusAt(t.length),y==null||y()},[y,t.length]),{handleKeyDown:U,clearArmed:me}=Po({surface:ve,value:t,isStreaming:i,isTouchOnly:le,isUploading:r,onCancelUpload:s,commandPending:c,canSubmit:Q,editingQueueItem:d,isPaletteOpen:l,paletteHasResults:k,tabPicks:_,queueHasItems:te,onSubmit:a,onStop:y,onEscape:v,onClear:p,onArrowUp:C,onArrowDown:R,onCommandSelect:w,onQueue:E,onSteer:x,onStage:D,onSaveEdit:g,onCancelEdit:b,onQueueNavigateUp:P,onQueueNavigateDown:H,contextKey:re}),ce=u.useCallback(()=>he(!0),[]),ye=u.useCallback(()=>{he(!1),l&&(v==null||v())},[l,v]),_e={ref:ee,value:t,onChange:n,onCursorChange:O,onKeyDown:U,onFocus:ce,onBlur:ye,placeholder:z,placeholderOverlay:I,isPaletteOpen:l,paletteHasResults:k,paletteListboxId:A,activeDescendantId:j,onSurfaceChange:be,mentionSubjects:oe},ne=t.trim().length>0,we=p!==void 0&≠return u.useEffect(()=>{N==null||N(me&&we)},[me,we,N]),o.jsxs("div",{className:"flex flex-col gap-1.5",children:[!Q&&J&&o.jsx("div",{role:"status",className:"text-muted-foreground px-1 text-xs",children:J}),d&&o.jsx("div",{className:"text-muted-foreground px-0.5 text-xs",children:f!==void 0&&m>0?`Editing message ${f} of ${m}`:"Editing message"}),o.jsxs("div",{className:L("border-input bg-background flex items-end gap-1.5 rounded-md border p-1.5 shadow-xs transition-[color,box-shadow]",se&&"border-ring ring-ring ring-[1px]",d&&"border-primary/40",!$&&"pl-3"),children:[$&&o.jsxs(o.Fragment,{children:[o.jsx("input",{ref:X,type:"file",className:"hidden",multiple:!0,onChange:V=>{const je=Array.from(V.target.files??[]);je.length>0&&$(je),V.target.value=""}}),o.jsx("button",{type:"button",onClick:()=>{var V;return(V=X.current)==null?void 0:V.click()},className:"focus-ring text-muted-foreground hover:text-foreground flex shrink-0 items-center justify-center rounded-md px-1.5 py-1 transition-colors disabled:opacity-50","aria-label":"Attach file",children:o.jsx(Qi,{className:"size-4"})})]}),De?o.jsx(u.Suspense,{fallback:o.jsx(en,{..._e}),children:o.jsx(es,{..._e})}):o.jsx(en,{..._e}),p&&o.jsx(G.button,{animate:{opacity:ne?.5:0,scale:ne?1:.8},transition:{duration:.15},whileHover:ne?{opacity:1}:void 0,onClick:p,disabled:!ne,type:"button",className:L("focus-ring text-muted-foreground hover:text-foreground shrink-0 rounded-lg p-1 transition-colors",!ne&&"pointer-events-none"),"aria-label":"Clear message",children:o.jsx(wt,{className:"size-(--size-icon-sm)"})}),o.jsx(Qo,{hasText:ne,isStreaming:i,onCancelUpload:r?s:void 0,commandPending:c,submitDisabled:!Q,editingQueueItem:d,queueDepth:m,isTouchOnly:le,onSubmit:a,onStop:S,stopPending:h,onQueue:E,onSteer:x,onStage:D,onSaveEdit:g,onCancelEdit:b})]})]})});function ns({children:e,className:t}){return o.jsx("div",{className:L("absolute right-0 bottom-full left-0 mb-2",t),children:e})}function tn(e){return e.type.startsWith("image/")}const nn="This file didn’t upload";function as({files:e,onRemove:t,onRetry:n,onCancel:a}){const i=e.filter(s=>tn(s.file)).map(s=>s.id).join(" "),r=u.useMemo(()=>{const s=new Map;for(const c of e)tn(c.file)&&s.set(c.id,URL.createObjectURL(c.file));return s},[i]);return u.useEffect(()=>()=>{for(const s of r.values())URL.revokeObjectURL(s)},[r]),o.jsx("div",{className:"flex flex-wrap gap-1.5 px-1 pb-1.5",children:o.jsx(xe,{children:e.map(s=>{const c=r.get(s.id),d=s.status==="error",f=s.status==="uploading"&&a!==void 0;return o.jsxs(G.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},transition:{duration:.15},className:L("flex items-center gap-1 rounded-md px-2 py-1 text-xs",d?"bg-destructive/10 border-destructive/40 border":"bg-muted"),children:[s.status==="uploading"?o.jsx(Ce,{size:"xs",className:"text-muted-foreground"}):d?o.jsx(ni,{className:"text-destructive size-(--size-icon-xs) shrink-0"}):c?o.jsx("img",{src:c,alt:"",className:"size-5 shrink-0 rounded object-cover"}):o.jsx(Ft,{className:"text-muted-foreground size-(--size-icon-xs)"}),o.jsx("span",{className:"max-w-32 truncate",children:s.file.name}),s.status==="uploading"&&o.jsxs("span",{className:"text-muted-foreground tabular-nums",children:[s.progress,"%"]}),d&&o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"text-destructive max-w-44 truncate",title:s.error??nn,children:s.error??nn}),n&&o.jsx("button",{type:"button",onClick:()=>n(s.id),className:"text-foreground ml-0.5 shrink-0 rounded-sm font-medium underline decoration-dotted underline-offset-2","aria-label":`Try uploading ${s.file.name} again`,children:"Try again"})]}),o.jsx("button",{type:"button",onClick:f?a:()=>t(s.id),className:"text-muted-foreground hover:text-foreground -mr-0.5 ml-0.5 shrink-0 rounded-sm p-0.5","aria-label":f?`Cancel upload of ${s.file.name}`:`Remove ${s.file.name}`,children:o.jsx(wt,{className:"size-3"})})]},s.id)})})})}function is(){const e=Ue();return o.jsx(G.div,{initial:e?!1:{opacity:0,y:3},animate:{opacity:1,y:0},transition:{duration:.12,ease:"easeOut"},"aria-hidden":"true","data-testid":"clear-armed-hint",className:"bg-popover text-muted-foreground shadow-soft pointer-events-none mt-1.5 ml-auto w-fit rounded-md border px-2 py-1 text-xs",children:"Press Esc again to clear"})}const ze={Root:Io,Input:ts,OverlayLane:ns,Attachments:as,ClearArmedHint:is};function rs({value:e,onChange:t,onSubmit:n,inputRef:a,head:i,mentionPicker:r,overlays:s,queue:c,aboveInput:d,asks:f,footer:m,children:y,className:h,onPathDropped:E,input:x}){const{capabilities:D,target:g}=Be();if(g===null)throw new Error("<Conversation.Composer> needs a target. A host that draws a composer has to say where its words go — pass `target` to <Conversation.Root>.");const[b,v]=u.useState(!1),p=D.attachments?g.attachments:null,l=(p==null?void 0:p.staged)??[],k=(p==null?void 0:p.hasFailed)===!0,_=g.canSend&&!k&&(x.canSubmit??!0),C=k?void 0:g.canSend?x.canSubmitReason:g.canSendReason,R=o.jsxs(o.Fragment,{children:[o.jsxs(ze.OverlayLane,{children:[D.mentions&&r,s,b&&o.jsx(ze.ClearArmedHint,{})]}),p!==null&&l.length>0&&o.jsx(ze.Attachments,{files:[...l],onRemove:p.remove,onRetry:p.retry,onCancel:p.cancel}),g.queue!==void 0&&c,d,o.jsx(ze.Input,{...x,ref:a,value:e,onChange:t,onSubmit:n,placeholder:x.placeholder??g.placeholder,canSubmit:_,...C===void 0?{}:{canSubmitReason:C},...p===null?{}:{onAttach:p.add,...p.holdsSendWhileUploading?{isUploading:p.isUploading,onCancelUpload:p.cancel}:{}},onClearArmedChange:v}),m]});return o.jsxs(ze.Root,{className:h,...p===null?{}:{onFilesDropped:p.add},...E===void 0?{}:{onPathDropped:E},children:[i,f===void 0?R:o.jsx(xe,{mode:"wait",children:f!==null?o.jsx(G.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},children:f},"interactive"):o.jsx(G.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},children:R},"normal")}),y]})}function os({asChild:e,children:t,className:n}){const a=e===!0?jt:"div";return o.jsx(a,{"data-slot":"conversation-footer",className:L(n),children:t})}function ss({surface:e,capabilities:t,target:n,density:a="comfortable",anchor:i="corner",children:r}){const s=u.useMemo(()=>({surface:e,capabilities:t,target:n??null,density:a,anchor:i}),[e,t,n,a,i]);return o.jsx(Pn.Provider,{value:s,children:r})}const an=1e3;function ls(e,t=Date.now){const n=Date.parse(e)+qn,[a,i]=u.useState(()=>t());return u.useEffect(()=>{const r=()=>i(t());let s,c;const d=n-t();return d>0?c=setTimeout(()=>{i(Math.max(t(),n)),s=setInterval(r,an)},d):s=setInterval(r,an),()=>{clearTimeout(c),clearInterval(s)}},[n,t]),Ar(e,a)}function sa(e){return e?"This room is gone, or you no longer have access to it.":"New messages aren’t arriving. You can still send; anything unsent will say so."}function cs(e){return e?"This room is no longer available":"Reconnecting. You can still send"}function us(e,t){switch(e.kind){case"ask":return"";case"stalled":return sa(t);case"presence":case"held":return e.sentence;case"silent-finish":return e.sentence;case"turn-waiting":return e.waitingType==="approval"?"Waiting for your approval":"Waiting for your answer";case"turn-progress":case"turn-system":return e.message;case"turn-streaming":return"Working";case"turn-complete":return"";case"empty":return""}}function rn(e){switch(e.kind){case"ask":return`ask:${e.ask.interaction.id}`;case"presence":return`presence:${e.sentence}`;case"held":return`held:${e.sentence}`;case"silent-finish":return`silent-finish:${e.sentence}`;case"turn-waiting":return`turn-waiting:${e.waitingType}`;case"turn-progress":case"turn-system":return`${e.kind}:${e.message}`;case"turn-streaming":return`turn-streaming:${e.verbKey}`;default:return e.kind}}const ds={room:"room-presence",thread:"thread-presence",session:"session-presence"},ps={room:"room-held",thread:"thread-held",session:"session-held"};function ms({state:e,onRetry:t,unavailable:n=!1,faces:a,reducedMotion:i=!1,scope:r="room"}){switch(e.kind){case"ask":return o.jsx(fs,{state:e,reducedMotion:i});case"stalled":return o.jsx(gs,{onRetry:t,unavailable:n});case"presence":return o.jsx(xs,{state:e,faces:a,reducedMotion:i,scope:r});case"held":return o.jsx(hs,{state:e,faces:a,scope:r});case"silent-finish":return o.jsx(vs,{state:e});case"turn-waiting":return o.jsx(bs,{state:e});case"turn-progress":return o.jsx(ys,{state:e,reducedMotion:i});case"turn-system":return o.jsx(ks,{state:e});case"turn-streaming":return o.jsx(Ds,{state:e,reducedMotion:i});case"turn-complete":return o.jsx(_s,{state:e});case"empty":return null}}function fs({state:e,reducedMotion:t}){return o.jsxs("span",{"data-testid":"lane-ask",className:"flex min-w-0 items-center gap-2",children:[o.jsx($e,{signal:"needs-you",reducedMotion:t}),o.jsx("span",{className:"text-foreground truncate",children:e.headline}),e.count>1&&o.jsxs("span",{"aria-hidden":"true",className:"text-muted-foreground shrink-0 tabular-nums",children:["+",e.count-1]}),o.jsx("span",{className:"text-status-warning-fg shrink-0 font-medium",children:"Answer"})]})}function gs({onRetry:e,unavailable:t}){const n=sa(t);return o.jsxs("span",{"data-testid":"room-stalled","data-unavailable":t?"true":void 0,className:"flex min-w-0 items-center gap-2",children:[o.jsx($e,{signal:"error",reducedMotion:!0}),o.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground truncate sm:hidden",children:cs(t)}),o.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground hidden truncate sm:inline",title:n,children:n}),e!==void 0&&o.jsx("button",{type:"button",onClick:e,className:"focus-ring text-muted-foreground hover:text-foreground shrink-0 rounded underline underline-offset-2",children:t?"Try again":"Reconnect"})]})}function xs({state:e,faces:t,reducedMotion:n,scope:a}){return o.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[o.jsx($e,{signal:"working",reducedMotion:n}),t,o.jsxs("span",{"data-testid":ds[a],"data-late":e.late?"true":void 0,className:"text-muted-foreground flex min-w-0 items-center",children:[o.jsx("span",{className:"truncate",children:e.line}),o.jsx(la,{since:e.since})]})]})}function hs({state:e,faces:t,scope:n}){return o.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[o.jsx($e,{signal:"working",reducedMotion:!0}),t,o.jsxs("span",{"data-testid":ps[n],className:"text-muted-foreground flex min-w-0 items-center",children:[o.jsx("span",{className:"truncate",children:e.sentence}),o.jsx(la,{since:e.since})]})]})}function vs({state:e}){return o.jsx("span",{"data-testid":"lane-silent-finish",className:"text-muted-foreground/50 flex min-w-0 items-center gap-2 opacity-60",children:o.jsx("span",{className:"truncate",children:e.sentence})})}function bs({state:e}){const t=e.waitingType==="approval"?ii:ri;return o.jsxs("span",{"data-testid":"lane-waiting",className:"flex min-w-0 items-center gap-2",children:[o.jsx(t,{"aria-hidden":"true",className:"text-status-warning-fg size-3 shrink-0"}),o.jsx("span",{className:"text-status-warning-fg truncate",children:e.waitingType==="approval"?"Waiting for your approval":"Waiting for your answer"}),o.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground/70 shrink-0 tabular-nums",children:e.elapsed})]})}function ys({state:e,reducedMotion:t}){return o.jsxs("span",{"data-testid":"lane-progress","data-determinate":e.determinate,className:"flex min-w-0 flex-1 items-center gap-2",children:[o.jsx("span",{className:"text-muted-foreground truncate",children:e.message}),o.jsx("span",{"aria-hidden":"true",className:"bg-muted/60 relative h-0.5 w-16 shrink-0 overflow-hidden rounded-full",children:e.determinate?o.jsx(G.span,{className:"bg-muted-foreground/50 absolute inset-y-0 left-0 block rounded-full",initial:!1,animate:{width:`${e.percent??0}%`},transition:t?{duration:0}:{duration:.3,ease:"easeOut"}}):o.jsx(G.span,{className:"bg-muted-foreground/50 absolute inset-y-0 block w-1/3 rounded-full",animate:t?void 0:{x:["-100%","400%"]},transition:{duration:1.4,ease:"easeInOut",repeat:1/0}})})]})}function ks({state:e}){return o.jsxs("span",{"data-testid":"lane-system",className:"flex min-w-0 items-center gap-2",children:[o.jsx(ai,{"aria-hidden":"true",className:"text-muted-foreground/60 size-3 shrink-0"}),o.jsx("span",{className:"text-muted-foreground/70 truncate",children:e.message})]})}function Ds({state:e,reducedMotion:t}){return o.jsxs("span",{"data-testid":"lane-streaming","data-bypass":e.isBypass?"true":void 0,className:"flex min-w-0 items-center gap-2",children:[e.isBypass?o.jsx("span",{"aria-hidden":"true",className:"text-status-warning-fg shrink-0 font-bold",children:"☠"}):o.jsx($e,{signal:"working",reducedMotion:t}),o.jsx("span",{"aria-hidden":"true",className:L("truncate",e.isBypass?"text-status-warning-fg":"text-muted-foreground"),children:e.verb}),o.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground/70 shrink-0 tabular-nums",children:e.elapsed}),o.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground/60 shrink-0",children:e.tokens})]})}function _s({state:e}){return o.jsxs("span",{"data-testid":"lane-complete",className:"text-muted-foreground/50 flex min-w-0 items-center gap-2 opacity-60",children:[o.jsx("span",{className:"truncate",children:e.elapsed}),o.jsx("span",{"aria-hidden":"true",children:"·"}),o.jsx("span",{className:"shrink-0",children:e.tokens})]})}function $e({signal:e,reducedMotion:t}){return o.jsx("span",{"aria-hidden":"true","data-lane-dot":e,className:L("size-1.5 shrink-0 rounded-full",si[e],e==="working"&&!t&&oi)})}function la({since:e}){const t=ls(e);return t===null?null:o.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground/70 shrink-0 tabular-nums",children:` · ${t}`})}const ws=.16,js={room:"room-presence-announcer",thread:"thread-presence-announcer",session:"session-lane-announcer"};function Es({state:e,scope:t="room",onRetry:n,unavailable:a=!1,faces:i,peek:r,onPeekOpenChange:s,peekLabel:c="Show who is working",heldPeekLabel:d="Show what is waiting",askCard:f,reducedMotionOverride:m}){const[y,h]=u.useState(!1),E=u.useRef(null),x=Ue()===!0,D=m??x,g=us(e,a),b=e.kind==="empty",v=(e.kind==="presence"||e.kind==="held")&&r!==void 0,p=e.kind==="ask"&&f!==void 0,l=v||p,k=p?f:r,_=p?"Answer this":e.kind==="held"?d:c;y&&!l&&h(!1);const C=y&&l,R=u.useRef(!1);u.useEffect(()=>{var O,$;if(R.current===C)return;const A=!C&&(((O=E.current)==null?void 0:O.contains(document.activeElement))===!0||document.activeElement===document.body);R.current=C,s==null||s(C),A&&(($=E.current)==null||$.focus())},[C,s]);const w=o.jsx(ms,{state:e,onRetry:n,unavailable:a,faces:i,reducedMotion:D,scope:t}),j=l?o.jsxs(li,{open:C,onOpenChange:h,children:[o.jsx(ci,{asChild:!0,children:o.jsx("button",{type:"button","aria-label":_,className:L("focus-ring flex min-w-0 items-center rounded text-left","hover:bg-accent/40 focus-visible:bg-accent/40"),children:w})}),o.jsxs(ui,{side:"top",align:"start",onOpenAutoFocus:p?void 0:A=>A.preventDefault(),className:"w-88 p-0",children:[o.jsx(di,{children:_}),k]})]}):w;return o.jsxs("div",{ref:E,"data-slot":"live-lane","data-lane-scope":t,tabIndex:-1,"data-lane-state":e.kind,"data-lane-motion":D?"off":"on",className:"flex h-6 shrink-0 items-center gap-2 overflow-hidden px-3 text-xs",children:[o.jsx("span",{"data-testid":js[t],role:"status","aria-live":"polite","aria-atomic":"true",className:"sr-only",children:g}),D?o.jsx("div",{"aria-hidden":b?"true":void 0,className:"flex min-w-0 flex-1 items-center",children:j},rn(e)):o.jsx(xe,{mode:"wait",initial:!1,children:o.jsx(G.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:ws},"aria-hidden":b?"true":void 0,className:"flex min-w-0 flex-1 items-center",children:j},rn(e))})]})}const Fs=1e3,Cs={working:"working",working_late:"still working",held:"waiting to start"};function As({rows:e,onScrollToRow:t,onOpenSession:n,onOpenRoom:a,onAnswerFirst:i,promoted:r,onStopAll:s,stopping:c=!1,onStopAgent:d,stoppingAgents:f}){const m=d!==void 0,y=e.length>1&&s!==void 0,h=u.useRef(new Map),E=u.useRef(null),x=u.useRef(e);return u.useEffect(()=>{var p;const D=x.current;x.current=e;const g=E.current;if(g===null||e.some(l=>l.authorId===g)||(E.current=null,document.activeElement!==document.body))return;const b=D.findIndex(l=>l.authorId===g),v=e[Math.min(Math.max(b,0),e.length-1)];v!==void 0&&((p=h.current.get(v.authorId))==null||p.focus())},[e]),o.jsxs("div",{"data-slot":"live-peek","data-testid":"live-peek",className:"flex flex-col",children:[o.jsx("ul",{className:"divide-border divide-y",children:e.map(D=>o.jsxs("li",{"data-testid":"live-peek-row",className:"flex gap-2.5 px-3 py-2.5",children:[o.jsx(Hn,{author:D.author,className:"mt-0.5 shrink-0"}),o.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[o.jsxs("p",{className:"flex min-w-0 items-center gap-1.5 text-xs",children:[o.jsx("span",{className:"text-foreground truncate font-medium",children:D.author.displayName}),o.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground/50",children:"·"}),o.jsx("span",{className:"text-muted-foreground shrink-0",children:Cs[D.state]}),o.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground/50",children:"·"}),o.jsx(Ns,{since:D.since})]}),D.doing!==null&&o.jsx("p",{"data-testid":"live-peek-doing",className:"text-muted-foreground truncate text-xs",children:D.doing}),D.replyingTo!==null&&t!==void 0&&o.jsx("button",{type:"button","data-testid":"live-peek-replying-to",onClick:()=>t(D.replyingTo.rowId),className:"focus-ring text-muted-foreground hover:text-foreground truncate rounded text-left text-xs underline underline-offset-2",children:`Replying to “${D.replyingTo.excerpt}”`}),o.jsxs("div",{className:"mt-0.5 flex items-center gap-2",children:[D.state!=="held"&&D.sessionId!==null&&n!==void 0&&o.jsxs(ge,{type:"button",variant:"outline",size:"sm","data-testid":"live-peek-open-session",onClick:()=>n(D.sessionId),className:"h-7 gap-1 px-2 text-xs",children:["Open its chat",o.jsx(zt,{"aria-hidden":"true",className:"size-3"})]}),D.state==="held"&&D.behind!=null&&D.behind.title!==null&&a!==void 0&&o.jsxs(ge,{type:"button",variant:"outline",size:"sm","data-testid":"live-peek-open-room",onClick:()=>a(D.behind.roomId),className:"h-7 gap-1 px-2 text-xs",children:["Open where it’s working",o.jsx(zt,{"aria-hidden":"true",className:"size-3"})]}),D.state==="held"&&D.othersWaiting===!0&&i!==void 0&&((r==null?void 0:r.has(D.authorId))===!0?o.jsx("span",{"data-testid":"live-peek-next-up",className:"text-muted-foreground text-xs",children:"Next up here"}):o.jsx(ge,{type:"button",variant:"ghost",size:"sm","data-testid":"live-peek-answer-first",onClick:()=>i(D.authorId),className:"h-7 px-2 text-xs",children:"Answer here first"})),m&&o.jsx(ge,{type:"button",variant:"ghost",size:"sm","data-testid":"live-peek-stop",disabled:(f==null?void 0:f.has(D.authorId))===!0,onClick:()=>d(D.authorId),onFocus:()=>E.current=D.authorId,ref:g=>{g===null?h.current.delete(D.authorId):h.current.set(D.authorId,g)},"aria-label":`Stop ${D.author.displayName}`,className:"h-7 px-2 text-xs",children:"Stop"})]})]})]},D.authorId))}),y&&o.jsx("div",{className:"border-border border-t p-2",children:o.jsxs(ge,{type:"button",variant:"ghost",size:"sm","data-testid":"live-peek-stop-all",disabled:c,onClick:s,className:"h-auto w-full flex-col items-start gap-0.5 px-2 py-1.5 text-xs",children:[o.jsx("span",{children:"Stop everything in this room"}),o.jsx("span",{className:"text-muted-foreground font-normal",children:`Stops all ${e.length}`})]})})]})}function Ns({since:e}){const[t,n]=u.useState(()=>Date.now());return u.useEffect(()=>{const a=setInterval(()=>n(Date.now()),Fs);return()=>clearInterval(a)},[e]),o.jsx("span",{className:"text-muted-foreground shrink-0 tabular-nums",children:En(Math.max(0,t-Date.parse(e)))})}function Rs(e,t,n){const a=u.useRef(null),i=u.useCallback((r,s)=>{const c=Number(s.getAttribute("aria-posinset")),d=r==="next"?c+1:c-1;if(!Number.isFinite(d)||d<1)return;let f=0;const m=e.findIndex(y=>y.kind==="message"&&++f===d);m!==-1&&(a.current=d,t.scrollToIndex(m,{align:r==="next"?"end":"start"}))},[e,t]);return u.useEffect(()=>{var c;const r=a.current;if(r===null)return;const s=(c=n.current)==null?void 0:c.querySelector(`[${Ct}][aria-posinset="${r}"]`);s!=null&&(a.current=null,s.focus())}),i}function Ts(e){const{conversationId:t,rows:n,virtualizer:a,landOn:i,landingReady:r,resumeRow:s,landOnRow:c,onTopRow:d}=e,[f,m]=u.useState(!1);u.useLayoutEffect(()=>{m(!0)},[]);const y=u.useRef(null),[h,E]=u.useState(!1),[x,D]=u.useState(null),[g,b]=u.useState(null),v=u.useRef(null);u.useLayoutEffect(()=>{if(!f||!r||n.length===0)return;const l=c==null?void 0:c(),k=y.current!==t;if(!k&&l===void 0)return;if(y.current=t,k&&(v.current=null),E(!0),l!==void 0){const R=n.findIndex(w=>w.id===l);if(R!==-1){D("requested"),b(l),a.scrollToIndex(R,{align:"center"});return}}if(!k)return;b(null);const _=s==null?void 0:s();if(_!==void 0){const R=n.findIndex(w=>w.id===_);if(R!==-1){D("remembered"),a.scrollToIndex(R,{align:"start"});return}}const C=i==="unread"?n.findIndex(R=>R.kind==="unread-divider"):-1;if(C===-1){D(_===void 0?"end":"end-row-gone"),a.scrollToEnd();return}D("unread"),a.scrollToIndex(Math.max(0,C-1),{align:"start"})},[f,r,t,n,a,i,s,c]);const p=u.useCallback((l,k)=>{var j;const _=(l==null?void 0:l.scrollTop)??0,C=a.getVirtualItems().find(A=>A.end>_),R=C===void 0||(j=n[C.index])==null?void 0:j.id,w=k?void 0:R;w!==v.current&&(v.current=w,d==null||d(w))},[a,n,d]);return{landed:h,landedOn:x,landedRow:g,reportTopRow:p}}function zs(e,t,n){const a=u.useCallback(r=>{var s;return((s=e[r])==null?void 0:s.id)??r},[e]);return er({count:e.length,getScrollElement:()=>t.current,estimateSize:()=>80,overscan:5,getItemKey:a,measureElement:(r,s,c)=>{var h;const d=(h=s==null?void 0:s.borderBoxSize)==null?void 0:h[0],f=d?Math.round(d.blockSize):r.getBoundingClientRect().height;if(f>0)return f;const m=c.indexFromElement(r),y=c.options.getItemKey(m);return c.itemSizeCache.get(y)??c.options.estimateSize(m)},anchorTo:"end",followOnAppend:!0,scrollEndThreshold:64,onChange:r=>{r.isScrolling||n==null||n()}})}const Ss=64;function Is(e){const{conversationId:t,rowCount:n}=e,a=u.useRef(null),i=u.useRef(!0),[r,s]=u.useState(!0),[c,d]=u.useState(!1),f=u.useRef(t),m=u.useCallback(()=>{const x=a.current;if(!x)return;const D=x.scrollHeight-x.scrollTop-x.clientHeight<=Ss;i.current=D,s(g=>g===D?g:D),D&&d(!1)},[]),y=u.useCallback(x=>{a.current=x},[]);u.useEffect(()=>{if(f.current===t)return;f.current=t,i.current=!0,s(!0),d(!1);const x=a.current;x&&(x.scrollTop=x.scrollHeight)},[t]);const h=u.useRef(n);u.useEffect(()=>{const x=h.current;h.current=n,n>x&&!i.current&&d(!0)},[n]);const E=u.useCallback(x=>{const D=a.current;D&&D.scrollTo({top:D.scrollHeight,behavior:(x==null?void 0:x.behavior)??"auto"}),i.current=!0,s(!0),d(!1)},[]);return{scrollRef:y,onScroll:m,isAtBottom:r,hasNewRows:c,atBottomRef:i,scrollToBottom:E}}const Os=800,on=24;function Ls({scrollRef:e}){const t=u.useRef(null),n=u.useRef(null),a=u.useRef(null),[i,r]=u.useState(!1),s=u.useRef(!1),c=u.useRef(!1),d=u.useRef(0),f=u.useRef(0),m=u.useCallback(()=>{a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{!s.current&&!c.current&&r(!1)},Os)},[]),y=u.useCallback(()=>{r(!0),m()},[m]),h=u.useCallback(()=>{c.current=!0,y()},[y]),E=u.useCallback(()=>{c.current=!1,m()},[m]),x=u.useCallback(()=>{const b=e.current,v=t.current,p=n.current;if(!b||!v||!p)return;const{scrollTop:l,scrollHeight:k,clientHeight:_}=b;if(k<=_){v.style.display="none";return}v.style.display="";const C=p.clientHeight,R=_/k,w=Math.max(R*C,on),j=C-w,O=l/(k-_)*j;v.style.height=`${w}px`,v.style.transform=`translateY(${O}px)`},[e]);u.useEffect(()=>{const b=e.current;if(!b)return;const v=()=>{y(),x()};return b.addEventListener("scroll",v,{passive:!0}),x(),()=>b.removeEventListener("scroll",v)},[e,y,x]);const D=u.useCallback(b=>{if(b.target===t.current)return;const v=e.current,p=n.current;if(!v||!p)return;const l=p.getBoundingClientRect(),k=(b.clientY-l.top)/l.height;v.scrollTop=k*(v.scrollHeight-v.clientHeight)},[e]),g=u.useCallback(b=>{var l;b.preventDefault(),b.stopPropagation(),s.current=!0,d.current=b.clientY,f.current=((l=e.current)==null?void 0:l.scrollTop)??0;const v=k=>{const _=e.current,C=n.current;if(!_||!C)return;const R=k.clientY-d.current,w=C.clientHeight,j=_.clientHeight/_.scrollHeight,A=Math.max(j*w,on),O=w-A,$=_.scrollHeight-_.clientHeight,z=R/O*$;_.scrollTop=f.current+z},p=()=>{s.current=!1,document.removeEventListener("pointermove",v),document.removeEventListener("pointerup",p),m()};document.addEventListener("pointermove",v),document.addEventListener("pointerup",p)},[e,m]);return o.jsx("div",{ref:n,role:"presentation",onClick:D,onPointerEnter:h,onPointerLeave:E,style:{top:"var(--conversation-thumb-top, 0px)"},className:"pointer-events-auto absolute right-0 bottom-0 z-10 w-2.5",children:o.jsx("div",{ref:t,onPointerDown:g,className:"bg-border hover:bg-foreground/40 absolute right-0.5 w-1.5 cursor-pointer rounded-full transition-[opacity,background-color] duration-200",style:{opacity:i?1:0}})})}function Bs({hasNewRows:e,isAtBottom:t,hasRows:n,onJump:a}){return o.jsxs(o.Fragment,{children:[o.jsx(xe,{children:e&&!t&&o.jsxs(G.button,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},exit:{opacity:0,y:4},transition:{duration:.2},onClick:a,"data-slot":"conversation-new-messages","data-testid":"conversation-new-messages",className:"bg-foreground text-background hover:bg-foreground/90 absolute bottom-4 left-1/2 z-10 -translate-x-1/2 cursor-pointer rounded-full px-3 py-1.5 text-xs font-medium shadow-sm transition-colors",children:["New messages",o.jsx("span",{role:"status","aria-live":"polite",className:"sr-only",children:"New messages"})]})}),o.jsx(xe,{children:!t&&n&&o.jsx(G.button,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:10},transition:{duration:.15},onClick:a,"data-slot":"conversation-jump-to-latest","data-testid":"conversation-jump-to-latest",className:"bg-background absolute right-4 bottom-4 rounded-full border p-2 shadow-sm transition-shadow hover:shadow-md","aria-label":"Scroll to bottom",children:o.jsx(pi,{className:"size-(--size-icon-md)"})})})]})}const $s=2200;function Ms(e){return e===null?"auto":e.scrollHeight-e.scrollTop-e.clientHeight<=e.clientHeight?"smooth":"auto"}function Ps({conversationId:e,label:t,rows:n,renderRow:a,onOpenThread:i,domIdOf:r,landOn:s="end",landingReady:c=!0,resumeRow:d,landOnRow:f,onTopRow:m,pending:y,viewerAuthorId:h,loading:E,empty:x,transcriptAnnouncement:D,approvalAnnouncement:g,onReachedBottom:b,busy:v,className:p,"data-testid":l,feedTestId:k,ref:_}){var ie;const{capabilities:C}=Be(),R=u.useRef(null),w=y??[],j=Is({conversationId:e,rowCount:n.length+w.length}),{scrollRef:A,atBottomRef:O}=j,$=u.useCallback(S=>{R.current=S,A(S)},[A]),z=u.useRef(null),I=u.useRef(!1),P=u.useCallback(()=>{var S;I.current&&((S=z.current)==null||S.call(z,R.current,O.current))},[O]),H=zs(n,R,P),{landed:re,landedOn:N,landedRow:te,reportTopRow:Q}=Ts({conversationId:e,rows:n,virtualizer:H,landOn:s,landingReady:c&&E==null,...d===void 0?{}:{resumeRow:d},...f===void 0?{}:{landOnRow:f},...m===void 0?{}:{onTopRow:m}});u.useLayoutEffect(()=>{z.current=Q,I.current=re});const J=u.useCallback(()=>{j.onScroll(),Q(R.current,O.current)},[j,Q,O]),De=H.isAtEnd();u.useEffect(()=>{re&&De&&(b==null||b())},[re,De,b]);const oe=Rs(n,H,R),Y=u.useCallback(S=>{const U=document.getElementById(S);return U===null?!1:(U.scrollIntoView({block:"center"}),U.focus({preventScroll:!0}),!0)},[]),ee=u.useRef(null),X=u.useRef(void 0),se=u.useCallback(()=>{var S;X.current!==void 0&&(clearTimeout(X.current),X.current=void 0),(S=ee.current)==null||S.removeAttribute("data-landed"),ee.current=null},[]),he=u.useRef(null);u.useEffect(()=>{if(N!=="requested"||te===null||he.current===te||r===void 0)return;const S=n.find(ce=>ce.id===te),U=S===void 0?void 0:r(S);if(U===void 0)return;const me=requestAnimationFrame(()=>{if(!Y(U))return;const ce=document.getElementById(U);ce!==null&&(he.current=te,se(),ce.setAttribute("data-landed","true"),ee.current=ce,X.current=setTimeout(se,$s))});return()=>cancelAnimationFrame(me)},[N,te,r,n,Y,se]),u.useEffect(()=>se,[se]);const ve=u.useCallback(S=>{j.scrollToBottom(S),H.scrollToEnd({behavior:(S==null?void 0:S.behavior)??"auto"})},[j,H]);u.useImperativeHandle(_,()=>({scrollToRow(S){if(Y(S))return!0;if(r===void 0)return!1;const U=n.findIndex(me=>r(me)===S);return U===-1?!1:(H.scrollToIndex(U,{align:"center"}),requestAnimationFrame(()=>Y(S)),!0)},scrollToBottom:ve}),[Y,r,n,H,ve]);const be=u.useMemo(()=>({onOpenThread:C.threads?i:void 0}),[C.threads,i]),le=u.useMemo(()=>n.reduce((S,U)=>S+(U.kind==="message"?1:0),0),[n]);return E!=null?o.jsx(o.Fragment,{children:E}):x!==void 0&&n.length===0&&w.length===0?o.jsx("div",{"data-slot":"conversation-empty",className:"flex min-h-0 flex-1 items-center justify-center overflow-y-auto",children:x}):o.jsxs("div",{"data-slot":"conversation-timeline","data-testid":l,"data-landed-on":N??void 0,"data-message-row-count":le,className:L("relative min-h-0 flex-1",p),children:[o.jsxs("div",{ref:$,onScroll:J,"data-slot":"conversation-scroller","data-testid":"conversation-scroller",className:"chat-scroll-area h-full scrollbar-none overflow-y-auto",style:{overflowAnchor:"none"},children:[o.jsx(fr,{label:t,busy:v,"data-testid":k,onBeyondRendered:oe,children:o.jsx("div",{style:{height:H.getTotalSize(),position:"relative",width:"100%"},children:o.jsx("div",{"data-slot":"conversation-window",className:"absolute left-0 w-full",style:{top:((ie=H.getVirtualItems()[0])==null?void 0:ie.start)??0},children:H.getVirtualItems().map(S=>o.jsx("div",{"data-index":S.index,ref:H.measureElement,children:a(n[S.index],{...be,index:S.index})},n[S.index].id))})})}),w.length>0&&h!==void 0&&o.jsx("div",{className:"flex flex-col",children:w.map(S=>o.jsx(Sr,{post:S,viewerAuthorId:h},S.clientId))})]}),D!==void 0&&o.jsx("div",{role:"log","aria-live":"polite","aria-atomic":"false","data-testid":"transcript-announcer",className:"sr-only",children:D}),g!==void 0&&o.jsx("div",{role:"status","aria-live":"polite","aria-atomic":"true","data-testid":"approval-announcer",className:"sr-only",children:g}),o.jsx(Ls,{scrollRef:R}),o.jsx(Bs,{hasNewRows:j.hasNewRows,isAtBottom:j.isAtBottom,hasRows:n.length>0,onJump:()=>ve({behavior:Ms(R.current)})})]})}const qs=["react","react-more","run-with","reply","copy","mention","profile"],Hs={"Yes, no, and thanks":["👍 thumbsup thumbs up yes approve like agree ok good","❤️ heart love red","🎉 tada party celebrate congrats hooray confetti","👀 eyes look watching seen reading review","🚀 rocket ship launch ship-it fast deploy","🙏 pray thanks thank you please folded hands","🔥 fire lit hot flame burn","💯 hundred perfect score full agree","✅ check tick done complete yes correct","❌ cross no wrong incorrect fail","👎 thumbsdown thumbs down no disagree bad","🙌 raised hands celebrate praise hooray","👏 clap applause bravo well done","🤝 handshake deal agreed partnership","💪 muscle strong flex power","🫡 salute yes sir acknowledged on it","✨ sparkles shiny new magic nice","⭐ star favourite favorite rating","🏆 trophy win won champion award","🎯 target bullseye exactly precise nailed it"],Faces:["😀 grin smile happy","😄 smile happy laugh joy","😂 joy laugh crying laughing funny lol","🤣 rofl rolling laughing hilarious","🙂 slight smile fine ok","😊 blush smile warm happy","😉 wink joking","😍 heart-eyes love adore","🤩 star-struck amazed wow","😎 sunglasses cool smooth","🥳 party face celebrate birthday","🤔 thinking hmm consider wondering","🧐 monocle inspect examine scrutiny","😅 sweat smile nervous phew close call","😬 grimace awkward yikes","😱 scream shocked horror fear","😮 surprised open mouth wow","🤯 mind blown exploding head whoa","😴 sleeping asleep tired zzz","🥱 yawn bored tired","😐 neutral meh straight face","🙄 eye roll unimpressed whatever","😤 triumph frustrated steam determined","😢 cry sad tear upset","😭 sob crying loudly devastated","😡 angry rage mad furious","🤒 sick ill fever unwell","🤖 robot bot agent automation machine","👻 ghost boo spooky","🤡 clown silly foolish","😇 innocent halo angel","🥲 tear smile bittersweet","🫠 melting overwhelmed hot dissolving","🤷 shrug dunno who knows unsure"],"Hands and people":["👋 wave hello hi bye greeting","🤙 call me shaka hang loose","✌️ peace victory two","🤞 fingers crossed hope luck","🫰 finger heart love money","👌 ok perfect fine good","🤌 pinched fingers italian chef what","☝️ point-up one first attention","👇 point-down below beneath","👉 point-right this next","👈 point-left back previous","✋ hand stop halt raised","🖐️ open-hand five stop","🫶 heart-hands love care","🧠 brain smart thinking mind idea","👨💻 developer coding programmer engineer","🕺 dancing celebrate dance","🏃 running run fast hurry"],"Hearts and symbols":["🧡 orange heart love","💛 yellow heart love","💚 green heart love","💙 blue heart love","💜 purple heart love","🖤 black heart love dark","🤍 white heart love","💔 broken heart sad hurt","💖 sparkling heart love shiny","❣️ heart-exclamation love","⚡ zap lightning fast power energy","💥 boom explosion collision impact","💫 dizzy stars sparkle","⚠️ warning caution careful alert","🚨 siren alert emergency urgent incident","🛑 stop sign halt blocked","♻️ recycle reuse refresh retry","🔒 lock secure locked private","🔓 unlock open unlocked","💡 idea bulb lightbulb suggestion insight","❓ question ask unknown what","❗ exclamation important attention","➕ plus add more increase","➖ minus remove less decrease","🆗 ok-button fine approved","🆕 new fresh","🔁 repeat loop again retry","⏳ hourglass waiting time slow pending","⏰ alarm clock time deadline reminder","📈 chart-up growth increase improving","📉 chart-down decline decrease regression"],"Work and things":["💻 laptop computer code work","🖥️ desktop monitor screen","📱 phone mobile device","⌨️ keyboard typing input","🐛 bug defect issue error broken","🔧 wrench fix repair tool","🔨 hammer build fix construct","🛠️ tools build fix maintenance","⚙️ gear settings config machinery","🧪 test experiment lab trial","🧹 broom clean cleanup sweep tidy","📦 package box shipment release module","🚢 ship shipping deploy release","🗑️ trash delete remove bin","📝 memo note write document","📋 clipboard copy list checklist","📌 pin pinned important stick","📎 paperclip attach link","🔍 magnifying search find look investigate","🔗 link url chain reference","🗓️ calendar date schedule plan","⏱️ stopwatch timing performance speed","🔔 bell notify notification alert ping","🔕 bell-off mute silent quiet","📮 mail post send inbox","🧾 receipt invoice record log","🗂️ files folders organise organize","🔑 key access secret credential","🧱 brick wall block foundation","🪵 log wood timber","🧯 extinguisher hotfix incident fire put out","🩹 bandage patch fix quick","🔮 crystal ball predict future guess","🧭 compass direction navigate guide","🪄 magic wand automatic magically"],"Food and drink":["☕ coffee cafe morning caffeine","🍵 tea green matcha","🍺 beer pint drink cheers","🍻 cheers beers toast celebrate","🥂 champagne toast celebrate cheers","🍕 pizza food slice","🍔 burger food hamburger","🌮 taco food mexican","🍜 noodles ramen soup food","🍎 apple fruit food","🍌 banana fruit food","🍰 cake dessert birthday sweet","🍪 cookie biscuit sweet snack","🍩 donut doughnut sweet","🧁 cupcake sweet dessert","🍫 chocolate sweet treat","🍿 popcorn watching drama entertainment","🥑 avocado food green","🌶️ chilli chili spicy hot pepper","🧊 ice cold frozen chill"],"Animals and nature":["🐶 dog puppy pet","🐱 cat kitten pet","🦊 fox clever","🐻 bear","🐼 panda","🐢 turtle slow tortoise","🐌 snail slow","🐝 bee busy buzz","🦋 butterfly transform pretty","🐙 octopus multitask arms","🐳 whale big ocean","🦄 unicorn rare magic special","🦉 owl wise night","🐘 elephant big memory","🌱 seedling growth new sprout","🌳 tree nature growth","🌸 blossom flower spring","🌊 ocean wave water sea","🌈 rainbow colour color pride hope","☀️ sun sunny bright day","🌙 moon night late evening","⛈️ storm thunder rain bad weather","❄️ snowflake cold snow winter freeze","🍂 leaves autumn fall"],"Places and travel":["🏠 house home","🏢 office building work","🌍 earth world globe europe africa","🌎 earth-americas world globe","🗺️ map plan route territory","✈️ plane flight travel","🚗 car drive travel","🚲 bike bicycle cycle","🚂 train rail","⛺ tent camping outdoors","🏝️ island holiday vacation beach","🏔️ mountain peak climb summit"]},ca=Object.entries(Hs).map(([e,t])=>({name:e,entries:t.map(n=>{const[a,...i]=n.split(" ");return{emoji:a,keywords:i}})})),ua=ca.flatMap(e=>e.entries);function Ks(e){const t=e.toLowerCase().trim().split(/\s+/).filter(Boolean);return t.length===0?[]:ua.filter(n=>n.emoji===e.trim()||t.every(a=>n.keywords.some(i=>i.startsWith(a))))}function Vs(e){return ua.find(t=>t.emoji===e)}function Le(e){var t;return((t=Vs(e))==null?void 0:t.keywords[0])??e}function da(e,t,n){const a=u.useRef([]);u.useImperativeHandle(n,()=>({focusFirst:()=>{var s;return(s=a.current[0])==null?void 0:s.focus()}}));const i=u.useCallback(s=>c=>{a.current[s]=c},[]),r=u.useCallback((s,c)=>{const d=(f,m)=>{var y;e!==0&&((y=a.current[(f+m+e)%e])==null||y.focus())};switch(s.key){case"ArrowRight":case"ArrowDown":s.preventDefault(),d(c,1);break;case"ArrowLeft":case"ArrowUp":s.preventDefault(),d(c,-1);break;case"Home":if(s.ctrlKey||s.metaKey)break;s.preventDefault(),d(0,0);break;case"End":if(s.ctrlKey||s.metaKey)break;s.preventDefault(),d(e-1,0);break;case"Escape":s.preventDefault(),s.stopPropagation(),t();break}},[e,t]);return{register:i,handleKeyDown:r}}function pa({mine:e,frequents:t,onPick:n,disabled:a}){const[i,r]=u.useState(""),s=u.useId(),c=u.useMemo(()=>Ks(i),[i]),d=i.trim().length>0,f=m=>o.jsx("button",{type:"button",disabled:a,onClick:()=>n(m),"aria-pressed":e.includes(m),"aria-label":Le(m),title:Le(m),className:L("focus-ring hover:bg-accent flex size-8 items-center justify-center rounded-md text-base",pt,"disabled:pointer-events-none disabled:opacity-50",e.includes(m)&&"bg-brand/15 ring-brand/40 ring-1"),children:o.jsx("span",{"aria-hidden":!0,children:m})},m);return o.jsxs("div",{className:"flex flex-col gap-2","data-testid":"reaction-picker",children:[o.jsx(mi,{autoFocus:!0,value:i,onChange:m=>r(m.target.value),placeholder:"Search emoji…","aria-label":"Search emoji",className:"h-8"}),a===!0&&o.jsx("p",{role:"status",className:"text-muted-foreground px-1 text-xs",children:"Reactions send once the room reconnects."}),o.jsx("div",{className:"max-h-64 overflow-y-auto pr-1",children:d?c.length===0?o.jsx("p",{className:"text-muted-foreground px-1 py-6 text-center text-xs",children:"Nothing here matches that."}):o.jsx("div",{className:"grid grid-cols-8 gap-0.5",children:c.map(m=>f(m.emoji))}):o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsxs("section",{role:"group","aria-labelledby":`${s}-frequents`,children:[o.jsx("h3",{id:`${s}-frequents`,className:"text-muted-foreground text-2xs px-1 pb-1 font-medium",children:"Your most used"}),o.jsx("div",{className:"grid grid-cols-8 gap-0.5",children:t.map(f)})]}),ca.map((m,y)=>o.jsxs("section",{role:"group","aria-labelledby":`${s}-group-${y}`,children:[o.jsx("h3",{id:`${s}-group-${y}`,className:"text-muted-foreground text-2xs px-1 pb-1 font-medium",children:m.name}),o.jsx("div",{className:"grid grid-cols-8 gap-0.5",children:m.entries.map(h=>f(h.emoji))})]},m.name))]})})]})}function ma({appearance:e="capsule",mine:t,frequents:n,onPick:a,disabled:i,triggerRef:r,onTriggerKeyDown:s}){const[c,d]=u.useState(!1),f=e==="capsule";return o.jsxs(fi,{open:c,onOpenChange:d,children:[o.jsx(gi,{asChild:!0,children:o.jsx(ge,{ref:r,type:"button",variant:"ghost",size:f?"icon-xs":"sm",tabIndex:-1,disabled:i,"data-entry-action":"react-more","data-testid":f?void 0:"entry-reactions-add","aria-label":"Pick a reaction",title:"Pick a reaction",onKeyDown:s,className:L("leading-none",f?"text-control":"text-muted-foreground/60 hover:text-foreground h-auto rounded-full px-2 py-0.5 text-xs"),children:o.jsx("span",{"aria-hidden":!0,children:"🙂+"})})}),o.jsx(xi,{align:"end",className:"w-[19rem] p-2",children:o.jsx(pa,{mine:t,frequents:n,disabled:i,onPick:m=>{a(m),d(!1)}})})]})}function Ws({prompt:e,sessionId:t,triggerRef:n,onTriggerKeyDown:a}){const i=hi(),r=Dt(),{sessions:s}=vi(),{data:c}=bi(),{data:d}=yi(),[f,m]=u.useState({open:!1}),y=s.find(v=>v.id===t),h=y==null?void 0:y.runtime,E=y==null?void 0:y.cwd,x=Di.filter(v=>v!==h),D=v=>(c?v in c.capabilities:!0)&&_i(d,v),g=v=>{wi(r,{dir:E,runtime:v,prompt:e}).then(p=>i(p)).catch(p=>{ji(r,p),Ei(E??null)})},b=v=>{if(!D(v)){m({open:!0,runtime:v});return}g(v)};return o.jsxs(o.Fragment,{children:[o.jsxs(Rn,{children:[o.jsx(Tn,{asChild:!0,children:o.jsx("button",{ref:n,type:"button","data-entry-action":"run-with","aria-label":"Run this prompt elsewhere",onKeyDown:a,className:"text-muted-foreground/60 hover:text-foreground hover:bg-muted inline-flex size-6 items-center justify-center rounded transition-colors duration-150",children:o.jsx(mr,{className:"size-3.5"})})}),o.jsxs(zn,{align:"end",className:"w-52",children:[o.jsx(ki,{children:"Run this with…"}),x.map(v=>{const p=Cn(v);return o.jsx(dt,{icon:p.icon,description:D(v)?void 0:"Connect",onSelect:()=>b(v),children:p.label},v)})]})]}),o.jsx(tr,{runtime:f.runtime,open:f.open,onOpenChange:v=>m(p=>({...p,open:v})),renderConnect:nr,onRuntimeReady:v=>{m({open:!1}),g(v)}})]})}function Gs(e,t,n){return qs.flatMap(a=>{if(a==="react")return t?t.quick.map(r=>({kind:"quick",slot:a,emoji:r,mine:t.mine.includes(r)})):[];if(a==="react-more")return t?[{kind:"picker",slot:a}]:[];if(a==="run-with")return n?[{kind:"run-with",slot:a,runWith:n}]:[];const i=e.find(r=>r.id===a);return i?[{kind:"command",slot:a,action:i}]:[]})}const Us=u.forwardRef(function({actions:t,reactions:n,runWith:a,onExit:i,className:r},s){const c=Gs(t,n,a),{register:d,handleKeyDown:f}=da(c.length,i,s);return c.length===0?null:o.jsx("div",{role:"toolbar","aria-label":"Message actions","aria-orientation":"horizontal","data-testid":"entry-actions",className:r,children:c.map((m,y)=>{const h=x=>f(x,y),E=m.kind==="command"&&y>0&&c[y-1].kind!=="command";return m.kind==="run-with"?o.jsx(Ws,{prompt:m.runWith.prompt,sessionId:m.runWith.sessionId,triggerRef:d(y),onTriggerKeyDown:h},"run-with"):m.kind==="picker"?o.jsx(ma,{mine:n.mine,frequents:n.quick,disabled:n.disabled,onPick:n.onToggle,triggerRef:d(y),onTriggerKeyDown:h},"react-more"):o.jsxs(u.Fragment,{children:[E&&o.jsx("span",{"aria-hidden":!0,className:"bg-border mx-0.5 my-1 w-px self-stretch"}),m.kind==="quick"?o.jsx(ge,{ref:d(y),type:"button",variant:"ghost",size:"icon-xs",tabIndex:-1,disabled:n.disabled,"data-entry-action":m.slot,"data-emoji":m.emoji,"data-reacted":m.mine?"true":void 0,"aria-pressed":m.mine,"aria-label":`React with ${Le(m.emoji)}`,title:`React with ${Le(m.emoji)}`,onClick:()=>n.onToggle(m.emoji),onKeyDown:h,className:L("text-control leading-none",m.mine&&"bg-brand/15 text-foreground"),children:o.jsx("span",{"aria-hidden":!0,children:m.emoji})}):o.jsx(ge,{ref:d(y),type:"button",variant:"ghost",size:"icon-xs",tabIndex:-1,"data-entry-action":m.slot,"aria-label":m.action.label,title:m.action.label,onClick:m.action.run,onKeyDown:h,children:o.jsx(m.action.icon,{"aria-hidden":!0,className:"size-3.5"})})]},m.kind==="quick"?m.emoji:m.action.id)})})});function Zs({quick:e,mine:t,onToggle:n,disabled:a}){const{close:i}=Ti(),[r,s]=u.useState(!1),c=d=>{n(d),i()};return o.jsxs("div",{className:"border-border border-b px-4 py-3","data-testid":"drawer-reactions",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[e.map(d=>o.jsx("button",{type:"button",disabled:a,onClick:()=>c(d),"data-entry-action":"react","data-emoji":d,"aria-pressed":t.includes(d),"aria-label":`React with ${Le(d)}`,className:L("focus-ring flex size-11 items-center justify-center rounded-full border text-lg",pt,"disabled:pointer-events-none disabled:opacity-50",t.includes(d)?"border-brand/70 bg-brand/12":"border-border bg-muted/60 active:bg-accent"),children:o.jsx("span",{"aria-hidden":!0,children:d})},d)),o.jsx("button",{type:"button",disabled:a,onClick:()=>s(d=>!d),"aria-expanded":r,"aria-label":"Pick a reaction",className:L("focus-ring border-border bg-muted/60 active:bg-accent flex size-11 items-center justify-center rounded-full border text-base",pt,"disabled:pointer-events-none disabled:opacity-50"),children:o.jsx("span",{"aria-hidden":!0,children:"🙂+"})})]}),r&&o.jsx("div",{className:"pt-3",children:o.jsx(pa,{mine:t,frequents:e,onPick:c,disabled:a})})]})}function Js({actions:e,reactions:t,onPressStateChange:n,children:a}){const i=Fi();return e.length===0?o.jsx(o.Fragment,{children:a}):o.jsxs(Ci,{children:[o.jsx(Ai,{asChild:!0,onPressStateChange:n,children:a}),o.jsxs(Ni,{className:"w-52",children:[i&&t&&o.jsx(Zs,{...t}),e.map(r=>o.jsxs(Ri,{onClick:r.run,children:[o.jsx(r.icon,{"aria-hidden":!0,className:"mr-2 size-4"}),r.label]},r.id))]})]})}function Ys({count:e,roll:t,mine:n}){const[a]=u.useState(t);return o.jsx("span",{"aria-hidden":!0,className:L("tabular-nums",n?"text-foreground/80":"text-muted-foreground",a&&"motion-safe:animate-reaction-roll"),children:e})}function Xs({reaction:e,mine:t,summary:n,arrived:a,rolled:i,onToggle:r,disabled:s,buttonRef:c,onKeyDown:d}){const[f]=u.useState(a),m=e.authorIds.length;return o.jsxs(G.button,{ref:c,type:"button",tabIndex:-1,onKeyDown:d,exit:{opacity:0},transition:{duration:.12},disabled:s,onClick:r,"aria-pressed":t,"aria-label":n,title:n,"data-testid":"entry-reaction","data-emoji":e.emoji,"data-mine":t?"true":void 0,className:L("focus-ring relative inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-xs","disabled:pointer-events-none disabled:opacity-50",t?"border-brand/70 bg-brand/12 text-foreground":"border-border bg-muted/60 text-muted-foreground hover:bg-muted",f&&"motion-safe:animate-reaction-pop"),children:[f&&o.jsx("span",{"aria-hidden":!0,className:"border-brand motion-safe:animate-reaction-ring pointer-events-none absolute -inset-1 rounded-full border opacity-0"}),o.jsx("span",{"aria-hidden":!0,children:e.emoji}),o.jsx(Ys,{count:m,roll:i,mine:t},m)]})}const Qs=u.forwardRef(function({reactions:t,viewerAuthorId:n,names:a,frequents:i,onToggle:r,disabled:s,onExit:c},d){const[f,m]=u.useState(!1),y=u.useRef(null),h=y.current,[E,x]=u.useState(!1),[D,g]=u.useState(t.length);D!==t.length&&(g(t.length),x(t.length===0&&D>0)),u.useEffect(()=>{y.current=new Map(t.map(j=>[j.emoji,j.authorIds.length]))});const{shown:b,hidden:v}=wr(t),p=f?t:b,l=t.filter(j=>Bt(j,n)).map(j=>j.emoji),k=v>0&&!f?1:0,_=t.length>0?1:0,{register:C,handleKeyDown:R}=da(p.length+k+_,c,d),w=u.useCallback(j=>A=>R(A,j),[R]);return t.length===0&&!E?null:o.jsxs("div",{"data-testid":"entry-reactions",className:"mt-1 flex flex-wrap items-center gap-1",role:"group","aria-label":"Reactions",children:[o.jsx(xe,{initial:!1,onExitComplete:()=>x(!1),children:p.map((j,A)=>o.jsx(Xs,{reaction:j,mine:Bt(j,n),summary:_r(j,n,a),arrived:h!==null&&!h.has(j.emoji),rolled:(h==null?void 0:h.get(j.emoji))!==void 0&&h.get(j.emoji)!==j.authorIds.length,onToggle:()=>r(j.emoji),disabled:s,buttonRef:C(A),onKeyDown:w(A)},j.emoji))}),k===1&&o.jsxs("button",{ref:C(p.length),type:"button",tabIndex:-1,onKeyDown:w(p.length),onClick:()=>m(!0),"data-testid":"entry-reactions-more",className:"focus-ring text-muted-foreground hover:text-foreground rounded-full px-2 py-0.5 text-xs",children:["+",v," more"]}),t.length>0&&o.jsx(ma,{appearance:"ghost-pill",mine:l,frequents:i,disabled:s,onPick:r,triggerRef:C(p.length+k),onTriggerKeyDown:w(p.length+k)})]})}),fa=u.createContext(null);function el({value:e,children:t}){return o.jsx(fa.Provider,{value:e,children:t})}function Me(){const e=u.useContext(fa);if(e===null)throw new Error("A Message part must be rendered inside <Message.Root>. Each part draws itself with a slot of the row’s single messageItem() call, and there is no honest default for a row that was never computed.");return e}function ga(e){return e==="first"||e==="only"}const tl=zi("",{variants:{anchor:{corner:"contents",rail:"pointer-events-none sticky top-1 z-20 order-first -mt-(--msg-actions-height) flex h-(--msg-actions-height) items-start justify-end pr-2"}}});function nl({actions:e=[],reactions:t,runWith:n,barRef:a,onExit:i}){const{capabilities:r,anchor:s}=Be(),{slots:c}=Me();return o.jsxs(o.Fragment,{children:[e.length>0&&o.jsx("button",{type:"button",tabIndex:-1,"data-testid":"entry-actions-reach","aria-label":"Message actions",onClick:()=>{var d;return(d=a==null?void 0:a.current)==null?void 0:d.focusFirst()},className:"sr-only"}),o.jsx("div",{"data-slot":"message-actions",className:tl({anchor:s}),children:o.jsx(Us,{ref:a,actions:e,reactions:r.reactions?t:void 0,runWith:r.runWith?n:void 0,onExit:i,className:c.actions()})})]})}function al({id:e,author:t,at:n,origin:a,mark:i,renderName:r,asChild:s=!1,className:c}){const{slots:d,position:f}=Me(),m=n===void 0?"":Kn(n);if(!ga(f))return null;const y=s?jt:"div",h=o.jsx("span",{className:d.authorName(),children:t.displayName});return o.jsxs(y,{id:e,"data-slot":"message-author",className:L(d.header(),c),children:[r?r(h):h,a!==void 0&&o.jsx(Si,{origin:a}),i,o.jsx(Ii,{retired:t.retired}),m.length>0&&o.jsx("time",{dateTime:n,title:Vn(n??""),className:L(d.timestamp(),"text-msg-timestamp"),children:m})]})}function il({children:e,className:t}){const{slots:n}=Me();return o.jsx("div",{"data-slot":"message-body",className:L(n.body(),t),children:e})}function rl({id:e,children:t,className:n}){const{slots:a}=Me();return o.jsx("div",{id:e,"data-slot":"message-content",className:L(a.content(),n),children:t})}function ol({author:e,at:t,onViewProfile:n,isSelf:a,renderAvatar:i,className:r}){const{slots:s,position:c}=Me(),{showTimestamps:d}=Oi(),f=t===void 0?"":Kn(t);return o.jsx("div",{"data-slot":"message-gutter",className:L(s.gutter(),r),children:ga(c)?(i??(m=>m))(o.jsx(Hn,{author:e,onViewProfile:n,isSelf:a})):f.length>0&&o.jsx("time",{dateTime:t,title:Vn(t??""),className:L(s.avatarTimestamp(),d?"text-msg-timestamp":"group-focus-within:text-msg-timestamp group-hover:text-msg-timestamp text-transparent"),children:f})})}function sl({ref:e,...t}){const{capabilities:n}=Be(),[a,i]=u.useState(t.reactions.length>0);return!a&&t.reactions.length>0&&i(!0),!n.reactions||!a?null:o.jsx("div",{"data-slot":"message-reactions",className:"contents",children:o.jsx(Qs,{ref:e,...t})})}const ll={type:"spring",stiffness:320,damping:28};function cl({role:e="assistant",position:t="only",isNew:n=!1,actions:a,reactions:i,asChild:r=!1,className:s,children:c,ref:d,...f}){const{capabilities:m,density:y,anchor:h}=Be(),[E,x]=u.useState(null),D=u.useMemo(()=>({slots:Tr({role:e,position:t,density:y,anchor:h}),position:t}),[e,t,y,h]),g=a!==void 0&&a.length>0,b=r?jt:G.div,v=o.jsx(b,{ref:d,"data-slot":"message-root",role:"article",className:L(D.slots.root(),"focus-visible:ring-ring outline-none focus-visible:ring-2","origin-center",g&&"[-webkit-touch-callout:none]",E==="pressing"&&"motion-safe:animate-press-in",E==="released"&&"motion-safe:animate-press-release",s),...r?{}:{initial:n?{opacity:0,y:8}:!1,animate:{opacity:1,y:0},transition:ll},...f,children:o.jsx(el,{value:D,children:o.jsx(Li,{children:c})})});return o.jsx(Js,{actions:a??[],reactions:m.reactions?i:void 0,onPressStateChange:x,children:v})}const Mc={Root:ss,Timeline:Ps,LiveLane:Es,LivePeek:As,Composer:rs,Footer:os},Pc={Root:cl,Gutter:ol,Author:al,Body:il,Content:rl,Attachments:Lr,Reactions:sl,Actions:nl},ul={a:$i,img:ir},xa=u.createContext({isStreaming:!1});function dl(e){const t=u.useContext(xa);return o.jsx(Xi,{...e,...t})}const pl={renderers:[{language:Yi,component:dl}]};function qc({content:e,isStreaming:t=!1,textEffect:n=gr,sessionId:a,isLatestWidgetMessage:i}){const r=hr(n),s=u.useMemo(()=>({sessionId:a,isLatestMessage:i,isStreaming:t}),[a,i,t]);return o.jsx(xa.Provider,{value:s,children:o.jsx("div",{className:L("relative",t&&"streaming-cursor"),children:o.jsx(ar,{resetKey:e,fallback:o.jsx("div",{className:"text-sm break-words whitespace-pre-wrap",children:e}),children:o.jsx(Bi,{shikiTheme:["github-light","github-dark"],components:ul,animated:r,isAnimating:t,plugins:pl,children:e})})})})}function Hc({via:e}){return o.jsxs("p",{"data-testid":"forward-via-line",className:"text-muted-foreground mb-0.5 flex min-w-0 items-center gap-1 text-xs",children:[o.jsxs("span",{className:"shrink-0",children:["via ",e.appName]}),o.jsx("span",{"aria-hidden":!0,children:"·"}),e.itemTitle?o.jsx("q",{className:"min-w-0 truncate",title:`Item title from ${e.appName}`,children:e.itemTitle}):o.jsxs("span",{className:"min-w-0 truncate",children:["item ",e.itemId]})]})}const ml={sent:[],stops:[]},fl=new Ki;function Kc(e){const t=Mi(),n=u.useContext(Pi),a=qi(e??""),{data:i}=Hi({queryKey:["chat-activity",e,a],queryFn:()=>t.getChatActivity(e),enabled:!!e&&t!==null&&n!==void 0,placeholderData:(r,s)=>(s==null?void 0:s.queryKey[1])===e?r:void 0,staleTime:3e4},n??fl);return i??ml}const Nt=u.createContext(null);function Vc({children:e,value:t}){const n=u.useMemo(()=>t,[t.sessionId,t.isStreaming,t.isLatestWidgetMessage,t.isFinalMessage,t.activeToolCallId,t.onToolRef,t.focusedOptionIndex,t.onToolDecided,t.onRetry,t.onSigninComplete,t.onChooseModel,t.inputZoneToolCallId,t.textEffect,t.runtimeLabel,t.allowsDenyReason]);return o.jsx(Nt,{value:n,children:e})}function Wc(){const e=u.useContext(Nt);if(!e)throw new Error("useMessageContext must be used within MessageProvider");return e}function Gc(){return u.useContext(Nt)}const gl=e=>typeof e=="boolean"||e instanceof Boolean,xl=e=>typeof e=="number"||e instanceof Number,hl=e=>typeof e=="bigint"||e instanceof BigInt,ha=e=>!!e&&e instanceof Date,vl=e=>typeof e=="string"||e instanceof String,bl=e=>Array.isArray(e),va=e=>typeof e=="object"&&e!==null,ba=e=>!!e&&e instanceof Object&&typeof e=="function";function Ge(e,t){return t===void 0&&(t=!1),!e||t?`"${e}"`:e}function yl(e,t,n){return n?JSON.stringify(e):t?`"${e}"`:e}function ya(e){let{field:t,value:n,data:a,lastElement:i,openBracket:r,closeBracket:s,level:c,style:d,shouldExpandNode:f,clickToExpandNode:m,outerRef:y,beforeExpandChange:h}=e;const E=u.useRef(!1),[x,D]=u.useState(()=>f(c,n,t)),g=u.useRef(null);u.useEffect(()=>{E.current?D(f(c,n,t)):E.current=!0},[f]);const b=u.useId();if(a.length===0)return kl({field:t,openBracket:r,closeBracket:s,lastElement:i,style:d});const v=x?d.collapseIcon:d.expandIcon,p=x?d.ariaLables.collapseJson:d.ariaLables.expandJson,l=c+1,k=a.length-1,_=w=>{x!==w&&(!h||h({level:c,value:n,field:t,newExpandValue:w}))&&D(w)},C=w=>{if(w.key==="ArrowRight"||w.key==="ArrowLeft")w.preventDefault(),_(w.key==="ArrowRight");else if(w.key==="ArrowUp"||w.key==="ArrowDown"){w.preventDefault();const j=w.key==="ArrowUp"?-1:1;if(!y.current)return;const A=y.current.querySelectorAll("[role=button]");let O=-1;for(let z=0;z<A.length;z++)if(A[z].tabIndex===0){O=z;break}if(O<0)return;const $=(O+j+A.length)%A.length;A[O].tabIndex=-1,A[$].tabIndex=0,A[$].focus()}},R=()=>{var w;_(!x);const j=g.current;if(!j)return;const A=(w=y.current)===null||w===void 0?void 0:w.querySelector('[role=button][tabindex="0"]');A&&(A.tabIndex=-1),j.tabIndex=0,j.focus()};return u.createElement("div",{className:d.basicChildStyle,role:"treeitem","aria-expanded":x,"aria-selected":void 0},u.createElement("span",{className:v,onClick:R,onKeyDown:C,role:"button","aria-label":p,"aria-expanded":x,"aria-controls":x?b:void 0,ref:g,tabIndex:c===0?0:-1}),(t||t==="")&&(m?u.createElement("span",{className:d.clickableLabel,onClick:R,onKeyDown:C},Ge(t,d.quotesForFieldNames),":"):u.createElement("span",{className:d.label},Ge(t,d.quotesForFieldNames),":")),u.createElement("span",{className:d.punctuation},r),x?u.createElement("ul",{id:b,role:"group",className:d.childFieldsContainer},a.map((w,j)=>u.createElement(vt,{key:w[0]||j,field:w[0],value:w[1],style:d,lastElement:j===k,level:l,shouldExpandNode:f,clickToExpandNode:m,beforeExpandChange:h,outerRef:y}))):u.createElement("span",{className:d.collapsedContent,onClick:R,onKeyDown:C}),u.createElement("span",{className:d.punctuation},s),!i&&u.createElement("span",{className:d.punctuation},","))}function kl(e){let{field:t,openBracket:n,closeBracket:a,lastElement:i,style:r}=e;return u.createElement("div",{className:r.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||t==="")&&u.createElement("span",{className:r.label},Ge(t,r.quotesForFieldNames),":"),u.createElement("span",{className:r.punctuation},n),u.createElement("span",{className:r.punctuation},a),!i&&u.createElement("span",{className:r.punctuation},","))}function Dl(e){let{field:t,value:n,style:a,lastElement:i,shouldExpandNode:r,clickToExpandNode:s,level:c,outerRef:d,beforeExpandChange:f}=e;return ya({field:t,value:n,lastElement:i||!1,level:c,openBracket:"{",closeBracket:"}",style:a,shouldExpandNode:r,clickToExpandNode:s,data:Object.keys(n).map(m=>[m,n[m]]),outerRef:d,beforeExpandChange:f})}function _l(e){let{field:t,value:n,style:a,lastElement:i,level:r,shouldExpandNode:s,clickToExpandNode:c,outerRef:d,beforeExpandChange:f}=e;return ya({field:t,value:n,lastElement:i||!1,level:r,openBracket:"[",closeBracket:"]",style:a,shouldExpandNode:s,clickToExpandNode:c,data:n.map(m=>[void 0,m]),outerRef:d,beforeExpandChange:f})}function wl(e){let{field:t,value:n,style:a,lastElement:i}=e,r,s=a.otherValue;return n===null?(r="null",s=a.nullValue):n===void 0?(r="undefined",s=a.undefinedValue):vl(n)?(r=yl(n,!a.noQuotesForStringValues,a.stringifyStringValues),s=a.stringValue):gl(n)?(r=n?"true":"false",s=a.booleanValue):xl(n)?(r=n.toString(),s=a.numberValue):hl(n)?(r=`${n.toString()}n`,s=a.numberValue):ha(n)?r=n.toISOString():ba(n)?r="function() { }":r=n.toString(),u.createElement("div",{className:a.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||t==="")&&u.createElement("span",{className:a.label},Ge(t,a.quotesForFieldNames),":"),u.createElement("span",{className:s},r),!i&&u.createElement("span",{className:a.punctuation},","))}function vt(e){const t=e.value;return bl(t)?u.createElement(_l,Object.assign({},e)):va(t)&&!ha(t)&&!ba(t)?u.createElement(Dl,Object.assign({},e)):u.createElement(wl,Object.assign({},e))}var B={"container-light":"_2IvMF _GzYRV","basic-element-style":"_2bkNM","child-fields-container":"_1BXBN","label-light":"_1MGIk","clickable-label-light":"_2YKJg _1MGIk _1MFti","punctuation-light":"_3uHL6 _3eOF8","value-null-light":"_2T6PJ","value-undefined-light":"_1Gho6","value-string-light":"_vGjyY","value-number-light":"_1bQdo","value-boolean-light":"_3zQKs","value-other-light":"_1xvuR","collapse-icon-light":"_oLqym _f10Tu _1MFti _1LId0","expand-icon-light":"_2AXVT _f10Tu _1MFti _1UmXx","collapsed-content-light":"_2KJWg _1pNG9 _1MFti","container-dark":"_11RoI _GzYRV","expand-icon-dark":"_17H2C _f10Tu _1MFti _1UmXx","collapse-icon-dark":"_3QHg2 _f10Tu _1MFti _1LId0","collapsed-content-dark":"_3fDAz _1pNG9 _1MFti","label-dark":"_2bSDX","clickable-label-dark":"_1RQEj _2bSDX _1MFti","punctuation-dark":"_gsbQL _3eOF8","value-null-dark":"_LaAZe","value-undefined-dark":"_GTKgm","value-string-dark":"_Chy1W","value-number-dark":"_2bveF","value-boolean-dark":"_2vRm-","value-other-dark":"_1prJR"};const ka={collapseJson:"collapse JSON",expandJson:"expand JSON"},ot={container:B["container-light"],basicChildStyle:B["basic-element-style"],childFieldsContainer:B["child-fields-container"],label:B["label-light"],clickableLabel:B["clickable-label-light"],nullValue:B["value-null-light"],undefinedValue:B["value-undefined-light"],stringValue:B["value-string-light"],booleanValue:B["value-boolean-light"],numberValue:B["value-number-light"],otherValue:B["value-other-light"],punctuation:B["punctuation-light"],collapseIcon:B["collapse-icon-light"],expandIcon:B["expand-icon-light"],collapsedContent:B["collapsed-content-light"],noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:ka,stringifyStringValues:!1},jl={container:B["container-dark"],basicChildStyle:B["basic-element-style"],childFieldsContainer:B["child-fields-container"],label:B["label-dark"],clickableLabel:B["clickable-label-dark"],nullValue:B["value-null-dark"],undefinedValue:B["value-undefined-dark"],stringValue:B["value-string-dark"],booleanValue:B["value-boolean-dark"],numberValue:B["value-number-dark"],otherValue:B["value-other-dark"],punctuation:B["punctuation-dark"],collapseIcon:B["collapse-icon-dark"],expandIcon:B["expand-icon-dark"],collapsedContent:B["collapsed-content-dark"],noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:ka,stringifyStringValues:!1},El=()=>!0,Fl=e=>e<1,Cl=e=>{let{data:t,style:n=ot,shouldExpandNode:a=El,clickToExpandNode:i=!1,beforeExpandChange:r,compactTopLevel:s,...c}=e;const d=u.useRef(null);return u.createElement("div",Object.assign({"aria-label":"JSON view"},c,{className:n.container,ref:d,role:"tree"}),s&&va(t)?Object.entries(t).map(f=>{let[m,y]=f;return u.createElement(vt,{key:m,field:m,value:y,style:{...ot,...n},lastElement:!0,level:1,shouldExpandNode:a,clickToExpandNode:i,beforeExpandChange:r,outerRef:d})}):u.createElement(vt,{value:t,style:{...ot,...n},lastElement:!0,level:0,shouldExpandNode:a,clickToExpandNode:i,outerRef:d,beforeExpandChange:r}))};var ae={},st,sn;function Al(){if(sn)return st;sn=1;const e=[[{color:"0, 0, 0",class:"ansi-black"},{color:"187, 0, 0",class:"ansi-red"},{color:"0, 187, 0",class:"ansi-green"},{color:"187, 187, 0",class:"ansi-yellow"},{color:"0, 0, 187",class:"ansi-blue"},{color:"187, 0, 187",class:"ansi-magenta"},{color:"0, 187, 187",class:"ansi-cyan"},{color:"255,255,255",class:"ansi-white"}],[{color:"85, 85, 85",class:"ansi-bright-black"},{color:"255, 85, 85",class:"ansi-bright-red"},{color:"0, 255, 0",class:"ansi-bright-green"},{color:"255, 255, 85",class:"ansi-bright-yellow"},{color:"85, 85, 255",class:"ansi-bright-blue"},{color:"255, 85, 255",class:"ansi-bright-magenta"},{color:"85, 255, 255",class:"ansi-bright-cyan"},{color:"255, 255, 255",class:"ansi-bright-white"}]],t=/(https?:\/\/(?:[A-Za-z0-9#;/?:@=+$',_.!~*()[\]-]|&|%[A-Fa-f0-9]{2})+)/gm;class n{static escapeForHtml(i){return new n().escapeForHtml(i)}static linkify(i){return new n().linkify(i)}static ansiToHtml(i,r){return new n().ansiToHtml(i,r)}static ansiToJson(i,r){return new n().ansiToJson(i,r)}static ansiToText(i){return new n().ansiToText(i)}constructor(){this.fg=this.bg=this.fg_truecolor=this.bg_truecolor=null,this.bright=0,this.decorations=[]}setupPalette(){this.PALETTE_COLORS=[];for(let c=0;c<2;++c)for(let d=0;d<8;++d)this.PALETTE_COLORS.push(e[c][d].color);let i=[0,95,135,175,215,255],r=(c,d,f)=>i[c]+", "+i[d]+", "+i[f];for(let c=0;c<6;++c)for(let d=0;d<6;++d)for(let f=0;f<6;++f)this.PALETTE_COLORS.push(r(c,d,f));let s=8;for(let c=0;c<24;++c,s+=10)this.PALETTE_COLORS.push(s+", "+s+", "+s)}escapeForHtml(i){return i.replace(/[&<>\"]/gm,r=>r=="&"?"&":r=='"'?""":r=="<"?"<":r==">"?">":"")}linkify(i){return i.replace(t,r=>`<a href="${r}">${r}</a>`)}ansiToHtml(i,r){return this.process(i,r,!0)}ansiToJson(i,r){return r=r||{},r.json=!0,r.clearLine=!1,this.process(i,r,!0)}ansiToText(i){return this.process(i,{},!1)}process(i,r,s){let c=this,d=i.split(/\033\[/),f=d.shift();r==null&&(r={}),r.clearLine=/\r/.test(i);let m=d.map(y=>this.processChunk(y,r,s));if(r&&r.json){let y=c.processChunkJson("");return y.content=f,y.clearLine=r.clearLine,m.unshift(y),r.remove_empty&&(m=m.filter(h=>!h.isEmpty())),m}else m.unshift(f);return m.join("")}processChunkJson(i,r,s){r=typeof r>"u"?{}:r;let c=r.use_classes=typeof r.use_classes<"u"&&r.use_classes,d=r.key=c?"class":"color",f={content:i,fg:null,bg:null,fg_truecolor:null,bg_truecolor:null,isInverted:!1,clearLine:r.clearLine,decoration:null,decorations:[],was_processed:!1,isEmpty:()=>!f.content},m=i.match(/^([!\x3c-\x3f]*)([\d;]*)([\x20-\x2c]*[\x40-\x7e])([\s\S]*)/m);if(!m)return f;f.content=m[4];let y=m[2].split(";");if(m[1]!==""||m[3]!=="m"||!s)return f;let h=this;for(;y.length>0;){let E=y.shift(),x=parseInt(E);if(isNaN(x)||x===0)h.fg=h.bg=null,h.decorations=[];else if(x===1)h.decorations.push("bold");else if(x===2)h.decorations.push("dim");else if(x===3)h.decorations.push("italic");else if(x===4)h.decorations.push("underline");else if(x===5)h.decorations.push("blink");else if(x===7)h.decorations.push("reverse");else if(x===8)h.decorations.push("hidden");else if(x===9)h.decorations.push("strikethrough");else if(x===21)h.removeDecoration("bold");else if(x===22)h.removeDecoration("bold"),h.removeDecoration("dim");else if(x===23)h.removeDecoration("italic");else if(x===24)h.removeDecoration("underline");else if(x===25)h.removeDecoration("blink");else if(x===27)h.removeDecoration("reverse");else if(x===28)h.removeDecoration("hidden");else if(x===29)h.removeDecoration("strikethrough");else if(x===39)h.fg=null;else if(x===49)h.bg=null;else if(x>=30&&x<38)h.fg=e[0][x%10][d];else if(x>=90&&x<98)h.fg=e[1][x%10][d];else if(x>=40&&x<48)h.bg=e[0][x%10][d];else if(x>=100&&x<108)h.bg=e[1][x%10][d];else if(x===38||x===48){let D=x===38;if(y.length>=1){let g=y.shift();if(g==="5"&&y.length>=1){let b=parseInt(y.shift());if(b>=0&&b<=255)if(!c)this.PALETTE_COLORS||h.setupPalette(),D?h.fg=this.PALETTE_COLORS[b]:h.bg=this.PALETTE_COLORS[b];else{let v=b>=16?"ansi-palette-"+b:e[b>7?1:0][b%8].class;D?h.fg=v:h.bg=v}}else if(g==="2"&&y.length>=3){let b=parseInt(y.shift()),v=parseInt(y.shift()),p=parseInt(y.shift());if(b>=0&&b<=255&&v>=0&&v<=255&&p>=0&&p<=255){let l=b+", "+v+", "+p;c?D?(h.fg="ansi-truecolor",h.fg_truecolor=l):(h.bg="ansi-truecolor",h.bg_truecolor=l):D?h.fg=l:h.bg=l}}}}}return h.fg===null&&h.bg===null&&h.decorations.length===0||(f.fg=h.fg,f.bg=h.bg,f.fg_truecolor=h.fg_truecolor,f.bg_truecolor=h.bg_truecolor,f.decorations=h.decorations,f.decoration=h.decorations.slice(-1).pop()||null,f.was_processed=!0),f}processChunk(i,r,s){r=r||{};let c=this.processChunkJson(i,r,s),d=r.use_classes;if(c.decorations=c.decorations.filter(x=>{if(x==="reverse"){c.fg||(c.fg=e[0][7][d?"class":"color"]),c.bg||(c.bg=e[0][0][d?"class":"color"]);let D=c.fg;c.fg=c.bg,c.bg=D;let g=c.fg_truecolor;return c.fg_truecolor=c.bg_truecolor,c.bg_truecolor=g,c.isInverted=!0,!1}return!0}),r.json)return c;if(c.isEmpty())return"";if(!c.was_processed)return c.content;let f=[],m=[],y=[],h={},E=x=>{let D=[],g;for(g in x)x.hasOwnProperty(g)&&D.push("data-"+g+'="'+this.escapeForHtml(x[g])+'"');return D.length>0?" "+D.join(" "):""};return c.isInverted&&(h["ansi-is-inverted"]="true"),c.fg&&(d?(f.push(c.fg+"-fg"),c.fg_truecolor!==null&&(h["ansi-truecolor-fg"]=c.fg_truecolor,c.fg_truecolor=null)):f.push("color:rgb("+c.fg+")")),c.bg&&(d?(f.push(c.bg+"-bg"),c.bg_truecolor!==null&&(h["ansi-truecolor-bg"]=c.bg_truecolor,c.bg_truecolor=null)):f.push("background-color:rgb("+c.bg+")")),c.decorations.forEach(x=>{if(d){m.push("ansi-"+x);return}x==="bold"?m.push("font-weight:bold"):x==="dim"?m.push("opacity:0.5"):x==="italic"?m.push("font-style:italic"):x==="hidden"?m.push("visibility:hidden"):x==="strikethrough"?y.push("line-through"):y.push(x)}),y.length&&m.push("text-decoration:"+y.join(" ")),d?'<span class="'+f.concat(m).join(" ")+'"'+E(h)+">"+c.content+"</span>":'<span style="'+f.concat(m).join(";")+'"'+E(h)+">"+c.content+"</span>"}removeDecoration(i){const r=this.decorations.indexOf(i);r>=0&&this.decorations.splice(r,1)}}return st=n,st}var Se={exports:{}},ln;function Nl(){if(ln)return Se.exports;ln=1;function e(i){if(!i)return"";if(!/\r/.test(i))return i;for(i=i.replace(/\r+\n/gm,`
|
|
24
24
|
`);/\r./.test(i);)i=i.replace(/^([^\r\n]*)\r+([^\r\n]+)/gm,function(r,s,c){return c+s.slice(c.length)});return i}function t(i){for(var r=0,s=0;s<i.length;s++)i[r].length<=i[s].length&&(r=s);return r}function n(i){if(!/\r/.test(i))return i;for(var r=i.split("\r"),s=[];r.length>0;){var c=t(r);s.push(r[c]),r=r.slice(c+1)}return s.join("\r")}function a(i){if(!i)return"";if(!/\r/.test(i))return i;if(!/\n/.test(i))return n(i);i=i.replace(/\r+\n/gm,`
|
|
25
25
|
`);var r=i.lastIndexOf(`
|
|
26
26
|
`);return e(i.slice(0,r))+`
|
|
27
|
-
`+n(i.slice(r+1))}return Se.exports=e,Se.exports.escapeCarriageReturn=e,Se.exports.escapeCarriageReturnSafe=a,Se.exports}var ke={},cn;function Rl(){if(cn)return ke;cn=1;var e=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,t=/[\0-\x1F\x7F-\x9F]/,n=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,a=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,i=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,r=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;return ke.Any=e,ke.Cc=t,ke.Cf=n,ke.P=a,ke.S=i,ke.Z=r,ke}var lt,un;function Tl(){if(un)return lt;un=1;var e=Rl();function t(p){const l={};p=p||{},l.src_Any=e.Any.source,l.src_Cc=e.Cc.source,l.src_Z=e.Z.source,l.src_P=e.P.source,l.src_ZPCc=[l.src_Z,l.src_P,l.src_Cc].join("|"),l.src_ZCc=[l.src_Z,l.src_Cc].join("|");const k="[><|]";return l.src_pseudo_letter=`(?:(?!${k}|${l.src_ZPCc})${l.src_Any})`,l.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",l.src_auth=`(?:(?:(?!${l.src_ZCc}|[@/\\[\\]()]).){1,50}@)?`,l.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",l.src_host_terminator=`(?=$|${k}|${l.src_ZPCc})(?!${p["---"]?"-(?!--)|":"-|"}_|:\\d|\\.-|\\.(?!$|${l.src_ZPCc}))`,l.src_path=`(?:[/?#](?:(?!${l.src_ZCc}|${k}|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!${l.src_ZCc}|\\]).)*\\]|\\((?:(?!${l.src_ZCc}|[)]).)*\\)|\\{(?:(?!${l.src_ZCc}|[}]).)*\\}|\\"(?:(?!${l.src_ZCc}|["]).)+\\"|\\'(?:(?!${l.src_ZCc}|[']).)+\\'|\\'(?=${l.src_pseudo_letter}|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!${l.src_ZCc}|[.]|$)|`+(p["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+`,(?!${l.src_ZCc}|$)|;(?!${l.src_ZCc}|$)|\\!+(?!${l.src_ZCc}|[!]|$)|\\?(?!${l.src_ZCc}|[?]|$))+|\\/)?`,l.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]{0,63}',l.src_xn="xn--[a-z0-9\\-]{1,59}",l.src_domain_root="(?:"+l.src_xn+`|${l.src_pseudo_letter}{1,63})`,l.src_domain="(?:"+l.src_xn+`|(?:${l.src_pseudo_letter})|(?:${l.src_pseudo_letter}(?:-|${l.src_pseudo_letter}){0,61}${l.src_pseudo_letter}))`,l.src_host=`(?:(?:(?:(?:${l.src_domain})\\.)*${l.src_domain}))`,l.tpl_host_fuzzy="(?:"+l.src_ip4+`|(?:(?:(?:${l.src_domain})\\.)+(?:%TLDS%)))`,l.tpl_host_no_ip_fuzzy=`(?:(?:(?:${l.src_domain})\\.)+(?:%TLDS%))`,l.src_host_strict=l.src_host+l.src_host_terminator,l.tpl_host_fuzzy_strict=l.tpl_host_fuzzy+l.src_host_terminator,l.src_host_port_strict=l.src_host+l.src_port+l.src_host_terminator,l.tpl_host_port_fuzzy_strict=l.tpl_host_fuzzy+l.src_port+l.src_host_terminator,l.tpl_host_port_no_ip_fuzzy_strict=l.tpl_host_no_ip_fuzzy+l.src_port+l.src_host_terminator,l.tpl_host_fuzzy_test=`localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:${l.src_ZPCc}|>|$))`,l.tpl_email_fuzzy=`(^|${k}|"|\\(|${l.src_ZCc})(${l.src_email_name}@${l.tpl_host_fuzzy_strict})`,l.tpl_link_fuzzy=`(^|(?![.:/\\-_@])(?:[$+<=>^\`||]|${l.src_ZPCc}))((?![$+<=>^\`||])${l.tpl_host_port_fuzzy_strict}${l.src_path})`,l.tpl_link_no_ip_fuzzy=`(^|(?![.:/\\-_@])(?:[$+<=>^\`||]|${l.src_ZPCc}))((?![$+<=>^\`||])${l.tpl_host_port_no_ip_fuzzy_strict}${l.src_path})`,l}function n(p){return Array.prototype.slice.call(arguments,1).forEach(function(k){k&&Object.keys(k).forEach(function(_){p[_]=k[_]})}),p}function a(p){return Object.prototype.toString.call(p)}function i(p){return a(p)==="[object String]"}function r(p){return a(p)==="[object Object]"}function s(p){return a(p)==="[object RegExp]"}function c(p){return a(p)==="[object Function]"}function d(p){return p.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const f={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function m(p){return Object.keys(p||{}).reduce(function(l,k){return l||f.hasOwnProperty(k)},!1)}const y={"http:":{validate:function(p,l,k){const _=p.slice(l);return k.re.http||(k.re.http=new RegExp(`^\\/\\/${k.re.src_auth}${k.re.src_host_port_strict}${k.re.src_path}`,"i")),k.re.http.test(_)?_.match(k.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(p,l,k){const _=p.slice(l);return k.re.no_http||(k.re.no_http=new RegExp("^"+k.re.src_auth+`(?:localhost|(?:(?:${k.re.src_domain})\\.)+${k.re.src_domain_root})`+k.re.src_port+k.re.src_host_terminator+k.re.src_path,"i")),k.re.no_http.test(_)?l>=3&&p[l-3]===":"||l>=3&&p[l-3]==="/"?0:_.match(k.re.no_http)[0].length:0}},"mailto:":{validate:function(p,l,k){const _=p.slice(l);return k.re.mailto||(k.re.mailto=new RegExp(`^${k.re.src_email_name}@${k.re.src_host_strict}`,"i")),k.re.mailto.test(_)?_.match(k.re.mailto)[0].length:0}}},h="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",E="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function x(p){return function(l,k){const _=l.slice(k);return p.test(_)?_.match(p)[0].length:0}}function D(){return function(p,l){l.normalize(p)}}function g(p){const l=p.re=t(p.__opts__),k=p.__tlds__.slice();p.onCompile(),p.__tlds_replaced__||k.push(h),k.push(l.src_xn),l.src_tlds=k.join("|");function _(j){return j.replace("%TLDS%",l.src_tlds)}l.email_fuzzy=RegExp(_(l.tpl_email_fuzzy),"i"),l.email_fuzzy_global=RegExp(_(l.tpl_email_fuzzy),"ig"),l.link_fuzzy=RegExp(_(l.tpl_link_fuzzy),"i"),l.link_fuzzy_global=RegExp(_(l.tpl_link_fuzzy),"ig"),l.link_no_ip_fuzzy=RegExp(_(l.tpl_link_no_ip_fuzzy),"i"),l.link_no_ip_fuzzy_global=RegExp(_(l.tpl_link_no_ip_fuzzy),"ig"),l.host_fuzzy_test=RegExp(_(l.tpl_host_fuzzy_test),"i");const C=[];p.__compiled__={};function R(j,A){throw new Error(`(LinkifyIt) Invalid schema "${j}": ${A}`)}Object.keys(p.__schemas__).forEach(function(j){const A=p.__schemas__[j];if(A===null)return;const O={validate:null,link:null};if(p.__compiled__[j]=O,r(A)){s(A.validate)?O.validate=x(A.validate):c(A.validate)?O.validate=A.validate:R(j,A),c(A.normalize)?O.normalize=A.normalize:A.normalize?R(j,A):O.normalize=D();return}if(i(A)){C.push(j);return}R(j,A)}),C.forEach(function(j){p.__compiled__[p.__schemas__[j]]&&(p.__compiled__[j].validate=p.__compiled__[p.__schemas__[j]].validate,p.__compiled__[j].normalize=p.__compiled__[p.__schemas__[j]].normalize)}),p.__compiled__[""]={validate:null,normalize:D()};const w=Object.keys(p.__compiled__).filter(function(j){return j.length>0&&p.__compiled__[j]}).map(d).join("|");p.re.schema_test=RegExp(`(^|(?!_)(?:[><|]|${l.src_ZPCc}))(${w})`,"i"),p.re.schema_search=RegExp(`(^|(?!_)(?:[><|]|${l.src_ZPCc}))(${w})`,"ig"),p.re.schema_at_start=RegExp(`^${p.re.schema_search.source}`,"i"),p.re.pretest=RegExp(`(${p.re.schema_test.source})|(${p.re.host_fuzzy_test.source})|@`,"i")}function b(p,l,k,_){const C=p.slice(k,_);this.schema=l.toLowerCase(),this.index=k,this.lastIndex=_,this.raw=C,this.text=C,this.url=C}function v(p,l){if(!(this instanceof v))return new v(p,l);l||m(p)&&(l=p,p={}),this.__opts__=n({},f,l),this.__schemas__=n({},y,p),this.__compiled__={},this.__tlds__=E,this.__tlds_replaced__=!1,this.re={},g(this)}return v.prototype.add=function(l,k){return this.__schemas__[l]=k,g(this),this},v.prototype.set=function(l){return this.__opts__=n(this.__opts__,l),this},v.prototype.test=function(l){if(!l.length)return!1;let k,_;if(this.re.schema_test.test(l)){for(_=this.re.schema_search,_.lastIndex=0;(k=_.exec(l))!==null;)if(this.testSchemaAt(l,k[2],_.lastIndex))return!0}return!!(this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&l.search(this.re.host_fuzzy_test)>=0&&l.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy)!==null||this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&l.indexOf("@")>=0&&l.match(this.re.email_fuzzy)!==null)},v.prototype.pretest=function(l){return this.re.pretest.test(l)},v.prototype.testSchemaAt=function(l,k,_){return this.__compiled__[k.toLowerCase()]?this.__compiled__[k.toLowerCase()].validate(l,_,this):0},v.prototype.match=function(l){const k=[],_=[],C=[],R=[];let w,j,A;function O(I,P){return I?P?I.index!==P.index?I.index<P.index?I:P:I.lastIndex>=P.lastIndex?I:P:I:P}if(!l.length)return null;if(this.re.schema_test.test(l))for(A=this.re.schema_search,A.lastIndex=0;(w=A.exec(l))!==null;)j=this.testSchemaAt(l,w[2],A.lastIndex),j&&_.push({schema:w[2],index:w.index+w[1].length,lastIndex:w.index+w[0].length+j});if(this.__opts__.fuzzyLink&&this.__compiled__["http:"])for(A=this.__opts__.fuzzyIP?this.re.link_fuzzy_global:this.re.link_no_ip_fuzzy_global,A.lastIndex=0;(w=A.exec(l))!==null;)C.push({schema:"",index:w.index+w[1].length,lastIndex:w.index+w[0].length});if(this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"])for(A=this.re.email_fuzzy_global,A.lastIndex=0;(w=A.exec(l))!==null;)R.push({schema:"mailto:",index:w.index+w[1].length,lastIndex:w.index+w[0].length});const $=[0,0,0];let z=0;for(;;){const I=[_[$[0]],R[$[1]],C[$[2]]],P=O(O(I[0],I[1]),I[2]);if(!P)break;if(P===I[0]?$[0]++:P===I[1]?$[1]++:$[2]++,P.index<z)continue;const H=new b(l,P.schema,P.index,P.lastIndex);this.__compiled__[H.schema].normalize(H,this),k.push(H),z=P.lastIndex}return k.length?k:null},v.prototype.matchAtStart=function(l){if(!l.length)return null;const k=this.re.schema_at_start.exec(l);if(!k)return null;const _=this.testSchemaAt(l,k[2],k[0].length);if(!_)return null;const C=new b(l,k[2],k.index+k[1].length,k.index+k[0].length+_);return this.__compiled__[C.schema].normalize(C,this),C},v.prototype.tlds=function(l,k){return l=Array.isArray(l)?l:[l],k?(this.__tlds__=this.__tlds__.concat(l).sort().filter(function(_,C,R){return _!==R[C-1]}).reverse(),g(this),this):(this.__tlds__=l.slice(),this.__tlds_replaced__=!0,g(this),this)},v.prototype.normalize=function(l){l.schema||(l.url=`http://${l.url}`),l.schema==="mailto:"&&!/^mailto:/i.test(l.url)&&(l.url=`mailto:${l.url}`)},v.prototype.onCompile=function(){},lt=v,lt}var dn;function zl(){if(dn)return ae;dn=1;var e=ae&&ae.__createBinding||(Object.create?(function(g,b,v,p){p===void 0&&(p=v);var l=Object.getOwnPropertyDescriptor(b,v);(!l||("get"in l?!b.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return b[v]}}),Object.defineProperty(g,p,l)}):(function(g,b,v,p){p===void 0&&(p=v),g[p]=b[v]})),t=ae&&ae.__setModuleDefault||(Object.create?(function(g,b){Object.defineProperty(g,"default",{enumerable:!0,value:b})}):function(g,b){g.default=b}),n=ae&&ae.__importStar||(function(){var g=function(b){return g=Object.getOwnPropertyNames||function(v){var p=[];for(var l in v)Object.prototype.hasOwnProperty.call(v,l)&&(p[p.length]=l);return p},g(b)};return function(b){if(b&&b.__esModule)return b;var v={};if(b!=null)for(var p=g(b),l=0;l<p.length;l++)p[l]!=="default"&&e(v,b,p[l]);return t(v,b),v}})(),a=ae&&ae.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(ae,"__esModule",{value:!0}),ae.default=x;const i=a(Al()),r=Nl(),s=a(Tl()),c=n(Vi());function d(g,b=!1){return g=(0,r.escapeCarriageReturn)(D(g)),i.default.ansiToJson(g,{json:!0,remove_empty:!0,use_classes:b})}function f(g){let b="";return g.bg&&(b+=`${g.bg}-bg `),g.fg&&(b+=`${g.fg}-fg `),g.decoration&&(b+=`ansi-${g.decoration} `),b===""?null:(b=b.substring(0,b.length-1),b)}function m(g){const b={};switch(g.bg&&(b.backgroundColor=`rgb(${g.bg})`),g.fg&&(b.color=`rgb(${g.fg})`),g.decoration){case"bold":b.fontWeight="bold";break;case"dim":b.opacity="0.5";break;case"italic":b.fontStyle="italic";break;case"hidden":b.visibility="hidden";break;case"strikethrough":b.textDecoration="line-through";break;case"underline":b.textDecoration="underline";break;case"blink":b.textDecoration="blink";break}return b}function y(g,b,v,p){const l=b?null:m(v),k=b?f(v):null;return g?g==="fuzzy"?E(v,p,l,k):h(v,p,l,k):c.createElement("span",{style:l,key:p,className:k},v.content)}function h(g,b,v,p){const l=[],k=/(\s|^)(https?:\/\/(?:www\.|(?!www))[^\s.]+\.[^\s]{2,}|www\.[^\s]+\.[^\s]{2,})/g;let _=0,C;for(;(C=k.exec(g.content))!==null;){const[,R,w]=C,j=C.index+R.length;j>_&&l.push(g.content.substring(_,j));const A=w.startsWith("www.")?`http://${w}`:w;l.push(c.createElement("a",{key:_,href:A,target:"_blank"},`${w}`)),_=k.lastIndex}return _<g.content.length&&l.push(g.content.substring(_)),c.createElement("span",{style:v,key:b,className:p},l)}function E(g,b,v,p){var l;const k=(0,s.default)({fuzzyEmail:!1}).tlds(["io"],!0);if(!k.pretest(g.content))return c.createElement("span",{style:v,key:b,className:p},g.content);const _=k.match(g.content);if(!_)return c.createElement("span",{style:v,key:b,className:p},g.content);const C=[g.content.substring(0,(l=_[0])===null||l===void 0?void 0:l.index)];return _.forEach((R,w)=>{var j;C.push(c.createElement("a",{href:R.url,target:"_blank",key:w},g.content.substring(R.index,R.lastIndex))),_[w+1]&&C.push(g.content.substring(_[w].lastIndex,(j=_[w+1])===null||j===void 0?void 0:j.index))}),_[_.length-1].lastIndex!==g.content.length&&C.push(g.content.substring(_[_.length-1].lastIndex,g.content.length)),c.createElement("span",{style:v,key:b,className:p},C)}function x(g){const{className:b,useClasses:v,children:p,linkify:l}=g;return c.createElement("code",{className:b},d(p??"",v??!1).map(y.bind(null,l??!1,v??!1)))}function D(g){let b=g;do g=b,b=g.replace(/[^\n]\x08/gm,"");while(b.length<g.length);return g}return ae}var Sl=zl();const Il=An(Sl),Ol=u.lazy(()=>Sn(()=>import("./index-BTGRc0hC.js"),__vite__mapDeps([26,1,2,27]))),Ll={...jl,container:"bg-transparent text-xs font-mono leading-relaxed",label:"text-muted-foreground font-medium mr-1",clickableLabel:"text-muted-foreground font-medium mr-1 cursor-pointer",nullValue:"text-muted-foreground italic",undefinedValue:"text-muted-foreground italic",stringValue:"text-foreground",booleanValue:"text-amber-400",numberValue:"text-blue-400",otherValue:"text-muted-foreground",punctuation:"text-muted-foreground",collapseIcon:'text-muted-foreground mr-1 cursor-pointer text-[1.2em] select-none after:content-["▾"]',expandIcon:'text-muted-foreground mr-1 cursor-pointer text-[1.2em] select-none after:content-["▸"]',collapsedContent:'text-muted-foreground mr-1 cursor-pointer after:text-[0.8em] after:content-["…"]'},pn=5120;function Bl(e){try{const t=JSON.parse(e);return typeof t=="object"&&t!==null&&("old_string"in t||"new_string"in t)?t:null}catch{return null}}function ct({children:e,rawContent:t,supportsRawToggle:n,isRaw:a,onToggleRaw:i}){const[r,s]=u.useState(!1),c=t.length>pn,d=c&&!r?t.slice(0,pn):t;return o.jsxs("div",{className:"space-y-1",children:[n&&o.jsx("div",{className:"flex justify-end",children:o.jsx("button",{onClick:i,className:"text-muted-foreground hover:text-foreground text-xs underline",children:a?"Formatted":"Raw"})}),a?o.jsxs(o.Fragment,{children:[o.jsx("pre",{className:"max-h-64 overflow-y-auto text-xs whitespace-pre-wrap",children:d}),c&&!r&&o.jsxs("button",{onClick:()=>s(!0),className:"text-muted-foreground hover:text-foreground text-xs underline",children:["Show full output (",(t.length/1024).toFixed(1),"KB)"]})]}):e]})}function $l({oldValue:e,newValue:t,rawContent:n}){return o.jsx(u.Suspense,{fallback:o.jsx("pre",{className:"max-h-64 overflow-y-auto text-xs whitespace-pre-wrap",children:n}),children:o.jsx(Ol,{oldValue:e,newValue:t,splitView:!1,useDarkTheme:!0,hideLineNumbers:!0,showDiffOnly:!0,extraLinesSurroundingDiff:2,styles:{variables:{dark:{diffViewerBackground:"transparent",addedBackground:"rgba(34, 197, 94, 0.1)",addedColor:"rgb(134, 239, 172)",addedGutterBackground:"rgba(34, 197, 94, 0.08)",wordAddedBackground:"rgba(34, 197, 94, 0.2)",removedBackground:"rgba(239, 68, 68, 0.1)",removedColor:"rgb(252, 165, 165)",removedGutterBackground:"rgba(239, 68, 68, 0.08)",wordRemovedBackground:"rgba(239, 68, 68, 0.2)",gutterBackground:"hsl(0 0% 9%)",gutterBackgroundDark:"hsl(0 0% 7%)",gutterColor:"hsl(0 0% 40%)"}}}})})}function Uc({content:e,toolName:t,input:n}){const[a,i]=u.useState(!1);if(t==="Edit"&&n){const s=Bl(n);if(s)return o.jsx($l,{oldValue:s.old_string??"",newValue:s.new_string??"",rawContent:e})}const r=yr(e);if(r==="json"){let s;try{s=JSON.parse(e)}catch{s={}}return o.jsx(ct,{rawContent:e,supportsRawToggle:!0,isRaw:a,onToggleRaw:()=>i(c=>!c),children:o.jsx(Cl,{data:s,style:Ll,shouldExpandNode:Fl})})}return r==="ansi"?o.jsx(ct,{rawContent:e,supportsRawToggle:!0,isRaw:a,onToggleRaw:()=>i(s=>!s),children:o.jsx("pre",{className:"max-h-64 overflow-y-auto text-xs whitespace-pre-wrap",children:o.jsx(Il,{children:e})})}):o.jsx(ct,{rawContent:e,supportsRawToggle:!1,isRaw:!0,onToggleRaw:()=>{},children:null})}const mn=Et(e=>({episodes:new Set,choose:t=>e(n=>n.episodes.has(t)?n:{episodes:new Set([...n.episodes,t])})}));function Ml(e,t){return`${e}\0${t}`}function Zc(e,t){const n=t===null?null:Ml(e,t),a=mn(r=>n!==null&&r.episodes.has(n)),i=mn(r=>r.choose);return{continuedHere:a,continueHere:()=>{n!==null&&i(n)}}}const Pl=/\|\||&&|;|\|/,ql=/<<|>/,fn=60;function Hl(e){if(!e)return null;try{const t=JSON.parse(e);return typeof t=="object"&&t!==null&&!Array.isArray(t)?t:null}catch{return null}}function pe(e,t){const n=e[t];return typeof n=="string"&&n.length>0?n:void 0}function Kl(e,t){const n=e.split(`
|
|
27
|
+
`+n(i.slice(r+1))}return Se.exports=e,Se.exports.escapeCarriageReturn=e,Se.exports.escapeCarriageReturnSafe=a,Se.exports}var ke={},cn;function Rl(){if(cn)return ke;cn=1;var e=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,t=/[\0-\x1F\x7F-\x9F]/,n=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,a=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,i=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,r=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;return ke.Any=e,ke.Cc=t,ke.Cf=n,ke.P=a,ke.S=i,ke.Z=r,ke}var lt,un;function Tl(){if(un)return lt;un=1;var e=Rl();function t(p){const l={};p=p||{},l.src_Any=e.Any.source,l.src_Cc=e.Cc.source,l.src_Z=e.Z.source,l.src_P=e.P.source,l.src_ZPCc=[l.src_Z,l.src_P,l.src_Cc].join("|"),l.src_ZCc=[l.src_Z,l.src_Cc].join("|");const k="[><|]";return l.src_pseudo_letter=`(?:(?!${k}|${l.src_ZPCc})${l.src_Any})`,l.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",l.src_auth=`(?:(?:(?!${l.src_ZCc}|[@/\\[\\]()]).){1,50}@)?`,l.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",l.src_host_terminator=`(?=$|${k}|${l.src_ZPCc})(?!${p["---"]?"-(?!--)|":"-|"}_|:\\d|\\.-|\\.(?!$|${l.src_ZPCc}))`,l.src_path=`(?:[/?#](?:(?!${l.src_ZCc}|${k}|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!${l.src_ZCc}|\\]).)*\\]|\\((?:(?!${l.src_ZCc}|[)]).)*\\)|\\{(?:(?!${l.src_ZCc}|[}]).)*\\}|\\"(?:(?!${l.src_ZCc}|["]).)+\\"|\\'(?:(?!${l.src_ZCc}|[']).)+\\'|\\'(?=${l.src_pseudo_letter}|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!${l.src_ZCc}|[.]|$)|`+(p["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+`,(?!${l.src_ZCc}|$)|;(?!${l.src_ZCc}|$)|\\!+(?!${l.src_ZCc}|[!]|$)|\\?(?!${l.src_ZCc}|[?]|$))+|\\/)?`,l.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]{0,63}',l.src_xn="xn--[a-z0-9\\-]{1,59}",l.src_domain_root="(?:"+l.src_xn+`|${l.src_pseudo_letter}{1,63})`,l.src_domain="(?:"+l.src_xn+`|(?:${l.src_pseudo_letter})|(?:${l.src_pseudo_letter}(?:-|${l.src_pseudo_letter}){0,61}${l.src_pseudo_letter}))`,l.src_host=`(?:(?:(?:(?:${l.src_domain})\\.)*${l.src_domain}))`,l.tpl_host_fuzzy="(?:"+l.src_ip4+`|(?:(?:(?:${l.src_domain})\\.)+(?:%TLDS%)))`,l.tpl_host_no_ip_fuzzy=`(?:(?:(?:${l.src_domain})\\.)+(?:%TLDS%))`,l.src_host_strict=l.src_host+l.src_host_terminator,l.tpl_host_fuzzy_strict=l.tpl_host_fuzzy+l.src_host_terminator,l.src_host_port_strict=l.src_host+l.src_port+l.src_host_terminator,l.tpl_host_port_fuzzy_strict=l.tpl_host_fuzzy+l.src_port+l.src_host_terminator,l.tpl_host_port_no_ip_fuzzy_strict=l.tpl_host_no_ip_fuzzy+l.src_port+l.src_host_terminator,l.tpl_host_fuzzy_test=`localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:${l.src_ZPCc}|>|$))`,l.tpl_email_fuzzy=`(^|${k}|"|\\(|${l.src_ZCc})(${l.src_email_name}@${l.tpl_host_fuzzy_strict})`,l.tpl_link_fuzzy=`(^|(?![.:/\\-_@])(?:[$+<=>^\`||]|${l.src_ZPCc}))((?![$+<=>^\`||])${l.tpl_host_port_fuzzy_strict}${l.src_path})`,l.tpl_link_no_ip_fuzzy=`(^|(?![.:/\\-_@])(?:[$+<=>^\`||]|${l.src_ZPCc}))((?![$+<=>^\`||])${l.tpl_host_port_no_ip_fuzzy_strict}${l.src_path})`,l}function n(p){return Array.prototype.slice.call(arguments,1).forEach(function(k){k&&Object.keys(k).forEach(function(_){p[_]=k[_]})}),p}function a(p){return Object.prototype.toString.call(p)}function i(p){return a(p)==="[object String]"}function r(p){return a(p)==="[object Object]"}function s(p){return a(p)==="[object RegExp]"}function c(p){return a(p)==="[object Function]"}function d(p){return p.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const f={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function m(p){return Object.keys(p||{}).reduce(function(l,k){return l||f.hasOwnProperty(k)},!1)}const y={"http:":{validate:function(p,l,k){const _=p.slice(l);return k.re.http||(k.re.http=new RegExp(`^\\/\\/${k.re.src_auth}${k.re.src_host_port_strict}${k.re.src_path}`,"i")),k.re.http.test(_)?_.match(k.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(p,l,k){const _=p.slice(l);return k.re.no_http||(k.re.no_http=new RegExp("^"+k.re.src_auth+`(?:localhost|(?:(?:${k.re.src_domain})\\.)+${k.re.src_domain_root})`+k.re.src_port+k.re.src_host_terminator+k.re.src_path,"i")),k.re.no_http.test(_)?l>=3&&p[l-3]===":"||l>=3&&p[l-3]==="/"?0:_.match(k.re.no_http)[0].length:0}},"mailto:":{validate:function(p,l,k){const _=p.slice(l);return k.re.mailto||(k.re.mailto=new RegExp(`^${k.re.src_email_name}@${k.re.src_host_strict}`,"i")),k.re.mailto.test(_)?_.match(k.re.mailto)[0].length:0}}},h="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",E="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function x(p){return function(l,k){const _=l.slice(k);return p.test(_)?_.match(p)[0].length:0}}function D(){return function(p,l){l.normalize(p)}}function g(p){const l=p.re=t(p.__opts__),k=p.__tlds__.slice();p.onCompile(),p.__tlds_replaced__||k.push(h),k.push(l.src_xn),l.src_tlds=k.join("|");function _(j){return j.replace("%TLDS%",l.src_tlds)}l.email_fuzzy=RegExp(_(l.tpl_email_fuzzy),"i"),l.email_fuzzy_global=RegExp(_(l.tpl_email_fuzzy),"ig"),l.link_fuzzy=RegExp(_(l.tpl_link_fuzzy),"i"),l.link_fuzzy_global=RegExp(_(l.tpl_link_fuzzy),"ig"),l.link_no_ip_fuzzy=RegExp(_(l.tpl_link_no_ip_fuzzy),"i"),l.link_no_ip_fuzzy_global=RegExp(_(l.tpl_link_no_ip_fuzzy),"ig"),l.host_fuzzy_test=RegExp(_(l.tpl_host_fuzzy_test),"i");const C=[];p.__compiled__={};function R(j,A){throw new Error(`(LinkifyIt) Invalid schema "${j}": ${A}`)}Object.keys(p.__schemas__).forEach(function(j){const A=p.__schemas__[j];if(A===null)return;const O={validate:null,link:null};if(p.__compiled__[j]=O,r(A)){s(A.validate)?O.validate=x(A.validate):c(A.validate)?O.validate=A.validate:R(j,A),c(A.normalize)?O.normalize=A.normalize:A.normalize?R(j,A):O.normalize=D();return}if(i(A)){C.push(j);return}R(j,A)}),C.forEach(function(j){p.__compiled__[p.__schemas__[j]]&&(p.__compiled__[j].validate=p.__compiled__[p.__schemas__[j]].validate,p.__compiled__[j].normalize=p.__compiled__[p.__schemas__[j]].normalize)}),p.__compiled__[""]={validate:null,normalize:D()};const w=Object.keys(p.__compiled__).filter(function(j){return j.length>0&&p.__compiled__[j]}).map(d).join("|");p.re.schema_test=RegExp(`(^|(?!_)(?:[><|]|${l.src_ZPCc}))(${w})`,"i"),p.re.schema_search=RegExp(`(^|(?!_)(?:[><|]|${l.src_ZPCc}))(${w})`,"ig"),p.re.schema_at_start=RegExp(`^${p.re.schema_search.source}`,"i"),p.re.pretest=RegExp(`(${p.re.schema_test.source})|(${p.re.host_fuzzy_test.source})|@`,"i")}function b(p,l,k,_){const C=p.slice(k,_);this.schema=l.toLowerCase(),this.index=k,this.lastIndex=_,this.raw=C,this.text=C,this.url=C}function v(p,l){if(!(this instanceof v))return new v(p,l);l||m(p)&&(l=p,p={}),this.__opts__=n({},f,l),this.__schemas__=n({},y,p),this.__compiled__={},this.__tlds__=E,this.__tlds_replaced__=!1,this.re={},g(this)}return v.prototype.add=function(l,k){return this.__schemas__[l]=k,g(this),this},v.prototype.set=function(l){return this.__opts__=n(this.__opts__,l),this},v.prototype.test=function(l){if(!l.length)return!1;let k,_;if(this.re.schema_test.test(l)){for(_=this.re.schema_search,_.lastIndex=0;(k=_.exec(l))!==null;)if(this.testSchemaAt(l,k[2],_.lastIndex))return!0}return!!(this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&l.search(this.re.host_fuzzy_test)>=0&&l.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy)!==null||this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&l.indexOf("@")>=0&&l.match(this.re.email_fuzzy)!==null)},v.prototype.pretest=function(l){return this.re.pretest.test(l)},v.prototype.testSchemaAt=function(l,k,_){return this.__compiled__[k.toLowerCase()]?this.__compiled__[k.toLowerCase()].validate(l,_,this):0},v.prototype.match=function(l){const k=[],_=[],C=[],R=[];let w,j,A;function O(I,P){return I?P?I.index!==P.index?I.index<P.index?I:P:I.lastIndex>=P.lastIndex?I:P:I:P}if(!l.length)return null;if(this.re.schema_test.test(l))for(A=this.re.schema_search,A.lastIndex=0;(w=A.exec(l))!==null;)j=this.testSchemaAt(l,w[2],A.lastIndex),j&&_.push({schema:w[2],index:w.index+w[1].length,lastIndex:w.index+w[0].length+j});if(this.__opts__.fuzzyLink&&this.__compiled__["http:"])for(A=this.__opts__.fuzzyIP?this.re.link_fuzzy_global:this.re.link_no_ip_fuzzy_global,A.lastIndex=0;(w=A.exec(l))!==null;)C.push({schema:"",index:w.index+w[1].length,lastIndex:w.index+w[0].length});if(this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"])for(A=this.re.email_fuzzy_global,A.lastIndex=0;(w=A.exec(l))!==null;)R.push({schema:"mailto:",index:w.index+w[1].length,lastIndex:w.index+w[0].length});const $=[0,0,0];let z=0;for(;;){const I=[_[$[0]],R[$[1]],C[$[2]]],P=O(O(I[0],I[1]),I[2]);if(!P)break;if(P===I[0]?$[0]++:P===I[1]?$[1]++:$[2]++,P.index<z)continue;const H=new b(l,P.schema,P.index,P.lastIndex);this.__compiled__[H.schema].normalize(H,this),k.push(H),z=P.lastIndex}return k.length?k:null},v.prototype.matchAtStart=function(l){if(!l.length)return null;const k=this.re.schema_at_start.exec(l);if(!k)return null;const _=this.testSchemaAt(l,k[2],k[0].length);if(!_)return null;const C=new b(l,k[2],k.index+k[1].length,k.index+k[0].length+_);return this.__compiled__[C.schema].normalize(C,this),C},v.prototype.tlds=function(l,k){return l=Array.isArray(l)?l:[l],k?(this.__tlds__=this.__tlds__.concat(l).sort().filter(function(_,C,R){return _!==R[C-1]}).reverse(),g(this),this):(this.__tlds__=l.slice(),this.__tlds_replaced__=!0,g(this),this)},v.prototype.normalize=function(l){l.schema||(l.url=`http://${l.url}`),l.schema==="mailto:"&&!/^mailto:/i.test(l.url)&&(l.url=`mailto:${l.url}`)},v.prototype.onCompile=function(){},lt=v,lt}var dn;function zl(){if(dn)return ae;dn=1;var e=ae&&ae.__createBinding||(Object.create?(function(g,b,v,p){p===void 0&&(p=v);var l=Object.getOwnPropertyDescriptor(b,v);(!l||("get"in l?!b.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return b[v]}}),Object.defineProperty(g,p,l)}):(function(g,b,v,p){p===void 0&&(p=v),g[p]=b[v]})),t=ae&&ae.__setModuleDefault||(Object.create?(function(g,b){Object.defineProperty(g,"default",{enumerable:!0,value:b})}):function(g,b){g.default=b}),n=ae&&ae.__importStar||(function(){var g=function(b){return g=Object.getOwnPropertyNames||function(v){var p=[];for(var l in v)Object.prototype.hasOwnProperty.call(v,l)&&(p[p.length]=l);return p},g(b)};return function(b){if(b&&b.__esModule)return b;var v={};if(b!=null)for(var p=g(b),l=0;l<p.length;l++)p[l]!=="default"&&e(v,b,p[l]);return t(v,b),v}})(),a=ae&&ae.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(ae,"__esModule",{value:!0}),ae.default=x;const i=a(Al()),r=Nl(),s=a(Tl()),c=n(Vi());function d(g,b=!1){return g=(0,r.escapeCarriageReturn)(D(g)),i.default.ansiToJson(g,{json:!0,remove_empty:!0,use_classes:b})}function f(g){let b="";return g.bg&&(b+=`${g.bg}-bg `),g.fg&&(b+=`${g.fg}-fg `),g.decoration&&(b+=`ansi-${g.decoration} `),b===""?null:(b=b.substring(0,b.length-1),b)}function m(g){const b={};switch(g.bg&&(b.backgroundColor=`rgb(${g.bg})`),g.fg&&(b.color=`rgb(${g.fg})`),g.decoration){case"bold":b.fontWeight="bold";break;case"dim":b.opacity="0.5";break;case"italic":b.fontStyle="italic";break;case"hidden":b.visibility="hidden";break;case"strikethrough":b.textDecoration="line-through";break;case"underline":b.textDecoration="underline";break;case"blink":b.textDecoration="blink";break}return b}function y(g,b,v,p){const l=b?null:m(v),k=b?f(v):null;return g?g==="fuzzy"?E(v,p,l,k):h(v,p,l,k):c.createElement("span",{style:l,key:p,className:k},v.content)}function h(g,b,v,p){const l=[],k=/(\s|^)(https?:\/\/(?:www\.|(?!www))[^\s.]+\.[^\s]{2,}|www\.[^\s]+\.[^\s]{2,})/g;let _=0,C;for(;(C=k.exec(g.content))!==null;){const[,R,w]=C,j=C.index+R.length;j>_&&l.push(g.content.substring(_,j));const A=w.startsWith("www.")?`http://${w}`:w;l.push(c.createElement("a",{key:_,href:A,target:"_blank"},`${w}`)),_=k.lastIndex}return _<g.content.length&&l.push(g.content.substring(_)),c.createElement("span",{style:v,key:b,className:p},l)}function E(g,b,v,p){var l;const k=(0,s.default)({fuzzyEmail:!1}).tlds(["io"],!0);if(!k.pretest(g.content))return c.createElement("span",{style:v,key:b,className:p},g.content);const _=k.match(g.content);if(!_)return c.createElement("span",{style:v,key:b,className:p},g.content);const C=[g.content.substring(0,(l=_[0])===null||l===void 0?void 0:l.index)];return _.forEach((R,w)=>{var j;C.push(c.createElement("a",{href:R.url,target:"_blank",key:w},g.content.substring(R.index,R.lastIndex))),_[w+1]&&C.push(g.content.substring(_[w].lastIndex,(j=_[w+1])===null||j===void 0?void 0:j.index))}),_[_.length-1].lastIndex!==g.content.length&&C.push(g.content.substring(_[_.length-1].lastIndex,g.content.length)),c.createElement("span",{style:v,key:b,className:p},C)}function x(g){const{className:b,useClasses:v,children:p,linkify:l}=g;return c.createElement("code",{className:b},d(p??"",v??!1).map(y.bind(null,l??!1,v??!1)))}function D(g){let b=g;do g=b,b=g.replace(/[^\n]\x08/gm,"");while(b.length<g.length);return g}return ae}var Sl=zl();const Il=An(Sl),Ol=u.lazy(()=>Sn(()=>import("./index-COoO8dzi.js"),__vite__mapDeps([26,1,2,27]))),Ll={...jl,container:"bg-transparent text-xs font-mono leading-relaxed",label:"text-muted-foreground font-medium mr-1",clickableLabel:"text-muted-foreground font-medium mr-1 cursor-pointer",nullValue:"text-muted-foreground italic",undefinedValue:"text-muted-foreground italic",stringValue:"text-foreground",booleanValue:"text-amber-400",numberValue:"text-blue-400",otherValue:"text-muted-foreground",punctuation:"text-muted-foreground",collapseIcon:'text-muted-foreground mr-1 cursor-pointer text-[1.2em] select-none after:content-["▾"]',expandIcon:'text-muted-foreground mr-1 cursor-pointer text-[1.2em] select-none after:content-["▸"]',collapsedContent:'text-muted-foreground mr-1 cursor-pointer after:text-[0.8em] after:content-["…"]'},pn=5120;function Bl(e){try{const t=JSON.parse(e);return typeof t=="object"&&t!==null&&("old_string"in t||"new_string"in t)?t:null}catch{return null}}function ct({children:e,rawContent:t,supportsRawToggle:n,isRaw:a,onToggleRaw:i}){const[r,s]=u.useState(!1),c=t.length>pn,d=c&&!r?t.slice(0,pn):t;return o.jsxs("div",{className:"space-y-1",children:[n&&o.jsx("div",{className:"flex justify-end",children:o.jsx("button",{onClick:i,className:"text-muted-foreground hover:text-foreground text-xs underline",children:a?"Formatted":"Raw"})}),a?o.jsxs(o.Fragment,{children:[o.jsx("pre",{className:"max-h-64 overflow-y-auto text-xs whitespace-pre-wrap",children:d}),c&&!r&&o.jsxs("button",{onClick:()=>s(!0),className:"text-muted-foreground hover:text-foreground text-xs underline",children:["Show full output (",(t.length/1024).toFixed(1),"KB)"]})]}):e]})}function $l({oldValue:e,newValue:t,rawContent:n}){return o.jsx(u.Suspense,{fallback:o.jsx("pre",{className:"max-h-64 overflow-y-auto text-xs whitespace-pre-wrap",children:n}),children:o.jsx(Ol,{oldValue:e,newValue:t,splitView:!1,useDarkTheme:!0,hideLineNumbers:!0,showDiffOnly:!0,extraLinesSurroundingDiff:2,styles:{variables:{dark:{diffViewerBackground:"transparent",addedBackground:"rgba(34, 197, 94, 0.1)",addedColor:"rgb(134, 239, 172)",addedGutterBackground:"rgba(34, 197, 94, 0.08)",wordAddedBackground:"rgba(34, 197, 94, 0.2)",removedBackground:"rgba(239, 68, 68, 0.1)",removedColor:"rgb(252, 165, 165)",removedGutterBackground:"rgba(239, 68, 68, 0.08)",wordRemovedBackground:"rgba(239, 68, 68, 0.2)",gutterBackground:"hsl(0 0% 9%)",gutterBackgroundDark:"hsl(0 0% 7%)",gutterColor:"hsl(0 0% 40%)"}}}})})}function Uc({content:e,toolName:t,input:n}){const[a,i]=u.useState(!1);if(t==="Edit"&&n){const s=Bl(n);if(s)return o.jsx($l,{oldValue:s.old_string??"",newValue:s.new_string??"",rawContent:e})}const r=yr(e);if(r==="json"){let s;try{s=JSON.parse(e)}catch{s={}}return o.jsx(ct,{rawContent:e,supportsRawToggle:!0,isRaw:a,onToggleRaw:()=>i(c=>!c),children:o.jsx(Cl,{data:s,style:Ll,shouldExpandNode:Fl})})}return r==="ansi"?o.jsx(ct,{rawContent:e,supportsRawToggle:!0,isRaw:a,onToggleRaw:()=>i(s=>!s),children:o.jsx("pre",{className:"max-h-64 overflow-y-auto text-xs whitespace-pre-wrap",children:o.jsx(Il,{children:e})})}):o.jsx(ct,{rawContent:e,supportsRawToggle:!1,isRaw:!0,onToggleRaw:()=>{},children:null})}const mn=Et(e=>({episodes:new Set,choose:t=>e(n=>n.episodes.has(t)?n:{episodes:new Set([...n.episodes,t])})}));function Ml(e,t){return`${e}\0${t}`}function Zc(e,t){const n=t===null?null:Ml(e,t),a=mn(r=>n!==null&&r.episodes.has(n)),i=mn(r=>r.choose);return{continuedHere:a,continueHere:()=>{n!==null&&i(n)}}}const Pl=/\|\||&&|;|\|/,ql=/<<|>/,fn=60;function Hl(e){if(!e)return null;try{const t=JSON.parse(e);return typeof t=="object"&&t!==null&&!Array.isArray(t)?t:null}catch{return null}}function pe(e,t){const n=e[t];return typeof n=="string"&&n.length>0?n:void 0}function Kl(e,t){const n=e.split(`
|
|
28
28
|
`),a=t.split(`
|
|
29
29
|
`);let i=0;for(;i<n.length&&i<a.length&&n[i]===a[i];)i++;let r=0;for(;r<n.length-i&&r<a.length-i&&n[n.length-1-r]===a[a.length-1-r];)r++;const s=i+r;return{additions:Math.max(0,a.length-s),deletions:Math.max(0,n.length-s)}}function bt(e){const t=e.old_string,n=e.new_string;if(!(typeof t!="string"&&typeof n!="string"))return Kl(typeof t=="string"?t:"",typeof n=="string"?n:"")}function Vl(e){const t=e.edits;if(!Array.isArray(t))return bt(e);let n=0,a=0,i=!1;for(const r of t){if(typeof r!="object"||r===null)continue;const s=bt(r);s&&(n+=s.additions,a+=s.deletions,i=!0)}return i?{additions:n,deletions:a}:void 0}function Wl(e){return e?` +${e.additions} −${e.deletions}`:""}function Gl(e){return e.length===0?0:e.replace(/\n$/,"").split(`
|
|
30
30
|
`).length}function Da(e){const t=e.replace(/\/+$/,"");if(t.length===0)return e;const n=t.startsWith("/"),a=[];for(const r of t.split("/"))if(!(r===""||r===".")){if(r===".."){const s=a[a.length-1];s!==void 0&&s!==".."?a.pop():n||a.push("..");continue}a.push(r)}const i=a.join("/");return i.length===0?n?"/":e:n?`/${i}`:i}function Ul(e,t){if(e===t)return!0;const n=e.startsWith("/")?e:t,a=e.startsWith("/")?t:e;return!n.startsWith("/")||a.startsWith("/")?!1:n.endsWith(`/${a}`)}function _a(e){const t=Da(e).split("/");return t[t.length-1]||e}function Zl(e){try{const t=new URL(e);return t.hash="",t.toString()}catch{return e}}function Jl(e){try{return new URL(e).hostname.replace(/^www\./,"")}catch{return e}}function Yl(e){if(!e)return;const t=e.trim();if(t.length===0)return;if(/^no (matches|files)/i.test(t))return 0;const n=/^(\d+)$/.exec(t);if(n)return Number(n[1]);const a=/(\d+)\s+(?:matches?|lines?)/i.exec(t);if(a)return Number(a[1]);if(!/\d+\s+files?/i.test(t))return t.split(`
|