decocms 4.308.0 → 4.309.1
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-BTlJp8pf.js → AlertCircle-6kr4ikYf.js} +1 -1
- package/dist/client/assets/{AreaChart-dJjxY072.js → AreaChart-DDKg3X50.js} +1 -1
- package/dist/client/assets/{ArrowLeft-BwagOJkb.js → ArrowLeft-BYTdr7TC.js} +1 -1
- package/dist/client/assets/{ArrowUp-CVoISkQ4.js → ArrowUp-CKtNsAj6.js} +1 -1
- package/dist/client/assets/{Check-D5PKBQ5I.js → Check-BDN8Muvk.js} +1 -1
- package/dist/client/assets/{CheckCircle-teyxVGFp.js → CheckCircle-DOsHeqoz.js} +1 -1
- package/dist/client/assets/{ChevronDown-Csfjhwpm.js → ChevronDown-BKzrpWz6.js} +1 -1
- package/dist/client/assets/{ChevronRight-DUmHQrD7.js → ChevronRight-CZUjBWvx.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-CuAhXy3x.js → ChevronSelectorVertical-B9yl_jmL.js} +1 -1
- package/dist/client/assets/{ChevronUp-Dlj_U0qV.js → ChevronUp-Cx4YaKpI.js} +1 -1
- package/dist/client/assets/{Copy01-CsNpp9jr.js → Copy01-B4QULclv.js} +1 -1
- package/dist/client/assets/{CreditCard01-YCHpZ00A.js → CreditCard01-wmoTErQt.js} +1 -1
- package/dist/client/assets/{DotsVertical-CpVcGDJ_.js → DotsVertical-BS1CnjKI.js} +1 -1
- package/dist/client/assets/{Download01-BN9BT9cL.js → Download01-Bp0cW6L4.js} +1 -1
- package/dist/client/assets/{Eye-DgiSa7UT.js → Eye-B_dguG6W.js} +1 -1
- package/dist/client/assets/{FilterLines-Db8-uWfr.js → FilterLines-ukqPgKKN.js} +1 -1
- package/dist/client/assets/GitBranch01-CseJth04.js +1 -0
- package/dist/client/assets/{Globe01-CV-16mwB.js → Globe01-xHaFaFqY.js} +1 -1
- package/dist/client/assets/{Globe04-D3O2XfOT.js → Globe04-SMW2xMPb.js} +1 -1
- package/dist/client/assets/{HardDrive-CWvDYc59.js → HardDrive-CGH6uKsY.js} +1 -1
- package/dist/client/assets/Image01-DI4UfHrT.js +1 -0
- package/dist/client/assets/{Key01-D4srNqPO.js → Key01-C2TuLSvm.js} +1 -1
- package/dist/client/assets/{LinkExternal01-CIL2SNWf.js → LinkExternal01-CWY5Wglm.js} +1 -1
- package/dist/client/assets/{LockUnlocked01-BpeKJGM4.js → LockUnlocked01-lprGTBDa.js} +1 -1
- package/dist/client/assets/{LogOut01-qWWgaWbQ.js → LogOut01-Dlhf6xnU.js} +1 -1
- package/dist/client/assets/{Monitor01-uq-dlf-u.js → Monitor01-RWlkxwpq.js} +1 -1
- package/dist/client/assets/Package-CbKjNbRP.js +1 -0
- package/dist/client/assets/{Palette-Cv68Zggp.js → Palette-DHncO8u1.js} +1 -1
- package/dist/client/assets/{Play-C9xK8clC.js → Play-C2DKi7Gj.js} +1 -1
- package/dist/client/assets/{Plus-CPkR-QLd.js → Plus-CThYB9e6.js} +1 -1
- package/dist/client/assets/{SearchLg-8daQliv2.js → SearchLg-BCpOjc95.js} +1 -1
- package/dist/client/assets/{SearchMd-ClTH3fiN.js → SearchMd-C0j7yoGj.js} +1 -1
- package/dist/client/assets/{Settings02-BMcJFHpd.js → Settings02-zD1WG3KJ.js} +1 -1
- package/dist/client/assets/{Share07-CPDrxQV8.js → Share07-DjrlWb0X.js} +1 -1
- package/dist/client/assets/{Shield01-C9M_jcOJ.js → Shield01-D6Z8uTMm.js} +1 -1
- package/dist/client/assets/{Stars01-BzEDQnsl.js → Stars01-DD4L9WZm.js} +1 -1
- package/dist/client/assets/{Stars02-DZNA1z2-.js → Stars02-DtPQwd-A.js} +1 -1
- package/dist/client/assets/{Sun-BBWjOwQE.js → Sun-DhJaKNHe.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-CSyGO1HX.js → SwitchHorizontal01-_tALQVAI.js} +1 -1
- package/dist/client/assets/Tool01-DdJ9Op9D.js +1 -0
- package/dist/client/assets/{Tool02-jKKU1_dM.js → Tool02-Cci1ljWo.js} +1 -1
- package/dist/client/assets/{Trash01-Dp-QTpAR.js → Trash01-BDD06UjB.js} +1 -1
- package/dist/client/assets/{TrendUp01-DikSDrNg.js → TrendUp01-DjAqcXI6.js} +1 -1
- package/dist/client/assets/{Upload01-DxCHPffq.js → Upload01-Cp4C9dq6.js} +1 -1
- package/dist/client/assets/{User01-DJ_BO2EX.js → User01-Cteu9d2D.js} +1 -1
- package/dist/client/assets/UserSquare-DTquYbih.js +1 -0
- package/dist/client/assets/{Users01-B2wc_Wgl.js → Users01-BsM313st.js} +1 -1
- package/dist/client/assets/{Users03-BUoBV4mB.js → Users03--HC72Dnu.js} +1 -1
- package/dist/client/assets/{XCircle-CVbKXkpd.js → XCircle-Bt06fa-N.js} +1 -1
- package/dist/client/assets/{XClose-CTv0nnSb.js → XClose-DM3y4DhR.js} +1 -1
- package/dist/client/assets/{YAxis-DxhC7uB4.js → YAxis-DNvsuYs9.js} +1 -1
- package/dist/client/assets/{Zap-MbQ2aiA8.js → Zap-BIV9pRJO.js} +1 -1
- package/dist/client/assets/{ZapSquare-BZzRAQpm.js → ZapSquare-QIZwOk1q.js} +1 -1
- package/dist/client/assets/ZoomOut-CRoOiJyQ.js +1 -0
- package/dist/client/assets/{access-gate-BZ6Xc62y.js → access-gate-bBcsLTqZ.js} +1 -1
- package/dist/client/assets/agent-icon-BP-KwHaL.js +1 -0
- package/dist/client/assets/agents-list-CdYhPZzF.js +1 -0
- package/dist/client/assets/{ai-providers-PPaiM-vM.js → ai-providers-kyRwHzOP.js} +2 -2
- package/dist/client/assets/{alert-CIFaGTb_.js → alert-DbJERvKT.js} +1 -1
- package/dist/client/assets/{alert-dialog-Dh9zsaCy.js → alert-dialog-DBIqwB_a.js} +1 -1
- package/dist/client/assets/{api-keys-B5Q1NcTU.js → api-keys-sddYcqX2.js} +1 -1
- package/dist/client/assets/app-editor-BjcnCeTV.js +1 -0
- package/dist/client/assets/{auth-D8IdOmGw.js → auth-BOUgLxto.js} +1 -1
- package/dist/client/assets/{auth-catchall-PSQzhhPS.js → auth-catchall-sgn0jKBF.js} +1 -1
- package/dist/client/assets/{auth-entry-DZQ7ulSa.js → auth-entry-RdTo0a7D.js} +1 -1
- package/dist/client/assets/{auth-split-layout-D4SJJOXB.js → auth-split-layout-7ElArbEj.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-DY_hbkIG.js → authenticate-and-persist-oauth-CSyB4Ikq.js} +1 -1
- package/dist/client/assets/{automation-list-row-CLAw5ACh.js → automation-list-row-cIw0RidY.js} +1 -1
- package/dist/client/assets/automation-runs-CPjPp0l_.js +187 -0
- package/dist/client/assets/automations-1SGWSi41.js +1 -0
- package/dist/client/assets/{avatar-D-QkiqIH.js → avatar-D7Ryfmkc.js} +1 -1
- package/dist/client/assets/{badge-DX3_GQsO.js → badge-CsGum4AP.js} +1 -1
- package/dist/client/assets/{block-document-D0mVcltx.js → block-document-ByjA0CRJ.js} +2 -2
- package/dist/client/assets/{breadcrumb-Clut3vXk.js → breadcrumb-CiqxRnKX.js} +1 -1
- package/dist/client/assets/{buckets-CNyoBCui.js → buckets-BYW61MYG.js} +1 -1
- package/dist/client/assets/bulk-category-panel-zfJmlmNV.js +1 -0
- package/dist/client/assets/{capability-load-error-BtIV807c.js → capability-load-error-D11cq4uG.js} +1 -1
- package/dist/client/assets/cards-BRKQMkit.js +8 -0
- package/dist/client/assets/category-editor-B5ipi4cT.js +1 -0
- package/dist/client/assets/{chart-BS94Bf-2.js → chart-mM3m3BmD.js} +3 -3
- package/dist/client/assets/chat-context-CsfU9qgh.js +35 -0
- package/dist/client/assets/{checkbox-Gg7TSWGl.js → checkbox-BBeIXKls.js} +1 -1
- package/dist/client/assets/choose-editor--PLjxsb1.js +1 -0
- package/dist/client/assets/{cli-auth-success-DMKVkxdU.js → cli-auth-success-jaDX-5Q6.js} +1 -1
- package/dist/client/assets/collection-detail-D-bE8fG2.js +1 -0
- package/dist/client/assets/{collection-display-button-jLXxSVGC.js → collection-display-button-DESH5EcG.js} +1 -1
- package/dist/client/assets/{collection-search-0N-i_PHL.js → collection-search-C8enHCKD.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CMhDJ32A.js → collection-table-wrapper-pBDEa-p-.js} +1 -1
- package/dist/client/assets/{collection-tabs-PM6yowhG.js → collection-tabs-B3J2pC6N.js} +1 -1
- package/dist/client/assets/{command-JNsPUZwg.js → command-B7KZEeN_.js} +1 -1
- package/dist/client/assets/commerce-onboarding-CLKupNAF.js +1 -0
- package/dist/client/assets/{config-DFqhM__G.js → config-p1-EuejC.js} +1 -1
- package/dist/client/assets/{connect-CpvsClHG.js → connect-B8Ihml23.js} +1 -1
- package/dist/client/assets/{connection-CUtGFjSN.js → connection-B-9-J5nZ.js} +1 -1
- package/dist/client/assets/{connection-card-B1T5pd1c.js → connection-card-B8ZnCkrb.js} +1 -1
- package/dist/client/assets/connection-detail-d9M-DaxH.js +1 -0
- package/dist/client/assets/{connection-form-helpers-CYKg-GvJ.js → connection-form-helpers-LNr8FSPc.js} +1 -1
- package/dist/client/assets/connections-BUwlIKp2.js +1 -0
- package/dist/client/assets/{decopilot-sse-pool-BN-M5EUb.js → decopilot-sse-pool-DK-jWfRH.js} +1 -1
- package/dist/client/assets/{dialog-BI8UUwqv.js → dialog-Buvp0_k_.js} +1 -1
- package/dist/client/assets/{domain-settings-D4HjDgqu.js → domain-settings-BOmIEOBd.js} +1 -1
- package/dist/client/assets/{drawer-BR22I8_f.js → drawer-C-JEODnZ.js} +1 -1
- package/dist/client/assets/{dropdown-menu-wKA_-hY5.js → dropdown-menu-BVX76X1t.js} +1 -1
- package/dist/client/assets/editor-B9guvPGh.js +11 -0
- package/dist/client/assets/{empty-state-DAYLBxJ6.js → empty-state-BwGFcgil.js} +1 -1
- package/dist/client/assets/{extract-connection-data-6cVSTGuY.js → extract-connection-data-CFLT8Lmm.js} +1 -1
- package/dist/client/assets/file-explorer-CUB_T3Nt.js +2 -0
- package/dist/client/assets/{file-type-icon-QfVGs4d0.js → file-type-icon-CitxkbxC.js} +1 -1
- package/dist/client/assets/folder-icon-Bt1LxK-5.js +2 -0
- package/dist/client/assets/{form-DauSI86Q.js → form-BCSheD7J.js} +1 -1
- package/dist/client/assets/general-BLl23-1V.js +1 -0
- package/dist/client/assets/{github-repo-picker-sKX6qrmQ.js → github-repo-picker-CHA0-bBL.js} +1 -1
- package/dist/client/assets/{hooks-DQmp7LHz.js → hooks-DYDXfqwA.js} +6 -6
- package/dist/client/assets/{index-BYBf2qjQ.js → index-0Rjd7KPf.js} +1 -1
- package/dist/client/assets/{index-DKFNY2Yv.js → index-B1BNe5XL.js} +1 -1
- package/dist/client/assets/index-BFgc8ZC7.css +1 -0
- package/dist/client/assets/{index-B9iOsEIc.js → index-BuFIAUTC.js} +1 -1
- package/dist/client/assets/{index-Ci8azyOE.js → index-CLjikYNQ.js} +47 -47
- package/dist/client/assets/index-CWji8tuH.js +1 -0
- package/dist/client/assets/{index-BdFaTbMe.js → index-ClSDUMs2.js} +67 -70
- package/dist/client/assets/{index-De-kCEdQ.js → index-D14IhaK9.js} +1 -1
- package/dist/client/assets/{index-BMBPxk-z.js → index-DKEb9xSD.js} +2 -2
- package/dist/client/assets/{index-q2Rm7O_h.js → index-lT44vadh.js} +1 -1
- package/dist/client/assets/{index-redirect-DVfxG1gJ.js → index-redirect-eJAVqoLf.js} +1 -1
- package/dist/client/assets/{infra-billing-BEtRM-w8.js → infra-billing-DApRGD-J.js} +1 -1
- package/dist/client/assets/{input-Bwz-dTwg.js → input-CXueSbIK.js} +1 -1
- package/dist/client/assets/{integration-icon-CGnrGZxM.js → integration-icon-DkfgnaHN.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-D8XHQ0du.js → invite-member-dialog-CuuzMf-g.js} +1 -1
- package/dist/client/assets/{label-C1OhLpvf.js → label-C9eYac1w.js} +1 -1
- package/dist/client/assets/{layout-DdQ7AbmJ.js → layout-cji8Pllb.js} +1 -1
- package/dist/client/assets/location-oTTXFrSF.js +1 -0
- package/dist/client/assets/{login-CaBX2Zyr.js → login-RNqT3oif.js} +1 -1
- package/dist/client/assets/markdown-DG_ePPJc.js +94 -0
- package/dist/client/assets/{mcp-oauth-GWhqBwu1.js → mcp-oauth-CUGdQwnE.js} +1 -1
- package/dist/client/assets/{members-CoSugncV.js → members-Ba_EjXOC.js} +1 -1
- package/dist/client/assets/monaco-editor-XKAgBzqM.js +9 -0
- package/dist/client/assets/{monitoring-stats-row-BKiTJqu0.js → monitoring-stats-row-pykjqEQ2.js} +1 -1
- package/dist/client/assets/{multi-select-CIx6xi2O.js → multi-select-C9OJwO9c.js} +1 -1
- package/dist/client/assets/{oauth-callback-D_4qsGLU.js → oauth-callback-DhH8Sg8S.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-N2nxuW4H.js → oauth-callback-ai-provider-DxppKg9k.js} +1 -1
- package/dist/client/assets/{onboarding-c1-zuWRK.js → onboarding-C9-BVl7g.js} +1 -1
- package/dist/client/assets/{org-layout-D7r6nyax.js → org-layout-B4RTdykw.js} +1 -1
- package/dist/client/assets/{organization-choice-DZuaojdz.js → organization-choice-CRwp5frt.js} +1 -1
- package/dist/client/assets/{orgs-_zNVp-L6.js → orgs-JCxGyVBQ.js} +1 -1
- package/dist/client/assets/page-seo-form-DOQWcpe7.js +1 -0
- package/dist/client/assets/{popover-ClwD_xra.js → popover-D4C_xunP.js} +1 -1
- package/dist/client/assets/post-calendar-DDf4Ceb2.js +1 -0
- package/dist/client/assets/post-editor-MCeUKvjM.js +1 -0
- package/dist/client/assets/{primitives-BKjHT0m_.js → primitives-CYxDzduK.js} +1 -1
- package/dist/client/assets/{profile-fPJ06K0g.js → profile-ESYoh_Pt.js} +1 -1
- package/dist/client/assets/project-app-view-UB06HfoK.js +1 -0
- package/dist/client/assets/{prompts-BiA_3uUl.js → prompts-DEmFxhe4.js} +1 -1
- package/dist/client/assets/record-editor-mQCoWyZ1.js +1 -0
- package/dist/client/assets/redirect-editor-B9JlbMNp.js +1 -0
- package/dist/client/assets/registry-UjixfO8V.js +2 -0
- package/dist/client/assets/{registry-layout-C3aeIwiX.js → registry-layout-4Bi7LgQ7.js} +1 -1
- package/dist/client/assets/{reports-ZfNOoqaN.js → reports-DQJz2Cmv.js} +2 -2
- package/dist/client/assets/{require-capability-cxyKBT59.js → require-capability-Dm1c7mRJ.js} +1 -1
- package/dist/client/assets/{required-auth-layout-CUQaC9Hr.js → required-auth-layout-DCDe2_xo.js} +1 -1
- package/dist/client/assets/{reset-password-ipLYYDOf.js → reset-password-B2nhNnea.js} +1 -1
- package/dist/client/assets/review-settings-tNoU0ubl.js +1 -0
- package/dist/client/assets/roles-C-0laFT-.js +1 -0
- package/dist/client/assets/{scroll-area-RteS0-Yk.js → scroll-area-iNmkNxQd.js} +1 -1
- package/dist/client/assets/{search-input-CevwWux3.js → search-input-C_hPwWlY.js} +1 -1
- package/dist/client/assets/{secrets-ojCsqN5b.js → secrets-DMBg4CtB.js} +1 -1
- package/dist/client/assets/sections-editor-DmGy1kfY.js +2 -0
- package/dist/client/assets/{select-C7Q2VGxk.js → select-CXWGcLoH.js} +1 -1
- package/dist/client/assets/{select-model-C03zAz7l.js → select-model-LFUkuM-R.js} +2 -2
- package/dist/client/assets/{self-tool-result-BSLlHbcp.js → self-tool-result-BQSdlPPl.js} +1 -1
- package/dist/client/assets/seo-editor-zsyKoChQ.js +1 -0
- package/dist/client/assets/settings-layout-0Mx4abSG.js +1 -0
- package/dist/client/assets/{shell-controls-BMTxwot2.js → shell-controls-CAqHiAbw.js} +1 -1
- package/dist/client/assets/shell-layout-CCJOKrlB.js +1 -0
- package/dist/client/assets/skill-preview-Bpjo0e0e.js +4 -0
- package/dist/client/assets/skills-D66l5Pe4.js +1 -0
- package/dist/client/assets/{spinner-B9x-ViPH.js → spinner-Kj9-kHS5.js} +1 -1
- package/dist/client/assets/{sso-9kD1uEp6.js → sso-BbnjdAVr.js} +1 -1
- package/dist/client/assets/{store-DVSsps0V.js → store-CDW3xgvS.js} +1 -1
- package/dist/client/assets/store-registry-Bw5brwRA.js +2 -0
- package/dist/client/assets/super-agent-icon-Cv5HTwbP.js +1 -0
- package/dist/client/assets/{switch-BuJnEOUw.js → switch-DKegBAiv.js} +1 -1
- package/dist/client/assets/synced-repos-BOkpnLeH.js +1 -0
- package/dist/client/assets/{table-oIbRw7Yk.js → table-Dvpenn5X.js} +1 -1
- package/dist/client/assets/{tabs-CFhQLpsD.js → tabs-0Nbaxawf.js} +1 -1
- package/dist/client/assets/{task-board-Cz-fiaKF.js → task-board-D-kil0OD.js} +1 -1
- package/dist/client/assets/tasks-D-Fe8Ppq.js +1 -0
- package/dist/client/assets/{textarea-CMpN0SgX.js → textarea-BJ4TussH.js} +1 -1
- package/dist/client/assets/thread-route-Cmmo50Fe.js +1 -0
- package/dist/client/assets/{toggle-group-ClOqwWDq.js → toggle-group-C0VATZeX.js} +1 -1
- package/dist/client/assets/{toolbar-KH-9Bre4.js → toolbar-Bmv5cu6y.js} +1 -1
- package/dist/client/assets/{track-DXtvDI_s.js → track-BsrCovp4.js} +1 -1
- package/dist/client/assets/{types-BGVeElFe.js → types-Bkfd8ghD.js} +1 -1
- package/dist/client/assets/{use-ai-providers-DlWIkMD-.js → use-ai-providers-CG6Y0TAQ.js} +1 -1
- package/dist/client/assets/{use-api-keys-D0NAsvsx.js → use-api-keys-oFV-6tmf.js} +1 -1
- package/dist/client/assets/{use-automations-CWqvHqj2.js → use-automations-BXcJPDIk.js} +1 -1
- package/dist/client/assets/{use-autosave-D1zPEM1D.js → use-autosave-DvxG9h7A.js} +1 -1
- package/dist/client/assets/{use-connection-gqhqm1hO.js → use-connection--DbsGpk_.js} +1 -1
- package/dist/client/assets/{use-copy-BY1mlr6R.js → use-copy-t26hWaR6.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-Dzmlrw8C.js → use-create-virtual-mcp-DfyGVwvi.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-j0VBccs2.js → use-debounced-autosave-DCqMSIfY.js} +1 -1
- package/dist/client/assets/{use-debounced-value-BENALn-i.js → use-debounced-value-0mjAJnh9.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CqU7DunK.js → use-decopilot-events-DXEJ77Cw.js} +1 -1
- package/dist/client/assets/{use-delete-connection-BwHeDNps.js → use-delete-connection-P1--1uTD.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-CQiRFTsL.js → use-deployment-admin-PyTOxvE6.js} +1 -1
- package/dist/client/assets/{use-destination-route-d8wgPDBu.js → use-destination-route-LJ6L5J-Z.js} +1 -1
- package/dist/client/assets/{use-file-configs-BAUKJMmN.js → use-file-configs-CZ6Q9RHz.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-Cw7R-QWe.js → use-infinite-scroll-D-RuGEMN.js} +1 -1
- package/dist/client/assets/{use-join-requests-CBEK68HB.js → use-join-requests-u4NwwBfY.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-7KFU7IPU.js → use-mcp-auth-status-CpemSejR.js} +1 -1
- package/dist/client/assets/{use-mcp-client-DP2onozC.js → use-mcp-client-CBP30lcT.js} +2 -2
- package/dist/client/assets/{use-mcp-tools-B7yHzu9T.js → use-mcp-tools-CZZL007X.js} +1 -1
- package/dist/client/assets/{use-members-IwrDPxqz.js → use-members-DLt1FY-q.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-mrg2_DxJ.js → use-navigate-to-agent-DAh2yiE0.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-HXTuHVWD.js → use-org-auth-client-Eaq6KsK_.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-rlkQHsUF.js → use-org-repo-syncs-s-v1_DV-.js} +1 -1
- package/dist/client/assets/{use-org-sso-C-uWWD5m.js → use-org-sso-5zd-6Usk.js} +1 -1
- package/dist/client/assets/{use-organization-roles-CQ2UVvkm.js → use-organization-roles-D7AZGrVn.js} +1 -1
- package/dist/client/assets/{use-organization-settings-BAFLKQ3y.js → use-organization-settings-C3jHLzD-.js} +1 -1
- package/dist/client/assets/use-panel-navigate-DHlMMTZi.js +1 -0
- package/dist/client/assets/{use-registry-connections-DghvIzKh.js → use-registry-connections-DHIJ1ozU.js} +1 -1
- package/dist/client/assets/{use-secrets-CvibJ_Hx.js → use-secrets-DTjUUpxa.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-DTnA68XU.js → use-section-preview-base-3f3eeApB.js} +1 -1
- package/dist/client/assets/{use-status-sounds-kx6TUHpf.js → use-status-sounds-C940bfEw.js} +1 -1
- package/dist/client/assets/{use-tags-CGJ43yMs.js → use-tags-XQU8F1xp.js} +1 -1
- package/dist/client/assets/{use-view-mode-Bn3--gRi.js → use-view-mode-B-FpXA1j.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-Dj0wXB98.js → use-virtual-mcp-Jrf_I5O6.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-C3i2ddec.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-CsRImOmD.js +1 -0
- package/dist/client/assets/{users-B_7Qs-RF.js → users-BI5lRiyl.js} +1 -1
- package/dist/client/assets/variant-calendar-90WnwndK.js +1 -0
- package/dist/client/assets/{view-mode-toggle-CcmqoSVC.js → view-mode-toggle-DdfOH72I.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/Tool01-va49aYq9.js +0 -1
- package/dist/client/assets/UserSquare-CwU4sG2o.js +0 -1
- package/dist/client/assets/agent-icon-DCM1Bdl8.js +0 -1
- package/dist/client/assets/agents-list-BblEB_Yy.js +0 -1
- package/dist/client/assets/app-editor-I_aUhOen.js +0 -1
- package/dist/client/assets/automation-runs-GCI7uxIE.js +0 -280
- package/dist/client/assets/automations-BQ1HpMVH.js +0 -1
- package/dist/client/assets/bulk-category-panel-CsF_6FI0.js +0 -1
- package/dist/client/assets/cards-4fPEe6ST.js +0 -9
- package/dist/client/assets/category-editor-D5nV2a1F.js +0 -1
- package/dist/client/assets/chat-context-CmwZXAhQ.js +0 -35
- package/dist/client/assets/choose-editor-2zkSgPsA.js +0 -1
- package/dist/client/assets/collection-detail-DHWV_lB6.js +0 -1
- package/dist/client/assets/commerce-onboarding-BAlSxXoB.js +0 -1
- package/dist/client/assets/connection-detail-DZEeMz2b.js +0 -1
- package/dist/client/assets/connections-Cd3u8u7a.js +0 -1
- package/dist/client/assets/file-explorer-hutSgELN.js +0 -2
- package/dist/client/assets/general-BmUVO2yQ.js +0 -1
- package/dist/client/assets/index-D3IpXIE1.js +0 -1
- package/dist/client/assets/index-DJSuP9VA.css +0 -1
- package/dist/client/assets/monaco-editor-CQbDSum8.js +0 -19
- package/dist/client/assets/page-seo-form-kQ_gqmTd.js +0 -1
- package/dist/client/assets/post-calendar-DJZelBC2.js +0 -1
- package/dist/client/assets/post-editor-C5Ee-UkR.js +0 -1
- package/dist/client/assets/project-app-view-DZuDq3zQ.js +0 -1
- package/dist/client/assets/record-editor-DGXTnpF6.js +0 -1
- package/dist/client/assets/redirect-editor-V6SQ4gS6.js +0 -1
- package/dist/client/assets/registry-BYqWHQgR.js +0 -2
- package/dist/client/assets/review-settings-kV6Wbxhl.js +0 -1
- package/dist/client/assets/roles-Dcj4t-Mv.js +0 -1
- package/dist/client/assets/sections-editor-VI00Nblu.js +0 -2
- package/dist/client/assets/seo-editor-CObQJqAB.js +0 -1
- package/dist/client/assets/settings-layout-Bbbz4btQ.js +0 -1
- package/dist/client/assets/shell-layout-i3nUAnDL.js +0 -1
- package/dist/client/assets/store-registry-BiGqjfDg.js +0 -2
- package/dist/client/assets/super-agent-icon-DbGhAnlL.js +0 -1
- package/dist/client/assets/synced-repos-XSy5K1eb.js +0 -1
- package/dist/client/assets/tasks-D-zkYbxa.js +0 -1
- package/dist/client/assets/use-panel-navigate-BsVeEWlx.js +0 -1
- package/dist/client/assets/useInfiniteQuery-DjjzlWAZ.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-Ci5SesMe.js +0 -1
- package/dist/client/assets/variant-calendar-BdYlnVxu.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as B,j as o,b as $,H as D,d as M,r as q,P as d,B as H,q as R}from"./index-Ci8azyOE.js";import{s as V}from"./Plus-CPkR-QLd.js";import{i as S}from"./Zap-MbQ2aiA8.js";import{S as F}from"./search-input-CevwWux3.js";import{E as T}from"./empty-state-DAYLBxJ6.js";import{c as G}from"./use-automations-CWqvHqj2.js";import{c as J}from"./use-navigate-to-agent-mrg2_DxJ.js";import{A as K}from"./automation-list-row-CLAw5ACh.js";import{h as O}from"./constants-dLUUoWH7.js";import{u as Q}from"./use-virtual-mcp-Dj0wXB98.js";import{R as U}from"./require-capability-cxyKBT59.js";import"./SearchMd-ClTH3fiN.js";import"./use-mcp-client-DP2onozC.js";import"./auth-D8IdOmGw.js";import"./use-destination-route-d8wgPDBu.js";import"./hooks-DQmp7LHz.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-BN-M5EUb.js";import"./task-board-Cz-fiaKF.js";import"./session-runtime-C-KTDVeQ.js";import"./slugify-CEUa2lfQ.js";import"./alert-dialog-Dh9zsaCy.js";import"./dropdown-menu-wKA_-hY5.js";import"./Check-D5PKBQ5I.js";import"./ChevronRight-DUmHQrD7.js";import"./DotsVertical-CpVcGDJ_.js";import"./Stars02-DZNA1z2-.js";import"./Trash01-Dp-QTpAR.js";import"./agent-icon-DCM1Bdl8.js";import"./AlertCircle-BTlJp8pf.js";import"./UserSquare-CwU4sG2o.js";import"./Tool01-va49aYq9.js";import"./ArrowUp-CVoISkQ4.js";import"./ArrowLeft-BwagOJkb.js";import"./Tool02-jKKU1_dM.js";import"./XCircle-CVbKXkpd.js";import"./TrendUp01-DikSDrNg.js";import"./ZapSquare-BZzRAQpm.js";import"./Users03-BUoBV4mB.js";import"./CheckCircle-teyxVGFp.js";import"./ChevronDown-Csfjhwpm.js";import"./ChevronSelectorVertical-CuAhXy3x.js";import"./ChevronUp-Dlj_U0qV.js";import"./Copy01-CsNpp9jr.js";import"./CreditCard01-YCHpZ00A.js";import"./Download01-BN9BT9cL.js";import"./Settings02-BMcJFHpd.js";import"./Eye-DgiSa7UT.js";import"./FilterLines-Db8-uWfr.js";import"./Share07-CPDrxQV8.js";import"./Globe01-CV-16mwB.js";import"./Globe04-D3O2XfOT.js";import"./SwitchHorizontal01-CSyGO1HX.js";import"./HardDrive-CWvDYc59.js";import"./Key01-D4srNqPO.js";import"./LinkExternal01-CIL2SNWf.js";import"./LockUnlocked01-BpeKJGM4.js";import"./LogOut01-qWWgaWbQ.js";import"./Monitor01-uq-dlf-u.js";import"./Sun-BBWjOwQE.js";import"./Palette-Cv68Zggp.js";import"./Play-C9xK8clC.js";import"./SearchLg-8daQliv2.js";import"./Shield01-C9M_jcOJ.js";import"./Stars01-BzEDQnsl.js";import"./Upload01-DxCHPffq.js";import"./User01-DJ_BO2EX.js";import"./Users01-B2wc_Wgl.js";import"./XClose-CTv0nnSb.js";import"./access-gate-BZ6Xc62y.js";import"./capability-load-error-BtIV807c.js";function W(){const t=B.c(20),e=$(),{org:l}=D(),{data:C}=G(void 0),g=C===void 0?[]:C,k=Q(),P=J(),f=M(),[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(l.id);R("automations_list_row_clicked",{automation_id:i,agent_id:N,source:"settings_automations"}),P(N,{panel:`automation:${i}`})};let c;t[0]!==f||t[1]!==l.slug?(c=()=>{R("automations_empty_state_browse_agents_clicked"),f({to:"/$org/settings/agents",params:{org:l.slug}})},t[0]=f,t[1]=l.slug,t[2]=c):c=t[2];const L=c,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(F,{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(H,{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 xo(){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{xo as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as pe,n as fe,j as t,b as ye,r as ue,k as Ne,av as ke,a8 as Ce,B as me,a9 as ve,ab as Pe}from"./index-Ci8azyOE.js";import{x as be}from"./agent-icon-DCM1Bdl8.js";import{L as de}from"./label-C1OhLpvf.js";import{I as Se,R as _e,a as we}from"./index-B9iOsEIc.js";import{a as Re}from"./DotsVertical-CpVcGDJ_.js";import{S as Te,a as ze,b as Be,c as $e,d as Ie}from"./select-C7Q2VGxk.js";import"./AlertCircle-BTlJp8pf.js";import"./UserSquare-CwU4sG2o.js";import"./Tool01-va49aYq9.js";import"./ArrowUp-CVoISkQ4.js";import"./ArrowLeft-BwagOJkb.js";import"./Tool02-jKKU1_dM.js";import"./XCircle-CVbKXkpd.js";import"./TrendUp01-DikSDrNg.js";import"./ZapSquare-BZzRAQpm.js";import"./Users03-BUoBV4mB.js";import"./CheckCircle-teyxVGFp.js";import"./Check-D5PKBQ5I.js";import"./ChevronDown-Csfjhwpm.js";import"./ChevronRight-DUmHQrD7.js";import"./ChevronSelectorVertical-CuAhXy3x.js";import"./ChevronUp-Dlj_U0qV.js";import"./Stars02-DZNA1z2-.js";import"./Copy01-CsNpp9jr.js";import"./CreditCard01-YCHpZ00A.js";import"./Download01-BN9BT9cL.js";import"./Settings02-BMcJFHpd.js";import"./Eye-DgiSa7UT.js";import"./FilterLines-Db8-uWfr.js";import"./Share07-CPDrxQV8.js";import"./Globe01-CV-16mwB.js";import"./Globe04-D3O2XfOT.js";import"./SwitchHorizontal01-CSyGO1HX.js";import"./HardDrive-CWvDYc59.js";import"./Key01-D4srNqPO.js";import"./LinkExternal01-CIL2SNWf.js";import"./LockUnlocked01-BpeKJGM4.js";import"./LogOut01-qWWgaWbQ.js";import"./Monitor01-uq-dlf-u.js";import"./Sun-BBWjOwQE.js";import"./Palette-Cv68Zggp.js";import"./Play-C9xK8clC.js";import"./Plus-CPkR-QLd.js";import"./SearchLg-8daQliv2.js";import"./SearchMd-ClTH3fiN.js";import"./Shield01-C9M_jcOJ.js";import"./Stars01-BzEDQnsl.js";import"./Trash01-Dp-QTpAR.js";import"./Upload01-DxCHPffq.js";import"./User01-DJ_BO2EX.js";import"./Users01-B2wc_Wgl.js";import"./XClose-CTv0nnSb.js";import"./Zap-MbQ2aiA8.js";function Ee(i){const e=pe.c(8);let o,l;e[0]!==i?({className:o,...l}=i,e[0]=i,e[1]=o,e[2]=l):(o=e[1],l=e[2]);let r;e[3]!==o?(r=fe("grid gap-3",o),e[3]=o,e[4]=r):r=e[4];let a;return e[5]!==l||e[6]!==r?(a=t.jsx(_e,{"data-slot":"radio-group",className:r,...l}),e[5]=l,e[6]=r,e[7]=a):a=e[7],a}function xe(i){const e=pe.c(9);let o,l;e[0]!==i?({className:o,...l}=i,e[0]=i,e[1]=o,e[2]=l):(o=e[1],l=e[2]);let r;e[3]!==o?(r=fe("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[2px] disabled:opacity-50",o),e[3]=o,e[4]=r):r=e[4];let a;e[5]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(we,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:t.jsx(Re,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})}),e[5]=a):a=e[5];let c;return e[6]!==l||e[7]!==r?(c=t.jsx(Se,{"data-slot":"radio-group-item",className:r,...l,children:a}),e[6]=l,e[7]=r,e[8]=c):c=e[8],c}function At(i){const e=pe.c(121),{posts:o,categories:l,initialSlug:r,isPending:a,onApply:c,onClose:p}=i,s=ye(),[m,ge]=ue.useState(r&&l.some(d=>d.slug===r)?r:l[0]?.slug??""),[u,he]=ue.useState("add");let ee;if(e[0]!==l||e[1]!==m){let d;e[3]!==m?(d=je=>je.slug===m,e[3]=m,e[4]=d):d=e[4],ee=l.find(d),e[0]=l,e[1]=m,e[2]=ee}else ee=e[2];const x=ee,n=o.length,re=String(n);let f;e[5]!==s||e[6]!==re?(f=s("sandbox.bulkCategoryPanel.selectedCount",{count:re}),e[5]=s,e[6]=re,e[7]=f):f=e[7];let b;e[8]!==f?(b=t.jsx("span",{className:"truncate text-sm font-medium",children:f}),e[8]=f,e[9]=b):b=e[9];let g;e[10]!==s?(g=s("sandbox.bulkCategoryPanel.exitSelection"),e[10]=s,e[11]=g):g=e[11];let te;e[12]===Symbol.for("react.memo_cache_sentinel")?(te=t.jsx(ke,{size:14}),e[12]=te):te=e[12];let h;e[13]!==a||e[14]!==p||e[15]!==g?(h=t.jsx(Ce,{asChild:!0,children:t.jsx(me,{type:"button",variant:"ghost",size:"icon",disabled:a,onClick:p,"aria-label":g,children:te})}),e[13]=a,e[14]=p,e[15]=g,e[16]=h):h=e[16];let j;e[17]!==s?(j=s("sandbox.bulkCategoryPanel.exitSelection"),e[17]=s,e[18]=j):j=e[18];let y;e[19]!==j?(y=t.jsx(ve,{side:"bottom",children:j}),e[19]=j,e[20]=y):y=e[20];let N;e[21]!==h||e[22]!==y?(N=t.jsxs(Pe,{children:[h,y]}),e[21]=h,e[22]=y,e[23]=N):N=e[23];let k;e[24]!==N||e[25]!==b?(k=t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[b,N]}),e[24]=N,e[25]=b,e[26]=k):k=e[26];let C;e[27]!==s?(C=s("sandbox.bulkCategoryPanel.title"),e[27]=s,e[28]=C):C=e[28];let v;e[29]!==C?(v=t.jsx("h2",{className:"text-2xl font-bold text-foreground",children:C}),e[29]=C,e[30]=v):v=e[30];let P;e[31]!==n||e[32]!==s?(P=n===0?s("sandbox.bulkCategoryPanel.descriptionEmpty"):s("sandbox.bulkCategoryPanel.descriptionWithCount",{count:String(n)}),e[31]=n,e[32]=s,e[33]=P):P=e[33];let S;e[34]!==P?(S=t.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:P}),e[34]=P,e[35]=S):S=e[35];let _;e[36]!==s?(_=s("sandbox.bulkCategoryPanel.categoryLabel"),e[36]=s,e[37]=_):_=e[37];let w;e[38]!==_?(w=t.jsx(de,{children:_}),e[38]=_,e[39]=w):w=e[39];let R;e[40]!==l||e[41]!==m||e[42]!==s?(R=l.length===0?t.jsx("p",{className:"text-sm text-muted-foreground",children:s("sandbox.bulkCategoryPanel.noCategoriesMessage")}):t.jsxs(Te,{value:m,onValueChange:ge,children:[t.jsx(ze,{className:"w-full",children:t.jsx(Be,{placeholder:s("sandbox.bulkCategoryPanel.selectCategoryPlaceholder")})}),t.jsx($e,{children:l.map(Ae)})]}),e[40]=l,e[41]=m,e[42]=s,e[43]=R):R=e[43];let T;e[44]!==w||e[45]!==R?(T=t.jsxs("div",{className:"space-y-2",children:[w,R]}),e[44]=w,e[45]=R,e[46]=T):T=e[46];let se;e[47]===Symbol.for("react.memo_cache_sentinel")?(se=d=>he(d),e[47]=se):se=e[47];let le;e[48]===Symbol.for("react.memo_cache_sentinel")?(le=t.jsx(xe,{value:"add",id:"cat-mode-add",className:"mt-0.5"}),e[48]=le):le=e[48];let z;e[49]!==s?(z=s("sandbox.bulkCategoryPanel.modeAddTitle"),e[49]=s,e[50]=z):z=e[50];let B;e[51]!==z?(B=t.jsx("span",{className:"block text-sm font-medium",children:z}),e[51]=z,e[52]=B):B=e[52];let $;e[53]!==s?($=s("sandbox.bulkCategoryPanel.modeAddDescription"),e[53]=s,e[54]=$):$=e[54];let I;e[55]!==$?(I=t.jsx("span",{className:"block text-xs text-muted-foreground",children:$}),e[55]=$,e[56]=I):I=e[56];let E;e[57]!==B||e[58]!==I?(E=t.jsxs(de,{htmlFor:"cat-mode-add",className:"flex cursor-pointer items-start gap-2.5 rounded-lg border p-3",children:[le,t.jsxs("span",{className:"space-y-0.5",children:[B,I]})]}),e[57]=B,e[58]=I,e[59]=E):E=e[59];let ae;e[60]===Symbol.for("react.memo_cache_sentinel")?(ae=t.jsx(xe,{value:"replace",id:"cat-mode-replace",className:"mt-0.5"}),e[60]=ae):ae=e[60];let L;e[61]!==s?(L=s("sandbox.bulkCategoryPanel.modeReplaceTitle"),e[61]=s,e[62]=L):L=e[62];let A;e[63]!==L?(A=t.jsx("span",{className:"block text-sm font-medium",children:L}),e[63]=L,e[64]=A):A=e[64];let F;e[65]!==s?(F=s("sandbox.bulkCategoryPanel.modeReplaceDescription"),e[65]=s,e[66]=F):F=e[66];let M;e[67]!==F?(M=t.jsx("span",{className:"block text-xs text-muted-foreground",children:F}),e[67]=F,e[68]=M):M=e[68];let V;e[69]!==A||e[70]!==M?(V=t.jsxs(de,{htmlFor:"cat-mode-replace",className:"flex cursor-pointer items-start gap-2.5 rounded-lg border p-3",children:[ae,t.jsxs("span",{className:"space-y-0.5",children:[A,M]})]}),e[69]=A,e[70]=M,e[71]=V):V=e[71];let D;e[72]!==u||e[73]!==E||e[74]!==V?(D=t.jsxs(Ee,{value:u,onValueChange:se,className:"gap-2",children:[E,V]}),e[72]=u,e[73]=E,e[74]=V,e[75]=D):D=e[75];let G;e[76]!==s?(G=s("sandbox.bulkCategoryPanel.cancelButton"),e[76]=s,e[77]=G):G=e[77];let q;e[78]!==a||e[79]!==p||e[80]!==G?(q=t.jsx(me,{type:"button",variant:"outline",onClick:p,disabled:a,children:G}),e[78]=a,e[79]=p,e[80]=G,e[81]=q):q=e[81];const ne=!x||a||n===0;let W;e[82]!==u||e[83]!==c||e[84]!==x?(W=()=>x&&c(u,{name:x.name,slug:x.slug}),e[82]=u,e[83]=c,e[84]=x,e[85]=W):W=e[85];let H;e[86]!==a||e[87]!==s?(H=a?t.jsxs(t.Fragment,{children:[t.jsx(Ne,{size:14,className:"animate-spin"}),s("sandbox.bulkCategoryPanel.updatingButton")]}):s("sandbox.bulkCategoryPanel.applyButton"),e[86]=a,e[87]=s,e[88]=H):H=e[88];let J;e[89]!==ne||e[90]!==W||e[91]!==H?(J=t.jsx(me,{type:"button",disabled:ne,onClick:W,children:H}),e[89]=ne,e[90]=W,e[91]=H,e[92]=J):J=e[92];let K;e[93]!==q||e[94]!==J?(K=t.jsxs("div",{className:"flex justify-end gap-2",children:[q,J]}),e[93]=q,e[94]=J,e[95]=K):K=e[95];let O;e[96]!==T||e[97]!==D||e[98]!==K?(O=t.jsxs("div",{className:"mt-6 space-y-4",children:[T,D,K]}),e[96]=T,e[97]=D,e[98]=K,e[99]=O):O=e[99];let ie;e[100]===Symbol.for("react.memo_cache_sentinel")?(ie=t.jsx(be,{size:16,className:"shrink-0 text-muted-foreground"}),e[100]=ie):ie=e[100];const ce=String(n);let Q;e[101]!==s||e[102]!==ce?(Q=s("sandbox.bulkCategoryPanel.selectedPostsLabel",{count:ce}),e[101]=s,e[102]=ce,e[103]=Q):Q=e[103];let U;e[104]!==Q?(U=t.jsxs("div",{className:"flex items-center gap-2 px-4 py-3",children:[ie,t.jsx("span",{className:"text-sm",children:Q})]}),e[104]=Q,e[105]=U):U=e[105];let X;e[106]!==n||e[107]!==o||e[108]!==s?(X=n===0?t.jsx("p",{className:"border-t bg-background px-4 py-3 text-sm text-muted-foreground",children:s("sandbox.bulkCategoryPanel.noPostsSelectedMessage")}):t.jsx("ul",{className:"divide-y border-t bg-background",children:o.map(Le)}),e[106]=n,e[107]=o,e[108]=s,e[109]=X):X=e[109];let Y;e[110]!==U||e[111]!==X?(Y=t.jsxs("div",{className:"mt-8 overflow-hidden rounded-lg border bg-muted/30",children:[U,X]}),e[110]=U,e[111]=X,e[112]=Y):Y=e[112];let Z;e[113]!==v||e[114]!==S||e[115]!==O||e[116]!==Y?(Z=t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-2xl px-8 py-8",children:[v,S,O,Y]})}),e[113]=v,e[114]=S,e[115]=O,e[116]=Y,e[117]=Z):Z=e[117];let oe;return e[118]!==k||e[119]!==Z?(oe=t.jsxs("div",{className:"flex h-full flex-col",children:[k,Z]}),e[118]=k,e[119]=Z,e[120]=oe):oe=e[120],oe}function Le(i){return t.jsxs("li",{className:"flex items-center gap-2.5 px-4 py-2.5",children:[t.jsx(be,{size:14,className:"shrink-0 text-muted-foreground"}),t.jsxs("span",{className:"min-w-0 flex-1",children:[t.jsx("span",{className:"block truncate text-sm",children:i.title}),i.slug&&t.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:i.slug})]})]},i.key)}function Ae(i){return t.jsx(Ie,{value:i.slug,children:t.jsx("span",{className:"truncate",children:i.name})},i.slug)}export{At as BulkCategoryPanel};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{c as S,H as N,K as T,o as E,p as V,e as M,r as q,j as f,b as U,n as R,B as G}from"./index-Ci8azyOE.js";import{i as Y}from"./DotsVertical-CpVcGDJ_.js";import{n as ie}from"./Download01-BN9BT9cL.js";import{i as le,a as ae}from"./Share07-CPDrxQV8.js";import{i as oe}from"./Globe01-CV-16mwB.js";import{i as ce}from"./Key01-D4srNqPO.js";import{a as fe}from"./Palette-Cv68Zggp.js";import{s as J}from"./Trash01-Dp-QTpAR.js";import{i as de}from"./Zap-MbQ2aiA8.js";import{a as L,D as Z,b as ee,c as te}from"./dropdown-menu-wKA_-hY5.js";import{d as se,F as z}from"./file-type-icon-QfVGs4d0.js";import{s as ue}from"./Eye-DgiSa7UT.js";function gt(s){return s.contentHash??`${s.size}-${s.updatedAt}`}function v(s,e,t,n){const r=new URLSearchParams(n).toString();return`/api/${encodeURIComponent(s)}/fs/${encodeURIComponent(e)}/${t}${r?`?${r}`:""}`}async function _(s,e,t){const n=await fetch(s,e);if(n.ok||t?.allow404&&n.status===404)return n;let r="";try{r=(await n.json()).error??""}catch{}throw new Error(r||`HTTP ${n.status}`)}function xt(s,e){const t=S.c(15),{org:n}=N();let r;t[0]!==n.id||t[1]!==e||t[2]!==s?(r=T.orgFsList(n.id,s,e),t[0]=n.id,t[1]=e,t[2]=s,t[3]=r):r=t[3];let i;t[4]!==n.id||t[5]!==s?(i=(o,c)=>c?.queryKey[1]===n.id&&c.queryKey[2]===s?o:void 0,t[4]=n.id,t[5]=s,t[6]=i):i=t[6];let l;t[7]!==n.slug||t[8]!==e||t[9]!==s?(l=async()=>(await(await _(v(n.slug,s,"list",{path:e}))).json()).entries.toSorted(me),t[7]=n.slug,t[8]=e,t[9]=s,t[10]=l):l=t[10];let a;return t[11]!==r||t[12]!==i||t[13]!==l?(a={queryKey:r,placeholderData:i,queryFn:l},t[11]=r,t[12]=i,t[13]=l,t[14]=a):a=t[14],E(a)}function me(s,e){return s.kind!==e.kind?s.kind==="dir"?-1:1:s.path.localeCompare(e.path)}function yt(s,e,t){const n=S.c(15),{org:r}=N();let i;n[0]!==r.id||n[1]!==e||n[2]!==s?(i=T.orgFsStat(r.id,s??"",e),n[0]=r.id,n[1]=e,n[2]=s,n[3]=i):i=n[3];const l=s!==null;let a;n[4]!==t?(a=t?.refetchIntervalWhenAbsent?u=>u.state.data?!1:t.refetchIntervalWhenAbsent??!1:void 0,n[4]=t,n[5]=a):a=n[5];let o;n[6]!==r.slug||n[7]!==e||n[8]!==s?(o=async()=>{const u=await _(v(r.slug,s??"","stat",{path:e}),void 0,{allow404:!0});return u.status===404?null:(await u.json()).entry},n[6]=r.slug,n[7]=e,n[8]=s,n[9]=o):o=n[9];let c;return n[10]!==i||n[11]!==l||n[12]!==a||n[13]!==o?(c={queryKey:i,enabled:l,refetchInterval:a,queryFn:o},n[10]=i,n[11]=l,n[12]=a,n[13]=o,n[14]=c):c=n[14],E(c)}function pt(s){const e=S.c(9),{org:t}=N();let n;e[0]!==t.id||e[1]!==s?(n=T.orgFsUsage(t.id,s),e[0]=t.id,e[1]=s,e[2]=n):n=e[2];let r;e[3]!==t.slug||e[4]!==s?(r=async()=>await(await _(v(t.slug,s,"usage"))).json(),e[3]=t.slug,e[4]=s,e[5]=r):r=e[5];let i;return e[6]!==n||e[7]!==r?(i={queryKey:n,queryFn:r},e[6]=n,e[7]=r,e[8]=i):i=e[8],E(i)}function bt(s,e){const t=S.c(9),n=s===void 0?60:s,{org:r}=N();let i;t[0]!==r.id?(i=T.orgFsRecent(r.id),t[0]=r.id,t[1]=i):i=t[1];const l=e?.enabled;let a;t[2]!==n||t[3]!==r.slug?(a=async()=>(await(await _(`/api/${encodeURIComponent(r.slug)}/fs/recent?limit=${n}`)).json()).entries,t[2]=n,t[3]=r.slug,t[4]=a):a=t[4];let o;return t[5]!==i||t[6]!==l||t[7]!==a?(o={queryKey:i,enabled:l,queryFn:a},t[5]=i,t[6]=l,t[7]=a,t[8]=o):o=t[8],E(o)}const he=50;function wt(s,e){const t=S.c(16),{org:n}=N();let r;t[0]!==n.id||t[1]!==s||t[2]!==e?.prefix||t[3]!==e?.volume?(r=T.orgFsSearch(n.id,s,e?.volume??"",e?.prefix??""),t[0]=n.id,t[1]=s,t[2]=e?.prefix,t[3]=e?.volume,t[4]=r):r=t[4];const i=s.length>0;let l;t[5]!==n.id?(l=(c,u)=>u?.queryKey[1]===n.id?c:void 0,t[5]=n.id,t[6]=l):l=t[6];let a;t[7]!==n.slug||t[8]!==s||t[9]!==e?(a=async()=>{const c=new URLSearchParams({q:s,limit:String(he)});return e&&(c.set("volume",e.volume),e.prefix&&c.set("prefix",e.prefix)),(await(await _(`/api/${encodeURIComponent(n.slug)}/fs/search?${c}`)).json()).entries},t[7]=n.slug,t[8]=s,t[9]=e,t[10]=a):a=t[10];let o;return t[11]!==r||t[12]!==i||t[13]!==l||t[14]!==a?(o={queryKey:r,enabled:i,placeholderData:l,queryFn:a},t[11]=r,t[12]=i,t[13]=l,t[14]=a,t[15]=o):o=t[15],E(o)}function jt(s){const e=S.c(8),{org:t}=N();let n;e[0]!==t.id?(n=T.orgFsSkills(t.id),e[0]=t.id,e[1]=n):n=e[1];const r=s?.enabled;let i;e[2]!==t.slug?(i=async()=>{const a=await _(`/api/${encodeURIComponent(t.slug)}/fs/skills`),{skills:o}=await a.json();return o.map(ge)},e[2]=t.slug,e[3]=i):i=e[3];let l;return e[4]!==n||e[5]!==r||e[6]!==i?(l={queryKey:n,enabled:r,queryFn:i},e[4]=n,e[5]=r,e[6]=i,e[7]=l):l=e[7],E(l)}function ge(s){return{volume:s.volume,path:s.path}}async function St(s){const e=await _(`/api/${encodeURIComponent(s)}/fs/skills`),{skills:t}=await e.json();return t}async function xe(s,e,t){return(await _(v(s,e,"read",{path:t}))).text()}function X(s,e){const t=S.c(8);let n;t[0]!==s?(n=T.fileText(s),t[0]=s,t[1]=n):n=t[1];const r=e?.enabled!==!1&&s!=="";let i;t[2]!==s?(i=async()=>{const a=await fetch(s,{credentials:"include"});return a.ok?await a.text():null},t[2]=s,t[3]=i):i=t[3];let l;return t[4]!==n||t[5]!==r||t[6]!==i?(l={queryKey:n,enabled:r,staleTime:6e4,retry:!1,queryFn:i},t[4]=n,t[5]=r,t[6]=i,t[7]=l):l=t[7],E(l)}const ye=new Set(["md","mdx","markdown","txt","text"]),pe=25,be=64*1024,we=256*1024,je=4;function Se(s){const e=s.lastIndexOf(".");return e===-1?!1:ye.has(s.slice(e+1).toLowerCase())}async function Ft(s,e,t){const n=t?`${t}/`:"",r=d=>d.startsWith(n)?d.slice(n.length):d,i=[],l=[],a=[{path:t,depth:0}];for(;a.length>0;){const d=a.shift();if(!d)break;let h;try{h=(await(await _(v(s,e,"list",{path:d.path}))).json()).entries}catch{continue}for(const m of[...h].sort((g,x)=>g.path.localeCompare(x.path))){if(m.kind==="dir"){d.depth<je&&a.push({path:m.path,depth:d.depth+1});continue}Se(m.path)&&m.size<=be&&i.length<pe?i.push(m.path):l.push(r(m.path))}}const o=await Promise.all(i.map(d=>xe(s,e,d).catch(()=>null))),c=[];let u=0;return i.forEach((d,h)=>{const m=o[h];if(m==null||u+m.length>we){l.push(r(d));return}u+=m.length,c.push({relPath:r(d),content:m})}),c.sort((d,h)=>d.relPath==="SKILL.md"?-1:h.relPath==="SKILL.md"?1:d.relPath.localeCompare(h.relPath)),l.sort(),{files:c,omittedPaths:l}}function $t(){const s=S.c(7),{org:e}=N();let t;s[0]!==e.id?(t=T.orgFsPublicSets(e.id),s[0]=e.id,s[1]=t):t=s[1];let n;s[2]!==e.slug?(n=async()=>(await(await _(`/api/${encodeURIComponent(e.slug)}/fs/public-sets`)).json()).sets,s[2]=e.slug,s[3]=n):n=s[3];let r;return s[4]!==t||s[5]!==n?(r={queryKey:t,staleTime:3e5,queryFn:n},s[4]=t,s[5]=n,s[6]=r):r=s[6],E(r)}function kt(s){const e=S.c(3),{org:t}=N();let n;return e[0]!==t.slug||e[1]!==s?(n=r=>v(t.slug,s,"read",{path:r}),e[0]=t.slug,e[1]=s,e[2]=n):n=e[2],n}function Ct(){const s=S.c(2),{org:e}=N();let t;return s[0]!==e.slug?(t=(n,r)=>v(e.slug,n,"read",{path:r}),s[0]=e.slug,s[1]=t):t=s[1],t}function Tt(s){const e=S.c(3),{org:t}=N();let n;return e[0]!==t||e[1]!==s?(n={mutationFn:async r=>(await(await _(v(t.slug,s,"file",{path:r.path}),{method:"PUT",headers:{"content-type":r.contentType??"text/html; charset=utf-8"},body:r.body})).json()).entry},e[0]=t,e[1]=s,e[2]=n):n=e[2],M(n)}function _t(s){const e=S.c(18),{org:t}=N(),n=V();let r;e[0]!==t||e[1]!==s?(r=async c=>(await(await _(v(t.slug,s,"public",{path:c.path}),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({mode:c.mode,password:c.password})})).json()).entry,e[0]=t,e[1]=s,e[2]=r):r=e[2];let i;e[3]!==t||e[4]!==n||e[5]!==s?(i=async c=>{const u=T.orgFsStat(t.id,s,c.path);await n.cancelQueries({queryKey:u});const d=n.getQueryData(u),h=c.mode!=="private";return n.setQueryData(u,m=>m&&{...m,readPublic:h,effectivePublic:h,shareMode:c.mode}),{key:u,previous:d}},e[3]=t,e[4]=n,e[5]=s,e[6]=i):i=e[6];let l;e[7]!==n?(l=(c,u,d)=>{d&&n.setQueryData(d.key,d.previous)},e[7]=n,e[8]=l):l=e[8];let a;e[9]!==t||e[10]!==n||e[11]!==s?(a=(c,u,d)=>{n.invalidateQueries({queryKey:T.orgFsStat(t.id,s,d.path)}),n.invalidateQueries({queryKey:T.orgFsVolume(t.id,s)}),n.invalidateQueries({queryKey:T.orgFsRecent(t.id)}),n.invalidateQueries({queryKey:T.orgFsSearchRoot(t.id)})},e[9]=t,e[10]=n,e[11]=s,e[12]=a):a=e[12];let o;return e[13]!==r||e[14]!==i||e[15]!==l||e[16]!==a?(o={mutationFn:r,onMutate:i,onError:l,onSettled:a},e[13]=r,e[14]=i,e[15]=l,e[16]=a,e[17]=o):o=e[17],M(o)}function Dt(s){const e=S.c(33),{org:t}=N(),n=V();let r;e[0]!==t||e[1]!==n||e[2]!==s?(r=()=>{n.invalidateQueries({queryKey:T.orgFsVolume(t.id,s)}),n.invalidateQueries({queryKey:T.orgFsRecent(t.id)}),n.invalidateQueries({queryKey:T.orgFsSearchRoot(t.id)})},e[0]=t,e[1]=n,e[2]=s,e[3]=r):r=e[3];const i=r;let l;e[4]!==t||e[5]!==s?(l=async p=>{const F=(await Promise.allSettled(p.files.map($=>{const D=p.dir?`${p.dir}/${$.name}`:$.name;return _(v(t.slug,s,"file",{path:D}),{method:"PUT",headers:{"content-type":$.type||"application/octet-stream"},body:$})}))).find(Fe);if(F)throw F.reason},e[4]=t,e[5]=s,e[6]=l):l=e[6];let a;e[7]!==i||e[8]!==l?(a={mutationFn:l,onSettled:i},e[7]=i,e[8]=l,e[9]=a):a=e[9];const o=M(a);let c;e[10]!==t||e[11]!==s?(c=async p=>{await _(v(t.slug,s,"dir",{path:p}),{method:"POST"})},e[10]=t,e[11]=s,e[12]=c):c=e[12];let u;e[13]!==i||e[14]!==c?(u={mutationFn:c,onSuccess:i},e[13]=i,e[14]=c,e[15]=u):u=e[15];const d=M(u);let h;e[16]!==t||e[17]!==s?(h=async p=>{await _(v(t.slug,s,"file",{path:p}),{method:"DELETE"})},e[16]=t,e[17]=s,e[18]=h):h=e[18];let m;e[19]!==i||e[20]!==h?(m={mutationFn:h,onSuccess:i},e[19]=i,e[20]=h,e[21]=m):m=e[21];const g=M(m);let x;e[22]!==t||e[23]!==s?(x=async p=>{await _(v(t.slug,s,"move"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(p)})},e[22]=t,e[23]=s,e[24]=x):x=e[24];let y;e[25]!==i||e[26]!==x?(y={mutationFn:x,onSuccess:i},e[25]=i,e[26]=x,e[27]=y):y=e[27];const w=M(y);let b;return e[28]!==d||e[29]!==w||e[30]!==g||e[31]!==o?(b={upload:o,mkdir:d,remove:g,move:w},e[28]=d,e[29]=w,e[30]=g,e[31]=o,e[32]=b):b=e[32],b}function Fe(s){return s.status==="rejected"}function $e(s,e,t){return e?"color":t?"font":/^--brand-(text|fw|leading|tracking)/i.test(s)?"type":/^--brand-space/i.test(s)?"space":/^--brand-radius/i.test(s)?"radius":/^--brand-shadow/i.test(s)?"shadow":/^--brand-(duration|delay|ease)/i.test(s)?"motion":"other"}const ke=/^(rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color)\(/i,Ce=/^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,Te=["svg","png","jpg","jpeg","webp","avif","gif"];function _e(s){return s.split(".").pop()?.toLowerCase()??""}function De(s){return s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Oe(s){const e=s.trim();return Ce.test(e)||ke.test(e)}function Ot(s){const e=s.trim(),t=e.match(/^#([0-9a-f]{3})$/i);return t?.[1]?`#${[...t[1]].map(n=>n+n).join("")}`:e}function ve(s){const e=[],t=new Map,n=/(--brand-[\w-]+)\s*:\s*([^;]+);/g;let r;for(;(r=n.exec(s))!==null;){const i=r[1],l=r[2].trim();t.has(i)||e.push(i),t.set(i,l)}return e.map(i=>{const l=t.get(i),a=Oe(l),o=/^--brand-font/i.test(i);return{name:i,value:l,isColor:a,isFont:o,kind:$e(i,a,o)}})}const Q=["primary","secondary","accent","neutral","success","warning","error","info","bg","fg","border","ring"];function Ne(s){return s.match(/^--brand-([a-z]+)/i)?.[1]?.toLowerCase()??s}function vt(s){const e=[],t=new Map;for(const r of s){if(r.kind!=="color")continue;const i=Ne(r.name);t.has(i)||(e.push(i),t.set(i,[])),t.get(i).push(r)}return e.map(r=>{const i=t.get(r);return{family:r,tokens:i,isRamp:i.filter(l=>/-\d+$/.test(l.name)).length>=5}}).sort((r,i)=>{const l=Q.indexOf(r.family),a=Q.indexOf(i.family);return l===-1&&a===-1?0:l===-1?1:a===-1?-1:l-a})}function Nt(s,e,t){const n=new RegExp(`(${De(e)}\\s*:\\s*)[^;]+(;)`);if(n.test(s))return s.replace(n,(l,a,o)=>`${a}${t}${o}`);const r=s.search(/:root\s*\{/);if(r!==-1){const l=s.indexOf("{",r)+1;return`${s.slice(0,l)}
|
|
2
|
-
${e}: ${t};${s.slice(l)}`}const i=s.length>0&&!s.endsWith(`
|
|
3
|
-
`)?`
|
|
4
|
-
`:"";return`${s}${i}:root {
|
|
5
|
-
${e}: ${t};
|
|
6
|
-
}
|
|
7
|
-
`}function It(s){const e=s.filter(n=>n.kind==="file"),t=e.find(n=>/(^|\/)logo\.(svg|png|jpe?g|webp|avif|gif)$/i.test(n.path));return t?t.path:e.find(n=>Te.includes(_e(n.path)))?.path??null}function Ie(s){const e={};for(const t of s.split(`
|
|
8
|
-
`)){const n=t.match(/^([A-Za-z][\w-]*):\s*(.*)$/);n?.[1]&&n[2]!==void 0&&(e[n[1].toLowerCase()]=n[2].trim())}return e}function W(s){for(const e of s.split(/\n\s*\n/)){const t=e.trim();if(!(!t||t.startsWith("#")))return t.replace(/\n/g," ")}return null}function Ee(s){const e=s.match(/^---\n([\s\S]*?)\n---\n?/);if(!e||e[1]===void 0)return{name:null,description:W(s),body:s};const t=Ie(e[1]),n=s.slice(e[0].length);return{name:t.name||null,description:t.description||W(n),body:n}}const Me={default:{backFrom:"#4D87DF",backTo:"#296FE8",frontFrom:"#72B6FA",frontTo:"#5BB1EF",stripe:"#84CDFB",glyph:"#014AC9"},system:{backFrom:"#8A94A6",backTo:"#6B7687",frontFrom:"#B6BEC9",frontTo:"#A3ADBA",stripe:"#D5DBE3",glyph:"#3D4757"}};function Le(s){const e=S.c(46);let t,n,r,i;e[0]!==s?({glyph:t,readOnly:r,tone:i,...n}=s,e[0]=s,e[1]=t,e[2]=n,e[3]=r,e[4]=i):(t=e[1],n=e[2],r=e[3],i=e[4]);const a=Me[i===void 0?"default":i],o=q.useId(),c=`${o}-back`,u=`${o}-front`,d=`url(#${c})`;let h;e[5]!==d?(h=f.jsx("path",{d:"M2.53738 2.55C1.13602 2.55 0 3.68602 0 5.08738V11.535H31.931V7.65326C31.931 6.23616 30.7822 5.08738 29.3651 5.08738H14.7681L13.8775 5.02542C13.3886 4.99141 12.9197 4.81809 12.5261 4.52596L10.7726 3.22419C10.1828 2.78638 9.46784 2.55 8.73334 2.55H2.53738Z",fill:d}),e[5]=d,e[6]=h):h=e[6];const m=`url(#${u})`;let g;e[7]!==m?(g=f.jsx("rect",{y:"8.72",width:"32",height:"21",rx:"2.566",fill:m}),e[7]=m,e[8]=g):g=e[8];let x;e[9]===Symbol.for("react.memo_cache_sentinel")?(x=f.jsx("rect",{x:"0.3",y:"8.86",width:"31.4",height:"0.55",rx:"0.275",fill:"#FFFFFF",opacity:"0.25"}),e[9]=x):x=e[9];let y,w;e[10]!==a.stripe?(y=f.jsx("rect",{y:"25.81",width:"32",height:"0.552",fill:a.stripe}),w=f.jsx("rect",{y:"27.05",width:"32",height:"0.552",fill:a.stripe}),e[10]=a.stripe,e[11]=y,e[12]=w):(y=e[11],w=e[12]);let b;e[13]!==t||e[14]!==a.glyph?(b=t&&f.jsx(t,{x:10.5,y:13.2,width:11,height:11,strokeWidth:2.2,style:{color:a.glyph,opacity:.55}}),e[13]=t,e[14]=a.glyph,e[15]=b):b=e[15];let p;e[16]!==r?(p=r&&f.jsxs(f.Fragment,{children:[f.jsx("circle",{cx:"25.5",cy:"25.5",r:"6.2",strokeWidth:"1",className:"fill-background stroke-border"}),f.jsx(ue,{x:22.1,y:22.1,width:6.8,height:6.8,strokeWidth:2.2,className:"text-muted-foreground"})]}),e[16]=r,e[17]=p):p=e[17];let j;e[18]!==a.backFrom?(j=f.jsx("stop",{offset:"0.3",stopColor:a.backFrom}),e[18]=a.backFrom,e[19]=j):j=e[19];let F;e[20]!==a.backTo?(F=f.jsx("stop",{offset:"1",stopColor:a.backTo}),e[20]=a.backTo,e[21]=F):F=e[21];let $;e[22]!==c||e[23]!==j||e[24]!==F?($=f.jsxs("linearGradient",{id:c,x1:"15.97",y1:"2.55",x2:"15.97",y2:"9.53",gradientUnits:"userSpaceOnUse",children:[j,F]}),e[22]=c,e[23]=j,e[24]=F,e[25]=$):$=e[25];let D;e[26]!==a.frontFrom?(D=f.jsx("stop",{stopColor:a.frontFrom}),e[26]=a.frontFrom,e[27]=D):D=e[27];let k;e[28]!==a.frontTo?(k=f.jsx("stop",{offset:"1",stopColor:a.frontTo}),e[28]=a.frontTo,e[29]=k):k=e[29];let C;e[30]!==u||e[31]!==D||e[32]!==k?(C=f.jsxs("radialGradient",{id:u,cx:"0",cy:"0",r:"10",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(1.6 0 0 2.1538 16 19.22)",children:[D,k]}),e[30]=u,e[31]=D,e[32]=k,e[33]=C):C=e[33];let O;e[34]!==$||e[35]!==C?(O=f.jsxs("defs",{children:[$,C]}),e[34]=$,e[35]=C,e[36]=O):O=e[36];let I;return e[37]!==n||e[38]!==p||e[39]!==O||e[40]!==h||e[41]!==g||e[42]!==y||e[43]!==w||e[44]!==b?(I=f.jsxs("svg",{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",...n,children:[h,g,x,y,w,b,p,O]}),e[37]=n,e[38]=p,e[39]=O,e[40]=h,e[41]=g,e[42]=y,e[43]=w,e[44]=b,e[45]=I):I=e[45],I}const Ue=new Set(["png","jpg","jpeg","gif","webp","svg","avif"]),Ae=new Set(["csv","tsv"]),Ke=new Set(["mp4","webm","mov","m4v"]),qe=new Set(["txt","md","markdown","json","log","yaml","yml","xml","html","htm"]),ze=256*1024;function P(s){const e=new Date(s);if(Number.isNaN(e.getTime()))return"";const t=Date.now()-e.getTime(),n=Math.floor(t/6e4);if(n<1)return"just now";if(n<60)return`${n}m ago`;const r=Math.floor(n/60);if(r<24)return`${r}h ago`;const i=Math.floor(r/24);return i<30?`${i}d ago`:e.toLocaleDateString(void 0,{month:"short",day:"numeric"})}function Pe(s){return s.split(".").pop()?.toLowerCase()??""}async function Be(s,e){const t=await fetch(s,{credentials:"include",...e});if(!t.ok)throw new Error(`fetch failed: ${t.status}`);return t.text()}function ne(s){const e=S.c(6),{onShare:t,t:n}=s;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=f.jsx(ae,{size:14}),e[0]=r):r=e[0];let i;e[1]!==n?(i=n("library.cards.share"),e[1]=n,e[2]=i):i=e[2];let l;return e[3]!==t||e[4]!==i?(l=f.jsxs(L,{onClick:t,children:[r,i]}),e[3]=t,e[4]=i,e[5]=l):l=e[5],l}function Re(s){const e=S.c(12),{state:t,t:n}=s;let r;e[0]!==t||e[1]!==n?(r=n(t==="password"?"library.cards.passwordProtected":t==="inherited"?"library.cards.sharedViaParent":"library.cards.publicBadge"),e[0]=t,e[1]=n,e[2]=r):r=e[2];const i=r,l=t==="password"?ce:oe,a=t==="inherited"?"text-muted-foreground/60":"text-primary";let o;e[3]!==a?(o=R(a),e[3]=a,e[4]=o):o=e[4];let c;e[5]!==l||e[6]!==i||e[7]!==o?(c=f.jsx(l,{size:12,className:o,"aria-label":i}),e[5]=l,e[6]=i,e[7]=o,e[8]=c):c=e[8];let u;return e[9]!==i||e[10]!==c?(u=f.jsx("span",{title:i,className:"mt-0.5 flex shrink-0 items-center",children:c}),e[9]=i,e[10]=c,e[11]=u):u=e[11],u}function re(s){const e=S.c(26),{downloadUrl:t,filename:n,onShare:r,onDelete:i,t:l}=s;let a;e[0]!==n||e[1]!==l?(a=l("library.cards.actionsFor",{filename:n}),e[0]=n,e[1]=l,e[2]=a):a=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=f.jsx(Y,{size:14}),e[3]=o):o=e[3];let c;e[4]!==a?(c=f.jsx(Z,{asChild:!0,children:f.jsx(G,{variant:"ghost",size:"icon",className:"size-6 shrink-0 opacity-0 transition-opacity group-hover/card:opacity-100 data-[state=open]:opacity-100",onClick:He,"aria-label":a,children:o})}),e[4]=a,e[5]=c):c=e[5];let u;e[6]!==r||e[7]!==l?(u=r&&f.jsx(ne,{onShare:r,t:l}),e[6]=r,e[7]=l,e[8]=u):u=e[8];let d;e[9]===Symbol.for("react.memo_cache_sentinel")?(d=f.jsx(ie,{size:14}),e[9]=d):d=e[9];let h;e[10]!==l?(h=l("library.cards.download"),e[10]=l,e[11]=h):h=e[11];let m;e[12]!==t||e[13]!==n||e[14]!==h?(m=f.jsx(L,{asChild:!0,children:f.jsxs("a",{href:t,download:n,children:[d,h]})}),e[12]=t,e[13]=n,e[14]=h,e[15]=m):m=e[15];let g;e[16]!==i||e[17]!==l?(g=i&&f.jsxs(L,{variant:"destructive",onClick:i,children:[f.jsx(J,{size:14}),l("library.cards.delete")]}),e[16]=i,e[17]=l,e[18]=g):g=e[18];let x;e[19]!==u||e[20]!==m||e[21]!==g?(x=f.jsxs(ee,{align:"end",onClick:Xe,children:[u,m,g]}),e[19]=u,e[20]=m,e[21]=g,e[22]=x):x=e[22];let y;return e[23]!==c||e[24]!==x?(y=f.jsxs(te,{children:[c,x]}),e[23]=c,e[24]=x,e[25]=y):y=e[25],y}function Xe(s){return s.stopPropagation()}function He(s){return s.stopPropagation()}function H(s){const e=S.c(22),{label:t,onBrowse:n,onShare:r,onDelete:i,t:l}=s;if(!n&&!r&&!i)return;let a;e[0]!==t||e[1]!==l?(a=l("library.cards.actionsFor",{label:t}),e[0]=t,e[1]=l,e[2]=a):a=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=f.jsx(Y,{size:14}),e[3]=o):o=e[3];let c;e[4]!==a?(c=f.jsx(Z,{asChild:!0,children:f.jsx(G,{variant:"ghost",size:"icon",className:"size-6 shrink-0 opacity-0 transition-opacity group-hover/card:opacity-100 data-[state=open]:opacity-100",onClick:We,"aria-label":a,children:o})}),e[4]=a,e[5]=c):c=e[5];let u;e[6]!==n||e[7]!==l?(u=n&&f.jsxs(L,{onClick:n,children:[f.jsx(le,{size:14}),l("library.cards.browseFiles")]}),e[6]=n,e[7]=l,e[8]=u):u=e[8];let d;e[9]!==r||e[10]!==l?(d=r&&f.jsx(ne,{onShare:r,t:l}),e[9]=r,e[10]=l,e[11]=d):d=e[11];let h;e[12]!==i||e[13]!==l?(h=i&&f.jsxs(L,{variant:"destructive",onClick:i,children:[f.jsx(J,{size:14}),l("library.cards.delete")]}),e[12]=i,e[13]=l,e[14]=h):h=e[14];let m;e[15]!==u||e[16]!==d||e[17]!==h?(m=f.jsxs(ee,{align:"end",onClick:Qe,children:[u,d,h]}),e[15]=u,e[16]=d,e[17]=h,e[18]=m):m=e[18];let g;return e[19]!==c||e[20]!==m?(g=f.jsxs(te,{children:[c,m]}),e[19]=c,e[20]=m,e[21]=g):g=e[21],g}function Qe(s){return s.stopPropagation()}function We(s){return s.stopPropagation()}function A(s){const e=S.c(23),{onOpen:t,children:n,className:r,draggable:i,onDragStart:l,onContextMenu:a,onDragOver:o,onDrop:c,onDragLeave:u}=s,[d,h]=q.useState(!1);let m;e[0]!==t?(m=j=>{(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),t())},e[0]=t,e[1]=m):m=e[1];let g;e[2]!==o||e[3]!==c?(g=j=>{o?.(j),c&&(j.preventDefault(),h(!0))},e[2]=o,e[3]=c,e[4]=g):g=e[4];let x;e[5]!==u?(x=j=>{u?.(j),h(!1)},e[5]=u,e[6]=x):x=e[6];let y;e[7]!==c?(y=j=>{c?.(j),h(!1)},e[7]=c,e[8]=y):y=e[8];const w=d&&c&&"border-primary bg-primary/5";let b;e[9]!==r||e[10]!==w?(b=R("group/card flex cursor-pointer flex-col gap-3 rounded-2xl border border-border bg-background p-4 text-left transition-colors hover:border-border hover:bg-muted/40",w,r),e[9]=r,e[10]=w,e[11]=b):b=e[11];let p;return e[12]!==n||e[13]!==i||e[14]!==a||e[15]!==l||e[16]!==t||e[17]!==m||e[18]!==g||e[19]!==x||e[20]!==y||e[21]!==b?(p=f.jsx("div",{role:"button",tabIndex:0,draggable:i,onClick:t,onKeyDown:m,onDragStart:l,onContextMenu:a,onDragOver:g,onDragLeave:x,onDrop:y,className:b,children:n}),e[12]=n,e[13]=i,e[14]=a,e[15]=l,e[16]=t,e[17]=m,e[18]=g,e[19]=x,e[20]=y,e[21]=b,e[22]=p):p=e[22],p}function K(s){const e=S.c(20),{icon:t,name:n,meta:r,subtitle:i,publicState:l,actions:a,t:o}=s;let c;e[0]!==n?(c=f.jsx("span",{className:"min-w-0 flex-1 truncate text-[13px] text-foreground",title:n,children:n}),e[0]=n,e[1]=c):c=e[1];let u;e[2]!==l||e[3]!==o?(u=l&&f.jsx(Re,{state:l,t:o}),e[2]=l,e[3]=o,e[4]=u):u=e[4];let d;e[5]!==r?(d=r&&f.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:r}),e[5]=r,e[6]=d):d=e[6];let h;e[7]!==c||e[8]!==u||e[9]!==d?(h=f.jsxs("div",{className:"flex items-start gap-3",children:[c,u,d]}),e[7]=c,e[8]=u,e[9]=d,e[10]=h):h=e[10];let m;e[11]!==i?(m=i&&f.jsx("span",{className:"truncate text-xs text-muted-foreground",title:i,children:i}),e[11]=i,e[12]=m):m=e[12];let g;e[13]!==h||e[14]!==m?(g=f.jsxs("div",{className:"flex min-w-0 flex-1 flex-col justify-center",children:[h,m]}),e[13]=h,e[14]=m,e[15]=g):g=e[15];let x;return e[16]!==a||e[17]!==t||e[18]!==g?(x=f.jsxs("div",{className:"flex w-full items-center gap-2.5",children:[t,g,a]}),e[16]=a,e[17]=t,e[18]=g,e[19]=x):x=e[19],x}function Et(s){const e=S.c(24),{name:t,meta:n,subtitle:r,glyph:i,tone:l,readOnly:a,publicState:o,onOpen:c,onShare:u,onDelete:d,draggable:h,onDragStart:m,onContextMenu:g,onDrop:x}=s,y=U();let w;e[0]!==i||e[1]!==a||e[2]!==l?(w=f.jsx(Le,{glyph:i,tone:l,readOnly:a,className:"size-8 shrink-0"}),e[0]=i,e[1]=a,e[2]=l,e[3]=w):w=e[3];let b;e[4]!==t||e[5]!==d||e[6]!==u||e[7]!==y?(b=f.jsx(H,{label:t,onShare:u,onDelete:d,t:y}),e[4]=t,e[5]=d,e[6]=u,e[7]=y,e[8]=b):b=e[8];let p;e[9]!==n||e[10]!==t||e[11]!==o||e[12]!==r||e[13]!==y||e[14]!==w||e[15]!==b?(p=f.jsx(K,{icon:w,name:t,meta:n,subtitle:r,publicState:o,actions:b,t:y}),e[9]=n,e[10]=t,e[11]=o,e[12]=r,e[13]=y,e[14]=w,e[15]=b,e[16]=p):p=e[16];let j;return e[17]!==h||e[18]!==g||e[19]!==m||e[20]!==x||e[21]!==c||e[22]!==p?(j=f.jsx(A,{onOpen:c,draggable:h,onDragStart:m,onContextMenu:g,onDrop:x,children:p}),e[17]=h,e[18]=g,e[19]=m,e[20]=x,e[21]=c,e[22]=p,e[23]=j):j=e[23],j}function Mt(s){const e=S.c(27),{filename:t,updatedAt:n,downloadUrl:r,subtitle:i,publicState:l,onOpen:a,onShare:o,onDelete:c,draggable:u,onDragStart:d,onContextMenu:h}=s,m=U();let g;e[0]!==t?(g=f.jsx(z,{filename:t,className:"h-8 w-6.5 shrink-0"}),e[0]=t,e[1]=g):g=e[1];let x;e[2]!==n?(x=P(n),e[2]=n,e[3]=x):x=e[3];let y;e[4]!==t||e[5]!==i?(y=i??se(t),e[4]=t,e[5]=i,e[6]=y):y=e[6];let w;e[7]!==r||e[8]!==t||e[9]!==c||e[10]!==o||e[11]!==m?(w=f.jsx(re,{downloadUrl:r,filename:t,onShare:o,onDelete:c,t:m}),e[7]=r,e[8]=t,e[9]=c,e[10]=o,e[11]=m,e[12]=w):w=e[12];let b;e[13]!==t||e[14]!==l||e[15]!==m||e[16]!==g||e[17]!==x||e[18]!==y||e[19]!==w?(b=f.jsx(K,{icon:g,name:t,meta:x,subtitle:y,publicState:l,actions:w,t:m}),e[13]=t,e[14]=l,e[15]=m,e[16]=g,e[17]=x,e[18]=y,e[19]=w,e[20]=b):b=e[20];let p;return e[21]!==u||e[22]!==h||e[23]!==d||e[24]!==a||e[25]!==b?(p=f.jsx(A,{onOpen:a,draggable:u,onDragStart:d,onContextMenu:h,children:b}),e[21]=u,e[22]=h,e[23]=d,e[24]=a,e[25]=b,e[26]=p):p=e[26],p}function Lt(s){const e=S.c(29),{dirName:t,updatedAt:n,skillMdUrl:r,publicState:i,onOpen:l,onBrowse:a,onShare:o,onDelete:c,draggable:u,onDragStart:d,onContextMenu:h}=s,m=U(),{data:g}=X(r);let x;e[0]!==g?(x=g?Ee(g):null,e[0]=g,e[1]=x):x=e[1];const y=x;let w;e[2]===Symbol.for("react.memo_cache_sentinel")?(w=f.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary",children:f.jsx(de,{size:16})}),e[2]=w):w=e[2];const b=y?.name??t;let p;e[3]!==n?(p=P(n),e[3]=n,e[4]=p):p=e[4];let j;e[5]!==m?(j=m("library.cards.skill"),e[5]=m,e[6]=j):j=e[6];let F;e[7]!==t||e[8]!==a||e[9]!==c||e[10]!==o||e[11]!==m?(F=f.jsx(H,{label:t,onBrowse:a,onShare:o,onDelete:c,t:m}),e[7]=t,e[8]=a,e[9]=c,e[10]=o,e[11]=m,e[12]=F):F=e[12];let $;e[13]!==i||e[14]!==m||e[15]!==b||e[16]!==p||e[17]!==j||e[18]!==F?($=f.jsx(K,{icon:w,name:b,meta:p,subtitle:j,publicState:i,actions:F,t:m}),e[13]=i,e[14]=m,e[15]=b,e[16]=p,e[17]=j,e[18]=F,e[19]=$):$=e[19];const D=y?.description??"";let k;e[20]!==D?(k=f.jsx("p",{className:"line-clamp-2 min-h-8 text-xs leading-4 text-muted-foreground",children:D}),e[20]=D,e[21]=k):k=e[21];let C;return e[22]!==u||e[23]!==h||e[24]!==d||e[25]!==l||e[26]!==$||e[27]!==k?(C=f.jsxs(A,{onOpen:l,draggable:u,onDragStart:d,onContextMenu:h,children:[$,k]}),e[22]=u,e[23]=h,e[24]=d,e[25]=l,e[26]=$,e[27]=k,e[28]=C):C=e[28],C}function Ut(s){const e=S.c(45),{dirName:t,updatedAt:n,tokensUrl:r,onOpen:i,onBrowse:l,onDelete:a,draggable:o,onDragStart:c,onContextMenu:u}=s,d=U(),{data:h}=X(r);let m,g,x,y,w,b,p,j;if(e[0]!==h||e[1]!==t||e[2]!==o||e[3]!==l||e[4]!==u||e[5]!==a||e[6]!==c||e[7]!==i||e[8]!==d||e[9]!==n){const D=h?ve(h).filter(Ge).slice(0,6):[];m=A,y=i,w=o,b=c,p=u;let k;e[18]===Symbol.for("react.memo_cache_sentinel")?(k=f.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary",children:f.jsx(fe,{size:16})}),e[18]=k):k=e[18];let C;e[19]!==n?(C=P(n),e[19]=n,e[20]=C):C=e[20];let O;e[21]!==d?(O=d("library.cards.brand"),e[21]=d,e[22]=O):O=e[22];let I;e[23]!==t||e[24]!==l||e[25]!==a||e[26]!==d?(I=f.jsx(H,{label:t,onBrowse:l,onDelete:a,t:d}),e[23]=t,e[24]=l,e[25]=a,e[26]=d,e[27]=I):I=e[27],e[28]!==t||e[29]!==d||e[30]!==O||e[31]!==I||e[32]!==C?(j=f.jsx(K,{icon:k,name:t,meta:C,subtitle:O,actions:I,t:d}),e[28]=t,e[29]=d,e[30]=O,e[31]=I,e[32]=C,e[33]=j):j=e[33],g="flex min-h-5 items-center gap-1.5",x=D.map(Ve),e[0]=h,e[1]=t,e[2]=o,e[3]=l,e[4]=u,e[5]=a,e[6]=c,e[7]=i,e[8]=d,e[9]=n,e[10]=m,e[11]=g,e[12]=x,e[13]=y,e[14]=w,e[15]=b,e[16]=p,e[17]=j}else m=e[10],g=e[11],x=e[12],y=e[13],w=e[14],b=e[15],p=e[16],j=e[17];let F;e[34]!==g||e[35]!==x?(F=f.jsx("div",{className:g,children:x}),e[34]=g,e[35]=x,e[36]=F):F=e[36];let $;return e[37]!==m||e[38]!==y||e[39]!==w||e[40]!==b||e[41]!==p||e[42]!==j||e[43]!==F?($=f.jsxs(m,{onOpen:y,draggable:w,onDragStart:b,onContextMenu:p,children:[j,F]}),e[37]=m,e[38]=y,e[39]=w,e[40]=b,e[41]=p,e[42]=j,e[43]=F,e[44]=$):$=e[44],$}function Ve(s){return f.jsx("span",{className:"size-5 rounded-full border border-border/60",style:{backgroundColor:s.value},title:`${s.name}: ${s.value}`},s.name)}function Ge(s){return s.isColor}function B(s){const e=S.c(4),{children:t}=s,[n,r]=q.useState(!1);let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=()=>o=>{if(!o)return;const c=new IntersectionObserver(u=>{const[d]=u;d?.isIntersecting&&(r(!0),c.disconnect())},{rootMargin:"200px"});c.observe(o)},e[0]=i):i=e[0];const[l]=q.useState(i);if(n){let o;return e[1]!==t?(o=f.jsx(f.Fragment,{children:t}),e[1]=t,e[2]=o):o=e[2],o}let a;return e[3]===Symbol.for("react.memo_cache_sentinel")?(a=f.jsx("div",{ref:l,className:"h-full w-full"}),e[3]=a):a=e[3],a}function Ye(s){const e=S.c(4),{url:t}=s,{data:n}=X(t);if(!n)return null;let r;e[0]!==n?(r=n.slice(0,2e3),e[0]=n,e[1]=r):r=e[1];let i;return e[2]!==r?(i=f.jsx("pre",{className:"pointer-events-none h-full w-full overflow-hidden bg-background p-3 font-mono text-[9px] leading-[1.5] text-muted-foreground select-none",children:r}),e[2]=r,e[3]=i):i=e[3],i}function Je(s){const e=S.c(23),{url:t,ext:n}=s;let r;e[0]!==t?(r=T.csvThumb(t),e[0]=t,e[1]=r):r=e[1];let i;e[2]!==t?(i=()=>Be(t,{headers:{Range:"bytes=0-8191"}}),e[2]=t,e[3]=i):i=e[3];let l;e[4]!==r||e[5]!==i?(l={queryKey:r,queryFn:i,staleTime:6e4,retry:!1},e[4]=r,e[5]=i,e[6]=l):l=e[6];const{data:a}=E(l);if(!a)return null;const o=n==="tsv"?" ":",";let c,u,d,h;if(e[7]!==a||e[8]!==o){h=Symbol.for("react.early_return_sentinel");e:{let y;e[13]!==o?(y=b=>b.split(o).slice(0,6).map(tt),e[13]=o,e[14]=y):y=e[14];const w=a.split(`
|
|
9
|
-
`).filter(Boolean).slice(0,7).map(y);if(w.length===0){h=null;break e}d="pointer-events-none h-full w-full overflow-hidden bg-background p-2 select-none",u="w-full border-collapse",c=w.map(Ze)}e[7]=a,e[8]=o,e[9]=c,e[10]=u,e[11]=d,e[12]=h}else c=e[9],u=e[10],d=e[11],h=e[12];if(h!==Symbol.for("react.early_return_sentinel"))return h;let m;e[15]!==c?(m=f.jsx("tbody",{children:c}),e[15]=c,e[16]=m):m=e[16];let g;e[17]!==u||e[18]!==m?(g=f.jsx("table",{className:u,children:m}),e[17]=u,e[18]=m,e[19]=g):g=e[19];let x;return e[20]!==d||e[21]!==g?(x=f.jsx("div",{className:d,children:g}),e[20]=d,e[21]=g,e[22]=x):x=e[22],x}function Ze(s,e){return f.jsx("tr",{className:R(e===0&&"bg-muted/50 font-medium"),children:s.map(et)},e)}function et(s,e){return f.jsx("td",{className:"max-w-[56px] overflow-hidden border border-border/30 px-1 py-px text-[7px] leading-[1.4] text-muted-foreground",style:{maxWidth:56},children:f.jsx("span",{className:"block truncate",children:s})},e)}function tt(s){return s.trim().replace(/^"|"$/g,"")}function st(s){const e=S.c(14),{filename:t,size:n,downloadUrl:r}=s;let i;if(e[0]!==r||e[1]!==t||e[2]!==n){const l=Pe(t);let a;if(Ue.has(l)){let o;e[4]!==r?(o=f.jsx("img",{src:r,alt:"",loading:"lazy",className:"h-full w-full object-cover"}),e[4]=r,e[5]=o):o=e[5],a=o}else if(Ke.has(l)){const o=`${r}#t=0.1`;let c;e[6]!==o?(c=f.jsx(B,{children:f.jsx("video",{src:o,preload:"metadata",muted:!0,playsInline:!0,className:"pointer-events-none h-full w-full object-cover"})}),e[6]=o,e[7]=c):c=e[7],a=c}else if(l==="pdf"){let o;e[8]!==t?(o=f.jsx("div",{className:"flex h-full w-full items-center justify-center",children:f.jsx(z,{filename:t,className:"h-14 w-11 opacity-60"})}),e[8]=t,e[9]=o):o=e[9],a=o}else if(Ae.has(l))a=f.jsx(B,{children:f.jsx(Je,{url:r,ext:l})});else if(qe.has(l)&&n<=ze){let o;e[10]!==r?(o=f.jsx(B,{children:f.jsx(Ye,{url:r})}),e[10]=r,e[11]=o):o=e[11],a=o}else{let o;e[12]!==t?(o=f.jsx("div",{className:"flex h-full w-full items-center justify-center",children:f.jsx(z,{filename:t,className:"h-14 w-11 opacity-60"})}),e[12]=t,e[13]=o):o=e[13],a=o}i=f.jsx("div",{className:"aspect-[400/265] w-full overflow-hidden rounded-lg border border-border/60 bg-muted/30",children:a}),e[0]=r,e[1]=t,e[2]=n,e[3]=i}else i=e[3];return i}function At(s){const e=S.c(29),t=U(),n=s.onOpen;let r;e[0]!==s.filename?(r=f.jsx(z,{filename:s.filename,className:"h-8 w-6.5 shrink-0"}),e[0]=s.filename,e[1]=r):r=e[1];const i=s.filename;let l;e[2]!==s.updatedAt?(l=P(s.updatedAt),e[2]=s.updatedAt,e[3]=l):l=e[3];let a;e[4]!==s.filename||e[5]!==s.subtitle?(a=s.subtitle??se(s.filename),e[4]=s.filename,e[5]=s.subtitle,e[6]=a):a=e[6];let o;e[7]!==s.downloadUrl||e[8]!==s.filename||e[9]!==s.onDelete||e[10]!==s.onShare||e[11]!==t?(o=f.jsx(re,{downloadUrl:s.downloadUrl,filename:s.filename,onShare:s.onShare,onDelete:s.onDelete,t}),e[7]=s.downloadUrl,e[8]=s.filename,e[9]=s.onDelete,e[10]=s.onShare,e[11]=t,e[12]=o):o=e[12];let c;e[13]!==s.filename||e[14]!==s.publicState||e[15]!==t||e[16]!==r||e[17]!==l||e[18]!==a||e[19]!==o?(c=f.jsx(K,{icon:r,name:i,meta:l,subtitle:a,publicState:s.publicState,actions:o,t}),e[13]=s.filename,e[14]=s.publicState,e[15]=t,e[16]=r,e[17]=l,e[18]=a,e[19]=o,e[20]=c):c=e[20];let u;e[21]!==s.downloadUrl||e[22]!==s.filename||e[23]!==s.size?(u=f.jsx(st,{filename:s.filename,size:s.size,downloadUrl:s.downloadUrl}),e[21]=s.downloadUrl,e[22]=s.filename,e[23]=s.size,e[24]=u):u=e[24];let d;return e[25]!==s.onOpen||e[26]!==c||e[27]!==u?(d=f.jsxs(A,{onOpen:n,children:[c,u]}),e[25]=s.onOpen,e[26]=c,e[27]=u,e[28]=d):d=e[28],d}export{Ut as B,Et as F,At as R,Lt as S,St as a,Ct as b,bt as c,jt as d,kt as e,Ft as f,X as g,Tt as h,gt as i,_t as j,yt as k,xt as l,It as m,vt as n,Nt as o,ve as p,Ot as q,Ee as r,wt as s,P as t,Dt as u,$t as v,Mt as w,pt as x};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as J,r as w,n as Q,j as t,b as Z,B as $,k as K,t as U}from"./index-Ci8azyOE.js";import{b as _}from"./chat-context-CmwZXAhQ.js";import{i as tt}from"./XCircle-CVbKXkpd.js";import{b2 as ot,x as W}from"./agent-icon-DCM1Bdl8.js";import{n as et}from"./LinkExternal01-CIL2SNWf.js";import{A as rt,a as it,b as st,c as at,d as nt,e as mt,f as lt,g as pt}from"./alert-dialog-Dh9zsaCy.js";import{I as q}from"./input-Bwz-dTwg.js";import{L as G}from"./label-C1OhLpvf.js";import{G as ct,U as dt,V as ut,as as gt,K as xt,X as A,a3 as ft,at as ht,Y as yt}from"./index-BdFaTbMe.js";import{c as bt,B as jt,a as vt}from"./block-document-D0mVcltx.js";import{u as Et}from"./use-autosave-D1zPEM1D.js";import{t as Ct}from"./ChevronDown-Csfjhwpm.js";import{ao as Nt,ap as St,aq as kt}from"./automation-runs-GCI7uxIE.js";import{s as j,E as wt}from"./primitives-BKjHT0m_.js";import"./use-panel-navigate-BsVeEWlx.js";import"./dialog-BI8UUwqv.js";import"./Check-D5PKBQ5I.js";import"./Copy01-CsNpp9jr.js";import"./Download01-BN9BT9cL.js";import"./use-destination-route-d8wgPDBu.js";import"./constants-dLUUoWH7.js";import"./session-runtime-C-KTDVeQ.js";import"./slugify-CEUa2lfQ.js";import"./hooks-DQmp7LHz.js";import"./use-mcp-client-DP2onozC.js";import"./auth-D8IdOmGw.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-BN-M5EUb.js";import"./task-board-Cz-fiaKF.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-virtual-mcp-Dj0wXB98.js";import"./use-ai-providers-DlWIkMD-.js";import"./use-decopilot-events-CqU7DunK.js";import"./use-organization-settings-BAFLKQ3y.js";import"./AlertCircle-BTlJp8pf.js";import"./UserSquare-CwU4sG2o.js";import"./Tool01-va49aYq9.js";import"./ArrowUp-CVoISkQ4.js";import"./ArrowLeft-BwagOJkb.js";import"./Tool02-jKKU1_dM.js";import"./TrendUp01-DikSDrNg.js";import"./ZapSquare-BZzRAQpm.js";import"./Users03-BUoBV4mB.js";import"./CheckCircle-teyxVGFp.js";import"./ChevronRight-DUmHQrD7.js";import"./ChevronSelectorVertical-CuAhXy3x.js";import"./ChevronUp-Dlj_U0qV.js";import"./DotsVertical-CpVcGDJ_.js";import"./Stars02-DZNA1z2-.js";import"./CreditCard01-YCHpZ00A.js";import"./Settings02-BMcJFHpd.js";import"./Eye-DgiSa7UT.js";import"./FilterLines-Db8-uWfr.js";import"./Share07-CPDrxQV8.js";import"./Globe01-CV-16mwB.js";import"./Globe04-D3O2XfOT.js";import"./SwitchHorizontal01-CSyGO1HX.js";import"./HardDrive-CWvDYc59.js";import"./Key01-D4srNqPO.js";import"./LockUnlocked01-BpeKJGM4.js";import"./LogOut01-qWWgaWbQ.js";import"./Monitor01-uq-dlf-u.js";import"./Sun-BBWjOwQE.js";import"./Palette-Cv68Zggp.js";import"./Play-C9xK8clC.js";import"./Plus-CPkR-QLd.js";import"./SearchLg-8daQliv2.js";import"./SearchMd-ClTH3fiN.js";import"./Shield01-C9M_jcOJ.js";import"./Stars01-BzEDQnsl.js";import"./Trash01-Dp-QTpAR.js";import"./Upload01-DxCHPffq.js";import"./User01-DJ_BO2EX.js";import"./Users01-B2wc_Wgl.js";import"./XClose-CTv0nnSb.js";import"./Zap-MbQ2aiA8.js";import"./spinner-B9x-ViPH.js";import"./drawer-BR22I8_f.js";import"./collection-search-0N-i_PHL.js";import"./chart-BS94Bf-2.js";import"./index-De-kCEdQ.js";import"./shell-layout-i3nUAnDL.js";import"./avatar-D-QkiqIH.js";import"./required-auth-layout-CUQaC9Hr.js";import"./use-org-sso-C-uWWD5m.js";import"./form-DauSI86Q.js";import"./select-C7Q2VGxk.js";import"./tabs-CFhQLpsD.js";import"./toggle-group-ClOqwWDq.js";import"./super-agent-icon-DbGhAnlL.js";import"./self-tool-result-BSLlHbcp.js";import"./integration-icon-CGnrGZxM.js";import"./extract-connection-data-6cVSTGuY.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-CMPWtdMv.js";import"./use-debounced-value-BENALn-i.js";import"./authenticate-and-persist-oauth-DY_hbkIG.js";import"./mcp-oauth-GWhqBwu1.js";import"./track-DXtvDI_s.js";import"./popover-ClwD_xra.js";import"./toolbar-KH-9Bre4.js";import"./github-repo-picker-sKX6qrmQ.js";import"./use-connection-gqhqm1hO.js";import"./use-mcp-tools-B7yHzu9T.js";import"./use-navigate-to-agent-mrg2_DxJ.js";import"./agent-capabilities-B52k7xCe.js";import"./connection-card-B1T5pd1c.js";import"./use-registry-connections-DghvIzKh.js";import"./useInfiniteQuery-DjjzlWAZ.js";import"./use-infinite-scroll-Cw7R-QWe.js";import"./retry-CErkP7V6.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-CMpN0SgX.js";import"./connection-form-helpers-CYKg-GvJ.js";import"./collection-tabs-PM6yowhG.js";import"./badge-DX3_GQsO.js";import"./useSuspenseInfiniteQuery-Ci5SesMe.js";import"./select-model-C03zAz7l.js";import"./checkbox-Gg7TSWGl.js";import"./ai-providers-logos-DD3qZ33J.js";import"./cards-4fPEe6ST.js";import"./dropdown-menu-wKA_-hY5.js";import"./file-type-icon-QfVGs4d0.js";import"./question-004-sINsf4GQ.js";import"./use-members-IwrDPxqz.js";import"./use-org-auth-client-HXTuHVWD.js";import"./use-status-sounds-kx6TUHpf.js";import"./empty-state-DAYLBxJ6.js";import"./types-BGVeElFe.js";import"./use-file-configs-BAUKJMmN.js";import"./monaco-editor-CQbDSum8.js";import"./pt-BR-CLy76QW2.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-debounced-autosave-j0VBccs2.js";import"./scroll-area-RteS0-Yk.js";import"./search-input-CevwWux3.js";import"./use-mcp-auth-status-7KFU7IPU.js";import"./switch-BuJnEOUw.js";import"./use-secrets-CvibJ_Hx.js";import"./format-time-BnbuEtat.js";import"./AreaChart-dJjxY072.js";import"./config-DFqhM__G.js";import"./command-JNsPUZwg.js";import"./index-BYBf2qjQ.js";import"./get-initials-D-f_fDFw.js";import"./breadcrumb-Clut3vXk.js";import"./use-copy-BY1mlr6R.js";import"./use-tags-CGJ43yMs.js";import"./use-automations-CWqvHqj2.js";import"./automation-list-row-CLAw5ACh.js";import"./site-error--i37Vnuw.js";import"./use-org-repo-syncs-rlkQHsUF.js";import"./table-oIbRw7Yk.js";function Pt(h){const o=J.c(18),{icon:d,title:n,defaultOpen:v,children:u}=h,P=v===void 0?!1:v,[g,D]=w.useState(P);let m;o[0]!==d?(m=t.jsx(d,{size:15}),o[0]=d,o[1]=m):m=o[1];let r;o[2]!==n?(r=t.jsx("span",{className:"flex-1 text-left",children:n}),o[2]=n,o[3]=r):r=o[3];const y=g&&"rotate-180";let s;o[4]!==y?(s=Q("transition-transform",y),o[4]=y,o[5]=s):s=o[5];let l;o[6]!==s?(l=t.jsx(Ct,{size:15,className:s}),o[6]=s,o[7]=l):l=o[7];let p;o[8]!==m||o[9]!==r||o[10]!==l?(p=t.jsx(Nt,{asChild:!0,children:t.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground cursor-pointer",children:[m,r,l]})}),o[8]=m,o[9]=r,o[10]=l,o[11]=p):p=o[11];let i;o[12]!==u?(i=t.jsx(St,{className:"px-2 pt-4",children:u}),o[12]=u,o[13]=i):i=o[13];let x;return o[14]!==g||o[15]!==p||o[16]!==i?(x=t.jsxs(kt,{open:g,onOpenChange:D,className:"mt-4",children:[p,i]}),o[14]=g,o[15]=p,o[16]=i,o[17]=x):x=o[17],x}function Er({orgSlug:h,virtualMcpId:o,branch:d,blockKey:n,block:v,decofile:u,meta:P,onManagePosts:g,onOpenPost:D,previewBaseUrl:m}){const r=Z(),y=_()?.taskId??null,s=ct({orgSlug:h,virtualMcpId:o,branch:d}),l=dt({orgSlug:h,virtualMcpId:o,branch:d}),p=ut(v,"categories"),[i,x,H]=Et(p,e=>{s.mutate({blockKey:n,data:A(n,"categories",e)})}),E=(e,k)=>x({...i,[e]:k}),T=bt({decofile:u,category:i,previewBaseUrl:m,draftPointer:l}),a=j(i.slug),[B,b]=w.useState(a),[c,C]=w.useState(null),[N,z]=w.useState(!1),F=a?gt(u).filter(e=>e.categorySlugs.includes(a)):[],S=F.length,M=e=>E("slug",e),V=async(e,k)=>{const Y=j(i.name);z(!0);try{let f=0;for(const{key:R,payload:I}of ft(u,"posts")){const L=ht(I,e,{name:Y,slug:k});L!==I&&(await s.mutateAsync({blockKey:R,data:A(R,"posts",yt(L))}),f+=1)}const O={...i,slug:k};await s.mutateAsync({blockKey:n,data:A(n,"categories",O)}),H(O),U.success(f>0?r("sandbox.categoryEditor.renameSuccessWithPosts",{count:String(f)}):r("sandbox.categoryEditor.renameSuccessNoPosts")),C(null)}catch(f){b(e),C(null),U.error(f instanceof Error?f.message:r("sandbox.categoryEditor.renameFailed"))}finally{z(!1)}},X=()=>{const e=B.trim();if(e===a){B!==e&&b(e);return}if(!e){b(a);return}if(S===0){M(e);return}C({oldSlug:a,newSlug:e,count:S})};return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex h-full flex-col",children:[t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[t.jsx("span",{className:"truncate text-sm font-medium",children:j(i.name)||r("sandbox.categoryEditor.untitledCategory")}),t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[t.jsx(xt,{isPending:s.isPending,isError:s.isError}),T&&t.jsxs($,{type:"button",variant:"outline",size:"sm",title:r("sandbox.categoryEditor.previewTooltip"),onClick:()=>window.open(T,"_blank","noopener,noreferrer"),children:[t.jsx(et,{size:14}),r("sandbox.categoryEditor.seeCategoryPreview")]})]})]}),t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-4xl px-8 py-8",children:[t.jsx(wt,{value:j(i.name),onChange:e=>E("name",e),placeholder:r("sandbox.categoryEditor.categoryNamePlaceholder"),className:"py-1 text-3xl font-bold text-foreground"}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(G,{htmlFor:"category-slug",children:r("sandbox.categoryEditor.slugLabel")}),t.jsx(q,{id:"category-slug",value:B,onChange:e=>b(e.target.value),onBlur:X,placeholder:r("sandbox.categoryEditor.slugPlaceholder"),className:"h-10"})]}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(G,{htmlFor:"category-description",children:r("sandbox.categoryEditor.descriptionLabel")}),t.jsx(q,{id:"category-description",value:j(i.description),onChange:e=>E("description",e.target.value),placeholder:r("sandbox.categoryEditor.descriptionPlaceholder"),className:"h-10"})]}),t.jsx(Pt,{icon:ot,title:r("sandbox.categoryEditor.contentTitle"),defaultOpen:!0,children:t.jsx(jt,{value:vt(i.sections),onChange:e=>E("sections",e),meta:P,sandboxRef:{orgSlug:h,virtualMcpId:o,branch:d,threadId:y},emptyMessage:r("sandbox.categoryEditor.noContentEmpty")})}),t.jsxs("div",{className:"mt-6 overflow-hidden rounded-lg border bg-muted/30",children:[t.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-3",children:[t.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[t.jsx(W,{size:16,className:"shrink-0 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:r("sandbox.categoryEditor.postsInCategory",{count:String(S)})})]}),t.jsxs($,{type:"button",variant:"outline",size:"sm",disabled:!a,title:r(a?"sandbox.categoryEditor.pickPostsTooltip":"sandbox.categoryEditor.setSlugTooltip"),onClick:()=>g(a),children:[r("sandbox.categoryEditor.addPostsButton"),t.jsx(tt,{size:14})]})]}),S>0&&t.jsx("ul",{className:"divide-y border-t bg-background",children:F.map(e=>t.jsx("li",{children:t.jsxs("button",{type:"button",onClick:()=>D(e.key),className:"flex w-full items-center gap-2.5 px-4 py-2.5 text-left transition-colors hover:bg-muted cursor-pointer",children:[t.jsx(W,{size:14,className:"shrink-0 text-muted-foreground"}),t.jsxs("span",{className:"min-w-0 flex-1",children:[t.jsx("span",{className:"block truncate text-sm",children:e.title||r("sandbox.categoryEditor.untitledPost")}),e.slug&&t.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:e.slug})]})]})},e.key))})]})]})})]}),t.jsx(rt,{open:!!c,onOpenChange:e=>{e||N||(b(a),C(null))},children:t.jsxs(it,{children:[t.jsxs(st,{children:[t.jsx(at,{children:r("sandbox.categoryEditor.renameDialogTitle")}),t.jsx(nt,{children:c?r("sandbox.categoryEditor.renameDialogDescription",{oldSlug:c.oldSlug,newSlug:c.newSlug,count:String(c.count)}):null})]}),t.jsxs(mt,{children:[t.jsx(lt,{disabled:N,children:r("sandbox.categoryEditor.cancelButton")}),t.jsx(pt,{onClick:e=>{e.preventDefault(),c&&V(c.oldSlug,c.newSlug)},disabled:N,children:N?t.jsxs(t.Fragment,{children:[t.jsx(K,{size:14,className:"animate-spin"}),r("sandbox.categoryEditor.renamingLabel")]}):r("sandbox.categoryEditor.renameActionButton")})]})]})})]})}export{Er as CategoryEditor};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import{I as re,c as O,a4 as Ge,u as Oe,b3 as ot,p as Ne,H as Y,K as oe,t as ae,R as de,d as Xe,c_ as it,dF as ct,r as M,o as lt,ac as ut,e as dt,aY as pt,j as X,b as $e,a as ft,x as ht,cO as mt,aB as gt,q as yt}from"./index-Ci8azyOE.js";import{e as Ye,b as St,g as bt,A as ze,c as vt,h as Tt,j as It,w as Mt}from"./use-panel-navigate-BsVeEWlx.js";import{p as kt}from"./session-runtime-C-KTDVeQ.js";import{S as xt,c as Ct,f as $t,a as wt}from"./hooks-DQmp7LHz.js";import{u as At}from"./use-is-desktop-app-BNujXJc_.js";import{u as Et}from"./use-mcp-client-DP2onozC.js";import{S as _t}from"./constants-dLUUoWH7.js";import{a as Pt}from"./use-virtual-mcp-Dj0wXB98.js";import{u as Ze,p as Rt,b as be,i as Dt,c as Ot}from"./use-ai-providers-DlWIkMD-.js";import{u as Nt}from"./use-decopilot-events-CqU7DunK.js";import{D as Ft}from"./use-destination-route-d8wgPDBu.js";import{b as Lt}from"./use-organization-settings-BAFLKQ3y.js";function Fe(t,e){return re.chatThreadIntent(t,e)}function je(t,e,s,n){if(!(!n.runtime&&!n.branch))try{t.setItem(Fe(e,s),JSON.stringify(n))}catch{}}function Qe(t,e,s){try{t.removeItem(Fe(e,s))}catch{}}function zs(t,e,s){const n=Fe(e,s);let r=null;try{r=t.getItem(n),t.removeItem(n)}catch{return{}}if(!r)return{};let a;try{a=JSON.parse(r)}catch{return{}}if(!a||typeof a!="object")return{};const o=a,i=kt(o.runtime),u=typeof o.branch=="string"&&o.branch?o.branch:void 0;return{...i?{runtime:i}:{},...u?{branch:u}:{}}}function qt(t,e=[]){return t==="stop"?"completed":t==="tool-calls"?e.some(n=>n.type==="tool-user_ask"&&n.state==="input-available"||n.state==="approval-requested")?"requires_action":"completed":"failed"}const Be={"claude-code-desktop":"claude-code","codex-desktop":"codex","opencode-desktop":"opencode"};function Ut(t){return t==="claude-code"?"claude-code-desktop":t==="codex"?"codex-desktop":t==="opencode"?"opencode-desktop":null}function jt({pendingOption:t,lockedHarness:e}){return e?Ut(e):t}function Qt(t){return t.thread?.harness_id!=null?{}:{branch:t.globals.branch??null}}const Bt=new Set(["decopilot","claude-code"]);function Ht({isDesktopApp:t,harnessId:e}){return e!=null&&!Bt.has(e)}const Vt="home",Wt=new Set(["output","upload","public","home"]),Kt=/^[A-Za-z0-9][A-Za-z0-9._-]*$/;function Zs(t){return Wt.has(t)||!Kt.test(t)?"home":t}function Gt(t){const e=t?t.split("/").filter(Boolean):[],s=e[0]==="public",n=s?e[1]??null:null,r=s?n?`public-${n}`:null:e[0]??null,a=(s?e.slice(2):e.slice(1)).join("/");return{segments:e,volume:r,dirPath:a,isPublic:s,publicSet:n,readOnly:s,isHomeRoot:r===Vt&&a===""}}function Js(t){return t==="public"?"skills":t}function en(t,e){return t.isPublic&&t.publicSet?`public/${t.publicSet}/${e}`:t.volume?`${t.volume}/${e}`:e}const He="public-";function Je(t){return t.startsWith(He)?t.slice(He.length):null}function tn(t,e){const s=Je(t);return s?`public/${s}/${e}`:`${t}/${e}`}function Xt(t){const e=t.lastIndexOf("/");return e===-1?t:t.slice(e+1)}function Yt(t){const{volume:e,dirPath:s}=Gt(t);if(!e)return null;let n;if(e==="home")n="org/home";else if(e==="outputs")n="org/.outputs";else if(e==="uploads")n="org/.uploads";else{const r=Je(e);n=r?`org/public/${r}`:`org/${e}`}return s?`${n}/${s}`:n}function zt(t){const e=O.c(19);let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId",shouldThrow:!1},e[0]=s):s=e[0];const n=Ge(s);let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},e[1]=r):r=e[1];const a=Oe(r),o=Ye();let i;e[2]!==o||e[3]!==a?(i=ot(o)?.path??a.preview??a.skill??a.brand??null,e[2]=o,e[3]=a,e[4]=i):i=e[4];const u=i;let f;if(e[5]!==n?.params.appSlug||e[6]!==n?.params.collectionName||e[7]!==n?.params.itemId||e[8]!==u||e[9]!==t){if(f=[],t&&f.push(`### Selected Agent
|
|
2
|
-
- ID: ${t}`),u){let k;e[11]!==u?(k=Yt(u),e[11]=u,e[12]=k):k=e[12];const $=k;let d;e[13]!==u?(d=Xt(u),e[13]=u,e[14]=d):d=e[14],f.push(`### Currently Open File
|
|
3
|
-
The user has this file open in the Library and is most likely referring to it:
|
|
4
|
-
- Name: ${d}
|
|
5
|
-
- Library path: ${u}${$?`
|
|
6
|
-
- Read/edit it with your file tools at: \`${$}\``:""}
|
|
7
|
-
|
|
8
|
-
When a request is ambiguous about which file or resource it targets (e.g. "change the h1", "fix this", "what's in this file", "update the title"), assume it means this file unless the user clearly indicates otherwise.`)}let h;e[15]!==n?.params.appSlug||e[16]!==n?.params.collectionName||e[17]!==n?.params.itemId?(h=[],n?.params.appSlug&&h.push(`- Connection ID: ${n?.params.appSlug}`),n?.params.collectionName&&h.push(`- Collection: ${n?.params.collectionName}`),n?.params.itemId&&h.push(`- Item ID: ${n?.params.itemId}`),e[15]=n?.params.appSlug,e[16]=n?.params.collectionName,e[17]=n?.params.itemId,e[18]=h):h=e[18],h.length>0&&f.push(`### Current Resource
|
|
9
|
-
The user is viewing the following resource:
|
|
10
|
-
${h.join(`
|
|
11
|
-
`)}
|
|
12
|
-
|
|
13
|
-
Help the user understand and work with this resource.`),e[5]=n?.params.appSlug,e[6]=n?.params.collectionName,e[7]=n?.params.itemId,e[8]=u,e[9]=t,e[10]=f}else f=e[10];return f.join(`
|
|
14
|
-
|
|
15
|
-
`)}function Zt(){const t=O.c(5),e=Ne(),{org:s}=Y();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId",shouldThrow:!1},t[0]=n):n=t[0];const r=Ge(n);let a;return t[1]!==r?.params||t[2]!==s||t[3]!==e?(a=o=>{const u=o.toolCall.toolName.match(/^COLLECTION_([A-Z_]+)_(CREATE|UPDATE|DELETE)$/);if(!u||!u[1])return;const f=u[1],h=r?.params.appSlug;if(!h)return;e.invalidateQueries({queryKey:oe.collection(s.slug,h,f)});const k=f.toLowerCase().replace(/_/g," ");ae.success(`${k} updated`)},t[1]=r?.params,t[2]=s,t[3]=e,t[4]=a):a=t[4],a}function Jt(){const t=O.c(4),{org:e,project:s}=Y(),n=`${e.id}/${s.id}`;let r;t[0]!==n?(r=re.taskLastViewed(n),t[0]=n,t[1]=r):r=t[1];const[,a]=de(r,es);let o;return t[2]!==a?(o={markTaskRead:u=>{a(f=>({...f,[u]:new Date().toISOString()}))}},t[2]=a,t[3]=o):o=t[3],o}function es(t){return t??{}}function et(){const t=O.c(11),e=Xe(),{org:s}=Y(),n=St(),r=bt(),a=Ye();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},t[0]=o):o=t[0];const i=Oe(o);let u;t[1]!==a||t[2]!==e||t[3]!==s||t[4]!==i||t[5]!==r?(u=(k,$)=>{const d=a&&!it(a)?a:void 0,x=d?ct(d):null;e({to:Ft.agents,params:{org:s.slug,project:$?.virtualMcpId??r,panel:x?.panel},search:{thread:k,...x?.payload??{},...typeof i.sidepanel=="boolean"?{sidepanel:i.sidepanel}:{},...$?.autosend?{autosend:ze}:{}}})},t[1]=a,t[2]=e,t[3]=s,t[4]=i,t[5]=r,t[6]=u):u=t[6];const f=u;let h;return t[7]!==f||t[8]!==n||t[9]!==r?(h={virtualMcpId:r,taskId:n,navigateToTask:f},t[7]=f,t[8]=n,t[9]=r,t[10]=h):h=t[10],h}function ts(t,e){const{mimeType:s,data:n}=t;if(s.startsWith("text/"))try{const r=new TextDecoder().decode(Uint8Array.from(atob(n),a=>a.charCodeAt(0)));return[{type:"text",text:`${e}
|
|
16
|
-
${r}`}]}catch(r){console.error("Failed to decode text file:",r)}return[{type:"file",url:`data:${s};base64,${n}`,filename:e,mediaType:s}]}function Ve(t,e){const s=[];for(const n of t)!n||typeof n!="object"||("text"in n&&n.text?s.push({type:"text",text:`[${e}]
|
|
17
|
-
${n.text}`}):"blob"in n&&n.blob&&n.mimeType&&s.push({type:"file",url:`data:${n.mimeType};base64,${n.blob}`,filename:String(n.uri),mediaType:String(n.mimeType)}));return s}function ss(t,e){const s=(t.files??[]).filter(o=>o.content?.trim()),n=t.omittedPaths??[];if(s.length===0&&n.length===0)return[];const r=s.map(o=>`<skill-file path="${o.relPath}">
|
|
18
|
-
${o.content.trim()}
|
|
19
|
-
</skill-file>`).join(`
|
|
20
|
-
|
|
21
|
-
`),a=n.length>0?`
|
|
22
|
-
|
|
23
|
-
Other files in \`${t.sandboxPath}/\`: ${n.join(", ")}`:"";return[{type:"text",text:`[${e}]
|
|
24
|
-
${r}${a}`}]}function ns(t,e){const s=[];for(const n of t){if(n.role!=="user"||!n.content)continue;const r=Array.isArray(n.content)?n.content:[n.content];for(const a of r)switch(a.type){case"text":{const o=a.text?.trim();if(!o)continue;s.push({type:"text",text:`[${e}]
|
|
25
|
-
${o}`});break}case"image":case"audio":{if(!a.data||!a.mimeType)continue;s.push({type:"file",url:`data:${a.mimeType};base64,${a.data}`,mediaType:a.mimeType});break}case"resource":{const o=a.resource;if(!o||!o.mimeType)continue;o&&("text"in o&&o.text?s.push({type:"text",text:`[${e}]
|
|
26
|
-
${o.text}`}):"blob"in o&&o.blob&&o.mimeType&&s.push({type:"file",url:`data:${o.mimeType};base64,${o.blob}`,filename:String(o.uri),mediaType:String(o.mimeType)}));break}}}return s}function tt(t){if(!t)return[];const e=[];let s="";const n=r=>{if(r){if(r.type==="text"&&"text"in r&&typeof r.text=="string")s+=r.text;else if(r.type==="mention"&&r.attrs){const a=r.attrs.char??"/",o=`${a}${r.attrs.name}`;if(r.attrs.kind==="task"){const i=r.attrs.metadata,u=i?.title??r.attrs.name??"",f=i?.context?.trim()||[u,i?.description?.trim()].filter(Boolean).join(`
|
|
27
|
-
|
|
28
|
-
`);f&&e.push({type:"text",text:f});return}if(s+=o,a==="@"){const i=r.attrs.metadata;i&&typeof i=="object"&&!Array.isArray(i)&&"agentId"in i?e.push({type:"text",text:`[DELEGATE TO AGENT: ${i.title??r.attrs.name} (agent_id: ${i.agentId})]
|
|
29
|
-
Use the subtask tool to delegate this task to the agent above. Include the full relevant context from this conversation in the prompt field — the subagent has no conversation history.`}):Array.isArray(i)&&e.push(...Ve(i,o))}else if(r.attrs.kind==="skill"){const i=r.attrs.metadata;i&&!Array.isArray(i)&&Array.isArray(i.files)&&e.push(...ss(i,o))}else{const i=r.attrs.metadata||r.attrs.prompts||[];Array.isArray(i)&&i.length>0&&typeof i[0]=="object"&&i[0]!==null&&"role"in i[0]?e.push(...ns(i,o)):Array.isArray(i)&&e.push(...Ve(i,o))}}else if(r.type==="file"&&r.attrs){const a=r.attrs,o=`[file:://${encodeURIComponent(a.name)}]`;s+=o,e.push(...ts(a,o))}if("content"in r&&Array.isArray(r.content))for(const a of r.content)n(a)}};return n(t),s.trim()&&e.unshift({type:"text",text:s.trim()}),e}function sn(t){const e=tt(t);return e.length===0?[]:[{id:crypto.randomUUID(),role:"user",parts:e,metadata:{tiptapDoc:t}}]}function nn(t){return new Set(t.filter(e=>e.status==="queued").map(e=>e.messageId))}function rs(t){return(t??[]).map(e=>e?.type==="text"&&typeof e.text=="string"?e.text:"").join("").trim()}function rn(t){return t.filter(e=>e.status==="queued").sort((e,s)=>e.enqueuedAt-s.enqueuedAt)}function as(t,e){return t.some(s=>s.messageId===e.messageId)?t:[...t,e]}function os(t,e){return t.filter(s=>s.messageId!==e)}const te=new Map,is=200;function cs(t){if(te.size<is||te.has(t))return;const e=te.keys().next().value;if(e!==void 0){te.delete(e),we.delete(e);for(const s of pe.keys())s.startsWith(`${e}:`)&&pe.delete(s)}}const we=new Set;function ls(t){we.add(t)}function us(t){return we.has(t)}function ds(t){we.delete(t)}function Te(t){const e=te.get(t);if(e)return te.delete(t),te.set(t,e),e;cs(t);const s=new xt([]);return te.set(t,s),s}function st(t,e){Te(t).update(s=>as(s,e))}function De(t,e){Te(t).update(s=>os(s,e))}function ps(t,e){Te(t).set(e)}const pe=new Map;function fs(t,e){pe.set(`${t}:${e.id}`,e)}function hs(t,e){const s=`${t}:${e}`,n=pe.get(s);return pe.delete(s),n}function We(t,e){pe.delete(`${t}:${e}`)}async function ee(t,e){try{const s=await fetch(`/api/${encodeURIComponent(t)}/decopilot/queue/${encodeURIComponent(e)}`,{credentials:"include"});if(!s.ok)return;const n=await s.json();ps(e,n.items??[])}catch{}}function an(t){const e=O.c(2);let s;e[0]!==t?(s=Te(t),e[0]=t,e[1]=s):s=e[1];const n=s;return M.useSyncExternalStore(n.subscribe,n.get,n.get)}function ms(){const{org:t}=Y();return{enqueue:st,refresh:e=>ee(t.slug,e),cancel:async(e,s)=>{const n=`thread-run:${e}:${s}`;De(e,s);try{const r=await fetch(`/api/${encodeURIComponent(t.slug)}/decopilot/queue/${encodeURIComponent(e)}/cancel/${encodeURIComponent(n)}`,{method:"POST",credentials:"include"});if(!r.ok&&r.status!==404)throw new Error(`Cancel failed: ${r.status}`);return!0}catch(r){return ae.error(r instanceof Error?r.message:"Failed to cancel"),!1}finally{await ee(t.slug,e)}}}}function Ce(t,e){return t.find(s=>s!=null&&e.has(s.keyId))??null}function gs(t,e,s){const n=r=>Ce([r],s);return{tiers:{fast:Ce([e.tiers.fast,t.tiers.fast],s),smart:Ce([e.tiers.smart,t.tiers.smart],s),thinking:Ce([e.tiers.thinking,t.tiers.thinking],s),image:n(t.tiers.image),web_search:n(t.tiers.web_search),deep_research:n(t.tiers.deep_research)}}}const ve={tiers:{}};function ys(){const t=O.c(7),{org:e}=Y();let s;t[0]!==e.id?(s=oe.userModelPreferences(e.id),t[0]=e.id,t[1]=s):s=t[1];let n;t[2]!==e.slug?(n=async()=>{const a=await pt(e.slug,"USER_MODEL_PREFERENCES_GET",{});return a?.tiers?a:ve},t[2]=e.slug,t[3]=n):n=t[3];let r;return t[4]!==s||t[5]!==n?(r={queryKey:s,queryFn:n,staleTime:6e4},t[4]=s,t[5]=n,t[6]=r):r=t[6],lt(r)}function Ss(){return ys().data??ve}function on(){const t=O.c(19),{org:e}=Y(),s=ut(),n=Ne();let r;t[0]!==e.id?(r=oe.userModelPreferences(e.id),t[0]=e.id,t[1]=r):r=t[1];const a=r;let o;t[2]!==a||t[3]!==n||t[4]!==s?(o=async $=>{const d=n.getQueryData(a)??ve;return await s.call("USER_MODEL_PREFERENCES_UPDATE",d)??d},t[2]=a,t[3]=n,t[4]=s,t[5]=o):o=t[5];let i,u,f,h;t[6]!==a||t[7]!==n?(i=$=>{const{tier:d,slot:x}=$,N=n.getQueryData(a),F=N??ve;return n.setQueryData(a,{tiers:{...F.tiers,[d]:x}}),{prev:N}},u=($,d,x)=>{n.setQueryData(a,x?.prev??ve)},f=$=>{n.setQueryData(a,$)},h=()=>{n.isMutating({mutationKey:a})===1&&n.invalidateQueries({queryKey:a})},t[6]=a,t[7]=n,t[8]=i,t[9]=u,t[10]=f,t[11]=h):(i=t[8],u=t[9],f=t[10],h=t[11]);let k;return t[12]!==a||t[13]!==o||t[14]!==i||t[15]!==u||t[16]!==f||t[17]!==h?(k={mutationKey:a,mutationFn:o,onMutate:i,onError:u,onSuccess:f,onSettled:h},t[12]=a,t[13]=o,t[14]=i,t[15]=u,t[16]=f,t[17]=h,t[18]=k):k=t[18],dt(k)}function bs(){const t=O.c(4),e=Lt(),s=Ss(),n=Ze();let r;return t[0]!==n||t[1]!==e||t[2]!==s?(r=gs(e,s,new Set(n.map(vs))),t[0]=n,t[1]=e,t[2]=s,t[3]=r):r=t[3],r}function vs(t){return t.id}function ne(t,e,s,n){if(!t)return null;const r=e.find(o=>o.id===t.keyId);if(!r)return null;const a=s.find(o=>o.modelId===t.modelId);return a?{...a,keyId:t.keyId}:{modelId:t.modelId,title:n??t.modelId,keyId:t.keyId,providerId:r.providerId,description:null,logo:null,capabilities:[],limits:null,costs:null}}function Ts(t){return t==="fast"||t==="smart"||t==="thinking"?t:"smart"}function Is(t,e,s,n){if(!s||n.length===0)return null;const r=e.find(u=>u.id===s);if(!r)return null;const a=Rt([r],{[s]:n}),o=t==="fast"?a.chat.fast:t==="thinking"?a.chat.thinking:a.chat.smart;if(!o)return null;const i=n.find(u=>u.modelId===o.modelId);return i?{...i,keyId:s}:null}const Ke=new Set,J=new Set;function ue(t){return M.useSyncExternalStore(t.subscribe,t.get,t.get)}function Ms(t){return t.kind==="loading"?"ready":t.kind}function nt(t){return t&&typeof t=="object"&&"type"in t?{tiptapDoc:t}:t}const ks=1e4,xs=10,Ie=M.createContext(null),Ae=M.createContext(null),Le=M.createContext(null),rt=M.createContext(null);function Cs(t){const e=O.c(3),{value:s,children:n}=t;let r;return e[0]!==n||e[1]!==s?(r=X.jsx(Ie.Provider,{value:s,children:n}),e[0]=n,e[1]=s,e[2]=r):r=e[2],r}function cn(t){const e=O.c(2),{children:s}=t;let n;return e[0]!==s?(n=X.jsx(Ie.Provider,{value:null,children:X.jsx(Ae.Provider,{value:null,children:s})}),e[0]=s,e[1]=n):n=e[1],n}function $s({children:t}){const{locator:e}=Y(),{virtualMcpId:s}=et(),[n,r]=de(re.chatSelectedImageModel(e),null),[a,o]=de(re.chatSelectedWebSearchModel(e),null),[i,u]=de(re.chatSelectedDeepResearchModel(e),null),[f,h]=M.useState(null),[k,$]=M.useState("default"),d=bs(),[x,N]=de(re.chatSimpleModeTier(e),null),F=Ts(x),T=Ze(),C=d.tiers[F],U=T.some(c=>c.id===C?.keyId)?C?.keyId:void 0,j=f&&T.some(c=>c.id===f)?f:U??T[0]?.id??null,{models:P,isLoading:w}=be(j??void 0),{models:E}=be(U),z=T.some(c=>c.id===d.tiers.image?.keyId)?d.tiers.image?.keyId:void 0,{models:se}=be(z),R=T.some(c=>c.id===d.tiers.web_search?.keyId)?d.tiers.web_search?.keyId:void 0,{models:Q}=be(R),L=T.some(c=>c.id===d.tiers.deep_research?.keyId)?d.tiers.deep_research?.keyId:void 0,{models:V}=be(L),W=ne(C,T,E,C?.title)??Is(F,T,j,P),K=w,G=P.filter(c=>c.capabilities?.includes("image")),B=ne(n,T,G),m=ne(d.tiers.image,T,se,d.tiers.image?.title)??B??G[0]??null,S=P.filter(Dt),I=ne(a,T,S),q=S.find(c=>c.modelId==="perplexity/sonar")??S[0]??null,Z=ne(d.tiers.web_search,T,Q,d.tiers.web_search?.title)??I??q,ie=P.filter(Ot),Ee=ne(i,T,ie),D=ie.find(c=>c.modelId==="perplexity/deep-research")??ie.find(c=>c.asyncResearch===!0)??ie[0]??null,fe=ne(d.tiers.deep_research,T,V,d.tiers.deep_research?.title)??Ee??D,Me=Pt(s)??{id:s,title:"",description:null,icon:null},[_e,he]=M.useState({}),ke=(c,A)=>{const y=[];for(const g of A.content??[])g.type==="text"&&g.text?.trim()&&y.push(g.text.trim());const v=y.join(`
|
|
30
|
-
`);if(!v){me(c);return}new TextEncoder().encode(v).length>ks||he(g=>Object.keys(g).length>=xs&&!(c in g)?g:{...g,[c]:v})},me=c=>{he(A=>{const{[c]:y,...v}=A;return v})},[ge,Pe]=de(re.chatLastAgentOption(e),c=>c&&c in Be?c:null),xe=Ls(),ye=jt({pendingOption:ge,lockedHarness:xe?.isThreadLocked?xe.lockedHarness:null}),Ue=ye?Be[ye]:null,[ce,Re]=M.useState(void 0),l=M.useRef(ce);l.current=ce;const p={selectedModel:W,setModel:()=>{},credentialId:j,setCredentialId:h,allModelsConnections:T,isModelsLoading:K,selectedVirtualMcp:Me,imageModel:m,setImageModel:c=>{r(c?.keyId?{keyId:c.keyId,modelId:c.modelId}:null)},webSearchModel:Z,setWebSearchModel:c=>{o(c?.keyId?{keyId:c.keyId,modelId:c.modelId}:null)},deepResearchModel:fe,setDeepResearchModel:c=>{u(c?.keyId?{keyId:c.keyId,modelId:c.modelId}:null)},chatMode:k,setChatMode:$,appContexts:_e,setAppContext:ke,clearAppContext:me,tiptapDoc:ce,setTiptapDoc:Re,tiptapDocRef:l,resetInteraction:()=>{},simpleModeTier:F,setSimpleModeTier:c=>N(c),pendingAgentOption:ye,setPendingAgentOption:Pe,pendingHarnessId:Ue};return X.jsx(Le.Provider,{value:p,children:t})}function ln(t){const e=O.c(41),{virtualMcpId:s,task:n,children:r}=t,{locator:a}=Y(),{data:o}=ft.useSession(),i=o?.user??null,{taskId:u,virtualMcpId:f,navigateToTask:h}=et(),[k]=ht(),{markTaskRead:$}=Jt(),d=wt(),x=u,N=f,F=zt(N);let T;e[0]!==$||e[1]!==h?(T=(S,I)=>{$(S),h(S,{virtualMcpId:I?.virtualMcpId,autosend:I?.autosend})},e[0]=$,e[1]=h,e[2]=T):T=e[2];const C=T,U=x!==null&&n?.id===x?n:null,j=U?.harness_id??null,P=U?.branch??null,w=j!=null,E=P;let z;e[3]!==E||e[4]!==a||e[5]!==C||e[6]!==d||e[7]!==s?(z=S=>{const I=crypto.randomUUID(),q=S?.branch??E;return je(sessionStorage,a,I,{...S?.runtime?{runtime:S.runtime}:{},...q?{branch:q}:{}}),d.create({id:I,virtual_mcp_id:s,...q?{branch:q}:{},...S?.runtime?{runtime:S.runtime}:{}}).then(()=>{Qe(sessionStorage,a,I),C(I)}).catch(()=>{C(I)}),I},e[3]=E,e[4]=a,e[5]=C,e[6]=d,e[7]=s,e[8]=z):z=e[8];const se=z;let R;e[9]!==E||e[10]!==a||e[11]!==C||e[12]!==d||e[13]!==s?(R=S=>{const I=crypto.randomUUID(),q=S.virtualMcpId??s,Z=q===s?E:null;Mt(sessionStorage,a,I,S.message),Z&&je(sessionStorage,a,I,{branch:Z}),d.create({id:I,virtual_mcp_id:q,...Z?{branch:Z}:{}}).then(()=>{Qe(sessionStorage,a,I),C(I,{virtualMcpId:S.virtualMcpId,autosend:!0})}).catch(()=>{C(I,{virtualMcpId:S.virtualMcpId,autosend:!0})})},e[9]=E,e[10]=a,e[11]=C,e[12]=d,e[13]=s,e[14]=R):R=e[14];const Q=R;let L;e[15]!==x||e[16]!==d?(L=S=>{x&&d.setBranch(x,S)},e[15]=x,e[16]=d,e[17]=L):L=e[17];let V;e[18]!==U||e[19]!==se||e[20]!==Q||e[21]!==E||e[22]!==x||e[23]!==N||e[24]!==w||e[25]!==P||e[26]!==j||e[27]!==C||e[28]!==L?(V={virtualMcpId:N,taskId:x,openTask:C,createTask:se,createTaskWithMessage:Q,activeTask:U,isThreadLocked:w,lockedHarness:j,lockedBranch:P,currentBranch:E,setCurrentTaskBranch:L},e[18]=U,e[19]=se,e[20]=Q,e[21]=E,e[22]=x,e[23]=N,e[24]=w,e[25]=P,e[26]=j,e[27]=C,e[28]=L,e[29]=V):V=e[29];const W=V;let K;e[30]!==F||e[31]!==k||e[32]!==h||e[33]!==i?(K={user:i,contextPrompt:F,preferences:k,rawNavigateToTask:h},e[30]=F,e[31]=k,e[32]=h,e[33]=i,e[34]=K):K=e[34];const G=K;let B;e[35]!==r||e[36]!==G?(B=X.jsx($s,{children:X.jsx(rt.Provider,{value:G,children:r})}),e[35]=r,e[36]=G,e[37]=B):B=e[37];let m;return e[38]!==B||e[39]!==W?(m=X.jsx(Ae.Provider,{value:W,children:B}),e[38]=B,e[39]=W,e[40]=m):m=e[40],m}const ws=[];function un(t){const e=O.c(5),{children:s}=t,{createTaskWithMessage:n}=at();let r;e[0]!==n?(r={messages:ws,status:"ready",sendMessage:async i=>{n({message:nt(i)})},editQueuedMessage:Ns,stop:Os,submit:Ds,removeLocalMessage:Rs,isSendInFlight:Ps,error:null,clearError:_s,finishReason:null,runStatusStage:null,clearFinishReason:Es,isStreaming:!1,isChatEmpty:!0,isWaitingForApprovals:!1,isRunInProgress:!1,hasMoreOlder:!1,isFetchingOlder:!1,fetchOlderMessages:As},e[0]=n,e[1]=r):r=e[1];const a=r;let o;return e[2]!==s||e[3]!==a?(o=X.jsx(Cs,{value:a,children:s}),e[2]=s,e[3]=a,e[4]=o):o=e[4],o}async function As(){}function Es(){}function _s(){}function Ps(){return!1}function Rs(){}async function Ds(){}function Os(){}async function Ns(){return!1}function dn({taskId:t,children:e}){const s=$e(),n=At(),{virtualMcpId:r,activeTask:a,currentBranch:o}=at(),i=Ht({isDesktopApp:n,harnessId:a?.harness_id}),u=s("chat.input.codingAgentRequiresDesktop");Ke.has(t)||(Ke.add(t),yt("chat_opened",{thread_id:t}));const{imageModel:f,webSearchModel:h,deepResearchModel:k,chatMode:$,setChatMode:d,appContexts:x,setTiptapDoc:N,simpleModeTier:F}=Fs(),T=M.useContext(rt);if(!T)throw new Error(s("chat.chatContext.activeTaskProviderMissingContext"));const{user:C,contextPrompt:U,preferences:j,rawNavigateToTask:P}=T,{org:w,locator:E}=Y(),z=ms(),[se,R]=M.useState(null),Q=()=>{R(new Error(u))},L=Zt(),V=Ne(),W=Ct(),K=Xe(),{openPanel:G}=vt(),B=Et({connectionId:_t,orgId:w.id,orgSlug:w.slug}),m=$t(w.slug,t,{client:B});M.use(m.ready);const S=ue(m.messages),I=ue(m.status),q=ue(m.finishReason),Z=ue(m.runStatusStage),ie=ue(m.hasMoreOlder),Ee=ue(m.isFetchingOlder),D=M.useRef({onToolCall:L,queryClient:V,rawNavigateToTask:P,taskId:t,manager:W,navigate:K,openPanel:G,orgId:w.id,orgSlug:w.slug});D.current={onToolCall:L,queryClient:V,rawNavigateToTask:P,taskId:t,manager:W,navigate:K,openPanel:G,orgId:w.id,orgSlug:w.slug},Nt({orgSlug:w.slug,taskId:t,onTaskStatus:l=>{const p=D.current,c=l.data.message_id;if(l.data.status==="in_progress"&&c){De(p.taskId,c);const A=hs(p.taskId,c);A&&m.applyLocalMessage(A),ee(p.orgSlug,p.taskId)}us(p.taskId)&&(async()=>(await ee(p.orgSlug,p.taskId),await m.reconcileFromServer()&&Te(p.taskId).get().length===0&&ds(p.taskId)))()}}),M.useEffect(()=>{const l={onData:y=>{if(y.type==="data-thread-title"){const v=y.data;if(!v?.title)return;const g=D.current;if(!g.taskId)return;g.manager.patchThread({id:g.taskId,title:v.title,updated_at:new Date().toISOString()});return}if(y.type==="data-deck-updated"){const v=y.data;if(!v?.path)return;const g=v.path,b=D.current;b.queryClient.invalidateQueries({queryKey:oe.orgFsStat(b.orgId,"home",g)}),b.queryClient.invalidateQueries({queryKey:oe.orgFsRecent(b.orgId)}),b.openPanel(mt(g));return}if(y.type==="data-open-preview"){const v=y.data,g=D.current,b=g.taskId;if(b){const le=g.manager.threads.get().find(H=>H.id===b);g.manager.patchThread({id:b,...v?.branch?{branch:v.branch}:{},metadata:{...le?.metadata??{},...v?.githubRepo?{githubRepo:v.githubRepo}:{},...v?.sandboxMap?{sandboxMap:v.sandboxMap}:{}}})}g.openPanel("preview");return}},onFinish:(y,v,g)=>{const b=D.current;b.taskId&&ee(b.orgSlug,b.taskId),b.taskId&&b.manager.patchThread({id:b.taskId,status:qt(g,y.parts),updated_at:new Date().toISOString()});const le=y.parts?.some(_=>{const Se=_;return(Se.type==="tool-bash"||Se.type==="tool-write")&&Se.state==="output-available"});if(b.taskId&&le){const _=oe.threadOutputs(b.taskId);for(const Se of[0,1500,3e3,6e3,12e3,25e3])setTimeout(()=>{b.queryClient.invalidateQueries({queryKey:_})},Se)}b.queryClient.invalidateQueries({queryKey:oe.homeNextActions(b.orgSlug)});const H=y.metadata?.thread_id;H&&H!==b.taskId&&b.rawNavigateToTask(H)},onError:y=>{R(y),console.error("[chat] Error",y)},onToolCall:y=>D.current.onToolCall(y)};m.observer=l,ee(D.current.orgSlug,D.current.taskId);const p=y=>y==="submitted"||y==="streaming";let c=p(m.status.get().kind);const A=m.status.subscribe(()=>{const y=p(m.status.get().kind);if(y===c)return;c=y;const v=D.current;ee(v.orgSlug,v.taskId)});return()=>{m.observer===l&&(m.observer=null),A()}},[m]);const fe=I.kind==="submitted"||I.kind==="streaming",qe=S.length===0,Me=S.at(-1),_e=!fe&&Me?.role==="assistant"&&Me.parts.some(l=>"state"in l&&l.state==="approval-requested"),he=a,ke=(he?.status==="in_progress"||he?.status==="expired")&&I.kind==="ready"&&S.length>0;async function me(l){const p=t,c=r;if(i)return Q(),J.delete(p),!1;const A=Object.entries(x),y=A.length>0?A.map(([H,_])=>`### App Context: ${H}
|
|
31
|
-
${_}`).join(`
|
|
32
|
-
|
|
33
|
-
`):"",v=[U,y].filter(Boolean).join(`
|
|
34
|
-
|
|
35
|
-
`);let g=$;g==="gen-image"&&!f&&(g="default"),g==="web-search"&&!h&&(g="default"),g==="deep-research"&&!k&&(g="default"),(g==="web-search"||g==="deep-research")&&d("default");const b=Qt({thread:a?{harness_id:a.harness_id??null,branch:a.branch??null}:null,globals:{branch:o}});a?.harness_id||W.patchThread({id:p,harness_id:"decopilot",updated_at:new Date().toISOString()});const le={tier:F,mode:g,toolApprovalLevel:j.toolApprovalLevel??gt(),system:v||void 0,agent:{id:c},thread_id:p,...b};try{if(fe||ke){let H=!0;try{fs(p,l),await m.enqueue(l,le),st(p,{workflowId:`thread-run:${p}:${l.id}`,messageId:l.id,text:rs(l.parts),hasAttachments:l.parts.some(_=>_.type==="file"),status:"queued",enqueuedAt:Date.now(),optimistic:!0}),ls(p)}catch(_){H=!1,We(p,l.id),De(p,l.id),R(_ instanceof Error?_:new Error(String(_))),ae.error(_ instanceof Error?_.message:s("chat.chatContext.failedToQueueMessage"))}return ee(w.slug,p),H}return await m.submit({kind:"message",message:l},le),!0}finally{J.delete(p)}}async function ge(l){const p=l.parts??tt(l.tiptapDoc);if(p.length===0||J.has(t))return;J.add(t),R(null),N(void 0);const c={tiptapDoc:l.tiptapDoc,created_at:new Date().toISOString(),user:{avatar:C?.image??void 0,name:C?.name??"you"}},A={id:crypto.randomUUID(),role:"user",parts:p,metadata:c};await me(A)}async function Pe(l,p){if(i)return Q(),!1;if(J.has(t))return ae.info(s("chat.chatContext.stillSendingPreviousMessage")),!1;if(J.add(t),!await z.cancel(t,l))return J.delete(t),ae.error(s("chat.chatContext.couldNotRemoveOriginalMessage")),!1;We(t,l),m.removeLocalMessage(l);const A={id:crypto.randomUUID(),role:"user",parts:[{type:"text",text:p}],metadata:{created_at:new Date().toISOString(),user:{avatar:C?.image??void 0,name:C?.name??"you"}}};try{return await me(A)}catch(y){return ae.error(y instanceof Error?y.message:s("chat.chatContext.failedToSendEditedMessage")),!1}}const xe=async()=>{m.stop();try{const l=await fetch(`/api/${w.slug}/decopilot/cancel/${t}`,{method:"POST",credentials:"include"});if(l.status===404)return;if(!l.ok){const p=await l.json().catch(()=>({}));throw new Error(p.message??s("chat.chatContext.cancelFailedStatus",{status:l.status}))}}catch(l){const p=l instanceof Error?l.message:s("chat.chatContext.failedToCancel");ae.error(p),console.error("[chat] cancelRun",l)}},ye=l=>ge(nt(l)),ce=Oe({strict:!1}).autosend===ze;M.useEffect(()=>{if(!ce||S.length>0||i)return;const l=Tt(sessionStorage,E,t);l&&ge(l.message).then(()=>{It(sessionStorage,E,t)})},[ce,S.length,i,E,t,ge]);const Re={messages:S,status:Ms(I),sendMessage:ye,editQueuedMessage:Pe,stop:()=>{if(i){Q();return}xe()},submit:async(l,p)=>{if(i){Q();return}await m.submit(l,p)},removeLocalMessage:l=>m.removeLocalMessage(l),isSendInFlight:()=>J.has(t),error:se,clearError:()=>R(null),finishReason:q,runStatusStage:Z,clearFinishReason:()=>m.finishReason.set(null),isStreaming:fe,isChatEmpty:qe,isWaitingForApprovals:_e??!1,isRunInProgress:ke,hasMoreOlder:ie,isFetchingOlder:Ee,fetchOlderMessages:m.fetchOlderMessages.bind(m)};return X.jsx(Ie.Provider,{value:Re,children:e})}function pn(){const t=$e(),e=M.useContext(Ie);if(!e)throw new Error(t("chat.chatContext.useChatStreamMissingContext"));return e}function fn(){return M.useContext(Ie)}function at(){const t=$e(),e=M.useContext(Ae);if(!e)throw new Error(t("chat.chatContext.useChatTaskMissingContext"));return e}function Fs(){const t=$e(),e=M.useContext(Le);if(!e)throw new Error(t("chat.chatContext.useChatPrefsMissingContext"));return e}function hn(){return M.useContext(Le)}function Ls(){return M.useContext(Ae)}export{dn as A,zs as B,$s as C,hn as D,cn as E,Vt as H,un as T,pn as a,Ls as b,at as c,an as d,ms as e,We as f,Ce as g,ys as h,on as i,bs as j,fn as k,Ht as l,ln as m,nn as n,tt as o,Gt as p,Xt as q,Js as r,rn as s,sn as t,Fs as u,Zs as v,en as w,Je as x,tn as y,et as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as y,j as s,u as w,b as S,d as v,B as N,N as T,o as $,K as C,k as I}from"./index-Ci8azyOE.js";import{D as K}from"./use-destination-route-d8wgPDBu.js";import{A as k}from"./agent-icon-DCM1Bdl8.js";import{R as A}from"./required-auth-layout-CUQaC9Hr.js";import"./AlertCircle-BTlJp8pf.js";import"./UserSquare-CwU4sG2o.js";import"./Tool01-va49aYq9.js";import"./ArrowUp-CVoISkQ4.js";import"./ArrowLeft-BwagOJkb.js";import"./Tool02-jKKU1_dM.js";import"./XCircle-CVbKXkpd.js";import"./TrendUp01-DikSDrNg.js";import"./ZapSquare-BZzRAQpm.js";import"./Users03-BUoBV4mB.js";import"./CheckCircle-teyxVGFp.js";import"./Check-D5PKBQ5I.js";import"./ChevronDown-Csfjhwpm.js";import"./ChevronRight-DUmHQrD7.js";import"./ChevronSelectorVertical-CuAhXy3x.js";import"./ChevronUp-Dlj_U0qV.js";import"./DotsVertical-CpVcGDJ_.js";import"./Stars02-DZNA1z2-.js";import"./Copy01-CsNpp9jr.js";import"./CreditCard01-YCHpZ00A.js";import"./Download01-BN9BT9cL.js";import"./Settings02-BMcJFHpd.js";import"./Eye-DgiSa7UT.js";import"./FilterLines-Db8-uWfr.js";import"./Share07-CPDrxQV8.js";import"./Globe01-CV-16mwB.js";import"./Globe04-D3O2XfOT.js";import"./SwitchHorizontal01-CSyGO1HX.js";import"./HardDrive-CWvDYc59.js";import"./Key01-D4srNqPO.js";import"./LinkExternal01-CIL2SNWf.js";import"./LockUnlocked01-BpeKJGM4.js";import"./LogOut01-qWWgaWbQ.js";import"./Monitor01-uq-dlf-u.js";import"./Sun-BBWjOwQE.js";import"./Palette-Cv68Zggp.js";import"./Play-C9xK8clC.js";import"./Plus-CPkR-QLd.js";import"./SearchLg-8daQliv2.js";import"./SearchMd-ClTH3fiN.js";import"./Shield01-C9M_jcOJ.js";import"./Stars01-BzEDQnsl.js";import"./Trash01-Dp-QTpAR.js";import"./Upload01-DxCHPffq.js";import"./User01-DJ_BO2EX.js";import"./Users01-B2wc_Wgl.js";import"./XClose-CTv0nnSb.js";import"./Zap-MbQ2aiA8.js";async function F(t){const e=new URLSearchParams({site:t}),l=await fetch(`/api/_editor-resolve?${e.toString()}`,{headers:{Accept:"application/json"}});if(!l.ok){const r=new Error(`editor-resolve HTTP ${l.status}`);throw r.status=l.status,r}return await l.json()}function R(t){const e=t?.status;return typeof e=="number"&&e>=400&&e<500}function _(t){return{...t.pageId?{contentPageId:t.pageId}:{},...t.path?{contentPath:t.path}:{},...t.pathTemplate?{contentPathTemplate:t.pathTemplate}:{}}}function b(t){const e=y.c(2),{children:l}=t;let r;return e[0]!==l?(r=s.jsx("div",{className:"flex min-h-screen w-full items-center justify-center bg-background p-6",children:s.jsx("div",{className:"flex w-full max-w-md flex-col items-center gap-6 text-center",children:l})}),e[0]=l,e[1]=r):r=e[1],r}function P(){const t=y.c(5),e=S();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(I,{size:24,className:"animate-spin text-muted-foreground"}),t[0]=l):l=t[0];let r;t[1]!==e?(r=e("chooseEditor.resolving"),t[1]=e,t[2]=r):r=t[2];let i;return t[3]!==r?(i=s.jsxs(b,{children:[l,s.jsx("p",{className:"text-sm text-muted-foreground",children:r})]}),t[3]=r,t[4]=i):i=t[4],i}function E(t){const e=y.c(29),{titleKey:l,descriptionKey:r,onRetry:i}=t,n=S(),p=v();let m;e[0]!==n||e[1]!==l?(m=n(l),e[0]=n,e[1]=l,e[2]=m):m=e[2];let u;e[3]!==m?(u=s.jsx("h1",{className:"text-lg font-medium text-foreground",children:m}),e[3]=m,e[4]=u):u=e[4];let d;e[5]!==r||e[6]!==n?(d=n(r),e[5]=r,e[6]=n,e[7]=d):d=e[7];let a;e[8]!==d?(a=s.jsx("p",{className:"text-sm text-muted-foreground",children:d}),e[8]=d,e[9]=a):a=e[9];let c;e[10]!==u||e[11]!==a?(c=s.jsxs("div",{className:"flex flex-col gap-2",children:[u,a]}),e[10]=u,e[11]=a,e[12]=c):c=e[12];let f;e[13]!==i||e[14]!==n?(f=i?s.jsx(N,{variant:"outline",onClick:i,children:n("chooseEditor.retry")}):null,e[13]=i,e[14]=n,e[15]=f):f=e[15];let o;e[16]!==p?(o=()=>p({to:"/"}),e[16]=p,e[17]=o):o=e[17];let g;e[18]!==n?(g=n("chooseEditor.backToStudio"),e[18]=n,e[19]=g):g=e[19];let j;e[20]!==o||e[21]!==g?(j=s.jsx(N,{onClick:o,children:g}),e[20]=o,e[21]=g,e[22]=j):j=e[22];let x;e[23]!==f||e[24]!==j?(x=s.jsxs("div",{className:"flex items-center gap-2",children:[f,j]}),e[23]=f,e[24]=j,e[25]=x):x=e[25];let h;return e[26]!==x||e[27]!==c?(h=s.jsxs(b,{children:[c,x]}),e[26]=x,e[27]=c,e[28]=h):h=e[28],h}function q(t){const e=y.c(6),{orgSlug:l,projectId:r,pageSearch:i}=t;let n;e[0]!==l||e[1]!==r?(n={org:l,project:r,panel:"content"},e[0]=l,e[1]=r,e[2]=n):n=e[2];let p;return e[3]!==i||e[4]!==n?(p=s.jsx(T,{to:K.agents,params:n,search:i,replace:!0}),e[3]=i,e[4]=n,e[5]=p):p=e[5],p}function D(t){const e=y.c(26),{matches:l,pageSearch:r}=t,i=S(),n=v();let p;e[0]!==n||e[1]!==r?(p=x=>{n({to:K.agents,params:{org:x.orgSlug,project:x.project.id,panel:"content"},search:r})},e[0]=n,e[1]=r,e[2]=p):p=e[2];const m=p;let u;e[3]!==i?(u=i("chooseEditor.chooser.title"),e[3]=i,e[4]=u):u=e[4];let d;e[5]!==u?(d=s.jsx("h1",{className:"text-lg font-medium text-foreground",children:u}),e[5]=u,e[6]=d):d=e[6];let a;e[7]!==i?(a=i("chooseEditor.chooser.subtitle"),e[7]=i,e[8]=a):a=e[8];let c;e[9]!==a?(c=s.jsx("p",{className:"text-sm text-muted-foreground",children:a}),e[9]=a,e[10]=c):c=e[10];let f;e[11]!==d||e[12]!==c?(f=s.jsxs("div",{className:"flex flex-col gap-2",children:[d,c]}),e[11]=d,e[12]=c,e[13]=f):f=e[13];let o;if(e[14]!==l||e[15]!==m||e[16]!==i){let x;e[18]!==m||e[19]!==i?(x=h=>s.jsxs("button",{type:"button",onClick:()=>m(h),"aria-label":i("chooseEditor.chooser.openAriaLabel",{title:h.project.title,org:h.orgName}),className:"flex w-full items-center gap-3 rounded-lg border border-border bg-card p-3 text-left transition-colors hover:bg-accent",children:[s.jsx(k,{icon:h.project.icon,name:h.project.title,size:"sm"}),s.jsxs("div",{className:"flex min-w-0 flex-col",children:[s.jsx("span",{className:"truncate text-sm font-medium text-foreground",children:h.project.title}),s.jsx("span",{className:"truncate text-xs text-muted-foreground",children:h.orgName})]})]},`${h.orgSlug}/${h.project.id}`),e[18]=m,e[19]=i,e[20]=x):x=e[20],o=l.map(x),e[14]=l,e[15]=m,e[16]=i,e[17]=o}else o=e[17];let g;e[21]!==o?(g=s.jsx("div",{className:"flex w-full flex-col gap-2",children:o}),e[21]=o,e[22]=g):g=e[22];let j;return e[23]!==f||e[24]!==g?(j=s.jsxs(b,{children:[f,g]}),e[23]=f,e[24]=g,e[25]=j):j=e[25],j}function L(){const t=y.c(24);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/choose-editor"},t[0]=e):e=t[0];const l=w(e);let r,i,n,p;t[1]!==l?(i=l.site?.trim()??"",r=_(l),p=$,n=C.editorResolve(i),t[1]=l,t[2]=r,t[3]=i,t[4]=n,t[5]=p):(r=t[2],i=t[3],n=t[4],p=t[5]);let m;t[6]!==i?(m=()=>F(i),t[6]=i,t[7]=m):m=t[7];const u=i.length>0;let d;t[8]!==n||t[9]!==m||t[10]!==u?(d={queryKey:n,queryFn:m,enabled:u,staleTime:1/0,retry:z},t[8]=n,t[9]=m,t[10]=u,t[11]=d):d=t[11];const a=p(d);if(!i){let o;return t[12]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(E,{titleKey:"chooseEditor.notFound.title",descriptionKey:"chooseEditor.notFound.description"}),t[12]=o):o=t[12],o}if(a.isError){let o;return t[13]!==a?(o=R(a.error)?s.jsx(E,{titleKey:"chooseEditor.notFound.title",descriptionKey:"chooseEditor.notFound.description"}):s.jsx(E,{titleKey:"chooseEditor.error.title",descriptionKey:"chooseEditor.error.description",onRetry:()=>a.refetch()}),t[13]=a,t[14]=o):o=t[14],o}if(!a.data){let o;return t[15]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(P,{}),t[15]=o):o=t[15],o}const{matches:c}=a.data;if(c.length===0){let o;return t[16]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(E,{titleKey:"chooseEditor.notFound.title",descriptionKey:"chooseEditor.notFound.description"}),t[16]=o):o=t[16],o}if(c.length===1&&c[0]){let o;return t[17]!==c[0].orgSlug||t[18]!==c[0].project.id||t[19]!==r?(o=s.jsx(q,{orgSlug:c[0].orgSlug,projectId:c[0].project.id,pageSearch:r}),t[17]=c[0].orgSlug,t[18]=c[0].project.id,t[19]=r,t[20]=o):o=t[20],o}let f;return t[21]!==c||t[22]!==r?(f=s.jsx(D,{matches:c,pageSearch:r}),t[21]=c,t[22]=r,t[23]=f):f=t[23],f}function z(t,e){return!R(e)&&t<2}function Le(){const t=y.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(A,{children:s.jsx(L,{})}),t[0]=e):e=t[0],e}export{Le as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as M,j as t,B as K,k as oe,ak as Ge,an as ie,b as Q,E as Ee,r as D,H as xe,cb as Xe,cc as Oe,aw as Ze,u as et,L as ee,aa as tt,ab as Se,a8 as ye,a9 as we,t as st,n as Ce,f as fe,cd as Re}from"./index-Ci8azyOE.js";import{E as Me}from"./empty-state-DAYLBxJ6.js";import{u as he}from"./use-mcp-client-DP2onozC.js";import{d as re,F as ot,a as ae,b as ce}from"./form-DauSI86Q.js";import{I as ue}from"./input-Bwz-dTwg.js";import{T as pe}from"./textarea-CMpN0SgX.js";import{a as nt,b as lt,V as ge,O as it,M as rt}from"./index-q2Rm7O_h.js";import{aM as at,Q as ct,aN as dt,aj as mt,al as ut,aO as pt,o as Ie}from"./agent-icon-DCM1Bdl8.js";import{g as xt,M as ft,a as Te}from"./types-BGVeElFe.js";import{A as ht,a as gt,b as jt}from"./alert-CIFaGTb_.js";import{S as $e,a as Pe,b as ke,c as Ae,d as de}from"./select-C7Q2VGxk.js";import{i as bt}from"./AlertCircle-BTlJp8pf.js";import{s as Nt}from"./Stars02-DZNA1z2-.js";import{a as vt}from"./Copy01-CsNpp9jr.js";import{i as St}from"./Play-C9xK8clC.js";import{B as Fe,a as ze,b as Y,c as te,d as se,e as Le}from"./breadcrumb-Clut3vXk.js";import{g as yt}from"./connection-slug-CITJ0kGN.js";import{u as wt,T as Ct}from"./use-mcp-auth-status-7KFU7IPU.js";import{a as Be,u as Ue}from"./use-connection-gqhqm1hO.js";import{a as It}from"./use-mcp-tools-B7yHzu9T.js";import{M as Tt,c as $t}from"./monaco-editor-CQbDSum8.js";import{I as De}from"./integration-icon-CGnrGZxM.js";import{k as Pt,D as kt}from"./chat-context-CmwZXAhQ.js";import{u as At}from"./shell-layout-i3nUAnDL.js";import{n as Dt}from"./Tool02-jKKU1_dM.js";import"./constants-dLUUoWH7.js";import"./auth-D8IdOmGw.js";import"./label-C1OhLpvf.js";import"./Key01-D4srNqPO.js";import"./extract-connection-data-6cVSTGuY.js";import"./metadata-dUsYcpuu.js";import"./use-registry-connections-DghvIzKh.js";import"./use-organization-settings-BAFLKQ3y.js";import"./task-board-Cz-fiaKF.js";import"./Plus-CPkR-QLd.js";import"./index-De-kCEdQ.js";import"./index-B9iOsEIc.js";import"./index-BYBf2qjQ.js";import"./popover-ClwD_xra.js";import"./use-virtual-mcp-Dj0wXB98.js";import"./Check-D5PKBQ5I.js";import"./SearchMd-ClTH3fiN.js";import"./Users03-BUoBV4mB.js";import"./use-create-virtual-mcp-Dzmlrw8C.js";import"./use-navigate-to-agent-mrg2_DxJ.js";import"./use-destination-route-d8wgPDBu.js";import"./hooks-DQmp7LHz.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-BN-M5EUb.js";import"./session-runtime-C-KTDVeQ.js";import"./slugify-CEUa2lfQ.js";import"./UserSquare-CwU4sG2o.js";import"./Tool01-va49aYq9.js";import"./ArrowUp-CVoISkQ4.js";import"./ArrowLeft-BwagOJkb.js";import"./XCircle-CVbKXkpd.js";import"./TrendUp01-DikSDrNg.js";import"./ZapSquare-BZzRAQpm.js";import"./CheckCircle-teyxVGFp.js";import"./ChevronDown-Csfjhwpm.js";import"./ChevronRight-DUmHQrD7.js";import"./ChevronSelectorVertical-CuAhXy3x.js";import"./ChevronUp-Dlj_U0qV.js";import"./DotsVertical-CpVcGDJ_.js";import"./CreditCard01-YCHpZ00A.js";import"./Download01-BN9BT9cL.js";import"./Settings02-BMcJFHpd.js";import"./Eye-DgiSa7UT.js";import"./FilterLines-Db8-uWfr.js";import"./Share07-CPDrxQV8.js";import"./Globe01-CV-16mwB.js";import"./Globe04-D3O2XfOT.js";import"./SwitchHorizontal01-CSyGO1HX.js";import"./HardDrive-CWvDYc59.js";import"./LinkExternal01-CIL2SNWf.js";import"./LockUnlocked01-BpeKJGM4.js";import"./LogOut01-qWWgaWbQ.js";import"./Monitor01-uq-dlf-u.js";import"./Sun-BBWjOwQE.js";import"./Palette-Cv68Zggp.js";import"./SearchLg-8daQliv2.js";import"./Shield01-C9M_jcOJ.js";import"./Stars01-BzEDQnsl.js";import"./Trash01-Dp-QTpAR.js";import"./Upload01-DxCHPffq.js";import"./User01-DJ_BO2EX.js";import"./Users01-B2wc_Wgl.js";import"./XClose-CTv0nnSb.js";import"./Zap-MbQ2aiA8.js";import"./badge-DX3_GQsO.js";import"./mcp-oauth-GWhqBwu1.js";import"./spinner-B9x-ViPH.js";import"./use-panel-navigate-BsVeEWlx.js";import"./dialog-BI8UUwqv.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-ai-providers-DlWIkMD-.js";import"./use-decopilot-events-CqU7DunK.js";import"./avatar-D-QkiqIH.js";import"./required-auth-layout-CUQaC9Hr.js";import"./use-org-sso-C-uWWD5m.js";function Et(s){const e=M.c(15),{onSave:r,onUndo:o,isDirty:n,isSaving:l,saveLabel:a,undoLabel:u}=s,c=a===void 0?"Save":a,i=u===void 0?"Undo":u;if(!n)return null;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(at,{size:14}),e[0]=x):x=e[0];let h;e[1]!==l||e[2]!==o||e[3]!==i?(h=t.jsxs(K,{variant:"outline",size:"sm",onClick:o,disabled:l,"aria-label":i,children:[x,i]}),e[1]=l,e[2]=o,e[3]=i,e[4]=h):h=e[4];let d;e[5]!==l?(d=l?t.jsx(oe,{size:14,className:"animate-spin"}):t.jsx(ct,{size:14}),e[5]=l,e[6]=d):d=e[6];let f;e[7]!==l||e[8]!==r||e[9]!==c||e[10]!==d?(f=t.jsxs(K,{variant:"default",size:"sm",onClick:r,disabled:l,"aria-label":c,children:[d,c]}),e[7]=l,e[8]=r,e[9]=c,e[10]=d,e[11]=f):f=e[11];let p;return e[12]!==h||e[13]!==f?(p=t.jsxs(t.Fragment,{children:[h,f]}),e[12]=h,e[13]=f,e[14]=p):p=e[14],p}Ge({title:ie().min(1),description:ie().nullable(),body:ie()});function me(s){for(const e of s.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function Ot(){const s=window.location.pathname.split("/").filter(Boolean),e=s.findIndex(o=>o==="mcps"),r=e>=0?s[e+1]:void 0;return r?decodeURIComponent(r):void 0}function Rt(s){const e=M.c(43),{form:r}=s,o=Q();let n;e[0]!==o?(n=o("details.prompt.details"),e[0]=o,e[1]=n):n=e[1];let l;e[2]!==n?(l=t.jsx("div",{className:"text-sm font-medium text-foreground",children:n}),e[2]=n,e[3]=l):l=e[3];let a;e[4]!==o?(a=w=>{const{field:N}=w;return t.jsxs(ae,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:o("details.prompt.title")}),t.jsx(ce,{children:t.jsx(ue,{...N,placeholder:o("details.prompt.titlePlaceholder"),className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})},e[4]=o,e[5]=a):a=e[5];let u;e[6]!==r.control||e[7]!==a?(u=t.jsx(re,{control:r.control,name:"title",render:a}),e[6]=r.control,e[7]=a,e[8]=u):u=e[8];let c;e[9]!==o?(c=w=>{const{field:N}=w;return t.jsxs(ae,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:o("details.prompt.description")}),t.jsx(ce,{children:t.jsx(ue,{...N,value:N.value??"",placeholder:o("details.prompt.descriptionPlaceholder"),className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})},e[9]=o,e[10]=c):c=e[10];let i;e[11]!==r.control||e[12]!==c?(i=t.jsx(re,{control:r.control,name:"description",render:c}),e[11]=r.control,e[12]=c,e[13]=i):i=e[13];let x;e[14]!==u||e[15]!==i?(x=t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[u,i]}),e[14]=u,e[15]=i,e[16]=x):x=e[16];let h;e[17]!==l||e[18]!==x?(h=t.jsxs("div",{className:"flex flex-col gap-4",children:[l,x]}),e[17]=l,e[18]=x,e[19]=h):h=e[19];let d;e[20]!==o?(d=o("details.prompt.message"),e[20]=o,e[21]=d):d=e[21];let f;e[22]!==d?(f=t.jsx("div",{className:"text-sm font-medium text-foreground",children:d}),e[22]=d,e[23]=f):f=e[23];let p;e[24]!==o?(p=o("details.prompt.messageDescription"),e[24]=o,e[25]=p):p=e[25];let g;e[26]!==p?(g=t.jsx("div",{className:"text-xs text-muted-foreground",children:p}),e[26]=p,e[27]=g):g=e[27];let b;e[28]!==o?(b=w=>{const{field:N}=w;return t.jsx(ae,{children:t.jsx(ce,{children:t.jsx(pe,{...N,value:N.value??"",placeholder:o("details.prompt.bodyPlaceholder"),className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})},e[28]=o,e[29]=b):b=e[29];let S;e[30]!==r.control||e[31]!==b?(S=t.jsx(re,{control:r.control,name:"body",render:b}),e[30]=r.control,e[31]=b,e[32]=S):S=e[32];let $;e[33]!==f||e[34]!==g||e[35]!==S?($=t.jsxs("div",{className:"flex flex-col gap-2",children:[f,g,S]}),e[33]=f,e[34]=g,e[35]=S,e[36]=$):$=e[36];let y;e[37]!==$||e[38]!==h?(y=t.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[h,$]}),e[37]=$,e[38]=h,e[39]=y):y=e[39];let P;return e[40]!==r||e[41]!==y?(P=t.jsx(ot,{...r,children:y}),e[40]=r,e[41]=y,e[42]=P):P=e[42],P}function Mt(s){const e=M.c(42),{providerId:r,promptId:o}=s,n=Q(),{org:l}=xe(),a=r||null;let u;e[0]!==l.id||e[1]!==l.slug||e[2]!==a?(u={connectionId:a,orgId:l.id,orgSlug:l.slug},e[0]=l.id,e[1]=l.slug,e[2]=a,e[3]=u):u=e[3];const c=he(u),i=Xe(r,"PROMPT",o,c),x=Oe(r,"PROMPT",c),h=x.update.isPending;let d;e[4]!==i?(d=i?{title:i.title,description:i.description??null,body:me(i)}:void 0,e[4]=i,e[5]=d):d=e[5];let f;e[6]!==d?(f={values:d},e[6]=d,e[7]=f):f=e[7];const p=Ze(f);let g;e[8]!==p||e[9]!==i?(g=()=>{i&&p.reset({title:i.title,description:i.description??null,body:me(i)})},e[8]=p,e[9]=i,e[10]=g):g=e[10];const b=g;let S;e[11]!==x.update||e[12]!==p||e[13]!==o?(S=p.handleSubmit(async C=>{const I=await x.update.mutateAsync({id:o,data:{title:C.title,description:C.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:C.body}}]}});p.reset({title:I.title,description:I.description??null,body:me(I)})}),e[11]=x.update,e[12]=p,e[13]=o,e[14]=S):S=e[14];const $=S;if(!i){let C;e[15]!==n?(C=n("details.prompt.notFoundTitle"),e[15]=n,e[16]=C):C=e[16];let I;e[17]!==n?(I=n("details.prompt.notFoundDescription"),e[17]=n,e[18]=I):I=e[18];let O;return e[19]!==C||e[20]!==I?(O=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Me,{title:C,description:I})}),e[19]=C,e[20]=I,e[21]=O):O=e[21],O}let y;e[22]!==i.title?(y=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:i.title}),e[22]=i.title,e[23]=y):y=e[23];let P;e[24]!==i.description?(P=i.description?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"•"}),t.jsx("span",{className:"text-xs text-muted-foreground font-normal truncate min-w-0 max-w-[20ch]",children:i.description})]}):null,e[24]=i.description,e[25]=P):P=e[25];let w;e[26]!==y||e[27]!==P?(w=t.jsx(lt,{children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[y,P]})}),e[26]=y,e[27]=P,e[28]=w):w=e[28];let N;e[29]!==$?(N=()=>{$()},e[29]=$,e[30]=N):N=e[30];let k;e[31]!==p.formState.isDirty||e[32]!==h||e[33]!==b||e[34]!==N?(k=t.jsx(nt,{children:t.jsx(Et,{onSave:N,onUndo:b,isDirty:p.formState.isDirty,isSaving:h})}),e[31]=p.formState.isDirty,e[32]=h,e[33]=b,e[34]=N,e[35]=k):k=e[35];let A;e[36]!==p?(A=t.jsx("div",{className:"h-full",children:t.jsx(Rt,{form:p})}),e[36]=p,e[37]=A):A=e[37];let E;return e[38]!==k||e[39]!==A||e[40]!==w?(E=t.jsxs(ge,{children:[w,k,A]}),e[38]=k,e[39]=A,e[40]=w,e[41]=E):E=e[41],E}function Ft(s){const e=M.c(10),{itemId:r}=s,o=Q();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=Ot(),e[0]=n):n=e[0];const l=n;if(!l){let u;e[1]!==o?(u=o("details.prompt.notFoundTitle"),e[1]=o,e[2]=u):u=e[2];let c;e[3]!==o?(c=o("details.prompt.missingConnectionDescription"),e[3]=o,e[4]=c):c=e[4];let i;return e[5]!==u||e[6]!==c?(i=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Me,{title:u,description:c})}),e[5]=u,e[6]=c,e[7]=i):i=e[7],i}let a;return e[8]!==r?(a=t.jsx(Ee,{children:t.jsx(D.Suspense,{fallback:null,children:t.jsx(Mt,{providerId:l,promptId:r})})}),e[8]=r,e[9]=a):a=e[9],a}const zt=s=>s.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Lt(s){const e=M.c(12),{toolName:r,connectionId:o,siblings:n,onSelectInstance:l,onBack:a}=s,u=Q();let c;e[0]!==o?(c={connectionId:o},e[0]=o,e[1]=c):c=e[1];const i=wt(c);if(!i.isAuthenticated){let d;return e[2]!==i.supportsOAuth||e[3]!==a||e[4]!==u?(d=t.jsx("div",{className:"flex h-full items-center justify-center",children:i.supportsOAuth?t.jsx(it,{onAuthenticate:()=>a(),buttonText:u("details.tool.goBackToAuthenticate")}):t.jsx(rt,{hasReadme:!1})}),e[2]=i.supportsOAuth,e[3]=a,e[4]=u,e[5]=d):d=e[5],d}const x=`${o}:${r}`;let h;return e[6]!==o||e[7]!==l||e[8]!==n||e[9]!==x||e[10]!==r?(h=t.jsx(Bt,{toolName:r,connectionId:o,siblings:n,onSelectInstance:l},x),e[6]=o,e[7]=l,e[8]=n,e[9]=x,e[10]=r,e[11]=h):h=e[11],h}function Bt({toolName:s,connectionId:e,siblings:r,onSelectInstance:o}){const n=Q(),{replayId:l}=et({strict:!1}),a=(()=>{if(!l)return null;const m=`replay-${l}`,j=sessionStorage.getItem(m);if(!j)return null;sessionStorage.removeItem(m);try{return JSON.parse(j)}catch{return null}})(),u=(()=>{if(!a)return null;const m={};for(const[j,T]of Object.entries(a))T!==null&&typeof T=="object"?m[j]=JSON.stringify(T,null,2):m[j]=T;return m})(),[c,i]=D.useState(u??{}),[x,h]=D.useState(a?JSON.stringify(a,null,2):"{}"),[d,f]=D.useState(null),[p,g]=D.useState(null),[b,S]=D.useState(null),[$,y]=D.useState(null),[P,w]=D.useState(!1),[N,k]=D.useState(null),{org:A}=xe(),E=Be(e),C=Pt(),I=kt(),{openSidePanel:O}=At(),U=`${e}:${s}`,F=he({connectionId:e,orgId:A.id,orgSlug:A.slug}),V=It({client:F}),v=V.data?.tools?.find(m=>m.name===s),R=xt(v?._meta),J=m=>{if(!C)return;const j=$t(m.content);j.content.length>0&&(O(),C.sendMessage({tiptapDoc:j}))},[z,L]=D.useState("json"),[q,W]=D.useState(!1);R&&!q&&(L("ui"),W(!0));const _=v?.inputSchema?.properties,je=_?Object.keys(_):[],G=je.length>0,X={};if(G&&v?.inputSchema?.properties)for(const m of je)X[m]=v.inputSchema.required?.includes(m)?"":void 0;const ne=m=>Object.prototype.hasOwnProperty.call(c,m),Ve=async()=>{w(!0),y(null),f(null),g(null),S(null),k(null);const m=performance.now();try{if(!F)throw new Error("MCP client is not available");const j=G?{...X,...c}:(()=>{const B=x.trim();if(!B)return{};const H=JSON.parse(B);if(H&&typeof H=="object")return H;throw new Error("Raw JSON input must be an object.")})();G&&v?.inputSchema?.properties&&Object.entries(v.inputSchema.properties).forEach(([B,H])=>{if((H.type==="object"||H.type==="array")&&typeof j[B]=="string")try{j[B]=JSON.parse(j[B])}catch{}else if((H.type==="number"||H.type==="integer")&&typeof j[B]=="string"&&j[B]!==""){const ve=Number(j[B]);Number.isNaN(ve)||(j[B]=ve)}});const T=await F.callTool({name:s,arguments:j}),Z=T.structuredContent??T,Qe=performance.now(),We=Math.round(Qe-m);f(Z),g(T),S(j);const Ye=JSON.stringify(Z),Ne=new TextEncoder().encode(Ye).length;k({duration:`${We}ms`,bytes:`${Ne} bytes`,tokens:`~${Math.ceil(Ne/4)} tokens`,cost:"$0.0000"})}catch(j){const T=j instanceof Error?j.message:String(j);y(T||"Unknown error occurred");const Z=performance.now();k({duration:`${Math.round(Z-m)}ms`})}finally{w(!1)}},le=(m,j)=>{i(T=>({...T,[m]:j}))},_e=()=>{f(null),g(null),S(null),y(null),k(null)},Je=v?.name??zt(s),qe=t.jsx(Fe,{children:t.jsxs(ze,{children:[t.jsx(Y,{children:t.jsx(te,{asChild:!0,children:t.jsx(ee,{to:"/$org/settings/connections",params:{org:A.slug},children:n("details.tool.connections")})})}),t.jsx(se,{}),E&&t.jsxs(t.Fragment,{children:[t.jsx(Y,{children:t.jsx(te,{asChild:!0,children:t.jsx(ee,{to:"/$org/settings/connections/$appSlug",params:{org:A.slug,appSlug:yt(E)},search:{tab:"tools"},children:E.title})})}),t.jsx(se,{})]}),t.jsx(Y,{children:t.jsx(Le,{children:Je})})]})}),be=r.length>1&&t.jsxs($e,{value:e,onValueChange:o,children:[t.jsx(Pe,{className:"h-8 w-auto min-w-[200px]",children:t.jsx(ke,{})}),t.jsx(Ae,{children:r.map(m=>t.jsx(de,{value:m.id,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(De,{icon:m.icon,name:m.title,size:"xs",className:"shrink-0"}),m.title]})},m.id))})]}),He=t.jsxs("div",{className:"flex flex-col p-6 gap-4 overflow-auto",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:n("details.tool.parameters")}),v?.inputSchema?.required&&v.inputSchema.required.length>0&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"text-destructive",children:"*"})," ",n("details.tool.required")]})]}),t.jsx("div",{className:"space-y-4",children:G&&v?.inputSchema?.properties?Object.entries(v.inputSchema.properties).map(([m,j])=>t.jsxs("div",{className:"space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[m,v.inputSchema?.required?.includes(m)&&t.jsx("span",{className:"text-destructive text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:j.type})]}),j.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:j.description}),j.type==="object"||j.type==="array"?t.jsx(pe,{className:"font-mono text-xs",value:ne(m)?c[m]??"":X[m]??"",onChange:T=>le(m,T.target.value),placeholder:n("details.tool.enterAsJson",{key:m}),rows:3}):j.type==="boolean"?t.jsxs($e,{value:ne(m)?String(c[m]??""):"",onValueChange:T=>le(m,T==="true"),children:[t.jsx(Pe,{children:t.jsx(ke,{placeholder:n("details.tool.selectTrueOrFalse")})}),t.jsxs(Ae,{children:[t.jsx(de,{value:"true",children:"true"}),t.jsx(de,{value:"false",children:"false"})]})]}):t.jsx(ue,{value:ne(m)?c[m]??"":X[m]??"",onChange:T=>le(m,T.target.value),placeholder:n("details.tool.enter",{key:m})})]},m)):v?.inputSchema&&!G?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:n("details.tool.rawJsonInput")}),t.jsx(pe,{className:"font-mono text-xs min-h-[120px]",value:x,onChange:m=>h(m.target.value),placeholder:n("details.tool.rawJsonExample")})]}):t.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:n("details.tool.noParametersRequired")})})}),t.jsx("div",{className:"flex items-center gap-2 pt-2",children:P?t.jsxs(K,{size:"sm",variant:"destructive",className:"h-8 gap-2",onClick:_e,children:[t.jsx(dt,{className:"h-3.5 w-3.5"}),n("details.tool.cancel")]}):t.jsxs(K,{size:"sm",variant:"default",className:"h-8 gap-2",onClick:Ve,children:[t.jsx(St,{className:"h-3.5 w-3.5 fill-current"}),n("details.tool.executeTool")]})})]}),Ke=t.jsxs("div",{className:"flex flex-col @3xl:h-full @3xl:overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-b border-border bg-background",children:[t.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:n("details.tool.result")}),t.jsxs("div",{className:"flex items-center gap-3",children:[N&&t.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(Nt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:N.duration})]}),N.tokens&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(mt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:N.tokens})]}),N.bytes&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ut,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:N.bytes})]}),N.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:N.cost})})]}),R&&t.jsx(tt,{children:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs(Se,{children:[t.jsx(ye,{asChild:!0,children:t.jsx(K,{size:"icon",variant:z==="ui"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>L("ui"),children:t.jsx(pt,{size:14})})}),t.jsx(we,{children:n("details.tool.interactiveView")})]}),t.jsxs(Se,{children:[t.jsx(ye,{asChild:!0,children:t.jsx(K,{size:"icon",variant:z==="json"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>L("json"),children:t.jsx(Ie,{size:14})})}),t.jsx(we,{children:n("details.tool.jsonView")})]})]})})]})]}),$&&t.jsx("div",{className:"px-6 py-4 bg-background",children:t.jsx(ht,{variant:"destructive",children:t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(bt,{className:"h-4 w-4"}),t.jsx(gt,{className:"mb-0",children:n("details.tool.executionFailed")})]}),t.jsx(jt,{className:"text-xs text-destructive",children:$})]})})}),t.jsx("div",{className:"relative flex-1 min-h-[400px] @3xl:min-h-0 @3xl:overflow-auto bg-muted/50",children:R&&z==="ui"&&F?t.jsx(D.Suspense,{fallback:t.jsx("div",{className:"flex items-center justify-center h-48",children:t.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx("div",{className:"size-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),t.jsx("span",{className:"text-sm",children:n("details.tool.loadingApp")})]})}),children:t.jsx(ft,{resourceURI:R,toolInfo:v?{tool:v}:void 0,toolInput:b??void 0,toolResult:p??void 0,displayMode:"fullscreen",minHeight:Te.view.minHeight,maxHeight:Te.view.maxHeight,client:F,onMessage:J,onUpdateModelContext:m=>I?.setAppContext(U,m),onTeardown:()=>I?.clearAppContext(U),className:"h-full"})}):d?t.jsxs(t.Fragment,{children:[t.jsx(Tt,{code:JSON.stringify(d,null,2),language:"json",height:"100%",readOnly:!0}),t.jsx(K,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(d,null,2)),st.success(n("details.tool.copiedToClipboard"))},children:t.jsx(vt,{className:"h-3.5 w-3.5"})})]}):t.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[t.jsx(Ie,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:n("details.tool.runToolToSeeResults")})]})})]});return t.jsx(ge,{breadcrumb:qe,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden @container",children:[t.jsxs("div",{className:"flex flex-col gap-3 py-7 px-8 bg-background border-b border-border shrink-0",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx(De,{icon:E?.icon||null,name:E?.title||s,size:"xl",className:"shrink-0"}),t.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground leading-none truncate",children:s}),t.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit shrink-0",children:[V.isSuccess?t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-success animate-pulse shrink-0"}):V.isLoading?t.jsx(oe,{size:10,className:"animate-spin text-warning shrink-0"}):t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-destructive shrink-0"}),t.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:V.isSuccess?"ready":V.isLoading?"connecting":"error"})]}),t.jsx(Ct,{annotations:v?.annotations,_meta:v?._meta}),t.jsx("div",{className:"hidden @3xl:flex items-center ml-auto shrink-0",children:be})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:v?.description||"No description available"})]}),r.length>1&&t.jsxs("div",{className:"flex @3xl:hidden items-center gap-3 px-8 py-3 border-b border-border",children:[t.jsx("span",{className:"text-xs font-medium text-muted-foreground shrink-0",children:n("details.tool.instance")}),be]}),t.jsx("div",{className:"flex-1 overflow-auto @3xl:overflow-hidden",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-[minmax(0,2fr)_minmax(0,5fr)] @3xl:h-full @3xl:grid-rows-1",children:[t.jsx("div",{className:"@3xl:border-r border-border @3xl:overflow-auto",children:He}),Ke]})})]})})}function Ut(s){const e=M.c(20),{itemId:r,siblings:o,onBack:n}=s,l=Q(),[a,u]=D.useState(o[0]?.id??"");let c;e[0]!==a||e[1]!==o?(c=o.find(f=>f.id===a)?.id??o[0]?.id??"",e[0]=a,e[1]=o,e[2]=c):c=e[2];const i=c;if(!Be(i||void 0)||!i){let f;e[3]!==l?(f=l("details.tool.connectionNotFound"),e[3]=l,e[4]=f):f=e[4];let p;e[5]!==f?(p=t.jsx("h3",{className:"text-lg font-semibold",children:f}),e[5]=f,e[6]=p):p=e[6];let g;e[7]!==l?(g=l("details.tool.connectionNotFoundMessage"),e[7]=l,e[8]=g):g=e[8];let b;e[9]!==g?(b=t.jsx("p",{className:"text-sm text-muted-foreground",children:g}),e[9]=g,e[10]=b):b=e[10];let S;return e[11]!==p||e[12]!==b?(S=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[p,b]})}),e[11]=p,e[12]=b,e[13]=S):S=e[13],S}let h;e[14]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(oe,{size:32,className:"animate-spin text-muted-foreground"})}),e[14]=h):h=e[14];let d;return e[15]!==i||e[16]!==n||e[17]!==o||e[18]!==r?(d=t.jsx(D.Suspense,{fallback:h,children:t.jsx(Lt,{toolName:r,connectionId:i,siblings:o,onSelectInstance:u,onBack:n})}),e[15]=i,e[16]=n,e[17]=o,e[18]=r,e[19]=d):d=e[19],d}function Vt(s){const e=M.c(21),{icon:r,illustration:o,title:n,description:l,buttonProps:a,buttonComponent:u,className:c,children:i}=s;let x;e[0]!==c?(x=Ce("flex flex-col items-center justify-center py-16 text-center",c),e[0]=c,e[1]=x):x=e[1];let h;e[2]!==r||e[3]!==o?(h=o?t.jsx("div",{className:"mb-4 text-muted-foreground/50",children:o}):r?t.jsx("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-muted/50 text-muted-foreground",children:r}):null,e[2]=r,e[3]=o,e[4]=h):h=e[4];let d;e[5]!==n?(d=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:n}),e[5]=n,e[6]=d):d=e[6];let f;e[7]!==l?(f=l&&t.jsx("div",{className:"text-sm text-muted-foreground",children:l}),e[7]=l,e[8]=f):f=e[8];let p;e[9]!==d||e[10]!==f?(p=t.jsxs("div",{className:"flex flex-col items-center gap-1 max-w-sm",children:[d,f]}),e[9]=d,e[10]=f,e[11]=p):p=e[11];let g;e[12]!==u||e[13]!==a?(g=(u??a)&&t.jsx("div",{className:"mt-4",children:u??(a&&t.jsx(K,{size:"sm",className:Ce(a?.className),...a}))}),e[12]=u,e[13]=a,e[14]=g):g=e[14];let b;return e[15]!==i||e[16]!==x||e[17]!==h||e[18]!==p||e[19]!==g?(b=t.jsxs("div",{className:x,children:[h,p,g,i]}),e[15]=i,e[16]=x,e[17]=h,e[18]=p,e[19]=g,e[20]=b):b=e[20],b}const _t={prompt:Ft};function Jt(){const s=M.c(9),e=Re();let r;s[0]===Symbol.for("react.memo_cache_sentinel")?(r={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=r):r=s[0];const o=fe(r),n=decodeURIComponent(o.itemId);let l;s[1]!==o.appSlug?(l={slug:o.appSlug},s[1]=o.appSlug,s[2]=l):l=s[2];const a=Ue(l);let u;s[3]!==e.history?(u=()=>{e.history.back()},s[3]=e.history,s[4]=u):u=s[4];const c=u,i=qt;let x;return s[5]!==c||s[6]!==n||s[7]!==a?(x=t.jsx(Ut,{itemId:n,siblings:a,onBack:c,onUpdate:i}),s[5]=c,s[6]=n,s[7]=a,s[8]=x):x=s[8],x}async function qt(s){return Promise.resolve()}function Ht(s){return s.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Kt(){const s=M.c(52),e=Re();let r;s[0]===Symbol.for("react.memo_cache_sentinel")?(r={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=r):r=s[0];const o=fe(r),n=Q(),l=decodeURIComponent(o.collectionName),a=decodeURIComponent(o.itemId);let u;s[1]!==e.history?(u=()=>{e.history.back()},s[1]=e.history,s[2]=u):u=s[2];const c=u,{org:i}=xe();let x;s[3]!==o.appSlug?(x={slug:o.appSlug},s[3]=o.appSlug,s[4]=x):x=s[4];const d=Ue(x)[0]??null,f=d?.id??"",p=f||"no-connection",g=f??null;let b;s[5]!==i.id||s[6]!==i.slug||s[7]!==g?(b={connectionId:g,orgId:i.id,orgSlug:i.slug},s[5]=i.id,s[6]=i.slug,s[7]=g,s[8]=b):b=s[8];const S=he(b),$=Oe(p,l,S);let y;s[9]!==$||s[10]!==a?(y=async _=>{a&&await $.update.mutateAsync({id:a,data:_})},s[9]=$,s[10]=a,s[11]=y):y=s[11];const P=y;let w;s[12]!==l?(w=l?.toLowerCase(),s[12]=l,s[13]=w):w=s[13];const N=w,k=N&&_t[N];let A;s[14]!==l?(A=Ht(l),s[14]=l,s[15]=A):A=s[15];const E=A;let C;s[16]!==i.slug?(C=t.jsx(Y,{children:t.jsx(te,{asChild:!0,children:t.jsx(ee,{to:"/$org/settings/connections",params:{org:i.slug},children:"Connections"})})}),s[16]=i.slug,s[17]=C):C=s[17];let I;s[18]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(se,{}),s[18]=I):I=s[18];let O;s[19]!==l||s[20]!==d||s[21]!==i.slug||s[22]!==o.appSlug?(O=d&&t.jsxs(t.Fragment,{children:[t.jsx(Y,{children:t.jsx(te,{asChild:!0,children:t.jsx(ee,{to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:o.appSlug},search:{tab:l},children:d.title})})}),t.jsx(se,{})]}),s[19]=l,s[20]=d,s[21]=i.slug,s[22]=o.appSlug,s[23]=O):O=s[23];let U;s[24]!==E?(U=t.jsx(Y,{children:t.jsx(Le,{children:E})}),s[24]=E,s[25]=U):U=s[25];let F;s[26]!==O||s[27]!==U||s[28]!==C?(F=t.jsx(Fe,{children:t.jsxs(ze,{children:[C,I,O,U]})}),s[26]=O,s[27]=U,s[28]=C,s[29]=F):F=s[29];const V=F;if(k){let _;return s[30]!==k||s[31]!==c||s[32]!==P||s[33]!==a?(_=t.jsx(k,{itemId:a,onBack:c,onUpdate:P}),s[30]=k,s[31]=c,s[32]=P,s[33]=a,s[34]=_):_=s[34],_}let v;s[35]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx(Dt,{size:36,className:"text-muted-foreground"}),s[35]=v):v=s[35];let R;s[36]!==n?(R=n("orgs.collectionDetail.noComponentDefinedTitle"),s[36]=n,s[37]=R):R=s[37];let J;s[38]!==n?(J=n("orgs.collectionDetail.noComponentDefinedDescription"),s[38]=n,s[39]=J):J=s[39];let z;s[40]!==n?(z=n("orgs.collectionDetail.goBackButton"),s[40]=n,s[41]=z):z=s[41];let L;s[42]!==c||s[43]!==z?(L={onClick:c,children:z},s[42]=c,s[43]=z,s[44]=L):L=s[44];let q;s[45]!==R||s[46]!==J||s[47]!==L?(q=t.jsx(Vt,{icon:v,title:R,description:J,buttonProps:L}),s[45]=R,s[46]=J,s[47]=L,s[48]=q):q=s[48];let W;return s[49]!==V||s[50]!==q?(W=t.jsx(ge,{breadcrumb:V,children:q}),s[49]=V,s[50]=q,s[51]=W):W=s[51],W}function Qt(){const s=M.c(3);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=e):e=s[0];const r=fe(e);if(decodeURIComponent(r.collectionName)==="tools"){let a;return s[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(Jt,{}),s[1]=a):a=s[1],a}let l;return s[2]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(Kt,{}),s[2]=l):l=s[2],l}function _o(){const s=M.c(7),e=Q();let r;s[0]!==e?(r=e("orgs.collectionDetail.loadingAriaLabel"),s[0]=e,s[1]=r):r=s[1];let o;s[2]!==r?(o=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(oe,{size:32,className:"animate-spin text-muted-foreground","aria-label":r})}),s[2]=r,s[3]=o):o=s[3];let n;s[4]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(Qt,{}),s[4]=n):n=s[4];let l;return s[5]!==o?(l=t.jsx(Ee,{children:t.jsx(D.Suspense,{fallback:o,children:n})}),s[5]=o,s[6]=l):l=s[6],l}export{_o as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as N,b as Q,j as r,n as Me,q as ue,s as st,B as Ne,u as Xe,r as Y,a as Ae,v as nt,d as lt,w as at,e as Ze,x as Ee,y as Se,Q as ct,E as mt,K as Be,z as He,N as dt}from"./index-Ci8azyOE.js";import{L as ut,s as Te,S as We,C as qe,i as gt,n as Re,a as et,p as Le}from"./self-tool-result-BSLlHbcp.js";import{A as ft}from"./auth-entry-DZQ7ulSa.js";import{A as pt}from"./auth-split-layout-D4SJJOXB.js";import{O as Ve}from"./organization-choice-DZuaojdz.js";import{r as ht}from"./track-DXtvDI_s.js";import{I as bt}from"./input-Bwz-dTwg.js";import{D as xt,a as Ke,b as yt,c as Ct}from"./dropdown-menu-wKA_-hY5.js";import{u as jt}from"./use-mcp-client-DP2onozC.js";import{S as Ot,W as vt,g as St,a as _t}from"./constants-dLUUoWH7.js";import{i as wt}from"./XCircle-CVbKXkpd.js";import{t as Qe}from"./site-error--i37Vnuw.js";import"./alert-dialog-Dh9zsaCy.js";import"./form-DauSI86Q.js";import"./label-C1OhLpvf.js";import"./spinner-B9x-ViPH.js";import"./integration-icon-CGnrGZxM.js";import"./Tool02-jKKU1_dM.js";import"./agent-icon-DCM1Bdl8.js";import"./AlertCircle-BTlJp8pf.js";import"./UserSquare-CwU4sG2o.js";import"./Tool01-va49aYq9.js";import"./ArrowUp-CVoISkQ4.js";import"./ArrowLeft-BwagOJkb.js";import"./TrendUp01-DikSDrNg.js";import"./ZapSquare-BZzRAQpm.js";import"./Users03-BUoBV4mB.js";import"./CheckCircle-teyxVGFp.js";import"./Check-D5PKBQ5I.js";import"./ChevronDown-Csfjhwpm.js";import"./ChevronRight-DUmHQrD7.js";import"./ChevronSelectorVertical-CuAhXy3x.js";import"./ChevronUp-Dlj_U0qV.js";import"./DotsVertical-CpVcGDJ_.js";import"./Stars02-DZNA1z2-.js";import"./Copy01-CsNpp9jr.js";import"./CreditCard01-YCHpZ00A.js";import"./Download01-BN9BT9cL.js";import"./Settings02-BMcJFHpd.js";import"./Eye-DgiSa7UT.js";import"./FilterLines-Db8-uWfr.js";import"./Share07-CPDrxQV8.js";import"./Globe01-CV-16mwB.js";import"./Globe04-D3O2XfOT.js";import"./SwitchHorizontal01-CSyGO1HX.js";import"./HardDrive-CWvDYc59.js";import"./Key01-D4srNqPO.js";import"./LinkExternal01-CIL2SNWf.js";import"./LockUnlocked01-BpeKJGM4.js";import"./LogOut01-qWWgaWbQ.js";import"./Monitor01-uq-dlf-u.js";import"./Sun-BBWjOwQE.js";import"./Palette-Cv68Zggp.js";import"./Play-C9xK8clC.js";import"./Plus-CPkR-QLd.js";import"./SearchLg-8daQliv2.js";import"./SearchMd-ClTH3fiN.js";import"./Shield01-C9M_jcOJ.js";import"./Stars01-BzEDQnsl.js";import"./Trash01-Dp-QTpAR.js";import"./Upload01-DxCHPffq.js";import"./User01-DJ_BO2EX.js";import"./Users01-B2wc_Wgl.js";import"./XClose-CTv0nnSb.js";import"./Zap-MbQ2aiA8.js";import"./dialog-BI8UUwqv.js";import"./extract-connection-data-6cVSTGuY.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-CMPWtdMv.js";import"./use-debounced-value-BENALn-i.js";import"./authenticate-and-persist-oauth-DY_hbkIG.js";import"./mcp-oauth-GWhqBwu1.js";import"./auth-D8IdOmGw.js";import"./use-is-desktop-app-BNujXJc_.js";import"./retry-CErkP7V6.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./avatar-D-QkiqIH.js";const Ge={"pt-BR":"https://decocms.com/agendar",en:"https://www.decocms.com/en/schedule"},Ye=["https://decoims.com/image?src=decocms%2Fb07a1c19-0cd6-49c8-b326-86055ee78605%2Fauthor-1763423987973-baby.jpeg&quality=original&fit=cover&width=200&height=200","https://decoims.com/decocms/07c2daf4-a3c2-485e-a1a8-341585a06e3b/cecilia.png","https://decoims.com/decocms/48013ca2-3277-464b-b0f1-dd5f1f08d986/tavano.png"],Nt="var(--brand-green-dark)";function De({siteUrl:t,email:e,locale:s}){const i=(s&&Ge[s])??Ge["pt-BR"]??"https://decocms.com/agendar",o=new URL(i);return t&&o.searchParams.set("siteUrl",t),e&&o.searchParams.set("email",e),o.toString()}function Et(t){const e=N.c(15),{href:s,size:i,className:o,orgId:l}=t,a=i===void 0?"lg":i,n=Q();let c;e[0]!==o?(c=Me("w-full",o),e[0]=o,e[1]=c):c=e[1];let m;e[2]!==l?(m=()=>ue("commerce_onboarding_meeting_cta_clicked",{placement:"visual_card",organization_id:l}),e[2]=l,e[3]=m):m=e[3];let d;e[4]!==n?(d=n("routes.commerceOnboarding.scheduleMeeting.scheduleButton"),e[4]=n,e[5]=d):d=e[5];let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=r.jsx(st,{size:16}),e[6]=u):u=e[6];let f;e[7]!==s||e[8]!==m||e[9]!==d?(f=r.jsxs("a",{href:s,target:"_blank",rel:"noreferrer",onClick:m,children:[d,u]}),e[7]=s,e[8]=m,e[9]=d,e[10]=f):f=e[10];let p;return e[11]!==a||e[12]!==c||e[13]!==f?(p=r.jsx(Ne,{asChild:!0,variant:"outline",size:a,className:c,children:f}),e[11]=a,e[12]=c,e[13]=f,e[14]=p):p=e[14],p}function Ut(t){const e=N.c(13),{size:s}=t,i=s===void 0?72:s,o=Q();let l;e[0]!==o?(l=o("routes.commerceOnboarding.scheduleMeeting.expertAlt"),e[0]=o,e[1]=l):l=e[1];const a=l;let n;e[2]!==i?(n=Math.round(i*.3),e[2]=i,e[3]=n):n=e[3];const c=n;let m;e[4]!==i?(m={height:i},e[4]=i,e[5]=m):m=e[5];let d;e[6]!==a||e[7]!==c||e[8]!==i?(d=Ye.map((f,p)=>r.jsxs("div",{className:"relative shrink-0",style:{width:i,height:i,marginLeft:p===0?0:-c,zIndex:Ye.length-p},children:[r.jsx("div",{className:"h-full w-full overflow-hidden rounded-full border-4 border-card bg-muted",children:r.jsx("img",{src:f,alt:a,className:"h-full w-full object-cover",loading:"lazy"})}),p===0&&r.jsxs("span",{className:"absolute bottom-1.5 right-1.5 flex h-3.5 w-3.5",children:[r.jsx("span",{className:"absolute inline-flex h-full w-full rounded-full bg-success opacity-60 motion-safe:animate-ping","aria-hidden":!0}),r.jsx("span",{className:"relative inline-flex h-3.5 w-3.5 rounded-full border-2 border-card bg-success"})]})]},f)),e[6]=a,e[7]=c,e[8]=i,e[9]=d):d=e[9];let u;return e[10]!==m||e[11]!==d?(u=r.jsx("div",{className:"flex items-end",style:m,children:d}),e[10]=m,e[11]=d,e[12]=u):u=e[12],u}function Fe(t){const e=N.c(19),{href:s,orgId:i}=t,o=Q();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=r.jsx("div",{className:"h-20",style:{backgroundColor:Nt}}),e[0]=l):l=e[0];let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a=r.jsx("div",{className:"-mt-9 mb-4",children:r.jsx(Ut,{})}),e[1]=a):a=e[1];let n;e[2]!==o?(n=o("routes.commerceOnboarding.scheduleMeeting.headline"),e[2]=o,e[3]=n):n=e[3];let c;e[4]!==n?(c=r.jsx("h2",{className:"text-lg font-medium leading-6 text-foreground",children:n}),e[4]=n,e[5]=c):c=e[5];let m;e[6]!==o?(m=o("routes.commerceOnboarding.scheduleMeeting.body"),e[6]=o,e[7]=m):m=e[7];let d;e[8]!==m?(d=r.jsx("p",{className:"text-sm leading-5 text-muted-foreground",children:m}),e[8]=m,e[9]=d):d=e[9];let u;e[10]!==c||e[11]!==d?(u=r.jsxs("div",{className:"grid gap-1.5",children:[c,d]}),e[10]=c,e[11]=d,e[12]=u):u=e[12];let f;e[13]!==s||e[14]!==i?(f=r.jsx(Et,{href:s,size:"lg",className:"mt-6",orgId:i}),e[13]=s,e[14]=i,e[15]=f):f=e[15];let p;return e[16]!==u||e[17]!==f?(p=r.jsx("div",{className:"relative flex h-full w-full items-center justify-center p-10",children:r.jsxs("div",{className:"w-full max-w-[440px] overflow-hidden rounded-3xl border border-border bg-card card-shadow",children:[l,r.jsxs("div",{className:"px-8 pb-8",children:[a,u,f]})]})}),e[16]=u,e[17]=f,e[18]=p):p=e[18],p}function tt(t){const e=N.c(10),{host:s}=t,i=`https://www.google.com/s2/favicons?domain=${s}&sz=128`;let o,l,a;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-7 w-7 dark:hidden"}),l=r.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-7 w-7 hidden dark:block"}),a=r.jsx("div",{className:"h-6 w-px rotate-12 bg-border","aria-hidden":"true"}),e[0]=o,e[1]=l,e[2]=a):(o=e[0],l=e[1],a=e[2]);let n;e[3]!==i?(n=r.jsx("div",{className:"flex h-7 w-7 shrink-0 items-center justify-center overflow-hidden rounded-lg border border-border bg-white",children:r.jsx("img",{src:i,alt:"",className:"h-5 w-5",loading:"lazy"})}),e[3]=i,e[4]=n):n=e[4];let c;e[5]!==s?(c=r.jsx("span",{className:"text-lg font-medium text-foreground",children:s}),e[5]=s,e[6]=c):c=e[6];let m;return e[7]!==n||e[8]!==c?(m=r.jsxs("div",{className:"flex items-center gap-3",children:[o,l,a,n,c]}),e[7]=n,e[8]=c,e[9]=m):m=e[9],m}function $e(t){const e=N.c(5),{variant:s}=t,i=Q();let o;e[0]!==i||e[1]!==s?(o=i(s==="workspace"?"routes.commerceOnboarding.loading.preparingWorkspace":"routes.commerceOnboarding.loading.preparing"),e[0]=i,e[1]=s,e[2]=o):o=e[2];const l=o;let a;return e[3]!==l?(a=r.jsx("div",{className:"flex justify-center py-4",role:"status","aria-live":"polite",children:r.jsx(ut,{label:l,className:"text-muted-foreground"})}),e[3]=l,e[4]=a):a=e[4],a}function gr(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx(Lt,{}),t[0]=e):e=t[0],e}const ot=Y.createContext(null),rt=()=>Y.useContext(ot);function It(){const t=N.c(22),[e,s]=Ee(),i=e.language==="pt-BR"?"PT-BR":"EN";let o;t[0]!==i?(o=r.jsx(xt,{asChild:!0,children:r.jsx("button",{className:"text-sm font-medium text-foreground/70 hover:text-foreground transition-colors",type:"button",children:i})}),t[0]=i,t[1]=o):o=t[1];let l;t[2]!==s?(l=()=>{s(zt)},t[2]=s,t[3]=l):l=t[3];const a=e.language==="en"&&"bg-accent";let n;t[4]!==a?(n=Me(a),t[4]=a,t[5]=n):n=t[5];let c;t[6]!==l||t[7]!==n?(c=r.jsx(Ke,{onClick:l,className:n,children:"English"}),t[6]=l,t[7]=n,t[8]=c):c=t[8];let m;t[9]!==s?(m=()=>{s(Pt)},t[9]=s,t[10]=m):m=t[10];const d=e.language==="pt-BR"&&"bg-accent";let u;t[11]!==d?(u=Me(d),t[11]=d,t[12]=u):u=t[12];let f;t[13]!==m||t[14]!==u?(f=r.jsx(Ke,{onClick:m,className:u,children:"Português (Brasil)"}),t[13]=m,t[14]=u,t[15]=f):f=t[15];let p;t[16]!==c||t[17]!==f?(p=r.jsxs(yt,{align:"end",children:[c,f]}),t[16]=c,t[17]=f,t[18]=p):p=t[18];let O;return t[19]!==o||t[20]!==p?(O=r.jsxs(Ct,{children:[o,p]}),t[19]=o,t[20]=p,t[21]=O):O=t[21],O}function Pt(t){return{...t,language:"pt-BR"}}function zt(t){return{...t,language:"en"}}function H(t){const e=N.c(17);let s,i,o;e[0]!==t?({visual:o,children:s,...i}=t,e[0]=t,e[1]=s,e[2]=i,e[3]=o):(s=e[1],i=e[2],o=e[3]);let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l={from:"/commerce-onboarding"},e[4]=l):l=e[4];const a=Xe(l),{data:n}=Ae.useSession(),[c]=Ee(),m=n?.user?.email;let d;e[5]!==c.language||e[6]!==a.siteUrl||e[7]!==m?(d=De({siteUrl:a.siteUrl,email:m,locale:c.language}),e[5]=c.language,e[6]=a.siteUrl,e[7]=m,e[8]=d):d=e[8];const u=d;let f;e[9]!==u||e[10]!==o?(f=o??r.jsx(Fe,{href:u}),e[9]=u,e[10]=o,e[11]=f):f=e[11];let p;e[12]===Symbol.for("react.memo_cache_sentinel")?(p=r.jsxs("div",{className:"flex justify-between items-start mb-8",children:[r.jsx("div",{}),r.jsx(It,{})]}),e[12]=p):p=e[12];let O;return e[13]!==s||e[14]!==i||e[15]!==f?(O=r.jsxs(pt,{...i,visual:f,children:[p,s]}),e[13]=s,e[14]=i,e[15]=f,e[16]=O):O=e[16],O}function Rt(t){return{signUpFailed:t("routes.commerceOnboarding.authCopy.signUpFailed"),signInFailed:t("routes.commerceOnboarding.authCopy.signInFailed"),authenticationFailed:t("routes.commerceOnboarding.authCopy.authenticationFailed"),resetEmailFailed:t("routes.commerceOnboarding.authCopy.resetEmailFailed"),otpSendFailed:t("routes.commerceOnboarding.authCopy.otpSendFailed"),invalidCode:t("routes.commerceOnboarding.authCopy.invalidCode"),invalidEmail:t("routes.commerceOnboarding.authCopy.invalidEmail"),invalidEmailOrPassword:t("routes.commerceOnboarding.authCopy.invalidEmailOrPassword"),accountExists:t("routes.commerceOnboarding.authCopy.accountExists"),networkError:t("routes.commerceOnboarding.authCopy.networkError"),tooManyAttempts:t("routes.commerceOnboarding.authCopy.tooManyAttempts"),invalidOrExpiredCode:t("routes.commerceOnboarding.authCopy.invalidOrExpiredCode"),genericError:t("routes.commerceOnboarding.authCopy.genericError"),resetPasswordTitle:t("routes.commerceOnboarding.authCopy.resetPasswordTitle"),verificationCodeTitle:t("routes.commerceOnboarding.authCopy.verificationCodeTitle"),welcomeTitle:t("routes.commerceOnboarding.authCopy.welcomeTitle"),resetPasswordSubtitle:t("routes.commerceOnboarding.authCopy.resetPasswordSubtitle"),codeSentTo:e=>t("routes.commerceOnboarding.authCopy.codeSentTo",{email:e}),defaultSubtitle:t("routes.commerceOnboarding.authCopy.defaultSubtitle"),resetEmailSent:t("routes.commerceOnboarding.authCopy.resetEmailSent"),continueWith:e=>t("routes.commerceOnboarding.authCopy.continueWith",{provider:e}),divider:t("routes.commerceOnboarding.authCopy.divider"),emailLabel:t("routes.commerceOnboarding.authCopy.emailLabel"),emailPlaceholder:t("routes.commerceOnboarding.authCopy.emailPlaceholder"),sending:t("routes.commerceOnboarding.authCopy.sending"),sendCode:t("routes.commerceOnboarding.authCopy.sendCode"),verificationCodeLabel:t("routes.commerceOnboarding.authCopy.verificationCodeLabel"),enterCodePlaceholder:t("routes.commerceOnboarding.authCopy.enterCodePlaceholder"),verifying:t("routes.commerceOnboarding.authCopy.verifying"),verify:t("routes.commerceOnboarding.authCopy.verify"),useDifferentEmail:t("routes.commerceOnboarding.authCopy.useDifferentEmail"),sendResetLink:t("routes.commerceOnboarding.authCopy.sendResetLink"),nameLabel:t("routes.commerceOnboarding.authCopy.nameLabel"),namePlaceholder:t("routes.commerceOnboarding.authCopy.namePlaceholder"),passwordLabel:t("routes.commerceOnboarding.authCopy.passwordLabel"),forgotPassword:t("routes.commerceOnboarding.authCopy.forgotPassword"),creatingAccount:t("routes.commerceOnboarding.authCopy.creatingAccount"),signingIn:t("routes.commerceOnboarding.authCopy.signingIn"),continue:t("routes.commerceOnboarding.authCopy.continue"),backToSignIn:t("routes.commerceOnboarding.authCopy.backToSignIn"),signInWithPassword:t("routes.commerceOnboarding.authCopy.signInWithPassword"),alreadyHaveAccount:t("routes.commerceOnboarding.authCopy.alreadyHaveAccount"),dontHaveAccount:t("routes.commerceOnboarding.authCopy.dontHaveAccount"),signIn:t("routes.commerceOnboarding.authCopy.signIn"),signUp:t("routes.commerceOnboarding.authCopy.signUp"),signInWithEmailCode:t("routes.commerceOnboarding.authCopy.signInWithEmailCode")}}let Je=!1;function Lt(){const t=Xe({from:"/commerce-onboarding"}),{org:e,siteUrl:s}=t,i=Te(s);if(!Je&&nt()){Je=!0;const o=ht(window.location.search);ue("commerce_onboarding_viewed",{site_url:s,domain:i??void 0,...o,...i?{$set:{last_scanned_domain:i}}:{}})}return r.jsx(ot.Provider,{value:i,children:r.jsx(kt,{requestedOrgSlug:e,siteUrl:s})})}function kt(t){const e=N.c(14),{requestedOrgSlug:s,siteUrl:i}=t,o=Q(),{data:l,isPending:a}=Ae.useSession(),n=rt();if(a){let m;return e[0]===Symbol.for("react.memo_cache_sentinel")?(m=r.jsx(H,{children:r.jsx($e,{variant:"generic"})}),e[0]=m):m=e[0],m}if(!l){const m=typeof window>"u"?"/commerce-onboarding":`${window.location.pathname}${window.location.search}`;let d;e[1]!==o?(d=o("routes.commerceOnboarding.unlockDiagnostic"),e[1]=o,e[2]=d):d=e[2];let u;e[3]!==n?(u=n?r.jsx(tt,{host:n}):void 0,e[3]=n,e[4]=u):u=e[4];let f;e[5]!==o?(f=Rt(o),e[5]=o,e[6]=f):f=e[6];let p;return e[7]!==d||e[8]!==u||e[9]!==f?(p=r.jsx(H,{children:r.jsx(ft,{callbackUrl:m,allowAutoLogin:!1,title:d,subtitle:null,brand:u,copy:f})}),e[7]=d,e[8]=u,e[9]=f,e[10]=p):p=e[10],p}let c;return e[11]!==s||e[12]!==i?(c=r.jsx(Mt,{requestedOrgSlug:s,siteUrl:i}),e[11]=s,e[12]=i,e[13]=c):c=e[13],c}function Mt(t){const e=N.c(121),{requestedOrgSlug:s,siteUrl:i}=t,o=Q(),l=lt(),a=at(),[n,c]=Y.useState(null),[m,d]=Y.useState(null),[u,f]=Y.useState(!1),p=a.data?.map(At)??[];let O;e[0]===Symbol.for("react.memo_cache_sentinel")?(O={mutationFn:Tt,retry:!1,onSuccess:g=>{d(g)}},e[0]=O):O=e[0];const v=Ze(O);if(a.isPending){let g;return e[1]===Symbol.for("react.memo_cache_sentinel")?(g=r.jsx(H,{children:r.jsx($e,{variant:"workspace"})}),e[1]=g):g=e[1],g}if(a.error){let g;e[2]!==o?(g=o("routes.commerceOnboarding.couldNotLoadOrgs"),e[2]=o,e[3]=g):g=e[3];let h;e[4]!==o?(h=o("routes.commerceOnboarding.retryToConfigureCommerce"),e[4]=o,e[5]=h):h=e[5];let x;e[6]!==o?(x=o("routes.commerceOnboarding.retryAgain"),e[6]=o,e[7]=x):x=e[7];let b;e[8]!==a?(b=()=>a.refetch(),e[8]=a,e[9]=b):b=e[9];let _;return e[10]!==g||e[11]!==h||e[12]!==x||e[13]!==b?(_=r.jsx(_e,{title:g,description:h,actionLabel:x,onRetry:b}),e[10]=g,e[11]=h,e[12]=x,e[13]=b,e[14]=_):_=e[14],_}const w=s?p.find(g=>g.slug===s):null;if(w){let g;return e[15]!==w||e[16]!==i?(g=r.jsx(ve,{org:w,initialSiteUrl:i}),e[15]=w,e[16]=i,e[17]=g):g=e[17],g}if(s){let g;e[18]!==o?(g=o("routes.commerceOnboarding.orgNotFound"),e[18]=o,e[19]=g):g=e[19];let h;e[20]!==o?(h=o("routes.commerceOnboarding.couldNotFindOrg"),e[20]=o,e[21]=h):h=e[21];let x;e[22]!==o?(x=o("routes.commerceOnboarding.retryAgain"),e[22]=o,e[23]=x):x=e[23];let b;e[24]!==a?(b=()=>a.refetch(),e[24]=a,e[25]=b):b=e[25];let _;return e[26]!==g||e[27]!==h||e[28]!==x||e[29]!==b?(_=r.jsx(_e,{title:g,description:h,actionLabel:x,onRetry:b}),e[26]=g,e[27]=h,e[28]=x,e[29]=b,e[30]=_):_=e[30],_}if(n){let g;return e[31]!==n||e[32]!==i?(g=r.jsx(ve,{org:n,initialSiteUrl:i}),e[31]=n,e[32]=i,e[33]=g):g=e[33],g}if(p.length===1&&p[0]){let g;return e[34]!==p[0]||e[35]!==i?(g=r.jsx(ve,{org:p[0],initialSiteUrl:i}),e[34]=p[0],e[35]=i,e[36]=g):g=e[36],g}if(p.length>1){let g;e[37]!==o?(g=o("routes.commerceOnboarding.chooseOrg"),e[37]=o,e[38]=g):g=e[38];let h;e[39]!==o?(h=o("routes.commerceOnboarding.selectWhereCommerceContinues"),e[39]=o,e[40]=h):h=e[40];let x;e[41]!==g||e[42]!==h?(x=r.jsx(J,{title:g,description:h}),e[41]=g,e[42]=h,e[43]=x):x=e[43];let b;e[44]!==o?(b=o("routes.commerceOnboarding.authCopy.continue"),e[44]=o,e[45]=b):b=e[45];let _;e[46]!==l||e[47]!==i?(_=j=>l({to:"/commerce-onboarding",search:{org:j.slug,siteUrl:i}}),e[46]=l,e[47]=i,e[48]=_):_=e[48];let M;e[49]===Symbol.for("react.memo_cache_sentinel")?(M=()=>f(!0),e[49]=M):M=e[49];let R;e[50]!==o?(R=o("routes.commerceOnboarding.createNewOrg"),e[50]=o,e[51]=R):R=e[51];let z;e[52]!==p||e[53]!==b||e[54]!==_||e[55]!==R?(z=r.jsx(We,{className:"-mx-1 -my-1 max-h-[60vh] overflow-y-auto px-1 py-1",children:r.jsx(Ve,{organizations:p,selectLabel:b,onSelected:_,onCreateNew:M,createNewLabel:R})}),e[52]=p,e[53]=b,e[54]=_,e[55]=R,e[56]=z):z=e[56];let U;e[57]!==x||e[58]!==z?(U=r.jsxs("div",{className:"grid gap-10",children:[x,z]}),e[57]=x,e[58]=z,e[59]=U):U=e[59];let T;e[60]!==l||e[61]!==i?(T=j=>{Se(),l({to:"/commerce-onboarding",search:{org:j,siteUrl:i}})},e[60]=l,e[61]=i,e[62]=T):T=e[62];let I;e[63]!==u||e[64]!==T?(I=r.jsx(qe,{open:u,onOpenChange:f,onCreated:T}),e[63]=u,e[64]=T,e[65]=I):I=e[65];let L;return e[66]!==U||e[67]!==I?(L=r.jsxs(H,{children:[U,I]}),e[66]=U,e[67]=I,e[68]=L):L=e[68],L}if(!m){let g;e[69]!==v?(g=()=>{v.reset(),v.mutate()},e[69]=v,e[70]=g):g=e[70];let h;return e[71]!==v||e[72]!==g?(h=r.jsx(Dt,{mutation:v,onRetry:g}),e[71]=v,e[72]=g,e[73]=h):h=e[73],h}const C=m;if(C?.success&&(C.status==="created"||C.status==="joined"||C.status==="already_has_organization")&&C.organization){let g;return e[74]!==C.organization||e[75]!==i?(g=r.jsx(ve,{org:C.organization,initialSiteUrl:i}),e[74]=C.organization,e[75]=i,e[76]=g):g=e[76],g}if(C?.status==="ambiguous"&&C.organizations&&C.organizations.length>0){let g;e[77]!==o?(g=o("routes.commerceOnboarding.chooseOrg"),e[77]=o,e[78]=g):g=e[78];let h;e[79]!==o?(h=o("routes.commerceOnboarding.emailAccessMultipleOrgs"),e[79]=o,e[80]=h):h=e[80];let x;e[81]!==g||e[82]!==h?(x=r.jsx(J,{title:g,description:h}),e[81]=g,e[82]=h,e[83]=x):x=e[83];const b=C.organizations,_=C.domain??void 0;let M;e[84]!==l||e[85]!==i?(M=(X,Z)=>{Se(),c({...X,slug:Z}),l({to:"/commerce-onboarding",search:{org:Z,siteUrl:i}})},e[84]=l,e[85]=i,e[86]=M):M=e[86];let R;e[87]===Symbol.for("react.memo_cache_sentinel")?(R=()=>f(!0),e[87]=R):R=e[87];let z;e[88]!==o?(z=o("routes.commerceOnboarding.createNewOrg"),e[88]=o,e[89]=z):z=e[89];let U;e[90]!==C.organizations||e[91]!==_||e[92]!==M||e[93]!==z?(U=r.jsx(We,{className:"-mx-1 -my-1 max-h-[60vh] overflow-y-auto px-1 py-1",children:r.jsx(Ve,{organizations:b,domain:_,onJoined:M,onCreateNew:R,createNewLabel:z})}),e[90]=C.organizations,e[91]=_,e[92]=M,e[93]=z,e[94]=U):U=e[94];let T;e[95]!==U||e[96]!==x?(T=r.jsxs("div",{className:"grid gap-10",children:[x,U]}),e[95]=U,e[96]=x,e[97]=T):T=e[97];let I;e[98]!==l||e[99]!==i?(I=X=>{Se(),l({to:"/commerce-onboarding",search:{org:X,siteUrl:i}})},e[98]=l,e[99]=i,e[100]=I):I=e[100];let L;e[101]!==u||e[102]!==I?(L=r.jsx(qe,{open:u,onOpenChange:f,onCreated:I}),e[101]=u,e[102]=I,e[103]=L):L=e[103];let j;return e[104]!==T||e[105]!==L?(j=r.jsxs(H,{children:[T,L]}),e[104]=T,e[105]=L,e[106]=j):j=e[106],j}let P;e[107]!==o?(P=o("routes.commerceOnboarding.onboardingNeedsSupport"),e[107]=o,e[108]=P):P=e[108];let E;e[109]!==C?.error||e[110]!==o?(E=C?.error??o("routes.commerceOnboarding.couldNotDetermineOrg"),e[109]=C?.error,e[110]=o,e[111]=E):E=e[111];let A;e[112]!==o?(A=o("routes.commerceOnboarding.retryAgain"),e[112]=o,e[113]=A):A=e[113];let W;e[114]!==v?(W=()=>{d(null),v.reset()},e[114]=v,e[115]=W):W=e[115];let q;return e[116]!==P||e[117]!==E||e[118]!==A||e[119]!==W?(q=r.jsx(_e,{title:P,description:E,actionLabel:A,onRetry:W}),e[116]=P,e[117]=E,e[118]=A,e[119]=W,e[120]=q):q=e[120],q}async function Tt(){const e=await(await fetch("/api/auth/custom/ensure-organization",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"}})).json();return e.success&&(e.status==="created"||e.status==="joined"||e.status==="already_has_organization")&&e.organization&&Se(),e}function At(t){return{id:t.id,name:t.name,slug:t.slug,logo:t.logo??null}}function Dt(t){const e=N.c(16),{mutation:s,onRetry:i}=t,o=Q(),l=Y.useRef(!1);let a;e[0]!==s?(a=d=>{!d||l.current||(l.current=!0,s.mutate())},e[0]=s,e[1]=a):a=e[1];const n=a;if(s.error){let d;e[2]!==o?(d=o("routes.commerceOnboarding.onboardingUnavailable"),e[2]=o,e[3]=d):d=e[3];let u;e[4]!==o?(u=o("routes.commerceOnboarding.couldNotPrepareOrg"),e[4]=o,e[5]=u):u=e[5];let f;e[6]!==o?(f=o("routes.commerceOnboarding.retryAgain"),e[6]=o,e[7]=f):f=e[7];let p;return e[8]!==i||e[9]!==d||e[10]!==u||e[11]!==f?(p=r.jsx(_e,{title:d,description:u,actionLabel:f,onRetry:i}),e[8]=i,e[9]=d,e[10]=u,e[11]=f,e[12]=p):p=e[12],p}let c;e[13]===Symbol.for("react.memo_cache_sentinel")?(c=r.jsx($e,{variant:"generic"}),e[13]=c):c=e[13];let m;return e[14]!==n?(m=r.jsx(H,{children:r.jsx("div",{ref:n,children:c})}),e[14]=n,e[15]=m):m=e[15],m}function J(t){const e=N.c(8),{title:s,description:i}=t,o=rt();let l;e[0]!==o?(l=o?r.jsx(tt,{host:o}):r.jsxs("div",{children:[r.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),r.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]}),e[0]=o,e[1]=l):l=e[1];let a;e[2]!==i||e[3]!==s?(a=(s||i)&&r.jsxs("div",{className:"space-y-2",children:[s&&r.jsx("h1",{className:"text-2xl font-medium leading-8",children:s}),i&&r.jsx("p",{className:"text-base text-muted-foreground leading-6",children:i})]}),e[2]=i,e[3]=s,e[4]=a):a=e[4];let n;return e[5]!==l||e[6]!==a?(n=r.jsxs("div",{className:"grid gap-10",children:[l,a]}),e[5]=l,e[6]=a,e[7]=n):n=e[7],n}function _e(t){const e=N.c(9),{title:s,description:i,actionLabel:o,onRetry:l}=t;let a;e[0]!==i||e[1]!==s?(a=r.jsx(J,{title:s,description:i}),e[0]=i,e[1]=s,e[2]=a):a=e[2];let n;e[3]!==o||e[4]!==l?(n=r.jsx(Ne,{type:"button",size:"xl",className:"w-full",onClick:l,children:o}),e[3]=o,e[4]=l,e[5]=n):n=e[5];let c;return e[6]!==a||e[7]!==n?(c=r.jsx(H,{children:r.jsxs("div",{className:"grid gap-10",children:[a,n]})}),e[6]=a,e[7]=n,e[8]=c):c=e[8],c}function ve(t){const e=N.c(13),{org:s,initialSiteUrl:i}=t,o=Q(),{data:l}=Ae.useSession(),[a]=Ee(),n=l?.user?.email;let c;e[0]!==i||e[1]!==a.language||e[2]!==n?(c=De({siteUrl:i,email:n,locale:a.language}),e[0]=i,e[1]=a.language,e[2]=n,e[3]=c):c=e[3];const m=c;let d;e[4]!==m||e[5]!==s.id?(d=r.jsx(Fe,{href:m,orgId:s.id}),e[4]=m,e[5]=s.id,e[6]=d):d=e[6];const u=d;let f;return e[7]!==i||e[8]!==u||e[9]!==s||e[10]!==l?.user?.email||e[11]!==o?(f=r.jsx(ct,{children:p=>{const{reset:O}=p;return r.jsx(mt,{fallback:v=>{const{error:w,resetError:C}=v;return r.jsx(H,{visual:u,children:r.jsx(Ft,{orgName:s.name,message:w instanceof Error?w.message:o("routes.commerceOnboarding.couldNotVerifyCommerceSetting"),onRetry:()=>{O(),C()}})})},children:r.jsx(Y.Suspense,{fallback:r.jsx(it,{visual:u}),children:r.jsx($t,{org:s,initialSiteUrl:i,sessionEmail:l?.user?.email},`${s.id}:${i??""}`)})})}}),e[7]=i,e[8]=u,e[9]=s,e[10]=l?.user?.email,e[11]=o,e[12]=f):f=e[12],f}function it(t){const e=N.c(3),{visual:s}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=r.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-6 md:grid md:gap-4",children:[r.jsx(J,{}),r.jsx(et,{})]}),e[0]=i):i=e[0];let o;return e[1]!==s?(o=r.jsx(H,{align:"fill",visual:s,children:i}),e[1]=s,e[2]=o):o=e[2],o}function Ft(t){const e=N.c(19),{orgName:s,message:i,onRetry:o}=t,l=Q();let a;e[0]!==l?(a=l("routes.commerceOnboarding.commerceDiagnostic"),e[0]=l,e[1]=a):a=e[1];let n;e[2]!==s||e[3]!==l?(n=l("routes.commerceOnboarding.configurationWillContinueIn",{orgName:s}),e[2]=s,e[3]=l,e[4]=n):n=e[4];let c;e[5]!==a||e[6]!==n?(c=r.jsx(J,{title:a,description:n}),e[5]=a,e[6]=n,e[7]=c):c=e[7];let m;e[8]!==i?(m=r.jsx(we,{message:i}),e[8]=i,e[9]=m):m=e[9];let d;e[10]!==l?(d=l("routes.commerceOnboarding.retryAgain"),e[10]=l,e[11]=d):d=e[11];let u;e[12]!==o||e[13]!==d?(u=r.jsx(Ne,{type:"button",size:"xl",className:"w-full",onClick:o,children:d}),e[12]=o,e[13]=d,e[14]=u):u=e[14];let f;return e[15]!==c||e[16]!==m||e[17]!==u?(f=r.jsxs("div",{className:"grid gap-10",children:[c,m,u]}),e[15]=c,e[16]=m,e[17]=u,e[18]=f):f=e[18],f}function $t(t){const e=N.c(135),{org:s,initialSiteUrl:i,sessionEmail:o}=t;let l;e[0]!==s.id||e[1]!==s.slug?(l={connectionId:Ot,orgId:s.id,orgSlug:s.slug},e[0]=s.id,e[1]=s.slug,e[2]=l):l=e[2];const a=jt(l),[n,c]=Y.useState(i??""),[m,d]=Y.useState(null),u=Y.useRef(!1),f=vt.COMMERCE_DISCOVERY(s.id),p=St(s.id),O=Be.commerceDiscoveryConnection(s.id,f);let v;e[3]!==f||e[4]!==a?(v=async()=>{const y=await a.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:f}});return Le(y)},e[3]=f,e[4]=a,e[5]=v):v=e[5];let w;e[6]!==O||e[7]!==v?(w={queryKey:O,queryFn:v,retry:!1},e[6]=O,e[7]=v,e[8]=w):w=e[8];const C=He(w),P=Be.commerceDiscoveryVirtualMcp(s.id,p);let E;e[9]!==a||e[10]!==p?(E=async()=>{const y=await a.callTool({name:"COLLECTION_VIRTUAL_MCP_GET",arguments:{id:p}});return Le(y)},e[9]=a,e[10]=p,e[11]=E):E=e[11];let A;e[12]!==P||e[13]!==E?(A={queryKey:P,queryFn:E,retry:!1},e[12]=P,e[13]=E,e[14]=A):A=e[14];const W=He(A);let q;e[15]!==a?(q=async y=>{const S=await a.callTool({name:"COMMERCE_DISCOVERY_SETUP",arguments:{siteUrl:y}});return Le(S)},e[15]=a,e[16]=q):q=e[16];let g;e[17]!==C||e[18]!==s.id||e[19]!==W?(g=(y,S)=>{ue("commerce_onboarding_setup_succeeded",{domain:Te(S)??void 0,organization_id:s.id}),d(null),C.refetch(),W.refetch()},e[17]=C,e[18]=s.id,e[19]=W,e[20]=g):g=e[20];let h;e[21]!==s.id?(h=(y,S)=>{ue("commerce_onboarding_setup_failed",{domain:Te(S)??void 0,organization_id:s.id,error:y instanceof Error?y.message:String(y)}),d(y instanceof Error?y.message:"__configurationFailed")},e[21]=s.id,e[22]=h):h=e[22];let x;e[23]!==h||e[24]!==q||e[25]!==g?(x={mutationFn:q,retry:!1,onSuccess:g,onError:h},e[23]=h,e[24]=q,e[25]=g,e[26]=x):x=e[26];const b=Ze(x),_=!!C.data.item&&!!W.data.item,M=C.data.item,R=typeof M?.metadata?.siteUrl=="string"?M.metadata.siteUrl:void 0,z=i||n||"";let U;e[27]!==R||e[28]!==z?(U=gt(z,R),e[27]=R,e[28]=z,e[29]=U):U=e[29];const I=_&&U,L=i||n||R||"",j=Q(),[X]=Ee();let Z;e[30]!==L||e[31]!==X.language||e[32]!==o?(Z=De({siteUrl:L,email:o,locale:X.language}),e[30]=L,e[31]=X.language,e[32]=o,e[33]=Z):Z=e[33];const Ue=Z;let ge;e[34]!==Ue||e[35]!==s.id?(ge=r.jsx(Fe,{href:Ue,orgId:s.id}),e[34]=Ue,e[35]=s.id,e[36]=ge):ge=e[36];const $=ge;let fe;e[37]!==m||e[38]!==j?(fe=m?Qe(j,m):null,e[37]=m,e[38]=j,e[39]=fe):fe=e[39];const B=fe;let pe;e[40]!==b?(pe=y=>{const S=Re(y);if(!S.ok){d(S.error);return}d(null),b.mutate(S.value)},e[40]=b,e[41]=pe):pe=e[41];const ee=pe;let he;e[42]!==i||e[43]!==ee||e[44]!==I?(he=y=>{!y||u.current||I||!i||(u.current=!0,ee(i))},e[42]=i,e[43]=ee,e[44]=I,e[45]=he):he=e[45];const Ie=he;let be;e[46]!==s.id||e[47]!==ee||e[48]!==n?(be=y=>{y.preventDefault();const S=Re(n);S.ok&&ue("commerce_onboarding_site_url_submitted",{domain:new URL(S.value).hostname,organization_id:s.id}),ee(n)},e[46]=s.id,e[47]=ee,e[48]=n,e[49]=be):be=e[49];const V=be;if(I){const y=s.slug;let S;e[50]===Symbol.for("react.memo_cache_sentinel")?(S=crypto.randomUUID(),e[50]=S):S=e[50];let k;e[51]!==s.slug?(k={org:y,taskId:S},e[51]=s.slug,e[52]=k):k=e[52];let D;e[53]!==s.id?(D=_t(s.id),e[53]=s.id,e[54]=D):D=e[54];const G=L||void 0;let F;e[55]!==D.id||e[56]!==G?(F={virtualmcpid:D.id,connect:"1",siteUrl:G},e[55]=D.id,e[56]=G,e[57]=F):F=e[57];let K;return e[58]!==k||e[59]!==F?(K=r.jsx(dt,{to:"/$org/$taskId",params:k,search:F,replace:!0}),e[58]=k,e[59]=F,e[60]=K):K=e[60],K}if(b.isPending){let y;return e[61]!==$?(y=r.jsx(it,{visual:$}),e[61]=$,e[62]=y):y=e[62],y}if(i){let y,S,k,D,G,F,K,ne;if(e[63]!==$||e[64]!==V||e[65]!==i||e[66]!==s.name||e[67]!==b.isPending||e[68]!==n||e[69]!==j||e[70]!==B||e[71]!==Ie){ne=Symbol.for("react.early_return_sentinel");e:{const Pe=Re(i);if(!Pe.ok){let me;e[80]!==j?(me=j("routes.commerceOnboarding.commerceDiagnostic"),e[80]=j,e[81]=me):me=e[81];let de;e[82]!==s.name||e[83]!==j?(de=j("routes.commerceOnboarding.configurationWillContinueIn",{orgName:s.name}),e[82]=s.name,e[83]=j,e[84]=de):de=e[84];let Ce;e[85]!==me||e[86]!==de?(Ce=r.jsx(J,{title:me,description:de}),e[85]=me,e[86]=de,e[87]=Ce):Ce=e[87];let je;e[88]!==V||e[89]!==b.isPending||e[90]!==n||e[91]!==B?(je=r.jsx(ke,{siteUrl:n,error:B,isSubmitting:b.isPending,onSiteUrlChange:c,onSubmit:V}),e[88]=V,e[89]=b.isPending,e[90]=n,e[91]=B,e[92]=je):je=e[92];const ze=r.jsxs("div",{className:"grid gap-10",children:[Ce,r.jsx(we,{message:Qe(j,Pe.error)}),je]});let Oe;e[93]!==$||e[94]!==ze?(Oe=r.jsx(H,{visual:$,children:ze}),e[93]=$,e[94]=ze,e[95]=Oe):Oe=e[95],ne=Oe;break e}S=H,K=$,G=Ie,F="grid gap-10",y=J,e[96]!==j?(k=j("routes.commerceOnboarding.commerceDiagnostic"),e[96]=j,e[97]=k):k=e[97],D=j("routes.commerceOnboarding.commerceDiscoveryBeingPrepared",{url:Pe.value})}e[63]=$,e[64]=V,e[65]=i,e[66]=s.name,e[67]=b.isPending,e[68]=n,e[69]=j,e[70]=B,e[71]=Ie,e[72]=y,e[73]=S,e[74]=k,e[75]=D,e[76]=G,e[77]=F,e[78]=K,e[79]=ne}else y=e[72],S=e[73],k=e[74],D=e[75],G=e[76],F=e[77],K=e[78],ne=e[79];if(ne!==Symbol.for("react.early_return_sentinel"))return ne;let le;e[98]!==y||e[99]!==k||e[100]!==D?(le=r.jsx(y,{title:k,description:D}),e[98]=y,e[99]=k,e[100]=D,e[101]=le):le=e[101];let ae;e[102]!==V||e[103]!==b.isPending||e[104]!==n||e[105]!==B?(ae=B?r.jsxs(r.Fragment,{children:[r.jsx(we,{message:B}),r.jsx(ke,{siteUrl:n,error:null,isSubmitting:b.isPending,onSiteUrlChange:c,onSubmit:V})]}):r.jsx(et,{}),e[102]=V,e[103]=b.isPending,e[104]=n,e[105]=B,e[106]=ae):ae=e[106];let ce;e[107]!==G||e[108]!==F||e[109]!==le||e[110]!==ae?(ce=r.jsxs("div",{ref:G,className:F,children:[le,ae]}),e[107]=G,e[108]=F,e[109]=le,e[110]=ae,e[111]=ce):ce=e[111];let ye;return e[112]!==S||e[113]!==K||e[114]!==ce?(ye=r.jsx(S,{visual:K,children:ce}),e[112]=S,e[113]=K,e[114]=ce,e[115]=ye):ye=e[115],ye}let te;e[116]!==j?(te=j("routes.commerceOnboarding.commerceDiagnostic"),e[116]=j,e[117]=te):te=e[117];let oe;e[118]!==s.name||e[119]!==j?(oe=j("routes.commerceOnboarding.configurationWillContinueIn",{orgName:s.name}),e[118]=s.name,e[119]=j,e[120]=oe):oe=e[120];let re;e[121]!==te||e[122]!==oe?(re=r.jsx(J,{title:te,description:oe}),e[121]=te,e[122]=oe,e[123]=re):re=e[123];let ie;e[124]!==V||e[125]!==b.isPending||e[126]!==n||e[127]!==B?(ie=r.jsx(ke,{siteUrl:n,error:B,isSubmitting:b.isPending,onSiteUrlChange:c,onSubmit:V}),e[124]=V,e[125]=b.isPending,e[126]=n,e[127]=B,e[128]=ie):ie=e[128];let se;e[129]!==re||e[130]!==ie?(se=r.jsxs("div",{className:"grid gap-10",children:[re,ie]}),e[129]=re,e[130]=ie,e[131]=se):se=e[131];let xe;return e[132]!==$||e[133]!==se?(xe=r.jsx(H,{visual:$,children:se}),e[132]=$,e[133]=se,e[134]=xe):xe=e[134],xe}function ke(t){const e=N.c(30),{siteUrl:s,error:i,isSubmitting:o,onSiteUrlChange:l,onSubmit:a}=t,n=Q();let c;e[0]!==n?(c=n("routes.commerceOnboarding.siteUrlLabel"),e[0]=n,e[1]=c):c=e[1];let m;e[2]!==c?(m=r.jsx("label",{className:"text-sm font-medium",htmlFor:"commerce-site-url",children:c}),e[2]=c,e[3]=m):m=e[3];let d;e[4]!==l?(d=A=>l(A.target.value),e[4]=l,e[5]=d):d=e[5];let u;e[6]!==n?(u=n("routes.commerceOnboarding.siteUrlPlaceholder"),e[6]=n,e[7]=u):u=e[7];const f=!!i;let p;e[8]!==o||e[9]!==s||e[10]!==d||e[11]!==u||e[12]!==f?(p=r.jsx(bt,{id:"commerce-site-url",type:"text",inputMode:"url",value:s,onChange:d,placeholder:u,"aria-invalid":f,disabled:o}),e[8]=o,e[9]=s,e[10]=d,e[11]=u,e[12]=f,e[13]=p):p=e[13];let O;e[14]!==i?(O=i?r.jsx(we,{message:i}):null,e[14]=i,e[15]=O):O=e[15];let v;e[16]!==m||e[17]!==p||e[18]!==O?(v=r.jsxs("div",{className:"grid gap-2",children:[m,p,O]}),e[16]=m,e[17]=p,e[18]=O,e[19]=v):v=e[19];let w;e[20]!==n?(w=n("routes.commerceOnboarding.authCopy.continue"),e[20]=n,e[21]=w):w=e[21];let C;e[22]===Symbol.for("react.memo_cache_sentinel")?(C=r.jsx(wt,{size:16}),e[22]=C):C=e[22];let P;e[23]!==o||e[24]!==w?(P=r.jsxs(Ne,{type:"submit",size:"xl",className:"w-full",disabled:o,children:[w,C]}),e[23]=o,e[24]=w,e[25]=P):P=e[25];let E;return e[26]!==a||e[27]!==P||e[28]!==v?(E=r.jsxs("form",{className:"grid gap-4",onSubmit:a,children:[v,P]}),e[26]=a,e[27]=P,e[28]=v,e[29]=E):E=e[29],E}function we(t){const e=N.c(2),{message:s}=t;let i;return e[0]!==s?(i=r.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:s}),e[0]=s,e[1]=i):i=e[1],i}export{gr as default};
|