decocms 4.150.19 → 4.150.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-DlSYUhhJ.js → AlertCircle-BaA3X0Vc.js} +1 -1
- package/dist/client/assets/{AreaChart-Bug3Ayx7.js → AreaChart-B4pcuH23.js} +1 -1
- package/dist/client/assets/{ArrowUp-C6IdQ4Rw.js → ArrowUp-Df4rbgne.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-2UBzQU8F.js → ArrowUpRight-fq20wgvL.js} +1 -1
- package/dist/client/assets/{Check-C2SHqL1z.js → Check-DdyKCl8O.js} +1 -1
- package/dist/client/assets/{CheckCircle-DKn0NYt4.js → CheckCircle-IiUO6eKZ.js} +1 -1
- package/dist/client/assets/{ChevronDown-Cn6ogkEs.js → ChevronDown-BSVV4L9A.js} +1 -1
- package/dist/client/assets/{ChevronRight-DFFYZU4j.js → ChevronRight-CSgj0z6i.js} +1 -1
- package/dist/client/assets/{ChevronUp-DhTMlsX_.js → ChevronUp-GR0-Yt4d.js} +1 -1
- package/dist/client/assets/{Copy01-DdAbCNOp.js → Copy01-Cv0Vuqbe.js} +1 -1
- package/dist/client/assets/{CpuChip01-DjJbFGcN.js → CpuChip01-UMJdnf1a.js} +1 -1
- package/dist/client/assets/{DotsVertical-DbiSyDeJ.js → DotsVertical-OBlENp_a.js} +1 -1
- package/dist/client/assets/{Eye-CAJuwNcI.js → Eye-CkjEvMwH.js} +1 -1
- package/dist/client/assets/{FilterLines-5mK4tkWD.js → FilterLines-Ca7W3tHb.js} +1 -1
- package/dist/client/assets/{HardDrive-0rFPC5TH.js → HardDrive-B91rzidb.js} +1 -1
- package/dist/client/assets/{Key01-zOjc9MTI.js → Key01-DVGzNfoY.js} +1 -1
- package/dist/client/assets/{LayoutLeft-BU786hWD.js → LayoutLeft-Ciug-ep8.js} +1 -1
- package/dist/client/assets/{LinkExternal01-CEtC-Y1R.js → LinkExternal01-CbfqV87q.js} +1 -1
- package/dist/client/assets/{LogOut01-BwC-5Qgg.js → LogOut01-B0JVxGo4.js} +1 -1
- package/dist/client/assets/{Monitor01-DliyLag8.js → Monitor01-CEdUOtdj.js} +1 -1
- package/dist/client/assets/{Palette-7rfbgqXo.js → Palette-DgmLnO_l.js} +1 -1
- package/dist/client/assets/{Play-CESoZt50.js → Play-DcSuTxiG.js} +1 -1
- package/dist/client/assets/{Plus-ClptGdKW.js → Plus-DUvbS-Yy.js} +1 -1
- package/dist/client/assets/{SearchLg-BjGhynue.js → SearchLg-CSWY8viA.js} +1 -1
- package/dist/client/assets/{SearchMd-CaUeXTov.js → SearchMd-D0poZQV_.js} +1 -1
- package/dist/client/assets/{Settings02-DFgk8xib.js → Settings02-Sy5kNpSu.js} +1 -1
- package/dist/client/assets/{Shield01-DZGUsmxL.js → Shield01-Bcql6hT4.js} +1 -1
- package/dist/client/assets/{Star01-DdohD5Pt.js → Star01-2mO5G0Xw.js} +1 -1
- package/dist/client/assets/{Stars01-BFiXE03I.js → Stars01-DqIThrOc.js} +1 -1
- package/dist/client/assets/{Stars02-5-YOV7bU.js → Stars02-cKtwD-F2.js} +1 -1
- package/dist/client/assets/{Sun-BivegFnN.js → Sun-DsnsEGXF.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-gfwGyIBw.js → SwitchHorizontal01-BwAs_KcG.js} +1 -1
- package/dist/client/assets/{Tool01-NPc3h9k6.js → Tool01-D2fd-Mg5.js} +1 -1
- package/dist/client/assets/{Tool02-Ce6Zs6Sn.js → Tool02-C17Y4pBP.js} +1 -1
- package/dist/client/assets/{Trash01-BQyhs2bx.js → Trash01-BiVOd2DS.js} +1 -1
- package/dist/client/assets/{TrendUp01-d5BuhRAe.js → TrendUp01-D1GkdBOV.js} +1 -1
- package/dist/client/assets/{Upload01-Dvnl-BDq.js → Upload01-k2Sn0RXQ.js} +1 -1
- package/dist/client/assets/{User01-CAUBoJic.js → User01-cC3unvvx.js} +1 -1
- package/dist/client/assets/{Users01-CtxuIY4r.js → Users01-BdNSg6CC.js} +1 -1
- package/dist/client/assets/{Users03-Bh6lOZcY.js → Users03-CqyDxwt6.js} +1 -1
- package/dist/client/assets/{X-pcpfoSUj.js → X-Baqkpp1k.js} +1 -1
- package/dist/client/assets/{XCircle-aY4lZd4c.js → XCircle-8Wd2-AR5.js} +1 -1
- package/dist/client/assets/{XClose-BkVqInnI.js → XClose-CBFLmbVP.js} +1 -1
- package/dist/client/assets/{Zap-BB732fZe.js → Zap-C4qF8Cn-.js} +1 -1
- package/dist/client/assets/{ZapSquare-CY-TRmUj.js → ZapSquare-BH7ie7zg.js} +1 -1
- package/dist/client/assets/{access-gate-CcNxjqvs.js → access-gate-CxXZPkIw.js} +1 -1
- package/dist/client/assets/{add-section-modal-BqjxY4rN.js → add-section-modal-C7ktQCug.js} +1 -1
- package/dist/client/assets/{agent-icon-C9EboqQo.js → agent-icon-q4cV7U67.js} +1 -1
- package/dist/client/assets/{agents-list-Dm8MNhb3.js → agents-list-UZwnNOjT.js} +1 -1
- package/dist/client/assets/{ai-providers-ClSebpyq.js → ai-providers-Cput0kVL.js} +1 -1
- package/dist/client/assets/{alert-C-LmaOBK.js → alert-DjeIAXMV.js} +1 -1
- package/dist/client/assets/{alert-dialog-BssDvvMF.js → alert-dialog-DIwINRgW.js} +1 -1
- package/dist/client/assets/{app-editor-BkDNHhm0.js → app-editor-DdSH3pAD.js} +1 -1
- package/dist/client/assets/{auth-DZmQnSls.js → auth-FouChJbb.js} +1 -1
- package/dist/client/assets/{auth-catchall-Dzgjob5l.js → auth-catchall-6cph4qce.js} +1 -1
- package/dist/client/assets/auth-entry-i0rNcujn.js +1 -0
- package/dist/client/assets/{auth-split-layout-DWihF_-L.js → auth-split-layout-3qPwGE8Z.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-BVLOVyHO.js → authenticate-and-persist-oauth-Dx2DT3YD.js} +1 -1
- package/dist/client/assets/{automation-list-row-ClyJypF9.js → automation-list-row-Brn7k31U.js} +1 -1
- package/dist/client/assets/{automation-runs-Iq3rwpg7.js → automation-runs-CP1cxXFo.js} +2 -2
- package/dist/client/assets/{automations-Dc1-M4pc.js → automations-BlJndOBe.js} +1 -1
- package/dist/client/assets/{avatar-CjXOLD2i.js → avatar-Du8HEobV.js} +1 -1
- package/dist/client/assets/{badge-DTMILv2r.js → badge-swCoKQnC.js} +1 -1
- package/dist/client/assets/{block-document-WgiJXWkX.js → block-document-DiB0SOp5.js} +1 -1
- package/dist/client/assets/{brand-context-DZrzTO2e.js → brand-context-C8l7XNKr.js} +1 -1
- package/dist/client/assets/{buckets-6YXBaInP.js → buckets-Bs0sTGAu.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-D3jY7E_o.js → bulk-category-panel-DE5pUVzi.js} +1 -1
- package/dist/client/assets/{calendar-C8za-BWH.js → calendar-BZcldUNV.js} +1 -1
- package/dist/client/assets/{capability-load-error-CtOZ-Swh.js → capability-load-error-CqwI-nav.js} +1 -1
- package/dist/client/assets/{card-DqPRLWMO.js → card-9OUE6Bzl.js} +1 -1
- package/dist/client/assets/{category-editor-CeqgNkSk.js → category-editor-JK7DojfI.js} +1 -1
- package/dist/client/assets/{chat-context-B_wQ6evS.js → chat-context-DYO1ODPB.js} +1 -1
- package/dist/client/assets/{checkbox-DTtudZuO.js → checkbox-Dd_rqLvT.js} +1 -1
- package/dist/client/assets/{cli-auth-success-CMhyp_Zr.js → cli-auth-success-CFsjKhGa.js} +1 -1
- package/dist/client/assets/{collection-detail-C6adjump.js → collection-detail-D0rtc2gf.js} +1 -1
- package/dist/client/assets/{collection-display-button-XfcxRJgX.js → collection-display-button-iD10GGdW.js} +1 -1
- package/dist/client/assets/{collection-search-BypSOIoH.js → collection-search-5SFjfCC8.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-Dt68wYfR.js → collection-table-wrapper-fW-dsmLE.js} +1 -1
- package/dist/client/assets/{collection-tabs-Dz9VyTIu.js → collection-tabs-DnykrgWW.js} +1 -1
- package/dist/client/assets/{command-CPMlZIjd.js → command-CDVbjOi5.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-B8gWc7bn.js → commerce-onboarding-CAOuADZ6.js} +1 -1
- package/dist/client/assets/{companions-core-a9SF0m4Y.js → companions-core-6m5dy3es.js} +1 -1
- package/dist/client/assets/{connect-BzEB0VtU.js → connect-B_K53Vaa.js} +1 -1
- package/dist/client/assets/{connection-Czmc2tuv.js → connection-DhlrJlFw.js} +1 -1
- package/dist/client/assets/{connection-card-BB3fSDPW.js → connection-card-CzF-xjYn.js} +1 -1
- package/dist/client/assets/{connection-detail-vrPNxp5T.js → connection-detail-DmWTCewb.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-ClYK3_mG.js → connection-form-helpers-DRviH-Au.js} +1 -1
- package/dist/client/assets/{connections-DZtxHEYZ.js → connections-DGvaZBx3.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-Bs-tVvz6.js → decopilot-sse-pool-BXMXu1gQ.js} +1 -1
- package/dist/client/assets/{dialog-lmnhZbAE.js → dialog-C82H2S70.js} +1 -1
- package/dist/client/assets/{domain-settings-J25txbg1.js → domain-settings-DPn_9rd3.js} +1 -1
- package/dist/client/assets/{drawer-D_GDdd71.js → drawer-lnIGl-vb.js} +1 -1
- package/dist/client/assets/{dropdown-menu-CFAXuc0v.js → dropdown-menu-CRGAwBji.js} +1 -1
- package/dist/client/assets/{empty-state-8ilzCDbs.js → empty-state-BKzUesA7.js} +1 -1
- package/dist/client/assets/{extract-connection-data-BAifnWzb.js → extract-connection-data-B9TIJ0UC.js} +1 -1
- package/dist/client/assets/{file-explorer-DrVIjwMq.js → file-explorer-tNI79jXo.js} +1 -1
- package/dist/client/assets/{form-CRAasio0.js → form-DAiRK0vx.js} +1 -1
- package/dist/client/assets/{general-CAW-cEsK.js → general-CXtIEOrf.js} +1 -1
- package/dist/client/assets/{github-repo-picker-zbKMYosT.js → github-repo-picker-DUNQ1oJW.js} +1 -1
- package/dist/client/assets/{hooks-DwsLBuwO.js → hooks-Bom1QoTc.js} +1 -1
- package/dist/client/assets/{index-G-8OgRMW.js → index-2KxPRjw5.js} +7 -7
- package/dist/client/assets/{index-BWJ_-Xh2.js → index-BDQ6Ogmu.js} +5 -5
- package/dist/client/assets/{index-1UvSqm4I.js → index-B_kqSbsO.js} +1 -1
- package/dist/client/assets/{index-D7nd7n59.js → index-C-JAJ-o5.js} +1 -1
- package/dist/client/assets/{index-BFKuotW_.js → index-C_5SQGG6.js} +1 -1
- package/dist/client/assets/{index-IEBaTluN.js → index-D7cNsGmf.js} +3 -3
- package/dist/client/assets/{index-CczEp9IM.js → index-DK8HHLRp.js} +1 -1
- package/dist/client/assets/{index-By_AmIsM.js → index-Df7LGqDK.js} +1 -1
- package/dist/client/assets/{index-BFH8_Y33.js → index-Dv8k1EHh.js} +1 -1
- package/dist/client/assets/{index-DW9Agr8b.js → index-Z4CG7jJp.js} +1 -1
- package/dist/client/assets/{index-RiTJyK4Q.js → index-oBYlsJ_o.js} +1 -1
- package/dist/client/assets/{index-redirect-Ch7Nrj0f.js → index-redirect-Cj-NIgvU.js} +1 -1
- package/dist/client/assets/{input-BJT4p59F.js → input-BAuCATqg.js} +1 -1
- package/dist/client/assets/{integration-icon-3h0fRTkl.js → integration-icon-DKBuU8Fr.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-CshBP-tC.js → invite-member-dialog-BiHY2r7m.js} +1 -1
- package/dist/client/assets/{label-DEUPAsEw.js → label-onkw7wrh.js} +1 -1
- package/dist/client/assets/{layout-BLNUkP51.js → layout-D8O9_Poo.js} +1 -1
- package/dist/client/assets/{login-MizHz_jd.js → login-B0j1yr6w.js} +1 -1
- package/dist/client/assets/{mcp-oauth-Db4hNN9v.js → mcp-oauth-95IH3VKT.js} +1 -1
- package/dist/client/assets/{members-l8zC-hr-.js → members-Y7A-UiF5.js} +1 -1
- package/dist/client/assets/{monaco-editor-BU7VpLqH.js → monaco-editor-CSUtCvVX.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-D0FDipm5.js → monitoring-stats-row-Dcug_wR7.js} +1 -1
- package/dist/client/assets/{multi-select-MuGZnRVq.js → multi-select-C68tqs9V.js} +1 -1
- package/dist/client/assets/{oauth-callback-BmBa3kc7.js → oauth-callback-CqH1tIve.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-Ctjknw6y.js → oauth-callback-ai-provider-C0UAY-58.js} +1 -1
- package/dist/client/assets/{onboarding-CWrMv3B_.js → onboarding-2ZJYmqTH.js} +1 -1
- package/dist/client/assets/{org-layout-Du6e1Kd0.js → org-layout-qZcaYBLo.js} +1 -1
- package/dist/client/assets/{organization-choice-4c42IBvW.js → organization-choice-CduZOMP9.js} +1 -1
- package/dist/client/assets/{orgs-CihSY5Ex.js → orgs-DU0BEJAc.js} +1 -1
- package/dist/client/assets/{page-seo-form-BASC5n5J.js → page-seo-form-nxKDUI-6.js} +1 -1
- package/dist/client/assets/{popover-BPOX0Hzx.js → popover-x1qHvmwD.js} +1 -1
- package/dist/client/assets/{post-editor-DJey7B16.js → post-editor-BhfI7Odx.js} +1 -1
- package/dist/client/assets/{primitives-D6fK2zo-.js → primitives-DITXbj-2.js} +1 -1
- package/dist/client/assets/{profile-BILxxCCs.js → profile-Dl3k4wub.js} +1 -1
- package/dist/client/assets/project-app-view-CrBgtatz.js +1 -0
- package/dist/client/assets/record-editor-DUGdKTe8.js +1 -0
- package/dist/client/assets/{redirect-editor-BdUi3i3s.js → redirect-editor-BamLe0Vb.js} +1 -1
- package/dist/client/assets/registry-B4ci0gM-.js +2 -0
- package/dist/client/assets/{registry-layout-xgeSgS_-.js → registry-layout-Cfgh3Q9S.js} +1 -1
- package/dist/client/assets/{reports-ChDgqGgw.js → reports-2omVoMUm.js} +1 -1
- package/dist/client/assets/{require-capability-DeZjzvG5.js → require-capability-B1pg4EtO.js} +1 -1
- package/dist/client/assets/{required-auth-layout-DmCcpwr1.js → required-auth-layout-wB2bMMGI.js} +1 -1
- package/dist/client/assets/{reset-password-BMzkkaTE.js → reset-password-BmxFRY37.js} +1 -1
- package/dist/client/assets/{roles-GCbrcpl9.js → roles-ClU1umGx.js} +1 -1
- package/dist/client/assets/{search-input-BGWve8hu.js → search-input-DtCL1YcZ.js} +1 -1
- package/dist/client/assets/{secrets-CjWBoI95.js → secrets-B-dmTgLw.js} +1 -1
- package/dist/client/assets/{sections-editor-MgNWlsn6.js → sections-editor-DqY5dzLX.js} +1 -1
- package/dist/client/assets/{select-BPv9yhWd.js → select-DfQiZ-4J.js} +1 -1
- package/dist/client/assets/{select-model-td-EZ5fT.js → select-model-Clf7Hlwn.js} +1 -1
- package/dist/client/assets/{self-tool-result-C577LfVs.js → self-tool-result-BCgUr0ik.js} +1 -1
- package/dist/client/assets/{seo-editor-DSG8yNU8.js → seo-editor-CEUCMyKF.js} +1 -1
- package/dist/client/assets/{settings-layout-CALf7AqK.js → settings-layout-DJLSOlbv.js} +1 -1
- package/dist/client/assets/{settings-section-C0kg54gL.js → settings-section-BaFcIjo5.js} +1 -1
- package/dist/client/assets/{shell-controls-B2Hh7m6h.js → shell-controls-DIMDYHkk.js} +1 -1
- package/dist/client/assets/{shell-layout-DvaKHR0F.js → shell-layout-B56j-p5N.js} +1 -1
- package/dist/client/assets/{sidebar-B3TEJIxk.js → sidebar-DpVJgBAa.js} +1 -1
- package/dist/client/assets/{skeleton-6WFihZY6.js → skeleton-BtiEyhAl.js} +1 -1
- package/dist/client/assets/{spinner-Bog_L1J8.js → spinner-DPfrt4Tp.js} +1 -1
- package/dist/client/assets/{sso-C7ensYzW.js → sso-CICOFYfX.js} +1 -1
- package/dist/client/assets/{store-BxIhcrSd.js → store-BJgQ6scG.js} +1 -1
- package/dist/client/assets/store-registry-Di0pCo7I.js +2 -0
- package/dist/client/assets/{studio-tools-Acw1tHi6.js → studio-tools-CTJuN7Yy.js} +1 -1
- package/dist/client/assets/{switch-DIomMWOl.js → switch-DIwoxI1y.js} +1 -1
- package/dist/client/assets/{tab-id-t9DwJFBC.js → tab-id-DJIms9m1.js} +1 -1
- package/dist/client/assets/{table-4SpY1BTk.js → table-BbRTH9fF.js} +1 -1
- package/dist/client/assets/{tabs-DKXlBcXz.js → tabs-DKyQ4Qe1.js} +1 -1
- package/dist/client/assets/{textarea-BpBBQR8E.js → textarea-Y242n44c.js} +1 -1
- package/dist/client/assets/{toggle-group-CUODdYa_.js → toggle-group-BBsmjOfV.js} +1 -1
- package/dist/client/assets/{toolbar-DgjRZSnQ.js → toolbar-BaZp82JP.js} +1 -1
- package/dist/client/assets/{tooltip-B9wTF3aq.js → tooltip-CEu_we5y.js} +1 -1
- package/dist/client/assets/{use-ai-providers-PcwG8Cp4.js → use-ai-providers-B2nAOoUO.js} +1 -1
- package/dist/client/assets/{use-automations-C7OhRUcV.js → use-automations-irLGHKpI.js} +1 -1
- package/dist/client/assets/{use-autosave-DdZx2QhY.js → use-autosave-BAjK3u8R.js} +1 -1
- package/dist/client/assets/{use-capability-w8KqTXM4.js → use-capability-Y4a4cK2y.js} +1 -1
- package/dist/client/assets/{use-clock-tick-CobicVDs.js → use-clock-tick-kQx_nmDK.js} +1 -1
- package/dist/client/assets/{use-connection-VavB0C6a.js → use-connection-CvBcj0iA.js} +1 -1
- package/dist/client/assets/{use-copy-Dh4gLRwM.js → use-copy-POYUhIaM.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-RXRfzwuV.js → use-create-virtual-mcp-Df8fpCi4.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-De7BabWw.js → use-debounced-autosave-EvVOUA6S.js} +1 -1
- package/dist/client/assets/{use-debounced-value-BYiowHDi.js → use-debounced-value-IOz7dnNR.js} +1 -1
- package/dist/client/assets/{use-deco-credits-v6nyF6YO.js → use-deco-credits-CBOWsaT-.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-Dpwv9K7h.js → use-decopilot-events-Dc8-pFMU.js} +1 -1
- package/dist/client/assets/{use-delete-connection-7C5oykm1.js → use-delete-connection-CxX7cCR_.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-BZqJ-ctu.js → use-deployment-admin-ucDRDdNR.js} +1 -1
- package/dist/client/assets/{use-file-configs-DSwRkfhM.js → use-file-configs-BsCj6gUu.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BeeHVBvb.js → use-infinite-scroll-ccrh4_KW.js} +1 -1
- package/dist/client/assets/{use-join-requests-DBSdL3kF.js → use-join-requests-DjYbXyL8.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-B-sj5sZB.js → use-mcp-auth-status-vzmxIRHi.js} +1 -1
- package/dist/client/assets/{use-mcp-client-CN9F4rJC.js → use-mcp-client-DRwUSZdO.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-CpoAeloT.js → use-mcp-tools-PCSBjtNq.js} +1 -1
- package/dist/client/assets/{use-members-CcoL_164.js → use-members-DjRi0Onl.js} +1 -1
- package/dist/client/assets/{use-mobile-CsgUGWeL.js → use-mobile-CLE626Yq.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-DJz0Xu14.js → use-navigate-to-agent-CXMG3HNZ.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-Dx3L9CFc.js → use-org-auth-client-BxtVWNiI.js} +1 -1
- package/dist/client/assets/{use-org-sso-BXR2O8Zw.js → use-org-sso-DBExuOVV.js} +1 -1
- package/dist/client/assets/{use-organization-roles-DDR6R1p7.js → use-organization-roles-DFLLP3Qo.js} +1 -1
- package/dist/client/assets/{use-organization-settings-BGULtPas.js → use-organization-settings-DKSNQ1_z.js} +1 -1
- package/dist/client/assets/{use-registry-connections-Cut79VZN.js → use-registry-connections-BRZCHKHD.js} +1 -1
- package/dist/client/assets/{use-secrets-BwX1AK3v.js → use-secrets-DfGoccAw.js} +1 -1
- package/dist/client/assets/{use-status-sounds-BAYX2hpP.js → use-status-sounds-DcgHuUFX.js} +1 -1
- package/dist/client/assets/{use-tags-weNKAUYZ.js → use-tags-DRM6xsgU.js} +1 -1
- package/dist/client/assets/{use-view-mode-BghlKtMr.js → use-view-mode-DvgBYhz6.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-DAFqjJdJ.js → use-virtual-mcp-D7SVi-2E.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-BWd6o-wh.js +1 -0
- package/dist/client/assets/{useQueries-BRp6m0B1.js → useQueries-DVb_HjzV.js} +1 -1
- package/dist/client/assets/{useRouterState-DDtTYBra.js → useRouterState-CJ97gzOK.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DPyRMURT.js +1 -0
- package/dist/client/assets/{users-uwnrrHMH.js → users-CX6W_kiO.js} +1 -1
- package/dist/client/assets/{variant-calendar-D-VisYce.js → variant-calendar-BSUlgs-W.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-6-wiVO49.js → view-mode-toggle-DULJqLEB.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +452 -452
- package/dist/server/migrate.js +34 -34
- package/dist/server/server.js +310 -310
- package/package.json +1 -1
- package/dist/client/assets/auth-entry-D5ixglik.js +0 -1
- package/dist/client/assets/project-app-view-BTTYDF6S.js +0 -1
- package/dist/client/assets/record-editor-cLhljAom.js +0 -1
- package/dist/client/assets/registry-MkdBZbPs.js +0 -2
- package/dist/client/assets/store-registry-C0l7_EX3.js +0 -2
- package/dist/client/assets/useInfiniteQuery-wwMkQW_z.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DfQWovFc.js +0 -1
package/dist/client/assets/{automation-list-row-ClyJypF9.js → automation-list-row-Brn7k31U.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as G,b as J,r as U,m as W,j as t,B as X}from"./index-
|
|
1
|
+
import{c as G,b as J,r as U,m as W,j as t,B as X}from"./index-2KxPRjw5.js";import{c as Y,d as Z,b as ee,f as te,g as se,e as ie,a as ne,A as oe}from"./alert-dialog-DIwINRgW.js";import{D as ae,c as re,b as le,a as ce}from"./dropdown-menu-CRGAwBji.js";import{s as me}from"./Stars02-cKtwD-F2.js";import{a as ue}from"./DotsVertical-OBlENp_a.js";import{s as de}from"./Trash01-BiVOd2DS.js";import{i as fe}from"./Zap-C4qF8Cn-.js";import{u as ge}from"./use-virtual-mcp-D7SVi-2E.js";import{A as xe}from"./agent-icon-q4cV7U67.js";import{u as pe}from"./use-automations-irLGHKpI.js";function ke(c){const e=G.c(80),{automation:s,showAgent:a,onClick:n}=c,i=J(),{remove:o}=pe(),[l,O]=U.useState(!1),r=ge(a?s.virtual_mcp_id:void 0);let S;e[0]!==s.id||e[1]!==o?(S=()=>{o.mutate(s.id),O(!1)},e[0]=s.id,e[1]=o,e[2]=S):S=e[2];const I=S;let E;e[3]!==n?(E=m=>{m.target===m.currentTarget&&(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),n())},e[3]=n,e[4]=E):E=e[4];const H=E,V=s.active&&s.trigger_count>0?"bg-success":"bg-muted-foreground/40";let u;e[5]!==V?(u=W("inline-block size-2 rounded-full shrink-0",V),e[5]=V,e[6]=u):u=e[6];const q=s.active&&s.trigger_count>0?"automations.automationListRow.ariaActive":s.active?"automations.automationListRow.ariaNoTriggers":"automations.automationListRow.ariaPaused";let d;e[7]!==i||e[8]!==q?(d=i(q),e[7]=i,e[8]=q,e[9]=d):d=e[9];let f;e[10]!==u||e[11]!==d?(f=t.jsx("span",{className:u,"aria-label":d}),e[10]=u,e[11]=d,e[12]=f):f=e[12];let g;e[13]!==r?.icon||e[14]!==r?.title||e[15]!==s.name||e[16]!==a?(g=a&&t.jsx(xe,{icon:r?.icon??null,name:r?.title??s.name,size:"xs",className:"shrink-0"}),e[13]=r?.icon,e[14]=r?.title,e[15]=s.name,e[16]=a,e[17]=g):g=e[17];let x;e[18]!==s.name?(x=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:s.name}),e[18]=s.name,e[19]=x):x=e[19];let p;e[20]!==r||e[21]!==a?(p=a&&r&&t.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["· ",r.title]}),e[20]=r,e[21]=a,e[22]=p):p=e[22];let h;e[23]!==p||e[24]!==x?(h=t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[x,p]}),e[23]=p,e[24]=x,e[25]=h):h=e[25];let j;e[26]!==s.nearest_next_run_at||e[27]!==s.trigger_count?(j=t.jsx(we,{triggerCount:s.trigger_count,nextRunAt:s.nearest_next_run_at}),e[26]=s.nearest_next_run_at,e[27]=s.trigger_count,e[28]=j):j=e[28];let w;e[29]!==h||e[30]!==j?(w=t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[h,j]}),e[29]=h,e[30]=j,e[31]=w):w=e[31];let F;e[32]===Symbol.for("react.memo_cache_sentinel")?(F=t.jsx(ae,{asChild:!0,children:t.jsx(X,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100 transition-opacity",children:t.jsx(ue,{size:16})})}),e[32]=F):F=e[32];let $,B;e[33]===Symbol.for("react.memo_cache_sentinel")?($=m=>{m.stopPropagation(),O(!0)},B=t.jsx(de,{size:16}),e[33]=$,e[34]=B):($=e[33],B=e[34]);let v;e[35]!==i?(v=i("automations.automationListRow.delete"),e[35]=i,e[36]=v):v=e[36];let _;e[37]!==v?(_=t.jsx("div",{onClick:je,onKeyDown:he,role:"presentation",className:"shrink-0",children:t.jsxs(re,{children:[F,t.jsx(le,{align:"end",children:t.jsxs(ce,{variant:"destructive",onClick:$,children:[B,v]})})]})}),e[37]=v,e[38]=_):_=e[38];let b;e[39]!==H||e[40]!==n||e[41]!==w||e[42]!==_||e[43]!==f||e[44]!==g?(b=t.jsxs("div",{role:"button",tabIndex:0,onClick:n,onKeyDown:H,className:"group w-full flex items-center gap-3 px-4 py-3 border-b border-border text-left hover:bg-muted/50 transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[f,g,w,_]}),e[39]=H,e[40]=n,e[41]=w,e[42]=_,e[43]=f,e[44]=g,e[45]=b):b=e[45];let A;e[46]!==i?(A=i("automations.automationListRow.deleteTitle"),e[46]=i,e[47]=A):A=e[47];let D;e[48]!==A?(D=t.jsx(Y,{children:A}),e[48]=A,e[49]=D):D=e[49];let N;e[50]!==s.name||e[51]!==i?(N=i("automations.automationListRow.deleteDescription",{name:s.name}),e[50]=s.name,e[51]=i,e[52]=N):N=e[52];let R;e[53]!==N?(R=t.jsx(Z,{children:N}),e[53]=N,e[54]=R):R=e[54];let y;e[55]!==D||e[56]!==R?(y=t.jsxs(ee,{children:[D,R]}),e[55]=D,e[56]=R,e[57]=y):y=e[57];let C;e[58]!==i?(C=i("automations.automationListRow.cancel"),e[58]=i,e[59]=C):C=e[59];let L;e[60]!==C?(L=t.jsx(te,{children:C}),e[60]=C,e[61]=L):L=e[61];const Q=o.isPending;let k;e[62]!==i?(k=i("automations.automationListRow.deleteButton"),e[62]=i,e[63]=k):k=e[63];let P;e[64]!==I||e[65]!==o.isPending||e[66]!==k?(P=t.jsx(se,{onClick:I,disabled:Q,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:k}),e[64]=I,e[65]=o.isPending,e[66]=k,e[67]=P):P=e[67];let T;e[68]!==L||e[69]!==P?(T=t.jsxs(ie,{children:[L,P]}),e[68]=L,e[69]=P,e[70]=T):T=e[70];let z;e[71]!==y||e[72]!==T?(z=t.jsxs(ne,{children:[y,T]}),e[71]=y,e[72]=T,e[73]=z):z=e[73];let M;e[74]!==l||e[75]!==z?(M=t.jsx(oe,{open:l,onOpenChange:O,children:z}),e[74]=l,e[75]=z,e[76]=M):M=e[76];let K;return e[77]!==b||e[78]!==M?(K=t.jsxs(t.Fragment,{children:[b,M]}),e[77]=b,e[78]=M,e[79]=K):K=e[79],K}function he(c){return c.stopPropagation()}function je(c){return c.stopPropagation()}function we(c){const e=G.c(8),{triggerCount:s,nextRunAt:a}=c,n=J();if(s===0){let o;e[0]!==n?(o=n("automations.automationListRow.noTriggers"),e[0]=n,e[1]=o):o=e[1];let l;return e[2]!==o?(l=t.jsx("span",{className:"text-xs text-muted-foreground",children:o}),e[2]=o,e[3]=l):l=e[3],l}let i;return e[4]!==a||e[5]!==n||e[6]!==s?(i=t.jsx("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground min-w-0",children:a?t.jsxs(t.Fragment,{children:[t.jsx(me,{size:12,className:"shrink-0"}),t.jsx("span",{className:"truncate",children:n("automations.automationListRow.nextRun",{date:new Date(a).toLocaleString()})})]}):t.jsxs(t.Fragment,{children:[t.jsx(fe,{size:12,className:"shrink-0"}),t.jsx("span",{className:"truncate",children:n("automations.automationListRow.triggers",{count:s})})]})}),e[4]=a,e[5]=n,e[6]=s,e[7]=i):i=e[7],i}export{ke as A};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as z,c as W,Z as Ux,j as m,B as tn,Y as jm,X as Hx,_ as jx,bn as lf,ax as Zt,bD as Ca,b as ue,H as $x,m as Te,d as Dn,f as zx,p as qx,aB as Gx,ay as hn,aF as Vx,aE as fn,bC as Yr,aC as Mn,bE as Iy,aA as Ny,F as $t,o as Wx,e as Yx,K as xt,t as mp,n as Kr,E as vy,aw as Cy,bF as uf,aD as Kx,bG as An}from"./index-G-8OgRMW.js";import{e as Xx}from"./select-BPv9yhWd.js";import{u as Ry}from"./useInfiniteQuery-wwMkQW_z.js";import{a as wy,u as Zx}from"./use-connection-VavB0C6a.js";import{j as Qx,u as cf,f as Jx,i as ek,a as tk,S as nk}from"./use-mcp-client-CN9F4rJC.js";import{a as rk}from"./use-virtual-mcp-DAFqjJdJ.js";import{C as ak}from"./card-DqPRLWMO.js";import{o as Oy,m as Ly,p as df,q as pf}from"./sidebar-B3TEJIxk.js";import{c as Dy,e as My,a as Ti,d as yt,b as Py,T as St}from"./table-4SpY1BTk.js";import{E as hp}from"./empty-state-8ilzCDbs.js";import{u as ff}from"./use-infinite-scroll-BeeHVBvb.js";import{u as ik}from"./use-members-CcoL_164.js";import{u as Fy,S as Kn}from"./use-clock-tick-CobicVDs.js";import{e as sk}from"./use-automations-C7OhRUcV.js";import{u as By}from"./studio-tools-Acw1tHi6.js";import{u as ok}from"./useSuspenseInfiniteQuery-DfQWovFc.js";import{A as Uy}from"./avatar-CjXOLD2i.js";import{t as Ra}from"./ChevronDown-Cn6ogkEs.js";import{n as gp}from"./ChevronUp-DhTMlsX_.js";import{n as mf,t as lk,c as Hy,i as uk,a as hf}from"./Tool02-Ce6Zs6Sn.js";import{aP as ck,aQ as dk,h as pk,aR as fk,aS as mk,a7 as hk,F as gk,aT as bk,ae as Ek,i as $m,aw as Tk,D as yk,m as Sk,aU as Ak,aN as jy,aV as _k,A as $y,aW as Ht,aX as xk,n as kk}from"./agent-icon-C9EboqQo.js";import{t as yi}from"./Stars01-BFiXE03I.js";import{i as zy,b as sa}from"./XCircle-aY4lZd4c.js";import{i as Xr}from"./Check-C2SHqL1z.js";import{i as zm}from"./ChevronRight-DFFYZU4j.js";import{a as Si}from"./Copy01-DdAbCNOp.js";import{b as mn,t as gf,c as qm}from"./format-time-BnbuEtat.js";import{u as qy}from"./use-copy-Dh4gLRwM.js";import{T as vn,a as Cn,c as Rn}from"./tooltip-B9wTF3aq.js";import{b as Gy,a as Ik,c as Nk,d as vk,e as Vy,g as Ck,f as Rk}from"./dialog-lmnhZbAE.js";import{u as wk}from"./use-mobile-CsgUGWeL.js";import{h as Ok,f as Lk,n as Dk,o as Mk}from"./tab-id-t9DwJFBC.js";import{R as Pk,c as Fk,r as Bk,d as Uk}from"./hooks-DwsLBuwO.js";import{l as nr,D as Hk,b as bf,d as Wy,a as jk}from"./chat-context-B_wQ6evS.js";import{c as $k}from"./monaco-editor-BU7VpLqH.js";import{g as Yy,M as zk}from"./index-BFH8_Y33.js";import{N as ct,R as qk,l as Gk,a as kt,m as Vk,F as Gm,S as Ky,T as kn,n as Wk,o as Ef,D as Br,j as Ai,p as Ur,P as Ct,q as Yk,f as Rt,r as Kk,s as Xk,v as Zk,w as Xy,x as Xn,y as $e,z as rr,A as wn,B as Zn,G as bp,H as Qk,I as Jk,J as eI,K as tI,L as nI,O as rI,Q as aI,U as Zy,V as Ep,W as iI,X as sI,Y as Qy,Z as oI,_ as lI,$ as Vm,t as uI,a0 as wt,a1 as ar,c as cI,u as dI,M as pI,e as fI}from"./calendar-C8za-BWH.js";import{i as Jy}from"./AlertCircle-DlSYUhhJ.js";import{s as mI}from"./Eye-CAJuwNcI.js";import{s as wa,t as eS}from"./Star01-DdohD5Pt.js";import{s as hI}from"./XClose-BkVqInnI.js";import{n as Tp}from"./ZapSquare-CY-TRmUj.js";import{d as gI,c as bI,a as oa}from"./Tool01-NPc3h9k6.js";import{i as Ar}from"./Monitor01-DliyLag8.js";import{i as EI}from"./SearchMd-CaUeXTov.js";import{i as TI}from"./Upload01-Dvnl-BDq.js";import{u as yI,a as SI}from"./shell-layout-DvaKHR0F.js";import{n as tS}from"./LinkExternal01-CEtC-Y1R.js";import{I as gn}from"./integration-icon-3h0fRTkl.js";import{i as AI}from"./ArrowUpRight-2UBzQU8F.js";import{a as Tf}from"./Users03-Bh6lOZcY.js";import{a as jt}from"./Palette-7rfbgqXo.js";import{c as nS}from"./use-navigate-to-agent-DJz0Xu14.js";import{a as _I}from"./Stars02-5-YOV7bU.js";import{g as xI}from"./AreaChart-Bug3Ayx7.js";import{a as kI,F as II,b as NI,c as vI,d as CI,e as RI}from"./form-CRAasio0.js";import{I as wI}from"./input-BJT4p59F.js";import{S as OI}from"./spinner-Bog_L1J8.js";const LI={openrouter:t=>{const e=t?.openrouter;return typeof e=="object"&&e!==null&&"usage"in e&&typeof e.usage=="object"&&e.usage!==null&&"cost"in e.usage&&typeof e.usage.cost=="number"?e.usage.cost:null}};function rS(t){if(!t?.providerMetadata)return 0;for(const e of Object.values(LI)){const n=e(t.providerMetadata);if(n!==null)return n}return 0}function aS(){return{inputTokens:0,outputTokens:0,reasoningTokens:0,totalTokens:0,cost:0,cacheReadTokens:0,cacheWriteTokens:0}}function iS(t,e){if(!e)return t;const n=e.inputTokenDetails?.cacheReadTokens??e.cachedInputTokens??0,r=e.inputTokenDetails?.cacheWriteTokens??0;return{inputTokens:t.inputTokens+(e.inputTokens??0),outputTokens:t.outputTokens+(e.outputTokens??0),reasoningTokens:t.reasoningTokens+(e.reasoningTokens??0),totalTokens:t.totalTokens+(e.totalTokens??0),cost:t.cost+rS(e),cacheReadTokens:t.cacheReadTokens+n,cacheWriteTokens:t.cacheWriteTokens+r}}function dz(t){return t.reduce((e,n)=>iS(e,n.metadata?.usage),aS())}const DI={damping:.7,stiffness:.05,mass:1.25},MI=70,PI=1e3/60,FI=350;let _i=!1;globalThis.document?.addEventListener("mousedown",()=>{_i=!0});globalThis.document?.addEventListener("mouseup",()=>{_i=!1});globalThis.document?.addEventListener("click",()=>{_i=!1});const BI=(t={})=>{const[e,n]=z.useState(!1),[r,a]=z.useState(t.initial!==!1),[i,s]=z.useState(!1),o=z.useRef(null);o.current=t;const l=z.useCallback(()=>{if(!_i)return!1;const y=window.getSelection();if(!y||!y.rangeCount)return!1;const A=y.getRangeAt(0);return A.commonAncestorContainer.contains(T.current)||T.current?.contains(A.commonAncestorContainer)},[]),u=z.useCallback(y=>{c.isAtBottom=y,a(y)},[]),d=z.useCallback(y=>{c.escapedFromLock=y,n(y)},[]),c=z.useMemo(()=>{let y;return{escapedFromLock:e,isAtBottom:r,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return T.current?.scrollTop??0},set scrollTop(A){if(T.current){const{scrollBehavior:_}=getComputedStyle(T.current);_!=="auto"&&(T.current.style.scrollBehavior="auto"),T.current.scrollTop=A,c.ignoreScrollToTop=T.current.scrollTop,_!=="auto"&&(T.current.style.scrollBehavior=_)}},get targetScrollTop(){return!T.current||!S.current?0:T.current.scrollHeight-1-T.current.clientHeight},get calculatedTargetScrollTop(){if(!T.current||!S.current)return 0;const{targetScrollTop:A}=this;if(!t.targetScrollTop)return A;if(y?.targetScrollTop===A)return y.calculatedScrollTop;const _=Math.max(Math.min(t.targetScrollTop(A,{scrollElement:T.current,contentElement:S.current}),A),0);return y={targetScrollTop:A,calculatedScrollTop:_},requestAnimationFrame(()=>{y=void 0}),_},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=MI}}},[]),p=z.useCallback((y={})=>{typeof y=="string"&&(y={animation:y}),y.preserveScrollPosition||u(!0);const A=Date.now()+(Number(y.wait)||0),_=Qi(o.current,y.animation),{ignoreEscapes:k=!1}=y;let E,x=c.calculatedTargetScrollTop;y.duration instanceof Promise?y.duration.finally(()=>{E=Date.now()}):E=A+(y.duration??0);const v=async()=>{const N=new Promise(requestAnimationFrame).then(()=>{if(!c.isAtBottom)return c.animation=void 0,!1;const{scrollTop:I}=c,L=performance.now(),M=(L-(c.lastTick??L))/PI;if(c.animation||(c.animation={behavior:_,promise:N,ignoreEscapes:k}),c.animation.behavior===_&&(c.lastTick=L),l()||A>Date.now())return v();if(I<Math.min(x,c.calculatedTargetScrollTop)){if(c.animation?.behavior===_){if(_==="instant")return c.scrollTop=c.calculatedTargetScrollTop,v();c.velocity=(_.damping*c.velocity+_.stiffness*c.scrollDifference)/_.mass,c.accumulated+=c.velocity*M,c.scrollTop+=c.accumulated,c.scrollTop!==I&&(c.accumulated=0)}return v()}return E>Date.now()?(x=c.calculatedTargetScrollTop,v()):(c.animation=void 0,c.scrollTop<c.calculatedTargetScrollTop?p({animation:Qi(o.current,o.current.resize),ignoreEscapes:k,duration:Math.max(0,E-Date.now())||void 0}):c.isAtBottom)});return N.then(I=>(requestAnimationFrame(()=>{c.animation||(c.lastTick=void 0,c.velocity=0)}),I))};return y.wait!==!0&&(c.animation=void 0),c.animation?.behavior===_?c.animation.promise:v()},[u,l,c]),f=z.useCallback(()=>{d(!0),u(!1)},[d,u]),g=z.useCallback(({target:y})=>{if(y!==T.current)return;const{scrollTop:A,ignoreScrollToTop:_}=c;let{lastScrollTop:k=A}=c;c.lastScrollTop=A,c.ignoreScrollToTop=void 0,_&&_>A&&(k=_),s(c.isNearBottom),setTimeout(()=>{if(c.resizeDifference||A===_)return;if(l()){d(!0),u(!1);return}const E=A>k,x=A<k;if(c.animation?.ignoreEscapes){c.scrollTop=k;return}x&&(d(!0),u(!1)),E&&d(!1),!c.escapedFromLock&&c.isNearBottom&&u(!0)},1)},[d,u,l,c]),b=z.useCallback(({target:y,deltaY:A})=>{let _=y;for(;!["scroll","auto"].includes(getComputedStyle(_).overflow);){if(!_.parentElement)return;_=_.parentElement}_===T.current&&A<0&&T.current.scrollHeight>T.current.clientHeight&&!c.animation?.ignoreEscapes&&(d(!0),u(!1))},[d,u,c]),T=Wm(y=>{T.current?.removeEventListener("scroll",g),T.current?.removeEventListener("wheel",b),y?.addEventListener("scroll",g,{passive:!0}),y?.addEventListener("wheel",b,{passive:!0})},[]),S=Wm(y=>{if(c.resizeObserver?.disconnect(),c.resizeObserver=void 0,!y)return;let A;c.resizeObserver=new ResizeObserver(([_])=>{const{height:k}=_.contentRect,E=k-(A??k);if(c.resizeDifference=E,c.scrollTop>c.targetScrollTop&&(c.scrollTop=c.targetScrollTop),s(c.isNearBottom),E>=0){const x=Qi(o.current,A?o.current.resize:o.current.initial);p({animation:x,wait:!0,preserveScrollPosition:!0,duration:x==="instant"?void 0:FI})}else c.isNearBottom&&(d(!1),u(!0));A=k,requestAnimationFrame(()=>{setTimeout(()=>{c.resizeDifference===E&&(c.resizeDifference=0)},1)})}),c.resizeObserver?.observe(y)},[]);return{contentRef:S,scrollRef:T,scrollToBottom:p,stopScroll:f,isAtBottom:r||i,isNearBottom:i,escapedFromLock:e,state:c}};function Wm(t,e){const n=z.useCallback(r=>(n.current=r,t(r)),e);return n}const Zi=new Map;function Qi(...t){const e={...DI};let n=!1;for(const a of t){if(a==="instant"){n=!0;continue}typeof a=="object"&&(n=!1,e.damping=a.damping??e.damping,e.stiffness=a.stiffness??e.stiffness,e.mass=a.mass??e.mass)}const r=JSON.stringify(e);return Zi.has(r)||Zi.set(r,Object.freeze(e)),n?"instant":Zi.get(r)}function UI(t){let e=2166136261;for(let n=0;n<t.length;n++)e=Math.imul(e^t.charCodeAt(n),16777619);return`a${(e>>>0).toString(36).padStart(6,"0").slice(-6)}`}function yf(t){if(t&&typeof t=="object"&&"gatewayClientId"in t&&typeof t.gatewayClientId=="string")return t.gatewayClientId}function Sf(t,e){if(!e)return t;const n=`${UI(e)}_`;return t.startsWith(n)?t.slice(n.length):t}function HI(t,e){return Sf(t,e).replace(/[_-]/g," ").toLowerCase()}function jI(t){const e={};for(const n of t?.arguments??[])e[n.name]=n.required?jm().min(1,"Required"):jm();return Hx(e)}function $I(t,e){const n={};for(const r of t.arguments??[])n[r.name]=e?.[r.name]??"";return n}function zI(t){const e=W.c(67),{prompt:n,setPrompt:r,onSubmit:a,defaultValues:i}=t,s=z.useId();let o,l;if(e[0]!==n){const G=jI(n);l=jx,o=Ux(G),e[0]=n,e[1]=o,e[2]=l}else o=e[1],l=e[2];let u;e[3]!==i||e[4]!==n?(u=n?$I(n,i):{},e[3]=i,e[4]=n,e[5]=u):u=e[5];let d;e[6]!==o||e[7]!==u?(d={resolver:o,defaultValues:u,mode:"onChange"},e[6]=o,e[7]=u,e[8]=d):d=e[8];const c=l(d);let p;e[9]!==n?.arguments?(p=n?.arguments??[],e[9]=n?.arguments,e[10]=p):p=e[10];const f=p;let g;e[11]!==c||e[12]!==a||e[13]!==r?(g=async G=>{await a(G),r(null),c.reset()},e[11]=c,e[12]=a,e[13]=r,e[14]=g):g=e[14];const b=g;let T;e[15]!==c||e[16]!==r?(T=G=>{G||(c.reset(),r(null))},e[15]=c,e[16]=r,e[17]=T):T=e[17];const S=T;if(!n)return null;let y;e[18]!==n._meta||e[19]!==n.name||e[20]!==n.title?(y=n.title||HI(n.name,yf(n._meta)),e[18]=n._meta,e[19]=n.name,e[20]=n.title,e[21]=y):y=e[21];let A;e[22]!==y?(A=m.jsx(Gy,{children:m.jsx("span",{className:"capitalize",children:y})}),e[22]=y,e[23]=A):A=e[23];let _;e[24]!==n.description?(_=n.description&&m.jsx("p",{className:"text-sm text-muted-foreground",children:n.description}),e[24]=n.description,e[25]=_):_=e[25];let k;e[26]!==_||e[27]!==A?(k=m.jsxs(Ik,{children:[A,_]}),e[26]=_,e[27]=A,e[28]=k):k=e[28];let E;e[29]!==c||e[30]!==b?(E=G=>{G.stopPropagation(),c.handleSubmit(b)(G)},e[29]=c,e[30]=b,e[31]=E):E=e[31];let x;if(e[32]!==f||e[33]!==c.control||e[34]!==c.formState.isSubmitting){let G;e[36]!==c.control||e[37]!==c.formState.isSubmitting?(G=j=>m.jsx(II,{control:c.control,name:j.name,render:V=>{const{field:C}=V;return m.jsxs(NI,{children:[m.jsxs(vI,{className:"text-xs",children:[j.name,j.required?null:m.jsxs("span",{className:"text-muted-foreground font-normal",children:[" ","(optional)"]})]}),m.jsx(CI,{children:m.jsx(wI,{...C,value:C.value??"",required:j.required,placeholder:j.description??"",className:"h-9",disabled:c.formState.isSubmitting})}),m.jsx(RI,{})]})}},j.name),e[36]=c.control,e[37]=c.formState.isSubmitting,e[38]=G):G=e[38],x=f.map(G),e[32]=f,e[33]=c.control,e[34]=c.formState.isSubmitting,e[35]=x}else x=e[35];let v;e[39]!==S?(v=()=>S(!1),e[39]=S,e[40]=v):v=e[40];let N;e[41]!==c.formState.isSubmitting||e[42]!==v?(N=m.jsx(tn,{type:"button",variant:"ghost",onClick:v,disabled:c.formState.isSubmitting,children:"Cancel"}),e[41]=c.formState.isSubmitting,e[42]=v,e[43]=N):N=e[43];let I;e[44]!==c.formState.isSubmitting?(I=c.formState.isSubmitting?m.jsxs("span",{className:"flex items-center gap-2",children:[m.jsx(OI,{size:"xs"}),"Loading..."]}):"Use prompt",e[44]=c.formState.isSubmitting,e[45]=I):I=e[45];let L;e[46]!==c.formState.isSubmitting||e[47]!==s||e[48]!==I?(L=m.jsx(tn,{type:"submit",form:s,disabled:c.formState.isSubmitting,children:I}),e[46]=c.formState.isSubmitting,e[47]=s,e[48]=I,e[49]=L):L=e[49];let M;e[50]!==N||e[51]!==L?(M=m.jsxs(Nk,{children:[N,L]}),e[50]=N,e[51]=L,e[52]=M):M=e[52];let B;e[53]!==s||e[54]!==E||e[55]!==x||e[56]!==M?(B=m.jsxs("form",{id:s,className:"space-y-4 py-4",autoComplete:"off",onSubmit:E,children:[x,M]}),e[53]=s,e[54]=E,e[55]=x,e[56]=M,e[57]=B):B=e[57];let F;e[58]!==c||e[59]!==B?(F=m.jsx(kI,{...c,children:B}),e[58]=c,e[59]=B,e[60]=F):F=e[60];let P;e[61]!==k||e[62]!==F?(P=m.jsxs(vk,{className:"sm:max-w-lg max-h-[80vh] overflow-y-auto",children:[k,F]}),e[61]=k,e[62]=F,e[63]=P):P=e[63];let H;return e[64]!==S||e[65]!==P?(H=m.jsx(Vy,{open:!0,onOpenChange:S,children:P}),e[64]=S,e[65]=P,e[66]=H):H=e[66],H}const qI=/^mcp__[a-zA-Z0-9_-]+__/;function sS(t){return t.replace(qI,"")}function Af(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Pn=Af();function oS(t){Pn=t}var _r={exec:()=>null};function ve(t,e=""){let n=typeof t=="string"?t:t.source;const r={replace:(a,i)=>{let s=typeof i=="string"?i:i.source;return s=s.replace(it.caret,"$1"),n=n.replace(a,s),r},getRegex:()=>new RegExp(n,e)};return r}var it={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},GI=/^(?:[ \t]*(?:\n|$))+/,VI=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,WI=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Zr=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,YI=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,_f=/(?:[*+-]|\d{1,9}[.)])/,lS=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,uS=ve(lS).replace(/bull/g,_f).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),KI=ve(lS).replace(/bull/g,_f).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),xf=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,XI=/^[^\n]+/,kf=/(?!\s*\])(?:\\.|[^\[\]\\])+/,ZI=ve(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",kf).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),QI=ve(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,_f).getRegex(),xi="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",If=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,JI=ve("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",If).replace("tag",xi).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),cS=ve(xf).replace("hr",Zr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",xi).getRegex(),eN=ve(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",cS).getRegex(),Nf={blockquote:eN,code:VI,def:ZI,fences:WI,heading:YI,hr:Zr,html:JI,lheading:uS,list:QI,newline:GI,paragraph:cS,table:_r,text:XI},Ym=ve("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Zr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",xi).getRegex(),tN={...Nf,lheading:KI,table:Ym,paragraph:ve(xf).replace("hr",Zr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ym).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",xi).getRegex()},nN={...Nf,html:ve(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",If).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:_r,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ve(xf).replace("hr",Zr).replace("heading",` *#{1,6} *[^
|
|
1
|
+
import{r as z,c as W,Z as Ux,j as m,B as tn,Y as jm,X as Hx,_ as jx,bn as lf,ax as Zt,bD as Ca,b as ue,H as $x,m as Te,d as Dn,f as zx,p as qx,aB as Gx,ay as hn,aF as Vx,aE as fn,bC as Yr,aC as Mn,bE as Iy,aA as Ny,F as $t,o as Wx,e as Yx,K as xt,t as mp,n as Kr,E as vy,aw as Cy,bF as uf,aD as Kx,bG as An}from"./index-2KxPRjw5.js";import{e as Xx}from"./select-DfQiZ-4J.js";import{u as Ry}from"./useInfiniteQuery-BWd6o-wh.js";import{a as wy,u as Zx}from"./use-connection-CvBcj0iA.js";import{j as Qx,u as cf,f as Jx,i as ek,a as tk,S as nk}from"./use-mcp-client-DRwUSZdO.js";import{a as rk}from"./use-virtual-mcp-D7SVi-2E.js";import{C as ak}from"./card-9OUE6Bzl.js";import{o as Oy,m as Ly,p as df,q as pf}from"./sidebar-DpVJgBAa.js";import{c as Dy,e as My,a as Ti,d as yt,b as Py,T as St}from"./table-BbRTH9fF.js";import{E as hp}from"./empty-state-BKzUesA7.js";import{u as ff}from"./use-infinite-scroll-ccrh4_KW.js";import{u as ik}from"./use-members-DjRi0Onl.js";import{u as Fy,S as Kn}from"./use-clock-tick-kQx_nmDK.js";import{e as sk}from"./use-automations-irLGHKpI.js";import{u as By}from"./studio-tools-CTJuN7Yy.js";import{u as ok}from"./useSuspenseInfiniteQuery-DPyRMURT.js";import{A as Uy}from"./avatar-Du8HEobV.js";import{t as Ra}from"./ChevronDown-BSVV4L9A.js";import{n as gp}from"./ChevronUp-GR0-Yt4d.js";import{n as mf,t as lk,c as Hy,i as uk,a as hf}from"./Tool02-C17Y4pBP.js";import{aP as ck,aQ as dk,h as pk,aR as fk,aS as mk,a7 as hk,F as gk,aT as bk,ae as Ek,i as $m,aw as Tk,D as yk,m as Sk,aU as Ak,aN as jy,aV as _k,A as $y,aW as Ht,aX as xk,n as kk}from"./agent-icon-q4cV7U67.js";import{t as yi}from"./Stars01-DqIThrOc.js";import{i as zy,b as sa}from"./XCircle-8Wd2-AR5.js";import{i as Xr}from"./Check-DdyKCl8O.js";import{i as zm}from"./ChevronRight-CSgj0z6i.js";import{a as Si}from"./Copy01-Cv0Vuqbe.js";import{b as mn,t as gf,c as qm}from"./format-time-BnbuEtat.js";import{u as qy}from"./use-copy-POYUhIaM.js";import{T as vn,a as Cn,c as Rn}from"./tooltip-CEu_we5y.js";import{b as Gy,a as Ik,c as Nk,d as vk,e as Vy,g as Ck,f as Rk}from"./dialog-C82H2S70.js";import{u as wk}from"./use-mobile-CLE626Yq.js";import{h as Ok,f as Lk,n as Dk,o as Mk}from"./tab-id-DJIms9m1.js";import{R as Pk,c as Fk,r as Bk,d as Uk}from"./hooks-Bom1QoTc.js";import{l as nr,D as Hk,b as bf,d as Wy,a as jk}from"./chat-context-DYO1ODPB.js";import{c as $k}from"./monaco-editor-CSUtCvVX.js";import{g as Yy,M as zk}from"./index-Dv8k1EHh.js";import{N as ct,R as qk,l as Gk,a as kt,m as Vk,F as Gm,S as Ky,T as kn,n as Wk,o as Ef,D as Br,j as Ai,p as Ur,P as Ct,q as Yk,f as Rt,r as Kk,s as Xk,v as Zk,w as Xy,x as Xn,y as $e,z as rr,A as wn,B as Zn,G as bp,H as Qk,I as Jk,J as eI,K as tI,L as nI,O as rI,Q as aI,U as Zy,V as Ep,W as iI,X as sI,Y as Qy,Z as oI,_ as lI,$ as Vm,t as uI,a0 as wt,a1 as ar,c as cI,u as dI,M as pI,e as fI}from"./calendar-BZcldUNV.js";import{i as Jy}from"./AlertCircle-BaA3X0Vc.js";import{s as mI}from"./Eye-CkjEvMwH.js";import{s as wa,t as eS}from"./Star01-2mO5G0Xw.js";import{s as hI}from"./XClose-CBFLmbVP.js";import{n as Tp}from"./ZapSquare-BH7ie7zg.js";import{d as gI,c as bI,a as oa}from"./Tool01-D2fd-Mg5.js";import{i as Ar}from"./Monitor01-CEdUOtdj.js";import{i as EI}from"./SearchMd-D0poZQV_.js";import{i as TI}from"./Upload01-k2Sn0RXQ.js";import{u as yI,a as SI}from"./shell-layout-B56j-p5N.js";import{n as tS}from"./LinkExternal01-CbfqV87q.js";import{I as gn}from"./integration-icon-DKBuU8Fr.js";import{i as AI}from"./ArrowUpRight-fq20wgvL.js";import{a as Tf}from"./Users03-CqyDxwt6.js";import{a as jt}from"./Palette-DgmLnO_l.js";import{c as nS}from"./use-navigate-to-agent-CXMG3HNZ.js";import{a as _I}from"./Stars02-cKtwD-F2.js";import{g as xI}from"./AreaChart-B4pcuH23.js";import{a as kI,F as II,b as NI,c as vI,d as CI,e as RI}from"./form-DAiRK0vx.js";import{I as wI}from"./input-BAuCATqg.js";import{S as OI}from"./spinner-DPfrt4Tp.js";const LI={openrouter:t=>{const e=t?.openrouter;return typeof e=="object"&&e!==null&&"usage"in e&&typeof e.usage=="object"&&e.usage!==null&&"cost"in e.usage&&typeof e.usage.cost=="number"?e.usage.cost:null}};function rS(t){if(!t?.providerMetadata)return 0;for(const e of Object.values(LI)){const n=e(t.providerMetadata);if(n!==null)return n}return 0}function aS(){return{inputTokens:0,outputTokens:0,reasoningTokens:0,totalTokens:0,cost:0,cacheReadTokens:0,cacheWriteTokens:0}}function iS(t,e){if(!e)return t;const n=e.inputTokenDetails?.cacheReadTokens??e.cachedInputTokens??0,r=e.inputTokenDetails?.cacheWriteTokens??0;return{inputTokens:t.inputTokens+(e.inputTokens??0),outputTokens:t.outputTokens+(e.outputTokens??0),reasoningTokens:t.reasoningTokens+(e.reasoningTokens??0),totalTokens:t.totalTokens+(e.totalTokens??0),cost:t.cost+rS(e),cacheReadTokens:t.cacheReadTokens+n,cacheWriteTokens:t.cacheWriteTokens+r}}function dz(t){return t.reduce((e,n)=>iS(e,n.metadata?.usage),aS())}const DI={damping:.7,stiffness:.05,mass:1.25},MI=70,PI=1e3/60,FI=350;let _i=!1;globalThis.document?.addEventListener("mousedown",()=>{_i=!0});globalThis.document?.addEventListener("mouseup",()=>{_i=!1});globalThis.document?.addEventListener("click",()=>{_i=!1});const BI=(t={})=>{const[e,n]=z.useState(!1),[r,a]=z.useState(t.initial!==!1),[i,s]=z.useState(!1),o=z.useRef(null);o.current=t;const l=z.useCallback(()=>{if(!_i)return!1;const y=window.getSelection();if(!y||!y.rangeCount)return!1;const A=y.getRangeAt(0);return A.commonAncestorContainer.contains(T.current)||T.current?.contains(A.commonAncestorContainer)},[]),u=z.useCallback(y=>{c.isAtBottom=y,a(y)},[]),d=z.useCallback(y=>{c.escapedFromLock=y,n(y)},[]),c=z.useMemo(()=>{let y;return{escapedFromLock:e,isAtBottom:r,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return T.current?.scrollTop??0},set scrollTop(A){if(T.current){const{scrollBehavior:_}=getComputedStyle(T.current);_!=="auto"&&(T.current.style.scrollBehavior="auto"),T.current.scrollTop=A,c.ignoreScrollToTop=T.current.scrollTop,_!=="auto"&&(T.current.style.scrollBehavior=_)}},get targetScrollTop(){return!T.current||!S.current?0:T.current.scrollHeight-1-T.current.clientHeight},get calculatedTargetScrollTop(){if(!T.current||!S.current)return 0;const{targetScrollTop:A}=this;if(!t.targetScrollTop)return A;if(y?.targetScrollTop===A)return y.calculatedScrollTop;const _=Math.max(Math.min(t.targetScrollTop(A,{scrollElement:T.current,contentElement:S.current}),A),0);return y={targetScrollTop:A,calculatedScrollTop:_},requestAnimationFrame(()=>{y=void 0}),_},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=MI}}},[]),p=z.useCallback((y={})=>{typeof y=="string"&&(y={animation:y}),y.preserveScrollPosition||u(!0);const A=Date.now()+(Number(y.wait)||0),_=Qi(o.current,y.animation),{ignoreEscapes:k=!1}=y;let E,x=c.calculatedTargetScrollTop;y.duration instanceof Promise?y.duration.finally(()=>{E=Date.now()}):E=A+(y.duration??0);const v=async()=>{const N=new Promise(requestAnimationFrame).then(()=>{if(!c.isAtBottom)return c.animation=void 0,!1;const{scrollTop:I}=c,L=performance.now(),M=(L-(c.lastTick??L))/PI;if(c.animation||(c.animation={behavior:_,promise:N,ignoreEscapes:k}),c.animation.behavior===_&&(c.lastTick=L),l()||A>Date.now())return v();if(I<Math.min(x,c.calculatedTargetScrollTop)){if(c.animation?.behavior===_){if(_==="instant")return c.scrollTop=c.calculatedTargetScrollTop,v();c.velocity=(_.damping*c.velocity+_.stiffness*c.scrollDifference)/_.mass,c.accumulated+=c.velocity*M,c.scrollTop+=c.accumulated,c.scrollTop!==I&&(c.accumulated=0)}return v()}return E>Date.now()?(x=c.calculatedTargetScrollTop,v()):(c.animation=void 0,c.scrollTop<c.calculatedTargetScrollTop?p({animation:Qi(o.current,o.current.resize),ignoreEscapes:k,duration:Math.max(0,E-Date.now())||void 0}):c.isAtBottom)});return N.then(I=>(requestAnimationFrame(()=>{c.animation||(c.lastTick=void 0,c.velocity=0)}),I))};return y.wait!==!0&&(c.animation=void 0),c.animation?.behavior===_?c.animation.promise:v()},[u,l,c]),f=z.useCallback(()=>{d(!0),u(!1)},[d,u]),g=z.useCallback(({target:y})=>{if(y!==T.current)return;const{scrollTop:A,ignoreScrollToTop:_}=c;let{lastScrollTop:k=A}=c;c.lastScrollTop=A,c.ignoreScrollToTop=void 0,_&&_>A&&(k=_),s(c.isNearBottom),setTimeout(()=>{if(c.resizeDifference||A===_)return;if(l()){d(!0),u(!1);return}const E=A>k,x=A<k;if(c.animation?.ignoreEscapes){c.scrollTop=k;return}x&&(d(!0),u(!1)),E&&d(!1),!c.escapedFromLock&&c.isNearBottom&&u(!0)},1)},[d,u,l,c]),b=z.useCallback(({target:y,deltaY:A})=>{let _=y;for(;!["scroll","auto"].includes(getComputedStyle(_).overflow);){if(!_.parentElement)return;_=_.parentElement}_===T.current&&A<0&&T.current.scrollHeight>T.current.clientHeight&&!c.animation?.ignoreEscapes&&(d(!0),u(!1))},[d,u,c]),T=Wm(y=>{T.current?.removeEventListener("scroll",g),T.current?.removeEventListener("wheel",b),y?.addEventListener("scroll",g,{passive:!0}),y?.addEventListener("wheel",b,{passive:!0})},[]),S=Wm(y=>{if(c.resizeObserver?.disconnect(),c.resizeObserver=void 0,!y)return;let A;c.resizeObserver=new ResizeObserver(([_])=>{const{height:k}=_.contentRect,E=k-(A??k);if(c.resizeDifference=E,c.scrollTop>c.targetScrollTop&&(c.scrollTop=c.targetScrollTop),s(c.isNearBottom),E>=0){const x=Qi(o.current,A?o.current.resize:o.current.initial);p({animation:x,wait:!0,preserveScrollPosition:!0,duration:x==="instant"?void 0:FI})}else c.isNearBottom&&(d(!1),u(!0));A=k,requestAnimationFrame(()=>{setTimeout(()=>{c.resizeDifference===E&&(c.resizeDifference=0)},1)})}),c.resizeObserver?.observe(y)},[]);return{contentRef:S,scrollRef:T,scrollToBottom:p,stopScroll:f,isAtBottom:r||i,isNearBottom:i,escapedFromLock:e,state:c}};function Wm(t,e){const n=z.useCallback(r=>(n.current=r,t(r)),e);return n}const Zi=new Map;function Qi(...t){const e={...DI};let n=!1;for(const a of t){if(a==="instant"){n=!0;continue}typeof a=="object"&&(n=!1,e.damping=a.damping??e.damping,e.stiffness=a.stiffness??e.stiffness,e.mass=a.mass??e.mass)}const r=JSON.stringify(e);return Zi.has(r)||Zi.set(r,Object.freeze(e)),n?"instant":Zi.get(r)}function UI(t){let e=2166136261;for(let n=0;n<t.length;n++)e=Math.imul(e^t.charCodeAt(n),16777619);return`a${(e>>>0).toString(36).padStart(6,"0").slice(-6)}`}function yf(t){if(t&&typeof t=="object"&&"gatewayClientId"in t&&typeof t.gatewayClientId=="string")return t.gatewayClientId}function Sf(t,e){if(!e)return t;const n=`${UI(e)}_`;return t.startsWith(n)?t.slice(n.length):t}function HI(t,e){return Sf(t,e).replace(/[_-]/g," ").toLowerCase()}function jI(t){const e={};for(const n of t?.arguments??[])e[n.name]=n.required?jm().min(1,"Required"):jm();return Hx(e)}function $I(t,e){const n={};for(const r of t.arguments??[])n[r.name]=e?.[r.name]??"";return n}function zI(t){const e=W.c(67),{prompt:n,setPrompt:r,onSubmit:a,defaultValues:i}=t,s=z.useId();let o,l;if(e[0]!==n){const G=jI(n);l=jx,o=Ux(G),e[0]=n,e[1]=o,e[2]=l}else o=e[1],l=e[2];let u;e[3]!==i||e[4]!==n?(u=n?$I(n,i):{},e[3]=i,e[4]=n,e[5]=u):u=e[5];let d;e[6]!==o||e[7]!==u?(d={resolver:o,defaultValues:u,mode:"onChange"},e[6]=o,e[7]=u,e[8]=d):d=e[8];const c=l(d);let p;e[9]!==n?.arguments?(p=n?.arguments??[],e[9]=n?.arguments,e[10]=p):p=e[10];const f=p;let g;e[11]!==c||e[12]!==a||e[13]!==r?(g=async G=>{await a(G),r(null),c.reset()},e[11]=c,e[12]=a,e[13]=r,e[14]=g):g=e[14];const b=g;let T;e[15]!==c||e[16]!==r?(T=G=>{G||(c.reset(),r(null))},e[15]=c,e[16]=r,e[17]=T):T=e[17];const S=T;if(!n)return null;let y;e[18]!==n._meta||e[19]!==n.name||e[20]!==n.title?(y=n.title||HI(n.name,yf(n._meta)),e[18]=n._meta,e[19]=n.name,e[20]=n.title,e[21]=y):y=e[21];let A;e[22]!==y?(A=m.jsx(Gy,{children:m.jsx("span",{className:"capitalize",children:y})}),e[22]=y,e[23]=A):A=e[23];let _;e[24]!==n.description?(_=n.description&&m.jsx("p",{className:"text-sm text-muted-foreground",children:n.description}),e[24]=n.description,e[25]=_):_=e[25];let k;e[26]!==_||e[27]!==A?(k=m.jsxs(Ik,{children:[A,_]}),e[26]=_,e[27]=A,e[28]=k):k=e[28];let E;e[29]!==c||e[30]!==b?(E=G=>{G.stopPropagation(),c.handleSubmit(b)(G)},e[29]=c,e[30]=b,e[31]=E):E=e[31];let x;if(e[32]!==f||e[33]!==c.control||e[34]!==c.formState.isSubmitting){let G;e[36]!==c.control||e[37]!==c.formState.isSubmitting?(G=j=>m.jsx(II,{control:c.control,name:j.name,render:V=>{const{field:C}=V;return m.jsxs(NI,{children:[m.jsxs(vI,{className:"text-xs",children:[j.name,j.required?null:m.jsxs("span",{className:"text-muted-foreground font-normal",children:[" ","(optional)"]})]}),m.jsx(CI,{children:m.jsx(wI,{...C,value:C.value??"",required:j.required,placeholder:j.description??"",className:"h-9",disabled:c.formState.isSubmitting})}),m.jsx(RI,{})]})}},j.name),e[36]=c.control,e[37]=c.formState.isSubmitting,e[38]=G):G=e[38],x=f.map(G),e[32]=f,e[33]=c.control,e[34]=c.formState.isSubmitting,e[35]=x}else x=e[35];let v;e[39]!==S?(v=()=>S(!1),e[39]=S,e[40]=v):v=e[40];let N;e[41]!==c.formState.isSubmitting||e[42]!==v?(N=m.jsx(tn,{type:"button",variant:"ghost",onClick:v,disabled:c.formState.isSubmitting,children:"Cancel"}),e[41]=c.formState.isSubmitting,e[42]=v,e[43]=N):N=e[43];let I;e[44]!==c.formState.isSubmitting?(I=c.formState.isSubmitting?m.jsxs("span",{className:"flex items-center gap-2",children:[m.jsx(OI,{size:"xs"}),"Loading..."]}):"Use prompt",e[44]=c.formState.isSubmitting,e[45]=I):I=e[45];let L;e[46]!==c.formState.isSubmitting||e[47]!==s||e[48]!==I?(L=m.jsx(tn,{type:"submit",form:s,disabled:c.formState.isSubmitting,children:I}),e[46]=c.formState.isSubmitting,e[47]=s,e[48]=I,e[49]=L):L=e[49];let M;e[50]!==N||e[51]!==L?(M=m.jsxs(Nk,{children:[N,L]}),e[50]=N,e[51]=L,e[52]=M):M=e[52];let B;e[53]!==s||e[54]!==E||e[55]!==x||e[56]!==M?(B=m.jsxs("form",{id:s,className:"space-y-4 py-4",autoComplete:"off",onSubmit:E,children:[x,M]}),e[53]=s,e[54]=E,e[55]=x,e[56]=M,e[57]=B):B=e[57];let F;e[58]!==c||e[59]!==B?(F=m.jsx(kI,{...c,children:B}),e[58]=c,e[59]=B,e[60]=F):F=e[60];let P;e[61]!==k||e[62]!==F?(P=m.jsxs(vk,{className:"sm:max-w-lg max-h-[80vh] overflow-y-auto",children:[k,F]}),e[61]=k,e[62]=F,e[63]=P):P=e[63];let H;return e[64]!==S||e[65]!==P?(H=m.jsx(Vy,{open:!0,onOpenChange:S,children:P}),e[64]=S,e[65]=P,e[66]=H):H=e[66],H}const qI=/^mcp__[a-zA-Z0-9_-]+__/;function sS(t){return t.replace(qI,"")}function Af(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Pn=Af();function oS(t){Pn=t}var _r={exec:()=>null};function ve(t,e=""){let n=typeof t=="string"?t:t.source;const r={replace:(a,i)=>{let s=typeof i=="string"?i:i.source;return s=s.replace(it.caret,"$1"),n=n.replace(a,s),r},getRegex:()=>new RegExp(n,e)};return r}var it={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},GI=/^(?:[ \t]*(?:\n|$))+/,VI=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,WI=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Zr=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,YI=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,_f=/(?:[*+-]|\d{1,9}[.)])/,lS=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,uS=ve(lS).replace(/bull/g,_f).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),KI=ve(lS).replace(/bull/g,_f).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),xf=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,XI=/^[^\n]+/,kf=/(?!\s*\])(?:\\.|[^\[\]\\])+/,ZI=ve(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",kf).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),QI=ve(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,_f).getRegex(),xi="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",If=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,JI=ve("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",If).replace("tag",xi).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),cS=ve(xf).replace("hr",Zr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",xi).getRegex(),eN=ve(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",cS).getRegex(),Nf={blockquote:eN,code:VI,def:ZI,fences:WI,heading:YI,hr:Zr,html:JI,lheading:uS,list:QI,newline:GI,paragraph:cS,table:_r,text:XI},Ym=ve("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Zr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",xi).getRegex(),tN={...Nf,lheading:KI,table:Ym,paragraph:ve(xf).replace("hr",Zr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ym).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",xi).getRegex()},nN={...Nf,html:ve(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",If).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:_r,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ve(xf).replace("hr",Zr).replace("heading",` *#{1,6} *[^
|
|
2
2
|
]`).replace("lheading",uS).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},rN=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,aN=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,dS=/^( {2,}|\\)\n(?!\s*$)/,iN=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ki=/[\p{P}\p{S}]/u,vf=/[\s\p{P}\p{S}]/u,pS=/[^\s\p{P}\p{S}]/u,sN=ve(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,vf).getRegex(),fS=/(?!~)[\p{P}\p{S}]/u,oN=/(?!~)[\s\p{P}\p{S}]/u,lN=/(?:[^\s\p{P}\p{S}]|~)/u,uN=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,mS=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,cN=ve(mS,"u").replace(/punct/g,ki).getRegex(),dN=ve(mS,"u").replace(/punct/g,fS).getRegex(),hS="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",pN=ve(hS,"gu").replace(/notPunctSpace/g,pS).replace(/punctSpace/g,vf).replace(/punct/g,ki).getRegex(),fN=ve(hS,"gu").replace(/notPunctSpace/g,lN).replace(/punctSpace/g,oN).replace(/punct/g,fS).getRegex(),mN=ve("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,pS).replace(/punctSpace/g,vf).replace(/punct/g,ki).getRegex(),hN=ve(/\\(punct)/,"gu").replace(/punct/g,ki).getRegex(),gN=ve(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),bN=ve(If).replace("(?:-->|$)","-->").getRegex(),EN=ve("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",bN).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Oa=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,TN=ve(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Oa).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),gS=ve(/^!?\[(label)\]\[(ref)\]/).replace("label",Oa).replace("ref",kf).getRegex(),bS=ve(/^!?\[(ref)\](?:\[\])?/).replace("ref",kf).getRegex(),yN=ve("reflink|nolink(?!\\()","g").replace("reflink",gS).replace("nolink",bS).getRegex(),Cf={_backpedal:_r,anyPunctuation:hN,autolink:gN,blockSkip:uN,br:dS,code:aN,del:_r,emStrongLDelim:cN,emStrongRDelimAst:pN,emStrongRDelimUnd:mN,escape:rN,link:TN,nolink:bS,punctuation:sN,reflink:gS,reflinkSearch:yN,tag:EN,text:iN,url:_r},SN={...Cf,link:ve(/^!?\[(label)\]\((.*?)\)/).replace("label",Oa).getRegex(),reflink:ve(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Oa).getRegex()},yp={...Cf,emStrongRDelimAst:fN,emStrongLDelim:dN,url:ve(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},AN={...yp,br:ve(dS).replace("{2,}","*").getRegex(),text:ve(yp.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},la={normal:Nf,gfm:tN,pedantic:nN},dr={normal:Cf,gfm:yp,breaks:AN,pedantic:SN},_N={"&":"&","<":"<",">":">",'"':""","'":"'"},Km=t=>_N[t];function Dt(t,e){if(e){if(it.escapeTest.test(t))return t.replace(it.escapeReplace,Km)}else if(it.escapeTestNoEncode.test(t))return t.replace(it.escapeReplaceNoEncode,Km);return t}function Xm(t){try{t=encodeURI(t).replace(it.percentDecode,"%")}catch{return null}return t}function Zm(t,e){const n=t.replace(it.findPipe,(i,s,o)=>{let l=!1,u=s;for(;--u>=0&&o[u]==="\\";)l=!l;return l?"|":" |"}),r=n.split(it.splitPipe);let a=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;a<r.length;a++)r[a]=r[a].trim().replace(it.slashPipe,"|");return r}function pr(t,e,n){const r=t.length;if(r===0)return"";let a=0;for(;a<r&&t.charAt(r-a-1)===e;)a++;return t.slice(0,r-a)}function xN(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let r=0;r<t.length;r++)if(t[r]==="\\")r++;else if(t[r]===e[0])n++;else if(t[r]===e[1]&&(n--,n<0))return r;return n>0?-2:-1}function Qm(t,e,n,r,a){const i=e.href,s=e.title||null,o=t[1].replace(a.other.outputLinkReplace,"$1");r.state.inLink=!0;const l={type:t[0].charAt(0)==="!"?"image":"link",raw:n,href:i,title:s,text:o,tokens:r.inlineTokens(o)};return r.state.inLink=!1,l}function kN(t,e,n){const r=t.match(n.other.indentCodeCompensation);if(r===null)return e;const a=r[1];return e.split(`
|
|
3
3
|
`).map(i=>{const s=i.match(n.other.beginningSpace);if(s===null)return i;const[o]=s;return o.length>=a.length?i.slice(a.length):i}).join(`
|
|
4
4
|
`)}var La=class{options;rules;lexer;constructor(t){this.options=t||Pn}space(t){const e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){const e=this.rules.block.code.exec(t);if(e){const n=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?n:pr(n,`
|
|
@@ -131,7 +131,7 @@ ${f.slice(u+2)}`,c+=1;else break}e.push({indent:u,number:parseInt(o,10),content:
|
|
|
131
131
|
`):"",markdownTokenizer:{name:"orderedList",level:"block",start:t=>{const e=t.match(/^(\s*)(\d+)\.\s+/),n=e?.index;return n!==void 0?n:-1},tokenize:(t,e,n)=>{var r;const a=t.split(`
|
|
132
132
|
`),[i,s]=C9(a);if(i.length===0)return;const o=ex(i,0,n);return o.length===0?void 0:{type:"list",ordered:!0,start:((r=i[0])==null?void 0:r.number)||1,items:o,raw:a.slice(0,s).join(`
|
|
133
133
|
`)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(w9,this.editor.getAttributes(hy)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=Xn({find:gy,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=Xn({find:gy,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(hy)}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1],editor:this.editor})),[t]}}),O9=/^\s*(\[([( |x])?\])\s$/,L9=ct.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:t=>{const e=t.getAttribute("data-checked");return e===""||e==="true"},renderHTML:t=>({"data-checked":t.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:t,HTMLAttributes:e}){return["li",$e(this.options.HTMLAttributes,e,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:t.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(t,e)=>{const n=[];if(t.tokens&&t.tokens.length>0?n.push(e.createNode("paragraph",{},e.parseInline(t.tokens))):t.text?n.push(e.createNode("paragraph",{},[e.createNode("text",{text:t.text})])):n.push(e.createNode("paragraph",{},[])),t.nestedTokens&&t.nestedTokens.length>0){const r=e.parseChildren(t.nestedTokens);n.push(...r)}return e.createNode("taskItem",{checked:t.checked||!1},n)},renderMarkdown:(t,e)=>{var n;const a=`- [${(n=t.attrs)!=null&&n.checked?"x":" "}] `;return Zy(t,e,a)},addKeyboardShortcuts(){const t={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...t,Tab:()=>this.editor.commands.sinkListItem(this.name)}:t},addNodeView(){return({node:t,HTMLAttributes:e,getPos:n,editor:r})=>{const a=document.createElement("li"),i=document.createElement("label"),s=document.createElement("span"),o=document.createElement("input"),l=document.createElement("div"),u=c=>{var p,f;o.ariaLabel=((f=(p=this.options.a11y)==null?void 0:p.checkboxLabel)==null?void 0:f.call(p,c,o.checked))||`Task item checkbox for ${c.textContent||"empty task item"}`};u(t),i.contentEditable="false",o.type="checkbox",o.addEventListener("mousedown",c=>c.preventDefault()),o.addEventListener("change",c=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){o.checked=!o.checked;return}const{checked:p}=c.target;r.isEditable&&typeof n=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:f})=>{const g=n();if(typeof g!="number")return!1;const b=f.doc.nodeAt(g);return f.setNodeMarkup(g,void 0,{...b?.attrs,checked:p}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(t,p)||(o.checked=!o.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([c,p])=>{a.setAttribute(c,p)}),a.dataset.checked=t.attrs.checked,o.checked=t.attrs.checked,i.append(o,s),a.append(i,l),Object.entries(e).forEach(([c,p])=>{a.setAttribute(c,p)});let d=new Set(Object.keys(e));return{dom:a,contentDOM:l,update:c=>{if(c.type!==this.type)return!1;a.dataset.checked=c.attrs.checked,o.checked=c.attrs.checked,u(c);const p=r.extensionManager.attributes,f=lI(c,p),g=new Set(Object.keys(f)),b=this.options.HTMLAttributes;return d.forEach(T=>{g.has(T)||(T in b?a.setAttribute(T,b[T]):a.removeAttribute(T))}),Object.entries(f).forEach(([T,S])=>{S==null?T in b?a.setAttribute(T,b[T]):a.removeAttribute(T):a.setAttribute(T,S)}),d=g,!0}}}},addInputRules(){return[Xn({find:O9,type:this.type,getAttributes:t=>({checked:t[t.length-1]==="x"})})]}}),D9=ct.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:t}){return["ul",$e(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},parseMarkdown:(t,e)=>e.createNode("taskList",{},e.parseChildren(t.items||[])),renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
|
|
134
|
-
`):"",markdownTokenizer:{name:"taskList",level:"block",start(t){var e;const n=(e=t.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:e.index;return n!==void 0?n:-1},tokenize(t,e,n){const r=i=>{const s=Vm(i,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:o=>({indentLevel:o[1].length,mainContent:o[4],checked:o[3].toLowerCase()==="x"}),createToken:(o,l)=>({type:"taskItem",raw:"",mainContent:o.mainContent,indentLevel:o.indentLevel,checked:o.checked,text:o.mainContent,tokens:n.inlineTokens(o.mainContent),nestedTokens:l}),customNestedParser:r},n);return s?[{type:"taskList",raw:s.raw,items:s.items}]:n.blockTokens(i)},a=Vm(t,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:i=>({indentLevel:i[1].length,mainContent:i[4],checked:i[3].toLowerCase()==="x"}),createToken:(i,s)=>({type:"taskItem",raw:"",mainContent:i.mainContent,indentLevel:i.indentLevel,checked:i.checked,text:i.mainContent,tokens:n.inlineTokens(i.mainContent),nestedTokens:s}),customNestedParser:r},n);if(a)return{type:"taskList",raw:a.raw,items:a.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:t})=>t.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});Rt.create({name:"listKit",addExtensions(){const t=[];return this.options.bulletList!==!1&&t.push(V_.configure(this.options.bulletList)),this.options.listItem!==!1&&t.push(W_.configure(this.options.listItem)),this.options.listKeymap!==!1&&t.push(J_.configure(this.options.listKeymap)),this.options.orderedList!==!1&&t.push(tx.configure(this.options.orderedList)),this.options.taskItem!==!1&&t.push(L9.configure(this.options.taskItem)),this.options.taskList!==!1&&t.push(D9.configure(this.options.taskList)),t}});var by=" ",M9=" ",P9=ct.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",$e(this.options.HTMLAttributes,t),0]},parseMarkdown:(t,e)=>{const n=t.tokens||[];if(n.length===1&&n[0].type==="image")return e.parseChildren([n[0]]);const r=e.parseInline(n);return r.length===1&&r[0].type==="text"&&(r[0].text===by||r[0].text===M9)?e.createNode("paragraph",void 0,[]):e.createNode("paragraph",void 0,r)},renderMarkdown:(t,e,n)=>{var r,a;if(!t)return"";const i=Array.isArray(t.content)?t.content:[];if(i.length===0){const s=Array.isArray((r=n?.previousNode)==null?void 0:r.content)?n.previousNode.content:[];return((a=n?.previousNode)==null?void 0:a.type)==="paragraph"&&s.length===0?by:""}return e.renderChildren(i)},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),F9=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,B9=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,U9=rr.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["s",$e(this.options.HTMLAttributes,t),0]},markdownTokenName:"del",parseMarkdown:(t,e)=>e.applyMark("strike",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`~~${e.renderChildren(t)}~~`,addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Zn({find:F9,type:this.type})]},addPasteRules(){return[wn({find:B9,type:this.type})]}}),H9=ct.create({name:"text",group:"inline",parseMarkdown:t=>({type:"text",text:t.text||""}),renderMarkdown:t=>t.text||""}),j9=rr.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["u",$e(this.options.HTMLAttributes,t),0]},parseMarkdown(t,e){return e.applyMark(this.name||"underline",e.parseInline(t.tokens||[]))},renderMarkdown(t,e){return`++${e.renderChildren(t)}++`},markdownTokenizer:{name:"underline",level:"inline",start(t){return t.indexOf("++")},tokenize(t,e,n){const a=/^(\+\+)([\s\S]+?)(\+\+)/.exec(t);if(!a)return;const i=a[2].trim();return{type:"underline",raw:a[0],text:i,tokens:n.inlineTokens(i)}}},addCommands(){return{setUnderline:()=>({commands:t})=>t.setMark(this.name),toggleUnderline:()=>({commands:t})=>t.toggleMark(this.name),unsetUnderline:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),$9=Rt.create({name:"starterKit",addExtensions(){var t,e,n,r;const a=[];return this.options.bold!==!1&&a.push(P8.configure(this.options.bold)),this.options.blockquote!==!1&&a.push(w8.configure(this.options.blockquote)),this.options.bulletList!==!1&&a.push(V_.configure(this.options.bulletList)),this.options.code!==!1&&a.push(U8.configure(this.options.code)),this.options.codeBlock!==!1&&a.push($8.configure(this.options.codeBlock)),this.options.document!==!1&&a.push(z8.configure(this.options.document)),this.options.dropcursor!==!1&&a.push(k8.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&a.push(I8.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&a.push(q8.configure(this.options.hardBreak)),this.options.heading!==!1&&a.push(G8.configure(this.options.heading)),this.options.undoRedo!==!1&&a.push(C8.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&a.push(V8.configure(this.options.horizontalRule)),this.options.italic!==!1&&a.push(Z8.configure(this.options.italic)),this.options.listItem!==!1&&a.push(W_.configure(this.options.listItem)),this.options.listKeymap!==!1&&a.push(J_.configure((t=this.options)==null?void 0:t.listKeymap)),this.options.link!==!1&&a.push(A9.configure((e=this.options)==null?void 0:e.link)),this.options.orderedList!==!1&&a.push(tx.configure(this.options.orderedList)),this.options.paragraph!==!1&&a.push(P9.configure(this.options.paragraph)),this.options.strike!==!1&&a.push(U9.configure(this.options.strike)),this.options.text!==!1&&a.push(H9.configure(this.options.text)),this.options.underline!==!1&&a.push(j9.configure((n=this.options)==null?void 0:n.underline)),this.options.trailingNode!==!1&&a.push(v8.configure((r=this.options)==null?void 0:r.trailingNode)),a}}),z9=$9;const Sn=16,Qp=2.5,Jp=(Sn-Qp)/2,dp=2*Math.PI*Jp;function nx(t){const e=W.c(31),{usage:n}=t;if(!n)return null;const{totalTokens:r,inputTokens:a,outputTokens:i,cost:s}=n;if(!r&&!a&&!i)return null;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=m.jsx(pk,{size:12}),e[0]=o):o=e[0];let l;e[1]!==s||e[2]!==r?(l=s>0?`$${s.toFixed(4)}`:r.toLocaleString(),e[1]=s,e[2]=r,e[3]=l):l=e[3];let u;e[4]!==l?(u=m.jsx(vn,{asChild:!0,children:m.jsxs("span",{className:"inline-flex items-center text-muted-foreground [@media(hover:hover)]:hover:text-foreground pl-1 h-6 gap-1 whitespace-nowrap shrink-0 cursor-default",children:[o,m.jsx("span",{className:"text-sm font-mono tabular-nums",children:l})]})}),e[4]=l,e[5]=u):u=e[5];let d;e[6]===Symbol.for("react.memo_cache_sentinel")?(d=m.jsx("p",{className:"text-muted text-[10px] mb-1",children:"tokens"}),e[6]=d):d=e[6];let c;e[7]===Symbol.for("react.memo_cache_sentinel")?(c=m.jsx("span",{className:"text-muted",children:"in"}),e[7]=c):c=e[7];let p;e[8]!==a?(p=a.toLocaleString(),e[8]=a,e[9]=p):p=e[9];let f;e[10]!==p?(f=m.jsx("span",{className:"text-right tabular-nums",children:p}),e[10]=p,e[11]=f):f=e[11];let g;e[12]===Symbol.for("react.memo_cache_sentinel")?(g=m.jsx("span",{className:"text-muted",children:"out"}),e[12]=g):g=e[12];const b=i-(n.reasoningTokens??0);let T;e[13]!==b?(T=b.toLocaleString(),e[13]=b,e[14]=T):T=e[14];let S;e[15]!==T?(S=m.jsx("span",{className:"text-right tabular-nums",children:T}),e[15]=T,e[16]=S):S=e[16];let y;e[17]!==a||e[18]!==n.cacheReadTokens||e[19]!==n.cacheWriteTokens?(y=(n.cacheReadTokens>0||n.cacheWriteTokens>0)&&m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"text-muted",children:"cache hit"}),m.jsx("span",{className:"text-right tabular-nums",children:a>0?`${(n.cacheReadTokens/a*100).toFixed(0)}%`:"0%"})]}),e[17]=a,e[18]=n.cacheReadTokens,e[19]=n.cacheWriteTokens,e[20]=y):y=e[20];let A;e[21]!==s?(A=s>0&&m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"text-muted",children:"cost"}),m.jsxs("span",{className:"text-right tabular-nums",children:["$",s.toFixed(4)]})]}),e[21]=s,e[22]=A):A=e[22];let _;e[23]!==S||e[24]!==y||e[25]!==A||e[26]!==f?(_=m.jsxs(Cn,{side:"top",className:"font-mono text-[11px]",children:[d,m.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5",children:[c,f,g,S,y,A]})]}),e[23]=S,e[24]=y,e[25]=A,e[26]=f,e[27]=_):_=e[27];let k;return e[28]!==_||e[29]!==u?(k=m.jsxs(Rn,{children:[u,_]}),e[28]=_,e[29]=u,e[30]=k):k=e[30],k}function q9(t){const e=W.c(19),{usage:n,duration:r}=t,a=r!=null&&r>0,i=n!=null&&(n.cost??0)>0,s=n!=null&&(n.totalTokens??0)>0;if(!a&&!i&&!s)return null;let o;e[0]!==r||e[1]!==a?(o=a?mn(r/1e3):null,e[0]=r,e[1]=a,e[2]=o):o=e[2];const l=o;let u;e[3]!==r||e[4]!==l||e[5]!==n?(u=l&&m.jsxs(Rn,{children:[m.jsx(vn,{asChild:!0,children:m.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground cursor-default [@media(hover:hover)]:hover:text-foreground transition-colors select-none",children:l})}),m.jsxs(Cn,{side:"top",className:"font-mono text-[11px]",children:[m.jsx("p",{className:"opacity-60 text-[10px] mb-1",children:"thinking"}),m.jsx("span",{className:"tabular-nums",children:mn(r/1e3)}),(n?.reasoningTokens??0)>0&&m.jsxs("span",{className:"ml-2 opacity-50",children:[n.reasoningTokens.toLocaleString()," tok"]})]})]}),e[3]=r,e[4]=l,e[5]=n,e[6]=u):u=e[6];let d;e[7]!==i||e[8]!==a||e[9]!==s?(d=a&&(i||s)&&m.jsx("span",{className:"text-muted-foreground/40 select-none",children:"·"}),e[7]=i,e[8]=a,e[9]=s,e[10]=d):d=e[10];let c;e[11]!==i||e[12]!==s||e[13]!==n?(c=(i||s)&&m.jsxs(Rn,{children:[m.jsx(vn,{asChild:!0,children:m.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground cursor-default [@media(hover:hover)]:hover:text-foreground transition-colors select-none",children:i?`$${n.cost.toFixed(4)}`:`${n.totalTokens.toLocaleString()} tok`})}),m.jsxs(Cn,{side:"top",className:"font-mono text-[11px]",children:[m.jsx("p",{className:"opacity-60 text-[10px] mb-1",children:"tokens"}),m.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5",children:[m.jsx("span",{className:"opacity-60",children:"in"}),m.jsx("span",{className:"text-right tabular-nums",children:(n.inputTokens??0).toLocaleString()}),m.jsx("span",{className:"opacity-60",children:"out"}),m.jsx("span",{className:"text-right tabular-nums",children:((n.outputTokens??0)-(n?.reasoningTokens??0)).toLocaleString()}),(n?.reasoningTokens??0)>0&&m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"opacity-60",children:"think"}),m.jsx("span",{className:"text-right tabular-nums",children:n.reasoningTokens.toLocaleString()})]}),((n?.cacheReadTokens??0)>0||(n?.cacheWriteTokens??0)>0)&&m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"opacity-60",children:"cache hit"}),m.jsx("span",{className:"text-right tabular-nums",children:(n?.inputTokens??0)>0?`${((n?.cacheReadTokens??0)/n.inputTokens*100).toFixed(0)}%`:"0%"})]})]})]})]}),e[11]=i,e[12]=s,e[13]=n,e[14]=c):c=e[14];let p;return e[15]!==u||e[16]!==d||e[17]!==c?(p=m.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[u,d,c]}),e[15]=u,e[16]=d,e[17]=c,e[18]=p):p=e[18],p}function gz(t){const e=W.c(51),{usage:n,totalTokens:r,contextWindow:a,onOpenContextPanel:i}=t,s=Math.min(r/a*100,100),o=dp-s/100*dp,l=n?.cost??0,u=n?.inputTokens??0,d=n?.outputTokens??0;let c;e[0]!==s?(c=s.toFixed(0),e[0]=s,e[1]=c):c=e[1];let p;e[2]!==l?(p=l>0?`, $${l.toFixed(2)}`:"",e[2]=l,e[3]=p):p=e[3];const f=`Context usage: ${c}%${p}`,g=i?"cursor-pointer":"cursor-default";let b;e[4]!==g?(b=Te("flex items-center gap-1.5 text-muted-foreground hover:text-foreground h-6 px-1 shrink-0",g),e[4]=g,e[5]=b):b=e[5];let T;e[6]===Symbol.for("react.memo_cache_sentinel")?(T=m.jsx("circle",{cx:Sn/2,cy:Sn/2,r:Jp,fill:"none",stroke:"currentColor",strokeWidth:Qp,className:"opacity-15"}),e[6]=T):T=e[6];const S=s>90?"text-destructive":s>70?"text-warning":"text-muted-foreground";let y;e[7]!==S?(y=Te(S),e[7]=S,e[8]=y):y=e[8];let A;e[9]!==o||e[10]!==y?(A=m.jsxs("svg",{width:Sn,height:Sn,className:"-rotate-90",children:[T,m.jsx("circle",{cx:Sn/2,cy:Sn/2,r:Jp,fill:"none",stroke:"currentColor",strokeWidth:Qp,strokeDasharray:dp,strokeDashoffset:o,strokeLinecap:"round",className:y})]}),e[9]=o,e[10]=y,e[11]=A):A=e[11];let _;e[12]!==s?(_=s.toFixed(0),e[12]=s,e[13]=_):_=e[13];let k;e[14]!==l?(k=l>0?` · $${l.toFixed(2)}`:"",e[14]=l,e[15]=k):k=e[15];let E;e[16]!==_||e[17]!==k?(E=m.jsxs("span",{className:"inline-block overflow-hidden whitespace-nowrap max-w-0 opacity-0 transition-[max-width,opacity] duration-200 ease-out @[320px]/chat-bottom:max-w-32 @[320px]/chat-bottom:opacity-100 text-[11px] font-mono tabular-nums",children:[_,"%",k]}),e[16]=_,e[17]=k,e[18]=E):E=e[18];let x;e[19]!==i||e[20]!==E||e[21]!==f||e[22]!==b||e[23]!==A?(x=m.jsx(vn,{asChild:!0,children:m.jsxs("button",{type:"button",onClick:i,"aria-label":f,className:b,children:[A,E]})}),e[19]=i,e[20]=E,e[21]=f,e[22]=b,e[23]=A,e[24]=x):x=e[24];let v;e[25]===Symbol.for("react.memo_cache_sentinel")?(v=m.jsx("span",{className:"text-muted",children:"context"}),e[25]=v):v=e[25];let N;e[26]!==r?(N=r.toLocaleString(),e[26]=r,e[27]=N):N=e[27];let I;e[28]!==a?(I=a.toLocaleString(),e[28]=a,e[29]=I):I=e[29];let L;e[30]!==s?(L=s.toFixed(1),e[30]=s,e[31]=L):L=e[31];let M;e[32]!==N||e[33]!==I||e[34]!==L?(M=m.jsxs("span",{className:"text-right tabular-nums",children:[N," / ",I," (",L,"%)"]}),e[32]=N,e[33]=I,e[34]=L,e[35]=M):M=e[35];let B;e[36]!==l||e[37]!==u||e[38]!==d?(B=l>0&&m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"text-muted",children:"cost"}),m.jsxs("span",{className:"text-right tabular-nums",children:["$",l.toFixed(4)]}),m.jsx("span",{className:"text-muted",children:"in"}),m.jsx("span",{className:"text-right tabular-nums",children:u.toLocaleString()}),m.jsx("span",{className:"text-muted",children:"out"}),m.jsx("span",{className:"text-right tabular-nums",children:d.toLocaleString()})]}),e[36]=l,e[37]=u,e[38]=d,e[39]=B):B=e[39];let F;e[40]!==u||e[41]!==n?.cacheReadTokens||e[42]!==n?.cacheWriteTokens?(F=((n?.cacheReadTokens??0)>0||(n?.cacheWriteTokens??0)>0)&&m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"text-muted",children:"cache hit"}),m.jsx("span",{className:"text-right tabular-nums",children:u>0?`${((n?.cacheReadTokens??0)/u*100).toFixed(0)}%`:"0%"})]}),e[40]=u,e[41]=n?.cacheReadTokens,e[42]=n?.cacheWriteTokens,e[43]=F):F=e[43];let P;e[44]!==M||e[45]!==B||e[46]!==F?(P=m.jsx(Cn,{side:"top",className:"font-mono text-[11px]",children:m.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5",children:[v,M,B,F]})}),e[44]=M,e[45]=B,e[46]=F,e[47]=P):P=e[47];let H;return e[48]!==x||e[49]!==P?(H=m.jsxs(Rn,{children:[x,P]}),e[48]=x,e[49]=P,e[50]=H):H=e[50],H}var Gi="Collapsible",[G9,bz]=Ny(Gi),[V9,Sm]=G9(Gi),rx=z.forwardRef((t,e)=>{const{__scopeCollapsible:n,open:r,defaultOpen:a,disabled:i,onOpenChange:s,...o}=t,[l,u]=Gx({prop:r,defaultProp:a??!1,onChange:s,caller:Gi});return m.jsx(V9,{scope:n,disabled:i,contentId:Vx(),open:l,onOpenToggle:z.useCallback(()=>u(d=>!d),[u]),children:m.jsx(hn.div,{"data-state":km(l),"data-disabled":i?"":void 0,...o,ref:e})})});rx.displayName=Gi;var ax="CollapsibleTrigger",Am=z.forwardRef((t,e)=>{const{__scopeCollapsible:n,...r}=t,a=Sm(ax,n);return m.jsx(hn.button,{type:"button","aria-controls":a.contentId,"aria-expanded":a.open||!1,"data-state":km(a.open),"data-disabled":a.disabled?"":void 0,disabled:a.disabled,...r,ref:e,onClick:fn(t.onClick,a.onOpenToggle)})});Am.displayName=ax;var _m="CollapsibleContent",xm=z.forwardRef((t,e)=>{const{forceMount:n,...r}=t,a=Sm(_m,t.__scopeCollapsible);return m.jsx(Yr,{present:n||a.open,children:({present:i})=>m.jsx(W9,{...r,ref:e,present:i})})});xm.displayName=_m;var W9=z.forwardRef((t,e)=>{const{__scopeCollapsible:n,present:r,children:a,...i}=t,s=Sm(_m,n),[o,l]=z.useState(r),u=z.useRef(null),d=Mn(e,u),c=z.useRef(0),p=c.current,f=z.useRef(0),g=f.current,b=s.open||o,T=z.useRef(b),S=z.useRef(void 0);return z.useEffect(()=>{const y=requestAnimationFrame(()=>T.current=!1);return()=>cancelAnimationFrame(y)},[]),Iy(()=>{const y=u.current;if(y){S.current=S.current||{transitionDuration:y.style.transitionDuration,animationName:y.style.animationName},y.style.transitionDuration="0s",y.style.animationName="none";const A=y.getBoundingClientRect();c.current=A.height,f.current=A.width,T.current||(y.style.transitionDuration=S.current.transitionDuration,y.style.animationName=S.current.animationName),l(r)}},[s.open,r]),m.jsx(hn.div,{"data-state":km(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!b,...i,ref:d,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":g?`${g}px`:void 0,...t.style},children:b&&a})});function km(t){return t?"open":"closed"}var Y9=rx,Ez=Am,Tz=xm;function K9(t){const e=W.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=m.jsx(Y9,{"data-slot":"collapsible",...n}),e[2]=n,e[3]=r):r=e[3],r}function X9(t){const e=W.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=m.jsx(Am,{"data-slot":"collapsible-trigger",...n}),e[2]=n,e[3]=r):r=e[3],r}function Z9(t){const e=W.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=m.jsx(xm,{"data-slot":"collapsible-content",...n}),e[2]=n,e[3]=r):r=e[3],r}function Se({icon:t,title:e,usage:n,latency:r,summary:a,state:i,detail:s,detailVariant:o="code",forceOpen:l,variant:u="default",trailing:d,iconDestructive:c,alwaysChevron:p,defaultOpen:f,children:g}){const b=ue(),[T,S]=z.useState(f??!1),{handleCopy:y,copied:A}=qy(),_=i==="loading",k=i==="error",x=!!(s&&s.trim())||!!g,v=u==="subtask",N=(l??!1)||T,I=BI({initial:_?"instant":!1}),L=m.jsxs(K9,{open:N,onOpenChange:l?void 0:S,className:"min-w-0",children:[m.jsxs(X9,{disabled:!x,className:Te("group/tool flex items-center gap-2 w-full py-2.5 text-left transition-colors",x&&"[@media(hover:hover)]:hover:bg-accent/30",!x&&"cursor-default",_&&"shimmer"),"aria-disabled":!x,children:[m.jsx("div",{className:"relative shrink-0 size-4 flex items-center justify-center",children:p?m.jsx(zm,{className:Te("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",N&&"rotate-90")}):m.jsxs(m.Fragment,{children:[m.jsx("div",{className:Te("absolute inset-0 flex items-center justify-center [&>svg]:size-4 transition-opacity duration-150",c?"[&>svg]:text-destructive/70":k?"[&>svg]:text-warning/70":"[&>svg]:text-muted-foreground/75",x&&(N?"opacity-0":"[@media(hover:hover)]:group-hover/tool:opacity-0")),children:t}),x&&m.jsx("div",{className:Te("absolute inset-0 flex items-center justify-center transition-opacity duration-150",N?"opacity-100":"opacity-0 [@media(hover:hover)]:group-hover/tool:opacity-100"),children:m.jsx(zm,{className:Te("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",N&&"rotate-90")})})]})}),m.jsx("span",{className:Te("shrink-0 text-[14px] font-normal",k?"text-warning/80":"text-foreground"),children:e}),a?m.jsx("span",{className:"min-w-0 flex-1 truncate",children:m.jsx("span",{className:"text-[12px] text-muted-foreground/60 bg-muted/50 rounded-[3px] px-1 py-px leading-none",children:a})}):m.jsx("div",{className:"flex-1"}),d&&m.jsx("div",{className:"shrink-0 flex items-center gap-1 [&_svg]:size-3.5 [&_svg]:text-muted-foreground/50",children:d}),m.jsx(nx,{usage:n})]}),x&&m.jsx(Z9,{className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden",children:g||(o==="prose"?m.jsx("div",{className:"mt-1 mb-1",children:m.jsx("div",{ref:I.scrollRef,className:"max-h-[150px] overflow-y-auto rounded-md bg-muted/30 px-3 py-2",children:m.jsx("p",{ref:I.contentRef,className:"text-xs text-muted-foreground/70 whitespace-pre-wrap leading-relaxed wrap-break-word",children:s})})}):m.jsx("div",{className:"ml-[20px] pl-3 border-l border-border/30 mt-0.5 pb-1",children:m.jsx("div",{ref:I.scrollRef,className:"flex flex-col max-h-48 overflow-y-auto",children:m.jsxs("div",{ref:I.contentRef,className:"flex items-start justify-between gap-2",children:[m.jsx("div",{className:"flex-1 min-w-0 overflow-hidden",children:m.jsx("pre",{className:"text-xs font-mono text-muted-foreground/70 whitespace-pre-wrap wrap-break-word",children:s})}),m.jsx("button",{type:"button",onClick:()=>y(s),className:"shrink-0 p-1.5 rounded-md text-muted-foreground/50 [@media(hover:hover)]:hover:text-foreground [@media(hover:hover)]:hover:bg-accent/50 transition-colors active:scale-[0.97]","aria-label":b("chat.common.copy"),children:A?m.jsx(Xr,{className:"size-3.5"}):m.jsx(Si,{className:"size-3.5"})})]})})}))})]});return v?m.jsx("div",{className:"pl-4 border-l border-border/40 ml-1.5",children:L}):L}function Ye(t){const e=W.c(4),{latency:n}=t;if(n==null||n<=0)return null;let r;e[0]!==n?(r=mn(n),e[0]=n,e[1]=r):r=e[1];let a;return e[2]!==r?(a=m.jsx("span",{className:"text-[11px] font-mono tabular-nums text-muted-foreground",children:r}),e[2]=r,e[3]=a):a=e[3],a}const ix=4;function sx(t){const e=W.c(8),{count:n,noun:r,onClick:a}=t,i=ue();let s;e[0]!==n||e[1]!==r||e[2]!==i?(s=i("chat.common.seeAll",{count:n,noun:r}),e[0]=n,e[1]=r,e[2]=i,e[3]=s):s=e[3];let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=m.jsx(zy,{className:"size-4 transition-transform group-hover:translate-x-0.5","aria-hidden":"true"}),e[4]=o):o=e[4];let l;return e[5]!==a||e[6]!==s?(l=m.jsxs("button",{type:"button",onClick:a,className:"group flex w-full items-center justify-center gap-1.5 rounded-lg border border-border bg-card px-3 py-2.5 text-sm text-muted-foreground transition-colors hover:bg-muted hover:text-foreground cursor-pointer",children:[s,o]}),e[5]=a,e[6]=s,e[7]=l):l=e[7],l}function ox(t){const e=W.c(12),{message:n,className:r}=t,a=n.created_at??n.metadata?.created_at??null;let i,s,o,l;if(e[0]!==r||e[1]!==a){l=Symbol.for("react.early_return_sentinel");e:{const d=gf(a);if(d===null){l=null;break e}const c=new Date(d);i=c.toLocaleString(),e[6]!==r?(s=Te("text-[11px] text-muted-foreground/60 select-none",r),e[6]=r,e[7]=s):s=e[7],o=c.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}e[0]=r,e[1]=a,e[2]=i,e[3]=s,e[4]=o,e[5]=l}else i=e[2],s=e[3],o=e[4],l=e[5];if(l!==Symbol.for("react.early_return_sentinel"))return l;let u;return e[8]!==i||e[9]!==s||e[10]!==o?(u=m.jsx("span",{title:i,className:s,children:o}),e[8]=i,e[9]=s,e[10]=o,e[11]=u):u=e[11],u}function ef(t){const e=W.c(9),{since:n}=t;let r;e[0]!==n?(r=()=>qm(n,Date.now()),e[0]=n,e[1]=r):r=e[1];const[a,i]=z.useState(r);let s,o;e[2]!==n?(s=()=>{const c=setInterval(()=>i(qm(n,Date.now())),100);return()=>clearInterval(c)},o=[n],e[2]=n,e[3]=s,e[4]=o):(s=e[3],o=e[4]),z.useEffect(s,o);const l=a/1e3;let u;e[5]!==l?(u=mn(l),e[5]=l,e[6]=u):u=e[6];let d;return e[7]!==u?(d=m.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground/50",children:u}),e[7]=u,e[8]=d):d=e[8],d}const lx=[{delay:0},{delay:100},{delay:200},{delay:100},{delay:200},{delay:200},{delay:300},{delay:300},{delay:400}];function Q9(){const t=W.c(5),[e]=z.useState(J9);let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={gridTemplateColumns:"repeat(3, 3px)",gap:"1.5px",width:"fit-content"},t[0]=n):n=t[0];let r;t[1]!==e?(r=lx.map((i,s)=>{const{delay:o}=i;return m.jsx("div",{className:"rounded-[1px]",style:{width:3,height:3,"--cell-color":e[s],animation:"grid-ripple 1s ease infinite",animationDelay:`${o}ms`}},s)}),t[1]=e,t[2]=r):r=t[2];let a;return t[3]!==r?(a=m.jsx("div",{className:"grid",style:n,children:r}),t[3]=r,t[4]=a):a=t[4],a}function J9(){const t=`var(--chart-${Math.ceil(Math.random()*5)})`;return lx.map(()=>Math.random()<.6?"color-mix(in srgb, var(--muted-foreground) 25%, transparent)":t)}function eH(t){return{planning:{icon:m.jsx(mk,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:t("chat.thinkingIndicator.planningLabel"),detail:t("chat.thinkingIndicator.planningDetail")},thinking:{icon:m.jsx(yi,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:t("chat.thinkingIndicator.thinkingLabel"),detail:t("chat.thinkingIndicator.thinkingDetail")}}}const tH=1200;function tf(t){const e=W.c(9),{icon:n,title:r,summary:a,detail:i,state:s,detailVariant:o,latency:l,trailing:u}=t,d=o===void 0?"prose":o;let c;return e[0]!==i||e[1]!==d||e[2]!==n||e[3]!==l||e[4]!==s||e[5]!==a||e[6]!==r||e[7]!==u?(c=m.jsx(Se,{icon:n,title:r,summary:a,detail:i,state:s,detailVariant:d,latency:l,trailing:u}),e[0]=i,e[1]=d,e[2]=n,e[3]=l,e[4]=s,e[5]=a,e[6]=r,e[7]=u,e[8]=c):c=e[8],c}function nH(t){const e=W.c(19),{startedAt:n}=t,r=ue(),a=nr()?.runStatusStage??null,[i,s]=z.useState("planning");let o,l;if(e[0]!==a?(o=()=>{if(a!==null)return;const b=setTimeout(()=>{s("thinking")},tH);return()=>{clearTimeout(b)}},l=[a],e[0]=a,e[1]=o,e[2]=l):(o=e[1],l=e[2]),z.useEffect(o,l),a!==null){const b=Pk[a];let T;e[3]===Symbol.for("react.memo_cache_sentinel")?(T=m.jsx(yi,{className:"size-4"}),e[3]=T):T=e[3];const S=`${b.label}...`;let y;e[4]!==n?(y=n!==null&&m.jsx(ef,{since:n}),e[4]=n,e[5]=y):y=e[5];let A;return e[6]!==b.detail||e[7]!==S||e[8]!==y?(A=m.jsx(tf,{icon:T,title:S,summary:b.detail,state:"loading",trailing:y}),e[6]=b.detail,e[7]=S,e[8]=y,e[9]=A):A=e[9],A}let u;e[10]!==r?(u=eH(r),e[10]=r,e[11]=u):u=e[11];const c=u[i],p=`${c.label}...`;let f;e[12]!==n?(f=n!==null&&m.jsx(ef,{since:n}),e[12]=n,e[13]=f):f=e[13];let g;return e[14]!==c.detail||e[15]!==c.icon||e[16]!==p||e[17]!==f?(g=m.jsx(tf,{icon:c.icon,title:p,summary:c.detail,state:"loading",trailing:f}),e[14]=c.detail,e[15]=c.icon,e[16]=p,e[17]=f,e[18]=g):g=e[18],g}function rH(t){const e=W.c(3),{startedAt:n}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=m.jsx(Q9,{}),e[0]=r):r=e[0];let a;return e[1]!==n?(a=m.jsxs("div",{className:"flex items-center gap-2.5 mt-1 pb-1 text-muted-foreground/40 select-none",children:[r,m.jsx(ef,{since:n})]}),e[1]=n,e[2]=a):a=e[2],a}const aH=2e4;function iH(t){const e=W.c(9),{startedAt:n}=t,r=ue();Fy(1e3);const a=nr(),s=(n!==null?Date.now()-n:0)>=aH;let o;e[0]!==n?(o=m.jsx(nH,{startedAt:n}),e[0]=n,e[1]=o):o=e[1];let l;e[2]!==s||e[3]!==a||e[4]!==r?(l=s&&a?.stop&&m.jsxs("div",{className:"flex items-center gap-2 pb-1 text-[13px] text-muted-foreground/60",children:[m.jsx("span",{children:r("chat.thinkingIndicator.takingLonger")}),m.jsx("button",{type:"button",onClick:()=>a.stop(),className:"text-muted-foreground hover:text-foreground underline underline-offset-2",children:r("chat.thinkingIndicator.cancel")})]}),e[2]=s,e[3]=a,e[4]=r,e[5]=l):l=e[5];let u;return e[6]!==o||e[7]!==l?(u=m.jsxs("div",{className:"flex flex-col gap-0.5",children:[o,l]}),e[6]=o,e[7]=l,e[8]=u):u=e[8],u}function sH(t){const e=W.c(25),{duration:n,parts:r,isStreaming:a}=t,i=ue();let s;e[0]!==r?(s=r.every(uH),e[0]=r,e[1]=s):s=e[1];const o=s;let l;e[2]!==n||e[3]!==i?(l=n&&n/1e3>1?i("chat.thinkingIndicator.thoughtFor",{duration:mn(n/1e3)}):i("chat.thinkingIndicator.thought"),e[2]=n,e[3]=i,e[4]=l):l=e[4];const u=l;let d;if(e[5]!==o||e[6]!==a||e[7]!==r){const _=r.map(lH).join(`
|
|
134
|
+
`):"",markdownTokenizer:{name:"taskList",level:"block",start(t){var e;const n=(e=t.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:e.index;return n!==void 0?n:-1},tokenize(t,e,n){const r=i=>{const s=Vm(i,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:o=>({indentLevel:o[1].length,mainContent:o[4],checked:o[3].toLowerCase()==="x"}),createToken:(o,l)=>({type:"taskItem",raw:"",mainContent:o.mainContent,indentLevel:o.indentLevel,checked:o.checked,text:o.mainContent,tokens:n.inlineTokens(o.mainContent),nestedTokens:l}),customNestedParser:r},n);return s?[{type:"taskList",raw:s.raw,items:s.items}]:n.blockTokens(i)},a=Vm(t,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:i=>({indentLevel:i[1].length,mainContent:i[4],checked:i[3].toLowerCase()==="x"}),createToken:(i,s)=>({type:"taskItem",raw:"",mainContent:i.mainContent,indentLevel:i.indentLevel,checked:i.checked,text:i.mainContent,tokens:n.inlineTokens(i.mainContent),nestedTokens:s}),customNestedParser:r},n);if(a)return{type:"taskList",raw:a.raw,items:a.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:t})=>t.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});Rt.create({name:"listKit",addExtensions(){const t=[];return this.options.bulletList!==!1&&t.push(V_.configure(this.options.bulletList)),this.options.listItem!==!1&&t.push(W_.configure(this.options.listItem)),this.options.listKeymap!==!1&&t.push(J_.configure(this.options.listKeymap)),this.options.orderedList!==!1&&t.push(tx.configure(this.options.orderedList)),this.options.taskItem!==!1&&t.push(L9.configure(this.options.taskItem)),this.options.taskList!==!1&&t.push(D9.configure(this.options.taskList)),t}});var by=" ",M9=" ",P9=ct.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",$e(this.options.HTMLAttributes,t),0]},parseMarkdown:(t,e)=>{const n=t.tokens||[];if(n.length===1&&n[0].type==="image")return e.parseChildren([n[0]]);const r=e.parseInline(n);return r.length===1&&r[0].type==="text"&&(r[0].text===by||r[0].text===M9)?e.createNode("paragraph",void 0,[]):e.createNode("paragraph",void 0,r)},renderMarkdown:(t,e,n)=>{var r,a;if(!t)return"";const i=Array.isArray(t.content)?t.content:[];if(i.length===0){const s=Array.isArray((r=n?.previousNode)==null?void 0:r.content)?n.previousNode.content:[];return((a=n?.previousNode)==null?void 0:a.type)==="paragraph"&&s.length===0?by:""}return e.renderChildren(i)},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),F9=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,B9=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,U9=rr.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["s",$e(this.options.HTMLAttributes,t),0]},markdownTokenName:"del",parseMarkdown:(t,e)=>e.applyMark("strike",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`~~${e.renderChildren(t)}~~`,addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Zn({find:F9,type:this.type})]},addPasteRules(){return[wn({find:B9,type:this.type})]}}),H9=ct.create({name:"text",group:"inline",parseMarkdown:t=>({type:"text",text:t.text||""}),renderMarkdown:t=>t.text||""}),j9=rr.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["u",$e(this.options.HTMLAttributes,t),0]},parseMarkdown(t,e){return e.applyMark(this.name||"underline",e.parseInline(t.tokens||[]))},renderMarkdown(t,e){return`++${e.renderChildren(t)}++`},markdownTokenizer:{name:"underline",level:"inline",start(t){return t.indexOf("++")},tokenize(t,e,n){const a=/^(\+\+)([\s\S]+?)(\+\+)/.exec(t);if(!a)return;const i=a[2].trim();return{type:"underline",raw:a[0],text:i,tokens:n.inlineTokens(i)}}},addCommands(){return{setUnderline:()=>({commands:t})=>t.setMark(this.name),toggleUnderline:()=>({commands:t})=>t.toggleMark(this.name),unsetUnderline:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),$9=Rt.create({name:"starterKit",addExtensions(){var t,e,n,r;const a=[];return this.options.bold!==!1&&a.push(P8.configure(this.options.bold)),this.options.blockquote!==!1&&a.push(w8.configure(this.options.blockquote)),this.options.bulletList!==!1&&a.push(V_.configure(this.options.bulletList)),this.options.code!==!1&&a.push(U8.configure(this.options.code)),this.options.codeBlock!==!1&&a.push($8.configure(this.options.codeBlock)),this.options.document!==!1&&a.push(z8.configure(this.options.document)),this.options.dropcursor!==!1&&a.push(k8.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&a.push(I8.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&a.push(q8.configure(this.options.hardBreak)),this.options.heading!==!1&&a.push(G8.configure(this.options.heading)),this.options.undoRedo!==!1&&a.push(C8.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&a.push(V8.configure(this.options.horizontalRule)),this.options.italic!==!1&&a.push(Z8.configure(this.options.italic)),this.options.listItem!==!1&&a.push(W_.configure(this.options.listItem)),this.options.listKeymap!==!1&&a.push(J_.configure((t=this.options)==null?void 0:t.listKeymap)),this.options.link!==!1&&a.push(A9.configure((e=this.options)==null?void 0:e.link)),this.options.orderedList!==!1&&a.push(tx.configure(this.options.orderedList)),this.options.paragraph!==!1&&a.push(P9.configure(this.options.paragraph)),this.options.strike!==!1&&a.push(U9.configure(this.options.strike)),this.options.text!==!1&&a.push(H9.configure(this.options.text)),this.options.underline!==!1&&a.push(j9.configure((n=this.options)==null?void 0:n.underline)),this.options.trailingNode!==!1&&a.push(v8.configure((r=this.options)==null?void 0:r.trailingNode)),a}}),z9=$9;const Sn=16,Qp=2.5,Jp=(Sn-Qp)/2,dp=2*Math.PI*Jp;function nx(t){const e=W.c(31),{usage:n}=t;if(!n)return null;const{totalTokens:r,inputTokens:a,outputTokens:i,cost:s}=n;if(!r&&!a&&!i)return null;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=m.jsx(pk,{size:12}),e[0]=o):o=e[0];let l;e[1]!==s||e[2]!==r?(l=s>0?`$${s.toFixed(4)}`:r.toLocaleString(),e[1]=s,e[2]=r,e[3]=l):l=e[3];let u;e[4]!==l?(u=m.jsx(vn,{asChild:!0,children:m.jsxs("span",{className:"inline-flex items-center text-muted-foreground [@media(hover:hover)]:hover:text-foreground pl-1 h-6 gap-1 whitespace-nowrap shrink-0 cursor-default",children:[o,m.jsx("span",{className:"text-sm font-mono tabular-nums",children:l})]})}),e[4]=l,e[5]=u):u=e[5];let d;e[6]===Symbol.for("react.memo_cache_sentinel")?(d=m.jsx("p",{className:"text-muted text-[10px] mb-1",children:"tokens"}),e[6]=d):d=e[6];let c;e[7]===Symbol.for("react.memo_cache_sentinel")?(c=m.jsx("span",{className:"text-muted",children:"in"}),e[7]=c):c=e[7];let p;e[8]!==a?(p=a.toLocaleString(),e[8]=a,e[9]=p):p=e[9];let f;e[10]!==p?(f=m.jsx("span",{className:"text-right tabular-nums",children:p}),e[10]=p,e[11]=f):f=e[11];let g;e[12]===Symbol.for("react.memo_cache_sentinel")?(g=m.jsx("span",{className:"text-muted",children:"out"}),e[12]=g):g=e[12];const b=i-(n.reasoningTokens??0);let T;e[13]!==b?(T=b.toLocaleString(),e[13]=b,e[14]=T):T=e[14];let S;e[15]!==T?(S=m.jsx("span",{className:"text-right tabular-nums",children:T}),e[15]=T,e[16]=S):S=e[16];let y;e[17]!==a||e[18]!==n.cacheReadTokens||e[19]!==n.cacheWriteTokens?(y=(n.cacheReadTokens>0||n.cacheWriteTokens>0)&&m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"text-muted",children:"cache hit"}),m.jsx("span",{className:"text-right tabular-nums",children:a>0?`${(n.cacheReadTokens/a*100).toFixed(0)}%`:"0%"})]}),e[17]=a,e[18]=n.cacheReadTokens,e[19]=n.cacheWriteTokens,e[20]=y):y=e[20];let A;e[21]!==s?(A=s>0&&m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"text-muted",children:"cost"}),m.jsxs("span",{className:"text-right tabular-nums",children:["$",s.toFixed(4)]})]}),e[21]=s,e[22]=A):A=e[22];let _;e[23]!==S||e[24]!==y||e[25]!==A||e[26]!==f?(_=m.jsxs(Cn,{side:"top",className:"font-mono text-[11px]",children:[d,m.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5",children:[c,f,g,S,y,A]})]}),e[23]=S,e[24]=y,e[25]=A,e[26]=f,e[27]=_):_=e[27];let k;return e[28]!==_||e[29]!==u?(k=m.jsxs(Rn,{children:[u,_]}),e[28]=_,e[29]=u,e[30]=k):k=e[30],k}function q9(t){const e=W.c(19),{usage:n,duration:r}=t,a=r!=null&&r>0,i=n!=null&&(n.cost??0)>0,s=n!=null&&(n.totalTokens??0)>0;if(!a&&!i&&!s)return null;let o;e[0]!==r||e[1]!==a?(o=a?mn(r/1e3):null,e[0]=r,e[1]=a,e[2]=o):o=e[2];const l=o;let u;e[3]!==r||e[4]!==l||e[5]!==n?(u=l&&m.jsxs(Rn,{children:[m.jsx(vn,{asChild:!0,children:m.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground cursor-default [@media(hover:hover)]:hover:text-foreground transition-colors select-none",children:l})}),m.jsxs(Cn,{side:"top",className:"font-mono text-[11px]",children:[m.jsx("p",{className:"opacity-60 text-[10px] mb-1",children:"thinking"}),m.jsx("span",{className:"tabular-nums",children:mn(r/1e3)}),(n?.reasoningTokens??0)>0&&m.jsxs("span",{className:"ml-2 opacity-50",children:[n.reasoningTokens.toLocaleString()," tok"]})]})]}),e[3]=r,e[4]=l,e[5]=n,e[6]=u):u=e[6];let d;e[7]!==i||e[8]!==a||e[9]!==s?(d=a&&(i||s)&&m.jsx("span",{className:"text-muted-foreground/40 select-none",children:"·"}),e[7]=i,e[8]=a,e[9]=s,e[10]=d):d=e[10];let c;e[11]!==i||e[12]!==s||e[13]!==n?(c=(i||s)&&m.jsxs(Rn,{children:[m.jsx(vn,{asChild:!0,children:m.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground cursor-default [@media(hover:hover)]:hover:text-foreground transition-colors select-none",children:i?`$${n.cost.toFixed(4)}`:`${n.totalTokens.toLocaleString()} tok`})}),m.jsxs(Cn,{side:"top",className:"font-mono text-[11px]",children:[m.jsx("p",{className:"opacity-60 text-[10px] mb-1",children:"tokens"}),m.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5",children:[m.jsx("span",{className:"opacity-60",children:"in"}),m.jsx("span",{className:"text-right tabular-nums",children:(n.inputTokens??0).toLocaleString()}),m.jsx("span",{className:"opacity-60",children:"out"}),m.jsx("span",{className:"text-right tabular-nums",children:((n.outputTokens??0)-(n?.reasoningTokens??0)).toLocaleString()}),(n?.reasoningTokens??0)>0&&m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"opacity-60",children:"think"}),m.jsx("span",{className:"text-right tabular-nums",children:n.reasoningTokens.toLocaleString()})]}),((n?.cacheReadTokens??0)>0||(n?.cacheWriteTokens??0)>0)&&m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"opacity-60",children:"cache hit"}),m.jsx("span",{className:"text-right tabular-nums",children:(n?.inputTokens??0)>0?`${((n?.cacheReadTokens??0)/n.inputTokens*100).toFixed(0)}%`:"0%"})]})]})]})]}),e[11]=i,e[12]=s,e[13]=n,e[14]=c):c=e[14];let p;return e[15]!==u||e[16]!==d||e[17]!==c?(p=m.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[u,d,c]}),e[15]=u,e[16]=d,e[17]=c,e[18]=p):p=e[18],p}function gz(t){const e=W.c(51),{usage:n,totalTokens:r,contextWindow:a,onOpenContextPanel:i}=t,s=Math.min(r/a*100,100),o=dp-s/100*dp,l=n?.cost??0,u=n?.inputTokens??0,d=n?.outputTokens??0;let c;e[0]!==s?(c=s.toFixed(0),e[0]=s,e[1]=c):c=e[1];let p;e[2]!==l?(p=l>0?`, $${l.toFixed(2)}`:"",e[2]=l,e[3]=p):p=e[3];const f=`Context usage: ${c}%${p}`,g=i?"cursor-pointer":"cursor-default";let b;e[4]!==g?(b=Te("flex items-center gap-1.5 text-muted-foreground hover:text-foreground h-6 px-1 shrink-0",g),e[4]=g,e[5]=b):b=e[5];let T;e[6]===Symbol.for("react.memo_cache_sentinel")?(T=m.jsx("circle",{cx:Sn/2,cy:Sn/2,r:Jp,fill:"none",stroke:"currentColor",strokeWidth:Qp,className:"opacity-15"}),e[6]=T):T=e[6];const S=s>90?"text-destructive":s>70?"text-warning":"text-muted-foreground";let y;e[7]!==S?(y=Te(S),e[7]=S,e[8]=y):y=e[8];let A;e[9]!==o||e[10]!==y?(A=m.jsxs("svg",{width:Sn,height:Sn,className:"-rotate-90",children:[T,m.jsx("circle",{cx:Sn/2,cy:Sn/2,r:Jp,fill:"none",stroke:"currentColor",strokeWidth:Qp,strokeDasharray:dp,strokeDashoffset:o,strokeLinecap:"round",className:y})]}),e[9]=o,e[10]=y,e[11]=A):A=e[11];let _;e[12]!==s?(_=s.toFixed(0),e[12]=s,e[13]=_):_=e[13];let k;e[14]!==l?(k=l>0?` · $${l.toFixed(2)}`:"",e[14]=l,e[15]=k):k=e[15];let E;e[16]!==_||e[17]!==k?(E=m.jsxs("span",{className:"inline-block overflow-hidden whitespace-nowrap max-w-0 opacity-0 transition-[max-width,opacity] duration-200 ease-out @[320px]/chat-bottom:max-w-32 @[320px]/chat-bottom:opacity-100 text-[11px] font-mono tabular-nums",children:[_,"%",k]}),e[16]=_,e[17]=k,e[18]=E):E=e[18];let x;e[19]!==i||e[20]!==E||e[21]!==f||e[22]!==b||e[23]!==A?(x=m.jsx(vn,{asChild:!0,children:m.jsxs("button",{type:"button",onClick:i,"aria-label":f,className:b,children:[A,E]})}),e[19]=i,e[20]=E,e[21]=f,e[22]=b,e[23]=A,e[24]=x):x=e[24];let v;e[25]===Symbol.for("react.memo_cache_sentinel")?(v=m.jsx("span",{className:"text-muted",children:"context"}),e[25]=v):v=e[25];let N;e[26]!==r?(N=r.toLocaleString(),e[26]=r,e[27]=N):N=e[27];let I;e[28]!==a?(I=a.toLocaleString(),e[28]=a,e[29]=I):I=e[29];let L;e[30]!==s?(L=s.toFixed(1),e[30]=s,e[31]=L):L=e[31];let M;e[32]!==N||e[33]!==I||e[34]!==L?(M=m.jsxs("span",{className:"text-right tabular-nums",children:[N," / ",I," (",L,"%)"]}),e[32]=N,e[33]=I,e[34]=L,e[35]=M):M=e[35];let B;e[36]!==l||e[37]!==u||e[38]!==d?(B=l>0&&m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"text-muted",children:"cost"}),m.jsxs("span",{className:"text-right tabular-nums",children:["$",l.toFixed(4)]}),m.jsx("span",{className:"text-muted",children:"in"}),m.jsx("span",{className:"text-right tabular-nums",children:u.toLocaleString()}),m.jsx("span",{className:"text-muted",children:"out"}),m.jsx("span",{className:"text-right tabular-nums",children:d.toLocaleString()})]}),e[36]=l,e[37]=u,e[38]=d,e[39]=B):B=e[39];let F;e[40]!==u||e[41]!==n?.cacheReadTokens||e[42]!==n?.cacheWriteTokens?(F=((n?.cacheReadTokens??0)>0||(n?.cacheWriteTokens??0)>0)&&m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"text-muted",children:"cache hit"}),m.jsx("span",{className:"text-right tabular-nums",children:u>0?`${((n?.cacheReadTokens??0)/u*100).toFixed(0)}%`:"0%"})]}),e[40]=u,e[41]=n?.cacheReadTokens,e[42]=n?.cacheWriteTokens,e[43]=F):F=e[43];let P;e[44]!==M||e[45]!==B||e[46]!==F?(P=m.jsx(Cn,{side:"top",className:"font-mono text-[11px]",children:m.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5",children:[v,M,B,F]})}),e[44]=M,e[45]=B,e[46]=F,e[47]=P):P=e[47];let H;return e[48]!==x||e[49]!==P?(H=m.jsxs(Rn,{children:[x,P]}),e[48]=x,e[49]=P,e[50]=H):H=e[50],H}var Gi="Collapsible",[G9,bz]=Ny(Gi),[V9,Sm]=G9(Gi),rx=z.forwardRef((t,e)=>{const{__scopeCollapsible:n,open:r,defaultOpen:a,disabled:i,onOpenChange:s,...o}=t,[l,u]=Gx({prop:r,defaultProp:a??!1,onChange:s,caller:Gi});return m.jsx(V9,{scope:n,disabled:i,contentId:Vx(),open:l,onOpenToggle:z.useCallback(()=>u(d=>!d),[u]),children:m.jsx(hn.div,{"data-state":km(l),"data-disabled":i?"":void 0,...o,ref:e})})});rx.displayName=Gi;var ax="CollapsibleTrigger",Am=z.forwardRef((t,e)=>{const{__scopeCollapsible:n,...r}=t,a=Sm(ax,n);return m.jsx(hn.button,{type:"button","aria-controls":a.contentId,"aria-expanded":a.open||!1,"data-state":km(a.open),"data-disabled":a.disabled?"":void 0,disabled:a.disabled,...r,ref:e,onClick:fn(t.onClick,a.onOpenToggle)})});Am.displayName=ax;var _m="CollapsibleContent",xm=z.forwardRef((t,e)=>{const{forceMount:n,...r}=t,a=Sm(_m,t.__scopeCollapsible);return m.jsx(Yr,{present:n||a.open,children:({present:i})=>m.jsx(W9,{...r,ref:e,present:i})})});xm.displayName=_m;var W9=z.forwardRef((t,e)=>{const{__scopeCollapsible:n,present:r,children:a,...i}=t,s=Sm(_m,n),[o,l]=z.useState(r),u=z.useRef(null),d=Mn(e,u),c=z.useRef(0),p=c.current,f=z.useRef(0),g=f.current,b=s.open||o,T=z.useRef(b),S=z.useRef(void 0);return z.useEffect(()=>{const y=requestAnimationFrame(()=>T.current=!1);return()=>cancelAnimationFrame(y)},[]),Iy(()=>{const y=u.current;if(y){S.current=S.current||{transitionDuration:y.style.transitionDuration,animationName:y.style.animationName},y.style.transitionDuration="0s",y.style.animationName="none";const A=y.getBoundingClientRect();c.current=A.height,f.current=A.width,T.current||(y.style.transitionDuration=S.current.transitionDuration,y.style.animationName=S.current.animationName),l(r)}},[s.open,r]),m.jsx(hn.div,{"data-state":km(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!b,...i,ref:d,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":g?`${g}px`:void 0,...t.style},children:b&&a})});function km(t){return t?"open":"closed"}var Y9=rx,Ez=Am,Tz=xm;function K9(t){const e=W.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=m.jsx(Y9,{"data-slot":"collapsible",...n}),e[2]=n,e[3]=r):r=e[3],r}function X9(t){const e=W.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=m.jsx(Am,{"data-slot":"collapsible-trigger",...n}),e[2]=n,e[3]=r):r=e[3],r}function Z9(t){const e=W.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=m.jsx(xm,{"data-slot":"collapsible-content",...n}),e[2]=n,e[3]=r):r=e[3],r}function Se({icon:t,title:e,usage:n,latency:r,summary:a,state:i,detail:s,detailVariant:o="code",forceOpen:l,variant:u="default",trailing:d,iconDestructive:c,alwaysChevron:p,defaultOpen:f,children:g}){const b=ue(),[T,S]=z.useState(f??!1),{handleCopy:y,copied:A}=qy(),_=i==="loading",k=i==="error",x=!!(s&&s.trim())||!!g,v=u==="subtask",N=(l??!1)||T,I=BI({initial:_?"instant":!1}),L=m.jsxs(K9,{open:N,onOpenChange:l?void 0:S,className:"min-w-0",children:[m.jsxs(X9,{disabled:!x,className:Te("group/tool flex items-center gap-2 w-full py-2.5 text-left transition-colors",x&&"[@media(hover:hover)]:hover:bg-accent/30",!x&&"cursor-default",_&&"shimmer"),"aria-disabled":!x,children:[m.jsx("div",{className:"relative shrink-0 size-4 flex items-center justify-center",children:p?m.jsx(zm,{className:Te("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",N&&"rotate-90")}):m.jsxs(m.Fragment,{children:[m.jsx("div",{className:Te("absolute inset-0 flex items-center justify-center [&>svg]:size-4 transition-opacity duration-150",c?"[&>svg]:text-destructive/70":k?"[&>svg]:text-warning/70":"[&>svg]:text-muted-foreground/75",x&&(N?"opacity-0":"[@media(hover:hover)]:group-hover/tool:opacity-0")),children:t}),x&&m.jsx("div",{className:Te("absolute inset-0 flex items-center justify-center transition-opacity duration-150",N?"opacity-100":"opacity-0 [@media(hover:hover)]:group-hover/tool:opacity-100"),children:m.jsx(zm,{className:Te("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",N&&"rotate-90")})})]})}),m.jsx("span",{className:Te("shrink-0 text-[14px] font-normal",k?"text-warning/80":"text-foreground"),children:e}),a?m.jsx("span",{className:"min-w-0 flex-1 truncate",children:m.jsx("span",{className:"text-[12px] text-muted-foreground/60 bg-muted/50 rounded-[3px] px-1 py-px leading-none",children:a})}):m.jsx("div",{className:"flex-1"}),d&&m.jsx("div",{className:"shrink-0 flex items-center gap-1 [&_svg]:size-3.5 [&_svg]:text-muted-foreground/50",children:d}),m.jsx(nx,{usage:n})]}),x&&m.jsx(Z9,{className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden",children:g||(o==="prose"?m.jsx("div",{className:"mt-1 mb-1",children:m.jsx("div",{ref:I.scrollRef,className:"max-h-[150px] overflow-y-auto rounded-md bg-muted/30 px-3 py-2",children:m.jsx("p",{ref:I.contentRef,className:"text-xs text-muted-foreground/70 whitespace-pre-wrap leading-relaxed wrap-break-word",children:s})})}):m.jsx("div",{className:"ml-[20px] pl-3 border-l border-border/30 mt-0.5 pb-1",children:m.jsx("div",{ref:I.scrollRef,className:"flex flex-col max-h-48 overflow-y-auto",children:m.jsxs("div",{ref:I.contentRef,className:"flex items-start justify-between gap-2",children:[m.jsx("div",{className:"flex-1 min-w-0 overflow-hidden",children:m.jsx("pre",{className:"text-xs font-mono text-muted-foreground/70 whitespace-pre-wrap wrap-break-word",children:s})}),m.jsx("button",{type:"button",onClick:()=>y(s),className:"shrink-0 p-1.5 rounded-md text-muted-foreground/50 [@media(hover:hover)]:hover:text-foreground [@media(hover:hover)]:hover:bg-accent/50 transition-colors active:scale-[0.97]","aria-label":b("common.copy"),children:A?m.jsx(Xr,{className:"size-3.5"}):m.jsx(Si,{className:"size-3.5"})})]})})}))})]});return v?m.jsx("div",{className:"pl-4 border-l border-border/40 ml-1.5",children:L}):L}function Ye(t){const e=W.c(4),{latency:n}=t;if(n==null||n<=0)return null;let r;e[0]!==n?(r=mn(n),e[0]=n,e[1]=r):r=e[1];let a;return e[2]!==r?(a=m.jsx("span",{className:"text-[11px] font-mono tabular-nums text-muted-foreground",children:r}),e[2]=r,e[3]=a):a=e[3],a}const ix=4;function sx(t){const e=W.c(8),{count:n,noun:r,onClick:a}=t,i=ue();let s;e[0]!==n||e[1]!==r||e[2]!==i?(s=i("common.seeAll",{count:n,noun:r}),e[0]=n,e[1]=r,e[2]=i,e[3]=s):s=e[3];let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=m.jsx(zy,{className:"size-4 transition-transform group-hover:translate-x-0.5","aria-hidden":"true"}),e[4]=o):o=e[4];let l;return e[5]!==a||e[6]!==s?(l=m.jsxs("button",{type:"button",onClick:a,className:"group flex w-full items-center justify-center gap-1.5 rounded-lg border border-border bg-card px-3 py-2.5 text-sm text-muted-foreground transition-colors hover:bg-muted hover:text-foreground cursor-pointer",children:[s,o]}),e[5]=a,e[6]=s,e[7]=l):l=e[7],l}function ox(t){const e=W.c(12),{message:n,className:r}=t,a=n.created_at??n.metadata?.created_at??null;let i,s,o,l;if(e[0]!==r||e[1]!==a){l=Symbol.for("react.early_return_sentinel");e:{const d=gf(a);if(d===null){l=null;break e}const c=new Date(d);i=c.toLocaleString(),e[6]!==r?(s=Te("text-[11px] text-muted-foreground/60 select-none",r),e[6]=r,e[7]=s):s=e[7],o=c.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}e[0]=r,e[1]=a,e[2]=i,e[3]=s,e[4]=o,e[5]=l}else i=e[2],s=e[3],o=e[4],l=e[5];if(l!==Symbol.for("react.early_return_sentinel"))return l;let u;return e[8]!==i||e[9]!==s||e[10]!==o?(u=m.jsx("span",{title:i,className:s,children:o}),e[8]=i,e[9]=s,e[10]=o,e[11]=u):u=e[11],u}function ef(t){const e=W.c(9),{since:n}=t;let r;e[0]!==n?(r=()=>qm(n,Date.now()),e[0]=n,e[1]=r):r=e[1];const[a,i]=z.useState(r);let s,o;e[2]!==n?(s=()=>{const c=setInterval(()=>i(qm(n,Date.now())),100);return()=>clearInterval(c)},o=[n],e[2]=n,e[3]=s,e[4]=o):(s=e[3],o=e[4]),z.useEffect(s,o);const l=a/1e3;let u;e[5]!==l?(u=mn(l),e[5]=l,e[6]=u):u=e[6];let d;return e[7]!==u?(d=m.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground/50",children:u}),e[7]=u,e[8]=d):d=e[8],d}const lx=[{delay:0},{delay:100},{delay:200},{delay:100},{delay:200},{delay:200},{delay:300},{delay:300},{delay:400}];function Q9(){const t=W.c(5),[e]=z.useState(J9);let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={gridTemplateColumns:"repeat(3, 3px)",gap:"1.5px",width:"fit-content"},t[0]=n):n=t[0];let r;t[1]!==e?(r=lx.map((i,s)=>{const{delay:o}=i;return m.jsx("div",{className:"rounded-[1px]",style:{width:3,height:3,"--cell-color":e[s],animation:"grid-ripple 1s ease infinite",animationDelay:`${o}ms`}},s)}),t[1]=e,t[2]=r):r=t[2];let a;return t[3]!==r?(a=m.jsx("div",{className:"grid",style:n,children:r}),t[3]=r,t[4]=a):a=t[4],a}function J9(){const t=`var(--chart-${Math.ceil(Math.random()*5)})`;return lx.map(()=>Math.random()<.6?"color-mix(in srgb, var(--muted-foreground) 25%, transparent)":t)}function eH(t){return{planning:{icon:m.jsx(mk,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:t("chat.thinkingIndicator.planningLabel"),detail:t("chat.thinkingIndicator.planningDetail")},thinking:{icon:m.jsx(yi,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:t("chat.thinkingIndicator.thinkingLabel"),detail:t("chat.thinkingIndicator.thinkingDetail")}}}const tH=1200;function tf(t){const e=W.c(9),{icon:n,title:r,summary:a,detail:i,state:s,detailVariant:o,latency:l,trailing:u}=t,d=o===void 0?"prose":o;let c;return e[0]!==i||e[1]!==d||e[2]!==n||e[3]!==l||e[4]!==s||e[5]!==a||e[6]!==r||e[7]!==u?(c=m.jsx(Se,{icon:n,title:r,summary:a,detail:i,state:s,detailVariant:d,latency:l,trailing:u}),e[0]=i,e[1]=d,e[2]=n,e[3]=l,e[4]=s,e[5]=a,e[6]=r,e[7]=u,e[8]=c):c=e[8],c}function nH(t){const e=W.c(19),{startedAt:n}=t,r=ue(),a=nr()?.runStatusStage??null,[i,s]=z.useState("planning");let o,l;if(e[0]!==a?(o=()=>{if(a!==null)return;const b=setTimeout(()=>{s("thinking")},tH);return()=>{clearTimeout(b)}},l=[a],e[0]=a,e[1]=o,e[2]=l):(o=e[1],l=e[2]),z.useEffect(o,l),a!==null){const b=Pk[a];let T;e[3]===Symbol.for("react.memo_cache_sentinel")?(T=m.jsx(yi,{className:"size-4"}),e[3]=T):T=e[3];const S=`${b.label}...`;let y;e[4]!==n?(y=n!==null&&m.jsx(ef,{since:n}),e[4]=n,e[5]=y):y=e[5];let A;return e[6]!==b.detail||e[7]!==S||e[8]!==y?(A=m.jsx(tf,{icon:T,title:S,summary:b.detail,state:"loading",trailing:y}),e[6]=b.detail,e[7]=S,e[8]=y,e[9]=A):A=e[9],A}let u;e[10]!==r?(u=eH(r),e[10]=r,e[11]=u):u=e[11];const c=u[i],p=`${c.label}...`;let f;e[12]!==n?(f=n!==null&&m.jsx(ef,{since:n}),e[12]=n,e[13]=f):f=e[13];let g;return e[14]!==c.detail||e[15]!==c.icon||e[16]!==p||e[17]!==f?(g=m.jsx(tf,{icon:c.icon,title:p,summary:c.detail,state:"loading",trailing:f}),e[14]=c.detail,e[15]=c.icon,e[16]=p,e[17]=f,e[18]=g):g=e[18],g}function rH(t){const e=W.c(3),{startedAt:n}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=m.jsx(Q9,{}),e[0]=r):r=e[0];let a;return e[1]!==n?(a=m.jsxs("div",{className:"flex items-center gap-2.5 mt-1 pb-1 text-muted-foreground/40 select-none",children:[r,m.jsx(ef,{since:n})]}),e[1]=n,e[2]=a):a=e[2],a}const aH=2e4;function iH(t){const e=W.c(9),{startedAt:n}=t,r=ue();Fy(1e3);const a=nr(),s=(n!==null?Date.now()-n:0)>=aH;let o;e[0]!==n?(o=m.jsx(nH,{startedAt:n}),e[0]=n,e[1]=o):o=e[1];let l;e[2]!==s||e[3]!==a||e[4]!==r?(l=s&&a?.stop&&m.jsxs("div",{className:"flex items-center gap-2 pb-1 text-[13px] text-muted-foreground/60",children:[m.jsx("span",{children:r("chat.thinkingIndicator.takingLonger")}),m.jsx("button",{type:"button",onClick:()=>a.stop(),className:"text-muted-foreground hover:text-foreground underline underline-offset-2",children:r("chat.thinkingIndicator.cancel")})]}),e[2]=s,e[3]=a,e[4]=r,e[5]=l):l=e[5];let u;return e[6]!==o||e[7]!==l?(u=m.jsxs("div",{className:"flex flex-col gap-0.5",children:[o,l]}),e[6]=o,e[7]=l,e[8]=u):u=e[8],u}function sH(t){const e=W.c(25),{duration:n,parts:r,isStreaming:a}=t,i=ue();let s;e[0]!==r?(s=r.every(uH),e[0]=r,e[1]=s):s=e[1];const o=s;let l;e[2]!==n||e[3]!==i?(l=n&&n/1e3>1?i("chat.thinkingIndicator.thoughtFor",{duration:mn(n/1e3)}):i("chat.thinkingIndicator.thought"),e[2]=n,e[3]=i,e[4]=l):l=e[4];const u=l;let d;if(e[5]!==o||e[6]!==a||e[7]!==r){const _=r.map(lH).join(`
|
|
135
135
|
`).trim().split(`
|
|
136
136
|
`).filter(Boolean),k=a?_[_.length-1]??"":_[0]??"";d=!o&&k?k.length>100?k.slice(0,100)+"…":k:void 0,e[5]=o,e[6]=a,e[7]=r,e[8]=d}else d=e[8];const c=d;let p;if(e[9]!==o||e[10]!==r){const A=r.map(oH).join(`
|
|
137
137
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as B,j as o,b as D,F as M,d as $,r as q,B as F,p as R}from"./index-
|
|
1
|
+
import{c as B,j as o,b as D,F as M,d as $,r as q,B as F,p as R}from"./index-2KxPRjw5.js";import{s as V}from"./Plus-DUvbS-Yy.js";import{i as S}from"./Zap-C4qF8Cn-.js";import{S as G}from"./search-input-DtCL1YcZ.js";import{P as d}from"./index-oBYlsJ_o.js";import{E as T}from"./empty-state-BKzUesA7.js";import{c as H}from"./use-automations-irLGHKpI.js";import{c as J}from"./use-navigate-to-agent-CXMG3HNZ.js";import{A as K}from"./automation-list-row-Brn7k31U.js";import{q as O}from"./use-mcp-client-DRwUSZdO.js";import{a as Q}from"./use-virtual-mcp-D7SVi-2E.js";import{R as U}from"./require-capability-B1pg4EtO.js";import"./SearchMd-D0poZQV_.js";import"./sidebar-DpVJgBAa.js";import"./LayoutLeft-Ciug-ep8.js";import"./use-mobile-CLE626Yq.js";import"./X-Baqkpp1k.js";import"./tooltip-CEu_we5y.js";import"./studio-tools-CTJuN7Yy.js";import"./hooks-Bom1QoTc.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-BXMXu1gQ.js";import"./reusable-new-chat-CouMjkYR.js";import"./alert-dialog-DIwINRgW.js";import"./dropdown-menu-CRGAwBji.js";import"./Check-DdyKCl8O.js";import"./ChevronRight-CSgj0z6i.js";import"./DotsVertical-OBlENp_a.js";import"./Stars02-cKtwD-F2.js";import"./Trash01-BiVOd2DS.js";import"./agent-icon-q4cV7U67.js";import"./AlertCircle-BaA3X0Vc.js";import"./Tool01-D2fd-Mg5.js";import"./ArrowUp-Df4rbgne.js";import"./Settings02-Sy5kNpSu.js";import"./Tool02-C17Y4pBP.js";import"./XCircle-8Wd2-AR5.js";import"./ArrowUpRight-fq20wgvL.js";import"./TrendUp01-D1GkdBOV.js";import"./ZapSquare-BH7ie7zg.js";import"./Users03-CqyDxwt6.js";import"./CheckCircle-IiUO6eKZ.js";import"./ChevronDown-BSVV4L9A.js";import"./ChevronUp-GR0-Yt4d.js";import"./Copy01-Cv0Vuqbe.js";import"./CpuChip01-UMJdnf1a.js";import"./Eye-CkjEvMwH.js";import"./FilterLines-Ca7W3tHb.js";import"./Star01-2mO5G0Xw.js";import"./Palette-DgmLnO_l.js";import"./SwitchHorizontal01-BwAs_KcG.js";import"./HardDrive-B91rzidb.js";import"./Key01-DVGzNfoY.js";import"./LinkExternal01-CbfqV87q.js";import"./LogOut01-B0JVxGo4.js";import"./Monitor01-CEdUOtdj.js";import"./Sun-DsnsEGXF.js";import"./Play-DcSuTxiG.js";import"./SearchLg-CSWY8viA.js";import"./Shield01-Bcql6hT4.js";import"./Stars01-DqIThrOc.js";import"./Upload01-k2Sn0RXQ.js";import"./User01-cC3unvvx.js";import"./Users01-BdNSg6CC.js";import"./XClose-CBFLmbVP.js";import"./auth-FouChJbb.js";import"./use-capability-Y4a4cK2y.js";import"./access-gate-CxXZPkIw.js";import"./capability-load-error-CqwI-nav.js";function W(){const t=B.c(20),e=D(),{org:c}=M(),{data:C}=H(void 0),g=C===void 0?[]:C,k=Q(),P=J(),f=$(),[x,E]=q.useState(""),h=x.toLowerCase(),A=new Map(k.map(X)),b=g.filter(i=>{if(!h||i.name.toLowerCase().includes(h))return!0;if(i.virtual_mcp_id){const p=A.get(i.virtual_mcp_id);if(p&&p.title.toLowerCase().includes(h))return!0}return!1}),z=(i,p)=>{const N=p&&A.has(p)?p:O(c.id);R("automations_list_row_clicked",{automation_id:i,agent_id:N,source:"settings_automations"}),P(N,{search:{main:"automation:"+i}})};let l;t[0]!==f||t[1]!==c.slug?(l=()=>{R("automations_empty_state_browse_agents_clicked"),f({to:"/$org/settings/agents",params:{org:c.slug}})},t[0]=f,t[1]=c.slug,t[2]=l):l=t[2];const L=l,j=d,v=d,w=d;let s;t[3]!==e?(s=e("settings.automations.pageTitle"),t[3]=e,t[4]=s):s=t[4];let r;t[5]!==s?(r=o.jsx(d.Title,{children:s}),t[5]=s,t[6]=r):r=t[6];const _=g.length>0&&o.jsx(G,{value:x,onChange:E,placeholder:e("settings.automations.searchPlaceholder"),className:"w-full md:w-[375px]"});let m;t[7]!==r||t[8]!==_?(m=o.jsxs("div",{className:"flex flex-col gap-6",children:[r,_]}),t[7]=r,t[8]=_,t[9]=m):m=t[9];const y=g.length===0?o.jsx("div",{className:"flex items-center justify-center py-20",children:o.jsx(T,{image:o.jsx(S,{size:48,className:"text-muted-foreground"}),title:e("settings.automations.emptyTitle"),description:e("settings.automations.emptyDescription"),actions:o.jsxs(F,{size:"sm",onClick:L,children:[o.jsx(V,{size:14}),e("settings.automations.browseAgentsButton")]})})}):b.length===0?o.jsx("div",{className:"flex items-center justify-center py-20",children:o.jsx(T,{image:o.jsx(S,{size:48,className:"text-muted-foreground"}),title:e("settings.automations.noResultsTitle"),description:e("settings.automations.noResultsDescription",{search:x})})}):o.jsx("div",{className:"mt-6 rounded-xl border border-border overflow-hidden",children:b.map(i=>o.jsx(K,{automation:i,showAgent:!0,onClick:()=>z(i.id,i.virtual_mcp_id)},i.id))});let n;t[10]!==w.Body||t[11]!==m||t[12]!==y?(n=o.jsxs(w.Body,{children:[m,y]}),t[10]=w.Body,t[11]=m,t[12]=y,t[13]=n):n=t[13];let a;t[14]!==v.Content||t[15]!==n?(a=o.jsx(v.Content,{children:n}),t[14]=v.Content,t[15]=n,t[16]=a):a=t[16];let u;return t[17]!==j||t[18]!==a?(u=o.jsx(j,{children:a}),t[17]=j,t[18]=a,t[19]=u):u=t[19],u}function X(t){return[t.id,t]}function go(){const t=B.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(U,{capability:"automations:manage",area:"automations",children:o.jsx(W,{})}),t[0]=e):e=t[0],e}export{go as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as k,j as i,m as f,bs as R,cM as V,cN as I,cO as O}from"./index-
|
|
1
|
+
import{c as k,j as i,m as f,bs as R,cM as V,cN as I,cO as O}from"./index-2KxPRjw5.js";import{s as $}from"./User01-cC3unvvx.js";function M(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("relative flex size-8 shrink-0 overflow-hidden rounded-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(O,{"data-slot":"avatar",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function U(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("aspect-square size-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(V,{"data-slot":"avatar-image",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function E(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("bg-muted flex size-full items-center justify-center rounded-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(I,{"data-slot":"avatar-fallback",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}const C=["drop-shadow-lg bg-gradient-to-br from-red-100 to-red-300 text-red-800 shadow-lg shadow-red-300/40 ring-1 ring-red-300/30","drop-shadow-lg bg-gradient-to-br from-lime-100 to-lime-300 text-lime-800 shadow-lg shadow-lime-300/40 ring-1 ring-lime-300/30","drop-shadow-lg bg-gradient-to-br from-emerald-100 to-emerald-300 text-emerald-800 shadow-lg shadow-emerald-300/40 ring-1 ring-emerald-300/30","drop-shadow-lg bg-gradient-to-br from-orange-100 to-orange-300 text-orange-800 shadow-lg shadow-orange-300/40 ring-1 ring-orange-300/30","drop-shadow-lg bg-gradient-to-br from-amber-100 to-amber-300 text-amber-800 shadow-lg shadow-amber-300/40 ring-1 ring-amber-300/30","drop-shadow-lg bg-gradient-to-br from-yellow-100 to-yellow-300 text-yellow-800 shadow-lg shadow-yellow-300/40 ring-1 ring-yellow-300/30","drop-shadow-lg bg-gradient-to-br from-green-100 to-green-300 text-green-800 shadow-lg shadow-green-300/40 ring-1 ring-green-300/30","drop-shadow-lg bg-gradient-to-br from-teal-100 to-teal-300 text-teal-800 shadow-lg shadow-teal-300/40 ring-1 ring-teal-300/30","drop-shadow-lg bg-gradient-to-br from-cyan-100 to-cyan-300 text-cyan-800 shadow-lg shadow-cyan-300/40 ring-1 ring-cyan-300/30","drop-shadow-lg bg-gradient-to-br from-sky-100 to-sky-300 text-sky-800 shadow-lg shadow-sky-300/40 ring-1 ring-sky-300/30","drop-shadow-lg bg-gradient-to-br from-blue-100 to-blue-300 text-blue-800 shadow-lg shadow-blue-300/40 ring-1 ring-blue-300/30","drop-shadow-lg bg-gradient-to-br from-indigo-100 to-indigo-300 text-indigo-800 shadow-lg shadow-indigo-300/40 ring-1 ring-indigo-300/30","drop-shadow-lg bg-gradient-to-br from-violet-100 to-violet-300 text-violet-800 shadow-lg shadow-violet-300/40 ring-1 ring-violet-300/30","drop-shadow-lg bg-gradient-to-br from-purple-100 to-purple-300 text-purple-800 shadow-lg shadow-purple-300/40 ring-1 ring-purple-300/30","drop-shadow-lg bg-gradient-to-br from-fuchsia-100 to-fuchsia-300 text-fuchsia-800 shadow-lg shadow-fuchsia-300/40 ring-1 ring-fuchsia-300/30","drop-shadow-lg bg-gradient-to-br from-pink-100 to-pink-300 text-pink-800 shadow-lg shadow-pink-300/40 ring-1 ring-pink-300/30","drop-shadow-lg bg-gradient-to-br from-rose-100 to-rose-300 text-rose-800 shadow-lg shadow-rose-300/40 ring-1 ring-rose-300/30"],L="drop-shadow-lg text-muted-foreground bg-muted shadow-lg";function T(r){let e=0;for(let t=0;t<r.length;t++)e=r.charCodeAt(t)+((e<<5)-e);const s=Math.abs(e)%C.length;return C[s]}const S=R("border border-border",{variants:{shape:{circle:"rounded-full",square:""},size:{"3xs":"w-3 h-3 text-[7px] font-semibold","2xs":"w-4 h-4 text-[9px] font-semibold",xs:"w-6 h-6 text-sm font-semibold",sm:"w-8 h-8 text-lg font-semibold",base:"w-10 h-10 text-2xl font-semibold",lg:"w-12 h-12 text-3xl font-semibold",xl:"w-16 h-16 text-4xl font-semibold","2xl":"w-20 h-20 text-5xl font-semibold","3xl":"w-32 h-32 text-7xl font-semibold"}},compoundVariants:[{shape:"square",size:"xs",class:"rounded-lg"},{shape:"square",size:"sm",class:"rounded-xl"},{shape:"square",size:"base",class:"rounded-xl"},{shape:"square",size:"lg",class:"rounded-xl"},{shape:"square",size:"xl",class:"rounded-2xl"},{shape:"square",size:"2xl",class:"rounded-3xl"},{shape:"square",size:"3xl",class:"rounded-[40px]"}],defaultVariants:{shape:"square",size:"base"}}),_=R("",{variants:{objectFit:{contain:"object-contain",cover:"object-cover"}},defaultVariants:{objectFit:"cover"}}),D=r=>{const e={"3xs":8,"2xs":8,xs:12,sm:16,base:24,lg:28,xl:36,"2xl":48,"3xl":80};return e[r]||e.base};function W(r){const e=k.c(34);let s,t,o,a,n,d,g,l;e[0]!==r?({url:l,fallback:t,shape:a,size:n,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g;let x;e:{if(typeof t=="string"){let c;e[9]!==t?(c=t.trim().slice(0,2).toUpperCase(),e[9]=t,e[10]=c):c=e[10],x=c;break e}x=t}const m=x;let y;e:{if(j){y=L;break e}if(typeof t=="string"){let c;e[11]!==t?(c=T(t),e[11]=t,e[12]=c):c=e[12],y=c;break e}y=C[0]}const z=y;let N;e[13]!==l?(N=l?.startsWith("icon://"),e[13]=l,e[14]=N):N=e[14];const p=N;let q;e[15]!==p||e[16]!==l?(q=p?l?.replace("icon://",""):void 0,e[15]=p,e[16]=l,e[17]=q):q=e[17];const F=q;let w;e[18]!==s||e[19]!==b||e[20]!==h?(w=f(S({shape:b,size:h}),s),e[18]=s,e[19]=b,e[20]=h,e[21]=w):w=e[21];let v;e[22]!==z||e[23]!==m||e[24]!==F||e[25]!==p||e[26]!==u||e[27]!==h||e[28]!==l?(v=p&&F?i.jsx("div",{className:f("flex items-center justify-center w-full h-full",z),children:i.jsx($,{size:D(h)})}):i.jsxs(i.Fragment,{children:[l&&i.jsx(U,{src:l,loading:"lazy",alt:"Avatar",className:f(_({objectFit:u}))}),i.jsx(E,{className:f(z,"rounded-none"),delayMs:l?600:0,children:m})]}),e[22]=z,e[23]=m,e[24]=F,e[25]=p,e[26]=u,e[27]=h,e[28]=l,e[29]=v):v=e[29];let A;return e[30]!==o||e[31]!==v||e[32]!==w?(A=i.jsx(M,{className:w,...o,children:v}),e[30]=o,e[31]=v,e[32]=w,e[33]=A):A=e[33],A}function B(r){const e=k.c(18);let s,t,o,a,n,d,g,l;e[0]!==r?({shape:a,size:n,url:l,fallback:t,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g,x=h??"base";let m;return e[9]!==s||e[10]!==t||e[11]!==j||e[12]!==u||e[13]!==o||e[14]!==b||e[15]!==x||e[16]!==l?(m=i.jsx(W,{shape:b,url:l,fallback:t,size:x,objectFit:u,className:s,muted:j,...o}),e[9]=s,e[10]=t,e[11]=j,e[12]=u,e[13]=o,e[14]=b,e[15]=x,e[16]=l,e[17]=m):m=e[17],m}B.Skeleton=function({shape:e="square",size:s="base",className:t}){return i.jsx("div",{className:f(S({shape:e,size:s}),"bg-muted animate-pulse",t)})};export{B as A};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as u,m as l,j as g,b4 as v,bs as b}from"./index-
|
|
1
|
+
import{c as u,m as l,j as g,b4 as v,bs as b}from"./index-2KxPRjw5.js";const f=b("inline-flex items-center justify-center rounded-full border text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",success:"border-transparent bg-success text-success-foreground [a&]:hover:bg-success/90 focus-visible:ring-success/20 dark:focus-visible:ring-success/40",warning:"border-transparent bg-warning text-warning-foreground [a&]:hover:bg-warning/90 focus-visible:ring-warning/20 dark:focus-visible:ring-warning/40",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"},size:{default:"px-2 py-0.5",icon:"size-5"}},defaultVariants:{variant:"default",size:"default"}});function h(c){const e=u.c(14);let r,s,i,n,t;e[0]!==c?({className:r,variant:t,size:i,asChild:n,...s}=c,e[0]=c,e[1]=r,e[2]=s,e[3]=i,e[4]=n,e[5]=t):(r=e[1],s=e[2],i=e[3],n=e[4],t=e[5]);const d=(n===void 0?!1:n)?v:"span";let a;e[6]!==r||e[7]!==i||e[8]!==t?(a=l(f({variant:t,size:i}),r),e[6]=r,e[7]=i,e[8]=t,e[9]=a):a=e[9];let o;return e[10]!==d||e[11]!==s||e[12]!==a?(o=g.jsx(d,{"data-slot":"badge",className:a,...s}),e[10]=d,e[11]=s,e[12]=a,e[13]=o):o=e[13],o}export{h as B};
|