decocms 4.167.2 → 4.167.4
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-CUqW_w6g.js → AlertCircle-BXOs8pgi.js} +1 -1
- package/dist/client/assets/{AreaChart-Bm75VTUe.js → AreaChart-C8CciM_k.js} +1 -1
- package/dist/client/assets/{ArrowUp-C7ToAohd.js → ArrowUp-BFGzDO5k.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-Ctd2GOR9.js → ArrowUpRight-h69wSa4W.js} +1 -1
- package/dist/client/assets/{Check-CgsRhHy8.js → Check-CKtI4hGn.js} +1 -1
- package/dist/client/assets/{CheckCircle-VXm1pD5i.js → CheckCircle-CP9SNP9d.js} +1 -1
- package/dist/client/assets/{ChevronDown-Wb4xUAM2.js → ChevronDown-DfcP5Y1G.js} +1 -1
- package/dist/client/assets/{ChevronRight-Bb4Md-MD.js → ChevronRight-BIlAcWT5.js} +1 -1
- package/dist/client/assets/{ChevronUp-Bsb-Y77Y.js → ChevronUp-SkDgfV9P.js} +1 -1
- package/dist/client/assets/{Copy01-DZd32DIO.js → Copy01-CjgXfC24.js} +1 -1
- package/dist/client/assets/{CpuChip01-BPw4omKe.js → CpuChip01-t2Y6TVWu.js} +1 -1
- package/dist/client/assets/{DotsVertical-Do26-QjL.js → DotsVertical-DTkYQ2kM.js} +1 -1
- package/dist/client/assets/{Eye-B22W8AyK.js → Eye-D7uVxsd6.js} +1 -1
- package/dist/client/assets/{FilterLines-Bc1kxraS.js → FilterLines-FPJrIJmP.js} +1 -1
- package/dist/client/assets/{HardDrive-BUNzYRdb.js → HardDrive-DLAbk7yi.js} +1 -1
- package/dist/client/assets/{Key01-CG1NND7T.js → Key01-BNEdMwqa.js} +1 -1
- package/dist/client/assets/{LayoutLeft-m1wg28yS.js → LayoutLeft-pwNqM9Bq.js} +1 -1
- package/dist/client/assets/{LinkExternal01-BHdYJ4vg.js → LinkExternal01-CUFmEJ-r.js} +1 -1
- package/dist/client/assets/{LogOut01-CTki1bzq.js → LogOut01-CL5erPho.js} +1 -1
- package/dist/client/assets/{Monitor01-DcyY807V.js → Monitor01-BTT_gkH0.js} +1 -1
- package/dist/client/assets/{Palette-BEUtyKuF.js → Palette-D4hJdFvA.js} +1 -1
- package/dist/client/assets/{Play-DrITqLDw.js → Play-BPaNNVsN.js} +1 -1
- package/dist/client/assets/{Plus-BmYOuiAj.js → Plus-DigHRvrB.js} +1 -1
- package/dist/client/assets/{SearchLg-Brn3yddB.js → SearchLg-CcVjy7cv.js} +1 -1
- package/dist/client/assets/{SearchMd-h05KKMiS.js → SearchMd-UJHWms5O.js} +1 -1
- package/dist/client/assets/{Settings02-DqYJFs_A.js → Settings02-C2z8V4b1.js} +1 -1
- package/dist/client/assets/{Shield01-BGuTNf8w.js → Shield01-CE6E4vWT.js} +1 -1
- package/dist/client/assets/{Star01-sYD82Np9.js → Star01-Cw9ulDl8.js} +1 -1
- package/dist/client/assets/{Stars01-CfCAp21f.js → Stars01-DqE2p9rj.js} +1 -1
- package/dist/client/assets/{Stars02-DnbvYkKU.js → Stars02-DKPhD_jS.js} +1 -1
- package/dist/client/assets/{Sun-tw8Adw2s.js → Sun-quy8cVor.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-BnpMv-f4.js → SwitchHorizontal01-B7BlklUe.js} +1 -1
- package/dist/client/assets/{Tool01-CTroi0ek.js → Tool01-d6PLxuqZ.js} +1 -1
- package/dist/client/assets/{Tool02-Bh88tYGs.js → Tool02-CG-MJEAZ.js} +1 -1
- package/dist/client/assets/{Trash01-B8ymhEo_.js → Trash01-BEfNCj7H.js} +1 -1
- package/dist/client/assets/{TrendUp01-Bqs7ykt4.js → TrendUp01-CTjYh8Ln.js} +1 -1
- package/dist/client/assets/{Upload01-CRF4bF0L.js → Upload01-CSguqWGj.js} +1 -1
- package/dist/client/assets/{User01-BMMY0J4X.js → User01-CN3QhMor.js} +1 -1
- package/dist/client/assets/{Users01-Co3nN3tw.js → Users01-ALInePB-.js} +1 -1
- package/dist/client/assets/{Users03-23U4ny0D.js → Users03-DBjTudH5.js} +1 -1
- package/dist/client/assets/{X-BM44NliR.js → X-DvW6lnRi.js} +1 -1
- package/dist/client/assets/{XCircle-UQVfZTIm.js → XCircle-Fr7R0JyH.js} +1 -1
- package/dist/client/assets/{XClose-Beh-B9Gb.js → XClose-yYL9HV11.js} +1 -1
- package/dist/client/assets/{Zap-BuelQrvQ.js → Zap-B2AmO5T-.js} +1 -1
- package/dist/client/assets/{ZapSquare-Cp9irGGl.js → ZapSquare-DHGjnuEa.js} +1 -1
- package/dist/client/assets/{access-gate-D-oUG6gg.js → access-gate-8z-Zjc69.js} +1 -1
- package/dist/client/assets/{add-section-modal-D_hcTQ7N.js → add-section-modal-DsiOPGLK.js} +1 -1
- package/dist/client/assets/{agent-icon-CSidaJ6B.js → agent-icon-D0v0CAMQ.js} +1 -1
- package/dist/client/assets/{agents-list-DpnxFgYY.js → agents-list-DYxy5a5k.js} +1 -1
- package/dist/client/assets/{ai-providers-B2Fsskz4.js → ai-providers-DMeor9A-.js} +1 -1
- package/dist/client/assets/{alert-BTpI2Cnj.js → alert-6lmsmlPy.js} +1 -1
- package/dist/client/assets/{alert-dialog-FVJZWl26.js → alert-dialog-DctPzbrJ.js} +1 -1
- package/dist/client/assets/{app-editor-B4ngBBof.js → app-editor-BSi2b5c2.js} +1 -1
- package/dist/client/assets/{auth-D-uIp2CQ.js → auth-CVt7QHVR.js} +1 -1
- package/dist/client/assets/{auth-catchall-V3EeqtwY.js → auth-catchall-BBAoqWD1.js} +1 -1
- package/dist/client/assets/{auth-entry-C08ZxDNT.js → auth-entry-BGQZOuqe.js} +1 -1
- package/dist/client/assets/{auth-split-layout-ByioBOA7.js → auth-split-layout-CjrJN_23.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-DObbFBl5.js → authenticate-and-persist-oauth-DiCc1vu0.js} +1 -1
- package/dist/client/assets/{automation-list-row-DMeZ0lJ3.js → automation-list-row-2xdC3lws.js} +1 -1
- package/dist/client/assets/{automation-runs-DChno1Ee.js → automation-runs-BQK2qG6I.js} +1 -1
- package/dist/client/assets/{automations-B1nDP5Tu.js → automations-BQP8aSA2.js} +1 -1
- package/dist/client/assets/{avatar-BumNKk7X.js → avatar-DNua1J9J.js} +1 -1
- package/dist/client/assets/{badge-BFv5PsKE.js → badge-p90WsvMa.js} +1 -1
- package/dist/client/assets/{block-document-DT1iEokX.js → block-document-gAmyXvk5.js} +1 -1
- package/dist/client/assets/{brand-context-CjUnREO9.js → brand-context-BfD_K-Ti.js} +1 -1
- package/dist/client/assets/{buckets-D7qH3DY9.js → buckets-CFmjd9DE.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-R7nvjZc1.js → bulk-category-panel-CyIrpC-y.js} +1 -1
- package/dist/client/assets/{calendar-DMZ7yz5j.js → calendar-CsE8P_v6.js} +1 -1
- package/dist/client/assets/{capability-load-error-Zpx0CzA1.js → capability-load-error-BwIQSVk2.js} +1 -1
- package/dist/client/assets/{card-Dv8gN6wM.js → card-CAY4LRtc.js} +1 -1
- package/dist/client/assets/{category-editor-DBU4RcGL.js → category-editor-08CLTJQC.js} +1 -1
- package/dist/client/assets/{chat-context-D2jz7TPk.js → chat-context-CZ8b18Fc.js} +1 -1
- package/dist/client/assets/{checkbox-B5fS-ChG.js → checkbox-CpkMAAxs.js} +1 -1
- package/dist/client/assets/{cli-auth-success-Dq-DdX99.js → cli-auth-success-CGJ8yhJu.js} +1 -1
- package/dist/client/assets/{collection-detail-BJdFlI_D.js → collection-detail-5DB4iz01.js} +1 -1
- package/dist/client/assets/{collection-display-button-DlQC5Fqe.js → collection-display-button-CdVHGe1g.js} +1 -1
- package/dist/client/assets/{collection-search-CclDfE5O.js → collection-search-BXhZ3O1D.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DRbR52Xw.js → collection-table-wrapper-BzYCc6H4.js} +1 -1
- package/dist/client/assets/{collection-tabs-B0dT6Ygy.js → collection-tabs-BMBpTAbo.js} +1 -1
- package/dist/client/assets/{command-Bjp1VURS.js → command-BOE7MzSb.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-EUvt30Jc.js → commerce-onboarding-B0diSDM4.js} +1 -1
- package/dist/client/assets/{companions-core-BDbmsLM0.js → companions-core-BmlZqb3z.js} +1 -1
- package/dist/client/assets/{connect-DaqnZRt8.js → connect-NJbaa1Dq.js} +1 -1
- package/dist/client/assets/{connection-C0Suj0GO.js → connection-BvHGO9d1.js} +1 -1
- package/dist/client/assets/{connection-card-HFSstqIJ.js → connection-card-DdoyOAg3.js} +1 -1
- package/dist/client/assets/{connection-detail-BvAKPB53.js → connection-detail-w7-8BS05.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-CKgaIsD-.js → connection-form-helpers-D6bw0HEg.js} +1 -1
- package/dist/client/assets/{connections-O4_j66gP.js → connections-WZ8-STzM.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-NjFnhgvn.js → decopilot-sse-pool-B682c9RZ.js} +1 -1
- package/dist/client/assets/{dialog-D4l4Xdsp.js → dialog-CRj0zBQ_.js} +1 -1
- package/dist/client/assets/{domain-settings-BMIxOiTg.js → domain-settings-D51GX1ZP.js} +1 -1
- package/dist/client/assets/{drawer-C3pYai9a.js → drawer-ZyqfN_k8.js} +1 -1
- package/dist/client/assets/{dropdown-menu-Q--ZyLLW.js → dropdown-menu-BaxzJoD1.js} +1 -1
- package/dist/client/assets/{empty-state-BOcwt_Pf.js → empty-state-CX0ihzR5.js} +1 -1
- package/dist/client/assets/{extract-connection-data-Df7SJj9F.js → extract-connection-data-DY9nlWot.js} +1 -1
- package/dist/client/assets/{file-explorer-lqBegrgA.js → file-explorer-DTnN5mkB.js} +1 -1
- package/dist/client/assets/{form-DMrBv8ot.js → form-r7LLoRlt.js} +1 -1
- package/dist/client/assets/{general-N31775KP.js → general-BPd6Q1nT.js} +1 -1
- package/dist/client/assets/{github-repo-picker-Bw5gD-qj.js → github-repo-picker-C4LbYEVp.js} +1 -1
- package/dist/client/assets/{hooks-BkWYCTuM.js → hooks-C_nIzkQJ.js} +1 -1
- package/dist/client/assets/{index-BR7TGZHq.js → index-B6b7-ndb.js} +1 -1
- package/dist/client/assets/{index-NXIL8Ow6.js → index-BD1XIck_.js} +3 -3
- package/dist/client/assets/{index-3_M3tW1F.js → index-BDYacwdo.js} +1 -1
- package/dist/client/assets/{index-yBY16i4r.js → index-BF6I2QS7.js} +1 -1
- package/dist/client/assets/{index-DIkj5DIc.js → index-Bur1TB7U.js} +1 -1
- package/dist/client/assets/{index-Dsil6t1i.js → index-CKKq15hA.js} +1 -1
- package/dist/client/assets/{index-DptGhhs0.js → index-CsMY3E0n.js} +3 -3
- package/dist/client/assets/{index-BxSgbIJg.js → index-D56QVQ2L.js} +1 -1
- package/dist/client/assets/{index-C8SvWM2K.js → index-DauQBNEJ.js} +1 -1
- package/dist/client/assets/{index-CfVmXxnZ.js → index-Y5IRZDB7.js} +5 -5
- package/dist/client/assets/{index-DBssoMSm.js → index-bW9oPKeA.js} +1 -1
- package/dist/client/assets/{index-redirect-dX53aGUA.js → index-redirect-Di0ZRgqA.js} +1 -1
- package/dist/client/assets/{input-zj8m7n84.js → input-Bxlv4wq5.js} +1 -1
- package/dist/client/assets/{integration-icon-BuPK5TYy.js → integration-icon-BnGA9SX5.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-C6-_qm1d.js → invite-member-dialog-CIwtalGm.js} +1 -1
- package/dist/client/assets/{label-CuF09Kzu.js → label-CPAOOmgU.js} +1 -1
- package/dist/client/assets/{layout-DBvRMRIb.js → layout-msWgxbNB.js} +1 -1
- package/dist/client/assets/{login-Cc4SDSF_.js → login-C36k4ZEx.js} +1 -1
- package/dist/client/assets/{mcp-oauth-shlK2GTY.js → mcp-oauth-BBshTxEG.js} +1 -1
- package/dist/client/assets/{members-BDXBmXwe.js → members-BJnujW0k.js} +1 -1
- package/dist/client/assets/{monaco-editor-CVT6PsIN.js → monaco-editor-pAlq3Hbk.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-Cdet9jiU.js → monitoring-stats-row-BG7ttYuz.js} +1 -1
- package/dist/client/assets/{multi-select-xU_EwzSI.js → multi-select-qotXRxVG.js} +1 -1
- package/dist/client/assets/{oauth-callback-iNyi40DB.js → oauth-callback-DGSSyNOQ.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-Dm1COiz9.js → oauth-callback-ai-provider-DUZnMuan.js} +1 -1
- package/dist/client/assets/{onboarding-Cloqiw3U.js → onboarding-CHd3Ety4.js} +1 -1
- package/dist/client/assets/{org-layout-CAFsjPqf.js → org-layout-DTr6NF05.js} +1 -1
- package/dist/client/assets/{organization-choice-Cyi_e8Zq.js → organization-choice-CeJCjdWH.js} +1 -1
- package/dist/client/assets/{orgs-S_k4xMrd.js → orgs-BwxsxSe_.js} +1 -1
- package/dist/client/assets/{page-seo-form-D01XOKmk.js → page-seo-form-D0xtD3rR.js} +1 -1
- package/dist/client/assets/{popover-Bt8NA7TT.js → popover-DJARnKJN.js} +1 -1
- package/dist/client/assets/{post-editor-C7T3qUe4.js → post-editor-B3yOO9Jy.js} +1 -1
- package/dist/client/assets/{primitives-CghAr9iC.js → primitives-BmYJCXvO.js} +1 -1
- package/dist/client/assets/{profile-Dte5ZwvH.js → profile-BA45RqWa.js} +1 -1
- package/dist/client/assets/project-app-view-D64d6xFs.js +1 -0
- package/dist/client/assets/record-editor-CkXMC3NF.js +1 -0
- package/dist/client/assets/{redirect-editor-BSuCXuw4.js → redirect-editor-cTl0Zx_4.js} +1 -1
- package/dist/client/assets/registry-VbA6qBLr.js +2 -0
- package/dist/client/assets/{registry-layout-D7OeE4Tp.js → registry-layout-CwYqOrKQ.js} +1 -1
- package/dist/client/assets/{reports-Ii6S1PYR.js → reports-krQamnYh.js} +1 -1
- package/dist/client/assets/{require-capability-D5sKrc-a.js → require-capability-CFPLqPWb.js} +1 -1
- package/dist/client/assets/{required-auth-layout-PejcRLRr.js → required-auth-layout-BB-yluZd.js} +1 -1
- package/dist/client/assets/{reset-password-j1MU8BBT.js → reset-password-tBeq6iDe.js} +1 -1
- package/dist/client/assets/{roles-CpX37qPN.js → roles-CN9bPOqD.js} +1 -1
- package/dist/client/assets/{search-input-Bf_CjAux.js → search-input-DoOBid5A.js} +1 -1
- package/dist/client/assets/{secrets-DidOyNZ0.js → secrets-CdSh-98G.js} +1 -1
- package/dist/client/assets/{sections-editor-DY2AuZd7.js → sections-editor-BSuE7v7K.js} +1 -1
- package/dist/client/assets/{select-j9WEM8Sh.js → select-Bv-2ewD2.js} +1 -1
- package/dist/client/assets/{select-model-C8d0poms.js → select-model-DGHQ7XQO.js} +1 -1
- package/dist/client/assets/{self-tool-result-aQ7EVEiZ.js → self-tool-result-BJVDpzHC.js} +1 -1
- package/dist/client/assets/{seo-editor-DGYP3acD.js → seo-editor-BiXc5-eM.js} +1 -1
- package/dist/client/assets/{settings-layout-DWcGqshR.js → settings-layout-2gF7ZghW.js} +1 -1
- package/dist/client/assets/{settings-section-fm3Mm6Bm.js → settings-section-DlAvH5Ow.js} +1 -1
- package/dist/client/assets/{shell-controls-DVyMygC3.js → shell-controls-ui9DsV1B.js} +1 -1
- package/dist/client/assets/{shell-layout-Qdn6Ab14.js → shell-layout-_reN3Shc.js} +1 -1
- package/dist/client/assets/{sidebar-DYUk0Bcn.js → sidebar-ChD8CCYT.js} +1 -1
- package/dist/client/assets/{skeleton--88gs_EO.js → skeleton-C65ogTvo.js} +1 -1
- package/dist/client/assets/{spinner-DEsDb5EQ.js → spinner-_TqSaOQN.js} +1 -1
- package/dist/client/assets/{sso-C0YVRrqi.js → sso-BqBxDadH.js} +1 -1
- package/dist/client/assets/{store-9L8vOeYP.js → store-T98vssIu.js} +1 -1
- package/dist/client/assets/store-registry-BcExQn86.js +2 -0
- package/dist/client/assets/{studio-tools-Dz4porfg.js → studio-tools-DfsuYmJt.js} +1 -1
- package/dist/client/assets/{switch-CjtCOM9l.js → switch-lfu04CGM.js} +1 -1
- package/dist/client/assets/{tab-id-swDgZMnB.js → tab-id-BqPdm69o.js} +1 -1
- package/dist/client/assets/{table-B1o0Pwj4.js → table-C2TMn1li.js} +1 -1
- package/dist/client/assets/{tabs-VUaZhlmm.js → tabs-oVlPQ_HA.js} +1 -1
- package/dist/client/assets/{textarea-Bs8WvAl6.js → textarea-Bn4a6Dgo.js} +1 -1
- package/dist/client/assets/{toggle-group-BsLp02VA.js → toggle-group-BRzf8EHW.js} +1 -1
- package/dist/client/assets/{toolbar-B5h5oyq6.js → toolbar-DYLo2f04.js} +1 -1
- package/dist/client/assets/{tooltip-CETnd3ay.js → tooltip-Cpi2mja1.js} +1 -1
- package/dist/client/assets/{use-ai-providers-gi5xr2mP.js → use-ai-providers-DFQIA0YS.js} +1 -1
- package/dist/client/assets/{use-automations-DhjGDNZK.js → use-automations-CwyD7KUw.js} +1 -1
- package/dist/client/assets/{use-autosave-D0NLBkKG.js → use-autosave-DEblj-jV.js} +1 -1
- package/dist/client/assets/{use-capability-BqS7iGUH.js → use-capability-Cc8HiELK.js} +1 -1
- package/dist/client/assets/{use-clock-tick-B9BJ0pwX.js → use-clock-tick--ht2pzb8.js} +1 -1
- package/dist/client/assets/{use-connection-BMokl4CO.js → use-connection-CSBpX4PU.js} +1 -1
- package/dist/client/assets/{use-copy-Be1Kjd_w.js → use-copy-DTInUOoW.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-CWkwgd9r.js → use-create-virtual-mcp-CMUKV_-M.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-D0IOAPSF.js → use-debounced-autosave-2vwUh_VG.js} +1 -1
- package/dist/client/assets/{use-debounced-value-B-JvHFEo.js → use-debounced-value-CwhSCFuf.js} +1 -1
- package/dist/client/assets/{use-deco-credits-UciEpjbi.js → use-deco-credits-DvYCBBFc.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CEPq_dZU.js → use-decopilot-events-DM97rtIw.js} +1 -1
- package/dist/client/assets/{use-delete-connection-COvCqZ-1.js → use-delete-connection-B58V-_B1.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-BJaOQser.js → use-deployment-admin-CF8Zio-a.js} +1 -1
- package/dist/client/assets/{use-file-configs-I7iEol3j.js → use-file-configs-Eq9DEvtL.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-CK3Uizc8.js → use-infinite-scroll-BhWnCwa_.js} +1 -1
- package/dist/client/assets/{use-join-requests-DqDoWz8D.js → use-join-requests-Babs1XE8.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-h3xamCXm.js → use-mcp-auth-status-8kwewAjR.js} +1 -1
- package/dist/client/assets/{use-mcp-client-C7paE-cE.js → use-mcp-client-CpOZK5-l.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DS7HyfmS.js → use-mcp-tools-CqY2nbaz.js} +1 -1
- package/dist/client/assets/{use-members-BuBLbPW8.js → use-members-DsksLoYY.js} +1 -1
- package/dist/client/assets/{use-mobile-CYh3EGEt.js → use-mobile-ieOqtEHL.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-Bqz6pwLi.js → use-navigate-to-agent-DBGPkYj0.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-CsKd0mpo.js → use-org-auth-client-BU-wvvoc.js} +1 -1
- package/dist/client/assets/{use-org-sso-CCq7sZnB.js → use-org-sso-DOw7Tfv8.js} +1 -1
- package/dist/client/assets/{use-organization-roles-CgtJI-6n.js → use-organization-roles-Dcy4uPK8.js} +1 -1
- package/dist/client/assets/{use-organization-settings-MkvwyFUq.js → use-organization-settings-CVw_W4UD.js} +1 -1
- package/dist/client/assets/{use-registry-connections-YnGGDwWM.js → use-registry-connections-BPju-Y9r.js} +1 -1
- package/dist/client/assets/{use-secrets-HEeF0D3f.js → use-secrets-CaSIcPta.js} +1 -1
- package/dist/client/assets/{use-status-sounds-CyFcW6V5.js → use-status-sounds-BgT_jGkq.js} +1 -1
- package/dist/client/assets/{use-tags-BDVrYGwL.js → use-tags-C7XcT7ZI.js} +1 -1
- package/dist/client/assets/{use-view-mode-9B1lHoFF.js → use-view-mode-ChsGe0PO.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-Bdv0Gghv.js → use-virtual-mcp-6MeqW-FL.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-D_QXkkfk.js +1 -0
- package/dist/client/assets/{useQueries-Bq9KgQR-.js → useQueries-B5JmsTek.js} +1 -1
- package/dist/client/assets/{useRouterState-Bf1ibFXD.js → useRouterState-Ch85_6Dg.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-C2EK0lz_.js +1 -0
- package/dist/client/assets/{users-BpJTuCAK.js → users-CAHjBk9x.js} +1 -1
- package/dist/client/assets/{variant-calendar-B7O5BNIE.js → variant-calendar-DwnAVLtp.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-BO7qzBum.js → view-mode-toggle-D9-ncCO8.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +158 -158
- package/dist/server/server.js +123 -123
- package/package.json +1 -1
- package/dist/client/assets/project-app-view-BkR_dxRJ.js +0 -1
- package/dist/client/assets/record-editor-C_TZAxUC.js +0 -1
- package/dist/client/assets/registry-Cy4VwkhT.js +0 -2
- package/dist/client/assets/store-registry-DZm0Mqt3.js +0 -2
- package/dist/client/assets/useInfiniteQuery-BIuIIh4Y.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-TLdwTHtB.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as J,bQ as Dv,bR as pR,j as R,ag as fR,ax as tt,bS as hR,c as Nt,b as gi,m as wn,bx as Wm,bT as Cs,H as mR,d as gR,f as bR,B as Mv,U as Bb}from"./index-DptGhhs0.js";import{i as Pv}from"./Check-CgsRhHy8.js";import{a as Fv}from"./Copy01-DZd32DIO.js";import{e as ER,g as yR,f as TR,b as SR}from"./dialog-D4l4Xdsp.js";import{n as kR}from"./Tool02-Bh88tYGs.js";import{aV as AR,aW as vR,w as _R}from"./agent-icon-CSidaJ6B.js";import{u as CR}from"./use-mobile-CYh3EGEt.js";import{h as NR}from"./tab-id-swDgZMnB.js";import{i as wR}from"./ChevronRight-Bb4Md-MD.js";function Ub(e){return e?e.replace(/[_-]/g," ").toLowerCase().split(" ").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" "):""}function UZ(e,t){return e==="output-error"||e==="output-denied"?"error":e==="approval-requested"?"approval":e==="input-streaming"||e==="input-available"||e==="output-available"&&t===!0?"loading":"idle"}function HZ(e){if(e==null||typeof e!="object")return;const t=e;if(t.structuredContent&&typeof t.structuredContent=="object")return t.structuredContent;if(Array.isArray(t.content)){const n=t.content[0];if(n?.type==="text"&&typeof n.text=="string")try{return JSON.parse(n.text)}catch{return}return}return e}function Ke(e){this.content=e}Ke.prototype={constructor:Ke,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,i=r.find(e),a=r.content.slice();return i==-1?a.push(n||e,t):(a[i+1]=t,n&&(a[i]=n)),new Ke(a)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new Ke(n)},addToStart:function(e,t){return new Ke([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new Ke(n)},addBefore:function(e,t,n){var r=this.remove(t),i=r.content.slice(),a=r.find(e);return i.splice(a==-1?i.length:a,0,t,n),new Ke(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return e=Ke.from(e),e.size?new Ke(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=Ke.from(e),e.size?new Ke(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=Ke.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}};Ke.from=function(e){if(e instanceof Ke)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new Ke(t)};function Bv(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),a=t.child(r);if(i==a){n+=i.nodeSize;continue}if(!i.sameMarkup(a))return n;if(i.isText&&i.text!=a.text){for(let s=0;i.text[s]==a.text[s];s++)n++;return n}if(i.content.size||a.content.size){let s=Bv(i.content,a.content,n+1);if(s!=null)return s}n+=i.nodeSize}}function Uv(e,t,n,r){for(let i=e.childCount,a=t.childCount;;){if(i==0||a==0)return i==a?null:{a:n,b:r};let s=e.child(--i),o=t.child(--a),l=s.nodeSize;if(s==o){n-=l,r-=l;continue}if(!s.sameMarkup(o))return{a:n,b:r};if(s.isText&&s.text!=o.text){let u=0,c=Math.min(s.text.length,o.text.length);for(;u<c&&s.text[s.text.length-u-1]==o.text[o.text.length-u-1];)u++,n--,r--;return{a:n,b:r}}if(s.content.size||o.content.size){let u=Uv(s.content,o.content,n-1,r-1);if(u)return u}n-=l,r-=l}}class ${constructor(t,n){if(this.content=t,this.size=n||0,n==null)for(let r=0;r<t.length;r++)this.size+=t[r].nodeSize}nodesBetween(t,n,r,i=0,a){for(let s=0,o=0;o<n;s++){let l=this.content[s],u=o+l.nodeSize;if(u>t&&r(l,i+o,a||null,s)!==!1&&l.content.size){let c=o+1;l.nodesBetween(Math.max(0,t-c),Math.min(l.content.size,n-c),r,i+c)}o=u}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,r,i){let a="",s=!0;return this.nodesBetween(t,n,(o,l)=>{let u=o.isText?o.text.slice(Math.max(t,l)-l,n-l):o.isLeaf?i?typeof i=="function"?i(o):i:o.type.spec.leafText?o.type.spec.leafText(o):"":"";o.isBlock&&(o.isLeaf&&u||o.isTextblock)&&r&&(s?s=!1:a+=r),a+=u},0),a}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,i=this.content.slice(),a=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),a=1);a<t.content.length;a++)i.push(t.content[a]);return new $(i,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let r=[],i=0;if(n>t)for(let a=0,s=0;s<n;a++){let o=this.content[a],l=s+o.nodeSize;l>t&&((s<t||l>n)&&(o.isText?o=o.cut(Math.max(0,t-s),Math.min(o.text.length,n-s)):o=o.cut(Math.max(0,t-s-1),Math.min(o.content.size,n-s-1))),r.push(o),i+=o.nodeSize),s=l}return new $(r,i)}cutByIndex(t,n){return t==n?$.empty:t==0&&n==this.content.length?this:new $(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let i=this.content.slice(),a=this.size+n.nodeSize-r.nodeSize;return i[t]=n,new $(i,a)}addToStart(t){return new $([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new $(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(t.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(t){let n=this.content[t];if(!n)throw new RangeError("Index "+t+" out of range for "+this);return n}maybeChild(t){return this.content[t]||null}forEach(t){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];t(i,r,n),r+=i.nodeSize}}findDiffStart(t,n=0){return Bv(this,t,n)}findDiffEnd(t,n=this.size,r=t.size){return Uv(this,t,n,r)}findIndex(t){if(t==0)return Ka(0,t);if(t==this.size)return Ka(this.content.length,t);if(t>this.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=this.child(n),a=r+i.nodeSize;if(a>=t)return a==t?Ka(n+1,a):Ka(n,r);r=a}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return $.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new $(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return $.empty;let n,r=0;for(let i=0;i<t.length;i++){let a=t[i];r+=a.nodeSize,i&&a.isText&&t[i-1].sameMarkup(a)?(n||(n=t.slice(0,i)),n[n.length-1]=a.withText(n[n.length-1].text+a.text)):n&&n.push(a)}return new $(n||t,r)}static from(t){if(!t)return $.empty;if(t instanceof $)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new $([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}$.empty=new $([],0);const ul={index:0,offset:0};function Ka(e,t){return ul.index=e,ul.offset=t,ul}function Ns(e,t){if(e===t)return!0;if(!(e&&typeof e=="object")||!(t&&typeof t=="object"))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!Ns(e[r],t[r]))return!1}else{for(let r in e)if(!(r in t)||!Ns(e[r],t[r]))return!1;for(let r in t)if(!(r in e))return!1}return!0}let ve=class Vh{constructor(t,n){this.type=t,this.attrs=n}addToSet(t){let n,r=!1;for(let i=0;i<t.length;i++){let a=t[i];if(this.eq(a))return t;if(this.type.excludes(a.type))n||(n=t.slice(0,i));else{if(a.type.excludes(this.type))return t;!r&&a.type.rank>this.type.rank&&(n||(n=t.slice(0,i)),n.push(this),r=!0),n&&n.push(a)}}return n||(n=t.slice()),r||n.push(this),n}removeFromSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return t.slice(0,n).concat(t.slice(n+1));return t}isInSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return!0;return!1}eq(t){return this==t||this.type==t.type&&Ns(this.attrs,t.attrs)}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=t.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let i=r.create(n.attrs);return r.checkAttrs(i.attrs),i}static sameSet(t,n){if(t==n)return!0;if(t.length!=n.length)return!1;for(let r=0;r<t.length;r++)if(!t[r].eq(n[r]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return Vh.none;if(t instanceof Vh)return[t];let n=t.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}};ve.none=[];class ws extends Error{}class K{constructor(t,n,r){this.content=t,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=zv(this.content,t+this.openStart,n);return r&&new K(r,this.openStart,this.openEnd)}removeBetween(t,n){return new K(Hv(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,n){if(!n)return K.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new K($.fromJSON(t,n.content),r,i)}static maxOpen(t,n=!0){let r=0,i=0;for(let a=t.firstChild;a&&!a.isLeaf&&(n||!a.type.spec.isolating);a=a.firstChild)r++;for(let a=t.lastChild;a&&!a.isLeaf&&(n||!a.type.spec.isolating);a=a.lastChild)i++;return new K(t,r,i)}}K.empty=new K($.empty,0,0);function Hv(e,t,n){let{index:r,offset:i}=e.findIndex(t),a=e.maybeChild(r),{index:s,offset:o}=e.findIndex(n);if(i==t||a.isText){if(o!=n&&!e.child(s).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return e.replaceChild(r,a.copy(Hv(a.content,t-i-1,n-i-1)))}function zv(e,t,n,r){let{index:i,offset:a}=e.findIndex(t),s=e.maybeChild(i);if(a==t||s.isText)return r&&!r.canReplace(i,i,n)?null:e.cut(0,t).append(n).append(e.cut(t));let o=zv(s.content,t-a-1,n,s);return o&&e.replaceChild(i,s.copy(o))}function IR(e,t,n){if(n.openStart>e.depth)throw new ws("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new ws("Inconsistent open depths");return $v(e,t,n,0)}function $v(e,t,n,r){let i=e.index(r),a=e.node(r);if(i==t.index(r)&&r<e.depth-n.openStart){let s=$v(e,t,n,r+1);return a.copy(a.content.replaceChild(i,s))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&e.depth==r&&t.depth==r){let s=e.parent,o=s.content;return Tr(s,o.cut(0,e.parentOffset).append(n.content).append(o.cut(t.parentOffset)))}else{let{start:s,end:o}=RR(n,e);return Tr(a,Gv(e,s,o,t,r))}else return Tr(a,Is(e,t,r))}function qv(e,t){if(!t.type.compatibleContent(e.type))throw new ws("Cannot join "+t.type.name+" onto "+e.type.name)}function Wh(e,t,n){let r=e.node(n);return qv(r,t.node(n)),r}function yr(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function Xi(e,t,n,r){let i=(t||e).node(n),a=0,s=t?t.index(n):i.childCount;e&&(a=e.index(n),e.depth>n?a++:e.textOffset&&(yr(e.nodeAfter,r),a++));for(let o=a;o<s;o++)yr(i.child(o),r);t&&t.depth==n&&t.textOffset&&yr(t.nodeBefore,r)}function Tr(e,t){return e.type.checkContent(t),e.copy(t)}function Gv(e,t,n,r,i){let a=e.depth>i&&Wh(e,t,i+1),s=r.depth>i&&Wh(n,r,i+1),o=[];return Xi(null,e,i,o),a&&s&&t.index(i)==n.index(i)?(qv(a,s),yr(Tr(a,Gv(e,t,n,r,i+1)),o)):(a&&yr(Tr(a,Is(e,t,i+1)),o),Xi(t,n,i,o),s&&yr(Tr(s,Is(n,r,i+1)),o)),Xi(r,null,i,o),new $(o)}function Is(e,t,n){let r=[];if(Xi(null,e,n,r),e.depth>n){let i=Wh(e,t,n+1);yr(Tr(i,Is(e,t,n+1)),r)}return Xi(t,null,n,r),new $(r)}function RR(e,t){let n=t.depth-e.openStart,i=t.node(n).copy(e.content);for(let a=n-1;a>=0;a--)i=t.node(a).copy($.from(i));return{start:i.resolveNoCache(e.openStart+n),end:i.resolveNoCache(i.content.size-e.openEnd-n)}}class ga{constructor(t,n,r){this.pos=t,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=t.child(n);return r?t.child(n).cut(r):i}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let r=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let a=0;a<t;a++)i+=r.child(a).nodeSize;return i}marks(){let t=this.parent,n=this.index();if(t.content.size==0)return ve.none;if(this.textOffset)return t.child(n).marks;let r=t.maybeChild(n-1),i=t.maybeChild(n);if(!r){let o=r;r=i,i=o}let a=r.marks;for(var s=0;s<a.length;s++)a[s].type.spec.inclusive===!1&&(!i||!a[s].isInSet(i.marks))&&(a=a[s--].removeFromSet(a));return a}marksAcross(t){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=t.parent.maybeChild(t.index());for(var a=0;a<r.length;a++)r[a].type.spec.inclusive===!1&&(!i||!r[a].isInSet(i.marks))&&(r=r[a--].removeFromSet(r));return r}sharedDepth(t){for(let n=this.depth;n>0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos<this.pos)return t.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);r>=0;r--)if(t.pos<=this.end(r)&&(!n||n(this.node(r))))return new Rs(this,t,r);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos<this.pos?t:this}toString(){let t="";for(let n=1;n<=this.depth;n++)t+=(t?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return t+":"+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,a=n;for(let s=t;;){let{index:o,offset:l}=s.content.findIndex(a),u=a-l;if(r.push(s,o,i+l),!u||(s=s.child(o),s.isText))break;a=u-1,i+=l+1}return new ga(n,r,a)}static resolveCached(t,n){let r=Hb.get(t);if(r)for(let a=0;a<r.elts.length;a++){let s=r.elts[a];if(s.pos==n)return s}else Hb.set(t,r=new xR);let i=r.elts[r.i]=ga.resolve(t,n);return r.i=(r.i+1)%OR,i}}class xR{constructor(){this.elts=[],this.i=0}}const OR=12,Hb=new WeakMap;class Rs{constructor(t,n,r){this.$from=t,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const LR=Object.create(null);class Xt{constructor(t,n,r,i=ve.none){this.type=t,this.attrs=n,this.marks=i,this.content=r||$.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(t){return this.content.child(t)}maybeChild(t){return this.content.maybeChild(t)}forEach(t){this.content.forEach(t)}nodesBetween(t,n,r,i=0){this.content.nodesBetween(t,n,r,i,this)}descendants(t){this.nodesBetween(0,this.content.size,t)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(t,n,r,i){return this.content.textBetween(t,n,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)}sameMarkup(t){return this.hasMarkup(t.type,t.attrs,t.marks)}hasMarkup(t,n,r){return this.type==t&&Ns(this.attrs,n||t.defaultAttrs||LR)&&ve.sameSet(this.marks,r||ve.none)}copy(t=null){return t==this.content?this:new Xt(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new Xt(this.type,this.attrs,this.content,t)}cut(t,n=this.content.size){return t==0&&n==this.content.size?this:this.copy(this.content.cut(t,n))}slice(t,n=this.content.size,r=!1){if(t==n)return K.empty;let i=this.resolve(t),a=this.resolve(n),s=r?0:i.sharedDepth(n),o=i.start(s),u=i.node(s).content.cut(i.pos-o,a.pos-o);return new K(u,i.depth-s,a.depth-s)}replace(t,n,r){return IR(this.resolve(t),this.resolve(n),r)}nodeAt(t){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(t);if(n=n.maybeChild(r),!n)return null;if(i==t||n.isText)return n;t-=i+1}}childAfter(t){let{index:n,offset:r}=this.content.findIndex(t);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(t){if(t==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(t);if(r<t)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(t){return ga.resolveCached(this,t)}resolveNoCache(t){return ga.resolve(this,t)}rangeHasMark(t,n,r){let i=!1;return n>t&&this.nodesBetween(t,n,a=>(r.isInSet(a.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),jv(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,r=$.empty,i=0,a=r.childCount){let s=this.contentMatchAt(t).matchFragment(r,i,a),o=s&&s.matchFragment(this.content,n);if(!o||!o.validEnd)return!1;for(let l=i;l<a;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(t,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let a=this.contentMatchAt(t).matchType(r),s=a&&a.matchFragment(this.content,n);return s?s.validEnd:!1}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let t=ve.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),t=r.addToSet(t)}if(!ve.sameSet(t,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,r)}let i=$.fromJSON(t,n.content),a=t.nodeType(n.type).create(n.attrs,i,r);return a.type.checkAttrs(a.attrs),a}}Xt.prototype.text=void 0;class xs extends Xt{constructor(t,n,r,i){if(super(t,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):jv(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new xs(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new xs(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function jv(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class _r{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new DR(t,n);if(r.next==null)return _r.empty;let i=Vv(r);r.next&&r.err("Unexpected trailing text");let a=zR(HR(i));return $R(a,r),a}matchType(t){for(let n=0;n<this.next.length;n++)if(this.next[n].type==t)return this.next[n].next;return null}matchFragment(t,n=0,r=t.childCount){let i=this;for(let a=n;i&&a<r;a++)i=i.matchType(t.child(a).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let t=0;t<this.next.length;t++){let{type:n}=this.next[t];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(t){for(let n=0;n<this.next.length;n++)for(let r=0;r<t.next.length;r++)if(this.next[n].type==t.next[r].type)return!0;return!1}fillBefore(t,n=!1,r=0){let i=[this];function a(s,o){let l=s.matchFragment(t,r);if(l&&(!n||l.validEnd))return $.from(o.map(u=>u.createAndFill()));for(let u=0;u<s.next.length;u++){let{type:c,next:d}=s.next[u];if(!(c.isText||c.hasRequiredAttrs())&&i.indexOf(d)==-1){i.push(d);let p=a(d,o.concat(c));if(p)return p}}return null}return a(this,[])}findWrapping(t){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==t)return this.wrapCache[r+1];let n=this.computeWrapping(t);return this.wrapCache.push(t,n),n}computeWrapping(t){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),a=i.match;if(a.matchType(t)){let s=[];for(let o=i;o.type;o=o.via)s.push(o.type);return s.reverse()}for(let s=0;s<a.next.length;s++){let{type:o,next:l}=a.next[s];!o.isLeaf&&!o.hasRequiredAttrs()&&!(o.name in n)&&(!i.type||l.validEnd)&&(r.push({match:o.contentMatch,type:o,via:i}),n[o.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(t){if(t>=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(r){t.push(r);for(let i=0;i<r.next.length;i++)t.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}return n(this),t.map((r,i)=>{let a=i+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)a+=(s?", ":"")+r.next[s].type.name+"->"+t.indexOf(r.next[s].next);return a}).join(`
|
|
1
|
+
import{r as J,bQ as Dv,bR as pR,j as R,ag as fR,ax as tt,bS as hR,c as Nt,b as gi,m as wn,bx as Wm,bT as Cs,H as mR,d as gR,f as bR,B as Mv,U as Bb}from"./index-CsMY3E0n.js";import{i as Pv}from"./Check-CKtI4hGn.js";import{a as Fv}from"./Copy01-CjgXfC24.js";import{e as ER,g as yR,f as TR,b as SR}from"./dialog-CRj0zBQ_.js";import{n as kR}from"./Tool02-CG-MJEAZ.js";import{aV as AR,aW as vR,w as _R}from"./agent-icon-D0v0CAMQ.js";import{u as CR}from"./use-mobile-ieOqtEHL.js";import{h as NR}from"./tab-id-BqPdm69o.js";import{i as wR}from"./ChevronRight-BIlAcWT5.js";function Ub(e){return e?e.replace(/[_-]/g," ").toLowerCase().split(" ").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" "):""}function UZ(e,t){return e==="output-error"||e==="output-denied"?"error":e==="approval-requested"?"approval":e==="input-streaming"||e==="input-available"||e==="output-available"&&t===!0?"loading":"idle"}function HZ(e){if(e==null||typeof e!="object")return;const t=e;if(t.structuredContent&&typeof t.structuredContent=="object")return t.structuredContent;if(Array.isArray(t.content)){const n=t.content[0];if(n?.type==="text"&&typeof n.text=="string")try{return JSON.parse(n.text)}catch{return}return}return e}function Ke(e){this.content=e}Ke.prototype={constructor:Ke,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,i=r.find(e),a=r.content.slice();return i==-1?a.push(n||e,t):(a[i+1]=t,n&&(a[i]=n)),new Ke(a)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new Ke(n)},addToStart:function(e,t){return new Ke([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new Ke(n)},addBefore:function(e,t,n){var r=this.remove(t),i=r.content.slice(),a=r.find(e);return i.splice(a==-1?i.length:a,0,t,n),new Ke(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return e=Ke.from(e),e.size?new Ke(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=Ke.from(e),e.size?new Ke(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=Ke.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}};Ke.from=function(e){if(e instanceof Ke)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new Ke(t)};function Bv(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),a=t.child(r);if(i==a){n+=i.nodeSize;continue}if(!i.sameMarkup(a))return n;if(i.isText&&i.text!=a.text){for(let s=0;i.text[s]==a.text[s];s++)n++;return n}if(i.content.size||a.content.size){let s=Bv(i.content,a.content,n+1);if(s!=null)return s}n+=i.nodeSize}}function Uv(e,t,n,r){for(let i=e.childCount,a=t.childCount;;){if(i==0||a==0)return i==a?null:{a:n,b:r};let s=e.child(--i),o=t.child(--a),l=s.nodeSize;if(s==o){n-=l,r-=l;continue}if(!s.sameMarkup(o))return{a:n,b:r};if(s.isText&&s.text!=o.text){let u=0,c=Math.min(s.text.length,o.text.length);for(;u<c&&s.text[s.text.length-u-1]==o.text[o.text.length-u-1];)u++,n--,r--;return{a:n,b:r}}if(s.content.size||o.content.size){let u=Uv(s.content,o.content,n-1,r-1);if(u)return u}n-=l,r-=l}}class ${constructor(t,n){if(this.content=t,this.size=n||0,n==null)for(let r=0;r<t.length;r++)this.size+=t[r].nodeSize}nodesBetween(t,n,r,i=0,a){for(let s=0,o=0;o<n;s++){let l=this.content[s],u=o+l.nodeSize;if(u>t&&r(l,i+o,a||null,s)!==!1&&l.content.size){let c=o+1;l.nodesBetween(Math.max(0,t-c),Math.min(l.content.size,n-c),r,i+c)}o=u}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,r,i){let a="",s=!0;return this.nodesBetween(t,n,(o,l)=>{let u=o.isText?o.text.slice(Math.max(t,l)-l,n-l):o.isLeaf?i?typeof i=="function"?i(o):i:o.type.spec.leafText?o.type.spec.leafText(o):"":"";o.isBlock&&(o.isLeaf&&u||o.isTextblock)&&r&&(s?s=!1:a+=r),a+=u},0),a}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,i=this.content.slice(),a=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),a=1);a<t.content.length;a++)i.push(t.content[a]);return new $(i,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let r=[],i=0;if(n>t)for(let a=0,s=0;s<n;a++){let o=this.content[a],l=s+o.nodeSize;l>t&&((s<t||l>n)&&(o.isText?o=o.cut(Math.max(0,t-s),Math.min(o.text.length,n-s)):o=o.cut(Math.max(0,t-s-1),Math.min(o.content.size,n-s-1))),r.push(o),i+=o.nodeSize),s=l}return new $(r,i)}cutByIndex(t,n){return t==n?$.empty:t==0&&n==this.content.length?this:new $(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let i=this.content.slice(),a=this.size+n.nodeSize-r.nodeSize;return i[t]=n,new $(i,a)}addToStart(t){return new $([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new $(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(t.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(t){let n=this.content[t];if(!n)throw new RangeError("Index "+t+" out of range for "+this);return n}maybeChild(t){return this.content[t]||null}forEach(t){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];t(i,r,n),r+=i.nodeSize}}findDiffStart(t,n=0){return Bv(this,t,n)}findDiffEnd(t,n=this.size,r=t.size){return Uv(this,t,n,r)}findIndex(t){if(t==0)return Ka(0,t);if(t==this.size)return Ka(this.content.length,t);if(t>this.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=this.child(n),a=r+i.nodeSize;if(a>=t)return a==t?Ka(n+1,a):Ka(n,r);r=a}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return $.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new $(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return $.empty;let n,r=0;for(let i=0;i<t.length;i++){let a=t[i];r+=a.nodeSize,i&&a.isText&&t[i-1].sameMarkup(a)?(n||(n=t.slice(0,i)),n[n.length-1]=a.withText(n[n.length-1].text+a.text)):n&&n.push(a)}return new $(n||t,r)}static from(t){if(!t)return $.empty;if(t instanceof $)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new $([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}$.empty=new $([],0);const ul={index:0,offset:0};function Ka(e,t){return ul.index=e,ul.offset=t,ul}function Ns(e,t){if(e===t)return!0;if(!(e&&typeof e=="object")||!(t&&typeof t=="object"))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!Ns(e[r],t[r]))return!1}else{for(let r in e)if(!(r in t)||!Ns(e[r],t[r]))return!1;for(let r in t)if(!(r in e))return!1}return!0}let ve=class Vh{constructor(t,n){this.type=t,this.attrs=n}addToSet(t){let n,r=!1;for(let i=0;i<t.length;i++){let a=t[i];if(this.eq(a))return t;if(this.type.excludes(a.type))n||(n=t.slice(0,i));else{if(a.type.excludes(this.type))return t;!r&&a.type.rank>this.type.rank&&(n||(n=t.slice(0,i)),n.push(this),r=!0),n&&n.push(a)}}return n||(n=t.slice()),r||n.push(this),n}removeFromSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return t.slice(0,n).concat(t.slice(n+1));return t}isInSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return!0;return!1}eq(t){return this==t||this.type==t.type&&Ns(this.attrs,t.attrs)}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=t.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let i=r.create(n.attrs);return r.checkAttrs(i.attrs),i}static sameSet(t,n){if(t==n)return!0;if(t.length!=n.length)return!1;for(let r=0;r<t.length;r++)if(!t[r].eq(n[r]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return Vh.none;if(t instanceof Vh)return[t];let n=t.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}};ve.none=[];class ws extends Error{}class K{constructor(t,n,r){this.content=t,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=zv(this.content,t+this.openStart,n);return r&&new K(r,this.openStart,this.openEnd)}removeBetween(t,n){return new K(Hv(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,n){if(!n)return K.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new K($.fromJSON(t,n.content),r,i)}static maxOpen(t,n=!0){let r=0,i=0;for(let a=t.firstChild;a&&!a.isLeaf&&(n||!a.type.spec.isolating);a=a.firstChild)r++;for(let a=t.lastChild;a&&!a.isLeaf&&(n||!a.type.spec.isolating);a=a.lastChild)i++;return new K(t,r,i)}}K.empty=new K($.empty,0,0);function Hv(e,t,n){let{index:r,offset:i}=e.findIndex(t),a=e.maybeChild(r),{index:s,offset:o}=e.findIndex(n);if(i==t||a.isText){if(o!=n&&!e.child(s).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return e.replaceChild(r,a.copy(Hv(a.content,t-i-1,n-i-1)))}function zv(e,t,n,r){let{index:i,offset:a}=e.findIndex(t),s=e.maybeChild(i);if(a==t||s.isText)return r&&!r.canReplace(i,i,n)?null:e.cut(0,t).append(n).append(e.cut(t));let o=zv(s.content,t-a-1,n,s);return o&&e.replaceChild(i,s.copy(o))}function IR(e,t,n){if(n.openStart>e.depth)throw new ws("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new ws("Inconsistent open depths");return $v(e,t,n,0)}function $v(e,t,n,r){let i=e.index(r),a=e.node(r);if(i==t.index(r)&&r<e.depth-n.openStart){let s=$v(e,t,n,r+1);return a.copy(a.content.replaceChild(i,s))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&e.depth==r&&t.depth==r){let s=e.parent,o=s.content;return Tr(s,o.cut(0,e.parentOffset).append(n.content).append(o.cut(t.parentOffset)))}else{let{start:s,end:o}=RR(n,e);return Tr(a,Gv(e,s,o,t,r))}else return Tr(a,Is(e,t,r))}function qv(e,t){if(!t.type.compatibleContent(e.type))throw new ws("Cannot join "+t.type.name+" onto "+e.type.name)}function Wh(e,t,n){let r=e.node(n);return qv(r,t.node(n)),r}function yr(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function Xi(e,t,n,r){let i=(t||e).node(n),a=0,s=t?t.index(n):i.childCount;e&&(a=e.index(n),e.depth>n?a++:e.textOffset&&(yr(e.nodeAfter,r),a++));for(let o=a;o<s;o++)yr(i.child(o),r);t&&t.depth==n&&t.textOffset&&yr(t.nodeBefore,r)}function Tr(e,t){return e.type.checkContent(t),e.copy(t)}function Gv(e,t,n,r,i){let a=e.depth>i&&Wh(e,t,i+1),s=r.depth>i&&Wh(n,r,i+1),o=[];return Xi(null,e,i,o),a&&s&&t.index(i)==n.index(i)?(qv(a,s),yr(Tr(a,Gv(e,t,n,r,i+1)),o)):(a&&yr(Tr(a,Is(e,t,i+1)),o),Xi(t,n,i,o),s&&yr(Tr(s,Is(n,r,i+1)),o)),Xi(r,null,i,o),new $(o)}function Is(e,t,n){let r=[];if(Xi(null,e,n,r),e.depth>n){let i=Wh(e,t,n+1);yr(Tr(i,Is(e,t,n+1)),r)}return Xi(t,null,n,r),new $(r)}function RR(e,t){let n=t.depth-e.openStart,i=t.node(n).copy(e.content);for(let a=n-1;a>=0;a--)i=t.node(a).copy($.from(i));return{start:i.resolveNoCache(e.openStart+n),end:i.resolveNoCache(i.content.size-e.openEnd-n)}}class ga{constructor(t,n,r){this.pos=t,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=t.child(n);return r?t.child(n).cut(r):i}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let r=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let a=0;a<t;a++)i+=r.child(a).nodeSize;return i}marks(){let t=this.parent,n=this.index();if(t.content.size==0)return ve.none;if(this.textOffset)return t.child(n).marks;let r=t.maybeChild(n-1),i=t.maybeChild(n);if(!r){let o=r;r=i,i=o}let a=r.marks;for(var s=0;s<a.length;s++)a[s].type.spec.inclusive===!1&&(!i||!a[s].isInSet(i.marks))&&(a=a[s--].removeFromSet(a));return a}marksAcross(t){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=t.parent.maybeChild(t.index());for(var a=0;a<r.length;a++)r[a].type.spec.inclusive===!1&&(!i||!r[a].isInSet(i.marks))&&(r=r[a--].removeFromSet(r));return r}sharedDepth(t){for(let n=this.depth;n>0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos<this.pos)return t.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);r>=0;r--)if(t.pos<=this.end(r)&&(!n||n(this.node(r))))return new Rs(this,t,r);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos<this.pos?t:this}toString(){let t="";for(let n=1;n<=this.depth;n++)t+=(t?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return t+":"+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,a=n;for(let s=t;;){let{index:o,offset:l}=s.content.findIndex(a),u=a-l;if(r.push(s,o,i+l),!u||(s=s.child(o),s.isText))break;a=u-1,i+=l+1}return new ga(n,r,a)}static resolveCached(t,n){let r=Hb.get(t);if(r)for(let a=0;a<r.elts.length;a++){let s=r.elts[a];if(s.pos==n)return s}else Hb.set(t,r=new xR);let i=r.elts[r.i]=ga.resolve(t,n);return r.i=(r.i+1)%OR,i}}class xR{constructor(){this.elts=[],this.i=0}}const OR=12,Hb=new WeakMap;class Rs{constructor(t,n,r){this.$from=t,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const LR=Object.create(null);class Xt{constructor(t,n,r,i=ve.none){this.type=t,this.attrs=n,this.marks=i,this.content=r||$.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(t){return this.content.child(t)}maybeChild(t){return this.content.maybeChild(t)}forEach(t){this.content.forEach(t)}nodesBetween(t,n,r,i=0){this.content.nodesBetween(t,n,r,i,this)}descendants(t){this.nodesBetween(0,this.content.size,t)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(t,n,r,i){return this.content.textBetween(t,n,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)}sameMarkup(t){return this.hasMarkup(t.type,t.attrs,t.marks)}hasMarkup(t,n,r){return this.type==t&&Ns(this.attrs,n||t.defaultAttrs||LR)&&ve.sameSet(this.marks,r||ve.none)}copy(t=null){return t==this.content?this:new Xt(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new Xt(this.type,this.attrs,this.content,t)}cut(t,n=this.content.size){return t==0&&n==this.content.size?this:this.copy(this.content.cut(t,n))}slice(t,n=this.content.size,r=!1){if(t==n)return K.empty;let i=this.resolve(t),a=this.resolve(n),s=r?0:i.sharedDepth(n),o=i.start(s),u=i.node(s).content.cut(i.pos-o,a.pos-o);return new K(u,i.depth-s,a.depth-s)}replace(t,n,r){return IR(this.resolve(t),this.resolve(n),r)}nodeAt(t){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(t);if(n=n.maybeChild(r),!n)return null;if(i==t||n.isText)return n;t-=i+1}}childAfter(t){let{index:n,offset:r}=this.content.findIndex(t);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(t){if(t==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(t);if(r<t)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(t){return ga.resolveCached(this,t)}resolveNoCache(t){return ga.resolve(this,t)}rangeHasMark(t,n,r){let i=!1;return n>t&&this.nodesBetween(t,n,a=>(r.isInSet(a.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),jv(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,r=$.empty,i=0,a=r.childCount){let s=this.contentMatchAt(t).matchFragment(r,i,a),o=s&&s.matchFragment(this.content,n);if(!o||!o.validEnd)return!1;for(let l=i;l<a;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(t,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let a=this.contentMatchAt(t).matchType(r),s=a&&a.matchFragment(this.content,n);return s?s.validEnd:!1}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let t=ve.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),t=r.addToSet(t)}if(!ve.sameSet(t,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,r)}let i=$.fromJSON(t,n.content),a=t.nodeType(n.type).create(n.attrs,i,r);return a.type.checkAttrs(a.attrs),a}}Xt.prototype.text=void 0;class xs extends Xt{constructor(t,n,r,i){if(super(t,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):jv(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new xs(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new xs(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function jv(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class _r{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new DR(t,n);if(r.next==null)return _r.empty;let i=Vv(r);r.next&&r.err("Unexpected trailing text");let a=zR(HR(i));return $R(a,r),a}matchType(t){for(let n=0;n<this.next.length;n++)if(this.next[n].type==t)return this.next[n].next;return null}matchFragment(t,n=0,r=t.childCount){let i=this;for(let a=n;i&&a<r;a++)i=i.matchType(t.child(a).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let t=0;t<this.next.length;t++){let{type:n}=this.next[t];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(t){for(let n=0;n<this.next.length;n++)for(let r=0;r<t.next.length;r++)if(this.next[n].type==t.next[r].type)return!0;return!1}fillBefore(t,n=!1,r=0){let i=[this];function a(s,o){let l=s.matchFragment(t,r);if(l&&(!n||l.validEnd))return $.from(o.map(u=>u.createAndFill()));for(let u=0;u<s.next.length;u++){let{type:c,next:d}=s.next[u];if(!(c.isText||c.hasRequiredAttrs())&&i.indexOf(d)==-1){i.push(d);let p=a(d,o.concat(c));if(p)return p}}return null}return a(this,[])}findWrapping(t){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==t)return this.wrapCache[r+1];let n=this.computeWrapping(t);return this.wrapCache.push(t,n),n}computeWrapping(t){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),a=i.match;if(a.matchType(t)){let s=[];for(let o=i;o.type;o=o.via)s.push(o.type);return s.reverse()}for(let s=0;s<a.next.length;s++){let{type:o,next:l}=a.next[s];!o.isLeaf&&!o.hasRequiredAttrs()&&!(o.name in n)&&(!i.type||l.validEnd)&&(r.push({match:o.contentMatch,type:o,via:i}),n[o.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(t){if(t>=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(r){t.push(r);for(let i=0;i<r.next.length;i++)t.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}return n(this),t.map((r,i)=>{let a=i+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)a+=(s?", ":"")+r.next[s].type.name+"->"+t.indexOf(r.next[s].next);return a}).join(`
|
|
2
2
|
`)}}_r.empty=new _r(!0);class DR{constructor(t,n){this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function Vv(e){let t=[];do t.push(MR(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function MR(e){let t=[];do t.push(PR(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function PR(e){let t=UR(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=FR(e,t);else break;return t}function zb(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function FR(e,t){let n=zb(e),r=n;return e.eat(",")&&(e.next!="}"?r=zb(e):r=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function BR(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let a in n){let s=n[a];s.isInGroup(t)&&i.push(s)}return i.length==0&&e.err("No node type or group '"+t+"' found"),i}function UR(e){if(e.eat("(")){let t=Vv(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=BR(e,e.next).map(n=>(e.inline==null?e.inline=n.isInline:e.inline!=n.isInline&&e.err("Mixing inline and block content"),{type:"name",value:n}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function HR(e){let t=[[]];return i(a(e,0),n()),t;function n(){return t.push([])-1}function r(s,o,l){let u={term:l,to:o};return t[s].push(u),u}function i(s,o){s.forEach(l=>l.to=o)}function a(s,o){if(s.type=="choice")return s.exprs.reduce((l,u)=>l.concat(a(u,o)),[]);if(s.type=="seq")for(let l=0;;l++){let u=a(s.exprs[l],o);if(l==s.exprs.length-1)return u;i(u,o=n())}else if(s.type=="star"){let l=n();return r(o,l),i(a(s.expr,l),l),[r(l)]}else if(s.type=="plus"){let l=n();return i(a(s.expr,o),l),i(a(s.expr,l),l),[r(l)]}else{if(s.type=="opt")return[r(o)].concat(a(s.expr,o));if(s.type=="range"){let l=o;for(let u=0;u<s.min;u++){let c=n();i(a(s.expr,l),c),l=c}if(s.max==-1)i(a(s.expr,l),l);else for(let u=s.min;u<s.max;u++){let c=n();r(l,c),i(a(s.expr,l),c),l=c}return[r(l)]}else{if(s.type=="name")return[r(o,void 0,s.value)];throw new Error("Unknown expr type")}}}}function Wv(e,t){return t-e}function $b(e,t){let n=[];return r(t),n.sort(Wv);function r(i){let a=e[i];if(a.length==1&&!a[0].term)return r(a[0].to);n.push(i);for(let s=0;s<a.length;s++){let{term:o,to:l}=a[s];!o&&n.indexOf(l)==-1&&r(l)}}}function zR(e){let t=Object.create(null);return n($b(e,0));function n(r){let i=[];r.forEach(s=>{e[s].forEach(({term:o,to:l})=>{if(!o)return;let u;for(let c=0;c<i.length;c++)i[c][0]==o&&(u=i[c][1]);$b(e,l).forEach(c=>{u||i.push([o,u=[]]),u.indexOf(c)==-1&&u.push(c)})})});let a=t[r.join(",")]=new _r(r.indexOf(e.length-1)>-1);for(let s=0;s<i.length;s++){let o=i[s][1].sort(Wv);a.next.push({type:i[s][0],next:t[o.join(",")]||n(o)})}return a}}function $R(e,t){for(let n=0,r=[e];n<r.length;n++){let i=r[n],a=!i.validEnd,s=[];for(let o=0;o<i.next.length;o++){let{type:l,next:u}=i.next[o];s.push(l.name),a&&!(l.isText||l.hasRequiredAttrs())&&(a=!1),r.indexOf(u)==-1&&r.push(u)}a&&t.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function Yv(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function Kv(e,t){let n=Object.create(null);for(let r in e){let i=t&&t[r];if(i===void 0){let a=e[r];if(a.hasDefault)i=a.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function Xv(e,t,n,r){for(let i in t)if(!(i in e))throw new RangeError(`Unsupported attribute ${i} for ${n} of type ${i}`);for(let i in e){let a=e[i];a.validate&&a.validate(t[i])}}function Zv(e,t){let n=Object.create(null);if(t)for(let r in t)n[r]=new GR(e,r,t[r]);return n}let qb=class Qv{constructor(t,n,r){this.name=t,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=Zv(t,r.attrs),this.defaultAttrs=Yv(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||t=="text"),this.isText=t=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==_r.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(t){return this.groups.indexOf(t)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:Kv(this.attrs,t)}create(t=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Xt(this,this.computeAttrs(t),$.from(n),ve.setFrom(r))}createChecked(t=null,n,r){return n=$.from(n),this.checkContent(n),new Xt(this,this.computeAttrs(t),n,ve.setFrom(r))}createAndFill(t=null,n,r){if(t=this.computeAttrs(t),n=$.from(n),n.size){let s=this.contentMatch.fillBefore(n);if(!s)return null;n=s.append(n)}let i=this.contentMatch.matchFragment(n),a=i&&i.fillBefore($.empty,!0);return a?new Xt(this,t,n.append(a),ve.setFrom(r)):null}validContent(t){let n=this.contentMatch.matchFragment(t);if(!n||!n.validEnd)return!1;for(let r=0;r<t.childCount;r++)if(!this.allowsMarks(t.child(r).marks))return!1;return!0}checkContent(t){if(!this.validContent(t))throw new RangeError(`Invalid content for node ${this.name}: ${t.toString().slice(0,50)}`)}checkAttrs(t){Xv(this.attrs,t,"node",this.name)}allowsMarkType(t){return this.markSet==null||this.markSet.indexOf(t)>-1}allowsMarks(t){if(this.markSet==null)return!0;for(let n=0;n<t.length;n++)if(!this.allowsMarkType(t[n].type))return!1;return!0}allowedMarks(t){if(this.markSet==null)return t;let n;for(let r=0;r<t.length;r++)this.allowsMarkType(t[r].type)?n&&n.push(t[r]):n||(n=t.slice(0,r));return n?n.length?n:ve.none:t}static compile(t,n){let r=Object.create(null);t.forEach((a,s)=>r[a]=new Qv(a,n,s));let i=n.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let a in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function qR(e,t,n){let r=n.split("|");return i=>{let a=i===null?"null":typeof i;if(r.indexOf(a)<0)throw new RangeError(`Expected value of type ${r} for attribute ${t} on type ${e}, got ${a}`)}}class GR{constructor(t,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?qR(t,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class No{constructor(t,n,r,i){this.name=t,this.rank=n,this.schema=r,this.spec=i,this.attrs=Zv(t,i.attrs),this.excluded=null;let a=Yv(this.attrs);this.instance=a?new ve(this,a):null}create(t=null){return!t&&this.instance?this.instance:new ve(this,Kv(this.attrs,t))}static compile(t,n){let r=Object.create(null),i=0;return t.forEach((a,s)=>r[a]=new No(a,i++,n,s)),r}removeFromSet(t){for(var n=0;n<t.length;n++)t[n].type==this&&(t=t.slice(0,n).concat(t.slice(n+1)),n--);return t}isInSet(t){for(let n=0;n<t.length;n++)if(t[n].type==this)return t[n]}checkAttrs(t){Xv(this.attrs,t,"mark",this.name)}excludes(t){return this.excluded.indexOf(t)>-1}}let Jv=class{constructor(t){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let i in t)n[i]=t[i];n.nodes=Ke.from(t.nodes),n.marks=Ke.from(t.marks||{}),this.nodes=qb.compile(this.spec.nodes,this),this.marks=No.compile(this.spec.marks,this);let r=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let a=this.nodes[i],s=a.spec.content||"",o=a.spec.marks;if(a.contentMatch=r[s]||(r[s]=_r.parse(s,this.nodes)),a.inlineContent=a.contentMatch.inlineContent,a.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!a.isInline||!a.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=a}a.markSet=o=="_"?null:o?Gb(this,o.split(" ")):o==""||!a.inlineContent?[]:null}for(let i in this.marks){let a=this.marks[i],s=a.spec.excludes;a.excluded=s==null?[a]:s==""?[]:Gb(this,s.split(" "))}this.nodeFromJSON=i=>Xt.fromJSON(this,i),this.markFromJSON=i=>ve.fromJSON(this,i),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,n=null,r,i){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof qb){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(n,r,i)}text(t,n){let r=this.nodes.text;return new xs(r,r.defaultAttrs,t,ve.setFrom(n))}mark(t,n){return typeof t=="string"&&(t=this.marks[t]),t.create(n)}nodeType(t){let n=this.nodes[t];if(!n)throw new RangeError("Unknown node type: "+t);return n}};function Gb(e,t){let n=[];for(let r=0;r<t.length;r++){let i=t[r],a=e.marks[i],s=a;if(a)n.push(a);else for(let o in e.marks){let l=e.marks[o];(i=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(i)>-1)&&n.push(s=l)}if(!s)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}function jR(e){return e.tag!=null}function VR(e){return e.style!=null}class Ln{constructor(t,n){this.schema=t,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(i=>{if(jR(i))this.tags.push(i);else if(VR(i)){let a=/[^=]*/.exec(i.style)[0];r.indexOf(a)<0&&r.push(a),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let a=t.nodes[i.node];return a.contentMatch.matchType(a)})}parse(t,n={}){let r=new Vb(this,n,!1);return r.addAll(t,ve.none,n.from,n.to),r.finish()}parseSlice(t,n={}){let r=new Vb(this,n,!0);return r.addAll(t,ve.none,n.from,n.to),K.maxOpen(r.finish())}matchTag(t,n,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let a=this.tags[i];if(KR(t,a.tag)&&(a.namespace===void 0||t.namespaceURI==a.namespace)&&(!a.context||n.matchesContext(a.context))){if(a.getAttrs){let s=a.getAttrs(t);if(s===!1)continue;a.attrs=s||void 0}return a}}}matchStyle(t,n,r,i){for(let a=i?this.styles.indexOf(i)+1:0;a<this.styles.length;a++){let s=this.styles[a],o=s.style;if(!(o.indexOf(t)!=0||s.context&&!r.matchesContext(s.context)||o.length>t.length&&(o.charCodeAt(t.length)!=61||o.slice(t.length+1)!=n))){if(s.getAttrs){let l=s.getAttrs(n);if(l===!1)continue;s.attrs=l||void 0}return s}}}static schemaRules(t){let n=[];function r(i){let a=i.priority==null?50:i.priority,s=0;for(;s<n.length;s++){let o=n[s];if((o.priority==null?50:o.priority)<a)break}n.splice(s,0,i)}for(let i in t.marks){let a=t.marks[i].spec.parseDOM;a&&a.forEach(s=>{r(s=Wb(s)),s.mark||s.ignore||s.clearMark||(s.mark=i)})}for(let i in t.nodes){let a=t.nodes[i].spec.parseDOM;a&&a.forEach(s=>{r(s=Wb(s)),s.node||s.ignore||s.mark||(s.node=i)})}return n}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new Ln(t,Ln.schemaRules(t)))}}const e_={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},WR={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},t_={ol:!0,ul:!0},ba=1,Yh=2,Zi=4;function jb(e,t,n){return t!=null?(t?ba:0)|(t==="full"?Yh:0):e&&e.whitespace=="pre"?ba|Yh:n&~Zi}class Xa{constructor(t,n,r,i,a,s){this.type=t,this.attrs=n,this.marks=r,this.solid=i,this.options=s,this.content=[],this.activeMarks=ve.none,this.match=a||(s&Zi?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore($.from(t));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,i;return(i=r.findWrapping(t.type))?(this.match=r,i):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&ba)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let a=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=a.withText(a.text.slice(0,a.text.length-i[0].length))}}let n=$.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore($.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!e_.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class Vb{constructor(t,n,r){this.parser=t,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let i=n.topNode,a,s=jb(null,n.preserveWhitespace,0)|(r?Zi:0);i?a=new Xa(i.type,i.attrs,ve.none,!0,n.topMatch||i.type.contentMatch,s):r?a=new Xa(null,null,ve.none,!0,null,s):a=new Xa(t.schema.topNodeType,null,ve.none,!0,null,s),this.nodes=[a],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t,n){t.nodeType==3?this.addTextNode(t,n):t.nodeType==1&&this.addElement(t,n)}addTextNode(t,n){let r=t.nodeValue,i=this.top,a=i.options&Yh?"full":this.localPreserveWS||(i.options&ba)>0,{schema:s}=this.parser;if(a==="full"||i.inlineContext(t)||/[^ \t\r\n\u000c]/.test(r)){if(a)if(a==="full")r=r.replace(/\r\n?/g,`
|
|
3
3
|
`);else if(s.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(s.linebreakReplacement.create())){let o=r.split(/\r?\n|\r/);for(let l=0;l<o.length;l++)l&&this.insertNode(s.linebreakReplacement.create(),n,!0),o[l]&&this.insertNode(s.text(o[l]),n,!/\S/.test(o[l]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let o=i.content[i.content.length-1],l=t.previousSibling;(!o||l&&l.nodeName=="BR"||o.isText&&/[ \t\r\n\u000c]$/.test(o.text))&&(r=r.slice(1))}r&&this.insertNode(s.text(r),n,!/\S/.test(r)),this.findInText(t)}else this.findInside(t)}addElement(t,n,r){let i=this.localPreserveWS,a=this.top;(t.tagName=="PRE"||/pre/.test(t.style&&t.style.whiteSpace))&&(this.localPreserveWS=!0);let s=t.nodeName.toLowerCase(),o;t_.hasOwnProperty(s)&&this.parser.normalizeLists&&YR(t);let l=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(o=this.parser.matchTag(t,this,r));e:if(l?l.ignore:WR.hasOwnProperty(s))this.findInside(t),this.ignoreFallback(t,n);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(t=l.skip);let u,c=this.needsBlock;if(e_.hasOwnProperty(s))a.content.length&&a.content[0].isInline&&this.open&&(this.open--,a=this.top),u=!0,a.type||(this.needsBlock=!0);else if(!t.firstChild){this.leafFallback(t,n);break e}let d=l&&l.skip?n:this.readStyles(t,n);d&&this.addAll(t,d),u&&this.sync(a),this.needsBlock=c}else{let u=this.readStyles(t,n);u&&this.addElementByRule(t,l,u,l.consuming===!1?o:void 0)}this.localPreserveWS=i}leafFallback(t,n){t.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode(`
|
|
4
4
|
`),n)}ignoreFallback(t,n){t.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(t,n){let r=t.style;if(r&&r.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let a=this.parser.matchedStyles[i],s=r.getPropertyValue(a);if(s)for(let o=void 0;;){let l=this.parser.matchStyle(a,s,this,o);if(!l)break;if(l.ignore)return null;if(l.clearMark?n=n.filter(u=>!l.clearMark(u)):n=n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)o=l;else break}}return n}addElementByRule(t,n,r,i){let a,s;if(n.node)if(s=this.parser.schema.nodes[n.node],s.isLeaf)this.insertNode(s.create(n.attrs),r,t.nodeName=="BR")||this.leafFallback(t,r);else{let l=this.enter(s,n.attrs||null,r,n.preserveWhitespace);l&&(a=!0,r=l)}else{let l=this.parser.schema.marks[n.mark];r=r.concat(l.create(n.attrs))}let o=this.top;if(s&&s.isLeaf)this.findInside(t);else if(i)this.addElement(t,r,i);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(l=>this.insertNode(l,r,!1));else{let l=t;typeof n.contentElement=="string"?l=t.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(t):n.contentElement&&(l=n.contentElement),this.findAround(t,l,!0),this.addAll(l,r),this.findAround(t,l,!1)}a&&this.sync(o)&&this.open--}addAll(t,n,r,i){let a=r||0;for(let s=r?t.childNodes[r]:t.firstChild,o=i==null?null:t.childNodes[i];s!=o;s=s.nextSibling,++a)this.findAtPoint(t,a),this.addDOM(s,n);this.findAtPoint(t,a)}findPlace(t,n,r){let i,a;for(let s=this.open,o=0;s>=0;s--){let l=this.nodes[s],u=l.findWrapping(t);if(u&&(!i||i.length>u.length+o)&&(i=u,a=l,!u.length))break;if(l.solid){if(r)break;o+=2}}if(!i)return null;this.sync(a);for(let s=0;s<i.length;s++)n=this.enterInner(i[s],null,n,!1);return n}insertNode(t,n,r){if(t.isInline&&this.needsBlock&&!this.top.type){let a=this.textblockFromContext();a&&(n=this.enterInner(a,null,n))}let i=this.findPlace(t,n,r);if(i){this.closeExtra();let a=this.top;a.match&&(a.match=a.match.matchType(t.type));let s=ve.none;for(let o of i.concat(t.marks))(a.type?a.type.allowsMarkType(o.type):Yb(o.type,t.type))&&(s=o.addToSet(s));return a.content.push(t.mark(s)),!0}return!1}enter(t,n,r,i){let a=this.findPlace(t.create(n),r,!1);return a&&(a=this.enterInner(t,n,r,!0,i)),a}enterInner(t,n,r,i=!1,a){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(t);let o=jb(t,a,s.options);s.options&Zi&&s.content.length==0&&(o|=Zi);let l=ve.none;return r=r.filter(u=>(s.type?s.type.allowsMarkType(u.type):Yb(u.type,t))?(l=u.addToSet(l),!1):!0),this.nodes.push(new Xa(t,n,l,i,null,o)),this.open++,r}closeExtra(t=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(t){for(let n=this.open;n>=0;n--){if(this.nodes[n]==t)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=ba)}return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let i=r.length-1;i>=0;i--)t+=r[i].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==t&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&t.nodeType==1&&t.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(t,n,r){if(t!=n&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&t.nodeType==1&&t.contains(this.find[i].node)&&n.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==t&&(this.find[n].pos=this.currentPos-(t.nodeValue.length-this.find[n].offset))}matchesContext(t){if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let n=t.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),a=-(r?r.depth+1:0)+(i?0:1),s=(o,l)=>{for(;o>=0;o--){let u=n[o];if(u==""){if(o==n.length-1||o==0)continue;for(;l>=a;l--)if(s(o-1,l))return!0;return!1}else{let c=l>0||l==0&&i?this.nodes[l].type:r&&l>=a?r.node(l-a).type:null;if(!c||c.name!=u&&!c.isInGroup(u))return!1;l--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function YR(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let r=t.nodeType==1?t.nodeName.toLowerCase():null;r&&t_.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):r=="li"?n=t:r&&(n=null)}}function KR(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function Wb(e){let t={};for(let n in e)t[n]=e[n];return t}function Yb(e,t){let n=t.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(e))continue;let a=[],s=o=>{a.push(o);for(let l=0;l<o.edgeCount;l++){let{type:u,next:c}=o.edge(l);if(u==t||a.indexOf(c)<0&&s(c))return!0}};if(s(i.contentMatch))return!0}}class Lr{constructor(t,n){this.nodes=t,this.marks=n}serializeFragment(t,n={},r){r||(r=cl(n).createDocumentFragment());let i=r,a=[];return t.forEach(s=>{if(a.length||s.marks.length){let o=0,l=0;for(;o<a.length&&l<s.marks.length;){let u=s.marks[l];if(!this.marks[u.type.name]){l++;continue}if(!u.eq(a[o][0])||u.type.spec.spanning===!1)break;o++,l++}for(;o<a.length;)i=a.pop()[1];for(;l<s.marks.length;){let u=s.marks[l++],c=this.serializeMark(u,s.isInline,n);c&&(a.push([u,i]),i.appendChild(c.dom),i=c.contentDOM||c.dom)}}i.appendChild(this.serializeNodeInner(s,n))}),r}serializeNodeInner(t,n){let{dom:r,contentDOM:i}=ms(cl(n),this.nodes[t.type.name](t),null,t.attrs);if(i){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,n,i)}return r}serializeNode(t,n={}){let r=this.serializeNodeInner(t,n);for(let i=t.marks.length-1;i>=0;i--){let a=this.serializeMark(t.marks[i],t.isInline,n);a&&((a.contentDOM||a.dom).appendChild(r),r=a.dom)}return r}serializeMark(t,n,r={}){let i=this.marks[t.type.name];return i&&ms(cl(r),i(t,n),null,t.attrs)}static renderSpec(t,n,r=null,i){return ms(t,n,r,i)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new Lr(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=Kb(t.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(t){return Kb(t.marks)}}function Kb(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function cl(e){return e.document||window.document}const Xb=new WeakMap;function XR(e){let t=Xb.get(e);return t===void 0&&Xb.set(e,t=ZR(e)),t}function ZR(e){let t=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")t||(t=[]),t.push(r);else for(let i=0;i<r.length;i++)n(r[i]);else for(let i in r)n(r[i])}return n(e),t}function ms(e,t,n,r){if(typeof t=="string")return{dom:e.createTextNode(t)};if(t.nodeType!=null)return{dom:t};if(t.dom&&t.dom.nodeType!=null)return t;let i=t[0],a;if(typeof i!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(a=XR(r))&&a.indexOf(t)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let s=i.indexOf(" ");s>0&&(n=i.slice(0,s),i=i.slice(s+1));let o,l=n?e.createElementNS(n,i):e.createElement(i),u=t[1],c=1;if(u&&typeof u=="object"&&u.nodeType==null&&!Array.isArray(u)){c=2;for(let d in u)if(u[d]!=null){let p=d.indexOf(" ");p>0?l.setAttributeNS(d.slice(0,p),d.slice(p+1),u[d]):d=="style"&&l.style?l.style.cssText=u[d]:l.setAttribute(d,u[d])}}for(let d=c;d<t.length;d++){let p=t[d];if(p===0){if(d<t.length-1||d>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:f,contentDOM:m}=ms(e,p,n,r);if(l.appendChild(f),m){if(o)throw new RangeError("Multiple content holes");o=m}}}return{dom:l,contentDOM:o}}const n_=65535,r_=Math.pow(2,16);function QR(e,t){return e+t*r_}function Zb(e){return e&n_}function JR(e){return(e-(e&n_))/r_}const i_=1,a_=2,gs=4,s_=8;class Kh{constructor(t,n,r){this.pos=t,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&s_)>0}get deletedBefore(){return(this.delInfo&(i_|gs))>0}get deletedAfter(){return(this.delInfo&(a_|gs))>0}get deletedAcross(){return(this.delInfo&gs)>0}}class Dt{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&Dt.empty)return Dt.empty}recover(t){let n=0,r=Zb(t);if(!this.inverted)for(let i=0;i<r;i++)n+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[r*3]+n+JR(t)}mapResult(t,n=1){return this._map(t,n,!1)}map(t,n=1){return this._map(t,n,!0)}_map(t,n,r){let i=0,a=this.inverted?2:1,s=this.inverted?1:2;for(let o=0;o<this.ranges.length;o+=3){let l=this.ranges[o]-(this.inverted?i:0);if(l>t)break;let u=this.ranges[o+a],c=this.ranges[o+s],d=l+u;if(t<=d){let p=u?t==l?-1:t==d?1:n:n,f=l+i+(p<0?0:c);if(r)return f;let m=t==(n<0?l:d)?null:QR(o/3,t-l),g=t==l?a_:t==d?i_:gs;return(n<0?t!=l:t!=d)&&(g|=s_),new Kh(f,g,m)}i+=c-u}return r?t+i:new Kh(t+i,0,null)}touches(t,n){let r=0,i=Zb(n),a=this.inverted?2:1,s=this.inverted?1:2;for(let o=0;o<this.ranges.length;o+=3){let l=this.ranges[o]-(this.inverted?r:0);if(l>t)break;let u=this.ranges[o+a],c=l+u;if(t<=c&&o==i*3)return!0;r+=this.ranges[o+s]-u}return!1}forEach(t){let n=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,a=0;i<this.ranges.length;i+=3){let s=this.ranges[i],o=s-(this.inverted?a:0),l=s+(this.inverted?0:a),u=this.ranges[i+n],c=this.ranges[i+r];t(o,o+u,l,l+c),a+=c-u}}invert(){return new Dt(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return t==0?Dt.empty:new Dt(t<0?[0,-t,0]:[0,0,t])}}Dt.empty=new Dt([]);class Ea{constructor(t,n,r=0,i=t?t.length:0){this.mirror=n,this.from=r,this.to=i,this._maps=t||[],this.ownData=!(t||n)}get maps(){return this._maps}slice(t=0,n=this.maps.length){return new Ea(this._maps,this.mirror,t,n)}appendMap(t,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(t),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(t){for(let n=0,r=this._maps.length;n<t._maps.length;n++){let i=t.getMirror(n);this.appendMap(t._maps[n],i!=null&&i<n?r+i:void 0)}}getMirror(t){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==t)return this.mirror[n+(n%2?-1:1)]}}setMirror(t,n){this.mirror||(this.mirror=[]),this.mirror.push(t,n)}appendMappingInverted(t){for(let n=t.maps.length-1,r=this._maps.length+t._maps.length;n>=0;n--){let i=t.getMirror(n);this.appendMap(t._maps[n].invert(),i!=null&&i>n?r-i-1:void 0)}}invert(){let t=new Ea;return t.appendMappingInverted(this),t}map(t,n=1){if(this.mirror)return this._map(t,n,!0);for(let r=this.from;r<this.to;r++)t=this._maps[r].map(t,n);return t}mapResult(t,n=1){return this._map(t,n,!1)}_map(t,n,r){let i=0;for(let a=this.from;a<this.to;a++){let s=this._maps[a],o=s.mapResult(t,n);if(o.recover!=null){let l=this.getMirror(a);if(l!=null&&l>a&&l<this.to){a=l,t=this._maps[l].recover(o.recover);continue}}i|=o.delInfo,t=o.pos}return r?t:new Kh(t,i,null)}}const dl=Object.create(null);class it{getMap(){return Dt.empty}merge(t){return null}static fromJSON(t,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=dl[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in dl)throw new RangeError("Duplicate use of step JSON ID "+t);return dl[t]=n,n.prototype.jsonID=t,n}}class He{constructor(t,n){this.doc=t,this.failed=n}static ok(t){return new He(t,null)}static fail(t){return new He(null,t)}static fromReplace(t,n,r,i){try{return He.ok(t.replace(n,r,i))}catch(a){if(a instanceof ws)return He.fail(a.message);throw a}}}function Ym(e,t,n){let r=[];for(let i=0;i<e.childCount;i++){let a=e.child(i);a.content.size&&(a=a.copy(Ym(a.content,t,a))),a.isInline&&(a=t(a,n,i)),r.push(a)}return $.fromArray(r)}class Xn extends it{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=t.resolve(this.from),i=r.node(r.sharedDepth(this.to)),a=new K(Ym(n.content,(s,o)=>!s.isAtom||!o.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),i),n.openStart,n.openEnd);return He.fromReplace(t,this.from,this.to,a)}invert(){return new Kt(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Xn(n.pos,r.pos,this.mark)}merge(t){return t instanceof Xn&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Xn(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Xn(n.from,n.to,t.markFromJSON(n.mark))}}it.jsonID("addMark",Xn);class Kt extends it{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=new K(Ym(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),t),n.openStart,n.openEnd);return He.fromReplace(t,this.from,this.to,r)}invert(){return new Xn(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Kt(n.pos,r.pos,this.mark)}merge(t){return t instanceof Kt&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Kt(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Kt(n.from,n.to,t.markFromJSON(n.mark))}}it.jsonID("removeMark",Kt);class Zn extends it{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return He.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return He.fromReplace(t,this.pos,this.pos+1,new K($.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let i=0;i<n.marks.length;i++)if(!n.marks[i].isInSet(r))return new Zn(this.pos,n.marks[i]);return new Zn(this.pos,this.mark)}}return new Cr(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new Zn(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new Zn(n.pos,t.markFromJSON(n.mark))}}it.jsonID("addNodeMark",Zn);class Cr extends it{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return He.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return He.fromReplace(t,this.pos,this.pos+1,new K($.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new Zn(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new Cr(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Cr(n.pos,t.markFromJSON(n.mark))}}it.jsonID("removeNodeMark",Cr);class Ue extends it{constructor(t,n,r,i=!1){super(),this.from=t,this.to=n,this.slice=r,this.structure=i}apply(t){return this.structure&&Xh(t,this.from,this.to)?He.fail("Structure replace would overwrite content"):He.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new Dt([this.from,this.to-this.from,this.slice.size])}invert(t){return new Ue(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let n=t.mapResult(this.to,-1),r=this.from==this.to&&Ue.MAP_BIAS<0?n:t.mapResult(this.from,1);return r.deletedAcross&&n.deletedAcross?null:new Ue(r.pos,Math.max(r.pos,n.pos),this.slice,this.structure)}merge(t){if(!(t instanceof Ue)||t.structure||this.structure)return null;if(this.from+this.slice.size==t.from&&!this.slice.openEnd&&!t.slice.openStart){let n=this.slice.size+t.slice.size==0?K.empty:new K(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new Ue(this.from,this.to+(t.to-t.from),n,this.structure)}else if(t.to==this.from&&!this.slice.openStart&&!t.slice.openEnd){let n=this.slice.size+t.slice.size==0?K.empty:new K(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new Ue(t.from,this.to,n,this.structure)}else return null}toJSON(){let t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Ue(n.from,n.to,K.fromJSON(t,n.slice),!!n.structure)}}Ue.MAP_BIAS=1;it.jsonID("replace",Ue);class We extends it{constructor(t,n,r,i,a,s,o=!1){super(),this.from=t,this.to=n,this.gapFrom=r,this.gapTo=i,this.slice=a,this.insert=s,this.structure=o}apply(t){if(this.structure&&(Xh(t,this.from,this.gapFrom)||Xh(t,this.gapTo,this.to)))return He.fail("Structure gap-replace would overwrite content");let n=t.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return He.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?He.fromReplace(t,this.from,this.to,r):He.fail("Content does not fit in gap")}getMap(){return new Dt([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let n=this.gapTo-this.gapFrom;return new We(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),i=this.from==this.gapFrom?n.pos:t.map(this.gapFrom,-1),a=this.to==this.gapTo?r.pos:t.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||a>r.pos?null:new We(n.pos,r.pos,i,a,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new We(n.from,n.to,n.gapFrom,n.gapTo,K.fromJSON(t,n.slice),n.insert,!!n.structure)}}it.jsonID("replaceAround",We);function Xh(e,t,n){let r=e.resolve(t),i=n-t,a=r.depth;for(;i>0&&a>0&&r.indexAfter(a)==r.node(a).childCount;)a--,i--;if(i>0){let s=r.node(a).maybeChild(r.indexAfter(a));for(;i>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,i--}}return!1}function ex(e,t,n,r){let i=[],a=[],s,o;e.doc.nodesBetween(t,n,(l,u,c)=>{if(!l.isInline)return;let d=l.marks;if(!r.isInSet(d)&&c.type.allowsMarkType(r.type)){let p=Math.max(u,t),f=Math.min(u+l.nodeSize,n),m=r.addToSet(d);for(let g=0;g<d.length;g++)d[g].isInSet(m)||(s&&s.to==p&&s.mark.eq(d[g])?s.to=f:i.push(s=new Kt(p,f,d[g])));o&&o.to==p?o.to=f:a.push(o=new Xn(p,f,r))}}),i.forEach(l=>e.step(l)),a.forEach(l=>e.step(l))}function tx(e,t,n,r){let i=[],a=0;e.doc.nodesBetween(t,n,(s,o)=>{if(!s.isInline)return;a++;let l=null;if(r instanceof No){let u=s.marks,c;for(;c=r.isInSet(u);)(l||(l=[])).push(c),u=c.removeFromSet(u)}else r?r.isInSet(s.marks)&&(l=[r]):l=s.marks;if(l&&l.length){let u=Math.min(o+s.nodeSize,n);for(let c=0;c<l.length;c++){let d=l[c],p;for(let f=0;f<i.length;f++){let m=i[f];m.step==a-1&&d.eq(i[f].style)&&(p=m)}p?(p.to=u,p.step=a):i.push({style:d,from:Math.max(o,t),to:u,step:a})}}}),i.forEach(s=>e.step(new Kt(s.from,s.to,s.style)))}function Km(e,t,n,r=n.contentMatch,i=!0){let a=e.doc.nodeAt(t),s=[],o=t+1;for(let l=0;l<a.childCount;l++){let u=a.child(l),c=o+u.nodeSize,d=r.matchType(u.type);if(!d)s.push(new Ue(o,c,K.empty));else{r=d;for(let p=0;p<u.marks.length;p++)n.allowsMarkType(u.marks[p].type)||e.step(new Kt(o,c,u.marks[p]));if(i&&u.isText&&n.whitespace!="pre"){let p,f=/\r?\n|\r/g,m;for(;p=f.exec(u.text);)m||(m=new K($.from(n.schema.text(" ",n.allowedMarks(u.marks))),0,0)),s.push(new Ue(o+p.index,o+p.index+p[0].length,m))}}o=c}if(!r.validEnd){let l=r.fillBefore($.empty,!0);e.replace(o,o,new K(l,0,0))}for(let l=s.length-1;l>=0;l--)e.step(s[l])}function nx(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function bi(e){let n=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let r=e.depth,i=0,a=0;;--r){let s=e.$from.node(r),o=e.$from.index(r)+i,l=e.$to.indexAfter(r)-a;if(r<e.depth&&s.canReplace(o,l,n))return r;if(r==0||s.type.spec.isolating||!nx(s,o,l))break;o&&(i=1),l<s.childCount&&(a=1)}return null}function rx(e,t,n){let{$from:r,$to:i,depth:a}=t,s=r.before(a+1),o=i.after(a+1),l=s,u=o,c=$.empty,d=0;for(let m=a,g=!1;m>n;m--)g||r.index(m)>0?(g=!0,c=$.from(r.node(m).copy(c)),d++):l--;let p=$.empty,f=0;for(let m=a,g=!1;m>n;m--)g||i.after(m+1)<i.end(m)?(g=!0,p=$.from(i.node(m).copy(p)),f++):u++;e.step(new We(l,u,s,o,new K(c.append(p),d,f),c.size-d,!0))}function Xm(e,t,n=null,r=e){let i=ix(e,t),a=i&&ax(r,t);return a?i.map(Qb).concat({type:t,attrs:n}).concat(a.map(Qb)):null}function Qb(e){return{type:e,attrs:null}}function ix(e,t){let{parent:n,startIndex:r,endIndex:i}=e,a=n.contentMatchAt(r).findWrapping(t);if(!a)return null;let s=a.length?a[0]:t;return n.canReplaceWith(r,i,s)?a:null}function ax(e,t){let{parent:n,startIndex:r,endIndex:i}=e,a=n.child(r),s=t.contentMatch.findWrapping(a.type);if(!s)return null;let l=(s.length?s[s.length-1]:t).contentMatch;for(let u=r;l&&u<i;u++)l=l.matchType(n.child(u).type);return!l||!l.validEnd?null:s}function sx(e,t,n){let r=$.empty;for(let s=n.length-1;s>=0;s--){if(r.size){let o=n[s].type.contentMatch.matchFragment(r);if(!o||!o.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=$.from(n[s].type.create(n[s].attrs,r))}let i=t.start,a=t.end;e.step(new We(i,a,i,a,new K(r,0,0),n.length,!0))}function ox(e,t,n,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let a=e.steps.length;e.doc.nodesBetween(t,n,(s,o)=>{let l=typeof i=="function"?i(s):i;if(s.isTextblock&&!s.hasMarkup(r,l)&&lx(e.doc,e.mapping.slice(a).map(o),r)){let u=null;if(r.schema.linebreakReplacement){let f=r.whitespace=="pre",m=!!r.contentMatch.matchType(r.schema.linebreakReplacement);f&&!m?u=!1:!f&&m&&(u=!0)}u===!1&&l_(e,s,o,a),Km(e,e.mapping.slice(a).map(o,1),r,void 0,u===null);let c=e.mapping.slice(a),d=c.map(o,1),p=c.map(o+s.nodeSize,1);return e.step(new We(d,p,d+1,p-1,new K($.from(r.create(l,null,s.marks)),0,0),1,!0)),u===!0&&o_(e,s,o,a),!1}})}function o_(e,t,n,r){t.forEach((i,a)=>{if(i.isText){let s,o=/\r?\n|\r/g;for(;s=o.exec(i.text);){let l=e.mapping.slice(r).map(n+1+a+s.index);e.replaceWith(l,l+1,t.type.schema.linebreakReplacement.create())}}})}function l_(e,t,n,r){t.forEach((i,a)=>{if(i.type==i.type.schema.linebreakReplacement){let s=e.mapping.slice(r).map(n+1+a);e.replaceWith(s,s+1,t.type.schema.text(`
|
package/dist/client/assets/{capability-load-error-Zpx0CzA1.js → capability-load-error-BwIQSVk2.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as p,b as y,o as h,F as j,j as s,z as b,K as C,B as E}from"./index-
|
|
1
|
+
import{c as p,b as y,o as h,F as j,j as s,z as b,K as C,B as E}from"./index-CsMY3E0n.js";function v(){const e=p.c(23),t=y(),d=h(),{locator:x}=j();let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-muted text-muted-foreground",children:s.jsx(b,{size:28})}),e[0]=u):u=e[0];let i;e[1]!==t?(i=t("common.capabilityLoadError.title"),e[1]=t,e[2]=i):i=e[2];let l;e[3]!==i?(l=s.jsx("h3",{className:"text-lg font-medium",children:i}),e[3]=i,e[4]=l):l=e[4];let r;e[5]!==t?(r=t("common.capabilityLoadError.description"),e[5]=t,e[6]=r):r=e[6];let a;e[7]!==r?(a=s.jsx("p",{className:"mx-auto max-w-sm text-sm text-muted-foreground",children:r}),e[7]=r,e[8]=a):a=e[8];let o;e[9]!==l||e[10]!==a?(o=s.jsxs("div",{className:"space-y-1",children:[l,a]}),e[9]=l,e[10]=a,e[11]=o):o=e[11];let n;e[12]!==x||e[13]!==d?(n=()=>d.invalidateQueries({queryKey:C.myCapabilities(x)}),e[12]=x,e[13]=d,e[14]=n):n=e[14];let c;e[15]!==t?(c=t("common.capabilityLoadError.tryAgain"),e[15]=t,e[16]=c):c=e[16];let m;e[17]!==n||e[18]!==c?(m=s.jsx(E,{variant:"outline",size:"sm",onClick:n,children:c}),e[17]=n,e[18]=c,e[19]=m):m=e[19];let f;return e[20]!==o||e[21]!==m?(f=s.jsxs("div",{className:"flex h-full min-h-[60vh] flex-1 flex-col items-center justify-center gap-4 p-6 text-center",children:[u,o,m]}),e[20]=o,e[21]=m,e[22]=f):f=e[22],f}export{v as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as l,m as n,j as c}from"./index-
|
|
1
|
+
import{c as l,m as n,j as c}from"./index-CsMY3E0n.js";function i(a){const e=l.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=n("bg-card text-card-foreground flex flex-col gap-6 rounded-xl card-shadow",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==s||e[6]!==r?(o=c.jsx("div",{"data-slot":"card",className:r,...s}),e[5]=s,e[6]=r,e[7]=o):o=e[7],o}function f(a){const e=l.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=c.jsx("div",{"data-slot":"card-content",...t}),e[2]=t,e[3]=s):s=e[3],s}export{i as C,f as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as J,r as k,m as V,j as t,b as X,B as $,k as Y,t as I}from"./index-DptGhhs0.js";import{i as Z}from"./XCircle-UQVfZTIm.js";import{a$ as _,B as U}from"./agent-icon-CSidaJ6B.js";import{n as K}from"./LinkExternal01-BHdYJ4vg.js";import{g as tt,f as ot,b as et,A as rt,a as it,e as st,c as at,d as nt}from"./alert-dialog-FVJZWl26.js";import{I as W}from"./input-zj8m7n84.js";import{L as H}from"./label-CuF09Kzu.js";import{P as mt,O as lt,Q as pt,a2 as ct,I as dt,T as D,W as gt,a3 as ut,U as xt}from"./index-CfVmXxnZ.js";import{c as ft,B as ht,a as yt}from"./block-document-DT1iEokX.js";import{u as bt}from"./use-autosave-D0NLBkKG.js";import{t as jt}from"./ChevronDown-Wb4xUAM2.js";import{o as vt,p as Et,n as Nt}from"./automation-runs-DChno1Ee.js";import{s as b,E as Ct}from"./primitives-CghAr9iC.js";import"./AlertCircle-CUqW_w6g.js";import"./Tool01-CTroi0ek.js";import"./ArrowUp-C7ToAohd.js";import"./Settings02-DqYJFs_A.js";import"./Tool02-Bh88tYGs.js";import"./ArrowUpRight-Ctd2GOR9.js";import"./TrendUp01-Bqs7ykt4.js";import"./ZapSquare-Cp9irGGl.js";import"./Users03-23U4ny0D.js";import"./CheckCircle-VXm1pD5i.js";import"./Check-CgsRhHy8.js";import"./ChevronRight-Bb4Md-MD.js";import"./ChevronUp-Bsb-Y77Y.js";import"./DotsVertical-Do26-QjL.js";import"./Stars02-DnbvYkKU.js";import"./Copy01-DZd32DIO.js";import"./CpuChip01-BPw4omKe.js";import"./Eye-B22W8AyK.js";import"./FilterLines-Bc1kxraS.js";import"./Star01-sYD82Np9.js";import"./Palette-BEUtyKuF.js";import"./SwitchHorizontal01-BnpMv-f4.js";import"./HardDrive-BUNzYRdb.js";import"./Key01-CG1NND7T.js";import"./LayoutLeft-m1wg28yS.js";import"./LogOut01-CTki1bzq.js";import"./Monitor01-DcyY807V.js";import"./Sun-tw8Adw2s.js";import"./Play-DrITqLDw.js";import"./Plus-BmYOuiAj.js";import"./SearchLg-Brn3yddB.js";import"./SearchMd-h05KKMiS.js";import"./Shield01-BGuTNf8w.js";import"./Stars01-CfCAp21f.js";import"./Trash01-B8ymhEo_.js";import"./Upload01-CRF4bF0L.js";import"./User01-BMMY0J4X.js";import"./Users01-Co3nN3tw.js";import"./XClose-Beh-B9Gb.js";import"./X-BM44NliR.js";import"./Zap-BuelQrvQ.js";import"./chat-context-D2jz7TPk.js";import"./tab-id-swDgZMnB.js";import"./dialog-D4l4Xdsp.js";import"./hooks-BkWYCTuM.js";import"./use-mcp-client-C7paE-cE.js";import"./auth-D-uIp2CQ.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-NjFnhgvn.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-virtual-mcp-Bdv0Gghv.js";import"./use-ai-providers-gi5xr2mP.js";import"./studio-tools-Dz4porfg.js";import"./use-decopilot-events-CEPq_dZU.js";import"./use-organization-settings-MkvwyFUq.js";import"./spinner-DEsDb5EQ.js";import"./tooltip-CETnd3ay.js";import"./drawer-C3pYai9a.js";import"./collection-search-CclDfE5O.js";import"./use-mobile-CYh3EGEt.js";import"./AreaChart-Bm75VTUe.js";import"./index-yBY16i4r.js";import"./calendar-DMZ7yz5j.js";import"./shell-layout-Qdn6Ab14.js";import"./avatar-BumNKk7X.js";import"./required-auth-layout-PejcRLRr.js";import"./use-org-sso-CCq7sZnB.js";import"./index-NXIL8Ow6.js";import"./get-initials-D-f_fDFw.js";import"./popover-Bt8NA7TT.js";import"./dropdown-menu-Q--ZyLLW.js";import"./github-repo-picker-Bw5gD-qj.js";import"./use-debounced-value-B-JvHFEo.js";import"./use-connection-BMokl4CO.js";import"./authenticate-and-persist-oauth-DObbFBl5.js";import"./mcp-oauth-shlK2GTY.js";import"./use-mcp-tools-DS7HyfmS.js";import"./extract-connection-data-Df7SJj9F.js";import"./metadata-dUsYcpuu.js";import"./use-navigate-to-agent-Bqz6pwLi.js";import"./reusable-new-chat-CouMjkYR.js";import"./provision-repo-scoped-github-connection-CAXumITS.js";import"./use-members-BuBLbPW8.js";import"./use-org-auth-client-CsKd0mpo.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-tags-BDVrYGwL.js";import"./skeleton--88gs_EO.js";import"./use-copy-Be1Kjd_w.js";import"./command-Bjp1VURS.js";import"./index-DBssoMSm.js";import"./companions-core-BDbmsLM0.js";import"./form-DMrBv8ot.js";import"./select-j9WEM8Sh.js";import"./tabs-VUaZhlmm.js";import"./toggle-group-BsLp02VA.js";import"./use-deco-credits-UciEpjbi.js";import"./sidebar-DYUk0Bcn.js";import"./toolbar-B5h5oyq6.js";import"./agent-capabilities-cXfbMfjV.js";import"./connection-card-HFSstqIJ.js";import"./use-registry-connections-YnGGDwWM.js";import"./useInfiniteQuery-BIuIIh4Y.js";import"./use-infinite-scroll-CK3Uizc8.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./card-Dv8gN6wM.js";import"./integration-icon-BuPK5TYy.js";import"./textarea-Bs8WvAl6.js";import"./connection-form-helpers-CKgaIsD-.js";import"./collection-tabs-B0dT6Ygy.js";import"./badge-BFv5PsKE.js";import"./useSuspenseInfiniteQuery-TLdwTHtB.js";import"./select-model-C8d0poms.js";import"./checkbox-B5fS-ChG.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-fm3Mm6Bm.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-CyFcW6V5.js";import"./empty-state-BOcwt_Pf.js";import"./deco-site-production-url-CaKZ7xBn.js";import"./use-capability-BqS7iGUH.js";import"./monaco-editor-CVT6PsIN.js";import"./pt-BR-CLy76QW2.js";import"./use-mcp-auth-status-h3xamCXm.js";import"./use-debounced-autosave-D0IOAPSF.js";import"./index-DIkj5DIc.js";import"./search-input-Bf_CjAux.js";import"./switch-CjtCOM9l.js";import"./use-secrets-HEeF0D3f.js";import"./useQueries-Bq9KgQR-.js";import"./use-file-configs-I7iEol3j.js";import"./use-automations-DhjGDNZK.js";import"./automation-list-row-DMeZ0lJ3.js";import"./table-B1o0Pwj4.js";import"./use-clock-tick-B9BJ0pwX.js";function St(j){const o=J.c(18),{icon:x,title:m,defaultOpen:v,children:u}=j,w=v===void 0?!1:v,[f,P]=k.useState(w);let l;o[0]!==x?(l=t.jsx(x,{size:15}),o[0]=x,o[1]=l):l=o[1];let r;o[2]!==m?(r=t.jsx("span",{className:"flex-1 text-left",children:m}),o[2]=m,o[3]=r):r=o[3];const a=f&&"rotate-180";let p;o[4]!==a?(p=V("transition-transform",a),o[4]=a,o[5]=p):p=o[5];let i;o[6]!==p?(i=t.jsx(jt,{size:15,className:p}),o[6]=p,o[7]=i):i=o[7];let c;o[8]!==l||o[9]!==r||o[10]!==i?(c=t.jsx(vt,{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:[l,r,i]})}),o[8]=l,o[9]=r,o[10]=i,o[11]=c):c=o[11];let d;o[12]!==u?(d=t.jsx(Et,{className:"px-2 pt-4",children:u}),o[12]=u,o[13]=d):d=o[13];let n;return o[14]!==f||o[15]!==c||o[16]!==d?(n=t.jsxs(Nt,{open:f,onOpenChange:P,className:"mt-4",children:[c,d]}),o[14]=f,o[15]=c,o[16]=d,o[17]=n):n=o[17],n}function xr({orgSlug:j,virtualMcpId:o,branch:x,blockKey:m,block:v,decofile:u,meta:w,onManagePosts:f,onOpenPost:P,previewBaseUrl:l}){const r=X(),a=mt({orgSlug:j,virtualMcpId:o,branch:x,packagePath:lt(o)}),p=pt(v,"categories"),[i,c,d]=bt(p,e=>{a.mutate({blockKey:m,data:D(m,"categories",e)})}),n=(e,S)=>c({...i,[e]:S}),A=ft({decofile:u,category:i,previewBaseUrl:l}),s=b(i.slug),[B,y]=k.useState(s),[g,E]=k.useState(null),[N,T]=k.useState(!1),z=s?ct(u).filter(e=>e.categorySlugs.includes(s)):[],C=z.length,M=e=>n("slug",e),Q=async(e,S)=>{const G=b(i.name);T(!0);try{let h=0;for(const{key:O,payload:R}of gt(u,"posts")){const L=ut(R,e,{name:G,slug:S});L!==R&&(await a.mutateAsync({blockKey:O,data:D(O,"posts",xt(L))}),h+=1)}const F={...i,slug:S};await a.mutateAsync({blockKey:m,data:D(m,"categories",F)}),d(F),I.success(h>0?r("sandbox.categoryEditor.renameSuccessWithPosts",{count:String(h)}):r("sandbox.categoryEditor.renameSuccessNoPosts")),E(null)}catch(h){y(e),E(null),I.error(h instanceof Error?h.message:r("sandbox.categoryEditor.renameFailed"))}finally{T(!1)}},q=()=>{const e=B.trim();if(e===s){B!==e&&y(e);return}if(!e){y(s);return}if(C===0){M(e);return}E({oldSlug:s,newSlug:e,count:C})};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:b(i.name)||r("sandbox.categoryEditor.untitledCategory")}),t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[t.jsx(dt,{isPending:a.isPending,isError:a.isError}),A&&t.jsxs($,{type:"button",variant:"outline",size:"sm",title:r("sandbox.categoryEditor.previewTooltip"),onClick:()=>window.open(A,"_blank","noopener,noreferrer"),children:[t.jsx(K,{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(Ct,{value:b(i.name),onChange:e=>n("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(H,{htmlFor:"category-slug",children:r("sandbox.categoryEditor.slugLabel")}),t.jsx(W,{id:"category-slug",value:B,onChange:e=>y(e.target.value),onBlur:q,placeholder:r("sandbox.categoryEditor.slugPlaceholder"),className:"h-10"})]}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(H,{htmlFor:"category-description",children:r("sandbox.categoryEditor.descriptionLabel")}),t.jsx(W,{id:"category-description",value:b(i.description),onChange:e=>n("description",e.target.value),placeholder:r("sandbox.categoryEditor.descriptionPlaceholder"),className:"h-10"})]}),t.jsx(St,{icon:_,title:r("sandbox.categoryEditor.contentTitle"),defaultOpen:!0,children:t.jsx(ht,{value:yt(i.sections),onChange:e=>n("sections",e),meta:w,sandboxRef:{orgSlug:j,virtualMcpId:o,branch:x},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(U,{size:16,className:"shrink-0 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:r("sandbox.categoryEditor.postsInCategory",{count:String(C)})})]}),t.jsxs($,{type:"button",variant:"outline",size:"sm",disabled:!s,title:r(s?"sandbox.categoryEditor.pickPostsTooltip":"sandbox.categoryEditor.setSlugTooltip"),onClick:()=>f(s),children:[r("sandbox.categoryEditor.addPostsButton"),t.jsx(Z,{size:14})]})]}),C>0&&t.jsx("ul",{className:"divide-y border-t bg-background",children:z.map(e=>t.jsx("li",{children:t.jsxs("button",{type:"button",onClick:()=>P(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(U,{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(tt,{open:!!g,onOpenChange:e=>{e||N||(y(s),E(null))},children:t.jsxs(ot,{children:[t.jsxs(et,{children:[t.jsx(rt,{children:r("sandbox.categoryEditor.renameDialogTitle")}),t.jsx(it,{children:g?r("sandbox.categoryEditor.renameDialogDescription",{oldSlug:g.oldSlug,newSlug:g.newSlug,count:String(g.count)}):null})]}),t.jsxs(st,{children:[t.jsx(at,{disabled:N,children:r("sandbox.categoryEditor.cancelButton")}),t.jsx(nt,{onClick:e=>{e.preventDefault(),g&&Q(g.oldSlug,g.newSlug)},disabled:N,children:N?t.jsxs(t.Fragment,{children:[t.jsx(Y,{size:14,className:"animate-spin"}),r("sandbox.categoryEditor.renamingLabel")]}):r("sandbox.categoryEditor.renameActionButton")})]})]})})]})}export{xr as CategoryEditor};
|
|
1
|
+
import{c as J,r as k,m as V,j as t,b as X,B as $,k as Y,t as I}from"./index-CsMY3E0n.js";import{i as Z}from"./XCircle-Fr7R0JyH.js";import{a$ as _,B as U}from"./agent-icon-D0v0CAMQ.js";import{n as K}from"./LinkExternal01-CUFmEJ-r.js";import{g as tt,f as ot,b as et,A as rt,a as it,e as st,c as at,d as nt}from"./alert-dialog-DctPzbrJ.js";import{I as W}from"./input-Bxlv4wq5.js";import{L as H}from"./label-CPAOOmgU.js";import{P as mt,O as lt,Q as pt,a2 as ct,I as dt,T as D,W as gt,a3 as ut,U as xt}from"./index-Y5IRZDB7.js";import{c as ft,B as ht,a as yt}from"./block-document-gAmyXvk5.js";import{u as bt}from"./use-autosave-DEblj-jV.js";import{t as jt}from"./ChevronDown-DfcP5Y1G.js";import{o as vt,p as Et,n as Nt}from"./automation-runs-BQK2qG6I.js";import{s as b,E as Ct}from"./primitives-BmYJCXvO.js";import"./AlertCircle-BXOs8pgi.js";import"./Tool01-d6PLxuqZ.js";import"./ArrowUp-BFGzDO5k.js";import"./Settings02-C2z8V4b1.js";import"./Tool02-CG-MJEAZ.js";import"./ArrowUpRight-h69wSa4W.js";import"./TrendUp01-CTjYh8Ln.js";import"./ZapSquare-DHGjnuEa.js";import"./Users03-DBjTudH5.js";import"./CheckCircle-CP9SNP9d.js";import"./Check-CKtI4hGn.js";import"./ChevronRight-BIlAcWT5.js";import"./ChevronUp-SkDgfV9P.js";import"./DotsVertical-DTkYQ2kM.js";import"./Stars02-DKPhD_jS.js";import"./Copy01-CjgXfC24.js";import"./CpuChip01-t2Y6TVWu.js";import"./Eye-D7uVxsd6.js";import"./FilterLines-FPJrIJmP.js";import"./Star01-Cw9ulDl8.js";import"./Palette-D4hJdFvA.js";import"./SwitchHorizontal01-B7BlklUe.js";import"./HardDrive-DLAbk7yi.js";import"./Key01-BNEdMwqa.js";import"./LayoutLeft-pwNqM9Bq.js";import"./LogOut01-CL5erPho.js";import"./Monitor01-BTT_gkH0.js";import"./Sun-quy8cVor.js";import"./Play-BPaNNVsN.js";import"./Plus-DigHRvrB.js";import"./SearchLg-CcVjy7cv.js";import"./SearchMd-UJHWms5O.js";import"./Shield01-CE6E4vWT.js";import"./Stars01-DqE2p9rj.js";import"./Trash01-BEfNCj7H.js";import"./Upload01-CSguqWGj.js";import"./User01-CN3QhMor.js";import"./Users01-ALInePB-.js";import"./XClose-yYL9HV11.js";import"./X-DvW6lnRi.js";import"./Zap-B2AmO5T-.js";import"./chat-context-CZ8b18Fc.js";import"./tab-id-BqPdm69o.js";import"./dialog-CRj0zBQ_.js";import"./hooks-C_nIzkQJ.js";import"./use-mcp-client-CpOZK5-l.js";import"./auth-CVt7QHVR.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-B682c9RZ.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-virtual-mcp-6MeqW-FL.js";import"./use-ai-providers-DFQIA0YS.js";import"./studio-tools-DfsuYmJt.js";import"./use-decopilot-events-DM97rtIw.js";import"./use-organization-settings-CVw_W4UD.js";import"./spinner-_TqSaOQN.js";import"./tooltip-Cpi2mja1.js";import"./drawer-ZyqfN_k8.js";import"./collection-search-BXhZ3O1D.js";import"./use-mobile-ieOqtEHL.js";import"./AreaChart-C8CciM_k.js";import"./index-BF6I2QS7.js";import"./calendar-CsE8P_v6.js";import"./shell-layout-_reN3Shc.js";import"./avatar-DNua1J9J.js";import"./required-auth-layout-BB-yluZd.js";import"./use-org-sso-DOw7Tfv8.js";import"./index-BD1XIck_.js";import"./get-initials-D-f_fDFw.js";import"./popover-DJARnKJN.js";import"./dropdown-menu-BaxzJoD1.js";import"./github-repo-picker-C4LbYEVp.js";import"./use-debounced-value-CwhSCFuf.js";import"./use-connection-CSBpX4PU.js";import"./authenticate-and-persist-oauth-DiCc1vu0.js";import"./mcp-oauth-BBshTxEG.js";import"./use-mcp-tools-CqY2nbaz.js";import"./extract-connection-data-DY9nlWot.js";import"./metadata-dUsYcpuu.js";import"./use-navigate-to-agent-DBGPkYj0.js";import"./reusable-new-chat-CouMjkYR.js";import"./provision-repo-scoped-github-connection-CAXumITS.js";import"./use-members-DsksLoYY.js";import"./use-org-auth-client-BU-wvvoc.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-tags-C7XcT7ZI.js";import"./skeleton-C65ogTvo.js";import"./use-copy-DTInUOoW.js";import"./command-BOE7MzSb.js";import"./index-bW9oPKeA.js";import"./companions-core-BmlZqb3z.js";import"./form-r7LLoRlt.js";import"./select-Bv-2ewD2.js";import"./tabs-oVlPQ_HA.js";import"./toggle-group-BRzf8EHW.js";import"./use-deco-credits-DvYCBBFc.js";import"./sidebar-ChD8CCYT.js";import"./toolbar-DYLo2f04.js";import"./agent-capabilities-cXfbMfjV.js";import"./connection-card-DdoyOAg3.js";import"./use-registry-connections-BPju-Y9r.js";import"./useInfiniteQuery-D_QXkkfk.js";import"./use-infinite-scroll-BhWnCwa_.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./card-CAY4LRtc.js";import"./integration-icon-BnGA9SX5.js";import"./textarea-Bn4a6Dgo.js";import"./connection-form-helpers-D6bw0HEg.js";import"./collection-tabs-BMBpTAbo.js";import"./badge-p90WsvMa.js";import"./useSuspenseInfiniteQuery-C2EK0lz_.js";import"./select-model-DGHQ7XQO.js";import"./checkbox-CpkMAAxs.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-DlAvH5Ow.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-BgT_jGkq.js";import"./empty-state-CX0ihzR5.js";import"./deco-site-production-url-CaKZ7xBn.js";import"./use-capability-Cc8HiELK.js";import"./monaco-editor-pAlq3Hbk.js";import"./pt-BR-CLy76QW2.js";import"./use-mcp-auth-status-8kwewAjR.js";import"./use-debounced-autosave-2vwUh_VG.js";import"./index-Bur1TB7U.js";import"./search-input-DoOBid5A.js";import"./switch-lfu04CGM.js";import"./use-secrets-CaSIcPta.js";import"./useQueries-B5JmsTek.js";import"./use-file-configs-Eq9DEvtL.js";import"./use-automations-CwyD7KUw.js";import"./automation-list-row-2xdC3lws.js";import"./table-C2TMn1li.js";import"./use-clock-tick--ht2pzb8.js";function St(j){const o=J.c(18),{icon:x,title:m,defaultOpen:v,children:u}=j,w=v===void 0?!1:v,[f,P]=k.useState(w);let l;o[0]!==x?(l=t.jsx(x,{size:15}),o[0]=x,o[1]=l):l=o[1];let r;o[2]!==m?(r=t.jsx("span",{className:"flex-1 text-left",children:m}),o[2]=m,o[3]=r):r=o[3];const a=f&&"rotate-180";let p;o[4]!==a?(p=V("transition-transform",a),o[4]=a,o[5]=p):p=o[5];let i;o[6]!==p?(i=t.jsx(jt,{size:15,className:p}),o[6]=p,o[7]=i):i=o[7];let c;o[8]!==l||o[9]!==r||o[10]!==i?(c=t.jsx(vt,{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:[l,r,i]})}),o[8]=l,o[9]=r,o[10]=i,o[11]=c):c=o[11];let d;o[12]!==u?(d=t.jsx(Et,{className:"px-2 pt-4",children:u}),o[12]=u,o[13]=d):d=o[13];let n;return o[14]!==f||o[15]!==c||o[16]!==d?(n=t.jsxs(Nt,{open:f,onOpenChange:P,className:"mt-4",children:[c,d]}),o[14]=f,o[15]=c,o[16]=d,o[17]=n):n=o[17],n}function xr({orgSlug:j,virtualMcpId:o,branch:x,blockKey:m,block:v,decofile:u,meta:w,onManagePosts:f,onOpenPost:P,previewBaseUrl:l}){const r=X(),a=mt({orgSlug:j,virtualMcpId:o,branch:x,packagePath:lt(o)}),p=pt(v,"categories"),[i,c,d]=bt(p,e=>{a.mutate({blockKey:m,data:D(m,"categories",e)})}),n=(e,S)=>c({...i,[e]:S}),A=ft({decofile:u,category:i,previewBaseUrl:l}),s=b(i.slug),[B,y]=k.useState(s),[g,E]=k.useState(null),[N,T]=k.useState(!1),z=s?ct(u).filter(e=>e.categorySlugs.includes(s)):[],C=z.length,M=e=>n("slug",e),Q=async(e,S)=>{const G=b(i.name);T(!0);try{let h=0;for(const{key:O,payload:R}of gt(u,"posts")){const L=ut(R,e,{name:G,slug:S});L!==R&&(await a.mutateAsync({blockKey:O,data:D(O,"posts",xt(L))}),h+=1)}const F={...i,slug:S};await a.mutateAsync({blockKey:m,data:D(m,"categories",F)}),d(F),I.success(h>0?r("sandbox.categoryEditor.renameSuccessWithPosts",{count:String(h)}):r("sandbox.categoryEditor.renameSuccessNoPosts")),E(null)}catch(h){y(e),E(null),I.error(h instanceof Error?h.message:r("sandbox.categoryEditor.renameFailed"))}finally{T(!1)}},q=()=>{const e=B.trim();if(e===s){B!==e&&y(e);return}if(!e){y(s);return}if(C===0){M(e);return}E({oldSlug:s,newSlug:e,count:C})};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:b(i.name)||r("sandbox.categoryEditor.untitledCategory")}),t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[t.jsx(dt,{isPending:a.isPending,isError:a.isError}),A&&t.jsxs($,{type:"button",variant:"outline",size:"sm",title:r("sandbox.categoryEditor.previewTooltip"),onClick:()=>window.open(A,"_blank","noopener,noreferrer"),children:[t.jsx(K,{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(Ct,{value:b(i.name),onChange:e=>n("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(H,{htmlFor:"category-slug",children:r("sandbox.categoryEditor.slugLabel")}),t.jsx(W,{id:"category-slug",value:B,onChange:e=>y(e.target.value),onBlur:q,placeholder:r("sandbox.categoryEditor.slugPlaceholder"),className:"h-10"})]}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(H,{htmlFor:"category-description",children:r("sandbox.categoryEditor.descriptionLabel")}),t.jsx(W,{id:"category-description",value:b(i.description),onChange:e=>n("description",e.target.value),placeholder:r("sandbox.categoryEditor.descriptionPlaceholder"),className:"h-10"})]}),t.jsx(St,{icon:_,title:r("sandbox.categoryEditor.contentTitle"),defaultOpen:!0,children:t.jsx(ht,{value:yt(i.sections),onChange:e=>n("sections",e),meta:w,sandboxRef:{orgSlug:j,virtualMcpId:o,branch:x},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(U,{size:16,className:"shrink-0 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:r("sandbox.categoryEditor.postsInCategory",{count:String(C)})})]}),t.jsxs($,{type:"button",variant:"outline",size:"sm",disabled:!s,title:r(s?"sandbox.categoryEditor.pickPostsTooltip":"sandbox.categoryEditor.setSlugTooltip"),onClick:()=>f(s),children:[r("sandbox.categoryEditor.addPostsButton"),t.jsx(Z,{size:14})]})]}),C>0&&t.jsx("ul",{className:"divide-y border-t bg-background",children:z.map(e=>t.jsx("li",{children:t.jsxs("button",{type:"button",onClick:()=>P(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(U,{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(tt,{open:!!g,onOpenChange:e=>{e||N||(y(s),E(null))},children:t.jsxs(ot,{children:[t.jsxs(et,{children:[t.jsx(rt,{children:r("sandbox.categoryEditor.renameDialogTitle")}),t.jsx(it,{children:g?r("sandbox.categoryEditor.renameDialogDescription",{oldSlug:g.oldSlug,newSlug:g.newSlug,count:String(g.count)}):null})]}),t.jsxs(st,{children:[t.jsx(at,{disabled:N,children:r("sandbox.categoryEditor.cancelButton")}),t.jsx(nt,{onClick:e=>{e.preventDefault(),g&&Q(g.oldSlug,g.newSlug)},disabled:N,children:N?t.jsxs(t.Fragment,{children:[t.jsx(Y,{size:14,className:"animate-spin"}),r("sandbox.categoryEditor.renamingLabel")]}):r("sandbox.categoryEditor.renameActionButton")})]})]})})]})}export{xr as CategoryEditor};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Y as S,a3 as C,Z as i,a6 as we,a4 as de,a5 as ke,aH as Me,cw as xt,bj as Ne,b8 as lt,c as ae,J as ct,u as je,o as Ve,F as J,K as ce,t as le,I as fe,G as be,d as dt,f as It,r as v,n as wt,e as Mt,j as xe,b as Ee,a as Tt,v as Ct,aa as At,p as Pt}from"./index-DptGhhs0.js";import{d as _t,s as Rt,A as ut,t as Et,u as Dt,o as $t,w as Ut}from"./tab-id-swDgZMnB.js";import{S as Ot,u as Lt,f as Nt,b as Ft}from"./hooks-BkWYCTuM.js";import{u as qt}from"./use-is-desktop-app-BNujXJc_.js";import{a as jt,u as Vt,S as Ht}from"./use-mcp-client-C7paE-cE.js";import{u as Bt}from"./use-virtual-mcp-Bdv0Gghv.js";import{u as pt,p as Kt,b as ve,i as Qt,c as Wt}from"./use-ai-providers-gi5xr2mP.js";import{u as Gt}from"./use-decopilot-events-CEPq_dZU.js";import{u as zt,c as Xt}from"./studio-tools-Dz4porfg.js";import{b as Zt}from"./use-organization-settings-MkvwyFUq.js";const Se=S({connection_id:i().describe("Connection ID"),selected_tools:C(i()).nullable().describe("Selected tool names. null = all tools included, array = only these tools included"),selected_resources:C(i()).nullable().describe("Selected resource URIs or patterns. Supports * and ** wildcards for pattern matching. null = all resources included, array = only these resources included"),selected_prompts:C(i()).nullable().describe("Selected prompt names. null = all prompts included, array = only these prompts included")}),ht=Se.extend({selected_tools:Se.shape.selected_tools.optional(),selected_resources:Se.shape.selected_resources.optional(),selected_prompts:Se.shape.selected_prompts.optional()}),Yt=S({connectionId:i(),toolName:i(),label:i(),icon:i().nullable().optional()}),Jt=S({id:i().describe("Stable id; used as React key and ?tab= value"),title:i().describe("Tab label"),icon:i().optional().describe("Optional lucide icon name"),view:S({type:Ne("ext-app"),appId:i(),args:ke(i(),lt()).optional()})}),en=S({defaultMainView:S({type:i(),id:i().optional(),toolName:i().optional()}).nullable().optional(),chatDefaultOpen:we().nullable().optional(),cmsDefaultOpen:we().nullable().optional(),tabs:C(Jt).optional()}),tt=S({tileId:i().optional(),connectionId:i().optional().describe("Connection that owns the resource — the host opens a direct MCP client to this connection so the iframe can call tools by their bare names."),resourceUri:i().describe("ui:// resource URI exposed by `connectionId`. Read on the home page and rendered via MCPAppRenderer."),toolName:i().optional().describe("Tool name — identifies which tool's inputSchema to display when editing tile props."),toolInput:ke(i(),lt()).optional().describe("User-configured input props passed to MCPAppRenderer when rendering the tile."),minHeight:Me().int().positive().optional(),maxHeight:Me().int().positive().optional()}),He=S({banner:i().nullable().optional(),bannerColor:i().nullable().optional(),icon:i().nullable().optional(),themeColor:i().nullable().optional(),pinnedViews:C(Yt).nullable().optional(),layout:en.nullable().optional(),homeTile:tt.nullable().optional(),homeTiles:C(tt).nullable().optional(),homePrompts:C(i()).nullable().optional()});function ds(t){const e=t?.homeTiles;if(Array.isArray(e)&&e.length>0)return e;const n=t?.homeTile;return n?[n]:[]}const tn=/^[A-Za-z_][A-Za-z0-9_]*$/,nt=i().min(1).regex(tn,{message:"Env var key must start with a letter or underscore and contain only letters, digits, and underscores."}),nn=xt("kind",[S({key:nt,kind:Ne("literal"),value:i()}),S({key:nt,kind:Ne("secret"),secretId:i().min(1)})]),sn=/^[a-zA-Z0-9.-]+(?::[0-9]+)?$/,on=S({host:i().min(1).regex(sn).describe("Submodule host, e.g. 'github.com' (bare hostname, no scheme)."),secretId:i().min(1).describe("Vault secret id holding the PAT used to fetch this host.")}),Be=S({selected:i().nullable().optional().describe("User-selected package manager (npm | pnpm | yarn | bun | deno). Null/absent means autodetect on next SANDBOX_START."),port:i().nullable().optional().describe("User-selected dev server port as a string (allows '' / null for unset). Null/absent means autodetect."),path:i().nullable().optional().describe("Optional path (relative to repo root) to the directory containing package.json. Null/absent means repo root. Forwarded as `application.packageManager.path` to the daemon config."),env:C(nn).nullable().optional().describe("Env vars injected on every SANDBOX_START. Literal entries inline their value; secret entries store a secretId that Studio resolves via the credential vault before posting /_sandbox/config."),submoduleCredentials:C(on).nullable().optional().describe("Git submodule credentials injected on every SANDBOX_START. Each entry maps a host to a vault secret (PAT) that Studio resolves before posting /_sandbox/config; the daemon uses it to authenticate `git submodule update` for submodules on that host.")}),Ke=S({url:i().describe("GitHub repository URL"),owner:i().describe("Repository owner"),name:i().describe("Repository name"),installationId:Me().optional().describe("GitHub App installation ID. Absent when the repo was linked without a GitHub connection (public-clone mode)."),connectionId:i().optional().describe("ID of the mcp-github connection used for authentication. Absent for public repos cloned without credentials.")}),an=de(["agent-sandbox","user-desktop"]),rn=de(["agent-sandbox","user-desktop","cluster"]);function Qe(t){return t==="cluster"?"agent-sandbox":t}const mt={sandboxHandle:i().describe("Provider-specific handle"),previewUrl:i().nullable().describe("URL where the sandbox's iframe-proxied UI is served, or null when the sandbox has no dev server (blank / tool sandboxes)."),sandboxApiUrl:i().nullable().optional().describe("Daemon's public URL — what cluster→daemon RPCs target. Equal to previewUrl for user-desktop; null/absent for the agent-sandbox provider (routes through hosted ingress)."),sandboxProviderKind:an.optional(),createdAt:Me().optional().describe("Epoch ms the entry was first written by SANDBOX_START. Used by the booting overlay to show a stable elapsed timer that survives browser reloads. Optional for backward compatibility with entries written before this field existed."),startedWith:S({packageManager:i().nullable().optional().describe("metadata.runtime.selected at the time of SANDBOX_START"),port:i().nullable().optional().describe("metadata.runtime.port at the time of SANDBOX_START"),path:i().nullable().optional().describe("metadata.runtime.path at the time of SANDBOX_START")}).optional().describe("Snapshot of metadata.runtime fields (selected/port/path) used at SANDBOX_START. The Preview tab compares the live metadata.runtime against this to decide if a restart is required to apply changes.")},ft=S(mt),ln=S({...mt,sandboxProviderKind:rn.optional()});function cn(t){const e=ln.parse(t);return ft.parse({...e,sandboxProviderKind:e.sandboxProviderKind?Qe(e.sandboxProviderKind):void 0})}function us(t){if(!t||typeof t!="object"||Array.isArray(t))return{};const e=t,n={};for(const[s,o]of Object.entries(e)){if(!o||typeof o!="object"||s!=="cluster"&&s!=="agent-sandbox"&&s!=="user-desktop")continue;const a=Qe(s);try{if(s==="cluster"&&n[a])continue;n[a]=cn(o)}catch{}}return n}const We=ke(i().describe("userId"),ke(i().describe("branch"),ke(i().describe("sandboxProviderKind"),ft))),dn=S({id:i().describe("Stable identifier for this knowledge file"),name:i().describe("File name shown in the UI"),kind:de(["file","skill"]).optional().describe("'file' (a single document) or 'skill' (a Claude Code skill folder containing SKILL.md). Defaults to 'file'."),volume:i().describe("Org filesystem (Library) volume the file lives in"),path:i().describe("Path within the volume"),url:i().describe("Same-origin URL to read the file (display/download)"),contentType:i().nullable().optional().describe("MIME type, used to decide whether to inline the content"),size:Me().nullable().optional().describe("File size in bytes"),addedAt:i().describe("ISO timestamp when the file was attached")}),Ge=C(dn).nullable().optional().describe("Files attached to the agent as reference knowledge. Surfaced in the system prompt: small text documents are inlined, others are listed as retrievable references."),un=de(["smart","code-review","open"]),ze=un.nullable().optional().describe("Controls when this code agent's changes may be published directly vs. requiring PR review. 'smart' (default) uses AI to judge per change; 'code-review' requires review for any code; 'open' allows direct publish always."),ps=S({id:i().describe("Unique identifier"),title:i().describe("Human-readable name"),description:i().nullable().describe("Description"),icon:i().nullable().describe("Icon URL"),created_at:i().describe("Creation timestamp"),updated_at:i().describe("Last update timestamp"),created_by:i().describe("User ID who created this item"),updated_by:i().optional().describe("User ID who last updated this item"),organization_id:i().describe("Organization ID this item belongs to"),status:de(["active","inactive"]).describe("Current status"),pinned:we().describe("Whether this space is pinned to the sidebar"),metadata:S({instructions:i().nullable().describe("Instructions also used as system prompt"),enabled_plugins:C(i()).nullable().optional().describe("List of enabled plugin IDs"),subAgents:C(i()).nullable().optional().describe("Allowlist of Virtual MCP (agent) or concrete MCP connection IDs this agent may delegate to via subtask. Concrete connections create ephemeral subagents. null/absent = all active org targets; empty array = itself only."),liveAgentId:i().nullable().optional().describe("ID of the live agent this (dev) agent develops. Set only on dev agents; powers the Develop/Live toggle. A dev agent is hidden from the sidebar (reached via the toggle on its live counterpart)."),ui:He.nullable().optional().describe("UI customization settings"),githubRepo:Ke.nullable().optional().describe("Linked GitHub repository"),runtime:Be.nullable().optional().describe("User-pinned runtime config (package manager, dev port). Empty fields = autodetect."),sandboxMap:We.optional().describe("Per-user, per-branch sandbox mapping: sandboxMap[userId][branch] -> { sandboxHandle, previewUrl }"),knowledge:Ge,siteSlug:i().nullable().optional().describe("Linked asset site slug (managed storage tenancy)"),publishPolicy:ze,productionUrl:i().nullable().optional().describe("Live production URL of the linked site (e.g. https://acme.com). Painted in the preview iframe while the sandbox dev server is waking.")}).loose().describe("Metadata"),connections:C(Se).describe("Connections with their selected tools, resources, and prompts")}),bt=S({title:i().min(1).max(120).describe("Short label shown on the chip"),description:i().max(280).optional().describe("One-line subtitle shown under the title"),text:i().min(1).describe("The message sent to the agent when the prompt is clicked")});S({title:i().min(1).max(255).describe("Name for the virtual MCP"),description:i().nullable().optional().describe("Optional description"),icon:i().nullish().describe("Optional icon URL"),status:de(["active","inactive"]).optional().default("active").describe("Initial status"),pinned:we().optional().default(!1).describe("Pin to sidebar"),metadata:S({instructions:i().nullable().optional().describe("MCP server instructions"),enabled_plugins:C(i()).nullable().optional().describe("List of enabled plugin IDs"),subAgents:C(i()).nullable().optional().describe("Allowlist of Virtual MCP (agent) or concrete MCP connection IDs this agent may delegate to via subtask. Concrete connections create ephemeral subagents. null/absent = all active org targets; empty array = itself only."),liveAgentId:i().nullable().optional().describe("ID of the live agent this (dev) agent develops. Set only on dev agents; powers the Develop/Live toggle. A dev agent is hidden from the sidebar (reached via the toggle on its live counterpart)."),ui:He.nullable().optional().describe("UI customization settings"),githubRepo:Ke.nullable().optional().describe("Linked GitHub repository"),runtime:Be.nullable().optional().describe("User-pinned runtime config (package manager, dev port). Empty fields = autodetect."),sandboxMap:We.optional().describe("Per-user, per-branch sandbox mapping: sandboxMap[userId][branch] -> { sandboxHandle, previewUrl }"),knowledge:Ge,siteSlug:i().nullable().optional().describe("Linked asset site slug (managed storage tenancy)"),publishPolicy:ze,productionUrl:i().nullable().optional().describe("Live production URL of the linked site (e.g. https://acme.com). Painted in the preview iframe while the sandbox dev server is waking.")}).loose().nullable().optional().describe("Additional metadata including MCP server instructions"),connections:C(ht).describe("Connections to include/exclude (can be empty for exclusion mode)"),prompts:C(bt).optional().describe("Optional kickstart prompts to seed on the agent. Each becomes a clickable conversation starter (icebreaker) on the agent. Author them from the agent's role and the tools it will have so they're coherent and immediately useful.")});S({title:i().min(1).max(255).optional().describe("New name"),description:i().nullable().optional().describe("New description (null to clear)"),icon:i().nullish().describe("New icon URL"),status:de(["active","inactive"]).optional().describe("New status"),pinned:we().optional().describe("Pin/unpin from sidebar"),metadata:S({instructions:i().nullable().optional().describe("MCP server instructions"),enabled_plugins:C(i()).nullable().optional().describe("List of enabled plugin IDs"),subAgents:C(i()).nullable().optional().describe("Allowlist of Virtual MCP (agent) or concrete MCP connection IDs this agent may delegate to via subtask. Concrete connections create ephemeral subagents. null/absent = all active org targets; empty array = itself only."),liveAgentId:i().nullable().optional().describe("ID of the live agent this (dev) agent develops. Set only on dev agents; powers the Develop/Live toggle. A dev agent is hidden from the sidebar (reached via the toggle on its live counterpart)."),ui:He.nullable().optional().describe("UI customization settings"),githubRepo:Ke.nullable().optional().describe("Linked GitHub repository"),runtime:Be.nullable().optional().describe("User-pinned runtime config (package manager, dev port). Empty fields = autodetect."),sandboxMap:We.optional().describe("Per-user, per-branch sandbox mapping: sandboxMap[userId][branch] -> { sandboxHandle, previewUrl }"),knowledge:Ge,siteSlug:i().nullable().optional().describe("Linked asset site slug (managed storage tenancy)"),publishPolicy:ze,productionUrl:i().nullable().optional().describe("Live production URL of the linked site (e.g. https://acme.com). Painted in the preview iframe while the sandbox dev server is waking.")}).loose().nullable().optional().describe("Additional metadata including MCP server instructions"),connections:C(ht).optional().describe("New connections (replaces existing)"),prompts:C(bt).optional().describe("Replace the agent's kickstart prompts with this full set. Omit to leave them unchanged; pass an empty array to remove all. Each becomes a clickable conversation starter (icebreaker).")});function pn(t,e=[]){return t==="stop"?"completed":t==="tool-calls"?e.some(s=>s.type==="tool-user_ask"&&s.state==="input-available"||s.state==="approval-requested")?"requires_action":"completed":"failed"}const Fe={decopilot:{harness:"decopilot",sandbox:"agent-sandbox"},"claude-code-desktop":{harness:"claude-code",sandbox:"user-desktop"},"codex-desktop":{harness:"codex",sandbox:"user-desktop"},"opencode-desktop":{harness:"opencode",sandbox:"user-desktop"}};function hn(t,e){if(!t)return null;const n=e?Qe(e):null;if(t==="decopilot"&&(n===null||n==="user-desktop"))return"decopilot";for(const[s,o]of Object.entries(Fe))if(o.harness===t&&o.sandbox===n)return s;return null}function mn({pendingOption:t,lockedHarness:e}){return e==="claude-code"?"claude-code-desktop":e==="codex"?"codex-desktop":e==="opencode"?"opencode-desktop":t==="claude-code-desktop"||t==="codex-desktop"||t==="opencode-desktop"?t:null}function fn(t){return t.thread?.harness_id!=null?{}:{harnessId:"decopilot",sandboxProviderKind:"agent-sandbox",branch:t.globals.branch??null}}function bn({isDesktopApp:t,harnessId:e,sandboxProviderKind:n}){return e!=null&&e!=="decopilot"?!0:n==null||n==="agent-sandbox"?!1:!(e==="decopilot"&&n==="user-desktop")}const gn="home",yn=new Set(["output","upload","public","home"]),vn=/^[A-Za-z0-9][A-Za-z0-9._-]*$/;function hs(t){return yn.has(t)||!vn.test(t)?"home":t}function Sn(t){const e=t?t.split("/").filter(Boolean):[],n=e[0]==="public",s=n?e[1]??null:null,o=n?s?`public-${s}`:null:e[0]??null,a=(n?e.slice(2):e.slice(1)).join("/");return{segments:e,volume:o,dirPath:a,isPublic:n,publicSet:s,readOnly:n,isHomeRoot:o===gn&&a===""}}function ms(t){return t==="public"?"skills":t}function fs(t,e){return t.isPublic&&t.publicSet?`public/${t.publicSet}/${e}`:t.volume?`${t.volume}/${e}`:e}const st="public-";function gt(t){return t.startsWith(st)?t.slice(st.length):null}function bs(t,e){const n=gt(t);return n?`public/${n}/${e}`:`${t}/${e}`}function kn(t){const e=t.lastIndexOf("/");return e===-1?t:t.slice(e+1)}function xn(t){const{volume:e,dirPath:n}=Sn(t);if(!e)return null;let s;if(e==="home")s="org/home";else if(e==="outputs")s="org/.outputs";else if(e==="uploads")s="org/.uploads";else{const o=gt(e);s=o?`org/public/${o}`:`org/${e}`}return n?`${s}/${n}`:s}function In(t){const e=ae.c(21);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId",shouldThrow:!1},e[0]=n):n=e[0];const s=ct(n);let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},e[1]=o):o=e[1];const a=je(o);let l;e[2]!==a.brand||e[3]!==a.main||e[4]!==a.preview||e[5]!==a.skill?(l=(typeof a.main=="string"?_t(a.main)?.path:void 0)??a.preview??a.skill??a.brand??null,e[2]=a.brand,e[3]=a.main,e[4]=a.preview,e[5]=a.skill,e[6]=l):l=e[6];const c=l;let h;if(e[7]!==s?.params.appSlug||e[8]!==s?.params.collectionName||e[9]!==s?.params.itemId||e[10]!==c||e[11]!==t){if(h=[],t&&h.push(`### Selected Agent
|
|
1
|
+
import{Y as S,a3 as C,Z as i,a6 as we,a4 as de,a5 as ke,aH as Me,cw as xt,bj as Ne,b8 as lt,c as ae,J as ct,u as je,o as Ve,F as J,K as ce,t as le,I as fe,G as be,d as dt,f as It,r as v,n as wt,e as Mt,j as xe,b as Ee,a as Tt,v as Ct,aa as At,p as Pt}from"./index-CsMY3E0n.js";import{d as _t,s as Rt,A as ut,t as Et,u as Dt,o as $t,w as Ut}from"./tab-id-BqPdm69o.js";import{S as Ot,u as Lt,f as Nt,b as Ft}from"./hooks-C_nIzkQJ.js";import{u as qt}from"./use-is-desktop-app-BNujXJc_.js";import{a as jt,u as Vt,S as Ht}from"./use-mcp-client-CpOZK5-l.js";import{u as Bt}from"./use-virtual-mcp-6MeqW-FL.js";import{u as pt,p as Kt,b as ve,i as Qt,c as Wt}from"./use-ai-providers-DFQIA0YS.js";import{u as Gt}from"./use-decopilot-events-DM97rtIw.js";import{u as zt,c as Xt}from"./studio-tools-DfsuYmJt.js";import{b as Zt}from"./use-organization-settings-CVw_W4UD.js";const Se=S({connection_id:i().describe("Connection ID"),selected_tools:C(i()).nullable().describe("Selected tool names. null = all tools included, array = only these tools included"),selected_resources:C(i()).nullable().describe("Selected resource URIs or patterns. Supports * and ** wildcards for pattern matching. null = all resources included, array = only these resources included"),selected_prompts:C(i()).nullable().describe("Selected prompt names. null = all prompts included, array = only these prompts included")}),ht=Se.extend({selected_tools:Se.shape.selected_tools.optional(),selected_resources:Se.shape.selected_resources.optional(),selected_prompts:Se.shape.selected_prompts.optional()}),Yt=S({connectionId:i(),toolName:i(),label:i(),icon:i().nullable().optional()}),Jt=S({id:i().describe("Stable id; used as React key and ?tab= value"),title:i().describe("Tab label"),icon:i().optional().describe("Optional lucide icon name"),view:S({type:Ne("ext-app"),appId:i(),args:ke(i(),lt()).optional()})}),en=S({defaultMainView:S({type:i(),id:i().optional(),toolName:i().optional()}).nullable().optional(),chatDefaultOpen:we().nullable().optional(),cmsDefaultOpen:we().nullable().optional(),tabs:C(Jt).optional()}),tt=S({tileId:i().optional(),connectionId:i().optional().describe("Connection that owns the resource — the host opens a direct MCP client to this connection so the iframe can call tools by their bare names."),resourceUri:i().describe("ui:// resource URI exposed by `connectionId`. Read on the home page and rendered via MCPAppRenderer."),toolName:i().optional().describe("Tool name — identifies which tool's inputSchema to display when editing tile props."),toolInput:ke(i(),lt()).optional().describe("User-configured input props passed to MCPAppRenderer when rendering the tile."),minHeight:Me().int().positive().optional(),maxHeight:Me().int().positive().optional()}),He=S({banner:i().nullable().optional(),bannerColor:i().nullable().optional(),icon:i().nullable().optional(),themeColor:i().nullable().optional(),pinnedViews:C(Yt).nullable().optional(),layout:en.nullable().optional(),homeTile:tt.nullable().optional(),homeTiles:C(tt).nullable().optional(),homePrompts:C(i()).nullable().optional()});function ds(t){const e=t?.homeTiles;if(Array.isArray(e)&&e.length>0)return e;const n=t?.homeTile;return n?[n]:[]}const tn=/^[A-Za-z_][A-Za-z0-9_]*$/,nt=i().min(1).regex(tn,{message:"Env var key must start with a letter or underscore and contain only letters, digits, and underscores."}),nn=xt("kind",[S({key:nt,kind:Ne("literal"),value:i()}),S({key:nt,kind:Ne("secret"),secretId:i().min(1)})]),sn=/^[a-zA-Z0-9.-]+(?::[0-9]+)?$/,on=S({host:i().min(1).regex(sn).describe("Submodule host, e.g. 'github.com' (bare hostname, no scheme)."),secretId:i().min(1).describe("Vault secret id holding the PAT used to fetch this host.")}),Be=S({selected:i().nullable().optional().describe("User-selected package manager (npm | pnpm | yarn | bun | deno). Null/absent means autodetect on next SANDBOX_START."),port:i().nullable().optional().describe("User-selected dev server port as a string (allows '' / null for unset). Null/absent means autodetect."),path:i().nullable().optional().describe("Optional path (relative to repo root) to the directory containing package.json. Null/absent means repo root. Forwarded as `application.packageManager.path` to the daemon config."),env:C(nn).nullable().optional().describe("Env vars injected on every SANDBOX_START. Literal entries inline their value; secret entries store a secretId that Studio resolves via the credential vault before posting /_sandbox/config."),submoduleCredentials:C(on).nullable().optional().describe("Git submodule credentials injected on every SANDBOX_START. Each entry maps a host to a vault secret (PAT) that Studio resolves before posting /_sandbox/config; the daemon uses it to authenticate `git submodule update` for submodules on that host.")}),Ke=S({url:i().describe("GitHub repository URL"),owner:i().describe("Repository owner"),name:i().describe("Repository name"),installationId:Me().optional().describe("GitHub App installation ID. Absent when the repo was linked without a GitHub connection (public-clone mode)."),connectionId:i().optional().describe("ID of the mcp-github connection used for authentication. Absent for public repos cloned without credentials.")}),an=de(["agent-sandbox","user-desktop"]),rn=de(["agent-sandbox","user-desktop","cluster"]);function Qe(t){return t==="cluster"?"agent-sandbox":t}const mt={sandboxHandle:i().describe("Provider-specific handle"),previewUrl:i().nullable().describe("URL where the sandbox's iframe-proxied UI is served, or null when the sandbox has no dev server (blank / tool sandboxes)."),sandboxApiUrl:i().nullable().optional().describe("Daemon's public URL — what cluster→daemon RPCs target. Equal to previewUrl for user-desktop; null/absent for the agent-sandbox provider (routes through hosted ingress)."),sandboxProviderKind:an.optional(),createdAt:Me().optional().describe("Epoch ms the entry was first written by SANDBOX_START. Used by the booting overlay to show a stable elapsed timer that survives browser reloads. Optional for backward compatibility with entries written before this field existed."),startedWith:S({packageManager:i().nullable().optional().describe("metadata.runtime.selected at the time of SANDBOX_START"),port:i().nullable().optional().describe("metadata.runtime.port at the time of SANDBOX_START"),path:i().nullable().optional().describe("metadata.runtime.path at the time of SANDBOX_START")}).optional().describe("Snapshot of metadata.runtime fields (selected/port/path) used at SANDBOX_START. The Preview tab compares the live metadata.runtime against this to decide if a restart is required to apply changes.")},ft=S(mt),ln=S({...mt,sandboxProviderKind:rn.optional()});function cn(t){const e=ln.parse(t);return ft.parse({...e,sandboxProviderKind:e.sandboxProviderKind?Qe(e.sandboxProviderKind):void 0})}function us(t){if(!t||typeof t!="object"||Array.isArray(t))return{};const e=t,n={};for(const[s,o]of Object.entries(e)){if(!o||typeof o!="object"||s!=="cluster"&&s!=="agent-sandbox"&&s!=="user-desktop")continue;const a=Qe(s);try{if(s==="cluster"&&n[a])continue;n[a]=cn(o)}catch{}}return n}const We=ke(i().describe("userId"),ke(i().describe("branch"),ke(i().describe("sandboxProviderKind"),ft))),dn=S({id:i().describe("Stable identifier for this knowledge file"),name:i().describe("File name shown in the UI"),kind:de(["file","skill"]).optional().describe("'file' (a single document) or 'skill' (a Claude Code skill folder containing SKILL.md). Defaults to 'file'."),volume:i().describe("Org filesystem (Library) volume the file lives in"),path:i().describe("Path within the volume"),url:i().describe("Same-origin URL to read the file (display/download)"),contentType:i().nullable().optional().describe("MIME type, used to decide whether to inline the content"),size:Me().nullable().optional().describe("File size in bytes"),addedAt:i().describe("ISO timestamp when the file was attached")}),Ge=C(dn).nullable().optional().describe("Files attached to the agent as reference knowledge. Surfaced in the system prompt: small text documents are inlined, others are listed as retrievable references."),un=de(["smart","code-review","open"]),ze=un.nullable().optional().describe("Controls when this code agent's changes may be published directly vs. requiring PR review. 'smart' (default) uses AI to judge per change; 'code-review' requires review for any code; 'open' allows direct publish always."),ps=S({id:i().describe("Unique identifier"),title:i().describe("Human-readable name"),description:i().nullable().describe("Description"),icon:i().nullable().describe("Icon URL"),created_at:i().describe("Creation timestamp"),updated_at:i().describe("Last update timestamp"),created_by:i().describe("User ID who created this item"),updated_by:i().optional().describe("User ID who last updated this item"),organization_id:i().describe("Organization ID this item belongs to"),status:de(["active","inactive"]).describe("Current status"),pinned:we().describe("Whether this space is pinned to the sidebar"),metadata:S({instructions:i().nullable().describe("Instructions also used as system prompt"),enabled_plugins:C(i()).nullable().optional().describe("List of enabled plugin IDs"),subAgents:C(i()).nullable().optional().describe("Allowlist of Virtual MCP (agent) or concrete MCP connection IDs this agent may delegate to via subtask. Concrete connections create ephemeral subagents. null/absent = all active org targets; empty array = itself only."),liveAgentId:i().nullable().optional().describe("ID of the live agent this (dev) agent develops. Set only on dev agents; powers the Develop/Live toggle. A dev agent is hidden from the sidebar (reached via the toggle on its live counterpart)."),ui:He.nullable().optional().describe("UI customization settings"),githubRepo:Ke.nullable().optional().describe("Linked GitHub repository"),runtime:Be.nullable().optional().describe("User-pinned runtime config (package manager, dev port). Empty fields = autodetect."),sandboxMap:We.optional().describe("Per-user, per-branch sandbox mapping: sandboxMap[userId][branch] -> { sandboxHandle, previewUrl }"),knowledge:Ge,siteSlug:i().nullable().optional().describe("Linked asset site slug (managed storage tenancy)"),publishPolicy:ze,productionUrl:i().nullable().optional().describe("Live production URL of the linked site (e.g. https://acme.com). Painted in the preview iframe while the sandbox dev server is waking.")}).loose().describe("Metadata"),connections:C(Se).describe("Connections with their selected tools, resources, and prompts")}),bt=S({title:i().min(1).max(120).describe("Short label shown on the chip"),description:i().max(280).optional().describe("One-line subtitle shown under the title"),text:i().min(1).describe("The message sent to the agent when the prompt is clicked")});S({title:i().min(1).max(255).describe("Name for the virtual MCP"),description:i().nullable().optional().describe("Optional description"),icon:i().nullish().describe("Optional icon URL"),status:de(["active","inactive"]).optional().default("active").describe("Initial status"),pinned:we().optional().default(!1).describe("Pin to sidebar"),metadata:S({instructions:i().nullable().optional().describe("MCP server instructions"),enabled_plugins:C(i()).nullable().optional().describe("List of enabled plugin IDs"),subAgents:C(i()).nullable().optional().describe("Allowlist of Virtual MCP (agent) or concrete MCP connection IDs this agent may delegate to via subtask. Concrete connections create ephemeral subagents. null/absent = all active org targets; empty array = itself only."),liveAgentId:i().nullable().optional().describe("ID of the live agent this (dev) agent develops. Set only on dev agents; powers the Develop/Live toggle. A dev agent is hidden from the sidebar (reached via the toggle on its live counterpart)."),ui:He.nullable().optional().describe("UI customization settings"),githubRepo:Ke.nullable().optional().describe("Linked GitHub repository"),runtime:Be.nullable().optional().describe("User-pinned runtime config (package manager, dev port). Empty fields = autodetect."),sandboxMap:We.optional().describe("Per-user, per-branch sandbox mapping: sandboxMap[userId][branch] -> { sandboxHandle, previewUrl }"),knowledge:Ge,siteSlug:i().nullable().optional().describe("Linked asset site slug (managed storage tenancy)"),publishPolicy:ze,productionUrl:i().nullable().optional().describe("Live production URL of the linked site (e.g. https://acme.com). Painted in the preview iframe while the sandbox dev server is waking.")}).loose().nullable().optional().describe("Additional metadata including MCP server instructions"),connections:C(ht).describe("Connections to include/exclude (can be empty for exclusion mode)"),prompts:C(bt).optional().describe("Optional kickstart prompts to seed on the agent. Each becomes a clickable conversation starter (icebreaker) on the agent. Author them from the agent's role and the tools it will have so they're coherent and immediately useful.")});S({title:i().min(1).max(255).optional().describe("New name"),description:i().nullable().optional().describe("New description (null to clear)"),icon:i().nullish().describe("New icon URL"),status:de(["active","inactive"]).optional().describe("New status"),pinned:we().optional().describe("Pin/unpin from sidebar"),metadata:S({instructions:i().nullable().optional().describe("MCP server instructions"),enabled_plugins:C(i()).nullable().optional().describe("List of enabled plugin IDs"),subAgents:C(i()).nullable().optional().describe("Allowlist of Virtual MCP (agent) or concrete MCP connection IDs this agent may delegate to via subtask. Concrete connections create ephemeral subagents. null/absent = all active org targets; empty array = itself only."),liveAgentId:i().nullable().optional().describe("ID of the live agent this (dev) agent develops. Set only on dev agents; powers the Develop/Live toggle. A dev agent is hidden from the sidebar (reached via the toggle on its live counterpart)."),ui:He.nullable().optional().describe("UI customization settings"),githubRepo:Ke.nullable().optional().describe("Linked GitHub repository"),runtime:Be.nullable().optional().describe("User-pinned runtime config (package manager, dev port). Empty fields = autodetect."),sandboxMap:We.optional().describe("Per-user, per-branch sandbox mapping: sandboxMap[userId][branch] -> { sandboxHandle, previewUrl }"),knowledge:Ge,siteSlug:i().nullable().optional().describe("Linked asset site slug (managed storage tenancy)"),publishPolicy:ze,productionUrl:i().nullable().optional().describe("Live production URL of the linked site (e.g. https://acme.com). Painted in the preview iframe while the sandbox dev server is waking.")}).loose().nullable().optional().describe("Additional metadata including MCP server instructions"),connections:C(ht).optional().describe("New connections (replaces existing)"),prompts:C(bt).optional().describe("Replace the agent's kickstart prompts with this full set. Omit to leave them unchanged; pass an empty array to remove all. Each becomes a clickable conversation starter (icebreaker).")});function pn(t,e=[]){return t==="stop"?"completed":t==="tool-calls"?e.some(s=>s.type==="tool-user_ask"&&s.state==="input-available"||s.state==="approval-requested")?"requires_action":"completed":"failed"}const Fe={decopilot:{harness:"decopilot",sandbox:"agent-sandbox"},"claude-code-desktop":{harness:"claude-code",sandbox:"user-desktop"},"codex-desktop":{harness:"codex",sandbox:"user-desktop"},"opencode-desktop":{harness:"opencode",sandbox:"user-desktop"}};function hn(t,e){if(!t)return null;const n=e?Qe(e):null;if(t==="decopilot"&&(n===null||n==="user-desktop"))return"decopilot";for(const[s,o]of Object.entries(Fe))if(o.harness===t&&o.sandbox===n)return s;return null}function mn({pendingOption:t,lockedHarness:e}){return e==="claude-code"?"claude-code-desktop":e==="codex"?"codex-desktop":e==="opencode"?"opencode-desktop":t==="claude-code-desktop"||t==="codex-desktop"||t==="opencode-desktop"?t:null}function fn(t){return t.thread?.harness_id!=null?{}:{harnessId:"decopilot",sandboxProviderKind:"agent-sandbox",branch:t.globals.branch??null}}function bn({isDesktopApp:t,harnessId:e,sandboxProviderKind:n}){return e!=null&&e!=="decopilot"?!0:n==null||n==="agent-sandbox"?!1:!(e==="decopilot"&&n==="user-desktop")}const gn="home",yn=new Set(["output","upload","public","home"]),vn=/^[A-Za-z0-9][A-Za-z0-9._-]*$/;function hs(t){return yn.has(t)||!vn.test(t)?"home":t}function Sn(t){const e=t?t.split("/").filter(Boolean):[],n=e[0]==="public",s=n?e[1]??null:null,o=n?s?`public-${s}`:null:e[0]??null,a=(n?e.slice(2):e.slice(1)).join("/");return{segments:e,volume:o,dirPath:a,isPublic:n,publicSet:s,readOnly:n,isHomeRoot:o===gn&&a===""}}function ms(t){return t==="public"?"skills":t}function fs(t,e){return t.isPublic&&t.publicSet?`public/${t.publicSet}/${e}`:t.volume?`${t.volume}/${e}`:e}const st="public-";function gt(t){return t.startsWith(st)?t.slice(st.length):null}function bs(t,e){const n=gt(t);return n?`public/${n}/${e}`:`${t}/${e}`}function kn(t){const e=t.lastIndexOf("/");return e===-1?t:t.slice(e+1)}function xn(t){const{volume:e,dirPath:n}=Sn(t);if(!e)return null;let s;if(e==="home")s="org/home";else if(e==="outputs")s="org/.outputs";else if(e==="uploads")s="org/.uploads";else{const o=gt(e);s=o?`org/public/${o}`:`org/${e}`}return n?`${s}/${n}`:s}function In(t){const e=ae.c(21);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId",shouldThrow:!1},e[0]=n):n=e[0];const s=ct(n);let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},e[1]=o):o=e[1];const a=je(o);let l;e[2]!==a.brand||e[3]!==a.main||e[4]!==a.preview||e[5]!==a.skill?(l=(typeof a.main=="string"?_t(a.main)?.path:void 0)??a.preview??a.skill??a.brand??null,e[2]=a.brand,e[3]=a.main,e[4]=a.preview,e[5]=a.skill,e[6]=l):l=e[6];const c=l;let h;if(e[7]!==s?.params.appSlug||e[8]!==s?.params.collectionName||e[9]!==s?.params.itemId||e[10]!==c||e[11]!==t){if(h=[],t&&h.push(`### Selected Agent
|
|
2
2
|
- ID: ${t}`),c){let f;e[13]!==c?(f=xn(c),e[13]=c,e[14]=f):f=e[14];const k=f;let M;e[15]!==c?(M=kn(c),e[15]=c,e[16]=M):M=e[16],h.push(`### Currently Open File
|
|
3
3
|
The user has this file open in the Library and is most likely referring to it:
|
|
4
4
|
- Name: ${M}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as n,m as d,j as c,bE as l,bF as m}from"./index-
|
|
1
|
+
import{c as n,m as d,j as c,bE as l,bF as m}from"./index-CsMY3E0n.js";import{i as b}from"./Check-CKtI4hGn.js";function u(o){const e=n.c(9);let r,i;e[0]!==o?({className:r,...i}=o,e[0]=o,e[1]=r,e[2]=i):(r=e[1],i=e[2]);let a;e[3]!==r?(a=d("peer border-foreground dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-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 size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[2px] disabled:opacity-50",r),e[3]=r,e[4]=a):a=e[4];let t;e[5]===Symbol.for("react.memo_cache_sentinel")?(t=c.jsx(m,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-primary-foreground transition-none",children:c.jsx(b,{className:"size-3.5"})}),e[5]=t):t=e[5];let s;return e[6]!==i||e[7]!==a?(s=c.jsx(l,{"data-slot":"checkbox",className:a,...i,children:t}),e[6]=i,e[7]=a,e[8]=s):s=e[8],s}export{u as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a,a as c,r as m,j as o}from"./index-
|
|
1
|
+
import{c as a,a as c,r as m,j as o}from"./index-CsMY3E0n.js";import{A as u}from"./auth-split-layout-CjrJN_23.js";function p(){const e=a.c(8),i=c.useSession().data?.user?.email;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=[],e[0]=l):l=e[0],m.useEffect(f,l);let t;e[1]!==i?(t=i?o.jsxs(o.Fragment,{children:[" as ",i]}):"",e[1]=i,e[2]=t):t=e[2];let s;e[3]!==t?(s=o.jsxs("h1",{className:"text-3xl font-semibold tracking-tight",children:["You're logged in",t,"."]}),e[3]=t,e[4]=s):s=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("p",{className:"text-muted-foreground",children:"You can return to your terminal."}),e[5]=n):n=e[5];let r;return e[6]!==s?(r=o.jsx(u,{children:o.jsxs("div",{className:"space-y-3",children:[s,n]})}),e[6]=s,e[7]=r):r=e[7],r}function f(){window.close()}export{p as default};
|