@ensocode/server 0.3.5 → 0.3.6
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/out/phone/assets/{abnfDiagram-VCTEODGH-k76opPl1.js → abnfDiagram-VCTEODGH-CcwMwkZ2.js} +1 -1
- package/out/phone/assets/architecture-7GRP2DOG-K5Dyn6vg.js +1 -0
- package/out/phone/assets/{architectureDiagram-5GKGNRK7-yxQH9IuZ.js → architectureDiagram-5GKGNRK7-C4vXoVVW.js} +1 -1
- package/out/phone/assets/{blockDiagram-I7D4REHJ-DoHteZpO.js → blockDiagram-I7D4REHJ-btZonF7x.js} +1 -1
- package/out/phone/assets/{c4Diagram-7LVT6UL2-DQVO6L4q.js → c4Diagram-7LVT6UL2-wbgQC5h_.js} +1 -1
- package/out/phone/assets/channel-C0dO6zWg.js +1 -0
- package/out/phone/assets/{chunk-4HAMMTFA-N9Rw4SGW.js → chunk-4HAMMTFA-ClL6ufY7.js} +1 -1
- package/out/phone/assets/{chunk-75Z2AOVW-DKJ8pOxp.js → chunk-75Z2AOVW-CsGKueom.js} +1 -1
- package/out/phone/assets/{chunk-DU6HZSFF-BqGW8Nbd.js → chunk-DU6HZSFF-BOrl8wD9.js} +1 -1
- package/out/phone/assets/{chunk-F27PBJKO-PkFmkghF.js → chunk-F27PBJKO-CQYtYMPT.js} +1 -1
- package/out/phone/assets/{chunk-GMAD6QVW-C9VeD3Jk.js → chunk-GMAD6QVW-D2uUUIys.js} +1 -1
- package/out/phone/assets/{chunk-GVQU2GXP-COhntOeE.js → chunk-GVQU2GXP-k4NEAgCW.js} +1 -1
- package/out/phone/assets/{chunk-IMKFNOWR-B87ghLVD.js → chunk-IMKFNOWR-DGBKnQoB.js} +1 -1
- package/out/phone/assets/{chunk-L3NEJ4N5-C3N2izjg.js → chunk-L3NEJ4N5-BrOC_Q4h.js} +1 -1
- package/out/phone/assets/{chunk-OSK3NFVY-DaAlvVhz.js → chunk-OSK3NFVY-Cpg-5-0Y.js} +1 -1
- package/out/phone/assets/{chunk-P2QGCYS3-BQpKr8IZ.js → chunk-P2QGCYS3-Cwbos3wS.js} +1 -1
- package/out/phone/assets/{chunk-POPQ4Y6H-B2TZMY6U.js → chunk-POPQ4Y6H-CtPqYixr.js} +1 -1
- package/out/phone/assets/{chunk-PWAF6VOD-CgRhpUJy.js → chunk-PWAF6VOD-HDvh5SEv.js} +1 -1
- package/out/phone/assets/{chunk-SHT3W25Y-BySMFA99.js → chunk-SHT3W25Y-DKgmKLLr.js} +1 -1
- package/out/phone/assets/{chunk-SVP7TREG-EDGanDUX.js → chunk-SVP7TREG-DLVIWYD0.js} +1 -1
- package/out/phone/assets/{chunk-TICWLB2K-BtCZ8R2k.js → chunk-TICWLB2K-DzvrdWmw.js} +1 -1
- package/out/phone/assets/classDiagram-ZZMXUADV-CWPX0UEe.js +1 -0
- package/out/phone/assets/classDiagram-v2-VYDZK3BY-CWPX0UEe.js +1 -0
- package/out/phone/assets/{cynefin-OW5HDTMX-CdZmp44V.js → cynefin-OW5HDTMX-Cx32WN9e.js} +1 -1
- package/out/phone/assets/{cynefinDiagram-5FMLGOSQ-BCz9KwUb.js → cynefinDiagram-5FMLGOSQ-k3jOnfBl.js} +1 -1
- package/out/phone/assets/{dagre-GXQ25YYZ-CgFeNgh6.js → dagre-GXQ25YYZ-CTEzzJig.js} +1 -1
- package/out/phone/assets/{desk-C_b7mE6l.js → desk-9dPB4fYu.js} +1 -1
- package/out/phone/assets/{diagram-S7CK7UJ4-CwvaZIBf.js → diagram-S7CK7UJ4-BpfiB5rc.js} +1 -1
- package/out/phone/assets/{diagram-UQ7AKVKN-DqnD4XoZ.js → diagram-UQ7AKVKN-BpJj6V2i.js} +1 -1
- package/out/phone/assets/{diagram-VSXAHHWV-Kqc9GudQ.js → diagram-VSXAHHWV-BXTUks5P.js} +1 -1
- package/out/phone/assets/{diagram-VX7I27RA-B_0DLDQ0.js → diagram-VX7I27RA-BGaGiVKW.js} +1 -1
- package/out/phone/assets/{diagram-Z3DM3KII-CppKBEPW.js → diagram-Z3DM3KII-DhtDyIq2.js} +1 -1
- package/out/phone/assets/{ebnfDiagram-PWID7BFC-DeYPNCu9.js → ebnfDiagram-PWID7BFC-TUM8eXrc.js} +1 -1
- package/out/phone/assets/{erDiagram-RLTQ6QDP-MsfxDUmk.js → erDiagram-RLTQ6QDP-DqLrmkHj.js} +1 -1
- package/out/phone/assets/eventmodeling-NTZA5JFV-_H7VbKRu.js +1 -0
- package/out/phone/assets/flowDiagram-HODETNUW-HeI2O8Jm.js +1 -0
- package/out/phone/assets/{ganttDiagram-EL5Y4UJY-DaScS1os.js → ganttDiagram-EL5Y4UJY-Bfx_3wSL.js} +1 -1
- package/out/phone/assets/{gitGraph-4MIJSDKK-C-FzqpZm.js → gitGraph-4MIJSDKK-BByrtu13.js} +1 -1
- package/out/phone/assets/{gitGraphDiagram-WWUBYQGX-4Yv-hAwf.js → gitGraphDiagram-WWUBYQGX-DX-_HrkV.js} +1 -1
- package/out/phone/assets/{info-A6RAGUB7-CGLEP4t7.js → info-A6RAGUB7-B9AtEuqS.js} +1 -1
- package/out/phone/assets/{infoDiagram-27XIBGKW-DapEgYQa.js → infoDiagram-27XIBGKW-BlTJ4y54.js} +1 -1
- package/out/phone/assets/{ishikawaDiagram-5VMMS53U-D1B2lZSG.js → ishikawaDiagram-5VMMS53U-W8zt5UiH.js} +1 -1
- package/out/phone/assets/{journeyDiagram-3NMN7TZE-BSAtMVJw.js → journeyDiagram-3NMN7TZE-ClJSjx26.js} +1 -1
- package/out/phone/assets/{kanban-definition-UXKFOSKX-CfZ4oI7A.js → kanban-definition-UXKFOSKX-BPyXsdoL.js} +1 -1
- package/out/phone/assets/{line-DAXmUM4p.js → line-DMsvqHhd.js} +1 -1
- package/out/phone/assets/{main-B0yD1pMI.js → main-QdYtohlX.js} +4 -4
- package/out/phone/assets/{mermaid-parser.core-IObm7oM0.js → mermaid-parser.core-BteiwAAk.js} +3 -3
- package/out/phone/assets/{mermaid.core-C1wA-mhD.js → mermaid.core-BLIwkLpP.js} +4 -4
- package/out/phone/assets/{mindmap-definition-YA3MSWOX-3ph0EaB9.js → mindmap-definition-YA3MSWOX-CtvOuG70.js} +1 -1
- package/out/phone/assets/{packet-AYTQ26CC-BbDAe9Au.js → packet-AYTQ26CC-D9BlJkYf.js} +1 -1
- package/out/phone/assets/{pegDiagram-XKGWAZYB-EsuDcX_3.js → pegDiagram-XKGWAZYB-BCIWH2f6.js} +1 -1
- package/out/phone/assets/{pie-WAS4IAKB-BQfIj1fu.js → pie-WAS4IAKB-no-EBGVU.js} +1 -1
- package/out/phone/assets/{pieDiagram-E7YTZNPT-Cw19z5Ip.js → pieDiagram-E7YTZNPT-CSjCYWAz.js} +1 -1
- package/out/phone/assets/{quadrantDiagram-AXDQQJYC-Bqwz_sa8.js → quadrantDiagram-AXDQQJYC-Bh1Jh1q-.js} +1 -1
- package/out/phone/assets/{radar-RG4KPBEZ-Dmp-89iD.js → radar-RG4KPBEZ-BVweBCte.js} +1 -1
- package/out/phone/assets/{railroad-74A4TZTK-dq2H8w8Y.js → railroad-74A4TZTK-kUK_6AdA.js} +1 -1
- package/out/phone/assets/railroad-abnf-HS5TGJTU-Df9jtRyX.js +1 -0
- package/out/phone/assets/railroad-ebnf-LZEXJU2U-vjjsvYjl.js +1 -0
- package/out/phone/assets/railroad-peg-WCYAUIDC-DrKQG8aR.js +1 -0
- package/out/phone/assets/{railroadDiagram-O6MQD6OU-D2Sbc7Wn.js → railroadDiagram-O6MQD6OU-DDKZuEH9.js} +1 -1
- package/out/phone/assets/{requirementDiagram-BXWQKSXE-CLNUqxbl.js → requirementDiagram-BXWQKSXE-BAdrpp8Z.js} +1 -1
- package/out/phone/assets/{sankeyDiagram-P5KCCOFB-Dme5iwcw.js → sankeyDiagram-P5KCCOFB-Dm0dmnQJ.js} +1 -1
- package/out/phone/assets/{sequenceDiagram-WJ2MYXX4-C5dYSwPE.js → sequenceDiagram-WJ2MYXX4-DtN1lgR9.js} +1 -1
- package/out/phone/assets/{stateDiagram-D77RDMKH-BuxkPvJ6.js → stateDiagram-D77RDMKH-m5U6QGoM.js} +1 -1
- package/out/phone/assets/stateDiagram-v2-MP3YSRHH-g06bNGjI.js +1 -0
- package/out/phone/assets/{swimlanes-42K2YHIH-DHyXnytv.js → swimlanes-42K2YHIH-jWtOgaZK.js} +1 -1
- package/out/phone/assets/swimlanesDiagram-VR7AAH4N-CwlfCnnJ.js +8 -0
- package/out/phone/assets/{timeline-definition-24CTP7MA-Bm8Z0u2Z.js → timeline-definition-24CTP7MA-CncsPQSQ.js} +1 -1
- package/out/phone/assets/{treeView-Q6P3EWNA-DFUxvDDO.js → treeView-Q6P3EWNA-BNIDY5fM.js} +1 -1
- package/out/phone/assets/{treemap-WGGIJYW6-CMC-hwzt.js → treemap-WGGIJYW6-FkDWRKqS.js} +1 -1
- package/out/phone/assets/{vennDiagram-4TSXK5OY-CNL4gZsd.js → vennDiagram-4TSXK5OY-CeyTscuj.js} +1 -1
- package/out/phone/assets/{wardley-WFR3VGLG-CHQoq9KJ.js → wardley-WFR3VGLG-CEuN_S8l.js} +1 -1
- package/out/phone/assets/{wardleyDiagram-VM6X3IG4-DAuBfK1O.js → wardleyDiagram-VM6X3IG4-DE3tgI7J.js} +1 -1
- package/out/phone/assets/{xychartDiagram-S5SC5T6Z-B2T9ECKd.js → xychartDiagram-S5SC5T6Z-Di64LYy0.js} +1 -1
- package/out/phone/desk.html +1 -1
- package/out/phone/index.html +1 -1
- package/out/renderer/assets/{abnfDiagram-VCTEODGH-gdhrQbX6.js → abnfDiagram-VCTEODGH-B7uu_Gw1.js} +1 -1
- package/out/renderer/assets/{arc-D6-Q4l2d.js → arc-CkW2-Pr7.js} +1 -1
- package/out/renderer/assets/{architectureDiagram-5GKGNRK7-C4y0SbLT.js → architectureDiagram-5GKGNRK7-2E0AYPn5.js} +1 -1
- package/out/renderer/assets/{blockDiagram-I7D4REHJ-DrsoSFRK.js → blockDiagram-I7D4REHJ-BsSmBeco.js} +1 -1
- package/out/renderer/assets/{c4Diagram-7LVT6UL2-1DD8BlM8.js → c4Diagram-7LVT6UL2-gzVW5Xek.js} +1 -1
- package/out/renderer/assets/channel-AuDXnH14.js +1 -0
- package/out/renderer/assets/{chunk-2Q5K7J3B-DRyc0B7g.js → chunk-2Q5K7J3B-K_IlhZEX.js} +1 -1
- package/out/renderer/assets/{chunk-5VM5RSS4-BJe8SghE.js → chunk-5VM5RSS4-r65AjBn5.js} +1 -1
- package/out/renderer/assets/{chunk-F27PBJKO-BIipq4SK.js → chunk-F27PBJKO-CZszqKBI.js} +1 -1
- package/out/renderer/assets/{chunk-IMKFNOWR-D5Ak3Xd9.js → chunk-IMKFNOWR-7mYCkNCZ.js} +1 -1
- package/out/renderer/assets/{chunk-JWPE2WC7-BcaWCpW-.js → chunk-JWPE2WC7-B-cBpNJA.js} +1 -1
- package/out/renderer/assets/{chunk-POPQ4Y6H-C1TwLrrN.js → chunk-POPQ4Y6H-CjWY4_mJ.js} +1 -1
- package/out/renderer/assets/{chunk-SVP7TREG-DDOXG_t3.js → chunk-SVP7TREG-g5p-RdlH.js} +1 -1
- package/out/renderer/assets/{chunk-TICWLB2K-BqT15hZi.js → chunk-TICWLB2K-BMr5sD7G.js} +1 -1
- package/out/renderer/assets/{chunk-XXDRQBXY-D01ts6SC.js → chunk-XXDRQBXY-CNfQgYe3.js} +1 -1
- package/out/renderer/assets/classDiagram-ZZMXUADV-D8JIsdAI.js +1 -0
- package/out/renderer/assets/classDiagram-v2-VYDZK3BY-D8JIsdAI.js +1 -0
- package/out/renderer/assets/{cose-bilkent-JH36ORCC-C7NVrT2_.js → cose-bilkent-JH36ORCC-ByPl0yeB.js} +1 -1
- package/out/renderer/assets/{cynefin-OW5HDTMX-2LxdFmSk.js → cynefin-OW5HDTMX-CMTgEepT.js} +1 -1
- package/out/renderer/assets/{cynefinDiagram-5FMLGOSQ-_AN_Mulc.js → cynefinDiagram-5FMLGOSQ-DYx_JMNT.js} +1 -1
- package/out/renderer/assets/{cytoscape-fcose-COZkZZmX.js → cytoscape-fcose-BcbfusAa.js} +1 -1
- package/out/renderer/assets/{dagre-GXQ25YYZ-BUTwlM6j.js → dagre-GXQ25YYZ-p-Meu2Lo.js} +1 -1
- package/out/renderer/assets/{diagram-S7CK7UJ4-CseZZ-y2.js → diagram-S7CK7UJ4-1m9BA3xi.js} +1 -1
- package/out/renderer/assets/{diagram-UQ7AKVKN-Cb7llS-8.js → diagram-UQ7AKVKN-Cg3zgAxc.js} +1 -1
- package/out/renderer/assets/{diagram-VSXAHHWV-CtuGqQvp.js → diagram-VSXAHHWV-B58Hl37z.js} +1 -1
- package/out/renderer/assets/{diagram-VX7I27RA-BA8eov-1.js → diagram-VX7I27RA-C7dhzeqr.js} +1 -1
- package/out/renderer/assets/{diagram-Z3DM3KII-VZOjj6Hg.js → diagram-Z3DM3KII-C-Bn7OHR.js} +1 -1
- package/out/renderer/assets/{ebnfDiagram-PWID7BFC-YBIrle6d.js → ebnfDiagram-PWID7BFC-BcrVBxSI.js} +1 -1
- package/out/renderer/assets/{erDiagram-RLTQ6QDP-BiKyPEqW.js → erDiagram-RLTQ6QDP-CZHJHTxr.js} +1 -1
- package/out/renderer/assets/{flowDiagram-HODETNUW-7wmZyLHw.js → flowDiagram-HODETNUW-oCdJ784z.js} +1 -1
- package/out/renderer/assets/{ganttDiagram-EL5Y4UJY-D4j4GJaT.js → ganttDiagram-EL5Y4UJY-C9TlTohh.js} +1 -1
- package/out/renderer/assets/{gitGraphDiagram-WWUBYQGX-BqveM1NI.js → gitGraphDiagram-WWUBYQGX-RVFZsGPP.js} +1 -1
- package/out/renderer/assets/{globals-C9M_MZZV.js → globals-BJ2xID1e.js} +136 -136
- package/out/renderer/assets/{index-BzSTiwH2.js → index-CHNrHypo.js} +1 -1
- package/out/renderer/assets/{infoDiagram-27XIBGKW-DLPLnIFP.js → infoDiagram-27XIBGKW-CxE810pn.js} +1 -1
- package/out/renderer/assets/{ishikawaDiagram-5VMMS53U-48drIAMR.js → ishikawaDiagram-5VMMS53U-Osr2JJcF.js} +1 -1
- package/out/renderer/assets/{journeyDiagram-3NMN7TZE-vjigqUq_.js → journeyDiagram-3NMN7TZE-Bigxb8hB.js} +1 -1
- package/out/renderer/assets/{kanban-definition-UXKFOSKX-CpsYVONZ.js → kanban-definition-UXKFOSKX-DVP3FCG8.js} +1 -1
- package/out/renderer/assets/{layout-DqfoORoO.js → layout-Dn80hFs0.js} +1 -1
- package/out/renderer/assets/{linear-CJzBBHcp.js → linear-B4dfTk2J.js} +1 -1
- package/out/renderer/assets/{mermaid.core-DdrGP-Hn.js → mermaid.core-uI5XQTV1.js} +5 -5
- package/out/renderer/assets/{mindmap-definition-YA3MSWOX-D68tLNxp.js → mindmap-definition-YA3MSWOX-BD7FdpQU.js} +1 -1
- package/out/renderer/assets/{pegDiagram-XKGWAZYB-DkgLTcrv.js → pegDiagram-XKGWAZYB-DU5iHhXs.js} +1 -1
- package/out/renderer/assets/{pieDiagram-E7YTZNPT-bz5NuX1w.js → pieDiagram-E7YTZNPT-DpEVmuWZ.js} +1 -1
- package/out/renderer/assets/{quadrantDiagram-AXDQQJYC-o_VKLyJA.js → quadrantDiagram-AXDQQJYC-CcEfCONf.js} +1 -1
- package/out/renderer/assets/{railroadDiagram-O6MQD6OU-Dkf03e07.js → railroadDiagram-O6MQD6OU-BWnKKcat.js} +1 -1
- package/out/renderer/assets/{requirementDiagram-BXWQKSXE-CBUz_3YU.js → requirementDiagram-BXWQKSXE-B7sPFe0g.js} +1 -1
- package/out/renderer/assets/{sankeyDiagram-P5KCCOFB-B0pjUr9g.js → sankeyDiagram-P5KCCOFB-ClwzZmCX.js} +1 -1
- package/out/renderer/assets/{sequenceDiagram-WJ2MYXX4-ClugIL0e.js → sequenceDiagram-WJ2MYXX4-Dn8StCfr.js} +1 -1
- package/out/renderer/assets/{settings-DvhrDn2q.js → settings-CUBQyINw.js} +18 -18
- package/out/renderer/assets/{sizeCapture-INFHLROL-D6y0rctc.js → sizeCapture-INFHLROL-Csrj-WKZ.js} +1 -1
- package/out/renderer/assets/{stateDiagram-D77RDMKH-DiftQepS.js → stateDiagram-D77RDMKH-CuJq0aAV.js} +1 -1
- package/out/renderer/assets/stateDiagram-v2-MP3YSRHH-CXFPvfab.js +1 -0
- package/out/renderer/assets/{swimlanes-42K2YHIH-DhuTjCNj.js → swimlanes-42K2YHIH-CjyTBmUr.js} +1 -1
- package/out/renderer/assets/swimlanesDiagram-VR7AAH4N-D83-vEQi.js +8 -0
- package/out/renderer/assets/{timeline-definition-24CTP7MA-CrXqgptd.js → timeline-definition-24CTP7MA-BSTk1WRZ.js} +1 -1
- package/out/renderer/assets/{vennDiagram-4TSXK5OY-CDm8SO8U.js → vennDiagram-4TSXK5OY-oO2Udqo9.js} +1 -1
- package/out/renderer/assets/{wardleyDiagram-VM6X3IG4-CxyunHwQ.js → wardleyDiagram-VM6X3IG4-C27UPHbe.js} +1 -1
- package/out/renderer/assets/{xychartDiagram-S5SC5T6Z-CvC5YMSy.js → xychartDiagram-S5SC5T6Z-_SQkHfU0.js} +1 -1
- package/out/renderer/index.html +2 -2
- package/out/renderer/settings.html +3 -3
- package/out/renderer/web-preload.js +1 -1
- package/out/server/agent.js +5 -4
- package/out/server/chunks/{agent-_G_O-Cpa.js → agent-BlAuVqNp.js} +4 -2
- package/out/server/chunks/{gpuBackendInstall-Cb6TFh_8.js → gpuBackendInstall-C-ypqydV.js} +4 -4
- package/out/server/chunks/{loadProvider-Be9Lu1Oi.js → loadProvider-CQUR_oho.js} +2 -2
- package/out/server/chunks/{manifest-CB63GQ-i.js → manifest-CojWIAHB.js} +2 -2
- package/out/server/chunks/{workflowPresets-Djlp5LPV.js → workflowPresets-DQ3QX6Ju.js} +25 -12
- package/out/server/index.js +283 -39
- package/out/server/plugin-host.js +33 -3
- package/package.json +1 -1
- package/out/phone/assets/architecture-7GRP2DOG-DFA8x3QF.js +0 -1
- package/out/phone/assets/channel-BBjWfdZr.js +0 -1
- package/out/phone/assets/classDiagram-ZZMXUADV-CXXjdIIU.js +0 -1
- package/out/phone/assets/classDiagram-v2-VYDZK3BY-CXXjdIIU.js +0 -1
- package/out/phone/assets/eventmodeling-NTZA5JFV-D4a6gbOs.js +0 -1
- package/out/phone/assets/flowDiagram-HODETNUW-BBTtB5oX.js +0 -1
- package/out/phone/assets/railroad-abnf-HS5TGJTU-DddVaVQM.js +0 -1
- package/out/phone/assets/railroad-ebnf-LZEXJU2U-BjvyqMjh.js +0 -1
- package/out/phone/assets/railroad-peg-WCYAUIDC-lBl4CV1_.js +0 -1
- package/out/phone/assets/stateDiagram-v2-MP3YSRHH-Exd8xDBD.js +0 -1
- package/out/phone/assets/swimlanesDiagram-VR7AAH4N-B62_42fO.js +0 -8
- package/out/renderer/assets/channel-Sck-tAAK.js +0 -1
- package/out/renderer/assets/classDiagram-ZZMXUADV-DnB4QNNe.js +0 -1
- package/out/renderer/assets/classDiagram-v2-VYDZK3BY-DnB4QNNe.js +0 -1
- package/out/renderer/assets/stateDiagram-v2-MP3YSRHH-DxB2-9tl.js +0 -1
- package/out/renderer/assets/swimlanesDiagram-VR7AAH4N-CYDUqExO.js +0 -8
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-aPuBvESs.js","assets/rolldown-runtime-Dd_uD5pT.js","assets/html-BsvMqTlf.js","assets/javascript-DcMHgNcu.js","assets/css-DlBQoFxe.js","assets/angular-ts-ocjSXnvf.js","assets/scss-BaZL6t2Y.js","assets/apl-D8Zaj6f9.js","assets/xml-C01ajBW7.js","assets/java-D7h0NA_A.js","assets/json-DePJdKYk.js","assets/astro-CbVusc_k.js","assets/typescript-BTGs5etX.js","assets/postcss-BXeXVLqQ.js","assets/tsx-DvWhG4dC.js","assets/blade-BuKMbjJR.js","assets/html-derivative-D9FvRNj4.js","assets/sql-DvarVTMJ.js","assets/bsl-_VjlB9mv.js","assets/sdbl-bTVj8UrX.js","assets/c-BNQJhXlP.js","assets/cairo-DLTphjLi.js","assets/python-gzcpVVnB.js","assets/chapel-CFMD-Djs.js","assets/cobol-qSrRm_BU.js","assets/coffee-BP03ytLP.js","assets/cpp-CUBNVKxn.js","assets/regexp-I2jnduhj.js","assets/glsl-CyFpZtQv.js","assets/crystal-CCpd0BXH.js","assets/shellscript-B51zB43X.js","assets/edge-k_uo0VIr.js","assets/elixir-CJS91GrO.js","assets/elm-Bmx6Fs0i.js","assets/erb-yi0ZozmI.js","assets/ruby-D1ky9XZ0.js","assets/haml-Dds4VdNJ.js","assets/graphql-BIyAKkG2.js","assets/jsx-BUUYi3qs.js","assets/lua-Z49wBRLR.js","assets/yaml-BWCS3NLV.js","assets/erlang-Cphh6RMH.js","assets/markdown-BYOwaDjH.js","assets/fortran-fixed-form-DEKoE2YW.js","assets/fortran-free-form-CYNrtFtB.js","assets/fsharp-D13ZGOAj.js","assets/gdresource-xMC7jr7x.js","assets/gdshader-CBce3t8t.js","assets/gdscript-DYvRD3hg.js","assets/git-commit-BSykSTBG.js","assets/diff-woXpYk--.js","assets/git-rebase-C-RR1FSc.js","assets/glimmer-js-Di6EiJvU.js","assets/glimmer-ts-C2P-EwIP.js","assets/hack-DDi4pUY-.js","assets/handlebars-C81KA5yo.js","assets/http-c4_vT9ST.js","assets/hurl-BqZA9I9Q.js","assets/csv-Dx-8-gkx.js","assets/hxml-Dcm88srW.js","assets/haxe-C8oCnwJJ.js","assets/jinja-CixBDh_U.js","assets/jison-Ru_S5AEn.js","assets/julia-CaY0JZD0.js","assets/r-CvCSiWB_.js","assets/just-Q4EdCjF5.js","assets/perl-BtArmf81.js","assets/latex-t1iljvl0.js","assets/tex-JPaUWOrn.js","assets/liquid-DEL4RHa9.js","assets/marko-DYWPPmCl.js","assets/less-DVTAwKKz.js","assets/mdc-CsAWFGA9.js","assets/nextflow-BJtWHP5T.js","assets/nextflow-groovy-DJMQeKeT.js","assets/nginx-BrbrEdla.js","assets/nim-BjwzhXka.js","assets/org-TFl3N09_.js","assets/clojure-DqKBuwfJ.js","assets/csharp-oqKa8noW.js","assets/dart-CnvKMtbv.js","assets/docker-IyjqRm3v.js","assets/go-rLFTqkRN.js","assets/groovy-CacY0gHj.js","assets/ini-B5eOa1yu.js","assets/make-Dixweg8N.js","assets/objective-c-D1A_Heim.js","assets/ocaml-O90oeIOV.js","assets/php-Cx25uSIP.js","assets/vb-DOwzaHZ0.js","assets/raku-B3gFvitq.js","assets/rust-Cfkwpbl8.js","assets/scala-BiFt_7mu.js","assets/zig-CMLA9XwU.js","assets/xsl-CCLNyvR3.js","assets/pug-B4bk2kWf.js","assets/qml-g4UDed-8.js","assets/razor-BSt2ayLr.js","assets/rst-BucurtmO.js","assets/cmake-Bj61d0ZC.js","assets/sas-CUQt684o.js","assets/shaderlab-TOUzSsQk.js","assets/hlsl-Cvrh5tZx.js","assets/shellsession-B-KBpmJs.js","assets/soy-D5xCHD_M.js","assets/sparql-D_iOobhT.js","assets/turtle-ByJddavk.js","assets/stata-8TbiBYrm.js","assets/surrealql-DalIYx4r.js","assets/svelte-D4FIy7cP.js","assets/templ-DP4lTcEq.js","assets/ts-tags-CNUq3so9.js","assets/twig-Chu5fnNS.js","assets/typst--WwEKe8X.js","assets/bat-qdxAdBWQ.js","assets/bibtex-Ci_nEsc7.js","assets/jsonc-CYpm1nAK.js","assets/log-BNLmms1o.js","assets/powershell-CCSX75yM.js","assets/swift-CyEgAFGc.js","assets/system-verilog-Dh5ihWbf.js","assets/verilog-B2gwz-sJ.js","assets/vue-DjCn01CB.js","assets/vue-html-BXjKVtKk.js","assets/vue-vine-By_xyXdL.js","assets/stylus-B6D30XZt.js","assets/mermaid.core-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-aPuBvESs.js","assets/rolldown-runtime-Dd_uD5pT.js","assets/html-BsvMqTlf.js","assets/javascript-DcMHgNcu.js","assets/css-DlBQoFxe.js","assets/angular-ts-ocjSXnvf.js","assets/scss-BaZL6t2Y.js","assets/apl-D8Zaj6f9.js","assets/xml-C01ajBW7.js","assets/java-D7h0NA_A.js","assets/json-DePJdKYk.js","assets/astro-CbVusc_k.js","assets/typescript-BTGs5etX.js","assets/postcss-BXeXVLqQ.js","assets/tsx-DvWhG4dC.js","assets/blade-BuKMbjJR.js","assets/html-derivative-D9FvRNj4.js","assets/sql-DvarVTMJ.js","assets/bsl-_VjlB9mv.js","assets/sdbl-bTVj8UrX.js","assets/c-BNQJhXlP.js","assets/cairo-DLTphjLi.js","assets/python-gzcpVVnB.js","assets/chapel-CFMD-Djs.js","assets/cobol-qSrRm_BU.js","assets/coffee-BP03ytLP.js","assets/cpp-CUBNVKxn.js","assets/regexp-I2jnduhj.js","assets/glsl-CyFpZtQv.js","assets/crystal-CCpd0BXH.js","assets/shellscript-B51zB43X.js","assets/edge-k_uo0VIr.js","assets/elixir-CJS91GrO.js","assets/elm-Bmx6Fs0i.js","assets/erb-yi0ZozmI.js","assets/ruby-D1ky9XZ0.js","assets/haml-Dds4VdNJ.js","assets/graphql-BIyAKkG2.js","assets/jsx-BUUYi3qs.js","assets/lua-Z49wBRLR.js","assets/yaml-BWCS3NLV.js","assets/erlang-Cphh6RMH.js","assets/markdown-BYOwaDjH.js","assets/fortran-fixed-form-DEKoE2YW.js","assets/fortran-free-form-CYNrtFtB.js","assets/fsharp-D13ZGOAj.js","assets/gdresource-xMC7jr7x.js","assets/gdshader-CBce3t8t.js","assets/gdscript-DYvRD3hg.js","assets/git-commit-BSykSTBG.js","assets/diff-woXpYk--.js","assets/git-rebase-C-RR1FSc.js","assets/glimmer-js-Di6EiJvU.js","assets/glimmer-ts-C2P-EwIP.js","assets/hack-DDi4pUY-.js","assets/handlebars-C81KA5yo.js","assets/http-c4_vT9ST.js","assets/hurl-BqZA9I9Q.js","assets/csv-Dx-8-gkx.js","assets/hxml-Dcm88srW.js","assets/haxe-C8oCnwJJ.js","assets/jinja-CixBDh_U.js","assets/jison-Ru_S5AEn.js","assets/julia-CaY0JZD0.js","assets/r-CvCSiWB_.js","assets/just-Q4EdCjF5.js","assets/perl-BtArmf81.js","assets/latex-t1iljvl0.js","assets/tex-JPaUWOrn.js","assets/liquid-DEL4RHa9.js","assets/marko-DYWPPmCl.js","assets/less-DVTAwKKz.js","assets/mdc-CsAWFGA9.js","assets/nextflow-BJtWHP5T.js","assets/nextflow-groovy-DJMQeKeT.js","assets/nginx-BrbrEdla.js","assets/nim-BjwzhXka.js","assets/org-TFl3N09_.js","assets/clojure-DqKBuwfJ.js","assets/csharp-oqKa8noW.js","assets/dart-CnvKMtbv.js","assets/docker-IyjqRm3v.js","assets/go-rLFTqkRN.js","assets/groovy-CacY0gHj.js","assets/ini-B5eOa1yu.js","assets/make-Dixweg8N.js","assets/objective-c-D1A_Heim.js","assets/ocaml-O90oeIOV.js","assets/php-Cx25uSIP.js","assets/vb-DOwzaHZ0.js","assets/raku-B3gFvitq.js","assets/rust-Cfkwpbl8.js","assets/scala-BiFt_7mu.js","assets/zig-CMLA9XwU.js","assets/xsl-CCLNyvR3.js","assets/pug-B4bk2kWf.js","assets/qml-g4UDed-8.js","assets/razor-BSt2ayLr.js","assets/rst-BucurtmO.js","assets/cmake-Bj61d0ZC.js","assets/sas-CUQt684o.js","assets/shaderlab-TOUzSsQk.js","assets/hlsl-Cvrh5tZx.js","assets/shellsession-B-KBpmJs.js","assets/soy-D5xCHD_M.js","assets/sparql-D_iOobhT.js","assets/turtle-ByJddavk.js","assets/stata-8TbiBYrm.js","assets/surrealql-DalIYx4r.js","assets/svelte-D4FIy7cP.js","assets/templ-DP4lTcEq.js","assets/ts-tags-CNUq3so9.js","assets/twig-Chu5fnNS.js","assets/typst--WwEKe8X.js","assets/bat-qdxAdBWQ.js","assets/bibtex-Ci_nEsc7.js","assets/jsonc-CYpm1nAK.js","assets/log-BNLmms1o.js","assets/powershell-CCSX75yM.js","assets/swift-CyEgAFGc.js","assets/system-verilog-Dh5ihWbf.js","assets/verilog-B2gwz-sJ.js","assets/vue-DjCn01CB.js","assets/vue-html-BXjKVtKk.js","assets/vue-vine-By_xyXdL.js","assets/stylus-B6D30XZt.js","assets/mermaid.core-BLIwkLpP.js","assets/chunk-Y2CYZVJY-DsF7k-Jl.js","assets/src-oBChb5qS.js","assets/chunk-DU6HZSFF-BOrl8wD9.js","assets/chunk-75Z2AOVW-CsGKueom.js","assets/dist-B_J_HbC0.js","assets/chunk-PWAF6VOD-HDvh5SEv.js","assets/chunk-GMAD6QVW-D2uUUIys.js","assets/chunk-P2QGCYS3-Cwbos3wS.js","assets/chunk-4HAMMTFA-ClL6ufY7.js","assets/rough.esm-Dy-Kn_BL.js","assets/chunk-GVQU2GXP-k4NEAgCW.js","assets/chunk-OSK3NFVY-Cpg-5-0Y.js","assets/line-DMsvqHhd.js","assets/path-fybaL0A-.js","assets/array-BifhSqXX.js","assets/graphlib-DS17s2tU.js","assets/chunk-L3NEJ4N5-BrOC_Q4h.js","assets/jsQR-B1eQcpQl.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
import{i as e,n as t,t as n}from"./rolldown-runtime-Dd_uD5pT.js";import{A as r,B as i,C as a,D as o,E as s,F as c,G as l,H as u,I as d,J as f,K as p,L as m,O as h,P as g,S as _,T as v,U as y,V as b,W as x,X as S,Y as C,_ as w,a as T,at as E,b as D,ct as O,d as k,f as A,h as j,i as M,it as N,j as P,k as F,l as I,m as L,n as R,o as z,p as B,q as V,r as H,s as ee,st as U,t as te,u as ne,v as re,w as ie,x as ae,y as oe,z as se}from"./storage-p-WxHA1h.js";var ce=n((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),le=n(((e,t)=>{t.exports=ce()})),ue=n((e=>{var t=O();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.8`})),de=n(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=ue()})),fe=n((e=>{var t=le(),n=O(),r=de();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var f=Object.assign,p=Symbol.for(`react.element`),m=Symbol.for(`react.transitional.element`),h=Symbol.for(`react.portal`),g=Symbol.for(`react.fragment`),_=Symbol.for(`react.strict_mode`),v=Symbol.for(`react.profiler`),y=Symbol.for(`react.consumer`),b=Symbol.for(`react.context`),x=Symbol.for(`react.forward_ref`),S=Symbol.for(`react.suspense`),C=Symbol.for(`react.suspense_list`),w=Symbol.for(`react.memo`),T=Symbol.for(`react.lazy`),E=Symbol.for(`react.activity`),D=Symbol.for(`react.memo_cache_sentinel`),k=Symbol.iterator;function A(e){return typeof e!=`object`||!e?null:(e=k&&e[k]||e[`@@iterator`],typeof e==`function`?e:null)}var j=Symbol.for(`react.client.reference`);function M(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===j?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case g:return`Fragment`;case v:return`Profiler`;case _:return`StrictMode`;case S:return`Suspense`;case C:return`SuspenseList`;case E:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case h:return`Portal`;case b:return e.displayName||`Context`;case y:return(e._context.displayName||`Context`)+`.Consumer`;case x:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case w:return t=e.displayName||null,t===null?M(e.type)||`Memo`:t;case T:t=e._payload,e=e._init;try{return M(e(t))}catch{}}return null}var N=Array.isArray,P=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I={pending:!1,data:null,method:null,action:null},L=[],R=-1;function z(e){return{current:e}}function B(e){0>R||(e.current=L[R],L[R]=null,R--)}function V(e,t){R++,L[R]=e.current,e.current=t}var H=z(null),ee=z(null),U=z(null),te=z(null);function ne(e,t){switch(V(U,t),V(ee,e),V(H,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Wd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Wd(t),e=Gd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}B(H),V(H,e)}function re(){B(H),B(ee),B(U)}function ie(e){e.memoizedState!==null&&V(te,e);var t=H.current,n=Gd(t,e.type);t!==n&&(V(ee,e),V(H,n))}function ae(e){ee.current===e&&(B(H),B(ee)),te.current===e&&(B(te),tp._currentValue=I)}var oe,se;function ce(e){if(oe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);oe=t&&t[1]||``,se=-1<e.stack.indexOf(`
|
|
3
3
|
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
4
|
`+oe+e+se}var ue=!1;function fe(e,t){if(!e||ue)return``;ue=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
@@ -7,7 +7,7 @@ import{i as e,n as t,t as n}from"./rolldown-runtime-Dd_uD5pT.js";import{A as r,B
|
|
|
7
7
|
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{ue=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?ce(n):``}function pe(e,t){switch(e.tag){case 26:case 27:case 5:return ce(e.type);case 16:return ce(`Lazy`);case 13:return e.child!==t&&t!==null?ce(`Suspense Fallback`):ce(`Suspense`);case 19:return ce(`SuspenseList`);case 0:case 15:return fe(e.type,!1);case 11:return fe(e.type.render,!1);case 1:return fe(e.type,!0);case 31:return ce(`Activity`);default:return``}}function me(e){try{var t=``,n=null;do t+=pe(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
8
8
|
Error generating stack: `+e.message+`
|
|
9
9
|
`+e.stack}}var he=Object.prototype.hasOwnProperty,ge=t.unstable_scheduleCallback,W=t.unstable_cancelCallback,_e=t.unstable_shouldYield,ve=t.unstable_requestPaint,ye=t.unstable_now,be=t.unstable_getCurrentPriorityLevel,xe=t.unstable_ImmediatePriority,Se=t.unstable_UserBlockingPriority,Ce=t.unstable_NormalPriority,we=t.unstable_LowPriority,Te=t.unstable_IdlePriority,Ee=t.log,De=t.unstable_setDisableYieldValue,Oe=null,G=null;function ke(e){if(typeof Ee==`function`&&De(e),G&&typeof G.setStrictMode==`function`)try{G.setStrictMode(Oe,e)}catch{}}var Ae=Math.clz32?Math.clz32:Ne,je=Math.log,Me=Math.LN2;function Ne(e){return e>>>=0,e===0?32:31-(je(e)/Me|0)|0}var Pe=256,Fe=262144,Ie=4194304;function Le(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Re(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Le(n))):i=Le(o):i=Le(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Le(n))):i=Le(o)):i=Le(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function ze(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Be(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ve(){var e=Ie;return Ie<<=1,!(Ie&62914560)&&(Ie=4194304),e}function He(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ue(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function We(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Ae(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&Ge(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Ge(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ae(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Ke(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ae(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function qe(e,t){var n=t&-t;return n=n&42?1:Je(n),(n&(e.suspendedLanes|t))===0?n:0}function Je(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Ye(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function Xe(){var e=F.p;return e===0?(e=window.event,e===void 0?32:_p(e.type)):e}function Ze(e,t){var n=F.p;try{return F.p=e,t()}finally{F.p=n}}var Qe=Math.random().toString(36).slice(2),$e=`__reactFiber$`+Qe,et=`__reactProps$`+Qe,tt=`__reactContainer$`+Qe,nt=`__reactEvents$`+Qe,rt=`__reactListeners$`+Qe,it=`__reactHandles$`+Qe,at=`__reactResources$`+Qe,ot=`__reactMarker$`+Qe;function st(e){delete e[$e],delete e[et],delete e[nt],delete e[rt],delete e[it]}function ct(e){var t=e[$e];if(t)return t;for(var n=e.parentNode;n;){if(t=n[tt]||n[$e]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=mf(e);e!==null;){if(n=e[$e])return n;e=mf(e)}return t}e=n,n=e.parentNode}return null}function lt(e){if(e=e[$e]||e[tt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ut(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function dt(e){var t=e[at];return t||=e[at]={hoistableStyles:new Map,hoistableScripts:new Map},t}function ft(e){e[ot]=!0}var pt=new Set,mt={};function ht(e,t){gt(e,t),gt(e+`Capture`,t)}function gt(e,t){for(mt[e]=t,e=0;e<t.length;e++)pt.add(t[e])}var _t=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),vt={},yt={};function bt(e){return he.call(yt,e)?!0:he.call(vt,e)?!1:_t.test(e)?yt[e]=!0:(vt[e]=!0,!1)}function xt(e,t,n){if(bt(t)){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}}function St(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Ct(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function wt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Tt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Et(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Dt(e){if(!e._valueTracker){var t=Tt(e)?`checked`:`value`;e._valueTracker=Et(e,t,``+e[t])}}function Ot(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Tt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}function kt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var At=/[\n"\\]/g;function jt(e){return e.replace(At,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Mt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+wt(t)):e.value!==``+wt(t)&&(e.value=``+wt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Pt(e,o,wt(n)):Pt(e,o,wt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+wt(s):e.removeAttribute(`name`)}function Nt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Dt(e);return}n=n==null?``:``+wt(n),t=t==null?n:``+wt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Dt(e)}function Pt(e,t,n){t===`number`&&kt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Ft(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+wt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function It(e,t,n){if(t!=null&&(t=``+wt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+wt(n)}function Lt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(N(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=wt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Dt(e)}function Rt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var zt=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function Bt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||zt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Vt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Bt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Bt(e,o,t[o])}function Ht(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var Ut=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),Wt=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Gt(e){return Wt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Kt(){}var qt=null;function Jt(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Yt=null,Xt=null;function Zt(e){var t=lt(e);if(t&&(e=t.stateNode)){var n=e[et]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Mt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+jt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[et]||null;if(!a)throw Error(i(90));Mt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Ot(r)}break a;case`textarea`:It(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Ft(e,!!n.multiple,t,!1)}}}var Qt=!1;function $t(e,t,n){if(Qt)return e(t,n);Qt=!0;try{return e(t)}finally{if(Qt=!1,(Yt!==null||Xt!==null)&&(xu(),Yt&&(t=Yt,e=Xt,Xt=Yt=null,Zt(t),e)))for(t=0;t<e.length;t++)Zt(e[t])}}function en(e,t){var n=e.stateNode;if(n===null)return null;var r=n[et]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var tn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),nn=!1;if(tn)try{var rn={};Object.defineProperty(rn,"passive",{get:function(){nn=!0}}),window.addEventListener(`test`,rn,rn),window.removeEventListener(`test`,rn,rn)}catch{nn=!1}var an=null,on=null,sn=null;function cn(){if(sn)return sn;var e,t=on,n=t.length,r,i=`value`in an?an.value:an.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return sn=i.slice(e,1<r?1-r:void 0)}function ln(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function un(){return!0}function dn(){return!1}function fn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?un:dn,this.isPropagationStopped=dn,this}return f(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=un)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=un)},persist:function(){},isPersistent:un}),t}var pn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},mn=fn(pn),hn=f({},pn,{view:0,detail:0}),gn=fn(hn),_n,vn,yn,bn=f({},hn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:jn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==yn&&(yn&&e.type===`mousemove`?(_n=e.screenX-yn.screenX,vn=e.screenY-yn.screenY):vn=_n=0,yn=e),_n)},movementY:function(e){return`movementY`in e?e.movementY:vn}}),xn=fn(bn),Sn=fn(f({},bn,{dataTransfer:0})),Cn=fn(f({},hn,{relatedTarget:0})),wn=fn(f({},pn,{animationName:0,elapsedTime:0,pseudoElement:0})),Tn=fn(f({},pn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),En=fn(f({},pn,{data:0})),Dn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},On={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},kn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function An(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=kn[e])?!!t[e]:!1}function jn(){return An}var Mn=fn(f({},hn,{key:function(e){if(e.key){var t=Dn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=ln(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?On[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:jn,charCode:function(e){return e.type===`keypress`?ln(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?ln(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Nn=fn(f({},bn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Pn=fn(f({},hn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:jn})),Fn=fn(f({},pn,{propertyName:0,elapsedTime:0,pseudoElement:0})),In=fn(f({},bn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Ln=fn(f({},pn,{newState:0,oldState:0})),Rn=[9,13,27,32],zn=tn&&`CompositionEvent`in window,Bn=null;tn&&`documentMode`in document&&(Bn=document.documentMode);var Vn=tn&&`TextEvent`in window&&!Bn,Hn=tn&&(!zn||Bn&&8<Bn&&11>=Bn),Un=` `,Wn=!1;function Gn(e,t){switch(e){case`keyup`:return Rn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Kn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var qn=!1;function Jn(e,t){switch(e){case`compositionend`:return Kn(t);case`keypress`:return t.which===32?(Wn=!0,Un):null;case`textInput`:return e=t.data,e===Un&&Wn?null:e;default:return null}}function Yn(e,t){if(qn)return e===`compositionend`||!zn&&Gn(e,t)?(e=cn(),sn=on=an=null,qn=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return Hn&&t.locale!==`ko`?null:t.data;default:return null}}var Xn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Zn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Xn[e.type]:t===`textarea`}function Qn(e,t,n,r){Yt?Xt?Xt.push(r):Xt=[r]:Yt=r,t=Od(t,`onChange`),0<t.length&&(n=new mn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var $n=null,er=null;function tr(e){bd(e,0)}function nr(e){if(Ot(ut(e)))return e}function rr(e,t){if(e===`change`)return t}var ir=!1;if(tn){var ar;if(tn){var or=`oninput`in document;if(!or){var sr=document.createElement(`div`);sr.setAttribute(`oninput`,`return;`),or=typeof sr.oninput==`function`}ar=or}else ar=!1;ir=ar&&(!document.documentMode||9<document.documentMode)}function cr(){$n&&($n.detachEvent(`onpropertychange`,lr),er=$n=null)}function lr(e){if(e.propertyName===`value`&&nr(er)){var t=[];Qn(t,er,e,Jt(e)),$t(tr,t)}}function ur(e,t,n){e===`focusin`?(cr(),$n=t,er=n,$n.attachEvent(`onpropertychange`,lr)):e===`focusout`&&cr()}function dr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return nr(er)}function fr(e,t){if(e===`click`)return nr(t)}function pr(e,t){if(e===`input`||e===`change`)return nr(t)}function mr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var hr=typeof Object.is==`function`?Object.is:mr;function gr(e,t){if(hr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!he.call(t,i)||!hr(e[i],t[i]))return!1}return!0}function _r(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function vr(e,t){var n=_r(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=_r(n)}}function yr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?yr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function br(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=kt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=kt(e.document)}return t}function xr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Sr=tn&&`documentMode`in document&&11>=document.documentMode,Cr=null,wr=null,Tr=null,Er=!1;function Dr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Er||Cr==null||Cr!==kt(r)||(r=Cr,`selectionStart`in r&&xr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Tr&&gr(Tr,r)||(Tr=r,r=Od(wr,`onSelect`),0<r.length&&(t=new mn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Cr)))}function Or(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var kr={animationend:Or(`Animation`,`AnimationEnd`),animationiteration:Or(`Animation`,`AnimationIteration`),animationstart:Or(`Animation`,`AnimationStart`),transitionrun:Or(`Transition`,`TransitionRun`),transitionstart:Or(`Transition`,`TransitionStart`),transitioncancel:Or(`Transition`,`TransitionCancel`),transitionend:Or(`Transition`,`TransitionEnd`)},Ar={},jr={};tn&&(jr=document.createElement(`div`).style,`AnimationEvent`in window||(delete kr.animationend.animation,delete kr.animationiteration.animation,delete kr.animationstart.animation),`TransitionEvent`in window||delete kr.transitionend.transition);function Mr(e){if(Ar[e])return Ar[e];if(!kr[e])return e;var t=kr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in jr)return Ar[e]=t[n];return e}var Nr=Mr(`animationend`),Pr=Mr(`animationiteration`),Fr=Mr(`animationstart`),Ir=Mr(`transitionrun`),Lr=Mr(`transitionstart`),Rr=Mr(`transitioncancel`),zr=Mr(`transitionend`),Br=new Map,Vr=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);Vr.push(`scrollEnd`);function Hr(e,t){Br.set(e,t),ht(t,[e])}var Ur=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Wr=[],Gr=0,Kr=0;function qr(){for(var e=Gr,t=Kr=Gr=0;t<e;){var n=Wr[t];Wr[t++]=null;var r=Wr[t];Wr[t++]=null;var i=Wr[t];Wr[t++]=null;var a=Wr[t];if(Wr[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&Zr(n,i,a)}}function Jr(e,t,n,r){Wr[Gr++]=e,Wr[Gr++]=t,Wr[Gr++]=n,Wr[Gr++]=r,Kr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Yr(e,t,n,r){return Jr(e,t,n,r),Qr(e)}function Xr(e,t){return Jr(e,null,null,t),Qr(e)}function Zr(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Ae(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Qr(e){if(50<fu)throw fu=0,pu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var $r={};function ei(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ti(e,t,n,r){return new ei(e,t,n,r)}function ni(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ri(e,t){var n=e.alternate;return n===null?(n=ti(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function ii(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ai(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)ni(e)&&(s=1);else if(typeof e==`string`)s=Kf(e,n,H.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case E:return e=ti(31,n,t,a),e.elementType=E,e.lanes=o,e;case g:return oi(n.children,a,o,t);case _:s=8,a|=24;break;case v:return e=ti(12,n,t,a|2),e.elementType=v,e.lanes=o,e;case S:return e=ti(13,n,t,a),e.elementType=S,e.lanes=o,e;case C:return e=ti(19,n,t,a),e.elementType=C,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case b:s=10;break a;case y:s=9;break a;case x:s=11;break a;case w:s=14;break a;case T:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=ti(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function oi(e,t,n,r){return e=ti(7,e,r,t),e.lanes=n,e}function si(e,t,n){return e=ti(6,e,null,t),e.lanes=n,e}function ci(e){var t=ti(18,null,null,0);return t.stateNode=e,t}function li(e,t,n){return t=ti(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var ui=new WeakMap;function di(e,t){if(typeof e==`object`&&e){var n=ui.get(e);return n===void 0?(t={value:e,source:t,stack:me(t)},ui.set(e,t),t):n}return{value:e,source:t,stack:me(t)}}var fi=[],pi=0,mi=null,hi=0,gi=[],_i=0,vi=null,yi=1,bi=``;function xi(e,t){fi[pi++]=hi,fi[pi++]=mi,mi=e,hi=t}function Si(e,t,n){gi[_i++]=yi,gi[_i++]=bi,gi[_i++]=vi,vi=e;var r=yi;e=bi;var i=32-Ae(r)-1;r&=~(1<<i),n+=1;var a=32-Ae(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,yi=1<<32-Ae(t)+i|n<<i|r,bi=a+e}else yi=1<<a|n<<i|r,bi=e}function Ci(e){e.return!==null&&(xi(e,1),Si(e,1,0))}function wi(e){for(;e===mi;)mi=fi[--pi],fi[pi]=null,hi=fi[--pi],fi[pi]=null;for(;e===vi;)vi=gi[--_i],gi[_i]=null,bi=gi[--_i],gi[_i]=null,yi=gi[--_i],gi[_i]=null}function Ti(e,t){gi[_i++]=yi,gi[_i++]=bi,gi[_i++]=vi,yi=t.id,bi=t.overflow,vi=e}var Ei=null,Di=null,Oi=!1,ki=null,Ai=!1,ji=Error(i(519));function Mi(e){throw Ri(di(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),ji}function Ni(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[$e]=e,t[et]=r,n){case`dialog`:xd(`cancel`,t),xd(`close`,t);break;case`iframe`:case`object`:case`embed`:xd(`load`,t);break;case`video`:case`audio`:for(n=0;n<vd.length;n++)xd(vd[n],t);break;case`source`:xd(`error`,t);break;case`img`:case`image`:case`link`:xd(`error`,t),xd(`load`,t);break;case`details`:xd(`toggle`,t);break;case`input`:xd(`invalid`,t),Nt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:xd(`invalid`,t);break;case`textarea`:xd(`invalid`,t),Lt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Pd(t.textContent,n)?(r.popover!=null&&(xd(`beforetoggle`,t),xd(`toggle`,t)),r.onScroll!=null&&xd(`scroll`,t),r.onScrollEnd!=null&&xd(`scrollend`,t),r.onClick!=null&&(t.onclick=Kt),t=!0):t=!1,t||Mi(e,!0)}function Pi(e){for(Ei=e.return;Ei;)switch(Ei.tag){case 5:case 31:case 13:Ai=!1;return;case 27:case 3:Ai=!0;return;default:Ei=Ei.return}}function Fi(e){if(e!==Ei)return!1;if(!Oi)return Pi(e),Oi=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||Kd(e.type,e.memoizedProps)),n=!n),n&&Di&&Mi(e),Pi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Di=pf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Di=pf(e)}else t===27?(t=Di,ef(e.type)?(e=ff,ff=null,Di=e):Di=t):Di=Ei?df(e.stateNode.nextSibling):null;return!0}function Ii(){Di=Ei=null,Oi=!1}function Li(){var e=ki;return e!==null&&(Ql===null?Ql=e:Ql.push.apply(Ql,e),ki=null),e}function Ri(e){ki===null?ki=[e]:ki.push(e)}var zi=z(null),Bi=null,Vi=null;function K(e,t,n){V(zi,t._currentValue),t._currentValue=n}function Hi(e){e._currentValue=zi.current,B(zi)}function Ui(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Wi(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Ui(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Ui(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Gi(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;hr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===te.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[tp]:e.push(tp))}a=a.return}e!==null&&Wi(t,e,n,r),t.flags|=262144}function Ki(e){for(e=e.firstContext;e!==null;){if(!hr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function qi(e){Bi=e,Vi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ji(e){return Xi(Bi,e)}function Yi(e,t){return Bi===null&&qi(e),Xi(e,t)}function Xi(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Vi===null){if(e===null)throw Error(i(308));Vi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Vi=Vi.next=t;return n}var Zi=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Qi=t.unstable_scheduleCallback,$i=t.unstable_NormalPriority,ea={$$typeof:b,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ta(){return{controller:new Zi,data:new Map,refCount:0}}function na(e){e.refCount--,e.refCount===0&&Qi($i,function(){e.controller.abort()})}var ra=null,ia=0,aa=0,oa=null;function q(e,t){if(ra===null){var n=ra=[];ia=0,aa=fd(),oa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ia++,t.then(sa,sa),t}function sa(){if(--ia===0&&ra!==null){oa!==null&&(oa.status=`fulfilled`);var e=ra;ra=null,aa=0,oa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ca(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var la=P.S;P.S=function(e,t){tu=ye(),typeof t==`object`&&t&&typeof t.then==`function`&&q(e,t),la!==null&&la(e,t)};var ua=z(null);function da(){var e=ua.current;return e===null?Il.pooledCache:e}function fa(e,t){t===null?V(ua,ua.current):V(ua,t.pool)}function pa(){var e=da();return e===null?null:{parent:ea._currentValue,pool:e}}var ma=Error(i(460)),ha=Error(i(474)),ga=Error(i(542)),_a={then:function(){}};function va(e){return e=e.status,e===`fulfilled`||e===`rejected`}function ya(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Kt,Kt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ca(e),e;default:if(typeof t.status==`string`)t.then(Kt,Kt);else{if(e=Il,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ca(e),e}throw xa=t,ma}}function ba(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(xa=e,ma):e}}var xa=null;function Sa(){if(xa===null)throw Error(i(459));var e=xa;return xa=null,e}function Ca(e){if(e===ma||e===ga)throw Error(i(483))}var wa=null,Ta=0;function Ea(e){var t=Ta;return Ta+=1,wa===null&&(wa=[]),ya(wa,e,t)}function Da(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Oa(e,t){throw t.$$typeof===p?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function ka(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=ri(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=si(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===g?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===T&&ba(i)===t.type)?(t=a(t,n.props),Da(t,n),t.return=e,t):(t=ai(n.type,n.key,n.props,null,e.mode,r),Da(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=li(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=oi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=si(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case m:return n=ai(t.type,t.key,t.props,null,e.mode,n),Da(n,t),n.return=e,n;case h:return t=li(t,e.mode,n),t.return=e,t;case T:return t=ba(t),f(e,t,n)}if(N(t)||A(t))return t=oi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Ea(t),n);if(t.$$typeof===b)return f(e,Yi(e,t),n);Oa(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case m:return n.key===i?l(e,t,n,r):null;case h:return n.key===i?u(e,t,n,r):null;case T:return n=ba(n),p(e,t,n,r)}if(N(n)||A(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Ea(n),r);if(n.$$typeof===b)return p(e,t,Yi(e,n),r);Oa(e,n)}return null}function _(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case m:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case h:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case T:return r=ba(r),_(e,t,n,r,i)}if(N(r)||A(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return _(e,t,n,Ea(r),i);if(r.$$typeof===b)return _(e,t,n,Yi(t,r),i);Oa(t,r)}return null}function v(i,a,s,c){for(var l=null,u=null,d=a,m=a=0,h=null;d!==null&&m<s.length;m++){d.index>m?(h=d,d=null):h=d.sibling;var g=p(i,d,s[m],c);if(g===null){d===null&&(d=h);break}e&&d&&g.alternate===null&&t(i,d),a=o(g,a,m),u===null?l=g:u.sibling=g,u=g,d=h}if(m===s.length)return n(i,d),Oi&&xi(i,m),l;if(d===null){for(;m<s.length;m++)d=f(i,s[m],c),d!==null&&(a=o(d,a,m),u===null?l=d:u.sibling=d,u=d);return Oi&&xi(i,m),l}for(d=r(d);m<s.length;m++)h=_(d,i,m,s[m],c),h!==null&&(e&&h.alternate!==null&&d.delete(h.key===null?m:h.key),a=o(h,a,m),u===null?l=h:u.sibling=h,u=h);return e&&d.forEach(function(e){return t(i,e)}),Oi&&xi(i,m),l}function y(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,m=s,h=s=0,g=null,v=c.next();m!==null&&!v.done;h++,v=c.next()){m.index>h?(g=m,m=null):g=m.sibling;var y=p(a,m,v.value,l);if(y===null){m===null&&(m=g);break}e&&m&&y.alternate===null&&t(a,m),s=o(y,s,h),d===null?u=y:d.sibling=y,d=y,m=g}if(v.done)return n(a,m),Oi&&xi(a,h),u;if(m===null){for(;!v.done;h++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return Oi&&xi(a,h),u}for(m=r(m);!v.done;h++,v=c.next())v=_(m,a,h,v.value,l),v!==null&&(e&&v.alternate!==null&&m.delete(v.key===null?h:v.key),s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return e&&m.forEach(function(e){return t(a,e)}),Oi&&xi(a,h),u}function x(e,r,o,c){if(typeof o==`object`&&o&&o.type===g&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case m:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===g){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===T&&ba(l)===r.type){n(e,r.sibling),c=a(r,o.props),Da(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===g?(c=oi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ai(o.type,o.key,o.props,null,e.mode,c),Da(c,o),c.return=e,e=c)}return s(e);case h:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=li(o,e.mode,c),c.return=e,e=c}return s(e);case T:return o=ba(o),x(e,r,o,c)}if(N(o))return v(e,r,o,c);if(A(o)){if(l=A(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return x(e,r,Ea(o),c);if(o.$$typeof===b)return x(e,r,Yi(e,o),c);Oa(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=si(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ta=0;var i=x(e,t,n,r);return wa=null,i}catch(t){if(t===ma||t===ga)throw t;var a=ti(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Aa=ka(!0),ja=ka(!1),Ma=!1;function Na(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Pa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Fa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ia(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Fl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Qr(e),Zr(e,null,n),t}return Jr(e,r,t,n),Qr(e)}function La(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ke(e,n)}}function Ra(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var za=!1;function Ba(){if(za){var e=oa;if(e!==null)throw e}}function Va(e,t,n,r){za=!1;var i=e.updateQueue;Ma=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var p=s.lane&-536870913,m=p!==s.lane;if(m?(Rl&p)===p:(r&p)===p){p!==0&&p===aa&&(za=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:Ma=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Kl|=o,e.lanes=o,e.memoizedState=d}}function Ha(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Ua(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ha(n[e],t)}var Wa=z(null),Ga=z(0);function Ka(e,t){e=Wl,V(Ga,e),V(Wa,t),Wl=e|t.baseLanes}function qa(){V(Ga,Wl),V(Wa,Wa.current)}function Ja(){Wl=Ga.current,B(Wa),B(Ga)}var Ya=z(null),Xa=null;function Za(e){var t=e.alternate;V(no,no.current&1),V(Ya,e),Xa===null&&(t===null||Wa.current!==null||t.memoizedState!==null)&&(Xa=e)}function Qa(e){V(no,no.current),V(Ya,e),Xa===null&&(Xa=e)}function $a(e){e.tag===22?(V(no,no.current),V(Ya,e),Xa===null&&(Xa=e)):eo(e)}function eo(){V(no,no.current),V(Ya,Ya.current)}function to(e){B(Ya),Xa===e&&(Xa=null),B(no)}var no=z(0);function ro(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||cf(n)||lf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var io=0,ao=null,oo=null,so=null,co=!1,lo=!1,uo=!1,fo=0,po=0,mo=null,ho=0;function go(){throw Error(i(321))}function _o(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!hr(e[n],t[n]))return!1;return!0}function vo(e,t,n,r,i,a){return io=a,ao=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,P.H=e===null||e.memoizedState===null?Ns:Ps,uo=!1,a=n(r,i),uo=!1,lo&&(a=bo(t,n,r,i)),yo(e),a}function yo(e){P.H=Ms;var t=oo!==null&&oo.next!==null;if(io=0,so=oo=ao=null,co=!1,po=0,mo=null,t)throw Error(i(300));e===null||Zs||(e=e.dependencies,e!==null&&Ki(e)&&(Zs=!0))}function bo(e,t,n,r){ao=e;var a=0;do{if(lo&&(mo=null),po=0,lo=!1,25<=a)throw Error(i(301));if(a+=1,so=oo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}P.H=Fs,o=t(n,r)}while(lo);return o}function xo(){var e=P.H,t=e.useState()[0];return t=typeof t.then==`function`?Oo(t):t,e=e.useState()[0],(oo===null?null:oo.memoizedState)!==e&&(ao.flags|=1024),t}function So(){var e=fo!==0;return fo=0,e}function Co(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function wo(e){if(co){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}co=!1}io=0,so=oo=ao=null,lo=!1,po=fo=0,mo=null}function To(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return so===null?ao.memoizedState=so=e:so=so.next=e,so}function Eo(){if(oo===null){var e=ao.alternate;e=e===null?null:e.memoizedState}else e=oo.next;var t=so===null?ao.memoizedState:so.next;if(t!==null)so=t,oo=e;else{if(e===null)throw ao.alternate===null?Error(i(467)):Error(i(310));oo=e,e={memoizedState:oo.memoizedState,baseState:oo.baseState,baseQueue:oo.baseQueue,queue:oo.queue,next:null},so===null?ao.memoizedState=so=e:so=so.next=e}return so}function Do(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Oo(e){var t=po;return po+=1,mo===null&&(mo=[]),e=ya(mo,e,t),t=ao,(so===null?t.memoizedState:so.next)===null&&(t=t.alternate,P.H=t===null||t.memoizedState===null?Ns:Ps),e}function ko(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Oo(e);if(e.$$typeof===b)return Ji(e)}throw Error(i(438,String(e)))}function Ao(e){var t=null,n=ao.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=ao.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Do(),ao.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=D;return t.index++,n}function jo(e,t){return typeof t==`function`?t(e):t}function Mo(e){return No(Eo(),oo,e)}function No(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(io&f)===f:(Rl&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===aa&&(d=!0);else if((io&p)===p){u=u.next,p===aa&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,ao.lanes|=p,Kl|=p;f=u.action,uo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,ao.lanes|=f,Kl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!hr(o,e.memoizedState)&&(Zs=!0,d&&(n=oa,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Po(e){var t=Eo(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);hr(o,t.memoizedState)||(Zs=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Fo(e,t,n){var r=ao,a=Eo(),o=Oi;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!hr((oo||a).memoizedState,n);if(s&&(a.memoizedState=n,Zs=!0),a=a.queue,as(Ro.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||so!==null&&so.memoizedState.tag&1){if(r.flags|=2048,ts(9,{destroy:void 0},Lo.bind(null,r,a,n,t),null),Il===null)throw Error(i(349));o||io&127||Io(r,t,n)}return n}function Io(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ao.updateQueue,t===null?(t=Do(),ao.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Lo(e,t,n,r){t.value=n,t.getSnapshot=r,zo(t)&&Bo(e)}function Ro(e,t,n){return n(function(){zo(t)&&Bo(e)})}function zo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!hr(e,n)}catch{return!0}}function Bo(e){var t=Xr(e,2);t!==null&&gu(t,e,2)}function Vo(e){var t=To();if(typeof e==`function`){var n=e;if(e=n(),uo){ke(!0);try{n()}finally{ke(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:e},t}function Ho(e,t,n,r){return e.baseState=n,No(e,oo,typeof r==`function`?r:jo)}function Uo(e,t,n,r,a){if(ks(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};P.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Wo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Wo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=P.T,o={};P.T=o;try{var s=n(i,r),c=P.S;c!==null&&c(o,s),Go(e,t,s)}catch(n){qo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),P.T=a}}else try{a=n(i,r),Go(e,t,a)}catch(n){qo(e,t,n)}}function Go(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Ko(e,t,n)},function(n){return qo(e,t,n)}):Ko(e,t,n)}function Ko(e,t,n){t.status=`fulfilled`,t.value=n,Jo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Wo(e,n)))}function qo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Jo(t),t=t.next;while(t!==r)}e.action=null}function Jo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Yo(e,t){return t}function Xo(e,t){if(Oi){var n=Il.formState;if(n!==null){a:{var r=ao;if(Oi){if(Di){b:{for(var i=Di,a=Ai;i.nodeType!==8;){if(!a){i=null;break b}if(i=df(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Di=df(i.nextSibling),r=i.data===`F!`;break a}}Mi(r)}r=!1}r&&(t=n[0])}}return n=To(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yo,lastRenderedState:t},n.queue=r,n=Es.bind(null,ao,r),r.dispatch=n,r=Vo(!1),a=Os.bind(null,ao,!1,r.queue),r=To(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Uo.bind(null,ao,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Zo(e){return Qo(Eo(),oo,e)}function Qo(e,t,n){if(t=No(e,t,Yo)[0],e=Mo(jo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Oo(t)}catch(e){throw e===ma?ga:e}else r=t;t=Eo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(ao.flags|=2048,ts(9,{destroy:void 0},$o.bind(null,i,n),null)),[r,a,e]}function $o(e,t){e.action=t}function es(e){var t=Eo(),n=oo;if(n!==null)return Qo(t,n,e);Eo(),t=t.memoizedState,n=Eo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ts(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=ao.updateQueue,t===null&&(t=Do(),ao.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ns(){return Eo().memoizedState}function rs(e,t,n,r){var i=To();ao.flags|=e,i.memoizedState=ts(1|t,{destroy:void 0},n,r===void 0?null:r)}function J(e,t,n,r){var i=Eo();r=r===void 0?null:r;var a=i.memoizedState.inst;oo!==null&&r!==null&&_o(r,oo.memoizedState.deps)?i.memoizedState=ts(t,a,n,r):(ao.flags|=e,i.memoizedState=ts(1|t,a,n,r))}function is(e,t){rs(8390656,8,e,t)}function as(e,t){J(2048,8,e,t)}function os(e){ao.flags|=4;var t=ao.updateQueue;if(t===null)t=Do(),ao.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ss(e){var t=Eo().memoizedState;return os({ref:t,nextImpl:e}),function(){if(Fl&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function cs(e,t){return J(4,2,e,t)}function ls(e,t){return J(4,4,e,t)}function us(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ds(e,t,n){n=n==null?null:n.concat([e]),J(4,4,us.bind(null,t,e),n)}function fs(){}function ps(e,t){var n=Eo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&_o(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ms(e,t){var n=Eo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&_o(t,r[1]))return r[0];if(r=e(),uo){ke(!0);try{e()}finally{ke(!1)}}return n.memoizedState=[r,t],r}function hs(e,t,n){return n===void 0||io&1073741824&&!(Rl&261930)?e.memoizedState=t:(e.memoizedState=n,e=hu(),ao.lanes|=e,Kl|=e,n)}function gs(e,t,n,r){return hr(n,t)?n:Wa.current===null?!(io&42)||io&1073741824&&!(Rl&261930)?(Zs=!0,e.memoizedState=n):(e=hu(),ao.lanes|=e,Kl|=e,t):(e=hs(e,n,r),hr(e,t)||(Zs=!0),e)}function _s(e,t,n,r,i){var a=F.p;F.p=a!==0&&8>a?a:8;var o=P.T,s={};P.T=s,Os(e,!1,t,n);try{var c=i(),l=P.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ds(e,t,ca(c,r),mu(e)):Ds(e,t,r,mu(e))}catch(n){Ds(e,t,{then:function(){},status:`rejected`,reason:n},mu())}finally{F.p=a,o!==null&&s.types!==null&&(o.types=s.types),P.T=o}}function vs(){}function ys(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=bs(e).queue;_s(e,a,t,I,n===null?vs:function(){return xs(e),n(r)})}function bs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:I,baseState:I,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:I},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function xs(e){var t=bs(e);t.next===null&&(t=e.alternate.memoizedState),Ds(e,t.next.queue,{},mu())}function Y(){return Ji(tp)}function Ss(){return Eo().memoizedState}function Cs(){return Eo().memoizedState}function ws(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=mu();e=Fa(n);var r=Ia(t,e,n);r!==null&&(gu(r,t,n),La(r,t,n)),t={cache:ta()},e.payload=t;return}t=t.return}}function Ts(e,t,n){var r=mu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},ks(e)?As(t,n):(n=Yr(e,t,n,r),n!==null&&(gu(n,e,r),js(n,t,r)))}function Es(e,t,n){Ds(e,t,n,mu())}function Ds(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(ks(e))As(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,hr(s,o))return Jr(e,t,i,0),Il===null&&qr(),!1}catch{}if(n=Yr(e,t,i,r),n!==null)return gu(n,e,r),js(n,t,r),!0}return!1}function Os(e,t,n,r){if(r={lane:2,revertLane:fd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},ks(e)){if(t)throw Error(i(479))}else t=Yr(e,n,r,2),t!==null&&gu(t,e,2)}function ks(e){var t=e.alternate;return e===ao||t!==null&&t===ao}function As(e,t){lo=co=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function js(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ke(e,n)}}var Ms={readContext:Ji,use:ko,useCallback:go,useContext:go,useEffect:go,useImperativeHandle:go,useLayoutEffect:go,useInsertionEffect:go,useMemo:go,useReducer:go,useRef:go,useState:go,useDebugValue:go,useDeferredValue:go,useTransition:go,useSyncExternalStore:go,useId:go,useHostTransitionStatus:go,useFormState:go,useActionState:go,useOptimistic:go,useMemoCache:go,useCacheRefresh:go};Ms.useEffectEvent=go;var Ns={readContext:Ji,use:ko,useCallback:function(e,t){return To().memoizedState=[e,t===void 0?null:t],e},useContext:Ji,useEffect:is,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),rs(4194308,4,us.bind(null,t,e),n)},useLayoutEffect:function(e,t){return rs(4194308,4,e,t)},useInsertionEffect:function(e,t){rs(4,2,e,t)},useMemo:function(e,t){var n=To();t=t===void 0?null:t;var r=e();if(uo){ke(!0);try{e()}finally{ke(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=To();if(n!==void 0){var i=n(t);if(uo){ke(!0);try{n(t)}finally{ke(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Ts.bind(null,ao,e),[r.memoizedState,e]},useRef:function(e){var t=To();return e={current:e},t.memoizedState=e},useState:function(e){e=Vo(e);var t=e.queue,n=Es.bind(null,ao,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:fs,useDeferredValue:function(e,t){return hs(To(),e,t)},useTransition:function(){var e=Vo(!1);return e=_s.bind(null,ao,e.queue,!0,!1),To().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=ao,a=To();if(Oi){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Il===null)throw Error(i(349));Rl&127||Io(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,is(Ro.bind(null,r,o,e),[e]),r.flags|=2048,ts(9,{destroy:void 0},Lo.bind(null,r,o,n,t),null),n},useId:function(){var e=To(),t=Il.identifierPrefix;if(Oi){var n=bi,r=yi;n=(r&~(1<<32-Ae(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=fo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=ho++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Y,useFormState:Xo,useActionState:Xo,useOptimistic:function(e){var t=To();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Os.bind(null,ao,!0,n),n.dispatch=t,[e,t]},useMemoCache:Ao,useCacheRefresh:function(){return To().memoizedState=ws.bind(null,ao)},useEffectEvent:function(e){var t=To(),n={impl:e};return t.memoizedState=n,function(){if(Fl&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Ps={readContext:Ji,use:ko,useCallback:ps,useContext:Ji,useEffect:as,useImperativeHandle:ds,useInsertionEffect:cs,useLayoutEffect:ls,useMemo:ms,useReducer:Mo,useRef:ns,useState:function(){return Mo(jo)},useDebugValue:fs,useDeferredValue:function(e,t){return gs(Eo(),oo.memoizedState,e,t)},useTransition:function(){var e=Mo(jo)[0],t=Eo().memoizedState;return[typeof e==`boolean`?e:Oo(e),t]},useSyncExternalStore:Fo,useId:Ss,useHostTransitionStatus:Y,useFormState:Zo,useActionState:Zo,useOptimistic:function(e,t){return Ho(Eo(),oo,e,t)},useMemoCache:Ao,useCacheRefresh:Cs};Ps.useEffectEvent=ss;var Fs={readContext:Ji,use:ko,useCallback:ps,useContext:Ji,useEffect:as,useImperativeHandle:ds,useInsertionEffect:cs,useLayoutEffect:ls,useMemo:ms,useReducer:Po,useRef:ns,useState:function(){return Po(jo)},useDebugValue:fs,useDeferredValue:function(e,t){var n=Eo();return oo===null?hs(n,e,t):gs(n,oo.memoizedState,e,t)},useTransition:function(){var e=Po(jo)[0],t=Eo().memoizedState;return[typeof e==`boolean`?e:Oo(e),t]},useSyncExternalStore:Fo,useId:Ss,useHostTransitionStatus:Y,useFormState:es,useActionState:es,useOptimistic:function(e,t){var n=Eo();return oo===null?(n.baseState=e,[e,n.queue.dispatch]):Ho(n,oo,e,t)},useMemoCache:Ao,useCacheRefresh:Cs};Fs.useEffectEvent=ss;function Is(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:f({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ls={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=mu(),i=Fa(r);i.payload=t,n!=null&&(i.callback=n),t=Ia(e,i,r),t!==null&&(gu(t,e,r),La(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=mu(),i=Fa(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ia(e,i,r),t!==null&&(gu(t,e,r),La(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=mu(),r=Fa(n);r.tag=2,t!=null&&(r.callback=t),t=Ia(e,r,n),t!==null&&(gu(t,e,n),La(t,e,n))}};function Rs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!gr(n,r)||!gr(i,a):!0}function zs(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ls.enqueueReplaceState(t,t.state,null)}function Bs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=f({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Vs(e){Ur(e)}function Hs(e){console.error(e)}function Us(e){Ur(e)}function Ws(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Gs(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Ks(e,t,n){return n=Fa(n),n.tag=3,n.payload={element:null},n.callback=function(){Ws(e,t)},n}function qs(e){return e=Fa(e),e.tag=3,e}function Js(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Gs(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Gs(t,n,r),typeof i!=`function`&&(iu===null?iu=new Set([this]):iu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Ys(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Gi(t,n,a,!0),n=Ya.current,n!==null){switch(n.tag){case 31:case 13:return Xa===null?Ou():n.alternate===null&&Gl===0&&(Gl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===_a?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Ku(e,r,a)),!1;case 22:return n.flags|=65536,r===_a?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Ku(e,r,a)),!1}throw Error(i(435,n.tag))}return Ku(e,r,a),Ou(),!1}if(Oi)return t=Ya.current,t===null?(r!==ji&&(t=Error(i(423),{cause:r}),Ri(di(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=di(r,n),a=Ks(e.stateNode,r,a),Ra(e,a),Gl!==4&&(Gl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==ji&&(e=Error(i(422),{cause:r}),Ri(di(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=di(o,n),Zl===null?Zl=[o]:Zl.push(o),Gl!==4&&(Gl=2),t===null)return!0;r=di(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Ks(n.stateNode,r,e),Ra(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(iu===null||!iu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=qs(a),Js(a,e,n,r),Ra(n,a),!1}n=n.return}while(n!==null);return!1}var Xs=Error(i(461)),Zs=!1;function Qs(e,t,n,r){t.child=e===null?ja(t,null,n,r):Aa(t,e.child,n,r)}function $s(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return qi(t),r=vo(e,t,n,o,a,i),s=So(),e!==null&&!Zs?(Co(e,t,i),Cc(e,t,i)):(Oi&&s&&Ci(t),t.flags|=1,Qs(e,t,r,i),t.child)}function ec(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ni(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,tc(e,t,a,r,i)):(e=ai(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!wc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?gr:n,n(o,r)&&e.ref===t.ref)return Cc(e,t,i)}return t.flags|=1,e=ri(a,r),e.ref=t.ref,e.return=t,t.child=e}function tc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(gr(a,r)&&e.ref===t.ref){if(Zs=!1,t.pendingProps=r=a,wc(e,i))e.flags&131072&&(Zs=!0);else return t.lanes=e.lanes,Cc(e,t,i)}}return lc(e,t,n,r,i)}function nc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return ic(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&fa(t,a===null?null:a.cachePool),a===null?qa():Ka(t,a),$a(t);else return r=t.lanes=536870912,ic(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&fa(t,null),qa(),eo(t)):(fa(t,a.cachePool),Ka(t,a),eo(t),t.memoizedState=null);return Qs(e,t,i,n),t.child}function rc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function ic(e,t,n,r,i){var a=da();return a=a===null?null:{parent:ea._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&fa(t,null),qa(),$a(t),e!==null&&Gi(e,t,r,!0),t.childLanes=i,null}function ac(e,t){return t=vc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function oc(e,t,n){return Aa(t,e.child,null,n),e=ac(t,t.pendingProps),e.flags|=2,to(t),t.memoizedState=null,e}function sc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(Oi){if(r.mode===`hidden`)return e=ac(t,r),t.lanes=536870912,rc(null,e);if(Qa(t),(e=Di)?(e=sf(e,Ai),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:vi===null?null:{id:yi,overflow:bi},retryLane:536870912,hydrationErrors:null},n=ci(e),n.return=t,t.child=n,Ei=t,Di=null)):e=null,e===null)throw Mi(t);return t.lanes=536870912,null}return ac(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Qa(t),a){if(t.flags&256)t.flags&=-257,t=oc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(Zs||Gi(e,t,n,!1),a=(n&e.childLanes)!==0,Zs||a){if(r=Il,r!==null&&(s=qe(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Xr(e,s),gu(r,e,s),Xs;Ou(),t=oc(e,t,n)}else e=o.treeContext,Di=df(s.nextSibling),Ei=t,Oi=!0,ki=null,Ai=!1,e!==null&&Ti(t,e),t=ac(t,r),t.flags|=4096;return t}return e=ri(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function cc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function lc(e,t,n,r,i){return qi(t),n=vo(e,t,n,r,void 0,i),r=So(),e!==null&&!Zs?(Co(e,t,i),Cc(e,t,i)):(Oi&&r&&Ci(t),t.flags|=1,Qs(e,t,n,i),t.child)}function uc(e,t,n,r,i,a){return qi(t),t.updateQueue=null,n=bo(t,r,n,i),yo(e),r=So(),e!==null&&!Zs?(Co(e,t,a),Cc(e,t,a)):(Oi&&r&&Ci(t),t.flags|=1,Qs(e,t,n,a),t.child)}function dc(e,t,n,r,i){if(qi(t),t.stateNode===null){var a=$r,o=n.contextType;typeof o==`object`&&o&&(a=Ji(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Ls,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Na(t),o=n.contextType,a.context=typeof o==`object`&&o?Ji(o):$r,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Is(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Ls.enqueueReplaceState(a,a.state,null),Va(t,r,a,i),Ba(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Bs(n,s);a.props=c;var l=a.context,u=n.contextType;o=$r,typeof u==`object`&&u&&(o=Ji(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&zs(t,a,r,o),Ma=!1;var f=t.memoizedState;a.state=f,Va(t,r,a,i),Ba(),l=t.memoizedState,s||f!==l||Ma?(typeof d==`function`&&(Is(t,n,d,r),l=t.memoizedState),(c=Ma||Rs(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Pa(e,t),o=t.memoizedProps,u=Bs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=$r,typeof l==`object`&&l&&(c=Ji(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&zs(t,a,r,c),Ma=!1,f=t.memoizedState,a.state=f,Va(t,r,a,i),Ba();var p=t.memoizedState;o!==d||f!==p||Ma||e!==null&&e.dependencies!==null&&Ki(e.dependencies)?(typeof s==`function`&&(Is(t,n,s,r),p=t.memoizedState),(u=Ma||Rs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Ki(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,cc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Aa(t,e.child,null,i),t.child=Aa(t,null,n,i)):Qs(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Cc(e,t,i),e}function fc(e,t,n,r){return Ii(),t.flags|=256,Qs(e,t,n,r),t.child}var pc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function mc(e){return{baseLanes:e,cachePool:pa()}}function hc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Yl),e}function gc(e,t,n){var r=t.pendingProps,a=!1,o=!!(t.flags&128),s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:!!(no.current&2)),s&&(a=!0,t.flags&=-129),s=!!(t.flags&32),t.flags&=-33,e===null){if(Oi){if(a?Za(t):eo(t),(e=Di)?(e=sf(e,Ai),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:vi===null?null:{id:yi,overflow:bi},retryLane:536870912,hydrationErrors:null},n=ci(e),n.return=t,t.child=n,Ei=t,Di=null)):e=null,e===null)throw Mi(t);return lf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(eo(t),a=t.mode,c=vc({mode:`hidden`,children:c},a),r=oi(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=mc(n),r.childLanes=hc(e,s,n),t.memoizedState=pc,rc(null,r)):(Za(t),_c(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(Za(t),t.flags&=-257,t=yc(e,t,n)):t.memoizedState===null?(eo(t),c=r.fallback,a=t.mode,r=vc({mode:`visible`,children:r.children},a),c=oi(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Aa(t,e.child,null,n),r=t.child,r.memoizedState=mc(n),r.childLanes=hc(e,s,n),t.memoizedState=pc,t=rc(null,r)):(eo(t),t.child=e.child,t.flags|=128,t=null);else if(Za(t),lf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Ri({value:r,source:null,stack:null}),t=yc(e,t,n)}else if(Zs||Gi(e,t,n,!1),s=(n&e.childLanes)!==0,Zs||s){if(s=Il,s!==null&&(r=qe(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,Xr(e,r),gu(s,e,r),Xs;cf(c)||Ou(),t=yc(e,t,n)}else cf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Di=df(c.nextSibling),Ei=t,Oi=!0,ki=null,Ai=!1,e!==null&&Ti(t,e),t=_c(t,r.children),t.flags|=4096);return t}return a?(eo(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=ri(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=oi(c,a,n,null),c.flags|=2):c=ri(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,rc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=mc(n):(a=c.cachePool,a===null?a=pa():(l=ea._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=hc(e,s,n),t.memoizedState=pc,rc(e.child,r)):(Za(t),n=e.child,e=n.sibling,n=ri(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function _c(e,t){return t=vc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function vc(e,t){return e=ti(22,e,null,t),e.lanes=0,e}function yc(e,t,n){return Aa(t,e.child,null,n),e=_c(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function bc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ui(e.return,t,n)}function xc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Sc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=no.current,s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,V(no,o),Qs(e,t,r,n),r=Oi?hi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&bc(e,n,t);else if(e.tag===19)bc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&ro(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),xc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ro(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}xc(t,!0,n,null,a,r);break;case`together`:xc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Cc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Kl|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(Gi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=ri(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ri(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function wc(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&Ki(e)))}function Tc(e,t,n){switch(t.tag){case 3:ne(t,t.stateNode.containerInfo),K(t,ea,e.memoizedState.cache),Ii();break;case 27:case 5:ie(t);break;case 4:ne(t,t.stateNode.containerInfo);break;case 10:K(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Qa(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(Za(t),e=Cc(e,t,n),e===null?null:e.sibling):gc(e,t,n):(Za(t),t.flags|=128,null);Za(t);break;case 19:var i=!!(e.flags&128);if(r=(n&t.childLanes)!==0,r||=(Gi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Sc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),V(no,no.current),r)break;return null;case 22:return t.lanes=0,nc(e,t,n,t.pendingProps);case 24:K(t,ea,e.memoizedState.cache)}return Cc(e,t,n)}function Ec(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)Zs=!0;else{if(!wc(e,n)&&!(t.flags&128))return Zs=!1,Tc(e,t,n);Zs=!!(e.flags&131072)}}else Zs=!1,Oi&&t.flags&1048576&&Si(t,hi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=ba(t.elementType),t.type=e,typeof e==`function`)ni(e)?(r=Bs(e,r),t.tag=1,t=dc(null,t,e,r,n)):(t.tag=0,t=lc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===x){t.tag=11,t=$s(null,t,e,r,n);break a}if(a===w){t.tag=14,t=ec(null,t,e,r,n);break a}}throw t=M(e)||e,Error(i(306,t,``))}}return t;case 0:return lc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Bs(r,t.pendingProps),dc(e,t,r,a,n);case 3:a:{if(ne(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Pa(e,t),Va(t,r,null,n);var s=t.memoizedState;if(r=s.cache,K(t,ea,r),r!==o.cache&&Wi(t,[ea],n,!0),Ba(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=fc(e,t,r,n);break a}if(r!==a){a=di(Error(i(424)),t),Ri(a),t=fc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Di=df(e.firstChild),Ei=t,Oi=!0,ki=null,Ai=!0,n=ja(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Ii(),r===a){t=Cc(e,t,n);break a}Qs(e,t,r,n)}t=t.child}return t;case 26:return cc(e,t),e===null?(n=Mf(t.type,null,t.pendingProps,null))?t.memoizedState=n:Oi||(n=t.type,e=t.pendingProps,r=Ud(U.current).createElement(n),r[$e]=t,r[et]=e,Ld(r,n,e),ft(r),t.stateNode=r):t.memoizedState=Mf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ie(t),e===null&&Oi&&(r=t.stateNode=hf(t.type,t.pendingProps,U.current),Ei=t,Ai=!0,a=Di,ef(t.type)?(ff=a,Di=df(r.firstChild)):Di=a),Qs(e,t,t.pendingProps.children,n),cc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Oi&&((a=r=Di)&&(r=af(r,t.type,t.pendingProps,Ai),r===null?a=!1:(t.stateNode=r,Ei=t,Di=df(r.firstChild),Ai=!1,a=!0)),a||Mi(t)),ie(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Kd(a,o)?r=null:s!==null&&Kd(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=vo(e,t,xo,null,null,n),tp._currentValue=a),cc(e,t),Qs(e,t,r,n),t.child;case 6:return e===null&&Oi&&((e=n=Di)&&(n=of(n,t.pendingProps,Ai),n===null?e=!1:(t.stateNode=n,Ei=t,Di=null,e=!0)),e||Mi(t)),null;case 13:return gc(e,t,n);case 4:return ne(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Aa(t,null,r,n):Qs(e,t,r,n),t.child;case 11:return $s(e,t,t.type,t.pendingProps,n);case 7:return Qs(e,t,t.pendingProps,n),t.child;case 8:return Qs(e,t,t.pendingProps.children,n),t.child;case 12:return Qs(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,K(t,t.type,r.value),Qs(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,qi(t),a=Ji(a),r=r(a),t.flags|=1,Qs(e,t,r,n),t.child;case 14:return ec(e,t,t.type,t.pendingProps,n);case 15:return tc(e,t,t.type,t.pendingProps,n);case 19:return Sc(e,t,n);case 31:return sc(e,t,n);case 22:return nc(e,t,n,t.pendingProps);case 24:return qi(t),r=Ji(ea),e===null?(a=da(),a===null&&(a=Il,o=ta(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Na(t),K(t,ea,a)):((e.lanes&n)!==0&&(Pa(e,t),Va(t,null,null,n),Ba()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,K(t,ea,r),r!==a.cache&&Wi(t,[ea],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),K(t,ea,r))),Qs(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Dc(e){e.flags|=4}function Oc(e,t,n,r,i){if((t=!!(e.mode&32))&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Tu())e.flags|=8192;else throw xa=_a,ha}}else e.flags&=-16777217}function kc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!qf(t)){if(Tu())e.flags|=8192;else throw xa=_a,ha}}function Ac(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Ve(),e.lanes|=t,Xl|=t)}function jc(e,t){if(!Oi)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Mc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Nc(e,t,n){var r=t.pendingProps;switch(wi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Mc(t),null;case 1:return Mc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Hi(ea),re(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Fi(t)?Dc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Li())),Mc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Dc(t),o===null?(Mc(t),Oc(t,a,null,r,n)):(Mc(t),kc(t,o))):o?o===e.memoizedState?(Mc(t),t.flags&=-16777217):(Dc(t),Mc(t),kc(t,o)):(e=e.memoizedProps,e!==r&&Dc(t),Mc(t),Oc(t,a,e,r,n)),null;case 27:if(ae(t),n=U.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Dc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Mc(t),null}e=H.current,Fi(t)?Ni(t,e):(e=hf(a,r,n),t.stateNode=e,Dc(t))}return Mc(t),null;case 5:if(ae(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Dc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Mc(t),null}if(o=H.current,Fi(t))Ni(t,o);else{var s=Ud(U.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[$e]=t,o[et]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Ld(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Dc(t)}}return Mc(t),Oc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Dc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=U.current,Fi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Ei,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[$e]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Pd(e.nodeValue,n)),e||Mi(t,!0)}else e=Ud(e).createTextNode(r),e[$e]=t,t.stateNode=e}return Mc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Fi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[$e]=t}else Ii(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Mc(t),e=!1}else n=Li(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(to(t),t):(to(t),null);if(t.flags&128)throw Error(i(558))}return Mc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Fi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[$e]=t}else Ii(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Mc(t),a=!1}else a=Li(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(to(t),t):(to(t),null)}return to(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Ac(t,t.updateQueue),Mc(t),null);case 4:return re(),e===null&&wd(t.stateNode.containerInfo),Mc(t),null;case 10:return Hi(t.type),Mc(t),null;case 19:if(B(no),r=t.memoizedState,r===null)return Mc(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)jc(r,!1);else{if(Gl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=ro(e),o!==null){for(t.flags|=128,jc(r,!1),e=o.updateQueue,t.updateQueue=e,Ac(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ii(n,e),n=n.sibling;return V(no,no.current&1|2),Oi&&xi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&ye()>nu&&(t.flags|=128,a=!0,jc(r,!1),t.lanes=4194304)}}else{if(!a){if(e=ro(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Ac(t,e),jc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Oi)return Mc(t),null}else 2*ye()-r.renderingStartTime>nu&&n!==536870912&&(t.flags|=128,a=!0,jc(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Mc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=ye(),e.sibling=null,n=no.current,V(no,a?n&1|2:n&1),Oi&&xi(t,r.treeForkCount),e);case 22:case 23:return to(t),Ja(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Mc(t),t.subtreeFlags&6&&(t.flags|=8192)):Mc(t),n=t.updateQueue,n!==null&&Ac(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&B(ua),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Hi(ea),Mc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Pc(e,t){switch(wi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Hi(ea),re(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ae(t),null;case 31:if(t.memoizedState!==null){if(to(t),t.alternate===null)throw Error(i(340));Ii()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(to(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Ii()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return B(no),null;case 4:return re(),null;case 10:return Hi(t.type),null;case 22:case 23:return to(t),Ja(),e!==null&&B(ua),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Hi(ea),null;case 25:return null;default:return null}}function Fc(e,t){switch(wi(t),t.tag){case 3:Hi(ea),re();break;case 26:case 27:case 5:ae(t);break;case 4:re();break;case 31:t.memoizedState!==null&&to(t);break;case 13:to(t);break;case 19:B(no);break;case 10:Hi(t.type);break;case 22:case 23:to(t),Ja(),e!==null&&B(ua);break;case 24:Hi(ea)}}function Ic(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Gu(t,t.return,e)}}function Lc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Gu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Gu(t,t.return,e)}}function Rc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ua(t,n)}catch(t){Gu(e,e.return,t)}}}function zc(e,t,n){n.props=Bs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Gu(e,t,n)}}function Bc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Gu(e,t,n)}}function Vc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){Gu(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Gu(e,t,n)}else n.current=null}}function Hc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Gu(e,e.return,t)}}function Uc(e,t,n){try{var r=e.stateNode;Rd(r,e.type,n,t),r[et]=t}catch(t){Gu(e,e.return,t)}}function Wc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ef(e.type)||e.tag===4}function Gc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Wc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&ef(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Kc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Kt));else if(r!==4&&(r===27&&ef(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Kc(e,t,n),e=e.sibling;e!==null;)Kc(e,t,n),e=e.sibling}function qc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&ef(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(qc(e,t,n),e=e.sibling;e!==null;)qc(e,t,n),e=e.sibling}function Jc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Ld(t,r,n),t[$e]=e,t[et]=n}catch(t){Gu(e,e.return,t)}}var Yc=!1,Xc=!1,Zc=!1,Qc=typeof WeakSet==`function`?WeakSet:Set,$c=null;function el(e,t){if(e=e.containerInfo,Vd=up,e=br(e),xr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Hd={focusedElem:e,selectionRange:n},up=!1,$c=t;$c!==null;)if(t=$c,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,$c=e;else for(;$c!==null;){switch(t=$c,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Bs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Gu(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)rf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:rf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,$c=e;break}$c=t.return}}function tl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:gl(e,n),r&4&&Ic(5,n);break;case 1:if(gl(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Gu(n,n.return,e)}else{var i=Bs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Gu(n,n.return,e)}}}r&64&&Rc(n),r&512&&Bc(n,n.return);break;case 3:if(gl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Ua(e,t)}catch(e){Gu(n,n.return,e)}}break;case 27:t===null&&r&4&&Jc(n);case 26:case 5:gl(e,n),t===null&&r&4&&Hc(n),r&512&&Bc(n,n.return);break;case 12:gl(e,n);break;case 31:gl(e,n),r&4&&sl(e,n);break;case 13:gl(e,n),r&4&&cl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Yu.bind(null,n),uf(e,n))));break;case 22:if(r=n.memoizedState!==null||Yc,!r){t=t!==null&&t.memoizedState!==null||Xc,i=Yc;var a=Xc;Yc=r,(Xc=t)&&!a?vl(e,n,!!(n.subtreeFlags&8772)):gl(e,n),Yc=i,Xc=a}break;case 30:break;default:gl(e,n)}}function nl(e){var t=e.alternate;t!==null&&(e.alternate=null,nl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&st(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var rl=null,il=!1;function al(e,t,n){for(n=n.child;n!==null;)ol(e,t,n),n=n.sibling}function ol(e,t,n){if(G&&typeof G.onCommitFiberUnmount==`function`)try{G.onCommitFiberUnmount(Oe,n)}catch{}switch(n.tag){case 26:Xc||Vc(n,t),al(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Xc||Vc(n,t);var r=rl,i=il;ef(n.type)&&(rl=n.stateNode,il=!1),al(e,t,n),gf(n.stateNode),rl=r,il=i;break;case 5:Xc||Vc(n,t);case 6:if(r=rl,i=il,rl=null,al(e,t,n),rl=r,il=i,rl!==null){if(il)try{(rl.nodeType===9?rl.body:rl.nodeName===`HTML`?rl.ownerDocument.body:rl).removeChild(n.stateNode)}catch(e){Gu(n,t,e)}else try{rl.removeChild(n.stateNode)}catch(e){Gu(n,t,e)}}break;case 18:rl!==null&&(il?(e=rl,tf(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Ip(e)):tf(rl,n.stateNode));break;case 4:r=rl,i=il,rl=n.stateNode.containerInfo,il=!0,al(e,t,n),rl=r,il=i;break;case 0:case 11:case 14:case 15:Lc(2,n,t),Xc||Lc(4,n,t),al(e,t,n);break;case 1:Xc||(Vc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&zc(n,t,r)),al(e,t,n);break;case 21:al(e,t,n);break;case 22:Xc=(r=Xc)||n.memoizedState!==null,al(e,t,n),Xc=r;break;default:al(e,t,n)}}function sl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ip(e)}catch(e){Gu(t,t.return,e)}}}function cl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ip(e)}catch(e){Gu(t,t.return,e)}}function ll(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Qc),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Qc),t;default:throw Error(i(435,e.tag))}}function ul(e,t){var n=ll(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Xu.bind(null,e,t);t.then(r,r)}})}function dl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(ef(c.type)){rl=c.stateNode,il=!1;break a}break;case 5:rl=c.stateNode,il=!1;break a;case 3:case 4:rl=c.stateNode.containerInfo,il=!0;break a}c=c.return}if(rl===null)throw Error(i(160));ol(o,s,a),rl=null,il=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)pl(t,e),t=t.sibling}var fl=null;function pl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:dl(t,e),ml(e),r&4&&(Lc(3,e,e.return),Ic(3,e),Lc(5,e,e.return));break;case 1:dl(t,e),ml(e),r&512&&(Xc||n===null||Vc(n,n.return)),r&64&&Yc&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=fl;if(dl(t,e),ml(e),r&512&&(Xc||n===null||Vc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null){if(r===null){if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[ot]||o[$e]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Ld(o,r,n),o[$e]=e,ft(o),r=o;break a;case`link`:var s=Wf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Ld(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Wf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Ld(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[$e]=e,ft(o),r=o}e.stateNode=r}else Gf(a,e.type,e.stateNode)}else e.stateNode=zf(a,r,e.memoizedProps)}else o===r?r===null&&e.stateNode!==null&&Uc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Gf(a,e.type,e.stateNode):zf(a,r,e.memoizedProps))}break;case 27:dl(t,e),ml(e),r&512&&(Xc||n===null||Vc(n,n.return)),n!==null&&r&4&&Uc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(dl(t,e),ml(e),r&512&&(Xc||n===null||Vc(n,n.return)),e.flags&32){a=e.stateNode;try{Rt(a,``)}catch(t){Gu(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Uc(e,a,n===null?a:n.memoizedProps)),r&1024&&(Zc=!0);break;case 6:if(dl(t,e),ml(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Gu(e,e.return,t)}}break;case 3:if(Uf=null,a=fl,fl=yf(t.containerInfo),dl(t,e),fl=a,ml(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Ip(t.containerInfo)}catch(t){Gu(e,e.return,t)}Zc&&(Zc=!1,hl(e));break;case 4:r=fl,fl=yf(e.stateNode.containerInfo),dl(t,e),ml(e),fl=r;break;case 12:dl(t,e),ml(e);break;case 31:dl(t,e),ml(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ul(e,r)));break;case 13:dl(t,e),ml(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(eu=ye()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ul(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=Yc,d=Xc;if(Yc=u||a,Xc=d||l,dl(t,e),Xc=d,Yc=u,ml(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||Yc||Xc||_l(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Gu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Gu(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?nf(m,!0):nf(l.stateNode,!1)}catch(e){Gu(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,ul(e,n))));break;case 19:dl(t,e),ml(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ul(e,r)));break;case 30:break;case 21:break;default:dl(t,e),ml(e)}}function ml(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Wc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;qc(e,Gc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Rt(o,``),n.flags&=-33),qc(e,Gc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Kc(e,Gc(e),s);break;default:throw Error(i(161))}}catch(t){Gu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function hl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;hl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function gl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)tl(e,t.alternate,t),t=t.sibling}function _l(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Lc(4,t,t.return),_l(t);break;case 1:Vc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&zc(t,t.return,n),_l(t);break;case 27:gf(t.stateNode);case 26:case 5:Vc(t,t.return),_l(t);break;case 22:t.memoizedState===null&&_l(t);break;case 30:_l(t);break;default:_l(t)}e=e.sibling}}function vl(e,t,n){for(n&&=!!(t.subtreeFlags&8772),t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:vl(i,a,n),Ic(4,a);break;case 1:if(vl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Gu(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Ha(c[i],s)}catch(e){Gu(r,r.return,e)}}n&&o&64&&Rc(a),Bc(a,a.return);break;case 27:Jc(a);case 26:case 5:vl(i,a,n),n&&r===null&&o&4&&Hc(a),Bc(a,a.return);break;case 12:vl(i,a,n);break;case 31:vl(i,a,n),n&&o&4&&sl(i,a);break;case 13:vl(i,a,n),n&&o&4&&cl(i,a);break;case 22:a.memoizedState===null&&vl(i,a,n),Bc(a,a.return);break;case 30:break;default:vl(i,a,n)}t=t.sibling}}function yl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&na(n))}function bl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&na(e))}function xl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Sl(e,t,n,r),t=t.sibling}function Sl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:xl(e,t,n,r),i&2048&&Ic(9,t);break;case 1:xl(e,t,n,r);break;case 3:xl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&na(e)));break;case 12:if(i&2048){xl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Gu(t,t.return,e)}}else xl(e,t,n,r);break;case 31:xl(e,t,n,r);break;case 13:xl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?xl(e,t,n,r):(a._visibility|=2,Cl(e,t,n,r,!!(t.subtreeFlags&10256)||!1)):a._visibility&2?xl(e,t,n,r):wl(e,t),i&2048&&yl(o,t);break;case 24:xl(e,t,n,r),i&2048&&bl(t.alternate,t);break;default:xl(e,t,n,r)}}function Cl(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Cl(a,o,s,c,i),Ic(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Cl(a,o,s,c,i)):u._visibility&2?Cl(a,o,s,c,i):wl(a,o),i&&l&2048&&yl(o.alternate,o);break;case 24:Cl(a,o,s,c,i),i&&l&2048&&bl(o.alternate,o);break;default:Cl(a,o,s,c,i)}t=t.sibling}}function wl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:wl(n,r),i&2048&&yl(r.alternate,r);break;case 24:wl(n,r),i&2048&&bl(r.alternate,r);break;default:wl(n,r)}t=t.sibling}}var Tl=8192;function El(e,t,n){if(e.subtreeFlags&Tl)for(e=e.child;e!==null;)Dl(e,t,n),e=e.sibling}function Dl(e,t,n){switch(e.tag){case 26:El(e,t,n),e.flags&Tl&&e.memoizedState!==null&&Jf(n,fl,e.memoizedState,e.memoizedProps);break;case 5:El(e,t,n);break;case 3:case 4:var r=fl;fl=yf(e.stateNode.containerInfo),El(e,t,n),fl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Tl,Tl=16777216,El(e,t,n),Tl=r):El(e,t,n));break;default:El(e,t,n)}}function Ol(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function kl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];$c=r,Ml(r,e)}Ol(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Al(e),e=e.sibling}function Al(e){switch(e.tag){case 0:case 11:case 15:kl(e),e.flags&2048&&Lc(9,e,e.return);break;case 3:kl(e);break;case 12:kl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,jl(e)):kl(e);break;default:kl(e)}}function jl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];$c=r,Ml(r,e)}Ol(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Lc(8,t,t.return),jl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,jl(t));break;default:jl(t)}e=e.sibling}}function Ml(e,t){for(;$c!==null;){var n=$c;switch(n.tag){case 0:case 11:case 15:Lc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:na(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,$c=r;else a:for(n=e;$c!==null;){r=$c;var i=r.sibling,a=r.return;if(nl(r),r===n){$c=null;break a}if(i!==null){i.return=a,$c=i;break a}$c=a}}}var Nl={getCacheForType:function(e){var t=Ji(ea),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ji(ea).controller.signal}},Pl=typeof WeakMap==`function`?WeakMap:Map,Fl=0,Il=null,Ll=null,Rl=0,zl=0,Bl=null,Vl=!1,Hl=!1,Ul=!1,Wl=0,Gl=0,Kl=0,ql=0,Jl=0,Yl=0,Xl=0,Zl=null,Ql=null,$l=!1,eu=0,tu=0,nu=1/0,ru=null,iu=null,au=0,ou=null,su=null,cu=0,lu=0,uu=null,du=null,fu=0,pu=null;function mu(){return Fl&2&&Rl!==0?Rl&-Rl:P.T===null?Xe():fd()}function hu(){if(Yl===0){if(!(Rl&536870912)||Oi){var e=Fe;Fe<<=1,!(Fe&3932160)&&(Fe=262144),Yl=e}else Yl=536870912}return e=Ya.current,e!==null&&(e.flags|=32),Yl}function gu(e,t,n){(e===Il&&(zl===2||zl===9)||e.cancelPendingCommit!==null)&&(Cu(e,0),bu(e,Rl,Yl,!1)),Ue(e,n),(!(Fl&2)||e!==Il)&&(e===Il&&(!(Fl&2)&&(ql|=n),Gl===4&&bu(e,Rl,Yl,!1)),id(e))}function _u(e,t,n){if(Fl&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||ze(e,t),a=r?ju(e,t):ku(e,t,!0),o=r;do{if(a===0){Hl&&!r&&bu(e,t,0,!1);break}if(n=e.current.alternate,o&&!yu(n)){a=ku(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=Zl;var l=c.current.memoizedState.isDehydrated;if(l&&(Cu(c,s).flags|=256),s=ku(c,s,!1),s!==2){if(Ul&&!l){c.errorRecoveryDisabledLanes|=o,ql|=o,a=4;break a}o=Ql,Ql=a,o!==null&&(Ql===null?Ql=o:Ql.push.apply(Ql,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Cu(e,0),bu(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:bu(r,t,Yl,!Vl);break a;case 2:Ql=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=eu+300-ye(),10<a)){if(bu(r,t,Yl,!Vl),Re(r,0,!0)!==0)break a;cu=t,r.timeoutHandle=Yd(vu.bind(null,r,n,Ql,ru,$l,t,Yl,ql,Xl,Vl,o,`Throttled`,-0,0),a);break a}vu(r,n,Ql,ru,$l,t,Yl,ql,Xl,Vl,o,null,-0,0)}break}while(1);id(e)}function vu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Kt},Dl(t,a,d);var m=(a&62914560)===a?eu-ye():(a&4194048)===a?tu-ye():0;if(m=Xf(d,m),m!==null){cu=a,e.cancelPendingCommit=m(Lu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),bu(e,a,o,!l);return}}Lu(e,t,a,n,r,i,o,s,c)}function yu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!hr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function bu(e,t,n,r){t&=~Jl,t&=~ql,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ae(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Ge(e,n,t)}function xu(){return Fl&6?!0:(ad(0,!1),!1)}function Su(){if(Ll!==null){if(zl===0)var e=Ll.return;else e=Ll,Vi=Bi=null,wo(e),wa=null,Ta=0,e=Ll;for(;e!==null;)Fc(e.alternate,e),e=e.return;Ll=null}}function Cu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Xd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),cu=0,Su(),Il=e,Ll=n=ri(e.current,null),Rl=t,zl=0,Bl=null,Vl=!1,Hl=ze(e,t),Ul=!1,Xl=Yl=Jl=ql=Kl=Gl=0,Ql=Zl=null,$l=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Ae(r),a=1<<i;t|=e[i],r&=~a}return Wl=t,qr(),n}function wu(e,t){ao=null,P.H=Ms,t===ma||t===ga?(t=Sa(),zl=3):t===ha?(t=Sa(),zl=4):zl=t===Xs?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Bl=t,Ll===null&&(Gl=1,Ws(e,di(t,e.current)))}function Tu(){var e=Ya.current;return e===null?!0:(Rl&4194048)===Rl?Xa===null:(Rl&62914560)===Rl||Rl&536870912?e===Xa:!1}function Eu(){var e=P.H;return P.H=Ms,e===null?Ms:e}function Du(){var e=P.A;return P.A=Nl,e}function Ou(){Gl=4,Vl||(Rl&4194048)!==Rl&&Ya.current!==null||(Hl=!0),!(Kl&134217727)&&!(ql&134217727)||Il===null||bu(Il,Rl,Yl,!1)}function ku(e,t,n){var r=Fl;Fl|=2;var i=Eu(),a=Du();(Il!==e||Rl!==t)&&(ru=null,Cu(e,t)),t=!1;var o=Gl;a:do try{if(zl!==0&&Ll!==null){var s=Ll,c=Bl;switch(zl){case 8:Su(),o=6;break a;case 3:case 2:case 9:case 6:Ya.current===null&&(t=!0);var l=zl;if(zl=0,Bl=null,Fu(e,s,c,l),n&&Hl){o=0;break a}break;default:l=zl,zl=0,Bl=null,Fu(e,s,c,l)}}Au(),o=Gl;break}catch(t){wu(e,t)}while(1);return t&&e.shellSuspendCounter++,Vi=Bi=null,Fl=r,P.H=i,P.A=a,Ll===null&&(Il=null,Rl=0,qr()),o}function Au(){for(;Ll!==null;)Nu(Ll)}function ju(e,t){var n=Fl;Fl|=2;var r=Eu(),a=Du();Il!==e||Rl!==t?(ru=null,nu=ye()+500,Cu(e,t)):Hl=ze(e,t);a:do try{if(zl!==0&&Ll!==null){t=Ll;var o=Bl;b:switch(zl){case 1:zl=0,Bl=null,Fu(e,t,o,1);break;case 2:case 9:if(va(o)){zl=0,Bl=null,Pu(t);break}t=function(){zl!==2&&zl!==9||Il!==e||(zl=7),id(e)},o.then(t,t);break a;case 3:zl=7;break a;case 4:zl=5;break a;case 7:va(o)?(zl=0,Bl=null,Pu(t)):(zl=0,Bl=null,Fu(e,t,o,7));break;case 5:var s=null;switch(Ll.tag){case 26:s=Ll.memoizedState;case 5:case 27:var c=Ll;if(s?qf(s):c.stateNode.complete){zl=0,Bl=null;var l=c.sibling;if(l!==null)Ll=l;else{var u=c.return;u===null?Ll=null:(Ll=u,X(u))}break b}}zl=0,Bl=null,Fu(e,t,o,5);break;case 6:zl=0,Bl=null,Fu(e,t,o,6);break;case 8:Su(),Gl=6;break a;default:throw Error(i(462))}}Mu();break}catch(t){wu(e,t)}while(1);return Vi=Bi=null,P.H=r,P.A=a,Fl=n,Ll===null?(Il=null,Rl=0,qr(),Gl):0}function Mu(){for(;Ll!==null&&!_e();)Nu(Ll)}function Nu(e){var t=Ec(e.alternate,e,Wl);e.memoizedProps=e.pendingProps,t===null?X(e):Ll=t}function Pu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=uc(n,t,t.pendingProps,t.type,void 0,Rl);break;case 11:t=uc(n,t,t.pendingProps,t.type.render,t.ref,Rl);break;case 5:wo(t);default:Fc(n,t),t=Ll=ii(t,Wl),t=Ec(n,t,Wl)}e.memoizedProps=e.pendingProps,t===null?X(e):Ll=t}function Fu(e,t,n,r){Vi=Bi=null,wo(t),wa=null,Ta=0;var i=t.return;try{if(Ys(e,i,t,n,Rl)){Gl=1,Ws(e,di(n,e.current)),Ll=null;return}}catch(t){if(i!==null)throw Ll=i,t;Gl=1,Ws(e,di(n,e.current)),Ll=null;return}t.flags&32768?(Oi||r===1?e=!0:Hl||Rl&536870912?e=!1:(Vl=e=!0,(r===2||r===9||r===3||r===6)&&(r=Ya.current,r!==null&&r.tag===13&&(r.flags|=16384))),Iu(t,e)):X(t)}function X(e){var t=e;do{if(t.flags&32768){Iu(t,Vl);return}e=t.return;var n=Nc(t.alternate,t,Wl);if(n!==null){Ll=n;return}if(t=t.sibling,t!==null){Ll=t;return}Ll=t=e}while(t!==null);Gl===0&&(Gl=5)}function Iu(e,t){do{var n=Pc(e.alternate,e);if(n!==null){n.flags&=32767,Ll=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Ll=e;return}Ll=e=n}while(e!==null);Gl=6,Ll=null}function Lu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Hu();while(au!==0);if(Fl&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Kr,We(e,n,o,s,c,l),e===Il&&(Ll=Il=null,Rl=0),su=t,ou=e,cu=n,lu=o,uu=a,du=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Zu(Ce,function(){return Uu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=P.T,P.T=null,a=F.p,F.p=2,s=Fl,Fl|=4;try{el(e,t,n)}finally{Fl=s,F.p=a,P.T=r}}au=1,Ru(),zu(),Bu()}}function Ru(){if(au===1){au=0;var e=ou,t=su,n=!!(t.flags&13878);if(t.subtreeFlags&13878||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=Fl;Fl|=4;try{pl(t,e);var a=Hd,o=br(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&yr(s.ownerDocument.documentElement,s)){if(c!==null&&xr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=vr(s,h),v=vr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}up=!!Vd,Hd=Vd=null}finally{Fl=i,F.p=r,P.T=n}}e.current=t,au=2}}function zu(){if(au===2){au=0;var e=ou,t=su,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=Fl;Fl|=4;try{tl(e,t.alternate,t)}finally{Fl=i,F.p=r,P.T=n}}au=3}}function Bu(){if(au===4||au===3){au=0,ve();var e=ou,t=su,n=cu,r=du;t.subtreeFlags&10256||t.flags&10256?au=5:(au=0,su=ou=null,Vu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(iu=null),Ye(n),t=t.stateNode,G&&typeof G.onCommitFiberRoot==`function`)try{G.onCommitFiberRoot(Oe,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=P.T,i=F.p,F.p=2,P.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{P.T=t,F.p=i}}cu&3&&Hu(),id(e),i=e.pendingLanes,n&261930&&i&42?e===pu?fu++:(fu=0,pu=e):fu=0,ad(0,!1)}}function Vu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,na(t)))}function Hu(){return Ru(),zu(),Bu(),Uu()}function Uu(){if(au!==5)return!1;var e=ou,t=lu;lu=0;var n=Ye(cu),r=P.T,a=F.p;try{F.p=32>n?32:n,P.T=null,n=uu,uu=null;var o=ou,s=cu;if(au=0,su=ou=null,cu=0,Fl&6)throw Error(i(331));var c=Fl;if(Fl|=4,Al(o.current),Sl(o,o.current,s,n),Fl=c,ad(0,!1),G&&typeof G.onPostCommitFiberRoot==`function`)try{G.onPostCommitFiberRoot(Oe,o)}catch{}return!0}finally{F.p=a,P.T=r,Vu(e,t)}}function Wu(e,t,n){t=di(n,t),t=Ks(e.stateNode,t,2),e=Ia(e,t,2),e!==null&&(Ue(e,2),id(e))}function Gu(e,t,n){if(e.tag===3)Wu(e,e,n);else for(;t!==null;){if(t.tag===3){Wu(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(iu===null||!iu.has(r))){e=di(n,e),n=qs(2),r=Ia(t,n,2),r!==null&&(Js(n,r,t,e),Ue(r,2),id(r));break}}t=t.return}}function Ku(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Pl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Ul=!0,i.add(n),e=qu.bind(null,e,t,n),t.then(e,e))}function qu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Il===e&&(Rl&n)===n&&(Gl===4||Gl===3&&(Rl&62914560)===Rl&&300>ye()-eu?!(Fl&2)&&Cu(e,0):Jl|=n,Xl===Rl&&(Xl=0)),id(e)}function Ju(e,t){t===0&&(t=Ve()),e=Xr(e,t),e!==null&&(Ue(e,t),id(e))}function Yu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ju(e,n)}function Xu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),Ju(e,n)}function Zu(e,t){return ge(e,t)}var Qu=null,$u=null,ed=!1,td=!1,nd=!1,rd=0;function id(e){e!==$u&&e.next===null&&($u===null?Qu=$u=e:$u=$u.next=e),td=!0,ed||(ed=!0,dd())}function ad(e,t){if(!nd&&td){nd=!0;do for(var n=!1,r=Qu;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ae(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ud(r,a))}else a=Rl,a=Re(r,r===Il?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||ze(r,a)||(n=!0,ud(r,a))}r=r.next}while(n);nd=!1}}function od(){sd()}function sd(){td=ed=!1;var e=0;rd!==0&&Jd()&&(e=rd);for(var t=ye(),n=null,r=Qu;r!==null;){var i=r.next,a=cd(r,t);a===0?(r.next=null,n===null?Qu=i:n.next=i,i===null&&($u=n)):(n=r,(e!==0||a&3)&&(td=!0)),r=i}au!==0&&au!==5||ad(e,!1),rd!==0&&(rd=0)}function cd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ae(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Be(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Il,n=Rl,n=Re(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(zl===2||zl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&W(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||ze(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&W(r),Ye(n)){case 2:case 8:n=Se;break;case 32:n=Ce;break;case 268435456:n=Te;break;default:n=Ce}return r=ld.bind(null,e),n=ge(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&W(r),e.callbackPriority=2,e.callbackNode=null,2}function ld(e,t){if(au!==0&&au!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Hu()&&e.callbackNode!==n)return null;var r=Rl;return r=Re(e,e===Il?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(_u(e,r,t),cd(e,ye()),e.callbackNode!=null&&e.callbackNode===n?ld.bind(null,e):null)}function ud(e,t){if(Hu())return null;_u(e,t,!0)}function dd(){Qd(function(){Fl&6?ge(xe,od):sd()})}function fd(){if(rd===0){var e=aa;e===0&&(e=Pe,Pe<<=1,!(Pe&261888)&&(Pe=256)),rd=e}return rd}function pd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Gt(``+e)}function md(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function hd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=pd((i[et]||null).action),o=r.submitter;o&&(t=(t=o[et]||null)?pd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new mn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(rd!==0){var e=o?md(i,o):new FormData(i);ys(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?md(i,o):new FormData(i),ys(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var gd=0;gd<Vr.length;gd++){var _d=Vr[gd];Hr(_d.toLowerCase(),`on`+(_d[0].toUpperCase()+_d.slice(1)))}Hr(Nr,`onAnimationEnd`),Hr(Pr,`onAnimationIteration`),Hr(Fr,`onAnimationStart`),Hr(`dblclick`,`onDoubleClick`),Hr(`focusin`,`onFocus`),Hr(`focusout`,`onBlur`),Hr(Ir,`onTransitionRun`),Hr(Lr,`onTransitionStart`),Hr(Rr,`onTransitionCancel`),Hr(zr,`onTransitionEnd`),gt(`onMouseEnter`,[`mouseout`,`mouseover`]),gt(`onMouseLeave`,[`mouseout`,`mouseover`]),gt(`onPointerEnter`,[`pointerout`,`pointerover`]),gt(`onPointerLeave`,[`pointerout`,`pointerover`]),ht(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),ht(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),ht(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),ht(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),ht(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),ht(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var vd=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),yd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(vd));function bd(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Ur(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Ur(e)}i.currentTarget=null,a=c}}}}function xd(e,t){var n=t[nt];n===void 0&&(n=t[nt]=new Set);var r=e+`__bubble`;n.has(r)||(Td(t,e,2,!1),n.add(r))}function Sd(e,t,n){var r=0;t&&(r|=4),Td(n,e,r,t)}var Cd=`_reactListening`+Math.random().toString(36).slice(2);function wd(e){if(!e[Cd]){e[Cd]=!0,pt.forEach(function(t){t!==`selectionchange`&&(yd.has(t)||Sd(t,!1,e),Sd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Cd]||(t[Cd]=!0,Sd(`selectionchange`,!1,t))}}function Td(e,t,n,r){switch(_p(t)){case 2:var i=dp;break;case 8:i=fp;break;default:i=pp}n=i.bind(null,t,n,e),i=void 0,!nn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Ed(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=ct(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}$t(function(){var r=a,i=Jt(n),s=[];a:{var c=Br.get(e);if(c!==void 0){var l=mn,u=e;switch(e){case`keypress`:if(ln(n)===0)break a;case`keydown`:case`keyup`:l=Mn;break;case`focusin`:u=`focus`,l=Cn;break;case`focusout`:u=`blur`,l=Cn;break;case`beforeblur`:case`afterblur`:l=Cn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=xn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Sn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Pn;break;case Nr:case Pr:case Fr:l=wn;break;case zr:l=Fn;break;case`scroll`:case`scrollend`:l=gn;break;case`wheel`:l=In;break;case`copy`:case`cut`:case`paste`:l=Tn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Nn;break;case`toggle`:case`beforetoggle`:l=Ln}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=en(m,p),g!=null&&d.push(Dd(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==qt&&(u=n.relatedTarget||n.fromElement)&&(ct(u)||u[tt]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?ct(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=xn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Nn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:ut(l),h=u==null?c:ut(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,ct(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=kd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Ad(s,c,l,d,!1),u!==null&&f!==null&&Ad(s,f,u,d,!0)}}a:{if(c=r?ut(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=rr;else if(Zn(c)){if(ir)v=pr;else{v=dr;var y=ur}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Ht(r.elementType)&&(v=rr):v=fr;if(v&&=v(e,r)){Qn(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Pt(c,`number`,c.value)}switch(y=r?ut(r):window,e){case`focusin`:(Zn(y)||y.contentEditable===`true`)&&(Cr=y,wr=r,Tr=null);break;case`focusout`:Tr=wr=Cr=null;break;case`mousedown`:Er=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Er=!1,Dr(s,n,i);break;case`selectionchange`:if(Sr)break;case`keydown`:case`keyup`:Dr(s,n,i)}var b;if(zn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else qn?Gn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Hn&&n.locale!==`ko`&&(qn||x!==`onCompositionStart`?x===`onCompositionEnd`&&qn&&(b=cn()):(an=i,on=`value`in an?an.value:an.textContent,qn=!0)),y=Od(r,x),0<y.length&&(x=new En(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=Kn(n),b!==null&&(x.data=b)))),(b=Vn?Jn(e,n):Yn(e,n))&&(x=Od(r,`onBeforeInput`),0<x.length&&(y=new En(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),hd(s,e,r,n,i)}bd(s,t)})}function Dd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Od(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=en(e,n),i!=null&&r.unshift(Dd(e,i,a)),i=en(e,t),i!=null&&r.push(Dd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function kd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Ad(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=en(n,a),l!=null&&o.unshift(Dd(n,l,c))):i||(l=en(n,a),l!=null&&o.push(Dd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var jd=/\r\n?/g,Md=/\u0000|\uFFFD/g;function Nd(e){return(typeof e==`string`?e:``+e).replace(jd,`
|
|
10
|
-
`).replace(Md,``)}function Pd(e,t){return t=Nd(t),Nd(e)===t}function Fd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Rt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Rt(e,``+r);break;case`className`:St(e,`class`,r);break;case`tabIndex`:St(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:St(e,n,r);break;case`style`:Vt(e,r,o);break;case`data`:if(t!==`object`){St(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Gt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&Fd(e,t,`name`,a.name,a,null),Fd(e,t,`formEncType`,a.formEncType,a,null),Fd(e,t,`formMethod`,a.formMethod,a,null),Fd(e,t,`formTarget`,a.formTarget,a,null)):(Fd(e,t,`encType`,a.encType,a,null),Fd(e,t,`method`,a.method,a,null),Fd(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Gt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Kt);break;case`onScroll`:r!=null&&xd(`scroll`,e);break;case`onScrollEnd`:r!=null&&xd(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Gt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:xd(`beforetoggle`,e),xd(`toggle`,e),xt(e,`popover`,r);break;case`xlinkActuate`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Ct(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Ct(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Ct(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:xt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Ut.get(n)||n,xt(e,n,r))}}function Id(e,t,n,r,a,o){switch(n){case`style`:Vt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Rt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Rt(e,``+r);break;case`onScroll`:r!=null&&xd(`scroll`,e);break;case`onScrollEnd`:r!=null&&xd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Kt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!mt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[et]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):xt(e,n,r)}}}function Ld(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:xd(`error`,e),xd(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Fd(e,t,o,s,n,null)}}a&&Fd(e,t,`srcSet`,n.srcSet,n,null),r&&Fd(e,t,`src`,n.src,n,null);return;case`input`:xd(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Fd(e,t,r,d,n,null)}}Nt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in xd(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Fd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Ft(e,!!r,n,!0):Ft(e,!!r,t,!1);return;case`textarea`:for(s in xd(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Fd(e,t,s,c,n,null)}Lt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Fd(e,t,l,r,n,null)}return;case`dialog`:xd(`beforetoggle`,e),xd(`toggle`,e),xd(`cancel`,e),xd(`close`,e);break;case`iframe`:case`object`:xd(`load`,e);break;case`video`:case`audio`:for(r=0;r<vd.length;r++)xd(vd[r],e);break;case`image`:xd(`error`,e),xd(`load`,e);break;case`details`:xd(`toggle`,e);break;case`embed`:case`source`:case`link`:xd(`error`,e),xd(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Fd(e,t,u,r,n,null)}return;default:if(Ht(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Id(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Fd(e,t,c,r,n,null))}function Rd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Fd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Fd(e,t,p,m,r,f)}}Mt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Fd(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Fd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Ft(e,!!n,n?[]:``,!1):Ft(e,!!n,t,!0)):Ft(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Fd(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Fd(e,t,s,a,r,o)}It(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Fd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Fd(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Fd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Fd(e,t,u,p,r,m)}return;default:if(Ht(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Id(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Id(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Fd(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Fd(e,t,f,p,r,m)}function zd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Bd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&zd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&zd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Vd=null,Hd=null;function Ud(e){return e.nodeType===9?e:e.ownerDocument}function Wd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Gd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Kd(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var qd=null;function Jd(){var e=window.event;return e&&e.type===`popstate`?e!==qd&&(qd=e,!0):(qd=null,!1)}var Yd=typeof setTimeout==`function`?setTimeout:void 0,Xd=typeof clearTimeout==`function`?clearTimeout:void 0,Zd=typeof Promise==`function`?Promise:void 0,Qd=typeof queueMicrotask==`function`?queueMicrotask:Zd===void 0?Yd:function(e){return Zd.resolve(null).then(e).catch($d)};function $d(e){setTimeout(function(){throw e})}function ef(e){return e===`head`}function tf(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Ip(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)gf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,gf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[ot]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&gf(e.ownerDocument.body)}n=i}while(n);Ip(t)}function nf(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function rf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:rf(n),st(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function af(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[ot])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=df(e.nextSibling),e===null)break}return null}function of(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=df(e.nextSibling),e===null))return null;return e}function sf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=df(e.nextSibling),e===null))return null;return e}function cf(e){return e.data===`$?`||e.data===`$~`}function lf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function uf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function df(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var ff=null;function pf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return df(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function mf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function hf(e,t,n){switch(t=Ud(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function gf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);st(e)}var _f=new Map,vf=new Set;function yf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var bf=F.d;F.d={f:xf,r:Sf,D:Tf,C:Ef,L:Df,m:Of,X:Af,S:kf,M:jf};function xf(){var e=bf.f(),t=xu();return e||t}function Sf(e){var t=lt(e);t!==null&&t.tag===5&&t.type===`form`?xs(t):bf.r(e)}var Cf=typeof document>`u`?null:document;function wf(e,t,n){var r=Cf;if(r&&typeof t==`string`&&t){var i=jt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),vf.has(i)||(vf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Ld(t,`link`,e),ft(t),r.head.appendChild(t)))}}function Tf(e){bf.D(e),wf(`dns-prefetch`,e,null)}function Ef(e,t){bf.C(e,t),wf(`preconnect`,e,t)}function Df(e,t,n){bf.L(e,t,n);var r=Cf;if(r&&e&&t){var i=`link[rel="preload"][as="`+jt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+jt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+jt(n.imageSizes)+`"]`)):i+=`[href="`+jt(e)+`"]`;var a=i;switch(t){case`style`:a=Nf(e);break;case`script`:a=Lf(e)}_f.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),_f.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Pf(a))||t===`script`&&r.querySelector(Rf(a))||(t=r.createElement(`link`),Ld(t,`link`,e),ft(t),r.head.appendChild(t)))}}function Of(e,t){bf.m(e,t);var n=Cf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+jt(r)+`"][href="`+jt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Lf(e)}if(!_f.has(a)&&(e=f({rel:`modulepreload`,href:e},t),_f.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Rf(a)))return}r=n.createElement(`link`),Ld(r,`link`,e),ft(r),n.head.appendChild(r)}}}function kf(e,t,n){bf.S(e,t,n);var r=Cf;if(r&&e){var i=dt(r).hoistableStyles,a=Nf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Pf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=_f.get(a))&&Vf(e,n);var c=o=r.createElement(`link`);ft(c),Ld(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Bf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Af(e,t){bf.X(e,t);var n=Cf;if(n&&e){var r=dt(n).hoistableScripts,i=Lf(e),a=r.get(i);a||(a=n.querySelector(Rf(i)),a||(e=f({src:e,async:!0},t),(t=_f.get(i))&&Hf(e,t),a=n.createElement(`script`),ft(a),Ld(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function jf(e,t){bf.M(e,t);var n=Cf;if(n&&e){var r=dt(n).hoistableScripts,i=Lf(e),a=r.get(i);a||(a=n.querySelector(Rf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=_f.get(i))&&Hf(e,t),a=n.createElement(`script`),ft(a),Ld(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Mf(e,t,n,r){var a=(a=U.current)?yf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Nf(n.href),n=dt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Nf(n.href);var o=dt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Pf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),_f.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},_f.set(e,n),o||If(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Lf(n),n=dt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Nf(e){return`href="`+jt(e)+`"`}function Pf(e){return`link[rel="stylesheet"][`+e+`]`}function Ff(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function If(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Ld(t,`link`,n),ft(t),e.head.appendChild(t))}function Lf(e){return`[src="`+jt(e)+`"]`}function Rf(e){return`script[async]`+e}function zf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+jt(n.href)+`"]`);if(r)return t.instance=r,ft(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),ft(r),Ld(r,`style`,a),Bf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Nf(n.href);var o=e.querySelector(Pf(a));if(o)return t.state.loading|=4,t.instance=o,ft(o),o;r=Ff(n),(a=_f.get(a))&&Vf(r,a),o=(e.ownerDocument||e).createElement(`link`),ft(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Ld(o,`link`,r),t.state.loading|=4,Bf(o,n.precedence,e),t.instance=o;case`script`:return o=Lf(n.src),(a=e.querySelector(Rf(o)))?(t.instance=a,ft(a),a):(r=n,(a=_f.get(o))&&(r=f({},n),Hf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),ft(a),Ld(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Bf(r,n.precedence,e));return t.instance}function Bf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Vf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Hf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Uf=null;function Wf(e,t,n){if(Uf===null){var r=new Map,i=Uf=new Map;i.set(n,r)}else i=Uf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[ot]||a[$e]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Gf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Kf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function qf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Jf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Nf(r.href),a=t.querySelector(Pf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Zf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,ft(a);return}a=t.ownerDocument||t,r=Ff(r),(i=_f.get(i))&&Vf(r,i),a=a.createElement(`link`),ft(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Ld(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Zf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Yf=0;function Xf(e,t){return e.stylesheets&&e.count===0&&$f(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&$f(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Yf===0&&(Yf=62500*Bd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&$f(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Yf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Zf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)$f(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Qf=null;function $f(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Qf=new Map,t.forEach(ep,e),Qf=null,Zf.call(e))}function ep(e,t){if(!(t.state.loading&4)){var n=Qf.get(e);if(n)var r=n.get(null);else{n=new Map,Qf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Zf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var tp={$$typeof:b,Provider:null,Consumer:null,_currentValue:I,_currentValue2:I,_threadCount:0};function np(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=He(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=He(0),this.hiddenUpdates=He(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function rp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new np(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ti(3,null,null,t),e.current=a,a.stateNode=e,t=ta(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Na(a),e}function ip(e){return e?(e=$r,e):$r}function ap(e,t,n,r,i,a){i=ip(i),r.context===null?r.context=i:r.pendingContext=i,r=Fa(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ia(e,r,t),n!==null&&(gu(n,e,t),La(n,e,t))}function op(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function sp(e,t){op(e,t),(e=e.alternate)&&op(e,t)}function cp(e){if(e.tag===13||e.tag===31){var t=Xr(e,67108864);t!==null&&gu(t,e,67108864),sp(e,67108864)}}function lp(e){if(e.tag===13||e.tag===31){var t=mu();t=Je(t);var n=Xr(e,t);n!==null&&gu(n,e,t),sp(e,t)}}var up=!0;function dp(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=2,pp(e,t,n,r)}finally{F.p=a,P.T=i}}function fp(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=8,pp(e,t,n,r)}finally{F.p=a,P.T=i}}function pp(e,t,n,r){if(up){var i=mp(r);if(i===null)Ed(e,t,r,hp,n),Ep(e,r);else if(Op(i,e,t,n,r))r.stopPropagation();else if(Ep(e,r),t&4&&-1<Tp.indexOf(e)){for(;i!==null;){var a=lt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Le(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ae(o);s.entanglements[1]|=c,o&=~c}id(a),!(Fl&6)&&(nu=ye()+500,ad(0,!1))}}break;case 31:case 13:s=Xr(a,2),s!==null&&gu(s,a,2),xu(),sp(a,2)}if(a=mp(r),a===null&&Ed(e,t,r,hp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Ed(e,t,r,null,n)}}function mp(e){return e=Jt(e),gp(e)}var hp=null;function gp(e){if(hp=null,e=ct(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return hp=e,null}function _p(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(be()){case xe:return 2;case Se:return 8;case Ce:case we:return 32;case Te:return 268435456;default:return 32}default:return 32}}var vp=!1,yp=null,bp=null,xp=null,Sp=new Map,Cp=new Map,wp=[],Tp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Ep(e,t){switch(e){case`focusin`:case`focusout`:yp=null;break;case`dragenter`:case`dragleave`:bp=null;break;case`mouseover`:case`mouseout`:xp=null;break;case`pointerover`:case`pointerout`:Sp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Cp.delete(t.pointerId)}}function Dp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=lt(t),t!==null&&cp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Op(e,t,n,r,i){switch(t){case`focusin`:return yp=Dp(yp,e,t,n,r,i),!0;case`dragenter`:return bp=Dp(bp,e,t,n,r,i),!0;case`mouseover`:return xp=Dp(xp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Sp.set(a,Dp(Sp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Cp.set(a,Dp(Cp.get(a)||null,e,t,n,r,i)),!0}return!1}function kp(e){var t=ct(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,Ze(e.priority,function(){lp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,Ze(e.priority,function(){lp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ap(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=mp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);qt=r,n.target.dispatchEvent(r),qt=null}else return t=lt(n),t!==null&&cp(t),e.blockedOn=n,!1;t.shift()}return!0}function jp(e,t,n){Ap(e)&&n.delete(t)}function Mp(){vp=!1,yp!==null&&Ap(yp)&&(yp=null),bp!==null&&Ap(bp)&&(bp=null),xp!==null&&Ap(xp)&&(xp=null),Sp.forEach(jp),Cp.forEach(jp)}function Np(e,n){e.blockedOn===n&&(e.blockedOn=null,vp||(vp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Mp)))}var Pp=null;function Fp(e){Pp!==e&&(Pp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Pp===e&&(Pp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(gp(r||n)===null)continue;break}var a=lt(n);a!==null&&(e.splice(t,3),t-=3,ys(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Ip(e){function t(t){return Np(t,e)}yp!==null&&Np(yp,e),bp!==null&&Np(bp,e),xp!==null&&Np(xp,e),Sp.forEach(t),Cp.forEach(t);for(var n=0;n<wp.length;n++){var r=wp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<wp.length&&(n=wp[0],n.blockedOn===null);)kp(n),n.blockedOn===null&&wp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[et]||null;if(typeof a==`function`)o||Fp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[et]||null)s=o.formAction;else if(gp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Fp(n)}}}function Lp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Rp(e){this._internalRoot=e}zp.prototype.render=Rp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;ap(n,mu(),e,t,null,null)},zp.prototype.unmount=Rp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ap(e.current,2,null,e,null,null),xu(),t[tt]=null}};function zp(e){this._internalRoot=e}zp.prototype.unstable_scheduleHydration=function(e){if(e){var t=Xe();e={blockedOn:null,target:e,priority:t};for(var n=0;n<wp.length&&t!==0&&t<wp[n].priority;n++);wp.splice(n,0,e),n===0&&kp(e)}};var Bp=n.version;if(Bp!==`19.2.8`)throw Error(i(527,Bp,`19.2.8`));F.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var Vp={bundleType:0,version:`19.2.8`,rendererPackageName:`react-dom`,currentDispatcherRef:P,reconcilerVersion:`19.2.8`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Hp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hp.isDisabled&&Hp.supportsFiber)try{Oe=Hp.inject(Vp),G=Hp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Vs,s=Hs,c=Us;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=rp(e,1,!1,null,null,n,r,null,o,s,c,Lp),e[tt]=t.current,wd(e),new Rp(t)}})),pe=n(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=fe()}));function me(e){if(e.kind===`ssh`)return e.sshConnectionName?.trim()||e.sshHost}function he(e){return e.alias?.trim()||e.name}function ge(e){let t=he(e),n=me(e);return n?`${t} (${n})`:t}var W=e(O(),1),_e=pe(),ve=/^\/compact(?:\s+([\s\S]+))?$/i;function ye(e){let t=ve.exec(e.trim());if(!t)return null;let n=t[1]?.trim();return n?{instructions:n}:{}}var be=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),xe=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),Se=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),Ce=e=>{let t=Se(e);return t.charAt(0).toUpperCase()+t.slice(1)},we={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},Te=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Ee=(0,W.createContext)({}),De=()=>(0,W.useContext)(Ee),Oe=(0,W.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=De()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,W.createElement)(`svg`,{ref:c,...we,width:t??l??we.width,height:t??l??we.height,stroke:e??f,strokeWidth:m,className:be(`lucide`,p,i),...!a&&!Te(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,W.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),G=(e,t)=>{let n=(0,W.forwardRef)(({className:n,...r},i)=>(0,W.createElement)(Oe,{ref:i,iconNode:t,className:be(`lucide-${xe(Ce(e))}`,`lucide-${e}`,n),...r}));return n.displayName=Ce(e),n},ke=G(`archive`,[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`M10 12h4`,key:`a56b0p`}]]),Ae=G(`arrow-down-to-line`,[[`path`,{d:`M12 17V3`,key:`1cwfxf`}],[`path`,{d:`m6 11 6 6 6-6`,key:`12ii2o`}],[`path`,{d:`M19 21H5`,key:`150jfl`}]]),je=G(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),Me=G(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),Ne=G(`ban`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M4.929 4.929 19.07 19.071`,key:`196cmz`}]]),Pe=G(`bell`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}]]),Fe=G(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),Ie=G(`brain`,[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`,key:`1e3is1`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`,key:`1gqd8o`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`,key:`iwvgf7`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`,key:`efp6ie`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`,key:`1gq6am`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`,key:`k1g0md`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`,key:`q97ue3`}]]),Le=G(`bug`,[[`path`,{d:`M12 20v-9`,key:`1qisl0`}],[`path`,{d:`M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z`,key:`uouzyp`}],[`path`,{d:`M14.12 3.88 16 2`,key:`qol33r`}],[`path`,{d:`M21 21a4 4 0 0 0-3.81-4`,key:`1b0z45`}],[`path`,{d:`M21 5a4 4 0 0 1-3.55 3.97`,key:`5cxbf6`}],[`path`,{d:`M22 13h-4`,key:`1jl80f`}],[`path`,{d:`M3 21a4 4 0 0 1 3.81-4`,key:`1fjd4g`}],[`path`,{d:`M3 5a4 4 0 0 0 3.55 3.97`,key:`1d7oge`}],[`path`,{d:`M6 13H2`,key:`82j7cp`}],[`path`,{d:`m8 2 1.88 1.88`,key:`fmnt4t`}],[`path`,{d:`M9 7.13V6a3 3 0 1 1 6 0v1.13`,key:`1vgav8`}]]),Re=G(`camera`,[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`,key:`18u6gg`}],[`circle`,{cx:`12`,cy:`13`,r:`3`,key:`1vg3eu`}]]),ze=G(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),Be=G(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),Ve=G(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),He=G(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),Ue=G(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),We=G(`chevrons-up-down`,[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]),Ge=G(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),Ke=G(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),qe=G(`circle-dot`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}]]),Je=G(`circle-play`,[[`path`,{d:`M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z`,key:`kmsa83`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),Ye=G(`circle-stop`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`rect`,{x:`9`,y:`9`,width:`6`,height:`6`,rx:`1`,key:`1ssd4o`}]]),Xe=G(`circle`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),Ze=G(`clipboard-check`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}],[`path`,{d:`m9 14 2 2 4-4`,key:`df797q`}]]),Qe=G(`clipboard-list`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}],[`path`,{d:`M12 11h4`,key:`1jrz19`}],[`path`,{d:`M12 16h4`,key:`n85exb`}],[`path`,{d:`M8 11h.01`,key:`1dfujw`}],[`path`,{d:`M8 16h.01`,key:`18s6g9`}]]),$e=G(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),et=G(`coins`,[[`path`,{d:`M13.744 17.736a6 6 0 1 1-7.48-7.48`,key:`bq4yh3`}],[`path`,{d:`M15 6h1v4`,key:`11y1tn`}],[`path`,{d:`m6.134 14.768.866-.5 2 3.464`,key:`17snzx`}],[`circle`,{cx:`16`,cy:`8`,r:`6`,key:`14bfc9`}]]),tt=G(`compass`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z`,key:`9ktpf1`}]]),nt=G(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),rt=G(`corner-down-right`,[[`path`,{d:`m15 10 5 5-5 5`,key:`qqa56n`}],[`path`,{d:`M4 4v7a4 4 0 0 0 4 4h12`,key:`z08zvw`}]]),it=G(`database`,[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]),at=G(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),ot=G(`file-pen`,[[`path`,{d:`M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34`,key:`o6klzx`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z`,key:`zhnas1`}]]),st=G(`file-plus`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M9 15h6`,key:`cctwl0`}],[`path`,{d:`M12 18v-6`,key:`17g6i2`}]]),ct=G(`file-text`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),lt=G(`flask-conical`,[[`path`,{d:`M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2`,key:`18mbvz`}],[`path`,{d:`M6.453 15h11.094`,key:`3shlmq`}],[`path`,{d:`M8.5 2h7`,key:`csnxdl`}]]),ut=G(`folder-git-2`,[[`path`,{d:`M18 19a5 5 0 0 1-5-5v8`,key:`sz5oeg`}],[`path`,{d:`M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5`,key:`1w6njk`}],[`circle`,{cx:`13`,cy:`12`,r:`2`,key:`1j92g6`}],[`circle`,{cx:`20`,cy:`19`,r:`2`,key:`1obnsp`}]]),dt=G(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),ft=G(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),pt=G(`gauge`,[[`path`,{d:`m12 14 4-4`,key:`9kzdfg`}],[`path`,{d:`M3.34 19a10 10 0 1 1 17.32 0`,key:`19p75a`}]]),mt=G(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]),ht=G(`git-compare`,[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M13 6h3a2 2 0 0 1 2 2v7`,key:`1yeb86`}],[`path`,{d:`M11 18H8a2 2 0 0 1-2-2V9`,key:`19pyzm`}]]),gt=G(`image-off`,[[`line`,{x1:`2`,x2:`22`,y1:`2`,y2:`22`,key:`a6p6uj`}],[`path`,{d:`M10.41 10.41a2 2 0 1 1-2.83-2.83`,key:`1bzlo9`}],[`line`,{x1:`13.5`,x2:`6`,y1:`13.5`,y2:`21`,key:`1q0aeu`}],[`line`,{x1:`18`,x2:`21`,y1:`12`,y2:`15`,key:`5mozeu`}],[`path`,{d:`M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59`,key:`mmje98`}],[`path`,{d:`M21 15V5a2 2 0 0 0-2-2H9`,key:`43el77`}]]),_t=G(`image-plus`,[[`path`,{d:`M16 5h6`,key:`1vod17`}],[`path`,{d:`M19 2v6`,key:`4bpg5p`}],[`path`,{d:`M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5`,key:`1ue2ih`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}]]),vt=G(`images`,[[`path`,{d:`m22 11-1.296-1.296a2.4 2.4 0 0 0-3.408 0L11 16`,key:`9kzy35`}],[`path`,{d:`M4 8a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2`,key:`1t0f0t`}],[`circle`,{cx:`13`,cy:`7`,r:`1`,fill:`currentColor`,key:`1obus6`}],[`rect`,{x:`8`,y:`2`,width:`14`,height:`14`,rx:`2`,key:`1gvhby`}]]),yt=G(`keyboard`,[[`path`,{d:`M10 8h.01`,key:`1r9ogq`}],[`path`,{d:`M12 12h.01`,key:`1mp3jc`}],[`path`,{d:`M14 8h.01`,key:`1primd`}],[`path`,{d:`M16 12h.01`,key:`1l6xoz`}],[`path`,{d:`M18 8h.01`,key:`emo2bl`}],[`path`,{d:`M6 8h.01`,key:`x9i8wu`}],[`path`,{d:`M7 16h10`,key:`wp8him`}],[`path`,{d:`M8 12h.01`,key:`czm47f`}],[`rect`,{width:`20`,height:`16`,x:`2`,y:`4`,rx:`2`,key:`18n3k1`}]]),bt=G(`laptop`,[[`path`,{d:`M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z`,key:`1pdavp`}],[`path`,{d:`M20.054 15.987H3.946`,key:`14rxg9`}]]),xt=G(`list-todo`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`rect`,{x:`3`,y:`4`,width:`6`,height:`6`,rx:`1`,key:`cif1o7`}]]),St=G(`list`,[[`path`,{d:`M3 5h.01`,key:`18ugdj`}],[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M3 19h.01`,key:`noohij`}],[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M8 12h13`,key:`1za7za`}],[`path`,{d:`M8 19h13`,key:`m83p4d`}]]),Ct=G(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),wt=G(`maximize-2`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]),Tt=G(`message-circle-question-mark`,[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),Et=G(`message-circle`,[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}]]),Dt=G(`message-square-plus`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M12 8v6`,key:`1ib9pf`}],[`path`,{d:`M9 11h6`,key:`1fldmi`}]]),Ot=G(`messages-square`,[[`path`,{d:`M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z`,key:`1n2ejm`}],[`path`,{d:`M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1`,key:`1qfcsi`}]]),kt=G(`mic`,[[`path`,{d:`M12 19v3`,key:`npa21l`}],[`path`,{d:`M19 10v2a7 7 0 0 1-14 0v-2`,key:`1vc78b`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`13`,rx:`3`,key:`s6n7sd`}]]),At=G(`minimize-2`,[[`path`,{d:`m14 10 7-7`,key:`oa77jy`}],[`path`,{d:`M20 10h-6V4`,key:`mjg0md`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M4 14h6v6`,key:`rmj7iw`}]]),jt=G(`minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),Mt=G(`monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),Nt=G(`package-minus`,[[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`path`,{d:`M16 17h6`,key:`1ook5g`}],[`path`,{d:`M21 13V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.729l7 4a2 2 0 0 0 2 .001l1.675-.955`,key:`zu9avd`}],[`path`,{d:`M3.29 7 12 12l8.71-5`,key:`19ckod`}],[`path`,{d:`m7.5 4.27 8.997 5.148`,key:`9yrvtv`}]]),Pt=G(`palette`,[[`path`,{d:`M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z`,key:`e79jfc`}],[`circle`,{cx:`13.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`1okk4w`}],[`circle`,{cx:`17.5`,cy:`10.5`,r:`.5`,fill:`currentColor`,key:`f64h9f`}],[`circle`,{cx:`6.5`,cy:`12.5`,r:`.5`,fill:`currentColor`,key:`qy21gx`}],[`circle`,{cx:`8.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`fotxhn`}]]),Ft=G(`panel-left-close`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m16 15-3-3 3-3`,key:`14y99z`}]]),It=G(`panel-left-open`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m14 9 3 3-3 3`,key:`8010ee`}]]),Lt=G(`panel-left`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]]),Rt=G(`pause`,[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]),zt=G(`pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),Bt=G(`pin`,[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z`,key:`1nkz8b`}]]),Vt=G(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),Ht=G(`plug`,[[`path`,{d:`M12 22v-5`,key:`1ega77`}],[`path`,{d:`M15 8V2`,key:`18g5xt`}],[`path`,{d:`M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z`,key:`1xoxul`}],[`path`,{d:`M9 8V2`,key:`14iosj`}]]),Ut=G(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),Wt=G(`puzzle`,[[`path`,{d:`M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z`,key:`w46dr5`}]]),Gt=G(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),Kt=G(`rotate-ccw-clock`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),qt=G(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),Jt=G(`rotate-cw`,[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]),Yt=G(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),Xt=G(`send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]),Zt=G(`shield-alert`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M12 16h.01`,key:`1drbdi`}]]),Qt=G(`shield-x`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m14.5 9.5-5 5`,key:`17q4r4`}],[`path`,{d:`m9.5 9.5 5 5`,key:`18nt4w`}]]),$t=G(`shield`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]),en=G(`skip-forward`,[[`path`,{d:`M21 4v16`,key:`7j8fe9`}],[`path`,{d:`M6.029 4.285A2 2 0 0 0 3 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z`,key:`zs4d6`}]]),tn=G(`slash`,[[`path`,{d:`M22 2 2 22`,key:`y4kqgn`}]]),nn=G(`smartphone`,[[`rect`,{width:`14`,height:`20`,x:`5`,y:`2`,rx:`2`,ry:`2`,key:`1yt0o3`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}]]),rn=G(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),an=G(`square-dashed`,[[`path`,{d:`M5 3a2 2 0 0 0-2 2`,key:`y57alp`}],[`path`,{d:`M19 3a2 2 0 0 1 2 2`,key:`18rm91`}],[`path`,{d:`M21 19a2 2 0 0 1-2 2`,key:`1j7049`}],[`path`,{d:`M5 21a2 2 0 0 1-2-2`,key:`sbafld`}],[`path`,{d:`M9 3h1`,key:`1yesri`}],[`path`,{d:`M9 21h1`,key:`15o7lz`}],[`path`,{d:`M14 3h1`,key:`1ec4yj`}],[`path`,{d:`M14 21h1`,key:`v9vybs`}],[`path`,{d:`M3 9v1`,key:`1r0deq`}],[`path`,{d:`M21 9v1`,key:`mxsmne`}],[`path`,{d:`M3 14v1`,key:`vnatye`}],[`path`,{d:`M21 14v1`,key:`169vum`}]]),on=G(`square-pen`,[[`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`,key:`1m0v6g`}],[`path`,{d:`M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z`,key:`ohrbg2`}]]),sn=G(`square-slash`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`line`,{x1:`9`,x2:`15`,y1:`15`,y2:`9`,key:`1dfufj`}]]),cn=G(`square-terminal`,[[`path`,{d:`m7 11 2-2-2-2`,key:`1lz0vl`}],[`path`,{d:`M11 13h4`,key:`1p7l4v`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}]]),ln=G(`square-x`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),un=G(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),dn=G(`target`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`circle`,{cx:`12`,cy:`12`,r:`6`,key:`1vlfrh`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}]]),fn=G(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),pn=G(`undo-2`,[[`path`,{d:`M9 14 4 9l5-5`,key:`102s5s`}],[`path`,{d:`M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11`,key:`f3b9sd`}]]),mn=G(`unplug`,[[`path`,{d:`m19 5 3-3`,key:`yk6iyv`}],[`path`,{d:`m2 22 3-3`,key:`19mgm9`}],[`path`,{d:`M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z`,key:`goz73y`}],[`path`,{d:`M7.5 13.5 10 11`,key:`7xgeeb`}],[`path`,{d:`M10.5 16.5 13 14`,key:`10btkg`}],[`path`,{d:`m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z`,key:`1snsnr`}]]),hn=G(`user-round`,[[`circle`,{cx:`12`,cy:`8`,r:`5`,key:`1hypcn`}],[`path`,{d:`M20 21a8 8 0 0 0-16 0`,key:`rfgkzh`}]]),gn=G(`users`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),_n=G(`workflow`,[[`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`,key:`by2w9f`}],[`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`,key:`xkn7yn`}],[`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`,key:`1cgmvn`}]]),vn=G(`wrench`,[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`,key:`1ngwbx`}]]),yn=G(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),bn=G(`zap`,[[`path`,{d:`M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z`,key:`1v7up4`}]]);function xn(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}var Sn={};function Cn(e,t,n,r,i){if(!n&&!r&&!i&&!e)return Tn(t);let a=Tn(e);return t&&(a=En(a,t)),n&&(a=En(a,n)),r&&(a=En(a,r)),i&&(a=En(a,i)),a}function wn(e){if(e.length===0)return Sn;if(e.length===1)return Tn(e[0]);let t=Tn(e[0]);for(let n=1;n<e.length;n+=1)t=En(t,e[n]);return t}function Tn(e){return An(e)?{...jn(e,Sn)}:Dn(e)}function En(e,t){return An(t)?jn(t,e):On(e,t)}function Dn(e){let t={...e};for(let e in t){let n=t[e];kn(e,n)&&(t[e]=Nn(n))}return t}function On(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=xn(e.style,r);break;case`className`:e[n]=Fn(e.className,r);break;default:e[n]=kn(n,r)?Mn(e[n],r):r}}return e}function kn(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t==`function`||t===void 0)}function An(e){return typeof e==`function`}function jn(e,t){return An(e)?e(t):e??Sn}function Mn(e,t){return t?e?(...n)=>{let r=n[0];if(In(r)){let i=r;Pn(i);let a=t(...n);return i.baseUIHandlerPrevented||e?.(...n),a}let i=t(...n);return e?.(...n),i}:Nn(t):e}function Nn(e){return e&&((...t)=>{let n=t[0];return In(n)&&Pn(n),e(...t)})}function Pn(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Fn(e,t){return t?e?t+` `+e:t:e}function In(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function Ln(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set(`code`,n.toString()),r.forEach(e=>i.searchParams.append(`args[]`,e)),`${t} error #${n}; visit ${i} for the full message.`}}var Rn=Ln(`https://base-ui.com/production-error`,`Base UI`),zn={};function Bn(e,t){let n=W.useRef(zn);return n.current===zn&&(n.current=e(t)),n}function Vn(e,t,n,r){let i=Bn(Un).current;return Wn(i,e,t,n,r)&&Kn(i,[e,t,n,r]),i.callback}function Hn(e){let t=Bn(Un).current;return Gn(t,e)&&Kn(t,e),t.callback}function Un(){return{callback:null,cleanup:null,refs:[]}}function Wn(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function Gn(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function Kn(e,t){if(e.refs=t,t.every(e=>e==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let i=t[e];if(i!=null)switch(typeof i){case`function`:{let t=i(n);typeof t==`function`&&(r[e]=t);break}case`object`:i.current=n}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(n!=null)switch(typeof n){case`function`:{let t=r[e];typeof t==`function`?t():n(null);break}case`object`:n.current=null}}}}}}var qn=19;function Jn(e){return qn>=e}function Yn(e){if(!W.isValidElement(e))return null;let t=e,n=t.props;return(Jn(19)?n?.ref:t.ref)??null}function Xn(){}var Zn=Object.freeze([]),Qn=Object.freeze({});function $n(e,t){let n={};for(let r in e){let i=e[r];if(t?.hasOwnProperty(r)){let e=t[r](i);e!=null&&Object.assign(n,e);continue}i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function er(e,t){return typeof e==`function`?e(t):e}function tr(e,t){return typeof e==`function`?e(t):e}function nr(e,t,n={}){let r=t.render,i=rr(t,n);return n.enabled===!1?null:or(e,r,i,n.state??Qn)}function rr(e,t={}){let{className:n,style:r,render:i}=e,{state:a=Qn,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?er(n,a):void 0,d=l?tr(r,a):void 0,f=l?$n(a,c):Qn,p=l&&s?ir(s):void 0,m=l?xn(f,p)??{}:Qn;return typeof document<`u`&&(l?m.ref=Array.isArray(o)?Hn([m.ref,Yn(i),...o]):Vn(m.ref,Yn(i),o):Vn(null,null)),l?(u!==void 0&&(m.className=Fn(m.className,u)),d!==void 0&&(m.style=xn(m.style,d)),m):Qn}function ir(e){return Array.isArray(e)?wn(e):Cn(void 0,e)}var ar=Symbol.for(`react.lazy`);function or(e,t,n,r){if(t){if(typeof t==`function`)return t(n,r);let e=Cn(n,t.props);e.ref=n.ref;let i=t;return i?.$$typeof===ar&&(i=W.Children.toArray(t)[0]),W.cloneElement(i,e)}if(e&&typeof e==`string`)return sr(e,n);throw Error(Rn(8))}function sr(e,t){return e===`button`?(0,W.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,W.createElement)(`img`,{alt:``,...t,key:t.key}):W.createElement(e,t)}function cr(e){return nr(e.defaultTagName??`div`,e,e)}function lr(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=lr(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function ur(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=lr(e))&&(r&&(r+=` `),r+=t);return r}var dr=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,fr=ur,pr=(e,t)=>n=>{if(t?.variants==null)return fr(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=dr(t)||dr(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return fr(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},mr=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},hr=(e,t)=>({classGroupId:e,validator:t}),gr=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),_r=`-`,vr=[],yr=`arbitrary..`,br=e=>{let t=Cr(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return Sr(e);let n=e.split(_r);return xr(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?mr(i,t):t:i||vr}return n[e]||vr}}},xr=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=xr(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(_r):e.slice(t).join(_r),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},Sr=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?yr+r:void 0})(),Cr=e=>{let{theme:t,classGroups:n}=e;return wr(n,t)},wr=(e,t)=>{let n=gr();for(let r in e){let i=e[r];Tr(i,n,r,t)}return n},Tr=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];Er(i,t,n,r)}},Er=(e,t,n,r)=>{if(typeof e==`string`){Dr(e,t,n);return}if(typeof e==`function`){Or(e,t,n,r);return}kr(e,t,n,r)},Dr=(e,t,n)=>{let r=e===``?t:Ar(t,e);r.classGroupId=n},Or=(e,t,n,r)=>{if(jr(e)){Tr(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(hr(n,e))},kr=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];Tr(o,Ar(t,a),n,r)}},Ar=(e,t)=>{let n=e,r=t.split(_r),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=gr(),n.nextPart.set(t,i)),n=i}return n},jr=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,Mr=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},Nr=`!`,Pr=`:`,Fr=[],Ir=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Lr=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===Pr){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(Nr)?(c=s.slice(0,-1),l=!0):s.startsWith(Nr)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return Ir(t,l,c,u)};if(t){let e=t+Pr,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):Ir(Fr,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Rr=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},zr=e=>({cache:Mr(e.cacheSize),parseClassName:Lr(e),sortModifiers:Rr(e),postfixLookupClassGroupIds:Br(e),...br(e)}),Br=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},Vr=/\s+/,Hr=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(Vr),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+Nr:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},Ur=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Wr(n))&&(i&&(i+=` `),i+=r);return i},Wr=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Wr(e[r]))&&(n&&(n+=` `),n+=t);return n},Gr=(e,...t)=>{let n,r,i,a,o=o=>(n=zr(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=Hr(e,n);return i(e,a),a};return a=o,(...e)=>a(Ur(...e))},Kr=[],qr=e=>{let t=t=>t[e]||Kr;return t.isThemeGetter=!0,t},Jr=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Yr=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Xr=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Zr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Qr=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,$r=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ei=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ti=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ni=e=>Xr.test(e),ri=e=>!!e&&!Number.isNaN(Number(e)),ii=e=>!!e&&Number.isInteger(Number(e)),ai=e=>e.endsWith(`%`)&&ri(e.slice(0,-1)),oi=e=>Zr.test(e),si=()=>!0,ci=e=>Qr.test(e)&&!$r.test(e),li=()=>!1,ui=e=>ei.test(e),di=e=>ti.test(e),fi=e=>!hi(e)&&!Ci(e),pi=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),mi=e=>ji(e,Fi,li),hi=e=>Jr.test(e),gi=e=>ji(e,Ii,ci),_i=e=>ji(e,Li,ri),vi=e=>ji(e,zi,si),yi=e=>ji(e,Ri,li),bi=e=>ji(e,Ni,li),xi=e=>ji(e,Pi,di),Si=e=>ji(e,Bi,ui),Ci=e=>Yr.test(e),wi=e=>Mi(e,Ii),Ti=e=>Mi(e,Ri),Ei=e=>Mi(e,Ni),Di=e=>Mi(e,Fi),Oi=e=>Mi(e,Pi),ki=e=>Mi(e,Bi,!0),Ai=e=>Mi(e,zi,!0),ji=(e,t,n)=>{let r=Jr.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Mi=(e,t,n=!1)=>{let r=Yr.exec(e);return r?r[1]?t(r[1]):n:!1},Ni=e=>e===`position`||e===`percentage`,Pi=e=>e===`image`||e===`url`,Fi=e=>e===`length`||e===`size`||e===`bg-size`,Ii=e=>e===`length`,Li=e=>e===`number`,Ri=e=>e===`family-name`,zi=e=>e===`number`||e===`weight`,Bi=e=>e===`shadow`,Vi=Gr(()=>{let e=qr(`color`),t=qr(`font`),n=qr(`text`),r=qr(`font-weight`),i=qr(`tracking`),a=qr(`leading`),o=qr(`breakpoint`),s=qr(`container`),c=qr(`spacing`),l=qr(`radius`),u=qr(`shadow`),d=qr(`inset-shadow`),f=qr(`text-shadow`),p=qr(`drop-shadow`),m=qr(`blur`),h=qr(`perspective`),g=qr(`aspect`),_=qr(`ease`),v=qr(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),Ci,hi],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[Ci,hi,c],T=()=>[ni,`full`,`auto`,...w()],E=()=>[ii,`none`,`subgrid`,Ci,hi],D=()=>[`auto`,{span:[`full`,ii,Ci,hi]},ii,Ci,hi],O=()=>[ii,`auto`,Ci,hi],k=()=>[`auto`,`min`,`max`,`fr`,Ci,hi],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[ni,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[ni,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],F=()=>[ni,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],I=()=>[e,Ci,hi],L=()=>[...b(),Ei,bi,{position:[Ci,hi]}],R=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],z=()=>[`auto`,`cover`,`contain`,Di,mi,{size:[Ci,hi]}],B=()=>[ai,wi,gi],V=()=>[``,`none`,`full`,l,Ci,hi],H=()=>[``,ri,wi,gi],ee=()=>[`solid`,`dashed`,`dotted`,`double`],U=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],te=()=>[ri,ai,Ei,bi],ne=()=>[``,`none`,m,Ci,hi],re=()=>[`none`,ri,Ci,hi],ie=()=>[`none`,ri,Ci,hi],ae=()=>[ri,Ci,hi],oe=()=>[ni,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[oi],breakpoint:[oi],color:[si],container:[oi],"drop-shadow":[oi],ease:[`in`,`out`,`in-out`],font:[fi],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[oi],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[oi],shadow:[oi],spacing:[`px`,ri],text:[oi],"text-shadow":[oi],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,ni,hi,Ci,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,Ci,hi]}],"container-named":[pi],columns:[{columns:[ri,hi,Ci,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[ii,`auto`,Ci,hi]}],basis:[{basis:[ni,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[ri,ni,`auto`,`initial`,`none`,hi]}],grow:[{grow:[``,ri,Ci,hi]}],shrink:[{shrink:[``,ri,Ci,hi]}],order:[{order:[ii,`first`,`last`,`none`,Ci,hi]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...P()]}],"min-inline-size":[{"min-inline":[`auto`,...P()]}],"max-inline-size":[{"max-inline":[`none`,...P()]}],"block-size":[{block:[`auto`,...F()]}],"min-block-size":[{"min-block":[`auto`,...F()]}],"max-block-size":[{"max-block":[`none`,...F()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,...N()]}],"font-size":[{text:[`base`,n,wi,gi]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Ai,vi]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,ai,hi]}],"font-family":[{font:[Ti,yi,t]}],"font-features":[{"font-features":[hi]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,Ci,hi]}],"line-clamp":[{"line-clamp":[ri,`none`,Ci,_i]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,Ci,hi]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,Ci,hi]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...ee(),`wavy`]}],"text-decoration-thickness":[{decoration:[ri,`from-font`,`auto`,Ci,gi]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[ri,`auto`,Ci,hi]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[ii,Ci,hi]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,Ci,hi]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,Ci,hi]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:L()}],"bg-repeat":[{bg:R()}],"bg-size":[{bg:z()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},ii,Ci,hi],radial:[``,Ci,hi],conic:[ii,Ci,hi]},Oi,xi]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:B()}],"gradient-via-pos":[{via:B()}],"gradient-to-pos":[{to:B()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:V()}],"rounded-s":[{"rounded-s":V()}],"rounded-e":[{"rounded-e":V()}],"rounded-t":[{"rounded-t":V()}],"rounded-r":[{"rounded-r":V()}],"rounded-b":[{"rounded-b":V()}],"rounded-l":[{"rounded-l":V()}],"rounded-ss":[{"rounded-ss":V()}],"rounded-se":[{"rounded-se":V()}],"rounded-ee":[{"rounded-ee":V()}],"rounded-es":[{"rounded-es":V()}],"rounded-tl":[{"rounded-tl":V()}],"rounded-tr":[{"rounded-tr":V()}],"rounded-br":[{"rounded-br":V()}],"rounded-bl":[{"rounded-bl":V()}],"border-w":[{border:H()}],"border-w-x":[{"border-x":H()}],"border-w-y":[{"border-y":H()}],"border-w-s":[{"border-s":H()}],"border-w-e":[{"border-e":H()}],"border-w-bs":[{"border-bs":H()}],"border-w-be":[{"border-be":H()}],"border-w-t":[{"border-t":H()}],"border-w-r":[{"border-r":H()}],"border-w-b":[{"border-b":H()}],"border-w-l":[{"border-l":H()}],"divide-x":[{"divide-x":H()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":H()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...ee(),`hidden`,`none`]}],"divide-style":[{divide:[...ee(),`hidden`,`none`]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-bs":[{"border-bs":I()}],"border-color-be":[{"border-be":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...ee(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[ri,Ci,hi]}],"outline-w":[{outline:[``,ri,wi,gi]}],"outline-color":[{outline:I()}],shadow:[{shadow:[``,`none`,u,ki,Si]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":[`none`,d,ki,Si]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:H()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[ri,gi]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":H()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":[`none`,f,ki,Si]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[ri,Ci,hi]}],"mix-blend":[{"mix-blend":[...U(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":U()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[ri]}],"mask-image-linear-from-pos":[{"mask-linear-from":te()}],"mask-image-linear-to-pos":[{"mask-linear-to":te()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":te()}],"mask-image-t-to-pos":[{"mask-t-to":te()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":te()}],"mask-image-r-to-pos":[{"mask-r-to":te()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":te()}],"mask-image-b-to-pos":[{"mask-b-to":te()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":te()}],"mask-image-l-to-pos":[{"mask-l-to":te()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":te()}],"mask-image-x-to-pos":[{"mask-x-to":te()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":te()}],"mask-image-y-to-pos":[{"mask-y-to":te()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[Ci,hi]}],"mask-image-radial-from-pos":[{"mask-radial-from":te()}],"mask-image-radial-to-pos":[{"mask-radial-to":te()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[ri]}],"mask-image-conic-from-pos":[{"mask-conic-from":te()}],"mask-image-conic-to-pos":[{"mask-conic-to":te()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:R()}],"mask-size":[{mask:z()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,Ci,hi]}],filter:[{filter:[``,`none`,Ci,hi]}],blur:[{blur:ne()}],brightness:[{brightness:[ri,Ci,hi]}],contrast:[{contrast:[ri,Ci,hi]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,ki,Si]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:[``,ri,Ci,hi]}],"hue-rotate":[{"hue-rotate":[ri,Ci,hi]}],invert:[{invert:[``,ri,Ci,hi]}],saturate:[{saturate:[ri,Ci,hi]}],sepia:[{sepia:[``,ri,Ci,hi]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,Ci,hi]}],"backdrop-blur":[{"backdrop-blur":ne()}],"backdrop-brightness":[{"backdrop-brightness":[ri,Ci,hi]}],"backdrop-contrast":[{"backdrop-contrast":[ri,Ci,hi]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,ri,Ci,hi]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ri,Ci,hi]}],"backdrop-invert":[{"backdrop-invert":[``,ri,Ci,hi]}],"backdrop-opacity":[{"backdrop-opacity":[ri,Ci,hi]}],"backdrop-saturate":[{"backdrop-saturate":[ri,Ci,hi]}],"backdrop-sepia":[{"backdrop-sepia":[``,ri,Ci,hi]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,Ci,hi]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[ri,`initial`,Ci,hi]}],ease:[{ease:[`linear`,`initial`,_,Ci,hi]}],delay:[{delay:[ri,Ci,hi]}],animate:[{animate:[`none`,v,Ci,hi]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,Ci,hi]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:re()}],"rotate-x":[{"rotate-x":re()}],"rotate-y":[{"rotate-y":re()}],"rotate-z":[{"rotate-z":re()}],scale:[{scale:ie()}],"scale-x":[{"scale-x":ie()}],"scale-y":[{"scale-y":ie()}],"scale-z":[{"scale-z":ie()}],"scale-3d":[`scale-3d`],skew:[{skew:ae()}],"skew-x":[{"skew-x":ae()}],"skew-y":[{"skew-y":ae()}],transform:[{transform:[Ci,hi,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:oe()}],"translate-x":[{"translate-x":oe()}],"translate-y":[{"translate-y":oe()}],"translate-z":[{"translate-z":oe()}],"translate-none":[`translate-none`],zoom:[{zoom:[ii,Ci,hi]}],accent:[{accent:I()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:I()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,Ci,hi]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":I()}],"scrollbar-track-color":[{"scrollbar-track":I()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,Ci,hi]}],fill:[{fill:[`none`,...I()]}],"stroke-w":[{stroke:[ri,wi,gi,_i]}],stroke:[{stroke:[`none`,...I()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function K(...e){return Vi(ur(e))}var Hi=pr(`[&_svg]:-mx-0.5 relative inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-lg border font-medium text-base outline-none transition-[box-shadow,transform] duration-150 before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-64 active:scale-[0.97] sm:text-sm [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,{defaultVariants:{size:`default`,variant:`default`},variants:{size:{default:`h-9 px-[calc(--spacing(3)-1px)] sm:h-8`,icon:`size-9 sm:size-8`,"icon-lg":`size-10 sm:size-9`,"icon-sm":`size-8 sm:size-7`,"icon-xl":`size-11 sm:size-10 [&_svg:not([class*='size-'])]:size-5 sm:[&_svg:not([class*='size-'])]:size-4.5`,"icon-xs":`size-7 rounded-md before:rounded-[calc(var(--radius-md)-1px)] sm:size-6 not-in-data-[slot=input-group]:[&_svg:not([class*='size-'])]:size-4 sm:not-in-data-[slot=input-group]:[&_svg:not([class*='size-'])]:size-3.5`,lg:`h-10 px-[calc(--spacing(3.5)-1px)] sm:h-9`,sm:`h-8 gap-1.5 px-[calc(--spacing(2.5)-1px)] sm:h-7`,xl:`h-11 px-[calc(--spacing(4)-1px)] text-lg sm:h-10 sm:text-base [&_svg:not([class*='size-'])]:size-5 sm:[&_svg:not([class*='size-'])]:size-4.5`,xs:`h-7 gap-1 rounded-md px-[calc(--spacing(2)-1px)] text-sm before:rounded-[calc(var(--radius-md)-1px)] sm:h-6 sm:text-xs [&_svg:not([class*='size-'])]:size-4 sm:[&_svg:not([class*='size-'])]:size-3.5`},variant:{default:`not-disabled:inset-shadow-[0_1px_--theme(--color-white/16%)] border-primary bg-primary text-primary-foreground shadow-primary/24 shadow-xs hover:bg-primary/90 [:active,[data-pressed]]:inset-shadow-[0_1px_--theme(--color-black/8%)] [:disabled,:active,[data-pressed]]:shadow-none`,destructive:`not-disabled:inset-shadow-[0_1px_--theme(--color-white/16%)] border-destructive bg-destructive text-white shadow-destructive/24 shadow-xs hover:bg-destructive/90 [:active,[data-pressed]]:inset-shadow-[0_1px_--theme(--color-black/8%)] [:disabled,:active,[data-pressed]]:shadow-none`,"destructive-outline":`border-border bg-transparent bg-clip-padding text-destructive shadow-xs not-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] dark:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border dark:not-disabled:before:shadow-[0_-1px_--theme(--color-white/4%)] dark:not-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/8%)] [:disabled,:active,[data-pressed]]:shadow-none [:hover,[data-pressed]]:border-destructive/32 [:hover,[data-pressed]]:bg-destructive/4`,ghost:`border-transparent hover:bg-accent data-pressed:bg-accent`,link:`border-transparent underline-offset-4 hover:underline`,outline:`border-border bg-background bg-clip-padding shadow-xs not-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] dark:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border dark:not-disabled:before:shadow-[0_-1px_--theme(--color-white/4%)] dark:not-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/8%)] [:disabled,:active,[data-pressed]]:shadow-none [:hover,[data-pressed]]:bg-accent/50 dark:[:hover,[data-pressed]]:bg-input/64`,secondary:`border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/90 [:active,[data-pressed]]:bg-secondary/80`}}});function Ui({className:e,variant:t,size:n,render:r,...i}){let a=r?void 0:`button`;return cr({defaultTagName:`button`,props:Cn({className:K(Hi({className:e,size:n,variant:t})),"data-slot":`button`,type:a},i),render:r})}function Wi(e){let t=0;for(let n of e)t+=Gi(n.pendingAskCount),t+=Gi(n.pendingApprovalCount);return t}function Gi(e){return typeof e!=`number`||!Number.isFinite(e)||e<=0?0:Math.floor(e)}function Ki(e,t=typeof navigator>`u`?{}:navigator){let n=Gi(e);try{n>0?t.setAppBadge?.(n):t.clearAppBadge?.()}catch{}}function qi(e){switch(e){case`image-quota`:return`Chat image storage is full (200MiB). Message not sent.`;case`image-too-large`:return`An image is still over 10MiB after compression. Message not sent.`;case`image-not-image`:return`An attachment is not a supported image. Message not sent.`;case`image-storage`:return`Could not save the images. Message not sent. Please try again.`;default:return}}var Ji=/^[a-f0-9]{64}\.(?:png|jpg|gif|webp)$/,Yi=e=>typeof e==`string`&&Ji.test(e),Xi=new Set([`image`,`markdown`,`html`,`pdf`,`text`,`other`]),Zi=new Set([`file`,`web`,`desktop`,`upload`]),Qi=3e4,$i=e=>`entryId`in e?`${e.chatId}|e|${e.entryId}`:`${e.chatId}|c|${e.conversationId}|${e.messageIndex}`,ea=e=>typeof e==`object`&&!!e&&!Array.isArray(e),ta=e=>typeof e==`string`&&e?e:void 0,na=e=>typeof e==`string`&&/^data:image\/(?:png|jpeg|gif|webp|svg\+xml|bmp|avif|x-icon);base64,/.test(e);function ra(e){if(!ea(e))return null;let{rel:t,name:n,size:r,kind:i}=e;return typeof t==`string`&&typeof n==`string`&&typeof r==`number`&&typeof i==`string`&&Xi.has(i)?{rel:t,name:n,size:r,kind:i}:null}function ia(e){if(!ea(e)||typeof e.source!=`string`||!Zi.has(e.source))return null;let t=e.source,n=ta(e.name),r=ta(e.caption),i={source:t,...n?{name:n}:{},...r?{caption:r}:{}};return e.ok===!0&&Yi(e.mediaId)?{ok:!0,mediaId:e.mediaId,...na(e.thumb)?{thumb:e.thumb}:{},...i}:e.ok===!1&&(e.error===`too-large`||e.error===`quota`)?{ok:!1,error:e.error,...i}:null}var aa=class{send;cache=new Map;inflight=new Set;listeners=new Set;images=new Map;seq=0;constructor(e){this.send=e}get(e){return this.cache.get($i(e))}request(e){let t=$i(e),n=this.cache.get(t);this.inflight.has(t)||n&&(n.artifacts.length>0||n.media.length>0)||(this.inflight.add(t),this.send({type:`bot-artifacts`,target:e}))}receive(e){if(!ea(e.target))return;let t=$i(e.target);this.inflight.delete(t);let n=(Array.isArray(e.artifacts)?e.artifacts:[]).map(ra).filter(e=>e!==null),r=new Set,i=(Array.isArray(e.media)?e.media:[]).map(ia).filter(e=>e?.ok?!r.has(e.mediaId)&&(r.add(e.mediaId),!0):e!==null).slice(0,4);this.cache.set(t,{artifacts:n,media:i});for(let e of this.listeners)e()}image(e,t){let n=`img-${Date.now().toString(36)}-${++this.seq}`;return new Promise(r=>{let i=setTimeout(()=>this.settle(n,{error:`timeout`}),Qi);this.images.set(n,e=>{clearTimeout(i),r(e)}),this.send({type:`bot-artifact-image`,requestId:n,target:e,...t})})}receiveImage(e){this.settle(e.requestId,na(e.dataUrl)?{dataUrl:e.dataUrl}:{error:e.error??`invalid`})}reset(){this.inflight.clear();for(let e of[...this.images.keys()])this.settle(e,{error:`offline`})}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}settle(e,t){let n=this.images.get(e);n&&(this.images.delete(e),n(t))}},oa=n((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),q=n(((e,t)=>{t.exports=oa()}))(),sa=(0,W.createContext)(null),ca={web:`网页截图`,desktop:`桌面截图`,file:`工作区`,upload:``},la=e=>e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(1)} MB`;function ua({target:e}){let t=(0,W.useContext)(sa),n=$i(e),r=t?.port,i=(0,W.useSyncExternalStore)(e=>r?.subscribe(e)??(()=>{}),()=>r?.get(e)),a=t?.online??!1;(0,W.useEffect)(()=>{a&&r?.request(e)},[r,n,a]);let[o,s]=(0,W.useState)(null);if(!r||!i||i.media.length===0&&i.artifacts.length===0)return null;let c=i.media.some(e=>e.ok&&e.source===`desktop`);return(0,q.jsxs)(`div`,{className:`mt-1.5`,children:[i.media.length>0&&(0,q.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:i.media.map((e,t)=>e.ok?(0,q.jsxs)(`button`,{type:`button`,onClick:()=>s({ref:{mediaId:e.mediaId},title:e.caption??e.name??ca[e.source],source:e.source,thumb:e.thumb}),className:`relative h-20 w-28 overflow-hidden rounded-lg border bg-muted`,children:[e.thumb?(0,q.jsx)(`img`,{src:e.thumb,alt:``,className:`h-full w-full object-cover`}):(0,q.jsx)(gt,{className:`m-auto h-4 w-4 text-muted-foreground`}),ca[e.source]&&(0,q.jsx)(`span`,{className:K(`absolute top-1 left-1 rounded px-1 text-[10px] leading-4`,e.source===`desktop`?`bg-warning text-warning-foreground`:`bg-black/60 text-white`),children:ca[e.source]}),(e.caption||e.name)&&(0,q.jsx)(`span`,{className:`absolute inset-x-0 bottom-0 truncate bg-gradient-to-t from-black/70 to-transparent px-1.5 pt-3 pb-0.5 text-left text-[10px] text-white`,children:e.caption??e.name})]},e.mediaId):(0,q.jsxs)(`div`,{className:`flex w-32 flex-col gap-0.5 rounded-lg border border-destructive/60 border-dashed p-2 text-destructive text-xs`,children:[(0,q.jsx)(`span`,{className:`truncate font-medium`,children:e.name??ca[e.source]}),(0,q.jsx)(`span`,{children:e.error===`quota`?`群图片空间已满,没收下`:`压缩后仍超过 10MiB,没发出去`})]},`failed-${t}`))}),c&&(0,q.jsx)(`p`,{className:`mt-1 text-warning text-xs`,children:`桌面截图可能拍到别的窗口里的敏感内容。`}),i.artifacts.length>0&&(0,q.jsx)(`div`,{className:`mt-1.5 flex flex-wrap gap-1.5`,children:i.artifacts.map(e=>(0,q.jsx)(da,{artifact:e,onOpen:()=>s({ref:{rel:e.rel},title:e.name})},e.rel))}),o&&(0,q.jsx)(fa,{preview:o,load:()=>r.image(e,o.ref),onClose:()=>s(null)})]})}function da({artifact:e,onOpen:t}){let n=e.kind===`image`;return(0,q.jsxs)(`button`,{type:`button`,disabled:!n,onClick:t,title:e.rel,className:`flex max-w-60 items-center gap-1.5 rounded-lg border bg-card px-2 py-1 text-left text-xs disabled:cursor-default`,children:[(0,q.jsx)(ct,{className:`h-3.5 w-3.5 shrink-0 text-muted-foreground`}),(0,q.jsx)(`span`,{className:`truncate`,children:e.name}),(0,q.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:la(e.size)})]})}function fa({preview:e,load:t,onClose:n}){let[r,i]=(0,W.useState)(null);(0,W.useEffect)(()=>{let e=!0;return t().then(t=>e&&i(t)),()=>{e=!1}},[]);let a=r&&`dataUrl`in r?r.dataUrl:e.thumb;return(0,q.jsxs)(`div`,{className:`fixed inset-0 z-50 flex flex-col bg-black/90 text-white`,children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-2 px-3 pt-[max(env(safe-area-inset-top),0.75rem)] pb-2 text-sm`,children:[(0,q.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.title}),e.source&&(0,q.jsx)(`span`,{className:`shrink-0 text-white/70 text-xs`,children:ca[e.source]}),(0,q.jsx)(`button`,{type:`button`,onClick:n,"aria-label":`关闭`,className:`rounded p-1.5`,children:(0,q.jsx)(yn,{className:`h-5 w-5`})})]}),e.source===`desktop`&&(0,q.jsx)(`p`,{className:`px-3 text-warning text-xs`,children:`这是整桌面截图,可能拍到其他窗口里的敏感内容。`}),(0,q.jsxs)(`div`,{className:`relative flex min-h-0 flex-1 items-center justify-center p-3`,children:[a&&(0,q.jsx)(`img`,{src:a,alt:e.title,className:`max-h-full max-w-full object-contain`}),!r&&(0,q.jsx)(Ct,{className:`absolute h-5 w-5 animate-spin`}),r&&`error`in r&&(0,q.jsx)(`p`,{className:`absolute bottom-4 rounded bg-black/70 px-2 py-1 text-xs`,children:r.error===`too-large`?`图片太大,手机上看不了`:`大图没拉下来`})]})]})}var pa=`#64748b`,ma=/^#[0-9a-f]{6}$/i;function ha(e){let[t,n,r]=[1,3,5].map(t=>Number.parseInt(e.slice(t,t+2),16)/255),i=Math.max(t,n,r),a=Math.min(t,n,r),o=(i+a)/2,s=i-a;if(s===0)return[0,0,o];let c=s/(1-Math.abs(2*o-1));return[((i===t?(n-r)/s%6:i===n?(r-t)/s+2:(t-n)/s+4)*60+360)%360,c,o]}function ga(e,t,n){let r=(1-Math.abs(2*n-1))*t,i=r*(1-Math.abs(e/60%2-1)),a=n-r/2,[o,s,c]=e<60?[r,i,0]:e<120?[i,r,0]:e<180?[0,r,i]:e<240?[0,i,r]:e<300?[i,0,r]:[r,0,i];return`#${[o,s,c].map(e=>Math.round((e+a)*255).toString(16).padStart(2,`0`)).join(``)}`}function _a(e){let t=typeof e==`string`&&ma.test(e)?e.toLowerCase():pa,[n,r]=ha(t),i=Math.max(r,.35),a=(e,t)=>ga((n+e+360)%360,i,t);return[t,a(35,.78),a(-35,.32),a(180,.62),a(90,.9)]}var va=e=>{let t=0;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t=(t<<5)-t+r,t&=t}return Math.abs(t)},ya=(e,t)=>Math.floor(e/10**t%10),ba=(e,t)=>!(ya(e,t)%2),xa=(e,t,n)=>{let r=e%t;return n&&ya(e,n)%2==0?-r:r},Sa=(e,t,n)=>t[e%n],Ca=e=>{e.slice(0,1)===`#`&&(e=e.slice(1));let t=parseInt(e.substr(0,2),16),n=parseInt(e.substr(2,2),16),r=parseInt(e.substr(4,2),16);return(t*299+n*587+r*114)/1e3>=128?`#000000`:`#FFFFFF`},wa=4,Ta=80;function Ea(e,t){let n=va(e),r=t&&t.length;return Array.from({length:wa},(e,i)=>({color:Sa(n+i,t,r),translateX:xa(n*(i+1),Ta/2-(i+17),1),translateY:xa(n*(i+1),Ta/2-(i+17),2),rotate:xa(n*(i+1),360),isSquare:ba(n,2)}))}var Da=({name:e,colors:t,title:n,square:r,size:i,...a})=>{let o=Ea(e,t),s=W.useId();return(0,q.jsxs)(`svg`,{viewBox:`0 0 80 80`,fill:`none`,role:`img`,xmlns:`http://www.w3.org/2000/svg`,width:i,height:i,...a,children:[n&&(0,q.jsx)(`title`,{children:e}),(0,q.jsx)(`mask`,{id:s,maskUnits:`userSpaceOnUse`,x:0,y:0,width:Ta,height:Ta,children:(0,q.jsx)(`rect`,{width:Ta,height:Ta,rx:r?void 0:160,fill:`#FFFFFF`})}),(0,q.jsxs)(`g`,{mask:`url(#${s})`,children:[(0,q.jsx)(`rect`,{width:Ta,height:Ta,fill:o[0].color}),(0,q.jsx)(`rect`,{x:10,y:30,width:Ta,height:o[1].isSquare?Ta:Ta/8,fill:o[1].color,transform:`translate(`+o[1].translateX+` `+o[1].translateY+`) rotate(`+o[1].rotate+` 40 40)`}),(0,q.jsx)(`circle`,{cx:Ta/2,cy:Ta/2,fill:o[2].color,r:Ta/5,transform:`translate(`+o[2].translateX+` `+o[2].translateY+`)`}),(0,q.jsx)(`line`,{x1:0,y1:Ta/2,x2:Ta,y2:Ta/2,strokeWidth:2,stroke:o[3].color,transform:`translate(`+o[3].translateX+` `+o[3].translateY+`) rotate(`+o[3].rotate+` 40 40)`})]})]})},Oa=90,ka=5;function Aa(e,t){let n=va(e),r=t&&t.length,i=Array.from({length:ka},(e,i)=>Sa(n+i,t,r)),a=[];return a[0]=i[0],a[1]=i[1],a[2]=i[1],a[3]=i[2],a[4]=i[2],a[5]=i[3],a[6]=i[3],a[7]=i[0],a[8]=i[4],a}var ja=({name:e,colors:t,title:n,square:r,size:i,...a})=>{let o=Aa(e,t),s=W.useId();return(0,q.jsxs)(`svg`,{viewBox:`0 0 90 90`,fill:`none`,role:`img`,xmlns:`http://www.w3.org/2000/svg`,width:i,height:i,...a,children:[n&&(0,q.jsx)(`title`,{children:e}),(0,q.jsx)(`mask`,{id:s,maskUnits:`userSpaceOnUse`,x:0,y:0,width:Oa,height:Oa,children:(0,q.jsx)(`rect`,{width:Oa,height:Oa,rx:r?void 0:180,fill:`#FFFFFF`})}),(0,q.jsxs)(`g`,{mask:`url(#${s})`,children:[(0,q.jsx)(`path`,{d:`M0 0h90v45H0z`,fill:o[0]}),(0,q.jsx)(`path`,{d:`M0 45h90v45H0z`,fill:o[1]}),(0,q.jsx)(`path`,{d:`M83 45a38 38 0 00-76 0h76z`,fill:o[2]}),(0,q.jsx)(`path`,{d:`M83 45a38 38 0 01-76 0h76z`,fill:o[3]}),(0,q.jsx)(`path`,{d:`M77 45a32 32 0 10-64 0h64z`,fill:o[4]}),(0,q.jsx)(`path`,{d:`M77 45a32 32 0 11-64 0h64z`,fill:o[5]}),(0,q.jsx)(`path`,{d:`M71 45a26 26 0 00-52 0h52z`,fill:o[6]}),(0,q.jsx)(`path`,{d:`M71 45a26 26 0 01-52 0h52z`,fill:o[7]}),(0,q.jsx)(`circle`,{cx:45,cy:45,r:23,fill:o[8]})]})]})},Ma=64,Na=80;function Pa(e,t){let n=va(e),r=t&&t.length;return Array.from({length:Ma},(e,i)=>Sa(n%(i+1),t,r))}var Fa=({name:e,colors:t,title:n,square:r,size:i,...a})=>{let o=Pa(e,t),s=W.useId();return(0,q.jsxs)(`svg`,{viewBox:`0 0 80 80`,fill:`none`,role:`img`,xmlns:`http://www.w3.org/2000/svg`,width:i,height:i,...a,children:[n&&(0,q.jsx)(`title`,{children:e}),(0,q.jsx)(`mask`,{id:s,"mask-type":`alpha`,maskUnits:`userSpaceOnUse`,x:0,y:0,width:Na,height:Na,children:(0,q.jsx)(`rect`,{width:Na,height:Na,rx:r?void 0:160,fill:`#FFFFFF`})}),(0,q.jsxs)(`g`,{mask:`url(#${s})`,children:[(0,q.jsx)(`rect`,{width:10,height:10,fill:o[0]}),(0,q.jsx)(`rect`,{x:20,width:10,height:10,fill:o[1]}),(0,q.jsx)(`rect`,{x:40,width:10,height:10,fill:o[2]}),(0,q.jsx)(`rect`,{x:60,width:10,height:10,fill:o[3]}),(0,q.jsx)(`rect`,{x:10,width:10,height:10,fill:o[4]}),(0,q.jsx)(`rect`,{x:30,width:10,height:10,fill:o[5]}),(0,q.jsx)(`rect`,{x:50,width:10,height:10,fill:o[6]}),(0,q.jsx)(`rect`,{x:70,width:10,height:10,fill:o[7]}),(0,q.jsx)(`rect`,{y:10,width:10,height:10,fill:o[8]}),(0,q.jsx)(`rect`,{y:20,width:10,height:10,fill:o[9]}),(0,q.jsx)(`rect`,{y:30,width:10,height:10,fill:o[10]}),(0,q.jsx)(`rect`,{y:40,width:10,height:10,fill:o[11]}),(0,q.jsx)(`rect`,{y:50,width:10,height:10,fill:o[12]}),(0,q.jsx)(`rect`,{y:60,width:10,height:10,fill:o[13]}),(0,q.jsx)(`rect`,{y:70,width:10,height:10,fill:o[14]}),(0,q.jsx)(`rect`,{x:20,y:10,width:10,height:10,fill:o[15]}),(0,q.jsx)(`rect`,{x:20,y:20,width:10,height:10,fill:o[16]}),(0,q.jsx)(`rect`,{x:20,y:30,width:10,height:10,fill:o[17]}),(0,q.jsx)(`rect`,{x:20,y:40,width:10,height:10,fill:o[18]}),(0,q.jsx)(`rect`,{x:20,y:50,width:10,height:10,fill:o[19]}),(0,q.jsx)(`rect`,{x:20,y:60,width:10,height:10,fill:o[20]}),(0,q.jsx)(`rect`,{x:20,y:70,width:10,height:10,fill:o[21]}),(0,q.jsx)(`rect`,{x:40,y:10,width:10,height:10,fill:o[22]}),(0,q.jsx)(`rect`,{x:40,y:20,width:10,height:10,fill:o[23]}),(0,q.jsx)(`rect`,{x:40,y:30,width:10,height:10,fill:o[24]}),(0,q.jsx)(`rect`,{x:40,y:40,width:10,height:10,fill:o[25]}),(0,q.jsx)(`rect`,{x:40,y:50,width:10,height:10,fill:o[26]}),(0,q.jsx)(`rect`,{x:40,y:60,width:10,height:10,fill:o[27]}),(0,q.jsx)(`rect`,{x:40,y:70,width:10,height:10,fill:o[28]}),(0,q.jsx)(`rect`,{x:60,y:10,width:10,height:10,fill:o[29]}),(0,q.jsx)(`rect`,{x:60,y:20,width:10,height:10,fill:o[30]}),(0,q.jsx)(`rect`,{x:60,y:30,width:10,height:10,fill:o[31]}),(0,q.jsx)(`rect`,{x:60,y:40,width:10,height:10,fill:o[32]}),(0,q.jsx)(`rect`,{x:60,y:50,width:10,height:10,fill:o[33]}),(0,q.jsx)(`rect`,{x:60,y:60,width:10,height:10,fill:o[34]}),(0,q.jsx)(`rect`,{x:60,y:70,width:10,height:10,fill:o[35]}),(0,q.jsx)(`rect`,{x:10,y:10,width:10,height:10,fill:o[36]}),(0,q.jsx)(`rect`,{x:10,y:20,width:10,height:10,fill:o[37]}),(0,q.jsx)(`rect`,{x:10,y:30,width:10,height:10,fill:o[38]}),(0,q.jsx)(`rect`,{x:10,y:40,width:10,height:10,fill:o[39]}),(0,q.jsx)(`rect`,{x:10,y:50,width:10,height:10,fill:o[40]}),(0,q.jsx)(`rect`,{x:10,y:60,width:10,height:10,fill:o[41]}),(0,q.jsx)(`rect`,{x:10,y:70,width:10,height:10,fill:o[42]}),(0,q.jsx)(`rect`,{x:30,y:10,width:10,height:10,fill:o[43]}),(0,q.jsx)(`rect`,{x:30,y:20,width:10,height:10,fill:o[44]}),(0,q.jsx)(`rect`,{x:30,y:30,width:10,height:10,fill:o[45]}),(0,q.jsx)(`rect`,{x:30,y:40,width:10,height:10,fill:o[46]}),(0,q.jsx)(`rect`,{x:30,y:50,width:10,height:10,fill:o[47]}),(0,q.jsx)(`rect`,{x:30,y:60,width:10,height:10,fill:o[48]}),(0,q.jsx)(`rect`,{x:30,y:70,width:10,height:10,fill:o[49]}),(0,q.jsx)(`rect`,{x:50,y:10,width:10,height:10,fill:o[50]}),(0,q.jsx)(`rect`,{x:50,y:20,width:10,height:10,fill:o[51]}),(0,q.jsx)(`rect`,{x:50,y:30,width:10,height:10,fill:o[52]}),(0,q.jsx)(`rect`,{x:50,y:40,width:10,height:10,fill:o[53]}),(0,q.jsx)(`rect`,{x:50,y:50,width:10,height:10,fill:o[54]}),(0,q.jsx)(`rect`,{x:50,y:60,width:10,height:10,fill:o[55]}),(0,q.jsx)(`rect`,{x:50,y:70,width:10,height:10,fill:o[56]}),(0,q.jsx)(`rect`,{x:70,y:10,width:10,height:10,fill:o[57]}),(0,q.jsx)(`rect`,{x:70,y:20,width:10,height:10,fill:o[58]}),(0,q.jsx)(`rect`,{x:70,y:30,width:10,height:10,fill:o[59]}),(0,q.jsx)(`rect`,{x:70,y:40,width:10,height:10,fill:o[60]}),(0,q.jsx)(`rect`,{x:70,y:50,width:10,height:10,fill:o[61]}),(0,q.jsx)(`rect`,{x:70,y:60,width:10,height:10,fill:o[62]}),(0,q.jsx)(`rect`,{x:70,y:70,width:10,height:10,fill:o[63]})]})]})},Ia=36;function La(e,t){let n=va(e),r=t&&t.length,i=Sa(n,t,r),a=xa(n,10,1),o=a<5?a+Ia/9:a,s=xa(n,10,2),c=s<5?s+Ia/9:s;return{wrapperColor:i,faceColor:Ca(i),backgroundColor:Sa(n+13,t,r),wrapperTranslateX:o,wrapperTranslateY:c,wrapperRotate:xa(n,360),wrapperScale:1+xa(n,Ia/12)/10,isMouthOpen:ba(n,2),isCircle:ba(n,1),eyeSpread:xa(n,5),mouthSpread:xa(n,3),faceRotate:xa(n,10,3),faceTranslateX:o>Ia/6?o/2:xa(n,8,1),faceTranslateY:c>Ia/6?c/2:xa(n,7,2)}}var Ra=({name:e,colors:t,title:n,square:r,size:i,...a})=>{let o=La(e,t),s=W.useId();return(0,q.jsxs)(`svg`,{viewBox:`0 0 36 36`,fill:`none`,role:`img`,xmlns:`http://www.w3.org/2000/svg`,width:i,height:i,...a,children:[n&&(0,q.jsx)(`title`,{children:e}),(0,q.jsx)(`mask`,{id:s,maskUnits:`userSpaceOnUse`,x:0,y:0,width:Ia,height:Ia,children:(0,q.jsx)(`rect`,{width:Ia,height:Ia,rx:r?void 0:72,fill:`#FFFFFF`})}),(0,q.jsxs)(`g`,{mask:`url(#${s})`,children:[(0,q.jsx)(`rect`,{width:Ia,height:Ia,fill:o.backgroundColor}),(0,q.jsx)(`rect`,{x:`0`,y:`0`,width:Ia,height:Ia,transform:`translate(`+o.wrapperTranslateX+` `+o.wrapperTranslateY+`) rotate(`+o.wrapperRotate+` 18 18) scale(`+o.wrapperScale+`)`,fill:o.wrapperColor,rx:o.isCircle?Ia:Ia/6}),(0,q.jsxs)(`g`,{transform:`translate(`+o.faceTranslateX+` `+o.faceTranslateY+`) rotate(`+o.faceRotate+` 18 18)`,children:[o.isMouthOpen?(0,q.jsx)(`path`,{d:`M15 `+(19+o.mouthSpread)+`c2 1 4 1 6 0`,stroke:o.faceColor,fill:`none`,strokeLinecap:`round`}):(0,q.jsx)(`path`,{d:`M13,`+(19+o.mouthSpread)+` a1,0.75 0 0,0 10,0`,fill:o.faceColor}),(0,q.jsx)(`rect`,{x:14-o.eyeSpread,y:14,width:1.5,height:2,rx:1,stroke:`none`,fill:o.faceColor}),(0,q.jsx)(`rect`,{x:20+o.eyeSpread,y:14,width:1.5,height:2,rx:1,stroke:`none`,fill:o.faceColor})]})]})]})},za=4,Ba=80;function Va(e,t){let n=va(e),r=t&&t.length;return Array.from({length:za},(e,i)=>Sa(n+i,t,r))}var Ha=({name:e,colors:t,title:n,square:r,size:i,...a})=>{let o=Va(e,t),s=e.replace(/\s/g,``),c=W.useId();return(0,q.jsxs)(`svg`,{viewBox:`0 0 80 80`,fill:`none`,role:`img`,xmlns:`http://www.w3.org/2000/svg`,width:i,height:i,...a,children:[n&&(0,q.jsx)(`title`,{children:e}),(0,q.jsx)(`mask`,{id:c,maskUnits:`userSpaceOnUse`,x:0,y:0,width:Ba,height:Ba,children:(0,q.jsx)(`rect`,{width:Ba,height:Ba,rx:r?void 0:160,fill:`#FFFFFF`})}),(0,q.jsxs)(`g`,{mask:`url(#${c})`,children:[(0,q.jsx)(`path`,{fill:`url(#gradient_paint0_linear_`+s+`)`,d:`M0 0h80v40H0z`}),(0,q.jsx)(`path`,{fill:`url(#gradient_paint1_linear_`+s+`)`,d:`M0 40h80v40H0z`})]}),(0,q.jsxs)(`defs`,{children:[(0,q.jsxs)(`linearGradient`,{id:`gradient_paint0_linear_`+s,x1:Ba/2,y1:0,x2:Ba/2,y2:Ba/2,gradientUnits:`userSpaceOnUse`,children:[(0,q.jsx)(`stop`,{stopColor:o[0]}),(0,q.jsx)(`stop`,{offset:1,stopColor:o[1]})]}),(0,q.jsxs)(`linearGradient`,{id:`gradient_paint1_linear_`+s,x1:Ba/2,y1:Ba/2,x2:Ba/2,y2:Ba,gradientUnits:`userSpaceOnUse`,children:[(0,q.jsx)(`stop`,{stopColor:o[2]}),(0,q.jsx)(`stop`,{offset:1,stopColor:o[3]})]})]})]})},Ua=3,Wa=80;function Ga(e,t){let n=va(e),r=t&&t.length;return Array.from({length:Ua},(e,i)=>({color:Sa(n+i,t,r),translateX:xa(n*(i+1),Wa/10,1),translateY:xa(n*(i+1),Wa/10,2),scale:1.2+xa(n*(i+1),Wa/20)/10,rotate:xa(n*(i+1),360,1)}))}var Ka=({name:e,colors:t,title:n,square:r,size:i,...a})=>{let o=Ga(e,t),s=W.useId();return(0,q.jsxs)(`svg`,{viewBox:`0 0 80 80`,fill:`none`,role:`img`,xmlns:`http://www.w3.org/2000/svg`,width:i,height:i,...a,children:[n&&(0,q.jsx)(`title`,{children:e}),(0,q.jsx)(`mask`,{id:s,maskUnits:`userSpaceOnUse`,x:0,y:0,width:Wa,height:Wa,children:(0,q.jsx)(`rect`,{width:Wa,height:Wa,rx:r?void 0:160,fill:`#FFFFFF`})}),(0,q.jsxs)(`g`,{mask:`url(#${s})`,children:[(0,q.jsx)(`rect`,{width:Wa,height:Wa,fill:o[0].color}),(0,q.jsx)(`path`,{filter:`url(#filter_${s})`,d:`M32.414 59.35L50.376 70.5H72.5v-71H33.728L26.5 13.381l19.057 27.08L32.414 59.35z`,fill:o[1].color,transform:`translate(`+o[1].translateX+` `+o[1].translateY+`) rotate(`+o[1].rotate+` 40 40) scale(`+o[2].scale+`)`}),(0,q.jsx)(`path`,{filter:`url(#filter_${s})`,style:{mixBlendMode:`overlay`},d:`M22.216 24L0 46.75l14.108 38.129L78 86l-3.081-59.276-22.378 4.005 12.972 20.186-23.35 27.395L22.215 24z`,fill:o[2].color,transform:`translate(`+o[2].translateX+` `+o[2].translateY+`) rotate(`+o[2].rotate+` 40 40) scale(`+o[2].scale+`)`})]}),(0,q.jsx)(`defs`,{children:(0,q.jsxs)(`filter`,{id:`filter_${s}`,filterUnits:`userSpaceOnUse`,colorInterpolationFilters:`sRGB`,children:[(0,q.jsx)(`feFlood`,{floodOpacity:0,result:`BackgroundImageFix`}),(0,q.jsx)(`feBlend`,{in:`SourceGraphic`,in2:`BackgroundImageFix`,result:`shape`}),(0,q.jsx)(`feGaussianBlur`,{stdDeviation:7,result:`effect1_foregroundBlur`})]})})]})},qa={pixel:Fa,bauhaus:Da,ring:ja,beam:Ra,sunset:Ha,marble:Ka,geometric:Ra,abstract:Da},Ja=({variant:e=`marble`,colors:t=[`#92A1C6`,`#146A7C`,`#F0AB3D`,`#C271B4`,`#C20D90`],name:n=`Clara Barton`,title:r=!1,size:i=`40px`,square:a=!1,...o})=>{let s=qa[e]||Ka;return(0,q.jsx)(s,{colors:t,name:n,title:r,size:i,square:a,...o})};function Ya({bot:e,size:t=`md`,busy:n}){return(0,q.jsx)(`span`,{"aria-hidden":!0,className:K(`flex shrink-0 overflow-hidden rounded-full bg-muted`,t===`sm`?`h-7 w-7`:`h-9 w-9`,n&&`ring-2 ring-brand/60 ring-offset-1 ring-offset-background animate-pulse`),children:e&&(0,q.jsx)(Ja,{name:e.name,variant:`beam`,colors:_a(e.avatarColor),size:`100%`})})}var Xa=e(de()),Za=[`read_only`,`regenerable`,`reversible_workspace_change`,`data_loss`,`system_state`,`exfiltration`,`unclear_target`],Qa=200;function $a(e){return Za.includes(e)}function eo(e){return typeof e==`number`&&Number.isFinite(e)&&e>=0&&e<=1}function to(e){if(!e||typeof e!=`object`||Array.isArray(e))return;let{verdict:t,model:n,allow:r,ask:i,block:a,reason:o}=e;if(!(t!==`allow`&&t!==`deny`||typeof n!=`string`||!n||n.length>Qa||!eo(r)||!eo(i)||!eo(a)||o!==void 0&&!$a(o)))return{verdict:t,model:n,allow:r,ask:i,block:a,...o?{reason:o}:{}}}var no=`agent:enso`,ro=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,io=/^[a-z][a-z0-9_-]*$/;function ao(e){return typeof e==`string`&&ro.test(e)}function oo(e){if(e===`agent:enso`)return no;if(typeof e!=`string`)return null;if(e.startsWith(`builtin:`)){let t=e.slice(8);return io.test(t)&&t!==`general`&&t!==`enso`?e:null}return e.startsWith(`custom:`)?ao(e.slice(7))?e:null:e.startsWith(`bot:`)&&ao(e.slice(4))?e:null}function so(e){if(!e||typeof e!=`object`||Array.isArray(e))return null;let t=e,n=oo(t.typeKey);return Object.keys(t).length!==7||!n||typeof t.displayName!=`string`||!t.displayName.trim()||typeof t.description!=`string`||t.source!==`system`&&t.source!==`builtin`&&t.source!==`custom`&&t.source!==`bot`||typeof t.locked!=`boolean`||typeof t.canDisable!=`boolean`||typeof t.canEdit!=`boolean`||n===`agent:enso`||t.source===`bot`!==n.startsWith(`bot:`)?null:t}function co(e){if(!e||typeof e!=`object`||Array.isArray(e))return null;let t=e;if(Object.keys(t).length!==2||!Number.isInteger(t.revision)||t.revision<0||!Array.isArray(t.candidates)||t.candidates.some(e=>so(e)===null))return null;let n=t.candidates.map(e=>e.typeKey);return new Set(n).size===n.length?t:null}var lo=`__`,uo=/^plugin_([a-z][a-z0-9]*(?:-[a-z0-9]+)+)__([a-z][a-z0-9_]*)$/;function fo(e){let t=uo.exec(e);return!t?.[1]||!t[2]||t[2].includes(lo)?null:{pluginId:t[1].replaceAll(`-`,`.`),toolName:t[2]}}var po=/^<(plan-mode|active-plan)(?: id="[^"]*")?>\n([\s\S]*?)\n<\/\1>(?:\n\n|$)/;function mo(e){let t=po.exec(e);return t?{note:t[1]===`active-plan`?`active-plan`:t[2].includes(`Plan mode is ON`)?`on`:`off`,rest:e.slice(t[0].length)}:{rest:e}}var ho=/^<plan-approved id="([^"]*)">\nThe user approved the plan "([\s\S]*?)"; plan mode/,go=/^<plan-feedback id="([^"]*)">\n[\s\S]*?<feedback>\n([\s\S]*)\n<\/feedback>\n<\/plan-feedback>$/;function _o(e){let t=ho.exec(e);if(t)return{kind:`approved`,planId:t[1],title:t[2]};let n=go.exec(e);return n?{kind:`feedback`,planId:n[1],feedback:n[2]}:null}var vo=(e,t)=>e.length>t?`${e.slice(0,t)}…`:e;function yo(e){if(!e||typeof e!=`object`||Array.isArray(e))return;let{status:t,originalCommand:n,rewrittenCommand:r,inputTokens:i,outputTokens:a,reason:o}=e;if(t!==`compressed`&&t!==`unchanged`&&t!==`pending`&&t!==`bypassed`&&t!==`unavailable`||typeof n!=`string`||r!==void 0&&typeof r!=`string`||o!==void 0&&typeof o!=`string`)return;let s={status:t,originalCommand:vo(n,16e3)};if(r!==void 0&&(s.rewrittenCommand=vo(r,16e3)),o!==void 0&&(s.reason=vo(o,1e3)),i!==void 0||a!==void 0){if(typeof i!=`number`||!Number.isSafeInteger(i)||i<0||typeof a!=`number`||!Number.isSafeInteger(a)||a<0)return;s.inputTokens=i,s.outputTokens=a}return s}var bo=[`所有人`,`everyone`,`all`],xo=e=>e.normalize(`NFC`).toLowerCase();function So(e){return Array.isArray(e)?e.filter(e=>!!e&&typeof e==`object`&&typeof e.id==`string`&&typeof e.name==`string`&&e.name.length>0):[]}function Co(e,t){let n=xo(typeof e==`string`?e.replace(/^@/,``):``);return So(t).filter(e=>xo(e.name).startsWith(n))}var wo=(e,t)=>Number(!!t.pinned)-Number(!!e.pinned)||t.updatedAt-e.updatedAt;function To(e,t){let n=new Set(t.filter(e=>!e.archived).map(e=>e.id));return{groups:e.filter(e=>e.kind===`group`).sort(wo),directs:e.filter(e=>e.kind===`direct`&&n.has(e.members[0])).sort(wo)}}function Eo(e,t){let n=[e,...t.filter(t=>t.parentId===e.id)];return{current:n.find(t=>t.id===e.activeThreadId)??e,entries:n.map(e=>({id:e.id,title:e.threadTitle??(e.parentId?`新话题`:`主话题`),...e.last?.text?{preview:e.last.text}:{},activityAt:e.last?.at??e.updatedAt,unread:!1,running:e.status!==`idle`}))}}var Do=400;function Oo(e,t=!1){return e.entries.length<=Do?e:{...e,entries:t?e.entries.slice(0,Do):e.entries.slice(-400),hasOlder:!t||e.hasOlder,...t?{history:!0}:{}}}function ko(e,t,n){return n||t===0?e:e.filter(e=>e.seq>=t)}function Ao(e,t){let n={entries:[...t.entries].sort((e,t)=>e.seq-t.seq),lastSeq:t.lastSeq,hasOlder:t.hasOlder,...t.epochSeq===void 0?{}:{epochSeq:t.epochSeq}};if(e&&t.epochSeq!==void 0){if(t.epochSeq<(e.epochSeq??0))return e;if(t.epochSeq>(e.epochSeq??0)&&t.beforeSeq===void 0)return Oo(n)}if(!e||e.entries.length===0)return Oo(n,t.beforeSeq!==void 0);if(t.beforeSeq===void 0&&e.history)return{...e,lastSeq:Math.max(e.lastSeq,t.lastSeq)};if(t.beforeSeq===void 0&&t.lastSeq<e.lastSeq)return e;let r=e.entries[0].seq;if(t.beforeSeq!==void 0){if(t.beforeSeq!==r)return e}else{let t=e.entries.at(-1)?.seq??0;if((n.entries[0]?.seq??t+1)>t+1)return Oo(n)}let i=new Map(e.entries.map(e=>[e.seq,e]));for(let e of n.entries){let t=i.get(e.seq);e.truncated&&t&&!t.truncated||i.set(e.seq,e)}let a=[...i.values()].sort((e,t)=>e.seq-t.seq),o=(n.entries[0]?.seq??1/0)<r;return Oo({entries:a,lastSeq:Math.max(e.lastSeq,n.lastSeq),hasOlder:t.beforeSeq!==void 0||o?n.hasOlder:e.hasOlder,...e.history?{history:!0}:{},...n.epochSeq===void 0?e.epochSeq===void 0?{}:{epochSeq:e.epochSeq}:{epochSeq:n.epochSeq}},t.beforeSeq!==void 0)}var jo=/[A-Za-z0-9._%+-]/;function Mo(e,t){let n=e.slice(0,t),r=n.lastIndexOf(`@`);if(r<0||r>0&&jo.test(n[r-1]))return null;let i=n.slice(r+1);return/\s/.test(i)?null:{start:r,query:i}}var No=`__all__`;function Po(e,t){let n=bo[0],r=xo(e.replace(/^@/,``));return[...xo(n).startsWith(r)?[{id:No,name:n}]:[],...Co(e,t).map(({id:e,name:t})=>({id:e,name:t}))]}function Fo(e,t,n,r){let i=`@${r} `;return{text:e.slice(0,t.start)+i+e.slice(n),caret:t.start+i.length}}var Io={approval:`需要审批`,ask:`等你回答`,"delegation-interrupted":`委派中断`,budget:`今日预算已用完`,"routine-draft":`例行任务待批准`,"routine-blocked":`例行任务被阻塞`,"task-blocked":`任务卡住`};function Lo(e,t){return e.kind===`silence`?`已安静 ${Math.max(0,Math.floor((t-(e.since??t))/1e3))} 秒`:Io[e.kind]}var Ro={thinking:`思考中`,typing:`输出中`,tool:`调用工具`,retrying:`重试中`},zo={turn:`排队 · 等上一轮结束`,capacity:`排队 · 并发已满`,"member-check":`排队 · 正在判断是否可并行`,"member-serial":`排队 · 等待成员当前任务完成`,"member-fifo":`排队 · 等待成员前序任务`,"member-stopping":`排队 · 等待成员停止完成`};function Bo(e){return e.state===`queued`?e.reason&&Object.hasOwn(zo,e.reason)?zo[e.reason]:`排队中`:Ro[e.state]}function Vo(e){let t=e.steps.findLast(e=>e.status===`running`);return t?`${t.name} ${t.detail}`.trim():Bo(e)}function Ho(e,t){return e.filter(e=>e.chatId===t).sort((e,t)=>Number(e.state===`queued`)-Number(t.state===`queued`))}function Uo(e){let t=Math.max(0,Math.floor(e/1e3));if(t<60)return`${t}s`;let n=Math.floor(t/60);return n<60?`${n}m${String(t%60).padStart(2,`0`)}s`:`${Math.floor(n/60)}h${String(n%60).padStart(2,`0`)}m`}var Wo={running:`工作中`,queued:`排队中`};function Go(e,t,n){if(n){let r=Vo(n),i=t.get(n.botId)?.name;return e.kind===`group`&&i?`${i}:${r}`:r}if(e.status!==`idle`)return Wo[e.status];let r=e.last;if(!r)return e.kind===`group`?`${e.members.length} 位成员`:``;let i=r.kind===`human`?`我`:r.botId?t.get(r.botId)?.name:void 0;return i&&e.kind===`group`?`${i}:${r.text}`:r.text}function Ko({bots:e,chats:t,activeChatId:n,onSelect:r,inbox:i=[],onDismiss:a,activities:o=[]}){let s=new Map(e.map(e=>[e.id,e])),{groups:c,directs:l}=To(t,e),u=e=>{let t=e.kind===`direct`?s.get(e.members[0]):void 0,i=Ho(o,e.id)[0],a=i?i.state!==`queued`:e.status===`running`,c=!i&&e.status===`idle`;return(0,q.jsxs)(`button`,{type:`button`,onClick:()=>r(e.id),className:K(`flex w-full items-center gap-2.5 rounded-lg px-2 py-2 text-left transition-colors hover:bg-muted/60`,e.id===n&&`bg-muted`),children:[t?(0,q.jsx)(Ya,{bot:t,busy:a}):(0,q.jsx)(`span`,{className:`flex shrink-0 -space-x-2`,children:e.members.slice(0,3).map(e=>(0,q.jsx)(Ya,{bot:s.get(e),size:`sm`},e))}),(0,q.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,q.jsx)(`span`,{className:`block truncate font-medium text-sm`,children:t?.name??(e.title||`群聊`)}),(0,q.jsx)(`span`,{className:K(`block truncate text-xs`,c?`text-muted-foreground`:`text-brand`),children:Go(e,s,i)||t?.title||`\xA0`})]})]},e.id)};return(0,q.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,q.jsxs)(`div`,{className:`min-h-0 flex-1 space-y-2 overflow-y-auto p-2`,children:[c.length===0&&l.length===0&&(0,q.jsx)(`p`,{className:`rounded-lg border border-dashed px-3 py-6 text-center text-muted-foreground text-sm`,children:`桌面端还没有 Bot 聊天`}),i.length>0&&(0,q.jsxs)(`div`,{children:[(0,q.jsxs)(`p`,{className:`px-2 py-1.5 font-medium text-muted-foreground text-xs`,children:[`收件箱 · `,i.length]}),i.map(e=>{let t=e.botId?s.get(e.botId):void 0,n=e.ownerBotId?s.get(e.ownerBotId):void 0;return(0,q.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg px-2 py-2`,children:[(0,q.jsxs)(`button`,{type:`button`,disabled:!e.chatId,onClick:()=>e.chatId&&r(e.chatId),className:`flex min-w-0 flex-1 items-center gap-2.5 text-left`,children:[(0,q.jsx)(Ya,{bot:t}),(0,q.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,q.jsxs)(`span`,{className:`block truncate font-medium text-sm`,children:[t?.name??`成员`,n?` 替 ${n.name}`:``,(0,q.jsx)(`span`,{className:`ml-1.5 font-normal text-brand text-xs`,children:Lo(e,Date.now())})]}),(0,q.jsx)(`span`,{className:`block truncate text-muted-foreground text-xs`,children:e.text||`\xA0`})]})]}),e.dismissible&&a&&(0,q.jsx)(`button`,{type:`button`,onClick:()=>a(e.key),className:`shrink-0 rounded px-2 py-1 text-muted-foreground text-xs hover:bg-muted`,children:`忽略`})]},e.key)})]}),c.length>0&&(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`p`,{className:`px-2 py-1.5 font-medium text-muted-foreground text-xs`,children:`群聊`}),c.map(u)]}),l.length>0&&(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`p`,{className:`px-2 py-1.5 font-medium text-muted-foreground text-xs`,children:`成员`}),l.map(u)]})]}),(0,q.jsx)(`p`,{className:`shrink-0 px-3 py-2 text-center text-[11px] text-muted-foreground`,children:`新建成员 / 群聊、例行任务请在桌面端管理`})]})}var qo=class{send;generation=0;active=null;pending=null;constructor(e){this.send=e}start(e,t){if(this.active)return this.active;let n=this.generation,r=(async()=>{let r=await this.request(e);return n===this.generation?r.needsConfirmation===!0?t()?this.request(e,!0):null:r:{...r,ok:!1,error:`offline`}})().finally(()=>{this.active===r&&(this.active=null)});return this.active=r,r}receive(e){e.requestId===this.pending?.requestId&&e.chatId===this.pending.chatId&&this.pending.settle(e)}reset(){this.generation++;let e=this.pending;e&&e.settle({type:`bot-new-session-result`,chatId:e.chatId,requestId:e.requestId,ok:!1,error:`offline`}),this.active=null}request(e,t=!1){let n=crypto.randomUUID();return new Promise(r=>{let i=setTimeout(()=>this.receive({type:`bot-new-session-result`,chatId:e,requestId:n,ok:!1,error:`timeout`}),6e4);this.pending={chatId:e,requestId:n,settle:e=>{clearTimeout(i),this.pending=null,r(e)}};try{this.send({type:`bot-new-session`,chatId:e,requestId:n,...t?{confirmed:!0}:{}})}catch{this.receive({type:`bot-new-session-result`,chatId:e,requestId:n,ok:!1,error:`offline`})}})}},Jo=15e3,Yo=class{send;pending=null;constructor(e){this.send=e}request(e){let t=crypto.randomUUID(),n=n=>({type:`bot-thread-result`,chatId:e.chatId,requestId:t,ok:!1,error:n});return this.pending?Promise.resolve(n(`busy`)):new Promise(r=>{let i=setTimeout(()=>this.receive(n(`timeout`)),Jo);this.pending={chatId:e.chatId,requestId:t,settle:e=>{clearTimeout(i),this.pending=null,r(e)}};try{this.send({...e,requestId:t})}catch{this.receive(n(`offline`))}})}receive(e){e.requestId===this.pending?.requestId&&e.chatId===this.pending.chatId&&this.pending.settle(e)}reset(){let e=this.pending;e&&e.settle({type:`bot-thread-result`,chatId:e.chatId,requestId:e.requestId,ok:!1,error:`offline`})}};function Xo(e){return/^(.+)\/\d+$/.exec(e)?.[1]}var Zo=e=>Xo(e)!==void 0,Qo={Privacy:`隐私`,"Privacy masking":`隐私脱敏`,"Replace API keys and personal data with placeholders before requests leave this device, and restore them in replies. Original values stay in memory on this device only.":`请求离开本机前把 API Key 和个人信息换成占位符,回复中自动还原。原值只保存在本机内存里。`,"Applies to chats, compaction, bot members and helper requests.":`作用于会话、压缩、Bot 成员和各类辅助请求。`,Secrets:`密钥`,"API keys, tokens, private keys, passwords in URLs and config files.":`API Key、令牌、私钥、URL 和配置文件里的密码。`,"Detect secrets":`识别密钥`,"Recommended. Covers common vendor key formats.":`建议开启,覆盖常见厂商的 key 格式。`,"Send look-alike keys":`发送形似的假 key`,"Replace keys with fake keys of the same format instead of placeholders, so the model treats them as real keys.":`用格式相同的假 key 代替占位符,模型会把它当成真 key 处理。`,"Personal data":`个人信息`,"Detect personal data":`识别个人信息`,"Matches are validated (checksums, real domains) to limit false hits.":`命中会做校验(校验位、真实域名),减少误伤。`,Mask:`脱敏`,"Warn only":`只提醒`,Block:`拦截`,Email:`邮箱`,"Phone number":`手机号`,"ID card number":`身份证号`,"Bank card number":`银行卡号`,"IP address":`IP 地址`,"Custom rules":`自定义规则`,Words:`词语`,"One per line, case-insensitive. Project codenames, customer names…":`每行一个,不区分大小写。项目代号、客户名称等。`,"Prefixes or patterns":`前缀或正则`,"One per line. A prefix like corp_ or a regex like /INC-\\d{4}/i.":`每行一个。可以是前缀如 corp_,或正则如 /INC-\\d{4}/i。`,"Allow list":`允许名单`,"Never mask":`从不脱敏`,"Exact values, one per line. Team emails, test keys…":`完整值,每行一个。团队邮箱、测试 key 等。`,"Try it":`试一试`,"Runs locally. Nothing is remembered or sent anywhere.":`只在本地运行,不记住也不发送任何内容。`,"Paste some text, e.g. an .env file":`粘贴一段文本,例如 .env 文件`,"Nothing matched":`没有命中`,Records:`记录`,"Requested at":`请求时间`,"Auxiliary request":`辅助请求`,Compaction:`压缩`,Hits:`命中`,"Request blocked":`请求已拦截`,"No records yet":`暂无记录`,"Your message":`你的消息`,"Tool output":`工具输出`,"Tool arguments":`工具参数`,"Earlier replies":`之前的回复`,"Tool descriptions":`工具说明`,"Restored {{count}} in the reply":`回复中已还原 {{count}} 处`,"{{count}} values":`{{count}} 个值`,"Privacy masking blocks {{kinds}}. Remove it, or change the action or allow list in Settings → Privacy.":`隐私脱敏拦截了 {{kinds}}。请删掉它,或到「设置 → 隐私」调整动作或允许名单。`,"Will be blocked: {{kinds}}":`将被拦截:{{kinds}}`,"Emails, phone numbers, ID and bank card numbers, IP addresses.":`邮箱、手机号、身份证号、银行卡号、IP 地址。`,"Words and patterns specific to your work.":`与你的工作相关的词语和格式。`,"{{count}} will be masked":`发送时将脱敏 {{count}} 项`,"Classification only, not for chat":`仅用于分类,不能聊天`,"ChatGPT account selected":`已选择 ChatGPT 账号`,"ChatGPT account switched":`ChatGPT 账号已接替`,"ChatGPT account selected: {{account}}":`已选择 ChatGPT 账号:{{account}}`,"ChatGPT account switched: {{previous}} → {{current}}":`ChatGPT 账号已接替:{{previous}} → {{current}}`,"ChatGPT (automatic failover)":`ChatGPT(自动接替)`,"Create ChatGPT account pool":`创建 ChatGPT 自动接替池`,"Pool members":`接替账号`,"Use enabled, signed-in accounts in the listed order. Model and reasoning stay unchanged. Main agents and subagents share this pool.":`按列表顺序使用已启用且已登录的账号。模型和推理设置保持不变,主代理与子代理共用此池。`,"Account disabled":`账号已停用`,"Account signed out":`账号未登录`,"Pool entries do not show a single account quota. Fixed-account entries remain unchanged.":`自动接替池不显示单个账号额度,固定账号条目保持不变。`,"This reply can no longer be retried. Please send your request again.":`这条回复已无法重试,请重新发送需求。`,"Chat image storage is full (200MiB). Message not sent.":`群图片空间已满(200MiB),这条消息未发送。`,"An image is still over 10MiB after compression. Message not sent.":`图片压缩后仍超过 10MiB,这条消息未发送。`,"An attachment is not a supported image. Message not sent.":`附件不是支持的图片格式,这条消息未发送。`,"Could not save the images. Message not sent. Please try again.":`图片保存失败,这条消息未发送,请重试。`,"Add to favorites":`添加收藏`,Appearance:`外观`,"Bold font weight":`粗体字重`,"Terminal shell":`终端 Shell`,"System default":`系统默认`,"Applies to new side panel terminals. SSH projects keep the remote login shell.":`仅对新开的侧边栏终端生效。SSH 项目仍用远端登录 shell。`,"Worktree root directory":`Worktree 根目录`,"Where isolated session worktrees are created. Leave empty to use the app data directory. Existing worktrees stay where they are.":`隔离会话的 worktree 建在此目录下。留空则用应用数据目录。已有 worktree 不迁移。`,"Default location":`默认位置`,"Enter an absolute path":`请输入绝对路径`,"Choose interface theme":`选择界面主题`,"Accent color":`强调色`,"Highlight color used across the interface":`界面高亮使用的颜色`,"Follow theme":`跟随主题`,Theme:`主题`,"Built-in and plugin themes; each one is a set of color tokens":`内置与插件主题,每个主题是一组颜色 token`,"Plugin · {{name}}":`插件 · {{name}}`,"Get more themes":`获取更多主题`,Personalization:`个性化`,"Applied on top of any theme":`在任意主题之上覆盖`,"Used for running state, checkmarks and plan mode":`用于运行状态、勾选与计划模式`,"Custom CSS":`自定义 CSS`,"Inject user.css into every window; saved changes apply immediately":`把 user.css 注入所有窗口,保存即生效`,"Open user.css":`打开 user.css`,"Cannot open user.css":`无法打开 user.css`,Violet:`紫罗兰`,Indigo:`靛蓝`,Teal:`青绿`,Amber:`琥珀`,Graphite:`石墨`,"Color scheme":`配色方案`,Dark:`深色`,Font:`字体`,"Font size":`字号`,"Font weight":`字重`,General:`通用`,"General application settings":`应用通用设置`,"File opening":`文件打开`,"Context menu opening":`右键打开方式`,"File manager":`文件管理器`,"VS Code":`VS Code`,"Change application":`更换应用`,"Configure list":`配置列表`,"Add application":`添加应用`,"Open in {{app}}":`在 {{app}} 中打开`,"No opening methods enabled":`未启用打开方式`,"You can configure up to 32 opening methods.":`最多可配置 32 项打开方式。`,"Select the opening methods shown in file link context menus. You can add multiple applications.":`勾选文件链接右键菜单中显示的打开方式,可添加多个应用。`,"Configure how local workspace file links open by extension.":`按扩展名配置本地工作区文件链接的打开方式。`,"By default, supported files open inside EnsoCode; other files are revealed in the file manager.":`默认在 EnsoCode 内打开支持的文件,其他文件在文件管理器中显示。`,"Executable and installer files are always revealed in the file manager.":`可执行文件和安装包始终在文件管理器中显示。`,"File extension":`文件扩展名`,"Open inside EnsoCode":`在 EnsoCode 内打开`,"Reveal in file manager":`在文件管理器中显示`,"System default application":`系统默认应用`,"Selected application":`指定应用`,"Choose application":`选择应用`,"The selected application path is invalid.":`所选应用路径无效。`,"VS Code is unavailable. Install it or select another application.":`未找到 VS Code,请安装或选择其他应用。`,"Enter a valid file extension, for example .md.":`请输入有效的文件扩展名,例如 .md。`,"This extension does not support internal preview.":`此扩展名不支持内部预览。`,"Choose an application before saving this rule.":`保存此规则前请选择应用。`,"This extension already has an opening rule.":`此扩展名已有打开规则。`,"Image preview":`图片预览`,"This file format cannot be previewed inside EnsoCode.":`此文件格式无法在 EnsoCode 内预览。`,"The image is too large to preview.":`图片过大,无法预览。`,Updates:`更新`,"Application update settings":`应用更新设置`,"Current version":`当前版本`,"Check for updates":`检查更新`,"Checking for updates…":`正在检查更新…`,"New version {{version}} found":`发现新版本 {{version}}`,"You are on the latest version":`已是最新版本`,"Downloading update… {{percent}}%":`正在下载更新… {{percent}}%`,"New version {{version}} is ready — restart to update.":`新版本 {{version}} 已就绪 —— 重启以更新。`,"Update check failed":`检查更新失败`,"Restart to update":`重启更新`,"Restart now":`立即重启`,"Will restart to update {{version}} when the running turns finish.":`当前回合结束后将自动重启并更新到 {{version}}。`,"Continued {{count}} conversation(s) interrupted by the update":`已从断点继续 {{count}} 个因更新中断的会话`,"Update failed: {{error}}":`更新失败:{{error}}`,"Download update":`下载更新`,"Release notes":`更新日志`,"What's new in {{version}}":`{{version}} 更新内容`,"No release notes provided.":`此版本未提供更新日志。`,Restart:`重启`,"Restart server":`重启服务端`,"Restart server?":`重启服务端?`,"Running tasks are interrupted; this page reconnects after the server is back.":`正在运行的任务会被中断,服务端起来后本页会自动重连。`,"Server updates install the new version with npm and restart.":`服务端(npm 全局安装):用 npm 安装新版本后重启。`,"This server must be updated on the machine itself.":`这台服务端无法远程更新,请在服务器上执行 npm i -g @ensocode/server。`,"Automatic updates":`自动更新`,"Download and install updates automatically":`自动下载并安装更新`,"Restart and apply when idle":`空闲时重启并应用更新`,"After the update is downloaded, restart automatically if no agent is running, nothing is queued, and there are no pending questions or approvals. The idle state must last 5 minutes, and a focused window also blocks it.":`更新下载完成后,没有 agent 在跑、没有排队消息、也没有待回答/待审批时自动重启。该状态需连续保持 5 分钟;窗口在前台时也会拦住。`,"Network proxy":`网络代理`,"Used by model requests, the built-in browser, and agent tools":`作用于模型请求、内嵌浏览器和 agent 工具`,"Proxy mode":`代理模式`,"Follow system proxy":`跟随系统代理`,"No proxy":`不使用代理`,"Custom proxy":`自定义代理`,"Proxy URL":`代理地址`,"Enter an http(s) proxy URL":`请输入 http(s) 代理地址`,Shortcuts:`快捷键`,"Click a shortcut to rebind it. Backspace removes it; Esc cancels.":`点击键位改绑。Backspace 删除;Esc 取消。`,"Remove shortcut":`删除快捷键`,"No shortcut":`无快捷键`,"Toggle sidebar":`折叠/展开侧栏`,"Open settings":`打开设置`,"Switch model":`切换模型`,"Focus chat input":`聚焦输入框`,"Find in conversation":`在对话中查找`,"Search workspace":`搜索工作区`,"Search anything":`搜索任意内容`,"Search conversations...":`搜索会话...`,"Search conversations, browser tabs, settings…":`搜索对话、浏览器标签、设置…`,"Search all projects":`搜索全部项目`,"Switch scope":`切换范围`,Navigate:`选择`,Open:`打开`,"No matching results":`没有匹配结果`,Conversations:`对话`,"This project":`当前项目`,"All projects":`全部项目`,"Include archived":`含归档`,Current:`当前`,Recent:`最近`,"No projects active in the last {{n}} days":`最近 {{n}} 天没有活跃项目`,"No projects in this group yet":`这个分组还没有项目`,Actions:`动作`,"No matching conversations":`没有匹配的会话`,"Search messages...":`搜索消息...`,"Only when the chat input is focused":`仅在输入框聚焦时生效`,"Send message":`发送消息`,"Next coworker tab":`下一个 coworker 标签`,"Previous coworker tab":`上一个 coworker 标签`,"Press shortcut…":`按下新快捷键…`,'Already used by "{{label}}"':`已被「{{label}}」占用`,"Reset to default":`恢复默认`,Language:`语言`,"Windows local command shell":`Windows 本地命令壳`,"Only the Windows local agent command tool. SSH and other platforms stay on bash. Takes effect on the next session.":`只影响 Windows 本机 agent 命令工具。SSH 与其它平台仍用 bash。下次开会话生效。`,"Windows default (PowerShell)":`Windows 默认(PowerShell)`,PowerShell:`PowerShell`,"Git Bash":`Git Bash`,Light:`浅色`,"No favorite themes yet. Click the heart icon to add favorites.":`暂无收藏主题。点击爱心图标添加收藏。`,"No themes found":`未找到主题`,Preview:`预览`,"Remove from favorites":`取消收藏`,"Search themes...":`搜索主题...`,Settings:`设置`,"Search settings":`搜索设置`,Application:`应用`,"Models & agents":`模型与智能体`,"Tools & extensions":`工具与扩展`,Connections:`连接`,"Show favorites only":`只显示收藏`,"Sync terminal theme":`同步终端主题`,System:`系统`,Terminal:`终端`,"Conversation display":`对话显示`,"Conversation typography":`会话排版`,"Headings, tables and inline code scale with the body text":`标题、表格与行内代码按正文比例缩放`,Body:`正文`,"Heading 1":`一级标题`,"Heading 2":`二级标题`,"Heading 3":`三级标题`,"Heading 4–6":`四到六级标题`,Table:`表格`,"Inline code":`行内代码`,"Code block":`代码块`,"Reset to defaults":`恢复默认`,"Agent runtime":`Agent 运行`,"Sessions & worktrees":`会话与 Worktree`,"Collaboration & planning":`协作与规划`,Web:`联网`,Execution:`执行`,"Context & memory":`上下文与记忆`,Safety:`安全`,Changes:`改动`,Session:`会话`,Git:`Git`,"Git views":`Git 视图`,"Staged changes":`已暂存`,"Unstaged changes":`未暂存`,"Untracked changes":`未跟踪`,"Changed files":`改动文件`,"List view":`列表视图`,"Tree view":`树状视图`,"Collapse list":`收起列表`,"Expand list":`展开列表`,"No matching files.":`没有匹配的文件。`,Stage:`暂存`,Unstage:`取消暂存`,"Stage all":`暂存全部`,"Unstage all":`取消全部暂存`,"Discard changes":`丢弃修改`,"Delete untracked file":`删除未跟踪文件`,"Delete untracked file {{path}} permanently?":`永久删除未跟踪文件 {{path}}?`,"Restore {{path}} to its staged version? Unstaged changes will be lost.":`将 {{path}} 恢复为暂存版本?未暂存的修改将丢失。`,"Commit message":`提交信息`,"Enter commit message…":`输入提交信息…`,"{{count}} staged files":`已暂存 {{count}} 个文件`,Commit:`提交`,Fetch:`获取远程更新`,Pull:`拉取`,Push:`推送`,"No upstream":`未关联上游`,"No upstream branch configured.":`当前分支未关联上游分支。`,"Working tree clean.":`工作区没有改动。`,"Filter changed files…":`筛选改动文件…`,"Workspace is changing. Please wait.":`工作区正在切换,请稍候。`,"Could not read Git status.":`读取 Git 状态失败。`,"Could not complete the Git operation.":`Git 操作失败。`,"Could not load Git history.":`加载提交历史失败。`,"Could not load the changed files.":`加载改动文件失败。`,"Could not load the diff.":`加载差异失败。`,"Could not load the diff viewer.":`加载差异查看器失败。`,"Select a file to view its diff.":`选择文件查看差异。`,"No text changes to display.":`没有可显示的文本差异。`,"Only line endings changed.":`仅换行符发生变化。`,"No commits yet.":`暂无提交。`,"No file changes in this commit.":`该提交没有文件改动。`,"Load more commits":`加载更多提交`,added:`新增`,modified:`修改`,deleted:`删除`,untracked:`未跟踪`,conflicted:`冲突`,Browser:`浏览器`,"New tab":`新建标签页`,Soon:`即将支持`,Forward:`前进`,"Enter a URL":`输入网址`,"Navigation failed":`导航失败`,"Agent is browsing":`Agent 正在操作`,"Take control":`接管`,"Enso is in control":`Enso 正在接管`,"Toggle Developer Tools":`开关开发者工具`,"Toggle Design Mode":`开关圈选模式`,"Selected UI element":`圈选的界面元素`,"No Composer for this selection":`没有可接收圈选的输入框`,"Add to conversation":`添加到对话`,"Browser data":`浏览器数据`,"RTK command compression":`RTK 命令压缩`,"Compress supported command output before it enters the model context. Takes effect on new conversations.":`在受支持的命令输出进入模型上下文前进行压缩。新会话生效。`,"Protected action confirmation":`受保护操作确认`,"Even in full-access mode, ask before external sends, deletions, payments, deployments and secret-file access. Always on for Bot members not set to Full access. Takes effect on new conversations.":`即使在完全放行模式下,对外发送、删除、付款、部署和访问密钥文件前也要求确认。非完全放行的 Bot 成员始终开启。新会话生效。`,"Protected actions will not ask for confirmation either.":`受保护操作也不再询问。`,"Protected: external send":`受保护:对外发送`,"Protected: delete":`受保护:删除`,"Protected: payment":`受保护:付款`,"Protected: deploy / production":`受保护:部署 / 生产`,"Protected: secrets":`受保护:密钥`,"Protected: destructive command":`受保护:破坏性命令`,"dcg: {{reason}}":`dcg:{{reason}}`,"Destructive command guard (dcg)":`破坏性命令守卫(dcg)`,"Check bash and PowerShell commands with dcg before running. Matches such as git reset --hard or recursive deletes always require your confirmation, even in full-access mode. Takes effect on new conversations.":`执行 bash 和 PowerShell 命令前先用 dcg 检查。命中 git reset --hard、递归删除等危险命令时,即使在完全放行模式下也必须由你确认。新会话生效。`,"Not available on this platform":`当前平台不可用`,"Installed v{{version}}":`已安装 v{{version}}`,"Not installed":`未安装`,Install:`安装`,Uninstall:`卸载`,OK:`好`,Integrations:`集成`,"Install 'enso' Command in PATH":`在 PATH 中安装 enso 命令`,"Install Finder Quick Action":`安装访达快速操作`,"'enso' terminal command":`enso 终端命令`,"Finder Quick Action":`访达快速操作`,"Couldn't install the 'enso' command":`无法安装 enso 命令`,"Shell command 'enso' installed in {{dir}}.":`已在 {{dir}} 安装 enso 命令。`,"Run `enso .` in a terminal to open the current folder in EnsoCode.":"在终端运行 `enso .` 即可用 EnsoCode 打开当前目录。","Run `enso .` in a terminal to open the current folder in EnsoCode. Links the command into /usr/local/bin and may ask for your password.":"在终端运行 `enso .` 即可用 EnsoCode 打开当前目录。会把命令链接到 /usr/local/bin,可能需要输入密码。","Couldn't install the Finder Quick Action":`无法安装访达快速操作`,"Finder Quick Action installed.":`访达快速操作已安装。`,"Right-click a folder in Finder and choose Services > Open with EnsoCode.":`在访达中右键文件夹,选择「服务」>「用 EnsoCode 打开」。`,"Installing…":`安装中…`,"Operation failed":`操作失败`,"Install dcg":`安装 dcg`,"Downloads dcg v{{version}} from its GitHub release and verifies the checksum. dcg is a third-party tool, not part of EnsoCode.":`从 GitHub Release 下载 dcg v{{version}} 并校验 sha256。dcg 是第三方工具,不属于 EnsoCode。`,"dcg is licensed under MIT with an additional rider: no rights are granted to OpenAI, Anthropic, their affiliates, or anyone acting on their behalf. Install only if this restriction does not apply to you.":`dcg 使用附加限制条款的 MIT 许可证:不授予 OpenAI、Anthropic 及其关联方或代表它们行事的任何人任何权利。仅在该限制不适用于你时安装。`,"Agree and install":`同意并安装`,"Memory write":`记忆写入`,"Secrets redacted":`已脱敏密钥`,"Memory writes awaiting approval":`待批准的记忆写入`,"Bot members need your approval before writing to project or global memory.":`Bot 成员写入项目或全局记忆前需要你批准。`,Compressed:`已压缩`,Unchanged:`未改变`,"Background task started":`后台任务已启动`,Bypassed:`已绕过`,Unavailable:`不可用`,"This is the startup receipt; see the task_output result for final statistics.":`此处为启动回执,最终统计见 task_output 的结果。`,"~{{count}} tokens saved":`约节省 {{count}} tokens`,"Input estimate":`输入估算`,"Output estimate":`输出估算`,"{{count}} tokens":`{{count}} tokens`,Reason:`原因`,"Cookies and site storage of the built-in browser, separate from the app itself.":`内嵌浏览器的 Cookie 与站点存储,与应用本身隔离。`,"Open chat links in the built-in browser":`对话链接在内嵌浏览器打开`,"Clicking a web link in chat opens it in the side panel browser. {{key}}+Click opens it in the external browser.":`点击对话里的网页链接会在侧栏内嵌浏览器打开;{{key}}+点击在外部浏览器打开。`,"{{key}}+Click to open in external browser":`{{key}}+点击在外部浏览器打开`,Cleared:`已清除`,"Clear cookies":`清除 Cookie`,"Clear cache":`清除缓存`,"Clear all browsing data":`清除全部浏览数据`,"Enter a URL above, or let the agent open a page with browser_navigate.":`在上方输入网址,或让 agent 用 browser_navigate 打开页面。`,"Search...":`搜索…`,"Case sensitive":`区分大小写`,"Whole word":`全词匹配`,"Regular expression":`正则`,"Previous match":`上一个`,"Next match":`下一个`,"Use full chat width":`铺满两侧`,"Use reading width":`恢复两侧留白`,"Toggle side panel":`折叠/展开右侧面板`,"Toggle side panel fullscreen":`右侧面板全屏`,"Toggle minimize to tray":`切换最小化到托盘`,"Works while the app is in the tray":`应用在托盘时也能切换`,"Expand side panel":`全屏右侧面板`,"Exit side panel fullscreen":`退出右侧面板全屏`,"New terminal tab":`新建终端标签`,"New terminal when the side panel is focused; otherwise new conversation":`焦点在右侧边栏时新建终端,否则新建会话`,"Close terminal tab":`关闭终端标签`,"Collapse side panel":`折叠右侧面板`,"Select a conversation to use the side panel.":`选择一个会话后使用右侧面板。`,"No tabs yet. Create one to get started.":`还没有标签页,新建一个开始使用。`,"Open Changes when files are edited":`有文件改动时打开 Changes`,"Automatically show the side panel Changes tab after the agent edits a file":`Agent 改文件后自动打开右侧 Changes`,"Open in side panel":`在侧栏打开`,"Compact read-only tool calls":`精简只读工具调用`,"Expand file edits while running":`运行中自动展开文件改动`,"Automatically unfold diffs or written content from file modification tools while the agent is still running":`agent 运行中,文件修改工具的 diff 或写入内容自动展开`,"Expand reasoning while streaming":`流式推理时自动展开`,"Automatically unfold the thinking block while the model is still reasoning. It collapses again when reasoning ends.":`模型思考时自动展开推理内容;思考结束后仍自动收起`,"Context compaction strategy":`上下文压缩策略`,"Standard uses default compact. Smart compaction uses Enso verified summary at compact time. Codex native compaction additionally stores an official Codex checkpoint on Codex models and uses smart compaction otherwise. Continuous memory records observations in the background so compact keeps more context; all fall back to default compact on failure. Switching strategy takes effect on the next session. The summary model and compaction mode apply to open conversations on the next compaction.":`标准使用默认压缩。智能压缩在压缩时用 Enso 验证式摘要。Codex 原生压缩在 Codex 模型上额外保存官方 Codex checkpoint,其他模型按智能压缩处理。持续记忆在后台持续记录观察,压缩时保留更多上下文;失败都回退默认压缩。切换策略从下一个会话生效。摘要模型和压缩档位对已打开的对话在下一次压缩时用最新设置。`,Standard:`标准`,"Smart compaction":`智能压缩`,"Codex native compaction":`Codex 原生压缩`,"Continuous memory (experimental)":`持续记忆(实验性)`,"Summary model":`摘要模型`,"Background memory model":`后台记忆模型`,"Compaction mode":`压缩档位`,"Auto (by usage)":`自动(按占用)`,Fast:`快速`,Balanced:`均衡`,Thorough:`详尽`,"Mode changes summary budget and how much recent tail to keep. It does not decide whether compact runs.":`档位只影响摘要细致和留多长尾巴,不决定是否压缩。`,"Follows the session model":`跟随当前会话模型`,"Follow session model":`改跟会话模型`,"Selected model is unavailable — falls back to the session model.":`所选模型已不可用——将回退到当前会话模型。`,"Show read/grep/find/ls as one-line rows and fold consecutive tool calls while the agent is still running":`read/grep/find/ls 显示为单行,agent 运行中也折叠连续的工具调用`,"Auto-collapse previous turns":`自动折叠历史轮次`,"Collapse activity after reply":`回答完成后折叠过程`,"Collapse finished activity while replying":`过程中折叠已完成的调用`,"Wait before folding":`折叠前等待`,"Seconds to wait after tools and thinking finish":`工具和思考都结束后再等这么多秒`,sec:`秒`,"Pin unfinished todos":`固定显示未完成待办`,"Turn marks":`轮次刻度`,"Marks along the conversation for each turn. Hover to preview, click to jump. Hidden when the chat uses the full width.":`对话旁边的轮次刻度。悬停预览,点击跳转。聊天铺满宽度时不显示。`,Left:`左`,Right:`右`,"Keep the latest todo list above the input while it has unfinished items, so it does not scroll away with the timeline":`最新任务清单还有未完成项时,固定显示在输入框上方,不随时间线滚走`,"Hide until the todo list updates":`隐藏,清单更新后再显示`,"When a reply finishes, fold consecutive thinking and tool calls (including edits and commands) into one summary row; failed calls stay visible":`回答结束后,把连续的思考和工具调用(包括编辑、命令)折成一行摘要;失败的调用仍单独显示`,"While a reply is still running, wait a moment after tools and thinking finish, then fold that stretch into one row. Calls still running stay visible, and failed calls stay visible":`回答还在进行时,工具和思考都结束后稍等片刻,把这一段折成一行。正在跑的调用不收,失败的调用仍单独显示`,"Worked for {{duration}}":`已工作 {{duration}}`,"{{count}} thinking steps":`{{count}} 段思考`,Activity:`过程`,"After you send a new message, fold earlier turns down to the question, timestamp and duration; the latest turn stays expanded":`发送新消息后,之前的轮次只保留提问、时间与用时;最后一轮保持展开`,"Notify only for the main agent":`仅主 agent 发送完成通知`,"Skip coworker completion and failure notifications on this computer and the paired phone. Questions and approvals still notify.":`coworker 的回合完成和失败不弹桌面或手机通知。提问和审批仍会提醒。`,"Stop if no output":`无输出则停止`,"Abort and retry the run when no tokens or tool results arrive for this long. Thinking counts as output.":`超过此时长没有 token 或工具结果就中止并重试。思考输出也算有输出。`,Never:`永不`,"{{count}} min":`{{count}} 分钟`,"Compaction reserve tokens":`压缩预留 token`,"Decision models only allow or block when highly confident. Everything else asks you.":`决策模型只在把握很高时才自动放行或拦截,其余都交给你审批。`,"The assistant approval classifier is unavailable.":`助手代审的决策模型不可用。`,"Auto-manage approvals":`全自动托管`,"Auto-allow threshold":`自动放行阈值`,"0.85 (looser)":`0.85(偏松)`,"0.9 (default)":`0.9(默认)`,"0.95 (stricter)":`0.95(偏严)`,"Only runs automatically when the allow probability reaches this value. Operations near the threshold may be allowed one time and not the next.":`放行概率达到该值才自动执行。概率在阈值附近的操作,可能这次放行、下次不放行。`,"Auto-managed: runs only when the decision model is highly confident it is safe. Everything else is denied and the agent tries another way. Protected actions still ask you.":`托管中:只有决策模型高度确信安全的操作才会执行,其余直接拒绝,由 AI 换一种做法继续。受保护操作仍会问你。`,"Auto-managed · allowed":`托管 · 已放行`,"Auto-managed · denied":`托管 · 已拒绝`,"Read-only":`只读`,"Regenerable output":`可再生成`,"Reversible workspace change":`工作区内可回退的改动`,"Possible data loss":`可能丢失数据`,"Changes system state":`改动系统状态`,"Sends data externally":`向外发送数据`,"Unclear target or intent":`目标或意图不明`,"Auto-managed review timed out. Please decide.":`托管判定超时,请你来决定。`,"Auto-managed review failed. Please decide.":`托管判定出错,请你来决定。`,"Auto-managed review returned no valid decision. Please decide.":`托管判定结果无效,请你来决定。`,"Compaction runs when context exceeds the model window minus this value. Larger values compact earlier. Do not set it close to the window of small-context models, or every request compacts first. Leave empty for the default.":`上下文超过「模型窗口 − 此值」时触发压缩,值越大压缩越早。小窗口模型请勿设得过大,接近窗口会导致每次请求前都先压缩。留空使用默认值。`,"Enter a whole number between {{min}} and {{max}}, or leave it empty.":`请输入 {{min}} 到 {{max}} 之间的整数,或留空。`,"Could not save. Check that pi-agent/settings.json is valid JSON.":`保存失败,请检查 pi-agent/settings.json 是否为合法 JSON。`,"Keep in Active after last message":`活跃中留存时长`,"Stays in Active for about {{count}} more min":`活跃中还会保留约 {{count}} 分钟`,"Viewed conversations stay in Active for this long after their last message or your last open while still in Active, then leave. Unviewed ones stay until you open them.":`从最后一条消息或在「活跃中」时最后一次点开算起,此时长内即使已查看也保留,超时后移出;未查看的仍保留到你点开。`,"Auto-retry on transient errors":`瞬态错误自动重试`,"Retry with backoff (up to 60s apart) after 429, 5xx or network errors. Quota and billing errors are never retried. Unlimited keeps retrying until you cancel.":`遇到 429、5xx 或网络错误时退避重试(间隔最长 60 秒)。额度与计费错误不重试。选「无限」会一直重试,直到手动取消。`,"Retry count after 429, 5xx or network errors; off, fixed count or unlimited":`429、5xx 或网络错误后的重试次数:关闭、固定次数或无限`,Unlimited:`无限`,"{{count}} times":`{{count}} 次`,"{{count}} day":`{{count}} 天`,"{{count}} days":`{{count}} 天`,"Archive idle conversations":`归档闲置会话`,"Move conversations that have been idle this long into Archived. Does not delete them.":`将闲置超过此天数的会话移入已归档,不会删除。`,"Clean up merged worktrees":`清理已合并 worktree`,"When archiving idle conversations, also remove isolated worktrees that are merged and clean.":`归档闲置会话时,一并清理已合并且干净的隔离 worktree。`,"Delete archived conversations after":`归档超过此天数后删除`,"Permanently delete conversations that have been archived longer than this. This cannot be undone. Choosing a positive value deletes already-overdue archived conversations immediately.":`永久删除归档超过此天数的会话,不可恢复。改成正数会立即删除已超期的归档。`,"No output for {{minutes}} minutes — retrying":`{{minutes}} 分钟没有输出,正在重试`,"Stopped after repeated stalls":`多次卡住后已停止`,"No file changes in this conversation yet.":`本会话还没有文件改动。`,"No changes relative to HEAD.":`相对 HEAD 没有改动。`,"Collapse all":`全部折叠`,"Expand all":`全部展开`,"Not a git repository.":`不是 git 仓库。`,"Git diff is not available for this workspace.":`当前工作区不支持 Git diff。`,"Terminal appearance":`终端外观`,"Theme mode":`主题模式`,"Background image":`背景图`,"Show a custom image behind the interface":`在界面背后显示自定义背景图`,"The current theme has its own background. Turn this on to replace it with your image.":`当前主题自带背景,开启后用你的图片替换`,"Source type":`来源类型`,"Single image":`单张图片`,"Folder (random)":`文件夹(随机)`,"Remote URL":`网络图片`,"Image path":`图片路径`,"Folder path":`文件夹路径`,"Image URL":`图片地址`,"Auto switch":`自动切换`,seconds:`秒`,"Refresh now":`立即刷新`,"Background visibility":`背景可见度`,"Composer opacity":`输入框不透明度`,"Border opacity":`边框不透明度`,"Code block opacity":`代码块不透明度`,Blur:`模糊`,Brightness:`亮度`,Saturation:`饱和度`,Overlay:`遮罩`,"Size mode":`填充方式`,Cover:`覆盖`,Contain:`完整显示`,Repeat:`平铺`,Center:`居中原图`,Search:`搜索`,"No results":`无匹配结果`,"Semantic similarity":`语义相似度`,"Preset is locked after the conversation starts":`对话开始后预设已锁定,不能中途替换`,Path:`路径`,"Welcome to EnsoCode":`欢迎使用 EnsoCode`,"Import your providers and assets from local AI apps to get started. You can skip any step.":`从本地 AI 应用导入模型服务与资源即可开始,每一步都可跳过。`,"Sign in with a provider subscription, or import API providers from local AI apps":`使用订阅账号登录,或从本地 AI 应用导入 API 服务`,"Import skills from Claude Code, Codex or Cursor":`从 Claude Code、Codex 或 Cursor 导入技能`,"Scan and import":`扫描并导入`,"{{count}} imported":`已导入 {{count}} 个`,"All set":`全部就绪`,"You can always import more from Settings later.":`之后随时可在设置里导入更多。`,Back:`上一步`,Skip:`跳过`,Next:`下一步`,"Get started":`开始`,Close:`关闭`,Minimize:`最小化`,Maximize:`最大化`,Restore:`还原`,"No new providers imported":`没有新导入的模型服务`,"Fetch models for each provider, then enable the ones you want.":`为每个模型服务拉取模型,再启用你需要的。`,"Fetch failed":`拉取失败`,"No models yet":`暂无模型,点击拉取`,"Bundle skills, MCP servers and an instruction file into a preset (optional)":`把技能、MCP 服务和一份指令组合成预设(可选)`,"Give subagents their own model, skills and MCP servers (optional)":`为子代理配置专属模型、技能与 MCP 服务(可选)`,"{{count}} presets":`已有 {{count}} 个预设`,"Model Providers":`模型中心`,"Manage model API providers for this app":`管理应用的模型 API 服务`,"Import from local apps":`从本地应用导入`,"Scan providers configured in local AI apps and import them.":`扫描本机 AI 应用中已配置的模型服务并导入。`,"Scanning local apps...":`正在扫描本地应用...`,"Scan failed":`扫描失败`,Rescan:`重新扫描`,"No local apps detected":`未检测到本地应用`,"Supported: Claude Code, Codex, CC Switch, Alma, Cherry Studio, Hermes, OpenClaw, Grok CLI, Cursor":`支持:Claude Code、Codex、CC Switch、Alma、Cherry Studio、Hermes、OpenClaw、Grok CLI、Cursor`,"No importable providers found":`未发现可导入的模型服务`,"Already exists":`已存在`,"{{count}} models":`{{count}} 个模型`,"{{count}} selected":`已选 {{count}} 项`,"Import selected":`导入所选`,Done:`完成`,"No providers yet":`暂无模型服务`,"Import providers from local apps or add one manually to get started":`从本地应用导入或手动添加模型服务以开始使用`,"Add provider":`添加服务`,"Add Provider":`添加模型服务`,"Subscription login":`订阅登录`,"Sign in with provider subscriptions (SuperGrok, Claude Pro, ChatGPT, etc.)":`使用订阅账号登录(SuperGrok、Claude Pro、ChatGPT 等)`,"Add account":`添加账号`,"{{count}} accounts":`{{count}} 个账号`,"Log out":`退出登录`,"Starting login...":`正在启动登录…`,"Complete authorization in your browser":`请在浏览器中完成授权`,"Open authorization page":`打开授权页面`,"Enter code":`输入代码`,"Verifying...":`正在验证…`,"resets {{time}}":`{{time}} 重置`,Submit:`提交`,"Edit Provider":`编辑模型服务`,Name:`名称`,"API Type":`API 类型`,"Base URL":`Base URL`,"API Key":`API Key`,Models:`模型`,"Add a model id":`添加模型 ID`,"Filter models...":`筛选模型...`,"Filter skills...":`筛选技能...`,"Filter MCP servers...":`筛选 MCP...`,"Filter projects...":`筛选项目...`,"No models match":`没有匹配的模型`,"Enable all":`全部启用`,"Disable all":`全部禁用`,Enable:`启用`,Disable:`禁用`,"Select all":`全选`,"Deselect all":`全不选`,"{{enabled}}/{{total}} enabled":`已启用 {{enabled}}/{{total}}`,"Fetch models":`拉取模型`,"Fetch all models":`拉取全部模型`,"Refresh model info":`刷新模型信息`,"Refresh all models and info":`拉取全部模型与模型信息`,"Model info updated":`模型信息已更新`,"Model info refresh failed, using cache":`模型信息刷新失败,仍使用缓存`,"Model info refresh failed":`模型信息刷新失败`,"Fetched {{count}} providers":`已拉取 {{count}} 个模型服务`,"Test connection":`测试连接`,Authorize:`授权`,Authorizing:`授权中...`,"Revoke authorization":`取消授权`,Connecting:`连接中`,"Not authorized":`未授权`,"Authorized, pending connection":`已授权,待连接`,"Authorized. Conversations that already include this server can use it on the next message.":`已授权。已包含该服务器的对话,下一条消息即可使用。`,"New sessions only":`新会话生效`,"Open sessions keep the previous setting; it applies once you start a new session.":`已打开的会话保持原设置,新建会话后生效。`,"Settings without this tag take effect immediately.":`没有此标签的设置修改后立即生效。`,"Isolated sandbox switches between script and tool-search mode, so open sessions keep the mode they started with.":`隔离沙箱决定会话用脚本模式还是工具检索模式,已打开的会话保持启动时的模式。`,"The / menu updates right away, but open sessions keep the skills they loaded. Start a new session to load the change.":`输入框的 / 菜单会立即更新,但已打开的会话仍使用原来加载的技能,新建会话后才会加载改动。`,"The file panel and terminal use the change right away. Agents in open sessions keep the previous connection settings.":`文件面板和终端立即使用新配置;已打开会话里的代理仍使用原来的连接配置。`,"Newly enabled models can be picked right away. After changing a key or address, an open session uses it once you switch its model or start a new session.":`新启用的模型可以立即选用;修改 API Key 或地址后,已打开的会话需切换一次模型或新建会话才会使用。`,"Always loaded":`常驻`,"On demand":`按需`,"Load mode":`加载方式`,"On demand: tool descriptions are not preloaded into context; the model connects through the mcp tool when needed. Suits servers with many or rarely used tools. Takes effect in new conversations.":`按需:不预先把工具说明放进上下文,模型用到时经 mcp 工具连接;适合工具多、不常用的 server。新会话生效。`,"{{count}} tools":`{{count}} 个工具`,Fetching:`拉取中...`,Testing:`测试中...`,"Fetched {{count}} models":`拉取到 {{count}} 个模型`,"Connected ({{ms}}ms)":`连接成功({{ms}}ms)`,"Connection failed":`连接失败`,Cancel:`取消`,"Confirm exit":`确认退出`,"Exit closes the app completely, so your phone can no longer connect. Minimize to tray keeps the app running in the background so your phone can still connect.":`退出会完全关闭应用,手机将无法连接。最小化到托盘后应用会在后台继续运行,手机仍可连接。`,"Minimize to tray":`最小化到托盘`,Exit:`退出`,"Add a provider subscription or API Key, or import providers from local AI apps":`添加提供商订阅或 API Key,也可从本地 AI 应用导入模型服务`,"Add model or provider":`添加模型 / 提供商`,"Import providers from local apps or use the unified setup to get started":`从本地应用导入模型服务,或使用统一向导开始配置`,"Choose a provider first. You will select subscription or API Key next.":`请先选择提供商,下一步再选择订阅或 API Key。`,"Choose how to connect":`选择连接方式`,Subscription:`订阅`,"Provider subscription":`提供商订阅`,"ChatGPT (PI login)":`ChatGPT(PI 登录)`,"Sign in in your browser and use your subscription account.":`在浏览器中登录并使用订阅账号。`,"Configure an endpoint and key, then fetch or test its models.":`配置端点和密钥后,再拉取或测试模型。`,"Authorization failed":`授权失败`,"Authorizing {{provider}}":`正在授权 {{provider}}`,"Enter this code in your browser":`请在浏览器中输入此代码`,"Enter the code in your browser":`请在浏览器中输入代码`,"Open authorization page again":`重新打开授权页面`,"Cancel authorization":`取消授权`,"Subscription authorization":`订阅授权`,"No subscription account connected":`尚未连接订阅账号`,"Authorize this provider to add its available models.":`授权此提供商,以添加其可用模型。`,"Connect subscription":`连接订阅`,"Add another account":`添加其他账号`,"Import from Codex":`从 Codex 导入`,"Codex login not found. Sign in to Codex Desktop or CLI first.":`未找到 Codex 登录态,请先在 Codex Desktop 或 CLI 中登录。`,"Codex is not signed in with a ChatGPT account.":`Codex 未使用 ChatGPT 账号登录。`,"This ChatGPT account is already connected.":`该 ChatGPT 账号已连接。`,"Resets {{time}}":`{{time}} 后重置`,Local:`本地`,"Default model":`默认模型`,"Used for new conversations.":`用于普通新对话。`,"Follow last selection":`跟随最后一次选择`,"New conversations use the last model you picked.":`新对话使用你上次选择的模型。`,"Used for new conversations in this project.":`用于本项目的新对话。`,"Used for new conversations in this group.":`用于本组的新对话。`,"Project settings":`项目设置`,"Default model for {{name}}":`{{name}} 的默认模型`,"Follows group, then global default":`跟随分组默认,再跟随全局默认`,"Follows the global default":`跟随全局默认`,"Follow global built-in tools":`跟随全局内置工具`,"When off, configure built-in tools for this project. They override the global setting on the next session.":`关闭后可为本项目单独配置内置工具,优先级高于全局,下次会话生效。`,"Session choice overrides the project default.":`会话里手动选的模型优先于项目默认。`,"Conversation title summary":`会话标题总结`,"Generate a short AI title from the first message of a new conversation.":`新会话发出首条消息后,用 AI 自动生成简短标题。`,"Follows the default model":`跟随默认模型`,"Follow default model":`改跟默认模型`,"Use the default model":`使用默认模型`,"Summarizing title":`标题总结中`,"Title summary failed":`标题总结失败`,"Click to retry":`点击重试`,"Selected model is unavailable — falls back to the default model.":`所选模型已不可用——将回退到默认模型。`,"No default model":`未设置默认模型`,"No usable models":`没有可用模型`,"Image generation":`生图模型`,"Default image generation model":`默认生图模型`,"Selected image generation model is unavailable":`所选生图模型不可用,请检查模型标记、启用状态和 API Key。`,"Generate images with the configured image model and save them to the session scratch directory":`使用默认生图模型生成图片,并保存到会话专属目录。`,"No image generation models available":`没有可用的图像生成模型`,"Enable a model and configure valid provider credentials first.":`请先启用模型并配置有效的提供商凭证。`,"Default model changed: {{previous}} → {{next}}":`默认模型已更改:{{previous}} → {{next}}`,"Subscription credentials are loading. API-key models remain available.":`正在加载订阅凭证,API Key 模型仍可使用。`,"Subscription credentials could not be loaded: {{error}}":`无法加载订阅凭证:{{error}}`,"Subscription credentials are loading. Choose an API-key model or wait, then retry.":`正在加载订阅凭证。请选择 API Key 模型,或等待加载完成后重试。`,"Subscription credentials could not be loaded. Choose an API-key model or retry the credential refresh.":`无法加载订阅凭证。请选择 API Key 模型,或重新加载凭证。`,"Choose a model for this conversation or set a global default before sending.":`发送前请为此对话选择模型,或设置全局默认模型。`,"Choose a model for this conversation or set a project, group, or global default before sending.":`发送前请为此对话选择模型,或设置项目、分组或全局默认模型。`,"No usable model is available. Configure provider credentials and enable a model first.":`没有可用模型。请先配置提供商凭证并启用模型。`,Agent:`Agent`,Agents:`Agent`,File:`文件`,Files:`文件`,Folder:`文件夹`,"Open a file from the tree.":`从左侧树打开文件。`,"This file is too large to open in the editor.":`文件太大,无法在编辑器中打开。`,"This file changed on disk.":`磁盘上的文件已更改。`,Reload:`重新加载`,"Send to conversation":`发送到对话`,"New File":`新文件`,"New Folder":`新建文件夹`,"Copy Path":`复制路径`,"Copy Relative Path":`复制相对路径`,"View File":`查看文件`,"Open in Browser":`在浏览器中打开`,"Open Markdown Preview":`打开 Markdown 预览`,"View Source":`查看源码`,"Reveal in Finder":`在访达中显示`,"Open in Finder":`在访达中打开`,"Open in File Explorer":`在资源管理器中打开`,"Open in File Manager":`在文件管理器中打开`,Editors:`编辑器`,Terminals:`终端`,"Open Containing Folder":`打开所在文件夹`,"Reveal in File Explorer":`在资源管理器中显示`,"This file is outside the workspace and was not written by this conversation. Show it anyway?":`该文件在工作区外,且不是本会话写入的。仍要在文件管理器中显示吗?`,"A file or folder with that name already exists.":`已存在同名文件或文件夹。`,"Invalid name.":`名称无效。`,"Could not complete the file action.":`无法完成该文件操作。`,"Search needs ripgrep (rg). Install it and make sure it is on PATH.":`搜索依赖 ripgrep(rg):请安装并确保它在 PATH 里。`,"Search timed out. Try a more specific query or a smaller folder.":`搜索超时,请换更具体的关键词或缩小目录范围。`,"Could not open local file link":`无法打开本地文件链接`,"The link is outside the current workspace.":`链接位于当前工作区之外。`,"This link is not available on the local computer.":`此链接不在本机工作区中,无法打开。`,"The linked file or folder is unavailable.":`链接的文件或文件夹不可用。`,"Delete {{name}} permanently?":`永久删除 {{name}}?`,"Close others":`关闭其他`,"Close tabs to the right":`关闭右侧标签页`,"Close saved":`关闭已保存`,"Close all":`关闭所有`,"Force close others":`强制关闭其他`,"Force close all":`强制关闭所有`,"Unsaved changes":`未保存的更改`,"This file has unsaved changes. Close anyway?":`此文件有未保存的更改,仍要关闭吗?`,"Some files have unsaved changes. Close anyway?":`有文件未保存,仍要关闭吗?`,Chat:`会话`,Chats:`过去会话`,"Remove chat reference":`移除会话引用`,"Mention suggestions":`提及建议`,"Command suggestions":`命令建议`,"Plugin suggestions":`插件建议`,"Plugin is not enabled":`插件未启用`,Configure:`配置`,"Set (leave blank to keep)":`已设置(留空保持不变)`,"Not set":`未设置`,"Clear value":`清除`,"Saved. New calls use it right away.":`已保存,新的调用立即生效。`,"Host MCP tools it may call":`可调用的宿主 MCP 工具`,"Type @ to choose a file or Agent":`输入 @ 选择文件或 Agent`,Recipient:`接收者`,"Remove Agent recipient":`移除 Agent 接收者`,"Message the selected Agent…":`向所选 Agent 发送消息…`,"Send only to the selected Agent":`仅发送给所选 Agent`,Send:`发送`,"Create or select a project to start a conversation":`创建或选择一个项目以开始对话`,"Compact view":`精简版`,"The built-in browser is not available in full view. Check it on the computer.":`完整版暂不支持内置浏览器,请在电脑上查看。`,Locked:`已锁定`,"This Agent name is reserved":`此 Agent 名称为系统保留名称`,"Fast read-only recon; returns compressed findings":`快速只读调研,返回精简结论`,"Implements a self-contained coding subtask end to end":`端到端实现自包含编码子任务`,"Reviews code or diffs; read-only, returns prioritized issues":`只读审查代码或差异,并按优先级返回问题`,"Dispatched to":`已派发给`,"From plugin {{name}}":`来自插件 {{name}}`,Completed:`已完成`,Failed:`失败`,succeeded:`已成功`,denied:`已拒绝`,running:`进行中`,done:`已完成`,failed:`失败`,unavailable:`不可用`,cancelled:`已取消`,"The conversation binding expired. Retry.":`对话绑定已过期,请重试。`,"The selected Agent type is no longer available.":`所选 Agent 类型已不可用。`,"Model credentials could not be verified.":`无法验证模型凭证。`,"The parent model is unavailable.":`父会话模型不可用。`,"The Agent type is unavailable.":`Agent 类型不可用。`,"Coworker limit reached (active or reserved).":`已达到容量上限(正在运行或已预留的 coworker)。`,"Failed to spawn parent container.":`无法启动父会话容器。`,"Failed to spawn child Agent.":`无法启动子 Agent。`,"Agent worker exited before ready.":`Agent worker 在就绪前退出。`,"Agent session was rejected before ready.":`Agent 会话在就绪前被拒绝。`,"Agent session ready handshake timed out.":`Agent 会话就绪握手超时。`,"Parent ready model did not match the bound model.":`父会话就绪模型与绑定模型不匹配。`,"Child ready identity mismatch.":`子 Agent 就绪身份不匹配。`,"Child ready profile or model mismatch.":`子 Agent 就绪配置或模型不匹配。`,"Failed to prompt child Agent.":`无法向子 Agent 发送任务。`,"Failed to record dispatch.":`无法记录派发结果。`,Target:`目标`,Provider:`提供商`,Account:`账号`,Coworker:`队员`,"Could not load subscription providers":`无法加载订阅提供商`,Save:`保存`,Skills:`技能`,Skill:`技能`,"Skills registered by reference; files stay in their original location":`以引用方式登记,文件仍留在原应用目录`,"No skills yet":`暂无技能`,"Import skills from Claude Code, Codex or Cursor to get started":`从 Claude Code、Codex 或 Cursor 导入技能以开始使用`,"Import skills from local apps":`从本地应用导入技能`,"MCP Servers":`MCP 服务器`,"Model Context Protocol servers available to this app":`应用可用的 MCP 服务器`,"No MCP servers yet":`暂无 MCP 服务器`,"Import MCP servers configured in local AI apps":`导入本机 AI 应用中已配置的 MCP 服务器`,"Import MCP servers from local apps or add one manually to get started":`从本地应用导入或手动添加 MCP 服务器以开始使用`,"Add MCP server":`添加 MCP`,"Add MCP Server":`添加 MCP 服务器`,"Edit MCP Server":`编辑 MCP 服务器`,Transport:`传输方式`,Command:`命令`,"Arguments (one per line)":`参数(每行一条)`,"Environment variables (KEY=VALUE, one per line)":`环境变量(KEY=VALUE,每行一条)`,"Headers (Name: value, one per line)":`请求头(Name: value,每行一条)`,URL:`URL`,"Connection timeout (seconds)":`连接超时(秒)`,"Tool call timeout (seconds)":`工具调用超时(秒)`,"Description (optional)":`描述(可选)`,"One line telling the model what this server is for":`一句话告诉模型这个服务器的用途`,"OAuth client name (optional)":`OAuth 客户端名称(可选)`,"For servers that only accept known OAuth clients":`用于只接受已知 OAuth 客户端的服务器`,"OAuth authorization server metadata URL (optional)":`OAuth 授权服务器元数据地址(可选)`,"Use when the server advertises a wrong authorization server or none":`服务器声明的授权服务器不对或没有声明时填写`,"This MCP server already exists":`该 MCP 服务器已存在`,"Import MCP servers":`导入 MCP 服务器`,Form:`表单`,JSON:`JSON`,"JSON configuration":`JSON 配置`,Format:`格式化`,"Format failed: {{error}}":`格式化失败:{{error}}`,"Generated code is already formatted":`设计器生成的代码已是规范格式`,"Invalid JSON":`JSON 格式错误`,"No MCP servers found in JSON":`JSON 中没有有效的 MCP 服务器`,"JSON must describe a single MCP server":`JSON 只能描述一台 MCP 服务器`,"JSON must describe a single MCP server to switch to the form":`切回表单时 JSON 只能描述一台 MCP 服务器`,"Paste a server object or mcpServers JSON from Cursor / Claude Desktop":`可粘贴单台配置,或 Cursor / Claude Desktop 的 mcpServers JSON`,"Scan local AI apps and register the entries you want to reuse.":`扫描本机 AI 应用,登记你想复用的条目。`,"Nothing importable found":`未发现可导入的条目`,"{{count}} env vars":`{{count}} 个环境变量`,"Imported {{count}} entries":`已导入 {{count}} 项`,"Instruction Files":`指令文件`,Phone:`手机`,"Use your phone as a second screen. Keep this app running.":`把手机当作第二块屏幕。需保持本应用运行。`,"Pair a phone":`配对手机`,"Cancel pairing":`取消配对`,"Failed to start pairing":`发起配对失败`,"Scan with your phone camera":`用手机相机扫码`,"The code expires in 60 seconds and can only be used once.":`配对码 60 秒后失效,且只能使用一次。`,"Pairing QR code":`配对二维码`,"Expires in {{seconds}}s · single use":`{{seconds}} 秒后失效 · 仅可用一次`,"Code expired":`配对码已失效`,"Scanning opens the app and pairs it. To keep it handy, add it to your home screen.":`扫码即可打开并完成配对。想常用的话,打开后添加到主屏幕。`,"Paired devices":`已配对设备`,"No paired devices":`暂无已配对设备`,"Pair a phone to view sessions and reply on the go.":`配对手机后即可随时查看会话并回复。`,"Secure storage is unavailable on this system, so pairing keys are stored unencrypted.":`当前系统不支持安全存储,配对密钥将以未加密方式保存。`,"Waiting for phone":`等待手机`,Online:`在线`,Offline:`离线`,"Relay server":`中继服务器`,"The relay only forwards encrypted frames and cannot read your messages.":`中继只转发密文,无法读取你的消息内容。`,"Global CLAUDE.md / AGENTS.md style files from local AI tools":`本机 AI 工具的全局 CLAUDE.md / AGENTS.md 类文件`,"No instruction files yet":`暂无指令文件`,"Only one file is active at a time; enabling one disables the others":`同一时间仅一份生效(注入会话);启用一份会自动关闭其余`,"Import global instruction files configured in local AI tools":`导入本机 AI 工具中已配置的全局指令文件`,"Import instruction files from local apps or add one manually to get started":`从本地应用导入或手动添加指令文件以开始使用`,"Add instruction":`添加指令`,"Add Instruction":`添加指令文件`,"An instruction with this name already exists":`已有同名指令文件`,"Import instruction files":`导入指令文件`,"Same content":`内容相同`,"Same name":`同名`,"Edit Instruction":`编辑指令文件`,Content:`内容`,"Loading...":`加载中...`,Linked:`链接`,"Local copy":`本地副本`,"Local copy — edits stay in this app.":`本地副本 —— 修改只保存在应用内。`,"Write back to original file":`直接修改原文件`,"Saving creates a local copy — {{path}} is left untouched, and this entry stops following its updates.":`保存后会复制一份到应用内 —— {{path}} 不会被改动,此条目也将不再跟随其更新。`,"Saving overwrites {{path}} directly — {{source}} will pick up the change.":`保存会直接覆盖 {{path}} —— {{source}} 会随之生效。`,"Overwrite original":`覆盖原文件`,"Save as local copy":`保存为本地副本`,"Failed to read content":`读取内容失败`,"Failed to save":`保存失败`,Model:`模型`,"Working directory":`工作目录`,"Ask the agent…":`想让 agent 做什么…`,"Thinking…":`思考中…`,"Thought process":`思考过程`,"Thought for {{duration}}":`思考了 {{duration}}`,"Working…":`生成中…`,"Map the project":`梳理项目结构`,"Entry points, modules and key dependencies":`入口、模块划分与关键依赖`,"Walk me through this project's structure: entry points, module layout and key dependencies.":`梳理一下这个项目的结构:入口、模块划分和关键依赖。`,"Find potential issues":`排查潜在问题`,"Suspicious logic and unhandled edge cases":`找出可疑逻辑与未处理的边界情况`,"Review this project for potential bugs, suspicious logic and unhandled edge cases, and list them by severity.":`检查这个项目里的潜在 bug、可疑逻辑和未处理的边界情况,按严重程度列出来。`,"Add unit tests":`补充单元测试`,"Cover the core modules with tests":`为核心模块补上测试`,"Find the core modules that lack tests and add unit tests for them.":`找出缺少测试的核心模块,并为它们补充单元测试。`,"Summarize recent changes":`总结最近改动`,"A digest based on git log":`基于 git log 生成变更摘要`,"Summarize the recent changes in this repository based on git log.":`根据 git log 总结这个仓库最近的改动。`,"Loading Mermaid diagram...":`加载 Mermaid 图表...`,"Mermaid render error":`Mermaid 渲染错误`,"Mermaid render failed":`Mermaid 渲染失败`,"Mermaid preview":`Mermaid 预览`,"Zoom in":`放大`,"Zoom out":`缩小`,"Reset zoom":`重置缩放`,"Fit to original size":`适应初始大小`,"View fullscreen":`全屏查看`,"Exit fullscreen":`退出全屏`,Projects:`项目`,All:`全部`,Ungrouped:`未分组`,"New group":`新建分组`,"Edit group":`编辑分组`,"All groups":`全部分组`,"Search in {{group}}...":`在「{{group}}」中搜索...`,"Delete group":`删除分组`,"No color":`无颜色`,"Project group":`项目组`,Alias:`别名`,"Shown in the sidebar instead of the folder name. Leave blank to reset.":`在侧边栏代替目录名显示,留空则恢复默认。`,"Groups organize projects in the sidebar.":`用分组整理侧栏里的项目。`,"Move projects into this group":`选择要移入的项目`,"Move to group":`移动到分组`,"Open folder":`打开文件夹`,Emoji:`表情符号`,"Add project":`添加项目`,"Adding...":`正在添加...`,"Add a project to start":`添加一个项目开始`,"Temporary chats":`临时会话`,"Start a temporary chat":`开始临时会话`,"Chats that are not tied to a project. Tools follow your global settings.":`不挂项目的会话。工具跟随全局设置。`,"Add a local directory as the conversation working folder.":`把本地目录加为对话的工作目录。`,"Type a path or select from recent projects...":`输入路径或从最近项目中选择...`,"Local directory":`本地目录`,"Remote (SSH)":`远程(SSH)`,"SSH host":`SSH 主机`,"user@host or an alias from ~/.ssh/config":`user@host 或 ~/.ssh/config 里的别名`,"Remote directory":`远端目录`,Up:`上级`,"Use this directory":`选择此目录`,"No subdirectories":`没有子目录`,"Invalid folder name.":`文件夹名称无效。`,"Folder name":`文件夹名称`,"Failed to list remote directory.":`远程目录列取失败。`,"Requires key-based SSH access. Tools run on the remote host; chat history stays local.":`需要免密钥 SSH 访问。工具在远端主机执行,聊天记录保存在本地。`,"Tools run on the remote host; chat history stays local.":`工具在远端主机执行,聊天记录保存在本地。`,"SSH connection":`SSH 连接`,"Select an SSH connection":`选择 SSH 连接`,"Add an SSH connection in Settings first.":`请先在设置里添加 SSH 连接。`,SSH:`SSH`,Usage:`用量`,"Token usage across all local sessions; cost is estimated from catalog prices.":`统计本机全部会话的 Token 用量;费用按目录单价估算,可在下方覆盖。`,Today:`今天`,"7D":`7 天`,"30D":`30 天`,"90D":`90 天`,"Estimated cost":`预估费用`,"Total tokens":`总 Token`,"Input tokens":`输入 Token`,"Output tokens":`输出 Token`,"Cache tokens":`缓存 Token`,"Active time":`活跃时长`,Sessions:`会话数`,Messages:`消息数`,"Daily trend":`每日趋势`,Input:`输入`,Cache:`缓存`,Token:`Token`,Cost:`费用`,"Activity by hour":`分时活跃`,Less:`少`,More:`多`,Sun:`周日`,Mon:`周一`,Tue:`周二`,Wed:`周三`,Thu:`周四`,Fri:`周五`,Sat:`周六`,"By model":`按模型`,"By project":`按项目`,"By member":`按成员`,"Last 7 days":`近 7 天`,"Last 30 days":`近 30 天`,"Daily budget":`每日预算`,"Cost (USD), empty = unlimited":`成本(美元),留空不限`,"Daily cost limit (USD)":`每日成本上限(美元)`,"Tokens, empty = unlimited":`Token 数,留空不限`,"Daily token limit":`每日 Token 上限`,"Resets at local midnight. Once reached, new messages to this member are refused and a running reply is stopped.":`按本地时间零点重置。用完后新消息会被拒绝,正在进行的回复会被停止。`,"Today's budget is used up":`今日预算已用完`,"Budget must be a positive number":`预算必须是正数`,"Delegation time limit (minutes)":`委派时限(分钟)`,"Empty = 240":`留空 = 240`,"When other members delegate to this one, the task fails with a timeout after this long. A delegator can ask for less, not more.":`其他成员委派给该成员时,超过这个时长未完成即判超时失败。发起方只能要求更短,不能更长。`,"Check the per-turn token limit and delegation time limit":`请检查单回合 Token 上限(正整数)与委派时限(1–1440 的整数分钟)`,"Per-turn token limit":`单回合 Token 上限`,"A single reply that uses more tokens than this (counted while streaming) is stopped.":`单次回复(流式累计)用量超过该值即被停止。`,"Stopped: the member's per-turn token limit was exceeded.":`已停止:超出成员的单回合 Token 上限。`,"This member's daily budget is used up. Try again tomorrow or raise the budget.":`该成员今日预算已用完,请明天再试或调高预算。`,"Over budget":`超出预算`,"The member's daily budget is used up.":`成员今日预算已用完。`,Budget:`预算`,"{{name}}'s budget for today is used up":`{{name}} 今日预算已用完`,"Daily cost limit reached. New messages are refused until local midnight.":`已达每日成本上限,本地时间零点前新消息会被拒绝。`,"Daily token limit reached. New messages are refused until local midnight.":`已达每日 Token 上限,本地时间零点前新消息会被拒绝。`,"No usage in this period":`该周期内没有用量`,"Top {{count}} of {{total}}":`共 {{total}} 项,显示前 {{count}} 项`,"{{total}} items":`共 {{total}} 项`,"(no project)":`(无项目)`,"No catalog price for: {{models}}. Their cost is not included.":`以下模型无目录单价:{{models}},其费用未计入。`,"Unit prices":`单价`,"Rates used for cost estimates ($/M tokens).":`费用估算用的单价($/百万 tokens)。`,"Show all":`显示所有`,"Show all {{count}} lines":`显示全部 {{count}} 行`,"Raw text":`原文`,"Search table":`搜索表格`,"No matching models":`没有匹配的模型`,"Model id":`模型 id`,"Enter a model id and non-negative rates.":`请填写模型 id 和非负单价。`,Reset:`重置`,Refresh:`刷新`,"Saved hosts for remote projects. Passwords stay in the system keychain.":`远程项目用的主机。密码保存在系统钥匙串。`,"Add connection":`添加连接`,"No SSH connections yet":`还没有 SSH 连接`,"SSH timeout":`SSH 超时`,"Time limit for connection tests, loading remote AGENTS.md, remote folder browsing and file panel actions. Agent tool commands are not affected.":`连接测试、读取远端 AGENTS.md、浏览远程目录和文件面板操作的超时时间。不影响 Agent 工具执行的命令。`,"Add SSH connection":`添加 SSH 连接`,"Edit SSH connection":`编辑 SSH 连接`,"Key / agent":`密钥 / agent`,Password:`密码`,Authentication:`认证方式`,"User (optional)":`用户(可选)`,"Port (optional)":`端口(可选)`,Host:`主机`,Test:`测试`,"SSH connection succeeded":`SSH 连接成功`,"Unknown SSH host":`未知 SSH 主机`,"Trust this host and add its key to known_hosts?":`信任此主机并把密钥写入 known_hosts?`,Trust:`信任`,"Could not save host key.":`无法保存主机密钥。`,"Password (leave blank to keep)":`密码(留空则保持原密码)`,"Failed to add project":`添加项目失败`,"Failed to add project.":`添加项目失败。`,"Drop folders to add projects":`拖入文件夹以添加项目`,"Only folders can be added as projects":`只能将文件夹添加为项目`,"Only the first {{count}} folders were added":`一次最多添加 {{count}} 个文件夹`,"Could not read the path of the dropped folder":`无法读取拖入文件夹的路径`,Browse:`浏览`,"No matching projects found":`没有匹配的项目`,Add:`添加`,"New conversation":`新对话`,"Local workspace":`本地工作区`,"Workspace moved to an isolated worktree":`工作区已迁移到隔离 worktree`,"Workspace fell back to the main working tree":`工作区已回退到主工作树`,"Work directly in the main working tree":`直接在主工作树里工作`,"Run this session on its own git worktree":`让这个会话在独立的 git worktree 里运行`,"Move to worktree":`切到隔离 worktree`,"Failed to move to worktree":`切到隔离 worktree 失败`,"Main working tree has uncommitted changes":`主工作树有未提交改动`,"The new worktree branches off HEAD, so those changes stay in the main working tree and will not follow this session.":`新 worktree 从 HEAD 切出,这些改动会留在主工作树,不会跟随本会话。`,"Move anyway":`仍然切换`,"Clean up worktree":`清理 worktree`,"Clean up worktree?":`清理 worktree?`,"Failed to clean up worktree":`清理 worktree 失败`,"Reload conversation":`重新读取会话`,"Failed to reload conversation":`重新读取会话失败`,"Restart conversation (reload settings)":`重启会话(重新加载配置)`,"Failed to restart conversation":`重启会话失败`,"Clean up":`清理`,"Archive session and clean up worktree?":`归档会话并清理 worktree?`,"Pending work: {{warning}}. This session returns to the main working tree. The worktree directory and uncommitted changes are removed only when no other sessions use it. The branch is kept.":`待处理工作:{{warning}}。本会话将回退主工作树。仅在没有其他会话使用此 worktree 时,才删除目录及未提交改动;分支会保留。`,"uncommitted changes will be lost":`未提交改动将丢失`,"{{n}} unmerged commits (branch is kept)":`{{n}} 个未合并提交(分支会保留)`,"Pending work: {{warning}}. This conversation will be removed. Its worktree directory and uncommitted changes are removed only when no other sessions use it. The branch is kept.":`待处理工作:{{warning}}。本会话将被移除。仅在没有其他会话使用此 worktree 时,才删除目录及未提交改动;分支会保留。`,"Isolated worktree":`隔离 worktree`,"New isolated worktree":`新建隔离 worktree`,"Existing worktrees":`已有 worktree`,"New conversation in this worktree":`在此 worktree 新建会话`,"Rename worktree":`重命名 worktree`,"Worktree name":`Worktree 名称`,"Only the display name changes, for all sessions in this worktree. Leave empty to use the branch name.":`仅修改此 worktree 所有会话的显示名称,不改变分支或目录。留空恢复分支名。`,"Failed to rename worktree":`重命名 worktree 失败`,"Failed to use worktree":`使用 worktree 失败`,"Failed to create conversation":`新建会话失败`,"Switch branch":`切换分支`,"Back to workspaces":`返回工作区`,"Local branches":`本地分支`,"Search local branches":`搜索本地分支`,"Switching branches affects all conversations in this workspace.":`切换分支会影响此工作区的所有会话。`,"Create branch from HEAD…":`从当前 HEAD 新建分支…`,"Create branch":`新建分支`,"Create and switch":`新建并切换`,"Branch name":`分支名称`,"Detached HEAD":`分离 HEAD`,"No matching local branches.":`没有匹配的本地分支。`,"Failed to load branches":`读取分支失败`,"Failed to switch branch":`切换分支失败`,"Creates a branch from the current HEAD and switches every conversation in this workspace to it.":`从当前 HEAD 新建分支,并将此工作区的所有会话切换到该分支。`,"Create a commit before creating a branch from HEAD.":`请先创建一个提交,再从 HEAD 新建分支。`,"Stop running conversations and coworkers in this workspace before switching branches.":`请先停止此工作区中运行的会话和协作者,再切换分支。`,"Commit or stash uncommitted changes before switching branches.":`请先提交或暂存(stash)未提交改动,再切换分支。`,"This workspace is busy. Try again when its conversations are ready.":`此工作区正忙,请等待会话就绪后重试。`,"Branch is checked out in another worktree.":`此分支已被其他 worktree 占用。`,"Enter a valid Git branch name.":`请输入有效的 Git 分支名称。`,"A branch with this name already exists.":`同名分支已存在。`,"This branch no longer exists. Refresh the branch list.":`此分支已不存在,请刷新分支列表。`,"This workspace is already on that branch.":`此工作区已在该分支上。`,"Branches are not available for this workspace.":`此工作区无法使用 Git 分支。`,"Git could not switch branches.":`Git 无法切换分支。`,"Wait for the workspace operation to finish before saving.":`请等待工作区操作完成后再保存文件。`,"Worktree missing":`Worktree 已丢失`,"Worktree status unknown":`Worktree 状态未知`,"Uncommitted changes":`有未提交改动`,"Working tree clean":`工作区干净`,"{{n}} unmerged commits":`{{n}} 个未合并提交`,"Isolated worktree · uncommitted changes":`隔离 worktree · 有未提交改动`,"{{n}} browsers":`{{n}} 个浏览器`,"{{n}} terminals":`{{n}} 个终端`,"Isolated worktree · {{n}} unmerged commits":`隔离 worktree · {{n}} 个未合并提交`,"Isolated worktree is missing":`隔离 worktree 已丢失`,'The worktree of this session was deleted. Rebuild it from branch "{{branch}}" (committed work is preserved), or fall back to the main working tree.':`该会话的 worktree 已被删除。可从分支「{{branch}}」重建(已提交的工作会保留),或回退到主工作树继续。`,"Fall back to main working tree":`回退主工作树`,"Rebuild worktree":`重建 worktree`,"Failed to rebuild worktree":`重建 worktree 失败`,"Remove project":`移除项目`,"Archive project":`归档项目`,"Unarchive project":`恢复项目`,"Pin project":`置顶项目`,"Unpin project":`取消置顶项目`,"Pinned projects":`置顶项目`,"Select or create a conversation":`选择或新建一个对话`,"Collapse sidebar":`折叠侧边栏`,"Show {{n}} more":`展开其余 {{n}} 条`,"Archive {{n}} conversations":`归档 {{n}} 条会话`,Collapse:`收起`,Expand:`展开`,"Expand sidebar":`展开侧边栏`,"Approval required":`需要审批`,"Timed out · denied":`已超时拒绝`,"Timed out · no answer":`已超时未回答`,"{{time}} left":`剩余 {{time}}`,"Waiting for your answer":`等待你回答`,"Custom answer":`自定义回答`,"No answer in time; the default was selected":`超时未回答,已自动选择默认项`,Selected:`已选`,"Type an answer…":`输入回答…`,Later:`稍后`,Recommended:`推荐`,"Files read":`读入的文件`,"Tool results":`工具输出`,"About {{tokens}} left":`大约还剩 {{tokens}}`,"{{count}} more":`其余 {{count}} 项`,"Earlier {{count}} turns":`更早的 {{count}} 轮`,"Turn {{count}}":`第 {{count}} 轮`,"Compacted summary":`压缩摘要`,"System reminders":`系统提醒`,"Message will queue until this round finishes…":`消息将排队,本轮结束后发送…`,"Press {{key}} to steer the next queued message into this round…":`按 {{key}} 将下一条排队消息插入本轮…`,Queued:`排队`,"Withdraw message":`撤回`,"Not sent":`未发送`,"Delivery unconfirmed":`送达待确认`,attachments:`个附件`,Edit:`编辑`,"Send now":`立即发送`,"Interrupt and send now":`打断并立即发送`,Remove:`移除`,"Agent types":`子代理类型`,"Max active coworkers":`同时在编 coworker 上限`,"How many coworkers one conversation can keep at once. Existing ones stay if you lower the limit; hire more only after dismissing. Subagents are not counted.":`单个会话最多同时保留多少个 coworker。调低上限不会解散现有成员,雇新的前需先解雇。subagent 不计入。`,"Built-in tools":`内置工具`,"Toggle the built-in tools available to agents.":`开关 agent 可用的内置工具。`,"Try these models' built-in search in order. Credentials resolve at call time; if all fail, the keyless Exa service is the permanent fallback.":`按顺序尝试这些模型的原生搜索。凭证在调用时现取;全部失败时由免 key 的 Exa 服务永久兜底。`,"Default: use the current session model's built-in search when available, otherwise Exa.":`默认:优先使用当前会话模型的原生搜索能力,不支持时回退 Exa。`,"Add candidate":`添加候选`,"Final fallback: Exa (keyless hosted search). Not a chain entry; always last.":`最终兜底:Exa(免 key 托管搜索)。不是链条目,永远在最后。`,"Isolated sandbox":`隔离沙箱`,Memory:`记忆`,"Durable knowledge the agent can search and write across sessions. Stored locally in a SQLite database.":`可跨会话检索与写入的持久知识,本地存放在一个 SQLite 库里。`,"Enable memory tools":`启用记忆工具`,"Gives the agent memory_search, memory_capture, memory_crystallize and memory_delete. The database is only created after you enable this.":`给 agent 提供 memory_search、memory_capture、memory_crystallize 与 memory_delete。开启后才会创建数据库。`,"Memory is off. The settings below take effect once you enable it.":`记忆已关闭。开启后下面的设置才会生效。`,"Embedding model":`嵌入模型`,"Used for semantic search and near-duplicate detection. Without it search still works using full-text only.":`用于语义检索与近重复识别。没有它检索仍可用,只是退化为纯全文。`,"Remote (OpenAI-compatible)":`远程(OpenAI 兼容)`,"Unknown model; the default is used instead.":`未知模型,实际使用默认模型。`,"Model downloaded":`模型已下载`,"Model not downloaded":`模型未下载`,"Downloading…":`下载中…`,"Semantic search stays off until the model is on disk.":`模型落盘前语义检索不会生效。`,"Voice input":`语音输入`,"Adds a microphone to the composer on this computer and on paired phones. Local models transcribe speech on this computer.":`在本机和已配对手机的输入框中显示麦克风按钮,本地模型在这台电脑上识别语音。`,"Speech model":`识别模型`,Microphone:`麦克风`,"Microphone {{n}}":`麦克风 {{n}}`,"Disconnected, using the system default":`已断开,暂用系统默认`,Streaming:`流式`,"Sentence by sentence":`逐句`,Downloaded:`已下载`,"Download {{size}} · Memory about {{memory}}":`下载 {{size}} · 内存约 {{memory}}`,"Download the selected model to start using voice input.":`下载所选模型后即可使用语音输入。`,"X-ASR Streaming":`X-ASR 流式`,"Text appears while you speak. Chinese and English.":`边说边出字,支持中文和英文。`,"Most accurate on everyday speech. Chinese and English.":`日常说话识别最准,支持中文和英文。`,"Best with mixed Chinese-English and code terms. Slower and uses more memory.":`中英混说和代码术语识别最好,但较慢且更占内存。`,"Chinese, English, Japanese, Korean and Cantonese.":`支持中文、英文、日语、韩语和粤语。`,Hanbao:`憨包`,"Runs fully offline. Chinese and English.":`完全离线运行,支持中文和英文。`,"Google cloud recognition, most accurate with mixed Chinese-English and code terms. Needs a Gemini API key.":`Google 云端识别,中英混说和代码术语最准;需要 Gemini API Key。`,"Audio is uploaded to Google. On the free tier Google may use it to improve its products.":`音频会上传到 Google;免费层级下 Google 可能用它改进产品。`,"Enter a Gemini API key below first.":`需先在下方填写 Gemini API Key。`,WeType:`微信输入法`,"WeChat Keyboard cloud recognition. Chinese and English, no setup needed.":`微信输入法云端识别,支持中文和英文,无需配置。`,"Audio is uploaded to Tencent WeChat Keyboard servers.":`音频会上传到腾讯微信输入法服务器。`,"Gemini API key":`Gemini API Key`,"Create one for free in Google AI Studio.":`可在 Google AI Studio 免费创建。`,Cloud:`云端`,"Custom vocabulary":`自定义词表`,"One term per line, up to 100. Helps with names and code terms such as useEffect or pnpm.":`每行一个,最多 100 个。可提升人名和 useEffect、pnpm 这类代码术语的识别率。`,"Correct with a language model":`用大模型纠错`,"Fixes homophones, code terms and number formats after recognition. Adds about 1-3 seconds; the raw text is kept if it fails.":`识别后纠正同音错字、代码术语和数字写法,约多 1–3 秒;纠错失败时保留原文。`,"Correction model":`纠错模型`,"tuned for voice":`语音纠错专用`,"Not downloaded yet. Correction is skipped until it is.":`尚未下载,下载完成前不做纠错。`,"A fast, inexpensive model is enough.":`选一个快且便宜的模型即可。`,"Remote (API model)":`远程(API 模型)`,"Voice input is not available on this platform.":`当前平台不支持语音输入。`,"Download failed":`下载失败`,"Stop recording":`停止录音`,"Cancel recording":`取消录音`,"Transcribing…":`识别中…`,"Correcting…":`纠错中…`,"Switch to keyboard":`切换到键盘`,"Hold to talk":`按住 说话`,"Release to finish":`松开 结束`,"Slide up to cancel":`上滑 取消`,"Release to cancel":`松开 取消`,"Speech was too short.":`说话时间太短`,"Getting the microphone ready…":`麦克风准备中…`,"Speak now":`请说话`,"Voice input (hold to talk)":`语音输入(按住说话)`,"Hold while the chat input is focused, release to put the text in it":`输入框聚焦时按住录音,松开后识别并填入输入框`,"Hold {{key}} to talk":`按住 {{key}} 说话`,"Microphone access denied. Allow it in system settings.":`无法使用麦克风,请在系统设置中允许访问。`,"No microphone found.":`没有找到麦克风。`,"No speech detected.":`没有识别到语音。`,"Voice input failed.":`语音识别失败。`,"Voice input is turned off.":`语音输入已关闭。`,Experimental:`实验功能`,"Bot mode":`Bot 模式`,"Chat with AI members that have personas, form groups and delegate work. Off by default.":`与有人设的 AI 成员私聊、拉群并互相委派工作。默认关闭。`,"Bot mode is turned off.":`Bot 模式已关闭。`,"The speech model is not downloaded yet.":`语音模型尚未下载。`,"The recording was empty or too long.":`录音为空或过长。`,"Voice input needs a secure (HTTPS) connection.":`语音输入需要 HTTPS 安全连接。`,Download:`下载`,"Remote model":`远程模型`,"Credentials stay in the main process and are never sent to the renderer.":`凭证只留在主进程,不会下发到渲染层。`,"Unload automatically when idle":`空闲自动卸载`,"Release local model memory after this idle period. Models load automatically the next time they are needed.":`空闲达到此时长后释放本地模型内存,下次需要时会自动加载。`,"Download models automatically":`自动下载模型`,"Off by default, so a model is only fetched when you press Download. While a model is missing, search degrades to full-text; existing memories are re-embedded once it arrives.":`默认关闭,模型只在你点「下载」时才获取。模型缺失期间检索降级为纯全文,模型就绪后已有记忆会自动补向量。`,Distillation:`提炼`,"Distillation model":`提炼模型`,"Reads finished sessions and writes the memories.":`读已结束的会话并写出记忆。`,"Follows the title-summary model":`跟随标题模型`,"Memory language":`记忆语言`,"English keeps retrieval and near-duplicate detection stable across languages. Choose Follow conversation if your team only works in one language.":`英文能让跨语言的检索与近重复识别更稳。团队只用一种语言时可选「跟随对话」。`,English:`英文`,"Simplified Chinese":`简体中文`,"Background processing":`后台处理`,"Distill sessions automatically":`自动提炼会话`,"When a session ends, or goes idle for 30 minutes and is reclaimed, extract 1-3 durable memories from it in the background.":`会话结束、或空闲 30 分钟被回收时,在后台从中提炼 1-3 条值得长期保留的记忆。`,"{{done}}/{{total}} done":`已完成 {{done}}/{{total}}`,"about {{time}} left":`约剩 {{time}}`,"Extract entities":`抽取实体`,"Build an entity graph so a memory can be recalled by a name it does not literally contain.":`建立实体图谱,让正文里没出现该词的记忆也能被这个名字召回。`,Library:`记忆库`,"No memories stored yet.":`还没有存下任何记忆。`,"Memory is not enabled.":`记忆未启用。`,Memories:`记忆数`,Crystals:`结晶数`,Entities:`实体数`,"With vectors":`已向量化`,Backfill:`补齐`,"Backfilling…":`补齐中…`,"Vectors unavailable: {{reason}}":`无法生成向量:{{reason}}`,"No remote embedding provider is selected. Choose a provider with an API key, or switch to a local embedding model.":`还没有选择远程向量服务商:请选择一个填了 API Key 的服务商,或改用本地向量模型。`,"The selected embedding provider no longer exists. Choose another provider, or switch to a local embedding model.":`所选的向量服务商已被删除:请重新选择服务商,或改用本地向量模型。`,'Provider "{{provider}}" has no Base URL. Fill it in, or choose another provider.':`服务商「{{provider}}」没有填写 Base URL:请补全,或换一个服务商。`,'Provider "{{provider}}" has no API key. Subscription sign-in cannot be used for embeddings; choose a provider with an API key, or switch to a local embedding model.':`服务商「{{provider}}」没有 API Key:订阅登录不能用于向量化,请换一个填了 API Key 的服务商,或改用本地向量模型。`,"No remote embedding model is selected. Choose a model that supports /embeddings.":`还没有选择远程向量模型:请选择支持 /embeddings 的模型。`,'"{{model}}" is a chat model and cannot be used for embeddings. Choose a model that supports /embeddings, or switch to a local embedding model.':`「{{model}}」是对话模型,不能用于向量化:请选择支持 /embeddings 的模型,或改用本地向量模型。`,'Provider "{{provider}}" has no embedding model ("{{model}}" is a chat model). Add one that supports /embeddings (e.g. text-embedding-3-small), or switch to a local embedding model.':`服务商「{{provider}}」下没有向量模型(「{{model}}」是对话模型):请在该服务商里添加支持 /embeddings 的模型(如 text-embedding-3-small),或改用本地向量模型。`,"No model can be used for embeddings: it needs a provider with an API key and an embedding model (e.g. text-embedding-3-small). Subscription sign-in cannot be used for embeddings.":`没有可用于向量化的模型:需要填了 API Key 的服务商,且其中有向量模型(如 text-embedding-3-small)。订阅登录不能用于向量化。`,"Database size":`库体积`,Spaces:`空间数`,"Distill past sessions":`提炼历史会话`,"The automatic switch only covers sessions that end from now on. Distill earlier sessions here to fill the library.":`自动开关只对从现在开始结束或被回收的会话生效。早于此的会话在这里手动提炼,否则记忆库一直是空的。`,"No recorded sessions found.":`没有找到已记录的会话。`,"No project":`无项目`,"Already distilled":`已提炼`,"Distill all ({{count}})":`全部提炼({{count}})`,"All sessions":`全部会话`,"View sessions":`会话`,"Some sessions were already distilled":`部分会话已经提炼过`,"{{label}}: {{total}} sessions, {{done}} already distilled. Re-distilling runs the model again and may add new memories alongside the existing ones.":`{{label}}:共 {{total}} 个会话,其中 {{done}} 个已提炼。重新提炼会再跑一次模型,可能在现有记忆之外新增几条。`,"Only the {{count}} remaining":`只提炼剩下的 {{count}} 个`,"Re-distill all {{count}}":`重新提炼全部 {{count}} 个`,"Distill project":`提炼本项目`,"{{total}} sessions · {{pending}} not distilled":`{{total}} 个会话 · {{pending}} 个未提炼`,Distill:`提炼`,"Distill again":`重新提炼`,"Distilling…":`提炼中…`,"Background tasks":`后台任务`,"Clear finished tasks":`清空历史任务`,"Retry failed extractions ({{count}})":`重试失败项({{count}})`,"Removes completed and cancelled jobs. Running tasks are kept. Sessions will show as not distilled again, since that flag is derived from job history — re-distilling is deduplicated, so it will not create duplicate memories.":`清除已完成和已作废的任务,进行中的保留。清除后会话会重新显示为「未提炼」——该标记是由任务历史推导的;重新提炼有去重,不会产生重复记忆。`,"Removes completed and cancelled jobs. Running tasks are kept.":`只删除已完成和已作废的记录,不影响进行中的任务。`,"Re-embedding memories":`正在重建向量`,"Nothing running.":`没有正在运行的任务。`,"Turn memory off in Built-in tools.":`如需关闭,请到「内置工具」中操作。`,critical:`关键`,important:`重要`,useful:`有用`,low:`次要`,"Importance {{value}}":`重要度 {{value}}`,"(legacy)":`(旧版)`,"superseded by the GGUF build":`已被 GGUF 版取代`,"job:distill":`提炼`,"job:entities":`实体`,"job:vectors":`向量`,"Show less":`收起`,"Show all {{count}}":`查看全部 {{count}} 条`,"{{count}} task(s) in progress":`{{count}} 个任务进行中`,"Exact match":`精确匹配`,"Semantic search":`语义检索`,"Fast retrieval":`快速检索`,"Deep retrieval":`深入检索`,"Same path the agent uses: full-text, vectors and entities merged by relevance. Shows the top matches only — no exact count, and archived memories are excluded.":`与 agent 同一条检索路径:全文、向量、实体与一跳相关实体按相关度融合。只给最相关的几条,没有精确总数,也不包含已归档的记忆。`,"Same recall as Fast, plus intent-weighted fusion and an optional short-timeout LLM rerank. Failures fall back; archived memories are excluded.":`召回与快速检索相同,再按意图加权融合,并可选短超时 LLM 重排。失败则回退;不含已归档记忆。`,"Embedding model is not ready, so vectors are skipped.":`嵌入模型未就绪,本次跳过了向量通道。`,Knowledge:`知识`,"Browse what the agent knows as a graph or a tree, ask for an interpretation, and consolidate related memories into a crystal.":`用图谱或树浏览 agent 已知的知识,让它解读,并把相关记忆合成结晶。`,Graph:`图谱`,Tree:`知识树`,"By type":`按类型`,"By entity":`按实体`,"By month":`按月份`,"Knowledge graph":`知识图谱`,"No entities yet. Turn on entity extraction and store a few memories first.":`还没有实体。先打开「抽取实体」并存下几条记忆。`,"Colour = entity type · size = how many memories mention it":`颜色 = 实体类型 · 大小 = 被多少条记忆提及`,"{{shown}} of {{total}} entities":`{{total}} 个实体中的 {{shown}} 个`,Fit:`适应窗口`,"Fit to view":`缩放到全图`,Relayout:`重新布局`,"Re-run layout":`重新计算布局`,"{{count}} memories · {{space}}":`{{count}} 条记忆 · {{space}}`,Interpret:`解读`,"Interpreting…":`解读中…`,Interpretation:`解读`,"Based on {{count}} memories":`基于 {{count}} 条记忆`,"Crystallize ({{min}}+)":`结晶({{min}} 条起)`,"Synthesizing…":`合成中…`,"Crystal created":`已生成结晶`,"Nothing was written":`没有写入任何内容`,"Similar memories already exist, nothing was written":`已有相似记忆,没有写入`,"Identical memory already exists, nothing new was written":`已有完全相同的记忆,没有重复写入`,"Showing {{shown}} of {{total}}":`显示 {{shown}} / {{total}}`,"No memories yet.":`还没有记忆。`,"Stored memories":`已存记忆`,"Everything the agent has saved. Archiving hides a memory from search but keeps it.":`agent 存下的全部记忆。归档只是让它不再出现在检索里,内容仍保留。`,"Clear selection":`取消选择`,"Archive selected":`归档所选`,"Select memory":`选中记忆`,"Delete {{count}} memories permanently?":`永久删除这 {{count}} 条记忆?`,"Search memories":`搜索记忆`,"All spaces":`全部空间`,"All types":`全部类型`,"Show archived":`显示已归档`,"No memories yet. They appear here once the agent stores something.":`还没有记忆。agent 存下第一条后会出现在这里。`,"No memories match these filters.":`没有符合当前筛选条件的记忆。`,"Type a query to search by meaning.":`输入关键词后按语义检索。`,Crystal:`结晶`,"Retrieved {{count}} times":`被检索 {{count}} 次`,Previous:`上一页`,"Needs review":`待审阅`,"Reviewing only records your judgement. Nothing is deleted and no memory is superseded.":`审阅只记录你的判断,不会删除任何记忆,也不会让任何一条被取代。`,Accept:`接受`,Dismiss:`忽略`,Type:`类型`,Space:`空间`,Importance:`重要度`,Created:`创建于`,"Event date":`事件日期`,Embedding:`向量模型`,"Synthesized from":`合成自`,"Related versions":`相关版本`,"Delete permanently":`永久删除`,"Delete this memory permanently?":`永久删除这条记忆?`,"This cannot be undone. Archiving keeps the memory out of search while preserving it.":`此操作不可撤销。归档可以让它不再出现在检索里,同时保留内容。`,"Long-term memory: the agent can search, capture and consolidate durable decisions, preferences and lessons across sessions":`长期记忆:agent 可跨会话检索、记录与归纳持久的决策、偏好与经验`,"Let the agent drop an irrelevant automatic delivery or throwaway exchange from its context; the timeline keeps it and turn_recall can read it back":`让 agent 把无关的自动投递或一次性问答从上下文里丢掉;时间线保留原文,turn_recall 可取回`,"Plan mode: research read-only, submit a plan for approval, then carry it out after approval":`Plan 模式:只读调研并提交计划,审批通过后再执行`,"Run JavaScript in an isolated sandbox that can call session tools. Intermediate reads and edits stay out of the chat; only the returned value is added to the conversation.":`在隔离沙箱里跑 JavaScript,并可调用会话工具。中间的读取和修改不会进对话,只有返回值会留下。`,Workflow:`工作流`,"Run a JavaScript workflow that fans work out across subagents.":`运行一段扇出子代理的 JavaScript 工作流。`,"Run a JavaScript workflow that fans work out across subagents. Live status appears in the side panel.":`运行一段扇出子代理的 JavaScript 工作流。实时状态显示在右侧栏。`,"No workflow runs":`还没有工作流`,"Clear finished runs":`清除已结束`,Run:`运行`,"Workflow preset":`预设工作流`,"Manage workflow presets":`管理工作流预设`,Workflows:`工作流`,"Preset workflows you can run from the Workflow side panel":`可在侧边栏「工作流」面板中运行的预设`,"Project .agents/workflows files take precedence over these; ~/.agents/workflows and built-in presets come after.":`同名时项目 .agents/workflows 下的文件优先于这里,其次是 ~/.agents/workflows 和内置预设。`,"Add workflow preset":`新增工作流预设`,"Edit workflow preset":`编辑工作流预设`,"No custom workflow presets yet":`还没有自定义工作流预设`,"Custom presets":`自定义预设`,"Built-in presets":`内置预设`,Label:`显示名`,"Default value":`默认值`,Required:`必填`,"Add argument":`添加参数`,Script:`脚本`,Steps:`步骤`,Design:`设计`,Code:`代码`,"Default (worker)":`默认(worker)`,"Phase {{n}}":`阶段 {{n}}`,"Phase title":`阶段名称`,Prompt:`提示词`,"Click a node to edit it. Steps in a column run in parallel; columns run from left to right.":`点击节点即可编辑。同一列的步骤并行执行,各列从左到右依次执行。`,Start:`开始`,"No arguments":`无参数`,"Last phase output":`末阶段输出`,"Untitled phase":`未命名阶段`,"Untitled step":`未命名步骤`,"No prompt yet":`尚未填写提示词`,"Parallel step":`并行步骤`,"Insert phase here":`在此插入阶段`,"Phase {{n}} · Step {{m}}":`阶段 {{n}} · 步骤 {{m}}`,"Move left":`左移`,"Move right":`右移`,"Insert argument":`插入参数`,"Previous phase output":`上一阶段输出`,"This preset is plain code and cannot be shown in the designer. Using the designer replaces the current script.":`该预设是纯代码,无法在设计器中显示。改用设计器会替换当前脚本。`,"Use the designer":`改用设计器`,"Every phase needs a title and every step needs a label and a prompt.":`每个阶段需要名称,每个步骤需要显示名和提示词。`,"Generated from the design. Editing the code detaches it from the designer.":`由设计生成。手动修改代码后将脱离设计器,变为纯代码预设。`,"Plain JavaScript with top-level await; end with return. Available: agent(prompt, opts), parallel, pipeline, phase, log, args.":`纯 JavaScript,支持顶层 await,以 return 结束。可用:agent(prompt, opts)、parallel、pipeline、phase、log、args。`,"Workflow preset not found":`工作流预设不存在`,"Workflow preset is larger than 64 KB":`工作流预设超过 64 KB`,"Invalid workflow preset":`工作流预设无效:检查参数名(字母、数字、下划线),且各字段不能包含 */`,"Parallel review":`并行审查`,"Review a change set in parallel along several dimensions with read-only reviewers.":`用只读审查代理按多个维度并行审查一组改动。`,"Review scope":`审查范围`,"Dimensions (comma separated)":`审查维度(逗号分隔)`,"Multi-angle investigation":`多角度调研`,"Investigate one question from implementation, tests and docs in parallel with read-only scouts.":`用只读侦察代理从实现、测试、文档三个角度并行调研同一个问题。`,Question:`问题`,Parallel:`并行`,"{{count}} agents":`{{count}} 个子代理`,"One-shot subagent: delegate a self-contained task and return a final report (parallel or async)":`一次性子代理:委派自包含子任务,返回最终报告(可并行、可异步)`,"Persistent subagent: hire for multi-turn dialogue; you can watch and intervene from a tab":`持久子代理:雇佣后多轮对话,用户可在 tab 旁观介入`,"Task list: track progress on multi-step work":`任务清单:跟踪多步骤工作的进度`,"Ask the user a question and wait for an answer (options / timeout)":`向用户提问并等待回答(带选项/超时)`,"Background shell task: run long commands in the background and notify on completion":`后台 shell 任务:长命令挂后台跑,完成时通知`,"Built-in browser: open pages in Enso's own Chromium, read snapshots, click and type by ref":`内嵌浏览器:在 Enso 自带 Chromium 里打开页面,读快照,按 ref 点击与输入`,"Web search and fetch: search with the session model's built-in search (falls back to a keyless service) and read public pages as markdown":`联网搜索与抓取:优先用会话模型自带的搜索(不支持时降级到免 key 服务),并把公开网页读成 markdown`,"This project ships pi extension code that runs with your permissions. It was not loaded. Trust it only if you trust this repository.":`此项目带有 pi 扩展代码,会以你的权限运行,已阻止加载。只有信任这个仓库时才加载。`,"Trust and load":`信任并加载`,Plugins:`插件`,Plugin:`插件`,"Enso plugins":`Enso 插件`,"Claude Code plugins":`Claude Code 插件`,"No Enso plugins installed":`还没有安装 Enso 插件`,"Browse the marketplace or install from a GitHub URL, folder or zip.":`可以从插件市场浏览,或通过 GitHub 地址、文件夹、zip 安装。`,"Or install from":`或从本地安装`,"Installing a plugin lets it run code on this machine. Review what it asks for before confirming.":`安装插件会让它在这台电脑上运行代码。确认前请先查看它申请的权限。`,"Install from folder":`从文件夹安装`,"Install from zip":`从压缩包安装`,"Install from URL":`从链接安装`,Marketplace:`插件市场`,"Search plugins":`搜索插件`,"China mirror":`国内镜像`,"Usage guide":`使用说明`,Homepage:`主页`,"Update plugins automatically":`自动更新插件`,"Marketplace updates that do not ask for new permissions install on their own.":`权限不变的市场更新会自动装上。需要新权限的仍等你同意。`,"{{name}} tried to message another session and was blocked":`插件 {{name}} 想向其他会话发消息,已拦截`,"Turn on":`去开启`,"{{name}} {{version}} needs new permissions":`插件 {{name}} 新版本 {{version}} 需要新权限`,"Review permissions":`去授权`,"{{name}} updated to {{version}}":`插件 {{name}} 已更新到 {{version}}`,View:`查看`,"Could not reach the marketplace; showing the last saved list.":`无法连接插件市场,显示的是上次保存的列表。`,"No matching plugins":`没有匹配的插件`,Official:`官方`,Community:`社区`,Installed:`已安装`,"https://github.com/owner/repo":`https://github.com/owner/repo`,"Install failed":`安装失败`,"{{name}} installed":`已安装 {{name}}`,"Turn it on in the list below to use it.":`在下面的列表里打开开关即可使用。`,"updating from {{version}}":`从 {{version}} 更新`,"Keep current":`保持现状`,"Stopped after crashes":`多次崩溃后已停止`,"Plugin command failed":`插件命令执行失败`,"Plugin logs":`插件日志`,"No logs yet":`暂无日志`,"Reinstall from source":`从来源重新安装`,"No plugins installed from GitHub to check":`没有从 GitHub 安装的插件可以检查`,"{{count}} update(s) available":`{{count}} 个插件有新版本`,"All plugins are up to date":`插件都是最新版本`,"Version {{version}} is available":`有新版本 {{version}}`,Update:`更新`,"Update check failed: {{reason}}":`检查更新失败:{{reason}}`,Commands:`命令`,"{{count}} enabled":`已启用 {{count}} 个`,"No supported components":`没有可用组件`,"MCP servers (run when a session starts)":`MCP 服务器(会话启动时运行)`,"Hooks (run automatically on local sessions)":`Hooks(本地会话中自动运行)`,"Not supported":`暂不支持`,"Plugins installed in Claude Code. Each one is switched on or off as a whole here; changes apply to new sessions.":`Claude Code 里已安装的插件,在这里按整包开关,新会话生效。`,"No Claude Code plugins found":`没有找到 Claude Code 插件`,"Install plugins with /plugin in Claude Code, then rescan.":`在 Claude Code 里用 /plugin 安装插件后重新扫描。`,"No longer installed in Claude Code":`Claude Code 中已卸载`,"Project extensions trusted. They load in new sessions and after this one restarts.":`已信任项目扩展,新会话和本会话重新启动后加载。`,"Trusted project extensions":`已信任的项目扩展`,"Revoke trust":`撤销信任`,"No longer loaded after saving, starting with the next session.":`保存后不再加载,从下一个会话开始生效。`,"Web search":`联网搜索`,"Web fetch":`网页抓取`,Computer:`电脑操控`,"Host desktop: list windows, screenshot, accessibility tree, and input. Default off. Not the built-in browser.":`宿主桌面:列窗口、截图、无障碍树与键鼠。默认关闭。不是内嵌浏览器。`,"Operate the host desktop with screenshots, accessibility, and input.":`用截图、无障碍树和键鼠操作宿主桌面。`,"Enso never receives host-desktop computer tools.":`Enso 不会拿到宿主桌面 computer 工具。`,"Ask the coding agent to use the computer tool.":`请让编程 agent 使用 computer 工具。`,"Screen Recording":`屏幕录制`,Accessibility:`辅助功能`,"Open Screen Recording settings":`打开屏幕录制设置`,"Open Accessibility settings":`打开辅助功能设置`,"Computer needs Screen Recording to capture windows and Accessibility to inspect or click them. Grant both to EnsoCode, then restart the app.":`电脑操控需要屏幕录制才能截窗,需要辅助功能才能读无障碍树或点击。请把这两项授权给 EnsoCode,然后重启应用。`,"Grant Computer permissions":`授权电脑操控权限`,"Show permission guide":`打开权限引导`,"Apps the AI may control":`AI 可操作的应用`,"Allow all apps":`允许所有应用`,"The AI can click, type and read in any app without asking. It can see everything in their windows, including chats and passwords.":`AI 操作任何应用都不再询问,可点击、输入并读取所有应用窗口里的内容,包括聊天记录和密码等。`,"Show the app being operated":`显示正在操作的应用`,"While the AI works in an app in the background, a small floating window shows that app live. Close it any time.":`AI 在后台操作某个应用时,用一个小浮窗实时显示这个应用的画面,可随时关掉。`,"The first time the AI clicks or types in an app, EnsoCode asks you. Apps you always allow are listed here; it can then read everything in their windows.":`AI 第一次在某个应用里点击或输入时,EnsoCode 会先询问你。你选择「始终允许」的应用会列在这里,AI 之后可以读取这些应用窗口里的全部内容。`,"No apps are always allowed yet.":`还没有始终允许的应用。`,Revoke:`撤销`,"The agent can screenshot windows and control the mouse and keyboard. Grant Screen Recording and Accessibility to EnsoCode, then restart.":`Agent 可以截取窗口并控制键鼠。请把屏幕录制和辅助功能授权给 EnsoCode,然后重启。`,"Computer is ready. Open sessions can use it from their next step.":`电脑操控已就绪。已打开的会话从下一步起即可使用。`,"Capture: granted":`截屏:已授权`,"Capture: denied":`截屏:未授权`,"Input/AX: granted":`键鼠/AX:已授权`,"Input/AX: denied":`键鼠/AX:未授权`,"This platform cannot operate the desktop yet.":`当前系统还不能操作桌面。`,"QuickJS sandbox: write JavaScript that calls session tools (including edits) in one cell":`QuickJS 沙箱:用 JavaScript 在一个 cell 里调用会话工具(含编辑)`,"(log unavailable)":`(日志不可用)`,"Loading…":`加载中…`,"(no log available)":`(暂无日志)`,"Context compacted":`上下文已压缩`,"Waiting for first token":`等首字`,"Think time":`思考`,"{{kind}} · {{before}} → {{after}} · freed {{percent}}%":`{{kind}} · {{before}} → {{after}} · 释放 {{percent}}%`,"Context compacted ({{tokens}} tokens before)":`上下文已压缩(压缩前 {{tokens}} tokens)`,"Verified context compacted":`验证式压缩完成`,"Verified context compacted ({{tokens}} tokens before)":`验证式压缩完成(压缩前 {{tokens}} tokens)`,"Verified summary from smart compaction. Messages above are no longer in the model context.":`这次用了验证式摘要。此线之上的历史已不在模型上下文中。`,"Memory context compacted":`持续记忆压缩完成`,"Memory context compacted ({{tokens}} tokens before)":`持续记忆压缩完成(压缩前 {{tokens}} tokens)`,"Summary rendered from continuous memory. Messages above are no longer in the model context; use recall for sources.":`这次由持续记忆直接渲染摘要。此线之上的历史已不在模型上下文中,可用 recall 查看来源。`,"Messages above are no longer in the model context; only this summary is.":`以上消息已不在模型上下文中,模型只看到这份摘要。`,"Latest compaction summary — expand to read what the model kept.":`最近一次压缩摘要,点开可查看模型保留的内容。`,"(summary unavailable)":`(摘要不可用)`,Note:`注意`,Tip:`提示`,Important:`重要`,Warning:`警告`,Caution:`小心`,"Let the agent pick subagent models":`允许子代理指定模型`,"The main agent can pick one of these models when dispatching subagents or coworkers. The description tells it when to use each model.":`主 agent 派发 subagent/coworker 时可从这些模型里挑选;描述用于告诉它每个模型适合什么任务。`,"When to use it, e.g. cheap and fast for simple subtasks":`什么时候用它,例如:便宜快,适合简单子任务`,"Add model":`添加模型`,Delete:`删除`,Archived:`已归档`,"Clean up archived":`清理已归档`,"Older than {{days}} days":`{{days}} 天前`,"Delete all archived":`全部删除`,"All {{count}} archived conversations will be removed from the list.":`全部 {{count}} 个已归档对话将从列表移除。`,'All {{count}} archived conversations in "{{name}}" will be removed from the list.':`「{{name}}」中全部 {{count}} 个已归档对话将从列表移除。`,"Delete archived conversations?":`删除已归档对话?`,"{{count}} conversations archived more than {{days}} days ago will be removed from the list.":`{{count}} 个归档超过 {{days}} 天的对话将从列表移除。`,'{{count}} conversations in "{{name}}" archived more than {{days}} days ago will be removed from the list.':`「{{name}}」中 {{count}} 个归档超过 {{days}} 天的对话将从列表移除。`,Other:`其他`,Archive:`归档`,Unarchive:`取消归档`,Active:`活跃中`,Pinned:`已置顶`,"Drop here to pin":`拖到此处置顶`,Pin:`置顶`,Unpin:`取消置顶`,Rename:`重命名`,"Model selection":`模型选择`,"Must be picked by main agent":`必须由主 Agent 选择`,"Picked by main agent":`由主 Agent 选择`,"Fixed model":`自选固定模型`,"Subagent models not configured warning":`未在【模型服务】中配置【允许子代理指定模型】。设为【必须由主 Agent 选择】的子代理类型将暂时回退为跟随会话。`,"Custom subagent presets: system prompt, model and toolset. The agent picks one via the agent_type parameter.":`自定义子代理预设:系统提示、模型与工具集,主 agent 经 agent_type 参数选用。`,"New agent type":`新建类型`,"Built-in":`内置`,"Follows the conversation model, full toolset":`跟随会话模型,全部工具`,"Follows the conversation model":`跟随会话模型`,"Overrides built-in":`覆盖内置`,"Edit agent type":`编辑类型`,"Name (slug)":`名称(slug)`,"Description (helps the agent pick this type)":`描述(帮助主 agent 选型)`,"Fast read-only recon, returns compressed findings":`快速只读调研,返回压缩结论`,"System prompt":`系统提示`,"You are a fast recon agent. Explore, never modify…":`你是快速调研代理,只探索不修改…`,"Provider (optional)":`模型服务(可选)`,"Follow conversation":`跟随会话`,"Enable subagent model":`启用子代理模型`,"Make this model available to subagents":`允许子代理选择此模型`,"Applies to newly started conversations.":`对新启动的会话生效。`,"Follow parent":`跟随父会话`,"Depth: {{level}}":`深度:{{level}}`,Disabled:`已停用`,"Select model":`选择模型`,Toolset:`工具集`,"All tools (bash/edit/write)":`全部工具(bash/edit/write)`,"Read-only (read/grep/find/ls + bound MCP)":`只读(read/grep/find/ls + 绑定的 MCP)`,Stop:`停止`,"Attach image":`添加图片`,"Stop task":`停止任务`,"Move to background":`转为后台`,"Moving to background…":`正在转后台…`,"Moved to background":`已转后台`,"Moves to background in {{seconds}}s":`{{seconds}} 秒后转后台`,"No output for {{seconds}}s":`{{seconds}} 秒无输出`,"Exit {{code}}":`退出码 {{code}}`,"Killed at timeout":`超时被终止`,"Stopped by you":`已被你停止`,"Needs terminal":`需要终端`,"Needs login":`需要登录`,"Command not found":`找不到命令`,"Not executable":`不可执行`,"Binary output":`二进制输出`,"Log truncated":`日志已截断`,"Killed when its timeout was reached. Raise the timeout or run it in the background.":`到达 timeout 被终止。可提高 timeout 或改为后台运行。`,"Needs an interactive terminal. Use a non-interactive flag (such as --yes) or run it in your own terminal.":`需要交互式终端。改用非交互参数(如 --yes),或在你自己的终端里运行。`,"Needs credentials. Sign in from your own terminal, then retry.":`需要凭证。请先在你自己的终端里登录,再重试。`,"The program is not installed or not on PATH.":`程序未安装或不在 PATH 中。`,"Copy command":`复制命令`,"Rerun in background":`转后台重跑`,"Rerun with {{seconds}}s timeout":`以 {{seconds}}s timeout 重跑`,"Rerun this command with background: true:\n\n{{command}}":`用 background: true 重新运行这条命令:
|
|
10
|
+
`).replace(Md,``)}function Pd(e,t){return t=Nd(t),Nd(e)===t}function Fd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Rt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Rt(e,``+r);break;case`className`:St(e,`class`,r);break;case`tabIndex`:St(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:St(e,n,r);break;case`style`:Vt(e,r,o);break;case`data`:if(t!==`object`){St(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Gt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&Fd(e,t,`name`,a.name,a,null),Fd(e,t,`formEncType`,a.formEncType,a,null),Fd(e,t,`formMethod`,a.formMethod,a,null),Fd(e,t,`formTarget`,a.formTarget,a,null)):(Fd(e,t,`encType`,a.encType,a,null),Fd(e,t,`method`,a.method,a,null),Fd(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Gt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Kt);break;case`onScroll`:r!=null&&xd(`scroll`,e);break;case`onScrollEnd`:r!=null&&xd(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Gt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:xd(`beforetoggle`,e),xd(`toggle`,e),xt(e,`popover`,r);break;case`xlinkActuate`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Ct(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Ct(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Ct(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:xt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Ut.get(n)||n,xt(e,n,r))}}function Id(e,t,n,r,a,o){switch(n){case`style`:Vt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Rt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Rt(e,``+r);break;case`onScroll`:r!=null&&xd(`scroll`,e);break;case`onScrollEnd`:r!=null&&xd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Kt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!mt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[et]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):xt(e,n,r)}}}function Ld(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:xd(`error`,e),xd(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Fd(e,t,o,s,n,null)}}a&&Fd(e,t,`srcSet`,n.srcSet,n,null),r&&Fd(e,t,`src`,n.src,n,null);return;case`input`:xd(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Fd(e,t,r,d,n,null)}}Nt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in xd(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Fd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Ft(e,!!r,n,!0):Ft(e,!!r,t,!1);return;case`textarea`:for(s in xd(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Fd(e,t,s,c,n,null)}Lt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Fd(e,t,l,r,n,null)}return;case`dialog`:xd(`beforetoggle`,e),xd(`toggle`,e),xd(`cancel`,e),xd(`close`,e);break;case`iframe`:case`object`:xd(`load`,e);break;case`video`:case`audio`:for(r=0;r<vd.length;r++)xd(vd[r],e);break;case`image`:xd(`error`,e),xd(`load`,e);break;case`details`:xd(`toggle`,e);break;case`embed`:case`source`:case`link`:xd(`error`,e),xd(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Fd(e,t,u,r,n,null)}return;default:if(Ht(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Id(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Fd(e,t,c,r,n,null))}function Rd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Fd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Fd(e,t,p,m,r,f)}}Mt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Fd(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Fd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Ft(e,!!n,n?[]:``,!1):Ft(e,!!n,t,!0)):Ft(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Fd(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Fd(e,t,s,a,r,o)}It(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Fd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Fd(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Fd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Fd(e,t,u,p,r,m)}return;default:if(Ht(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Id(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Id(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Fd(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Fd(e,t,f,p,r,m)}function zd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Bd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&zd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&zd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Vd=null,Hd=null;function Ud(e){return e.nodeType===9?e:e.ownerDocument}function Wd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Gd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Kd(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var qd=null;function Jd(){var e=window.event;return e&&e.type===`popstate`?e!==qd&&(qd=e,!0):(qd=null,!1)}var Yd=typeof setTimeout==`function`?setTimeout:void 0,Xd=typeof clearTimeout==`function`?clearTimeout:void 0,Zd=typeof Promise==`function`?Promise:void 0,Qd=typeof queueMicrotask==`function`?queueMicrotask:Zd===void 0?Yd:function(e){return Zd.resolve(null).then(e).catch($d)};function $d(e){setTimeout(function(){throw e})}function ef(e){return e===`head`}function tf(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Ip(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)gf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,gf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[ot]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&gf(e.ownerDocument.body)}n=i}while(n);Ip(t)}function nf(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function rf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:rf(n),st(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function af(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[ot])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=df(e.nextSibling),e===null)break}return null}function of(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=df(e.nextSibling),e===null))return null;return e}function sf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=df(e.nextSibling),e===null))return null;return e}function cf(e){return e.data===`$?`||e.data===`$~`}function lf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function uf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function df(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var ff=null;function pf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return df(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function mf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function hf(e,t,n){switch(t=Ud(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function gf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);st(e)}var _f=new Map,vf=new Set;function yf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var bf=F.d;F.d={f:xf,r:Sf,D:Tf,C:Ef,L:Df,m:Of,X:Af,S:kf,M:jf};function xf(){var e=bf.f(),t=xu();return e||t}function Sf(e){var t=lt(e);t!==null&&t.tag===5&&t.type===`form`?xs(t):bf.r(e)}var Cf=typeof document>`u`?null:document;function wf(e,t,n){var r=Cf;if(r&&typeof t==`string`&&t){var i=jt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),vf.has(i)||(vf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Ld(t,`link`,e),ft(t),r.head.appendChild(t)))}}function Tf(e){bf.D(e),wf(`dns-prefetch`,e,null)}function Ef(e,t){bf.C(e,t),wf(`preconnect`,e,t)}function Df(e,t,n){bf.L(e,t,n);var r=Cf;if(r&&e&&t){var i=`link[rel="preload"][as="`+jt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+jt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+jt(n.imageSizes)+`"]`)):i+=`[href="`+jt(e)+`"]`;var a=i;switch(t){case`style`:a=Nf(e);break;case`script`:a=Lf(e)}_f.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),_f.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Pf(a))||t===`script`&&r.querySelector(Rf(a))||(t=r.createElement(`link`),Ld(t,`link`,e),ft(t),r.head.appendChild(t)))}}function Of(e,t){bf.m(e,t);var n=Cf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+jt(r)+`"][href="`+jt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Lf(e)}if(!_f.has(a)&&(e=f({rel:`modulepreload`,href:e},t),_f.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Rf(a)))return}r=n.createElement(`link`),Ld(r,`link`,e),ft(r),n.head.appendChild(r)}}}function kf(e,t,n){bf.S(e,t,n);var r=Cf;if(r&&e){var i=dt(r).hoistableStyles,a=Nf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Pf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=_f.get(a))&&Vf(e,n);var c=o=r.createElement(`link`);ft(c),Ld(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Bf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Af(e,t){bf.X(e,t);var n=Cf;if(n&&e){var r=dt(n).hoistableScripts,i=Lf(e),a=r.get(i);a||(a=n.querySelector(Rf(i)),a||(e=f({src:e,async:!0},t),(t=_f.get(i))&&Hf(e,t),a=n.createElement(`script`),ft(a),Ld(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function jf(e,t){bf.M(e,t);var n=Cf;if(n&&e){var r=dt(n).hoistableScripts,i=Lf(e),a=r.get(i);a||(a=n.querySelector(Rf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=_f.get(i))&&Hf(e,t),a=n.createElement(`script`),ft(a),Ld(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Mf(e,t,n,r){var a=(a=U.current)?yf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Nf(n.href),n=dt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Nf(n.href);var o=dt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Pf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),_f.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},_f.set(e,n),o||If(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Lf(n),n=dt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Nf(e){return`href="`+jt(e)+`"`}function Pf(e){return`link[rel="stylesheet"][`+e+`]`}function Ff(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function If(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Ld(t,`link`,n),ft(t),e.head.appendChild(t))}function Lf(e){return`[src="`+jt(e)+`"]`}function Rf(e){return`script[async]`+e}function zf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+jt(n.href)+`"]`);if(r)return t.instance=r,ft(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),ft(r),Ld(r,`style`,a),Bf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Nf(n.href);var o=e.querySelector(Pf(a));if(o)return t.state.loading|=4,t.instance=o,ft(o),o;r=Ff(n),(a=_f.get(a))&&Vf(r,a),o=(e.ownerDocument||e).createElement(`link`),ft(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Ld(o,`link`,r),t.state.loading|=4,Bf(o,n.precedence,e),t.instance=o;case`script`:return o=Lf(n.src),(a=e.querySelector(Rf(o)))?(t.instance=a,ft(a),a):(r=n,(a=_f.get(o))&&(r=f({},n),Hf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),ft(a),Ld(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Bf(r,n.precedence,e));return t.instance}function Bf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Vf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Hf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Uf=null;function Wf(e,t,n){if(Uf===null){var r=new Map,i=Uf=new Map;i.set(n,r)}else i=Uf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[ot]||a[$e]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Gf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Kf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function qf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Jf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Nf(r.href),a=t.querySelector(Pf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Zf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,ft(a);return}a=t.ownerDocument||t,r=Ff(r),(i=_f.get(i))&&Vf(r,i),a=a.createElement(`link`),ft(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Ld(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Zf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Yf=0;function Xf(e,t){return e.stylesheets&&e.count===0&&$f(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&$f(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Yf===0&&(Yf=62500*Bd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&$f(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Yf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Zf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)$f(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Qf=null;function $f(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Qf=new Map,t.forEach(ep,e),Qf=null,Zf.call(e))}function ep(e,t){if(!(t.state.loading&4)){var n=Qf.get(e);if(n)var r=n.get(null);else{n=new Map,Qf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Zf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var tp={$$typeof:b,Provider:null,Consumer:null,_currentValue:I,_currentValue2:I,_threadCount:0};function np(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=He(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=He(0),this.hiddenUpdates=He(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function rp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new np(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ti(3,null,null,t),e.current=a,a.stateNode=e,t=ta(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Na(a),e}function ip(e){return e?(e=$r,e):$r}function ap(e,t,n,r,i,a){i=ip(i),r.context===null?r.context=i:r.pendingContext=i,r=Fa(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ia(e,r,t),n!==null&&(gu(n,e,t),La(n,e,t))}function op(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function sp(e,t){op(e,t),(e=e.alternate)&&op(e,t)}function cp(e){if(e.tag===13||e.tag===31){var t=Xr(e,67108864);t!==null&&gu(t,e,67108864),sp(e,67108864)}}function lp(e){if(e.tag===13||e.tag===31){var t=mu();t=Je(t);var n=Xr(e,t);n!==null&&gu(n,e,t),sp(e,t)}}var up=!0;function dp(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=2,pp(e,t,n,r)}finally{F.p=a,P.T=i}}function fp(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=8,pp(e,t,n,r)}finally{F.p=a,P.T=i}}function pp(e,t,n,r){if(up){var i=mp(r);if(i===null)Ed(e,t,r,hp,n),Ep(e,r);else if(Op(i,e,t,n,r))r.stopPropagation();else if(Ep(e,r),t&4&&-1<Tp.indexOf(e)){for(;i!==null;){var a=lt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Le(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ae(o);s.entanglements[1]|=c,o&=~c}id(a),!(Fl&6)&&(nu=ye()+500,ad(0,!1))}}break;case 31:case 13:s=Xr(a,2),s!==null&&gu(s,a,2),xu(),sp(a,2)}if(a=mp(r),a===null&&Ed(e,t,r,hp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Ed(e,t,r,null,n)}}function mp(e){return e=Jt(e),gp(e)}var hp=null;function gp(e){if(hp=null,e=ct(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return hp=e,null}function _p(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(be()){case xe:return 2;case Se:return 8;case Ce:case we:return 32;case Te:return 268435456;default:return 32}default:return 32}}var vp=!1,yp=null,bp=null,xp=null,Sp=new Map,Cp=new Map,wp=[],Tp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Ep(e,t){switch(e){case`focusin`:case`focusout`:yp=null;break;case`dragenter`:case`dragleave`:bp=null;break;case`mouseover`:case`mouseout`:xp=null;break;case`pointerover`:case`pointerout`:Sp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Cp.delete(t.pointerId)}}function Dp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=lt(t),t!==null&&cp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Op(e,t,n,r,i){switch(t){case`focusin`:return yp=Dp(yp,e,t,n,r,i),!0;case`dragenter`:return bp=Dp(bp,e,t,n,r,i),!0;case`mouseover`:return xp=Dp(xp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Sp.set(a,Dp(Sp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Cp.set(a,Dp(Cp.get(a)||null,e,t,n,r,i)),!0}return!1}function kp(e){var t=ct(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,Ze(e.priority,function(){lp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,Ze(e.priority,function(){lp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ap(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=mp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);qt=r,n.target.dispatchEvent(r),qt=null}else return t=lt(n),t!==null&&cp(t),e.blockedOn=n,!1;t.shift()}return!0}function jp(e,t,n){Ap(e)&&n.delete(t)}function Mp(){vp=!1,yp!==null&&Ap(yp)&&(yp=null),bp!==null&&Ap(bp)&&(bp=null),xp!==null&&Ap(xp)&&(xp=null),Sp.forEach(jp),Cp.forEach(jp)}function Np(e,n){e.blockedOn===n&&(e.blockedOn=null,vp||(vp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Mp)))}var Pp=null;function Fp(e){Pp!==e&&(Pp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Pp===e&&(Pp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(gp(r||n)===null)continue;break}var a=lt(n);a!==null&&(e.splice(t,3),t-=3,ys(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Ip(e){function t(t){return Np(t,e)}yp!==null&&Np(yp,e),bp!==null&&Np(bp,e),xp!==null&&Np(xp,e),Sp.forEach(t),Cp.forEach(t);for(var n=0;n<wp.length;n++){var r=wp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<wp.length&&(n=wp[0],n.blockedOn===null);)kp(n),n.blockedOn===null&&wp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[et]||null;if(typeof a==`function`)o||Fp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[et]||null)s=o.formAction;else if(gp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Fp(n)}}}function Lp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Rp(e){this._internalRoot=e}zp.prototype.render=Rp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;ap(n,mu(),e,t,null,null)},zp.prototype.unmount=Rp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ap(e.current,2,null,e,null,null),xu(),t[tt]=null}};function zp(e){this._internalRoot=e}zp.prototype.unstable_scheduleHydration=function(e){if(e){var t=Xe();e={blockedOn:null,target:e,priority:t};for(var n=0;n<wp.length&&t!==0&&t<wp[n].priority;n++);wp.splice(n,0,e),n===0&&kp(e)}};var Bp=n.version;if(Bp!==`19.2.8`)throw Error(i(527,Bp,`19.2.8`));F.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var Vp={bundleType:0,version:`19.2.8`,rendererPackageName:`react-dom`,currentDispatcherRef:P,reconcilerVersion:`19.2.8`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Hp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hp.isDisabled&&Hp.supportsFiber)try{Oe=Hp.inject(Vp),G=Hp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Vs,s=Hs,c=Us;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=rp(e,1,!1,null,null,n,r,null,o,s,c,Lp),e[tt]=t.current,wd(e),new Rp(t)}})),pe=n(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=fe()}));function me(e){if(e.kind===`ssh`)return e.sshConnectionName?.trim()||e.sshHost}function he(e){return e.alias?.trim()||e.name}function ge(e){let t=he(e),n=me(e);return n?`${t} (${n})`:t}var W=e(O(),1),_e=pe(),ve=/^\/compact(?:\s+([\s\S]+))?$/i;function ye(e){let t=ve.exec(e.trim());if(!t)return null;let n=t[1]?.trim();return n?{instructions:n}:{}}var be=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),xe=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),Se=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),Ce=e=>{let t=Se(e);return t.charAt(0).toUpperCase()+t.slice(1)},we={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},Te=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Ee=(0,W.createContext)({}),De=()=>(0,W.useContext)(Ee),Oe=(0,W.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=De()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,W.createElement)(`svg`,{ref:c,...we,width:t??l??we.width,height:t??l??we.height,stroke:e??f,strokeWidth:m,className:be(`lucide`,p,i),...!a&&!Te(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,W.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),G=(e,t)=>{let n=(0,W.forwardRef)(({className:n,...r},i)=>(0,W.createElement)(Oe,{ref:i,iconNode:t,className:be(`lucide-${xe(Ce(e))}`,`lucide-${e}`,n),...r}));return n.displayName=Ce(e),n},ke=G(`archive`,[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`M10 12h4`,key:`a56b0p`}]]),Ae=G(`arrow-down-to-line`,[[`path`,{d:`M12 17V3`,key:`1cwfxf`}],[`path`,{d:`m6 11 6 6 6-6`,key:`12ii2o`}],[`path`,{d:`M19 21H5`,key:`150jfl`}]]),je=G(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),Me=G(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),Ne=G(`ban`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M4.929 4.929 19.07 19.071`,key:`196cmz`}]]),Pe=G(`bell`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}]]),Fe=G(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),Ie=G(`brain`,[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`,key:`1e3is1`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`,key:`1gqd8o`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`,key:`iwvgf7`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`,key:`efp6ie`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`,key:`1gq6am`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`,key:`k1g0md`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`,key:`q97ue3`}]]),Le=G(`bug`,[[`path`,{d:`M12 20v-9`,key:`1qisl0`}],[`path`,{d:`M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z`,key:`uouzyp`}],[`path`,{d:`M14.12 3.88 16 2`,key:`qol33r`}],[`path`,{d:`M21 21a4 4 0 0 0-3.81-4`,key:`1b0z45`}],[`path`,{d:`M21 5a4 4 0 0 1-3.55 3.97`,key:`5cxbf6`}],[`path`,{d:`M22 13h-4`,key:`1jl80f`}],[`path`,{d:`M3 21a4 4 0 0 1 3.81-4`,key:`1fjd4g`}],[`path`,{d:`M3 5a4 4 0 0 0 3.55 3.97`,key:`1d7oge`}],[`path`,{d:`M6 13H2`,key:`82j7cp`}],[`path`,{d:`m8 2 1.88 1.88`,key:`fmnt4t`}],[`path`,{d:`M9 7.13V6a3 3 0 1 1 6 0v1.13`,key:`1vgav8`}]]),Re=G(`camera`,[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`,key:`18u6gg`}],[`circle`,{cx:`12`,cy:`13`,r:`3`,key:`1vg3eu`}]]),ze=G(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),Be=G(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),Ve=G(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),He=G(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),Ue=G(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),We=G(`chevrons-up-down`,[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]),Ge=G(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),Ke=G(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),qe=G(`circle-dot`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}]]),Je=G(`circle-play`,[[`path`,{d:`M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z`,key:`kmsa83`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),Ye=G(`circle-stop`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`rect`,{x:`9`,y:`9`,width:`6`,height:`6`,rx:`1`,key:`1ssd4o`}]]),Xe=G(`circle`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),Ze=G(`clipboard-check`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}],[`path`,{d:`m9 14 2 2 4-4`,key:`df797q`}]]),Qe=G(`clipboard-list`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}],[`path`,{d:`M12 11h4`,key:`1jrz19`}],[`path`,{d:`M12 16h4`,key:`n85exb`}],[`path`,{d:`M8 11h.01`,key:`1dfujw`}],[`path`,{d:`M8 16h.01`,key:`18s6g9`}]]),$e=G(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),et=G(`coins`,[[`path`,{d:`M13.744 17.736a6 6 0 1 1-7.48-7.48`,key:`bq4yh3`}],[`path`,{d:`M15 6h1v4`,key:`11y1tn`}],[`path`,{d:`m6.134 14.768.866-.5 2 3.464`,key:`17snzx`}],[`circle`,{cx:`16`,cy:`8`,r:`6`,key:`14bfc9`}]]),tt=G(`compass`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z`,key:`9ktpf1`}]]),nt=G(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),rt=G(`corner-down-right`,[[`path`,{d:`m15 10 5 5-5 5`,key:`qqa56n`}],[`path`,{d:`M4 4v7a4 4 0 0 0 4 4h12`,key:`z08zvw`}]]),it=G(`database`,[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]),at=G(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),ot=G(`file-pen`,[[`path`,{d:`M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34`,key:`o6klzx`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z`,key:`zhnas1`}]]),st=G(`file-plus`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M9 15h6`,key:`cctwl0`}],[`path`,{d:`M12 18v-6`,key:`17g6i2`}]]),ct=G(`file-text`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),lt=G(`flask-conical`,[[`path`,{d:`M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2`,key:`18mbvz`}],[`path`,{d:`M6.453 15h11.094`,key:`3shlmq`}],[`path`,{d:`M8.5 2h7`,key:`csnxdl`}]]),ut=G(`folder-git-2`,[[`path`,{d:`M18 19a5 5 0 0 1-5-5v8`,key:`sz5oeg`}],[`path`,{d:`M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5`,key:`1w6njk`}],[`circle`,{cx:`13`,cy:`12`,r:`2`,key:`1j92g6`}],[`circle`,{cx:`20`,cy:`19`,r:`2`,key:`1obnsp`}]]),dt=G(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),ft=G(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),pt=G(`gauge`,[[`path`,{d:`m12 14 4-4`,key:`9kzdfg`}],[`path`,{d:`M3.34 19a10 10 0 1 1 17.32 0`,key:`19p75a`}]]),mt=G(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]),ht=G(`git-compare`,[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M13 6h3a2 2 0 0 1 2 2v7`,key:`1yeb86`}],[`path`,{d:`M11 18H8a2 2 0 0 1-2-2V9`,key:`19pyzm`}]]),gt=G(`image-off`,[[`line`,{x1:`2`,x2:`22`,y1:`2`,y2:`22`,key:`a6p6uj`}],[`path`,{d:`M10.41 10.41a2 2 0 1 1-2.83-2.83`,key:`1bzlo9`}],[`line`,{x1:`13.5`,x2:`6`,y1:`13.5`,y2:`21`,key:`1q0aeu`}],[`line`,{x1:`18`,x2:`21`,y1:`12`,y2:`15`,key:`5mozeu`}],[`path`,{d:`M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59`,key:`mmje98`}],[`path`,{d:`M21 15V5a2 2 0 0 0-2-2H9`,key:`43el77`}]]),_t=G(`image-plus`,[[`path`,{d:`M16 5h6`,key:`1vod17`}],[`path`,{d:`M19 2v6`,key:`4bpg5p`}],[`path`,{d:`M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5`,key:`1ue2ih`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}]]),vt=G(`images`,[[`path`,{d:`m22 11-1.296-1.296a2.4 2.4 0 0 0-3.408 0L11 16`,key:`9kzy35`}],[`path`,{d:`M4 8a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2`,key:`1t0f0t`}],[`circle`,{cx:`13`,cy:`7`,r:`1`,fill:`currentColor`,key:`1obus6`}],[`rect`,{x:`8`,y:`2`,width:`14`,height:`14`,rx:`2`,key:`1gvhby`}]]),yt=G(`keyboard`,[[`path`,{d:`M10 8h.01`,key:`1r9ogq`}],[`path`,{d:`M12 12h.01`,key:`1mp3jc`}],[`path`,{d:`M14 8h.01`,key:`1primd`}],[`path`,{d:`M16 12h.01`,key:`1l6xoz`}],[`path`,{d:`M18 8h.01`,key:`emo2bl`}],[`path`,{d:`M6 8h.01`,key:`x9i8wu`}],[`path`,{d:`M7 16h10`,key:`wp8him`}],[`path`,{d:`M8 12h.01`,key:`czm47f`}],[`rect`,{width:`20`,height:`16`,x:`2`,y:`4`,rx:`2`,key:`18n3k1`}]]),bt=G(`laptop`,[[`path`,{d:`M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z`,key:`1pdavp`}],[`path`,{d:`M20.054 15.987H3.946`,key:`14rxg9`}]]),xt=G(`list-todo`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`rect`,{x:`3`,y:`4`,width:`6`,height:`6`,rx:`1`,key:`cif1o7`}]]),St=G(`list`,[[`path`,{d:`M3 5h.01`,key:`18ugdj`}],[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M3 19h.01`,key:`noohij`}],[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M8 12h13`,key:`1za7za`}],[`path`,{d:`M8 19h13`,key:`m83p4d`}]]),Ct=G(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),wt=G(`maximize-2`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]),Tt=G(`message-circle-question-mark`,[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),Et=G(`message-circle`,[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}]]),Dt=G(`message-square-plus`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M12 8v6`,key:`1ib9pf`}],[`path`,{d:`M9 11h6`,key:`1fldmi`}]]),Ot=G(`messages-square`,[[`path`,{d:`M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z`,key:`1n2ejm`}],[`path`,{d:`M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1`,key:`1qfcsi`}]]),kt=G(`mic`,[[`path`,{d:`M12 19v3`,key:`npa21l`}],[`path`,{d:`M19 10v2a7 7 0 0 1-14 0v-2`,key:`1vc78b`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`13`,rx:`3`,key:`s6n7sd`}]]),At=G(`minimize-2`,[[`path`,{d:`m14 10 7-7`,key:`oa77jy`}],[`path`,{d:`M20 10h-6V4`,key:`mjg0md`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M4 14h6v6`,key:`rmj7iw`}]]),jt=G(`minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),Mt=G(`monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),Nt=G(`package-minus`,[[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`path`,{d:`M16 17h6`,key:`1ook5g`}],[`path`,{d:`M21 13V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.729l7 4a2 2 0 0 0 2 .001l1.675-.955`,key:`zu9avd`}],[`path`,{d:`M3.29 7 12 12l8.71-5`,key:`19ckod`}],[`path`,{d:`m7.5 4.27 8.997 5.148`,key:`9yrvtv`}]]),Pt=G(`palette`,[[`path`,{d:`M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z`,key:`e79jfc`}],[`circle`,{cx:`13.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`1okk4w`}],[`circle`,{cx:`17.5`,cy:`10.5`,r:`.5`,fill:`currentColor`,key:`f64h9f`}],[`circle`,{cx:`6.5`,cy:`12.5`,r:`.5`,fill:`currentColor`,key:`qy21gx`}],[`circle`,{cx:`8.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`fotxhn`}]]),Ft=G(`panel-left-close`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m16 15-3-3 3-3`,key:`14y99z`}]]),It=G(`panel-left-open`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m14 9 3 3-3 3`,key:`8010ee`}]]),Lt=G(`panel-left`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]]),Rt=G(`pause`,[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]),zt=G(`pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),Bt=G(`pin`,[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z`,key:`1nkz8b`}]]),Vt=G(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),Ht=G(`plug`,[[`path`,{d:`M12 22v-5`,key:`1ega77`}],[`path`,{d:`M15 8V2`,key:`18g5xt`}],[`path`,{d:`M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z`,key:`1xoxul`}],[`path`,{d:`M9 8V2`,key:`14iosj`}]]),Ut=G(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),Wt=G(`puzzle`,[[`path`,{d:`M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z`,key:`w46dr5`}]]),Gt=G(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),Kt=G(`rotate-ccw-clock`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),qt=G(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),Jt=G(`rotate-cw`,[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]),Yt=G(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),Xt=G(`send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]),Zt=G(`shield-alert`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M12 16h.01`,key:`1drbdi`}]]),Qt=G(`shield-x`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m14.5 9.5-5 5`,key:`17q4r4`}],[`path`,{d:`m9.5 9.5 5 5`,key:`18nt4w`}]]),$t=G(`shield`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]),en=G(`skip-forward`,[[`path`,{d:`M21 4v16`,key:`7j8fe9`}],[`path`,{d:`M6.029 4.285A2 2 0 0 0 3 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z`,key:`zs4d6`}]]),tn=G(`slash`,[[`path`,{d:`M22 2 2 22`,key:`y4kqgn`}]]),nn=G(`smartphone`,[[`rect`,{width:`14`,height:`20`,x:`5`,y:`2`,rx:`2`,ry:`2`,key:`1yt0o3`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}]]),rn=G(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),an=G(`square-dashed`,[[`path`,{d:`M5 3a2 2 0 0 0-2 2`,key:`y57alp`}],[`path`,{d:`M19 3a2 2 0 0 1 2 2`,key:`18rm91`}],[`path`,{d:`M21 19a2 2 0 0 1-2 2`,key:`1j7049`}],[`path`,{d:`M5 21a2 2 0 0 1-2-2`,key:`sbafld`}],[`path`,{d:`M9 3h1`,key:`1yesri`}],[`path`,{d:`M9 21h1`,key:`15o7lz`}],[`path`,{d:`M14 3h1`,key:`1ec4yj`}],[`path`,{d:`M14 21h1`,key:`v9vybs`}],[`path`,{d:`M3 9v1`,key:`1r0deq`}],[`path`,{d:`M21 9v1`,key:`mxsmne`}],[`path`,{d:`M3 14v1`,key:`vnatye`}],[`path`,{d:`M21 14v1`,key:`169vum`}]]),on=G(`square-pen`,[[`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`,key:`1m0v6g`}],[`path`,{d:`M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z`,key:`ohrbg2`}]]),sn=G(`square-slash`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`line`,{x1:`9`,x2:`15`,y1:`15`,y2:`9`,key:`1dfufj`}]]),cn=G(`square-terminal`,[[`path`,{d:`m7 11 2-2-2-2`,key:`1lz0vl`}],[`path`,{d:`M11 13h4`,key:`1p7l4v`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}]]),ln=G(`square-x`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),un=G(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),dn=G(`target`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`circle`,{cx:`12`,cy:`12`,r:`6`,key:`1vlfrh`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}]]),fn=G(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),pn=G(`undo-2`,[[`path`,{d:`M9 14 4 9l5-5`,key:`102s5s`}],[`path`,{d:`M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11`,key:`f3b9sd`}]]),mn=G(`unplug`,[[`path`,{d:`m19 5 3-3`,key:`yk6iyv`}],[`path`,{d:`m2 22 3-3`,key:`19mgm9`}],[`path`,{d:`M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z`,key:`goz73y`}],[`path`,{d:`M7.5 13.5 10 11`,key:`7xgeeb`}],[`path`,{d:`M10.5 16.5 13 14`,key:`10btkg`}],[`path`,{d:`m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z`,key:`1snsnr`}]]),hn=G(`user-round`,[[`circle`,{cx:`12`,cy:`8`,r:`5`,key:`1hypcn`}],[`path`,{d:`M20 21a8 8 0 0 0-16 0`,key:`rfgkzh`}]]),gn=G(`users`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),_n=G(`workflow`,[[`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`,key:`by2w9f`}],[`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`,key:`xkn7yn`}],[`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`,key:`1cgmvn`}]]),vn=G(`wrench`,[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`,key:`1ngwbx`}]]),yn=G(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),bn=G(`zap`,[[`path`,{d:`M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z`,key:`1v7up4`}]]);function xn(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}var Sn={};function Cn(e,t,n,r,i){if(!n&&!r&&!i&&!e)return Tn(t);let a=Tn(e);return t&&(a=En(a,t)),n&&(a=En(a,n)),r&&(a=En(a,r)),i&&(a=En(a,i)),a}function wn(e){if(e.length===0)return Sn;if(e.length===1)return Tn(e[0]);let t=Tn(e[0]);for(let n=1;n<e.length;n+=1)t=En(t,e[n]);return t}function Tn(e){return An(e)?{...jn(e,Sn)}:Dn(e)}function En(e,t){return An(t)?jn(t,e):On(e,t)}function Dn(e){let t={...e};for(let e in t){let n=t[e];kn(e,n)&&(t[e]=Nn(n))}return t}function On(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=xn(e.style,r);break;case`className`:e[n]=Fn(e.className,r);break;default:e[n]=kn(n,r)?Mn(e[n],r):r}}return e}function kn(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t==`function`||t===void 0)}function An(e){return typeof e==`function`}function jn(e,t){return An(e)?e(t):e??Sn}function Mn(e,t){return t?e?(...n)=>{let r=n[0];if(In(r)){let i=r;Pn(i);let a=t(...n);return i.baseUIHandlerPrevented||e?.(...n),a}let i=t(...n);return e?.(...n),i}:Nn(t):e}function Nn(e){return e&&((...t)=>{let n=t[0];return In(n)&&Pn(n),e(...t)})}function Pn(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Fn(e,t){return t?e?t+` `+e:t:e}function In(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function Ln(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set(`code`,n.toString()),r.forEach(e=>i.searchParams.append(`args[]`,e)),`${t} error #${n}; visit ${i} for the full message.`}}var Rn=Ln(`https://base-ui.com/production-error`,`Base UI`),zn={};function Bn(e,t){let n=W.useRef(zn);return n.current===zn&&(n.current=e(t)),n}function Vn(e,t,n,r){let i=Bn(Un).current;return Wn(i,e,t,n,r)&&Kn(i,[e,t,n,r]),i.callback}function Hn(e){let t=Bn(Un).current;return Gn(t,e)&&Kn(t,e),t.callback}function Un(){return{callback:null,cleanup:null,refs:[]}}function Wn(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function Gn(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function Kn(e,t){if(e.refs=t,t.every(e=>e==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let i=t[e];if(i!=null)switch(typeof i){case`function`:{let t=i(n);typeof t==`function`&&(r[e]=t);break}case`object`:i.current=n}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(n!=null)switch(typeof n){case`function`:{let t=r[e];typeof t==`function`?t():n(null);break}case`object`:n.current=null}}}}}}var qn=19;function Jn(e){return qn>=e}function Yn(e){if(!W.isValidElement(e))return null;let t=e,n=t.props;return(Jn(19)?n?.ref:t.ref)??null}function Xn(){}var Zn=Object.freeze([]),Qn=Object.freeze({});function $n(e,t){let n={};for(let r in e){let i=e[r];if(t?.hasOwnProperty(r)){let e=t[r](i);e!=null&&Object.assign(n,e);continue}i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function er(e,t){return typeof e==`function`?e(t):e}function tr(e,t){return typeof e==`function`?e(t):e}function nr(e,t,n={}){let r=t.render,i=rr(t,n);return n.enabled===!1?null:or(e,r,i,n.state??Qn)}function rr(e,t={}){let{className:n,style:r,render:i}=e,{state:a=Qn,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?er(n,a):void 0,d=l?tr(r,a):void 0,f=l?$n(a,c):Qn,p=l&&s?ir(s):void 0,m=l?xn(f,p)??{}:Qn;return typeof document<`u`&&(l?m.ref=Array.isArray(o)?Hn([m.ref,Yn(i),...o]):Vn(m.ref,Yn(i),o):Vn(null,null)),l?(u!==void 0&&(m.className=Fn(m.className,u)),d!==void 0&&(m.style=xn(m.style,d)),m):Qn}function ir(e){return Array.isArray(e)?wn(e):Cn(void 0,e)}var ar=Symbol.for(`react.lazy`);function or(e,t,n,r){if(t){if(typeof t==`function`)return t(n,r);let e=Cn(n,t.props);e.ref=n.ref;let i=t;return i?.$$typeof===ar&&(i=W.Children.toArray(t)[0]),W.cloneElement(i,e)}if(e&&typeof e==`string`)return sr(e,n);throw Error(Rn(8))}function sr(e,t){return e===`button`?(0,W.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,W.createElement)(`img`,{alt:``,...t,key:t.key}):W.createElement(e,t)}function cr(e){return nr(e.defaultTagName??`div`,e,e)}function lr(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=lr(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function ur(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=lr(e))&&(r&&(r+=` `),r+=t);return r}var dr=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,fr=ur,pr=(e,t)=>n=>{if(t?.variants==null)return fr(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=dr(t)||dr(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return fr(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},mr=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},hr=(e,t)=>({classGroupId:e,validator:t}),gr=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),_r=`-`,vr=[],yr=`arbitrary..`,br=e=>{let t=Cr(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return Sr(e);let n=e.split(_r);return xr(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?mr(i,t):t:i||vr}return n[e]||vr}}},xr=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=xr(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(_r):e.slice(t).join(_r),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},Sr=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?yr+r:void 0})(),Cr=e=>{let{theme:t,classGroups:n}=e;return wr(n,t)},wr=(e,t)=>{let n=gr();for(let r in e){let i=e[r];Tr(i,n,r,t)}return n},Tr=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];Er(i,t,n,r)}},Er=(e,t,n,r)=>{if(typeof e==`string`){Dr(e,t,n);return}if(typeof e==`function`){Or(e,t,n,r);return}kr(e,t,n,r)},Dr=(e,t,n)=>{let r=e===``?t:Ar(t,e);r.classGroupId=n},Or=(e,t,n,r)=>{if(jr(e)){Tr(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(hr(n,e))},kr=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];Tr(o,Ar(t,a),n,r)}},Ar=(e,t)=>{let n=e,r=t.split(_r),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=gr(),n.nextPart.set(t,i)),n=i}return n},jr=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,Mr=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},Nr=`!`,Pr=`:`,Fr=[],Ir=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Lr=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===Pr){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(Nr)?(c=s.slice(0,-1),l=!0):s.startsWith(Nr)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return Ir(t,l,c,u)};if(t){let e=t+Pr,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):Ir(Fr,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Rr=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},zr=e=>({cache:Mr(e.cacheSize),parseClassName:Lr(e),sortModifiers:Rr(e),postfixLookupClassGroupIds:Br(e),...br(e)}),Br=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},Vr=/\s+/,Hr=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(Vr),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+Nr:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},Ur=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Wr(n))&&(i&&(i+=` `),i+=r);return i},Wr=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Wr(e[r]))&&(n&&(n+=` `),n+=t);return n},Gr=(e,...t)=>{let n,r,i,a,o=o=>(n=zr(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=Hr(e,n);return i(e,a),a};return a=o,(...e)=>a(Ur(...e))},Kr=[],qr=e=>{let t=t=>t[e]||Kr;return t.isThemeGetter=!0,t},Jr=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Yr=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Xr=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Zr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Qr=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,$r=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ei=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ti=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ni=e=>Xr.test(e),ri=e=>!!e&&!Number.isNaN(Number(e)),ii=e=>!!e&&Number.isInteger(Number(e)),ai=e=>e.endsWith(`%`)&&ri(e.slice(0,-1)),oi=e=>Zr.test(e),si=()=>!0,ci=e=>Qr.test(e)&&!$r.test(e),li=()=>!1,ui=e=>ei.test(e),di=e=>ti.test(e),fi=e=>!hi(e)&&!Ci(e),pi=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),mi=e=>ji(e,Fi,li),hi=e=>Jr.test(e),gi=e=>ji(e,Ii,ci),_i=e=>ji(e,Li,ri),vi=e=>ji(e,zi,si),yi=e=>ji(e,Ri,li),bi=e=>ji(e,Ni,li),xi=e=>ji(e,Pi,di),Si=e=>ji(e,Bi,ui),Ci=e=>Yr.test(e),wi=e=>Mi(e,Ii),Ti=e=>Mi(e,Ri),Ei=e=>Mi(e,Ni),Di=e=>Mi(e,Fi),Oi=e=>Mi(e,Pi),ki=e=>Mi(e,Bi,!0),Ai=e=>Mi(e,zi,!0),ji=(e,t,n)=>{let r=Jr.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Mi=(e,t,n=!1)=>{let r=Yr.exec(e);return r?r[1]?t(r[1]):n:!1},Ni=e=>e===`position`||e===`percentage`,Pi=e=>e===`image`||e===`url`,Fi=e=>e===`length`||e===`size`||e===`bg-size`,Ii=e=>e===`length`,Li=e=>e===`number`,Ri=e=>e===`family-name`,zi=e=>e===`number`||e===`weight`,Bi=e=>e===`shadow`,Vi=Gr(()=>{let e=qr(`color`),t=qr(`font`),n=qr(`text`),r=qr(`font-weight`),i=qr(`tracking`),a=qr(`leading`),o=qr(`breakpoint`),s=qr(`container`),c=qr(`spacing`),l=qr(`radius`),u=qr(`shadow`),d=qr(`inset-shadow`),f=qr(`text-shadow`),p=qr(`drop-shadow`),m=qr(`blur`),h=qr(`perspective`),g=qr(`aspect`),_=qr(`ease`),v=qr(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),Ci,hi],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[Ci,hi,c],T=()=>[ni,`full`,`auto`,...w()],E=()=>[ii,`none`,`subgrid`,Ci,hi],D=()=>[`auto`,{span:[`full`,ii,Ci,hi]},ii,Ci,hi],O=()=>[ii,`auto`,Ci,hi],k=()=>[`auto`,`min`,`max`,`fr`,Ci,hi],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[ni,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[ni,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],F=()=>[ni,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],I=()=>[e,Ci,hi],L=()=>[...b(),Ei,bi,{position:[Ci,hi]}],R=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],z=()=>[`auto`,`cover`,`contain`,Di,mi,{size:[Ci,hi]}],B=()=>[ai,wi,gi],V=()=>[``,`none`,`full`,l,Ci,hi],H=()=>[``,ri,wi,gi],ee=()=>[`solid`,`dashed`,`dotted`,`double`],U=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],te=()=>[ri,ai,Ei,bi],ne=()=>[``,`none`,m,Ci,hi],re=()=>[`none`,ri,Ci,hi],ie=()=>[`none`,ri,Ci,hi],ae=()=>[ri,Ci,hi],oe=()=>[ni,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[oi],breakpoint:[oi],color:[si],container:[oi],"drop-shadow":[oi],ease:[`in`,`out`,`in-out`],font:[fi],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[oi],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[oi],shadow:[oi],spacing:[`px`,ri],text:[oi],"text-shadow":[oi],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,ni,hi,Ci,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,Ci,hi]}],"container-named":[pi],columns:[{columns:[ri,hi,Ci,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[ii,`auto`,Ci,hi]}],basis:[{basis:[ni,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[ri,ni,`auto`,`initial`,`none`,hi]}],grow:[{grow:[``,ri,Ci,hi]}],shrink:[{shrink:[``,ri,Ci,hi]}],order:[{order:[ii,`first`,`last`,`none`,Ci,hi]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...P()]}],"min-inline-size":[{"min-inline":[`auto`,...P()]}],"max-inline-size":[{"max-inline":[`none`,...P()]}],"block-size":[{block:[`auto`,...F()]}],"min-block-size":[{"min-block":[`auto`,...F()]}],"max-block-size":[{"max-block":[`none`,...F()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,...N()]}],"font-size":[{text:[`base`,n,wi,gi]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Ai,vi]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,ai,hi]}],"font-family":[{font:[Ti,yi,t]}],"font-features":[{"font-features":[hi]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,Ci,hi]}],"line-clamp":[{"line-clamp":[ri,`none`,Ci,_i]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,Ci,hi]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,Ci,hi]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...ee(),`wavy`]}],"text-decoration-thickness":[{decoration:[ri,`from-font`,`auto`,Ci,gi]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[ri,`auto`,Ci,hi]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[ii,Ci,hi]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,Ci,hi]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,Ci,hi]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:L()}],"bg-repeat":[{bg:R()}],"bg-size":[{bg:z()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},ii,Ci,hi],radial:[``,Ci,hi],conic:[ii,Ci,hi]},Oi,xi]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:B()}],"gradient-via-pos":[{via:B()}],"gradient-to-pos":[{to:B()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:V()}],"rounded-s":[{"rounded-s":V()}],"rounded-e":[{"rounded-e":V()}],"rounded-t":[{"rounded-t":V()}],"rounded-r":[{"rounded-r":V()}],"rounded-b":[{"rounded-b":V()}],"rounded-l":[{"rounded-l":V()}],"rounded-ss":[{"rounded-ss":V()}],"rounded-se":[{"rounded-se":V()}],"rounded-ee":[{"rounded-ee":V()}],"rounded-es":[{"rounded-es":V()}],"rounded-tl":[{"rounded-tl":V()}],"rounded-tr":[{"rounded-tr":V()}],"rounded-br":[{"rounded-br":V()}],"rounded-bl":[{"rounded-bl":V()}],"border-w":[{border:H()}],"border-w-x":[{"border-x":H()}],"border-w-y":[{"border-y":H()}],"border-w-s":[{"border-s":H()}],"border-w-e":[{"border-e":H()}],"border-w-bs":[{"border-bs":H()}],"border-w-be":[{"border-be":H()}],"border-w-t":[{"border-t":H()}],"border-w-r":[{"border-r":H()}],"border-w-b":[{"border-b":H()}],"border-w-l":[{"border-l":H()}],"divide-x":[{"divide-x":H()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":H()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...ee(),`hidden`,`none`]}],"divide-style":[{divide:[...ee(),`hidden`,`none`]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-bs":[{"border-bs":I()}],"border-color-be":[{"border-be":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...ee(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[ri,Ci,hi]}],"outline-w":[{outline:[``,ri,wi,gi]}],"outline-color":[{outline:I()}],shadow:[{shadow:[``,`none`,u,ki,Si]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":[`none`,d,ki,Si]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:H()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[ri,gi]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":H()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":[`none`,f,ki,Si]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[ri,Ci,hi]}],"mix-blend":[{"mix-blend":[...U(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":U()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[ri]}],"mask-image-linear-from-pos":[{"mask-linear-from":te()}],"mask-image-linear-to-pos":[{"mask-linear-to":te()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":te()}],"mask-image-t-to-pos":[{"mask-t-to":te()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":te()}],"mask-image-r-to-pos":[{"mask-r-to":te()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":te()}],"mask-image-b-to-pos":[{"mask-b-to":te()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":te()}],"mask-image-l-to-pos":[{"mask-l-to":te()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":te()}],"mask-image-x-to-pos":[{"mask-x-to":te()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":te()}],"mask-image-y-to-pos":[{"mask-y-to":te()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[Ci,hi]}],"mask-image-radial-from-pos":[{"mask-radial-from":te()}],"mask-image-radial-to-pos":[{"mask-radial-to":te()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[ri]}],"mask-image-conic-from-pos":[{"mask-conic-from":te()}],"mask-image-conic-to-pos":[{"mask-conic-to":te()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:R()}],"mask-size":[{mask:z()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,Ci,hi]}],filter:[{filter:[``,`none`,Ci,hi]}],blur:[{blur:ne()}],brightness:[{brightness:[ri,Ci,hi]}],contrast:[{contrast:[ri,Ci,hi]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,ki,Si]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:[``,ri,Ci,hi]}],"hue-rotate":[{"hue-rotate":[ri,Ci,hi]}],invert:[{invert:[``,ri,Ci,hi]}],saturate:[{saturate:[ri,Ci,hi]}],sepia:[{sepia:[``,ri,Ci,hi]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,Ci,hi]}],"backdrop-blur":[{"backdrop-blur":ne()}],"backdrop-brightness":[{"backdrop-brightness":[ri,Ci,hi]}],"backdrop-contrast":[{"backdrop-contrast":[ri,Ci,hi]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,ri,Ci,hi]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ri,Ci,hi]}],"backdrop-invert":[{"backdrop-invert":[``,ri,Ci,hi]}],"backdrop-opacity":[{"backdrop-opacity":[ri,Ci,hi]}],"backdrop-saturate":[{"backdrop-saturate":[ri,Ci,hi]}],"backdrop-sepia":[{"backdrop-sepia":[``,ri,Ci,hi]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,Ci,hi]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[ri,`initial`,Ci,hi]}],ease:[{ease:[`linear`,`initial`,_,Ci,hi]}],delay:[{delay:[ri,Ci,hi]}],animate:[{animate:[`none`,v,Ci,hi]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,Ci,hi]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:re()}],"rotate-x":[{"rotate-x":re()}],"rotate-y":[{"rotate-y":re()}],"rotate-z":[{"rotate-z":re()}],scale:[{scale:ie()}],"scale-x":[{"scale-x":ie()}],"scale-y":[{"scale-y":ie()}],"scale-z":[{"scale-z":ie()}],"scale-3d":[`scale-3d`],skew:[{skew:ae()}],"skew-x":[{"skew-x":ae()}],"skew-y":[{"skew-y":ae()}],transform:[{transform:[Ci,hi,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:oe()}],"translate-x":[{"translate-x":oe()}],"translate-y":[{"translate-y":oe()}],"translate-z":[{"translate-z":oe()}],"translate-none":[`translate-none`],zoom:[{zoom:[ii,Ci,hi]}],accent:[{accent:I()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:I()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,Ci,hi]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":I()}],"scrollbar-track-color":[{"scrollbar-track":I()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,Ci,hi]}],fill:[{fill:[`none`,...I()]}],"stroke-w":[{stroke:[ri,wi,gi,_i]}],stroke:[{stroke:[`none`,...I()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function K(...e){return Vi(ur(e))}var Hi=pr(`[&_svg]:-mx-0.5 relative inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-lg border font-medium text-base outline-none transition-[box-shadow,transform] duration-150 before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-64 active:scale-[0.97] sm:text-sm [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,{defaultVariants:{size:`default`,variant:`default`},variants:{size:{default:`h-9 px-[calc(--spacing(3)-1px)] sm:h-8`,icon:`size-9 sm:size-8`,"icon-lg":`size-10 sm:size-9`,"icon-sm":`size-8 sm:size-7`,"icon-xl":`size-11 sm:size-10 [&_svg:not([class*='size-'])]:size-5 sm:[&_svg:not([class*='size-'])]:size-4.5`,"icon-xs":`size-7 rounded-md before:rounded-[calc(var(--radius-md)-1px)] sm:size-6 not-in-data-[slot=input-group]:[&_svg:not([class*='size-'])]:size-4 sm:not-in-data-[slot=input-group]:[&_svg:not([class*='size-'])]:size-3.5`,lg:`h-10 px-[calc(--spacing(3.5)-1px)] sm:h-9`,sm:`h-8 gap-1.5 px-[calc(--spacing(2.5)-1px)] sm:h-7`,xl:`h-11 px-[calc(--spacing(4)-1px)] text-lg sm:h-10 sm:text-base [&_svg:not([class*='size-'])]:size-5 sm:[&_svg:not([class*='size-'])]:size-4.5`,xs:`h-7 gap-1 rounded-md px-[calc(--spacing(2)-1px)] text-sm before:rounded-[calc(var(--radius-md)-1px)] sm:h-6 sm:text-xs [&_svg:not([class*='size-'])]:size-4 sm:[&_svg:not([class*='size-'])]:size-3.5`},variant:{default:`not-disabled:inset-shadow-[0_1px_--theme(--color-white/16%)] border-primary bg-primary text-primary-foreground shadow-primary/24 shadow-xs hover:bg-primary/90 [:active,[data-pressed]]:inset-shadow-[0_1px_--theme(--color-black/8%)] [:disabled,:active,[data-pressed]]:shadow-none`,destructive:`not-disabled:inset-shadow-[0_1px_--theme(--color-white/16%)] border-destructive bg-destructive text-white shadow-destructive/24 shadow-xs hover:bg-destructive/90 [:active,[data-pressed]]:inset-shadow-[0_1px_--theme(--color-black/8%)] [:disabled,:active,[data-pressed]]:shadow-none`,"destructive-outline":`border-border bg-transparent bg-clip-padding text-destructive shadow-xs not-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] dark:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border dark:not-disabled:before:shadow-[0_-1px_--theme(--color-white/4%)] dark:not-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/8%)] [:disabled,:active,[data-pressed]]:shadow-none [:hover,[data-pressed]]:border-destructive/32 [:hover,[data-pressed]]:bg-destructive/4`,ghost:`border-transparent hover:bg-accent data-pressed:bg-accent`,link:`border-transparent underline-offset-4 hover:underline`,outline:`border-border bg-background bg-clip-padding shadow-xs not-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] dark:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border dark:not-disabled:before:shadow-[0_-1px_--theme(--color-white/4%)] dark:not-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/8%)] [:disabled,:active,[data-pressed]]:shadow-none [:hover,[data-pressed]]:bg-accent/50 dark:[:hover,[data-pressed]]:bg-input/64`,secondary:`border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/90 [:active,[data-pressed]]:bg-secondary/80`}}});function Ui({className:e,variant:t,size:n,render:r,...i}){let a=r?void 0:`button`;return cr({defaultTagName:`button`,props:Cn({className:K(Hi({className:e,size:n,variant:t})),"data-slot":`button`,type:a},i),render:r})}function Wi(e){let t=0;for(let n of e)t+=Gi(n.pendingAskCount),t+=Gi(n.pendingApprovalCount);return t}function Gi(e){return typeof e!=`number`||!Number.isFinite(e)||e<=0?0:Math.floor(e)}function Ki(e,t=typeof navigator>`u`?{}:navigator){let n=Gi(e);try{n>0?t.setAppBadge?.(n):t.clearAppBadge?.()}catch{}}function qi(e){switch(e){case`image-quota`:return`Chat image storage is full (200MiB). Message not sent.`;case`image-too-large`:return`An image is still over 10MiB after compression. Message not sent.`;case`image-not-image`:return`An attachment is not a supported image. Message not sent.`;case`image-storage`:return`Could not save the images. Message not sent. Please try again.`;default:return}}var Ji=/^[a-f0-9]{64}\.(?:png|jpg|gif|webp)$/,Yi=e=>typeof e==`string`&&Ji.test(e),Xi=new Set([`image`,`markdown`,`html`,`pdf`,`text`,`other`]),Zi=new Set([`file`,`web`,`desktop`,`upload`]),Qi=3e4,$i=e=>`entryId`in e?`${e.chatId}|e|${e.entryId}`:`${e.chatId}|c|${e.conversationId}|${e.messageIndex}`,ea=e=>typeof e==`object`&&!!e&&!Array.isArray(e),ta=e=>typeof e==`string`&&e?e:void 0,na=e=>typeof e==`string`&&/^data:image\/(?:png|jpeg|gif|webp|svg\+xml|bmp|avif|x-icon);base64,/.test(e);function ra(e){if(!ea(e))return null;let{rel:t,name:n,size:r,kind:i}=e;return typeof t==`string`&&typeof n==`string`&&typeof r==`number`&&typeof i==`string`&&Xi.has(i)?{rel:t,name:n,size:r,kind:i}:null}function ia(e){if(!ea(e)||typeof e.source!=`string`||!Zi.has(e.source))return null;let t=e.source,n=ta(e.name),r=ta(e.caption),i={source:t,...n?{name:n}:{},...r?{caption:r}:{}};return e.ok===!0&&Yi(e.mediaId)?{ok:!0,mediaId:e.mediaId,...na(e.thumb)?{thumb:e.thumb}:{},...i}:e.ok===!1&&(e.error===`too-large`||e.error===`quota`)?{ok:!1,error:e.error,...i}:null}var aa=class{send;cache=new Map;inflight=new Set;listeners=new Set;images=new Map;seq=0;constructor(e){this.send=e}get(e){return this.cache.get($i(e))}request(e){let t=$i(e),n=this.cache.get(t);this.inflight.has(t)||n&&(n.artifacts.length>0||n.media.length>0)||(this.inflight.add(t),this.send({type:`bot-artifacts`,target:e}))}receive(e){if(!ea(e.target))return;let t=$i(e.target);this.inflight.delete(t);let n=(Array.isArray(e.artifacts)?e.artifacts:[]).map(ra).filter(e=>e!==null),r=new Set,i=(Array.isArray(e.media)?e.media:[]).map(ia).filter(e=>e?.ok?!r.has(e.mediaId)&&(r.add(e.mediaId),!0):e!==null).slice(0,4);this.cache.set(t,{artifacts:n,media:i});for(let e of this.listeners)e()}image(e,t){let n=`img-${Date.now().toString(36)}-${++this.seq}`;return new Promise(r=>{let i=setTimeout(()=>this.settle(n,{error:`timeout`}),Qi);this.images.set(n,e=>{clearTimeout(i),r(e)}),this.send({type:`bot-artifact-image`,requestId:n,target:e,...t})})}receiveImage(e){this.settle(e.requestId,na(e.dataUrl)?{dataUrl:e.dataUrl}:{error:e.error??`invalid`})}reset(){this.inflight.clear();for(let e of[...this.images.keys()])this.settle(e,{error:`offline`})}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}settle(e,t){let n=this.images.get(e);n&&(this.images.delete(e),n(t))}},oa=n((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),q=n(((e,t)=>{t.exports=oa()}))(),sa=(0,W.createContext)(null),ca={web:`网页截图`,desktop:`桌面截图`,file:`工作区`,upload:``},la=e=>e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(1)} MB`;function ua({target:e}){let t=(0,W.useContext)(sa),n=$i(e),r=t?.port,i=(0,W.useSyncExternalStore)(e=>r?.subscribe(e)??(()=>{}),()=>r?.get(e)),a=t?.online??!1;(0,W.useEffect)(()=>{a&&r?.request(e)},[r,n,a]);let[o,s]=(0,W.useState)(null);if(!r||!i||i.media.length===0&&i.artifacts.length===0)return null;let c=i.media.some(e=>e.ok&&e.source===`desktop`);return(0,q.jsxs)(`div`,{className:`mt-1.5`,children:[i.media.length>0&&(0,q.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:i.media.map((e,t)=>e.ok?(0,q.jsxs)(`button`,{type:`button`,onClick:()=>s({ref:{mediaId:e.mediaId},title:e.caption??e.name??ca[e.source],source:e.source,thumb:e.thumb}),className:`relative h-20 w-28 overflow-hidden rounded-lg border bg-muted`,children:[e.thumb?(0,q.jsx)(`img`,{src:e.thumb,alt:``,className:`h-full w-full object-cover`}):(0,q.jsx)(gt,{className:`m-auto h-4 w-4 text-muted-foreground`}),ca[e.source]&&(0,q.jsx)(`span`,{className:K(`absolute top-1 left-1 rounded px-1 text-[10px] leading-4`,e.source===`desktop`?`bg-warning text-warning-foreground`:`bg-black/60 text-white`),children:ca[e.source]}),(e.caption||e.name)&&(0,q.jsx)(`span`,{className:`absolute inset-x-0 bottom-0 truncate bg-gradient-to-t from-black/70 to-transparent px-1.5 pt-3 pb-0.5 text-left text-[10px] text-white`,children:e.caption??e.name})]},e.mediaId):(0,q.jsxs)(`div`,{className:`flex w-32 flex-col gap-0.5 rounded-lg border border-destructive/60 border-dashed p-2 text-destructive text-xs`,children:[(0,q.jsx)(`span`,{className:`truncate font-medium`,children:e.name??ca[e.source]}),(0,q.jsx)(`span`,{children:e.error===`quota`?`群图片空间已满,没收下`:`压缩后仍超过 10MiB,没发出去`})]},`failed-${t}`))}),c&&(0,q.jsx)(`p`,{className:`mt-1 text-warning text-xs`,children:`桌面截图可能拍到别的窗口里的敏感内容。`}),i.artifacts.length>0&&(0,q.jsx)(`div`,{className:`mt-1.5 flex flex-wrap gap-1.5`,children:i.artifacts.map(e=>(0,q.jsx)(da,{artifact:e,onOpen:()=>s({ref:{rel:e.rel},title:e.name})},e.rel))}),o&&(0,q.jsx)(fa,{preview:o,load:()=>r.image(e,o.ref),onClose:()=>s(null)})]})}function da({artifact:e,onOpen:t}){let n=e.kind===`image`;return(0,q.jsxs)(`button`,{type:`button`,disabled:!n,onClick:t,title:e.rel,className:`flex max-w-60 items-center gap-1.5 rounded-lg border bg-card px-2 py-1 text-left text-xs disabled:cursor-default`,children:[(0,q.jsx)(ct,{className:`h-3.5 w-3.5 shrink-0 text-muted-foreground`}),(0,q.jsx)(`span`,{className:`truncate`,children:e.name}),(0,q.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:la(e.size)})]})}function fa({preview:e,load:t,onClose:n}){let[r,i]=(0,W.useState)(null);(0,W.useEffect)(()=>{let e=!0;return t().then(t=>e&&i(t)),()=>{e=!1}},[]);let a=r&&`dataUrl`in r?r.dataUrl:e.thumb;return(0,q.jsxs)(`div`,{className:`fixed inset-0 z-50 flex flex-col bg-black/90 text-white`,children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-2 px-3 pt-[max(env(safe-area-inset-top),0.75rem)] pb-2 text-sm`,children:[(0,q.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.title}),e.source&&(0,q.jsx)(`span`,{className:`shrink-0 text-white/70 text-xs`,children:ca[e.source]}),(0,q.jsx)(`button`,{type:`button`,onClick:n,"aria-label":`关闭`,className:`rounded p-1.5`,children:(0,q.jsx)(yn,{className:`h-5 w-5`})})]}),e.source===`desktop`&&(0,q.jsx)(`p`,{className:`px-3 text-warning text-xs`,children:`这是整桌面截图,可能拍到其他窗口里的敏感内容。`}),(0,q.jsxs)(`div`,{className:`relative flex min-h-0 flex-1 items-center justify-center p-3`,children:[a&&(0,q.jsx)(`img`,{src:a,alt:e.title,className:`max-h-full max-w-full object-contain`}),!r&&(0,q.jsx)(Ct,{className:`absolute h-5 w-5 animate-spin`}),r&&`error`in r&&(0,q.jsx)(`p`,{className:`absolute bottom-4 rounded bg-black/70 px-2 py-1 text-xs`,children:r.error===`too-large`?`图片太大,手机上看不了`:`大图没拉下来`})]})]})}var pa=`#64748b`,ma=/^#[0-9a-f]{6}$/i;function ha(e){let[t,n,r]=[1,3,5].map(t=>Number.parseInt(e.slice(t,t+2),16)/255),i=Math.max(t,n,r),a=Math.min(t,n,r),o=(i+a)/2,s=i-a;if(s===0)return[0,0,o];let c=s/(1-Math.abs(2*o-1));return[((i===t?(n-r)/s%6:i===n?(r-t)/s+2:(t-n)/s+4)*60+360)%360,c,o]}function ga(e,t,n){let r=(1-Math.abs(2*n-1))*t,i=r*(1-Math.abs(e/60%2-1)),a=n-r/2,[o,s,c]=e<60?[r,i,0]:e<120?[i,r,0]:e<180?[0,r,i]:e<240?[0,i,r]:e<300?[i,0,r]:[r,0,i];return`#${[o,s,c].map(e=>Math.round((e+a)*255).toString(16).padStart(2,`0`)).join(``)}`}function _a(e){let t=typeof e==`string`&&ma.test(e)?e.toLowerCase():pa,[n,r]=ha(t),i=Math.max(r,.35),a=(e,t)=>ga((n+e+360)%360,i,t);return[t,a(35,.78),a(-35,.32),a(180,.62),a(90,.9)]}var va=e=>{let t=0;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t=(t<<5)-t+r,t&=t}return Math.abs(t)},ya=(e,t)=>Math.floor(e/10**t%10),ba=(e,t)=>!(ya(e,t)%2),xa=(e,t,n)=>{let r=e%t;return n&&ya(e,n)%2==0?-r:r},Sa=(e,t,n)=>t[e%n],Ca=e=>{e.slice(0,1)===`#`&&(e=e.slice(1));let t=parseInt(e.substr(0,2),16),n=parseInt(e.substr(2,2),16),r=parseInt(e.substr(4,2),16);return(t*299+n*587+r*114)/1e3>=128?`#000000`:`#FFFFFF`},wa=4,Ta=80;function Ea(e,t){let n=va(e),r=t&&t.length;return Array.from({length:wa},(e,i)=>({color:Sa(n+i,t,r),translateX:xa(n*(i+1),Ta/2-(i+17),1),translateY:xa(n*(i+1),Ta/2-(i+17),2),rotate:xa(n*(i+1),360),isSquare:ba(n,2)}))}var Da=({name:e,colors:t,title:n,square:r,size:i,...a})=>{let o=Ea(e,t),s=W.useId();return(0,q.jsxs)(`svg`,{viewBox:`0 0 80 80`,fill:`none`,role:`img`,xmlns:`http://www.w3.org/2000/svg`,width:i,height:i,...a,children:[n&&(0,q.jsx)(`title`,{children:e}),(0,q.jsx)(`mask`,{id:s,maskUnits:`userSpaceOnUse`,x:0,y:0,width:Ta,height:Ta,children:(0,q.jsx)(`rect`,{width:Ta,height:Ta,rx:r?void 0:160,fill:`#FFFFFF`})}),(0,q.jsxs)(`g`,{mask:`url(#${s})`,children:[(0,q.jsx)(`rect`,{width:Ta,height:Ta,fill:o[0].color}),(0,q.jsx)(`rect`,{x:10,y:30,width:Ta,height:o[1].isSquare?Ta:Ta/8,fill:o[1].color,transform:`translate(`+o[1].translateX+` `+o[1].translateY+`) rotate(`+o[1].rotate+` 40 40)`}),(0,q.jsx)(`circle`,{cx:Ta/2,cy:Ta/2,fill:o[2].color,r:Ta/5,transform:`translate(`+o[2].translateX+` `+o[2].translateY+`)`}),(0,q.jsx)(`line`,{x1:0,y1:Ta/2,x2:Ta,y2:Ta/2,strokeWidth:2,stroke:o[3].color,transform:`translate(`+o[3].translateX+` `+o[3].translateY+`) rotate(`+o[3].rotate+` 40 40)`})]})]})},Oa=90,ka=5;function Aa(e,t){let n=va(e),r=t&&t.length,i=Array.from({length:ka},(e,i)=>Sa(n+i,t,r)),a=[];return a[0]=i[0],a[1]=i[1],a[2]=i[1],a[3]=i[2],a[4]=i[2],a[5]=i[3],a[6]=i[3],a[7]=i[0],a[8]=i[4],a}var ja=({name:e,colors:t,title:n,square:r,size:i,...a})=>{let o=Aa(e,t),s=W.useId();return(0,q.jsxs)(`svg`,{viewBox:`0 0 90 90`,fill:`none`,role:`img`,xmlns:`http://www.w3.org/2000/svg`,width:i,height:i,...a,children:[n&&(0,q.jsx)(`title`,{children:e}),(0,q.jsx)(`mask`,{id:s,maskUnits:`userSpaceOnUse`,x:0,y:0,width:Oa,height:Oa,children:(0,q.jsx)(`rect`,{width:Oa,height:Oa,rx:r?void 0:180,fill:`#FFFFFF`})}),(0,q.jsxs)(`g`,{mask:`url(#${s})`,children:[(0,q.jsx)(`path`,{d:`M0 0h90v45H0z`,fill:o[0]}),(0,q.jsx)(`path`,{d:`M0 45h90v45H0z`,fill:o[1]}),(0,q.jsx)(`path`,{d:`M83 45a38 38 0 00-76 0h76z`,fill:o[2]}),(0,q.jsx)(`path`,{d:`M83 45a38 38 0 01-76 0h76z`,fill:o[3]}),(0,q.jsx)(`path`,{d:`M77 45a32 32 0 10-64 0h64z`,fill:o[4]}),(0,q.jsx)(`path`,{d:`M77 45a32 32 0 11-64 0h64z`,fill:o[5]}),(0,q.jsx)(`path`,{d:`M71 45a26 26 0 00-52 0h52z`,fill:o[6]}),(0,q.jsx)(`path`,{d:`M71 45a26 26 0 01-52 0h52z`,fill:o[7]}),(0,q.jsx)(`circle`,{cx:45,cy:45,r:23,fill:o[8]})]})]})},Ma=64,Na=80;function Pa(e,t){let n=va(e),r=t&&t.length;return Array.from({length:Ma},(e,i)=>Sa(n%(i+1),t,r))}var Fa=({name:e,colors:t,title:n,square:r,size:i,...a})=>{let o=Pa(e,t),s=W.useId();return(0,q.jsxs)(`svg`,{viewBox:`0 0 80 80`,fill:`none`,role:`img`,xmlns:`http://www.w3.org/2000/svg`,width:i,height:i,...a,children:[n&&(0,q.jsx)(`title`,{children:e}),(0,q.jsx)(`mask`,{id:s,"mask-type":`alpha`,maskUnits:`userSpaceOnUse`,x:0,y:0,width:Na,height:Na,children:(0,q.jsx)(`rect`,{width:Na,height:Na,rx:r?void 0:160,fill:`#FFFFFF`})}),(0,q.jsxs)(`g`,{mask:`url(#${s})`,children:[(0,q.jsx)(`rect`,{width:10,height:10,fill:o[0]}),(0,q.jsx)(`rect`,{x:20,width:10,height:10,fill:o[1]}),(0,q.jsx)(`rect`,{x:40,width:10,height:10,fill:o[2]}),(0,q.jsx)(`rect`,{x:60,width:10,height:10,fill:o[3]}),(0,q.jsx)(`rect`,{x:10,width:10,height:10,fill:o[4]}),(0,q.jsx)(`rect`,{x:30,width:10,height:10,fill:o[5]}),(0,q.jsx)(`rect`,{x:50,width:10,height:10,fill:o[6]}),(0,q.jsx)(`rect`,{x:70,width:10,height:10,fill:o[7]}),(0,q.jsx)(`rect`,{y:10,width:10,height:10,fill:o[8]}),(0,q.jsx)(`rect`,{y:20,width:10,height:10,fill:o[9]}),(0,q.jsx)(`rect`,{y:30,width:10,height:10,fill:o[10]}),(0,q.jsx)(`rect`,{y:40,width:10,height:10,fill:o[11]}),(0,q.jsx)(`rect`,{y:50,width:10,height:10,fill:o[12]}),(0,q.jsx)(`rect`,{y:60,width:10,height:10,fill:o[13]}),(0,q.jsx)(`rect`,{y:70,width:10,height:10,fill:o[14]}),(0,q.jsx)(`rect`,{x:20,y:10,width:10,height:10,fill:o[15]}),(0,q.jsx)(`rect`,{x:20,y:20,width:10,height:10,fill:o[16]}),(0,q.jsx)(`rect`,{x:20,y:30,width:10,height:10,fill:o[17]}),(0,q.jsx)(`rect`,{x:20,y:40,width:10,height:10,fill:o[18]}),(0,q.jsx)(`rect`,{x:20,y:50,width:10,height:10,fill:o[19]}),(0,q.jsx)(`rect`,{x:20,y:60,width:10,height:10,fill:o[20]}),(0,q.jsx)(`rect`,{x:20,y:70,width:10,height:10,fill:o[21]}),(0,q.jsx)(`rect`,{x:40,y:10,width:10,height:10,fill:o[22]}),(0,q.jsx)(`rect`,{x:40,y:20,width:10,height:10,fill:o[23]}),(0,q.jsx)(`rect`,{x:40,y:30,width:10,height:10,fill:o[24]}),(0,q.jsx)(`rect`,{x:40,y:40,width:10,height:10,fill:o[25]}),(0,q.jsx)(`rect`,{x:40,y:50,width:10,height:10,fill:o[26]}),(0,q.jsx)(`rect`,{x:40,y:60,width:10,height:10,fill:o[27]}),(0,q.jsx)(`rect`,{x:40,y:70,width:10,height:10,fill:o[28]}),(0,q.jsx)(`rect`,{x:60,y:10,width:10,height:10,fill:o[29]}),(0,q.jsx)(`rect`,{x:60,y:20,width:10,height:10,fill:o[30]}),(0,q.jsx)(`rect`,{x:60,y:30,width:10,height:10,fill:o[31]}),(0,q.jsx)(`rect`,{x:60,y:40,width:10,height:10,fill:o[32]}),(0,q.jsx)(`rect`,{x:60,y:50,width:10,height:10,fill:o[33]}),(0,q.jsx)(`rect`,{x:60,y:60,width:10,height:10,fill:o[34]}),(0,q.jsx)(`rect`,{x:60,y:70,width:10,height:10,fill:o[35]}),(0,q.jsx)(`rect`,{x:10,y:10,width:10,height:10,fill:o[36]}),(0,q.jsx)(`rect`,{x:10,y:20,width:10,height:10,fill:o[37]}),(0,q.jsx)(`rect`,{x:10,y:30,width:10,height:10,fill:o[38]}),(0,q.jsx)(`rect`,{x:10,y:40,width:10,height:10,fill:o[39]}),(0,q.jsx)(`rect`,{x:10,y:50,width:10,height:10,fill:o[40]}),(0,q.jsx)(`rect`,{x:10,y:60,width:10,height:10,fill:o[41]}),(0,q.jsx)(`rect`,{x:10,y:70,width:10,height:10,fill:o[42]}),(0,q.jsx)(`rect`,{x:30,y:10,width:10,height:10,fill:o[43]}),(0,q.jsx)(`rect`,{x:30,y:20,width:10,height:10,fill:o[44]}),(0,q.jsx)(`rect`,{x:30,y:30,width:10,height:10,fill:o[45]}),(0,q.jsx)(`rect`,{x:30,y:40,width:10,height:10,fill:o[46]}),(0,q.jsx)(`rect`,{x:30,y:50,width:10,height:10,fill:o[47]}),(0,q.jsx)(`rect`,{x:30,y:60,width:10,height:10,fill:o[48]}),(0,q.jsx)(`rect`,{x:30,y:70,width:10,height:10,fill:o[49]}),(0,q.jsx)(`rect`,{x:50,y:10,width:10,height:10,fill:o[50]}),(0,q.jsx)(`rect`,{x:50,y:20,width:10,height:10,fill:o[51]}),(0,q.jsx)(`rect`,{x:50,y:30,width:10,height:10,fill:o[52]}),(0,q.jsx)(`rect`,{x:50,y:40,width:10,height:10,fill:o[53]}),(0,q.jsx)(`rect`,{x:50,y:50,width:10,height:10,fill:o[54]}),(0,q.jsx)(`rect`,{x:50,y:60,width:10,height:10,fill:o[55]}),(0,q.jsx)(`rect`,{x:50,y:70,width:10,height:10,fill:o[56]}),(0,q.jsx)(`rect`,{x:70,y:10,width:10,height:10,fill:o[57]}),(0,q.jsx)(`rect`,{x:70,y:20,width:10,height:10,fill:o[58]}),(0,q.jsx)(`rect`,{x:70,y:30,width:10,height:10,fill:o[59]}),(0,q.jsx)(`rect`,{x:70,y:40,width:10,height:10,fill:o[60]}),(0,q.jsx)(`rect`,{x:70,y:50,width:10,height:10,fill:o[61]}),(0,q.jsx)(`rect`,{x:70,y:60,width:10,height:10,fill:o[62]}),(0,q.jsx)(`rect`,{x:70,y:70,width:10,height:10,fill:o[63]})]})]})},Ia=36;function La(e,t){let n=va(e),r=t&&t.length,i=Sa(n,t,r),a=xa(n,10,1),o=a<5?a+Ia/9:a,s=xa(n,10,2),c=s<5?s+Ia/9:s;return{wrapperColor:i,faceColor:Ca(i),backgroundColor:Sa(n+13,t,r),wrapperTranslateX:o,wrapperTranslateY:c,wrapperRotate:xa(n,360),wrapperScale:1+xa(n,Ia/12)/10,isMouthOpen:ba(n,2),isCircle:ba(n,1),eyeSpread:xa(n,5),mouthSpread:xa(n,3),faceRotate:xa(n,10,3),faceTranslateX:o>Ia/6?o/2:xa(n,8,1),faceTranslateY:c>Ia/6?c/2:xa(n,7,2)}}var Ra=({name:e,colors:t,title:n,square:r,size:i,...a})=>{let o=La(e,t),s=W.useId();return(0,q.jsxs)(`svg`,{viewBox:`0 0 36 36`,fill:`none`,role:`img`,xmlns:`http://www.w3.org/2000/svg`,width:i,height:i,...a,children:[n&&(0,q.jsx)(`title`,{children:e}),(0,q.jsx)(`mask`,{id:s,maskUnits:`userSpaceOnUse`,x:0,y:0,width:Ia,height:Ia,children:(0,q.jsx)(`rect`,{width:Ia,height:Ia,rx:r?void 0:72,fill:`#FFFFFF`})}),(0,q.jsxs)(`g`,{mask:`url(#${s})`,children:[(0,q.jsx)(`rect`,{width:Ia,height:Ia,fill:o.backgroundColor}),(0,q.jsx)(`rect`,{x:`0`,y:`0`,width:Ia,height:Ia,transform:`translate(`+o.wrapperTranslateX+` `+o.wrapperTranslateY+`) rotate(`+o.wrapperRotate+` 18 18) scale(`+o.wrapperScale+`)`,fill:o.wrapperColor,rx:o.isCircle?Ia:Ia/6}),(0,q.jsxs)(`g`,{transform:`translate(`+o.faceTranslateX+` `+o.faceTranslateY+`) rotate(`+o.faceRotate+` 18 18)`,children:[o.isMouthOpen?(0,q.jsx)(`path`,{d:`M15 `+(19+o.mouthSpread)+`c2 1 4 1 6 0`,stroke:o.faceColor,fill:`none`,strokeLinecap:`round`}):(0,q.jsx)(`path`,{d:`M13,`+(19+o.mouthSpread)+` a1,0.75 0 0,0 10,0`,fill:o.faceColor}),(0,q.jsx)(`rect`,{x:14-o.eyeSpread,y:14,width:1.5,height:2,rx:1,stroke:`none`,fill:o.faceColor}),(0,q.jsx)(`rect`,{x:20+o.eyeSpread,y:14,width:1.5,height:2,rx:1,stroke:`none`,fill:o.faceColor})]})]})]})},za=4,Ba=80;function Va(e,t){let n=va(e),r=t&&t.length;return Array.from({length:za},(e,i)=>Sa(n+i,t,r))}var Ha=({name:e,colors:t,title:n,square:r,size:i,...a})=>{let o=Va(e,t),s=e.replace(/\s/g,``),c=W.useId();return(0,q.jsxs)(`svg`,{viewBox:`0 0 80 80`,fill:`none`,role:`img`,xmlns:`http://www.w3.org/2000/svg`,width:i,height:i,...a,children:[n&&(0,q.jsx)(`title`,{children:e}),(0,q.jsx)(`mask`,{id:c,maskUnits:`userSpaceOnUse`,x:0,y:0,width:Ba,height:Ba,children:(0,q.jsx)(`rect`,{width:Ba,height:Ba,rx:r?void 0:160,fill:`#FFFFFF`})}),(0,q.jsxs)(`g`,{mask:`url(#${c})`,children:[(0,q.jsx)(`path`,{fill:`url(#gradient_paint0_linear_`+s+`)`,d:`M0 0h80v40H0z`}),(0,q.jsx)(`path`,{fill:`url(#gradient_paint1_linear_`+s+`)`,d:`M0 40h80v40H0z`})]}),(0,q.jsxs)(`defs`,{children:[(0,q.jsxs)(`linearGradient`,{id:`gradient_paint0_linear_`+s,x1:Ba/2,y1:0,x2:Ba/2,y2:Ba/2,gradientUnits:`userSpaceOnUse`,children:[(0,q.jsx)(`stop`,{stopColor:o[0]}),(0,q.jsx)(`stop`,{offset:1,stopColor:o[1]})]}),(0,q.jsxs)(`linearGradient`,{id:`gradient_paint1_linear_`+s,x1:Ba/2,y1:Ba/2,x2:Ba/2,y2:Ba,gradientUnits:`userSpaceOnUse`,children:[(0,q.jsx)(`stop`,{stopColor:o[2]}),(0,q.jsx)(`stop`,{offset:1,stopColor:o[3]})]})]})]})},Ua=3,Wa=80;function Ga(e,t){let n=va(e),r=t&&t.length;return Array.from({length:Ua},(e,i)=>({color:Sa(n+i,t,r),translateX:xa(n*(i+1),Wa/10,1),translateY:xa(n*(i+1),Wa/10,2),scale:1.2+xa(n*(i+1),Wa/20)/10,rotate:xa(n*(i+1),360,1)}))}var Ka=({name:e,colors:t,title:n,square:r,size:i,...a})=>{let o=Ga(e,t),s=W.useId();return(0,q.jsxs)(`svg`,{viewBox:`0 0 80 80`,fill:`none`,role:`img`,xmlns:`http://www.w3.org/2000/svg`,width:i,height:i,...a,children:[n&&(0,q.jsx)(`title`,{children:e}),(0,q.jsx)(`mask`,{id:s,maskUnits:`userSpaceOnUse`,x:0,y:0,width:Wa,height:Wa,children:(0,q.jsx)(`rect`,{width:Wa,height:Wa,rx:r?void 0:160,fill:`#FFFFFF`})}),(0,q.jsxs)(`g`,{mask:`url(#${s})`,children:[(0,q.jsx)(`rect`,{width:Wa,height:Wa,fill:o[0].color}),(0,q.jsx)(`path`,{filter:`url(#filter_${s})`,d:`M32.414 59.35L50.376 70.5H72.5v-71H33.728L26.5 13.381l19.057 27.08L32.414 59.35z`,fill:o[1].color,transform:`translate(`+o[1].translateX+` `+o[1].translateY+`) rotate(`+o[1].rotate+` 40 40) scale(`+o[2].scale+`)`}),(0,q.jsx)(`path`,{filter:`url(#filter_${s})`,style:{mixBlendMode:`overlay`},d:`M22.216 24L0 46.75l14.108 38.129L78 86l-3.081-59.276-22.378 4.005 12.972 20.186-23.35 27.395L22.215 24z`,fill:o[2].color,transform:`translate(`+o[2].translateX+` `+o[2].translateY+`) rotate(`+o[2].rotate+` 40 40) scale(`+o[2].scale+`)`})]}),(0,q.jsx)(`defs`,{children:(0,q.jsxs)(`filter`,{id:`filter_${s}`,filterUnits:`userSpaceOnUse`,colorInterpolationFilters:`sRGB`,children:[(0,q.jsx)(`feFlood`,{floodOpacity:0,result:`BackgroundImageFix`}),(0,q.jsx)(`feBlend`,{in:`SourceGraphic`,in2:`BackgroundImageFix`,result:`shape`}),(0,q.jsx)(`feGaussianBlur`,{stdDeviation:7,result:`effect1_foregroundBlur`})]})})]})},qa={pixel:Fa,bauhaus:Da,ring:ja,beam:Ra,sunset:Ha,marble:Ka,geometric:Ra,abstract:Da},Ja=({variant:e=`marble`,colors:t=[`#92A1C6`,`#146A7C`,`#F0AB3D`,`#C271B4`,`#C20D90`],name:n=`Clara Barton`,title:r=!1,size:i=`40px`,square:a=!1,...o})=>{let s=qa[e]||Ka;return(0,q.jsx)(s,{colors:t,name:n,title:r,size:i,square:a,...o})};function Ya({bot:e,size:t=`md`,busy:n}){return(0,q.jsx)(`span`,{"aria-hidden":!0,className:K(`flex shrink-0 overflow-hidden rounded-full bg-muted`,t===`sm`?`h-7 w-7`:`h-9 w-9`,n&&`ring-2 ring-brand/60 ring-offset-1 ring-offset-background animate-pulse`),children:e&&(0,q.jsx)(Ja,{name:e.name,variant:`beam`,colors:_a(e.avatarColor),size:`100%`})})}var Xa=e(de()),Za=[`read_only`,`regenerable`,`reversible_workspace_change`,`data_loss`,`system_state`,`exfiltration`,`unclear_target`],Qa=200;function $a(e){return Za.includes(e)}function eo(e){return typeof e==`number`&&Number.isFinite(e)&&e>=0&&e<=1}function to(e){if(!e||typeof e!=`object`||Array.isArray(e))return;let{verdict:t,model:n,allow:r,ask:i,block:a,reason:o}=e;if(!(t!==`allow`&&t!==`deny`||typeof n!=`string`||!n||n.length>Qa||!eo(r)||!eo(i)||!eo(a)||o!==void 0&&!$a(o)))return{verdict:t,model:n,allow:r,ask:i,block:a,...o?{reason:o}:{}}}var no=`agent:enso`,ro=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,io=/^[a-z][a-z0-9_-]*$/;function ao(e){return typeof e==`string`&&ro.test(e)}function oo(e){if(e===`agent:enso`)return no;if(typeof e!=`string`)return null;if(e.startsWith(`builtin:`)){let t=e.slice(8);return io.test(t)&&t!==`general`&&t!==`enso`?e:null}return e.startsWith(`custom:`)?ao(e.slice(7))?e:null:e.startsWith(`bot:`)&&ao(e.slice(4))?e:null}function so(e){if(!e||typeof e!=`object`||Array.isArray(e))return null;let t=e,n=oo(t.typeKey);return Object.keys(t).length!==7||!n||typeof t.displayName!=`string`||!t.displayName.trim()||typeof t.description!=`string`||t.source!==`system`&&t.source!==`builtin`&&t.source!==`custom`&&t.source!==`bot`||typeof t.locked!=`boolean`||typeof t.canDisable!=`boolean`||typeof t.canEdit!=`boolean`||n===`agent:enso`||t.source===`bot`!==n.startsWith(`bot:`)?null:t}function co(e){if(!e||typeof e!=`object`||Array.isArray(e))return null;let t=e;if(Object.keys(t).length!==2||!Number.isInteger(t.revision)||t.revision<0||!Array.isArray(t.candidates)||t.candidates.some(e=>so(e)===null))return null;let n=t.candidates.map(e=>e.typeKey);return new Set(n).size===n.length?t:null}var lo=`__`,uo=/^plugin_([a-z][a-z0-9]*(?:-[a-z0-9]+)+)__([a-z][a-z0-9_]*)$/;function fo(e){let t=uo.exec(e);return!t?.[1]||!t[2]||t[2].includes(lo)?null:{pluginId:t[1].replaceAll(`-`,`.`),toolName:t[2]}}var po=/^<(plan-mode|active-plan)(?: id="[^"]*")?>\n([\s\S]*?)\n<\/\1>(?:\n\n|$)/;function mo(e){let t=po.exec(e);return t?{note:t[1]===`active-plan`?`active-plan`:t[2].includes(`Plan mode is ON`)?`on`:`off`,rest:e.slice(t[0].length)}:{rest:e}}var ho=/^<plan-approved id="([^"]*)">\nThe user approved the plan "([\s\S]*?)"; plan mode/,go=/^<plan-feedback id="([^"]*)">\n[\s\S]*?<feedback>\n([\s\S]*)\n<\/feedback>\n<\/plan-feedback>$/;function _o(e){let t=ho.exec(e);if(t)return{kind:`approved`,planId:t[1],title:t[2]};let n=go.exec(e);return n?{kind:`feedback`,planId:n[1],feedback:n[2]}:null}var vo=(e,t)=>e.length>t?`${e.slice(0,t)}…`:e;function yo(e){if(!e||typeof e!=`object`||Array.isArray(e))return;let{status:t,originalCommand:n,rewrittenCommand:r,inputTokens:i,outputTokens:a,reason:o}=e;if(t!==`compressed`&&t!==`unchanged`&&t!==`pending`&&t!==`bypassed`&&t!==`unavailable`||typeof n!=`string`||r!==void 0&&typeof r!=`string`||o!==void 0&&typeof o!=`string`)return;let s={status:t,originalCommand:vo(n,16e3)};if(r!==void 0&&(s.rewrittenCommand=vo(r,16e3)),o!==void 0&&(s.reason=vo(o,1e3)),i!==void 0||a!==void 0){if(typeof i!=`number`||!Number.isSafeInteger(i)||i<0||typeof a!=`number`||!Number.isSafeInteger(a)||a<0)return;s.inputTokens=i,s.outputTokens=a}return s}var bo=[`所有人`,`everyone`,`all`],xo=e=>e.normalize(`NFC`).toLowerCase();function So(e){return Array.isArray(e)?e.filter(e=>!!e&&typeof e==`object`&&typeof e.id==`string`&&typeof e.name==`string`&&e.name.length>0):[]}function Co(e,t){let n=xo(typeof e==`string`?e.replace(/^@/,``):``);return So(t).filter(e=>xo(e.name).startsWith(n))}var wo=(e,t)=>Number(!!t.pinned)-Number(!!e.pinned)||t.updatedAt-e.updatedAt;function To(e,t){let n=new Set(t.filter(e=>!e.archived).map(e=>e.id));return{groups:e.filter(e=>e.kind===`group`).sort(wo),directs:e.filter(e=>e.kind===`direct`&&n.has(e.members[0])).sort(wo)}}function Eo(e,t){let n=[e,...t.filter(t=>t.parentId===e.id)];return{current:n.find(t=>t.id===e.activeThreadId)??e,entries:n.map(e=>({id:e.id,title:e.threadTitle??(e.parentId?`新话题`:`主话题`),...e.last?.text?{preview:e.last.text}:{},activityAt:e.last?.at??e.updatedAt,unread:!1,running:e.status!==`idle`}))}}var Do=400;function Oo(e,t=!1){return e.entries.length<=Do?e:{...e,entries:t?e.entries.slice(0,Do):e.entries.slice(-400),hasOlder:!t||e.hasOlder,...t?{history:!0}:{}}}function ko(e,t,n){return n||t===0?e:e.filter(e=>e.seq>=t)}function Ao(e,t){let n={entries:[...t.entries].sort((e,t)=>e.seq-t.seq),lastSeq:t.lastSeq,hasOlder:t.hasOlder,...t.epochSeq===void 0?{}:{epochSeq:t.epochSeq}};if(e&&t.epochSeq!==void 0){if(t.epochSeq<(e.epochSeq??0))return e;if(t.epochSeq>(e.epochSeq??0)&&t.beforeSeq===void 0)return Oo(n)}if(!e||e.entries.length===0)return Oo(n,t.beforeSeq!==void 0);if(t.beforeSeq===void 0&&e.history)return{...e,lastSeq:Math.max(e.lastSeq,t.lastSeq)};if(t.beforeSeq===void 0&&t.lastSeq<e.lastSeq)return e;let r=e.entries[0].seq;if(t.beforeSeq!==void 0){if(t.beforeSeq!==r)return e}else{let t=e.entries.at(-1)?.seq??0;if((n.entries[0]?.seq??t+1)>t+1)return Oo(n)}let i=new Map(e.entries.map(e=>[e.seq,e]));for(let e of n.entries){let t=i.get(e.seq);e.truncated&&t&&!t.truncated||i.set(e.seq,e)}let a=[...i.values()].sort((e,t)=>e.seq-t.seq),o=(n.entries[0]?.seq??1/0)<r;return Oo({entries:a,lastSeq:Math.max(e.lastSeq,n.lastSeq),hasOlder:t.beforeSeq!==void 0||o?n.hasOlder:e.hasOlder,...e.history?{history:!0}:{},...n.epochSeq===void 0?e.epochSeq===void 0?{}:{epochSeq:e.epochSeq}:{epochSeq:n.epochSeq}},t.beforeSeq!==void 0)}var jo=/[A-Za-z0-9._%+-]/;function Mo(e,t){let n=e.slice(0,t),r=n.lastIndexOf(`@`);if(r<0||r>0&&jo.test(n[r-1]))return null;let i=n.slice(r+1);return/\s/.test(i)?null:{start:r,query:i}}var No=`__all__`;function Po(e,t){let n=bo[0],r=xo(e.replace(/^@/,``));return[...xo(n).startsWith(r)?[{id:No,name:n}]:[],...Co(e,t).map(({id:e,name:t})=>({id:e,name:t}))]}function Fo(e,t,n,r){let i=`@${r} `;return{text:e.slice(0,t.start)+i+e.slice(n),caret:t.start+i.length}}var Io={approval:`需要审批`,ask:`等你回答`,"delegation-interrupted":`委派中断`,budget:`今日预算已用完`,"routine-draft":`例行任务待批准`,"routine-blocked":`例行任务被阻塞`,"task-blocked":`任务卡住`};function Lo(e,t){return e.kind===`silence`?`已安静 ${Math.max(0,Math.floor((t-(e.since??t))/1e3))} 秒`:Io[e.kind]}var Ro={thinking:`思考中`,typing:`输出中`,tool:`调用工具`,retrying:`重试中`},zo={turn:`排队 · 等上一轮结束`,capacity:`排队 · 并发已满`,"member-check":`排队 · 正在判断是否可并行`,"member-serial":`排队 · 等待成员当前任务完成`,"member-fifo":`排队 · 等待成员前序任务`,"member-stopping":`排队 · 等待成员停止完成`};function Bo(e){return e.state===`queued`?e.reason&&Object.hasOwn(zo,e.reason)?zo[e.reason]:`排队中`:Ro[e.state]}function Vo(e){let t=e.steps.findLast(e=>e.status===`running`);return t?`${t.name} ${t.detail}`.trim():Bo(e)}function Ho(e,t){return e.filter(e=>e.chatId===t).sort((e,t)=>Number(e.state===`queued`)-Number(t.state===`queued`))}function Uo(e){let t=Math.max(0,Math.floor(e/1e3));if(t<60)return`${t}s`;let n=Math.floor(t/60);return n<60?`${n}m${String(t%60).padStart(2,`0`)}s`:`${Math.floor(n/60)}h${String(n%60).padStart(2,`0`)}m`}var Wo={running:`工作中`,queued:`排队中`};function Go(e,t,n){if(n){let r=Vo(n),i=t.get(n.botId)?.name;return e.kind===`group`&&i?`${i}:${r}`:r}if(e.status!==`idle`)return Wo[e.status];let r=e.last;if(!r)return e.kind===`group`?`${e.members.length} 位成员`:``;let i=r.kind===`human`?`我`:r.botId?t.get(r.botId)?.name:void 0;return i&&e.kind===`group`?`${i}:${r.text}`:r.text}function Ko({bots:e,chats:t,activeChatId:n,onSelect:r,inbox:i=[],onDismiss:a,activities:o=[]}){let s=new Map(e.map(e=>[e.id,e])),{groups:c,directs:l}=To(t,e),u=e=>{let t=e.kind===`direct`?s.get(e.members[0]):void 0,i=Ho(o,e.id)[0],a=i?i.state!==`queued`:e.status===`running`,c=!i&&e.status===`idle`;return(0,q.jsxs)(`button`,{type:`button`,onClick:()=>r(e.id),className:K(`flex w-full items-center gap-2.5 rounded-lg px-2 py-2 text-left transition-colors hover:bg-muted/60`,e.id===n&&`bg-muted`),children:[t?(0,q.jsx)(Ya,{bot:t,busy:a}):(0,q.jsx)(`span`,{className:`flex shrink-0 -space-x-2`,children:e.members.slice(0,3).map(e=>(0,q.jsx)(Ya,{bot:s.get(e),size:`sm`},e))}),(0,q.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,q.jsx)(`span`,{className:`block truncate font-medium text-sm`,children:t?.name??(e.title||`群聊`)}),(0,q.jsx)(`span`,{className:K(`block truncate text-xs`,c?`text-muted-foreground`:`text-brand`),children:Go(e,s,i)||t?.title||`\xA0`})]})]},e.id)};return(0,q.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,q.jsxs)(`div`,{className:`min-h-0 flex-1 space-y-2 overflow-y-auto p-2`,children:[c.length===0&&l.length===0&&(0,q.jsx)(`p`,{className:`rounded-lg border border-dashed px-3 py-6 text-center text-muted-foreground text-sm`,children:`桌面端还没有 Bot 聊天`}),i.length>0&&(0,q.jsxs)(`div`,{children:[(0,q.jsxs)(`p`,{className:`px-2 py-1.5 font-medium text-muted-foreground text-xs`,children:[`收件箱 · `,i.length]}),i.map(e=>{let t=e.botId?s.get(e.botId):void 0,n=e.ownerBotId?s.get(e.ownerBotId):void 0;return(0,q.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg px-2 py-2`,children:[(0,q.jsxs)(`button`,{type:`button`,disabled:!e.chatId,onClick:()=>e.chatId&&r(e.chatId),className:`flex min-w-0 flex-1 items-center gap-2.5 text-left`,children:[(0,q.jsx)(Ya,{bot:t}),(0,q.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,q.jsxs)(`span`,{className:`block truncate font-medium text-sm`,children:[t?.name??`成员`,n?` 替 ${n.name}`:``,(0,q.jsx)(`span`,{className:`ml-1.5 font-normal text-brand text-xs`,children:Lo(e,Date.now())})]}),(0,q.jsx)(`span`,{className:`block truncate text-muted-foreground text-xs`,children:e.text||`\xA0`})]})]}),e.dismissible&&a&&(0,q.jsx)(`button`,{type:`button`,onClick:()=>a(e.key),className:`shrink-0 rounded px-2 py-1 text-muted-foreground text-xs hover:bg-muted`,children:`忽略`})]},e.key)})]}),c.length>0&&(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`p`,{className:`px-2 py-1.5 font-medium text-muted-foreground text-xs`,children:`群聊`}),c.map(u)]}),l.length>0&&(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`p`,{className:`px-2 py-1.5 font-medium text-muted-foreground text-xs`,children:`成员`}),l.map(u)]})]}),(0,q.jsx)(`p`,{className:`shrink-0 px-3 py-2 text-center text-[11px] text-muted-foreground`,children:`新建成员 / 群聊、例行任务请在桌面端管理`})]})}var qo=class{send;generation=0;active=null;pending=null;constructor(e){this.send=e}start(e,t){if(this.active)return this.active;let n=this.generation,r=(async()=>{let r=await this.request(e);return n===this.generation?r.needsConfirmation===!0?t()?this.request(e,!0):null:r:{...r,ok:!1,error:`offline`}})().finally(()=>{this.active===r&&(this.active=null)});return this.active=r,r}receive(e){e.requestId===this.pending?.requestId&&e.chatId===this.pending.chatId&&this.pending.settle(e)}reset(){this.generation++;let e=this.pending;e&&e.settle({type:`bot-new-session-result`,chatId:e.chatId,requestId:e.requestId,ok:!1,error:`offline`}),this.active=null}request(e,t=!1){let n=crypto.randomUUID();return new Promise(r=>{let i=setTimeout(()=>this.receive({type:`bot-new-session-result`,chatId:e,requestId:n,ok:!1,error:`timeout`}),6e4);this.pending={chatId:e,requestId:n,settle:e=>{clearTimeout(i),this.pending=null,r(e)}};try{this.send({type:`bot-new-session`,chatId:e,requestId:n,...t?{confirmed:!0}:{}})}catch{this.receive({type:`bot-new-session-result`,chatId:e,requestId:n,ok:!1,error:`offline`})}})}},Jo=15e3,Yo=class{send;pending=null;constructor(e){this.send=e}request(e){let t=crypto.randomUUID(),n=n=>({type:`bot-thread-result`,chatId:e.chatId,requestId:t,ok:!1,error:n});return this.pending?Promise.resolve(n(`busy`)):new Promise(r=>{let i=setTimeout(()=>this.receive(n(`timeout`)),Jo);this.pending={chatId:e.chatId,requestId:t,settle:e=>{clearTimeout(i),this.pending=null,r(e)}};try{this.send({...e,requestId:t})}catch{this.receive(n(`offline`))}})}receive(e){e.requestId===this.pending?.requestId&&e.chatId===this.pending.chatId&&this.pending.settle(e)}reset(){let e=this.pending;e&&e.settle({type:`bot-thread-result`,chatId:e.chatId,requestId:e.requestId,ok:!1,error:`offline`})}};function Xo(e){return/^(.+)\/\d+$/.exec(e)?.[1]}var Zo=e=>Xo(e)!==void 0,Qo={Privacy:`隐私`,"Privacy masking":`隐私脱敏`,"Replace API keys and personal data with placeholders before requests leave this device, and restore them in replies. Original values stay in memory on this device only.":`请求离开本机前把 API Key 和个人信息换成占位符,回复中自动还原。原值只保存在本机内存里。`,"Applies to chats, compaction, bot members and helper requests.":`作用于会话、压缩、Bot 成员和各类辅助请求。`,Secrets:`密钥`,"API keys, tokens, private keys, passwords in URLs and config files.":`API Key、令牌、私钥、URL 和配置文件里的密码。`,"Detect secrets":`识别密钥`,"Recommended. Covers common vendor key formats.":`建议开启,覆盖常见厂商的 key 格式。`,"Send look-alike keys":`发送形似的假 key`,"Replace keys with fake keys of the same format instead of placeholders, so the model treats them as real keys.":`用格式相同的假 key 代替占位符,模型会把它当成真 key 处理。`,"Personal data":`个人信息`,"Detect personal data":`识别个人信息`,"Matches are validated (checksums, real domains) to limit false hits.":`命中会做校验(校验位、真实域名),减少误伤。`,Mask:`脱敏`,"Warn only":`只提醒`,Block:`拦截`,Email:`邮箱`,"Phone number":`手机号`,"ID card number":`身份证号`,"Bank card number":`银行卡号`,"IP address":`IP 地址`,"Custom rules":`自定义规则`,Words:`词语`,"One per line, case-insensitive. Project codenames, customer names…":`每行一个,不区分大小写。项目代号、客户名称等。`,"Prefixes or patterns":`前缀或正则`,"One per line. A prefix like corp_ or a regex like /INC-\\d{4}/i.":`每行一个。可以是前缀如 corp_,或正则如 /INC-\\d{4}/i。`,"Allow list":`允许名单`,"Never mask":`从不脱敏`,"Exact values, one per line. Team emails, test keys…":`完整值,每行一个。团队邮箱、测试 key 等。`,"Try it":`试一试`,"Runs locally. Nothing is remembered or sent anywhere.":`只在本地运行,不记住也不发送任何内容。`,"Paste some text, e.g. an .env file":`粘贴一段文本,例如 .env 文件`,"Nothing matched":`没有命中`,Records:`记录`,"Requested at":`请求时间`,"Auxiliary request":`辅助请求`,Compaction:`压缩`,Hits:`命中`,"Request blocked":`请求已拦截`,"No records yet":`暂无记录`,"Your message":`你的消息`,"Tool output":`工具输出`,"Tool arguments":`工具参数`,"Earlier replies":`之前的回复`,"Tool descriptions":`工具说明`,"Restored {{count}} in the reply":`回复中已还原 {{count}} 处`,"{{count}} values":`{{count}} 个值`,"Privacy masking blocks {{kinds}}. Remove it, or change the action or allow list in Settings → Privacy.":`隐私脱敏拦截了 {{kinds}}。请删掉它,或到「设置 → 隐私」调整动作或允许名单。`,"Will be blocked: {{kinds}}":`将被拦截:{{kinds}}`,"Emails, phone numbers, ID and bank card numbers, IP addresses.":`邮箱、手机号、身份证号、银行卡号、IP 地址。`,"Words and patterns specific to your work.":`与你的工作相关的词语和格式。`,"{{count}} will be masked":`发送时将脱敏 {{count}} 项`,"Classification only, not for chat":`仅用于分类,不能聊天`,"ChatGPT account selected":`已选择 ChatGPT 账号`,"ChatGPT account switched":`ChatGPT 账号已接替`,"ChatGPT account selected: {{account}}":`已选择 ChatGPT 账号:{{account}}`,"ChatGPT account switched: {{previous}} → {{current}}":`ChatGPT 账号已接替:{{previous}} → {{current}}`,"ChatGPT (automatic failover)":`ChatGPT(自动接替)`,"Create ChatGPT account pool":`创建 ChatGPT 自动接替池`,"Pool members":`接替账号`,"Use enabled, signed-in accounts in the listed order. Model and reasoning stay unchanged. Main agents and subagents share this pool.":`按列表顺序使用已启用且已登录的账号。模型和推理设置保持不变,主代理与子代理共用此池。`,"Account disabled":`账号已停用`,"Account signed out":`账号未登录`,"Pool entries do not show a single account quota. Fixed-account entries remain unchanged.":`自动接替池不显示单个账号额度,固定账号条目保持不变。`,"This reply can no longer be retried. Please send your request again.":`这条回复已无法重试,请重新发送需求。`,"Chat image storage is full (200MiB). Message not sent.":`群图片空间已满(200MiB),这条消息未发送。`,"An image is still over 10MiB after compression. Message not sent.":`图片压缩后仍超过 10MiB,这条消息未发送。`,"An attachment is not a supported image. Message not sent.":`附件不是支持的图片格式,这条消息未发送。`,"Could not save the images. Message not sent. Please try again.":`图片保存失败,这条消息未发送,请重试。`,"Add to favorites":`添加收藏`,Appearance:`外观`,"Bold font weight":`粗体字重`,"Terminal shell":`终端 Shell`,"System default":`系统默认`,"Applies to new side panel terminals. SSH projects keep the remote login shell.":`仅对新开的侧边栏终端生效。SSH 项目仍用远端登录 shell。`,"Worktree root directory":`Worktree 根目录`,"Where isolated session worktrees are created. Leave empty to use the app data directory. Existing worktrees stay where they are.":`隔离会话的 worktree 建在此目录下。留空则用应用数据目录。已有 worktree 不迁移。`,"Default location":`默认位置`,"Enter an absolute path":`请输入绝对路径`,"Choose interface theme":`选择界面主题`,"Accent color":`强调色`,"Highlight color used across the interface":`界面高亮使用的颜色`,"Follow theme":`跟随主题`,Theme:`主题`,"Built-in and plugin themes; each one is a set of color tokens":`内置与插件主题,每个主题是一组颜色 token`,"Plugin · {{name}}":`插件 · {{name}}`,"Get more themes":`获取更多主题`,Personalization:`个性化`,"Applied on top of any theme":`在任意主题之上覆盖`,"Used for running state, checkmarks and plan mode":`用于运行状态、勾选与计划模式`,"Custom CSS":`自定义 CSS`,"Inject user.css into every window; saved changes apply immediately":`把 user.css 注入所有窗口,保存即生效`,"Open user.css":`打开 user.css`,"Cannot open user.css":`无法打开 user.css`,Violet:`紫罗兰`,Indigo:`靛蓝`,Teal:`青绿`,Amber:`琥珀`,Graphite:`石墨`,"Color scheme":`配色方案`,Dark:`深色`,Font:`字体`,"Font size":`字号`,"Font weight":`字重`,General:`通用`,"General application settings":`应用通用设置`,"File opening":`文件打开`,"Context menu opening":`右键打开方式`,"File manager":`文件管理器`,"VS Code":`VS Code`,"Change application":`更换应用`,"Configure list":`配置列表`,"Add application":`添加应用`,"Open in {{app}}":`在 {{app}} 中打开`,"No opening methods enabled":`未启用打开方式`,"You can configure up to 32 opening methods.":`最多可配置 32 项打开方式。`,"Select the opening methods shown in file link context menus. You can add multiple applications.":`勾选文件链接右键菜单中显示的打开方式,可添加多个应用。`,"Configure how local workspace file links open by extension.":`按扩展名配置本地工作区文件链接的打开方式。`,"By default, supported files open inside EnsoCode; other files are revealed in the file manager.":`默认在 EnsoCode 内打开支持的文件,其他文件在文件管理器中显示。`,"Executable and installer files are always revealed in the file manager.":`可执行文件和安装包始终在文件管理器中显示。`,"File extension":`文件扩展名`,"Open inside EnsoCode":`在 EnsoCode 内打开`,"Reveal in file manager":`在文件管理器中显示`,"System default application":`系统默认应用`,"Selected application":`指定应用`,"Choose application":`选择应用`,"The selected application path is invalid.":`所选应用路径无效。`,"VS Code is unavailable. Install it or select another application.":`未找到 VS Code,请安装或选择其他应用。`,"Enter a valid file extension, for example .md.":`请输入有效的文件扩展名,例如 .md。`,"This extension does not support internal preview.":`此扩展名不支持内部预览。`,"Choose an application before saving this rule.":`保存此规则前请选择应用。`,"This extension already has an opening rule.":`此扩展名已有打开规则。`,"Image preview":`图片预览`,"This file format cannot be previewed inside EnsoCode.":`此文件格式无法在 EnsoCode 内预览。`,"The image is too large to preview.":`图片过大,无法预览。`,Updates:`更新`,"Application update settings":`应用更新设置`,"Current version":`当前版本`,"Check for updates":`检查更新`,"Checking for updates…":`正在检查更新…`,"New version {{version}} found":`发现新版本 {{version}}`,"You are on the latest version":`已是最新版本`,"Downloading update… {{percent}}%":`正在下载更新… {{percent}}%`,"New version {{version}} is ready — restart to update.":`新版本 {{version}} 已就绪 —— 重启以更新。`,"Update check failed":`检查更新失败`,"Restart to update":`重启更新`,"Restart now":`立即重启`,"Will restart to update {{version}} when the running turns finish.":`当前回合结束后将自动重启并更新到 {{version}}。`,"Continued {{count}} conversation(s) interrupted by the update":`已从断点继续 {{count}} 个因更新中断的会话`,"Update failed: {{error}}":`更新失败:{{error}}`,"Download update":`下载更新`,"Release notes":`更新日志`,"What's new in {{version}}":`{{version}} 更新内容`,"No release notes provided.":`此版本未提供更新日志。`,Restart:`重启`,"Restart server":`重启服务端`,"Restart server?":`重启服务端?`,"Running tasks are interrupted; this page reconnects after the server is back.":`正在运行的任务会被中断,服务端起来后本页会自动重连。`,"Server updates install the new version with npm and restart.":`服务端(npm 全局安装):用 npm 安装新版本后重启。`,"This server must be updated on the machine itself.":`这台服务端无法远程更新,请在服务器上执行 npm i -g @ensocode/server。`,"Automatic updates":`自动更新`,"Download and install updates automatically":`自动下载并安装更新`,"Restart and apply when idle":`空闲时重启并应用更新`,"After the update is downloaded, restart automatically if no agent is running, nothing is queued, and there are no pending questions or approvals. The idle state must last 5 minutes, and a focused window also blocks it.":`更新下载完成后,没有 agent 在跑、没有排队消息、也没有待回答/待审批时自动重启。该状态需连续保持 5 分钟;窗口在前台时也会拦住。`,"Network proxy":`网络代理`,"Used by model requests, the built-in browser, and agent tools":`作用于模型请求、内嵌浏览器和 agent 工具`,"Proxy mode":`代理模式`,"Follow system proxy":`跟随系统代理`,"No proxy":`不使用代理`,"Custom proxy":`自定义代理`,"Proxy URL":`代理地址`,"Enter an http(s) proxy URL":`请输入 http(s) 代理地址`,"Custom CA certificate":`自定义 CA 证书`,"Trust an extra CA (PEM file) for model endpoints signed by a private CA. TLS verification stays on.":`为私有 CA 签发的模型接口额外信任一个 CA(PEM 文件),TLS 校验保持开启。`,"Choose certificate file":`选择证书文件`,"Set: {{path}}":`已设置:{{path}}`,"Using NODE_EXTRA_CA_CERTS from the launch environment: {{path}}":`已使用启动环境中的 NODE_EXTRA_CA_CERTS(优先于此设置):{{path}}`,"Not set; using NODE_EXTRA_CA_CERTS from the login shell: {{path}}":`未设置,使用登录 shell 中的 NODE_EXTRA_CA_CERTS:{{path}}`,"Certificate file unavailable ({{reason}}): {{path}}":`证书文件不可用({{reason}}):{{path}}`,"Path must be absolute":`须为绝对路径`,"File not found":`文件不存在`,"Not a file":`不是文件`,"File is not readable":`文件不可读`,"Changes restart the agent process right away (running turns are interrupted). Requests made by the app main process take effect after restarting the app.":`修改后会立即重启 Agent 进程(进行中的回合会中断);主进程侧需重启应用生效。`,Shortcuts:`快捷键`,"Click a shortcut to rebind it. Backspace removes it; Esc cancels.":`点击键位改绑。Backspace 删除;Esc 取消。`,"Remove shortcut":`删除快捷键`,"No shortcut":`无快捷键`,"Toggle sidebar":`折叠/展开侧栏`,"Open settings":`打开设置`,"Switch model":`切换模型`,"Focus chat input":`聚焦输入框`,"Find in conversation":`在对话中查找`,"Search workspace":`搜索工作区`,"Search anything":`搜索任意内容`,"Search conversations...":`搜索会话...`,"Search conversations, browser tabs, settings…":`搜索对话、浏览器标签、设置…`,"Search all projects":`搜索全部项目`,"Switch scope":`切换范围`,Navigate:`选择`,Open:`打开`,"No matching results":`没有匹配结果`,Conversations:`对话`,"This project":`当前项目`,"All projects":`全部项目`,"Include archived":`含归档`,Current:`当前`,Recent:`最近`,"No projects active in the last {{n}} days":`最近 {{n}} 天没有活跃项目`,"No projects in this group yet":`这个分组还没有项目`,Actions:`动作`,"No matching conversations":`没有匹配的会话`,"Search messages...":`搜索消息...`,"Only when the chat input is focused":`仅在输入框聚焦时生效`,"Send message":`发送消息`,"Next coworker tab":`下一个 coworker 标签`,"Previous coworker tab":`上一个 coworker 标签`,"Press shortcut…":`按下新快捷键…`,'Already used by "{{label}}"':`已被「{{label}}」占用`,"Reset to default":`恢复默认`,Language:`语言`,"Windows local command shell":`Windows 本地命令壳`,"Only the Windows local agent command tool. SSH and other platforms stay on bash. Takes effect on the next session.":`只影响 Windows 本机 agent 命令工具。SSH 与其它平台仍用 bash。下次开会话生效。`,"Windows default (PowerShell)":`Windows 默认(PowerShell)`,PowerShell:`PowerShell`,"Git Bash":`Git Bash`,Light:`浅色`,"No favorite themes yet. Click the heart icon to add favorites.":`暂无收藏主题。点击爱心图标添加收藏。`,"No themes found":`未找到主题`,Preview:`预览`,"Remove from favorites":`取消收藏`,"Search themes...":`搜索主题...`,Settings:`设置`,"Search settings":`搜索设置`,Application:`应用`,"Models & agents":`模型与智能体`,"Tools & extensions":`工具与扩展`,Connections:`连接`,"Show favorites only":`只显示收藏`,"Sync terminal theme":`同步终端主题`,System:`系统`,Terminal:`终端`,"Conversation display":`对话显示`,"Conversation typography":`会话排版`,"Headings, tables and inline code scale with the body text":`标题、表格与行内代码按正文比例缩放`,Body:`正文`,"Heading 1":`一级标题`,"Heading 2":`二级标题`,"Heading 3":`三级标题`,"Heading 4–6":`四到六级标题`,Table:`表格`,"Inline code":`行内代码`,"Code block":`代码块`,"Reset to defaults":`恢复默认`,"Agent runtime":`Agent 运行`,"Sessions & worktrees":`会话与 Worktree`,"Collaboration & planning":`协作与规划`,Web:`联网`,Execution:`执行`,"Context & memory":`上下文与记忆`,Safety:`安全`,Changes:`改动`,Session:`会话`,Git:`Git`,"Git views":`Git 视图`,"Staged changes":`已暂存`,"Unstaged changes":`未暂存`,"Untracked changes":`未跟踪`,"Changed files":`改动文件`,"List view":`列表视图`,"Tree view":`树状视图`,"Collapse list":`收起列表`,"Expand list":`展开列表`,"No matching files.":`没有匹配的文件。`,Stage:`暂存`,Unstage:`取消暂存`,"Stage all":`暂存全部`,"Unstage all":`取消全部暂存`,"Discard changes":`丢弃修改`,"Delete untracked file":`删除未跟踪文件`,"Delete untracked file {{path}} permanently?":`永久删除未跟踪文件 {{path}}?`,"Restore {{path}} to its staged version? Unstaged changes will be lost.":`将 {{path}} 恢复为暂存版本?未暂存的修改将丢失。`,"Commit message":`提交信息`,"Enter commit message…":`输入提交信息…`,"{{count}} staged files":`已暂存 {{count}} 个文件`,Commit:`提交`,Fetch:`获取远程更新`,Pull:`拉取`,Push:`推送`,"No upstream":`未关联上游`,"No upstream branch configured.":`当前分支未关联上游分支。`,"Working tree clean.":`工作区没有改动。`,"Filter changed files…":`筛选改动文件…`,"Workspace is changing. Please wait.":`工作区正在切换,请稍候。`,"Could not read Git status.":`读取 Git 状态失败。`,"Could not complete the Git operation.":`Git 操作失败。`,"Could not load Git history.":`加载提交历史失败。`,"Could not load the changed files.":`加载改动文件失败。`,"Could not load the diff.":`加载差异失败。`,"Could not load the diff viewer.":`加载差异查看器失败。`,"Select a file to view its diff.":`选择文件查看差异。`,"No text changes to display.":`没有可显示的文本差异。`,"Only line endings changed.":`仅换行符发生变化。`,"No commits yet.":`暂无提交。`,"No file changes in this commit.":`该提交没有文件改动。`,"Load more commits":`加载更多提交`,added:`新增`,modified:`修改`,deleted:`删除`,untracked:`未跟踪`,conflicted:`冲突`,Browser:`浏览器`,"New tab":`新建标签页`,Soon:`即将支持`,Forward:`前进`,"Enter a URL":`输入网址`,"Navigation failed":`导航失败`,"Agent is browsing":`Agent 正在操作`,"Take control":`接管`,"Enso is in control":`Enso 正在接管`,"Toggle Developer Tools":`开关开发者工具`,"Toggle Design Mode":`开关圈选模式`,"Selected UI element":`圈选的界面元素`,"No Composer for this selection":`没有可接收圈选的输入框`,"Add to conversation":`添加到对话`,"Browser data":`浏览器数据`,"RTK command compression":`RTK 命令压缩`,"Compress supported command output before it enters the model context. Takes effect on new conversations.":`在受支持的命令输出进入模型上下文前进行压缩。新会话生效。`,"Protected action confirmation":`受保护操作确认`,"Even in full-access mode, ask before external sends, deletions, payments, deployments and secret-file access. Always on for Bot members not set to Full access. Takes effect on new conversations.":`即使在完全放行模式下,对外发送、删除、付款、部署和访问密钥文件前也要求确认。非完全放行的 Bot 成员始终开启。新会话生效。`,"Protected actions will not ask for confirmation either.":`受保护操作也不再询问。`,"Protected: external send":`受保护:对外发送`,"Protected: delete":`受保护:删除`,"Protected: payment":`受保护:付款`,"Protected: deploy / production":`受保护:部署 / 生产`,"Protected: secrets":`受保护:密钥`,"Protected: destructive command":`受保护:破坏性命令`,"dcg: {{reason}}":`dcg:{{reason}}`,"Destructive command guard (dcg)":`破坏性命令守卫(dcg)`,"Check bash and PowerShell commands with dcg before running. Matches such as git reset --hard or recursive deletes always require your confirmation, even in full-access mode. Takes effect on new conversations.":`执行 bash 和 PowerShell 命令前先用 dcg 检查。命中 git reset --hard、递归删除等危险命令时,即使在完全放行模式下也必须由你确认。新会话生效。`,"Not available on this platform":`当前平台不可用`,"Installed v{{version}}":`已安装 v{{version}}`,"Not installed":`未安装`,Install:`安装`,Uninstall:`卸载`,OK:`好`,Integrations:`集成`,"Install 'enso' Command in PATH":`在 PATH 中安装 enso 命令`,"Install Finder Quick Action":`安装访达快速操作`,"'enso' terminal command":`enso 终端命令`,"Finder Quick Action":`访达快速操作`,"Couldn't install the 'enso' command":`无法安装 enso 命令`,"Shell command 'enso' installed in {{dir}}.":`已在 {{dir}} 安装 enso 命令。`,"Run `enso .` in a terminal to open the current folder in EnsoCode.":"在终端运行 `enso .` 即可用 EnsoCode 打开当前目录。","Run `enso .` in a terminal to open the current folder in EnsoCode. Links the command into /usr/local/bin and may ask for your password.":"在终端运行 `enso .` 即可用 EnsoCode 打开当前目录。会把命令链接到 /usr/local/bin,可能需要输入密码。","Couldn't install the Finder Quick Action":`无法安装访达快速操作`,"Finder Quick Action installed.":`访达快速操作已安装。`,"Right-click a folder in Finder and choose Services > Open with EnsoCode.":`在访达中右键文件夹,选择「服务」>「用 EnsoCode 打开」。`,"Installing…":`安装中…`,"Operation failed":`操作失败`,"Install dcg":`安装 dcg`,"Downloads dcg v{{version}} from its GitHub release and verifies the checksum. dcg is a third-party tool, not part of EnsoCode.":`从 GitHub Release 下载 dcg v{{version}} 并校验 sha256。dcg 是第三方工具,不属于 EnsoCode。`,"dcg is licensed under MIT with an additional rider: no rights are granted to OpenAI, Anthropic, their affiliates, or anyone acting on their behalf. Install only if this restriction does not apply to you.":`dcg 使用附加限制条款的 MIT 许可证:不授予 OpenAI、Anthropic 及其关联方或代表它们行事的任何人任何权利。仅在该限制不适用于你时安装。`,"Agree and install":`同意并安装`,"Memory write":`记忆写入`,"Secrets redacted":`已脱敏密钥`,"Memory writes awaiting approval":`待批准的记忆写入`,"Bot members need your approval before writing to project or global memory.":`Bot 成员写入项目或全局记忆前需要你批准。`,Compressed:`已压缩`,Unchanged:`未改变`,"Background task started":`后台任务已启动`,Bypassed:`已绕过`,Unavailable:`不可用`,"This is the startup receipt; see the task_output result for final statistics.":`此处为启动回执,最终统计见 task_output 的结果。`,"~{{count}} tokens saved":`约节省 {{count}} tokens`,"Input estimate":`输入估算`,"Output estimate":`输出估算`,"{{count}} tokens":`{{count}} tokens`,Reason:`原因`,"Cookies and site storage of the built-in browser, separate from the app itself.":`内嵌浏览器的 Cookie 与站点存储,与应用本身隔离。`,"Open chat links in the built-in browser":`对话链接在内嵌浏览器打开`,"Clicking a web link in chat opens it in the side panel browser. {{key}}+Click opens it in the external browser.":`点击对话里的网页链接会在侧栏内嵌浏览器打开;{{key}}+点击在外部浏览器打开。`,"{{key}}+Click to open in external browser":`{{key}}+点击在外部浏览器打开`,Cleared:`已清除`,"Clear cookies":`清除 Cookie`,"Clear cache":`清除缓存`,"Clear all browsing data":`清除全部浏览数据`,"Enter a URL above, or let the agent open a page with browser_navigate.":`在上方输入网址,或让 agent 用 browser_navigate 打开页面。`,"Search...":`搜索…`,"Case sensitive":`区分大小写`,"Whole word":`全词匹配`,"Regular expression":`正则`,"Previous match":`上一个`,"Next match":`下一个`,"Use full chat width":`铺满两侧`,"Use reading width":`恢复两侧留白`,"Toggle side panel":`折叠/展开右侧面板`,"Toggle side panel fullscreen":`右侧面板全屏`,"Toggle minimize to tray":`切换最小化到托盘`,"Works while the app is in the tray":`应用在托盘时也能切换`,"Expand side panel":`全屏右侧面板`,"Exit side panel fullscreen":`退出右侧面板全屏`,"New terminal tab":`新建终端标签`,"New terminal when the side panel is focused; otherwise new conversation":`焦点在右侧边栏时新建终端,否则新建会话`,"Close terminal tab":`关闭终端标签`,"Collapse side panel":`折叠右侧面板`,"Select a conversation to use the side panel.":`选择一个会话后使用右侧面板。`,"No tabs yet. Create one to get started.":`还没有标签页,新建一个开始使用。`,"Open Changes when files are edited":`有文件改动时打开 Changes`,"Automatically show the side panel Changes tab after the agent edits a file":`Agent 改文件后自动打开右侧 Changes`,"Open in side panel":`在侧栏打开`,"Compact read-only tool calls":`精简只读工具调用`,"Expand file edits while running":`运行中自动展开文件改动`,"Automatically unfold diffs or written content from file modification tools while the agent is still running":`agent 运行中,文件修改工具的 diff 或写入内容自动展开`,"Expand reasoning while streaming":`流式推理时自动展开`,"Automatically unfold the thinking block while the model is still reasoning. It collapses again when reasoning ends.":`模型思考时自动展开推理内容;思考结束后仍自动收起`,"Context compaction strategy":`上下文压缩策略`,"Standard uses default compact. Smart compaction uses Enso verified summary at compact time. Codex native compaction additionally stores an official Codex checkpoint on Codex models and uses smart compaction otherwise. Continuous memory records observations in the background so compact keeps more context; all fall back to default compact on failure. Switching strategy takes effect on the next session. The summary model and compaction mode apply to open conversations on the next compaction.":`标准使用默认压缩。智能压缩在压缩时用 Enso 验证式摘要。Codex 原生压缩在 Codex 模型上额外保存官方 Codex checkpoint,其他模型按智能压缩处理。持续记忆在后台持续记录观察,压缩时保留更多上下文;失败都回退默认压缩。切换策略从下一个会话生效。摘要模型和压缩档位对已打开的对话在下一次压缩时用最新设置。`,Standard:`标准`,"Smart compaction":`智能压缩`,"Codex native compaction":`Codex 原生压缩`,"Continuous memory (experimental)":`持续记忆(实验性)`,"Summary model":`摘要模型`,"Background memory model":`后台记忆模型`,"Compaction mode":`压缩档位`,"Auto (by usage)":`自动(按占用)`,Fast:`快速`,Balanced:`均衡`,Thorough:`详尽`,"Mode changes summary budget and how much recent tail to keep. It does not decide whether compact runs.":`档位只影响摘要细致和留多长尾巴,不决定是否压缩。`,"Follows the session model":`跟随当前会话模型`,"Follow session model":`改跟会话模型`,"Selected model is unavailable — falls back to the session model.":`所选模型已不可用——将回退到当前会话模型。`,"Show read/grep/find/ls as one-line rows and fold consecutive tool calls while the agent is still running":`read/grep/find/ls 显示为单行,agent 运行中也折叠连续的工具调用`,"Auto-collapse previous turns":`自动折叠历史轮次`,"Collapse activity after reply":`回答完成后折叠过程`,"Collapse finished activity while replying":`过程中折叠已完成的调用`,"Wait before folding":`折叠前等待`,"Seconds to wait after tools and thinking finish":`工具和思考都结束后再等这么多秒`,sec:`秒`,"Pin unfinished todos":`固定显示未完成待办`,"Turn marks":`轮次刻度`,"Marks along the conversation for each turn. Hover to preview, click to jump. Hidden when the chat uses the full width.":`对话旁边的轮次刻度。悬停预览,点击跳转。聊天铺满宽度时不显示。`,Left:`左`,Right:`右`,"Keep the latest todo list above the input while it has unfinished items, so it does not scroll away with the timeline":`最新任务清单还有未完成项时,固定显示在输入框上方,不随时间线滚走`,"Hide until the todo list updates":`隐藏,清单更新后再显示`,"When a reply finishes, fold consecutive thinking and tool calls (including edits and commands) into one summary row; failed calls stay visible":`回答结束后,把连续的思考和工具调用(包括编辑、命令)折成一行摘要;失败的调用仍单独显示`,"While a reply is still running, wait a moment after tools and thinking finish, then fold that stretch into one row. Calls still running stay visible, and failed calls stay visible":`回答还在进行时,工具和思考都结束后稍等片刻,把这一段折成一行。正在跑的调用不收,失败的调用仍单独显示`,"Worked for {{duration}}":`已工作 {{duration}}`,"{{count}} thinking steps":`{{count}} 段思考`,Activity:`过程`,"After you send a new message, fold earlier turns down to the question, timestamp and duration; the latest turn stays expanded":`发送新消息后,之前的轮次只保留提问、时间与用时;最后一轮保持展开`,"Notify only for the main agent":`仅主 agent 发送完成通知`,"Skip coworker completion and failure notifications on this computer and the paired phone. Questions and approvals still notify.":`coworker 的回合完成和失败不弹桌面或手机通知。提问和审批仍会提醒。`,"Stop if no output":`无输出则停止`,"Abort and retry the run when no tokens or tool results arrive for this long. Thinking counts as output.":`超过此时长没有 token 或工具结果就中止并重试。思考输出也算有输出。`,Never:`永不`,"{{count}} min":`{{count}} 分钟`,"Compaction reserve tokens":`压缩预留 token`,"Decision models only allow or block when highly confident. Everything else asks you.":`决策模型只在把握很高时才自动放行或拦截,其余都交给你审批。`,"The assistant approval classifier is unavailable.":`助手代审的决策模型不可用。`,"Auto-manage approvals":`全自动托管`,"Auto-allow threshold":`自动放行阈值`,"0.85 (looser)":`0.85(偏松)`,"0.9 (default)":`0.9(默认)`,"0.95 (stricter)":`0.95(偏严)`,"Only runs automatically when the allow probability reaches this value. Operations near the threshold may be allowed one time and not the next.":`放行概率达到该值才自动执行。概率在阈值附近的操作,可能这次放行、下次不放行。`,"Auto-managed: runs only when the decision model is highly confident it is safe. Everything else is denied and the agent tries another way. Protected actions still ask you.":`托管中:只有决策模型高度确信安全的操作才会执行,其余直接拒绝,由 AI 换一种做法继续。受保护操作仍会问你。`,"Auto-managed · allowed":`托管 · 已放行`,"Auto-managed · denied":`托管 · 已拒绝`,"Read-only":`只读`,"Regenerable output":`可再生成`,"Reversible workspace change":`工作区内可回退的改动`,"Possible data loss":`可能丢失数据`,"Changes system state":`改动系统状态`,"Sends data externally":`向外发送数据`,"Unclear target or intent":`目标或意图不明`,"Auto-managed review timed out. Please decide.":`托管判定超时,请你来决定。`,"Auto-managed review failed. Please decide.":`托管判定出错,请你来决定。`,"Auto-managed review returned no valid decision. Please decide.":`托管判定结果无效,请你来决定。`,"Compaction runs when context exceeds the model window minus this value. Larger values compact earlier. Do not set it close to the window of small-context models, or every request compacts first. Leave empty for the default.":`上下文超过「模型窗口 − 此值」时触发压缩,值越大压缩越早。小窗口模型请勿设得过大,接近窗口会导致每次请求前都先压缩。留空使用默认值。`,"Enter a whole number between {{min}} and {{max}}, or leave it empty.":`请输入 {{min}} 到 {{max}} 之间的整数,或留空。`,"Could not save. Check that pi-agent/settings.json is valid JSON.":`保存失败,请检查 pi-agent/settings.json 是否为合法 JSON。`,"Keep in Active after last message":`活跃中留存时长`,"Stays in Active for about {{count}} more min":`活跃中还会保留约 {{count}} 分钟`,"Viewed conversations stay in Active for this long after their last message or your last open while still in Active, then leave. Unviewed ones stay until you open them.":`从最后一条消息或在「活跃中」时最后一次点开算起,此时长内即使已查看也保留,超时后移出;未查看的仍保留到你点开。`,"Auto-retry on transient errors":`瞬态错误自动重试`,"Retry with backoff (up to 60s apart) after 429, 5xx or network errors. Quota and billing errors are never retried. Unlimited keeps retrying until you cancel.":`遇到 429、5xx 或网络错误时退避重试(间隔最长 60 秒)。额度与计费错误不重试。选「无限」会一直重试,直到手动取消。`,"Retry count after 429, 5xx or network errors; off, fixed count or unlimited":`429、5xx 或网络错误后的重试次数:关闭、固定次数或无限`,Unlimited:`无限`,"{{count}} times":`{{count}} 次`,"{{count}} day":`{{count}} 天`,"{{count}} days":`{{count}} 天`,"Archive idle conversations":`归档闲置会话`,"Move conversations that have been idle this long into Archived. Does not delete them.":`将闲置超过此天数的会话移入已归档,不会删除。`,"Clean up merged worktrees":`清理已合并 worktree`,"When archiving idle conversations, also remove isolated worktrees that are merged and clean.":`归档闲置会话时,一并清理已合并且干净的隔离 worktree。`,"Delete archived conversations after":`归档超过此天数后删除`,"Permanently delete conversations that have been archived longer than this. This cannot be undone. Choosing a positive value deletes already-overdue archived conversations immediately.":`永久删除归档超过此天数的会话,不可恢复。改成正数会立即删除已超期的归档。`,"No output for {{minutes}} minutes — retrying":`{{minutes}} 分钟没有输出,正在重试`,"Stopped after repeated stalls":`多次卡住后已停止`,"No file changes in this conversation yet.":`本会话还没有文件改动。`,"No changes relative to HEAD.":`相对 HEAD 没有改动。`,"Collapse all":`全部折叠`,"Expand all":`全部展开`,"Not a git repository.":`不是 git 仓库。`,"Git diff is not available for this workspace.":`当前工作区不支持 Git diff。`,"Terminal appearance":`终端外观`,"Theme mode":`主题模式`,"Background image":`背景图`,"Show a custom image behind the interface":`在界面背后显示自定义背景图`,"The current theme has its own background. Turn this on to replace it with your image.":`当前主题自带背景,开启后用你的图片替换`,"Source type":`来源类型`,"Single image":`单张图片`,"Folder (random)":`文件夹(随机)`,"Remote URL":`网络图片`,"Image path":`图片路径`,"Folder path":`文件夹路径`,"Image URL":`图片地址`,"Auto switch":`自动切换`,seconds:`秒`,"Refresh now":`立即刷新`,"Background visibility":`背景可见度`,"Composer opacity":`输入框不透明度`,"Border opacity":`边框不透明度`,"Code block opacity":`代码块不透明度`,Blur:`模糊`,Brightness:`亮度`,Saturation:`饱和度`,Overlay:`遮罩`,"Size mode":`填充方式`,Cover:`覆盖`,Contain:`完整显示`,Repeat:`平铺`,Center:`居中原图`,Search:`搜索`,"No results":`无匹配结果`,"Semantic similarity":`语义相似度`,"Preset is locked after the conversation starts":`对话开始后预设已锁定,不能中途替换`,Path:`路径`,"Welcome to EnsoCode":`欢迎使用 EnsoCode`,"Import your providers and assets from local AI apps to get started. You can skip any step.":`从本地 AI 应用导入模型服务与资源即可开始,每一步都可跳过。`,"Sign in with a provider subscription, or import API providers from local AI apps":`使用订阅账号登录,或从本地 AI 应用导入 API 服务`,"Import skills from Claude Code, Codex or Cursor":`从 Claude Code、Codex 或 Cursor 导入技能`,"Scan and import":`扫描并导入`,"{{count}} imported":`已导入 {{count}} 个`,"All set":`全部就绪`,"You can always import more from Settings later.":`之后随时可在设置里导入更多。`,Back:`上一步`,Skip:`跳过`,Next:`下一步`,"Get started":`开始`,Close:`关闭`,Minimize:`最小化`,Maximize:`最大化`,Restore:`还原`,"No new providers imported":`没有新导入的模型服务`,"Fetch models for each provider, then enable the ones you want.":`为每个模型服务拉取模型,再启用你需要的。`,"Fetch failed":`拉取失败`,"No models yet":`暂无模型,点击拉取`,"Bundle skills, MCP servers and an instruction file into a preset (optional)":`把技能、MCP 服务和一份指令组合成预设(可选)`,"Give subagents their own model, skills and MCP servers (optional)":`为子代理配置专属模型、技能与 MCP 服务(可选)`,"{{count}} presets":`已有 {{count}} 个预设`,"Model Providers":`模型中心`,"Manage model API providers for this app":`管理应用的模型 API 服务`,"Import from local apps":`从本地应用导入`,"Scan providers configured in local AI apps and import them.":`扫描本机 AI 应用中已配置的模型服务并导入。`,"Scanning local apps...":`正在扫描本地应用...`,"Scan failed":`扫描失败`,Rescan:`重新扫描`,"No local apps detected":`未检测到本地应用`,"Supported: Claude Code, Codex, CC Switch, Alma, Cherry Studio, Hermes, OpenClaw, Grok CLI, Cursor":`支持:Claude Code、Codex、CC Switch、Alma、Cherry Studio、Hermes、OpenClaw、Grok CLI、Cursor`,"No importable providers found":`未发现可导入的模型服务`,"Already exists":`已存在`,"{{count}} models":`{{count}} 个模型`,"{{count}} selected":`已选 {{count}} 项`,"Import selected":`导入所选`,Done:`完成`,"No providers yet":`暂无模型服务`,"Import providers from local apps or add one manually to get started":`从本地应用导入或手动添加模型服务以开始使用`,"Add provider":`添加服务`,"Add Provider":`添加模型服务`,"Subscription login":`订阅登录`,"Sign in with provider subscriptions (SuperGrok, Claude Pro, ChatGPT, etc.)":`使用订阅账号登录(SuperGrok、Claude Pro、ChatGPT 等)`,"Add account":`添加账号`,"{{count}} accounts":`{{count}} 个账号`,"Log out":`退出登录`,"Starting login...":`正在启动登录…`,"Complete authorization in your browser":`请在浏览器中完成授权`,"Open authorization page":`打开授权页面`,"Enter code":`输入代码`,"Verifying...":`正在验证…`,"resets {{time}}":`{{time}} 重置`,Submit:`提交`,"Edit Provider":`编辑模型服务`,Name:`名称`,"API Type":`API 类型`,"Base URL":`Base URL`,"API Key":`API Key`,Models:`模型`,"Add a model id":`添加模型 ID`,"Filter models...":`筛选模型...`,"Filter skills...":`筛选技能...`,"Filter MCP servers...":`筛选 MCP...`,"Filter projects...":`筛选项目...`,"No models match":`没有匹配的模型`,"Enable all":`全部启用`,"Disable all":`全部禁用`,Enable:`启用`,Disable:`禁用`,"Select all":`全选`,"Deselect all":`全不选`,"{{enabled}}/{{total}} enabled":`已启用 {{enabled}}/{{total}}`,"Fetch models":`拉取模型`,"Fetch all models":`拉取全部模型`,"Refresh model info":`刷新模型信息`,"Refresh all models and info":`拉取全部模型与模型信息`,"Model info updated":`模型信息已更新`,"Model info refresh failed, using cache":`模型信息刷新失败,仍使用缓存`,"Model info refresh failed":`模型信息刷新失败`,"Fetched {{count}} providers":`已拉取 {{count}} 个模型服务`,"Test connection":`测试连接`,Authorize:`授权`,Authorizing:`授权中...`,"Revoke authorization":`取消授权`,Connecting:`连接中`,"Not authorized":`未授权`,"Authorized, pending connection":`已授权,待连接`,"Authorized. Conversations that already include this server can use it on the next message.":`已授权。已包含该服务器的对话,下一条消息即可使用。`,"New sessions only":`新会话生效`,"Open sessions keep the previous setting; it applies once you start a new session.":`已打开的会话保持原设置,新建会话后生效。`,"Settings without this tag take effect immediately.":`没有此标签的设置修改后立即生效。`,"Isolated sandbox switches between script and tool-search mode, so open sessions keep the mode they started with.":`隔离沙箱决定会话用脚本模式还是工具检索模式,已打开的会话保持启动时的模式。`,"The / menu updates right away, but open sessions keep the skills they loaded. Start a new session to load the change.":`输入框的 / 菜单会立即更新,但已打开的会话仍使用原来加载的技能,新建会话后才会加载改动。`,"The file panel and terminal use the change right away. Agents in open sessions keep the previous connection settings.":`文件面板和终端立即使用新配置;已打开会话里的代理仍使用原来的连接配置。`,"Newly enabled models can be picked right away. After changing a key or address, an open session uses it once you switch its model or start a new session.":`新启用的模型可以立即选用;修改 API Key 或地址后,已打开的会话需切换一次模型或新建会话才会使用。`,"Always loaded":`常驻`,"On demand":`按需`,"Load mode":`加载方式`,"On demand: tool descriptions are not preloaded into context; the model connects through the mcp tool when needed. Suits servers with many or rarely used tools. Takes effect in new conversations.":`按需:不预先把工具说明放进上下文,模型用到时经 mcp 工具连接;适合工具多、不常用的 server。新会话生效。`,"{{count}} tools":`{{count}} 个工具`,Fetching:`拉取中...`,Testing:`测试中...`,"Fetched {{count}} models":`拉取到 {{count}} 个模型`,"Connected ({{ms}}ms)":`连接成功({{ms}}ms)`,"Connection failed":`连接失败`,Cancel:`取消`,"Confirm exit":`确认退出`,"Exit closes the app completely, so your phone can no longer connect. Minimize to tray keeps the app running in the background so your phone can still connect.":`退出会完全关闭应用,手机将无法连接。最小化到托盘后应用会在后台继续运行,手机仍可连接。`,"Minimize to tray":`最小化到托盘`,Exit:`退出`,"Add a provider subscription or API Key, or import providers from local AI apps":`添加提供商订阅或 API Key,也可从本地 AI 应用导入模型服务`,"Add model or provider":`添加模型 / 提供商`,"Import providers from local apps or use the unified setup to get started":`从本地应用导入模型服务,或使用统一向导开始配置`,"Choose a provider first. You will select subscription or API Key next.":`请先选择提供商,下一步再选择订阅或 API Key。`,"Choose how to connect":`选择连接方式`,Subscription:`订阅`,"Provider subscription":`提供商订阅`,"ChatGPT (PI login)":`ChatGPT(PI 登录)`,"Sign in in your browser and use your subscription account.":`在浏览器中登录并使用订阅账号。`,"Configure an endpoint and key, then fetch or test its models.":`配置端点和密钥后,再拉取或测试模型。`,"Authorization failed":`授权失败`,"Authorizing {{provider}}":`正在授权 {{provider}}`,"Enter this code in your browser":`请在浏览器中输入此代码`,"Enter the code in your browser":`请在浏览器中输入代码`,"Open authorization page again":`重新打开授权页面`,"Cancel authorization":`取消授权`,"Subscription authorization":`订阅授权`,"No subscription account connected":`尚未连接订阅账号`,"Authorize this provider to add its available models.":`授权此提供商,以添加其可用模型。`,"Connect subscription":`连接订阅`,"Add another account":`添加其他账号`,"Import from Codex":`从 Codex 导入`,"Codex login not found. Sign in to Codex Desktop or CLI first.":`未找到 Codex 登录态,请先在 Codex Desktop 或 CLI 中登录。`,"Codex is not signed in with a ChatGPT account.":`Codex 未使用 ChatGPT 账号登录。`,"This ChatGPT account is already connected.":`该 ChatGPT 账号已连接。`,"Resets {{time}}":`{{time}} 后重置`,Local:`本地`,"Default model":`默认模型`,"Used for new conversations.":`用于普通新对话。`,"Follow last selection":`跟随最后一次选择`,"New conversations use the last model you picked.":`新对话使用你上次选择的模型。`,"Used for new conversations in this project.":`用于本项目的新对话。`,"Used for new conversations in this group.":`用于本组的新对话。`,"Project settings":`项目设置`,"Default model for {{name}}":`{{name}} 的默认模型`,"Follows group, then global default":`跟随分组默认,再跟随全局默认`,"Follows the global default":`跟随全局默认`,"Follow global built-in tools":`跟随全局内置工具`,"When off, configure built-in tools for this project. They override the global setting on the next session.":`关闭后可为本项目单独配置内置工具,优先级高于全局,下次会话生效。`,"Session choice overrides the project default.":`会话里手动选的模型优先于项目默认。`,"Conversation title summary":`会话标题总结`,"Generate a short AI title from the first message of a new conversation.":`新会话发出首条消息后,用 AI 自动生成简短标题。`,"Follows the default model":`跟随默认模型`,"Follow default model":`改跟默认模型`,"Use the default model":`使用默认模型`,"Summarizing title":`标题总结中`,"Title summary failed":`标题总结失败`,"Click to retry":`点击重试`,"Selected model is unavailable — falls back to the default model.":`所选模型已不可用——将回退到默认模型。`,"No default model":`未设置默认模型`,"No usable models":`没有可用模型`,"Image generation":`生图模型`,"Default image generation model":`默认生图模型`,"Selected image generation model is unavailable":`所选生图模型不可用,请检查模型标记、启用状态和 API Key。`,"Generate images with the configured image model and save them to the session scratch directory":`使用默认生图模型生成图片,并保存到会话专属目录。`,"No image generation models available":`没有可用的图像生成模型`,"Enable a model and configure valid provider credentials first.":`请先启用模型并配置有效的提供商凭证。`,"Default model changed: {{previous}} → {{next}}":`默认模型已更改:{{previous}} → {{next}}`,"Subscription credentials are loading. API-key models remain available.":`正在加载订阅凭证,API Key 模型仍可使用。`,"Subscription credentials could not be loaded: {{error}}":`无法加载订阅凭证:{{error}}`,"Subscription credentials are loading. Choose an API-key model or wait, then retry.":`正在加载订阅凭证。请选择 API Key 模型,或等待加载完成后重试。`,"Subscription credentials could not be loaded. Choose an API-key model or retry the credential refresh.":`无法加载订阅凭证。请选择 API Key 模型,或重新加载凭证。`,"Choose a model for this conversation or set a global default before sending.":`发送前请为此对话选择模型,或设置全局默认模型。`,"Choose a model for this conversation or set a project, group, or global default before sending.":`发送前请为此对话选择模型,或设置项目、分组或全局默认模型。`,"No usable model is available. Configure provider credentials and enable a model first.":`没有可用模型。请先配置提供商凭证并启用模型。`,Agent:`Agent`,Agents:`Agent`,File:`文件`,Files:`文件`,Folder:`文件夹`,"Open a file from the tree.":`从左侧树打开文件。`,"This file is too large to open in the editor.":`文件太大,无法在编辑器中打开。`,"This file changed on disk.":`磁盘上的文件已更改。`,Reload:`重新加载`,"Send to conversation":`发送到对话`,"New File":`新文件`,"New Folder":`新建文件夹`,"Copy Path":`复制路径`,"Copy Relative Path":`复制相对路径`,"View File":`查看文件`,"Open in Browser":`在浏览器中打开`,"Open Markdown Preview":`打开 Markdown 预览`,"View Source":`查看源码`,"Reveal in Finder":`在访达中显示`,"Open in Finder":`在访达中打开`,"Open in File Explorer":`在资源管理器中打开`,"Open in File Manager":`在文件管理器中打开`,Editors:`编辑器`,Terminals:`终端`,"Open Containing Folder":`打开所在文件夹`,"Reveal in File Explorer":`在资源管理器中显示`,"This file is outside the workspace and was not written by this conversation. Show it anyway?":`该文件在工作区外,且不是本会话写入的。仍要在文件管理器中显示吗?`,"A file or folder with that name already exists.":`已存在同名文件或文件夹。`,"Invalid name.":`名称无效。`,"Could not complete the file action.":`无法完成该文件操作。`,"Search needs ripgrep (rg). Install it and make sure it is on PATH.":`搜索依赖 ripgrep(rg):请安装并确保它在 PATH 里。`,"Search timed out. Try a more specific query or a smaller folder.":`搜索超时,请换更具体的关键词或缩小目录范围。`,"Could not open local file link":`无法打开本地文件链接`,"The link is outside the current workspace.":`链接位于当前工作区之外。`,"This link is not available on the local computer.":`此链接不在本机工作区中,无法打开。`,"The linked file or folder is unavailable.":`链接的文件或文件夹不可用。`,"Delete {{name}} permanently?":`永久删除 {{name}}?`,"Close others":`关闭其他`,"Close tabs to the right":`关闭右侧标签页`,"Close saved":`关闭已保存`,"Close all":`关闭所有`,"Force close others":`强制关闭其他`,"Force close all":`强制关闭所有`,"Unsaved changes":`未保存的更改`,"This file has unsaved changes. Close anyway?":`此文件有未保存的更改,仍要关闭吗?`,"Some files have unsaved changes. Close anyway?":`有文件未保存,仍要关闭吗?`,Chat:`会话`,Chats:`过去会话`,"Remove chat reference":`移除会话引用`,"Mention suggestions":`提及建议`,"Command suggestions":`命令建议`,"Plugin suggestions":`插件建议`,"Plugin is not enabled":`插件未启用`,Configure:`配置`,"Set (leave blank to keep)":`已设置(留空保持不变)`,"Not set":`未设置`,"Clear value":`清除`,"Saved. New calls use it right away.":`已保存,新的调用立即生效。`,"Host MCP tools it may call":`可调用的宿主 MCP 工具`,"Type @ to choose a file or Agent":`输入 @ 选择文件或 Agent`,Recipient:`接收者`,"Remove Agent recipient":`移除 Agent 接收者`,"Message the selected Agent…":`向所选 Agent 发送消息…`,"Send only to the selected Agent":`仅发送给所选 Agent`,Send:`发送`,"Create or select a project to start a conversation":`创建或选择一个项目以开始对话`,"Compact view":`精简版`,"The built-in browser is not available in full view. Check it on the computer.":`完整版暂不支持内置浏览器,请在电脑上查看。`,Locked:`已锁定`,"This Agent name is reserved":`此 Agent 名称为系统保留名称`,"Fast read-only recon; returns compressed findings":`快速只读调研,返回精简结论`,"Implements a self-contained coding subtask end to end":`端到端实现自包含编码子任务`,"Reviews code or diffs; read-only, returns prioritized issues":`只读审查代码或差异,并按优先级返回问题`,"Dispatched to":`已派发给`,"From plugin {{name}}":`来自插件 {{name}}`,Completed:`已完成`,Failed:`失败`,succeeded:`已成功`,denied:`已拒绝`,running:`进行中`,done:`已完成`,failed:`失败`,unavailable:`不可用`,cancelled:`已取消`,"The conversation binding expired. Retry.":`对话绑定已过期,请重试。`,"The selected Agent type is no longer available.":`所选 Agent 类型已不可用。`,"Model credentials could not be verified.":`无法验证模型凭证。`,"The parent model is unavailable.":`父会话模型不可用。`,"The Agent type is unavailable.":`Agent 类型不可用。`,"Coworker limit reached (active or reserved).":`已达到容量上限(正在运行或已预留的 coworker)。`,"Failed to spawn parent container.":`无法启动父会话容器。`,"Failed to spawn child Agent.":`无法启动子 Agent。`,"Agent worker exited before ready.":`Agent worker 在就绪前退出。`,"Agent session was rejected before ready.":`Agent 会话在就绪前被拒绝。`,"Agent session ready handshake timed out.":`Agent 会话就绪握手超时。`,"Parent ready model did not match the bound model.":`父会话就绪模型与绑定模型不匹配。`,"Child ready identity mismatch.":`子 Agent 就绪身份不匹配。`,"Child ready profile or model mismatch.":`子 Agent 就绪配置或模型不匹配。`,"Failed to prompt child Agent.":`无法向子 Agent 发送任务。`,"Failed to record dispatch.":`无法记录派发结果。`,Target:`目标`,Provider:`提供商`,Account:`账号`,Coworker:`队员`,"Could not load subscription providers":`无法加载订阅提供商`,Save:`保存`,Skills:`技能`,Skill:`技能`,"Skills registered by reference; files stay in their original location":`以引用方式登记,文件仍留在原应用目录`,"No skills yet":`暂无技能`,"Import skills from Claude Code, Codex or Cursor to get started":`从 Claude Code、Codex 或 Cursor 导入技能以开始使用`,"Import skills from local apps":`从本地应用导入技能`,"MCP Servers":`MCP 服务器`,"Model Context Protocol servers available to this app":`应用可用的 MCP 服务器`,"No MCP servers yet":`暂无 MCP 服务器`,"Import MCP servers configured in local AI apps":`导入本机 AI 应用中已配置的 MCP 服务器`,"Import MCP servers from local apps or add one manually to get started":`从本地应用导入或手动添加 MCP 服务器以开始使用`,"Add MCP server":`添加 MCP`,"Add MCP Server":`添加 MCP 服务器`,"Edit MCP Server":`编辑 MCP 服务器`,Transport:`传输方式`,Command:`命令`,"Arguments (one per line)":`参数(每行一条)`,"Environment variables (KEY=VALUE, one per line)":`环境变量(KEY=VALUE,每行一条)`,"Headers (Name: value, one per line)":`请求头(Name: value,每行一条)`,URL:`URL`,"Connection timeout (seconds)":`连接超时(秒)`,"Tool call timeout (seconds)":`工具调用超时(秒)`,"Description (optional)":`描述(可选)`,"One line telling the model what this server is for":`一句话告诉模型这个服务器的用途`,"OAuth client name (optional)":`OAuth 客户端名称(可选)`,"For servers that only accept known OAuth clients":`用于只接受已知 OAuth 客户端的服务器`,"OAuth authorization server metadata URL (optional)":`OAuth 授权服务器元数据地址(可选)`,"Use when the server advertises a wrong authorization server or none":`服务器声明的授权服务器不对或没有声明时填写`,"This MCP server already exists":`该 MCP 服务器已存在`,"Import MCP servers":`导入 MCP 服务器`,Form:`表单`,JSON:`JSON`,"JSON configuration":`JSON 配置`,Format:`格式化`,"Format failed: {{error}}":`格式化失败:{{error}}`,"Generated code is already formatted":`设计器生成的代码已是规范格式`,"Invalid JSON":`JSON 格式错误`,"No MCP servers found in JSON":`JSON 中没有有效的 MCP 服务器`,"JSON must describe a single MCP server":`JSON 只能描述一台 MCP 服务器`,"JSON must describe a single MCP server to switch to the form":`切回表单时 JSON 只能描述一台 MCP 服务器`,"Paste a server object or mcpServers JSON from Cursor / Claude Desktop":`可粘贴单台配置,或 Cursor / Claude Desktop 的 mcpServers JSON`,"Scan local AI apps and register the entries you want to reuse.":`扫描本机 AI 应用,登记你想复用的条目。`,"Nothing importable found":`未发现可导入的条目`,"{{count}} env vars":`{{count}} 个环境变量`,"Imported {{count}} entries":`已导入 {{count}} 项`,"Instruction Files":`指令文件`,Phone:`手机`,"Use your phone as a second screen. Keep this app running.":`把手机当作第二块屏幕。需保持本应用运行。`,"Pair a phone":`配对手机`,"Cancel pairing":`取消配对`,"Failed to start pairing":`发起配对失败`,"Scan with your phone camera":`用手机相机扫码`,"The code expires in 60 seconds and can only be used once.":`配对码 60 秒后失效,且只能使用一次。`,"Pairing QR code":`配对二维码`,"Expires in {{seconds}}s · single use":`{{seconds}} 秒后失效 · 仅可用一次`,"Code expired":`配对码已失效`,"Scanning opens the app and pairs it. To keep it handy, add it to your home screen.":`扫码即可打开并完成配对。想常用的话,打开后添加到主屏幕。`,"Paired devices":`已配对设备`,"No paired devices":`暂无已配对设备`,"Pair a phone to view sessions and reply on the go.":`配对手机后即可随时查看会话并回复。`,"Secure storage is unavailable on this system, so pairing keys are stored unencrypted.":`当前系统不支持安全存储,配对密钥将以未加密方式保存。`,"Waiting for phone":`等待手机`,Online:`在线`,Offline:`离线`,"Relay server":`中继服务器`,"The relay only forwards encrypted frames and cannot read your messages.":`中继只转发密文,无法读取你的消息内容。`,"Global CLAUDE.md / AGENTS.md style files from local AI tools":`本机 AI 工具的全局 CLAUDE.md / AGENTS.md 类文件`,"No instruction files yet":`暂无指令文件`,"Only one file is active at a time; enabling one disables the others":`同一时间仅一份生效(注入会话);启用一份会自动关闭其余`,"Import global instruction files configured in local AI tools":`导入本机 AI 工具中已配置的全局指令文件`,"Import instruction files from local apps or add one manually to get started":`从本地应用导入或手动添加指令文件以开始使用`,"Add instruction":`添加指令`,"Add Instruction":`添加指令文件`,"An instruction with this name already exists":`已有同名指令文件`,"Import instruction files":`导入指令文件`,"Same content":`内容相同`,"Same name":`同名`,"Edit Instruction":`编辑指令文件`,Content:`内容`,"Loading...":`加载中...`,Linked:`链接`,"Local copy":`本地副本`,"Local copy — edits stay in this app.":`本地副本 —— 修改只保存在应用内。`,"Write back to original file":`直接修改原文件`,"Saving creates a local copy — {{path}} is left untouched, and this entry stops following its updates.":`保存后会复制一份到应用内 —— {{path}} 不会被改动,此条目也将不再跟随其更新。`,"Saving overwrites {{path}} directly — {{source}} will pick up the change.":`保存会直接覆盖 {{path}} —— {{source}} 会随之生效。`,"Overwrite original":`覆盖原文件`,"Save as local copy":`保存为本地副本`,"Failed to read content":`读取内容失败`,"Failed to save":`保存失败`,Model:`模型`,"Working directory":`工作目录`,"Ask the agent…":`想让 agent 做什么…`,"Thinking…":`思考中…`,"Thought process":`思考过程`,"Thought for {{duration}}":`思考了 {{duration}}`,"Working…":`生成中…`,"Map the project":`梳理项目结构`,"Entry points, modules and key dependencies":`入口、模块划分与关键依赖`,"Walk me through this project's structure: entry points, module layout and key dependencies.":`梳理一下这个项目的结构:入口、模块划分和关键依赖。`,"Find potential issues":`排查潜在问题`,"Suspicious logic and unhandled edge cases":`找出可疑逻辑与未处理的边界情况`,"Review this project for potential bugs, suspicious logic and unhandled edge cases, and list them by severity.":`检查这个项目里的潜在 bug、可疑逻辑和未处理的边界情况,按严重程度列出来。`,"Add unit tests":`补充单元测试`,"Cover the core modules with tests":`为核心模块补上测试`,"Find the core modules that lack tests and add unit tests for them.":`找出缺少测试的核心模块,并为它们补充单元测试。`,"Summarize recent changes":`总结最近改动`,"A digest based on git log":`基于 git log 生成变更摘要`,"Summarize the recent changes in this repository based on git log.":`根据 git log 总结这个仓库最近的改动。`,"Loading Mermaid diagram...":`加载 Mermaid 图表...`,"Mermaid render error":`Mermaid 渲染错误`,"Mermaid render failed":`Mermaid 渲染失败`,"Mermaid preview":`Mermaid 预览`,"Zoom in":`放大`,"Zoom out":`缩小`,"Reset zoom":`重置缩放`,"Fit to original size":`适应初始大小`,"View fullscreen":`全屏查看`,"Exit fullscreen":`退出全屏`,Projects:`项目`,All:`全部`,Ungrouped:`未分组`,"New group":`新建分组`,"Edit group":`编辑分组`,"All groups":`全部分组`,"Search in {{group}}...":`在「{{group}}」中搜索...`,"Delete group":`删除分组`,"No color":`无颜色`,"Project group":`项目组`,Alias:`别名`,"Shown in the sidebar instead of the folder name. Leave blank to reset.":`在侧边栏代替目录名显示,留空则恢复默认。`,"Groups organize projects in the sidebar.":`用分组整理侧栏里的项目。`,"Move projects into this group":`选择要移入的项目`,"Move to group":`移动到分组`,"Open folder":`打开文件夹`,Emoji:`表情符号`,"Add project":`添加项目`,"Adding...":`正在添加...`,"Add a project to start":`添加一个项目开始`,"Temporary chats":`临时会话`,"Start a temporary chat":`开始临时会话`,"Chats that are not tied to a project. Tools follow your global settings.":`不挂项目的会话。工具跟随全局设置。`,"Add a local directory as the conversation working folder.":`把本地目录加为对话的工作目录。`,"Type a path or select from recent projects...":`输入路径或从最近项目中选择...`,"Local directory":`本地目录`,"Remote (SSH)":`远程(SSH)`,"SSH host":`SSH 主机`,"user@host or an alias from ~/.ssh/config":`user@host 或 ~/.ssh/config 里的别名`,"Remote directory":`远端目录`,Up:`上级`,"Use this directory":`选择此目录`,"No subdirectories":`没有子目录`,"Invalid folder name.":`文件夹名称无效。`,"Folder name":`文件夹名称`,"Failed to list remote directory.":`远程目录列取失败。`,"Requires key-based SSH access. Tools run on the remote host; chat history stays local.":`需要免密钥 SSH 访问。工具在远端主机执行,聊天记录保存在本地。`,"Tools run on the remote host; chat history stays local.":`工具在远端主机执行,聊天记录保存在本地。`,"SSH connection":`SSH 连接`,"Select an SSH connection":`选择 SSH 连接`,"Add an SSH connection in Settings first.":`请先在设置里添加 SSH 连接。`,SSH:`SSH`,Usage:`用量`,"Token usage across all local sessions; cost is estimated from catalog prices.":`统计本机全部会话的 Token 用量;费用按目录单价估算,可在下方覆盖。`,Today:`今天`,"7D":`7 天`,"30D":`30 天`,"90D":`90 天`,"Estimated cost":`预估费用`,"Total tokens":`总 Token`,"Input tokens":`输入 Token`,"Output tokens":`输出 Token`,"Cache tokens":`缓存 Token`,"Active time":`活跃时长`,Sessions:`会话数`,Messages:`消息数`,"Daily trend":`每日趋势`,Input:`输入`,Cache:`缓存`,Token:`Token`,Cost:`费用`,"Activity by hour":`分时活跃`,Less:`少`,More:`多`,Sun:`周日`,Mon:`周一`,Tue:`周二`,Wed:`周三`,Thu:`周四`,Fri:`周五`,Sat:`周六`,"By model":`按模型`,"By project":`按项目`,"By member":`按成员`,"Last 7 days":`近 7 天`,"Last 30 days":`近 30 天`,"Daily budget":`每日预算`,"Cost (USD), empty = unlimited":`成本(美元),留空不限`,"Daily cost limit (USD)":`每日成本上限(美元)`,"Tokens, empty = unlimited":`Token 数,留空不限`,"Daily token limit":`每日 Token 上限`,"Resets at local midnight. Once reached, new messages to this member are refused and a running reply is stopped.":`按本地时间零点重置。用完后新消息会被拒绝,正在进行的回复会被停止。`,"Today's budget is used up":`今日预算已用完`,"Budget must be a positive number":`预算必须是正数`,"Delegation time limit (minutes)":`委派时限(分钟)`,"Empty = 240":`留空 = 240`,"When other members delegate to this one, the task fails with a timeout after this long. A delegator can ask for less, not more.":`其他成员委派给该成员时,超过这个时长未完成即判超时失败。发起方只能要求更短,不能更长。`,"Check the per-turn token limit and delegation time limit":`请检查单回合 Token 上限(正整数)与委派时限(1–1440 的整数分钟)`,"Per-turn token limit":`单回合 Token 上限`,"A single reply that uses more tokens than this (counted while streaming) is stopped.":`单次回复(流式累计)用量超过该值即被停止。`,"Stopped: the member's per-turn token limit was exceeded.":`已停止:超出成员的单回合 Token 上限。`,"This member's daily budget is used up. Try again tomorrow or raise the budget.":`该成员今日预算已用完,请明天再试或调高预算。`,"Over budget":`超出预算`,"The member's daily budget is used up.":`成员今日预算已用完。`,Budget:`预算`,"{{name}}'s budget for today is used up":`{{name}} 今日预算已用完`,"Daily cost limit reached. New messages are refused until local midnight.":`已达每日成本上限,本地时间零点前新消息会被拒绝。`,"Daily token limit reached. New messages are refused until local midnight.":`已达每日 Token 上限,本地时间零点前新消息会被拒绝。`,"No usage in this period":`该周期内没有用量`,"Top {{count}} of {{total}}":`共 {{total}} 项,显示前 {{count}} 项`,"{{total}} items":`共 {{total}} 项`,"(no project)":`(无项目)`,"No catalog price for: {{models}}. Their cost is not included.":`以下模型无目录单价:{{models}},其费用未计入。`,"Unit prices":`单价`,"Rates used for cost estimates ($/M tokens).":`费用估算用的单价($/百万 tokens)。`,"Show all":`显示所有`,"Show all {{count}} lines":`显示全部 {{count}} 行`,"Raw text":`原文`,"Search table":`搜索表格`,"No matching models":`没有匹配的模型`,"Model id":`模型 id`,"Enter a model id and non-negative rates.":`请填写模型 id 和非负单价。`,Reset:`重置`,Refresh:`刷新`,"Saved hosts for remote projects. Passwords stay in the system keychain.":`远程项目用的主机。密码保存在系统钥匙串。`,"Add connection":`添加连接`,"No SSH connections yet":`还没有 SSH 连接`,"SSH timeout":`SSH 超时`,"Time limit for connection tests, loading remote AGENTS.md, remote folder browsing and file panel actions. Agent tool commands are not affected.":`连接测试、读取远端 AGENTS.md、浏览远程目录和文件面板操作的超时时间。不影响 Agent 工具执行的命令。`,"Add SSH connection":`添加 SSH 连接`,"Edit SSH connection":`编辑 SSH 连接`,"Key / agent":`密钥 / agent`,Password:`密码`,Authentication:`认证方式`,"User (optional)":`用户(可选)`,"Port (optional)":`端口(可选)`,Host:`主机`,Test:`测试`,"SSH connection succeeded":`SSH 连接成功`,"Unknown SSH host":`未知 SSH 主机`,"Trust this host and add its key to known_hosts?":`信任此主机并把密钥写入 known_hosts?`,Trust:`信任`,"Could not save host key.":`无法保存主机密钥。`,"Password (leave blank to keep)":`密码(留空则保持原密码)`,"Failed to add project":`添加项目失败`,"Failed to add project.":`添加项目失败。`,"Drop folders to add projects":`拖入文件夹以添加项目`,"Only folders can be added as projects":`只能将文件夹添加为项目`,"Only the first {{count}} folders were added":`一次最多添加 {{count}} 个文件夹`,"Could not read the path of the dropped folder":`无法读取拖入文件夹的路径`,Browse:`浏览`,"No matching projects found":`没有匹配的项目`,Add:`添加`,"New conversation":`新对话`,"Local workspace":`本地工作区`,"Workspace moved to an isolated worktree":`工作区已迁移到隔离 worktree`,"Workspace fell back to the main working tree":`工作区已回退到主工作树`,"Work directly in the main working tree":`直接在主工作树里工作`,"Run this session on its own git worktree":`让这个会话在独立的 git worktree 里运行`,"Move to worktree":`切到隔离 worktree`,"Failed to move to worktree":`切到隔离 worktree 失败`,"Main working tree has uncommitted changes":`主工作树有未提交改动`,"The new worktree branches off HEAD, so those changes stay in the main working tree and will not follow this session.":`新 worktree 从 HEAD 切出,这些改动会留在主工作树,不会跟随本会话。`,"Move anyway":`仍然切换`,"Clean up worktree":`清理 worktree`,"Clean up worktree?":`清理 worktree?`,"Failed to clean up worktree":`清理 worktree 失败`,"Reload conversation":`重新读取会话`,"Failed to reload conversation":`重新读取会话失败`,"Restart conversation (reload settings)":`重启会话(重新加载配置)`,"Failed to restart conversation":`重启会话失败`,"Clean up":`清理`,"Archive session and clean up worktree?":`归档会话并清理 worktree?`,"Pending work: {{warning}}. This session returns to the main working tree. The worktree directory and uncommitted changes are removed only when no other sessions use it. The branch is kept.":`待处理工作:{{warning}}。本会话将回退主工作树。仅在没有其他会话使用此 worktree 时,才删除目录及未提交改动;分支会保留。`,"uncommitted changes will be lost":`未提交改动将丢失`,"{{n}} unmerged commits (branch is kept)":`{{n}} 个未合并提交(分支会保留)`,"Pending work: {{warning}}. This conversation will be removed. Its worktree directory and uncommitted changes are removed only when no other sessions use it. The branch is kept.":`待处理工作:{{warning}}。本会话将被移除。仅在没有其他会话使用此 worktree 时,才删除目录及未提交改动;分支会保留。`,"Isolated worktree":`隔离 worktree`,"New isolated worktree":`新建隔离 worktree`,"Existing worktrees":`已有 worktree`,"New conversation in this worktree":`在此 worktree 新建会话`,"Rename worktree":`重命名 worktree`,"Worktree name":`Worktree 名称`,"Only the display name changes, for all sessions in this worktree. Leave empty to use the branch name.":`仅修改此 worktree 所有会话的显示名称,不改变分支或目录。留空恢复分支名。`,"Failed to rename worktree":`重命名 worktree 失败`,"Failed to use worktree":`使用 worktree 失败`,"Failed to create conversation":`新建会话失败`,"Switch branch":`切换分支`,"Back to workspaces":`返回工作区`,"Local branches":`本地分支`,"Search local branches":`搜索本地分支`,"Switching branches affects all conversations in this workspace.":`切换分支会影响此工作区的所有会话。`,"Create branch from HEAD…":`从当前 HEAD 新建分支…`,"Create branch":`新建分支`,"Create and switch":`新建并切换`,"Branch name":`分支名称`,"Detached HEAD":`分离 HEAD`,"No matching local branches.":`没有匹配的本地分支。`,"Failed to load branches":`读取分支失败`,"Failed to switch branch":`切换分支失败`,"Creates a branch from the current HEAD and switches every conversation in this workspace to it.":`从当前 HEAD 新建分支,并将此工作区的所有会话切换到该分支。`,"Create a commit before creating a branch from HEAD.":`请先创建一个提交,再从 HEAD 新建分支。`,"Stop running conversations and coworkers in this workspace before switching branches.":`请先停止此工作区中运行的会话和协作者,再切换分支。`,"Commit or stash uncommitted changes before switching branches.":`请先提交或暂存(stash)未提交改动,再切换分支。`,"This workspace is busy. Try again when its conversations are ready.":`此工作区正忙,请等待会话就绪后重试。`,"Branch is checked out in another worktree.":`此分支已被其他 worktree 占用。`,"Enter a valid Git branch name.":`请输入有效的 Git 分支名称。`,"A branch with this name already exists.":`同名分支已存在。`,"This branch no longer exists. Refresh the branch list.":`此分支已不存在,请刷新分支列表。`,"This workspace is already on that branch.":`此工作区已在该分支上。`,"Branches are not available for this workspace.":`此工作区无法使用 Git 分支。`,"Git could not switch branches.":`Git 无法切换分支。`,"Wait for the workspace operation to finish before saving.":`请等待工作区操作完成后再保存文件。`,"Worktree missing":`Worktree 已丢失`,"Worktree status unknown":`Worktree 状态未知`,"Uncommitted changes":`有未提交改动`,"Working tree clean":`工作区干净`,"{{n}} unmerged commits":`{{n}} 个未合并提交`,"Isolated worktree · uncommitted changes":`隔离 worktree · 有未提交改动`,"{{n}} browsers":`{{n}} 个浏览器`,"{{n}} terminals":`{{n}} 个终端`,"Isolated worktree · {{n}} unmerged commits":`隔离 worktree · {{n}} 个未合并提交`,"Isolated worktree is missing":`隔离 worktree 已丢失`,'The worktree of this session was deleted. Rebuild it from branch "{{branch}}" (committed work is preserved), or fall back to the main working tree.':`该会话的 worktree 已被删除。可从分支「{{branch}}」重建(已提交的工作会保留),或回退到主工作树继续。`,"Fall back to main working tree":`回退主工作树`,"Rebuild worktree":`重建 worktree`,"Failed to rebuild worktree":`重建 worktree 失败`,"Remove project":`移除项目`,"Archive project":`归档项目`,"Unarchive project":`恢复项目`,"Pin project":`置顶项目`,"Unpin project":`取消置顶项目`,"Pinned projects":`置顶项目`,"Select or create a conversation":`选择或新建一个对话`,"Collapse sidebar":`折叠侧边栏`,"Show {{n}} more":`展开其余 {{n}} 条`,"Archive {{n}} conversations":`归档 {{n}} 条会话`,Collapse:`收起`,Expand:`展开`,"Expand sidebar":`展开侧边栏`,"Approval required":`需要审批`,"Timed out · denied":`已超时拒绝`,"Timed out · no answer":`已超时未回答`,"{{time}} left":`剩余 {{time}}`,"Waiting for your answer":`等待你回答`,"Custom answer":`自定义回答`,"No answer in time; the default was selected":`超时未回答,已自动选择默认项`,Selected:`已选`,"Type an answer…":`输入回答…`,Later:`稍后`,Recommended:`推荐`,"Files read":`读入的文件`,"Tool results":`工具输出`,"About {{tokens}} left":`大约还剩 {{tokens}}`,"{{count}} more":`其余 {{count}} 项`,"Earlier {{count}} turns":`更早的 {{count}} 轮`,"Turn {{count}}":`第 {{count}} 轮`,"Compacted summary":`压缩摘要`,"System reminders":`系统提醒`,"Message will queue until this round finishes…":`消息将排队,本轮结束后发送…`,"Press {{key}} to steer the next queued message into this round…":`按 {{key}} 将下一条排队消息插入本轮…`,Queued:`排队`,"Withdraw message":`撤回`,"Not sent":`未发送`,"Delivery unconfirmed":`送达待确认`,attachments:`个附件`,Edit:`编辑`,"Send now":`立即发送`,"Interrupt and send now":`打断并立即发送`,Remove:`移除`,"Agent types":`子代理类型`,"Max active coworkers":`同时在编 coworker 上限`,"How many coworkers one conversation can keep at once. Existing ones stay if you lower the limit; hire more only after dismissing. Subagents are not counted.":`单个会话最多同时保留多少个 coworker。调低上限不会解散现有成员,雇新的前需先解雇。subagent 不计入。`,"Built-in tools":`内置工具`,"Toggle the built-in tools available to agents.":`开关 agent 可用的内置工具。`,"Try these models' built-in search in order. Credentials resolve at call time; if all fail, the keyless Exa service is the permanent fallback.":`按顺序尝试这些模型的原生搜索。凭证在调用时现取;全部失败时由免 key 的 Exa 服务永久兜底。`,"Default: use the current session model's built-in search when available, otherwise Exa.":`默认:优先使用当前会话模型的原生搜索能力,不支持时回退 Exa。`,"Add candidate":`添加候选`,"Final fallback: Exa (keyless hosted search). Not a chain entry; always last.":`最终兜底:Exa(免 key 托管搜索)。不是链条目,永远在最后。`,"Isolated sandbox":`隔离沙箱`,Memory:`记忆`,"Durable knowledge the agent can search and write across sessions. Stored locally in a SQLite database.":`可跨会话检索与写入的持久知识,本地存放在一个 SQLite 库里。`,"Enable memory tools":`启用记忆工具`,"Gives the agent memory_search, memory_capture, memory_crystallize and memory_delete. The database is only created after you enable this.":`给 agent 提供 memory_search、memory_capture、memory_crystallize 与 memory_delete。开启后才会创建数据库。`,"Memory is off. The settings below take effect once you enable it.":`记忆已关闭。开启后下面的设置才会生效。`,"Embedding model":`嵌入模型`,"Used for semantic search and near-duplicate detection. Without it search still works using full-text only.":`用于语义检索与近重复识别。没有它检索仍可用,只是退化为纯全文。`,"Remote (OpenAI-compatible)":`远程(OpenAI 兼容)`,"Unknown model; the default is used instead.":`未知模型,实际使用默认模型。`,"Model downloaded":`模型已下载`,"Model not downloaded":`模型未下载`,"Downloading…":`下载中…`,"Semantic search stays off until the model is on disk.":`模型落盘前语义检索不会生效。`,"Voice input":`语音输入`,"Adds a microphone to the composer on this computer and on paired phones. Local models transcribe speech on this computer.":`在本机和已配对手机的输入框中显示麦克风按钮,本地模型在这台电脑上识别语音。`,"Speech model":`识别模型`,Microphone:`麦克风`,"Microphone {{n}}":`麦克风 {{n}}`,"Disconnected, using the system default":`已断开,暂用系统默认`,Streaming:`流式`,"Sentence by sentence":`逐句`,Downloaded:`已下载`,"Download {{size}} · Memory about {{memory}}":`下载 {{size}} · 内存约 {{memory}}`,"Download the selected model to start using voice input.":`下载所选模型后即可使用语音输入。`,"X-ASR Streaming":`X-ASR 流式`,"Text appears while you speak. Chinese and English.":`边说边出字,支持中文和英文。`,"Most accurate on everyday speech. Chinese and English.":`日常说话识别最准,支持中文和英文。`,"Best with mixed Chinese-English and code terms. Slower and uses more memory.":`中英混说和代码术语识别最好,但较慢且更占内存。`,"Chinese, English, Japanese, Korean and Cantonese.":`支持中文、英文、日语、韩语和粤语。`,Hanbao:`憨包`,"Runs fully offline. Chinese and English.":`完全离线运行,支持中文和英文。`,"Google cloud recognition, most accurate with mixed Chinese-English and code terms. Needs a Gemini API key.":`Google 云端识别,中英混说和代码术语最准;需要 Gemini API Key。`,"Audio is uploaded to Google. On the free tier Google may use it to improve its products.":`音频会上传到 Google;免费层级下 Google 可能用它改进产品。`,"Enter a Gemini API key below first.":`需先在下方填写 Gemini API Key。`,WeType:`微信输入法`,"WeChat Keyboard cloud recognition. Chinese and English, no setup needed.":`微信输入法云端识别,支持中文和英文,无需配置。`,"Audio is uploaded to Tencent WeChat Keyboard servers.":`音频会上传到腾讯微信输入法服务器。`,"Gemini API key":`Gemini API Key`,"Create one for free in Google AI Studio.":`可在 Google AI Studio 免费创建。`,Cloud:`云端`,"Custom vocabulary":`自定义词表`,"One term per line, up to 100. Helps with names and code terms such as useEffect or pnpm.":`每行一个,最多 100 个。可提升人名和 useEffect、pnpm 这类代码术语的识别率。`,"Correct with a language model":`用大模型纠错`,"Fixes homophones, code terms and number formats after recognition. Adds about 1-3 seconds; the raw text is kept if it fails.":`识别后纠正同音错字、代码术语和数字写法,约多 1–3 秒;纠错失败时保留原文。`,"Correction model":`纠错模型`,"tuned for voice":`语音纠错专用`,"Not downloaded yet. Correction is skipped until it is.":`尚未下载,下载完成前不做纠错。`,"A fast, inexpensive model is enough.":`选一个快且便宜的模型即可。`,"Remote (API model)":`远程(API 模型)`,"Voice input is not available on this platform.":`当前平台不支持语音输入。`,"Download failed":`下载失败`,"Stop recording":`停止录音`,"Cancel recording":`取消录音`,"Transcribing…":`识别中…`,"Correcting…":`纠错中…`,"Switch to keyboard":`切换到键盘`,"Hold to talk":`按住 说话`,"Release to finish":`松开 结束`,"Slide up to cancel":`上滑 取消`,"Release to cancel":`松开 取消`,"Speech was too short.":`说话时间太短`,"Getting the microphone ready…":`麦克风准备中…`,"Speak now":`请说话`,"Voice input (hold to talk)":`语音输入(按住说话)`,"Hold while the chat input is focused, release to put the text in it":`输入框聚焦时按住录音,松开后识别并填入输入框`,"Hold {{key}} to talk":`按住 {{key}} 说话`,"Microphone access denied. Allow it in system settings.":`无法使用麦克风,请在系统设置中允许访问。`,"No microphone found.":`没有找到麦克风。`,"No speech detected.":`没有识别到语音。`,"Voice input failed.":`语音识别失败。`,"Voice input is turned off.":`语音输入已关闭。`,Experimental:`实验功能`,"Bot mode":`Bot 模式`,"Chat with AI members that have personas, form groups and delegate work. Off by default.":`与有人设的 AI 成员私聊、拉群并互相委派工作。默认关闭。`,"Bot mode is turned off.":`Bot 模式已关闭。`,"The speech model is not downloaded yet.":`语音模型尚未下载。`,"The recording was empty or too long.":`录音为空或过长。`,"Voice input needs a secure (HTTPS) connection.":`语音输入需要 HTTPS 安全连接。`,Download:`下载`,"Remote model":`远程模型`,"Credentials stay in the main process and are never sent to the renderer.":`凭证只留在主进程,不会下发到渲染层。`,"Unload automatically when idle":`空闲自动卸载`,"Release local model memory after this idle period. Models load automatically the next time they are needed.":`空闲达到此时长后释放本地模型内存,下次需要时会自动加载。`,"Download models automatically":`自动下载模型`,"Off by default, so a model is only fetched when you press Download. While a model is missing, search degrades to full-text; existing memories are re-embedded once it arrives.":`默认关闭,模型只在你点「下载」时才获取。模型缺失期间检索降级为纯全文,模型就绪后已有记忆会自动补向量。`,Distillation:`提炼`,"Distillation model":`提炼模型`,"Reads finished sessions and writes the memories.":`读已结束的会话并写出记忆。`,"Follows the title-summary model":`跟随标题模型`,"Memory language":`记忆语言`,"English keeps retrieval and near-duplicate detection stable across languages. Choose Follow conversation if your team only works in one language.":`英文能让跨语言的检索与近重复识别更稳。团队只用一种语言时可选「跟随对话」。`,English:`英文`,"Simplified Chinese":`简体中文`,"Background processing":`后台处理`,"Distill sessions automatically":`自动提炼会话`,"When a session ends, or goes idle for 30 minutes and is reclaimed, extract 1-3 durable memories from it in the background.":`会话结束、或空闲 30 分钟被回收时,在后台从中提炼 1-3 条值得长期保留的记忆。`,"{{done}}/{{total}} done":`已完成 {{done}}/{{total}}`,"about {{time}} left":`约剩 {{time}}`,"Extract entities":`抽取实体`,"Build an entity graph so a memory can be recalled by a name it does not literally contain.":`建立实体图谱,让正文里没出现该词的记忆也能被这个名字召回。`,Library:`记忆库`,"No memories stored yet.":`还没有存下任何记忆。`,"Memory is not enabled.":`记忆未启用。`,Memories:`记忆数`,Crystals:`结晶数`,Entities:`实体数`,"With vectors":`已向量化`,Backfill:`补齐`,"Backfilling…":`补齐中…`,"Vectors unavailable: {{reason}}":`无法生成向量:{{reason}}`,"No remote embedding provider is selected. Choose a provider with an API key, or switch to a local embedding model.":`还没有选择远程向量服务商:请选择一个填了 API Key 的服务商,或改用本地向量模型。`,"The selected embedding provider no longer exists. Choose another provider, or switch to a local embedding model.":`所选的向量服务商已被删除:请重新选择服务商,或改用本地向量模型。`,'Provider "{{provider}}" has no Base URL. Fill it in, or choose another provider.':`服务商「{{provider}}」没有填写 Base URL:请补全,或换一个服务商。`,'Provider "{{provider}}" has no API key. Subscription sign-in cannot be used for embeddings; choose a provider with an API key, or switch to a local embedding model.':`服务商「{{provider}}」没有 API Key:订阅登录不能用于向量化,请换一个填了 API Key 的服务商,或改用本地向量模型。`,"No remote embedding model is selected. Choose a model that supports /embeddings.":`还没有选择远程向量模型:请选择支持 /embeddings 的模型。`,'"{{model}}" is a chat model and cannot be used for embeddings. Choose a model that supports /embeddings, or switch to a local embedding model.':`「{{model}}」是对话模型,不能用于向量化:请选择支持 /embeddings 的模型,或改用本地向量模型。`,'Provider "{{provider}}" has no embedding model ("{{model}}" is a chat model). Add one that supports /embeddings (e.g. text-embedding-3-small), or switch to a local embedding model.':`服务商「{{provider}}」下没有向量模型(「{{model}}」是对话模型):请在该服务商里添加支持 /embeddings 的模型(如 text-embedding-3-small),或改用本地向量模型。`,"No model can be used for embeddings: it needs a provider with an API key and an embedding model (e.g. text-embedding-3-small). Subscription sign-in cannot be used for embeddings.":`没有可用于向量化的模型:需要填了 API Key 的服务商,且其中有向量模型(如 text-embedding-3-small)。订阅登录不能用于向量化。`,"Database size":`库体积`,Spaces:`空间数`,"Distill past sessions":`提炼历史会话`,"The automatic switch only covers sessions that end from now on. Distill earlier sessions here to fill the library.":`自动开关只对从现在开始结束或被回收的会话生效。早于此的会话在这里手动提炼,否则记忆库一直是空的。`,"No recorded sessions found.":`没有找到已记录的会话。`,"No project":`无项目`,"Already distilled":`已提炼`,"Distill all ({{count}})":`全部提炼({{count}})`,"All sessions":`全部会话`,"View sessions":`会话`,"Some sessions were already distilled":`部分会话已经提炼过`,"{{label}}: {{total}} sessions, {{done}} already distilled. Re-distilling runs the model again and may add new memories alongside the existing ones.":`{{label}}:共 {{total}} 个会话,其中 {{done}} 个已提炼。重新提炼会再跑一次模型,可能在现有记忆之外新增几条。`,"Only the {{count}} remaining":`只提炼剩下的 {{count}} 个`,"Re-distill all {{count}}":`重新提炼全部 {{count}} 个`,"Distill project":`提炼本项目`,"{{total}} sessions · {{pending}} not distilled":`{{total}} 个会话 · {{pending}} 个未提炼`,Distill:`提炼`,"Distill again":`重新提炼`,"Distilling…":`提炼中…`,"Background tasks":`后台任务`,"Clear finished tasks":`清空历史任务`,"Retry failed extractions ({{count}})":`重试失败项({{count}})`,"Removes completed and cancelled jobs. Running tasks are kept. Sessions will show as not distilled again, since that flag is derived from job history — re-distilling is deduplicated, so it will not create duplicate memories.":`清除已完成和已作废的任务,进行中的保留。清除后会话会重新显示为「未提炼」——该标记是由任务历史推导的;重新提炼有去重,不会产生重复记忆。`,"Removes completed and cancelled jobs. Running tasks are kept.":`只删除已完成和已作废的记录,不影响进行中的任务。`,"Re-embedding memories":`正在重建向量`,"Nothing running.":`没有正在运行的任务。`,"Turn memory off in Built-in tools.":`如需关闭,请到「内置工具」中操作。`,critical:`关键`,important:`重要`,useful:`有用`,low:`次要`,"Importance {{value}}":`重要度 {{value}}`,"(legacy)":`(旧版)`,"superseded by the GGUF build":`已被 GGUF 版取代`,"job:distill":`提炼`,"job:entities":`实体`,"job:vectors":`向量`,"Show less":`收起`,"Show all {{count}}":`查看全部 {{count}} 条`,"{{count}} task(s) in progress":`{{count}} 个任务进行中`,"Exact match":`精确匹配`,"Semantic search":`语义检索`,"Fast retrieval":`快速检索`,"Deep retrieval":`深入检索`,"Same path the agent uses: full-text, vectors and entities merged by relevance. Shows the top matches only — no exact count, and archived memories are excluded.":`与 agent 同一条检索路径:全文、向量、实体与一跳相关实体按相关度融合。只给最相关的几条,没有精确总数,也不包含已归档的记忆。`,"Same recall as Fast, plus intent-weighted fusion and an optional short-timeout LLM rerank. Failures fall back; archived memories are excluded.":`召回与快速检索相同,再按意图加权融合,并可选短超时 LLM 重排。失败则回退;不含已归档记忆。`,"Embedding model is not ready, so vectors are skipped.":`嵌入模型未就绪,本次跳过了向量通道。`,Knowledge:`知识`,"Browse what the agent knows as a graph or a tree, ask for an interpretation, and consolidate related memories into a crystal.":`用图谱或树浏览 agent 已知的知识,让它解读,并把相关记忆合成结晶。`,Graph:`图谱`,Tree:`知识树`,"By type":`按类型`,"By entity":`按实体`,"By month":`按月份`,"Knowledge graph":`知识图谱`,"No entities yet. Turn on entity extraction and store a few memories first.":`还没有实体。先打开「抽取实体」并存下几条记忆。`,"Colour = entity type · size = how many memories mention it":`颜色 = 实体类型 · 大小 = 被多少条记忆提及`,"{{shown}} of {{total}} entities":`{{total}} 个实体中的 {{shown}} 个`,Fit:`适应窗口`,"Fit to view":`缩放到全图`,Relayout:`重新布局`,"Re-run layout":`重新计算布局`,"{{count}} memories · {{space}}":`{{count}} 条记忆 · {{space}}`,Interpret:`解读`,"Interpreting…":`解读中…`,Interpretation:`解读`,"Based on {{count}} memories":`基于 {{count}} 条记忆`,"Crystallize ({{min}}+)":`结晶({{min}} 条起)`,"Synthesizing…":`合成中…`,"Crystal created":`已生成结晶`,"Nothing was written":`没有写入任何内容`,"Similar memories already exist, nothing was written":`已有相似记忆,没有写入`,"Identical memory already exists, nothing new was written":`已有完全相同的记忆,没有重复写入`,"Showing {{shown}} of {{total}}":`显示 {{shown}} / {{total}}`,"No memories yet.":`还没有记忆。`,"Stored memories":`已存记忆`,"Everything the agent has saved. Archiving hides a memory from search but keeps it.":`agent 存下的全部记忆。归档只是让它不再出现在检索里,内容仍保留。`,"Clear selection":`取消选择`,"Archive selected":`归档所选`,"Select memory":`选中记忆`,"Delete {{count}} memories permanently?":`永久删除这 {{count}} 条记忆?`,"Search memories":`搜索记忆`,"All spaces":`全部空间`,"All types":`全部类型`,"Show archived":`显示已归档`,"No memories yet. They appear here once the agent stores something.":`还没有记忆。agent 存下第一条后会出现在这里。`,"No memories match these filters.":`没有符合当前筛选条件的记忆。`,"Type a query to search by meaning.":`输入关键词后按语义检索。`,Crystal:`结晶`,"Retrieved {{count}} times":`被检索 {{count}} 次`,Previous:`上一页`,"Needs review":`待审阅`,"Reviewing only records your judgement. Nothing is deleted and no memory is superseded.":`审阅只记录你的判断,不会删除任何记忆,也不会让任何一条被取代。`,Accept:`接受`,Dismiss:`忽略`,Type:`类型`,Space:`空间`,Importance:`重要度`,Created:`创建于`,"Event date":`事件日期`,Embedding:`向量模型`,"Synthesized from":`合成自`,"Related versions":`相关版本`,"Delete permanently":`永久删除`,"Delete this memory permanently?":`永久删除这条记忆?`,"This cannot be undone. Archiving keeps the memory out of search while preserving it.":`此操作不可撤销。归档可以让它不再出现在检索里,同时保留内容。`,"Long-term memory: the agent can search, capture and consolidate durable decisions, preferences and lessons across sessions":`长期记忆:agent 可跨会话检索、记录与归纳持久的决策、偏好与经验`,"Let the agent drop an irrelevant automatic delivery or throwaway exchange from its context; the timeline keeps it and turn_recall can read it back":`让 agent 把无关的自动投递或一次性问答从上下文里丢掉;时间线保留原文,turn_recall 可取回`,"Plan mode: research read-only, submit a plan for approval, then carry it out after approval":`Plan 模式:只读调研并提交计划,审批通过后再执行`,"Run JavaScript in an isolated sandbox that can call session tools. Intermediate reads and edits stay out of the chat; only the returned value is added to the conversation.":`在隔离沙箱里跑 JavaScript,并可调用会话工具。中间的读取和修改不会进对话,只有返回值会留下。`,Workflow:`工作流`,"Run a JavaScript workflow that fans work out across subagents.":`运行一段扇出子代理的 JavaScript 工作流。`,"Run a JavaScript workflow that fans work out across subagents. Live status appears in the side panel.":`运行一段扇出子代理的 JavaScript 工作流。实时状态显示在右侧栏。`,"No workflow runs":`还没有工作流`,"Clear finished runs":`清除已结束`,Run:`运行`,"Workflow preset":`预设工作流`,"Manage workflow presets":`管理工作流预设`,Workflows:`工作流`,"Preset workflows you can run from the Workflow side panel":`可在侧边栏「工作流」面板中运行的预设`,"Project .agents/workflows files take precedence over these; ~/.agents/workflows and built-in presets come after.":`同名时项目 .agents/workflows 下的文件优先于这里,其次是 ~/.agents/workflows 和内置预设。`,"Add workflow preset":`新增工作流预设`,"Edit workflow preset":`编辑工作流预设`,"No custom workflow presets yet":`还没有自定义工作流预设`,"Custom presets":`自定义预设`,"Built-in presets":`内置预设`,Label:`显示名`,"Default value":`默认值`,Required:`必填`,"Add argument":`添加参数`,Script:`脚本`,Steps:`步骤`,Design:`设计`,Code:`代码`,"Default (worker)":`默认(worker)`,"Phase {{n}}":`阶段 {{n}}`,"Phase title":`阶段名称`,Prompt:`提示词`,"Click a node to edit it. Steps in a column run in parallel; columns run from left to right.":`点击节点即可编辑。同一列的步骤并行执行,各列从左到右依次执行。`,Start:`开始`,"No arguments":`无参数`,"Last phase output":`末阶段输出`,"Untitled phase":`未命名阶段`,"Untitled step":`未命名步骤`,"No prompt yet":`尚未填写提示词`,"Parallel step":`并行步骤`,"Insert phase here":`在此插入阶段`,"Phase {{n}} · Step {{m}}":`阶段 {{n}} · 步骤 {{m}}`,"Move left":`左移`,"Move right":`右移`,"Insert argument":`插入参数`,"Previous phase output":`上一阶段输出`,"This preset is plain code and cannot be shown in the designer. Using the designer replaces the current script.":`该预设是纯代码,无法在设计器中显示。改用设计器会替换当前脚本。`,"Use the designer":`改用设计器`,"Every phase needs a title and every step needs a label and a prompt.":`每个阶段需要名称,每个步骤需要显示名和提示词。`,"Generated from the design. Editing the code detaches it from the designer.":`由设计生成。手动修改代码后将脱离设计器,变为纯代码预设。`,"Plain JavaScript with top-level await; end with return. Available: agent(prompt, opts), parallel, pipeline, phase, log, args.":`纯 JavaScript,支持顶层 await,以 return 结束。可用:agent(prompt, opts)、parallel、pipeline、phase、log、args。`,"Workflow preset not found":`工作流预设不存在`,"Workflow preset is larger than 64 KB":`工作流预设超过 64 KB`,"Invalid workflow preset":`工作流预设无效:检查参数名(字母、数字、下划线),且各字段不能包含 */`,"Parallel review":`并行审查`,"Review a change set in parallel along several dimensions with read-only reviewers.":`用只读审查代理按多个维度并行审查一组改动。`,"Review scope":`审查范围`,"Dimensions (comma separated)":`审查维度(逗号分隔)`,"Multi-angle investigation":`多角度调研`,"Investigate one question from implementation, tests and docs in parallel with read-only scouts.":`用只读侦察代理从实现、测试、文档三个角度并行调研同一个问题。`,Question:`问题`,Parallel:`并行`,"{{count}} agents":`{{count}} 个子代理`,"One-shot subagent: delegate a self-contained task and return a final report (parallel or async)":`一次性子代理:委派自包含子任务,返回最终报告(可并行、可异步)`,"Persistent subagent: hire for multi-turn dialogue; you can watch and intervene from a tab":`持久子代理:雇佣后多轮对话,用户可在 tab 旁观介入`,"Task list: track progress on multi-step work":`任务清单:跟踪多步骤工作的进度`,"Ask the user a question and wait for an answer (options / timeout)":`向用户提问并等待回答(带选项/超时)`,"Background shell task: run long commands in the background and notify on completion":`后台 shell 任务:长命令挂后台跑,完成时通知`,"Built-in browser: open pages in Enso's own Chromium, read snapshots, click and type by ref":`内嵌浏览器:在 Enso 自带 Chromium 里打开页面,读快照,按 ref 点击与输入`,"Web search and fetch: search with the session model's built-in search (falls back to a keyless service) and read public pages as markdown":`联网搜索与抓取:优先用会话模型自带的搜索(不支持时降级到免 key 服务),并把公开网页读成 markdown`,"This project ships pi extension code that runs with your permissions. It was not loaded. Trust it only if you trust this repository.":`此项目带有 pi 扩展代码,会以你的权限运行,已阻止加载。只有信任这个仓库时才加载。`,"Trust and load":`信任并加载`,Plugins:`插件`,Plugin:`插件`,"Enso plugins":`Enso 插件`,"Claude Code plugins":`Claude Code 插件`,"No Enso plugins installed":`还没有安装 Enso 插件`,"Browse the marketplace or install from a GitHub URL, folder or zip.":`可以从插件市场浏览,或通过 GitHub 地址、文件夹、zip 安装。`,"Or install from":`或从本地安装`,"Installing a plugin lets it run code on this machine. Review what it asks for before confirming.":`安装插件会让它在这台电脑上运行代码。确认前请先查看它申请的权限。`,"Install from folder":`从文件夹安装`,"Install from zip":`从压缩包安装`,"Install from URL":`从链接安装`,Marketplace:`插件市场`,"Search plugins":`搜索插件`,"China mirror":`国内镜像`,"Usage guide":`使用说明`,Homepage:`主页`,"Update plugins automatically":`自动更新插件`,"Marketplace updates that do not ask for new permissions install on their own.":`权限不变的市场更新会自动装上。需要新权限的仍等你同意。`,"{{name}} tried to message another session and was blocked":`插件 {{name}} 想向其他会话发消息,已拦截`,"Turn on":`去开启`,"{{name}} {{version}} needs new permissions":`插件 {{name}} 新版本 {{version}} 需要新权限`,"Review permissions":`去授权`,"{{name}} updated to {{version}}":`插件 {{name}} 已更新到 {{version}}`,View:`查看`,"Could not reach the marketplace; showing the last saved list.":`无法连接插件市场,显示的是上次保存的列表。`,"No matching plugins":`没有匹配的插件`,Official:`官方`,Community:`社区`,Installed:`已安装`,"https://github.com/owner/repo":`https://github.com/owner/repo`,"Install failed":`安装失败`,"{{name}} installed":`已安装 {{name}}`,"Turn it on in the list below to use it.":`在下面的列表里打开开关即可使用。`,"updating from {{version}}":`从 {{version}} 更新`,"Keep current":`保持现状`,"Stopped after crashes":`多次崩溃后已停止`,"Plugin command failed":`插件命令执行失败`,"Plugin logs":`插件日志`,"No logs yet":`暂无日志`,"Reinstall from source":`从来源重新安装`,"No plugins installed from GitHub to check":`没有从 GitHub 安装的插件可以检查`,"{{count}} update(s) available":`{{count}} 个插件有新版本`,"All plugins are up to date":`插件都是最新版本`,"Version {{version}} is available":`有新版本 {{version}}`,Update:`更新`,"Update check failed: {{reason}}":`检查更新失败:{{reason}}`,Commands:`命令`,"{{count}} enabled":`已启用 {{count}} 个`,"No supported components":`没有可用组件`,"MCP servers (run when a session starts)":`MCP 服务器(会话启动时运行)`,"Hooks (run automatically on local sessions)":`Hooks(本地会话中自动运行)`,"Not supported":`暂不支持`,"Plugins installed in Claude Code. Each one is switched on or off as a whole here; changes apply to new sessions.":`Claude Code 里已安装的插件,在这里按整包开关,新会话生效。`,"No Claude Code plugins found":`没有找到 Claude Code 插件`,"Install plugins with /plugin in Claude Code, then rescan.":`在 Claude Code 里用 /plugin 安装插件后重新扫描。`,"No longer installed in Claude Code":`Claude Code 中已卸载`,"Project extensions trusted. They load in new sessions and after this one restarts.":`已信任项目扩展,新会话和本会话重新启动后加载。`,"Trusted project extensions":`已信任的项目扩展`,"Revoke trust":`撤销信任`,"No longer loaded after saving, starting with the next session.":`保存后不再加载,从下一个会话开始生效。`,"Web search":`联网搜索`,"Web fetch":`网页抓取`,Computer:`电脑操控`,"Host desktop: list windows, screenshot, accessibility tree, and input. Default off. Not the built-in browser.":`宿主桌面:列窗口、截图、无障碍树与键鼠。默认关闭。不是内嵌浏览器。`,"Operate the host desktop with screenshots, accessibility, and input.":`用截图、无障碍树和键鼠操作宿主桌面。`,"Enso never receives host-desktop computer tools.":`Enso 不会拿到宿主桌面 computer 工具。`,"Ask the coding agent to use the computer tool.":`请让编程 agent 使用 computer 工具。`,"Screen Recording":`屏幕录制`,Accessibility:`辅助功能`,"Open Screen Recording settings":`打开屏幕录制设置`,"Open Accessibility settings":`打开辅助功能设置`,"Computer needs Screen Recording to capture windows and Accessibility to inspect or click them. Grant both to EnsoCode, then restart the app.":`电脑操控需要屏幕录制才能截窗,需要辅助功能才能读无障碍树或点击。请把这两项授权给 EnsoCode,然后重启应用。`,"Grant Computer permissions":`授权电脑操控权限`,"Show permission guide":`打开权限引导`,"Apps the AI may control":`AI 可操作的应用`,"Allow all apps":`允许所有应用`,"The AI can click, type and read in any app without asking. It can see everything in their windows, including chats and passwords.":`AI 操作任何应用都不再询问,可点击、输入并读取所有应用窗口里的内容,包括聊天记录和密码等。`,"Show the app being operated":`显示正在操作的应用`,"While the AI works in an app in the background, a small floating window shows that app live. Close it any time.":`AI 在后台操作某个应用时,用一个小浮窗实时显示这个应用的画面,可随时关掉。`,"The first time the AI clicks or types in an app, EnsoCode asks you. Apps you always allow are listed here; it can then read everything in their windows.":`AI 第一次在某个应用里点击或输入时,EnsoCode 会先询问你。你选择「始终允许」的应用会列在这里,AI 之后可以读取这些应用窗口里的全部内容。`,"No apps are always allowed yet.":`还没有始终允许的应用。`,Revoke:`撤销`,"The agent can screenshot windows and control the mouse and keyboard. Grant Screen Recording and Accessibility to EnsoCode, then restart.":`Agent 可以截取窗口并控制键鼠。请把屏幕录制和辅助功能授权给 EnsoCode,然后重启。`,"Computer is ready. Open sessions can use it from their next step.":`电脑操控已就绪。已打开的会话从下一步起即可使用。`,"Capture: granted":`截屏:已授权`,"Capture: denied":`截屏:未授权`,"Input/AX: granted":`键鼠/AX:已授权`,"Input/AX: denied":`键鼠/AX:未授权`,"This platform cannot operate the desktop yet.":`当前系统还不能操作桌面。`,"QuickJS sandbox: write JavaScript that calls session tools (including edits) in one cell":`QuickJS 沙箱:用 JavaScript 在一个 cell 里调用会话工具(含编辑)`,"(log unavailable)":`(日志不可用)`,"Loading…":`加载中…`,"(no log available)":`(暂无日志)`,"Context compacted":`上下文已压缩`,"Waiting for first token":`等首字`,"Think time":`思考`,"{{kind}} · {{before}} → {{after}} · freed {{percent}}%":`{{kind}} · {{before}} → {{after}} · 释放 {{percent}}%`,"Context compacted ({{tokens}} tokens before)":`上下文已压缩(压缩前 {{tokens}} tokens)`,"Verified context compacted":`验证式压缩完成`,"Verified context compacted ({{tokens}} tokens before)":`验证式压缩完成(压缩前 {{tokens}} tokens)`,"Verified summary from smart compaction. Messages above are no longer in the model context.":`这次用了验证式摘要。此线之上的历史已不在模型上下文中。`,"Memory context compacted":`持续记忆压缩完成`,"Memory context compacted ({{tokens}} tokens before)":`持续记忆压缩完成(压缩前 {{tokens}} tokens)`,"Summary rendered from continuous memory. Messages above are no longer in the model context; use recall for sources.":`这次由持续记忆直接渲染摘要。此线之上的历史已不在模型上下文中,可用 recall 查看来源。`,"Messages above are no longer in the model context; only this summary is.":`以上消息已不在模型上下文中,模型只看到这份摘要。`,"Latest compaction summary — expand to read what the model kept.":`最近一次压缩摘要,点开可查看模型保留的内容。`,"(summary unavailable)":`(摘要不可用)`,Note:`注意`,Tip:`提示`,Important:`重要`,Warning:`警告`,Caution:`小心`,"Let the agent pick subagent models":`允许子代理指定模型`,"The main agent can pick one of these models when dispatching subagents or coworkers. The description tells it when to use each model.":`主 agent 派发 subagent/coworker 时可从这些模型里挑选;描述用于告诉它每个模型适合什么任务。`,"When to use it, e.g. cheap and fast for simple subtasks":`什么时候用它,例如:便宜快,适合简单子任务`,"Add model":`添加模型`,Delete:`删除`,Archived:`已归档`,"Clean up archived":`清理已归档`,"Older than {{days}} days":`{{days}} 天前`,"Delete all archived":`全部删除`,"All {{count}} archived conversations will be removed from the list.":`全部 {{count}} 个已归档对话将从列表移除。`,'All {{count}} archived conversations in "{{name}}" will be removed from the list.':`「{{name}}」中全部 {{count}} 个已归档对话将从列表移除。`,"Delete archived conversations?":`删除已归档对话?`,"{{count}} conversations archived more than {{days}} days ago will be removed from the list.":`{{count}} 个归档超过 {{days}} 天的对话将从列表移除。`,'{{count}} conversations in "{{name}}" archived more than {{days}} days ago will be removed from the list.':`「{{name}}」中 {{count}} 个归档超过 {{days}} 天的对话将从列表移除。`,Other:`其他`,Archive:`归档`,Unarchive:`取消归档`,Active:`活跃中`,Pinned:`已置顶`,"Drop here to pin":`拖到此处置顶`,Pin:`置顶`,Unpin:`取消置顶`,Rename:`重命名`,"Model selection":`模型选择`,"Must be picked by main agent":`必须由主 Agent 选择`,"Picked by main agent":`由主 Agent 选择`,"Fixed model":`自选固定模型`,"Subagent models not configured warning":`未在【模型服务】中配置【允许子代理指定模型】。设为【必须由主 Agent 选择】的子代理类型将暂时回退为跟随会话。`,"Custom subagent presets: system prompt, model and toolset. The agent picks one via the agent_type parameter.":`自定义子代理预设:系统提示、模型与工具集,主 agent 经 agent_type 参数选用。`,"New agent type":`新建类型`,"Built-in":`内置`,"Follows the conversation model, full toolset":`跟随会话模型,全部工具`,"Follows the conversation model":`跟随会话模型`,"Overrides built-in":`覆盖内置`,"Edit agent type":`编辑类型`,"Name (slug)":`名称(slug)`,"Description (helps the agent pick this type)":`描述(帮助主 agent 选型)`,"Fast read-only recon, returns compressed findings":`快速只读调研,返回压缩结论`,"System prompt":`系统提示`,"You are a fast recon agent. Explore, never modify…":`你是快速调研代理,只探索不修改…`,"Provider (optional)":`模型服务(可选)`,"Follow conversation":`跟随会话`,"Enable subagent model":`启用子代理模型`,"Make this model available to subagents":`允许子代理选择此模型`,"Applies to newly started conversations.":`对新启动的会话生效。`,"Follow parent":`跟随父会话`,"Depth: {{level}}":`深度:{{level}}`,Disabled:`已停用`,"Select model":`选择模型`,Toolset:`工具集`,"All tools (bash/edit/write)":`全部工具(bash/edit/write)`,"Read-only (read/grep/find/ls + bound MCP)":`只读(read/grep/find/ls + 绑定的 MCP)`,Stop:`停止`,"Attach image":`添加图片`,"Stop task":`停止任务`,"Move to background":`转为后台`,"Moving to background…":`正在转后台…`,"Moved to background":`已转后台`,"Moves to background in {{seconds}}s":`{{seconds}} 秒后转后台`,"No output for {{seconds}}s":`{{seconds}} 秒无输出`,"Exit {{code}}":`退出码 {{code}}`,"Killed at timeout":`超时被终止`,"Stopped by you":`已被你停止`,"Needs terminal":`需要终端`,"Needs login":`需要登录`,"Command not found":`找不到命令`,"Not executable":`不可执行`,"Binary output":`二进制输出`,"Log truncated":`日志已截断`,"Killed when its timeout was reached. Raise the timeout or run it in the background.":`到达 timeout 被终止。可提高 timeout 或改为后台运行。`,"Needs an interactive terminal. Use a non-interactive flag (such as --yes) or run it in your own terminal.":`需要交互式终端。改用非交互参数(如 --yes),或在你自己的终端里运行。`,"Needs credentials. Sign in from your own terminal, then retry.":`需要凭证。请先在你自己的终端里登录,再重试。`,"The program is not installed or not on PATH.":`程序未安装或不在 PATH 中。`,"Copy command":`复制命令`,"Rerun in background":`转后台重跑`,"Rerun with {{seconds}}s timeout":`以 {{seconds}}s timeout 重跑`,"Rerun this command with background: true:\n\n{{command}}":`用 background: true 重新运行这条命令:
|
|
11
11
|
|
|
12
12
|
{{command}}`,"Rerun this command with timeout: {{seconds}}:\n\n{{command}}":`用 timeout: {{seconds}} 重新运行这条命令:
|
|
13
13
|
|
|
@@ -1620,7 +1620,7 @@ WARNING: This link could potentially be dangerous`)){let e=window.open();if(e){t
|
|
|
1620
1620
|
`))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
|
|
1621
1621
|
`,...a.current()});return/^[\t ]/.test(l)&&(l=Y6(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}Q6.peek=Rce;function Q6(e){return e.value||``}function Rce(){return`<`}$6.peek=zce;function $6(e,t,n,r){let i=J6(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function zce(){return`!`}e8.peek=Bce;function e8(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Bce(){return`!`}t8.peek=Vce;function t8(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function Vce(){return"`"}function n8(e,t){let n=G2(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type===`text`&&(n===e.url||`mailto:`+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}r8.peek=Hce;function r8(e,t,n,r){let i=J6(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(n8(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function Hce(e,t,n){return n8(e,n)?`<`:`[`}i8.peek=Uce;function i8(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Uce(){return`[`}function a8(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Wce(e){let t=a8(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Gce(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function o8(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Kce(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?Gce(n):a8(n),s=e.ordered?o===`.`?`)`:`.`:Wce(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),o8(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function qce(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Jce(e,t,n,r){let i=qce(n),a=n.bulletCurrent||a8(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function Yce(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var Xce=u6([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function Zce(e,t,n,r){return(e.children.some(function(e){return Xce(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Qce(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}s8.peek=$ce;function s8(e,t,n,r){let i=Qce(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=X6(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=Y6(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=X6(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+Y6(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function $ce(e,t,n){return n.options.strong||`*`}function ele(e,t,n,r){return n.safe(e.value,r)}function tle(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function nle(e,t,n){let r=(o8(n)+(n.options.ruleSpaces?` `:``)).repeat(tle(n));return n.options.ruleSpaces?r.slice(0,-1):r}var c8={blockquote:Tce,break:q6,code:jce,definition:Nce,emphasis:Z6,hardBreak:q6,heading:Lce,html:Q6,image:$6,imageReference:e8,inlineCode:t8,link:r8,linkReference:i8,list:Kce,listItem:Jce,paragraph:Yce,root:Zce,strong:s8,text:ele,thematicBreak:nle};function rle(){return{enter:{table:ile,tableData:u8,tableHeader:u8,tableRow:ole},exit:{codeText:sle,table:ale,tableData:l8,tableHeader:l8,tableRow:l8}}}function ile(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function ale(e){this.exit(e),this.data.inTable=void 0}function ole(e){this.enter({type:`tableRow`,children:[]},e)}function l8(e){this.exit(e)}function u8(e){this.enter({type:`tableCell`,children:[]},e)}function sle(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,cle));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function cle(e,t){return t===`|`?t:e}function lle(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
|
|
1622
1622
|
`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
|
|
1623
|
-
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return Cce(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=c8.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function ule(){return{exit:{taskListCheckValueChecked:d8,taskListCheckValueUnchecked:d8,paragraph:fle}}}function dle(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:ple}}}function d8(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function fle(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function ple(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=c8.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function mle(){return[Kse(),pce(),_ce(),rle(),ule()]}function hle(e){return{extensions:[qse(),mce(e),vce(),lle(e),dle()]}}var gle={tokenize:Sle,partial:!0},f8={tokenize:Cle,partial:!0},p8={tokenize:wle,partial:!0},m8={tokenize:Tle,partial:!0},_le={tokenize:Ele,partial:!0},h8={name:`wwwAutolink`,tokenize:ble,previous:b8},g8={name:`protocolAutolink`,tokenize:xle,previous:x8},_8={name:`emailAutolink`,tokenize:yle,previous:S8},v8={};function vle(){return{text:v8}}for(var y8=48;y8<123;)v8[y8]=_8,y8++,y8===58?y8=65:y8===91&&(y8=97);v8[43]=_8,v8[45]=_8,v8[46]=_8,v8[95]=_8,v8[72]=[_8,g8],v8[104]=[_8,g8],v8[87]=[_8,h8],v8[119]=[_8,h8];function yle(e,t,n){let r=this,i,a;return o;function o(t){return!C8(t)||!S8.call(r,r.previous)||w8(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return C8(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(_le,u,l)(t):t===45||t===95||o4(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&a4(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function ble(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!b8.call(r,r.previous)||w8(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(gle,e.attempt(f8,e.attempt(p8,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function xle(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&x8.call(r,r.previous)&&!w8(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(a4(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||c4(t)||p4(t)||g4(t)||h4(t)?n(t):e.attempt(f8,e.attempt(p8,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function Sle(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function Cle(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(m8,c,s)(t):t===null||p4(t)||g4(t)||t!==45&&h4(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function wle(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(m8,t,a)(o):o===null||p4(o)||g4(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function Tle(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||p4(o)||g4(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||p4(e)||g4(e)?t(e):r(e)}function a(e){return a4(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):a4(t)?(e.consume(t),o):n(t)}}function Ele(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return o4(e)?n(e):t(e)}}function b8(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||p4(e)}function x8(e){return!a4(e)}function S8(e){return!(e===47||C8(e))}function C8(e){return e===43||e===45||e===46||e===95||o4(e)}function w8(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var Dle={tokenize:Fle,partial:!0};function Ole(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:Mle,continuation:{tokenize:Nle},exit:Ple}},text:{91:{name:`gfmFootnoteCall`,tokenize:jle},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:kle,resolveTo:Ale}}}}function kle(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=i4(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function Ale(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function jle(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||p4(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(i4(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return p4(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function Mle(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||p4(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=i4(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return p4(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),y4(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function Nle(e,t,n){return e.check(P4,t,e.attempt(Dle,t,n))}function Ple(e){e.exit(`gfmFootnoteDefinition`)}function Fle(e,t,n){let r=this;return y4(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function Ile(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&Z2(o,o.length,0,D4(s,e.slice(r+1,n),t)),Z2(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),Z2(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=E4(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=E4(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var Lle=class{constructor(){this.map=[]}add(e,t,n){Rle(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function Rle(e,t,n,r){let i=0;if(n!==0||r.length!==0){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function zle(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function Ble(){return{flow:{null:{name:`table`,tokenize:Vle,resolveAll:Hle}}}}function Vle(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):f4(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):m4(t)?y4(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||p4(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,m4(t)?y4(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return m4(t)?y4(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||f4(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return m4(t)?y4(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||f4(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||f4(n)?(e.exit(`tableRow`),t(n)):m4(n)?y4(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||p4(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function Hle(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new Lle;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(E8(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=T8(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=T8(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=T8(f,t,o,i,n,d)):(o[0]=o[1],d=T8(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&E8(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=zle(t.events,n))}return e}function T8(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},D8(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=D8(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=D8(t.events,n[2]),a=D8(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},D8(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function E8(e,t,n,r,i){let a=[],o=D8(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function D8(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var Ule={name:`tasklistCheck`,tokenize:Gle};function Wle(){return{text:{91:Ule}}}function Gle(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return p4(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return f4(r)?t(r):m4(r)?e.check({tokenize:Kle},t,n)(r):n(r)}}function Kle(e,t,n){return y4(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function qle(e){return e4([vle(),Ole(),Ile(e),Ble(),Wle()])}var Jle={};function Yle(e){let t=this,n=e||Jle,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(qle(n)),a.push(mle()),o.push(hle(n))}function Xle(e){let[t,n]=W.useState({getBoundingClientRect(){return DOMRect.fromRect({width:0,height:0,x:0,y:0})}}),r=W.useRef(null),i=W.useRef(null),a=W.useRef(null),o=W.useRef(null),s=W.useRef(!0),c=W.useRef(null),l=Py(),u=W.useMemo(()=>({anchor:t,setAnchor:n,actionsRef:a,backdropRef:r,internalBackdropRef:i,positionerRef:o,allowMouseUpTriggerRef:s,initialCursorPointRef:c,rootId:l}),[t,l]);return(0,q.jsx)(Zk.Provider,{value:u,children:(0,q.jsx)(Yk.Provider,{value:void 0,children:(0,q.jsx)(IA,{...e})})})}var O8=500,Zle=W.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{setAnchor:o,actionsRef:s,internalBackdropRef:c,backdropRef:l,positionerRef:u,allowMouseUpTriggerRef:d,initialCursorPointRef:f,rootId:p}=Qk(!1),{store:m}=Xk(!1),h=m.useState(`open`),g=m.useState(`disabled`),_=W.useRef(null),v=W.useRef(null),y=By(),b=By(),x=W.useRef(!1),S=W.useRef(null);function C(e,t,n){let r=n.type.startsWith(`touch`);f.current={x:e,y:t},o({getBoundingClientRect(){return DOMRect.fromRect({width:r?10:0,height:r?10:0,x:e,y:t})}}),x.current=!1,s.current?.setOpen(!0,ky(gy,n)),b.start(O8,()=>{x.current=!0})}function w(e){if(g)return;d.current=!0,tb(e),C(e.clientX,e.clientY,e.nativeEvent);let t=uy(_.current);S.current?.abort();let n=new AbortController;S.current=n,t.addEventListener(`mouseup`,e=>{if(d.current=!1,!x.current)return;b.clear(),x.current=!1;let t=hb(e);mb(u.current,t)||p&&t&&UA(t)===p||s.current?.setOpen(!1,ky(Ty,e))},{once:!0,signal:n.signal})}function T(){y.clear(),v.current=null}function E(e){if(g){T();return}if(d.current=!1,e.touches.length!==1){T();return}e.stopPropagation();let t=e.touches[0],n={x:t.clientX,y:t.clientY};v.current=n,y.start(O8,()=>{C(n.x,n.y,e.nativeEvent)})}function D(e){if(e.touches.length!==1){T();return}if(y.isStarted()&&v.current){let t=e.touches[0],n=Math.abs(t.clientX-v.current.x),r=Math.abs(t.clientY-v.current.y);(n>10||r>10)&&T()}}return W.useEffect(()=>()=>{S.current?.abort()},[]),W.useEffect(()=>{function e(e){if(g)return;let t=hb(e);(mb(_.current,t)||mb(c.current,t)||mb(l.current,t))&&e.preventDefault()}return Eb(uy(_.current),`contextmenu`,e)},[l,g,c]),nr(`div`,e,{state:{open:h},ref:[_,t],props:[{onContextMenu:w,onTouchStart:E,onTouchMove:D,onTouchEnd:T,onTouchCancel:T,style:{WebkitTouchCallout:`none`}},a],stateAttributesMapping:Ev})}),k8=Xle;function A8(e){return(0,q.jsx)(Zle,{"data-slot":`context-menu-trigger`,...e})}function j8({children:e,className:t,zIndex:n,...r}){return(0,q.jsxs)(_A,{children:[(0,q.jsx)($k,{className:`fixed inset-0 z-40`,"data-enso-float":``,style:n===void 0?void 0:{zIndex:n-1}}),(0,q.jsx)(DA,{className:`z-50`,"data-slot":`context-menu-positioner`,style:n===void 0?void 0:{zIndex:n},children:(0,q.jsx)(mA,{className:K(tj,t),"data-slot":`context-menu-popup`,...r,children:(0,q.jsx)(`div`,{className:`max-h-(--available-height) w-full overflow-y-auto p-1.5`,children:e})})})]})}function M8({className:e,variant:t=`default`,...n}){return(0,q.jsx)(dA,{className:K(nj,e),"data-slot":`context-menu-item`,"data-variant":t,...n})}function N8(){let e=navigator.userAgent;return e.includes(`Mac`)?`Reveal in Finder`:e.includes(`Linux`)?`Open Containing Folder`:`Reveal in File Explorer`}function Qle({image:e,onClose:t}){let{t:n}=J();return(0,q.jsx)(HE,{open:e!==null,onOpenChange:e=>{e||t()},children:(0,q.jsxs)(UE,{className:`max-w-4xl`,children:[(0,q.jsxs)(WE,{children:[(0,q.jsx)(GE,{children:n(`Image preview`)}),(0,q.jsx)(yte,{className:`break-all`,children:e?.rel})]}),(0,q.jsx)(KE,{className:`max-h-[70vh]`,children:e&&(0,q.jsx)(`img`,{src:e.dataUrl,alt:e.rel,className:`mx-auto max-h-[65vh] max-w-full object-contain`})}),(0,q.jsx)(vte,{children:(0,q.jsx)(Ui,{variant:`outline`,onClick:t,children:n(`Close`)})})]})})}var $le=2;function eue({value:e}){return typeof e==`string`?(0,q.jsx)(`span`,{className:`text-emerald-700 dark:text-emerald-400`,children:JSON.stringify(e)}):typeof e==`number`?(0,q.jsx)(`span`,{className:`text-sky-700 dark:text-sky-400`,children:String(e)}):(0,q.jsx)(`span`,{className:`text-violet-700 dark:text-violet-400`,children:String(e)})}function P8({name:e,value:t,depth:n}){let[r,i]=(0,W.useState)(n<$le),a=e!==void 0&&(0,q.jsxs)(`span`,{className:`text-foreground/80`,children:[e,(0,q.jsx)(`span`,{className:`text-muted-foreground`,children:`: `})]});if(typeof t!=`object`||!t)return(0,q.jsxs)(`div`,{className:`pl-4`,children:[a,(0,q.jsx)(eue,{value:t})]});let o=Array.isArray(t),s=o?t.map((e,t)=>[String(t),e]):Object.entries(t),[c,l]=o?[`[`,`]`]:[`{`,`}`];return(0,q.jsxs)(`div`,{className:n>0?`pl-4`:void 0,children:[(0,q.jsxs)(`button`,{type:`button`,"aria-expanded":r,onClick:()=>i(!r),className:`-ml-4 inline-flex items-center text-left hover:text-foreground`,children:[(0,q.jsx)(Ve,{className:K(`h-3 w-3 shrink-0 transition-transform`,r&&`rotate-90`)}),(0,q.jsxs)(`span`,{className:`ml-1`,children:[a,(0,q.jsxs)(`span`,{className:`text-muted-foreground`,children:[c,!r&&` ${s.length} ${l}`]})]})]}),r&&(0,q.jsxs)(q.Fragment,{children:[s.map(([e,t])=>(0,q.jsx)(P8,{name:o?void 0:e,value:t,depth:n+1},e)),(0,q.jsx)(`div`,{className:`text-muted-foreground`,children:l})]})]})}function tue({source:e,value:t}){let{t:n}=J(),[r,i]=(0,W.useState)(!1),a=e=>K(`rounded px-1.5 py-0.5`,e?`bg-muted text-foreground`:`hover:text-foreground`);return(0,q.jsxs)(`div`,{"data-enso":`json-tree`,className:`group/code relative my-2 rounded-lg border`,children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-1 border-b px-2 py-1 text-[11px] text-muted-foreground`,children:[(0,q.jsx)(`span`,{className:`mr-auto font-mono`,children:`JSON`}),(0,q.jsx)(`button`,{type:`button`,className:a(!r),onClick:()=>i(!1),children:n(`Tree view`)}),(0,q.jsx)(`button`,{type:`button`,className:a(r),onClick:()=>i(!0),children:n(`Raw text`)}),(0,q.jsx)(ls,{text:e,className:`rounded p-1`})]}),r?(0,q.jsx)(`div`,{className:`px-2`,children:(0,q.jsx)(kK,{code:e,language:`json`})}):(0,q.jsx)(`div`,{className:`max-h-[480px] overflow-auto py-2 pr-3 pl-6 font-mono text-(length:--chat-code-block-size) leading-relaxed`,children:(0,q.jsx)(P8,{value:t,depth:0})})]})}var nue=`position:fixed;left:0;top:0;width:800px;height:600px;overflow:hidden;opacity:0;pointer-events:none;visibility:hidden;contain:strict;`;function rue(e){return!e.includes(`<svg`)||/\bfocusable=/.test(e)?e:e.replace(`<svg`,`<svg focusable="false" tabindex="-1"`)}function iue(e){return{startOnLoad:!1,theme:e,securityLevel:`strict`,fontFamily:`inherit`,suppressErrorRendering:!0,flowchart:{htmlLabels:!1,useMaxWidth:!0}}}var aue=/<(?:a|area)\b(?:[^>"']|"[^"]*"|'[^']*')*>/gi,oue=/\s(?:xlink:)?(?:href|target)\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'>]+)/gi;function sue(e){return e.replace(aue,e=>e.replace(oue,``))}var F8=null,I8=null,L8=Promise.resolve(),cue=0;async function lue(){return I8||(F8||=Y(()=>import(`./mermaid.core-C1wA-mhD.js`).then(e=>(I8=e.default,I8)),__vite__mapDeps([126,127,128,1,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143])).catch(e=>{throw F8=null,e}),F8)}function uue(e){let t=L8.then(e,e);return L8=t.then(()=>void 0,()=>void 0),t}async function due(e,t){return uue(async()=>{let n=await lue();n.initialize(iue(t));let r=`ensoMermaid${++cue}`,i=document.createElement(`div`);i.setAttribute(`aria-hidden`,`true`),i.style.cssText=nue,document.body.appendChild(i);try{let{svg:t}=await n.render(r,e,i);return rue(sue(t))}finally{i.remove(),document.getElementById(r)?.remove(),document.getElementById(`d${r}`)?.remove()}})}var R8=.1,z8=.1;function fue({code:e,streaming:t=!1,className:n}){let{t:r}=J(),i=(0,W.useRef)(null),[a,o]=(0,W.useState)(null),[s,c]=(0,W.useState)(null),[l,u]=(0,W.useState)(1),[d,f]=(0,W.useState)({x:0,y:0}),[p,m]=(0,W.useState)(!1),[h,g]=(0,W.useState)(!1);ME(h);let _=(0,W.useRef)({x:0,y:0}),v=(0,W.useRef)({x:0,y:0}),y=(0,W.useRef)(null),b=(0,W.useRef)(!1),x=V0()===`dark`?`dark`:`default`;(0,W.useEffect)(()=>{if(t){o(null),c(null);return}let n=!1;return(async()=>{if(!e.trim()){o(null),c(null);return}try{let t=await due(e,x);n||(o(t),c(null),u(1),f({x:0,y:0}))}catch(e){n||(c(e instanceof Error?e.message:`Mermaid render failed`),o(null))}})(),()=>{n=!0}},[e,x,t]);let S=(0,W.useCallback)(()=>u(e=>e+R8),[]),C=(0,W.useCallback)(()=>u(e=>Math.max(e-R8,z8)),[]),w=(0,W.useCallback)(()=>{u(1),f({x:0,y:0})},[]),T=(0,W.useCallback)(()=>{g(!1),u(1),f({x:0,y:0})},[]),E=(0,W.useCallback)(()=>{g(!0),requestAnimationFrame(()=>{let e=y.current?.querySelector(`svg`),t=y.current?.getBoundingClientRect();if(!e||!t?.width||!t.height)return;let n=e.getBoundingClientRect(),r=Math.min((t.width-48)/n.width,(t.height-48)/n.height);u(Math.round(r*100)/100),f({x:0,y:0})})},[]),D=(0,W.useCallback)(e=>{if(!h)return;e.preventDefault();let t=e.deltaY>0?-.1:R8;u(e=>Math.round(Math.max(e+t,z8)*100)/100)},[h]),O=(0,W.useCallback)(e=>{!h||e.button!==0||(m(!0),b.current=!1,_.current={x:e.clientX,y:e.clientY},v.current={...d})},[h,d]),k=(0,W.useCallback)(e=>{if(!p)return;let t=e.clientX-_.current.x,n=e.clientY-_.current.y;(Math.abs(t)>2||Math.abs(n)>2)&&(b.current=!0),f({x:v.current.x+t,y:v.current.y+n})},[p]),A=(0,W.useCallback)(()=>m(!1),[]),j=(0,W.useCallback)(e=>{e.stopPropagation()},[]),M=(0,W.useCallback)(()=>{b.current||T()},[T]),N=e=>{let t=e===`sm`?`h-6 w-6`:`h-7 w-7`,n=e===`sm`?`h-3.5 w-3.5`:`h-4 w-4`,i=e===`sm`?`h-6 min-w-[2.5rem]`:`h-7 min-w-[3rem]`;return(0,q.jsxs)(`div`,{className:`flex items-center gap-1 rounded-md border border-border bg-background/95 p-1 shadow-sm`,children:[(0,q.jsx)(`button`,{type:`button`,onClick:S,className:K(`flex items-center justify-center rounded text-sm transition-colors hover:bg-accent hover:text-accent-foreground`,t),title:r(`Zoom in`),children:(0,q.jsx)(Ut,{className:n})}),(0,q.jsxs)(`button`,{type:`button`,onClick:w,className:K(`flex items-center justify-center rounded text-xs transition-colors hover:bg-accent hover:text-accent-foreground`,i),title:r(`Reset zoom`),children:[Math.round(l*100),`%`]}),(0,q.jsx)(`button`,{type:`button`,onClick:C,disabled:l<=z8,className:K(`flex items-center justify-center rounded text-sm transition-colors hover:bg-accent hover:text-accent-foreground`,t,l<=z8&&`cursor-not-allowed opacity-50`),title:r(`Zoom out`),children:(0,q.jsx)(jt,{className:n})}),l!==1&&(0,q.jsx)(`button`,{type:`button`,onClick:w,className:K(`flex items-center justify-center rounded text-sm transition-colors hover:bg-accent hover:text-accent-foreground`,t),title:r(`Fit to original size`),children:(0,q.jsx)(qt,{className:n})}),(0,q.jsx)(`div`,{className:`mx-0.5 h-4 w-px bg-border`}),h?(0,q.jsx)(`button`,{type:`button`,onClick:T,className:K(`flex items-center justify-center rounded text-sm transition-colors hover:bg-accent hover:text-accent-foreground`,t),title:r(`Exit fullscreen`),children:(0,q.jsx)(At,{className:n})}):(0,q.jsx)(`button`,{type:`button`,onClick:E,className:K(`flex items-center justify-center rounded text-sm transition-colors hover:bg-accent hover:text-accent-foreground`,t),title:r(`View fullscreen`),children:(0,q.jsx)(wt,{className:n})})]})};return s?(0,q.jsxs)(`div`,{className:K(`overflow-x-auto rounded-lg border border-destructive/50`,n),children:[(0,q.jsx)(`div`,{className:`flex items-center gap-2 border-b border-destructive/30 bg-destructive/10 px-3 py-2 text-xs text-destructive`,children:(0,q.jsx)(`span`,{children:r(`Mermaid render error`)})}),(0,q.jsx)(`pre`,{className:`p-4 text-sm`,children:(0,q.jsx)(`code`,{className:`block font-mono leading-relaxed text-muted-foreground`,children:e})}),(0,q.jsx)(`div`,{className:`border-t border-border bg-muted/30 px-3 py-2 text-xs text-muted-foreground`,children:s})]}):a?(0,q.jsxs)(`div`,{className:K(`relative rounded-lg border border-border bg-muted/30`,n),style:{userSelect:`none`,WebkitUserSelect:`none`},children:[(0,q.jsx)(`div`,{ref:i,className:K(`max-h-[min(50vh,20rem)] overflow-hidden [overflow-anchor:none]`,h&&(p?`cursor-grabbing`:`cursor-grab`)),onWheel:D,onMouseDown:O,onMouseMove:k,onMouseUp:A,onMouseLeave:A,onDoubleClick:h?void 0:E,children:(0,q.jsx)(`div`,{className:`origin-center transition-transform duration-100 ease-out`,style:{transform:`translate(${d.x}px, ${d.y}px) scale(${l})`},children:(0,q.jsx)(`div`,{className:`p-4`,dangerouslySetInnerHTML:{__html:a}})})}),(0,q.jsx)(`div`,{className:`absolute right-2 bottom-2`,children:N(`sm`)}),h&&(0,q.jsxs)(`div`,{className:`fixed inset-0 flex select-none flex-col bg-background`,style:{zIndex:BE.TOAST},"data-enso-float":``,onClick:M,onKeyDown:e=>{e.key===`Escape`&&T()},children:[(0,q.jsxs)(`div`,{className:`flex shrink-0 items-center justify-between border-b border-border bg-muted/30 px-4 py-2`,onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),children:[(0,q.jsx)(`span`,{className:`text-sm font-medium text-muted-foreground`,children:r(`Mermaid preview`)}),(0,q.jsx)(`button`,{type:`button`,onClick:T,className:`flex h-7 w-7 items-center justify-center rounded-md border border-border bg-background/95 text-sm transition-colors hover:bg-accent hover:text-accent-foreground`,title:r(`Exit fullscreen`),children:(0,q.jsx)(yn,{className:`h-4 w-4`})})]}),(0,q.jsxs)(`div`,{className:`relative min-h-0 flex-1`,children:[(0,q.jsx)(`div`,{ref:y,className:K(`absolute inset-0 flex select-none items-center justify-center overflow-hidden`,p?`cursor-grabbing`:`cursor-grab`),onWheel:D,onMouseDown:O,onMouseMove:k,onMouseUp:A,onMouseLeave:A,onClick:j,onKeyDown:j,children:(0,q.jsx)(`div`,{className:`origin-center transition-transform duration-100 ease-out`,style:{transform:`translate(${d.x}px, ${d.y}px) scale(${l})`},children:(0,q.jsx)(`div`,{className:`p-4`,dangerouslySetInnerHTML:{__html:a}})})}),(0,q.jsx)(`div`,{className:`absolute right-4 bottom-4`,children:N(`md`)})]})]})]}):(0,q.jsx)(`div`,{className:K(`flex items-center justify-center rounded-lg border border-border bg-muted/30 p-8`,n),children:(0,q.jsx)(`div`,{className:`text-sm text-muted-foreground`,children:r(`Loading Mermaid diagram...`)})})}var pue=/^(?:%|ms|s|sec|min|h|ms\/op|ns|µs|us|b|kb|mb|gb|tb|kib|mib|gib|x|×|k|m|bn)$/i;function B8(e){let t=e.trim().replace(/^[$€£¥₹]\s*/,``),n=!1;/^\(.*\)$/.test(t)&&(n=!0,t=t.slice(1,-1));let r=/^([+-]?(?:\d{1,3}(?:,\d{3})+|\d+)(?:\.\d+)?)\s*(\S*)$/.exec(t);if(!r||r[2]&&!pue.test(r[2]))return null;let i=Number(r[1].replace(/,/g,``));return n?-i:i}function mue(e){let t=Math.max(0,...e.map(e=>e.length));return Array.from({length:t},(t,n)=>{let r=e.map(e=>e[n]?.trim()??``).filter(Boolean);return r.length>0&&r.every(e=>B8(e)!==null)})}function hue(e,t,n){return n?(B8(e)??0)-(B8(t)??0):e.localeCompare(t,void 0,{numeric:!0,sensitivity:`base`})}function gue(e,t,n){let r=e.map((e,t)=>t);if(!t)return r;let i=t.dir===`asc`?1:-1,a=n=>e[n][t.column]?.trim()??``;return r.sort((e,r)=>{let o=a(e),s=a(r);return!o||!s?o?-1:+!!s:i*hue(o,s,n[t.column]??!1)||e-r})}function _ue(e,t){return e?.column===t?e.dir===`asc`?{column:t,dir:`desc`}:null:{column:t,dir:`asc`}}var vue=new Set([`json`,`jsonc`,`json5`]),yue=new Set([`console`,`shell-session`,`terminal`,`output`,`ansi`]),bue=new Set([`sh`,`bash`,`shell`,`zsh`,`shellscript`]),V8=`$ `;function xue(e,t){let n=e?.toLowerCase();if(n&&vue.has(n))return H8(t)?`json`:null;if(!n&&/^\s*[{[]/.test(t)&&H8(t))return`json`;if(n&&yue.has(n)||t.includes(`\x1B[`))return`terminal`;if(!n||bue.has(n)){let e=t.split(`
|
|
1623
|
+
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return Cce(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=c8.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function ule(){return{exit:{taskListCheckValueChecked:d8,taskListCheckValueUnchecked:d8,paragraph:fle}}}function dle(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:ple}}}function d8(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function fle(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function ple(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=c8.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function mle(){return[Kse(),pce(),_ce(),rle(),ule()]}function hle(e){return{extensions:[qse(),mce(e),vce(),lle(e),dle()]}}var gle={tokenize:Sle,partial:!0},f8={tokenize:Cle,partial:!0},p8={tokenize:wle,partial:!0},m8={tokenize:Tle,partial:!0},_le={tokenize:Ele,partial:!0},h8={name:`wwwAutolink`,tokenize:ble,previous:b8},g8={name:`protocolAutolink`,tokenize:xle,previous:x8},_8={name:`emailAutolink`,tokenize:yle,previous:S8},v8={};function vle(){return{text:v8}}for(var y8=48;y8<123;)v8[y8]=_8,y8++,y8===58?y8=65:y8===91&&(y8=97);v8[43]=_8,v8[45]=_8,v8[46]=_8,v8[95]=_8,v8[72]=[_8,g8],v8[104]=[_8,g8],v8[87]=[_8,h8],v8[119]=[_8,h8];function yle(e,t,n){let r=this,i,a;return o;function o(t){return!C8(t)||!S8.call(r,r.previous)||w8(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return C8(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(_le,u,l)(t):t===45||t===95||o4(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&a4(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function ble(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!b8.call(r,r.previous)||w8(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(gle,e.attempt(f8,e.attempt(p8,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function xle(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&x8.call(r,r.previous)&&!w8(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(a4(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||c4(t)||p4(t)||g4(t)||h4(t)?n(t):e.attempt(f8,e.attempt(p8,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function Sle(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function Cle(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(m8,c,s)(t):t===null||p4(t)||g4(t)||t!==45&&h4(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function wle(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(m8,t,a)(o):o===null||p4(o)||g4(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function Tle(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||p4(o)||g4(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||p4(e)||g4(e)?t(e):r(e)}function a(e){return a4(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):a4(t)?(e.consume(t),o):n(t)}}function Ele(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return o4(e)?n(e):t(e)}}function b8(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||p4(e)}function x8(e){return!a4(e)}function S8(e){return!(e===47||C8(e))}function C8(e){return e===43||e===45||e===46||e===95||o4(e)}function w8(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var Dle={tokenize:Fle,partial:!0};function Ole(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:Mle,continuation:{tokenize:Nle},exit:Ple}},text:{91:{name:`gfmFootnoteCall`,tokenize:jle},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:kle,resolveTo:Ale}}}}function kle(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=i4(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function Ale(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function jle(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||p4(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(i4(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return p4(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function Mle(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||p4(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=i4(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return p4(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),y4(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function Nle(e,t,n){return e.check(P4,t,e.attempt(Dle,t,n))}function Ple(e){e.exit(`gfmFootnoteDefinition`)}function Fle(e,t,n){let r=this;return y4(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function Ile(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&Z2(o,o.length,0,D4(s,e.slice(r+1,n),t)),Z2(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),Z2(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=E4(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=E4(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var Lle=class{constructor(){this.map=[]}add(e,t,n){Rle(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function Rle(e,t,n,r){let i=0;if(n!==0||r.length!==0){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function zle(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function Ble(){return{flow:{null:{name:`table`,tokenize:Vle,resolveAll:Hle}}}}function Vle(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):f4(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):m4(t)?y4(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||p4(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,m4(t)?y4(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return m4(t)?y4(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||f4(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return m4(t)?y4(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||f4(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||f4(n)?(e.exit(`tableRow`),t(n)):m4(n)?y4(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||p4(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function Hle(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new Lle;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(E8(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=T8(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=T8(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=T8(f,t,o,i,n,d)):(o[0]=o[1],d=T8(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&E8(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=zle(t.events,n))}return e}function T8(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},D8(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=D8(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=D8(t.events,n[2]),a=D8(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},D8(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function E8(e,t,n,r,i){let a=[],o=D8(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function D8(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var Ule={name:`tasklistCheck`,tokenize:Gle};function Wle(){return{text:{91:Ule}}}function Gle(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return p4(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return f4(r)?t(r):m4(r)?e.check({tokenize:Kle},t,n)(r):n(r)}}function Kle(e,t,n){return y4(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function qle(e){return e4([vle(),Ole(),Ile(e),Ble(),Wle()])}var Jle={};function Yle(e){let t=this,n=e||Jle,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(qle(n)),a.push(mle()),o.push(hle(n))}function Xle(e){let[t,n]=W.useState({getBoundingClientRect(){return DOMRect.fromRect({width:0,height:0,x:0,y:0})}}),r=W.useRef(null),i=W.useRef(null),a=W.useRef(null),o=W.useRef(null),s=W.useRef(!0),c=W.useRef(null),l=Py(),u=W.useMemo(()=>({anchor:t,setAnchor:n,actionsRef:a,backdropRef:r,internalBackdropRef:i,positionerRef:o,allowMouseUpTriggerRef:s,initialCursorPointRef:c,rootId:l}),[t,l]);return(0,q.jsx)(Zk.Provider,{value:u,children:(0,q.jsx)(Yk.Provider,{value:void 0,children:(0,q.jsx)(IA,{...e})})})}var O8=500,Zle=W.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{setAnchor:o,actionsRef:s,internalBackdropRef:c,backdropRef:l,positionerRef:u,allowMouseUpTriggerRef:d,initialCursorPointRef:f,rootId:p}=Qk(!1),{store:m}=Xk(!1),h=m.useState(`open`),g=m.useState(`disabled`),_=W.useRef(null),v=W.useRef(null),y=By(),b=By(),x=W.useRef(!1),S=W.useRef(null);function C(e,t,n){let r=n.type.startsWith(`touch`);f.current={x:e,y:t},o({getBoundingClientRect(){return DOMRect.fromRect({width:r?10:0,height:r?10:0,x:e,y:t})}}),x.current=!1,s.current?.setOpen(!0,ky(gy,n)),b.start(O8,()=>{x.current=!0})}function w(e){if(g)return;d.current=!0,tb(e),C(e.clientX,e.clientY,e.nativeEvent);let t=uy(_.current);S.current?.abort();let n=new AbortController;S.current=n,t.addEventListener(`mouseup`,e=>{if(d.current=!1,!x.current)return;b.clear(),x.current=!1;let t=hb(e);mb(u.current,t)||p&&t&&UA(t)===p||s.current?.setOpen(!1,ky(Ty,e))},{once:!0,signal:n.signal})}function T(){y.clear(),v.current=null}function E(e){if(g){T();return}if(d.current=!1,e.touches.length!==1){T();return}e.stopPropagation();let t=e.touches[0],n={x:t.clientX,y:t.clientY};v.current=n,y.start(O8,()=>{C(n.x,n.y,e.nativeEvent)})}function D(e){if(e.touches.length!==1){T();return}if(y.isStarted()&&v.current){let t=e.touches[0],n=Math.abs(t.clientX-v.current.x),r=Math.abs(t.clientY-v.current.y);(n>10||r>10)&&T()}}return W.useEffect(()=>()=>{S.current?.abort()},[]),W.useEffect(()=>{function e(e){if(g)return;let t=hb(e);(mb(_.current,t)||mb(c.current,t)||mb(l.current,t))&&e.preventDefault()}return Eb(uy(_.current),`contextmenu`,e)},[l,g,c]),nr(`div`,e,{state:{open:h},ref:[_,t],props:[{onContextMenu:w,onTouchStart:E,onTouchMove:D,onTouchEnd:T,onTouchCancel:T,style:{WebkitTouchCallout:`none`}},a],stateAttributesMapping:Ev})}),k8=Xle;function A8(e){return(0,q.jsx)(Zle,{"data-slot":`context-menu-trigger`,...e})}function j8({children:e,className:t,zIndex:n,...r}){return(0,q.jsxs)(_A,{children:[(0,q.jsx)($k,{className:`fixed inset-0 z-40`,"data-enso-float":``,style:n===void 0?void 0:{zIndex:n-1}}),(0,q.jsx)(DA,{className:`z-50`,"data-slot":`context-menu-positioner`,style:n===void 0?void 0:{zIndex:n},children:(0,q.jsx)(mA,{className:K(tj,t),"data-slot":`context-menu-popup`,...r,children:(0,q.jsx)(`div`,{className:`max-h-(--available-height) w-full overflow-y-auto p-1.5`,children:e})})})]})}function M8({className:e,variant:t=`default`,...n}){return(0,q.jsx)(dA,{className:K(nj,e),"data-slot":`context-menu-item`,"data-variant":t,...n})}function N8(){let e=navigator.userAgent;return e.includes(`Mac`)?`Reveal in Finder`:e.includes(`Linux`)?`Open Containing Folder`:`Reveal in File Explorer`}function Qle({image:e,onClose:t}){let{t:n}=J();return(0,q.jsx)(HE,{open:e!==null,onOpenChange:e=>{e||t()},children:(0,q.jsxs)(UE,{className:`max-w-4xl`,children:[(0,q.jsxs)(WE,{children:[(0,q.jsx)(GE,{children:n(`Image preview`)}),(0,q.jsx)(yte,{className:`break-all`,children:e?.rel})]}),(0,q.jsx)(KE,{className:`max-h-[70vh]`,children:e&&(0,q.jsx)(`img`,{src:e.dataUrl,alt:e.rel,className:`mx-auto max-h-[65vh] max-w-full object-contain`})}),(0,q.jsx)(vte,{children:(0,q.jsx)(Ui,{variant:`outline`,onClick:t,children:n(`Close`)})})]})})}var $le=2;function eue({value:e}){return typeof e==`string`?(0,q.jsx)(`span`,{className:`text-emerald-700 dark:text-emerald-400`,children:JSON.stringify(e)}):typeof e==`number`?(0,q.jsx)(`span`,{className:`text-sky-700 dark:text-sky-400`,children:String(e)}):(0,q.jsx)(`span`,{className:`text-violet-700 dark:text-violet-400`,children:String(e)})}function P8({name:e,value:t,depth:n}){let[r,i]=(0,W.useState)(n<$le),a=e!==void 0&&(0,q.jsxs)(`span`,{className:`text-foreground/80`,children:[e,(0,q.jsx)(`span`,{className:`text-muted-foreground`,children:`: `})]});if(typeof t!=`object`||!t)return(0,q.jsxs)(`div`,{className:`pl-4`,children:[a,(0,q.jsx)(eue,{value:t})]});let o=Array.isArray(t),s=o?t.map((e,t)=>[String(t),e]):Object.entries(t),[c,l]=o?[`[`,`]`]:[`{`,`}`];return(0,q.jsxs)(`div`,{className:n>0?`pl-4`:void 0,children:[(0,q.jsxs)(`button`,{type:`button`,"aria-expanded":r,onClick:()=>i(!r),className:`-ml-4 inline-flex items-center text-left hover:text-foreground`,children:[(0,q.jsx)(Ve,{className:K(`h-3 w-3 shrink-0 transition-transform`,r&&`rotate-90`)}),(0,q.jsxs)(`span`,{className:`ml-1`,children:[a,(0,q.jsxs)(`span`,{className:`text-muted-foreground`,children:[c,!r&&` ${s.length} ${l}`]})]})]}),r&&(0,q.jsxs)(q.Fragment,{children:[s.map(([e,t])=>(0,q.jsx)(P8,{name:o?void 0:e,value:t,depth:n+1},e)),(0,q.jsx)(`div`,{className:`text-muted-foreground`,children:l})]})]})}function tue({source:e,value:t}){let{t:n}=J(),[r,i]=(0,W.useState)(!1),a=e=>K(`rounded px-1.5 py-0.5`,e?`bg-muted text-foreground`:`hover:text-foreground`);return(0,q.jsxs)(`div`,{"data-enso":`json-tree`,className:`group/code relative my-2 rounded-lg border`,children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-1 border-b px-2 py-1 text-[11px] text-muted-foreground`,children:[(0,q.jsx)(`span`,{className:`mr-auto font-mono`,children:`JSON`}),(0,q.jsx)(`button`,{type:`button`,className:a(!r),onClick:()=>i(!1),children:n(`Tree view`)}),(0,q.jsx)(`button`,{type:`button`,className:a(r),onClick:()=>i(!0),children:n(`Raw text`)}),(0,q.jsx)(ls,{text:e,className:`rounded p-1`})]}),r?(0,q.jsx)(`div`,{className:`px-2`,children:(0,q.jsx)(kK,{code:e,language:`json`})}):(0,q.jsx)(`div`,{className:`max-h-[480px] overflow-auto py-2 pr-3 pl-6 font-mono text-(length:--chat-code-block-size) leading-relaxed`,children:(0,q.jsx)(P8,{value:t,depth:0})})]})}var nue=`position:fixed;left:0;top:0;width:800px;height:600px;overflow:hidden;opacity:0;pointer-events:none;visibility:hidden;contain:strict;`;function rue(e){return!e.includes(`<svg`)||/\bfocusable=/.test(e)?e:e.replace(`<svg`,`<svg focusable="false" tabindex="-1"`)}function iue(e){return{startOnLoad:!1,theme:e,securityLevel:`strict`,fontFamily:`inherit`,suppressErrorRendering:!0,flowchart:{htmlLabels:!1,useMaxWidth:!0}}}var aue=/<(?:a|area)\b(?:[^>"']|"[^"]*"|'[^']*')*>/gi,oue=/\s(?:xlink:)?(?:href|target)\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'>]+)/gi;function sue(e){return e.replace(aue,e=>e.replace(oue,``))}var F8=null,I8=null,L8=Promise.resolve(),cue=0;async function lue(){return I8||(F8||=Y(()=>import(`./mermaid.core-BLIwkLpP.js`).then(e=>(I8=e.default,I8)),__vite__mapDeps([126,127,128,1,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143])).catch(e=>{throw F8=null,e}),F8)}function uue(e){let t=L8.then(e,e);return L8=t.then(()=>void 0,()=>void 0),t}async function due(e,t){return uue(async()=>{let n=await lue();n.initialize(iue(t));let r=`ensoMermaid${++cue}`,i=document.createElement(`div`);i.setAttribute(`aria-hidden`,`true`),i.style.cssText=nue,document.body.appendChild(i);try{let{svg:t}=await n.render(r,e,i);return rue(sue(t))}finally{i.remove(),document.getElementById(r)?.remove(),document.getElementById(`d${r}`)?.remove()}})}var R8=.1,z8=.1;function fue({code:e,streaming:t=!1,className:n}){let{t:r}=J(),i=(0,W.useRef)(null),[a,o]=(0,W.useState)(null),[s,c]=(0,W.useState)(null),[l,u]=(0,W.useState)(1),[d,f]=(0,W.useState)({x:0,y:0}),[p,m]=(0,W.useState)(!1),[h,g]=(0,W.useState)(!1);ME(h);let _=(0,W.useRef)({x:0,y:0}),v=(0,W.useRef)({x:0,y:0}),y=(0,W.useRef)(null),b=(0,W.useRef)(!1),x=V0()===`dark`?`dark`:`default`;(0,W.useEffect)(()=>{if(t){o(null),c(null);return}let n=!1;return(async()=>{if(!e.trim()){o(null),c(null);return}try{let t=await due(e,x);n||(o(t),c(null),u(1),f({x:0,y:0}))}catch(e){n||(c(e instanceof Error?e.message:`Mermaid render failed`),o(null))}})(),()=>{n=!0}},[e,x,t]);let S=(0,W.useCallback)(()=>u(e=>e+R8),[]),C=(0,W.useCallback)(()=>u(e=>Math.max(e-R8,z8)),[]),w=(0,W.useCallback)(()=>{u(1),f({x:0,y:0})},[]),T=(0,W.useCallback)(()=>{g(!1),u(1),f({x:0,y:0})},[]),E=(0,W.useCallback)(()=>{g(!0),requestAnimationFrame(()=>{let e=y.current?.querySelector(`svg`),t=y.current?.getBoundingClientRect();if(!e||!t?.width||!t.height)return;let n=e.getBoundingClientRect(),r=Math.min((t.width-48)/n.width,(t.height-48)/n.height);u(Math.round(r*100)/100),f({x:0,y:0})})},[]),D=(0,W.useCallback)(e=>{if(!h)return;e.preventDefault();let t=e.deltaY>0?-.1:R8;u(e=>Math.round(Math.max(e+t,z8)*100)/100)},[h]),O=(0,W.useCallback)(e=>{!h||e.button!==0||(m(!0),b.current=!1,_.current={x:e.clientX,y:e.clientY},v.current={...d})},[h,d]),k=(0,W.useCallback)(e=>{if(!p)return;let t=e.clientX-_.current.x,n=e.clientY-_.current.y;(Math.abs(t)>2||Math.abs(n)>2)&&(b.current=!0),f({x:v.current.x+t,y:v.current.y+n})},[p]),A=(0,W.useCallback)(()=>m(!1),[]),j=(0,W.useCallback)(e=>{e.stopPropagation()},[]),M=(0,W.useCallback)(()=>{b.current||T()},[T]),N=e=>{let t=e===`sm`?`h-6 w-6`:`h-7 w-7`,n=e===`sm`?`h-3.5 w-3.5`:`h-4 w-4`,i=e===`sm`?`h-6 min-w-[2.5rem]`:`h-7 min-w-[3rem]`;return(0,q.jsxs)(`div`,{className:`flex items-center gap-1 rounded-md border border-border bg-background/95 p-1 shadow-sm`,children:[(0,q.jsx)(`button`,{type:`button`,onClick:S,className:K(`flex items-center justify-center rounded text-sm transition-colors hover:bg-accent hover:text-accent-foreground`,t),title:r(`Zoom in`),children:(0,q.jsx)(Ut,{className:n})}),(0,q.jsxs)(`button`,{type:`button`,onClick:w,className:K(`flex items-center justify-center rounded text-xs transition-colors hover:bg-accent hover:text-accent-foreground`,i),title:r(`Reset zoom`),children:[Math.round(l*100),`%`]}),(0,q.jsx)(`button`,{type:`button`,onClick:C,disabled:l<=z8,className:K(`flex items-center justify-center rounded text-sm transition-colors hover:bg-accent hover:text-accent-foreground`,t,l<=z8&&`cursor-not-allowed opacity-50`),title:r(`Zoom out`),children:(0,q.jsx)(jt,{className:n})}),l!==1&&(0,q.jsx)(`button`,{type:`button`,onClick:w,className:K(`flex items-center justify-center rounded text-sm transition-colors hover:bg-accent hover:text-accent-foreground`,t),title:r(`Fit to original size`),children:(0,q.jsx)(qt,{className:n})}),(0,q.jsx)(`div`,{className:`mx-0.5 h-4 w-px bg-border`}),h?(0,q.jsx)(`button`,{type:`button`,onClick:T,className:K(`flex items-center justify-center rounded text-sm transition-colors hover:bg-accent hover:text-accent-foreground`,t),title:r(`Exit fullscreen`),children:(0,q.jsx)(At,{className:n})}):(0,q.jsx)(`button`,{type:`button`,onClick:E,className:K(`flex items-center justify-center rounded text-sm transition-colors hover:bg-accent hover:text-accent-foreground`,t),title:r(`View fullscreen`),children:(0,q.jsx)(wt,{className:n})})]})};return s?(0,q.jsxs)(`div`,{className:K(`overflow-x-auto rounded-lg border border-destructive/50`,n),children:[(0,q.jsx)(`div`,{className:`flex items-center gap-2 border-b border-destructive/30 bg-destructive/10 px-3 py-2 text-xs text-destructive`,children:(0,q.jsx)(`span`,{children:r(`Mermaid render error`)})}),(0,q.jsx)(`pre`,{className:`p-4 text-sm`,children:(0,q.jsx)(`code`,{className:`block font-mono leading-relaxed text-muted-foreground`,children:e})}),(0,q.jsx)(`div`,{className:`border-t border-border bg-muted/30 px-3 py-2 text-xs text-muted-foreground`,children:s})]}):a?(0,q.jsxs)(`div`,{className:K(`relative rounded-lg border border-border bg-muted/30`,n),style:{userSelect:`none`,WebkitUserSelect:`none`},children:[(0,q.jsx)(`div`,{ref:i,className:K(`max-h-[min(50vh,20rem)] overflow-hidden [overflow-anchor:none]`,h&&(p?`cursor-grabbing`:`cursor-grab`)),onWheel:D,onMouseDown:O,onMouseMove:k,onMouseUp:A,onMouseLeave:A,onDoubleClick:h?void 0:E,children:(0,q.jsx)(`div`,{className:`origin-center transition-transform duration-100 ease-out`,style:{transform:`translate(${d.x}px, ${d.y}px) scale(${l})`},children:(0,q.jsx)(`div`,{className:`p-4`,dangerouslySetInnerHTML:{__html:a}})})}),(0,q.jsx)(`div`,{className:`absolute right-2 bottom-2`,children:N(`sm`)}),h&&(0,q.jsxs)(`div`,{className:`fixed inset-0 flex select-none flex-col bg-background`,style:{zIndex:BE.TOAST},"data-enso-float":``,onClick:M,onKeyDown:e=>{e.key===`Escape`&&T()},children:[(0,q.jsxs)(`div`,{className:`flex shrink-0 items-center justify-between border-b border-border bg-muted/30 px-4 py-2`,onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),children:[(0,q.jsx)(`span`,{className:`text-sm font-medium text-muted-foreground`,children:r(`Mermaid preview`)}),(0,q.jsx)(`button`,{type:`button`,onClick:T,className:`flex h-7 w-7 items-center justify-center rounded-md border border-border bg-background/95 text-sm transition-colors hover:bg-accent hover:text-accent-foreground`,title:r(`Exit fullscreen`),children:(0,q.jsx)(yn,{className:`h-4 w-4`})})]}),(0,q.jsxs)(`div`,{className:`relative min-h-0 flex-1`,children:[(0,q.jsx)(`div`,{ref:y,className:K(`absolute inset-0 flex select-none items-center justify-center overflow-hidden`,p?`cursor-grabbing`:`cursor-grab`),onWheel:D,onMouseDown:O,onMouseMove:k,onMouseUp:A,onMouseLeave:A,onClick:j,onKeyDown:j,children:(0,q.jsx)(`div`,{className:`origin-center transition-transform duration-100 ease-out`,style:{transform:`translate(${d.x}px, ${d.y}px) scale(${l})`},children:(0,q.jsx)(`div`,{className:`p-4`,dangerouslySetInnerHTML:{__html:a}})})}),(0,q.jsx)(`div`,{className:`absolute right-4 bottom-4`,children:N(`md`)})]})]})]}):(0,q.jsx)(`div`,{className:K(`flex items-center justify-center rounded-lg border border-border bg-muted/30 p-8`,n),children:(0,q.jsx)(`div`,{className:`text-sm text-muted-foreground`,children:r(`Loading Mermaid diagram...`)})})}var pue=/^(?:%|ms|s|sec|min|h|ms\/op|ns|µs|us|b|kb|mb|gb|tb|kib|mib|gib|x|×|k|m|bn)$/i;function B8(e){let t=e.trim().replace(/^[$€£¥₹]\s*/,``),n=!1;/^\(.*\)$/.test(t)&&(n=!0,t=t.slice(1,-1));let r=/^([+-]?(?:\d{1,3}(?:,\d{3})+|\d+)(?:\.\d+)?)\s*(\S*)$/.exec(t);if(!r||r[2]&&!pue.test(r[2]))return null;let i=Number(r[1].replace(/,/g,``));return n?-i:i}function mue(e){let t=Math.max(0,...e.map(e=>e.length));return Array.from({length:t},(t,n)=>{let r=e.map(e=>e[n]?.trim()??``).filter(Boolean);return r.length>0&&r.every(e=>B8(e)!==null)})}function hue(e,t,n){return n?(B8(e)??0)-(B8(t)??0):e.localeCompare(t,void 0,{numeric:!0,sensitivity:`base`})}function gue(e,t,n){let r=e.map((e,t)=>t);if(!t)return r;let i=t.dir===`asc`?1:-1,a=n=>e[n][t.column]?.trim()??``;return r.sort((e,r)=>{let o=a(e),s=a(r);return!o||!s?o?-1:+!!s:i*hue(o,s,n[t.column]??!1)||e-r})}function _ue(e,t){return e?.column===t?e.dir===`asc`?{column:t,dir:`desc`}:null:{column:t,dir:`asc`}}var vue=new Set([`json`,`jsonc`,`json5`]),yue=new Set([`console`,`shell-session`,`terminal`,`output`,`ansi`]),bue=new Set([`sh`,`bash`,`shell`,`zsh`,`shellscript`]),V8=`$ `;function xue(e,t){let n=e?.toLowerCase();if(n&&vue.has(n))return H8(t)?`json`:null;if(!n&&/^\s*[{[]/.test(t)&&H8(t))return`json`;if(n&&yue.has(n)||t.includes(`\x1B[`))return`terminal`;if(!n||bue.has(n)){let e=t.split(`
|
|
1624
1624
|
`).filter(e=>e.trim());if(e[0]?.startsWith(V8)&&e.some(e=>!e.startsWith(V8)))return`terminal`}return null}function H8(e){let t=U8(e);return t.ok&&typeof t.value==`object`&&t.value!==null}function U8(e){let t=``,n=0;for(;n<e.length;){let r=e[n];if(r===`"`){let r=n+1;for(;r<e.length&&e[r]!==`"`;)r+=e[r]===`\\`?2:1;t+=e.slice(n,r+1),n=r+1}else if(r===`/`&&e[n+1]===`/`)for(;n<e.length&&e[n]!==`
|
|
1625
1625
|
`;)n++;else if(r===`/`&&e[n+1]===`*`){let t=e.indexOf(`*/`,n+2);n=t<0?e.length:t+2}else r===`,`&&/^\s*[}\]]/.test(e.slice(n+1))||(t+=r),n++}try{return{ok:!0,value:JSON.parse(t)}}catch{return{ok:!1}}}var W8=[`black`,`red`,`green`,`yellow`,`blue`,`magenta`,`cyan`,`white`],G8=[0,95,135,175,215,255],K8=`\x1B`,q8=`\x07`,J8=RegExp(`${K8}\\[([0-9;?]*)([A-Za-z])|${K8}\\][^${q8}${K8}]*(?:${q8}|${K8}\\\\)?|${K8}[@-Z\\\\-_]`,`g`);function Y8(...e){return`#${e.map(e=>e.toString(16).padStart(2,`0`)).join(``)}`}function Sue(e){if(e<0||e>255)return;if(e<8)return W8[e];if(e<16)return`bright-${W8[e-8]}`;if(e<232){let t=e-16;return Y8(G8[Math.floor(t/36)],G8[Math.floor(t/6)%6],G8[t%6])}let t=8+(e-232)*10;return Y8(t,t,t)}function Cue(e,t){if(e[t+1]===5)return[Sue(e[t+2]??-1),3];if(e[t+1]===2){let[n,r,i]=e.slice(t+2,t+5);return[n===void 0||r===void 0||i===void 0?void 0:`rgb(${n},${r},${i})`,5]}return[void 0,1]}function wue(e,t){let n=t?t.split(`;`).map(e=>Number(e||0)):[0],r={...e};for(let e=0;e<n.length;e++){let t=n[e];if(t===0)r={};else if(t===1)r.bold=!0;else if(t===2)r.dim=!0;else if(t===3)r.italic=!0;else if(t===4)r.underline=!0;else if(t===22)delete r.bold,delete r.dim;else if(t===23)delete r.italic;else if(t===24)delete r.underline;else if(t>=30&&t<=37)r.fg=W8[t-30];else if(t>=90&&t<=97)r.fg=`bright-${W8[t-90]}`;else if(t>=40&&t<=47)r.bg=W8[t-40];else if(t>=100&&t<=107)r.bg=`bright-${W8[t-100]}`;else if(t===39)delete r.fg;else if(t===49)delete r.bg;else if(t===38||t===48){let[i,a]=Cue(n,e);i&&(r[t===38?`fg`:`bg`]=i),e+=a-1}}return r}var Tue=(e,t)=>e.fg===t.fg&&e.bg===t.bg&&e.bold===t.bold&&e.dim===t.dim&&e.italic===t.italic&&e.underline===t.underline;function Eue(e){let t=[],n={},r=e=>{if(!e)return;let r=t.at(-1);r&&Tue(r,n)?r.text+=e:t.push({text:e,...n})},i=0;for(let t of e.matchAll(J8))r(e.slice(i,t.index)),i=t.index+t[0].length,t[2]===`m`&&!t[1]?.includes(`?`)&&(n=wue(n,t[1]??``));return r(e.slice(i)),t}function X8(e){return e.replace(J8,``)}function Due(e){let t=[];for(let n of e.split(`
|
|
1626
1626
|
`)){if(n.startsWith(V8)){t.push({kind:`command`,text:n.slice(2)});continue}let e=t.at(-1);e?.kind===`output`?e.text+=`\n${n}`:t.push({kind:`output`,text:n})}return t}var Oue=40,Z8={black:`#6e7781`,red:`#d1242f`,green:`#1a7f37`,yellow:`#9a6700`,blue:`#0969da`,magenta:`#8250df`,cyan:`#1b7c83`,white:`#8c959f`,"bright-black":`#8c959f`,"bright-red":`#e5534b`,"bright-green":`#3fb950`,"bright-yellow":`#d4a72c`,"bright-blue":`#539bf5`,"bright-magenta":`#b083f0`,"bright-cyan":`#39c5cf`,"bright-white":`#adbac7`};function kue({segment:e}){let{text:t,fg:n,bg:r,bold:i,dim:a,italic:o,underline:s}=e;return!n&&!r&&!i&&!a&&!o&&!s?t:(0,q.jsx)(`span`,{style:{color:n?Z8[n]??n:void 0,backgroundColor:r?Z8[r]??r:void 0},className:K(i&&`font-semibold`,a&&`opacity-60`,o&&`italic`,s&&`underline`),children:t})}function Aue({source:e}){let{t}=J(),[n,r]=(0,W.useState)(!1),i=e.split(`
|
|
@@ -1640,4 +1640,4 @@ WARNING: This link could potentially be dangerous`)){let e=window.open();if(e){t
|
|
|
1640
1640
|
`,1)[0]??``);function ipe(e,t,n,r,i=100){if(r||!n)return{hiddenSince:t,delayMs:null};let a=t??e;return{hiddenSince:a,delayMs:Math.max(0,i-(e-a))}}var ape=1e6;function ope(e,t,n=ape){if(t.length===0)return{anchor:null,firstItemIndex:n,remount:!1};if(!e)return{anchor:{keys:t,index:n},firstItemIndex:n,remount:!1};let r=new Map(t.map((e,t)=>[e,t]));for(let n=0;n<e.keys.length;n++){let i=r.get(e.keys[n]);if(i===void 0)continue;let a=e.index+n-i;return{anchor:{keys:t,index:a},firstItemIndex:a,remount:!1}}return{anchor:{keys:t,index:n},firstItemIndex:n,remount:!0}}function spe(e,t){return t}var cpe=new Set([`text`,`thinking`,`tool`,`tool-group`]);function lpe(e,t,n,r){let i=(0,W.useRef)(VL),[a,o]=(0,W.useState)(()=>Date.now()),s=r.compact,c=r.autoCollapseCompletedTurns,l=r.collapseCompletedActivity===!0,u=r.collapseLiveActivity===!0,d={compact:s,autoCollapseCompletedTurns:c,turnOverrides:r.turnOverrides},f=u?Ore(e,t,r,i.current,a):null;i.current=f?.witness??VL;let p=f?.wakeAt??null,m=Are(e,t,n,{...d,collapseCompletedActivity:l,collapseLiveActivity:u,releasedLiveActivity:f?.released,heldOpenTools:r.heldOpenTools});return(0,W.useEffect)(()=>{if(p===null||p<=a)return;let e=window.setTimeout(()=>o(p),p-a);return()=>window.clearTimeout(e)},[p,a]),m}var upe=[{icon:tt,title:`Map the project`,hint:`Entry points, modules and key dependencies`,prompt:`Walk me through this project's structure: entry points, module layout and key dependencies.`},{icon:Le,title:`Find potential issues`,hint:`Suspicious logic and unhandled edge cases`,prompt:`Review this project for potential bugs, suspicious logic and unhandled edge cases, and list them by severity.`},{icon:lt,title:`Add unit tests`,hint:`Cover the core modules with tests`,prompt:`Find the core modules that lack tests and add unit tests for them.`},{icon:Kt,title:`Summarize recent changes`,hint:`A digest based on git log`,prompt:`Summarize the recent changes in this repository based on git log.`}];function dpe({onPick:e}){let{t}=J();return(0,q.jsx)(`div`,{className:`mx-auto grid w-full max-w-[560px] grid-cols-1 gap-2.5 text-left @min-[36rem]:grid-cols-2`,children:upe.map(({icon:n,title:r,hint:i,prompt:a})=>(0,q.jsxs)(`button`,{type:`button`,onClick:()=>e(t(a)),"data-slot":`welcome-suggestion`,className:`group flex items-start gap-3 rounded-xl border bg-card px-3.5 py-3 text-left shadow-xs transition-[border-color,box-shadow,transform] duration-200 hover:-translate-y-px hover:border-brand/25 hover:shadow-float`,children:[(0,q.jsx)(`span`,{className:`flex size-7 shrink-0 items-center justify-center rounded-lg bg-brand/8 text-brand dark:bg-brand/14`,children:(0,q.jsx)(n,{className:`size-3.5`})}),(0,q.jsxs)(`span`,{className:`min-w-0`,children:[(0,q.jsx)(`span`,{className:`block text-[13px] font-medium`,children:t(r)}),(0,q.jsx)(`span`,{className:`block text-xs text-muted-foreground`,children:t(i)})]})]},r))})}var T7=`enso-chat-col mx-auto w-full max-w-2xl px-4 @min-[56rem]:max-w-3xl @min-[72rem]:max-w-4xl @min-[84rem]:max-w-5xl @min-[96rem]:max-w-6xl @min-[112rem]:max-w-7xl`,E7=1e3;function D7({className:e,children:t}){let[n,r]=(0,W.useState)(!1);return(0,W.useEffect)(()=>{let e=requestAnimationFrame(()=>r(!0));return()=>cancelAnimationFrame(e)},[]),(0,q.jsx)(`div`,{className:K(`t-stagger`,n&&`is-shown`,e),children:t})}var O7=40,fpe={index:`LAST`,align:`end`},ppe={top:600,bottom:600},mpe=e=>e?`auto`:!1;function hpe({style:e,...t}){let n=e?.visibility===`hidden`,[r,i]=(0,W.useState)(!1),a=(0,W.useRef)(null);return(0,W.useEffect)(()=>{let e=ipe(Date.now(),a.current,n,r);if(a.current=e.hiddenSince,e.delayMs===null)return;let t=window.setTimeout(()=>i(!0),e.delayMs);return()=>window.clearTimeout(t)},[n,r]),(0,q.jsx)(`div`,{...t,style:n&&r?{...e,visibility:`visible`}:e})}function gpe({ref:e,items:t,busy:n,loading:r=!1,running:i,runStartedAt:a,lastOutputAt:o,error:s,emptyTitle:c,emptyDescription:l,onSuggestion:u,onRetryResume:d,onRetrySync:f,virtualize:p=!0,onStartReached:m,historyLoading:h=!1,hasOlder:g,olderCursor:_,searchQuery:v=``,activeHit:y=null}){let{t:b}=J(),x=(0,W.useRef)(null),[S,C]=(0,W.useState)(!0),[w,T]=(0,W.useState)(!1),E=(0,W.useRef)(!0),D=(0,W.useRef)(null),O=(0,W.useRef)(0),k=(0,W.useRef)(0),A=(0,W.useRef)(null),j=(0,W.useRef)(!1),M=(0,W.useRef)(!1),N=(0,W.useRef)(0),[P,F]=(0,W.useState)(null),I=(0,W.useRef)(0),L=(0,W.useCallback)(e=>{cancelAnimationFrame(I.current),I.current=requestAnimationFrame(()=>F(e()))},[]);(0,W.useEffect)(()=>()=>cancelAnimationFrame(I.current),[]);let[R,z]=(0,W.useState)(new Set),B=(0,W.useRef)(new Set),[V,H]=(0,W.useState)(()=>new Set),ee=(0,W.useCallback)((e,t)=>{let n=B.current;t!==n.has(e)&&(t?n.add(e):n.delete(e),H(new Set(n)))},[]),U=(0,W.useRef)({report:ee,scroller:D});U.current.report=ee;let te=(0,W.useCallback)(e=>{z(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),[ne,re]=(0,W.useState)(new Map),ie=se(e=>e.autoCollapseTurns),ae=se(e=>e.collapseCompletedActivity),oe=se(e=>e.collapseLiveActivity),ce=se(e=>e.liveActivityFoldDelaySec),le=se(e=>e.compactReadOnlyTools),ue=lpe(t,i,R,{compact:le,autoCollapseCompletedTurns:ie,collapseCompletedActivity:ae,collapseLiveActivity:oe,liveActivityFoldDelaySec:ce,heldOpenTools:V,turnOverrides:ne}),de=(0,W.useRef)({state:jre,collapse:new Map,reveal:new Map}),fe=(0,W.useMemo)(()=>{let e=de.current,t=e=>D.current?.querySelector(`[data-nav-key="${CSS.escape(e)}"]`),n=Mre(e.state,ue,(e,n)=>{let r=t(e)?.getBoundingClientRect().top,i=t(n)?.getBoundingClientRect().bottom;return r===void 0||i===void 0?0:i-r}),r=Date.now();e.state=n.next;for(let{key:t,...i}of n.collapses)e.collapse.set(t,{at:r,...i});for(let t of n.expands)e.reveal.set(t,r);return n.children},[ue]),pe=(0,W.useRef)(null),me=(0,W.useRef)(0),he=(0,W.useRef)(null),ge=ope(pe.current,ue.map(e=>e.key));pe.current=ge.anchor,ge.remount&&(me.current+=1,he.current=null);let _e=ge.firstItemIndex,ve=(0,W.useCallback)((e,t)=>{re(n=>n.get(e)===t?n:new Map(n).set(e,t))},[]),ye=(0,W.useMemo)(()=>{let e=[];for(let n=0;n<t.length;n++){let r=t[n];if(r.kind!==`user`)continue;let i=``;for(let e=n+1;e<t.length;e++){let n=t[e];if(n.kind===`user`)break;if(n.kind===`text`){i=n.text;break}}e.push({key:r.key,question:r.text||`[image]`,answer:i})}return e},[t]),be=(0,W.useCallback)(()=>{let e=D.current;e&&e.scrollHeight-e.scrollTop-e.clientHeight>2&&(j.current=!0,e.scrollTop=e.scrollHeight)},[]),xe=(0,W.useCallback)(()=>{cancelAnimationFrame(O.current);let e=Date.now()+1200,t=null,n=()=>{cancelAnimationFrame(O.current),j.current=!1,t?.removeEventListener(`touchstart`,n),t?.removeEventListener(`wheel`,n)},r=()=>{if(M.current){n();return}!t&&D.current&&(t=D.current,t.addEventListener(`touchstart`,n,{passive:!0,once:!0}),t.addEventListener(`wheel`,n,{passive:!0,once:!0})),be(),E.current=!0,C(!0),Date.now()<e?O.current=requestAnimationFrame(r):n()};r(),C(!0),E.current=!0},[be]);(0,W.useEffect)(()=>()=>{cancelAnimationFrame(O.current),cancelAnimationFrame(k.current),window.clearTimeout(N.current)},[]);let Se=()=>{M.current=!0,window.clearTimeout(N.current)},Ce=()=>{window.clearTimeout(N.current),N.current=window.setTimeout(()=>{M.current=!1},400)},we=()=>{Se(),Ce()},Te=()=>{cancelAnimationFrame(O.current),cancelAnimationFrame(k.current),j.current=!1,E.current=!1,C(!1)},Ee=(0,W.useCallback)(e=>{if(A.current?.disconnect(),A.current=null,!e)return;let t=new ResizeObserver(()=>{if(!E.current&&!j.current)return;cancelAnimationFrame(k.current);let e=8,t=()=>{be();let n=D.current;(n?n.scrollHeight-n.scrollTop-n.clientHeight:0)<=2||(--e>0?k.current=requestAnimationFrame(t):xe())};t()});t.observe(e),A.current=t,xe()},[be,xe]);(0,W.useEffect)(()=>()=>A.current?.disconnect(),[]);let De=e=>ue.findIndex(t=>t.key===e||t.kind===`tool-group`&&k7(t,e)),Oe=e=>{if(!p){D.current?.querySelector(`[data-nav-key="${CSS.escape(e)}"]`)?.scrollIntoView({block:`center`});return}let t=De(e);t>=0&&x.current?.scrollToIndex({index:spe(_e,t),align:`center`})},G=(0,W.useRef)(null),ke=e=>{if(Te(),De(e)>=0){G.current=null,Oe(e);return}let n=null,r=!1;for(let i of t)if(i.kind===`user`&&(n=i.key),i.key===e){r=!0;break}!r||!n||(G.current=e,ve(n,!1))};(0,W.useLayoutEffect)(()=>{let e=G.current;!e||De(e)<0||(G.current=null,Oe(e))},[ue]),(0,W.useImperativeHandle)(e,()=>({scrollToBottom:xe,pinToBottom:be,isAtBottom:()=>E.current,getScroller:()=>p?null:D.current,scrollToKey:ke}));let Ae=(0,W.useRef)(!1),Me=`${_}:${_e}`,Ne=(0,W.useRef)(Me);Ne.current!==Me&&(Ne.current=Me,Ae.current=!1);let Pe=()=>{!m||Ae.current||(Ae.current=!0,m())};(0,W.useEffect)(()=>{p&&!h&&he.current===_e&&Pe()},[_,h]);let Fe=(0,W.useMemo)(()=>({query:v,activeKey:y?.key??``,activeNth:y?.nth??-1}),[v,y?.key,y?.nth]),Ie=(e,t)=>{let n=ue[t+1];if(n!==void 0&&C7(e)&&C7(n))return`pb-0`;if(!le)return`pb-4`;let r=n!==void 0&&c7(n);return c7(e)?r?`pb-1`:`pb-2`:e.kind===`text`&&r?`pb-1`:`pb-4`},Le=(e,t)=>{let n=ue[t-1],r=n?.kind===`user`&&!n.collapsed&&cpe.has(e.kind)?n:void 0,i=Date.now(),a=de.current.collapse.get(e.key),o=a&&i-a.at<E7?a:void 0,s=fe.get(e.key),c=s&&de.current.reveal.get(s.group),l=s&&c!==void 0&&i-c<E7;return(0,q.jsxs)(`div`,{"data-nav-key":e.key,"data-fold-collapse":o?o.pair?`pair`:`toggle`:void 0,style:o?{"--fold-from":`${o.height}px`}:l?{"--fold-i":s.index}:void 0,className:K(T7,Ie(e,t),l&&`t-fold-reveal`,`[overflow-wrap:anywhere]`),children:[r&&(0,q.jsx)(Efe,{model:r.replyModel,at:r.replyAt,privacyMask:r.replyPrivacyMask}),(0,q.jsx)(Spe,{itemKey:e.key,children:(0,q.jsx)(Dfe,{item:e,onToggleGroup:te,onToggleTurn:ve})})]},e.key)},Re=(0,W.useRef)(!1);g===!0&&(Re.current=!0);let ze=TI(t.length>0,h,g,Re.current,!p&&w);(0,W.useLayoutEffect)(()=>{if(p){T(!1);return}let e=D.current;T(!!e&&EI(g===!0,h,e.scrollHeight,e.clientHeight))},[p,g,h,_e,ue.length,t.length]);let Be={pageChrome:ze,onLoadMore:ze===`more`?Pe:void 0,busy:n,loading:!!r,since:Nre({loading:!!r,runStartedAt:a,lastOutputAt:o}),error:s,onRetryResume:d};return(0,q.jsx)(GL.Provider,{value:Fe,children:(0,q.jsx)(cfe,{value:U.current,children:(0,q.jsxs)(`div`,{"data-enso":`timeline`,className:`@container relative min-h-0 flex-1`,onWheel:we,onKeyDown:we,onTouchStart:Se,onTouchEnd:Ce,onPointerDown:e=>{e.target===D.current&&(Se(),window.addEventListener(`pointerup`,Ce,{once:!0}))},children:[(0,q.jsx)(zre,{items:ye,activeKey:P,onJump:ke}),t.length===0&&!n?(0,q.jsxs)(D7,{className:`flex h-full flex-col items-center justify-center gap-2 overflow-y-auto px-4 text-center`,children:[(0,q.jsx)(`span`,{className:`t-stagger-line t-stagger-line--1 mb-3`,children:(0,q.jsx)(`span`,{className:`flex size-11 items-center justify-center rounded-[13px] border border-brand/20 bg-brand/8 text-brand dark:bg-brand/14`,children:(0,q.jsx)(xj,{className:`size-6`})})}),(0,q.jsx)(`p`,{className:`t-stagger-line t-stagger-line--1 text-[22px] font-semibold tracking-tight`,children:c}),s?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`p`,{className:`t-stagger-line t-stagger-line--2 max-w-md text-sm text-destructive whitespace-pre-wrap`,children:b(s)}),d&&(0,q.jsx)(Ui,{size:`sm`,variant:`outline`,onClick:d,children:b(`Retry resume`)})]}):(0,q.jsxs)(q.Fragment,{children:[f?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`p`,{className:`t-stagger-line t-stagger-line--2 max-w-md text-sm text-muted-foreground`,children:b(`Session is not ready yet — no history to show.`)}),(0,q.jsx)(Ui,{size:`sm`,variant:`outline`,onClick:f,children:b(`Retry sync`)})]}):l===``?null:(0,q.jsx)(`p`,{className:`t-stagger-line t-stagger-line--2 text-sm text-muted-foreground`,children:l??b(`Ask the agent…`)}),u&&(0,q.jsx)(`div`,{className:`t-stagger-line t-stagger-line--3 mt-5 w-full`,children:(0,q.jsx)(dpe,{onPick:u})})]})]}):t.length===0&&s?(0,q.jsxs)(D7,{className:`flex h-full flex-col items-center justify-center gap-2 text-center`,children:[(0,q.jsx)(`p`,{className:`t-stagger-line t-stagger-line--1 max-w-md text-sm text-destructive whitespace-pre-wrap`,children:b(s)}),d&&(0,q.jsx)(Ui,{size:`sm`,variant:`outline`,onClick:d,children:b(`Retry resume`)})]}):t.length===0?(0,q.jsxs)(`div`,{"data-timeline-loading":``,className:`flex h-full flex-col items-center justify-center gap-2.5 text-center`,children:[(0,q.jsx)(Ct,{className:`h-5 w-5 animate-spin text-muted-foreground`}),(0,q.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:b(`Preparing session…`)})]}):p?(0,q.jsx)($P,{ref:x,data:ue,defaultItemHeight:80,computeItemKey:(e,t)=>t.key,firstItemIndex:_e,startReached:Pe,followOutput:mpe,atBottomThreshold:O7,atBottomStateChange:e=>{if(!e&&E.current&&!M.current){xe();return}C(e),E.current=e},increaseViewportBy:ppe,initialTopMostItemIndex:fpe,rangeChanged:({startIndex:e})=>{he.current=e,e>_e+4&&(Ae.current=!1),L(()=>{let t=Math.max(0,e-_e),n=null;for(let e=0;e<=Math.min(t+1,ue.length-1);e++)ue[e]?.kind===`user`&&(n=ue[e].key);return n})},scrollerRef:e=>{D.current=e instanceof HTMLElement?e:null},className:`h-full select-text`,context:Be,components:vpe,itemContent:(e,t)=>Le(t,e-_e)},me.current):(0,q.jsx)(`div`,{ref:e=>{D.current=e},onScroll:e=>{let t=e.currentTarget;if(j.current){j.current=!1,E.current=!0,C(!0);return}if(!M.current){E.current&&be();return}let n=t.scrollHeight-t.scrollTop-t.clientHeight<=O7;n!==E.current&&(E.current=n,C(n)),m&&(t.scrollTop<80&&!Ae.current?(Ae.current=!0,m()):t.scrollTop>240&&(Ae.current=!1))},className:`h-full select-text overflow-y-auto [overflow-anchor:none]`,children:(0,q.jsxs)(`div`,{ref:Ee,children:[(0,q.jsx)(A7,{context:Be}),ue.map((e,t)=>Le(e,t)),(0,q.jsx)(j7,{context:Be})]})}),!S&&t.length>0&&(0,q.jsxs)(`button`,{type:`button`,onClick:xe,className:`absolute bottom-4 left-1/2 z-10 inline-flex h-7 -translate-x-1/2 items-center gap-1.5 rounded-full border bg-card px-3 text-xs text-muted-foreground shadow-float transition-colors hover:text-foreground`,children:[(0,q.jsx)(je,{className:`h-3 w-3`}),b(`Scroll to bottom`)]})]})})})}function k7(e,t){return e.children.some(e=>e.key===t||e.kind===`tool-group`&&k7(e,t))}function _pe({chrome:e,onLoadMore:t}){let{t:n}=J();return e===`none`?(0,q.jsx)(`div`,{className:`h-6`}):(0,q.jsx)(`div`,{className:K(T7,`flex items-center justify-center gap-2 py-3`),children:e===`loading`?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(Ct,{className:`h-3.5 w-3.5 animate-spin text-muted-foreground`}),(0,q.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:n(`Loading earlier messages…`)})]}):e===`more`?(0,q.jsx)(`button`,{type:`button`,className:`text-xs text-muted-foreground underline-offset-2 hover:underline`,onClick:t,children:n(`Load earlier messages`)}):(0,q.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:n(`Beginning of conversation`)})})}function A7({context:e}){return(0,q.jsx)(_pe,{chrome:e.pageChrome,onLoadMore:e.onLoadMore})}function j7({context:e}){let{t}=J(),{busy:n,loading:r,since:i,error:a,onRetryResume:o}=e;return(0,q.jsxs)(`div`,{className:K(T7,`pb-6 [overflow-wrap:anywhere]`),children:[n&&(0,q.jsxs)(`div`,{className:`flex min-h-[26px] items-center gap-2 text-[13px]`,children:[(0,q.jsx)(ype,{}),(0,q.jsx)(`span`,{className:`animate-pulse text-foreground motion-reduce:animate-none`,children:t(r?`Loading…`:`Working…`)}),i!==void 0&&(0,q.jsx)(xpe,{since:i})]}),a&&(0,q.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,q.jsx)(`p`,{className:`min-w-0 flex-1 text-sm text-destructive whitespace-pre-wrap`,children:t(a)}),(0,q.jsx)(m7,{}),o&&(0,q.jsx)(Ui,{size:`sm`,variant:`outline`,onClick:o,children:t(`Retry resume`)})]})]})}var vpe={List:hpe,Header:A7,Footer:j7};function ype(){return(0,q.jsxs)(`span`,{className:`relative flex size-[22px] shrink-0 items-center justify-center`,children:[(0,q.jsx)(`span`,{className:`absolute size-2 animate-ping rounded-full bg-brand/50`}),(0,q.jsx)(`span`,{className:`relative size-2 rounded-full bg-brand`})]})}var bpe=e=>{let t=Math.max(0,Math.round(e/1e3));return t<60?`${t}s`:`${Math.floor(t/60)}m${t%60}s`},xpe=(0,W.memo)(function({since:e}){let[,t]=(0,W.useState)(0);return(0,W.useEffect)(()=>{let e=setInterval(()=>t(e=>e+1),1e3);return()=>clearInterval(e)},[]),(0,q.jsx)(`span`,{className:`font-mono text-[11px] text-muted-foreground tabular-nums`,children:bpe(Date.now()-e)})}),Spe=class extends W.Component{state={failed:!1};static getDerivedStateFromError(){return{failed:!0}}componentDidUpdate(e){e.itemKey!==this.props.itemKey&&this.state.failed&&this.setState({failed:!1})}render(){return this.state.failed?(0,q.jsxs)(`p`,{className:`rounded-md border border-destructive/30 bg-destructive/5 px-3 py-1.5 text-xs text-destructive`,children:[`message render failed · `,this.props.itemKey]}):this.props.children}};function Cpe({retry:e,onCancel:t}){let{t:n}=J(),[r,i]=(0,W.useState)(()=>Date.now());(0,W.useEffect)(()=>{let e=setInterval(()=>i(Date.now()),500);return()=>clearInterval(e)},[]);let a=Math.max(0,Math.ceil((e.at+e.delayMs-r)/1e3));return(0,q.jsxs)(`div`,{className:`mb-1 flex items-center gap-2 rounded-lg border border-amber-500/40 bg-amber-500/10 px-2.5 py-1.5 text-xs`,children:[(0,q.jsx)(Gt,{className:`h-3.5 w-3.5 shrink-0 animate-spin text-amber-500 [animation-duration:2s]`}),(0,q.jsxs)(`span`,{className:`min-w-0 flex-1 truncate`,title:e.error,children:[e.maxAttempts>0?n(`Auto-retrying ({{attempt}}/{{max}})`,{attempt:e.attempt,max:e.maxAttempts}):n(`Auto-retrying ({{attempt}})`,{attempt:e.attempt}),(0,q.jsxs)(`span`,{className:`text-muted-foreground`,children:[` · `,a>0?n(`retrying in {{seconds}}s`,{seconds:a}):n(`retrying…`),` — `,e.error]})]}),t&&(0,q.jsx)(`button`,{type:`button`,title:n(`Cancel auto-retry`),onClick:t,className:`shrink-0 rounded p-0.5 text-muted-foreground transition-colors hover:text-foreground`,children:(0,q.jsx)(yn,{className:`h-3.5 w-3.5`})})]})}var wpe=[`pattern`,`query`,`path`,`file_path`],Tpe=[`path`,`file_path`,`query`,`pattern`],Epe=[`command`,`cmd`,`script`],Dpe=[`path`,`file_path`,`pattern`,`query`,`command`,`url`,`description`,`summary`],Ope=120;function M7(e){let t=e.replace(/\s+/g,` `).trim();return t.length>Ope?`${t.slice(0,119)}…`:t}function kpe(e){let t=e.toLowerCase();return t.includes(`search`)||t.includes(`grep`)||t===`find`?wpe:t===`read`||t.endsWith(`_read`)?Tpe:t===`bash`||t.includes(`shell`)||t.includes(`terminal`)?Epe:Dpe}function Ape(e,t){let n=t.trim();if(!n)return``;let r;try{r=JSON.parse(n)}catch{return M7(n)}if(r===null)return``;if(typeof r!=`object`||Array.isArray(r))return M7(JSON.stringify(r)??String(r));let i=cI(e,r);if(i.summary!==void 0)return M7(i.summary);if(!i.args||typeof i.args!=`object`)return``;let a=i.args;for(let e of kpe(i.name)){let t=a[e];if(typeof t==`string`&&t.trim())return M7(t)}let o=JSON.stringify(a);return o===`{}`?``:M7(o)}function jpe(e){return e.scrollHeight-e.scrollTop-e.clientHeight<=24}var N7=new Map,Mpe=e=>{let t=N7.get(e);return t?new Set(t):new Set},P7=(e,t)=>(N7.set(e,t),t),F7=new Map,Npe=(e,t)=>{let n=F7.get(e)??new Set;F7.set(e,n);for(let e of t)n.add(e);return n};function Ppe({sessionId:e,tasks:t,subagents:n,readOnly:r}){let i=se(e=>e.virtualModels),{t:a}=J(),[o,s]=(0,W.useState)(()=>Mpe(e)),[c,l]=(0,W.useState)(null),u=Cj(e=>e.pendingAgentOpen);(0,W.useEffect)(()=>{!u||u.sessionId!==e||(l(u.agentId),Cj.setState({pendingAgentOpen:null}))},[u,e]);let d=Npe(e,[...t.filter(e=>e.status===`running`).map(e=>e.taskId),...n.filter(e=>e.status===`running`).map(e=>e.id)]),f=(e,t)=>!o.has(e)&&(t===`running`||d.has(e)),p=t.filter(e=>f(e.taskId,e.status)),m=n.filter(e=>f(e.id,e.status));if((0,W.useEffect)(()=>{let r=F7.get(e),i=[...t.filter(e=>e.status!==`running`).map(e=>e.taskId),...n.filter(e=>e.status!==`running`).map(e=>e.id)].filter(e=>r?.has(e)&&!o.has(e)&&e!==c);if(i.length===0)return;let a=setTimeout(()=>{s(t=>{let n=new Set(t);for(let e of i)n.add(e);return P7(e,n)})},5e3);return()=>clearTimeout(a)},[e,t,n,o,c]),p.length===0&&m.length===0)return null;let h=t=>{s(n=>P7(e,new Set(n).add(t))),c===t&&l(null)},g=p.find(e=>e.taskId===c)??null,_=m.find(e=>e.id===c)??null;return(0,q.jsxs)(`div`,{className:`relative mb-1.5`,children:[(g||_)&&(0,q.jsxs)(`div`,{className:`absolute bottom-full left-0 right-0 z-30 mb-1.5 rounded-xl border bg-card shadow-float`,children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-2 border-b px-3 py-1.5 text-xs`,children:[(0,q.jsxs)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-muted-foreground`,children:[g?g.command:_?.description,_?.modelId?` · ${Kk(i,_.modelId)}`:``]}),(0,q.jsx)(`button`,{type:`button`,onClick:()=>l(null),className:`rounded p-0.5 text-muted-foreground hover:text-foreground`,children:(0,q.jsx)(yn,{className:`h-3.5 w-3.5`})})]}),g&&(0,q.jsx)(Hpe,{tail:g.tail}),_&&(0,q.jsx)(Fpe,{agent:_},_.id)]}),(0,q.jsxs)(`div`,{className:`flex flex-col gap-0.5 rounded-xl border bg-card p-1 shadow-xs`,children:[p.map(t=>(0,q.jsx)(I7,{icon:cn,status:t.status,meta:(0,q.jsx)(Vpe,{task:t}),open:c===t.taskId,onToggle:()=>l(c===t.taskId?null:t.taskId),stopTitle:a(`Stop task`),onStop:r?void 0:()=>void window.electronAPI.agent.stopTask(e,t.taskId),onDismiss:()=>h(t.taskId),children:(0,q.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground`,title:t.command,children:t.command})},t.taskId)),m.map(t=>(0,q.jsxs)(I7,{icon:Fe,status:t.status,meta:(0,q.jsx)(Bpe,{agent:t}),open:c===t.id,onToggle:()=>l(c===t.id?null:t.id),stopTitle:a(`Stop subagent`),onStop:r?void 0:()=>void window.electronAPI.agent.stopSubagent(e,t.id),onDismiss:()=>h(t.id),children:[t.agentType&&(0,q.jsx)(`span`,{className:`shrink-0 font-medium`,children:t.agentType}),(0,q.jsxs)(`span`,{className:`min-w-0 flex-1 truncate text-xs text-muted-foreground`,children:[t.description,t.modelId&&(0,q.jsxs)(`span`,{className:`text-muted-foreground/60`,children:[` `,`· `,Kk(i,t.modelId)]}),t.status===`running`&&t.currentActivity&&(0,q.jsxs)(`span`,{className:`text-muted-foreground/60`,children:[` · `,t.currentActivity]})]})]},t.id))]})]})}function I7({icon:e,status:t,meta:n,open:r,onToggle:i,stopTitle:a,onStop:o,onDismiss:s,children:c}){let{t:l}=J();return(0,q.jsxs)(`div`,{className:`flex min-h-[30px] min-w-0 items-center gap-2 px-1 text-[13px]`,children:[(0,q.jsx)(Kde,{icon:e,state:t===`running`?`running`:t===`failed`?`error`:`ok`}),c,n,(0,q.jsxs)(`button`,{type:`button`,onClick:i,"aria-expanded":r,className:`flex h-6 shrink-0 items-center gap-0.5 rounded-md px-1.5 text-xs text-muted-foreground transition-colors hover:bg-muted hover:text-foreground`,children:[l(`Output`),(0,q.jsx)(Be,{className:K(`h-3 w-3 transition-transform`,r&&`rotate-180`)})]}),t===`running`?o&&(0,q.jsx)(`button`,{type:`button`,onClick:o,title:a,className:`flex size-6 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-destructive/10 hover:text-destructive`,children:(0,q.jsx)(un,{className:`h-3 w-3`})}):(0,q.jsx)(`button`,{type:`button`,onClick:s,className:`flex size-6 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground`,children:(0,q.jsx)(yn,{className:`h-3 w-3`})})]})}function Fpe({agent:e}){let{t}=J(),n=e.activities??[],r=(0,W.useRef)(null),i=(0,W.useRef)(!0);return(0,W.useEffect)(()=>{let e=r.current;e&&i.current&&(e.scrollTop=e.scrollHeight)},[n,e.resultText]),(0,q.jsxs)(`div`,{ref:r,className:`max-h-96 space-y-2 overflow-auto px-3 py-2 text-sm`,onScroll:e=>{i.current=jpe(e.currentTarget)},children:[n.map(e=>(0,q.jsx)(Ipe,{activity:e},e.id)),n.length===0&&!e.resultText&&(0,q.jsx)(`pre`,{className:`font-mono text-xs whitespace-pre-wrap text-muted-foreground`,children:(e.activityLog??[]).join(`
|
|
1641
1641
|
`)||t(`(no output yet)`)}),e.detailsPruned&&(0,q.jsx)(`div`,{className:`rounded-md border border-dashed px-2.5 py-2 text-xs text-muted-foreground`,children:t(`Earlier activity details were cleared; the final report is still available.`)}),e.resultText&&e.status!==`running`&&(0,q.jsxs)(`section`,{className:K(`rounded-lg border px-3 py-2`,e.status===`failed`?`border-destructive/30 bg-destructive/5`:`border-blue-500/30 bg-blue-500/5`),children:[(0,q.jsx)(`div`,{className:`mb-1.5 font-medium text-xs text-foreground`,children:t(`Final report`)}),(0,q.jsx)(C5,{text:e.resultText})]})]})}function Ipe({activity:e}){let{t}=J(),[n,r]=(0,W.useState)(!1);if(e.type===`assistant`)return(0,q.jsxs)(`section`,{className:`rounded-md bg-muted/30 px-2.5 py-2`,children:[(0,q.jsx)(`div`,{className:`mb-1 text-[10px] font-medium tracking-wide text-muted-foreground uppercase`,children:t(`Assistant`)}),(0,q.jsx)(zpe,{text:e.text,markdown:!0})]});let i=Ape(e.toolName,e.argumentsText),a=cI(e.toolName,e.argumentsText).name,o=aI(a),s=`subagent-tool-${e.id.replace(/[^A-Za-z0-9_-]/g,`-`)}`;return(0,q.jsxs)(`section`,{className:`border-b border-border/40 last:border-b-0`,children:[(0,q.jsxs)(`button`,{type:`button`,"aria-controls":s,"aria-expanded":n,onClick:()=>r(e=>!e),className:`flex w-full min-w-0 items-center gap-2 rounded-md px-1.5 py-1 text-left text-xs transition-colors hover:bg-muted/50`,children:[(0,q.jsx)(Lpe,{toolName:a}),(0,q.jsx)(`span`,{className:`shrink-0 font-medium text-foreground/80`,children:o?.tool??a}),i&&(0,q.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-[11px] text-muted-foreground`,title:i,children:i}),!i&&(0,q.jsx)(`span`,{className:`min-w-0 flex-1`}),(0,q.jsx)(Rpe,{status:e.status,label:t(e.status)}),(0,q.jsx)(Ve,{"aria-hidden":`true`,className:K(`h-3 w-3 shrink-0 text-muted-foreground transition-transform`,n&&`rotate-90`)})]}),n&&(0,q.jsxs)(`div`,{id:s,className:`ml-5 border-border/50 border-l pb-2 pl-2.5`,children:[o&&(0,q.jsxs)(`div`,{className:`mb-1 truncate font-mono text-[10px] text-muted-foreground/70`,children:[o.server,`.`,o.tool]}),(0,q.jsx)(`div`,{className:`text-[10px] text-muted-foreground/70`,children:t(`Arguments`)}),(0,q.jsx)(`pre`,{className:`max-h-28 overflow-auto font-mono text-[10px] leading-relaxed whitespace-pre-wrap text-muted-foreground/80`,children:WG(e.argumentsText)}),e.outputText&&(0,q.jsxs)(`div`,{className:`mt-1.5 border-border/40 border-t pt-1.5`,children:[(0,q.jsx)(`div`,{className:`mb-0.5 text-[10px] text-muted-foreground`,children:t(`Result`)}),(0,q.jsx)(`pre`,{className:`overflow-auto font-mono text-[11px] leading-relaxed whitespace-pre-wrap text-foreground/80`,children:WG(e.outputText)})]})]})]})}function Lpe({toolName:e}){let t=e.toLowerCase(),n=`h-3.5 w-3.5 shrink-0 text-muted-foreground`;return t.includes(`search`)||t.includes(`grep`)||t===`find`?(0,q.jsx)(Yt,{"aria-hidden":`true`,className:n}):t===`read`||t===`write`||t===`edit`||t===`apply_patch`||t.endsWith(`_read`)?(0,q.jsx)(ct,{"aria-hidden":`true`,className:n}):t===`bash`||t===`exec`||t===`codemode`||t.includes(`shell`)||t.includes(`terminal`)?(0,q.jsx)(fn,{"aria-hidden":`true`,className:n}):(0,q.jsx)(vn,{"aria-hidden":`true`,className:n})}function Rpe({status:e,label:t}){let n=`h-3.5 w-3.5`;return(0,q.jsx)(`span`,{role:`status`,"aria-label":t,title:t,className:K(`shrink-0`,e===`failed`?`text-destructive`:`text-muted-foreground`),children:e===`running`?(0,q.jsx)(Ct,{"aria-hidden":`true`,className:K(n,`animate-spin`)}):e===`done`?(0,q.jsx)(ze,{"aria-hidden":`true`,className:n}):e===`failed`?(0,q.jsx)(Ge,{"aria-hidden":`true`,className:n}):(0,q.jsx)(Ne,{"aria-hidden":`true`,className:n})})}function zpe({text:e,label:t,markdown:n=!1}){let{t:r}=J(),i=e.length>800||e.split(`
|
|
1642
1642
|
`).length>16,a=n?(0,q.jsx)(C5,{text:e}):(0,q.jsx)(`pre`,{className:`overflow-x-auto font-mono text-[11px] leading-relaxed whitespace-pre-wrap text-muted-foreground`,children:WG(e)});return i?(0,q.jsxs)(`details`,{className:`group/details`,children:[(0,q.jsxs)(`summary`,{className:`cursor-pointer text-[10px] text-muted-foreground hover:text-foreground`,children:[t?`${t} · `:``,r(`{{count}} chars`,{count:e.length})]}),(0,q.jsx)(`div`,{className:`mt-1.5`,children:a})]}):(0,q.jsxs)(`div`,{children:[t&&(0,q.jsx)(`div`,{className:`mb-0.5 text-[10px] text-muted-foreground`,children:t}),a]})}function Bpe({agent:e}){let[,t]=(0,W.useState)(0);return(0,W.useEffect)(()=>{if(e.status!==`running`)return;let n=setInterval(()=>t(e=>e+1),1e3);return()=>clearInterval(n)},[e.status]),(0,q.jsxs)(`span`,{className:`shrink-0 font-mono text-[10px] text-muted-foreground/70 tabular-nums`,children:[e.steps>0?`${e.steps} steps · `:``,e.outputTokens?`${e.outputTokens} tok · `:``,e.status===`running`?_j(Date.now()-e.startedAt):e.status]})}function Vpe({task:e}){let[,t]=(0,W.useState)(0);return(0,W.useEffect)(()=>{if(e.status!==`running`)return;let n=setInterval(()=>t(e=>e+1),1e3);return()=>clearInterval(n)},[e.status]),(0,q.jsx)(`span`,{className:`shrink-0 font-mono text-[10px] text-muted-foreground/70 tabular-nums`,children:e.status===`running`?_j(Date.now()-e.startedAt):e.exitCode===void 0?e.status:`exit ${e.exitCode}`})}function Hpe({tail:e}){let{t}=J(),n=(0,W.useRef)(null);return(0,W.useEffect)(()=>{let e=n.current;e&&(e.scrollTop=e.scrollHeight)},[e]),(0,q.jsx)(`pre`,{ref:n,className:`max-h-56 overflow-auto border-t border-border/60 px-2.5 py-2 font-mono text-xs leading-relaxed whitespace-pre-wrap text-muted-foreground`,children:WG(e)||t(`(no output yet)`)})}function Upe(e){return{sessionId:e.sessionId,canRewind:!e.bot&&!e.deviceReadOnly,canRetry:!e.bot&&!e.deviceReadOnly,canFork:!1,...e.bot?{botSession:!0}:{}}}var L7=7e5,Wpe=1600;async function R7(e,t=L7,n=Wpe){let r=await createImageBitmap(e),i=Math.min(1,n/Math.max(r.width,r.height)),a=document.createElement(`canvas`);a.width=Math.round(r.width*i),a.height=Math.round(r.height*i);let o=a.getContext(`2d`);if(!o)throw Error(`画布不可用`);o.drawImage(r,0,0,a.width,a.height),r.close();for(let e of[.85,.7,.55,.4]){let n=a.toDataURL(`image/jpeg`,e),r=n.slice(n.indexOf(`,`)+1);if(r.length*.75<=t)return{data:r,mimeType:`image/jpeg`}}throw Error(`图片太大,请换一张更小的图`)}var z7=e=>Math.floor(L7/Math.max(1,e));async function B7(e,t){try{return await R7(e,t)}catch{return R7(e,t,1024)}}async function Gpe(e){let t=z7(e.length),n=[];for(let r of e)n.push(await B7(r,t));return n}function Kpe(e,t,n,r){let i=e?.find(e=>e.id===n);if(!i)return null;let a=i.text;return{sessionId:t,messageId:n,text:a,...i.hasImages?{hasImages:!0}:{},priorMatches:r.filter(e=>V7(a,e)).length,priorUserCount:r.length}}function V7(e,t){if(t===e)return!0;let n=eK(t);return n!==null&&e.trimStart().startsWith(n)}function qpe(e,t,n){let r=new Set(t.filter(e=>e.sessionId===n).map(e=>e.messageId));return(e??[]).filter(e=>!r.has(e.id))}function Jpe(e,t,n){let r=t.filter(e=>e.sessionId===n).map(e=>Xpe(e));return r.length===0?[...e]:[...e,...r]}function Ype(e,t,n,r){return e.filter(e=>e.sessionId===t?r?.turnSettled&&n.length>e.priorUserCount?!1:e.text?n.filter(t=>V7(e.text,t)).length<=e.priorMatches:n.length<=e.priorUserCount:!0)}function H7(e){return e.filter(e=>e.role===`user`).map(Zpe)}function Xpe(e){let t=e.text||(e.hasImages?`[image]`:``);return{role:`user`,content:t?[{type:`text`,text:t}]:[]}}function Zpe(e){return e.content.map(e=>e.type===`text`?e.text:``).join(`
|
|
1643
|
-
`).trim()}var Qpe=e=>e===`outbox-discarding`?`正在移除…`:e===`outbox-discard`?`移除未保存,请勿关闭页面;请再次移除,重启后可能重新入队`:e===`outbox-storage`?`无法保存离线消息,请勿关闭页面;可重试或复制消息`:e===`delivery-unconfirmed`?`未收到回执,发送结果未确认;可重试确认`:e===`read-only`?`此设备为只读`:e===`session-busy`?`请等当前回复结束`:e&&es(`zh`,qi(e)??e),U7=(e=!1)=>e?`此设备为只读,刚才的操作未执行;可在桌面「设置 → 设备」切换为可操作`:`此设备为只读,只能查看;可在桌面「设置 → 设备」切换为可操作`,$pe=70;function eme({percent:e,critical:t}){return(0,q.jsx)(`span`,{"aria-hidden":!0,className:`h-1 w-7 shrink-0 overflow-hidden rounded-full bg-muted-foreground/20`,children:(0,q.jsx)(`span`,{className:K(`block h-full rounded-full`,t?`bg-destructive`:e>=$pe?`bg-warning`:`bg-muted-foreground/70`),style:{width:`${e}%`}})})}function tme(e,t){let n={inputTokens:0,outputTokens:0,...e};return t&&(n.contextUsed=t.used,t.window!==void 0&&(n.contextWindow=t.window)),n.inputTokens===0&&n.outputTokens===0&&n.cacheHitPercent===void 0&&n.ttftAvgMs===void 0&&n.tokensPerSecond===void 0&&n.contextUsed===void 0?void 0:n}function nme(e,t){let n={tokens:void 0,cache:void 0,context:void 0,speed:void 0};if(!t)return n;if(t.contextUsed!==void 0){let e=t.contextUsed,r=t.contextWindow??0;if(r>0){let t=Math.min(100,Math.round(e/r*100));n.context={compact:`${t}%`,full:`${gj(r)} · ${t}%`,percent:t,critical:t>=90}}else n.context={compact:`${gj(e)}·?`,full:`${gj(e)} · ?`}}let r=[],i=[];return t.ttftAvgMs!==void 0&&(r.push(_j(t.ttftAvgMs)),i.push(e(`First token avg {{duration}}`,{duration:_j(t.ttftAvgMs)}))),t.tokensPerSecond!==void 0&&(r.push(`${t.tokensPerSecond} tok/s`),i.push(e(`{{speed}} tok/s`,{speed:t.tokensPerSecond}))),r.length>0&&(n.speed={compact:r.join(` · `),full:i.join(` · `)}),(t.inputTokens>0||t.outputTokens>0)&&(n.tokens={compact:`↑${gj(t.inputTokens)} ↓${gj(t.outputTokens)}`,full:e(`Input {{input}} tok · Output {{output}} tok`,{input:gj(t.inputTokens),output:gj(t.outputTokens)})}),t.cacheHitPercent!==void 0&&(n.cache={compact:`${t.cacheHitPercent}%`,full:e(`Cache hit {{percent}}%`,{percent:t.cacheHitPercent})}),n}var rme=[[`tokens`,et],[`cache`,it],[`context`,pt],[`speed`,bn]];function ime({usageTotals:e,context:t}){let{t:n}=J(),r=nme(n,tme(e,t));return(0,q.jsx)(`div`,{"data-slot":`stats-line`,className:`flex min-h-6 flex-wrap items-center justify-center gap-x-3 px-1`,children:rme.map(([e,t])=>{let n=r[e];return n?(0,q.jsxs)(`span`,{className:K(`flex items-center gap-1 text-[11px] tabular-nums`,n.critical?`text-destructive`:`text-muted-foreground/80`),children:[n.percent===void 0?(0,q.jsx)(t,{className:`h-3 w-3 shrink-0 opacity-75`}):(0,q.jsx)(eme,{percent:n.percent,critical:!!n.critical}),n.compact]},e):null})})}function W7(e){let{view:t,sessionId:n}=e,r=(0,W.useRef)(null),[i,a]=(0,W.useState)(!1),o=(0,W.useRef)(null),s=(0,W.useRef)(null),c=(0,W.useRef)(!1);(0,W.useLayoutEffect)(()=>{let e=o.current,t=s.current,n=e?.querySelector(`[aria-selected="true"]`);!e||!t||!n||(c.current||(t.style.transition=`none`),t.style.transform=`translate(${n.offsetLeft}px, ${n.offsetTop}px)`,t.style.width=`${n.offsetWidth}px`,t.style.height=`${n.offsetHeight}px`,c.current||=(t.offsetWidth,t.style.transition=``,!0))},[n,e.tabGroup]);let l=t?.status===`running`,u=e.bot,d=!!(u?.readOnly||e.deviceReadOnly),f=e.artifacts?.chatId,p=e.artifacts?.conversationId,m=(0,W.useMemo)(()=>({...Upe({sessionId:n,bot:u,deviceReadOnly:e.deviceReadOnly}),...f&&p?{turnFooter:e=>(0,q.jsx)(ua,{target:{chatId:f,conversationId:p,messageIndex:e}})}:{}}),[n,u,e.deviceReadOnly,f,p]),h=(0,W.useMemo)(()=>{if(u)return[];let t=[{name:`/goal`,description:`Set a session goal (/goal <objective> · pause · resume · clear)`},{name:`/compact`,description:`Compact the context now (/compact [summary focus])`}],n=(e.slashCommands??[]).filter(e=>e.name!==`/goal`&&e.name!==`/compact`);return[...t,...n]},[e.slashCommands,u]),g=(0,W.useMemo)(()=>t?[...t.messages.entries()].sort((e,t)=>e[0]-t[0]):[],[t]),_=(0,W.useMemo)(()=>Jpe(g.map(([,e])=>e),e.echoes??[],n??``),[g,e.echoes,n]),v=_.length>0||t?.status===`running`||t?.status===`failed`;vre(n?{id:n,projectId:``,status:t?.status??`idle`,started:v,spawning:!1,messages:_,queuedMessages:e.queued?.map(e=>({id:e.id,text:e.text}))}:null);let y=(0,W.useMemo)(()=>xL(_,l,[],e.cwd,{pendingApprovals:t?.approvals,compaction:t?.compaction,compactionNoticeAt:S(g.map(([e])=>e),t?.compactionNoticeAt)}),[_,g,l,e.cwd,t?.approvals,t?.compaction,t?.compactionNoticeAt]),b=t?.messages.size?Math.min(...t.messages.keys()):null,x=(0,W.useRef)(null),C=(0,W.useCallback)(()=>{if(!e.hasOlder||!e.onLoadOlder)return;let t=r.current?.getScroller();x.current=t?{height:t.scrollHeight,top:t.scrollTop}:null,e.onLoadOlder()},[e.hasOlder,e.onLoadOlder]);(0,W.useLayoutEffect)(()=>{let e=r.current?.getScroller(),t=x.current;!e||!t||(x.current=null,e.scrollTop=t.top+(e.scrollHeight-t.height))},[b]),(0,W.useEffect)(()=>{r.current?.isAtBottom()&&r.current.pinToBottom()},[y]);let w=async(t,n)=>{a(!0);try{let i=z7(n.length),a=[];for(let e of n)a.push(await ame(e,i));e.onSend(t,a),r.current?.scrollToBottom()}finally{a(!1)}};return(0,q.jsx)(yj.Provider,{value:m,children:(0,q.jsxs)(`div`,{className:`phone-chat-root flex h-full min-h-0 flex-col`,children:[(0,q.jsxs)(`header`,{className:`flex shrink-0 items-center gap-1 border-b bg-background px-2 py-2 pt-safe`,children:[u?.onBack||!e.drawerDocked?(0,q.jsx)(`button`,{type:`button`,onClick:u?.onBack??e.onOpenDrawer,"aria-label":u?.onBack?`返回群聊`:`打开会话列表`,className:`flex h-9 w-9 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground`,children:u?.onBack?(0,q.jsx)(He,{className:`h-4.5 w-4.5`}):(0,q.jsx)(Lt,{className:`h-4.5 w-4.5`})}):(0,q.jsx)(`span`,{className:`h-9 w-9 shrink-0`}),(0,q.jsxs)(`div`,{className:`min-w-0 flex-1 text-center`,children:[(0,q.jsxs)(`p`,{className:`flex min-w-0 items-center justify-center gap-1.5`,children:[e.connState!==`host-offline`&&e.connState!==`unauthorized`&&(0,q.jsx)(`span`,{className:K(`h-1.5 w-1.5 shrink-0 rounded-full`,e.connState===`online`&&!e.syncing?`bg-emerald-500`:`animate-pulse bg-amber-500`),title:e.connState===`online`&&e.syncing?`同步中…`:e.stateLabel}),(0,q.jsx)(`span`,{className:`truncate font-medium text-sm`,children:e.title})]}),(0,q.jsx)(`p`,{className:`truncate font-mono text-[11px] text-muted-foreground`,children:e.projectName||e.stateLabel})]}),u?.readOnly?(0,q.jsx)(`span`,{className:`h-9 w-9 shrink-0`}):(0,q.jsx)(`button`,{type:`button`,onClick:e.onNewSession,disabled:!e.canCreate||d||!!u&&i||e.connState!==`online`,"aria-label":`新建会话`,title:e.newSessionHint??`新建会话`,className:`flex h-9 w-9 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground disabled:opacity-40`,children:(0,q.jsx)(on,{className:`h-4.5 w-4.5`})})]}),e.connState===`host-offline`&&(0,q.jsxs)(`div`,{className:`flex shrink-0 items-center justify-center gap-1.5 bg-amber-500/10 py-1 text-amber-700 text-xs dark:text-amber-400`,children:[(0,q.jsx)(Ct,{className:`h-3 w-3 animate-spin`,"aria-hidden":!0}),(0,q.jsx)(`span`,{children:e.stateLabel})]}),e.tabGroup&&e.tabGroup.children.length>0&&(0,q.jsxs)(`div`,{ref:o,role:`tablist`,className:`t-tabs relative flex shrink-0 items-center justify-start gap-1 overflow-x-auto border-b px-2 py-1`,children:[(0,q.jsx)(`span`,{ref:s,"aria-hidden":`true`,className:`t-tabs-pill pointer-events-none absolute top-0 left-0 z-0 rounded-md bg-muted`}),(0,q.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":n===e.tabGroup.parent.id,className:G7(n===e.tabGroup.parent.id),onClick:()=>e.onSelectTab?.(e.tabGroup?.parent.id??``),children:[(0,q.jsx)(Et,{className:`h-3 w-3 shrink-0`}),(0,q.jsx)(`span`,{className:`max-w-40 truncate`,children:e.tabGroup.parent.title||`新对话`})]}),e.tabGroup.children.map(t=>(0,q.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":n===t.id,className:G7(n===t.id),onClick:()=>e.onSelectTab?.(t.id),children:[(0,q.jsx)(Fe,{className:`h-3 w-3 shrink-0`}),(0,q.jsx)(`span`,{className:`max-w-28 truncate`,children:t.title||`coworker`}),(0,q.jsx)(`span`,{className:K(`h-1.5 w-1.5 shrink-0 rounded-full`,t.status===`running`?`animate-pulse bg-brand`:t.status===`failed`?`bg-destructive`:`bg-muted-foreground/30`)})]},t.id))]}),n===null?(0,q.jsxs)(`div`,{className:`flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center`,children:[(0,q.jsx)(`span`,{className:`mb-3 flex size-11 items-center justify-center rounded-[13px] border border-brand/20 bg-brand/8 text-brand dark:bg-brand/14`,children:(0,q.jsx)(xj,{className:`size-6`})}),(0,q.jsx)(`p`,{className:`font-semibold text-[22px] tracking-tight`,children:`EnsoCode`}),(0,q.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:e.connState===`online`?`从左上角选择会话,或新建一个`:e.stateLabel})]}):(0,q.jsx)(gpe,{ref:r,items:y,busy:t===null?!!e.syncing:l,loading:t===null,running:l,error:void 0,emptyTitle:e.projectName||`EnsoCode`,virtualize:!1,historyLoading:e.historyLoading,hasOlder:e.hasOlder,firstItemIndex:b??0,onStartReached:e.hasOlder?C:void 0},n),n!==null&&(0,q.jsx)(`div`,{className:`phone-dock @container shrink-0 pt-1 pb-safe`,children:(0,q.jsxs)(`div`,{className:`enso-chat-col mx-auto w-full max-w-2xl px-4 @min-[56rem]:max-w-3xl @min-[72rem]:max-w-4xl @min-[84rem]:max-w-5xl @min-[96rem]:max-w-6xl @min-[112rem]:max-w-7xl`,children:[t?.retry&&(0,q.jsx)(Cpe,{retry:t.retry}),!d&&(0,q.jsx)(Sre,{conversationId:n,queued:(e.queued??[]).map(e=>({id:e.id,text:e.text}))}),e.goal&&!d&&(0,q.jsx)(bre,{conversationId:n,goal:{...e.goal,noProgressRuns:0}}),(0,q.jsx)(tfe,{conversationId:n},n),(0,q.jsx)(Ppe,{sessionId:n,tasks:t?.tasks??[],subagents:t?.subagents??[],readOnly:e.deviceReadOnly}),u?.outbox,u?.notice&&(0,q.jsx)(`p`,{className:`mb-1 rounded-md bg-destructive/10 px-2 py-1 text-destructive text-xs`,children:u.notice}),e.deviceReadOnly?(0,q.jsx)(`p`,{className:`mb-1 rounded-md bg-muted px-2 py-1 text-center text-muted-foreground text-xs`,children:U7(e.readOnlyRejected)}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(f_,{approvals:t?.approvals??[],onRespond:e.onApproval,clockOffset:e.clockOffset}),(0,q.jsx)(g_,{asks:t?.asks??[],onAnswer:e.onAsk,clockOffset:e.clockOffset,autoFocus:!1})]}),!d&&(0,q.jsx)(gre,{commands:h,running:l,busy:l,locked:e.newSessionBusy||!!u&&i||(t?.approvals??[]).length>0,focusKey:u?.chatId?`bot-chat:${u.chatId}`:n,autoFocus:!1,enterToSend:!1,toolbar:e.modelLabel&&e.onOpenConfig?(0,q.jsxs)(`button`,{type:`button`,onClick:e.onOpenConfig,className:`flex min-w-0 items-center gap-0.5 rounded-md px-1.5 py-1 text-[11px] text-muted-foreground transition-colors hover:bg-accent hover:text-foreground`,children:[(0,q.jsx)(`span`,{className:`truncate`,children:e.modelLabel}),(0,q.jsx)(Be,{className:`h-3 w-3 shrink-0`})]}):void 0,onSend:e=>{w(e.text,e.images)},onAbort:e.onAbort,voice:e.voice,voiceMode:`hold`}),!d&&(0,q.jsx)(ime,{usageTotals:e.usageTotals,context:e.context})]})})]})})}function G7(e){return K(`t-tab flex min-w-0 shrink-0 items-center gap-1.5 rounded-md px-2 py-1 text-xs transition-colors`,e?`font-medium`:`text-muted-foreground`)}async function ame(e,t){if(e.data.length*.75<=t)return e;let n=await(await fetch(`data:${e.mimeType};base64,${e.data}`)).blob();return B7(new File([n],`image`,{type:e.mimeType}),t)}function ome(e){if(e==null||!Number.isFinite(e)||e<0)return null;let t=Math.round(e);return t<1?`<1ms`:`${t}ms`}function sme(e,t){let n=e===`direct`?`直连`:`中继`,r=ome(t);return r?`已连接 · ${n} · ${r}`:`已连接 · ${n}`}var K7=`enso-phone-drawer-segment`;function cme(){let e=localStorage.getItem(K7);return e===`bot`||e===`code`?e:null}function lme(e){localStorage.setItem(K7,e)}function q7(e,t){if(!e)return!1;let n=cme();return n?n===`bot`:t!==null}function ume(e,t=0){let n=new Map;for(let r of e)if(!(r.seq<=t)&&((r.kind===`human`||r.newConversation)&&n.clear(),r.kind===`bot`&&r.botId&&n.delete(r.botId),r.failure&&n.set(r.failure.botId,r.id),r.retryOf))for(let[e,t]of n)t===r.retryOf&&n.delete(e);return new Set(n.values())}function dme(e,t){let n=RegExp(`#${t}(?!\\d)`).exec(e);if(!n)return;let r=n.index+n[0].length;return[e.slice(0,n.index),n[0],e.slice(r)]}function fme({status:e}){return e===`running`?(0,q.jsx)(Ct,{className:`h-3 w-3 shrink-0 animate-spin text-brand`}):e===`done`?(0,q.jsx)(ze,{className:`h-3 w-3 shrink-0 text-muted-foreground`}):e===`denied`?(0,q.jsx)(tn,{className:`h-3 w-3 shrink-0 text-muted-foreground`}):e===`timeout`?(0,q.jsx)($e,{className:`h-3 w-3 shrink-0 text-warning`}):(0,q.jsx)(yn,{className:`h-3 w-3 shrink-0 text-destructive`})}function pme({item:e,bots:t,clockOffset:n,onOpen:r}){let i=t.get(e.botId),a=e.ownerBotId?t.get(e.ownerBotId):void 0,o=e.state!==`queued`,[s,c]=(0,W.useState)(()=>Date.now());(0,W.useEffect)(()=>{if(!o)return;let e=window.setInterval(()=>c(Date.now()),1e3);return()=>window.clearInterval(e)},[o]);let l=s-n,u=o&&r?()=>r(e.conversationId):void 0;return(0,q.jsxs)(`button`,{type:`button`,disabled:!u,onClick:u,className:`flex w-full gap-2 rounded-lg border bg-muted/30 px-2.5 py-2 text-left disabled:cursor-default`,children:[(0,q.jsx)(Ya,{bot:i,size:`sm`,busy:o}),(0,q.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,q.jsxs)(`span`,{className:`flex items-center gap-1.5 text-xs`,children:[(0,q.jsxs)(`span`,{className:`truncate font-medium`,children:[i?.name??`成员`,a?(0,q.jsxs)(`span`,{className:`font-normal text-muted-foreground`,children:[` 替 `,a.name]}):null]}),(0,q.jsx)(`span`,{className:K(`shrink-0`,o?`text-brand`:`text-muted-foreground`),children:Bo(e)}),o&&e.startedAt!==void 0&&(0,q.jsx)(`span`,{className:`shrink-0 text-muted-foreground tabular-nums`,children:Uo(l-e.startedAt)}),u&&(0,q.jsx)(Ve,{className:`ml-auto h-3.5 w-3.5 shrink-0 text-muted-foreground`})]}),e.more>0&&(0,q.jsxs)(`span`,{className:`mt-1 block text-[11px] text-muted-foreground`,children:[`+`,e.more,` 个更早的步骤`]}),e.steps.map((e,t)=>(0,q.jsxs)(`span`,{className:`mt-1 flex items-center gap-1.5 text-[11px]`,children:[(0,q.jsx)(fme,{status:e.status}),(0,q.jsx)(`span`,{className:`shrink-0 font-medium`,children:e.name}),(0,q.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-muted-foreground`,children:e.detail}),e.status===`timeout`&&(0,q.jsx)(`span`,{className:`shrink-0 text-warning`,children:e.name===`ask_user`?`已超时未回答`:`已超时拒绝`}),(0,q.jsx)(`span`,{className:`shrink-0 text-muted-foreground tabular-nums`,children:e.durationMs===void 0?e.startedAt===void 0?``:Uo(l-e.startedAt):Uo(e.durationMs)})]},t))]})]})}var J7=e=>[...e].sort((e,t)=>t.activityAt-e.activityAt);function mme(e,t,n=10){let r=J7(e),i=e=>e.id===t.currentId||e.id===t.rootId?0:e.unread||e.running?1:2,a=new Set([...r].sort((e,t)=>i(e)-i(t)).slice(0,n).map(e=>e.id));return r.filter(e=>a.has(e.id)).sort((e,n)=>Number(n.id===t.rootId)-Number(e.id===t.rootId))}function hme(e,t,n){let r=t.trim().toLowerCase();return J7(e).filter(e=>(n===`all`||(n===`unread`?e.unread:e.running))&&(!r||`${e.title}\n${e.preview??``}`.toLowerCase().includes(r)))}var gme=W.forwardRef(function(e,t){let{render:n,className:r,id:i,name:a,value:o,disabled:s=!1,onValueChange:c,defaultValue:l,autoFocus:u=!1,style:d,...f}=e,{state:p,name:m,disabled:h,setTouched:g,setDirty:_,validityData:v,setFocused:y,setFilled:b,validationMode:x,validation:S}=sj(),{clearErrors:C}=lj(),w=h||s,T=m??a,E={...p,disabled:w},{labelId:D}=uj(),O=dj({id:i});Z(()=>{let e=o!=null;S.inputRef.current?.value||e&&o!==``?b(!0):e&&o===``&&b(!1)},[S.inputRef,b,o]);let k=W.useRef(null);Z(()=>{u&&k.current===pb(uy(k.current))&&y(!0)},[u,y]);let[A]=eA({controlled:o,default:l,name:`FieldControl`,state:`value`}),j=o!==void 0,M=j?A:void 0,N=iy(()=>S.inputRef.current?.value);return cj(S.inputRef,O,M,N,!w,a),nr(`input`,e,{ref:[t,k],state:E,props:[{id:O,disabled:w,name:T,ref:S.inputRef,"aria-labelledby":D,autoFocus:u,...j?{value:M}:{defaultValue:l},onChange(e){let t=e.currentTarget.value;c?.(t,ky(hy,e.nativeEvent)),_(t!==(v.initialValue??``)),b(t!==``),e.nativeEvent.defaultPrevented||(C(T),S.change(t))},onFocus(){y(!0)},onBlur(e){g(!0),y(!1),x===`onBlur`&&S.commit(e.currentTarget.value)},onKeyDown(e){e.currentTarget.tagName===`INPUT`&&e.key===`Enter`&&(g(!0),S.commit(e.currentTarget.value))}},f,e=>S.getValidationProps(w,e)],stateAttributesMapping:aj})}),_me=W.forwardRef(function(e,t){return(0,q.jsx)(gme,{ref:t,...e})});function Y7({className:e,size:t=`default`,unstyled:n=!1,...r}){return(0,q.jsx)(`span`,{className:K(!n&&`relative inline-flex w-full rounded-lg border border-input bg-background bg-clip-padding text-base shadow-xs ring-ring/24 transition-shadow before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] not-has-disabled:not-has-focus-visible:not-has-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)] has-focus-visible:has-aria-invalid:border-destructive/64 has-focus-visible:has-aria-invalid:ring-destructive/16 has-aria-invalid:border-destructive/36 has-focus-visible:border-ring has-disabled:opacity-64 has-[:disabled,:focus-visible,[aria-invalid]]:shadow-none has-focus-visible:ring-[3px] sm:text-sm dark:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border dark:has-aria-invalid:ring-destructive/24 dark:not-has-disabled:not-has-focus-visible:not-has-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/8%)]`,e)||void 0,"data-size":t,"data-slot":`input-control`,children:(0,q.jsx)(_me,{className:K(`h-8.5 w-full min-w-0 rounded-[inherit] px-[calc(--spacing(3)-1px)] leading-8.5 outline-none placeholder:text-muted-foreground/72 sm:h-7.5 sm:leading-7.5`,t===`sm`&&`h-7.5 px-[calc(--spacing(2.5)-1px)] leading-7.5 sm:h-6.5 sm:leading-6.5`,t===`lg`&&`h-9.5 leading-9.5 sm:h-8.5 sm:leading-8.5`,r.type===`search`&&`[&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none [&::-webkit-search-results-button]:appearance-none [&::-webkit-search-results-decoration]:appearance-none`,r.type===`file`&&`text-muted-foreground file:me-3 file:bg-transparent file:font-medium file:text-foreground file:text-sm`),"data-slot":`input`,size:typeof t==`number`?t:void 0,...r})})}var X7=RT,vme=bT;function yme({className:e,...t}){return(0,q.jsx)(kv,{className:K(`fixed inset-0 z-50 bg-black/32 backdrop-blur-sm transition-opacity duration-150 ease-out data-ending-style:opacity-0 data-starting-style:opacity-0`,e),"data-slot":`sheet-backdrop`,...t})}function bme({className:e,side:t,inset:n=!1,...r}){return(0,q.jsx)(zT,{className:K(`fixed inset-0 z-50 grid`,t===`bottom`&&`grid grid-rows-[1fr_auto] pt-12`,t===`top`&&`grid grid-rows-[auto_1fr] pb-12`,t===`left`&&`flex justify-start`,t===`right`&&`flex justify-end`,n&&`sm:p-4`),"data-slot":`sheet-viewport`,...r})}function Z7({className:e,children:t,showCloseButton:n=!0,side:r=`right`,inset:i=!1,...a}){return(0,q.jsxs)(vme,{children:[(0,q.jsx)(NE,{}),(0,q.jsx)(yme,{}),(0,q.jsx)(bme,{inset:i,side:r,children:(0,q.jsxs)(_T,{className:K(`relative flex max-h-full min-h-0 w-full min-w-0 flex-col bg-popover bg-clip-padding text-popover-foreground shadow-lg transition-[opacity,translate] duration-150 [transition-timing-function:cubic-bezier(0.34,1.56,0.64,1)] will-change-transform before:pointer-events-none before:absolute before:inset-0 before:shadow-[0_1px_--theme(--color-black/4%)] data-ending-style:opacity-0 data-starting-style:opacity-0 max-sm:before:hidden dark:bg-clip-border dark:before:shadow-[0_-1px_--theme(--color-white/8%)]`,r===`bottom`&&`row-start-2 border-t data-ending-style:translate-y-8 data-starting-style:translate-y-8`,r===`top`&&`data-ending-style:-translate-y-8 data-starting-style:-translate-y-8 border-b`,r===`left`&&`data-ending-style:-translate-x-8 data-starting-style:-translate-x-8 w-[calc(100%-(--spacing(12)))] max-w-md border-e`,r===`right`&&`col-start-2 w-[calc(100%-(--spacing(12)))] max-w-md border-s data-ending-style:translate-x-8 data-starting-style:translate-x-8`,i&&`before:hidden sm:rounded-2xl sm:border sm:before:rounded-[calc(var(--radius-2xl)-1px)] sm:**:data-[slot=sheet-footer]:rounded-b-[calc(var(--radius-2xl)-1px)]`,e),"data-slot":`sheet-popup`,...a,children:[t,n&&(0,q.jsx)(Ay,{"aria-label":`Close`,className:`absolute end-2 top-2`,render:(0,q.jsx)(Ui,{size:`icon`,variant:`ghost`}),children:(0,q.jsx)(yn,{})})]})})]})}function Q7({className:e,...t}){return(0,q.jsx)(`div`,{className:K(`flex flex-col gap-2 p-6 in-[[data-slot=sheet-popup]:has([data-slot=sheet-panel])]:pb-3 max-sm:pb-4`,e),"data-slot":`sheet-header`,...t})}function $7({className:e,...t}){return(0,q.jsx)(BT,{className:K(`font-heading text-xl leading-none`,e),"data-slot":`sheet-title`,...t})}function e9(e,t,n=Date.now()){let r=new Intl.RelativeTimeFormat(t,{numeric:`auto`}),i=e-n,a=Math.abs(i);return a<6e4?r.format(0,`second`):a<36e5?r.format(Math.trunc(i/6e4),`minute`):a<864e5?r.format(Math.trunc(i/36e5),`hour`):a<2592e6?r.format(Math.trunc(i/864e5),`day`):a<31536e6?r.format(Math.trunc(i/2592e6),`month`):r.format(Math.trunc(i/31536e6),`year`)}function t9({entry:e}){return(0,q.jsxs)(q.Fragment,{children:[e.running&&(0,q.jsx)(`span`,{className:`h-1.5 w-1.5 shrink-0 rounded-full bg-warning`}),(0,q.jsx)(`span`,{className:`shrink-0 text-muted-foreground text-xs`,children:e9(e.activityAt,`zh`)})]})}function xme({threads:e,status:t}){let[n,r]=(0,W.useState)(!1),[i,a]=(0,W.useState)(``),{entries:o,currentId:s,rootId:c,disabledHint:l}=e,u=o.find(e=>e.id===s),d=mme(o,{currentId:s,rootId:c}),f=o.length-d.length,p=hme(o,i,`all`),m=t=>{!l&&t!==s&&e.onSelect(t)};return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(Gne,{children:[(0,q.jsxs)(Kne,{"aria-label":`切换话题`,className:`mx-auto flex max-w-full items-center justify-center gap-0.5 text-[11px] text-muted-foreground`,children:[(0,q.jsxs)(`span`,{className:`truncate`,children:[u?.title??`主话题`,t&&` · ${t}`]}),(0,q.jsx)(Be,{className:`h-3 w-3 shrink-0`})]}),(0,q.jsxs)(qne,{className:`w-72 max-w-[calc(100vw-1rem)]`,children:[(0,q.jsxs)(Jne,{children:[(0,q.jsx)(Yne,{children:`话题`}),d.map(e=>(0,q.jsxs)(rj,{disabled:!!l&&e.id!==s,onClick:()=>m(e.id),children:[(0,q.jsx)(ze,{className:K(e.id!==s&&`invisible`)}),(0,q.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.title}),(0,q.jsx)(t9,{entry:e})]},e.id))]}),(0,q.jsx)(Xne,{}),f>0&&(0,q.jsxs)(rj,{onClick:()=>{a(``),r(!0)},children:[(0,q.jsx)(St,{}),`全部话题(`,o.length,`)`]}),(0,q.jsxs)(rj,{disabled:!!l,onClick:e.onCreate,children:[(0,q.jsx)(Dt,{}),`新话题`]}),l&&(0,q.jsx)(`p`,{className:`px-2 py-1.5 text-muted-foreground text-xs`,children:l})]})]}),(0,q.jsx)(X7,{open:n,onOpenChange:r,children:(0,q.jsxs)(Z7,{side:`bottom`,className:`max-h-[80vh] pb-safe`,children:[(0,q.jsx)(Q7,{children:(0,q.jsxs)($7,{children:[`全部话题(`,o.length,`)`]})}),(0,q.jsx)(`div`,{className:`px-4 pb-2`,children:(0,q.jsx)(Y7,{value:i,placeholder:`搜索话题…`,onChange:e=>a(e.target.value)})}),l&&(0,q.jsx)(`p`,{className:`px-4 pb-2 text-muted-foreground text-xs`,children:l}),(0,q.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-2 pb-3`,children:[p.map(e=>(0,q.jsxs)(`button`,{type:`button`,disabled:!!l&&e.id!==s,onClick:()=>{m(e.id),r(!1)},className:`flex w-full items-center gap-2 rounded-md px-2 py-2 text-left hover:bg-accent disabled:opacity-60`,children:[(0,q.jsx)(ze,{className:K(`h-4 w-4 shrink-0`,e.id!==s&&`invisible`)}),(0,q.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,q.jsx)(`span`,{className:`block truncate text-sm`,children:e.title}),e.preview&&(0,q.jsx)(`span`,{className:`block truncate text-muted-foreground text-xs`,children:e.preview})]}),(0,q.jsx)(t9,{entry:e})]},e.id)),p.length===0&&(0,q.jsx)(`p`,{className:`py-8 text-center text-muted-foreground text-sm`,children:`没有匹配的话题`})]})]})})]})}var Sme={queued:`排队中`,running:`进行中`,completed:`已完成`,failed:`失败`,canceled:`已取消`,blocked:`卡住了`},n9=4,Cme=e=>new Date(e).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`}),wme={started:{icon:Je,className:`border-brand/50 text-brand`},blocked:{icon:Ge,className:`border-warning/60 text-warning`},delivered:{icon:Ke,className:`border-success/60 text-success`}};function Tme({entry:e,bots:t}){let n=!!e.taskId,[r,i]=(0,W.useState)(!n),a=(0,q.jsxs)(q.Fragment,{children:[n&&(0,q.jsx)(Ve,{"aria-hidden":!0,className:K(`h-3 w-3 shrink-0 transition-transform`,r&&`rotate-90`)}),(0,q.jsxs)(`span`,{className:`font-medium`,children:[t.get(e.from)?.name??`成员`,` → `,t.get(e.to)?.name??`成员`]}),(0,q.jsx)(`span`,{className:K(`rounded px-1.5 py-0.5`,e.state===`running`||e.state===`queued`?`bg-brand/10 text-brand`:e.state===`failed`?`bg-destructive/10 text-destructive`:`bg-muted text-muted-foreground`),children:Sme[e.state]})]});return(0,q.jsxs)(`div`,{className:`rounded-lg border bg-muted/30 px-3 py-2 text-xs`,children:[n?(0,q.jsx)(`button`,{type:`button`,"aria-expanded":r,"aria-label":r?`收起委派结果`:`展开委派结果`,className:`flex w-full items-center gap-1.5 text-left`,onClick:()=>i(e=>!e),children:a}):(0,q.jsx)(`p`,{className:`flex items-center gap-1.5`,children:a}),r&&e.summary&&(0,q.jsx)(`p`,{className:`mt-1 line-clamp-3 text-muted-foreground`,children:e.summary})]})}function r9(e,t){let n=[...t].sort((e,t)=>t.length-e.length),r=[],i=e,a=0;for(;i;){let e=i.indexOf(`@`),t=e<0?void 0:n.find(t=>i.startsWith(t,e+1));if(e<0||!t){r.push(i);break}e>0&&r.push(i.slice(0,e)),r.push((0,q.jsxs)(`span`,{className:`font-medium text-brand`,children:[`@`,t]},a++)),i=i.slice(e+1+t.length)}return r}function Eme(e){let{chat:t,bots:n,timeline:r,state:i}=e,a=(0,W.useRef)(null),o=(0,W.useRef)(null),s=(0,W.useRef)(null),c=(0,W.useRef)(!0),l=(0,W.useRef)(null),u=(0,W.useRef)(null),[d,f]=(0,W.useState)(``),[p,m]=(0,W.useState)(0),[h,g]=(0,W.useState)([]),[_,v]=(0,W.useState)(!1),[y,b]=(0,W.useState)(null),x=r?.entries??[],S=t.epochSeq??x.findLast(e=>e.kind===`system`&&e.newConversation)?.seq??0,[C,w]=(0,W.useState)(!1);(0,W.useEffect)(()=>w(!1),[t.id,S]);let T=S>0&&!C,E=ko(x,S,C),D=ume(x,S),O=t.members.map(e=>n.get(e)).filter(e=>!!(e&&!e.archived)),k=O.map(e=>e.name),A=!!i?.current||t.status!==`idle`,j=Mo(d,p),M=j?Po(j.query,O):[],N=E[0]?.seq,P=E.at(-1)?.seq;(0,W.useLayoutEffect)(()=>{let e=a.current;if(!e)return;let t=s.current;t?(s.current=null,e.scrollTop=t.top+(e.scrollHeight-t.height)):c.current&&(e.scrollTop=e.scrollHeight)},[N,P,i?.current,e.activities.length]);let F=()=>{let t=a.current;!r?.hasOlder||!t||e.historyLoading||e.connState!==`online`||T&&(x[0]?.seq??S)<=S||(s.current={height:t.scrollHeight,top:t.scrollTop},e.onLoadOlder())},I=e=>{if(!j)return;let t=Fo(d,j,p,e.name);f(t.text),m(t.caret),requestAnimationFrame(()=>{o.current?.focus(),o.current?.setSelectionRange(t.caret,t.caret)})},L=(0,W.useRef)(h);L.current=h,(0,W.useEffect)(()=>()=>{for(let e of L.current)URL.revokeObjectURL(e.url)},[]);let R=e=>{let t=[...e??[]].filter(e=>e.type.startsWith(`image/`)).slice(0,n9-h.length).map(e=>({file:e,url:URL.createObjectURL(e)}));g(e=>[...e,...t]),b(null)},z=e=>{URL.revokeObjectURL(e),g(t=>t.filter(t=>t.url!==e))},B=async()=>{if(!d.trim()&&h.length===0||_||e.newSessionBusy)return;let t=[];if(h.length){v(!0);try{t=await Gpe(h.map(e=>e.file))}catch(e){b(e instanceof Error?e.message:`图片处理失败`);return}finally{v(!1)}}e.onSend(d,t);for(let e of h)URL.revokeObjectURL(e.url);g([]),b(null),f(``),m(0),c.current=!0},V=e=>{let t=o.current,n=t?.selectionStart??d.length,r=t?.selectionEnd??d.length,i=d.slice(0,n)+e+d.slice(r);f(i),m(n+e.length),requestAnimationFrame(()=>{t?.focus(),t?.setSelectionRange(n+e.length,n+e.length)})},H=t=>{switch(t.kind){case`human`:return(0,q.jsxs)(`div`,{className:`flex flex-col items-end`,children:[t.text&&(0,q.jsxs)(`div`,{className:`max-w-[85%] whitespace-pre-wrap break-words rounded-2xl rounded-br-md bg-brand/10 px-3 py-2 text-sm`,children:[r9(t.text,k),t.truncated&&(0,q.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`消息过长,仅显示部分内容`})]}),t.images?.length?(0,q.jsx)(ua,{target:{chatId:e.chat.id,entryId:t.id}}):null]},t.seq);case`bot`:{let r=n.get(t.botId);return(0,q.jsxs)(`div`,{className:`flex gap-2`,children:[(0,q.jsx)(Ya,{bot:r,size:`sm`}),(0,q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,q.jsxs)(`p`,{className:`flex items-baseline gap-1.5 text-xs`,children:[(0,q.jsx)(`span`,{className:`font-medium`,children:r?.name??`成员`}),(0,q.jsx)(`span`,{className:`text-muted-foreground`,children:Cme(t.at)})]}),(0,q.jsxs)(`div`,{className:`mt-0.5 min-w-0 text-sm`,children:[(0,q.jsx)(C5,{text:t.text}),t.truncated&&(0,q.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`消息过长,仅显示部分内容`})]}),(0,q.jsx)(ua,{target:{chatId:e.chat.id,entryId:t.id}}),(0,q.jsxs)(`button`,{type:`button`,onClick:()=>e.onOpenProcess(t.conversationId),className:`mt-0.5 flex items-center gap-0.5 text-muted-foreground text-xs hover:text-foreground`,children:[(0,q.jsx)(Ve,{className:`h-3 w-3`}),`查看过程`]})]})]},t.seq)}case`delegation`:return(0,q.jsx)(Tme,{entry:t,bots:n},t.seq);case`progress`:{let e=n.get(t.botId),r=wme[t.phase],i=r.icon,a=dme(t.text,t.taskSeq);return(0,q.jsxs)(`div`,{"data-phase":t.phase,className:`flex gap-2 text-xs`,children:[(0,q.jsx)(Ya,{bot:e,size:`sm`}),(0,q.jsxs)(`div`,{className:K(`flex min-w-0 items-start gap-1.5 rounded-md border-l-2 bg-muted/50 px-2 py-1`,r.className),children:[(0,q.jsx)(i,{"aria-hidden":!0,className:`mt-px h-3.5 w-3.5 shrink-0`}),(0,q.jsxs)(`p`,{className:`line-clamp-2 min-w-0 break-words text-muted-foreground`,children:[(0,q.jsx)(`span`,{className:`font-medium text-foreground`,children:e?.name??`成员`}),` `,a?(0,q.jsxs)(q.Fragment,{children:[r9(a[0],k),(0,q.jsx)(`span`,{className:`font-medium text-foreground`,children:a[1]}),r9(a[2],k)]}):r9(t.text,k)]})]})]},t.seq)}case`system`:return(0,q.jsxs)(`p`,{className:`text-center text-muted-foreground text-xs`,children:[t.text,D.has(t.id)&&e.onRetry&&!e.deviceReadOnly&&(0,q.jsx)(`button`,{type:`button`,className:`ml-2 underline disabled:opacity-50`,disabled:A||e.connState!==`online`,onClick:()=>e.onRetry?.(t.id),children:`重试`})]},t.seq)}},ee=i?.current?n.get(i.current):void 0;return(0,q.jsxs)(`div`,{className:`phone-chat-root flex h-full min-h-0 flex-col`,children:[(0,q.jsxs)(`header`,{className:`flex shrink-0 items-center gap-1 border-b bg-background px-2 py-2 pt-safe`,children:[e.drawerDocked?(0,q.jsx)(`span`,{className:`h-9 w-9 shrink-0`}):(0,q.jsx)(`button`,{type:`button`,onClick:e.onOpenDrawer,"aria-label":`打开会话列表`,className:`flex h-9 w-9 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground`,children:(0,q.jsx)(Lt,{className:`h-4.5 w-4.5`})}),(0,q.jsxs)(`div`,{className:`min-w-0 flex-1 text-center`,children:[(0,q.jsx)(`p`,{className:`truncate font-medium text-sm`,children:t.title||`群聊`}),e.threads?(0,q.jsx)(xme,{threads:e.threads,status:e.connState===`online`?void 0:e.stateLabel}):(0,q.jsx)(`p`,{className:`truncate text-[11px] text-muted-foreground`,children:e.connState===`online`?`${t.members.length} 位成员`:e.stateLabel})]}),e.threads?(0,q.jsx)(`button`,{type:`button`,onClick:e.threads.onCreate,disabled:!!e.threads.disabledHint,"aria-label":`新话题`,title:e.threads.disabledHint??`新话题`,className:`flex h-9 w-9 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground disabled:opacity-40`,children:(0,q.jsx)(on,{className:`h-4.5 w-4.5`})}):(0,q.jsx)(`button`,{type:`button`,onClick:e.onNewSession,disabled:!e.canCreate||e.deviceReadOnly||_||e.connState!==`online`,"aria-label":`新建会话`,title:e.newSessionHint??`新建会话`,className:`flex h-9 w-9 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground disabled:opacity-40`,children:(0,q.jsx)(on,{className:`h-4.5 w-4.5`})})]}),(0,q.jsxs)(`div`,{ref:a,onScroll:e=>{let t=e.currentTarget;c.current=t.scrollHeight-t.scrollTop-t.clientHeight<40,t.scrollTop<60&&F()},className:`min-h-0 flex-1 space-y-3 overflow-y-auto px-3 py-3`,children:[r===void 0?(0,q.jsxs)(`p`,{className:`flex items-center justify-center gap-1.5 py-8 text-muted-foreground text-sm`,children:[(0,q.jsx)(Ct,{className:`h-4 w-4 animate-spin`}),`读取中…`]}):r.hasOlder&&(!T||(x[0]?.seq??S)>S)?(0,q.jsx)(`button`,{type:`button`,onClick:F,disabled:e.historyLoading||e.connState!==`online`,className:`w-full py-1 text-center text-muted-foreground text-xs`,children:e.historyLoading?`加载中…`:`加载更早的消息`}):E.length===0?(0,q.jsx)(`p`,{className:`py-8 text-center text-muted-foreground text-sm`,children:`@ 成员开始对话,未 @ 时由群主回复`}):null,S>0&&(0,q.jsx)(`button`,{type:`button`,className:`w-full py-1 text-center text-muted-foreground text-xs`,onClick:()=>{w(!C),C&&r?.history?e.onJumpLatest?.():!C&&r?.hasOlder&&!x.some(e=>e.seq<S)&&e.onLoadOlder()},children:T?`更早的对话 · ${S-1} 条`:`收起更早的对话`}),r?.history&&(0,q.jsx)(`button`,{type:`button`,className:`w-full py-1 text-center text-brand text-xs`,onClick:()=>{c.current=!0,e.onJumpLatest?.()},children:`回到最新消息`}),E.map(H),e.activities.map(t=>(0,q.jsx)(pme,{item:t,bots:n,clockOffset:e.clockOffset,onOpen:e.onOpenProcess},t.conversationId)),ee&&e.activities.length===0&&(0,q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,q.jsx)(Ya,{bot:ee,size:`sm`,busy:!0}),(0,q.jsxs)(`span`,{className:`text-muted-foreground text-xs`,children:[ee.name,` 正在回复…`]})]})]}),(0,q.jsxs)(`div`,{className:`phone-dock shrink-0 space-y-2 px-3 pt-1 pb-safe`,children:[e.outbox,e.notice&&(0,q.jsx)(`p`,{className:`rounded-md bg-destructive/10 px-2 py-1 text-destructive text-xs`,children:e.notice}),e.deviceReadOnly&&(0,q.jsx)(`p`,{className:`rounded-md bg-muted px-2 py-1 text-center text-muted-foreground text-xs`,children:U7(e.readOnlyRejected)}),!e.deviceReadOnly&&e.pending.map(({sessionId:t,botId:r,view:i})=>i.approvals.length>0||i.asks.length>0?(0,q.jsxs)(`div`,{className:`space-y-1`,children:[(0,q.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:n.get(r)?.name??`成员`}),(0,q.jsx)(f_,{approvals:i.approvals,clockOffset:e.clockOffset,onRespond:(n,r)=>e.onApproval(t,n,r)}),(0,q.jsx)(g_,{asks:i.asks,clockOffset:e.clockOffset,onAnswer:(n,r)=>e.onAsk(t,n,r),autoFocus:!1})]},t):null),(0,q.jsxs)(`div`,{className:K(`relative`,e.deviceReadOnly&&`hidden`),children:[M.length>0&&(0,q.jsx)(`div`,{className:`absolute right-0 bottom-full left-0 mb-1 max-h-48 overflow-y-auto rounded-lg border bg-popover p-1 shadow-md`,children:M.map(e=>{let t=n.get(e.id);return(0,q.jsxs)(`button`,{type:`button`,onMouseDown:e=>e.preventDefault(),onClick:()=>I(e),className:`flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm hover:bg-accent`,children:[t?(0,q.jsx)(Ya,{bot:t,size:`sm`}):(0,q.jsx)(`span`,{className:`flex h-7 w-7 items-center justify-center rounded-full bg-muted text-xs`,children:`@`}),(0,q.jsx)(`span`,{className:`font-medium`,children:e.name}),t?.title&&(0,q.jsx)(`span`,{className:`truncate text-muted-foreground text-xs`,children:t.title})]},e.id)})}),y&&(0,q.jsx)(`p`,{className:`mb-1 text-destructive text-xs`,children:y}),h.length>0&&(0,q.jsx)(`div`,{className:`mb-1.5 flex gap-1.5`,children:h.map(e=>(0,q.jsxs)(`div`,{className:`relative h-14 w-14 overflow-hidden rounded-lg border`,children:[(0,q.jsx)(`img`,{src:e.url,alt:``,className:`h-full w-full object-cover`}),(0,q.jsx)(`button`,{type:`button`,"aria-label":`移除图片`,onClick:()=>z(e.url),className:`absolute top-0.5 right-0.5 flex h-4 w-4 items-center justify-center rounded-full bg-black/60 text-white`,children:(0,q.jsx)(yn,{className:`h-3 w-3`})})]},e.url))}),(0,q.jsxs)(`div`,{ref:u,className:`flex items-end gap-2 rounded-2xl border bg-background px-3 py-2`,children:[(0,q.jsx)(`input`,{ref:l,type:`file`,accept:`image/*`,multiple:!0,hidden:!0,onChange:e=>{R(e.target.files),e.target.value=``}}),(0,q.jsx)(`button`,{type:`button`,"aria-label":`添加图片`,disabled:h.length>=n9,onClick:()=>l.current?.click(),className:`flex h-8 w-8 shrink-0 items-center justify-center rounded-full text-muted-foreground disabled:opacity-40`,children:(0,q.jsx)(_t,{className:`h-4.5 w-4.5`})}),e.voice&&(0,q.jsx)(`span`,{className:`flex h-8 shrink-0 items-center justify-center [&>div>button]:h-8 [&>div>button]:min-w-8 [&>div>button]:rounded-full`,children:(0,q.jsx)(DO,{startSession:e.voice,disabled:_,holdScope:u,onText:V})}),(0,q.jsx)(`textarea`,{ref:o,rows:1,value:d,placeholder:`@ 成员,或直接说…`,onChange:e=>{f(e.target.value),m(e.target.selectionStart??e.target.value.length)},onSelect:e=>m(e.currentTarget.selectionStart??0),className:`max-h-32 min-h-6 flex-1 resize-none bg-transparent text-sm outline-none field-sizing-content`}),A&&(0,q.jsx)(`button`,{type:`button`,"aria-label":`停止`,onClick:e.onStop,className:`flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-muted text-foreground`,children:(0,q.jsx)(un,{className:`h-3.5 w-3.5 fill-current`})}),(0,q.jsx)(`button`,{type:`button`,"aria-label":`发送`,disabled:!d.trim()&&h.length===0||_||e.newSessionBusy||!e.outbox&&e.connState!==`online`,onClick:()=>void B(),className:`flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-brand text-brand-foreground disabled:opacity-40`,children:(0,q.jsx)(Me,{className:`h-4 w-4`})})]})]})]})]})}var i9=e=>typeof window.matchMedia==`function`&&window.matchMedia(e).matches;function Dme(e){return(0,W.useSyncExternalStore)(t=>{if(typeof window.matchMedia!=`function`)return()=>{};let n=window.matchMedia(e);return n.addEventListener(`change`,t),()=>n.removeEventListener(`change`,t)},()=>i9(e),()=>i9(e))}var Ome=`(min-width: 900px)`;function kme(e){let t=W.useRef(!0);t.current&&(t.current=!1,e())}var a9=W.createContext(null);function o9(){let e=W.useContext(a9);if(e===null)throw Error(Rn(60));return e}var Ame=(e,t)=>Object.is(e,t);function s9(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function c9(e,t,n){return!e||e.length===0?-1:e.findIndex(e=>e!==void 0&&s9(e,t,n))}function jme(e,t,n){return e.filter(e=>!s9(t,e,n))}function l9(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function u9(e){return e!=null&&e.length>0&&typeof e[0]==`object`&&e[0]!=null&&`items`in e[0]}function Mme(e){if(!Array.isArray(e))return e!=null&&`null`in e;let t=e;if(u9(t)){for(let e of t)for(let t of e.items)if(t&&t.value==null&&t.label!=null)return!0;return!1}for(let e of t)if(e&&e.value==null&&e.label!=null)return!0;return!1}function d9(e,t){if(t&&e!=null)return t(e)??``;if(e&&typeof e==`object`){if(`label`in e&&e.label!=null)return String(e.label);if(`value`in e)return String(e.value)}return l9(e)}function f9(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?l9(e.value):l9(e)}function p9(e,t,n){function r(){return d9(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e==`object`&&`label`in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??r();if(Array.isArray(t)){let n=t,i=u9(n)?n.flatMap(e=>e.items):n;if(typeof e!=`object`||!e){let t=i.find(t=>t.value===e);return t&&t.label!=null?t.label:r()}if(`value`in e){let t=i.find(t=>t&&t.value===e.value);if(t&&t.label!=null)return t.label}}return r()}function Nme(e,t,n){return e.reduce((e,r,i)=>(i>0&&e.push(`, `),e.push((0,q.jsx)(W.Fragment,{children:p9(r,t,n)},i)),e),[])}var m9={id:e=>e.id,labelId:e=>e.labelId,modal:e=>e.modal,items:e=>e.items,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,value:e=>e.value,hasSelectedValue:e=>{let{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:f9(t,r)!==``},hasNullItemLabel:(e,t)=>t?Mme(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMount:e=>e.forceMount,transitionStatus:e=>e.transitionStatus,openMethod:e=>e.openMethod,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{let n=e.isItemEqualToValue,r=e.value;return e.multiple?Array.isArray(r)&&r.some(e=>s9(t,e,n)):s9(t,r,n)},isSelectedByFocus:(e,t)=>e.selectedIndex===t,popupProps:e=>e.popupProps,triggerProps:e=>e.triggerProps,triggerElement:e=>e.triggerElement,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupSide:e=>e.popupSide,scrollUpArrowVisible:e=>e.scrollUpArrowVisible,scrollDownArrowVisible:e=>e.scrollDownArrowVisible,hasScrollArrows:e=>e.hasScrollArrows};function Pme(e,t,n=(e,t)=>e===t){return e.length===t.length&&e.every((e,r)=>n(e,t[r]))}function Fme(e){let{id:t,value:n,defaultValue:r=null,onValueChange:i,open:a,defaultOpen:o=!1,onOpenChange:s,name:c,form:l,autoComplete:u,disabled:d=!1,readOnly:f=!1,required:p=!1,modal:m=!0,actionsRef:h,inputRef:g,onOpenChangeComplete:_,items:v,multiple:y=!1,itemToStringLabel:b,itemToStringValue:x,isItemEqualToValue:S=Ame,highlightItemOnHover:C=!0,children:w}=e,{clearErrors:T}=lj(),{setDirty:E,setTouched:D,setFocused:O,validityData:k,setFilled:A,name:j,disabled:M,validation:N,validationMode:P}=sj(),F=dj({id:t}),I=M||d,L=j??c,[R,z]=eA({controlled:n,default:y?r??Zn:r,name:`Select`,state:`value`}),[B,V]=eA({controlled:a,default:o,name:`Select`,state:`open`}),H=W.useRef([]),ee=W.useRef([]),U=W.useRef(null),te=W.useRef(null),ne=W.useRef(0),re=W.useRef(null),ie=W.useRef([]),ae=W.useRef(!1),oe=W.useRef(null),se=W.useRef(null),ce=W.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),le=W.useRef(!1),{mounted:ue,setMounted:de,transitionStatus:fe}=uw(B),{openMethod:pe,triggerProps:me}=WT(B),he=Bn(()=>new ow({id:F,labelId:void 0,modal:m,multiple:y,itemToStringLabel:b,itemToStringValue:x,isItemEqualToValue:S,value:R,open:B,mounted:ue,transitionStatus:fe,items:v,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,ge=tw(he,m9.activeIndex),_e=tw(he,m9.selectedIndex),ve=tw(he,m9.triggerElement),ye=tw(he,m9.positionerElement),be=JA(pe),xe=pe??be,Se=W.useMemo(()=>y?``:f9(R,x),[y,R,x]),Ce=W.useMemo(()=>y&&Array.isArray(R)?R.map(e=>f9(e,x)):f9(R,x),[y,R,x]);cj(Ob(ve),F,R,iy(()=>Ce),!I,c);let we=W.useRef(R),Te=y?Array.isArray(R)&&R.length>0:R!=null&&Se!==``;Z(()=>{A(Te)},[Te,A]),Z(function(){let e=R,t=!1;if(y){let n=Array.isArray(R)?R:[];t=n.length===0,e=n[n.length-1]}let n=t?-1:c9(ie.current,e,S),r=n===-1?null:n;r===null&&(se.current=null),!B&&he.set(`selectedIndex`,r)},[y,B,R,S,he]);function Ee(e){let t=k.initialValue;return Array.isArray(e)&&Array.isArray(t)?!Pme(e,t,(e,t)=>s9(e,t,S)):e!==t}HT(R,()=>{T(L),E(Ee(R)),N.change(R)});let De=iy((e,t)=>{s?.(e,t),!t.isCanceled&&(V(e),!e&&(t.reason===`focus-out`||t.reason===`outside-press`)&&(D(!0),O(!1),P===`onBlur`&&N.commit(R)))}),Oe=iy(()=>{de(!1),he.update({activeIndex:null,openMethod:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1}),_?.(!1)});fw({enabled:!h,open:B,ref:U,onComplete(){B||Oe()}}),W.useImperativeHandle(h,()=>({unmount:Oe}),[Oe]);let G=iy((e,t)=>{i?.(e,t),!t.isCanceled&&z(e)}),ke=iy(e=>{let t=fE(e.scrollHeight,e.clientHeight),n=pE(e.scrollTop,t),r=n>0,i=n<t;he.set(`scrollUpArrowVisible`,r),he.set(`scrollDownArrowVisible`,i)}),Ae=Lw({open:B,onOpenChange:De,elements:{reference:ve,floating:ye}}),je=CS(Ae,{enabled:!f&&!I,event:`mousedown`}),Me=ES(Ae),Ne=rT(Ae,{enabled:!f&&!I,listRef:H,activeIndex:ge,selectedIndex:_e,disabledIndices:Zn,onNavigate(e){e===null&&!B||he.set(`activeIndex`,e)},focusItemOnHover:C}),Pe=iT(Ae,{enabled:!f&&!I&&(B||!y),listRef:ee,activeIndex:ge,selectedIndex:_e,disabledIndices:e=>Wne(H.current[e]),onMatch(e){B?he.set(`activeIndex`,e):G(ie.current[e],ky(hy))},onTyping(e){ae.current=e}}),Fe=W.useMemo(()=>Cn(Pe.reference,Ne.reference,Me.reference,je.reference,me),[je.reference,Pe.reference,Ne.reference,Me.reference,me]),Ie=W.useMemo(()=>Cn(pw,Pe.floating,Ne.floating,Me.floating),[Pe.floating,Ne.floating,Me.floating]),Le=Ne.item??Qn;kme(()=>{he.update({popupProps:Ie,triggerProps:Fe})}),he.useSyncedValues({id:F,modal:m,multiple:y,value:R,open:B,mounted:ue,transitionStatus:fe,popupProps:Ie,triggerProps:Fe,items:v,itemToStringLabel:b,itemToStringValue:x,isItemEqualToValue:S,openMethod:xe});let Re=W.useMemo(()=>({store:he,floatingContext:Ae,required:p,disabled:I,readOnly:f,multiple:y,highlightItemOnHover:C,setValue:G,setOpen:De,listRef:H,popupRef:U,scrollHandlerRef:te,handleScrollArrowVisibility:ke,scrollArrowsMountedCountRef:ne,itemProps:Le,valueRef:re,valuesRef:ie,labelsRef:ee,typingRef:ae,selectionRef:ce,firstItemTextRef:oe,selectedItemTextRef:se,validation:N,onOpenChangeComplete:_,alignItemWithTriggerActiveRef:le,initialValueRef:we}),[he,Ae,p,I,f,y,C,G,De,Le,N,_,ke]),ze=Vn(g,N.inputRef),Be=y?void 0:L,Ve=W.useMemo(()=>!y||!Array.isArray(R)||!L?null:R.map(e=>{let t=f9(e,x);return(0,q.jsx)(`input`,{type:`hidden`,form:l,name:L,value:t,disabled:I},t)}),[y,R,l,L,x,I]);return(0,q.jsxs)(a9.Provider,{value:Re,children:[w,(0,q.jsx)(`input`,{...N.getValidationProps(I,{onFocus(){he.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented||I||f)return;let t=e.currentTarget.value,n=ky(hy,e.nativeEvent);function r(){if(y)return;let e=t.toLowerCase(),r=ie.current.findIndex(t=>f9(t,x).toLowerCase()===e||d9(t,b).toLowerCase()===e);r===-1&&(r=ie.current.findIndex((t,n)=>{let r=ee.current[n];return r!=null&&r.toLowerCase()===e}));let i=ie.current[r];i!=null&&G(i,n)}he.set(`forceMount`,!0),queueMicrotask(r)}}),id:F&&Be==null?`${F}-hidden-input`:void 0,form:l,name:Be,autoComplete:u,value:Se,disabled:I,required:p&&!(y&&Te),readOnly:f,ref:ze,style:L?Fb:Pb,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Ve]})}function Ime(e,t){return e??t}var Lme=400,Rme={...Ev,...aj,popupSide:e=>e?{"data-popup-side":e}:null,value:()=>null},zme=W.forwardRef(function(e,t){let{render:n,className:r,id:i,disabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{setTouched:l,setFocused:u,validationMode:d,state:f,disabled:p}=sj(),{labelId:m}=uj(),{store:h,setOpen:g,selectionRef:_,validation:v,readOnly:y,required:b,alignItemWithTriggerActiveRef:x,disabled:S}=o9(),C=p||S||a,w=tw(h,m9.open),T=tw(h,m9.mounted),E=tw(h,m9.value),D=tw(h,m9.triggerProps),O=tw(h,m9.positionerElement),k=tw(h,m9.listElement),A=tw(h,m9.popupSide),j=tw(h,m9.id),M=tw(h,m9.labelId),N=tw(h,m9.hasSelectedValue),P=T&&O?A:null,F=i??j,I=Ime(m,M);dj({id:F});let L=Ob(O),R=W.useRef(null),{getButtonProps:z,buttonRef:B}=fy({disabled:C,native:o}),V=h.useStateSetter(`triggerElement`),H=By(),ee=By(),U=By();W.useEffect(()=>{if(w)return U.start(Lme,()=>{_.current.allowUnselectedMouseUp=!0,_.current.allowSelectedMouseUp=!0}),()=>{U.clear()};_.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},ee.clear()},[w,_,ee,U]);let te=Cn(D,{id:F,role:`combobox`,"aria-expanded":w,"aria-haspopup":`listbox`,"aria-controls":w?k?.id??Sb(O)?.id:void 0,"aria-labelledby":I,"aria-readonly":y||void 0,"aria-required":b||void 0,tabIndex:C?-1:0,onFocus(e){u(!0),w&&x.current&&g(!1,ky(hy,e.nativeEvent)),H.start(0,()=>{h.set(`forceMount`,!0)})},onBlur(e){mb(O,e.relatedTarget)||(l(!0),u(!1),d===`onBlur`&&v.commit(E))},onMouseDown(e){if(w)return;let t=uy(e.currentTarget);function n(e){if(!R.current)return;let t=e.target;mb(R.current,t)||mb(L.current,t)||zA(e,R.current)||g(!1,ky(Ty,e))}ee.start(0,()=>{t.addEventListener(`mouseup`,n,{once:!0})})}},c,z),ne=v.getValidationProps(C,te);ne.role=`combobox`;let re={...f,open:w,disabled:C,value:E,readOnly:y,popupSide:P,placeholder:!N};return nr(`button`,e,{ref:[t,R,B,V],state:re,stateAttributesMapping:Rme,props:ne})}),Bme={value:()=>null},Vme=W.forwardRef(function(e,t){let{className:n,render:r,children:i,placeholder:a,style:o,...s}=e,{store:c,valueRef:l}=o9(),u=tw(c,m9.value),d=tw(c,m9.items),f=tw(c,m9.itemToStringLabel),p=tw(c,m9.hasSelectedValue),m=!p&&a!=null&&i==null,h=tw(c,m9.hasNullItemLabel,m),g={value:u,placeholder:!p},_=null;return _=typeof i==`function`?i(u):i??(m&&!h?a:Array.isArray(u)?Nme(u,d,f):p9(u,d,f)),nr(`span`,e,{state:g,ref:[t,l],props:[{children:_},s],stateAttributesMapping:Bme})}),Hme=W.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{store:o}=o9();return nr(`span`,e,{state:{open:tw(o,m9.open)},ref:t,props:[{"aria-hidden":!0,children:`▼`},a],stateAttributesMapping:Tv})}),Ume=W.forwardRef(function(e,t){let{store:n}=o9(),r=tw(n,m9.mounted),i=tw(n,m9.forceMount);return r||i?(0,q.jsx)(rS,{ref:t,...e}):null}),h9=W.createContext(void 0);function g9(){let e=W.useContext(h9);if(!e)throw Error(Rn(59));return e}function _9(e,t){e&&Object.assign(e.style,t)}var v9={position:`relative`,maxHeight:`100%`,overflowX:`hidden`,overflowY:`auto`},Wme={position:`fixed`},Gme=W.forwardRef(function(e,t){let{anchor:n,className:r,render:i,positionMethod:a,side:o,align:s,sideOffset:c,alignOffset:l,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d,arrowPadding:f,sticky:p,disableAnchorTracking:m,alignItemWithTrigger:h=!0,collisionAvoidance:g=Xx,style:_,...v}=e,{store:y,listRef:b,labelsRef:x,alignItemWithTriggerActiveRef:S,selectedItemTextRef:C,valuesRef:w,initialValueRef:T,popupRef:E,setValue:D,floatingContext:O}=o9(),k=tw(y,m9.open),A=tw(y,m9.mounted),j=tw(y,m9.modal),M=tw(y,m9.value),N=tw(y,m9.openMethod),P=tw(y,m9.positionerElement),F=tw(y,m9.triggerElement),I=tw(y,m9.isItemEqualToValue),L=tw(y,m9.transitionStatus),R=W.useRef(null),z=W.useRef(null),[B,V]=W.useState(h),H=A&&B&&N!==`touch`;!A&&B!==h&&V(h),W.useImperativeHandle(S,()=>H),EA((H||j)&&k,N===`touch`,P,F);let ee=$E({anchor:n,floatingRootContext:O,positionMethod:a,mounted:A,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m??H,collisionAvoidance:g,keepMounted:!0}),U=H?`none`:ee.side,te=H?Wme:ee.positionerStyles,ne={open:k,side:U,align:ee.align,anchorHidden:ee.anchorHidden};Z(()=>{y.set(`popupSide`,ee.side)},[y,ee.side]);let re=nD(e,ne,{styles:te,transitionStatus:L,props:v,refs:[t,y.useStateSetter(`positionerElement`)],hidden:!A,inert:!k}),ie=W.useRef(0),ae=iy(e=>{if(w.current.length===0)return;let t=ie.current;if(ie.current=e.size,e.size===t)return;let n=ky(hy);if(t!==0&&!y.state.multiple&&M!==null&&c9(w.current,M,I)===-1){let e=T.current,t=e!=null&&c9(w.current,e,I)!==-1?e:null;D(t,n),t===null&&(y.set(`selectedIndex`,null),C.current=null)}if(t!==0&&y.state.multiple&&Array.isArray(M)){let e=M.filter(e=>c9(w.current,e,I)!==-1);e.length!==M.length&&(D(e,n),e.length===0&&(y.set(`selectedIndex`,null),C.current=null))}if(k&&H){y.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:``};_9(P,e),_9(E.current,e)}}),oe=W.useMemo(()=>({...ee,side:U,alignItemWithTriggerActive:H,setControlledAlignItemWithTrigger:V,scrollUpArrowRef:R,scrollDownArrowRef:z}),[ee,U,H,V]);return(0,q.jsx)(vA,{elementsRef:b,labelsRef:x,onMapChange:ae,children:(0,q.jsxs)(h9.Provider,{value:oe,children:[A&&j&&(0,q.jsx)(yT,{inert:vT(!k),cutout:F}),re]})})}),Kme={...Dv,...yv},qme=W.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,...o}=e,{store:s,popupRef:c,onOpenChangeComplete:l,setOpen:u,valueRef:d,firstItemTextRef:f,selectedItemTextRef:p,multiple:m,handleScrollArrowVisibility:h,scrollHandlerRef:g,listRef:_,highlightItemOnHover:v,floatingContext:y}=o9(),{side:b,align:x,alignItemWithTriggerActive:S,isPositioned:C,setControlledAlignItemWithTrigger:w}=g9(),T=pA(!0)!=null,E=uE(),{nonce:D,disableStyleElements:O}=tE(),k=tw(s,m9.id),A=tw(s,m9.open),j=tw(s,m9.openMethod),M=tw(s,m9.mounted),N=tw(s,m9.popupProps),P=tw(s,m9.transitionStatus),F=tw(s,m9.triggerElement),I=tw(s,m9.positionerElement),L=tw(s,m9.listElement),R=W.useRef(!1),z=W.useRef(!1),B=W.useRef({}),V=Mb(),H=iy(e=>{if(!I||!c.current||!z.current)return;let t=I.style.top===`0px`,n=I.style.bottom===`0px`;if(R.current||!S||!t&&!n){h(e);return}let r=x9(I),i=S9(I.getBoundingClientRect().height,`y`,r),a=uy(I),o=Mv(I),s=o.getComputedStyle(I),l=parseFloat(s.marginTop),u=parseFloat(s.marginBottom),d=y9(o.getComputedStyle(c.current)),f=Math.min(a.documentElement.clientHeight-l-u,d),p=e.scrollTop,m=b9(e),g=null,_=e=>{I.style.height=`${e}px`},v=t?m-p:p,y=Math.min(i+v,f);if(v<=1){let n=dE(v,0,f-i);n>0&&_(i+n),e.scrollTop=t?m:0,f-(i+n)<=1&&(R.current=!0),h(e);return}f-y>1?g=t?1/0:0:n&&p<m&&(g=p-(v-(i+v-f)));let b=Math.ceil(y);if(b!==0&&_(b),g!=null){let t=dE(g,0,b9(e));Math.abs(e.scrollTop-t)>1&&(e.scrollTop=t)}b>=f-1&&(R.current=!0),h(e)});W.useImperativeHandle(g,()=>H,[H]),fw({open:A,ref:c,onComplete(){A&&l?.(!0)}});let ee={open:A,transitionStatus:P,side:b,align:x};Z(()=>{!I||!c.current||Object.keys(B.current).length||(B.current={top:I.style.top||`0`,left:I.style.left||`0`,right:I.style.right,height:I.style.height,bottom:I.style.bottom,minHeight:I.style.minHeight,maxHeight:I.style.maxHeight,marginTop:I.style.marginTop,marginBottom:I.style.marginBottom})},[c,I]),Z(()=>{A||S||(z.current=!1,R.current=!1,_9(I,B.current))},[A,S,I,c]),Z(()=>{let e=c.current;if(!A||!F||!I||!e||S&&!C||s.state.transitionStatus===`ending`)return;if(z.current=!0,e.style.removeProperty(`--transform-origin`),!S){V.request(()=>h(L||e));return}let t=Jme(e);try{let t=p.current;t?.isConnected||(t=!m9.hasSelectedValue(s.state)&&f.current?.isConnected?f.current:null);let n=d.current,r=Mv(I),i=r.getComputedStyle(I),a=r.getComputedStyle(e),o=uy(F),c=x9(F),l=C9(F.getBoundingClientRect(),c),u=C9(I.getBoundingClientRect(),c),m=l.height,g=L||e,y=g.scrollHeight,b=parseFloat(a.borderBottomWidth),x=parseFloat(i.marginTop)||10,S=parseFloat(i.marginBottom)||10,C=parseFloat(i.minHeight)||100,T=y9(a),D=o.documentElement.clientHeight-x-S,O=o.documentElement.clientWidth,k=D-l.bottom+m,A,j=E===`rtl`?l.right-u.width:l.left,M=0;if(t&&n){let e=C9(n.getBoundingClientRect(),c);A=C9(t.getBoundingClientRect(),c),j=u.left+(E===`rtl`?e.right-A.right:e.left-A.left);let r=e.top-l.top+e.height/2;M=A.top-u.top+A.height/2-r}let N=k+M+S+b,P=Math.min(D,N),z=D-x-S,V=N-P,H=O-5;I.style.left=`${dE(j,5,H-u.width)}px`,I.style.height=`${P}px`,I.style.maxHeight=`none`,I.style.marginTop=`${x}px`,I.style.marginBottom=`${S}px`,e.style.height=`100%`;let ee=b9(g),U=V>=ee-1;U&&(P=Math.min(D,u.height)-(V-ee));let te=l.top<20||l.bottom>D-20||Math.ceil(P)+1<Math.min(y,C),ne=(r.visualViewport?.scale??1)!==1&&Qy;if(te||ne){_9(I,B.current),w(!1);return}let re=Math.max(C,P);if(U){let e=Math.max(0,D-N);I.style.top=u.height>=z?`0`:`${e}px`,I.style.height=`${P}px`,g.scrollTop=b9(g)}else I.style.bottom=`0`,g.scrollTop=V;if(A){let t=u.top,n=u.height,r=A.top+A.height/2,i=dE(n>0?(r-t)/n*100:50,0,100);e.style.setProperty(`--transform-origin`,`50% ${i}%`)}(re===D||P>=T)&&(R.current=!0),h(g),v&&s.state.selectedIndex===null&&s.state.activeIndex===null&&_.current[0]!=null&&s.set(`activeIndex`,0)}finally{t()}},[s,A,I,F,d,f,p,c,h,S,w,V,L,_,v,E,C]),W.useEffect(()=>{if(!S||!I||!A)return;let e=Mv(I);function t(e){u(!1,ky(Oy,e))}return Eb(e,`resize`,t)},[u,S,I,A]);let U={...L?{role:`presentation`,"aria-orientation":void 0}:{role:`listbox`,"aria-multiselectable":m||void 0,id:`${k}-list`},onKeyDown(e){T&&hT.has(e.key)&&e.stopPropagation()},onScroll(e){L||H(e.currentTarget)},...S&&{style:L?{height:`100%`}:v9},className:!L&&S?XT.className:void 0},te=nr(`div`,e,{ref:[t,c],state:ee,stateAttributesMapping:Kme,props:[N,U,tD(P),o]});return(0,q.jsxs)(W.Fragment,{children:[!O&&XT.getElement(D),(0,q.jsx)(SS,{context:y,modal:!1,disabled:!M,openInteractionType:j,returnFocus:a,restoreFocus:!0,children:te})]})});function y9(e){let t=e.maxHeight;return t.endsWith(`px`)&&parseFloat(t)||1/0}function b9(e){return fE(e.scrollHeight,e.clientHeight)}function x9(e){return lC.getScale(e)}function S9(e,t,n){return e/n[t]}function C9(e,t){return tx({x:S9(e.x,`x`,t),y:S9(e.y,`y`,t),width:S9(e.width,`x`,t),height:S9(e.height,`y`,t)})}var w9=[[`transform`,`none`],[`scale`,`1`],[`translate`,`0 0`]];function Jme(e){let{style:t}=e,n={};for(let[e,r]of w9)n[e]=t.getPropertyValue(e),t.setProperty(e,r,`important`);return()=>{for(let[e]of w9){let r=n[e];r?t.setProperty(e,r):t.removeProperty(e)}}}var Yme=W.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{store:o,scrollHandlerRef:s,multiple:c}=o9(),{alignItemWithTriggerActive:l}=g9(),u=tw(o,m9.hasScrollArrows),d=tw(o,m9.openMethod),f={id:`${tw(o,m9.id)}-list`,role:`listbox`,"aria-multiselectable":c||void 0,onScroll(e){s.current?.(e.currentTarget)},...l&&{style:v9},className:u&&d!==`touch`?XT.className:void 0};return nr(`div`,e,{ref:[t,o.useStateSetter(`listElement`)],props:[f,a]})}),T9=W.createContext(void 0);function E9(){let e=W.useContext(T9);if(!e)throw Error(Rn(57));return e}var Xme=W.memo(W.forwardRef(function(e,t){let{render:n,className:r,style:i,value:a=null,label:o,disabled:s=!1,nativeButton:c=!1,...l}=e,u=W.useRef(null),d=oA({guess:!0,label:o,textRef:u}),{store:f,itemProps:p,setOpen:m,setValue:h,selectionRef:g,typingRef:_,valuesRef:v,multiple:y,selectedItemTextRef:b,disabled:x,readOnly:S}=o9(),C=x||s,w=tw(f,m9.isActive,d.index),T=tw(f,m9.open),E=tw(f,m9.isSelected,a),D=tw(f,m9.isSelectedByFocus,d.index),O=tw(f,m9.isItemEqualToValue),k=d.index,A=W.useRef(null);Z(()=>{let e=v.current;return e[k]=a,()=>{delete e[k]}},[k,a,v]),Z(()=>{let e=f.state.value,t=e;y&&Array.isArray(e)&&(t=e.length>0?e[e.length-1]:void 0),t!==void 0&&s9(a,t,O)&&(f.set(`selectedIndex`,k),u.current&&(b.current=u.current))},[k,y,O,f,a,b]);let j=W.useRef(`mouse`),M=W.useRef(!1),{getButtonProps:N,buttonRef:P}=fy({disabled:C,focusableWhenDisabled:!0,native:c,composite:!0}),F={disabled:C,selected:E,highlighted:w};function I(e){if(x||S)return;let t=f.state.value;if(y){let n=Array.isArray(t)?t:[],r=E?jme(n,a,O):[...n,a];h(r,ky(by,e))}else h(a,ky(by,e)),m(!1,ky(by,e))}function L(){g.current.dragY=0}let R={role:`option`,"aria-selected":E,tabIndex:T&&w?0:-1,onKeyDown(e){f.set(`activeIndex`,k),e.key===` `&&_.current&&e.preventDefault()},onClick(e){let t=j.current!==`touch`,n=e.nativeEvent.pointerType,r=t&&rb(e.nativeEvent)&&(n!==void 0||w),i=t&&!r&&!M.current;M.current=!1,!(C||i)&&I(e.nativeEvent)},onPointerEnter(e){j.current=e.pointerType},onPointerMove(e){if(e.pointerType===`mouse`&&e.buttons===1){let t=g.current;t.dragY+=e.movementY,t.dragY**2>=64&&(t.allowUnselectedMouseUp=!0)}},onPointerDown(e){j.current=e.pointerType,M.current=!0,L()},onMouseUp(){if(L(),C||j.current===`touch`||M.current)return;let e=!g.current.allowSelectedMouseUp&&E,t=!g.current.allowUnselectedMouseUp&&!E;e||t||(M.current=!0,A.current?.click(),M.current=!1)}},z=nr(`div`,e,{ref:[P,t,d.ref,A],state:F,props:[p,R,l,N]}),B=W.useMemo(()=>({selected:E,index:k,textRef:u,selectedByFocus:D}),[E,k,u,D]);return(0,q.jsx)(T9.Provider,{value:B,children:z})})),Zme=W.forwardRef(function(e,t){let{selected:n}=E9();return e.keepMounted||n?(0,q.jsx)(Qme,{...e,ref:t}):null}),Qme=W.memo(W.forwardRef((e,t)=>{let{render:n,className:r,style:i,keepMounted:a,...o}=e,{selected:s}=E9(),c=W.useRef(null),{transitionStatus:l,setMounted:u}=uw(s),d=nr(`span`,e,{ref:[t,c],state:{selected:s,transitionStatus:l},props:[{"aria-hidden":!0,children:`✔️`},o],stateAttributesMapping:yv});return fw({open:s,ref:c,onComplete(){s||u(!1)}}),d})),$me=W.memo(W.forwardRef(function(e,t){let{index:n,textRef:r,selectedByFocus:i}=E9(),{firstItemTextRef:a,selectedItemTextRef:o}=o9(),{render:s,className:c,style:l,...u}=e;return nr(`div`,e,{ref:[W.useCallback(e=>{e&&(n===0&&(a.current=e),i&&(o.current=e))},[a,o,n,i]),t,r],props:u})})),D9=W.forwardRef(function(e,t){let{render:n,className:r,style:i,direction:a,keepMounted:o,...s}=e,c=a===`up`,{store:l,popupRef:u,listRef:d,handleScrollArrowVisibility:f,scrollArrowsMountedCountRef:p}=o9(),{side:m,scrollDownArrowRef:h,scrollUpArrowRef:g}=g9(),_=tw(l,c?m9.scrollUpArrowVisible:m9.scrollDownArrowVisible),v=tw(l,m9.openMethod),y=_&&v!==`touch`,b=By(),x=c?g:h,{mounted:S,transitionStatus:C,setMounted:w}=uw(y);Z(()=>(p.current+=1,l.set(`hasScrollArrows`,!0),()=>{p.current=Math.max(0,p.current-1),p.current===0&&l.set(`hasScrollArrows`,!1)}),[l,p]),fw({open:y,ref:x,onComplete(){y||w(!1)}});let T=nr(`div`,e,{ref:[t,x],state:{direction:a,visible:y,side:m,transitionStatus:C},props:[{"aria-hidden":!0,children:c?`▲`:`▼`,style:{position:`absolute`},onMouseMove(e){if(e.movementX===0&&e.movementY===0||b.isStarted())return;l.set(`activeIndex`,null);function t(){let e=l.state.listElement??u.current;if(!e)return;l.set(`activeIndex`,null),f(e);let n=fE(e.scrollHeight,e.clientHeight),r=pE(e.scrollTop,n),i=r===(c?0:n),a=d.current;if(r!==e.scrollTop&&(e.scrollTop=r),i){b.clear();return}if(a.length>0){let t=x.current?.offsetHeight||0;e.scrollTop=ehe(a,c,r,e.clientHeight,t,n)}b.start(40,t)}b.start(40,t)},onMouseLeave(){b.clear()}},s],stateAttributesMapping:yv});return S||o?T:null});function ehe(e,t,n,r,i,a){if(t){let t=0,r=n+i-1;for(let n=0;n<e.length;n+=1){let i=e[n];if(i&&i.offsetTop>=r){t=n;break}}let o=Math.max(0,t-1),s=e[o];return o<t&&s?pE(s.offsetTop-i,a):0}let o=e.length-1,s=n+r-i+1;for(let t=0;t<e.length;t+=1){let n=e[t];if(n&&n.offsetTop+n.offsetHeight>s){o=Math.max(0,t-1);break}}let c=Math.min(e.length-1,o+1),l=e[c];return c>o&&l?pE(l.offsetTop+l.offsetHeight-r+i,a):a}var the=W.forwardRef(function(e,t){return(0,q.jsx)(D9,{...e,ref:t,direction:`down`})}),nhe=W.forwardRef(function(e,t){return(0,q.jsx)(D9,{...e,ref:t,direction:`up`})}),O9=Fme;function k9({className:e,size:t=`default`,children:n,...r}){return(0,q.jsxs)(zme,{className:K(`relative inline-flex min-h-9 w-full min-w-36 select-none items-center justify-between gap-2 rounded-lg border border-input bg-background bg-clip-padding px-[calc(--spacing(3)-1px)] text-left text-base shadow-xs outline-none ring-ring/24 transition-shadow before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] not-data-disabled:not-focus-visible:not-aria-invalid:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 focus-visible:border-ring focus-visible:ring-[3px] aria-invalid:border-destructive/36 focus-visible:aria-invalid:border-destructive/64 focus-visible:aria-invalid:ring-destructive/16 data-disabled:pointer-events-none data-disabled:opacity-64 sm:min-h-8 sm:text-sm dark:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border dark:aria-invalid:ring-destructive/24 dark:not-data-disabled:not-focus-visible:not-aria-invalid:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/8%)] [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0 [[data-disabled],:focus-visible,[aria-invalid],[data-pressed]]:shadow-none`,t===`sm`&&`min-h-8 gap-1.5 px-[calc(--spacing(2.5)-1px)] sm:min-h-7`,t===`lg`&&`min-h-10 sm:min-h-9`,e),"data-slot":`select-trigger`,...r,children:[n,(0,q.jsx)(Hme,{"data-slot":`select-icon`,children:(0,q.jsx)(We,{className:`-me-1 size-4.5 opacity-80 sm:size-4`})})]})}function A9({className:e,...t}){return(0,q.jsx)(Vme,{className:K(`flex-1 truncate data-placeholder:text-muted-foreground`,e),"data-slot":`select-value`,...t})}function j9({className:e,children:t,sideOffset:n=4,alignItemWithTrigger:r=!0,zIndex:i,...a}){let o=W.useContext(VE);return(0,q.jsx)(Ume,{children:(0,q.jsx)(Gme,{alignItemWithTrigger:r,className:`select-none`,style:{zIndex:i??o},"data-slot":`select-positioner`,sideOffset:n,children:(0,q.jsxs)(qme,{className:`origin-(--transform-origin) transition-[scale,opacity] has-data-[side=none]:scale-100 has-data-starting-style:scale-98 has-data-starting-style:opacity-0 has-data-[side=none]:transition-none`,"data-slot":`select-popup`,...a,children:[(0,q.jsx)(nhe,{className:`top-0 z-50 flex h-6 w-full cursor-default items-center justify-center before:pointer-events-none before:absolute before:inset-x-px before:top-px before:h-[200%] before:rounded-t-[calc(var(--radius-lg)-1px)] before:bg-linear-to-b before:from-50% before:from-popover`,"data-slot":`select-scroll-up-arrow`,children:(0,q.jsx)(Ue,{className:`relative size-4.5 sm:size-4`})}),(0,q.jsx)(`span`,{className:`relative block h-full rounded-lg border bg-popover bg-clip-padding before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] before:shadow-lg dark:not-in-data-[slot=group]:bg-clip-border`,children:(0,q.jsx)(Yme,{className:K(`max-h-(--available-height) min-w-(--anchor-width) overflow-y-auto p-1`,e),"data-slot":`select-list`,children:t})}),(0,q.jsx)(the,{className:`bottom-0 z-50 flex h-6 w-full cursor-default items-center justify-center before:pointer-events-none before:absolute before:inset-x-px before:bottom-px before:h-[200%] before:rounded-b-[calc(var(--radius-lg)-1px)] before:bg-linear-to-t before:from-50% before:from-popover`,"data-slot":`select-scroll-down-arrow`,children:(0,q.jsx)(Be,{className:`relative size-4.5 sm:size-4`})})]})})})}function M9({className:e,children:t,...n}){return(0,q.jsxs)(Xme,{className:K(`grid min-h-8 in-data-[side=none]:min-w-[calc(var(--anchor-width)+1.25rem)] cursor-default grid-cols-[1rem_1fr] items-center gap-2 rounded-sm py-1 ps-2 pe-4 text-base outline-none data-disabled:pointer-events-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-disabled:opacity-64 sm:min-h-7 sm:text-sm [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,e),"data-slot":`select-item`,...n,children:[(0,q.jsx)(Zme,{className:`col-start-1`,children:(0,q.jsx)(`svg`,{"aria-hidden":`true`,fill:`none`,height:`24`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,viewBox:`0 0 24 24`,width:`24`,xmlns:`http://www.w3.org/1500/svg`,children:(0,q.jsx)(`path`,{d:`M5.252 12.7 10.2 18.63 18.748 5.37`})})}),(0,q.jsx)($me,{className:`col-start-2 min-w-0`,children:t})]})}function rhe(e,t,n){return e.find(e=>e.id===t)?.id??e.find(e=>e.id===n)?.id??e[0]?.id??``}var N9={supervised:`受监督(每步确认)`,"auto-edits":`自动接受编辑`,full:`完全放行`,assistant:`助手代审`},P9={minimal:`极低`,low:`低`,medium:`中`,high:`高`,xhigh:`极高`,max:`最高`};function ihe({projects:e,providers:t,open:n,preferredProjectId:r,onClose:i,onCreate:a}){let[o,s]=(0,W.useState)(null),[c,l]=(0,W.useState)(null),[u,d]=(0,W.useState)(null),[f,p]=(0,W.useState)(`full`),[m,h]=(0,W.useState)(!1),[g,_]=(0,W.useState)(`medium`),[v,y]=(0,W.useState)(n);n!==v&&(y(n),n&&s(null));let b=rhe(e,o,r),x=t.find(e=>e.id===c)??t[0]??{id:``,models:[]},S=x.id,C=x.models.find(e=>e.id===u)?.id??x.models[0]?.id??``,w=!!(b&&S&&C);return(0,q.jsx)(X7,{open:n,onOpenChange:e=>!e&&i(),children:(0,q.jsxs)(Z7,{side:`bottom`,className:`pb-safe`,children:[(0,q.jsx)(Q7,{children:(0,q.jsx)($7,{children:`新建会话`})}),(0,q.jsxs)(`div`,{className:`space-y-4 p-4 pt-0`,children:[(0,q.jsx)(F9,{label:`项目`,children:(0,q.jsxs)(O9,{items:e.map(e=>({value:e.id,label:ge(e)})),value:b,onValueChange:e=>s(e),children:[(0,q.jsx)(k9,{className:`w-full`,children:(0,q.jsx)(A9,{})}),(0,q.jsx)(j9,{zIndex:BE.DROPDOWN_IN_MODAL,children:e.map(e=>(0,q.jsx)(M9,{value:e.id,children:ge(e)},e.id))})]})}),(0,q.jsx)(F9,{label:`模型服务`,children:(0,q.jsxs)(O9,{items:t.map(e=>({value:e.id,label:e.name})),value:S,onValueChange:e=>{l(e),d(null)},children:[(0,q.jsx)(k9,{className:`w-full`,children:(0,q.jsx)(A9,{})}),(0,q.jsx)(j9,{zIndex:BE.DROPDOWN_IN_MODAL,children:t.map(e=>(0,q.jsx)(M9,{value:e.id,children:e.name},e.id))})]})}),(0,q.jsx)(F9,{label:`模型`,children:(0,q.jsxs)(O9,{items:x.models.map(e=>({value:e.id,label:e.label??e.id})),value:C,onValueChange:e=>d(e),children:[(0,q.jsx)(k9,{className:`w-full`,children:(0,q.jsx)(A9,{})}),(0,q.jsx)(j9,{zIndex:BE.DROPDOWN_IN_MODAL,children:x.models.map(e=>(0,q.jsx)(M9,{value:e.id,children:e.label??e.id},e.id))})]})}),(0,q.jsx)(F9,{label:`审批模式`,children:(0,q.jsxs)(O9,{items:Object.keys(N9).map(e=>({value:e,label:N9[e]})),value:f,onValueChange:e=>p(e),children:[(0,q.jsx)(k9,{className:`w-full`,children:(0,q.jsx)(A9,{})}),(0,q.jsx)(j9,{zIndex:BE.DROPDOWN_IN_MODAL,children:Object.keys(N9).map(e=>(0,q.jsx)(M9,{value:e,children:N9[e]},e))})]})}),(0,q.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,q.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:`推理`}),(0,q.jsx)(fj,{checked:m,onCheckedChange:h})]}),m&&(0,q.jsx)(F9,{label:`推理档位`,children:(0,q.jsxs)(O9,{items:Object.keys(P9).map(e=>({value:e,label:P9[e]})),value:g,onValueChange:e=>_(e),children:[(0,q.jsx)(k9,{className:`w-full`,children:(0,q.jsx)(A9,{})}),(0,q.jsx)(j9,{zIndex:BE.DROPDOWN_IN_MODAL,children:Object.keys(P9).map(e=>(0,q.jsx)(M9,{value:e,children:P9[e]},e))})]})}),e.length===0&&(0,q.jsx)(`p`,{className:`text-destructive text-xs`,children:`桌面端还没有项目,请先在桌面添加。`}),e.length>0&&t.length===0&&(0,q.jsx)(`p`,{className:`text-destructive text-xs`,children:`桌面端没有可用的模型服务。`}),(0,q.jsxs)(`div`,{className:`flex justify-end gap-2 pt-1`,children:[(0,q.jsx)(Ui,{variant:`outline`,onClick:i,children:`取消`}),(0,q.jsx)(Ui,{disabled:!w,onClick:()=>a({projectId:b,providerId:S,modelId:C,approvalMode:f,...m?{reasoningEnabled:m,thinkingLevel:g}:{}}),children:`创建`})]})]})]})})}function F9({label:e,children:t}){return(0,q.jsxs)(`label`,{className:`flex flex-col gap-1.5`,children:[(0,q.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:e}),t]})}var ahe={pending:`待发送`,sending:`发送中…`,failed:`发送失败`};function ohe({items:e,readOnly:t,onRetry:n,onDiscard:r}){return e.length===0?null:(0,q.jsx)(`div`,{className:`mb-1 space-y-1`,children:e.map(e=>(0,q.jsxs)(`div`,{className:K(`flex flex-wrap items-center gap-2 rounded-xl border px-2.5 py-1.5 text-xs`,e.status===`failed`?`border-destructive/40 bg-destructive/5`:`bg-muted/40`),children:[(0,q.jsx)(`span`,{className:K(`min-w-0 flex-1`,e.status===`failed`?`whitespace-pre-wrap break-words select-text`:`truncate`),children:e.text||(e.images?.length?`[${e.images.length} 张图片]`:``)}),(0,q.jsxs)(`span`,{className:K(`min-w-0 break-words`,e.status===`failed`?`text-destructive`:`text-muted-foreground`),children:[e.error?.startsWith(`outbox-discard`)?`移除消息`:e.error===`delivery-unconfirmed`?`结果未确认`:ahe[e.status],e.status===`failed`&&e.error?`:${Qpe(e.error)}`:``]}),e.status===`failed`&&!e.error?.startsWith(`outbox-discard`)&&!t&&(0,q.jsx)(`button`,{type:`button`,"aria-label":`重试`,onClick:()=>n(e.deliveryId),className:`shrink-0 rounded p-0.5 text-foreground hover:bg-accent`,children:(0,q.jsx)(Jt,{className:`h-3.5 w-3.5`})}),e.status!==`sending`&&(0,q.jsx)(`button`,{type:`button`,"aria-label":`删除`,disabled:e.error===`outbox-discarding`,onClick:()=>r(e.deliveryId),className:`shrink-0 rounded p-0.5 text-muted-foreground hover:bg-accent`,children:(0,q.jsx)(yn,{className:`h-3.5 w-3.5`})})]},e.deliveryId))})}function she(){let e=globalThis.BarcodeDetector;if(!e)return null;let t=new e({formats:[`qr_code`]});return{async scan(e){return(await t.detect(e))[0]?.rawValue??null}}}async function che(){let{default:t}=await Y(async()=>{let{default:t}=await import(`./jsQR-B1eQcpQl.js`).then(t=>e(t.default,1));return{default:t}},__vite__mapDeps([144,1])),n=document.createElement(`canvas`),r=n.getContext(`2d`,{willReadFrequently:!0});return{async scan(e){if(!r||!e.videoWidth)return null;let i=Math.min(1,640/Math.max(e.videoWidth,e.videoHeight));n.width=Math.round(e.videoWidth*i),n.height=Math.round(e.videoHeight*i),r.drawImage(e,0,0,n.width,n.height);let{data:a,width:o,height:s}=r.getImageData(0,0,n.width,n.height);return t(a,o,s,{inversionAttempts:`dontInvert`})?.data??null}}}async function lhe(){return she()??await che()}function uhe(e){try{return U(e),!0}catch{return!1}}function dhe({onPaired:e,autoInvite:t,onCancel:n}){let[r,i]=(0,W.useState)(``),[a,o]=(0,W.useState)(!1),[s,c]=(0,W.useState)(null),[l,u]=(0,W.useState)(!1),d=(0,W.useRef)(null),f=(0,W.useRef)(null),p=()=>{for(let e of f.current?.getTracks()??[])e.stop();f.current=null,u(!1)},m=async t=>{o(!0),c(null);try{let n=U(t),r=/iPhone|iPad|Android/i.exec(navigator.userAgent)?.[0]??`Phone`,i=await N(n.relay,n.publicKey,r);e({pairId:i.pairId,token:i.deviceToken,contentKey:btoa(String.fromCharCode(...i.contentKey)).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``),deviceName:r,relayUrl:n.relay,pairedAt:Date.now()})}catch(e){c(e instanceof Error?e.message:String(e))}finally{o(!1)}},h=(0,W.useRef)(!1);(0,W.useEffect)(()=>{!t||h.current||(h.current=!0,m(t))},[t]);let g=(0,W.useRef)(()=>{});g.current=e=>{p(),m(e)};let _=async()=>{c(null);try{f.current=await navigator.mediaDevices.getUserMedia({video:{facingMode:`environment`}}),u(!0)}catch(e){c(window.isSecureContext?e instanceof DOMException&&e.name===`NotAllowedError`?`摄像头权限被拒绝,请在浏览器设置中允许后重试`:`无法访问摄像头,请粘贴配对码`:`扫码需要 HTTPS 环境,请改用粘贴配对码`),u(!1)}};return(0,W.useEffect)(()=>{if(!l)return;let e=d.current,t=f.current;if(!e||!t)return;let n=!1,r=0;return e.srcObject=t,e.muted=!0,(async()=>{try{await e.play();let t=await lhe(),i=async()=>{if(!(n||!f.current)){try{let n=await t.scan(e);if(n&&uhe(n)){g.current(n);return}}catch{}r=requestAnimationFrame(()=>void i())}};await i()}catch{n||c(`无法开始预览,请粘贴配对码`)}})(),()=>{n=!0,cancelAnimationFrame(r)}},[l]),(0,q.jsxs)(`div`,{className:`flex h-full flex-col items-center justify-center gap-5 px-6 pt-safe pb-safe`,children:[(0,q.jsxs)(`div`,{className:`flex flex-col items-center gap-1.5 text-center`,children:[(0,q.jsx)(`span`,{className:`mb-2 flex size-11 items-center justify-center rounded-[13px] border border-brand/20 bg-brand/8 text-brand dark:bg-brand/14`,children:(0,q.jsx)(xj,{className:`size-6`})}),(0,q.jsx)(`h1`,{className:`font-medium text-lg`,children:`连接到 EnsoCode`}),(0,q.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`在桌面端「设置 → 手机」生成配对码,扫码或粘贴。`})]}),l?(0,q.jsxs)(`div`,{className:`w-full max-w-sm space-y-2`,children:[(0,q.jsx)(`video`,{ref:d,playsInline:!0,muted:!0,className:`aspect-square w-full rounded-lg bg-black object-cover`}),(0,q.jsx)(Ui,{variant:`outline`,className:`w-full`,onClick:p,children:`取消扫码`})]}):(0,q.jsxs)(Ui,{className:`w-full max-w-sm`,onClick:()=>void _(),children:[(0,q.jsx)(Re,{className:`mr-1.5 h-4 w-4`}),`扫描二维码`]}),(0,q.jsxs)(`div`,{className:`flex w-full max-w-sm items-center gap-2`,children:[(0,q.jsx)(Y7,{value:r,onChange:e=>i(e.target.value),placeholder:`enso://pair?relay=…`,autoCapitalize:`off`,autoCorrect:`off`,spellCheck:!1,className:`font-mono text-xs`}),(0,q.jsx)(Ui,{variant:`outline`,className:`shrink-0`,disabled:a||!r.trim(),onClick:()=>void m(r.trim()),children:a?(0,q.jsx)(Ct,{className:`h-4 w-4 animate-spin`}):`配对`})]}),s&&(0,q.jsx)(`p`,{className:`max-w-sm text-center text-destructive text-xs`,children:s}),n&&(0,q.jsx)(Ui,{variant:`ghost`,className:`w-full max-w-sm`,onClick:n,children:`返回`})]})}var I9={minimal:`极低`,low:`低`,medium:`中`,high:`高`,xhigh:`极高`,max:`最高`};function fhe({providers:e,config:t,open:n,onClose:r,onSetModel:i,onSetReasoning:a,onSetThinking:o}){let s=e.find(e=>e.id===t.providerId),c=t.reasoningEnabled??!1,l=t.thinkingLevel??`medium`;return(0,q.jsx)(X7,{open:n,onOpenChange:e=>!e&&r(),children:(0,q.jsxs)(Z7,{side:`bottom`,className:`pb-safe`,children:[(0,q.jsx)(Q7,{children:(0,q.jsx)($7,{children:`会话设置`})}),(0,q.jsxs)(`div`,{className:`space-y-4 p-4 pt-0`,children:[(0,q.jsx)(L9,{label:`模型服务`,children:(0,q.jsxs)(O9,{items:e.map(e=>({value:e.id,label:e.name})),value:t.providerId??``,onValueChange:t=>{let n=e.find(e=>e.id===t),r=n?.models[0]?.id;n&&r&&i(n.id,r)},children:[(0,q.jsx)(k9,{className:`w-full`,children:(0,q.jsx)(A9,{})}),(0,q.jsx)(j9,{zIndex:BE.DROPDOWN_IN_MODAL,children:e.map(e=>(0,q.jsx)(M9,{value:e.id,children:e.name},e.id))})]})}),(0,q.jsx)(L9,{label:`模型`,children:(0,q.jsxs)(O9,{items:(s?.models??[]).map(e=>({value:e.id,label:e.label??e.id})),value:t.modelId??``,onValueChange:e=>{t.providerId&&i(t.providerId,e)},children:[(0,q.jsx)(k9,{className:`w-full`,children:(0,q.jsx)(A9,{})}),(0,q.jsx)(j9,{zIndex:BE.DROPDOWN_IN_MODAL,children:(s?.models??[]).map(e=>(0,q.jsx)(M9,{value:e.id,children:e.label??e.id},e.id))})]})}),(0,q.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,q.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:`推理`}),(0,q.jsx)(fj,{checked:c,onCheckedChange:a})]}),c&&(0,q.jsx)(L9,{label:`推理档位`,children:(0,q.jsxs)(O9,{items:Object.keys(I9).map(e=>({value:e,label:I9[e]})),value:l,onValueChange:e=>o(e),children:[(0,q.jsx)(k9,{className:`w-full`,children:(0,q.jsx)(A9,{})}),(0,q.jsx)(j9,{zIndex:BE.DROPDOWN_IN_MODAL,children:Object.keys(I9).map(e=>(0,q.jsx)(M9,{value:e,children:I9[e]},e))})]})}),(0,q.jsx)(`p`,{className:`text-[11px] text-muted-foreground`,children:`模型切换对运行中的会话在下次启动时生效;推理档位即时生效。`})]})]})})}function L9({label:e,children:t}){return(0,q.jsxs)(`label`,{className:`flex flex-col gap-1.5`,children:[(0,q.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:e}),t]})}function phe(e){return e.status===`failed`&&!e.spawning?`failed`:(e.pendingAskCount??0)>0?`waiting`:e.status===`running`||e.spawning||e.hasRunningChild?`running`:e.unread?`unread`:`idle`}function R9(e){return[...e].sort((e,t)=>(t.updatedAt??0)-(e.updatedAt??0))}function z9(e){let t=e=>(e.pendingAskCount??0)>0||(e.pendingApprovalCount??0)>0;return[...e.filter(t),...e.filter(e=>!t(e))]}function mhe(e,t){let n=R9(e),r=new Map(n.map(e=>[e.id,e])),i=[];for(let e of t){let t=r.get(e);t&&(i.push(t),r.delete(e))}return[...i,...z9([...r.values()])]}function B9(e){return z9([...R9(e.filter(e=>e.pinned)),...R9(e.filter(e=>!e.pinned))])}function hhe(e,t){return phe({status:e.status,unread:e.unread,pendingAskCount:e.pendingAskCount,hasRunningChild:t})!==`idle`}var V9=`__all__`,H9=`__ungrouped__`;function U9(e){return new Set(e.map(e=>e.id))}function W9(e,t){return t.includes(e)}function ghe(e,t){let n=e.groupId;return!n||!U9(t).has(n)}function _he(e,t,n,r){let i=e.filter(e=>!W9(e.id,n));return r===`__all__`||r===`__recent__`?i:r===`__ungrouped__`?i.filter(e=>ghe(e,t)):i.filter(e=>e.groupId===r)}function vhe(e,t,n){let r=e.filter(e=>!W9(e.id,n)),i=[...t].sort((e,t)=>e.order-t.order),a=U9(t),o=i.map(e=>({groupId:e.id,group:e,projects:r.filter(t=>t.groupId===e.id)})),s=r.filter(e=>!e.groupId||!a.has(e.groupId));return s.length>0&&o.push({groupId:H9,projects:s}),o}function G9(e,t){return e<=0?0:Math.min(e,5+Math.max(0,t))}function yhe(e,t){return G9(e,t)>=e?0:Math.min(Math.max(0,e-5),t+15)}function bhe(e){return Math.max(0,e-15)}var xhe=[{value:`auto`,label:`跟随桌面`},{value:`light`,label:`浅`},{value:`dark`,label:`深`}],She={unsupported:`当前浏览器不支持推送。`,"permission-denied":`通知权限被拒绝,请在浏览器站点设置中允许后重试。`,"service-unreachable":`无法连接 Google 推送服务(FCM),请检查网络或代理后重试。`,"subscribe-failed":`订阅失败,请稍后重试。`};function Che({open:e,docked:t=!1,pinnable:n=!1,onTogglePinned:i,projects:a,groups:o=[],catalog:s,pinnedOrder:c=[],activeId:l,canCreate:u,devices:d,activeDevicePairId:f,remoteDesktop:p,connected:m,connectionLabel:g,pushEnabled:_,pushBusy:v,pushError:y,pushAvailability:b,pushConfigReady:x,onTogglePush:S,onClose:C,onSelect:w,onNewConversation:T,onSwitchDevice:E,onAddDevice:D,onRenameDevice:O,onUnpairDevice:k,botSegment:A}){let j=A?.active===!0,[M,N]=(0,W.useState)({}),[F,L]=(0,W.useState)({}),[R,z]=(0,W.useState)(!1),[B,V]=(0,W.useState)(null),H=p?d.find(e=>e.pairId===f&&e.scope!==`read`):void 0,[ee,U]=(0,W.useState)(h),[te,ne]=(0,W.useState)(()=>{try{return localStorage.getItem(`enso-phone-selected-project-group`)??`__all__`}catch{return V9}}),[re,ie]=(0,W.useState)({}),ae=te===`__all__`||te===`__ungrouped__`||o.some(e=>e.id===te)?te:V9;(0,W.useEffect)(()=>P(()=>U(h())),[]),(0,W.useEffect)(()=>{e||V(null)},[e]);let[oe,se]=(0,W.useState)(()=>Date.now());(0,W.useEffect)(()=>{if(!e)return;se(Date.now());let t=setInterval(()=>se(Date.now()),6e4);return()=>clearInterval(t)},[e]);let ce=new Set(a.filter(e=>e.archived).map(e=>e.id)),le=[...ce],ue=e=>e.archived||ce.has(e.projectId),de=_he(a,o,le,ae),fe=vhe(a,o,le),pe=new Set(de.map(e=>e.id)),ge=s.filter(e=>!e.parentId),_e=e=>!e.projectId||pe.has(e.projectId),ve=e=>s.some(t=>t.parentId===e&&t.status===`running`),ye=R9(ge.filter(e=>!ue(e)&&_e(e)&&hhe(e,ve(e.id)))),be=mhe(ge.filter(e=>e.pinned&&!ue(e)&&_e(e)),c),xe=R9(ge.filter(e=>{if(!ue(e))return!1;if(ae===`__all__`)return!0;let t=a.find(t=>t.id===e.projectId);return t?ae===`__ungrouped__`?!t.groupId||!o.some(e=>e.id===t.groupId):t.groupId===ae:ae===H9})),Se=ge.filter(e=>!ue(e)),Ce=new Set(a.map(e=>e.id)),we=B9(Se.filter(e=>!Ce.has(e.projectId)));return(0,q.jsxs)(q.Fragment,{children:[!t&&(0,q.jsx)(`button`,{type:`button`,"aria-label":`关闭侧栏`,onClick:C,className:K(`fixed inset-0 z-40 bg-black/40 transition-[opacity,visibility] duration-200`,e?`visible opacity-100`:`invisible pointer-events-none opacity-0`)}),(0,q.jsxs)(`aside`,{className:K(`flex shrink-0 flex-col border-r bg-background`,t?`relative h-full w-72`:K(`fixed inset-y-0 left-0 z-50 w-[82vw] max-w-xs transition-transform duration-200`,e?`translate-x-0`:`-translate-x-full`)),children:[(0,q.jsxs)(`div`,{className:K(`flex h-12 shrink-0 items-center justify-between px-3 pt-safe`,o.length===0&&`border-b`),children:[A?(0,q.jsx)(`span`,{className:`flex rounded-lg bg-muted p-0.5 text-sm`,children:[`项目`,`Bot`].map(e=>{let t=e===`Bot`===A.active;return(0,q.jsx)(`button`,{type:`button`,"aria-pressed":t,onClick:()=>A.onChange(e===`Bot`),className:K(`rounded-md px-3 py-0.5 transition-colors`,t?`bg-background font-medium shadow-xs`:`text-muted-foreground`),children:e},e)})}):(0,q.jsx)(`span`,{className:`font-medium text-sm`,children:`项目`}),t?n&&i?(0,q.jsx)(`button`,{type:`button`,onClick:i,"aria-label":`收起侧栏`,className:`rounded-md p-1 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground`,children:(0,q.jsx)(Ft,{className:`h-4 w-4`})}):null:(0,q.jsxs)(`span`,{className:`flex items-center`,children:[n&&i&&(0,q.jsx)(`button`,{type:`button`,onClick:i,"aria-label":`固定侧栏`,className:`rounded-md p-1 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground`,children:(0,q.jsx)(It,{className:`h-4 w-4`})}),(0,q.jsx)(`button`,{type:`button`,onClick:C,"aria-label":`关闭侧栏`,className:`rounded-md p-1 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground`,children:(0,q.jsx)(yn,{className:`h-4 w-4`})})]})]}),!j&&o.length>0&&(0,q.jsx)(`div`,{className:`shrink-0 border-b px-3 pb-2`,children:(0,q.jsxs)(O9,{items:[{value:`__all__`,label:`全部`},...o.slice().sort((e,t)=>e.order-t.order).map(e=>({value:e.id,label:`${e.emoji?`${e.emoji} `:``}${e.name}`})),{value:`__ungrouped__`,label:`未分组`}],value:ae,onValueChange:e=>{if(e){ne(e);try{localStorage.setItem(`enso-phone-selected-project-group`,e)}catch{}}},children:[(0,q.jsx)(k9,{className:`w-full`,size:`sm`,children:(0,q.jsx)(A9,{})}),(0,q.jsxs)(j9,{zIndex:BE.DROPDOWN_IN_MODAL,children:[(0,q.jsx)(M9,{value:`__all__`,children:`全部`}),o.slice().sort((e,t)=>e.order-t.order).map(e=>(0,q.jsxs)(M9,{value:e.id,children:[e.emoji?`${e.emoji} `:``,e.name]},e.id)),(0,q.jsx)(M9,{value:`__ungrouped__`,children:`未分组`})]})]})}),j?A?.panel:(0,q.jsxs)(`div`,{className:`min-h-0 flex-1 space-y-2 overflow-y-auto p-2`,children:[a.length===0&&(0,q.jsx)(`p`,{className:`rounded-lg border border-dashed px-3 py-6 text-center text-muted-foreground text-sm`,children:`桌面端还没有项目`}),ye.length>0&&(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`div`,{className:`flex items-center gap-1.5 px-2 py-2`,children:(0,q.jsx)(`span`,{className:`font-medium text-sm`,children:`活跃中`})}),(0,q.jsx)(`div`,{className:`flex flex-col gap-y-0.5`,children:ye.map(e=>(0,q.jsx)(K9,{session:e,active:l===e.id,nowTick:oe,onSelect:w},e.id))})]}),be.length>0&&(0,q.jsxs)(`div`,{children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-1.5 px-2 py-2`,children:[(0,q.jsx)(Bt,{className:`h-3.5 w-3.5 text-muted-foreground`}),(0,q.jsx)(`span`,{className:`font-medium text-sm`,children:`置顶`})]}),(0,q.jsx)(`div`,{className:`flex flex-col gap-y-0.5`,children:be.map(e=>(0,q.jsx)(K9,{session:e,active:l===e.id,nowTick:oe,onSelect:w},e.id))})]}),(ae===`__all__`&&o.length>0?fe.flatMap(e=>{let t=re[e.groupId]===!0;return[{kind:`header`,section:e,folded:t},...t?[]:e.projects.map(e=>({kind:`project`,project:e}))]}):de.map(e=>({kind:`project`,project:e}))).map(e=>e.kind===`header`?(0,q.jsxs)(`button`,{type:`button`,onClick:()=>ie(t=>({...t,[e.section.groupId]:!t[e.section.groupId]})),className:`flex h-7 w-full items-center gap-1 rounded-md px-2 text-left text-xs font-medium text-muted-foreground`,children:[(0,q.jsx)(Ve,{className:K(`h-3.5 w-3.5 shrink-0 transition-transform duration-150`,!e.folded&&`rotate-90`)}),e.section.group?.emoji&&(0,q.jsx)(`span`,{className:`shrink-0 text-sm`,children:e.section.group.emoji}),e.section.group?.color&&(0,q.jsx)(`span`,{className:`h-2 w-2 shrink-0 rounded-full`,style:{backgroundColor:e.section.group.color}}),(0,q.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.section.group?.name??`未分组`}),(0,q.jsx)(`span`,{className:`shrink-0 text-[10px] text-muted-foreground/70`,children:e.section.projects.length})]},`hdr-${e.section.groupId}`):(0,q.jsx)(q9,{name:he(e.project),badge:me(e.project),sessions:B9(Se.filter(t=>t.projectId===e.project.id)),folded:M[e.project.id]===!0,revealedExtra:F[e.project.id]??0,activeId:l,nowTick:oe,canCreate:u,onToggleFold:()=>N(t=>({...t,[e.project.id]:!t[e.project.id]})),onRevealMore:t=>L(n=>({...n,[e.project.id]:t})),onSelect:w,onNew:()=>T(e.project.id)},e.project.id)),we.length>0&&(0,q.jsx)(q9,{name:`其他`,sessions:we,folded:M.__orphan===!0,revealedExtra:F.__orphan??0,activeId:l,nowTick:oe,canCreate:!1,onToggleFold:()=>N(e=>({...e,__orphan:!e.__orphan})),onRevealMore:e=>L(t=>({...t,__orphan:e})),onSelect:w})]}),!j&&xe.length>0&&(0,q.jsxs)(`div`,{className:`shrink-0 border-t p-2`,children:[R&&(0,q.jsx)(`div`,{className:`mb-0.5 flex max-h-64 flex-col gap-y-0.5 overflow-y-auto`,children:xe.map(e=>(0,q.jsx)(K9,{session:e,active:l===e.id,nowTick:oe,subtitle:(()=>{let t=a.find(t=>t.id===e.projectId);return t?he(t):void 0})(),onSelect:w},e.id))}),(0,q.jsxs)(`button`,{type:`button`,onClick:()=>z(e=>!e),className:`flex w-full items-center gap-1 rounded-lg px-2 py-2 text-left transition-colors hover:bg-muted/60`,children:[(0,q.jsx)(`span`,{className:`flex h-5 w-5 shrink-0 items-center justify-center`,children:(0,q.jsx)(Ve,{className:K(`h-3.5 w-3.5 text-muted-foreground transition-transform duration-200`,R?`-rotate-90`:`rotate-0`)})}),(0,q.jsx)(ke,{className:`h-3.5 w-3.5 shrink-0 text-muted-foreground`}),(0,q.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-muted-foreground text-sm`,children:`已归档`}),(0,q.jsx)(`span`,{className:`shrink-0 text-[10px] text-muted-foreground tabular-nums`,children:xe.length})]})]}),(0,q.jsxs)(`div`,{className:`shrink-0 space-y-1 border-t p-2 pb-safe`,children:[!B&&(0,q.jsxs)(`div`,{className:`flex items-center gap-2 px-2 py-1.5`,children:[(0,q.jsx)(Pt,{className:`h-4 w-4 shrink-0 text-muted-foreground`}),(0,q.jsx)(`span`,{className:`min-w-0 flex-1 text-muted-foreground text-sm`,children:`主题`}),(0,q.jsx)(`div`,{className:`flex shrink-0 gap-0.5 rounded-md border p-0.5`,children:xhe.map(e=>(0,q.jsx)(`button`,{type:`button`,onClick:()=>r(e.value),className:K(`rounded px-2 py-1 text-[11px] transition-colors`,ee===e.value?`bg-primary text-primary-foreground`:`text-muted-foreground hover:bg-accent`),children:e.label},e.value))})]}),!B&&H&&(0,q.jsxs)(`div`,{className:`flex items-center gap-2 px-2 py-1.5`,children:[(0,q.jsx)(Mt,{className:`h-4 w-4 shrink-0 text-muted-foreground`}),(0,q.jsx)(`span`,{className:`min-w-0 flex-1 text-muted-foreground text-sm`,children:`界面`}),(0,q.jsxs)(`div`,{className:`flex shrink-0 gap-0.5 rounded-md border p-0.5`,children:[(0,q.jsx)(`span`,{className:`rounded bg-primary px-2 py-1 text-[11px] text-primary-foreground`,children:`精简`}),(0,q.jsx)(`button`,{type:`button`,onClick:()=>{window.location.href=I(H.pairId)},className:`rounded px-2 py-1 text-[11px] text-muted-foreground transition-colors hover:bg-accent`,children:`完整`})]})]}),!B&&(0,q.jsxs)(`div`,{className:`px-2 py-1.5`,children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,q.jsx)(Pe,{className:`h-4 w-4 shrink-0 text-muted-foreground`}),(0,q.jsx)(`span`,{className:`min-w-0 flex-1 text-muted-foreground text-sm`,children:`推送通知`}),(0,q.jsx)(fj,{checked:_,disabled:v||b!==`ok`||!m||!x,onCheckedChange:S})]}),v&&(0,q.jsx)(`p`,{className:`mt-1 pl-6 text-[11px] text-muted-foreground`,children:`正在开启…`}),y&&!v&&(0,q.jsx)(`p`,{className:`mt-1 pl-6 text-[11px] text-destructive`,children:She[y]}),b===`ok`&&m&&!x&&(0,q.jsx)(`p`,{className:`mt-1 pl-6 text-[11px] text-muted-foreground`,children:`需先升级桌面端 EnsoCode 才能开启推送。`}),b===`needs-install`&&(0,q.jsx)(`p`,{className:`mt-1 pl-6 text-[11px] text-muted-foreground`,children:`iOS 需先用分享菜单「添加到主屏幕」,从主屏幕打开后才能开启。`}),b===`unsupported`&&(0,q.jsx)(`p`,{className:`mt-1 pl-6 text-[11px] text-muted-foreground`,children:`当前浏览器不支持推送。`})]}),(0,q.jsxs)(`div`,{className:`space-y-0.5`,children:[d.map(e=>{let t=e.pairId===f;return B===e.pairId?(0,q.jsxs)(`div`,{className:`space-y-2 rounded-lg border border-dashed p-3`,children:[(0,q.jsxs)(`p`,{className:`text-xs`,children:[`解绑「`,e.label,`」后需重新扫码才能连接,确定吗?`]}),(0,q.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,q.jsx)(Ui,{variant:`outline`,size:`sm`,onClick:()=>V(null),children:`取消`}),(0,q.jsx)(Ui,{variant:`destructive`,size:`sm`,onClick:()=>{V(null),k(e.pairId)},children:`确定解绑`})]})]},e.pairId):(0,q.jsxs)(`div`,{className:`flex items-center gap-0.5`,children:[(0,q.jsxs)(`button`,{type:`button`,onClick:()=>E(e.pairId),className:K(`flex min-w-0 flex-1 items-center gap-2 rounded-lg px-2 py-2 text-left text-sm transition-colors hover:bg-muted/60`,t?`text-foreground`:`text-muted-foreground`),children:[(0,q.jsx)(bt,{className:`h-4 w-4 shrink-0`}),(0,q.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.label}),t&&(0,q.jsx)(`span`,{className:K(`shrink-0 text-[10px]`,m?`text-muted-foreground`:`text-destructive`),children:g})]}),(0,q.jsx)(`button`,{type:`button`,"aria-label":`重命名 ${e.label}`,onClick:()=>{let t=window.prompt(`给这台电脑起个名:`,e.label);t?.trim()&&O(e.pairId,t)},className:`flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-muted-foreground/60 transition-colors hover:bg-accent hover:text-foreground`,children:(0,q.jsx)(zt,{className:`h-3.5 w-3.5`})}),(0,q.jsx)(`button`,{type:`button`,"aria-label":`解绑 ${e.label}`,onClick:()=>V(e.pairId),className:`flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-muted-foreground/60 transition-colors hover:bg-accent hover:text-destructive`,children:(0,q.jsx)(mn,{className:`h-3.5 w-3.5`})})]},e.pairId)}),(0,q.jsxs)(`button`,{type:`button`,onClick:D,className:`flex w-full items-center gap-2 rounded-lg px-2 py-2 text-left text-muted-foreground text-sm transition-colors hover:bg-muted/60 hover:text-foreground`,children:[(0,q.jsx)(Ut,{className:`h-4 w-4 shrink-0`}),(0,q.jsx)(`span`,{children:`配对新电脑`})]})]}),(0,q.jsxs)(`p`,{className:`px-2 pt-0.5 text-center text-[10px] text-muted-foreground/60`,children:[`版本 `,`c221f69`]})]})]})]})}function K9({session:e,active:t,nowTick:n,subtitle:r,onSelect:i}){return(0,q.jsxs)(`button`,{type:`button`,onClick:()=>i(e.id),className:K(`flex w-full items-center gap-2 rounded-lg py-2 pr-2 pl-4 text-left text-sm transition-colors`,t?`bg-brand/10 dark:bg-brand/15`:`hover:bg-muted/60`),children:[(0,q.jsx)(whe,{status:e.status,unread:e.unread}),e.pinned&&(0,q.jsx)(Bt,{className:`h-3 w-3 shrink-0 text-muted-foreground`,"aria-hidden":!0}),(0,q.jsxs)(`span`,{className:`min-w-0 flex-1 truncate`,children:[e.title||`新对话`,r&&(0,q.jsx)(`span`,{className:`ml-1.5 text-[10px] text-muted-foreground`,children:r})]}),e.updatedAt&&(0,q.jsx)(`span`,{className:`shrink-0 text-[10px] text-muted-foreground/80 tabular-nums`,children:e9(e.updatedAt,`zh`,n)})]})}function q9({name:e,badge:t,sessions:n,folded:r,revealedExtra:i,activeId:a,nowTick:o,canCreate:s,onToggleFold:c,onRevealMore:l,onSelect:u,onNew:d}){let{t:f}=J(),p=G9(n.length,i),m=n.slice(0,p),h=n.length-p;return(0,q.jsxs)(`div`,{children:[(0,q.jsxs)(`div`,{className:`flex w-full items-center gap-1 rounded-lg px-2 py-2 transition-colors hover:bg-muted/60`,children:[(0,q.jsxs)(`button`,{type:`button`,onClick:c,className:`flex min-w-0 flex-1 items-center gap-1 text-left`,children:[(0,q.jsx)(`span`,{className:`flex h-5 w-5 shrink-0 items-center justify-center`,children:(0,q.jsx)(Ve,{className:K(`h-3.5 w-3.5 text-muted-foreground transition-transform duration-200`,!r&&`rotate-90`)})}),(0,q.jsx)(ut,{className:`h-4 w-4 shrink-0 text-muted-foreground`}),(0,q.jsxs)(`span`,{className:`min-w-0 flex-1 truncate font-medium text-sm`,children:[e,t&&(0,q.jsx)(`span`,{className:`ml-1.5 rounded bg-muted px-1 py-0.5 text-[10px] font-normal text-muted-foreground`,children:t})]}),(0,q.jsx)(`span`,{className:`shrink-0 text-[10px] text-muted-foreground tabular-nums`,children:n.length})]}),s&&d&&(0,q.jsx)(`button`,{type:`button`,onClick:d,className:`shrink-0 rounded-md p-1 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground`,children:(0,q.jsx)(Dt,{className:`h-3.5 w-3.5`})})]}),!r&&(0,q.jsxs)(`div`,{className:`mt-0.5 flex flex-col gap-y-0.5`,children:[m.map(e=>(0,q.jsx)(K9,{session:e,active:a===e.id,nowTick:o,onSelect:u},e.id)),n.length>5&&(0,q.jsxs)(`div`,{className:`flex items-center gap-1`,children:[h>0&&(0,q.jsx)(`button`,{type:`button`,onClick:()=>l(yhe(n.length,i)),className:`flex-1 rounded-lg py-1 text-center text-muted-foreground text-xs transition-colors hover:bg-muted/60 hover:text-foreground`,children:f(`Show {{n}} more`,{n:h})}),i>0&&(0,q.jsx)(`button`,{type:`button`,onClick:()=>l(bhe(i)),className:`flex-1 rounded-lg py-1 text-center text-muted-foreground text-xs transition-colors hover:bg-muted/60 hover:text-foreground`,children:f(`Collapse`)})]})]})]})}function whe({status:e,unread:t}){let n=e===`running`,r=!n&&e===`failed`,i=!n&&!r&&t===!0;return(0,q.jsx)(`span`,{className:K(`h-1.5 w-1.5 shrink-0 rounded-full`,n&&`animate-pulse bg-brand`,r&&`bg-destructive`,i&&`bg-green-500`,!n&&!r&&!i&&`bg-muted-foreground/30`)})}function The(){window.electronAPI||Object.defineProperty(window,"electronAPI",{value:{git:{diffHead:async()=>({ok:!1,error:`unavailable`})},changes:{readSnapshots:async()=>({}),writeSnapshots:async()=>!1},workspaceFiles:{listDir:async()=>({ok:!1,error:`unavailable`}),read:async()=>({ok:!1,error:`unavailable`}),write:async()=>({ok:!1,error:`unavailable`}),watchStart:async()=>({ok:!1,error:`unavailable`}),watchStop:async()=>({ok:!1,error:`unavailable`}),onChange:()=>()=>void 0,search:async()=>({ok:!1,error:`unavailable`})},files:{read:async()=>null,search:async()=>[],pathForFile:()=>null},agentRegistry:{list:async()=>null},agent:{stopTask:async()=>({ok:!1,error:`not supported on phone`}),stopSubagent:async()=>({ok:!1,error:`not supported on phone`})},providers:{listOauth:async()=>[],getOauthUsage:async()=>null}},writable:!1})}function Ehe(e){let t=window.electronAPI?.agent;t&&(t.stopTask=async(t,n)=>(e.stopTask(t,n),{ok:!0}),t.stopSubagent=async(t,n)=>(e.stopSubagent(t,n),{ok:!0}))}function Dhe(e,t){return e?t.some(e=>e.status===`running`||typeof e.pendingAskCount==`number`&&e.pendingAskCount>0||typeof e.pendingApprovalCount==`number`&&e.pendingApprovalCount>0):!1}var J9=null;async function Y9(e,t=typeof navigator>`u`?void 0:navigator.wakeLock){if(!e||!t){if(!J9)return;let e=J9;J9=null;try{await e.release()}catch{}return}if(!J9)try{let e=await t.request(`screen`);J9=e,e.addEventListener(`release`,()=>{J9===e&&(J9=null)})}catch{J9=null}}function Ohe(){if(!window.location.hash.replace(/^#/,``).includes(`pk=`))return null;let e=window.location.href;return history.replaceState(null,``,window.location.pathname+window.location.search),e}var khe={connecting:`连接中…`,online:`已连接`,"host-offline":`桌面端离线`,unauthorized:`配对已失效`,replaced:`已在其他页面打开`,offline:`重连中…`},X9=`enso-phone-sidebar-pinned`,Ahe=C();function jhe(){let e=D(window.location.search);if(!e)return null;let t=new URLSearchParams(window.location.search);t.delete(`session`);let n=t.toString();return history.replaceState(null,``,window.location.pathname+(n?`?${n}`:``)),e}function Mhe(){return L()?`ok`:/iphone|ipad|ipod/i.test(navigator.userAgent)&&!j()?`needs-install`:`unsupported`}function Nhe(){let[e,t]=(0,W.useState)(H),[n,r]=(0,W.useState)(R),c=a(e,n),[l]=(0,W.useState)(Ohe),[u,d]=(0,W.useState)(!1),[f,p]=(0,W.useState)(`connecting`),[m,h]=(0,W.useState)(`relay`),[g,y]=(0,W.useState)(null),[x,S]=(0,W.useState)([]),[C,D]=(0,W.useState)([]),[O,k]=(0,W.useState)([]),[A,j]=(0,W.useState)([]),[N,P]=(0,W.useState)([]),[F]=(0,W.useState)(jhe),[I]=(0,W.useState)(()=>M(c?.pairId??null,F)),[L,V]=(0,W.useState)(I.activeId),[U,ne]=(0,W.useState)(null),[se,ce]=(0,W.useState)(!1),[le,ue]=(0,W.useState)(new Set),[de,fe]=(0,W.useState)([]),[pe,me]=(0,W.useState)(!1),he=Dme(Ome),[ge,_e]=(0,W.useState)(()=>localStorage.getItem(X9)!==`off`),ve=he&&ge,be=()=>{_e(e=>(localStorage.setItem(X9,e?`off`:`on`),!e))},[xe,Se]=(0,W.useState)(!1),[Ce,we]=(0,W.useState)(null),[Te,Ee]=(0,W.useState)(!1),[De,Oe]=(0,W.useState)(()=>localStorage.getItem(B)===`on`),[G,ke]=(0,W.useState)(!1),[Ae,je]=(0,W.useState)(!1),[Me,Ne]=(0,W.useState)(!1),[Pe,Fe]=(0,W.useState)(!1),[Ie,Le]=(0,W.useState)(!1),[Re,ze]=(0,W.useState)(!1),[Be,Ve]=(0,W.useState)(null),[He,Ue]=(0,W.useState)(!1),[We,Ge]=(0,W.useState)(!1),[Ke,qe]=(0,W.useState)(!1),Je=(0,W.useRef)(!1),[Ye,Xe]=(0,W.useState)(!1),[Ze,Qe]=(0,W.useState)(!1),$e=(0,W.useRef)(!1),[et,tt]=(0,W.useState)([]),[nt,rt]=(0,W.useState)([]),[it,at]=(0,W.useState)([]),[ot,st]=(0,W.useState)(!1),[ct,lt]=(0,W.useState)([]),[ut,dt]=(0,W.useState)({items:[],offset:0}),[ft,pt]=(0,W.useState)(()=>q7(!0,I.botChatId)),[mt,ht]=(0,W.useState)(I.botChatId),[gt,_t]=(0,W.useState)(null),[vt,yt]=(0,W.useState)({}),[bt,xt]=(0,W.useState)({}),[St,Ct]=(0,W.useState)({}),[wt,Tt]=(0,W.useState)(null),Et=(0,W.useRef)(null),Dt=(0,W.useMemo)(()=>new aa(e=>Mt.current?.send(e)),[]),Ot=(0,W.useMemo)(()=>new qo(e=>Mt.current?.send(e)),[]),kt=(0,W.useMemo)(()=>new Yo(e=>Mt.current?.send(e)),[]),[At,jt]=(0,W.useState)([]),Mt=(0,W.useRef)(null),Nt=(0,W.useRef)(L),Pt=(0,W.useRef)(x),Ft=(0,W.useRef)(U);Pt.current=x,Ft.current=U,Nt.current=L;let It=mt?it.find(e=>e.id===mt):void 0,Rt=It?.kind===`group`?Eo(It,et):void 0,zt=Rt?.current??It,Bt=It?.kind===`direct`?It.sessions[It.members[0]]?.conversationId??null:null,Vt=mt?Bt??gt:L,Ht=(0,W.useRef)(Vt);Ht.current=Vt;let Ut=(0,W.useRef)(it);Ut.current=it;let Wt=(0,W.useRef)(mt);Wt.current=mt;let Gt=(0,W.useRef)(null);Gt.current=Rt?.current.id??null;let Kt=(0,W.useRef)(new Set);Kt.current=new Set(Rt?Object.values(Rt.current.sessions).map(e=>e.conversationId):[]);let qt=(0,W.useRef)(null),Jt=(0,W.useRef)(new Map),Yt=(0,W.useRef)(null),[Xt,Zt]=(0,W.useState)(!1),Qt=(0,W.useRef)(null);(0,W.useEffect)(()=>{if(w(),!(`serviceWorker`in navigator))return;let e=e=>{let t=e.data;if(t?.type!==`open-session`)return;let n=ae(t.sessionId);if(!n)return;let r=Ut.current.find(e=>Object.values(e.sessions).some(e=>e.conversationId===n));r?(ht(r.id),_t(null)):(ht(null),V(n)),_n()};return navigator.serviceWorker.addEventListener(`message`,e),()=>navigator.serviceWorker.removeEventListener(`message`,e)},[]),(0,W.useEffect)(()=>{Ki(Wi(x))},[x]),(0,W.useEffect)(()=>{let e=()=>{Y9(Dhe(document.visibilityState===`visible`&&f===`online`,x))};return e(),document.addEventListener(`visibilitychange`,e),document.addEventListener(`pointerdown`,e,{passive:!0}),()=>{document.removeEventListener(`visibilitychange`,e),document.removeEventListener(`pointerdown`,e),Y9(!1)}},[x,f]),(0,W.useEffect)(()=>{if(F){_();return}_().then(e=>{e&&(ht(null),_t(null),V(e),_n())})},[F]),(0,W.useEffect)(()=>{l&&e.length>0&&d(!0)},[]),(0,W.useEffect)(()=>{if(!c)return;Qt.current=null,ke(!1),ue(new Set),h(`relay`),je(!1),Ne(!1),Fe(!1),Le(!1),Ge(!1),qe(!1),Je.current=!1,Xe(!1),Qe(!1),$e.current=!1;let e=()=>{Ne(!0),Le(!0)},t=new o(c,{onState:e=>{e!==`online`&&(Et.current?.interrupted(),Dt.reset(),Ot.reset(),kt.reset(),Ge(!1),Xe(!1)),p(e)},onBotArtifacts:e=>Dt.receive(e),onBotArtifactImage:e=>Dt.receiveImage(e),onBotNewSessionResult:t=>{Ot.receive(t),t.error===`read-only`&&e()},onBotThreadResult:t=>{kt.receive(t),t.error===`read-only`&&e()},onTransport:e=>{h(e),y(null)},onRtt:y,onVoiceInput:je,onRemoteDesktop:Fe,onReadOnly:e=>{Ne(e),e||Le(!1)},onCommandRejected:(t,n)=>{n===`read-only`&&e()},onCatalog:(e,t)=>{S(e),D(t??[])},onProjects:(e,t)=>{k(e),j(t??[])},onProviders:P,onSession:(e,t)=>{ne(n=>e===Ht.current?t:n),Kt.current.has(e)&&Ct(n=>({...n,[e]:t}))},onBotCatalog:(e,t,n,r)=>{Ue(e),Ge(e&&n),Xe(e&&r),rt(t),!e&&(at([]),tt([]),lt([]),dt({items:[],offset:0}),ht(null),_t(null),pt(!1))},onBotChats:(e,t)=>{at(e),tt(t),st(!0)},onBotInbox:lt,onBotActivity:(e,t)=>{for(let t of e)Jt.current.set(t.conversationId,t.botId);dt({items:e,offset:t})},onGroupTimeline:e=>{e.beforeSeq!==void 0&&Yt.current===`${e.chatId}:${e.beforeSeq}`&&(Yt.current=null,Zt(!1)),yt(t=>({...t,[e.chatId]:Ao(t[e.chatId],e)}))},onBotChatState:({type:e,chatId:t,...n})=>xt(e=>({...e,[t]:n})),onBotEvent:e=>{if(e.kind===`model-notice`){e.text&&(e.chatId===Wt.current||e.chatId===Gt.current)&&Tt(e.text);return}!e.chatId||e.chatId!==Gt.current||qt.current||(qt.current=setTimeout(()=>{qt.current=null;let e=Gt.current;e&&t.send({type:`bot-chat-open`,chatId:e})},200))},onBotSendResult:t=>{Et.current?.settle(t.deliveryId,t.ok,t.error),t.error===`read-only`&&e()},onBotRetryResult:e=>{e.chatId===Gt.current&&Tt(e.ok?`已开始重试`:`重试失败:${e.error===`session-busy`?`请等当前回复结束`:`该回复已过期或无法恢复,请重新发送需求`}`)},onSync:e=>ce(e===`syncing`),onGhostSession:e=>{e===Nt.current&&V(null)},onHistoryPending:(e,t)=>{ue(n=>{let r=new Set(n);return t?r.add(e):r.delete(e),r})},onPushConfig:e=>{Qt.current=e,ke(!0),localStorage.getItem(`enso-phone-push`)===`on`&&re(e).then(e=>{e.ok&&t.send({type:`push-subscribe`,subscription:e.subscription})})}});Mt.current=t,t.connect();let n=()=>{document.visibilityState===`visible`?(t.nudge(`visibility`),t.send({type:`presence`,visible:!0})):(t.conceal(),t.send({type:`presence`,visible:!1}),t.flushCache())},r=()=>{document.visibilityState===`visible`&&(t.nudge(`online`),t.send({type:`presence`,visible:!0}))},i=e=>{document.visibilityState===`visible`&&(t.nudge(e.persisted?`online`:`visibility`),t.send({type:`presence`,visible:!0}))},a=()=>{document.visibilityState===`visible`&&t.nudge(`visibility`)},s=()=>{t.conceal(),t.flushCache()};return document.addEventListener(`visibilitychange`,n),window.addEventListener(`online`,r),window.addEventListener(`pageshow`,i),window.addEventListener(`focus`,a),window.addEventListener(`pagehide`,s),()=>{document.removeEventListener(`visibilitychange`,n),window.removeEventListener(`online`,r),window.removeEventListener(`pageshow`,i),window.removeEventListener(`focus`,a),window.removeEventListener(`pagehide`,s),qt.current&&clearTimeout(qt.current),qt.current=null,t.close(),Mt.current=null,Ot.reset(),kt.reset()}},[c?.pairId,c?.token,c?.relayUrl,c?.contentKey]);let $t=(0,W.useRef)(new Set);(0,W.useEffect)(()=>{let e=Vt!==null&&$t.current.has(Vt);Mt.current?.subscribe(Vt,{fresh:e});for(let e of $t.current)e!==Vt&&$t.current.delete(e);ne(Vt?Mt.current?.getSession(Vt)??null:null)},[Vt,c?.pairId]);let en=c?.pairId;(0,W.useEffect)(()=>{en&&ee(en,{activeId:L,botChatId:mt})},[L,mt,en]),(0,W.useEffect)(()=>{if(!en)return;let e=new i(b,en);Et.current=e,jt([]);let t=e.subscribe(e=>jt([...e]));return e.restore().catch(()=>Tt(`离线消息读取失败,请勿清除浏览器数据;恢复存储后可重试。`)),()=>{t(),Et.current===e&&(Et.current=null)}},[en]),(0,W.useEffect)(()=>{if(f===`online`)for(let e of Et.current?.drain()??[])Mt.current?.send({type:`bot-send`,chatId:e.chatId,text:e.text,...e.images?.length?{images:e.images}:{},deliveryId:e.deliveryId})},[f,At]),(0,W.useEffect)(()=>{let e=setInterval(()=>Et.current?.expire(),1e3);return()=>clearInterval(e)},[]);let tn=Rt?.current.id??null;(0,W.useEffect)(()=>{!tn||f!==`online`||(Yt.current=null,Zt(!1),Mt.current?.send({type:`bot-chat-open`,chatId:tn}))},[tn,f]),(0,W.useEffect)(()=>{if(!Xt)return;let e=setTimeout(()=>{Yt.current=null,Zt(!1),Tt(`历史加载未完成,请点击加载重试。`)},1e4);return()=>clearTimeout(e)},[Xt]),(0,W.useEffect)(()=>{let e={};for(let t of Kt.current){let n=Mt.current?.getSession(t);n&&(e[t]=n)}Ct(e)},[tn,Rt?.current.sessions]),(0,W.useEffect)(()=>{if(!L||mt)return;let e=it.find(e=>Object.values(e.sessions).some(e=>e.conversationId===L));e&&(ht(e.id),V(null))},[L,mt,it]),(0,W.useEffect)(()=>{let e=(e,t)=>{let n=Pt.current.find(t=>t.id===e)?.queued,r=Kpe(n,e,t,H7(e===Nt.current&&Ft.current?[...Ft.current.messages.values()]:[]));r&&fe(e=>[...e,r])};_re({removeQueuedMessage:(e,t)=>Mt.current?.send({type:`queue-remove`,sessionId:e,messageId:t}),updateQueuedMessage:(e,t,n)=>Mt.current?.send({type:`queue-update`,sessionId:e,messageId:t,text:n}),sendQueuedNow:(t,n)=>{e(t,n),Mt.current?.send({type:`queue-send-now`,sessionId:t,messageId:n})},interruptAndSendQueued:async(t,n)=>{e(t,n),Mt.current?.send({type:`queue-interrupt-send`,sessionId:t,messageId:n})},pauseGoal:e=>Mt.current?.send({type:`goal-pause`,sessionId:e}),resumeGoal:e=>Mt.current?.send({type:`goal-resume`,sessionId:e}),clearGoal:e=>Mt.current?.send({type:`goal-clear`,sessionId:e}),rewind:(e,t,n)=>Mt.current?.send({type:`rewind`,sessionId:e,userIndexFromEnd:t,...n?{restoreFiles:n}:{}}),retry:e=>Mt.current?.send({type:`retry`,sessionId:e})}),Ehe({stopTask:(e,t)=>Mt.current?.send({type:`task-stop`,sessionId:e,taskId:t}),stopSubagent:(e,t)=>Mt.current?.send({type:`subagent-stop`,sessionId:e,agentId:t})})},[]);let rn=(0,W.useRef)(null);(0,W.useEffect)(()=>{if(!L)return;let e=H7(U?[...U.messages.values()]:[]),t=U?.status===`running`,n=rn.current,r=n?.id===L&&n.running&&!t;rn.current={id:L,running:t},fe(t=>{let n=Ype(t,L,e,{turnSettled:r});return n.length===t.length&&n.every((e,n)=>e===t[n])?t:n})},[U,L]);let an=x.find(e=>!e.parentId)?.id;(0,W.useEffect)(()=>{!mt&&!L&&an&&V(an)},[L,mt,an]);let on=(0,W.useMemo)(()=>x.find(e=>e.id===L),[x,L]),sn=(0,W.useMemo)(()=>{if(!on)return;let e=on.parentId?x.find(e=>e.id===on.parentId):on;if(!e)return;let t=x.filter(t=>t.parentId===e.id);return t.length>0?{parent:e,children:t}:void 0},[x,on]),cn=on&&!on.parentId,ln=cn?N.find(e=>e.id===on.providerId)?.models.find(e=>e.id===on.modelId)?.label??on.modelId??`选择模型`:void 0,un=f===`online`?sme(m,g):khe[f],dn=e=>{S([]),D([]),k([]),j([]),P([]),ne(null),ce(!1),fe([]),y(null),Ue(!1),rt([]),at([]),tt([]),st(!1),ht(e.botChatId),pt(e.botChatId!==null),_t(null),yt({}),xt({}),dt({items:[],offset:0}),Ct({}),Tt(null),V(e.activeId)},fn=e=>{e!==c?.pairId&&(T(e),r(e),p(`connecting`),dn(M(e)),_n())},pn=n=>{let i=s(e,n);t(i),z(i),T(n.pairId),r(n.pairId),dn(M(n.pairId)),d(!1)},mn=n=>{let i=e.find(e=>e.pairId===n);i&&E(i.relayUrl,i.pairId,i.token).catch(()=>{}),n===c?.pairId&&Mt.current?.close(),te(n);let o=ie(e,n);if(t(o),z(o),n===(c?.pairId??null)){let e=a(o,null);T(e?.pairId??null),r(e?.pairId??null),e&&p(`connecting`),dn(M(e?.pairId??null)),e||_n()}},hn=(n,r)=>{let i=v(e,n,r);t(i),z(i)};if(!c||u)return(0,q.jsx)(dhe,{autoInvite:l,onPaired:pn,onCancel:c?()=>d(!1):void 0});if(f===`unauthorized`){let t=e.length>1;return(0,q.jsxs)(`div`,{className:`flex h-full flex-col items-center justify-center gap-3 px-6 text-center`,children:[(0,q.jsx)(nn,{className:`h-8 w-8 text-muted-foreground`}),(0,q.jsx)(`h1`,{className:`font-medium text-lg`,children:`配对已失效`}),(0,q.jsxs)(`p`,{className:`text-muted-foreground text-sm`,children:[`「`,c.label,`」已解绑此设备,`,t?`可移除它并切到其他电脑。`:`请重新扫码配对。`]}),(0,q.jsx)(Ui,{onClick:()=>mn(c.pairId),children:t?`移除此配对`:`重新配对`})]})}if(f===`replaced`)return(0,q.jsxs)(`div`,{className:`flex h-full flex-col items-center justify-center gap-3 px-6 text-center`,children:[(0,q.jsx)(nn,{className:`h-8 w-8 text-muted-foreground`}),(0,q.jsx)(`h1`,{className:`font-medium text-lg`,children:`已在其他页面打开`}),(0,q.jsxs)(`p`,{className:`text-muted-foreground text-sm`,children:[`「`,c.label,`」正被另一个页面连着,同一时间只能有一个页面。`]}),(0,q.jsx)(Ui,{onClick:()=>window.location.reload(),children:`在这个页面重连`})]});let gn=e=>Mt.current?.send(e),_n=()=>{(localStorage.getItem(X9)===`off`||!window.matchMedia(`(min-width: 900px)`).matches)&&me(!1)},vn=()=>{pt(q7(He,mt)),me(!0),He&&gn({type:`bot-catalog-request`})},yn=(e,t,n=[])=>{Tt(null),Et.current?.enqueue({chatId:e,text:t,images:n})},bn=e=>(0,q.jsx)(ohe,{items:At.filter(t=>t.chatId===e),readOnly:Me,onRetry:e=>Et.current?.retry(e),onDiscard:e=>Et.current?.discard(e)}),xn=new Map(nt.map(e=>[e.id,e])),Sn=e=>Me?`只读设备不能新建会话`:f===`online`?We?Ke?`正在新建会话…`:At.some(t=>t.chatId===e)?`请先处理待发送消息`:void 0:`请升级桌面端以支持新建会话`:`请先连接桌面端`,Cn=async e=>{if(Sn(e)||Je.current)return;let t=Mt.current;Je.current=!0,qe(!0),Tt(null);try{let n=await Ot.start(e,()=>t===Mt.current&&Wt.current===e&&window.confirm(`群聊中仍有回复、排队或委派任务。新建会话将停止成员回复,并取消未标记保留的委派。旧消息会保留。继续吗?`));if(t!==Mt.current||Wt.current!==e)return;Tt(!n||n.ok?null:n.error===`read-only`?`只读设备不能新建会话`:n.error===`timeout`||n.error===`offline`?`未收到新会话确认,请连接后核对聊天状态,勿重复操作`:`新建会话失败:${n.error??`请稍后重试`}`),n?.ok&&(t?.send({type:`bot-catalog-request`}),t?.send({type:`bot-chat-open`,chatId:e}))}finally{t===Mt.current&&(Je.current=!1,qe(!1))}},wn=Me?`只读设备不能切换或新建话题`:f===`online`?Ze?`正在处理话题…`:void 0:`请先连接桌面端`,Tn=async e=>{if(wn||$e.current)return;let t=Mt.current;$e.current=!0,Qe(!0),Tt(null);try{let n=await kt.request(e);if(t!==Mt.current||Wt.current!==e.chatId)return;n.ok?_t(null):Tt(n.error===`read-only`?`只读设备不能切换或新建话题`:n.error===`timeout`||n.error===`offline`?`未收到桌面确认,请连接后核对当前话题`:n.error===`invalid`?`该话题已不存在或群已归档`:`话题操作失败:${n.error??`请稍后重试`}`)}finally{t===Mt.current&&($e.current=!1,Qe(!1))}},En=e=>{if(e.kind===`group`&&!gt){let t=Object.entries(e.sessions).flatMap(([e,{conversationId:t}])=>{let n=St[t];return n?[{sessionId:t,botId:e,view:n}]:[]});return(0,q.jsx)(Eme,{chat:e,bots:xn,timeline:vt[e.id],state:bt[e.id],pending:t,activities:Ho(ut.items,e.id),clockOffset:ut.offset,connState:f,stateLabel:un,notice:wt,outbox:bn(e.id),deviceReadOnly:Me,readOnlyRejected:Ie,onOpenDrawer:vn,drawerDocked:ve,onNewSession:()=>void Cn(e.id),canCreate:!Sn(e.id),newSessionHint:Sn(e.id),newSessionBusy:Ke,threads:Ye&&Rt&&It?{entries:Rt.entries,currentId:e.id,rootId:It.id,disabledHint:wn,onSelect:e=>void Tn({type:`bot-thread-select`,chatId:It.id,threadId:e}),onCreate:()=>void Tn({type:`bot-thread-create`,chatId:It.id})}:void 0,voice:Dn,onLoadOlder:()=>{let t=vt[e.id]?.entries[0]?.seq,n=`${e.id}:${t}`;f!==`online`||t===void 0||Yt.current||(Yt.current=n,Zt(!0),gn({type:`bot-timeline`,chatId:e.id,beforeSeq:t}))},historyLoading:Xt,onJumpLatest:()=>{Yt.current=null,Zt(!1),yt(t=>{let n={...t};return delete n[e.id],n}),gn({type:`bot-chat-open`,chatId:e.id})},onSend:(t,n)=>yn(e.id,t,n),onStop:()=>gn({type:`bot-stop`,chatId:e.id}),onRetry:t=>{Tt(`正在请求重试…`),gn({type:`bot-retry`,chatId:e.id,entryId:t})},onOpenProcess:_t,onApproval:(e,t,n)=>gn({type:`approval-respond`,sessionId:e,requestId:t,decision:n}),onAsk:(e,t,n)=>gn({type:`ask-respond`,sessionId:e,requestId:t,answer:n})})}let t=e.kind===`group`,n=vt[e.id]?.entries.find(e=>e.kind===`bot`&&e.conversationId===gt),r=gt?Jt.current.get(gt):void 0,i=xn.get(t?n?.kind===`bot`?n.botId:r??``:e.members[0]);return(0,q.jsx)(W7,{sessionId:Vt??`bot-chat:${e.id}`,clockOffset:ut.offset,title:t?`${i?.name??`成员`} · 过程`:i?.name??e.title,projectName:t?e.title:i?.title??``,view:Vt?U:Ahe,connState:f,stateLabel:un,syncing:se&&!!Vt,onOpenDrawer:vn,drawerDocked:ve,onNewSession:()=>!t&&void Cn(e.id),canCreate:!t&&!Sn(e.id),newSessionHint:Sn(e.id),newSessionBusy:Ke,hasOlder:!!(Vt&&U&&U.messages.size>0&&Math.min(...U.messages.keys())>0),historyLoading:!!(Vt&&le.has(Vt)),onLoadOlder:()=>Vt&&Mt.current?.requestHistory(Vt),voice:Dn,bot:t?{readOnly:!0,onBack:()=>_t(null)}:{chatId:e.id,notice:wt,outbox:bn(e.id)},artifacts:!t&&Vt?{chatId:e.id,conversationId:Vt}:void 0,deviceReadOnly:Me,readOnlyRejected:Ie,onSend:(t,n)=>yn(e.id,t,n),onAbort:()=>Vt&&gn({type:`abort`,sessionId:Vt}),onApproval:(e,t)=>Vt&&gn({type:`approval-respond`,sessionId:Vt,requestId:e,decision:t}),onAsk:(e,t)=>Vt&&gn({type:`ask-respond`,sessionId:Vt,requestId:e,answer:t})})},Dn=Ae?e=>Mt.current?.startVoice(e)??{push:()=>{},finish:()=>Promise.resolve({ok:!1,error:`failed`}),cancel:()=>{}}:void 0,On=async e=>{if(Ve(null),!e){localStorage.setItem(B,`off`),Oe(!1),gn({type:`push-unsubscribe`}),oe();return}let t=Qt.current;if(!t)return;Oe(!0),ze(!0);let n=await re(t);if(ze(!1),!n.ok){Oe(!1),Ve(n.reason);return}gn({type:`push-subscribe`,subscription:n.subscription}),localStorage.setItem(B,`on`)};return(0,q.jsxs)(`div`,{className:`phone-app-root flex h-full min-h-0`,children:[(0,q.jsx)(Che,{open:ve||pe,docked:ve,pinnable:he,onTogglePinned:be,projects:O,groups:A,catalog:x,pinnedOrder:C,activeId:mt?null:L,canCreate:f===`online`&&!Me,devices:e,activeDevicePairId:c.pairId,remoteDesktop:Pe,connected:f===`online`,connectionLabel:un,onClose:()=>_n(),onSelect:e=>{ht(null),_t(null),V(e),_n()},onNewConversation:e=>{_n(),we(e),Se(!0)},pushEnabled:De,pushBusy:Re,pushError:Be,pushAvailability:Mhe(),pushConfigReady:G,onTogglePush:e=>void On(e),onSwitchDevice:fn,onAddDevice:()=>{_n(),d(!0)},onRenameDevice:hn,onUnpairDevice:mn,botSegment:He?{active:ft,onChange:e=>{pt(e),lme(e?`bot`:`code`),e&&gn({type:`bot-catalog-request`})},panel:(0,q.jsx)(Ko,{bots:nt,chats:it,activeChatId:mt,inbox:ct,activities:ut.items,onDismiss:Me?void 0:e=>gn({type:`bot-inbox-dismiss`,key:e}),onSelect:e=>{ht(e),_t(null),Tt(null),_n()}})}:void 0}),(0,q.jsxs)(`div`,{className:`flex h-full min-w-0 flex-1 flex-col`,children:[he&&!ve&&!pe&&(0,q.jsx)(`button`,{type:`button`,onClick:vn,"aria-label":`打开会话列表`,className:`fixed top-1/2 left-0 z-40 flex h-16 w-6 -translate-y-1/2 items-center justify-center rounded-r-lg border border-l-0 bg-background/90 text-muted-foreground shadow-sm backdrop-blur transition-colors hover:bg-accent hover:text-foreground`,children:(0,q.jsx)(Lt,{className:`h-4.5 w-4.5`})}),It?(0,q.jsx)(sa.Provider,{value:{port:Dt,online:f===`online`},children:En(zt??It)}):mt?(0,q.jsxs)(`div`,{className:`relative flex h-full flex-col items-center justify-center gap-3 px-6 text-center`,children:[!ve&&(0,q.jsx)(`button`,{type:`button`,onClick:vn,"aria-label":`打开会话列表`,className:`absolute top-2 left-2 flex h-9 w-9 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground`,children:(0,q.jsx)(Lt,{className:`h-4.5 w-4.5`})}),(0,q.jsx)(`p`,{children:ot?`该 Bot 聊天已不存在或不可用`:`正在恢复 Bot 聊天…`}),(0,q.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:un}),(0,q.jsx)(Ui,{onClick:vn,children:`选择聊天`})]}):(0,q.jsx)(W7,{sessionId:L,title:on?.title||(L?`会话`:`EnsoCode`),projectName:on?.projectName??``,cwd:on?.cwd,view:U,connState:f,stateLabel:un,syncing:se&&!!L,onOpenDrawer:vn,drawerDocked:ve,onNewSession:()=>{we(null),Se(!0)},canCreate:f===`online`&&O.length>0&&!Me,modelLabel:f===`online`?ln:void 0,onOpenConfig:()=>Ee(!0),tabGroup:sn,onSelectTab:V,hasOlder:!!(L&&U&&U.messages.size>0&&Math.min(...U.messages.keys())>0),historyLoading:!!(L&&le.has(L)),onLoadOlder:()=>L&&Mt.current?.requestHistory(L),voice:Dn,queued:qpe(on?.queued,de,L??``),echoes:de,goal:on?.goal,context:on?.context,usageTotals:on?.usageTotals,slashCommands:on?.slashCommands,deviceReadOnly:Me,readOnlyRejected:Ie,onSend:(e,t)=>{if(!L)return;let n=ye(e);if(n){gn({type:`compact`,sessionId:L,...n.instructions?{instructions:n.instructions}:{}});return}let r=/^\/goal(?:\s+([\s\S]+))?$/.exec(e.trim());if(r){let e=r[1]?.trim();if(!e)return;gn(e===`clear`?{type:`goal-clear`,sessionId:L}:e===`pause`?{type:`goal-pause`,sessionId:L}:e===`resume`?{type:`goal-resume`,sessionId:L}:{type:`goal-set`,sessionId:L,text:e});return}gn({type:U?.status===`running`?`enqueue`:`prompt`,sessionId:L,text:e,...t.length?{images:t}:{}})},onAbort:()=>L&&gn({type:`abort`,sessionId:L}),onApproval:(e,t)=>L&&gn({type:`approval-respond`,sessionId:L,requestId:e,decision:t}),onAsk:(e,t)=>L&&gn({type:`ask-respond`,sessionId:L,requestId:e,answer:t})}),(0,q.jsx)(ihe,{open:xe&&!Me,projects:O,providers:N,preferredProjectId:Ce,onClose:()=>{Se(!1),we(null)},onCreate:e=>{let t=crypto.randomUUID();gn({type:`spawn`,sessionId:t,...e}),$t.current.add(t),Se(!1),we(null),ht(null),_t(null),V(t)}}),cn&&L&&!Me&&(0,q.jsx)(fhe,{open:Te,providers:N,config:{providerId:on.providerId,modelId:on.modelId,reasoningEnabled:on.reasoningEnabled,thinkingLevel:on.thinkingLevel},onClose:()=>Ee(!1),onSetModel:(e,t)=>gn({type:`set-model`,sessionId:L,providerId:e,modelId:t}),onSetReasoning:e=>gn({type:`set-reasoning`,sessionId:L,enabled:e}),onSetThinking:e=>gn({type:`set-thinking`,sessionId:L,level:e})})]})]})}function Phe(e){return!e.appleMobile||!e.standalone||e.safeTop<=0||e.innerHeight<=e.innerWidth?!1:e.innerHeight>=Math.max(e.screenWidth,e.screenHeight)-1}function Fhe(e){return e.split(`,`).map(e=>e.trim()).filter(e=>e&&!/^viewport-fit\s*=/i.test(e)).join(`, `)}function Ihe(){return/iphone|ipad|ipod/i.test(navigator.userAgent)||navigator.platform===`MacIntel`&&navigator.maxTouchPoints>1}function Lhe(){let e=document.querySelector(`meta[name="viewport"]`);if(!e||!Ihe())return;let t=document.createElement(`div`);t.setAttribute(`aria-hidden`,`true`),t.style.cssText=`position:fixed;visibility:hidden;pointer-events:none;padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom)`,document.body.appendChild(t);let n=()=>{let r=getComputedStyle(t);if(!Phe({appleMobile:!0,standalone:j(),safeTop:Number.parseFloat(r.paddingTop)||0,innerWidth:window.innerWidth,innerHeight:window.innerHeight,screenWidth:window.screen.width,screenHeight:window.screen.height}))return;let i=Number.parseFloat(r.paddingBottom)||0;document.documentElement.style.setProperty(`--phone-safe-bottom`,`${i}px`),e.content=Fhe(e.content),window.removeEventListener(`resize`,n),document.removeEventListener(`visibilitychange`,n),t.remove()};window.addEventListener(`resize`,n),document.addEventListener(`visibilitychange`,n),n()}var Z9=new URLSearchParams(location.search);if(Z9.get(`mode`)===`phone`){A(`phone`),Z9.delete(`mode`);let e=Z9.toString();history.replaceState(null,``,`${location.pathname}${e?`?${e}`:``}${location.hash}`)}var Q9=ne(location.search,k(),H(),R());Q9&&location.replace(Q9),The(),F(),Lhe();var $9=document.getElementById(`root`);$9&&!Q9&&(0,_e.createRoot)($9).render((0,q.jsx)(W.StrictMode,{children:(0,q.jsx)(Nhe,{})}));export{Y as t};
|
|
1643
|
+
`).trim()}var Qpe=e=>e===`outbox-discarding`?`正在移除…`:e===`outbox-discard`?`移除未保存,请勿关闭页面;请再次移除,重启后可能重新入队`:e===`outbox-storage`?`无法保存离线消息,请勿关闭页面;可重试或复制消息`:e===`delivery-unconfirmed`?`未收到回执,发送结果未确认;可重试确认`:e===`read-only`?`此设备为只读`:e===`session-busy`?`请等当前回复结束`:e&&es(`zh`,qi(e)??e),U7=(e=!1)=>e?`此设备为只读,刚才的操作未执行;可在桌面「设置 → 设备」切换为可操作`:`此设备为只读,只能查看;可在桌面「设置 → 设备」切换为可操作`,$pe=70;function eme({percent:e,critical:t}){return(0,q.jsx)(`span`,{"aria-hidden":!0,className:`h-1 w-7 shrink-0 overflow-hidden rounded-full bg-muted-foreground/20`,children:(0,q.jsx)(`span`,{className:K(`block h-full rounded-full`,t?`bg-destructive`:e>=$pe?`bg-warning`:`bg-muted-foreground/70`),style:{width:`${e}%`}})})}function tme(e,t){let n={inputTokens:0,outputTokens:0,...e};return t&&(n.contextUsed=t.used,t.window!==void 0&&(n.contextWindow=t.window)),n.inputTokens===0&&n.outputTokens===0&&n.cacheHitPercent===void 0&&n.ttftAvgMs===void 0&&n.tokensPerSecond===void 0&&n.contextUsed===void 0?void 0:n}function nme(e,t){let n={tokens:void 0,cache:void 0,context:void 0,speed:void 0};if(!t)return n;if(t.contextUsed!==void 0){let e=t.contextUsed,r=t.contextWindow??0;if(r>0){let t=Math.min(100,Math.round(e/r*100));n.context={compact:`${t}%`,full:`${gj(r)} · ${t}%`,percent:t,critical:t>=90}}else n.context={compact:`${gj(e)}·?`,full:`${gj(e)} · ?`}}let r=[],i=[];return t.ttftAvgMs!==void 0&&(r.push(_j(t.ttftAvgMs)),i.push(e(`First token avg {{duration}}`,{duration:_j(t.ttftAvgMs)}))),t.tokensPerSecond!==void 0&&(r.push(`${t.tokensPerSecond} tok/s`),i.push(e(`{{speed}} tok/s`,{speed:t.tokensPerSecond}))),r.length>0&&(n.speed={compact:r.join(` · `),full:i.join(` · `)}),(t.inputTokens>0||t.outputTokens>0)&&(n.tokens={compact:`↑${gj(t.inputTokens)} ↓${gj(t.outputTokens)}`,full:e(`Input {{input}} tok · Output {{output}} tok`,{input:gj(t.inputTokens),output:gj(t.outputTokens)})}),t.cacheHitPercent!==void 0&&(n.cache={compact:`${t.cacheHitPercent}%`,full:e(`Cache hit {{percent}}%`,{percent:t.cacheHitPercent})}),n}var rme=[[`tokens`,et],[`cache`,it],[`context`,pt],[`speed`,bn]];function ime({usageTotals:e,context:t}){let{t:n}=J(),r=nme(n,tme(e,t));return(0,q.jsx)(`div`,{"data-slot":`stats-line`,className:`flex min-h-6 flex-wrap items-center justify-center gap-x-3 px-1`,children:rme.map(([e,t])=>{let n=r[e];return n?(0,q.jsxs)(`span`,{className:K(`flex items-center gap-1 text-[11px] tabular-nums`,n.critical?`text-destructive`:`text-muted-foreground/80`),children:[n.percent===void 0?(0,q.jsx)(t,{className:`h-3 w-3 shrink-0 opacity-75`}):(0,q.jsx)(eme,{percent:n.percent,critical:!!n.critical}),n.compact]},e):null})})}function W7(e){let{view:t,sessionId:n}=e,r=(0,W.useRef)(null),[i,a]=(0,W.useState)(!1),o=(0,W.useRef)(null),s=(0,W.useRef)(null),c=(0,W.useRef)(!1);(0,W.useLayoutEffect)(()=>{let e=o.current,t=s.current,n=e?.querySelector(`[aria-selected="true"]`);!e||!t||!n||(c.current||(t.style.transition=`none`),t.style.transform=`translate(${n.offsetLeft}px, ${n.offsetTop}px)`,t.style.width=`${n.offsetWidth}px`,t.style.height=`${n.offsetHeight}px`,c.current||=(t.offsetWidth,t.style.transition=``,!0))},[n,e.tabGroup]);let l=t?.status===`running`,u=e.bot,d=!!(u?.readOnly||e.deviceReadOnly),f=e.artifacts?.chatId,p=e.artifacts?.conversationId,m=(0,W.useMemo)(()=>({...Upe({sessionId:n,bot:u,deviceReadOnly:e.deviceReadOnly}),...f&&p?{turnFooter:e=>(0,q.jsx)(ua,{target:{chatId:f,conversationId:p,messageIndex:e}})}:{}}),[n,u,e.deviceReadOnly,f,p]),h=(0,W.useMemo)(()=>{if(u)return[];let t=[{name:`/goal`,description:`Set a session goal (/goal <objective> · pause · resume · clear)`},{name:`/compact`,description:`Compact the context now (/compact [summary focus])`}],n=(e.slashCommands??[]).filter(e=>e.name!==`/goal`&&e.name!==`/compact`);return[...t,...n]},[e.slashCommands,u]),g=(0,W.useMemo)(()=>t?[...t.messages.entries()].sort((e,t)=>e[0]-t[0]):[],[t]),_=(0,W.useMemo)(()=>Jpe(g.map(([,e])=>e),e.echoes??[],n??``),[g,e.echoes,n]),v=_.length>0||t?.status===`running`||t?.status===`failed`;vre(n?{id:n,projectId:``,status:t?.status??`idle`,started:v,spawning:!1,messages:_,queuedMessages:e.queued?.map(e=>({id:e.id,text:e.text}))}:null);let y=(0,W.useMemo)(()=>xL(_,l,[],e.cwd,{pendingApprovals:t?.approvals,compaction:t?.compaction,compactionNoticeAt:S(g.map(([e])=>e),t?.compactionNoticeAt)}),[_,g,l,e.cwd,t?.approvals,t?.compaction,t?.compactionNoticeAt]),b=t?.messages.size?Math.min(...t.messages.keys()):null,x=(0,W.useRef)(null),C=(0,W.useCallback)(()=>{if(!e.hasOlder||!e.onLoadOlder)return;let t=r.current?.getScroller();x.current=t?{height:t.scrollHeight,top:t.scrollTop}:null,e.onLoadOlder()},[e.hasOlder,e.onLoadOlder]);(0,W.useLayoutEffect)(()=>{let e=r.current?.getScroller(),t=x.current;!e||!t||(x.current=null,e.scrollTop=t.top+(e.scrollHeight-t.height))},[b]),(0,W.useEffect)(()=>{r.current?.isAtBottom()&&r.current.pinToBottom()},[y]);let w=async(t,n)=>{a(!0);try{let i=z7(n.length),a=[];for(let e of n)a.push(await ame(e,i));e.onSend(t,a),r.current?.scrollToBottom()}finally{a(!1)}};return(0,q.jsx)(yj.Provider,{value:m,children:(0,q.jsxs)(`div`,{className:`phone-chat-root flex h-full min-h-0 flex-col`,children:[(0,q.jsxs)(`header`,{className:`flex shrink-0 items-center gap-1 border-b bg-background px-2 py-2 pt-safe`,children:[u?.onBack||!e.drawerDocked?(0,q.jsx)(`button`,{type:`button`,onClick:u?.onBack??e.onOpenDrawer,"aria-label":u?.onBack?`返回群聊`:`打开会话列表`,className:`flex h-9 w-9 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground`,children:u?.onBack?(0,q.jsx)(He,{className:`h-4.5 w-4.5`}):(0,q.jsx)(Lt,{className:`h-4.5 w-4.5`})}):(0,q.jsx)(`span`,{className:`h-9 w-9 shrink-0`}),(0,q.jsxs)(`div`,{className:`min-w-0 flex-1 text-center`,children:[(0,q.jsxs)(`p`,{className:`flex min-w-0 items-center justify-center gap-1.5`,children:[e.connState!==`host-offline`&&e.connState!==`unauthorized`&&(0,q.jsx)(`span`,{className:K(`h-1.5 w-1.5 shrink-0 rounded-full`,e.connState===`online`&&!e.syncing?`bg-emerald-500`:`animate-pulse bg-amber-500`),title:e.connState===`online`&&e.syncing?`同步中…`:e.stateLabel}),(0,q.jsx)(`span`,{className:`truncate font-medium text-sm`,children:e.title})]}),(0,q.jsx)(`p`,{className:`truncate font-mono text-[11px] text-muted-foreground`,children:e.projectName||e.stateLabel})]}),u?.readOnly?(0,q.jsx)(`span`,{className:`h-9 w-9 shrink-0`}):(0,q.jsx)(`button`,{type:`button`,onClick:e.onNewSession,disabled:!e.canCreate||d||!!u&&i||e.connState!==`online`,"aria-label":`新建会话`,title:e.newSessionHint??`新建会话`,className:`flex h-9 w-9 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground disabled:opacity-40`,children:(0,q.jsx)(on,{className:`h-4.5 w-4.5`})})]}),e.connState===`host-offline`&&(0,q.jsxs)(`div`,{className:`flex shrink-0 items-center justify-center gap-1.5 bg-amber-500/10 py-1 text-amber-700 text-xs dark:text-amber-400`,children:[(0,q.jsx)(Ct,{className:`h-3 w-3 animate-spin`,"aria-hidden":!0}),(0,q.jsx)(`span`,{children:e.stateLabel})]}),e.tabGroup&&e.tabGroup.children.length>0&&(0,q.jsxs)(`div`,{ref:o,role:`tablist`,className:`t-tabs relative flex shrink-0 items-center justify-start gap-1 overflow-x-auto border-b px-2 py-1`,children:[(0,q.jsx)(`span`,{ref:s,"aria-hidden":`true`,className:`t-tabs-pill pointer-events-none absolute top-0 left-0 z-0 rounded-md bg-muted`}),(0,q.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":n===e.tabGroup.parent.id,className:G7(n===e.tabGroup.parent.id),onClick:()=>e.onSelectTab?.(e.tabGroup?.parent.id??``),children:[(0,q.jsx)(Et,{className:`h-3 w-3 shrink-0`}),(0,q.jsx)(`span`,{className:`max-w-40 truncate`,children:e.tabGroup.parent.title||`新对话`})]}),e.tabGroup.children.map(t=>(0,q.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":n===t.id,className:G7(n===t.id),onClick:()=>e.onSelectTab?.(t.id),children:[(0,q.jsx)(Fe,{className:`h-3 w-3 shrink-0`}),(0,q.jsx)(`span`,{className:`max-w-28 truncate`,children:t.title||`coworker`}),(0,q.jsx)(`span`,{className:K(`h-1.5 w-1.5 shrink-0 rounded-full`,t.status===`running`?`animate-pulse bg-brand`:t.status===`failed`?`bg-destructive`:`bg-muted-foreground/30`)})]},t.id))]}),n===null?(0,q.jsxs)(`div`,{className:`flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center`,children:[(0,q.jsx)(`span`,{className:`mb-3 flex size-11 items-center justify-center rounded-[13px] border border-brand/20 bg-brand/8 text-brand dark:bg-brand/14`,children:(0,q.jsx)(xj,{className:`size-6`})}),(0,q.jsx)(`p`,{className:`font-semibold text-[22px] tracking-tight`,children:`EnsoCode`}),(0,q.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:e.connState===`online`?`从左上角选择会话,或新建一个`:e.stateLabel})]}):(0,q.jsx)(gpe,{ref:r,items:y,busy:t===null?!!e.syncing:l,loading:t===null,running:l,error:void 0,emptyTitle:e.projectName||`EnsoCode`,virtualize:!1,historyLoading:e.historyLoading,hasOlder:e.hasOlder,firstItemIndex:b??0,onStartReached:e.hasOlder?C:void 0},n),n!==null&&(0,q.jsx)(`div`,{className:`phone-dock @container shrink-0 pt-1 pb-safe`,children:(0,q.jsxs)(`div`,{className:`enso-chat-col mx-auto w-full max-w-2xl px-4 @min-[56rem]:max-w-3xl @min-[72rem]:max-w-4xl @min-[84rem]:max-w-5xl @min-[96rem]:max-w-6xl @min-[112rem]:max-w-7xl`,children:[t?.retry&&(0,q.jsx)(Cpe,{retry:t.retry}),!d&&(0,q.jsx)(Sre,{conversationId:n,queued:(e.queued??[]).map(e=>({id:e.id,text:e.text}))}),e.goal&&!d&&(0,q.jsx)(bre,{conversationId:n,goal:{...e.goal,noProgressRuns:0}}),(0,q.jsx)(tfe,{conversationId:n},n),(0,q.jsx)(Ppe,{sessionId:n,tasks:t?.tasks??[],subagents:t?.subagents??[],readOnly:e.deviceReadOnly}),u?.outbox,u?.notice&&(0,q.jsx)(`p`,{className:`mb-1 rounded-md bg-destructive/10 px-2 py-1 text-destructive text-xs`,children:u.notice}),e.deviceReadOnly?(0,q.jsx)(`p`,{className:`mb-1 rounded-md bg-muted px-2 py-1 text-center text-muted-foreground text-xs`,children:U7(e.readOnlyRejected)}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(f_,{approvals:t?.approvals??[],onRespond:e.onApproval,clockOffset:e.clockOffset}),(0,q.jsx)(g_,{asks:t?.asks??[],onAnswer:e.onAsk,clockOffset:e.clockOffset,autoFocus:!1})]}),!d&&(0,q.jsx)(gre,{commands:h,running:l,busy:l,locked:e.newSessionBusy||!!u&&i||(t?.approvals??[]).length>0,focusKey:u?.chatId?`bot-chat:${u.chatId}`:n,autoFocus:!1,enterToSend:!1,toolbar:e.modelLabel&&e.onOpenConfig?(0,q.jsxs)(`button`,{type:`button`,onClick:e.onOpenConfig,className:`flex min-w-0 items-center gap-0.5 rounded-md px-1.5 py-1 text-[11px] text-muted-foreground transition-colors hover:bg-accent hover:text-foreground`,children:[(0,q.jsx)(`span`,{className:`truncate`,children:e.modelLabel}),(0,q.jsx)(Be,{className:`h-3 w-3 shrink-0`})]}):void 0,onSend:e=>{w(e.text,e.images)},onAbort:e.onAbort,voice:e.voice,voiceMode:`hold`}),!d&&(0,q.jsx)(ime,{usageTotals:e.usageTotals,context:e.context})]})})]})})}function G7(e){return K(`t-tab flex min-w-0 shrink-0 items-center gap-1.5 rounded-md px-2 py-1 text-xs transition-colors`,e?`font-medium`:`text-muted-foreground`)}async function ame(e,t){if(e.data.length*.75<=t)return e;let n=await(await fetch(`data:${e.mimeType};base64,${e.data}`)).blob();return B7(new File([n],`image`,{type:e.mimeType}),t)}function ome(e){if(e==null||!Number.isFinite(e)||e<0)return null;let t=Math.round(e);return t<1?`<1ms`:`${t}ms`}function sme(e,t){let n=e===`direct`?`直连`:`中继`,r=ome(t);return r?`已连接 · ${n} · ${r}`:`已连接 · ${n}`}var K7=`enso-phone-drawer-segment`;function cme(){let e=localStorage.getItem(K7);return e===`bot`||e===`code`?e:null}function lme(e){localStorage.setItem(K7,e)}function q7(e,t){if(!e)return!1;let n=cme();return n?n===`bot`:t!==null}function ume(e,t=0){let n=new Map;for(let r of e)if(!(r.seq<=t)&&((r.kind===`human`||r.newConversation)&&n.clear(),r.kind===`bot`&&r.botId&&n.delete(r.botId),r.failure&&n.set(r.failure.botId,r.id),r.retryOf))for(let[e,t]of n)t===r.retryOf&&n.delete(e);return new Set(n.values())}function dme(e,t){let n=RegExp(`#${t}(?!\\d)`).exec(e);if(!n)return;let r=n.index+n[0].length;return[e.slice(0,n.index),n[0],e.slice(r)]}function fme({status:e}){return e===`running`?(0,q.jsx)(Ct,{className:`h-3 w-3 shrink-0 animate-spin text-brand`}):e===`done`?(0,q.jsx)(ze,{className:`h-3 w-3 shrink-0 text-muted-foreground`}):e===`denied`?(0,q.jsx)(tn,{className:`h-3 w-3 shrink-0 text-muted-foreground`}):e===`timeout`?(0,q.jsx)($e,{className:`h-3 w-3 shrink-0 text-warning`}):(0,q.jsx)(yn,{className:`h-3 w-3 shrink-0 text-destructive`})}function pme({item:e,bots:t,clockOffset:n,onOpen:r}){let i=t.get(e.botId),a=e.ownerBotId?t.get(e.ownerBotId):void 0,o=e.state!==`queued`,[s,c]=(0,W.useState)(()=>Date.now());(0,W.useEffect)(()=>{if(!o)return;let e=window.setInterval(()=>c(Date.now()),1e3);return()=>window.clearInterval(e)},[o]);let l=s-n,u=o&&r?()=>r(e.conversationId):void 0;return(0,q.jsxs)(`button`,{type:`button`,disabled:!u,onClick:u,className:`flex w-full gap-2 rounded-lg border bg-muted/30 px-2.5 py-2 text-left disabled:cursor-default`,children:[(0,q.jsx)(Ya,{bot:i,size:`sm`,busy:o}),(0,q.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,q.jsxs)(`span`,{className:`flex items-center gap-1.5 text-xs`,children:[(0,q.jsxs)(`span`,{className:`truncate font-medium`,children:[i?.name??`成员`,a?(0,q.jsxs)(`span`,{className:`font-normal text-muted-foreground`,children:[` 替 `,a.name]}):null]}),(0,q.jsx)(`span`,{className:K(`shrink-0`,o?`text-brand`:`text-muted-foreground`),children:Bo(e)}),o&&e.startedAt!==void 0&&(0,q.jsx)(`span`,{className:`shrink-0 text-muted-foreground tabular-nums`,children:Uo(l-e.startedAt)}),u&&(0,q.jsx)(Ve,{className:`ml-auto h-3.5 w-3.5 shrink-0 text-muted-foreground`})]}),e.more>0&&(0,q.jsxs)(`span`,{className:`mt-1 block text-[11px] text-muted-foreground`,children:[`+`,e.more,` 个更早的步骤`]}),e.steps.map((e,t)=>(0,q.jsxs)(`span`,{className:`mt-1 flex items-center gap-1.5 text-[11px]`,children:[(0,q.jsx)(fme,{status:e.status}),(0,q.jsx)(`span`,{className:`shrink-0 font-medium`,children:e.name}),(0,q.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-muted-foreground`,children:e.detail}),e.status===`timeout`&&(0,q.jsx)(`span`,{className:`shrink-0 text-warning`,children:e.name===`ask_user`?`已超时未回答`:`已超时拒绝`}),(0,q.jsx)(`span`,{className:`shrink-0 text-muted-foreground tabular-nums`,children:e.durationMs===void 0?e.startedAt===void 0?``:Uo(l-e.startedAt):Uo(e.durationMs)})]},t))]})]})}var J7=e=>[...e].sort((e,t)=>t.activityAt-e.activityAt);function mme(e,t,n=10){let r=J7(e),i=e=>e.id===t.currentId||e.id===t.rootId?0:e.unread||e.running?1:2,a=new Set([...r].sort((e,t)=>i(e)-i(t)).slice(0,n).map(e=>e.id));return r.filter(e=>a.has(e.id)).sort((e,n)=>Number(n.id===t.rootId)-Number(e.id===t.rootId))}function hme(e,t,n){let r=t.trim().toLowerCase();return J7(e).filter(e=>(n===`all`||(n===`unread`?e.unread:e.running))&&(!r||`${e.title}\n${e.preview??``}`.toLowerCase().includes(r)))}var gme=W.forwardRef(function(e,t){let{render:n,className:r,id:i,name:a,value:o,disabled:s=!1,onValueChange:c,defaultValue:l,autoFocus:u=!1,style:d,...f}=e,{state:p,name:m,disabled:h,setTouched:g,setDirty:_,validityData:v,setFocused:y,setFilled:b,validationMode:x,validation:S}=sj(),{clearErrors:C}=lj(),w=h||s,T=m??a,E={...p,disabled:w},{labelId:D}=uj(),O=dj({id:i});Z(()=>{let e=o!=null;S.inputRef.current?.value||e&&o!==``?b(!0):e&&o===``&&b(!1)},[S.inputRef,b,o]);let k=W.useRef(null);Z(()=>{u&&k.current===pb(uy(k.current))&&y(!0)},[u,y]);let[A]=eA({controlled:o,default:l,name:`FieldControl`,state:`value`}),j=o!==void 0,M=j?A:void 0,N=iy(()=>S.inputRef.current?.value);return cj(S.inputRef,O,M,N,!w,a),nr(`input`,e,{ref:[t,k],state:E,props:[{id:O,disabled:w,name:T,ref:S.inputRef,"aria-labelledby":D,autoFocus:u,...j?{value:M}:{defaultValue:l},onChange(e){let t=e.currentTarget.value;c?.(t,ky(hy,e.nativeEvent)),_(t!==(v.initialValue??``)),b(t!==``),e.nativeEvent.defaultPrevented||(C(T),S.change(t))},onFocus(){y(!0)},onBlur(e){g(!0),y(!1),x===`onBlur`&&S.commit(e.currentTarget.value)},onKeyDown(e){e.currentTarget.tagName===`INPUT`&&e.key===`Enter`&&(g(!0),S.commit(e.currentTarget.value))}},f,e=>S.getValidationProps(w,e)],stateAttributesMapping:aj})}),_me=W.forwardRef(function(e,t){return(0,q.jsx)(gme,{ref:t,...e})});function Y7({className:e,size:t=`default`,unstyled:n=!1,...r}){return(0,q.jsx)(`span`,{className:K(!n&&`relative inline-flex w-full rounded-lg border border-input bg-background bg-clip-padding text-base shadow-xs ring-ring/24 transition-shadow before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] not-has-disabled:not-has-focus-visible:not-has-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)] has-focus-visible:has-aria-invalid:border-destructive/64 has-focus-visible:has-aria-invalid:ring-destructive/16 has-aria-invalid:border-destructive/36 has-focus-visible:border-ring has-disabled:opacity-64 has-[:disabled,:focus-visible,[aria-invalid]]:shadow-none has-focus-visible:ring-[3px] sm:text-sm dark:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border dark:has-aria-invalid:ring-destructive/24 dark:not-has-disabled:not-has-focus-visible:not-has-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/8%)]`,e)||void 0,"data-size":t,"data-slot":`input-control`,children:(0,q.jsx)(_me,{className:K(`h-8.5 w-full min-w-0 rounded-[inherit] px-[calc(--spacing(3)-1px)] leading-8.5 outline-none placeholder:text-muted-foreground/72 sm:h-7.5 sm:leading-7.5`,t===`sm`&&`h-7.5 px-[calc(--spacing(2.5)-1px)] leading-7.5 sm:h-6.5 sm:leading-6.5`,t===`lg`&&`h-9.5 leading-9.5 sm:h-8.5 sm:leading-8.5`,r.type===`search`&&`[&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none [&::-webkit-search-results-button]:appearance-none [&::-webkit-search-results-decoration]:appearance-none`,r.type===`file`&&`text-muted-foreground file:me-3 file:bg-transparent file:font-medium file:text-foreground file:text-sm`),"data-slot":`input`,size:typeof t==`number`?t:void 0,...r})})}var X7=RT,vme=bT;function yme({className:e,...t}){return(0,q.jsx)(kv,{className:K(`fixed inset-0 z-50 bg-black/32 backdrop-blur-sm transition-opacity duration-150 ease-out data-ending-style:opacity-0 data-starting-style:opacity-0`,e),"data-slot":`sheet-backdrop`,...t})}function bme({className:e,side:t,inset:n=!1,...r}){return(0,q.jsx)(zT,{className:K(`fixed inset-0 z-50 grid`,t===`bottom`&&`grid grid-rows-[1fr_auto] pt-12`,t===`top`&&`grid grid-rows-[auto_1fr] pb-12`,t===`left`&&`flex justify-start`,t===`right`&&`flex justify-end`,n&&`sm:p-4`),"data-slot":`sheet-viewport`,...r})}function Z7({className:e,children:t,showCloseButton:n=!0,side:r=`right`,inset:i=!1,...a}){return(0,q.jsxs)(vme,{children:[(0,q.jsx)(NE,{}),(0,q.jsx)(yme,{}),(0,q.jsx)(bme,{inset:i,side:r,children:(0,q.jsxs)(_T,{className:K(`relative flex max-h-full min-h-0 w-full min-w-0 flex-col bg-popover bg-clip-padding text-popover-foreground shadow-lg transition-[opacity,translate] duration-150 [transition-timing-function:cubic-bezier(0.34,1.56,0.64,1)] will-change-transform before:pointer-events-none before:absolute before:inset-0 before:shadow-[0_1px_--theme(--color-black/4%)] data-ending-style:opacity-0 data-starting-style:opacity-0 max-sm:before:hidden dark:bg-clip-border dark:before:shadow-[0_-1px_--theme(--color-white/8%)]`,r===`bottom`&&`row-start-2 border-t data-ending-style:translate-y-8 data-starting-style:translate-y-8`,r===`top`&&`data-ending-style:-translate-y-8 data-starting-style:-translate-y-8 border-b`,r===`left`&&`data-ending-style:-translate-x-8 data-starting-style:-translate-x-8 w-[calc(100%-(--spacing(12)))] max-w-md border-e`,r===`right`&&`col-start-2 w-[calc(100%-(--spacing(12)))] max-w-md border-s data-ending-style:translate-x-8 data-starting-style:translate-x-8`,i&&`before:hidden sm:rounded-2xl sm:border sm:before:rounded-[calc(var(--radius-2xl)-1px)] sm:**:data-[slot=sheet-footer]:rounded-b-[calc(var(--radius-2xl)-1px)]`,e),"data-slot":`sheet-popup`,...a,children:[t,n&&(0,q.jsx)(Ay,{"aria-label":`Close`,className:`absolute end-2 top-2`,render:(0,q.jsx)(Ui,{size:`icon`,variant:`ghost`}),children:(0,q.jsx)(yn,{})})]})})]})}function Q7({className:e,...t}){return(0,q.jsx)(`div`,{className:K(`flex flex-col gap-2 p-6 in-[[data-slot=sheet-popup]:has([data-slot=sheet-panel])]:pb-3 max-sm:pb-4`,e),"data-slot":`sheet-header`,...t})}function $7({className:e,...t}){return(0,q.jsx)(BT,{className:K(`font-heading text-xl leading-none`,e),"data-slot":`sheet-title`,...t})}function e9(e,t,n=Date.now()){let r=new Intl.RelativeTimeFormat(t,{numeric:`auto`}),i=e-n,a=Math.abs(i);return a<6e4?r.format(0,`second`):a<36e5?r.format(Math.trunc(i/6e4),`minute`):a<864e5?r.format(Math.trunc(i/36e5),`hour`):a<2592e6?r.format(Math.trunc(i/864e5),`day`):a<31536e6?r.format(Math.trunc(i/2592e6),`month`):r.format(Math.trunc(i/31536e6),`year`)}function t9({entry:e}){return(0,q.jsxs)(q.Fragment,{children:[e.running&&(0,q.jsx)(`span`,{className:`h-1.5 w-1.5 shrink-0 rounded-full bg-warning`}),(0,q.jsx)(`span`,{className:`shrink-0 text-muted-foreground text-xs`,children:e9(e.activityAt,`zh`)})]})}function xme({threads:e,status:t}){let[n,r]=(0,W.useState)(!1),[i,a]=(0,W.useState)(``),{entries:o,currentId:s,rootId:c,disabledHint:l}=e,u=o.find(e=>e.id===s),d=mme(o,{currentId:s,rootId:c}),f=o.length-d.length,p=hme(o,i,`all`),m=t=>{!l&&t!==s&&e.onSelect(t)};return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(Gne,{children:[(0,q.jsxs)(Kne,{"aria-label":`切换话题`,className:`mx-auto flex max-w-full items-center justify-center gap-0.5 text-[11px] text-muted-foreground`,children:[(0,q.jsxs)(`span`,{className:`truncate`,children:[u?.title??`主话题`,t&&` · ${t}`]}),(0,q.jsx)(Be,{className:`h-3 w-3 shrink-0`})]}),(0,q.jsxs)(qne,{className:`w-72 max-w-[calc(100vw-1rem)]`,children:[(0,q.jsxs)(Jne,{children:[(0,q.jsx)(Yne,{children:`话题`}),d.map(e=>(0,q.jsxs)(rj,{disabled:!!l&&e.id!==s,onClick:()=>m(e.id),children:[(0,q.jsx)(ze,{className:K(e.id!==s&&`invisible`)}),(0,q.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.title}),(0,q.jsx)(t9,{entry:e})]},e.id))]}),(0,q.jsx)(Xne,{}),f>0&&(0,q.jsxs)(rj,{onClick:()=>{a(``),r(!0)},children:[(0,q.jsx)(St,{}),`全部话题(`,o.length,`)`]}),(0,q.jsxs)(rj,{disabled:!!l,onClick:e.onCreate,children:[(0,q.jsx)(Dt,{}),`新话题`]}),l&&(0,q.jsx)(`p`,{className:`px-2 py-1.5 text-muted-foreground text-xs`,children:l})]})]}),(0,q.jsx)(X7,{open:n,onOpenChange:r,children:(0,q.jsxs)(Z7,{side:`bottom`,className:`max-h-[80vh] pb-safe`,children:[(0,q.jsx)(Q7,{children:(0,q.jsxs)($7,{children:[`全部话题(`,o.length,`)`]})}),(0,q.jsx)(`div`,{className:`px-4 pb-2`,children:(0,q.jsx)(Y7,{value:i,placeholder:`搜索话题…`,onChange:e=>a(e.target.value)})}),l&&(0,q.jsx)(`p`,{className:`px-4 pb-2 text-muted-foreground text-xs`,children:l}),(0,q.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-2 pb-3`,children:[p.map(e=>(0,q.jsxs)(`button`,{type:`button`,disabled:!!l&&e.id!==s,onClick:()=>{m(e.id),r(!1)},className:`flex w-full items-center gap-2 rounded-md px-2 py-2 text-left hover:bg-accent disabled:opacity-60`,children:[(0,q.jsx)(ze,{className:K(`h-4 w-4 shrink-0`,e.id!==s&&`invisible`)}),(0,q.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,q.jsx)(`span`,{className:`block truncate text-sm`,children:e.title}),e.preview&&(0,q.jsx)(`span`,{className:`block truncate text-muted-foreground text-xs`,children:e.preview})]}),(0,q.jsx)(t9,{entry:e})]},e.id)),p.length===0&&(0,q.jsx)(`p`,{className:`py-8 text-center text-muted-foreground text-sm`,children:`没有匹配的话题`})]})]})})]})}var Sme={queued:`排队中`,running:`进行中`,completed:`已完成`,failed:`失败`,canceled:`已取消`,blocked:`卡住了`},n9=4,Cme=e=>new Date(e).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`}),wme={started:{icon:Je,className:`border-brand/50 text-brand`},blocked:{icon:Ge,className:`border-warning/60 text-warning`},delivered:{icon:Ke,className:`border-success/60 text-success`}};function Tme({entry:e,bots:t}){let n=!!e.taskId,[r,i]=(0,W.useState)(!n),a=(0,q.jsxs)(q.Fragment,{children:[n&&(0,q.jsx)(Ve,{"aria-hidden":!0,className:K(`h-3 w-3 shrink-0 transition-transform`,r&&`rotate-90`)}),(0,q.jsxs)(`span`,{className:`font-medium`,children:[t.get(e.from)?.name??`成员`,` → `,t.get(e.to)?.name??`成员`]}),(0,q.jsx)(`span`,{className:K(`rounded px-1.5 py-0.5`,e.state===`running`||e.state===`queued`?`bg-brand/10 text-brand`:e.state===`failed`?`bg-destructive/10 text-destructive`:`bg-muted text-muted-foreground`),children:Sme[e.state]})]});return(0,q.jsxs)(`div`,{className:`rounded-lg border bg-muted/30 px-3 py-2 text-xs`,children:[n?(0,q.jsx)(`button`,{type:`button`,"aria-expanded":r,"aria-label":r?`收起委派结果`:`展开委派结果`,className:`flex w-full items-center gap-1.5 text-left`,onClick:()=>i(e=>!e),children:a}):(0,q.jsx)(`p`,{className:`flex items-center gap-1.5`,children:a}),r&&e.summary&&(0,q.jsx)(`p`,{className:`mt-1 line-clamp-3 text-muted-foreground`,children:e.summary})]})}function r9(e,t){let n=[...t].sort((e,t)=>t.length-e.length),r=[],i=e,a=0;for(;i;){let e=i.indexOf(`@`),t=e<0?void 0:n.find(t=>i.startsWith(t,e+1));if(e<0||!t){r.push(i);break}e>0&&r.push(i.slice(0,e)),r.push((0,q.jsxs)(`span`,{className:`font-medium text-brand`,children:[`@`,t]},a++)),i=i.slice(e+1+t.length)}return r}function Eme(e){let{chat:t,bots:n,timeline:r,state:i}=e,a=(0,W.useRef)(null),o=(0,W.useRef)(null),s=(0,W.useRef)(null),c=(0,W.useRef)(!0),l=(0,W.useRef)(null),u=(0,W.useRef)(null),[d,f]=(0,W.useState)(``),[p,m]=(0,W.useState)(0),[h,g]=(0,W.useState)([]),[_,v]=(0,W.useState)(!1),[y,b]=(0,W.useState)(null),x=r?.entries??[],S=t.epochSeq??x.findLast(e=>e.kind===`system`&&e.newConversation)?.seq??0,[C,w]=(0,W.useState)(!1);(0,W.useEffect)(()=>w(!1),[t.id,S]);let T=S>0&&!C,E=ko(x,S,C),D=ume(x,S),O=t.members.map(e=>n.get(e)).filter(e=>!!(e&&!e.archived)),k=O.map(e=>e.name),A=!!i?.current||t.status!==`idle`,j=Mo(d,p),M=j?Po(j.query,O):[],N=E[0]?.seq,P=E.at(-1)?.seq;(0,W.useLayoutEffect)(()=>{let e=a.current;if(!e)return;let t=s.current;t?(s.current=null,e.scrollTop=t.top+(e.scrollHeight-t.height)):c.current&&(e.scrollTop=e.scrollHeight)},[N,P,i?.current,e.activities.length]);let F=()=>{let t=a.current;!r?.hasOlder||!t||e.historyLoading||e.connState!==`online`||T&&(x[0]?.seq??S)<=S||(s.current={height:t.scrollHeight,top:t.scrollTop},e.onLoadOlder())},I=e=>{if(!j)return;let t=Fo(d,j,p,e.name);f(t.text),m(t.caret),requestAnimationFrame(()=>{o.current?.focus(),o.current?.setSelectionRange(t.caret,t.caret)})},L=(0,W.useRef)(h);L.current=h,(0,W.useEffect)(()=>()=>{for(let e of L.current)URL.revokeObjectURL(e.url)},[]);let R=e=>{let t=[...e??[]].filter(e=>e.type.startsWith(`image/`)).slice(0,n9-h.length).map(e=>({file:e,url:URL.createObjectURL(e)}));g(e=>[...e,...t]),b(null)},z=e=>{URL.revokeObjectURL(e),g(t=>t.filter(t=>t.url!==e))},B=async()=>{if(!d.trim()&&h.length===0||_||e.newSessionBusy)return;let t=[];if(h.length){v(!0);try{t=await Gpe(h.map(e=>e.file))}catch(e){b(e instanceof Error?e.message:`图片处理失败`);return}finally{v(!1)}}e.onSend(d,t);for(let e of h)URL.revokeObjectURL(e.url);g([]),b(null),f(``),m(0),c.current=!0},V=e=>{let t=o.current,n=t?.selectionStart??d.length,r=t?.selectionEnd??d.length,i=d.slice(0,n)+e+d.slice(r);f(i),m(n+e.length),requestAnimationFrame(()=>{t?.focus(),t?.setSelectionRange(n+e.length,n+e.length)})},H=t=>{switch(t.kind){case`human`:return(0,q.jsxs)(`div`,{className:`flex flex-col items-end`,children:[t.text&&(0,q.jsxs)(`div`,{className:`max-w-[85%] whitespace-pre-wrap break-words rounded-2xl rounded-br-md bg-brand/10 px-3 py-2 text-sm`,children:[r9(t.text,k),t.truncated&&(0,q.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`消息过长,仅显示部分内容`})]}),t.images?.length?(0,q.jsx)(ua,{target:{chatId:e.chat.id,entryId:t.id}}):null]},t.seq);case`bot`:{let r=n.get(t.botId);return(0,q.jsxs)(`div`,{className:`flex gap-2`,children:[(0,q.jsx)(Ya,{bot:r,size:`sm`}),(0,q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,q.jsxs)(`p`,{className:`flex items-baseline gap-1.5 text-xs`,children:[(0,q.jsx)(`span`,{className:`font-medium`,children:r?.name??`成员`}),(0,q.jsx)(`span`,{className:`text-muted-foreground`,children:Cme(t.at)})]}),(0,q.jsxs)(`div`,{className:`mt-0.5 min-w-0 text-sm`,children:[(0,q.jsx)(C5,{text:t.text}),t.truncated&&(0,q.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`消息过长,仅显示部分内容`})]}),(0,q.jsx)(ua,{target:{chatId:e.chat.id,entryId:t.id}}),(0,q.jsxs)(`button`,{type:`button`,onClick:()=>e.onOpenProcess(t.conversationId),className:`mt-0.5 flex items-center gap-0.5 text-muted-foreground text-xs hover:text-foreground`,children:[(0,q.jsx)(Ve,{className:`h-3 w-3`}),`查看过程`]})]})]},t.seq)}case`delegation`:return(0,q.jsx)(Tme,{entry:t,bots:n},t.seq);case`progress`:{let e=n.get(t.botId),r=wme[t.phase],i=r.icon,a=dme(t.text,t.taskSeq);return(0,q.jsxs)(`div`,{"data-phase":t.phase,className:`flex gap-2 text-xs`,children:[(0,q.jsx)(Ya,{bot:e,size:`sm`}),(0,q.jsxs)(`div`,{className:K(`flex min-w-0 items-start gap-1.5 rounded-md border-l-2 bg-muted/50 px-2 py-1`,r.className),children:[(0,q.jsx)(i,{"aria-hidden":!0,className:`mt-px h-3.5 w-3.5 shrink-0`}),(0,q.jsxs)(`p`,{className:`line-clamp-2 min-w-0 break-words text-muted-foreground`,children:[(0,q.jsx)(`span`,{className:`font-medium text-foreground`,children:e?.name??`成员`}),` `,a?(0,q.jsxs)(q.Fragment,{children:[r9(a[0],k),(0,q.jsx)(`span`,{className:`font-medium text-foreground`,children:a[1]}),r9(a[2],k)]}):r9(t.text,k)]})]})]},t.seq)}case`system`:return(0,q.jsxs)(`p`,{className:`text-center text-muted-foreground text-xs`,children:[t.text,D.has(t.id)&&e.onRetry&&!e.deviceReadOnly&&(0,q.jsx)(`button`,{type:`button`,className:`ml-2 underline disabled:opacity-50`,disabled:A||e.connState!==`online`,onClick:()=>e.onRetry?.(t.id),children:`重试`})]},t.seq)}},ee=i?.current?n.get(i.current):void 0;return(0,q.jsxs)(`div`,{className:`phone-chat-root flex h-full min-h-0 flex-col`,children:[(0,q.jsxs)(`header`,{className:`flex shrink-0 items-center gap-1 border-b bg-background px-2 py-2 pt-safe`,children:[e.drawerDocked?(0,q.jsx)(`span`,{className:`h-9 w-9 shrink-0`}):(0,q.jsx)(`button`,{type:`button`,onClick:e.onOpenDrawer,"aria-label":`打开会话列表`,className:`flex h-9 w-9 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground`,children:(0,q.jsx)(Lt,{className:`h-4.5 w-4.5`})}),(0,q.jsxs)(`div`,{className:`min-w-0 flex-1 text-center`,children:[(0,q.jsx)(`p`,{className:`truncate font-medium text-sm`,children:t.title||`群聊`}),e.threads?(0,q.jsx)(xme,{threads:e.threads,status:e.connState===`online`?void 0:e.stateLabel}):(0,q.jsx)(`p`,{className:`truncate text-[11px] text-muted-foreground`,children:e.connState===`online`?`${t.members.length} 位成员`:e.stateLabel})]}),e.threads?(0,q.jsx)(`button`,{type:`button`,onClick:e.threads.onCreate,disabled:!!e.threads.disabledHint,"aria-label":`新话题`,title:e.threads.disabledHint??`新话题`,className:`flex h-9 w-9 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground disabled:opacity-40`,children:(0,q.jsx)(on,{className:`h-4.5 w-4.5`})}):(0,q.jsx)(`button`,{type:`button`,onClick:e.onNewSession,disabled:!e.canCreate||e.deviceReadOnly||_||e.connState!==`online`,"aria-label":`新建会话`,title:e.newSessionHint??`新建会话`,className:`flex h-9 w-9 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground disabled:opacity-40`,children:(0,q.jsx)(on,{className:`h-4.5 w-4.5`})})]}),(0,q.jsxs)(`div`,{ref:a,onScroll:e=>{let t=e.currentTarget;c.current=t.scrollHeight-t.scrollTop-t.clientHeight<40,t.scrollTop<60&&F()},className:`min-h-0 flex-1 space-y-3 overflow-y-auto px-3 py-3`,children:[r===void 0?(0,q.jsxs)(`p`,{className:`flex items-center justify-center gap-1.5 py-8 text-muted-foreground text-sm`,children:[(0,q.jsx)(Ct,{className:`h-4 w-4 animate-spin`}),`读取中…`]}):r.hasOlder&&(!T||(x[0]?.seq??S)>S)?(0,q.jsx)(`button`,{type:`button`,onClick:F,disabled:e.historyLoading||e.connState!==`online`,className:`w-full py-1 text-center text-muted-foreground text-xs`,children:e.historyLoading?`加载中…`:`加载更早的消息`}):E.length===0?(0,q.jsx)(`p`,{className:`py-8 text-center text-muted-foreground text-sm`,children:`@ 成员开始对话,未 @ 时由群主回复`}):null,S>0&&(0,q.jsx)(`button`,{type:`button`,className:`w-full py-1 text-center text-muted-foreground text-xs`,onClick:()=>{w(!C),C&&r?.history?e.onJumpLatest?.():!C&&r?.hasOlder&&!x.some(e=>e.seq<S)&&e.onLoadOlder()},children:T?`更早的对话 · ${S-1} 条`:`收起更早的对话`}),r?.history&&(0,q.jsx)(`button`,{type:`button`,className:`w-full py-1 text-center text-brand text-xs`,onClick:()=>{c.current=!0,e.onJumpLatest?.()},children:`回到最新消息`}),E.map(H),e.activities.map(t=>(0,q.jsx)(pme,{item:t,bots:n,clockOffset:e.clockOffset,onOpen:e.onOpenProcess},t.conversationId)),ee&&e.activities.length===0&&(0,q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,q.jsx)(Ya,{bot:ee,size:`sm`,busy:!0}),(0,q.jsxs)(`span`,{className:`text-muted-foreground text-xs`,children:[ee.name,` 正在回复…`]})]})]}),(0,q.jsxs)(`div`,{className:`phone-dock shrink-0 space-y-2 px-3 pt-1 pb-safe`,children:[e.outbox,e.notice&&(0,q.jsx)(`p`,{className:`rounded-md bg-destructive/10 px-2 py-1 text-destructive text-xs`,children:e.notice}),e.deviceReadOnly&&(0,q.jsx)(`p`,{className:`rounded-md bg-muted px-2 py-1 text-center text-muted-foreground text-xs`,children:U7(e.readOnlyRejected)}),!e.deviceReadOnly&&e.pending.map(({sessionId:t,botId:r,view:i})=>i.approvals.length>0||i.asks.length>0?(0,q.jsxs)(`div`,{className:`space-y-1`,children:[(0,q.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:n.get(r)?.name??`成员`}),(0,q.jsx)(f_,{approvals:i.approvals,clockOffset:e.clockOffset,onRespond:(n,r)=>e.onApproval(t,n,r)}),(0,q.jsx)(g_,{asks:i.asks,clockOffset:e.clockOffset,onAnswer:(n,r)=>e.onAsk(t,n,r),autoFocus:!1})]},t):null),(0,q.jsxs)(`div`,{className:K(`relative`,e.deviceReadOnly&&`hidden`),children:[M.length>0&&(0,q.jsx)(`div`,{className:`absolute right-0 bottom-full left-0 mb-1 max-h-48 overflow-y-auto rounded-lg border bg-popover p-1 shadow-md`,children:M.map(e=>{let t=n.get(e.id);return(0,q.jsxs)(`button`,{type:`button`,onMouseDown:e=>e.preventDefault(),onClick:()=>I(e),className:`flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm hover:bg-accent`,children:[t?(0,q.jsx)(Ya,{bot:t,size:`sm`}):(0,q.jsx)(`span`,{className:`flex h-7 w-7 items-center justify-center rounded-full bg-muted text-xs`,children:`@`}),(0,q.jsx)(`span`,{className:`font-medium`,children:e.name}),t?.title&&(0,q.jsx)(`span`,{className:`truncate text-muted-foreground text-xs`,children:t.title})]},e.id)})}),y&&(0,q.jsx)(`p`,{className:`mb-1 text-destructive text-xs`,children:y}),h.length>0&&(0,q.jsx)(`div`,{className:`mb-1.5 flex gap-1.5`,children:h.map(e=>(0,q.jsxs)(`div`,{className:`relative h-14 w-14 overflow-hidden rounded-lg border`,children:[(0,q.jsx)(`img`,{src:e.url,alt:``,className:`h-full w-full object-cover`}),(0,q.jsx)(`button`,{type:`button`,"aria-label":`移除图片`,onClick:()=>z(e.url),className:`absolute top-0.5 right-0.5 flex h-4 w-4 items-center justify-center rounded-full bg-black/60 text-white`,children:(0,q.jsx)(yn,{className:`h-3 w-3`})})]},e.url))}),(0,q.jsxs)(`div`,{ref:u,className:`flex items-end gap-2 rounded-2xl border bg-background px-3 py-2`,children:[(0,q.jsx)(`input`,{ref:l,type:`file`,accept:`image/*`,multiple:!0,hidden:!0,onChange:e=>{R(e.target.files),e.target.value=``}}),(0,q.jsx)(`button`,{type:`button`,"aria-label":`添加图片`,disabled:h.length>=n9,onClick:()=>l.current?.click(),className:`flex h-8 w-8 shrink-0 items-center justify-center rounded-full text-muted-foreground disabled:opacity-40`,children:(0,q.jsx)(_t,{className:`h-4.5 w-4.5`})}),e.voice&&(0,q.jsx)(`span`,{className:`flex h-8 shrink-0 items-center justify-center [&>div>button]:h-8 [&>div>button]:min-w-8 [&>div>button]:rounded-full`,children:(0,q.jsx)(DO,{startSession:e.voice,disabled:_,holdScope:u,onText:V})}),(0,q.jsx)(`textarea`,{ref:o,rows:1,value:d,placeholder:`@ 成员,或直接说…`,onChange:e=>{f(e.target.value),m(e.target.selectionStart??e.target.value.length)},onSelect:e=>m(e.currentTarget.selectionStart??0),className:`max-h-32 min-h-6 flex-1 resize-none bg-transparent text-sm outline-none field-sizing-content`}),A&&(0,q.jsx)(`button`,{type:`button`,"aria-label":`停止`,onClick:e.onStop,className:`flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-muted text-foreground`,children:(0,q.jsx)(un,{className:`h-3.5 w-3.5 fill-current`})}),(0,q.jsx)(`button`,{type:`button`,"aria-label":`发送`,disabled:!d.trim()&&h.length===0||_||e.newSessionBusy||!e.outbox&&e.connState!==`online`,onClick:()=>void B(),className:`flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-brand text-brand-foreground disabled:opacity-40`,children:(0,q.jsx)(Me,{className:`h-4 w-4`})})]})]})]})]})}var i9=e=>typeof window.matchMedia==`function`&&window.matchMedia(e).matches;function Dme(e){return(0,W.useSyncExternalStore)(t=>{if(typeof window.matchMedia!=`function`)return()=>{};let n=window.matchMedia(e);return n.addEventListener(`change`,t),()=>n.removeEventListener(`change`,t)},()=>i9(e),()=>i9(e))}var Ome=`(min-width: 900px)`;function kme(e){let t=W.useRef(!0);t.current&&(t.current=!1,e())}var a9=W.createContext(null);function o9(){let e=W.useContext(a9);if(e===null)throw Error(Rn(60));return e}var Ame=(e,t)=>Object.is(e,t);function s9(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function c9(e,t,n){return!e||e.length===0?-1:e.findIndex(e=>e!==void 0&&s9(e,t,n))}function jme(e,t,n){return e.filter(e=>!s9(t,e,n))}function l9(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function u9(e){return e!=null&&e.length>0&&typeof e[0]==`object`&&e[0]!=null&&`items`in e[0]}function Mme(e){if(!Array.isArray(e))return e!=null&&`null`in e;let t=e;if(u9(t)){for(let e of t)for(let t of e.items)if(t&&t.value==null&&t.label!=null)return!0;return!1}for(let e of t)if(e&&e.value==null&&e.label!=null)return!0;return!1}function d9(e,t){if(t&&e!=null)return t(e)??``;if(e&&typeof e==`object`){if(`label`in e&&e.label!=null)return String(e.label);if(`value`in e)return String(e.value)}return l9(e)}function f9(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?l9(e.value):l9(e)}function p9(e,t,n){function r(){return d9(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e==`object`&&`label`in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??r();if(Array.isArray(t)){let n=t,i=u9(n)?n.flatMap(e=>e.items):n;if(typeof e!=`object`||!e){let t=i.find(t=>t.value===e);return t&&t.label!=null?t.label:r()}if(`value`in e){let t=i.find(t=>t&&t.value===e.value);if(t&&t.label!=null)return t.label}}return r()}function Nme(e,t,n){return e.reduce((e,r,i)=>(i>0&&e.push(`, `),e.push((0,q.jsx)(W.Fragment,{children:p9(r,t,n)},i)),e),[])}var m9={id:e=>e.id,labelId:e=>e.labelId,modal:e=>e.modal,items:e=>e.items,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,value:e=>e.value,hasSelectedValue:e=>{let{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:f9(t,r)!==``},hasNullItemLabel:(e,t)=>t?Mme(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMount:e=>e.forceMount,transitionStatus:e=>e.transitionStatus,openMethod:e=>e.openMethod,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{let n=e.isItemEqualToValue,r=e.value;return e.multiple?Array.isArray(r)&&r.some(e=>s9(t,e,n)):s9(t,r,n)},isSelectedByFocus:(e,t)=>e.selectedIndex===t,popupProps:e=>e.popupProps,triggerProps:e=>e.triggerProps,triggerElement:e=>e.triggerElement,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupSide:e=>e.popupSide,scrollUpArrowVisible:e=>e.scrollUpArrowVisible,scrollDownArrowVisible:e=>e.scrollDownArrowVisible,hasScrollArrows:e=>e.hasScrollArrows};function Pme(e,t,n=(e,t)=>e===t){return e.length===t.length&&e.every((e,r)=>n(e,t[r]))}function Fme(e){let{id:t,value:n,defaultValue:r=null,onValueChange:i,open:a,defaultOpen:o=!1,onOpenChange:s,name:c,form:l,autoComplete:u,disabled:d=!1,readOnly:f=!1,required:p=!1,modal:m=!0,actionsRef:h,inputRef:g,onOpenChangeComplete:_,items:v,multiple:y=!1,itemToStringLabel:b,itemToStringValue:x,isItemEqualToValue:S=Ame,highlightItemOnHover:C=!0,children:w}=e,{clearErrors:T}=lj(),{setDirty:E,setTouched:D,setFocused:O,validityData:k,setFilled:A,name:j,disabled:M,validation:N,validationMode:P}=sj(),F=dj({id:t}),I=M||d,L=j??c,[R,z]=eA({controlled:n,default:y?r??Zn:r,name:`Select`,state:`value`}),[B,V]=eA({controlled:a,default:o,name:`Select`,state:`open`}),H=W.useRef([]),ee=W.useRef([]),U=W.useRef(null),te=W.useRef(null),ne=W.useRef(0),re=W.useRef(null),ie=W.useRef([]),ae=W.useRef(!1),oe=W.useRef(null),se=W.useRef(null),ce=W.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),le=W.useRef(!1),{mounted:ue,setMounted:de,transitionStatus:fe}=uw(B),{openMethod:pe,triggerProps:me}=WT(B),he=Bn(()=>new ow({id:F,labelId:void 0,modal:m,multiple:y,itemToStringLabel:b,itemToStringValue:x,isItemEqualToValue:S,value:R,open:B,mounted:ue,transitionStatus:fe,items:v,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,ge=tw(he,m9.activeIndex),_e=tw(he,m9.selectedIndex),ve=tw(he,m9.triggerElement),ye=tw(he,m9.positionerElement),be=JA(pe),xe=pe??be,Se=W.useMemo(()=>y?``:f9(R,x),[y,R,x]),Ce=W.useMemo(()=>y&&Array.isArray(R)?R.map(e=>f9(e,x)):f9(R,x),[y,R,x]);cj(Ob(ve),F,R,iy(()=>Ce),!I,c);let we=W.useRef(R),Te=y?Array.isArray(R)&&R.length>0:R!=null&&Se!==``;Z(()=>{A(Te)},[Te,A]),Z(function(){let e=R,t=!1;if(y){let n=Array.isArray(R)?R:[];t=n.length===0,e=n[n.length-1]}let n=t?-1:c9(ie.current,e,S),r=n===-1?null:n;r===null&&(se.current=null),!B&&he.set(`selectedIndex`,r)},[y,B,R,S,he]);function Ee(e){let t=k.initialValue;return Array.isArray(e)&&Array.isArray(t)?!Pme(e,t,(e,t)=>s9(e,t,S)):e!==t}HT(R,()=>{T(L),E(Ee(R)),N.change(R)});let De=iy((e,t)=>{s?.(e,t),!t.isCanceled&&(V(e),!e&&(t.reason===`focus-out`||t.reason===`outside-press`)&&(D(!0),O(!1),P===`onBlur`&&N.commit(R)))}),Oe=iy(()=>{de(!1),he.update({activeIndex:null,openMethod:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1}),_?.(!1)});fw({enabled:!h,open:B,ref:U,onComplete(){B||Oe()}}),W.useImperativeHandle(h,()=>({unmount:Oe}),[Oe]);let G=iy((e,t)=>{i?.(e,t),!t.isCanceled&&z(e)}),ke=iy(e=>{let t=fE(e.scrollHeight,e.clientHeight),n=pE(e.scrollTop,t),r=n>0,i=n<t;he.set(`scrollUpArrowVisible`,r),he.set(`scrollDownArrowVisible`,i)}),Ae=Lw({open:B,onOpenChange:De,elements:{reference:ve,floating:ye}}),je=CS(Ae,{enabled:!f&&!I,event:`mousedown`}),Me=ES(Ae),Ne=rT(Ae,{enabled:!f&&!I,listRef:H,activeIndex:ge,selectedIndex:_e,disabledIndices:Zn,onNavigate(e){e===null&&!B||he.set(`activeIndex`,e)},focusItemOnHover:C}),Pe=iT(Ae,{enabled:!f&&!I&&(B||!y),listRef:ee,activeIndex:ge,selectedIndex:_e,disabledIndices:e=>Wne(H.current[e]),onMatch(e){B?he.set(`activeIndex`,e):G(ie.current[e],ky(hy))},onTyping(e){ae.current=e}}),Fe=W.useMemo(()=>Cn(Pe.reference,Ne.reference,Me.reference,je.reference,me),[je.reference,Pe.reference,Ne.reference,Me.reference,me]),Ie=W.useMemo(()=>Cn(pw,Pe.floating,Ne.floating,Me.floating),[Pe.floating,Ne.floating,Me.floating]),Le=Ne.item??Qn;kme(()=>{he.update({popupProps:Ie,triggerProps:Fe})}),he.useSyncedValues({id:F,modal:m,multiple:y,value:R,open:B,mounted:ue,transitionStatus:fe,popupProps:Ie,triggerProps:Fe,items:v,itemToStringLabel:b,itemToStringValue:x,isItemEqualToValue:S,openMethod:xe});let Re=W.useMemo(()=>({store:he,floatingContext:Ae,required:p,disabled:I,readOnly:f,multiple:y,highlightItemOnHover:C,setValue:G,setOpen:De,listRef:H,popupRef:U,scrollHandlerRef:te,handleScrollArrowVisibility:ke,scrollArrowsMountedCountRef:ne,itemProps:Le,valueRef:re,valuesRef:ie,labelsRef:ee,typingRef:ae,selectionRef:ce,firstItemTextRef:oe,selectedItemTextRef:se,validation:N,onOpenChangeComplete:_,alignItemWithTriggerActiveRef:le,initialValueRef:we}),[he,Ae,p,I,f,y,C,G,De,Le,N,_,ke]),ze=Vn(g,N.inputRef),Be=y?void 0:L,Ve=W.useMemo(()=>!y||!Array.isArray(R)||!L?null:R.map(e=>{let t=f9(e,x);return(0,q.jsx)(`input`,{type:`hidden`,form:l,name:L,value:t,disabled:I},t)}),[y,R,l,L,x,I]);return(0,q.jsxs)(a9.Provider,{value:Re,children:[w,(0,q.jsx)(`input`,{...N.getValidationProps(I,{onFocus(){he.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented||I||f)return;let t=e.currentTarget.value,n=ky(hy,e.nativeEvent);function r(){if(y)return;let e=t.toLowerCase(),r=ie.current.findIndex(t=>f9(t,x).toLowerCase()===e||d9(t,b).toLowerCase()===e);r===-1&&(r=ie.current.findIndex((t,n)=>{let r=ee.current[n];return r!=null&&r.toLowerCase()===e}));let i=ie.current[r];i!=null&&G(i,n)}he.set(`forceMount`,!0),queueMicrotask(r)}}),id:F&&Be==null?`${F}-hidden-input`:void 0,form:l,name:Be,autoComplete:u,value:Se,disabled:I,required:p&&!(y&&Te),readOnly:f,ref:ze,style:L?Fb:Pb,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Ve]})}function Ime(e,t){return e??t}var Lme=400,Rme={...Ev,...aj,popupSide:e=>e?{"data-popup-side":e}:null,value:()=>null},zme=W.forwardRef(function(e,t){let{render:n,className:r,id:i,disabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{setTouched:l,setFocused:u,validationMode:d,state:f,disabled:p}=sj(),{labelId:m}=uj(),{store:h,setOpen:g,selectionRef:_,validation:v,readOnly:y,required:b,alignItemWithTriggerActiveRef:x,disabled:S}=o9(),C=p||S||a,w=tw(h,m9.open),T=tw(h,m9.mounted),E=tw(h,m9.value),D=tw(h,m9.triggerProps),O=tw(h,m9.positionerElement),k=tw(h,m9.listElement),A=tw(h,m9.popupSide),j=tw(h,m9.id),M=tw(h,m9.labelId),N=tw(h,m9.hasSelectedValue),P=T&&O?A:null,F=i??j,I=Ime(m,M);dj({id:F});let L=Ob(O),R=W.useRef(null),{getButtonProps:z,buttonRef:B}=fy({disabled:C,native:o}),V=h.useStateSetter(`triggerElement`),H=By(),ee=By(),U=By();W.useEffect(()=>{if(w)return U.start(Lme,()=>{_.current.allowUnselectedMouseUp=!0,_.current.allowSelectedMouseUp=!0}),()=>{U.clear()};_.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},ee.clear()},[w,_,ee,U]);let te=Cn(D,{id:F,role:`combobox`,"aria-expanded":w,"aria-haspopup":`listbox`,"aria-controls":w?k?.id??Sb(O)?.id:void 0,"aria-labelledby":I,"aria-readonly":y||void 0,"aria-required":b||void 0,tabIndex:C?-1:0,onFocus(e){u(!0),w&&x.current&&g(!1,ky(hy,e.nativeEvent)),H.start(0,()=>{h.set(`forceMount`,!0)})},onBlur(e){mb(O,e.relatedTarget)||(l(!0),u(!1),d===`onBlur`&&v.commit(E))},onMouseDown(e){if(w)return;let t=uy(e.currentTarget);function n(e){if(!R.current)return;let t=e.target;mb(R.current,t)||mb(L.current,t)||zA(e,R.current)||g(!1,ky(Ty,e))}ee.start(0,()=>{t.addEventListener(`mouseup`,n,{once:!0})})}},c,z),ne=v.getValidationProps(C,te);ne.role=`combobox`;let re={...f,open:w,disabled:C,value:E,readOnly:y,popupSide:P,placeholder:!N};return nr(`button`,e,{ref:[t,R,B,V],state:re,stateAttributesMapping:Rme,props:ne})}),Bme={value:()=>null},Vme=W.forwardRef(function(e,t){let{className:n,render:r,children:i,placeholder:a,style:o,...s}=e,{store:c,valueRef:l}=o9(),u=tw(c,m9.value),d=tw(c,m9.items),f=tw(c,m9.itemToStringLabel),p=tw(c,m9.hasSelectedValue),m=!p&&a!=null&&i==null,h=tw(c,m9.hasNullItemLabel,m),g={value:u,placeholder:!p},_=null;return _=typeof i==`function`?i(u):i??(m&&!h?a:Array.isArray(u)?Nme(u,d,f):p9(u,d,f)),nr(`span`,e,{state:g,ref:[t,l],props:[{children:_},s],stateAttributesMapping:Bme})}),Hme=W.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{store:o}=o9();return nr(`span`,e,{state:{open:tw(o,m9.open)},ref:t,props:[{"aria-hidden":!0,children:`▼`},a],stateAttributesMapping:Tv})}),Ume=W.forwardRef(function(e,t){let{store:n}=o9(),r=tw(n,m9.mounted),i=tw(n,m9.forceMount);return r||i?(0,q.jsx)(rS,{ref:t,...e}):null}),h9=W.createContext(void 0);function g9(){let e=W.useContext(h9);if(!e)throw Error(Rn(59));return e}function _9(e,t){e&&Object.assign(e.style,t)}var v9={position:`relative`,maxHeight:`100%`,overflowX:`hidden`,overflowY:`auto`},Wme={position:`fixed`},Gme=W.forwardRef(function(e,t){let{anchor:n,className:r,render:i,positionMethod:a,side:o,align:s,sideOffset:c,alignOffset:l,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d,arrowPadding:f,sticky:p,disableAnchorTracking:m,alignItemWithTrigger:h=!0,collisionAvoidance:g=Xx,style:_,...v}=e,{store:y,listRef:b,labelsRef:x,alignItemWithTriggerActiveRef:S,selectedItemTextRef:C,valuesRef:w,initialValueRef:T,popupRef:E,setValue:D,floatingContext:O}=o9(),k=tw(y,m9.open),A=tw(y,m9.mounted),j=tw(y,m9.modal),M=tw(y,m9.value),N=tw(y,m9.openMethod),P=tw(y,m9.positionerElement),F=tw(y,m9.triggerElement),I=tw(y,m9.isItemEqualToValue),L=tw(y,m9.transitionStatus),R=W.useRef(null),z=W.useRef(null),[B,V]=W.useState(h),H=A&&B&&N!==`touch`;!A&&B!==h&&V(h),W.useImperativeHandle(S,()=>H),EA((H||j)&&k,N===`touch`,P,F);let ee=$E({anchor:n,floatingRootContext:O,positionMethod:a,mounted:A,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m??H,collisionAvoidance:g,keepMounted:!0}),U=H?`none`:ee.side,te=H?Wme:ee.positionerStyles,ne={open:k,side:U,align:ee.align,anchorHidden:ee.anchorHidden};Z(()=>{y.set(`popupSide`,ee.side)},[y,ee.side]);let re=nD(e,ne,{styles:te,transitionStatus:L,props:v,refs:[t,y.useStateSetter(`positionerElement`)],hidden:!A,inert:!k}),ie=W.useRef(0),ae=iy(e=>{if(w.current.length===0)return;let t=ie.current;if(ie.current=e.size,e.size===t)return;let n=ky(hy);if(t!==0&&!y.state.multiple&&M!==null&&c9(w.current,M,I)===-1){let e=T.current,t=e!=null&&c9(w.current,e,I)!==-1?e:null;D(t,n),t===null&&(y.set(`selectedIndex`,null),C.current=null)}if(t!==0&&y.state.multiple&&Array.isArray(M)){let e=M.filter(e=>c9(w.current,e,I)!==-1);e.length!==M.length&&(D(e,n),e.length===0&&(y.set(`selectedIndex`,null),C.current=null))}if(k&&H){y.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:``};_9(P,e),_9(E.current,e)}}),oe=W.useMemo(()=>({...ee,side:U,alignItemWithTriggerActive:H,setControlledAlignItemWithTrigger:V,scrollUpArrowRef:R,scrollDownArrowRef:z}),[ee,U,H,V]);return(0,q.jsx)(vA,{elementsRef:b,labelsRef:x,onMapChange:ae,children:(0,q.jsxs)(h9.Provider,{value:oe,children:[A&&j&&(0,q.jsx)(yT,{inert:vT(!k),cutout:F}),re]})})}),Kme={...Dv,...yv},qme=W.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,...o}=e,{store:s,popupRef:c,onOpenChangeComplete:l,setOpen:u,valueRef:d,firstItemTextRef:f,selectedItemTextRef:p,multiple:m,handleScrollArrowVisibility:h,scrollHandlerRef:g,listRef:_,highlightItemOnHover:v,floatingContext:y}=o9(),{side:b,align:x,alignItemWithTriggerActive:S,isPositioned:C,setControlledAlignItemWithTrigger:w}=g9(),T=pA(!0)!=null,E=uE(),{nonce:D,disableStyleElements:O}=tE(),k=tw(s,m9.id),A=tw(s,m9.open),j=tw(s,m9.openMethod),M=tw(s,m9.mounted),N=tw(s,m9.popupProps),P=tw(s,m9.transitionStatus),F=tw(s,m9.triggerElement),I=tw(s,m9.positionerElement),L=tw(s,m9.listElement),R=W.useRef(!1),z=W.useRef(!1),B=W.useRef({}),V=Mb(),H=iy(e=>{if(!I||!c.current||!z.current)return;let t=I.style.top===`0px`,n=I.style.bottom===`0px`;if(R.current||!S||!t&&!n){h(e);return}let r=x9(I),i=S9(I.getBoundingClientRect().height,`y`,r),a=uy(I),o=Mv(I),s=o.getComputedStyle(I),l=parseFloat(s.marginTop),u=parseFloat(s.marginBottom),d=y9(o.getComputedStyle(c.current)),f=Math.min(a.documentElement.clientHeight-l-u,d),p=e.scrollTop,m=b9(e),g=null,_=e=>{I.style.height=`${e}px`},v=t?m-p:p,y=Math.min(i+v,f);if(v<=1){let n=dE(v,0,f-i);n>0&&_(i+n),e.scrollTop=t?m:0,f-(i+n)<=1&&(R.current=!0),h(e);return}f-y>1?g=t?1/0:0:n&&p<m&&(g=p-(v-(i+v-f)));let b=Math.ceil(y);if(b!==0&&_(b),g!=null){let t=dE(g,0,b9(e));Math.abs(e.scrollTop-t)>1&&(e.scrollTop=t)}b>=f-1&&(R.current=!0),h(e)});W.useImperativeHandle(g,()=>H,[H]),fw({open:A,ref:c,onComplete(){A&&l?.(!0)}});let ee={open:A,transitionStatus:P,side:b,align:x};Z(()=>{!I||!c.current||Object.keys(B.current).length||(B.current={top:I.style.top||`0`,left:I.style.left||`0`,right:I.style.right,height:I.style.height,bottom:I.style.bottom,minHeight:I.style.minHeight,maxHeight:I.style.maxHeight,marginTop:I.style.marginTop,marginBottom:I.style.marginBottom})},[c,I]),Z(()=>{A||S||(z.current=!1,R.current=!1,_9(I,B.current))},[A,S,I,c]),Z(()=>{let e=c.current;if(!A||!F||!I||!e||S&&!C||s.state.transitionStatus===`ending`)return;if(z.current=!0,e.style.removeProperty(`--transform-origin`),!S){V.request(()=>h(L||e));return}let t=Jme(e);try{let t=p.current;t?.isConnected||(t=!m9.hasSelectedValue(s.state)&&f.current?.isConnected?f.current:null);let n=d.current,r=Mv(I),i=r.getComputedStyle(I),a=r.getComputedStyle(e),o=uy(F),c=x9(F),l=C9(F.getBoundingClientRect(),c),u=C9(I.getBoundingClientRect(),c),m=l.height,g=L||e,y=g.scrollHeight,b=parseFloat(a.borderBottomWidth),x=parseFloat(i.marginTop)||10,S=parseFloat(i.marginBottom)||10,C=parseFloat(i.minHeight)||100,T=y9(a),D=o.documentElement.clientHeight-x-S,O=o.documentElement.clientWidth,k=D-l.bottom+m,A,j=E===`rtl`?l.right-u.width:l.left,M=0;if(t&&n){let e=C9(n.getBoundingClientRect(),c);A=C9(t.getBoundingClientRect(),c),j=u.left+(E===`rtl`?e.right-A.right:e.left-A.left);let r=e.top-l.top+e.height/2;M=A.top-u.top+A.height/2-r}let N=k+M+S+b,P=Math.min(D,N),z=D-x-S,V=N-P,H=O-5;I.style.left=`${dE(j,5,H-u.width)}px`,I.style.height=`${P}px`,I.style.maxHeight=`none`,I.style.marginTop=`${x}px`,I.style.marginBottom=`${S}px`,e.style.height=`100%`;let ee=b9(g),U=V>=ee-1;U&&(P=Math.min(D,u.height)-(V-ee));let te=l.top<20||l.bottom>D-20||Math.ceil(P)+1<Math.min(y,C),ne=(r.visualViewport?.scale??1)!==1&&Qy;if(te||ne){_9(I,B.current),w(!1);return}let re=Math.max(C,P);if(U){let e=Math.max(0,D-N);I.style.top=u.height>=z?`0`:`${e}px`,I.style.height=`${P}px`,g.scrollTop=b9(g)}else I.style.bottom=`0`,g.scrollTop=V;if(A){let t=u.top,n=u.height,r=A.top+A.height/2,i=dE(n>0?(r-t)/n*100:50,0,100);e.style.setProperty(`--transform-origin`,`50% ${i}%`)}(re===D||P>=T)&&(R.current=!0),h(g),v&&s.state.selectedIndex===null&&s.state.activeIndex===null&&_.current[0]!=null&&s.set(`activeIndex`,0)}finally{t()}},[s,A,I,F,d,f,p,c,h,S,w,V,L,_,v,E,C]),W.useEffect(()=>{if(!S||!I||!A)return;let e=Mv(I);function t(e){u(!1,ky(Oy,e))}return Eb(e,`resize`,t)},[u,S,I,A]);let U={...L?{role:`presentation`,"aria-orientation":void 0}:{role:`listbox`,"aria-multiselectable":m||void 0,id:`${k}-list`},onKeyDown(e){T&&hT.has(e.key)&&e.stopPropagation()},onScroll(e){L||H(e.currentTarget)},...S&&{style:L?{height:`100%`}:v9},className:!L&&S?XT.className:void 0},te=nr(`div`,e,{ref:[t,c],state:ee,stateAttributesMapping:Kme,props:[N,U,tD(P),o]});return(0,q.jsxs)(W.Fragment,{children:[!O&&XT.getElement(D),(0,q.jsx)(SS,{context:y,modal:!1,disabled:!M,openInteractionType:j,returnFocus:a,restoreFocus:!0,children:te})]})});function y9(e){let t=e.maxHeight;return t.endsWith(`px`)&&parseFloat(t)||1/0}function b9(e){return fE(e.scrollHeight,e.clientHeight)}function x9(e){return lC.getScale(e)}function S9(e,t,n){return e/n[t]}function C9(e,t){return tx({x:S9(e.x,`x`,t),y:S9(e.y,`y`,t),width:S9(e.width,`x`,t),height:S9(e.height,`y`,t)})}var w9=[[`transform`,`none`],[`scale`,`1`],[`translate`,`0 0`]];function Jme(e){let{style:t}=e,n={};for(let[e,r]of w9)n[e]=t.getPropertyValue(e),t.setProperty(e,r,`important`);return()=>{for(let[e]of w9){let r=n[e];r?t.setProperty(e,r):t.removeProperty(e)}}}var Yme=W.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{store:o,scrollHandlerRef:s,multiple:c}=o9(),{alignItemWithTriggerActive:l}=g9(),u=tw(o,m9.hasScrollArrows),d=tw(o,m9.openMethod),f={id:`${tw(o,m9.id)}-list`,role:`listbox`,"aria-multiselectable":c||void 0,onScroll(e){s.current?.(e.currentTarget)},...l&&{style:v9},className:u&&d!==`touch`?XT.className:void 0};return nr(`div`,e,{ref:[t,o.useStateSetter(`listElement`)],props:[f,a]})}),T9=W.createContext(void 0);function E9(){let e=W.useContext(T9);if(!e)throw Error(Rn(57));return e}var Xme=W.memo(W.forwardRef(function(e,t){let{render:n,className:r,style:i,value:a=null,label:o,disabled:s=!1,nativeButton:c=!1,...l}=e,u=W.useRef(null),d=oA({guess:!0,label:o,textRef:u}),{store:f,itemProps:p,setOpen:m,setValue:h,selectionRef:g,typingRef:_,valuesRef:v,multiple:y,selectedItemTextRef:b,disabled:x,readOnly:S}=o9(),C=x||s,w=tw(f,m9.isActive,d.index),T=tw(f,m9.open),E=tw(f,m9.isSelected,a),D=tw(f,m9.isSelectedByFocus,d.index),O=tw(f,m9.isItemEqualToValue),k=d.index,A=W.useRef(null);Z(()=>{let e=v.current;return e[k]=a,()=>{delete e[k]}},[k,a,v]),Z(()=>{let e=f.state.value,t=e;y&&Array.isArray(e)&&(t=e.length>0?e[e.length-1]:void 0),t!==void 0&&s9(a,t,O)&&(f.set(`selectedIndex`,k),u.current&&(b.current=u.current))},[k,y,O,f,a,b]);let j=W.useRef(`mouse`),M=W.useRef(!1),{getButtonProps:N,buttonRef:P}=fy({disabled:C,focusableWhenDisabled:!0,native:c,composite:!0}),F={disabled:C,selected:E,highlighted:w};function I(e){if(x||S)return;let t=f.state.value;if(y){let n=Array.isArray(t)?t:[],r=E?jme(n,a,O):[...n,a];h(r,ky(by,e))}else h(a,ky(by,e)),m(!1,ky(by,e))}function L(){g.current.dragY=0}let R={role:`option`,"aria-selected":E,tabIndex:T&&w?0:-1,onKeyDown(e){f.set(`activeIndex`,k),e.key===` `&&_.current&&e.preventDefault()},onClick(e){let t=j.current!==`touch`,n=e.nativeEvent.pointerType,r=t&&rb(e.nativeEvent)&&(n!==void 0||w),i=t&&!r&&!M.current;M.current=!1,!(C||i)&&I(e.nativeEvent)},onPointerEnter(e){j.current=e.pointerType},onPointerMove(e){if(e.pointerType===`mouse`&&e.buttons===1){let t=g.current;t.dragY+=e.movementY,t.dragY**2>=64&&(t.allowUnselectedMouseUp=!0)}},onPointerDown(e){j.current=e.pointerType,M.current=!0,L()},onMouseUp(){if(L(),C||j.current===`touch`||M.current)return;let e=!g.current.allowSelectedMouseUp&&E,t=!g.current.allowUnselectedMouseUp&&!E;e||t||(M.current=!0,A.current?.click(),M.current=!1)}},z=nr(`div`,e,{ref:[P,t,d.ref,A],state:F,props:[p,R,l,N]}),B=W.useMemo(()=>({selected:E,index:k,textRef:u,selectedByFocus:D}),[E,k,u,D]);return(0,q.jsx)(T9.Provider,{value:B,children:z})})),Zme=W.forwardRef(function(e,t){let{selected:n}=E9();return e.keepMounted||n?(0,q.jsx)(Qme,{...e,ref:t}):null}),Qme=W.memo(W.forwardRef((e,t)=>{let{render:n,className:r,style:i,keepMounted:a,...o}=e,{selected:s}=E9(),c=W.useRef(null),{transitionStatus:l,setMounted:u}=uw(s),d=nr(`span`,e,{ref:[t,c],state:{selected:s,transitionStatus:l},props:[{"aria-hidden":!0,children:`✔️`},o],stateAttributesMapping:yv});return fw({open:s,ref:c,onComplete(){s||u(!1)}}),d})),$me=W.memo(W.forwardRef(function(e,t){let{index:n,textRef:r,selectedByFocus:i}=E9(),{firstItemTextRef:a,selectedItemTextRef:o}=o9(),{render:s,className:c,style:l,...u}=e;return nr(`div`,e,{ref:[W.useCallback(e=>{e&&(n===0&&(a.current=e),i&&(o.current=e))},[a,o,n,i]),t,r],props:u})})),D9=W.forwardRef(function(e,t){let{render:n,className:r,style:i,direction:a,keepMounted:o,...s}=e,c=a===`up`,{store:l,popupRef:u,listRef:d,handleScrollArrowVisibility:f,scrollArrowsMountedCountRef:p}=o9(),{side:m,scrollDownArrowRef:h,scrollUpArrowRef:g}=g9(),_=tw(l,c?m9.scrollUpArrowVisible:m9.scrollDownArrowVisible),v=tw(l,m9.openMethod),y=_&&v!==`touch`,b=By(),x=c?g:h,{mounted:S,transitionStatus:C,setMounted:w}=uw(y);Z(()=>(p.current+=1,l.set(`hasScrollArrows`,!0),()=>{p.current=Math.max(0,p.current-1),p.current===0&&l.set(`hasScrollArrows`,!1)}),[l,p]),fw({open:y,ref:x,onComplete(){y||w(!1)}});let T=nr(`div`,e,{ref:[t,x],state:{direction:a,visible:y,side:m,transitionStatus:C},props:[{"aria-hidden":!0,children:c?`▲`:`▼`,style:{position:`absolute`},onMouseMove(e){if(e.movementX===0&&e.movementY===0||b.isStarted())return;l.set(`activeIndex`,null);function t(){let e=l.state.listElement??u.current;if(!e)return;l.set(`activeIndex`,null),f(e);let n=fE(e.scrollHeight,e.clientHeight),r=pE(e.scrollTop,n),i=r===(c?0:n),a=d.current;if(r!==e.scrollTop&&(e.scrollTop=r),i){b.clear();return}if(a.length>0){let t=x.current?.offsetHeight||0;e.scrollTop=ehe(a,c,r,e.clientHeight,t,n)}b.start(40,t)}b.start(40,t)},onMouseLeave(){b.clear()}},s],stateAttributesMapping:yv});return S||o?T:null});function ehe(e,t,n,r,i,a){if(t){let t=0,r=n+i-1;for(let n=0;n<e.length;n+=1){let i=e[n];if(i&&i.offsetTop>=r){t=n;break}}let o=Math.max(0,t-1),s=e[o];return o<t&&s?pE(s.offsetTop-i,a):0}let o=e.length-1,s=n+r-i+1;for(let t=0;t<e.length;t+=1){let n=e[t];if(n&&n.offsetTop+n.offsetHeight>s){o=Math.max(0,t-1);break}}let c=Math.min(e.length-1,o+1),l=e[c];return c>o&&l?pE(l.offsetTop+l.offsetHeight-r+i,a):a}var the=W.forwardRef(function(e,t){return(0,q.jsx)(D9,{...e,ref:t,direction:`down`})}),nhe=W.forwardRef(function(e,t){return(0,q.jsx)(D9,{...e,ref:t,direction:`up`})}),O9=Fme;function k9({className:e,size:t=`default`,children:n,...r}){return(0,q.jsxs)(zme,{className:K(`relative inline-flex min-h-9 w-full min-w-36 select-none items-center justify-between gap-2 rounded-lg border border-input bg-background bg-clip-padding px-[calc(--spacing(3)-1px)] text-left text-base shadow-xs outline-none ring-ring/24 transition-shadow before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] not-data-disabled:not-focus-visible:not-aria-invalid:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 focus-visible:border-ring focus-visible:ring-[3px] aria-invalid:border-destructive/36 focus-visible:aria-invalid:border-destructive/64 focus-visible:aria-invalid:ring-destructive/16 data-disabled:pointer-events-none data-disabled:opacity-64 sm:min-h-8 sm:text-sm dark:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border dark:aria-invalid:ring-destructive/24 dark:not-data-disabled:not-focus-visible:not-aria-invalid:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/8%)] [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0 [[data-disabled],:focus-visible,[aria-invalid],[data-pressed]]:shadow-none`,t===`sm`&&`min-h-8 gap-1.5 px-[calc(--spacing(2.5)-1px)] sm:min-h-7`,t===`lg`&&`min-h-10 sm:min-h-9`,e),"data-slot":`select-trigger`,...r,children:[n,(0,q.jsx)(Hme,{"data-slot":`select-icon`,children:(0,q.jsx)(We,{className:`-me-1 size-4.5 opacity-80 sm:size-4`})})]})}function A9({className:e,...t}){return(0,q.jsx)(Vme,{className:K(`flex-1 truncate data-placeholder:text-muted-foreground`,e),"data-slot":`select-value`,...t})}function j9({className:e,children:t,sideOffset:n=4,alignItemWithTrigger:r=!0,zIndex:i,...a}){let o=W.useContext(VE);return(0,q.jsx)(Ume,{children:(0,q.jsx)(Gme,{alignItemWithTrigger:r,className:`select-none`,style:{zIndex:i??o},"data-slot":`select-positioner`,sideOffset:n,children:(0,q.jsxs)(qme,{className:`origin-(--transform-origin) transition-[scale,opacity] has-data-[side=none]:scale-100 has-data-starting-style:scale-98 has-data-starting-style:opacity-0 has-data-[side=none]:transition-none`,"data-slot":`select-popup`,...a,children:[(0,q.jsx)(nhe,{className:`top-0 z-50 flex h-6 w-full cursor-default items-center justify-center before:pointer-events-none before:absolute before:inset-x-px before:top-px before:h-[200%] before:rounded-t-[calc(var(--radius-lg)-1px)] before:bg-linear-to-b before:from-50% before:from-popover`,"data-slot":`select-scroll-up-arrow`,children:(0,q.jsx)(Ue,{className:`relative size-4.5 sm:size-4`})}),(0,q.jsx)(`span`,{className:`relative block h-full rounded-lg border bg-popover bg-clip-padding before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] before:shadow-lg dark:not-in-data-[slot=group]:bg-clip-border`,children:(0,q.jsx)(Yme,{className:K(`max-h-(--available-height) min-w-(--anchor-width) overflow-y-auto p-1`,e),"data-slot":`select-list`,children:t})}),(0,q.jsx)(the,{className:`bottom-0 z-50 flex h-6 w-full cursor-default items-center justify-center before:pointer-events-none before:absolute before:inset-x-px before:bottom-px before:h-[200%] before:rounded-b-[calc(var(--radius-lg)-1px)] before:bg-linear-to-t before:from-50% before:from-popover`,"data-slot":`select-scroll-down-arrow`,children:(0,q.jsx)(Be,{className:`relative size-4.5 sm:size-4`})})]})})})}function M9({className:e,children:t,...n}){return(0,q.jsxs)(Xme,{className:K(`grid min-h-8 in-data-[side=none]:min-w-[calc(var(--anchor-width)+1.25rem)] cursor-default grid-cols-[1rem_1fr] items-center gap-2 rounded-sm py-1 ps-2 pe-4 text-base outline-none data-disabled:pointer-events-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-disabled:opacity-64 sm:min-h-7 sm:text-sm [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,e),"data-slot":`select-item`,...n,children:[(0,q.jsx)(Zme,{className:`col-start-1`,children:(0,q.jsx)(`svg`,{"aria-hidden":`true`,fill:`none`,height:`24`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,viewBox:`0 0 24 24`,width:`24`,xmlns:`http://www.w3.org/1500/svg`,children:(0,q.jsx)(`path`,{d:`M5.252 12.7 10.2 18.63 18.748 5.37`})})}),(0,q.jsx)($me,{className:`col-start-2 min-w-0`,children:t})]})}function rhe(e,t,n){return e.find(e=>e.id===t)?.id??e.find(e=>e.id===n)?.id??e[0]?.id??``}var N9={supervised:`受监督(每步确认)`,"auto-edits":`自动接受编辑`,full:`完全放行`,assistant:`助手代审`},P9={minimal:`极低`,low:`低`,medium:`中`,high:`高`,xhigh:`极高`,max:`最高`};function ihe({projects:e,providers:t,open:n,preferredProjectId:r,onClose:i,onCreate:a}){let[o,s]=(0,W.useState)(null),[c,l]=(0,W.useState)(null),[u,d]=(0,W.useState)(null),[f,p]=(0,W.useState)(`full`),[m,h]=(0,W.useState)(!1),[g,_]=(0,W.useState)(`medium`),[v,y]=(0,W.useState)(n);n!==v&&(y(n),n&&s(null));let b=rhe(e,o,r),x=t.find(e=>e.id===c)??t[0]??{id:``,models:[]},S=x.id,C=x.models.find(e=>e.id===u)?.id??x.models[0]?.id??``,w=!!(b&&S&&C);return(0,q.jsx)(X7,{open:n,onOpenChange:e=>!e&&i(),children:(0,q.jsxs)(Z7,{side:`bottom`,className:`pb-safe`,children:[(0,q.jsx)(Q7,{children:(0,q.jsx)($7,{children:`新建会话`})}),(0,q.jsxs)(`div`,{className:`space-y-4 p-4 pt-0`,children:[(0,q.jsx)(F9,{label:`项目`,children:(0,q.jsxs)(O9,{items:e.map(e=>({value:e.id,label:ge(e)})),value:b,onValueChange:e=>s(e),children:[(0,q.jsx)(k9,{className:`w-full`,children:(0,q.jsx)(A9,{})}),(0,q.jsx)(j9,{zIndex:BE.DROPDOWN_IN_MODAL,children:e.map(e=>(0,q.jsx)(M9,{value:e.id,children:ge(e)},e.id))})]})}),(0,q.jsx)(F9,{label:`模型服务`,children:(0,q.jsxs)(O9,{items:t.map(e=>({value:e.id,label:e.name})),value:S,onValueChange:e=>{l(e),d(null)},children:[(0,q.jsx)(k9,{className:`w-full`,children:(0,q.jsx)(A9,{})}),(0,q.jsx)(j9,{zIndex:BE.DROPDOWN_IN_MODAL,children:t.map(e=>(0,q.jsx)(M9,{value:e.id,children:e.name},e.id))})]})}),(0,q.jsx)(F9,{label:`模型`,children:(0,q.jsxs)(O9,{items:x.models.map(e=>({value:e.id,label:e.label??e.id})),value:C,onValueChange:e=>d(e),children:[(0,q.jsx)(k9,{className:`w-full`,children:(0,q.jsx)(A9,{})}),(0,q.jsx)(j9,{zIndex:BE.DROPDOWN_IN_MODAL,children:x.models.map(e=>(0,q.jsx)(M9,{value:e.id,children:e.label??e.id},e.id))})]})}),(0,q.jsx)(F9,{label:`审批模式`,children:(0,q.jsxs)(O9,{items:Object.keys(N9).map(e=>({value:e,label:N9[e]})),value:f,onValueChange:e=>p(e),children:[(0,q.jsx)(k9,{className:`w-full`,children:(0,q.jsx)(A9,{})}),(0,q.jsx)(j9,{zIndex:BE.DROPDOWN_IN_MODAL,children:Object.keys(N9).map(e=>(0,q.jsx)(M9,{value:e,children:N9[e]},e))})]})}),(0,q.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,q.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:`推理`}),(0,q.jsx)(fj,{checked:m,onCheckedChange:h})]}),m&&(0,q.jsx)(F9,{label:`推理档位`,children:(0,q.jsxs)(O9,{items:Object.keys(P9).map(e=>({value:e,label:P9[e]})),value:g,onValueChange:e=>_(e),children:[(0,q.jsx)(k9,{className:`w-full`,children:(0,q.jsx)(A9,{})}),(0,q.jsx)(j9,{zIndex:BE.DROPDOWN_IN_MODAL,children:Object.keys(P9).map(e=>(0,q.jsx)(M9,{value:e,children:P9[e]},e))})]})}),e.length===0&&(0,q.jsx)(`p`,{className:`text-destructive text-xs`,children:`桌面端还没有项目,请先在桌面添加。`}),e.length>0&&t.length===0&&(0,q.jsx)(`p`,{className:`text-destructive text-xs`,children:`桌面端没有可用的模型服务。`}),(0,q.jsxs)(`div`,{className:`flex justify-end gap-2 pt-1`,children:[(0,q.jsx)(Ui,{variant:`outline`,onClick:i,children:`取消`}),(0,q.jsx)(Ui,{disabled:!w,onClick:()=>a({projectId:b,providerId:S,modelId:C,approvalMode:f,...m?{reasoningEnabled:m,thinkingLevel:g}:{}}),children:`创建`})]})]})]})})}function F9({label:e,children:t}){return(0,q.jsxs)(`label`,{className:`flex flex-col gap-1.5`,children:[(0,q.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:e}),t]})}var ahe={pending:`待发送`,sending:`发送中…`,failed:`发送失败`};function ohe({items:e,readOnly:t,onRetry:n,onDiscard:r}){return e.length===0?null:(0,q.jsx)(`div`,{className:`mb-1 space-y-1`,children:e.map(e=>(0,q.jsxs)(`div`,{className:K(`flex flex-wrap items-center gap-2 rounded-xl border px-2.5 py-1.5 text-xs`,e.status===`failed`?`border-destructive/40 bg-destructive/5`:`bg-muted/40`),children:[(0,q.jsx)(`span`,{className:K(`min-w-0 flex-1`,e.status===`failed`?`whitespace-pre-wrap break-words select-text`:`truncate`),children:e.text||(e.images?.length?`[${e.images.length} 张图片]`:``)}),(0,q.jsxs)(`span`,{className:K(`min-w-0 break-words`,e.status===`failed`?`text-destructive`:`text-muted-foreground`),children:[e.error?.startsWith(`outbox-discard`)?`移除消息`:e.error===`delivery-unconfirmed`?`结果未确认`:ahe[e.status],e.status===`failed`&&e.error?`:${Qpe(e.error)}`:``]}),e.status===`failed`&&!e.error?.startsWith(`outbox-discard`)&&!t&&(0,q.jsx)(`button`,{type:`button`,"aria-label":`重试`,onClick:()=>n(e.deliveryId),className:`shrink-0 rounded p-0.5 text-foreground hover:bg-accent`,children:(0,q.jsx)(Jt,{className:`h-3.5 w-3.5`})}),e.status!==`sending`&&(0,q.jsx)(`button`,{type:`button`,"aria-label":`删除`,disabled:e.error===`outbox-discarding`,onClick:()=>r(e.deliveryId),className:`shrink-0 rounded p-0.5 text-muted-foreground hover:bg-accent`,children:(0,q.jsx)(yn,{className:`h-3.5 w-3.5`})})]},e.deliveryId))})}function she(){let e=globalThis.BarcodeDetector;if(!e)return null;let t=new e({formats:[`qr_code`]});return{async scan(e){return(await t.detect(e))[0]?.rawValue??null}}}async function che(){let{default:t}=await Y(async()=>{let{default:t}=await import(`./jsQR-B1eQcpQl.js`).then(t=>e(t.default,1));return{default:t}},__vite__mapDeps([144,1])),n=document.createElement(`canvas`),r=n.getContext(`2d`,{willReadFrequently:!0});return{async scan(e){if(!r||!e.videoWidth)return null;let i=Math.min(1,640/Math.max(e.videoWidth,e.videoHeight));n.width=Math.round(e.videoWidth*i),n.height=Math.round(e.videoHeight*i),r.drawImage(e,0,0,n.width,n.height);let{data:a,width:o,height:s}=r.getImageData(0,0,n.width,n.height);return t(a,o,s,{inversionAttempts:`dontInvert`})?.data??null}}}async function lhe(){return she()??await che()}function uhe(e){try{return U(e),!0}catch{return!1}}function dhe({onPaired:e,autoInvite:t,onCancel:n}){let[r,i]=(0,W.useState)(``),[a,o]=(0,W.useState)(!1),[s,c]=(0,W.useState)(null),[l,u]=(0,W.useState)(!1),d=(0,W.useRef)(null),f=(0,W.useRef)(null),p=()=>{for(let e of f.current?.getTracks()??[])e.stop();f.current=null,u(!1)},m=async t=>{o(!0),c(null);try{let n=U(t),r=/iPhone|iPad|Android/i.exec(navigator.userAgent)?.[0]??`Phone`,i=await N(n.relay,n.publicKey,r);e({pairId:i.pairId,token:i.deviceToken,contentKey:btoa(String.fromCharCode(...i.contentKey)).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``),deviceName:r,relayUrl:n.relay,pairedAt:Date.now()})}catch(e){c(e instanceof Error?e.message:String(e))}finally{o(!1)}},h=(0,W.useRef)(!1);(0,W.useEffect)(()=>{!t||h.current||(h.current=!0,m(t))},[t]);let g=(0,W.useRef)(()=>{});g.current=e=>{p(),m(e)};let _=async()=>{c(null);try{f.current=await navigator.mediaDevices.getUserMedia({video:{facingMode:`environment`}}),u(!0)}catch(e){c(window.isSecureContext?e instanceof DOMException&&e.name===`NotAllowedError`?`摄像头权限被拒绝,请在浏览器设置中允许后重试`:`无法访问摄像头,请粘贴配对码`:`扫码需要 HTTPS 环境,请改用粘贴配对码`),u(!1)}};return(0,W.useEffect)(()=>{if(!l)return;let e=d.current,t=f.current;if(!e||!t)return;let n=!1,r=0;return e.srcObject=t,e.muted=!0,(async()=>{try{await e.play();let t=await lhe(),i=async()=>{if(!(n||!f.current)){try{let n=await t.scan(e);if(n&&uhe(n)){g.current(n);return}}catch{}r=requestAnimationFrame(()=>void i())}};await i()}catch{n||c(`无法开始预览,请粘贴配对码`)}})(),()=>{n=!0,cancelAnimationFrame(r)}},[l]),(0,q.jsxs)(`div`,{className:`flex h-full flex-col items-center justify-center gap-5 px-6 pt-safe pb-safe`,children:[(0,q.jsxs)(`div`,{className:`flex flex-col items-center gap-1.5 text-center`,children:[(0,q.jsx)(`span`,{className:`mb-2 flex size-11 items-center justify-center rounded-[13px] border border-brand/20 bg-brand/8 text-brand dark:bg-brand/14`,children:(0,q.jsx)(xj,{className:`size-6`})}),(0,q.jsx)(`h1`,{className:`font-medium text-lg`,children:`连接到 EnsoCode`}),(0,q.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`在桌面端「设置 → 手机」生成配对码,扫码或粘贴。`})]}),l?(0,q.jsxs)(`div`,{className:`w-full max-w-sm space-y-2`,children:[(0,q.jsx)(`video`,{ref:d,playsInline:!0,muted:!0,className:`aspect-square w-full rounded-lg bg-black object-cover`}),(0,q.jsx)(Ui,{variant:`outline`,className:`w-full`,onClick:p,children:`取消扫码`})]}):(0,q.jsxs)(Ui,{className:`w-full max-w-sm`,onClick:()=>void _(),children:[(0,q.jsx)(Re,{className:`mr-1.5 h-4 w-4`}),`扫描二维码`]}),(0,q.jsxs)(`div`,{className:`flex w-full max-w-sm items-center gap-2`,children:[(0,q.jsx)(Y7,{value:r,onChange:e=>i(e.target.value),placeholder:`enso://pair?relay=…`,autoCapitalize:`off`,autoCorrect:`off`,spellCheck:!1,className:`font-mono text-xs`}),(0,q.jsx)(Ui,{variant:`outline`,className:`shrink-0`,disabled:a||!r.trim(),onClick:()=>void m(r.trim()),children:a?(0,q.jsx)(Ct,{className:`h-4 w-4 animate-spin`}):`配对`})]}),s&&(0,q.jsx)(`p`,{className:`max-w-sm text-center text-destructive text-xs`,children:s}),n&&(0,q.jsx)(Ui,{variant:`ghost`,className:`w-full max-w-sm`,onClick:n,children:`返回`})]})}var I9={minimal:`极低`,low:`低`,medium:`中`,high:`高`,xhigh:`极高`,max:`最高`};function fhe({providers:e,config:t,open:n,onClose:r,onSetModel:i,onSetReasoning:a,onSetThinking:o}){let s=e.find(e=>e.id===t.providerId),c=t.reasoningEnabled??!1,l=t.thinkingLevel??`medium`;return(0,q.jsx)(X7,{open:n,onOpenChange:e=>!e&&r(),children:(0,q.jsxs)(Z7,{side:`bottom`,className:`pb-safe`,children:[(0,q.jsx)(Q7,{children:(0,q.jsx)($7,{children:`会话设置`})}),(0,q.jsxs)(`div`,{className:`space-y-4 p-4 pt-0`,children:[(0,q.jsx)(L9,{label:`模型服务`,children:(0,q.jsxs)(O9,{items:e.map(e=>({value:e.id,label:e.name})),value:t.providerId??``,onValueChange:t=>{let n=e.find(e=>e.id===t),r=n?.models[0]?.id;n&&r&&i(n.id,r)},children:[(0,q.jsx)(k9,{className:`w-full`,children:(0,q.jsx)(A9,{})}),(0,q.jsx)(j9,{zIndex:BE.DROPDOWN_IN_MODAL,children:e.map(e=>(0,q.jsx)(M9,{value:e.id,children:e.name},e.id))})]})}),(0,q.jsx)(L9,{label:`模型`,children:(0,q.jsxs)(O9,{items:(s?.models??[]).map(e=>({value:e.id,label:e.label??e.id})),value:t.modelId??``,onValueChange:e=>{t.providerId&&i(t.providerId,e)},children:[(0,q.jsx)(k9,{className:`w-full`,children:(0,q.jsx)(A9,{})}),(0,q.jsx)(j9,{zIndex:BE.DROPDOWN_IN_MODAL,children:(s?.models??[]).map(e=>(0,q.jsx)(M9,{value:e.id,children:e.label??e.id},e.id))})]})}),(0,q.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,q.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:`推理`}),(0,q.jsx)(fj,{checked:c,onCheckedChange:a})]}),c&&(0,q.jsx)(L9,{label:`推理档位`,children:(0,q.jsxs)(O9,{items:Object.keys(I9).map(e=>({value:e,label:I9[e]})),value:l,onValueChange:e=>o(e),children:[(0,q.jsx)(k9,{className:`w-full`,children:(0,q.jsx)(A9,{})}),(0,q.jsx)(j9,{zIndex:BE.DROPDOWN_IN_MODAL,children:Object.keys(I9).map(e=>(0,q.jsx)(M9,{value:e,children:I9[e]},e))})]})}),(0,q.jsx)(`p`,{className:`text-[11px] text-muted-foreground`,children:`模型切换对运行中的会话在下次启动时生效;推理档位即时生效。`})]})]})})}function L9({label:e,children:t}){return(0,q.jsxs)(`label`,{className:`flex flex-col gap-1.5`,children:[(0,q.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:e}),t]})}function phe(e){return e.status===`failed`&&!e.spawning?`failed`:(e.pendingAskCount??0)>0?`waiting`:e.status===`running`||e.spawning||e.hasRunningChild?`running`:e.unread?`unread`:`idle`}function R9(e){return[...e].sort((e,t)=>(t.updatedAt??0)-(e.updatedAt??0))}function z9(e){let t=e=>(e.pendingAskCount??0)>0||(e.pendingApprovalCount??0)>0;return[...e.filter(t),...e.filter(e=>!t(e))]}function mhe(e,t){let n=R9(e),r=new Map(n.map(e=>[e.id,e])),i=[];for(let e of t){let t=r.get(e);t&&(i.push(t),r.delete(e))}return[...i,...z9([...r.values()])]}function B9(e){return z9([...R9(e.filter(e=>e.pinned)),...R9(e.filter(e=>!e.pinned))])}function hhe(e,t){return phe({status:e.status,unread:e.unread,pendingAskCount:e.pendingAskCount,hasRunningChild:t})!==`idle`}var V9=`__all__`,H9=`__ungrouped__`;function U9(e){return new Set(e.map(e=>e.id))}function W9(e,t){return t.includes(e)}function ghe(e,t){let n=e.groupId;return!n||!U9(t).has(n)}function _he(e,t,n,r){let i=e.filter(e=>!W9(e.id,n));return r===`__all__`||r===`__recent__`?i:r===`__ungrouped__`?i.filter(e=>ghe(e,t)):i.filter(e=>e.groupId===r)}function vhe(e,t,n){let r=e.filter(e=>!W9(e.id,n)),i=[...t].sort((e,t)=>e.order-t.order),a=U9(t),o=i.map(e=>({groupId:e.id,group:e,projects:r.filter(t=>t.groupId===e.id)})),s=r.filter(e=>!e.groupId||!a.has(e.groupId));return s.length>0&&o.push({groupId:H9,projects:s}),o}function G9(e,t){return e<=0?0:Math.min(e,5+Math.max(0,t))}function yhe(e,t){return G9(e,t)>=e?0:Math.min(Math.max(0,e-5),t+15)}function bhe(e){return Math.max(0,e-15)}var xhe=[{value:`auto`,label:`跟随桌面`},{value:`light`,label:`浅`},{value:`dark`,label:`深`}],She={unsupported:`当前浏览器不支持推送。`,"permission-denied":`通知权限被拒绝,请在浏览器站点设置中允许后重试。`,"service-unreachable":`无法连接 Google 推送服务(FCM),请检查网络或代理后重试。`,"subscribe-failed":`订阅失败,请稍后重试。`};function Che({open:e,docked:t=!1,pinnable:n=!1,onTogglePinned:i,projects:a,groups:o=[],catalog:s,pinnedOrder:c=[],activeId:l,canCreate:u,devices:d,activeDevicePairId:f,remoteDesktop:p,connected:m,connectionLabel:g,pushEnabled:_,pushBusy:v,pushError:y,pushAvailability:b,pushConfigReady:x,onTogglePush:S,onClose:C,onSelect:w,onNewConversation:T,onSwitchDevice:E,onAddDevice:D,onRenameDevice:O,onUnpairDevice:k,botSegment:A}){let j=A?.active===!0,[M,N]=(0,W.useState)({}),[F,L]=(0,W.useState)({}),[R,z]=(0,W.useState)(!1),[B,V]=(0,W.useState)(null),H=p?d.find(e=>e.pairId===f&&e.scope!==`read`):void 0,[ee,U]=(0,W.useState)(h),[te,ne]=(0,W.useState)(()=>{try{return localStorage.getItem(`enso-phone-selected-project-group`)??`__all__`}catch{return V9}}),[re,ie]=(0,W.useState)({}),ae=te===`__all__`||te===`__ungrouped__`||o.some(e=>e.id===te)?te:V9;(0,W.useEffect)(()=>P(()=>U(h())),[]),(0,W.useEffect)(()=>{e||V(null)},[e]);let[oe,se]=(0,W.useState)(()=>Date.now());(0,W.useEffect)(()=>{if(!e)return;se(Date.now());let t=setInterval(()=>se(Date.now()),6e4);return()=>clearInterval(t)},[e]);let ce=new Set(a.filter(e=>e.archived).map(e=>e.id)),le=[...ce],ue=e=>e.archived||ce.has(e.projectId),de=_he(a,o,le,ae),fe=vhe(a,o,le),pe=new Set(de.map(e=>e.id)),ge=s.filter(e=>!e.parentId),_e=e=>!e.projectId||pe.has(e.projectId),ve=e=>s.some(t=>t.parentId===e&&t.status===`running`),ye=R9(ge.filter(e=>!ue(e)&&_e(e)&&hhe(e,ve(e.id)))),be=mhe(ge.filter(e=>e.pinned&&!ue(e)&&_e(e)),c),xe=R9(ge.filter(e=>{if(!ue(e))return!1;if(ae===`__all__`)return!0;let t=a.find(t=>t.id===e.projectId);return t?ae===`__ungrouped__`?!t.groupId||!o.some(e=>e.id===t.groupId):t.groupId===ae:ae===H9})),Se=ge.filter(e=>!ue(e)),Ce=new Set(a.map(e=>e.id)),we=B9(Se.filter(e=>!Ce.has(e.projectId)));return(0,q.jsxs)(q.Fragment,{children:[!t&&(0,q.jsx)(`button`,{type:`button`,"aria-label":`关闭侧栏`,onClick:C,className:K(`fixed inset-0 z-40 bg-black/40 transition-[opacity,visibility] duration-200`,e?`visible opacity-100`:`invisible pointer-events-none opacity-0`)}),(0,q.jsxs)(`aside`,{className:K(`flex shrink-0 flex-col border-r bg-background`,t?`relative h-full w-72`:K(`fixed inset-y-0 left-0 z-50 w-[82vw] max-w-xs transition-transform duration-200`,e?`translate-x-0`:`-translate-x-full`)),children:[(0,q.jsxs)(`div`,{className:K(`flex h-12 shrink-0 items-center justify-between px-3 pt-safe`,o.length===0&&`border-b`),children:[A?(0,q.jsx)(`span`,{className:`flex rounded-lg bg-muted p-0.5 text-sm`,children:[`项目`,`Bot`].map(e=>{let t=e===`Bot`===A.active;return(0,q.jsx)(`button`,{type:`button`,"aria-pressed":t,onClick:()=>A.onChange(e===`Bot`),className:K(`rounded-md px-3 py-0.5 transition-colors`,t?`bg-background font-medium shadow-xs`:`text-muted-foreground`),children:e},e)})}):(0,q.jsx)(`span`,{className:`font-medium text-sm`,children:`项目`}),t?n&&i?(0,q.jsx)(`button`,{type:`button`,onClick:i,"aria-label":`收起侧栏`,className:`rounded-md p-1 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground`,children:(0,q.jsx)(Ft,{className:`h-4 w-4`})}):null:(0,q.jsxs)(`span`,{className:`flex items-center`,children:[n&&i&&(0,q.jsx)(`button`,{type:`button`,onClick:i,"aria-label":`固定侧栏`,className:`rounded-md p-1 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground`,children:(0,q.jsx)(It,{className:`h-4 w-4`})}),(0,q.jsx)(`button`,{type:`button`,onClick:C,"aria-label":`关闭侧栏`,className:`rounded-md p-1 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground`,children:(0,q.jsx)(yn,{className:`h-4 w-4`})})]})]}),!j&&o.length>0&&(0,q.jsx)(`div`,{className:`shrink-0 border-b px-3 pb-2`,children:(0,q.jsxs)(O9,{items:[{value:`__all__`,label:`全部`},...o.slice().sort((e,t)=>e.order-t.order).map(e=>({value:e.id,label:`${e.emoji?`${e.emoji} `:``}${e.name}`})),{value:`__ungrouped__`,label:`未分组`}],value:ae,onValueChange:e=>{if(e){ne(e);try{localStorage.setItem(`enso-phone-selected-project-group`,e)}catch{}}},children:[(0,q.jsx)(k9,{className:`w-full`,size:`sm`,children:(0,q.jsx)(A9,{})}),(0,q.jsxs)(j9,{zIndex:BE.DROPDOWN_IN_MODAL,children:[(0,q.jsx)(M9,{value:`__all__`,children:`全部`}),o.slice().sort((e,t)=>e.order-t.order).map(e=>(0,q.jsxs)(M9,{value:e.id,children:[e.emoji?`${e.emoji} `:``,e.name]},e.id)),(0,q.jsx)(M9,{value:`__ungrouped__`,children:`未分组`})]})]})}),j?A?.panel:(0,q.jsxs)(`div`,{className:`min-h-0 flex-1 space-y-2 overflow-y-auto p-2`,children:[a.length===0&&(0,q.jsx)(`p`,{className:`rounded-lg border border-dashed px-3 py-6 text-center text-muted-foreground text-sm`,children:`桌面端还没有项目`}),ye.length>0&&(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`div`,{className:`flex items-center gap-1.5 px-2 py-2`,children:(0,q.jsx)(`span`,{className:`font-medium text-sm`,children:`活跃中`})}),(0,q.jsx)(`div`,{className:`flex flex-col gap-y-0.5`,children:ye.map(e=>(0,q.jsx)(K9,{session:e,active:l===e.id,nowTick:oe,onSelect:w},e.id))})]}),be.length>0&&(0,q.jsxs)(`div`,{children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-1.5 px-2 py-2`,children:[(0,q.jsx)(Bt,{className:`h-3.5 w-3.5 text-muted-foreground`}),(0,q.jsx)(`span`,{className:`font-medium text-sm`,children:`置顶`})]}),(0,q.jsx)(`div`,{className:`flex flex-col gap-y-0.5`,children:be.map(e=>(0,q.jsx)(K9,{session:e,active:l===e.id,nowTick:oe,onSelect:w},e.id))})]}),(ae===`__all__`&&o.length>0?fe.flatMap(e=>{let t=re[e.groupId]===!0;return[{kind:`header`,section:e,folded:t},...t?[]:e.projects.map(e=>({kind:`project`,project:e}))]}):de.map(e=>({kind:`project`,project:e}))).map(e=>e.kind===`header`?(0,q.jsxs)(`button`,{type:`button`,onClick:()=>ie(t=>({...t,[e.section.groupId]:!t[e.section.groupId]})),className:`flex h-7 w-full items-center gap-1 rounded-md px-2 text-left text-xs font-medium text-muted-foreground`,children:[(0,q.jsx)(Ve,{className:K(`h-3.5 w-3.5 shrink-0 transition-transform duration-150`,!e.folded&&`rotate-90`)}),e.section.group?.emoji&&(0,q.jsx)(`span`,{className:`shrink-0 text-sm`,children:e.section.group.emoji}),e.section.group?.color&&(0,q.jsx)(`span`,{className:`h-2 w-2 shrink-0 rounded-full`,style:{backgroundColor:e.section.group.color}}),(0,q.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.section.group?.name??`未分组`}),(0,q.jsx)(`span`,{className:`shrink-0 text-[10px] text-muted-foreground/70`,children:e.section.projects.length})]},`hdr-${e.section.groupId}`):(0,q.jsx)(q9,{name:he(e.project),badge:me(e.project),sessions:B9(Se.filter(t=>t.projectId===e.project.id)),folded:M[e.project.id]===!0,revealedExtra:F[e.project.id]??0,activeId:l,nowTick:oe,canCreate:u,onToggleFold:()=>N(t=>({...t,[e.project.id]:!t[e.project.id]})),onRevealMore:t=>L(n=>({...n,[e.project.id]:t})),onSelect:w,onNew:()=>T(e.project.id)},e.project.id)),we.length>0&&(0,q.jsx)(q9,{name:`其他`,sessions:we,folded:M.__orphan===!0,revealedExtra:F.__orphan??0,activeId:l,nowTick:oe,canCreate:!1,onToggleFold:()=>N(e=>({...e,__orphan:!e.__orphan})),onRevealMore:e=>L(t=>({...t,__orphan:e})),onSelect:w})]}),!j&&xe.length>0&&(0,q.jsxs)(`div`,{className:`shrink-0 border-t p-2`,children:[R&&(0,q.jsx)(`div`,{className:`mb-0.5 flex max-h-64 flex-col gap-y-0.5 overflow-y-auto`,children:xe.map(e=>(0,q.jsx)(K9,{session:e,active:l===e.id,nowTick:oe,subtitle:(()=>{let t=a.find(t=>t.id===e.projectId);return t?he(t):void 0})(),onSelect:w},e.id))}),(0,q.jsxs)(`button`,{type:`button`,onClick:()=>z(e=>!e),className:`flex w-full items-center gap-1 rounded-lg px-2 py-2 text-left transition-colors hover:bg-muted/60`,children:[(0,q.jsx)(`span`,{className:`flex h-5 w-5 shrink-0 items-center justify-center`,children:(0,q.jsx)(Ve,{className:K(`h-3.5 w-3.5 text-muted-foreground transition-transform duration-200`,R?`-rotate-90`:`rotate-0`)})}),(0,q.jsx)(ke,{className:`h-3.5 w-3.5 shrink-0 text-muted-foreground`}),(0,q.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-muted-foreground text-sm`,children:`已归档`}),(0,q.jsx)(`span`,{className:`shrink-0 text-[10px] text-muted-foreground tabular-nums`,children:xe.length})]})]}),(0,q.jsxs)(`div`,{className:`shrink-0 space-y-1 border-t p-2 pb-safe`,children:[!B&&(0,q.jsxs)(`div`,{className:`flex items-center gap-2 px-2 py-1.5`,children:[(0,q.jsx)(Pt,{className:`h-4 w-4 shrink-0 text-muted-foreground`}),(0,q.jsx)(`span`,{className:`min-w-0 flex-1 text-muted-foreground text-sm`,children:`主题`}),(0,q.jsx)(`div`,{className:`flex shrink-0 gap-0.5 rounded-md border p-0.5`,children:xhe.map(e=>(0,q.jsx)(`button`,{type:`button`,onClick:()=>r(e.value),className:K(`rounded px-2 py-1 text-[11px] transition-colors`,ee===e.value?`bg-primary text-primary-foreground`:`text-muted-foreground hover:bg-accent`),children:e.label},e.value))})]}),!B&&H&&(0,q.jsxs)(`div`,{className:`flex items-center gap-2 px-2 py-1.5`,children:[(0,q.jsx)(Mt,{className:`h-4 w-4 shrink-0 text-muted-foreground`}),(0,q.jsx)(`span`,{className:`min-w-0 flex-1 text-muted-foreground text-sm`,children:`界面`}),(0,q.jsxs)(`div`,{className:`flex shrink-0 gap-0.5 rounded-md border p-0.5`,children:[(0,q.jsx)(`span`,{className:`rounded bg-primary px-2 py-1 text-[11px] text-primary-foreground`,children:`精简`}),(0,q.jsx)(`button`,{type:`button`,onClick:()=>{window.location.href=I(H.pairId)},className:`rounded px-2 py-1 text-[11px] text-muted-foreground transition-colors hover:bg-accent`,children:`完整`})]})]}),!B&&(0,q.jsxs)(`div`,{className:`px-2 py-1.5`,children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,q.jsx)(Pe,{className:`h-4 w-4 shrink-0 text-muted-foreground`}),(0,q.jsx)(`span`,{className:`min-w-0 flex-1 text-muted-foreground text-sm`,children:`推送通知`}),(0,q.jsx)(fj,{checked:_,disabled:v||b!==`ok`||!m||!x,onCheckedChange:S})]}),v&&(0,q.jsx)(`p`,{className:`mt-1 pl-6 text-[11px] text-muted-foreground`,children:`正在开启…`}),y&&!v&&(0,q.jsx)(`p`,{className:`mt-1 pl-6 text-[11px] text-destructive`,children:She[y]}),b===`ok`&&m&&!x&&(0,q.jsx)(`p`,{className:`mt-1 pl-6 text-[11px] text-muted-foreground`,children:`需先升级桌面端 EnsoCode 才能开启推送。`}),b===`needs-install`&&(0,q.jsx)(`p`,{className:`mt-1 pl-6 text-[11px] text-muted-foreground`,children:`iOS 需先用分享菜单「添加到主屏幕」,从主屏幕打开后才能开启。`}),b===`unsupported`&&(0,q.jsx)(`p`,{className:`mt-1 pl-6 text-[11px] text-muted-foreground`,children:`当前浏览器不支持推送。`})]}),(0,q.jsxs)(`div`,{className:`space-y-0.5`,children:[d.map(e=>{let t=e.pairId===f;return B===e.pairId?(0,q.jsxs)(`div`,{className:`space-y-2 rounded-lg border border-dashed p-3`,children:[(0,q.jsxs)(`p`,{className:`text-xs`,children:[`解绑「`,e.label,`」后需重新扫码才能连接,确定吗?`]}),(0,q.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,q.jsx)(Ui,{variant:`outline`,size:`sm`,onClick:()=>V(null),children:`取消`}),(0,q.jsx)(Ui,{variant:`destructive`,size:`sm`,onClick:()=>{V(null),k(e.pairId)},children:`确定解绑`})]})]},e.pairId):(0,q.jsxs)(`div`,{className:`flex items-center gap-0.5`,children:[(0,q.jsxs)(`button`,{type:`button`,onClick:()=>E(e.pairId),className:K(`flex min-w-0 flex-1 items-center gap-2 rounded-lg px-2 py-2 text-left text-sm transition-colors hover:bg-muted/60`,t?`text-foreground`:`text-muted-foreground`),children:[(0,q.jsx)(bt,{className:`h-4 w-4 shrink-0`}),(0,q.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.label}),t&&(0,q.jsx)(`span`,{className:K(`shrink-0 text-[10px]`,m?`text-muted-foreground`:`text-destructive`),children:g})]}),(0,q.jsx)(`button`,{type:`button`,"aria-label":`重命名 ${e.label}`,onClick:()=>{let t=window.prompt(`给这台电脑起个名:`,e.label);t?.trim()&&O(e.pairId,t)},className:`flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-muted-foreground/60 transition-colors hover:bg-accent hover:text-foreground`,children:(0,q.jsx)(zt,{className:`h-3.5 w-3.5`})}),(0,q.jsx)(`button`,{type:`button`,"aria-label":`解绑 ${e.label}`,onClick:()=>V(e.pairId),className:`flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-muted-foreground/60 transition-colors hover:bg-accent hover:text-destructive`,children:(0,q.jsx)(mn,{className:`h-3.5 w-3.5`})})]},e.pairId)}),(0,q.jsxs)(`button`,{type:`button`,onClick:D,className:`flex w-full items-center gap-2 rounded-lg px-2 py-2 text-left text-muted-foreground text-sm transition-colors hover:bg-muted/60 hover:text-foreground`,children:[(0,q.jsx)(Ut,{className:`h-4 w-4 shrink-0`}),(0,q.jsx)(`span`,{children:`配对新电脑`})]})]}),(0,q.jsxs)(`p`,{className:`px-2 pt-0.5 text-center text-[10px] text-muted-foreground/60`,children:[`版本 `,`d067527`]})]})]})]})}function K9({session:e,active:t,nowTick:n,subtitle:r,onSelect:i}){return(0,q.jsxs)(`button`,{type:`button`,onClick:()=>i(e.id),className:K(`flex w-full items-center gap-2 rounded-lg py-2 pr-2 pl-4 text-left text-sm transition-colors`,t?`bg-brand/10 dark:bg-brand/15`:`hover:bg-muted/60`),children:[(0,q.jsx)(whe,{status:e.status,unread:e.unread}),e.pinned&&(0,q.jsx)(Bt,{className:`h-3 w-3 shrink-0 text-muted-foreground`,"aria-hidden":!0}),(0,q.jsxs)(`span`,{className:`min-w-0 flex-1 truncate`,children:[e.title||`新对话`,r&&(0,q.jsx)(`span`,{className:`ml-1.5 text-[10px] text-muted-foreground`,children:r})]}),e.updatedAt&&(0,q.jsx)(`span`,{className:`shrink-0 text-[10px] text-muted-foreground/80 tabular-nums`,children:e9(e.updatedAt,`zh`,n)})]})}function q9({name:e,badge:t,sessions:n,folded:r,revealedExtra:i,activeId:a,nowTick:o,canCreate:s,onToggleFold:c,onRevealMore:l,onSelect:u,onNew:d}){let{t:f}=J(),p=G9(n.length,i),m=n.slice(0,p),h=n.length-p;return(0,q.jsxs)(`div`,{children:[(0,q.jsxs)(`div`,{className:`flex w-full items-center gap-1 rounded-lg px-2 py-2 transition-colors hover:bg-muted/60`,children:[(0,q.jsxs)(`button`,{type:`button`,onClick:c,className:`flex min-w-0 flex-1 items-center gap-1 text-left`,children:[(0,q.jsx)(`span`,{className:`flex h-5 w-5 shrink-0 items-center justify-center`,children:(0,q.jsx)(Ve,{className:K(`h-3.5 w-3.5 text-muted-foreground transition-transform duration-200`,!r&&`rotate-90`)})}),(0,q.jsx)(ut,{className:`h-4 w-4 shrink-0 text-muted-foreground`}),(0,q.jsxs)(`span`,{className:`min-w-0 flex-1 truncate font-medium text-sm`,children:[e,t&&(0,q.jsx)(`span`,{className:`ml-1.5 rounded bg-muted px-1 py-0.5 text-[10px] font-normal text-muted-foreground`,children:t})]}),(0,q.jsx)(`span`,{className:`shrink-0 text-[10px] text-muted-foreground tabular-nums`,children:n.length})]}),s&&d&&(0,q.jsx)(`button`,{type:`button`,onClick:d,className:`shrink-0 rounded-md p-1 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground`,children:(0,q.jsx)(Dt,{className:`h-3.5 w-3.5`})})]}),!r&&(0,q.jsxs)(`div`,{className:`mt-0.5 flex flex-col gap-y-0.5`,children:[m.map(e=>(0,q.jsx)(K9,{session:e,active:a===e.id,nowTick:o,onSelect:u},e.id)),n.length>5&&(0,q.jsxs)(`div`,{className:`flex items-center gap-1`,children:[h>0&&(0,q.jsx)(`button`,{type:`button`,onClick:()=>l(yhe(n.length,i)),className:`flex-1 rounded-lg py-1 text-center text-muted-foreground text-xs transition-colors hover:bg-muted/60 hover:text-foreground`,children:f(`Show {{n}} more`,{n:h})}),i>0&&(0,q.jsx)(`button`,{type:`button`,onClick:()=>l(bhe(i)),className:`flex-1 rounded-lg py-1 text-center text-muted-foreground text-xs transition-colors hover:bg-muted/60 hover:text-foreground`,children:f(`Collapse`)})]})]})]})}function whe({status:e,unread:t}){let n=e===`running`,r=!n&&e===`failed`,i=!n&&!r&&t===!0;return(0,q.jsx)(`span`,{className:K(`h-1.5 w-1.5 shrink-0 rounded-full`,n&&`animate-pulse bg-brand`,r&&`bg-destructive`,i&&`bg-green-500`,!n&&!r&&!i&&`bg-muted-foreground/30`)})}function The(){window.electronAPI||Object.defineProperty(window,"electronAPI",{value:{git:{diffHead:async()=>({ok:!1,error:`unavailable`})},changes:{readSnapshots:async()=>({}),writeSnapshots:async()=>!1},workspaceFiles:{listDir:async()=>({ok:!1,error:`unavailable`}),read:async()=>({ok:!1,error:`unavailable`}),write:async()=>({ok:!1,error:`unavailable`}),watchStart:async()=>({ok:!1,error:`unavailable`}),watchStop:async()=>({ok:!1,error:`unavailable`}),onChange:()=>()=>void 0,search:async()=>({ok:!1,error:`unavailable`})},files:{read:async()=>null,search:async()=>[],pathForFile:()=>null},agentRegistry:{list:async()=>null},agent:{stopTask:async()=>({ok:!1,error:`not supported on phone`}),stopSubagent:async()=>({ok:!1,error:`not supported on phone`})},providers:{listOauth:async()=>[],getOauthUsage:async()=>null}},writable:!1})}function Ehe(e){let t=window.electronAPI?.agent;t&&(t.stopTask=async(t,n)=>(e.stopTask(t,n),{ok:!0}),t.stopSubagent=async(t,n)=>(e.stopSubagent(t,n),{ok:!0}))}function Dhe(e,t){return e?t.some(e=>e.status===`running`||typeof e.pendingAskCount==`number`&&e.pendingAskCount>0||typeof e.pendingApprovalCount==`number`&&e.pendingApprovalCount>0):!1}var J9=null;async function Y9(e,t=typeof navigator>`u`?void 0:navigator.wakeLock){if(!e||!t){if(!J9)return;let e=J9;J9=null;try{await e.release()}catch{}return}if(!J9)try{let e=await t.request(`screen`);J9=e,e.addEventListener(`release`,()=>{J9===e&&(J9=null)})}catch{J9=null}}function Ohe(){if(!window.location.hash.replace(/^#/,``).includes(`pk=`))return null;let e=window.location.href;return history.replaceState(null,``,window.location.pathname+window.location.search),e}var khe={connecting:`连接中…`,online:`已连接`,"host-offline":`桌面端离线`,unauthorized:`配对已失效`,replaced:`已在其他页面打开`,offline:`重连中…`},X9=`enso-phone-sidebar-pinned`,Ahe=C();function jhe(){let e=D(window.location.search);if(!e)return null;let t=new URLSearchParams(window.location.search);t.delete(`session`);let n=t.toString();return history.replaceState(null,``,window.location.pathname+(n?`?${n}`:``)),e}function Mhe(){return L()?`ok`:/iphone|ipad|ipod/i.test(navigator.userAgent)&&!j()?`needs-install`:`unsupported`}function Nhe(){let[e,t]=(0,W.useState)(H),[n,r]=(0,W.useState)(R),c=a(e,n),[l]=(0,W.useState)(Ohe),[u,d]=(0,W.useState)(!1),[f,p]=(0,W.useState)(`connecting`),[m,h]=(0,W.useState)(`relay`),[g,y]=(0,W.useState)(null),[x,S]=(0,W.useState)([]),[C,D]=(0,W.useState)([]),[O,k]=(0,W.useState)([]),[A,j]=(0,W.useState)([]),[N,P]=(0,W.useState)([]),[F]=(0,W.useState)(jhe),[I]=(0,W.useState)(()=>M(c?.pairId??null,F)),[L,V]=(0,W.useState)(I.activeId),[U,ne]=(0,W.useState)(null),[se,ce]=(0,W.useState)(!1),[le,ue]=(0,W.useState)(new Set),[de,fe]=(0,W.useState)([]),[pe,me]=(0,W.useState)(!1),he=Dme(Ome),[ge,_e]=(0,W.useState)(()=>localStorage.getItem(X9)!==`off`),ve=he&&ge,be=()=>{_e(e=>(localStorage.setItem(X9,e?`off`:`on`),!e))},[xe,Se]=(0,W.useState)(!1),[Ce,we]=(0,W.useState)(null),[Te,Ee]=(0,W.useState)(!1),[De,Oe]=(0,W.useState)(()=>localStorage.getItem(B)===`on`),[G,ke]=(0,W.useState)(!1),[Ae,je]=(0,W.useState)(!1),[Me,Ne]=(0,W.useState)(!1),[Pe,Fe]=(0,W.useState)(!1),[Ie,Le]=(0,W.useState)(!1),[Re,ze]=(0,W.useState)(!1),[Be,Ve]=(0,W.useState)(null),[He,Ue]=(0,W.useState)(!1),[We,Ge]=(0,W.useState)(!1),[Ke,qe]=(0,W.useState)(!1),Je=(0,W.useRef)(!1),[Ye,Xe]=(0,W.useState)(!1),[Ze,Qe]=(0,W.useState)(!1),$e=(0,W.useRef)(!1),[et,tt]=(0,W.useState)([]),[nt,rt]=(0,W.useState)([]),[it,at]=(0,W.useState)([]),[ot,st]=(0,W.useState)(!1),[ct,lt]=(0,W.useState)([]),[ut,dt]=(0,W.useState)({items:[],offset:0}),[ft,pt]=(0,W.useState)(()=>q7(!0,I.botChatId)),[mt,ht]=(0,W.useState)(I.botChatId),[gt,_t]=(0,W.useState)(null),[vt,yt]=(0,W.useState)({}),[bt,xt]=(0,W.useState)({}),[St,Ct]=(0,W.useState)({}),[wt,Tt]=(0,W.useState)(null),Et=(0,W.useRef)(null),Dt=(0,W.useMemo)(()=>new aa(e=>Mt.current?.send(e)),[]),Ot=(0,W.useMemo)(()=>new qo(e=>Mt.current?.send(e)),[]),kt=(0,W.useMemo)(()=>new Yo(e=>Mt.current?.send(e)),[]),[At,jt]=(0,W.useState)([]),Mt=(0,W.useRef)(null),Nt=(0,W.useRef)(L),Pt=(0,W.useRef)(x),Ft=(0,W.useRef)(U);Pt.current=x,Ft.current=U,Nt.current=L;let It=mt?it.find(e=>e.id===mt):void 0,Rt=It?.kind===`group`?Eo(It,et):void 0,zt=Rt?.current??It,Bt=It?.kind===`direct`?It.sessions[It.members[0]]?.conversationId??null:null,Vt=mt?Bt??gt:L,Ht=(0,W.useRef)(Vt);Ht.current=Vt;let Ut=(0,W.useRef)(it);Ut.current=it;let Wt=(0,W.useRef)(mt);Wt.current=mt;let Gt=(0,W.useRef)(null);Gt.current=Rt?.current.id??null;let Kt=(0,W.useRef)(new Set);Kt.current=new Set(Rt?Object.values(Rt.current.sessions).map(e=>e.conversationId):[]);let qt=(0,W.useRef)(null),Jt=(0,W.useRef)(new Map),Yt=(0,W.useRef)(null),[Xt,Zt]=(0,W.useState)(!1),Qt=(0,W.useRef)(null);(0,W.useEffect)(()=>{if(w(),!(`serviceWorker`in navigator))return;let e=e=>{let t=e.data;if(t?.type!==`open-session`)return;let n=ae(t.sessionId);if(!n)return;let r=Ut.current.find(e=>Object.values(e.sessions).some(e=>e.conversationId===n));r?(ht(r.id),_t(null)):(ht(null),V(n)),_n()};return navigator.serviceWorker.addEventListener(`message`,e),()=>navigator.serviceWorker.removeEventListener(`message`,e)},[]),(0,W.useEffect)(()=>{Ki(Wi(x))},[x]),(0,W.useEffect)(()=>{let e=()=>{Y9(Dhe(document.visibilityState===`visible`&&f===`online`,x))};return e(),document.addEventListener(`visibilitychange`,e),document.addEventListener(`pointerdown`,e,{passive:!0}),()=>{document.removeEventListener(`visibilitychange`,e),document.removeEventListener(`pointerdown`,e),Y9(!1)}},[x,f]),(0,W.useEffect)(()=>{if(F){_();return}_().then(e=>{e&&(ht(null),_t(null),V(e),_n())})},[F]),(0,W.useEffect)(()=>{l&&e.length>0&&d(!0)},[]),(0,W.useEffect)(()=>{if(!c)return;Qt.current=null,ke(!1),ue(new Set),h(`relay`),je(!1),Ne(!1),Fe(!1),Le(!1),Ge(!1),qe(!1),Je.current=!1,Xe(!1),Qe(!1),$e.current=!1;let e=()=>{Ne(!0),Le(!0)},t=new o(c,{onState:e=>{e!==`online`&&(Et.current?.interrupted(),Dt.reset(),Ot.reset(),kt.reset(),Ge(!1),Xe(!1)),p(e)},onBotArtifacts:e=>Dt.receive(e),onBotArtifactImage:e=>Dt.receiveImage(e),onBotNewSessionResult:t=>{Ot.receive(t),t.error===`read-only`&&e()},onBotThreadResult:t=>{kt.receive(t),t.error===`read-only`&&e()},onTransport:e=>{h(e),y(null)},onRtt:y,onVoiceInput:je,onRemoteDesktop:Fe,onReadOnly:e=>{Ne(e),e||Le(!1)},onCommandRejected:(t,n)=>{n===`read-only`&&e()},onCatalog:(e,t)=>{S(e),D(t??[])},onProjects:(e,t)=>{k(e),j(t??[])},onProviders:P,onSession:(e,t)=>{ne(n=>e===Ht.current?t:n),Kt.current.has(e)&&Ct(n=>({...n,[e]:t}))},onBotCatalog:(e,t,n,r)=>{Ue(e),Ge(e&&n),Xe(e&&r),rt(t),!e&&(at([]),tt([]),lt([]),dt({items:[],offset:0}),ht(null),_t(null),pt(!1))},onBotChats:(e,t)=>{at(e),tt(t),st(!0)},onBotInbox:lt,onBotActivity:(e,t)=>{for(let t of e)Jt.current.set(t.conversationId,t.botId);dt({items:e,offset:t})},onGroupTimeline:e=>{e.beforeSeq!==void 0&&Yt.current===`${e.chatId}:${e.beforeSeq}`&&(Yt.current=null,Zt(!1)),yt(t=>({...t,[e.chatId]:Ao(t[e.chatId],e)}))},onBotChatState:({type:e,chatId:t,...n})=>xt(e=>({...e,[t]:n})),onBotEvent:e=>{if(e.kind===`model-notice`){e.text&&(e.chatId===Wt.current||e.chatId===Gt.current)&&Tt(e.text);return}!e.chatId||e.chatId!==Gt.current||qt.current||(qt.current=setTimeout(()=>{qt.current=null;let e=Gt.current;e&&t.send({type:`bot-chat-open`,chatId:e})},200))},onBotSendResult:t=>{Et.current?.settle(t.deliveryId,t.ok,t.error),t.error===`read-only`&&e()},onBotRetryResult:e=>{e.chatId===Gt.current&&Tt(e.ok?`已开始重试`:`重试失败:${e.error===`session-busy`?`请等当前回复结束`:`该回复已过期或无法恢复,请重新发送需求`}`)},onSync:e=>ce(e===`syncing`),onGhostSession:e=>{e===Nt.current&&V(null)},onHistoryPending:(e,t)=>{ue(n=>{let r=new Set(n);return t?r.add(e):r.delete(e),r})},onPushConfig:e=>{Qt.current=e,ke(!0),localStorage.getItem(`enso-phone-push`)===`on`&&re(e).then(e=>{e.ok&&t.send({type:`push-subscribe`,subscription:e.subscription})})}});Mt.current=t,t.connect();let n=()=>{document.visibilityState===`visible`?(t.nudge(`visibility`),t.send({type:`presence`,visible:!0})):(t.conceal(),t.send({type:`presence`,visible:!1}),t.flushCache())},r=()=>{document.visibilityState===`visible`&&(t.nudge(`online`),t.send({type:`presence`,visible:!0}))},i=e=>{document.visibilityState===`visible`&&(t.nudge(e.persisted?`online`:`visibility`),t.send({type:`presence`,visible:!0}))},a=()=>{document.visibilityState===`visible`&&t.nudge(`visibility`)},s=()=>{t.conceal(),t.flushCache()};return document.addEventListener(`visibilitychange`,n),window.addEventListener(`online`,r),window.addEventListener(`pageshow`,i),window.addEventListener(`focus`,a),window.addEventListener(`pagehide`,s),()=>{document.removeEventListener(`visibilitychange`,n),window.removeEventListener(`online`,r),window.removeEventListener(`pageshow`,i),window.removeEventListener(`focus`,a),window.removeEventListener(`pagehide`,s),qt.current&&clearTimeout(qt.current),qt.current=null,t.close(),Mt.current=null,Ot.reset(),kt.reset()}},[c?.pairId,c?.token,c?.relayUrl,c?.contentKey]);let $t=(0,W.useRef)(new Set);(0,W.useEffect)(()=>{let e=Vt!==null&&$t.current.has(Vt);Mt.current?.subscribe(Vt,{fresh:e});for(let e of $t.current)e!==Vt&&$t.current.delete(e);ne(Vt?Mt.current?.getSession(Vt)??null:null)},[Vt,c?.pairId]);let en=c?.pairId;(0,W.useEffect)(()=>{en&&ee(en,{activeId:L,botChatId:mt})},[L,mt,en]),(0,W.useEffect)(()=>{if(!en)return;let e=new i(b,en);Et.current=e,jt([]);let t=e.subscribe(e=>jt([...e]));return e.restore().catch(()=>Tt(`离线消息读取失败,请勿清除浏览器数据;恢复存储后可重试。`)),()=>{t(),Et.current===e&&(Et.current=null)}},[en]),(0,W.useEffect)(()=>{if(f===`online`)for(let e of Et.current?.drain()??[])Mt.current?.send({type:`bot-send`,chatId:e.chatId,text:e.text,...e.images?.length?{images:e.images}:{},deliveryId:e.deliveryId})},[f,At]),(0,W.useEffect)(()=>{let e=setInterval(()=>Et.current?.expire(),1e3);return()=>clearInterval(e)},[]);let tn=Rt?.current.id??null;(0,W.useEffect)(()=>{!tn||f!==`online`||(Yt.current=null,Zt(!1),Mt.current?.send({type:`bot-chat-open`,chatId:tn}))},[tn,f]),(0,W.useEffect)(()=>{if(!Xt)return;let e=setTimeout(()=>{Yt.current=null,Zt(!1),Tt(`历史加载未完成,请点击加载重试。`)},1e4);return()=>clearTimeout(e)},[Xt]),(0,W.useEffect)(()=>{let e={};for(let t of Kt.current){let n=Mt.current?.getSession(t);n&&(e[t]=n)}Ct(e)},[tn,Rt?.current.sessions]),(0,W.useEffect)(()=>{if(!L||mt)return;let e=it.find(e=>Object.values(e.sessions).some(e=>e.conversationId===L));e&&(ht(e.id),V(null))},[L,mt,it]),(0,W.useEffect)(()=>{let e=(e,t)=>{let n=Pt.current.find(t=>t.id===e)?.queued,r=Kpe(n,e,t,H7(e===Nt.current&&Ft.current?[...Ft.current.messages.values()]:[]));r&&fe(e=>[...e,r])};_re({removeQueuedMessage:(e,t)=>Mt.current?.send({type:`queue-remove`,sessionId:e,messageId:t}),updateQueuedMessage:(e,t,n)=>Mt.current?.send({type:`queue-update`,sessionId:e,messageId:t,text:n}),sendQueuedNow:(t,n)=>{e(t,n),Mt.current?.send({type:`queue-send-now`,sessionId:t,messageId:n})},interruptAndSendQueued:async(t,n)=>{e(t,n),Mt.current?.send({type:`queue-interrupt-send`,sessionId:t,messageId:n})},pauseGoal:e=>Mt.current?.send({type:`goal-pause`,sessionId:e}),resumeGoal:e=>Mt.current?.send({type:`goal-resume`,sessionId:e}),clearGoal:e=>Mt.current?.send({type:`goal-clear`,sessionId:e}),rewind:(e,t,n)=>Mt.current?.send({type:`rewind`,sessionId:e,userIndexFromEnd:t,...n?{restoreFiles:n}:{}}),retry:e=>Mt.current?.send({type:`retry`,sessionId:e})}),Ehe({stopTask:(e,t)=>Mt.current?.send({type:`task-stop`,sessionId:e,taskId:t}),stopSubagent:(e,t)=>Mt.current?.send({type:`subagent-stop`,sessionId:e,agentId:t})})},[]);let rn=(0,W.useRef)(null);(0,W.useEffect)(()=>{if(!L)return;let e=H7(U?[...U.messages.values()]:[]),t=U?.status===`running`,n=rn.current,r=n?.id===L&&n.running&&!t;rn.current={id:L,running:t},fe(t=>{let n=Ype(t,L,e,{turnSettled:r});return n.length===t.length&&n.every((e,n)=>e===t[n])?t:n})},[U,L]);let an=x.find(e=>!e.parentId)?.id;(0,W.useEffect)(()=>{!mt&&!L&&an&&V(an)},[L,mt,an]);let on=(0,W.useMemo)(()=>x.find(e=>e.id===L),[x,L]),sn=(0,W.useMemo)(()=>{if(!on)return;let e=on.parentId?x.find(e=>e.id===on.parentId):on;if(!e)return;let t=x.filter(t=>t.parentId===e.id);return t.length>0?{parent:e,children:t}:void 0},[x,on]),cn=on&&!on.parentId,ln=cn?N.find(e=>e.id===on.providerId)?.models.find(e=>e.id===on.modelId)?.label??on.modelId??`选择模型`:void 0,un=f===`online`?sme(m,g):khe[f],dn=e=>{S([]),D([]),k([]),j([]),P([]),ne(null),ce(!1),fe([]),y(null),Ue(!1),rt([]),at([]),tt([]),st(!1),ht(e.botChatId),pt(e.botChatId!==null),_t(null),yt({}),xt({}),dt({items:[],offset:0}),Ct({}),Tt(null),V(e.activeId)},fn=e=>{e!==c?.pairId&&(T(e),r(e),p(`connecting`),dn(M(e)),_n())},pn=n=>{let i=s(e,n);t(i),z(i),T(n.pairId),r(n.pairId),dn(M(n.pairId)),d(!1)},mn=n=>{let i=e.find(e=>e.pairId===n);i&&E(i.relayUrl,i.pairId,i.token).catch(()=>{}),n===c?.pairId&&Mt.current?.close(),te(n);let o=ie(e,n);if(t(o),z(o),n===(c?.pairId??null)){let e=a(o,null);T(e?.pairId??null),r(e?.pairId??null),e&&p(`connecting`),dn(M(e?.pairId??null)),e||_n()}},hn=(n,r)=>{let i=v(e,n,r);t(i),z(i)};if(!c||u)return(0,q.jsx)(dhe,{autoInvite:l,onPaired:pn,onCancel:c?()=>d(!1):void 0});if(f===`unauthorized`){let t=e.length>1;return(0,q.jsxs)(`div`,{className:`flex h-full flex-col items-center justify-center gap-3 px-6 text-center`,children:[(0,q.jsx)(nn,{className:`h-8 w-8 text-muted-foreground`}),(0,q.jsx)(`h1`,{className:`font-medium text-lg`,children:`配对已失效`}),(0,q.jsxs)(`p`,{className:`text-muted-foreground text-sm`,children:[`「`,c.label,`」已解绑此设备,`,t?`可移除它并切到其他电脑。`:`请重新扫码配对。`]}),(0,q.jsx)(Ui,{onClick:()=>mn(c.pairId),children:t?`移除此配对`:`重新配对`})]})}if(f===`replaced`)return(0,q.jsxs)(`div`,{className:`flex h-full flex-col items-center justify-center gap-3 px-6 text-center`,children:[(0,q.jsx)(nn,{className:`h-8 w-8 text-muted-foreground`}),(0,q.jsx)(`h1`,{className:`font-medium text-lg`,children:`已在其他页面打开`}),(0,q.jsxs)(`p`,{className:`text-muted-foreground text-sm`,children:[`「`,c.label,`」正被另一个页面连着,同一时间只能有一个页面。`]}),(0,q.jsx)(Ui,{onClick:()=>window.location.reload(),children:`在这个页面重连`})]});let gn=e=>Mt.current?.send(e),_n=()=>{(localStorage.getItem(X9)===`off`||!window.matchMedia(`(min-width: 900px)`).matches)&&me(!1)},vn=()=>{pt(q7(He,mt)),me(!0),He&&gn({type:`bot-catalog-request`})},yn=(e,t,n=[])=>{Tt(null),Et.current?.enqueue({chatId:e,text:t,images:n})},bn=e=>(0,q.jsx)(ohe,{items:At.filter(t=>t.chatId===e),readOnly:Me,onRetry:e=>Et.current?.retry(e),onDiscard:e=>Et.current?.discard(e)}),xn=new Map(nt.map(e=>[e.id,e])),Sn=e=>Me?`只读设备不能新建会话`:f===`online`?We?Ke?`正在新建会话…`:At.some(t=>t.chatId===e)?`请先处理待发送消息`:void 0:`请升级桌面端以支持新建会话`:`请先连接桌面端`,Cn=async e=>{if(Sn(e)||Je.current)return;let t=Mt.current;Je.current=!0,qe(!0),Tt(null);try{let n=await Ot.start(e,()=>t===Mt.current&&Wt.current===e&&window.confirm(`群聊中仍有回复、排队或委派任务。新建会话将停止成员回复,并取消未标记保留的委派。旧消息会保留。继续吗?`));if(t!==Mt.current||Wt.current!==e)return;Tt(!n||n.ok?null:n.error===`read-only`?`只读设备不能新建会话`:n.error===`timeout`||n.error===`offline`?`未收到新会话确认,请连接后核对聊天状态,勿重复操作`:`新建会话失败:${n.error??`请稍后重试`}`),n?.ok&&(t?.send({type:`bot-catalog-request`}),t?.send({type:`bot-chat-open`,chatId:e}))}finally{t===Mt.current&&(Je.current=!1,qe(!1))}},wn=Me?`只读设备不能切换或新建话题`:f===`online`?Ze?`正在处理话题…`:void 0:`请先连接桌面端`,Tn=async e=>{if(wn||$e.current)return;let t=Mt.current;$e.current=!0,Qe(!0),Tt(null);try{let n=await kt.request(e);if(t!==Mt.current||Wt.current!==e.chatId)return;n.ok?_t(null):Tt(n.error===`read-only`?`只读设备不能切换或新建话题`:n.error===`timeout`||n.error===`offline`?`未收到桌面确认,请连接后核对当前话题`:n.error===`invalid`?`该话题已不存在或群已归档`:`话题操作失败:${n.error??`请稍后重试`}`)}finally{t===Mt.current&&($e.current=!1,Qe(!1))}},En=e=>{if(e.kind===`group`&&!gt){let t=Object.entries(e.sessions).flatMap(([e,{conversationId:t}])=>{let n=St[t];return n?[{sessionId:t,botId:e,view:n}]:[]});return(0,q.jsx)(Eme,{chat:e,bots:xn,timeline:vt[e.id],state:bt[e.id],pending:t,activities:Ho(ut.items,e.id),clockOffset:ut.offset,connState:f,stateLabel:un,notice:wt,outbox:bn(e.id),deviceReadOnly:Me,readOnlyRejected:Ie,onOpenDrawer:vn,drawerDocked:ve,onNewSession:()=>void Cn(e.id),canCreate:!Sn(e.id),newSessionHint:Sn(e.id),newSessionBusy:Ke,threads:Ye&&Rt&&It?{entries:Rt.entries,currentId:e.id,rootId:It.id,disabledHint:wn,onSelect:e=>void Tn({type:`bot-thread-select`,chatId:It.id,threadId:e}),onCreate:()=>void Tn({type:`bot-thread-create`,chatId:It.id})}:void 0,voice:Dn,onLoadOlder:()=>{let t=vt[e.id]?.entries[0]?.seq,n=`${e.id}:${t}`;f!==`online`||t===void 0||Yt.current||(Yt.current=n,Zt(!0),gn({type:`bot-timeline`,chatId:e.id,beforeSeq:t}))},historyLoading:Xt,onJumpLatest:()=>{Yt.current=null,Zt(!1),yt(t=>{let n={...t};return delete n[e.id],n}),gn({type:`bot-chat-open`,chatId:e.id})},onSend:(t,n)=>yn(e.id,t,n),onStop:()=>gn({type:`bot-stop`,chatId:e.id}),onRetry:t=>{Tt(`正在请求重试…`),gn({type:`bot-retry`,chatId:e.id,entryId:t})},onOpenProcess:_t,onApproval:(e,t,n)=>gn({type:`approval-respond`,sessionId:e,requestId:t,decision:n}),onAsk:(e,t,n)=>gn({type:`ask-respond`,sessionId:e,requestId:t,answer:n})})}let t=e.kind===`group`,n=vt[e.id]?.entries.find(e=>e.kind===`bot`&&e.conversationId===gt),r=gt?Jt.current.get(gt):void 0,i=xn.get(t?n?.kind===`bot`?n.botId:r??``:e.members[0]);return(0,q.jsx)(W7,{sessionId:Vt??`bot-chat:${e.id}`,clockOffset:ut.offset,title:t?`${i?.name??`成员`} · 过程`:i?.name??e.title,projectName:t?e.title:i?.title??``,view:Vt?U:Ahe,connState:f,stateLabel:un,syncing:se&&!!Vt,onOpenDrawer:vn,drawerDocked:ve,onNewSession:()=>!t&&void Cn(e.id),canCreate:!t&&!Sn(e.id),newSessionHint:Sn(e.id),newSessionBusy:Ke,hasOlder:!!(Vt&&U&&U.messages.size>0&&Math.min(...U.messages.keys())>0),historyLoading:!!(Vt&&le.has(Vt)),onLoadOlder:()=>Vt&&Mt.current?.requestHistory(Vt),voice:Dn,bot:t?{readOnly:!0,onBack:()=>_t(null)}:{chatId:e.id,notice:wt,outbox:bn(e.id)},artifacts:!t&&Vt?{chatId:e.id,conversationId:Vt}:void 0,deviceReadOnly:Me,readOnlyRejected:Ie,onSend:(t,n)=>yn(e.id,t,n),onAbort:()=>Vt&&gn({type:`abort`,sessionId:Vt}),onApproval:(e,t)=>Vt&&gn({type:`approval-respond`,sessionId:Vt,requestId:e,decision:t}),onAsk:(e,t)=>Vt&&gn({type:`ask-respond`,sessionId:Vt,requestId:e,answer:t})})},Dn=Ae?e=>Mt.current?.startVoice(e)??{push:()=>{},finish:()=>Promise.resolve({ok:!1,error:`failed`}),cancel:()=>{}}:void 0,On=async e=>{if(Ve(null),!e){localStorage.setItem(B,`off`),Oe(!1),gn({type:`push-unsubscribe`}),oe();return}let t=Qt.current;if(!t)return;Oe(!0),ze(!0);let n=await re(t);if(ze(!1),!n.ok){Oe(!1),Ve(n.reason);return}gn({type:`push-subscribe`,subscription:n.subscription}),localStorage.setItem(B,`on`)};return(0,q.jsxs)(`div`,{className:`phone-app-root flex h-full min-h-0`,children:[(0,q.jsx)(Che,{open:ve||pe,docked:ve,pinnable:he,onTogglePinned:be,projects:O,groups:A,catalog:x,pinnedOrder:C,activeId:mt?null:L,canCreate:f===`online`&&!Me,devices:e,activeDevicePairId:c.pairId,remoteDesktop:Pe,connected:f===`online`,connectionLabel:un,onClose:()=>_n(),onSelect:e=>{ht(null),_t(null),V(e),_n()},onNewConversation:e=>{_n(),we(e),Se(!0)},pushEnabled:De,pushBusy:Re,pushError:Be,pushAvailability:Mhe(),pushConfigReady:G,onTogglePush:e=>void On(e),onSwitchDevice:fn,onAddDevice:()=>{_n(),d(!0)},onRenameDevice:hn,onUnpairDevice:mn,botSegment:He?{active:ft,onChange:e=>{pt(e),lme(e?`bot`:`code`),e&&gn({type:`bot-catalog-request`})},panel:(0,q.jsx)(Ko,{bots:nt,chats:it,activeChatId:mt,inbox:ct,activities:ut.items,onDismiss:Me?void 0:e=>gn({type:`bot-inbox-dismiss`,key:e}),onSelect:e=>{ht(e),_t(null),Tt(null),_n()}})}:void 0}),(0,q.jsxs)(`div`,{className:`flex h-full min-w-0 flex-1 flex-col`,children:[he&&!ve&&!pe&&(0,q.jsx)(`button`,{type:`button`,onClick:vn,"aria-label":`打开会话列表`,className:`fixed top-1/2 left-0 z-40 flex h-16 w-6 -translate-y-1/2 items-center justify-center rounded-r-lg border border-l-0 bg-background/90 text-muted-foreground shadow-sm backdrop-blur transition-colors hover:bg-accent hover:text-foreground`,children:(0,q.jsx)(Lt,{className:`h-4.5 w-4.5`})}),It?(0,q.jsx)(sa.Provider,{value:{port:Dt,online:f===`online`},children:En(zt??It)}):mt?(0,q.jsxs)(`div`,{className:`relative flex h-full flex-col items-center justify-center gap-3 px-6 text-center`,children:[!ve&&(0,q.jsx)(`button`,{type:`button`,onClick:vn,"aria-label":`打开会话列表`,className:`absolute top-2 left-2 flex h-9 w-9 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground`,children:(0,q.jsx)(Lt,{className:`h-4.5 w-4.5`})}),(0,q.jsx)(`p`,{children:ot?`该 Bot 聊天已不存在或不可用`:`正在恢复 Bot 聊天…`}),(0,q.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:un}),(0,q.jsx)(Ui,{onClick:vn,children:`选择聊天`})]}):(0,q.jsx)(W7,{sessionId:L,title:on?.title||(L?`会话`:`EnsoCode`),projectName:on?.projectName??``,cwd:on?.cwd,view:U,connState:f,stateLabel:un,syncing:se&&!!L,onOpenDrawer:vn,drawerDocked:ve,onNewSession:()=>{we(null),Se(!0)},canCreate:f===`online`&&O.length>0&&!Me,modelLabel:f===`online`?ln:void 0,onOpenConfig:()=>Ee(!0),tabGroup:sn,onSelectTab:V,hasOlder:!!(L&&U&&U.messages.size>0&&Math.min(...U.messages.keys())>0),historyLoading:!!(L&&le.has(L)),onLoadOlder:()=>L&&Mt.current?.requestHistory(L),voice:Dn,queued:qpe(on?.queued,de,L??``),echoes:de,goal:on?.goal,context:on?.context,usageTotals:on?.usageTotals,slashCommands:on?.slashCommands,deviceReadOnly:Me,readOnlyRejected:Ie,onSend:(e,t)=>{if(!L)return;let n=ye(e);if(n){gn({type:`compact`,sessionId:L,...n.instructions?{instructions:n.instructions}:{}});return}let r=/^\/goal(?:\s+([\s\S]+))?$/.exec(e.trim());if(r){let e=r[1]?.trim();if(!e)return;gn(e===`clear`?{type:`goal-clear`,sessionId:L}:e===`pause`?{type:`goal-pause`,sessionId:L}:e===`resume`?{type:`goal-resume`,sessionId:L}:{type:`goal-set`,sessionId:L,text:e});return}gn({type:U?.status===`running`?`enqueue`:`prompt`,sessionId:L,text:e,...t.length?{images:t}:{}})},onAbort:()=>L&&gn({type:`abort`,sessionId:L}),onApproval:(e,t)=>L&&gn({type:`approval-respond`,sessionId:L,requestId:e,decision:t}),onAsk:(e,t)=>L&&gn({type:`ask-respond`,sessionId:L,requestId:e,answer:t})}),(0,q.jsx)(ihe,{open:xe&&!Me,projects:O,providers:N,preferredProjectId:Ce,onClose:()=>{Se(!1),we(null)},onCreate:e=>{let t=crypto.randomUUID();gn({type:`spawn`,sessionId:t,...e}),$t.current.add(t),Se(!1),we(null),ht(null),_t(null),V(t)}}),cn&&L&&!Me&&(0,q.jsx)(fhe,{open:Te,providers:N,config:{providerId:on.providerId,modelId:on.modelId,reasoningEnabled:on.reasoningEnabled,thinkingLevel:on.thinkingLevel},onClose:()=>Ee(!1),onSetModel:(e,t)=>gn({type:`set-model`,sessionId:L,providerId:e,modelId:t}),onSetReasoning:e=>gn({type:`set-reasoning`,sessionId:L,enabled:e}),onSetThinking:e=>gn({type:`set-thinking`,sessionId:L,level:e})})]})]})}function Phe(e){return!e.appleMobile||!e.standalone||e.safeTop<=0||e.innerHeight<=e.innerWidth?!1:e.innerHeight>=Math.max(e.screenWidth,e.screenHeight)-1}function Fhe(e){return e.split(`,`).map(e=>e.trim()).filter(e=>e&&!/^viewport-fit\s*=/i.test(e)).join(`, `)}function Ihe(){return/iphone|ipad|ipod/i.test(navigator.userAgent)||navigator.platform===`MacIntel`&&navigator.maxTouchPoints>1}function Lhe(){let e=document.querySelector(`meta[name="viewport"]`);if(!e||!Ihe())return;let t=document.createElement(`div`);t.setAttribute(`aria-hidden`,`true`),t.style.cssText=`position:fixed;visibility:hidden;pointer-events:none;padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom)`,document.body.appendChild(t);let n=()=>{let r=getComputedStyle(t);if(!Phe({appleMobile:!0,standalone:j(),safeTop:Number.parseFloat(r.paddingTop)||0,innerWidth:window.innerWidth,innerHeight:window.innerHeight,screenWidth:window.screen.width,screenHeight:window.screen.height}))return;let i=Number.parseFloat(r.paddingBottom)||0;document.documentElement.style.setProperty(`--phone-safe-bottom`,`${i}px`),e.content=Fhe(e.content),window.removeEventListener(`resize`,n),document.removeEventListener(`visibilitychange`,n),t.remove()};window.addEventListener(`resize`,n),document.addEventListener(`visibilitychange`,n),n()}var Z9=new URLSearchParams(location.search);if(Z9.get(`mode`)===`phone`){A(`phone`),Z9.delete(`mode`);let e=Z9.toString();history.replaceState(null,``,`${location.pathname}${e?`?${e}`:``}${location.hash}`)}var Q9=ne(location.search,k(),H(),R());Q9&&location.replace(Q9),The(),F(),Lhe();var $9=document.getElementById(`root`);$9&&!Q9&&(0,_e.createRoot)($9).render((0,q.jsx)(W.StrictMode,{children:(0,q.jsx)(Nhe,{})}));export{Y as t};
|