decocms 4.81.2 → 4.82.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-DU6qWK9T.js → AlertCircle-DG4a-YPJ.js} +1 -1
- package/dist/client/assets/{AreaChart-BX2a1Rtg.js → AreaChart-BJOksRko.js} +1 -1
- package/dist/client/assets/{ArrowUp-DYmWx-L-.js → ArrowUp-CY3oZMDN.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-DmbxJntq.js → ArrowUpRight-BYqJ_odf.js} +1 -1
- package/dist/client/assets/{Check-B1SirwZu.js → Check-ChISHbfh.js} +1 -1
- package/dist/client/assets/{CheckCircle-DlnXCgUt.js → CheckCircle-CfG0TsZ1.js} +1 -1
- package/dist/client/assets/{ChevronDown-XW3mndxm.js → ChevronDown-Bbe4LEpG.js} +1 -1
- package/dist/client/assets/{ChevronRight-CMxF_EMm.js → ChevronRight-CvFLMLSs.js} +1 -1
- package/dist/client/assets/{ChevronUp-CBA75LiO.js → ChevronUp-CG-5lkz8.js} +1 -1
- package/dist/client/assets/{Circle-HACtkegN.js → Circle-WWMwGxik.js} +1 -1
- package/dist/client/assets/{Copy01-DvYXKq8Z.js → Copy01-ChDVmiye.js} +1 -1
- package/dist/client/assets/{DotsVertical-Bk2adjcS.js → DotsVertical-CNYSgMU1.js} +1 -1
- package/dist/client/assets/{Eye-CikrhNcF.js → Eye-BpNdlDWP.js} +1 -1
- package/dist/client/assets/{FilterLines-CKkJTX1P.js → FilterLines-cseXnN6n.js} +1 -1
- package/dist/client/assets/{Flag01-BiiEWwXG.js → Flag01-rPnNU1v-.js} +1 -1
- package/dist/client/assets/{Globe01-BPvkaID5.js → Globe01-DYMLCnX6.js} +1 -1
- package/dist/client/assets/{Globe04-BLOGIunc.js → Globe04-DMc415uO.js} +1 -1
- package/dist/client/assets/{HardDrive-BBQgAxPW.js → HardDrive-Dc7WUQMC.js} +1 -1
- package/dist/client/assets/{Image01-BxR0qJ9h.js → Image01-4bzNBeP8.js} +1 -1
- package/dist/client/assets/{Key01-CSjfIfTE.js → Key01-BGutOYpw.js} +1 -1
- package/dist/client/assets/{LayoutLeft-vGwalVIw.js → LayoutLeft-Chn2g8D1.js} +1 -1
- package/dist/client/assets/{LinkExternal01-BapUlNlT.js → LinkExternal01-C3ixLwyv.js} +1 -1
- package/dist/client/assets/{List-D4fyC4RM.js → List-Cb6GXNpI.js} +1 -1
- package/dist/client/assets/{Monitor01-gh3GDPr8.js → Monitor01-DlZ0h2Cv.js} +1 -1
- package/dist/client/assets/{Package-BXkFeDMT.js → Package-D5pkJnJd.js} +1 -1
- package/dist/client/assets/{Palette-DvrEWWT4.js → Palette-LHyI2Mdb.js} +1 -1
- package/dist/client/assets/{Play-D6amoQin.js → Play-Dca6um-D.js} +1 -1
- package/dist/client/assets/{Plus-Bz7loY4f.js → Plus-C4WTG9Kp.js} +1 -1
- package/dist/client/assets/{SearchLg-DvTulfGj.js → SearchLg-CyYHECU6.js} +1 -1
- package/dist/client/assets/{SearchMd-LCBR2m3m.js → SearchMd-BKcd0fB6.js} +1 -1
- package/dist/client/assets/{Settings02-B51ZDizH.js → Settings02-BojRVJl-.js} +1 -1
- package/dist/client/assets/{Shield01-CfKQ60er.js → Shield01-abTM_9f7.js} +1 -1
- package/dist/client/assets/{Star01-BrCcPuVF.js → Star01-BH1rvlEO.js} +1 -1
- package/dist/client/assets/{Stars01-CAjraTXl.js → Stars01-DFT0n9O7.js} +1 -1
- package/dist/client/assets/{Stars02-BjTmIaMZ.js → Stars02-B-LWJdG7.js} +1 -1
- package/dist/client/assets/{Sun-DWrRa3yX.js → Sun-c6JSAmBQ.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-BLcjEnbu.js → SwitchHorizontal01-CL9u8gys.js} +1 -1
- package/dist/client/assets/{Tool01-cmPVPWfy.js → Tool01-DcHeaUVL.js} +1 -1
- package/dist/client/assets/{Tool02-B26tsl4g.js → Tool02-CITs9l5E.js} +1 -1
- package/dist/client/assets/{Trash01-CL-hhLHz.js → Trash01-_2UtyZ3i.js} +1 -1
- package/dist/client/assets/{TrendUp01-ZVidFF-q.js → TrendUp01-Ds4Xp_Ie.js} +1 -1
- package/dist/client/assets/{Upload01-vsvHLvaA.js → Upload01-BRK5C5r6.js} +1 -1
- package/dist/client/assets/{User01-DPvuGxxC.js → User01-CU8XbMY2.js} +1 -1
- package/dist/client/assets/UserPlus01-BYCDJ1qH.js +1 -0
- package/dist/client/assets/{Users01-DAkYa73h.js → Users01-DvbIEeSV.js} +1 -1
- package/dist/client/assets/{Users03-dXp1ufdN.js → Users03-Cttn4hE2.js} +1 -1
- package/dist/client/assets/{X-nh-lAoJ9.js → X-DQ-S1g4-.js} +1 -1
- package/dist/client/assets/{XCircle-BGAsxFPn.js → XCircle-D994HWfT.js} +1 -1
- package/dist/client/assets/{XClose-CSyFLxIV.js → XClose-BiShBa_h.js} +1 -1
- package/dist/client/assets/{Zap-Di08z3mI.js → Zap-DHi1Rc1o.js} +1 -1
- package/dist/client/assets/{ZapSquare-ChpA6sdD.js → ZapSquare-OWnxdaqo.js} +1 -1
- package/dist/client/assets/{ZoomOut-Bw94mtVG.js → ZoomOut-CDmvqBAB.js} +1 -1
- package/dist/client/assets/{access-gate-CrLLz-yL.js → access-gate-CK3VnyOP.js} +1 -1
- package/dist/client/assets/{add-section-modal-BBh5-rgO.js → add-section-modal-DxseLf10.js} +1 -1
- package/dist/client/assets/agent-icon-ydo5jgpp.js +1 -0
- package/dist/client/assets/{agents-list-BFe2ryV7.js → agents-list-CosPoQ08.js} +1 -1
- package/dist/client/assets/{ai-providers-BM1lVkZu.js → ai-providers-CSPy81Zd.js} +1 -1
- package/dist/client/assets/{alert-DZjqlIoS.js → alert-3o7FhARD.js} +1 -1
- package/dist/client/assets/{alert-dialog-n6V7r3dX.js → alert-dialog-D_YtJjUs.js} +1 -1
- package/dist/client/assets/{app-editor-BCzWBSCz.js → app-editor-C-dJlVZe.js} +1 -1
- package/dist/client/assets/{auth-BiUmtjwE.js → auth-B1xyLxRH.js} +1 -1
- package/dist/client/assets/{auth-catchall-CCvesDsm.js → auth-catchall-CpQBQm_2.js} +1 -1
- package/dist/client/assets/{auth-entry-CO3BGHHT.js → auth-entry--O_MGURm.js} +1 -1
- package/dist/client/assets/{auth-split-layout-C1oeyfdQ.js → auth-split-layout-BTlIqYu6.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-BVokl0ja.js → authenticate-and-persist-oauth-Bt4_puMP.js} +1 -1
- package/dist/client/assets/{automation-list-row-D_PKR44H.js → automation-list-row-Bc0NECF5.js} +1 -1
- package/dist/client/assets/{automation-runs-B3MRH4Ue.js → automation-runs-Cq0dWJA-.js} +1 -1
- package/dist/client/assets/automations-CK8nCCYB.js +1 -0
- package/dist/client/assets/{autosend-CXJZF5Z0.js → autosend-BdDL9PqC.js} +1 -1
- package/dist/client/assets/{avatar-CjaRl_73.js → avatar-e-7iWxAV.js} +1 -1
- package/dist/client/assets/{badge-Bgeg2fRu.js → badge-CKZToSag.js} +1 -1
- package/dist/client/assets/{block-document-_pMFHiYF.js → block-document-MxZBmSF2.js} +2 -2
- package/dist/client/assets/{brand-context-Bi72USxh.js → brand-context-QBNHO2k_.js} +1 -1
- package/dist/client/assets/{buckets-CdfoFreA.js → buckets-BRORe0L_.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-C0mBaEOS.js → bulk-category-panel-gFz9ZGsT.js} +1 -1
- package/dist/client/assets/{calendar-BWkFk64D.js → calendar-CqQhqjiW.js} +1 -1
- package/dist/client/assets/{capability-load-error-Ce_wOXia.js → capability-load-error-DPvQzY3V.js} +1 -1
- package/dist/client/assets/{card-X8PevBIr.js → card-BR1-VnZL.js} +1 -1
- package/dist/client/assets/category-editor-BAE3E2Td.js +1 -0
- package/dist/client/assets/{chat-context-Dk_Lat8F.js → chat-context-C_0NQZnu.js} +1 -1
- package/dist/client/assets/{checkbox-_0aEsmsd.js → checkbox-C_bqZEJS.js} +1 -1
- package/dist/client/assets/{cli-auth-success-Cng7kHAN.js → cli-auth-success-C7gWZcs0.js} +1 -1
- package/dist/client/assets/{collection-detail-BSXBusUs.js → collection-detail-oYbSlT56.js} +1 -1
- package/dist/client/assets/{collection-display-button-GDt3-KE2.js → collection-display-button-BpbkWssa.js} +1 -1
- package/dist/client/assets/{collection-search-C5ZBxcYE.js → collection-search-DGV2A8CZ.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CsFDZ-oD.js → collection-table-wrapper-Depv6BU6.js} +1 -1
- package/dist/client/assets/{collection-tabs-BLo9632I.js → collection-tabs-BvOI_2-G.js} +1 -1
- package/dist/client/assets/{command-DMYAZJ4K.js → command-BrpyzanT.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-BKfuEAwm.js → commerce-onboarding-BGMDnh8R.js} +1 -1
- package/dist/client/assets/{companions-core-gEXsFjyG.js → companions-core-B8rS9LMp.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-Dxqz10c5.js → connect-desktop-dialog-DTJycKOS.js} +1 -1
- package/dist/client/assets/{connection-card-itgnn1o8.js → connection-card-b4gOoJpq.js} +1 -1
- package/dist/client/assets/{connection-detail-D8POxKuW.js → connection-detail-n02-Fumo.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-BLfFowmr.js → connection-form-helpers-DC6AoNcw.js} +1 -1
- package/dist/client/assets/{connections-fXI70Tj4.js → connections-C7uc7kdo.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-iUHbQN32.js → decopilot-sse-pool-Bc1zPkcw.js} +1 -1
- package/dist/client/assets/{dialog-DSMMHp7k.js → dialog-D-FV4Zb0.js} +1 -1
- package/dist/client/assets/{domain-settings-CrH1Ztmo.js → domain-settings-CeLZjBnU.js} +1 -1
- package/dist/client/assets/{drawer-DVZ6LfPY.js → drawer-C1bC-kLm.js} +1 -1
- package/dist/client/assets/{dropdown-menu-C25KxtxJ.js → dropdown-menu-DU7Il0vV.js} +1 -1
- package/dist/client/assets/{empty-state-BRubSasg.js → empty-state-C0HMrPFH.js} +1 -1
- package/dist/client/assets/{extract-connection-data-BM6vnnLN.js → extract-connection-data-BcTaSfYq.js} +1 -1
- package/dist/client/assets/{file-explorer-Bjem1H-N.js → file-explorer-C2MyW3q_.js} +2 -2
- package/dist/client/assets/{file-type-icon-5IRBmGyW.js → file-type-icon-CWZqRYUk.js} +3 -3
- package/dist/client/assets/{files-DljQiShy.js → files-DrALHp6L.js} +1 -1
- package/dist/client/assets/{form-v_v0yrL_.js → form-CrzvXOa7.js} +1 -1
- package/dist/client/assets/{general-CCFcm1Qv.js → general-BnmXxCbB.js} +1 -1
- package/dist/client/assets/{github-repo-picker-XYJ5PlsS.js → github-repo-picker-Bs9HleTv.js} +1 -1
- package/dist/client/assets/{hooks-D2zwv91o.js → hooks-Cpz2-QJF.js} +1 -1
- package/dist/client/assets/{index-CtAI_Tcv.js → index-5anpKa-I.js} +3 -3
- package/dist/client/assets/{index-E1YY2L0V.js → index-Be0F7lEu.js} +1 -1
- package/dist/client/assets/index-Bnuq7-6r.js +4 -0
- package/dist/client/assets/{index-DCkGXUo7.js → index-CAXd9cV5.js} +1 -1
- package/dist/client/assets/{index-CbKtPPYD.js → index-CM6PlRVB.js} +1 -1
- package/dist/client/assets/{index-C9N_dWzA.js → index-CSEmxRjl.js} +1 -1
- package/dist/client/assets/{index-CXwn5wJs.js → index-CUDGsjpT.js} +1 -1
- package/dist/client/assets/{index-CK-_Svsz.js → index-C_1FDPkV.js} +1 -1
- package/dist/client/assets/{index-B0jR2vR4.js → index-Ce4Ki9vT.js} +1 -1
- package/dist/client/assets/{index-CEIVV-eX.js → index-Cn9_zZs1.js} +27 -27
- package/dist/client/assets/{index-D_aEBgoO.js → index-D8l8P2_T.js} +1 -1
- package/dist/client/assets/{index-don4pY8a.js → index-DEBreNlD.js} +1 -1
- package/dist/client/assets/{index-CW-frCvB.js → index-DHUcQ3Zc.js} +12 -12
- package/dist/client/assets/{index-Bv2X_RsF.js → index-D_Ke4qVo.js} +1 -1
- package/dist/client/assets/{index-redirect-DWsiHE_H.js → index-redirect-DbE0vYCc.js} +1 -1
- package/dist/client/assets/{input-Bh6jfBSY.js → input-CD4iLUlU.js} +1 -1
- package/dist/client/assets/{integration-icon-COnO4G_g.js → integration-icon-lunUJ8Ws.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-D6xpR-Qy.js → invite-member-dialog-D5mXwauc.js} +1 -1
- package/dist/client/assets/{label-0VMJq-Lb.js → label-64NHGLB9.js} +1 -1
- package/dist/client/assets/{layout-CzNN-LbN.js → layout-VaJn51IJ.js} +1 -1
- package/dist/client/assets/{login-r--GMbC0.js → login-BeOZYVC0.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CTMtegDM.js → mcp-oauth-C6WZv_ih.js} +1 -1
- package/dist/client/assets/{members-Y8qsAhwm.js → members-B1pSeDyc.js} +1 -1
- package/dist/client/assets/{monaco-editor-AmLAOARt.js → monaco-editor-BiBep5KI.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-D2OiWqgN.js → monitoring-stats-row-YDuotwG7.js} +1 -1
- package/dist/client/assets/{multi-select-CECHHZ2Q.js → multi-select-DzAx0o10.js} +1 -1
- package/dist/client/assets/{oauth-callback-Dim9aq-a.js → oauth-callback-DzyvCiRg.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-Wt7pRmmv.js → oauth-callback-ai-provider-tQQH9dij.js} +1 -1
- package/dist/client/assets/{onboarding-BKUilEh5.js → onboarding-DLi3hzM4.js} +1 -1
- package/dist/client/assets/{org-install-EaOEXvIc.js → org-install-Pqgmj8FY.js} +1 -1
- package/dist/client/assets/{org-layout-CkAZlUK_.js → org-layout-BqTSwDt4.js} +1 -1
- package/dist/client/assets/{organization-choice-BDpNe-kr.js → organization-choice-CuegwoX1.js} +1 -1
- package/dist/client/assets/{orgs-BBPF2dvP.js → orgs-WoKnQgDC.js} +1 -1
- package/dist/client/assets/{page-seo-form-BLchAW2-.js → page-seo-form-CLVrDlQB.js} +1 -1
- package/dist/client/assets/page-seo-sheet-CzvbgQA7.js +1 -0
- package/dist/client/assets/{popover-CStICzGk.js → popover-jkzPowft.js} +1 -1
- package/dist/client/assets/{post-editor-kLIsDRl5.js → post-editor-BCUZ6h21.js} +1 -1
- package/dist/client/assets/{primitives-Cy4duky0.js → primitives-CH6E3z24.js} +1 -1
- package/dist/client/assets/{profile-DjYxdZ1v.js → profile-CFLyWsOl.js} +1 -1
- package/dist/client/assets/project-app-view-xoHNcd4l.js +1 -0
- package/dist/client/assets/record-editor-9SEM1afd.js +1 -0
- package/dist/client/assets/redirect-editor-BZFlJqgy.js +1 -0
- package/dist/client/assets/registry-DgDPfJ3f.js +2 -0
- package/dist/client/assets/{registry-layout-T7XwrR9-.js → registry-layout-BZQsfAMD.js} +1 -1
- package/dist/client/assets/{reports-Cli9K1Os.js → reports-FN29XmCC.js} +1 -1
- package/dist/client/assets/{require-capability-vQhT2fzw.js → require-capability-ByUm4jHt.js} +1 -1
- package/dist/client/assets/{required-auth-layout-u-LZwScR.js → required-auth-layout-BgZLxCUt.js} +1 -1
- package/dist/client/assets/{reset-password-DU77F14W.js → reset-password-BVer2zil.js} +1 -1
- package/dist/client/assets/{roles-UarmzT95.js → roles-C5kTYCzJ.js} +1 -1
- package/dist/client/assets/{search-input-D3ST0qhK.js → search-input-Dm12yYY_.js} +1 -1
- package/dist/client/assets/{secrets-CnMya7Aa.js → secrets-DM-TwM9g.js} +1 -1
- package/dist/client/assets/{sections-editor-VJungP8L.js → sections-editor-DEkdeycB.js} +2 -2
- package/dist/client/assets/{select-x3JQ-RMK.js → select-C8J1x9Hh.js} +1 -1
- package/dist/client/assets/{select-model-XJdXc61b.js → select-model-BVeWMw1Y.js} +1 -1
- package/dist/client/assets/{self-tool-result-DjEGnrMB.js → self-tool-result-BTeHqlVt.js} +1 -1
- package/dist/client/assets/{seo-editor-VDc1kVOl.js → seo-editor-QW1zZx-2.js} +1 -1
- package/dist/client/assets/{settings-layout-DM49EMy5.js → settings-layout-LWHpkrS1.js} +1 -1
- package/dist/client/assets/{settings-section-rDf583ia.js → settings-section-D0EkW6Kl.js} +1 -1
- package/dist/client/assets/{shell-controls-YRxMt7Ep.js → shell-controls-C9VF1AuK.js} +1 -1
- package/dist/client/assets/{shell-layout-F5G52jTC.js → shell-layout-DXe7SFEe.js} +1 -1
- package/dist/client/assets/{sidebar-BKNPuVLe.js → sidebar-DDv6Q6Vr.js} +1 -1
- package/dist/client/assets/{skeleton-6SB_9DNZ.js → skeleton-btiu0WVx.js} +1 -1
- package/dist/client/assets/{sso-zrdH8Br4.js → sso-Bn2P_vs9.js} +1 -1
- package/dist/client/assets/{store-C083vtgL.js → store-ClNAV2y4.js} +1 -1
- package/dist/client/assets/store-registry-LHS4MChI.js +2 -0
- package/dist/client/assets/{studio-tools-Dh5WF9Xa.js → studio-tools-oG5STvP8.js} +1 -1
- package/dist/client/assets/{switch-Dof4h0cK.js → switch-D6jizfdP.js} +1 -1
- package/dist/client/assets/{table-BMAClQxa.js → table-Bphxy4QJ.js} +1 -1
- package/dist/client/assets/{tabs-kA2W3Sac.js → tabs-ClmHxPtb.js} +1 -1
- package/dist/client/assets/{textarea-C_jCSzCx.js → textarea-DOeMxqmL.js} +1 -1
- package/dist/client/assets/{toggle-group-CyCl4f6n.js → toggle-group-QBrPkArv.js} +1 -1
- package/dist/client/assets/{toolbar-BWE-_zyA.js → toolbar-B0RrtA9Q.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-Kwfu3goF.js → toolbar-icon-button-BsOO9_t9.js} +1 -1
- package/dist/client/assets/{tooltip-2HPu4RGb.js → tooltip-C_kxGPbz.js} +1 -1
- package/dist/client/assets/{use-ai-providers-Blpgxebg.js → use-ai-providers-DxiHGIDE.js} +1 -1
- package/dist/client/assets/{use-automations-Bt3dZ-M9.js → use-automations-DmCHkQYX.js} +1 -1
- package/dist/client/assets/{use-autosave-C6muYSz0.js → use-autosave-B0C7kmP9.js} +1 -1
- package/dist/client/assets/{use-capability-BQHuJWJr.js → use-capability-DLDYZAr8.js} +1 -1
- package/dist/client/assets/{use-clock-tick-BMPCELUk.js → use-clock-tick-D0xcXU6l.js} +1 -1
- package/dist/client/assets/{use-collections-C1J3GQpR.js → use-collections-Cy2lyjQw.js} +1 -1
- package/dist/client/assets/{use-connection-NmR6dvUm.js → use-connection-D17m_MYi.js} +1 -1
- package/dist/client/assets/{use-copy-NStrWZLh.js → use-copy-BPpad-V6.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-qIpQsEnE.js → use-create-virtual-mcp-XrULMqna.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-CGIXl8u6.js → use-debounced-autosave-9-Lkd_Ut.js} +1 -1
- package/dist/client/assets/{use-debounced-value-DqlOqEus.js → use-debounced-value-DNgqvjTz.js} +1 -1
- package/dist/client/assets/{use-deco-credits-CVLKWJIA.js → use-deco-credits-B2YuBk4X.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-Bc8oHEVV.js → use-decopilot-events-BcuOI-ix.js} +1 -1
- package/dist/client/assets/{use-delete-connection-Cqubh5me.js → use-delete-connection-lihZcOO9.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-BCJqypmY.js → use-deployment-admin-DmEA-Es_.js} +1 -1
- package/dist/client/assets/{use-file-configs-Dg3JAXLL.js → use-file-configs-CxOBZJYh.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-HBo6BgG2.js → use-infinite-scroll-DuDfwOs2.js} +1 -1
- package/dist/client/assets/{use-join-requests-S9TrPHEO.js → use-join-requests-dCTPB9ob.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-CESYdV6e.js → use-mcp-auth-status-BEGadIzu.js} +1 -1
- package/dist/client/assets/{use-mcp-client-Byx07Dkp.js → use-mcp-client-ptPJt8Ca.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BjViD0C1.js → use-mcp-tools-Dta3MTkm.js} +1 -1
- package/dist/client/assets/{use-members-CJQYBP-7.js → use-members-FRqz-iYP.js} +1 -1
- package/dist/client/assets/{use-mobile-BmSCNgu-.js → use-mobile-BjkhQEF-.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-SXHfducG.js → use-navigate-to-agent--gTBVJlO.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-DvA4mWM6.js → use-org-auth-client-Bitr-MZM.js} +1 -1
- package/dist/client/assets/{use-org-sso-BxYFEe-j.js → use-org-sso-DZnTAe_Y.js} +1 -1
- package/dist/client/assets/{use-organization-roles-CBOBYmxE.js → use-organization-roles-VSQXuUWF.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DkmAV78T.js → use-organization-settings-Bvrp17B3.js} +1 -1
- package/dist/client/assets/{use-registry-app-CT5qp6qN.js → use-registry-app-5nSleZYT.js} +1 -1
- package/dist/client/assets/{use-registry-connections-DJYW5MTo.js → use-registry-connections-DmJUTjTR.js} +1 -1
- package/dist/client/assets/{use-secrets-00nGi3R2.js → use-secrets-DCCcb8Px.js} +1 -1
- package/dist/client/assets/{use-status-sounds-CtFZ8vsn.js → use-status-sounds-Cb-T3G8j.js} +1 -1
- package/dist/client/assets/{use-view-mode-BUDQh3CV.js → use-view-mode-BriXwO2h.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-BWDACHuK.js → use-virtual-mcp-QyfBPZvN.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-CyalJOh2.js +1 -0
- package/dist/client/assets/{useRouterState-NHNd_HiS.js → useRouterState-DgQXvye4.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-uJFzMLMT.js +1 -0
- package/dist/client/assets/{users-Dju8Mwa7.js → users-DMSvo7i0.js} +1 -1
- package/dist/client/assets/{variant-calendar-lVo1tb7b.js → variant-calendar-Dhfsh0f3.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-BOhixd9T.js → view-mode-toggle-C7tDgMVK.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +304 -304
- package/dist/server/server.js +158 -158
- package/package.json +1 -1
- package/dist/client/assets/UserPlus01-DTRkkPuG.js +0 -1
- package/dist/client/assets/agent-icon-C-qK9QQP.js +0 -1
- package/dist/client/assets/automations-7K3BAiEK.js +0 -1
- package/dist/client/assets/category-editor-DAi0v4SL.js +0 -1
- package/dist/client/assets/index-RPh27idC.js +0 -2
- package/dist/client/assets/page-seo-sheet-Cd2F_u4n.js +0 -1
- package/dist/client/assets/project-app-view-DSqs7t7m.js +0 -1
- package/dist/client/assets/record-editor-Bo6yXT4o.js +0 -1
- package/dist/client/assets/redirect-editor-CjFkFKFF.js +0 -1
- package/dist/client/assets/registry-BhkXI7WR.js +0 -2
- package/dist/client/assets/store-registry-BTX3JlmI.js +0 -2
- package/dist/client/assets/useInfiniteQuery-Byg89hfs.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-t0KcEsNQ.js +0 -1
package/dist/client/assets/{automation-list-row-D_PKR44H.js → automation-list-row-Bc0NECF5.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as E,r as F,l as $,j as t,B as K}from"./index-
|
|
1
|
+
import{c as E,r as F,l as $,j as t,B as K}from"./index-DHUcQ3Zc.js";import{b as O,d as B,e as I,g as L,c as H,A as V,a as q,f as G}from"./alert-dialog-D_YtJjUs.js";import{a as J,D as Q,c as U,d as W}from"./dropdown-menu-DU7Il0vV.js";import{s as X}from"./Stars02-B-LWJdG7.js";import{i as Y}from"./DotsVertical-CNYSgMU1.js";import{s as Z}from"./Trash01-_2UtyZ3i.js";import{i as ee}from"./Zap-DHi1Rc1o.js";import{a as te}from"./use-virtual-mcp-QyfBPZvN.js";import{A as se}from"./agent-icon-ydo5jgpp.js";import{u as ne}from"./use-automations-DmCHkQYX.js";function he(a){const e=E.c(53),{automation:s,showAgent:n,onClick:r}=a,{remove:i}=ne(),[P,S]=F.useState(!1),o=te(n?s.virtual_mcp_id:void 0);let D;e[0]!==s.id||e[1]!==i?(D=()=>{i.mutate(s.id),S(!1)},e[0]=s.id,e[1]=i,e[2]=D):D=e[2];const z=D;let A;e[3]!==r?(A=l=>{l.target===l.currentTarget&&(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),r())},e[3]=r,e[4]=A):A=e[4];const T=A,M=s.active&&s.trigger_count>0?"bg-success":"bg-muted-foreground/40";let c;e[5]!==M?(c=$("inline-block size-2 rounded-full shrink-0",M),e[5]=M,e[6]=c):c=e[6];const R=s.active&&s.trigger_count>0?"Active":s.active?"No triggers configured":"Paused";let m;e[7]!==c||e[8]!==R?(m=t.jsx("span",{className:c,"aria-label":R}),e[7]=c,e[8]=R,e[9]=m):m=e[9];let u;e[10]!==o?.icon||e[11]!==o?.title||e[12]!==s.name||e[13]!==n?(u=n&&t.jsx(se,{icon:o?.icon??null,name:o?.title??s.name,size:"xs",className:"shrink-0"}),e[10]=o?.icon,e[11]=o?.title,e[12]=s.name,e[13]=n,e[14]=u):u=e[14];let d;e[15]!==s.name?(d=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:s.name}),e[15]=s.name,e[16]=d):d=e[16];let g;e[17]!==o||e[18]!==n?(g=n&&o&&t.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["· ",o.title]}),e[17]=o,e[18]=n,e[19]=g):g=e[19];let f;e[20]!==d||e[21]!==g?(f=t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[d,g]}),e[20]=d,e[21]=g,e[22]=f):f=e[22];let x;e[23]!==s.nearest_next_run_at||e[24]!==s.trigger_count?(x=t.jsx(oe,{triggerCount:s.trigger_count,nextRunAt:s.nearest_next_run_at}),e[23]=s.nearest_next_run_at,e[24]=s.trigger_count,e[25]=x):x=e[25];let p;e[26]!==f||e[27]!==x?(p=t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[f,x]}),e[26]=f,e[27]=x,e[28]=p):p=e[28];let N;e[29]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx(J,{asChild:!0,children:t.jsx(K,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100 transition-opacity",children:t.jsx(Y,{size:16})})}),e[29]=N):N=e[29];let y;e[30]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx("div",{onClick:ie,onKeyDown:re,role:"presentation",className:"shrink-0",children:t.jsxs(Q,{children:[N,t.jsx(U,{align:"end",children:t.jsxs(W,{variant:"destructive",onClick:l=>{l.stopPropagation(),S(!0)},children:[t.jsx(Z,{size:16}),"Delete"]})})]})}),e[30]=y):y=e[30];let h;e[31]!==T||e[32]!==r||e[33]!==p||e[34]!==m||e[35]!==u?(h=t.jsxs("div",{role:"button",tabIndex:0,onClick:r,onKeyDown:T,className:"group w-full flex items-center gap-3 px-4 py-3 border-b border-border text-left hover:bg-muted/50 transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[m,u,p,y]}),e[31]=T,e[32]=r,e[33]=p,e[34]=m,e[35]=u,e[36]=h):h=e[36];let w;e[37]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx(H,{children:"Delete automation?"}),e[37]=w):w=e[37];let j;e[38]!==s.name?(j=t.jsxs(O,{children:[w,t.jsxs(B,{children:["This removes"," ",t.jsx("span",{className:"font-medium text-foreground",children:s.name})," ","and all of its triggers. This action cannot be undone."]})]}),e[38]=s.name,e[39]=j):j=e[39];let C;e[40]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(V,{children:"Cancel"}),e[40]=C):C=e[40];let _;e[41]!==z||e[42]!==i.isPending?(_=t.jsxs(I,{children:[C,t.jsx(L,{onClick:z,disabled:i.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[41]=z,e[42]=i.isPending,e[43]=_):_=e[43];let v;e[44]!==j||e[45]!==_?(v=t.jsxs(q,{children:[j,_]}),e[44]=j,e[45]=_,e[46]=v):v=e[46];let b;e[47]!==P||e[48]!==v?(b=t.jsx(G,{open:P,onOpenChange:S,children:v}),e[47]=P,e[48]=v,e[49]=b):b=e[49];let k;return e[50]!==h||e[51]!==b?(k=t.jsxs(t.Fragment,{children:[h,b]}),e[50]=h,e[51]=b,e[52]=k):k=e[52],k}function re(a){return a.stopPropagation()}function ie(a){return a.stopPropagation()}function oe(a){const e=E.c(4),{triggerCount:s,nextRunAt:n}=a;if(s===0){let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("span",{className:"text-xs text-muted-foreground",children:"No triggers configured"}),e[0]=i):i=e[0],i}let r;return e[1]!==n||e[2]!==s?(r=t.jsx("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground min-w-0",children:n?t.jsxs(t.Fragment,{children:[t.jsx(X,{size:12,className:"shrink-0"}),t.jsxs("span",{className:"truncate",children:["Next run ",new Date(n).toLocaleString()]})]}):t.jsxs(t.Fragment,{children:[t.jsx(ee,{size:12,className:"shrink-0"}),t.jsxs("span",{className:"truncate",children:[s," trigger",s===1?"":"s"]})]})}),e[1]=n,e[2]=s,e[3]=r):r=e[3],r}export{he as A};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as E,c as _,J as Kh,j as p,B as un,I as ra,H as Jh,M as Gh,bJ as Kc,bK as Xh,at as Yh,aM as dn,bL as Qh,l as ee,p as Zh,aR as ep,aO as Ut,aV as tp,aU as _t,ba as Nr,aS as kn,bM as Jc,aQ as Gc,C as Ct,n as np,d as rp,K as Qe,t as Xo,m as Mr,b as Vn,E as Xc,aL as Yc,bN as Bi,aT as sp,bO as Qt}from"./index-CW-frCvB.js";import{e as op}from"./select-x3JQ-RMK.js";import{u as Qc}from"./useInfiniteQuery-Byg89hfs.js";import{a as Zc,u as ip}from"./use-connection-NmR6dvUm.js";import{c as lp,u as Fi}from"./use-mcp-client-Byx07Dkp.js";import{u as ap}from"./use-virtual-mcp-BWDACHuK.js";import{b as cp,i as up,a as dp,S as fp}from"./constants-BHDe7bIw.js";import{C as hp}from"./card-X8PevBIr.js";import{o as eu,m as tu,p as Hi,q as Vi}from"./sidebar-BKNPuVLe.js";import{c as nu,d as ru,a as Ks,e as Je,b as su,T as Ge}from"./table-BMAClQxa.js";import{E as Yo}from"./empty-state-BRubSasg.js";import{u as Wi}from"./use-infinite-scroll-HBo6BgG2.js";import{u as pp}from"./use-members-CJQYBP-7.js";import{u as ou,S as Rn}from"./use-clock-tick-BMPCELUk.js";import{e as mp}from"./use-automations-Bt3dZ-M9.js";import{u as iu}from"./studio-tools-Dh5WF9Xa.js";import{u as gp}from"./useSuspenseInfiniteQuery-t0KcEsNQ.js";import{A as lu}from"./avatar-CjaRl_73.js";import{t as Zr}from"./ChevronDown-XW3mndxm.js";import{n as Qo}from"./ChevronUp-CBA75LiO.js";import{t as xp,a as au,n as Ui}from"./Tool02-B26tsl4g.js";import{e as yp,ao as bp,ap as kp,U as Sp,u as vp,aq as wp,$ as Cp,ae as Tp,j as Np,am as cu,ar as Mp,as as Ep,A as uu,at as ut,au as Ap}from"./agent-icon-C-qK9QQP.js";import{t as Js}from"./Stars01-CAjraTXl.js";import{i as du,b as Or}from"./XCircle-BGAsxFPn.js";import{i as qi}from"./Check-B1SirwZu.js";import{i as sa}from"./ChevronRight-CMxF_EMm.js";import{a as fu}from"./Copy01-DvYXKq8Z.js";import{b as Ht,t as Ki,c as oa}from"./format-time-BnbuEtat.js";import{u as hu}from"./use-copy-NStrWZLh.js";import{T as fn,a as hn,b as pn}from"./tooltip-2HPu4RGb.js";import{M as Ji,I as pu,F as jp}from"./file-type-icon-5IRBmGyW.js";import{R as Ip,c as Op,r as Rp,g as Dp}from"./hooks-D2zwv91o.js";import{S as Pp,h as Wn,m as Lp,c as Gi,d as _p,b as $p}from"./chat-context-Dk_Lat8F.js";import{c as zp}from"./monaco-editor-AmLAOARt.js";import{g as mu,M as Bp}from"./index-Bv2X_RsF.js";import{f as Fp,n as Hp,o as Vp}from"./tab-id-BijBBRwE.js";import{i as gu}from"./AlertCircle-DU6qWK9T.js";import{s as Wp}from"./Eye-CikrhNcF.js";import{s as es,t as xu}from"./Star01-BrCcPuVF.js";import{s as Up}from"./XClose-CSyFLxIV.js";import{n as Zo}from"./ZapSquare-ChpA6sdD.js";import{n as yu,i as qp}from"./Globe01-BPvkaID5.js";import{c as Kp,b as Jp}from"./Tool01-cmPVPWfy.js";import{i as ia,a as Gp}from"./ZoomOut-Bw94mtVG.js";import{i as nr}from"./Monitor01-gh3GDPr8.js";import{i as Xp}from"./SearchMd-LCBR2m3m.js";import{i as Yp}from"./Upload01-vsvHLvaA.js";import{u as Qp,a as Zp}from"./shell-layout-F5G52jTC.js";import{a as Rr}from"./Image01-BxR0qJ9h.js";import{n as bu}from"./LinkExternal01-BapUlNlT.js";import{I as qt}from"./integration-icon-COnO4G_g.js";import{i as em}from"./ArrowUpRight-DmbxJntq.js";import{a as Xi}from"./Users03-dXp1ufdN.js";import{a as dt}from"./Palette-DvrEWWT4.js";import{c as ku}from"./use-navigate-to-agent-SXHfducG.js";import{a as tm}from"./Stars02-BjTmIaMZ.js";import{g as nm}from"./AreaChart-BX2a1Rtg.js";import{a as rm,D as sm,c as om,d as im,e as lm}from"./dialog-DSMMHp7k.js";import{a as am,F as cm,b as um,c as dm,d as fm,f as hm}from"./form-v_v0yrL_.js";import{I as pm}from"./input-Bh6jfBSY.js";import{i as mm}from"./UserPlus01-DTRkkPuG.js";const gm={openrouter:n=>{const e=n?.openrouter;return typeof e=="object"&&e!==null&&"usage"in e&&typeof e.usage=="object"&&e.usage!==null&&"cost"in e.usage&&typeof e.usage.cost=="number"?e.usage.cost:null}};function Su(n){if(!n?.providerMetadata)return 0;for(const e of Object.values(gm)){const t=e(n.providerMetadata);if(t!==null)return t}return 0}function vu(){return{inputTokens:0,outputTokens:0,reasoningTokens:0,totalTokens:0,cost:0,cacheReadTokens:0,cacheWriteTokens:0}}function wu(n,e){if(!e)return n;const t=e.inputTokenDetails?.cacheReadTokens??e.cachedInputTokens??0,r=e.inputTokenDetails?.cacheWriteTokens??0;return{inputTokens:n.inputTokens+(e.inputTokens??0),outputTokens:n.outputTokens+(e.outputTokens??0),reasoningTokens:n.reasoningTokens+(e.reasoningTokens??0),totalTokens:n.totalTokens+(e.totalTokens??0),cost:n.cost+Su(e),cacheReadTokens:n.cacheReadTokens+t,cacheWriteTokens:n.cacheWriteTokens+r}}function KC(n){return n.reduce((e,t)=>wu(e,t.metadata?.usage),vu())}const xm={damping:.7,stiffness:.05,mass:1.25},ym=70,bm=1e3/60,km=350;let Gs=!1;globalThis.document?.addEventListener("mousedown",()=>{Gs=!0});globalThis.document?.addEventListener("mouseup",()=>{Gs=!1});globalThis.document?.addEventListener("click",()=>{Gs=!1});const Sm=(n={})=>{const[e,t]=E.useState(!1),[r,s]=E.useState(n.initial!==!1),[o,i]=E.useState(!1),l=E.useRef(null);l.current=n;const a=E.useCallback(()=>{if(!Gs)return!1;const b=window.getSelection();if(!b||!b.rangeCount)return!1;const k=b.getRangeAt(0);return k.commonAncestorContainer.contains(x.current)||x.current?.contains(k.commonAncestorContainer)},[]),c=E.useCallback(b=>{d.isAtBottom=b,s(b)},[]),u=E.useCallback(b=>{d.escapedFromLock=b,t(b)},[]),d=E.useMemo(()=>{let b;return{escapedFromLock:e,isAtBottom:r,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return x.current?.scrollTop??0},set scrollTop(k){if(x.current){const{scrollBehavior:S}=getComputedStyle(x.current);S!=="auto"&&(x.current.style.scrollBehavior="auto"),x.current.scrollTop=k,d.ignoreScrollToTop=x.current.scrollTop,S!=="auto"&&(x.current.style.scrollBehavior=S)}},get targetScrollTop(){return!x.current||!y.current?0:x.current.scrollHeight-1-x.current.clientHeight},get calculatedTargetScrollTop(){if(!x.current||!y.current)return 0;const{targetScrollTop:k}=this;if(!n.targetScrollTop)return k;if(b?.targetScrollTop===k)return b.calculatedScrollTop;const S=Math.max(Math.min(n.targetScrollTop(k,{scrollElement:x.current,contentElement:y.current}),k),0);return b={targetScrollTop:k,calculatedScrollTop:S},requestAnimationFrame(()=>{b=void 0}),S},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=ym}}},[]),f=E.useCallback((b={})=>{typeof b=="string"&&(b={animation:b}),b.preserveScrollPosition||c(!0);const k=Date.now()+(Number(b.wait)||0),S=bo(l.current,b.animation),{ignoreEscapes:v=!1}=b;let w,C=d.calculatedTargetScrollTop;b.duration instanceof Promise?b.duration.finally(()=>{w=Date.now()}):w=k+(b.duration??0);const T=async()=>{const N=new Promise(requestAnimationFrame).then(()=>{if(!d.isAtBottom)return d.animation=void 0,!1;const{scrollTop:M}=d,j=performance.now(),R=(j-(d.lastTick??j))/bm;if(d.animation||(d.animation={behavior:S,promise:N,ignoreEscapes:v}),d.animation.behavior===S&&(d.lastTick=j),a()||k>Date.now())return T();if(M<Math.min(C,d.calculatedTargetScrollTop)){if(d.animation?.behavior===S){if(S==="instant")return d.scrollTop=d.calculatedTargetScrollTop,T();d.velocity=(S.damping*d.velocity+S.stiffness*d.scrollDifference)/S.mass,d.accumulated+=d.velocity*R,d.scrollTop+=d.accumulated,d.scrollTop!==M&&(d.accumulated=0)}return T()}return w>Date.now()?(C=d.calculatedTargetScrollTop,T()):(d.animation=void 0,d.scrollTop<d.calculatedTargetScrollTop?f({animation:bo(l.current,l.current.resize),ignoreEscapes:v,duration:Math.max(0,w-Date.now())||void 0}):d.isAtBottom)});return N.then(M=>(requestAnimationFrame(()=>{d.animation||(d.lastTick=void 0,d.velocity=0)}),M))};return b.wait!==!0&&(d.animation=void 0),d.animation?.behavior===S?d.animation.promise:T()},[c,a,d]),h=E.useCallback(()=>{u(!0),c(!1)},[u,c]),m=E.useCallback(({target:b})=>{if(b!==x.current)return;const{scrollTop:k,ignoreScrollToTop:S}=d;let{lastScrollTop:v=k}=d;d.lastScrollTop=k,d.ignoreScrollToTop=void 0,S&&S>k&&(v=S),i(d.isNearBottom),setTimeout(()=>{if(d.resizeDifference||k===S)return;if(a()){u(!0),c(!1);return}const w=k>v,C=k<v;if(d.animation?.ignoreEscapes){d.scrollTop=v;return}C&&(u(!0),c(!1)),w&&u(!1),!d.escapedFromLock&&d.isNearBottom&&c(!0)},1)},[u,c,a,d]),g=E.useCallback(({target:b,deltaY:k})=>{let S=b;for(;!["scroll","auto"].includes(getComputedStyle(S).overflow);){if(!S.parentElement)return;S=S.parentElement}S===x.current&&k<0&&x.current.scrollHeight>x.current.clientHeight&&!d.animation?.ignoreEscapes&&(u(!0),c(!1))},[u,c,d]),x=la(b=>{x.current?.removeEventListener("scroll",m),x.current?.removeEventListener("wheel",g),b?.addEventListener("scroll",m,{passive:!0}),b?.addEventListener("wheel",g,{passive:!0})},[]),y=la(b=>{if(d.resizeObserver?.disconnect(),d.resizeObserver=void 0,!b)return;let k;d.resizeObserver=new ResizeObserver(([S])=>{const{height:v}=S.contentRect,w=v-(k??v);if(d.resizeDifference=w,d.scrollTop>d.targetScrollTop&&(d.scrollTop=d.targetScrollTop),i(d.isNearBottom),w>=0){const C=bo(l.current,k?l.current.resize:l.current.initial);f({animation:C,wait:!0,preserveScrollPosition:!0,duration:C==="instant"?void 0:km})}else d.isNearBottom&&(u(!1),c(!0));k=v,requestAnimationFrame(()=>{setTimeout(()=>{d.resizeDifference===w&&(d.resizeDifference=0)},1)})}),d.resizeObserver?.observe(b)},[]);return{contentRef:y,scrollRef:x,scrollToBottom:f,stopScroll:h,isAtBottom:r||o,isNearBottom:o,escapedFromLock:e,state:d}};function la(n,e){const t=E.useCallback(r=>(t.current=r,n(r)),e);return t}const yo=new Map;function bo(...n){const e={...xm};let t=!1;for(const s of n){if(s==="instant"){t=!0;continue}typeof s=="object"&&(t=!1,e.damping=s.damping??e.damping,e.stiffness=s.stiffness??e.stiffness,e.mass=s.mass??e.mass)}const r=JSON.stringify(e);return yo.has(r)||yo.set(r,Object.freeze(e)),t?"instant":yo.get(r)}function vm(n){return n.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")}function Yi(n){if(n&&typeof n=="object"&&"gatewayClientId"in n&&typeof n.gatewayClientId=="string")return n.gatewayClientId}function Qi(n,e){if(!e)return n;const t=`${vm(e)}_`;return n.startsWith(t)?n.slice(t.length):n}function wm(n,e){return Qi(n,e).replace(/[_-]/g," ").toLowerCase()}function Cm(n){const e={};for(const t of n?.arguments??[])e[t.name]=t.required?ra().min(1,"Required"):ra();return Jh(e)}function Tm(n,e){const t={};for(const r of n.arguments??[])t[r.name]=e?.[r.name]??"";return t}function Nm(n){const e=_.c(67),{prompt:t,setPrompt:r,onSubmit:s,defaultValues:o}=n,i=E.useId();let l,a;if(e[0]!==t){const L=Cm(t);a=Gh,l=Kh(L),e[0]=t,e[1]=l,e[2]=a}else l=e[1],a=e[2];let c;e[3]!==o||e[4]!==t?(c=t?Tm(t,o):{},e[3]=o,e[4]=t,e[5]=c):c=e[5];let u;e[6]!==l||e[7]!==c?(u={resolver:l,defaultValues:c,mode:"onChange"},e[6]=l,e[7]=c,e[8]=u):u=e[8];const d=a(u);let f;e[9]!==t?.arguments?(f=t?.arguments??[],e[9]=t?.arguments,e[10]=f):f=e[10];const h=f;let m;e[11]!==d||e[12]!==s||e[13]!==r?(m=async L=>{await s(L),r(null),d.reset()},e[11]=d,e[12]=s,e[13]=r,e[14]=m):m=e[14];const g=m;let x;e[15]!==d||e[16]!==r?(x=L=>{L||(d.reset(),r(null))},e[15]=d,e[16]=r,e[17]=x):x=e[17];const y=x;if(!t)return null;let b;e[18]!==t._meta||e[19]!==t.name||e[20]!==t.title?(b=t.title||wm(t.name,Yi(t._meta)),e[18]=t._meta,e[19]=t.name,e[20]=t.title,e[21]=b):b=e[21];let k;e[22]!==b?(k=p.jsx(rm,{children:p.jsx("span",{className:"capitalize",children:b})}),e[22]=b,e[23]=k):k=e[23];let S;e[24]!==t.description?(S=t.description&&p.jsx("p",{className:"text-sm text-muted-foreground",children:t.description}),e[24]=t.description,e[25]=S):S=e[25];let v;e[26]!==S||e[27]!==k?(v=p.jsxs(sm,{children:[k,S]}),e[26]=S,e[27]=k,e[28]=v):v=e[28];let w;e[29]!==d||e[30]!==g?(w=L=>{L.stopPropagation(),d.handleSubmit(g)(L)},e[29]=d,e[30]=g,e[31]=w):w=e[31];let C;if(e[32]!==h||e[33]!==d.control||e[34]!==d.formState.isSubmitting){let L;e[36]!==d.control||e[37]!==d.formState.isSubmitting?(L=z=>p.jsx(cm,{control:d.control,name:z.name,render:F=>{const{field:U}=F;return p.jsxs(um,{children:[p.jsxs(dm,{className:"text-xs",children:[z.name,z.required?null:p.jsxs("span",{className:"text-muted-foreground font-normal",children:[" ","(optional)"]})]}),p.jsx(fm,{children:p.jsx(pm,{...U,value:U.value??"",required:z.required,placeholder:z.description??"",className:"h-9",disabled:d.formState.isSubmitting})}),p.jsx(hm,{})]})}},z.name),e[36]=d.control,e[37]=d.formState.isSubmitting,e[38]=L):L=e[38],C=h.map(L),e[32]=h,e[33]=d.control,e[34]=d.formState.isSubmitting,e[35]=C}else C=e[35];let T;e[39]!==y?(T=()=>y(!1),e[39]=y,e[40]=T):T=e[40];let N;e[41]!==d.formState.isSubmitting||e[42]!==T?(N=p.jsx(un,{type:"button",variant:"ghost",onClick:T,disabled:d.formState.isSubmitting,children:"Cancel"}),e[41]=d.formState.isSubmitting,e[42]=T,e[43]=N):N=e[43];let M;e[44]!==d.formState.isSubmitting?(M=d.formState.isSubmitting?p.jsxs("span",{className:"flex items-center gap-2",children:[p.jsx(Pp,{size:"xs"}),"Loading..."]}):"Use prompt",e[44]=d.formState.isSubmitting,e[45]=M):M=e[45];let j;e[46]!==d.formState.isSubmitting||e[47]!==i||e[48]!==M?(j=p.jsx(un,{type:"submit",form:i,disabled:d.formState.isSubmitting,children:M}),e[46]=d.formState.isSubmitting,e[47]=i,e[48]=M,e[49]=j):j=e[49];let R;e[50]!==N||e[51]!==j?(R=p.jsxs(om,{children:[N,j]}),e[50]=N,e[51]=j,e[52]=R):R=e[52];let A;e[53]!==i||e[54]!==w||e[55]!==C||e[56]!==R?(A=p.jsxs("form",{id:i,className:"space-y-4 py-4",autoComplete:"off",onSubmit:w,children:[C,R]}),e[53]=i,e[54]=w,e[55]=C,e[56]=R,e[57]=A):A=e[57];let D;e[58]!==d||e[59]!==A?(D=p.jsx(am,{...d,children:A}),e[58]=d,e[59]=A,e[60]=D):D=e[60];let I;e[61]!==v||e[62]!==D?(I=p.jsxs(im,{className:"sm:max-w-lg max-h-[80vh] overflow-y-auto",children:[v,D]}),e[61]=v,e[62]=D,e[63]=I):I=e[63];let $;return e[64]!==y||e[65]!==I?($=p.jsx(lm,{open:!0,onOpenChange:y,children:I}),e[64]=y,e[65]=I,e[66]=$):$=e[66],$}function Cu(n){return n?n.replace(/[_-]/g," ").toLowerCase().split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "):""}function ot(n,e){return n==="output-error"||n==="output-denied"?"error":n==="approval-requested"?"approval":n==="input-streaming"||n==="input-available"||n==="output-available"&&e===!0?"loading":"idle"}function Un(n){if(n==null||typeof n!="object")return;const e=n;if(e.structuredContent&&typeof e.structuredContent=="object")return e.structuredContent;if(Array.isArray(e.content)){const t=e.content[0];if(t?.type==="text"&&typeof t.text=="string")try{return JSON.parse(t.text)}catch{return}return}return n}function Ne(n){this.content=n}Ne.prototype={constructor:Ne,find:function(n){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===n)return e;return-1},get:function(n){var e=this.find(n);return e==-1?void 0:this.content[e+1]},update:function(n,e,t){var r=t&&t!=n?this.remove(t):this,s=r.find(n),o=r.content.slice();return s==-1?o.push(t||n,e):(o[s+1]=e,t&&(o[s]=t)),new Ne(o)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new Ne(t)},addToStart:function(n,e){return new Ne([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new Ne(t)},addBefore:function(n,e,t){var r=this.remove(e),s=r.content.slice(),o=r.find(n);return s.splice(o==-1?s.length:o,0,e,t),new Ne(s)},forEach:function(n){for(var e=0;e<this.content.length;e+=2)n(this.content[e],this.content[e+1])},prepend:function(n){return n=Ne.from(n),n.size?new Ne(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=Ne.from(n),n.size?new Ne(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=Ne.from(n);for(var t=0;t<n.content.length;t+=2)e=e.remove(n.content[t]);return e},toObject:function(){var n={};return this.forEach(function(e,t){n[e]=t}),n},get size(){return this.content.length>>1}};Ne.from=function(n){if(n instanceof Ne)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new Ne(e)};function Tu(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let s=n.child(r),o=e.child(r);if(s==o){t+=s.nodeSize;continue}if(!s.sameMarkup(o))return t;if(s.isText&&s.text!=o.text){for(let i=0;s.text[i]==o.text[i];i++)t++;return t}if(s.content.size||o.content.size){let i=Tu(s.content,o.content,t+1);if(i!=null)return i}t+=s.nodeSize}}function Nu(n,e,t,r){for(let s=n.childCount,o=e.childCount;;){if(s==0||o==0)return s==o?null:{a:t,b:r};let i=n.child(--s),l=e.child(--o),a=i.nodeSize;if(i==l){t-=a,r-=a;continue}if(!i.sameMarkup(l))return{a:t,b:r};if(i.isText&&i.text!=l.text){let c=0,u=Math.min(i.text.length,l.text.length);for(;c<u&&i.text[i.text.length-c-1]==l.text[l.text.length-c-1];)c++,t--,r--;return{a:t,b:r}}if(i.content.size||l.content.size){let c=Nu(i.content,l.content,t-1,r-1);if(c)return c}t-=a,r-=a}}class O{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,s=0,o){for(let i=0,l=0;l<t;i++){let a=this.content[i],c=l+a.nodeSize;if(c>e&&r(a,s+l,o||null,i)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,t-u),r,s+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,s){let o="",i=!0;return this.nodesBetween(e,t,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,t-a):l.isLeaf?s?typeof s=="function"?s(l):s:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(i?i=!1:o+=r),o+=c},0),o}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,s=this.content.slice(),o=0;for(t.isText&&t.sameMarkup(r)&&(s[s.length-1]=t.withText(t.text+r.text),o=1);o<e.content.length;o++)s.push(e.content[o]);return new O(s,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],s=0;if(t>e)for(let o=0,i=0;i<t;o++){let l=this.content[o],a=i+l.nodeSize;a>e&&((i<e||a>t)&&(l.isText?l=l.cut(Math.max(0,e-i),Math.min(l.text.length,t-i)):l=l.cut(Math.max(0,e-i-1),Math.min(l.content.size,t-i-1))),r.push(l),s+=l.nodeSize),i=a}return new O(r,s)}cutByIndex(e,t){return e==t?O.empty:e==0&&t==this.content.length?this:new O(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let s=this.content.slice(),o=this.size+t.nodeSize-r.nodeSize;return s[e]=t,new O(s,o)}addToStart(e){return new O([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new O(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))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(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let s=this.content[t];e(s,r,t),r+=s.nodeSize}}findDiffStart(e,t=0){return Tu(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return Nu(this,e,t,r)}findIndex(e){if(e==0)return Dr(0,e);if(e==this.size)return Dr(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,r=0;;t++){let s=this.child(t),o=r+s.nodeSize;if(o>=e)return o==e?Dr(t+1,o):Dr(t,r);r=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return O.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new O(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return O.empty;let t,r=0;for(let s=0;s<e.length;s++){let o=e[s];r+=o.nodeSize,s&&o.isText&&e[s-1].sameMarkup(o)?(t||(t=e.slice(0,s)),t[t.length-1]=o.withText(t[t.length-1].text+o.text)):t&&t.push(o)}return new O(t||e,r)}static from(e){if(!e)return O.empty;if(e instanceof O)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new O([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}O.empty=new O([],0);const ko={index:0,offset:0};function Dr(n,e){return ko.index=n,ko.offset=e,ko}function ts(n,e){if(n===e)return!0;if(!(n&&typeof n=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(n);if(Array.isArray(e)!=t)return!1;if(t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!ts(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!ts(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let le=class ei{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let s=0;s<e.length;s++){let o=e[s];if(this.eq(o))return e;if(this.type.excludes(o.type))t||(t=e.slice(0,s));else{if(o.type.excludes(this.type))return e;!r&&o.type.rank>this.type.rank&&(t||(t=e.slice(0,s)),t.push(this),r=!0),t&&t.push(o)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&ts(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw new RangeError(`There is no mark type ${t.type} in this schema`);let s=r.create(t.attrs);return r.checkAttrs(s.attrs),s}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return ei.none;if(e instanceof ei)return[e];let t=e.slice();return t.sort((r,s)=>r.type.rank-s.type.rank),t}};le.none=[];class ns extends Error{}class B{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=Eu(this.content,e+this.openStart,t);return r&&new B(r,this.openStart,this.openEnd)}removeBetween(e,t){return new B(Mu(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return B.empty;let r=t.openStart||0,s=t.openEnd||0;if(typeof r!="number"||typeof s!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new B(O.fromJSON(e,t.content),r,s)}static maxOpen(e,t=!0){let r=0,s=0;for(let o=e.firstChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=e.lastChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.lastChild)s++;return new B(e,r,s)}}B.empty=new B(O.empty,0,0);function Mu(n,e,t){let{index:r,offset:s}=n.findIndex(e),o=n.maybeChild(r),{index:i,offset:l}=n.findIndex(t);if(s==e||o.isText){if(l!=t&&!n.child(i).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=i)throw new RangeError("Removing non-flat range");return n.replaceChild(r,o.copy(Mu(o.content,e-s-1,t-s-1)))}function Eu(n,e,t,r){let{index:s,offset:o}=n.findIndex(e),i=n.maybeChild(s);if(o==e||i.isText)return r&&!r.canReplace(s,s,t)?null:n.cut(0,e).append(t).append(n.cut(e));let l=Eu(i.content,e-o-1,t,i);return l&&n.replaceChild(s,i.copy(l))}function Mm(n,e,t){if(t.openStart>n.depth)throw new ns("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new ns("Inconsistent open depths");return Au(n,e,t,0)}function Au(n,e,t,r){let s=n.index(r),o=n.node(r);if(s==e.index(r)&&r<n.depth-t.openStart){let i=Au(n,e,t,r+1);return o.copy(o.content.replaceChild(s,i))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let i=n.parent,l=i.content;return on(i,l.cut(0,n.parentOffset).append(t.content).append(l.cut(e.parentOffset)))}else{let{start:i,end:l}=Em(t,n);return on(o,Iu(n,i,l,e,r))}else return on(o,rs(n,e,r))}function ju(n,e){if(!e.type.compatibleContent(n.type))throw new ns("Cannot join "+e.type.name+" onto "+n.type.name)}function ti(n,e,t){let r=n.node(t);return ju(r,e.node(t)),r}function sn(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function rr(n,e,t,r){let s=(e||n).node(t),o=0,i=e?e.index(t):s.childCount;n&&(o=n.index(t),n.depth>t?o++:n.textOffset&&(sn(n.nodeAfter,r),o++));for(let l=o;l<i;l++)sn(s.child(l),r);e&&e.depth==t&&e.textOffset&&sn(e.nodeBefore,r)}function on(n,e){return n.type.checkContent(e),n.copy(e)}function Iu(n,e,t,r,s){let o=n.depth>s&&ti(n,e,s+1),i=r.depth>s&&ti(t,r,s+1),l=[];return rr(null,n,s,l),o&&i&&e.index(s)==t.index(s)?(ju(o,i),sn(on(o,Iu(n,e,t,r,s+1)),l)):(o&&sn(on(o,rs(n,e,s+1)),l),rr(e,t,s,l),i&&sn(on(i,rs(t,r,s+1)),l)),rr(r,null,s,l),new O(l)}function rs(n,e,t){let r=[];if(rr(null,n,t,r),n.depth>t){let s=ti(n,e,t+1);sn(on(s,rs(n,e,t+1)),r)}return rr(e,null,t,r),new O(r)}function Em(n,e){let t=e.depth-n.openStart,s=e.node(t).copy(n.content);for(let o=t-1;o>=0;o--)s=e.node(o).copy(O.from(s));return{start:s.resolveNoCache(n.openStart+t),end:s.resolveNoCache(s.content.size-n.openEnd-t)}}class pr{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],s=e.child(t);return r?e.child(t).cut(r):s}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],s=t==0?0:this.path[t*3-1]+1;for(let o=0;o<e;o++)s+=r.child(o).nodeSize;return s}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return le.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),s=e.maybeChild(t);if(!r){let l=r;r=s,s=l}let o=r.marks;for(var i=0;i<o.length;i++)o[i].type.spec.inclusive===!1&&(!s||!o[i].isInSet(s.marks))&&(o=o[i--].removeFromSet(o));return o}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,s=e.parent.maybeChild(e.index());for(var o=0;o<r.length;o++)r[o].type.spec.inclusive===!1&&(!s||!r[o].isInSet(s.marks))&&(r=r[o--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new ss(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],s=0,o=t;for(let i=e;;){let{index:l,offset:a}=i.content.findIndex(o),c=o-a;if(r.push(i,l,s+a),!c||(i=i.child(l),i.isText))break;o=c-1,s+=a+1}return new pr(t,r,o)}static resolveCached(e,t){let r=aa.get(e);if(r)for(let o=0;o<r.elts.length;o++){let i=r.elts[o];if(i.pos==t)return i}else aa.set(e,r=new Am);let s=r.elts[r.i]=pr.resolve(e,t);return r.i=(r.i+1)%jm,s}}class Am{constructor(){this.elts=[],this.i=0}}const jm=12,aa=new WeakMap;class ss{constructor(e,t,r){this.$from=e,this.$to=t,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 Im=Object.create(null);class st{constructor(e,t,r,s=le.none){this.type=e,this.attrs=t,this.marks=s,this.content=r||O.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,r,s=0){this.content.nodesBetween(e,t,r,s,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,r,s){return this.content.textBetween(e,t,r,s)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,r){return this.type==e&&ts(this.attrs,t||e.defaultAttrs||Im)&&le.sameSet(this.marks,r||le.none)}copy(e=null){return e==this.content?this:new st(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new st(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return B.empty;let s=this.resolve(e),o=this.resolve(t),i=r?0:s.sharedDepth(t),l=s.start(i),c=s.node(i).content.cut(s.pos-l,o.pos-l);return new B(c,s.depth-i,o.depth-i)}replace(e,t,r){return Mm(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:s}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(s==e||t.isText)return t;e-=s+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let s=this.content.child(t-1);return{node:s,index:t-1,offset:r-s.nodeSize}}resolve(e){return pr.resolveCached(this,e)}resolveNoCache(e){return pr.resolve(this,e)}rangeHasMark(e,t,r){let s=!1;return t>e&&this.nodesBetween(e,t,o=>(r.isInSet(o.marks)&&(s=!0),!s)),s}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 e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),Ou(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=O.empty,s=0,o=r.childCount){let i=this.contentMatchAt(e).matchFragment(r,s,o),l=i&&i.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let a=s;a<o;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0}canReplaceWith(e,t,r,s){if(s&&!this.type.allowsMarks(s))return!1;let o=this.contentMatchAt(e).matchType(r),i=o&&o.matchFragment(this.content,t);return i?i.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=le.none;for(let t=0;t<this.marks.length;t++){let r=this.marks[t];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!le.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let s=O.fromJSON(e,t.content),o=e.nodeType(t.type).create(t.attrs,s,r);return o.type.checkAttrs(o.attrs),o}}st.prototype.text=void 0;class is extends st{constructor(e,t,r,s){if(super(e,t,null,s),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Ou(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new is(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new is(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function Ou(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class mn{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new Om(e,t);if(r.next==null)return mn.empty;let s=Ru(r);r.next&&r.err("Unexpected trailing text");let o=zm($m(s));return Bm(o,r),o}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let s=this;for(let o=t;s&&o<r;o++)s=s.matchType(e.child(o).type);return s}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let s=[this];function o(i,l){let a=i.matchFragment(e,r);if(a&&(!t||a.validEnd))return O.from(l.map(c=>c.createAndFill()));for(let c=0;c<i.next.length;c++){let{type:u,next:d}=i.next[c];if(!(u.isText||u.hasRequiredAttrs())&&s.indexOf(d)==-1){s.push(d);let f=o(d,l.concat(u));if(f)return f}}return null}return o(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let s=r.shift(),o=s.match;if(o.matchType(e)){let i=[];for(let l=s;l.type;l=l.via)i.push(l.type);return i.reverse()}for(let i=0;i<o.next.length;i++){let{type:l,next:a}=o.next[i];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in t)&&(!s.type||a.validEnd)&&(r.push({match:l.contentMatch,type:l,via:s}),t[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let s=0;s<r.next.length;s++)e.indexOf(r.next[s].next)==-1&&t(r.next[s].next)}return t(this),e.map((r,s)=>{let o=s+(r.validEnd?"*":" ")+" ";for(let i=0;i<r.next.length;i++)o+=(i?", ":"")+r.next[i].type.name+"->"+e.indexOf(r.next[i].next);return o}).join(`
|
|
1
|
+
import{r as E,c as _,J as Kh,j as p,B as un,I as ra,H as Jh,M as Gh,bJ as Kc,bK as Xh,at as Yh,aM as dn,bL as Qh,l as ee,p as Zh,aR as ep,aO as Ut,aV as tp,aU as _t,ba as Nr,aS as kn,bM as Jc,aQ as Gc,C as Ct,n as np,d as rp,K as Qe,t as Xo,m as Mr,b as Vn,E as Xc,aL as Yc,bN as Bi,aT as sp,bO as Qt}from"./index-DHUcQ3Zc.js";import{e as op}from"./select-C8J1x9Hh.js";import{u as Qc}from"./useInfiniteQuery-CyalJOh2.js";import{a as Zc,u as ip}from"./use-connection-D17m_MYi.js";import{c as lp,u as Fi}from"./use-mcp-client-ptPJt8Ca.js";import{u as ap}from"./use-virtual-mcp-QyfBPZvN.js";import{b as cp,i as up,a as dp,S as fp}from"./constants-BHDe7bIw.js";import{C as hp}from"./card-BR1-VnZL.js";import{o as eu,m as tu,p as Hi,q as Vi}from"./sidebar-DDv6Q6Vr.js";import{c as nu,d as ru,a as Ks,e as Je,b as su,T as Ge}from"./table-Bphxy4QJ.js";import{E as Yo}from"./empty-state-C0HMrPFH.js";import{u as Wi}from"./use-infinite-scroll-DuDfwOs2.js";import{u as pp}from"./use-members-FRqz-iYP.js";import{u as ou,S as Rn}from"./use-clock-tick-D0xcXU6l.js";import{e as mp}from"./use-automations-DmCHkQYX.js";import{u as iu}from"./studio-tools-oG5STvP8.js";import{u as gp}from"./useSuspenseInfiniteQuery-uJFzMLMT.js";import{A as lu}from"./avatar-e-7iWxAV.js";import{t as Zr}from"./ChevronDown-Bbe4LEpG.js";import{n as Qo}from"./ChevronUp-CG-5lkz8.js";import{t as xp,a as au,n as Ui}from"./Tool02-CITs9l5E.js";import{d as yp,an as bp,ao as kp,T as Sp,r as vp,ap as wp,_ as Cp,ad as Tp,h as Np,al as cu,aq as Mp,ar as Ep,A as uu,as as ut,at as Ap}from"./agent-icon-ydo5jgpp.js";import{t as Js}from"./Stars01-DFT0n9O7.js";import{i as du,b as Or}from"./XCircle-D994HWfT.js";import{i as qi}from"./Check-ChISHbfh.js";import{i as sa}from"./ChevronRight-CvFLMLSs.js";import{a as fu}from"./Copy01-ChDVmiye.js";import{b as Ht,t as Ki,c as oa}from"./format-time-BnbuEtat.js";import{u as hu}from"./use-copy-BPpad-V6.js";import{T as fn,a as hn,b as pn}from"./tooltip-C_kxGPbz.js";import{M as Ji,I as pu,F as jp}from"./file-type-icon-CWZqRYUk.js";import{R as Ip,c as Op,r as Rp,g as Dp}from"./hooks-Cpz2-QJF.js";import{S as Pp,h as Wn,m as Lp,c as Gi,d as _p,b as $p}from"./chat-context-C_0NQZnu.js";import{c as zp}from"./monaco-editor-BiBep5KI.js";import{g as mu,M as Bp}from"./index-D_Ke4qVo.js";import{f as Fp,n as Hp,o as Vp}from"./tab-id-BijBBRwE.js";import{i as gu}from"./AlertCircle-DG4a-YPJ.js";import{s as Wp}from"./Eye-BpNdlDWP.js";import{s as es,t as xu}from"./Star01-BH1rvlEO.js";import{s as Up}from"./XClose-BiShBa_h.js";import{n as Zo}from"./ZapSquare-OWnxdaqo.js";import{n as yu,i as qp}from"./Globe01-DYMLCnX6.js";import{c as Kp,b as Jp}from"./Tool01-DcHeaUVL.js";import{i as ia,a as Gp}from"./ZoomOut-CDmvqBAB.js";import{i as nr}from"./Monitor01-DlZ0h2Cv.js";import{i as Xp}from"./SearchMd-BKcd0fB6.js";import{i as Yp}from"./Upload01-BRK5C5r6.js";import{u as Qp,a as Zp}from"./shell-layout-DXe7SFEe.js";import{a as Rr}from"./Image01-4bzNBeP8.js";import{n as bu}from"./LinkExternal01-C3ixLwyv.js";import{I as qt}from"./integration-icon-lunUJ8Ws.js";import{i as em}from"./ArrowUpRight-BYqJ_odf.js";import{a as Xi}from"./Users03-Cttn4hE2.js";import{a as dt}from"./Palette-LHyI2Mdb.js";import{c as ku}from"./use-navigate-to-agent--gTBVJlO.js";import{a as tm}from"./Stars02-B-LWJdG7.js";import{g as nm}from"./AreaChart-BJOksRko.js";import{a as rm,D as sm,c as om,d as im,e as lm}from"./dialog-D-FV4Zb0.js";import{a as am,F as cm,b as um,c as dm,d as fm,f as hm}from"./form-CrzvXOa7.js";import{I as pm}from"./input-CD4iLUlU.js";import{a as mm}from"./UserPlus01-BYCDJ1qH.js";const gm={openrouter:n=>{const e=n?.openrouter;return typeof e=="object"&&e!==null&&"usage"in e&&typeof e.usage=="object"&&e.usage!==null&&"cost"in e.usage&&typeof e.usage.cost=="number"?e.usage.cost:null}};function Su(n){if(!n?.providerMetadata)return 0;for(const e of Object.values(gm)){const t=e(n.providerMetadata);if(t!==null)return t}return 0}function vu(){return{inputTokens:0,outputTokens:0,reasoningTokens:0,totalTokens:0,cost:0,cacheReadTokens:0,cacheWriteTokens:0}}function wu(n,e){if(!e)return n;const t=e.inputTokenDetails?.cacheReadTokens??e.cachedInputTokens??0,r=e.inputTokenDetails?.cacheWriteTokens??0;return{inputTokens:n.inputTokens+(e.inputTokens??0),outputTokens:n.outputTokens+(e.outputTokens??0),reasoningTokens:n.reasoningTokens+(e.reasoningTokens??0),totalTokens:n.totalTokens+(e.totalTokens??0),cost:n.cost+Su(e),cacheReadTokens:n.cacheReadTokens+t,cacheWriteTokens:n.cacheWriteTokens+r}}function KC(n){return n.reduce((e,t)=>wu(e,t.metadata?.usage),vu())}const xm={damping:.7,stiffness:.05,mass:1.25},ym=70,bm=1e3/60,km=350;let Gs=!1;globalThis.document?.addEventListener("mousedown",()=>{Gs=!0});globalThis.document?.addEventListener("mouseup",()=>{Gs=!1});globalThis.document?.addEventListener("click",()=>{Gs=!1});const Sm=(n={})=>{const[e,t]=E.useState(!1),[r,s]=E.useState(n.initial!==!1),[o,i]=E.useState(!1),l=E.useRef(null);l.current=n;const a=E.useCallback(()=>{if(!Gs)return!1;const b=window.getSelection();if(!b||!b.rangeCount)return!1;const k=b.getRangeAt(0);return k.commonAncestorContainer.contains(x.current)||x.current?.contains(k.commonAncestorContainer)},[]),c=E.useCallback(b=>{d.isAtBottom=b,s(b)},[]),u=E.useCallback(b=>{d.escapedFromLock=b,t(b)},[]),d=E.useMemo(()=>{let b;return{escapedFromLock:e,isAtBottom:r,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return x.current?.scrollTop??0},set scrollTop(k){if(x.current){const{scrollBehavior:S}=getComputedStyle(x.current);S!=="auto"&&(x.current.style.scrollBehavior="auto"),x.current.scrollTop=k,d.ignoreScrollToTop=x.current.scrollTop,S!=="auto"&&(x.current.style.scrollBehavior=S)}},get targetScrollTop(){return!x.current||!y.current?0:x.current.scrollHeight-1-x.current.clientHeight},get calculatedTargetScrollTop(){if(!x.current||!y.current)return 0;const{targetScrollTop:k}=this;if(!n.targetScrollTop)return k;if(b?.targetScrollTop===k)return b.calculatedScrollTop;const S=Math.max(Math.min(n.targetScrollTop(k,{scrollElement:x.current,contentElement:y.current}),k),0);return b={targetScrollTop:k,calculatedScrollTop:S},requestAnimationFrame(()=>{b=void 0}),S},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=ym}}},[]),f=E.useCallback((b={})=>{typeof b=="string"&&(b={animation:b}),b.preserveScrollPosition||c(!0);const k=Date.now()+(Number(b.wait)||0),S=bo(l.current,b.animation),{ignoreEscapes:v=!1}=b;let w,C=d.calculatedTargetScrollTop;b.duration instanceof Promise?b.duration.finally(()=>{w=Date.now()}):w=k+(b.duration??0);const T=async()=>{const N=new Promise(requestAnimationFrame).then(()=>{if(!d.isAtBottom)return d.animation=void 0,!1;const{scrollTop:M}=d,j=performance.now(),R=(j-(d.lastTick??j))/bm;if(d.animation||(d.animation={behavior:S,promise:N,ignoreEscapes:v}),d.animation.behavior===S&&(d.lastTick=j),a()||k>Date.now())return T();if(M<Math.min(C,d.calculatedTargetScrollTop)){if(d.animation?.behavior===S){if(S==="instant")return d.scrollTop=d.calculatedTargetScrollTop,T();d.velocity=(S.damping*d.velocity+S.stiffness*d.scrollDifference)/S.mass,d.accumulated+=d.velocity*R,d.scrollTop+=d.accumulated,d.scrollTop!==M&&(d.accumulated=0)}return T()}return w>Date.now()?(C=d.calculatedTargetScrollTop,T()):(d.animation=void 0,d.scrollTop<d.calculatedTargetScrollTop?f({animation:bo(l.current,l.current.resize),ignoreEscapes:v,duration:Math.max(0,w-Date.now())||void 0}):d.isAtBottom)});return N.then(M=>(requestAnimationFrame(()=>{d.animation||(d.lastTick=void 0,d.velocity=0)}),M))};return b.wait!==!0&&(d.animation=void 0),d.animation?.behavior===S?d.animation.promise:T()},[c,a,d]),h=E.useCallback(()=>{u(!0),c(!1)},[u,c]),m=E.useCallback(({target:b})=>{if(b!==x.current)return;const{scrollTop:k,ignoreScrollToTop:S}=d;let{lastScrollTop:v=k}=d;d.lastScrollTop=k,d.ignoreScrollToTop=void 0,S&&S>k&&(v=S),i(d.isNearBottom),setTimeout(()=>{if(d.resizeDifference||k===S)return;if(a()){u(!0),c(!1);return}const w=k>v,C=k<v;if(d.animation?.ignoreEscapes){d.scrollTop=v;return}C&&(u(!0),c(!1)),w&&u(!1),!d.escapedFromLock&&d.isNearBottom&&c(!0)},1)},[u,c,a,d]),g=E.useCallback(({target:b,deltaY:k})=>{let S=b;for(;!["scroll","auto"].includes(getComputedStyle(S).overflow);){if(!S.parentElement)return;S=S.parentElement}S===x.current&&k<0&&x.current.scrollHeight>x.current.clientHeight&&!d.animation?.ignoreEscapes&&(u(!0),c(!1))},[u,c,d]),x=la(b=>{x.current?.removeEventListener("scroll",m),x.current?.removeEventListener("wheel",g),b?.addEventListener("scroll",m,{passive:!0}),b?.addEventListener("wheel",g,{passive:!0})},[]),y=la(b=>{if(d.resizeObserver?.disconnect(),d.resizeObserver=void 0,!b)return;let k;d.resizeObserver=new ResizeObserver(([S])=>{const{height:v}=S.contentRect,w=v-(k??v);if(d.resizeDifference=w,d.scrollTop>d.targetScrollTop&&(d.scrollTop=d.targetScrollTop),i(d.isNearBottom),w>=0){const C=bo(l.current,k?l.current.resize:l.current.initial);f({animation:C,wait:!0,preserveScrollPosition:!0,duration:C==="instant"?void 0:km})}else d.isNearBottom&&(u(!1),c(!0));k=v,requestAnimationFrame(()=>{setTimeout(()=>{d.resizeDifference===w&&(d.resizeDifference=0)},1)})}),d.resizeObserver?.observe(b)},[]);return{contentRef:y,scrollRef:x,scrollToBottom:f,stopScroll:h,isAtBottom:r||o,isNearBottom:o,escapedFromLock:e,state:d}};function la(n,e){const t=E.useCallback(r=>(t.current=r,n(r)),e);return t}const yo=new Map;function bo(...n){const e={...xm};let t=!1;for(const s of n){if(s==="instant"){t=!0;continue}typeof s=="object"&&(t=!1,e.damping=s.damping??e.damping,e.stiffness=s.stiffness??e.stiffness,e.mass=s.mass??e.mass)}const r=JSON.stringify(e);return yo.has(r)||yo.set(r,Object.freeze(e)),t?"instant":yo.get(r)}function vm(n){return n.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")}function Yi(n){if(n&&typeof n=="object"&&"gatewayClientId"in n&&typeof n.gatewayClientId=="string")return n.gatewayClientId}function Qi(n,e){if(!e)return n;const t=`${vm(e)}_`;return n.startsWith(t)?n.slice(t.length):n}function wm(n,e){return Qi(n,e).replace(/[_-]/g," ").toLowerCase()}function Cm(n){const e={};for(const t of n?.arguments??[])e[t.name]=t.required?ra().min(1,"Required"):ra();return Jh(e)}function Tm(n,e){const t={};for(const r of n.arguments??[])t[r.name]=e?.[r.name]??"";return t}function Nm(n){const e=_.c(67),{prompt:t,setPrompt:r,onSubmit:s,defaultValues:o}=n,i=E.useId();let l,a;if(e[0]!==t){const L=Cm(t);a=Gh,l=Kh(L),e[0]=t,e[1]=l,e[2]=a}else l=e[1],a=e[2];let c;e[3]!==o||e[4]!==t?(c=t?Tm(t,o):{},e[3]=o,e[4]=t,e[5]=c):c=e[5];let u;e[6]!==l||e[7]!==c?(u={resolver:l,defaultValues:c,mode:"onChange"},e[6]=l,e[7]=c,e[8]=u):u=e[8];const d=a(u);let f;e[9]!==t?.arguments?(f=t?.arguments??[],e[9]=t?.arguments,e[10]=f):f=e[10];const h=f;let m;e[11]!==d||e[12]!==s||e[13]!==r?(m=async L=>{await s(L),r(null),d.reset()},e[11]=d,e[12]=s,e[13]=r,e[14]=m):m=e[14];const g=m;let x;e[15]!==d||e[16]!==r?(x=L=>{L||(d.reset(),r(null))},e[15]=d,e[16]=r,e[17]=x):x=e[17];const y=x;if(!t)return null;let b;e[18]!==t._meta||e[19]!==t.name||e[20]!==t.title?(b=t.title||wm(t.name,Yi(t._meta)),e[18]=t._meta,e[19]=t.name,e[20]=t.title,e[21]=b):b=e[21];let k;e[22]!==b?(k=p.jsx(rm,{children:p.jsx("span",{className:"capitalize",children:b})}),e[22]=b,e[23]=k):k=e[23];let S;e[24]!==t.description?(S=t.description&&p.jsx("p",{className:"text-sm text-muted-foreground",children:t.description}),e[24]=t.description,e[25]=S):S=e[25];let v;e[26]!==S||e[27]!==k?(v=p.jsxs(sm,{children:[k,S]}),e[26]=S,e[27]=k,e[28]=v):v=e[28];let w;e[29]!==d||e[30]!==g?(w=L=>{L.stopPropagation(),d.handleSubmit(g)(L)},e[29]=d,e[30]=g,e[31]=w):w=e[31];let C;if(e[32]!==h||e[33]!==d.control||e[34]!==d.formState.isSubmitting){let L;e[36]!==d.control||e[37]!==d.formState.isSubmitting?(L=z=>p.jsx(cm,{control:d.control,name:z.name,render:F=>{const{field:U}=F;return p.jsxs(um,{children:[p.jsxs(dm,{className:"text-xs",children:[z.name,z.required?null:p.jsxs("span",{className:"text-muted-foreground font-normal",children:[" ","(optional)"]})]}),p.jsx(fm,{children:p.jsx(pm,{...U,value:U.value??"",required:z.required,placeholder:z.description??"",className:"h-9",disabled:d.formState.isSubmitting})}),p.jsx(hm,{})]})}},z.name),e[36]=d.control,e[37]=d.formState.isSubmitting,e[38]=L):L=e[38],C=h.map(L),e[32]=h,e[33]=d.control,e[34]=d.formState.isSubmitting,e[35]=C}else C=e[35];let T;e[39]!==y?(T=()=>y(!1),e[39]=y,e[40]=T):T=e[40];let N;e[41]!==d.formState.isSubmitting||e[42]!==T?(N=p.jsx(un,{type:"button",variant:"ghost",onClick:T,disabled:d.formState.isSubmitting,children:"Cancel"}),e[41]=d.formState.isSubmitting,e[42]=T,e[43]=N):N=e[43];let M;e[44]!==d.formState.isSubmitting?(M=d.formState.isSubmitting?p.jsxs("span",{className:"flex items-center gap-2",children:[p.jsx(Pp,{size:"xs"}),"Loading..."]}):"Use prompt",e[44]=d.formState.isSubmitting,e[45]=M):M=e[45];let j;e[46]!==d.formState.isSubmitting||e[47]!==i||e[48]!==M?(j=p.jsx(un,{type:"submit",form:i,disabled:d.formState.isSubmitting,children:M}),e[46]=d.formState.isSubmitting,e[47]=i,e[48]=M,e[49]=j):j=e[49];let R;e[50]!==N||e[51]!==j?(R=p.jsxs(om,{children:[N,j]}),e[50]=N,e[51]=j,e[52]=R):R=e[52];let A;e[53]!==i||e[54]!==w||e[55]!==C||e[56]!==R?(A=p.jsxs("form",{id:i,className:"space-y-4 py-4",autoComplete:"off",onSubmit:w,children:[C,R]}),e[53]=i,e[54]=w,e[55]=C,e[56]=R,e[57]=A):A=e[57];let D;e[58]!==d||e[59]!==A?(D=p.jsx(am,{...d,children:A}),e[58]=d,e[59]=A,e[60]=D):D=e[60];let I;e[61]!==v||e[62]!==D?(I=p.jsxs(im,{className:"sm:max-w-lg max-h-[80vh] overflow-y-auto",children:[v,D]}),e[61]=v,e[62]=D,e[63]=I):I=e[63];let $;return e[64]!==y||e[65]!==I?($=p.jsx(lm,{open:!0,onOpenChange:y,children:I}),e[64]=y,e[65]=I,e[66]=$):$=e[66],$}function Cu(n){return n?n.replace(/[_-]/g," ").toLowerCase().split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "):""}function ot(n,e){return n==="output-error"||n==="output-denied"?"error":n==="approval-requested"?"approval":n==="input-streaming"||n==="input-available"||n==="output-available"&&e===!0?"loading":"idle"}function Un(n){if(n==null||typeof n!="object")return;const e=n;if(e.structuredContent&&typeof e.structuredContent=="object")return e.structuredContent;if(Array.isArray(e.content)){const t=e.content[0];if(t?.type==="text"&&typeof t.text=="string")try{return JSON.parse(t.text)}catch{return}return}return n}function Ne(n){this.content=n}Ne.prototype={constructor:Ne,find:function(n){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===n)return e;return-1},get:function(n){var e=this.find(n);return e==-1?void 0:this.content[e+1]},update:function(n,e,t){var r=t&&t!=n?this.remove(t):this,s=r.find(n),o=r.content.slice();return s==-1?o.push(t||n,e):(o[s+1]=e,t&&(o[s]=t)),new Ne(o)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new Ne(t)},addToStart:function(n,e){return new Ne([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new Ne(t)},addBefore:function(n,e,t){var r=this.remove(e),s=r.content.slice(),o=r.find(n);return s.splice(o==-1?s.length:o,0,e,t),new Ne(s)},forEach:function(n){for(var e=0;e<this.content.length;e+=2)n(this.content[e],this.content[e+1])},prepend:function(n){return n=Ne.from(n),n.size?new Ne(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=Ne.from(n),n.size?new Ne(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=Ne.from(n);for(var t=0;t<n.content.length;t+=2)e=e.remove(n.content[t]);return e},toObject:function(){var n={};return this.forEach(function(e,t){n[e]=t}),n},get size(){return this.content.length>>1}};Ne.from=function(n){if(n instanceof Ne)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new Ne(e)};function Tu(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let s=n.child(r),o=e.child(r);if(s==o){t+=s.nodeSize;continue}if(!s.sameMarkup(o))return t;if(s.isText&&s.text!=o.text){for(let i=0;s.text[i]==o.text[i];i++)t++;return t}if(s.content.size||o.content.size){let i=Tu(s.content,o.content,t+1);if(i!=null)return i}t+=s.nodeSize}}function Nu(n,e,t,r){for(let s=n.childCount,o=e.childCount;;){if(s==0||o==0)return s==o?null:{a:t,b:r};let i=n.child(--s),l=e.child(--o),a=i.nodeSize;if(i==l){t-=a,r-=a;continue}if(!i.sameMarkup(l))return{a:t,b:r};if(i.isText&&i.text!=l.text){let c=0,u=Math.min(i.text.length,l.text.length);for(;c<u&&i.text[i.text.length-c-1]==l.text[l.text.length-c-1];)c++,t--,r--;return{a:t,b:r}}if(i.content.size||l.content.size){let c=Nu(i.content,l.content,t-1,r-1);if(c)return c}t-=a,r-=a}}class O{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,s=0,o){for(let i=0,l=0;l<t;i++){let a=this.content[i],c=l+a.nodeSize;if(c>e&&r(a,s+l,o||null,i)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,t-u),r,s+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,s){let o="",i=!0;return this.nodesBetween(e,t,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,t-a):l.isLeaf?s?typeof s=="function"?s(l):s:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(i?i=!1:o+=r),o+=c},0),o}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,s=this.content.slice(),o=0;for(t.isText&&t.sameMarkup(r)&&(s[s.length-1]=t.withText(t.text+r.text),o=1);o<e.content.length;o++)s.push(e.content[o]);return new O(s,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],s=0;if(t>e)for(let o=0,i=0;i<t;o++){let l=this.content[o],a=i+l.nodeSize;a>e&&((i<e||a>t)&&(l.isText?l=l.cut(Math.max(0,e-i),Math.min(l.text.length,t-i)):l=l.cut(Math.max(0,e-i-1),Math.min(l.content.size,t-i-1))),r.push(l),s+=l.nodeSize),i=a}return new O(r,s)}cutByIndex(e,t){return e==t?O.empty:e==0&&t==this.content.length?this:new O(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let s=this.content.slice(),o=this.size+t.nodeSize-r.nodeSize;return s[e]=t,new O(s,o)}addToStart(e){return new O([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new O(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))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(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let s=this.content[t];e(s,r,t),r+=s.nodeSize}}findDiffStart(e,t=0){return Tu(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return Nu(this,e,t,r)}findIndex(e){if(e==0)return Dr(0,e);if(e==this.size)return Dr(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,r=0;;t++){let s=this.child(t),o=r+s.nodeSize;if(o>=e)return o==e?Dr(t+1,o):Dr(t,r);r=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return O.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new O(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return O.empty;let t,r=0;for(let s=0;s<e.length;s++){let o=e[s];r+=o.nodeSize,s&&o.isText&&e[s-1].sameMarkup(o)?(t||(t=e.slice(0,s)),t[t.length-1]=o.withText(t[t.length-1].text+o.text)):t&&t.push(o)}return new O(t||e,r)}static from(e){if(!e)return O.empty;if(e instanceof O)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new O([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}O.empty=new O([],0);const ko={index:0,offset:0};function Dr(n,e){return ko.index=n,ko.offset=e,ko}function ts(n,e){if(n===e)return!0;if(!(n&&typeof n=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(n);if(Array.isArray(e)!=t)return!1;if(t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!ts(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!ts(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let le=class ei{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let s=0;s<e.length;s++){let o=e[s];if(this.eq(o))return e;if(this.type.excludes(o.type))t||(t=e.slice(0,s));else{if(o.type.excludes(this.type))return e;!r&&o.type.rank>this.type.rank&&(t||(t=e.slice(0,s)),t.push(this),r=!0),t&&t.push(o)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&ts(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw new RangeError(`There is no mark type ${t.type} in this schema`);let s=r.create(t.attrs);return r.checkAttrs(s.attrs),s}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return ei.none;if(e instanceof ei)return[e];let t=e.slice();return t.sort((r,s)=>r.type.rank-s.type.rank),t}};le.none=[];class ns extends Error{}class B{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=Eu(this.content,e+this.openStart,t);return r&&new B(r,this.openStart,this.openEnd)}removeBetween(e,t){return new B(Mu(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return B.empty;let r=t.openStart||0,s=t.openEnd||0;if(typeof r!="number"||typeof s!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new B(O.fromJSON(e,t.content),r,s)}static maxOpen(e,t=!0){let r=0,s=0;for(let o=e.firstChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=e.lastChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.lastChild)s++;return new B(e,r,s)}}B.empty=new B(O.empty,0,0);function Mu(n,e,t){let{index:r,offset:s}=n.findIndex(e),o=n.maybeChild(r),{index:i,offset:l}=n.findIndex(t);if(s==e||o.isText){if(l!=t&&!n.child(i).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=i)throw new RangeError("Removing non-flat range");return n.replaceChild(r,o.copy(Mu(o.content,e-s-1,t-s-1)))}function Eu(n,e,t,r){let{index:s,offset:o}=n.findIndex(e),i=n.maybeChild(s);if(o==e||i.isText)return r&&!r.canReplace(s,s,t)?null:n.cut(0,e).append(t).append(n.cut(e));let l=Eu(i.content,e-o-1,t,i);return l&&n.replaceChild(s,i.copy(l))}function Mm(n,e,t){if(t.openStart>n.depth)throw new ns("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new ns("Inconsistent open depths");return Au(n,e,t,0)}function Au(n,e,t,r){let s=n.index(r),o=n.node(r);if(s==e.index(r)&&r<n.depth-t.openStart){let i=Au(n,e,t,r+1);return o.copy(o.content.replaceChild(s,i))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let i=n.parent,l=i.content;return on(i,l.cut(0,n.parentOffset).append(t.content).append(l.cut(e.parentOffset)))}else{let{start:i,end:l}=Em(t,n);return on(o,Iu(n,i,l,e,r))}else return on(o,rs(n,e,r))}function ju(n,e){if(!e.type.compatibleContent(n.type))throw new ns("Cannot join "+e.type.name+" onto "+n.type.name)}function ti(n,e,t){let r=n.node(t);return ju(r,e.node(t)),r}function sn(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function rr(n,e,t,r){let s=(e||n).node(t),o=0,i=e?e.index(t):s.childCount;n&&(o=n.index(t),n.depth>t?o++:n.textOffset&&(sn(n.nodeAfter,r),o++));for(let l=o;l<i;l++)sn(s.child(l),r);e&&e.depth==t&&e.textOffset&&sn(e.nodeBefore,r)}function on(n,e){return n.type.checkContent(e),n.copy(e)}function Iu(n,e,t,r,s){let o=n.depth>s&&ti(n,e,s+1),i=r.depth>s&&ti(t,r,s+1),l=[];return rr(null,n,s,l),o&&i&&e.index(s)==t.index(s)?(ju(o,i),sn(on(o,Iu(n,e,t,r,s+1)),l)):(o&&sn(on(o,rs(n,e,s+1)),l),rr(e,t,s,l),i&&sn(on(i,rs(t,r,s+1)),l)),rr(r,null,s,l),new O(l)}function rs(n,e,t){let r=[];if(rr(null,n,t,r),n.depth>t){let s=ti(n,e,t+1);sn(on(s,rs(n,e,t+1)),r)}return rr(e,null,t,r),new O(r)}function Em(n,e){let t=e.depth-n.openStart,s=e.node(t).copy(n.content);for(let o=t-1;o>=0;o--)s=e.node(o).copy(O.from(s));return{start:s.resolveNoCache(n.openStart+t),end:s.resolveNoCache(s.content.size-n.openEnd-t)}}class pr{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],s=e.child(t);return r?e.child(t).cut(r):s}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],s=t==0?0:this.path[t*3-1]+1;for(let o=0;o<e;o++)s+=r.child(o).nodeSize;return s}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return le.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),s=e.maybeChild(t);if(!r){let l=r;r=s,s=l}let o=r.marks;for(var i=0;i<o.length;i++)o[i].type.spec.inclusive===!1&&(!s||!o[i].isInSet(s.marks))&&(o=o[i--].removeFromSet(o));return o}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,s=e.parent.maybeChild(e.index());for(var o=0;o<r.length;o++)r[o].type.spec.inclusive===!1&&(!s||!r[o].isInSet(s.marks))&&(r=r[o--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new ss(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],s=0,o=t;for(let i=e;;){let{index:l,offset:a}=i.content.findIndex(o),c=o-a;if(r.push(i,l,s+a),!c||(i=i.child(l),i.isText))break;o=c-1,s+=a+1}return new pr(t,r,o)}static resolveCached(e,t){let r=aa.get(e);if(r)for(let o=0;o<r.elts.length;o++){let i=r.elts[o];if(i.pos==t)return i}else aa.set(e,r=new Am);let s=r.elts[r.i]=pr.resolve(e,t);return r.i=(r.i+1)%jm,s}}class Am{constructor(){this.elts=[],this.i=0}}const jm=12,aa=new WeakMap;class ss{constructor(e,t,r){this.$from=e,this.$to=t,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 Im=Object.create(null);class st{constructor(e,t,r,s=le.none){this.type=e,this.attrs=t,this.marks=s,this.content=r||O.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,r,s=0){this.content.nodesBetween(e,t,r,s,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,r,s){return this.content.textBetween(e,t,r,s)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,r){return this.type==e&&ts(this.attrs,t||e.defaultAttrs||Im)&&le.sameSet(this.marks,r||le.none)}copy(e=null){return e==this.content?this:new st(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new st(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return B.empty;let s=this.resolve(e),o=this.resolve(t),i=r?0:s.sharedDepth(t),l=s.start(i),c=s.node(i).content.cut(s.pos-l,o.pos-l);return new B(c,s.depth-i,o.depth-i)}replace(e,t,r){return Mm(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:s}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(s==e||t.isText)return t;e-=s+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let s=this.content.child(t-1);return{node:s,index:t-1,offset:r-s.nodeSize}}resolve(e){return pr.resolveCached(this,e)}resolveNoCache(e){return pr.resolve(this,e)}rangeHasMark(e,t,r){let s=!1;return t>e&&this.nodesBetween(e,t,o=>(r.isInSet(o.marks)&&(s=!0),!s)),s}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 e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),Ou(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=O.empty,s=0,o=r.childCount){let i=this.contentMatchAt(e).matchFragment(r,s,o),l=i&&i.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let a=s;a<o;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0}canReplaceWith(e,t,r,s){if(s&&!this.type.allowsMarks(s))return!1;let o=this.contentMatchAt(e).matchType(r),i=o&&o.matchFragment(this.content,t);return i?i.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=le.none;for(let t=0;t<this.marks.length;t++){let r=this.marks[t];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!le.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let s=O.fromJSON(e,t.content),o=e.nodeType(t.type).create(t.attrs,s,r);return o.type.checkAttrs(o.attrs),o}}st.prototype.text=void 0;class is extends st{constructor(e,t,r,s){if(super(e,t,null,s),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Ou(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new is(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new is(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function Ou(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class mn{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new Om(e,t);if(r.next==null)return mn.empty;let s=Ru(r);r.next&&r.err("Unexpected trailing text");let o=zm($m(s));return Bm(o,r),o}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let s=this;for(let o=t;s&&o<r;o++)s=s.matchType(e.child(o).type);return s}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let s=[this];function o(i,l){let a=i.matchFragment(e,r);if(a&&(!t||a.validEnd))return O.from(l.map(c=>c.createAndFill()));for(let c=0;c<i.next.length;c++){let{type:u,next:d}=i.next[c];if(!(u.isText||u.hasRequiredAttrs())&&s.indexOf(d)==-1){s.push(d);let f=o(d,l.concat(u));if(f)return f}}return null}return o(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let s=r.shift(),o=s.match;if(o.matchType(e)){let i=[];for(let l=s;l.type;l=l.via)i.push(l.type);return i.reverse()}for(let i=0;i<o.next.length;i++){let{type:l,next:a}=o.next[i];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in t)&&(!s.type||a.validEnd)&&(r.push({match:l.contentMatch,type:l,via:s}),t[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let s=0;s<r.next.length;s++)e.indexOf(r.next[s].next)==-1&&t(r.next[s].next)}return t(this),e.map((r,s)=>{let o=s+(r.validEnd?"*":" ")+" ";for(let i=0;i<r.next.length;i++)o+=(i?", ":"")+r.next[i].type.name+"->"+e.indexOf(r.next[i].next);return o}).join(`
|
|
2
2
|
`)}}mn.empty=new mn(!0);class Om{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.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(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function Ru(n){let e=[];do e.push(Rm(n));while(n.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function Rm(n){let e=[];do e.push(Dm(n));while(n.next&&n.next!=")"&&n.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function Dm(n){let e=_m(n);for(;;)if(n.eat("+"))e={type:"plus",expr:e};else if(n.eat("*"))e={type:"star",expr:e};else if(n.eat("?"))e={type:"opt",expr:e};else if(n.eat("{"))e=Pm(n,e);else break;return e}function ca(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function Pm(n,e){let t=ca(n),r=t;return n.eat(",")&&(n.next!="}"?r=ca(n):r=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function Lm(n,e){let t=n.nodeTypes,r=t[e];if(r)return[r];let s=[];for(let o in t){let i=t[o];i.isInGroup(e)&&s.push(i)}return s.length==0&&n.err("No node type or group '"+e+"' found"),s}function _m(n){if(n.eat("(")){let e=Ru(n);return n.eat(")")||n.err("Missing closing paren"),e}else if(/\W/.test(n.next))n.err("Unexpected token '"+n.next+"'");else{let e=Lm(n,n.next).map(t=>(n.inline==null?n.inline=t.isInline:n.inline!=t.isInline&&n.err("Mixing inline and block content"),{type:"name",value:t}));return n.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function $m(n){let e=[[]];return s(o(n,0),t()),e;function t(){return e.push([])-1}function r(i,l,a){let c={term:a,to:l};return e[i].push(c),c}function s(i,l){i.forEach(a=>a.to=l)}function o(i,l){if(i.type=="choice")return i.exprs.reduce((a,c)=>a.concat(o(c,l)),[]);if(i.type=="seq")for(let a=0;;a++){let c=o(i.exprs[a],l);if(a==i.exprs.length-1)return c;s(c,l=t())}else if(i.type=="star"){let a=t();return r(l,a),s(o(i.expr,a),a),[r(a)]}else if(i.type=="plus"){let a=t();return s(o(i.expr,l),a),s(o(i.expr,a),a),[r(a)]}else{if(i.type=="opt")return[r(l)].concat(o(i.expr,l));if(i.type=="range"){let a=l;for(let c=0;c<i.min;c++){let u=t();s(o(i.expr,a),u),a=u}if(i.max==-1)s(o(i.expr,a),a);else for(let c=i.min;c<i.max;c++){let u=t();r(a,u),s(o(i.expr,a),u),a=u}return[r(a)]}else{if(i.type=="name")return[r(l,void 0,i.value)];throw new Error("Unknown expr type")}}}}function Du(n,e){return e-n}function ua(n,e){let t=[];return r(e),t.sort(Du);function r(s){let o=n[s];if(o.length==1&&!o[0].term)return r(o[0].to);t.push(s);for(let i=0;i<o.length;i++){let{term:l,to:a}=o[i];!l&&t.indexOf(a)==-1&&r(a)}}}function zm(n){let e=Object.create(null);return t(ua(n,0));function t(r){let s=[];r.forEach(i=>{n[i].forEach(({term:l,to:a})=>{if(!l)return;let c;for(let u=0;u<s.length;u++)s[u][0]==l&&(c=s[u][1]);ua(n,a).forEach(u=>{c||s.push([l,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let o=e[r.join(",")]=new mn(r.indexOf(n.length-1)>-1);for(let i=0;i<s.length;i++){let l=s[i][1].sort(Du);o.next.push({type:s[i][0],next:e[l.join(",")]||t(l)})}return o}}function Bm(n,e){for(let t=0,r=[n];t<r.length;t++){let s=r[t],o=!s.validEnd,i=[];for(let l=0;l<s.next.length;l++){let{type:a,next:c}=s.next[l];i.push(a.name),o&&!(a.isText||a.hasRequiredAttrs())&&(o=!1),r.indexOf(c)==-1&&r.push(c)}o&&e.err("Only non-generatable nodes ("+i.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function Pu(n){let e=Object.create(null);for(let t in n){let r=n[t];if(!r.hasDefault)return null;e[t]=r.default}return e}function Lu(n,e){let t=Object.create(null);for(let r in n){let s=e&&e[r];if(s===void 0){let o=n[r];if(o.hasDefault)s=o.default;else throw new RangeError("No value supplied for attribute "+r)}t[r]=s}return t}function _u(n,e,t,r){for(let s in e)if(!(s in n))throw new RangeError(`Unsupported attribute ${s} for ${t} of type ${s}`);for(let s in n){let o=n[s];o.validate&&o.validate(e[s])}}function $u(n,e){let t=Object.create(null);if(e)for(let r in e)t[r]=new Hm(n,r,e[r]);return t}let da=class zu{constructor(e,t,r){this.name=e,this.schema=t,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=$u(e,r.attrs),this.defaultAttrs=Pu(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==mn.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:Lu(this.attrs,e)}create(e=null,t,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new st(this,this.computeAttrs(e),O.from(t),le.setFrom(r))}createChecked(e=null,t,r){return t=O.from(t),this.checkContent(t),new st(this,this.computeAttrs(e),t,le.setFrom(r))}createAndFill(e=null,t,r){if(e=this.computeAttrs(e),t=O.from(t),t.size){let i=this.contentMatch.fillBefore(t);if(!i)return null;t=i.append(t)}let s=this.contentMatch.matchFragment(t),o=s&&s.fillBefore(O.empty,!0);return o?new st(this,e,t.append(o),le.setFrom(r)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){_u(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?t&&t.push(e[r]):t||(t=e.slice(0,r));return t?t.length?t:le.none:e}static compile(e,t){let r=Object.create(null);e.forEach((o,i)=>r[o]=new zu(o,t,i));let s=t.spec.topNode||"doc";if(!r[s])throw new RangeError("Schema is missing its top node type ('"+s+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let o in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function Fm(n,e,t){let r=t.split("|");return s=>{let o=s===null?"null":typeof s;if(r.indexOf(o)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${n}, got ${o}`)}}class Hm{constructor(e,t,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?Fm(e,t,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class Xs{constructor(e,t,r,s){this.name=e,this.rank=t,this.schema=r,this.spec=s,this.attrs=$u(e,s.attrs),this.excluded=null;let o=Pu(this.attrs);this.instance=o?new le(this,o):null}create(e=null){return!e&&this.instance?this.instance:new le(this,Lu(this.attrs,e))}static compile(e,t){let r=Object.create(null),s=0;return e.forEach((o,i)=>r[o]=new Xs(o,s++,t,i)),r}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){_u(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class Bu{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let s in e)t[s]=e[s];t.nodes=Ne.from(e.nodes),t.marks=Ne.from(e.marks||{}),this.nodes=da.compile(this.spec.nodes,this),this.marks=Xs.compile(this.spec.marks,this);let r=Object.create(null);for(let s in this.nodes){if(s in this.marks)throw new RangeError(s+" can not be both a node and a mark");let o=this.nodes[s],i=o.spec.content||"",l=o.spec.marks;if(o.contentMatch=r[i]||(r[i]=mn.parse(i,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!o.isInline||!o.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=o}o.markSet=l=="_"?null:l?fa(this,l.split(" ")):l==""||!o.inlineContent?[]:null}for(let s in this.marks){let o=this.marks[s],i=o.spec.excludes;o.excluded=i==null?[o]:i==""?[]:fa(this,i.split(" "))}this.nodeFromJSON=s=>st.fromJSON(this,s),this.markFromJSON=s=>le.fromJSON(this,s),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,r,s){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof da){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(t,r,s)}text(e,t){let r=this.nodes.text;return new is(r,r.defaultAttrs,e,le.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function fa(n,e){let t=[];for(let r=0;r<e.length;r++){let s=e[r],o=n.marks[s],i=o;if(o)t.push(o);else for(let l in n.marks){let a=n.marks[l];(s=="_"||a.spec.group&&a.spec.group.split(" ").indexOf(s)>-1)&&t.push(i=a)}if(!i)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return t}function Vm(n){return n.tag!=null}function Wm(n){return n.style!=null}class $t{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let r=this.matchedStyles=[];t.forEach(s=>{if(Vm(s))this.tags.push(s);else if(Wm(s)){let o=/[^=]*/.exec(s.style)[0];r.indexOf(o)<0&&r.push(o),this.styles.push(s)}}),this.normalizeLists=!this.tags.some(s=>{if(!/^(ul|ol)\b/.test(s.tag)||!s.node)return!1;let o=e.nodes[s.node];return o.contentMatch.matchType(o)})}parse(e,t={}){let r=new pa(this,t,!1);return r.addAll(e,le.none,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new pa(this,t,!0);return r.addAll(e,le.none,t.from,t.to),B.maxOpen(r.finish())}matchTag(e,t,r){for(let s=r?this.tags.indexOf(r)+1:0;s<this.tags.length;s++){let o=this.tags[s];if(Km(e,o.tag)&&(o.namespace===void 0||e.namespaceURI==o.namespace)&&(!o.context||t.matchesContext(o.context))){if(o.getAttrs){let i=o.getAttrs(e);if(i===!1)continue;o.attrs=i||void 0}return o}}}matchStyle(e,t,r,s){for(let o=s?this.styles.indexOf(s)+1:0;o<this.styles.length;o++){let i=this.styles[o],l=i.style;if(!(l.indexOf(e)!=0||i.context&&!r.matchesContext(i.context)||l.length>e.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=t))){if(i.getAttrs){let a=i.getAttrs(t);if(a===!1)continue;i.attrs=a||void 0}return i}}}static schemaRules(e){let t=[];function r(s){let o=s.priority==null?50:s.priority,i=0;for(;i<t.length;i++){let l=t[i];if((l.priority==null?50:l.priority)<o)break}t.splice(i,0,s)}for(let s in e.marks){let o=e.marks[s].spec.parseDOM;o&&o.forEach(i=>{r(i=ma(i)),i.mark||i.ignore||i.clearMark||(i.mark=s)})}for(let s in e.nodes){let o=e.nodes[s].spec.parseDOM;o&&o.forEach(i=>{r(i=ma(i)),i.node||i.ignore||i.mark||(i.node=s)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new $t(e,$t.schemaRules(e)))}}const Fu={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},Um={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Hu={ol:!0,ul:!0},mr=1,ni=2,sr=4;function ha(n,e,t){return e!=null?(e?mr:0)|(e==="full"?ni:0):n&&n.whitespace=="pre"?mr|ni:t&~sr}class Pr{constructor(e,t,r,s,o,i){this.type=e,this.attrs=t,this.marks=r,this.solid=s,this.options=i,this.content=[],this.activeMarks=le.none,this.match=o||(i&sr?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(O.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let r=this.type.contentMatch,s;return(s=r.findWrapping(e.type))?(this.match=r,s):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&mr)){let r=this.content[this.content.length-1],s;if(r&&r.isText&&(s=/[ \t\r\n\u000c]+$/.exec(r.text))){let o=r;r.text.length==s[0].length?this.content.pop():this.content[this.content.length-1]=o.withText(o.text.slice(0,o.text.length-s[0].length))}}let t=O.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(O.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!Fu.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class pa{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let s=t.topNode,o,i=ha(null,t.preserveWhitespace,0)|(r?sr:0);s?o=new Pr(s.type,s.attrs,le.none,!0,t.topMatch||s.type.contentMatch,i):r?o=new Pr(null,null,le.none,!0,null,i):o=new Pr(e.schema.topNodeType,null,le.none,!0,null,i),this.nodes=[o],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let r=e.nodeValue,s=this.top,o=s.options&ni?"full":this.localPreserveWS||(s.options&mr)>0,{schema:i}=this.parser;if(o==="full"||s.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(o)if(o==="full")r=r.replace(/\r\n?/g,`
|
|
3
3
|
`);else if(i.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(i.linebreakReplacement.create())){let l=r.split(/\r?\n|\r/);for(let a=0;a<l.length;a++)a&&this.insertNode(i.linebreakReplacement.create(),t,!0),l[a]&&this.insertNode(i.text(l[a]),t,!/\S/.test(l[a]));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 l=s.content[s.content.length-1],a=e.previousSibling;(!l||a&&a.nodeName=="BR"||l.isText&&/[ \t\r\n\u000c]$/.test(l.text))&&(r=r.slice(1))}r&&this.insertNode(i.text(r),t,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,t,r){let s=this.localPreserveWS,o=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let i=e.nodeName.toLowerCase(),l;Hu.hasOwnProperty(i)&&this.parser.normalizeLists&&qm(e);let a=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(l=this.parser.matchTag(e,this,r));e:if(a?a.ignore:Um.hasOwnProperty(i))this.findInside(e),this.ignoreFallback(e,t);else if(!a||a.skip||a.closeParent){a&&a.closeParent?this.open=Math.max(0,this.open-1):a&&a.skip.nodeType&&(e=a.skip);let c,u=this.needsBlock;if(Fu.hasOwnProperty(i))o.content.length&&o.content[0].isInline&&this.open&&(this.open--,o=this.top),c=!0,o.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break e}let d=a&&a.skip?t:this.readStyles(e,t);d&&this.addAll(e,d),c&&this.sync(o),this.needsBlock=u}else{let c=this.readStyles(e,t);c&&this.addElementByRule(e,a,c,a.consuming===!1?l:void 0)}this.localPreserveWS=s}leafFallback(e,t){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
|
|
4
4
|
`),t)}ignoreFallback(e,t){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),t,!0)}readStyles(e,t){let r=e.style;if(r&&r.length)for(let s=0;s<this.parser.matchedStyles.length;s++){let o=this.parser.matchedStyles[s],i=r.getPropertyValue(o);if(i)for(let l=void 0;;){let a=this.parser.matchStyle(o,i,this,l);if(!a)break;if(a.ignore)return null;if(a.clearMark?t=t.filter(c=>!a.clearMark(c)):t=t.concat(this.parser.schema.marks[a.mark].create(a.attrs)),a.consuming===!1)l=a;else break}}return t}addElementByRule(e,t,r,s){let o,i;if(t.node)if(i=this.parser.schema.nodes[t.node],i.isLeaf)this.insertNode(i.create(t.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let a=this.enter(i,t.attrs||null,r,t.preserveWhitespace);a&&(o=!0,r=a)}else{let a=this.parser.schema.marks[t.mark];r=r.concat(a.create(t.attrs))}let l=this.top;if(i&&i.isLeaf)this.findInside(e);else if(s)this.addElement(e,r,s);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(a=>this.insertNode(a,r,!1));else{let a=e;typeof t.contentElement=="string"?a=e.querySelector(t.contentElement):typeof t.contentElement=="function"?a=t.contentElement(e):t.contentElement&&(a=t.contentElement),this.findAround(e,a,!0),this.addAll(a,r),this.findAround(e,a,!1)}o&&this.sync(l)&&this.open--}addAll(e,t,r,s){let o=r||0;for(let i=r?e.childNodes[r]:e.firstChild,l=s==null?null:e.childNodes[s];i!=l;i=i.nextSibling,++o)this.findAtPoint(e,o),this.addDOM(i,t);this.findAtPoint(e,o)}findPlace(e,t,r){let s,o;for(let i=this.open,l=0;i>=0;i--){let a=this.nodes[i],c=a.findWrapping(e);if(c&&(!s||s.length>c.length+l)&&(s=c,o=a,!c.length))break;if(a.solid){if(r)break;l+=2}}if(!s)return null;this.sync(o);for(let i=0;i<s.length;i++)t=this.enterInner(s[i],null,t,!1);return t}insertNode(e,t,r){if(e.isInline&&this.needsBlock&&!this.top.type){let o=this.textblockFromContext();o&&(t=this.enterInner(o,null,t))}let s=this.findPlace(e,t,r);if(s){this.closeExtra();let o=this.top;o.match&&(o.match=o.match.matchType(e.type));let i=le.none;for(let l of s.concat(e.marks))(o.type?o.type.allowsMarkType(l.type):ga(l.type,e.type))&&(i=l.addToSet(i));return o.content.push(e.mark(i)),!0}return!1}enter(e,t,r,s){let o=this.findPlace(e.create(t),r,!1);return o&&(o=this.enterInner(e,t,r,!0,s)),o}enterInner(e,t,r,s=!1,o){this.closeExtra();let i=this.top;i.match=i.match&&i.match.matchType(e);let l=ha(e,o,i.options);i.options&sr&&i.content.length==0&&(l|=sr);let a=le.none;return r=r.filter(c=>(i.type?i.type.allowsMarkType(c.type):ga(c.type,e))?(a=c.addToSet(a),!1):!0),this.nodes.push(new Pr(e,t,a,s,null,l)),this.open++,r}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));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(e){for(let t=this.open;t>=0;t--){if(this.nodes[t]==e)return this.open=t,!0;this.localPreserveWS&&(this.nodes[t].options|=mr)}return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let r=this.nodes[t].content;for(let s=r.length-1;s>=0;s--)e+=r[s].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==t&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,r){if(e!=t&&this.find)for(let s=0;s<this.find.length;s++)this.find[s].pos==null&&e.nodeType==1&&e.contains(this.find[s].node)&&t.compareDocumentPosition(this.find[s].node)&(r?2:4)&&(this.find[s].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),r=this.options.context,s=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),o=-(r?r.depth+1:0)+(s?0:1),i=(l,a)=>{for(;l>=0;l--){let c=t[l];if(c==""){if(l==t.length-1||l==0)continue;for(;a>=o;a--)if(i(l-1,a))return!0;return!1}else{let u=a>0||a==0&&s?this.nodes[a].type:r&&a>=o?r.node(a-o).type:null;if(!u||u.name!=c&&!u.isInGroup(c))return!1;a--}}return!0};return i(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let r=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let t in this.parser.schema.nodes){let r=this.parser.schema.nodes[t];if(r.isTextblock&&r.defaultAttrs)return r}}}function qm(n){for(let e=n.firstChild,t=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&Hu.hasOwnProperty(r)&&t?(t.appendChild(e),e=t):r=="li"?t=e:r&&(t=null)}}function Km(n,e){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,e)}function ma(n){let e={};for(let t in n)e[t]=n[t];return e}function ga(n,e){let t=e.schema.nodes;for(let r in t){let s=t[r];if(!s.allowsMarkType(n))continue;let o=[],i=l=>{o.push(l);for(let a=0;a<l.edgeCount;a++){let{type:c,next:u}=l.edge(a);if(c==e||o.indexOf(u)<0&&i(u))return!0}};if(i(s.contentMatch))return!0}}class Sn{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},r){r||(r=So(t).createDocumentFragment());let s=r,o=[];return e.forEach(i=>{if(o.length||i.marks.length){let l=0,a=0;for(;l<o.length&&a<i.marks.length;){let c=i.marks[a];if(!this.marks[c.type.name]){a++;continue}if(!c.eq(o[l][0])||c.type.spec.spanning===!1)break;l++,a++}for(;l<o.length;)s=o.pop()[1];for(;a<i.marks.length;){let c=i.marks[a++],u=this.serializeMark(c,i.isInline,t);u&&(o.push([c,s]),s.appendChild(u.dom),s=u.contentDOM||u.dom)}}s.appendChild(this.serializeNodeInner(i,t))}),r}serializeNodeInner(e,t){let{dom:r,contentDOM:s}=Jr(So(t),this.nodes[e.type.name](e),null,e.attrs);if(s){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,s)}return r}serializeNode(e,t={}){let r=this.serializeNodeInner(e,t);for(let s=e.marks.length-1;s>=0;s--){let o=this.serializeMark(e.marks[s],e.isInline,t);o&&((o.contentDOM||o.dom).appendChild(r),r=o.dom)}return r}serializeMark(e,t,r={}){let s=this.marks[e.type.name];return s&&Jr(So(r),s(e,t),null,e.attrs)}static renderSpec(e,t,r=null,s){return Jr(e,t,r,s)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Sn(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=xa(e.nodes);return t.text||(t.text=r=>r.text),t}static marksFromSchema(e){return xa(e.marks)}}function xa(n){let e={};for(let t in n){let r=n[t].spec.toDOM;r&&(e[t]=r)}return e}function So(n){return n.document||window.document}const ya=new WeakMap;function Jm(n){let e=ya.get(n);return e===void 0&&ya.set(n,e=Gm(n)),e}function Gm(n){let e=null;function t(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let s=0;s<r.length;s++)t(r[s]);else for(let s in r)t(r[s])}return t(n),e}function Jr(n,e,t,r){if(typeof e=="string")return{dom:n.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let s=e[0],o;if(typeof s!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(o=Jm(r))&&o.indexOf(e)>-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 i=s.indexOf(" ");i>0&&(t=s.slice(0,i),s=s.slice(i+1));let l,a=t?n.createElementNS(t,s):n.createElement(s),c=e[1],u=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){u=2;for(let d in c)if(c[d]!=null){let f=d.indexOf(" ");f>0?a.setAttributeNS(d.slice(0,f),d.slice(f+1),c[d]):d=="style"&&a.style?a.style.cssText=c[d]:a.setAttribute(d,c[d])}}for(let d=u;d<e.length;d++){let f=e[d];if(f===0){if(d<e.length-1||d>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else{let{dom:h,contentDOM:m}=Jr(n,f,t,r);if(a.appendChild(h),m){if(l)throw new RangeError("Multiple content holes");l=m}}}return{dom:a,contentDOM:l}}const Vu=65535,Wu=Math.pow(2,16);function Xm(n,e){return n+e*Wu}function ba(n){return n&Vu}function Ym(n){return(n-(n&Vu))/Wu}const Uu=1,qu=2,Gr=4,Ku=8;class ri{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(this.delInfo&Ku)>0}get deletedBefore(){return(this.delInfo&(Uu|Gr))>0}get deletedAfter(){return(this.delInfo&(qu|Gr))>0}get deletedAcross(){return(this.delInfo&Gr)>0}}class We{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&We.empty)return We.empty}recover(e){let t=0,r=ba(e);if(!this.inverted)for(let s=0;s<r;s++)t+=this.ranges[s*3+2]-this.ranges[s*3+1];return this.ranges[r*3]+t+Ym(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,r){let s=0,o=this.inverted?2:1,i=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?s:0);if(a>e)break;let c=this.ranges[l+o],u=this.ranges[l+i],d=a+c;if(e<=d){let f=c?e==a?-1:e==d?1:t:t,h=a+s+(f<0?0:u);if(r)return h;let m=e==(t<0?a:d)?null:Xm(l/3,e-a),g=e==a?qu:e==d?Uu:Gr;return(t<0?e!=a:e!=d)&&(g|=Ku),new ri(h,g,m)}s+=u-c}return r?e+s:new ri(e+s,0,null)}touches(e,t){let r=0,s=ba(t),o=this.inverted?2:1,i=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?r:0);if(a>e)break;let c=this.ranges[l+o],u=a+c;if(e<=u&&l==s*3)return!0;r+=this.ranges[l+i]-c}return!1}forEach(e){let t=this.inverted?2:1,r=this.inverted?1:2;for(let s=0,o=0;s<this.ranges.length;s+=3){let i=this.ranges[s],l=i-(this.inverted?o:0),a=i+(this.inverted?0:o),c=this.ranges[s+t],u=this.ranges[s+r];e(l,l+c,a,a+u),o+=u-c}}invert(){return new We(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?We.empty:new We(e<0?[0,-e,0]:[0,0,e])}}We.empty=new We([]);class gr{constructor(e,t,r=0,s=e?e.length:0){this.mirror=t,this.from=r,this.to=s,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(e=0,t=this.maps.length){return new gr(this._maps,this.mirror,e,t)}appendMap(e,t){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),t!=null&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,r=this._maps.length;t<e._maps.length;t++){let s=e.getMirror(t);this.appendMap(e._maps[t],s!=null&&s<t?r+s:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,r=this._maps.length+e._maps.length;t>=0;t--){let s=e.getMirror(t);this.appendMap(e._maps[t].invert(),s!=null&&s>t?r-s-1:void 0)}}invert(){let e=new gr;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,r){let s=0;for(let o=this.from;o<this.to;o++){let i=this._maps[o],l=i.mapResult(e,t);if(l.recover!=null){let a=this.getMirror(o);if(a!=null&&a>o&&a<this.to){o=a,e=this._maps[a].recover(l.recover);continue}}s|=l.delInfo,e=l.pos}return r?e:new ri(e,s,null)}}const vo=Object.create(null);class Re{getMap(){return We.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=vo[t.stepType];if(!r)throw new RangeError(`No step type ${t.stepType} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in vo)throw new RangeError("Duplicate use of step JSON ID "+e);return vo[e]=t,t.prototype.jsonID=e,t}}class be{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new be(e,null)}static fail(e){return new be(null,e)}static fromReplace(e,t,r,s){try{return be.ok(e.replace(t,r,s))}catch(o){if(o instanceof ns)return be.fail(o.message);throw o}}}function Zi(n,e,t){let r=[];for(let s=0;s<n.childCount;s++){let o=n.child(s);o.content.size&&(o=o.copy(Zi(o.content,e,o))),o.isInline&&(o=e(o,t,s)),r.push(o)}return O.fromArray(r)}class Dt extends Re{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=e.resolve(this.from),s=r.node(r.sharedDepth(this.to)),o=new B(Zi(t.content,(i,l)=>!i.isAtom||!l.type.allowsMarkType(this.mark.type)?i:i.mark(this.mark.addToSet(i.marks)),s),t.openStart,t.openEnd);return be.fromReplace(e,this.from,this.to,o)}invert(){return new rt(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new Dt(t.pos,r.pos,this.mark)}merge(e){return e instanceof Dt&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Dt(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Dt(t.from,t.to,e.markFromJSON(t.mark))}}Re.jsonID("addMark",Dt);class rt extends Re{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=new B(Zi(t.content,s=>s.mark(this.mark.removeFromSet(s.marks)),e),t.openStart,t.openEnd);return be.fromReplace(e,this.from,this.to,r)}invert(){return new Dt(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new rt(t.pos,r.pos,this.mark)}merge(e){return e instanceof rt&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new rt(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new rt(t.from,t.to,e.markFromJSON(t.mark))}}Re.jsonID("removeMark",rt);class Pt extends Re{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return be.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return be.fromReplace(e,this.pos,this.pos+1,new B(O.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let r=this.mark.addToSet(t.marks);if(r.length==t.marks.length){for(let s=0;s<t.marks.length;s++)if(!t.marks[s].isInSet(r))return new Pt(this.pos,t.marks[s]);return new Pt(this.pos,this.mark)}}return new gn(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Pt(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new Pt(t.pos,e.markFromJSON(t.mark))}}Re.jsonID("addNodeMark",Pt);class gn extends Re{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return be.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return be.fromReplace(e,this.pos,this.pos+1,new B(O.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new Pt(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new gn(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new gn(t.pos,e.markFromJSON(t.mark))}}Re.jsonID("removeNodeMark",gn);class ye extends Re{constructor(e,t,r,s=!1){super(),this.from=e,this.to=t,this.slice=r,this.structure=s}apply(e){return this.structure&&si(e,this.from,this.to)?be.fail("Structure replace would overwrite content"):be.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new We([this.from,this.to-this.from,this.slice.size])}invert(e){return new ye(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.to,-1),r=this.from==this.to&&ye.MAP_BIAS<0?t:e.mapResult(this.from,1);return r.deletedAcross&&t.deletedAcross?null:new ye(r.pos,Math.max(r.pos,t.pos),this.slice,this.structure)}merge(e){if(!(e instanceof ye)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let t=this.slice.size+e.slice.size==0?B.empty:new B(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new ye(this.from,this.to+(e.to-e.from),t,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let t=this.slice.size+e.slice.size==0?B.empty:new B(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new ye(e.from,this.to,t,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new ye(t.from,t.to,B.fromJSON(e,t.slice),!!t.structure)}}ye.MAP_BIAS=1;Re.jsonID("replace",ye);class we extends Re{constructor(e,t,r,s,o,i,l=!1){super(),this.from=e,this.to=t,this.gapFrom=r,this.gapTo=s,this.slice=o,this.insert=i,this.structure=l}apply(e){if(this.structure&&(si(e,this.from,this.gapFrom)||si(e,this.gapTo,this.to)))return be.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return be.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,t.content);return r?be.fromReplace(e,this.from,this.to,r):be.fail("Content does not fit in gap")}getMap(){return new We([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new we(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),s=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),o=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return t.deletedAcross&&r.deletedAcross||s<t.pos||o>r.pos?null:new we(t.pos,r.pos,s,o,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new we(t.from,t.to,t.gapFrom,t.gapTo,B.fromJSON(e,t.slice),t.insert,!!t.structure)}}Re.jsonID("replaceAround",we);function si(n,e,t){let r=n.resolve(e),s=t-e,o=r.depth;for(;s>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,s--;if(s>0){let i=r.node(o).maybeChild(r.indexAfter(o));for(;s>0;){if(!i||i.isLeaf)return!0;i=i.firstChild,s--}}return!1}function Qm(n,e,t,r){let s=[],o=[],i,l;n.doc.nodesBetween(e,t,(a,c,u)=>{if(!a.isInline)return;let d=a.marks;if(!r.isInSet(d)&&u.type.allowsMarkType(r.type)){let f=Math.max(c,e),h=Math.min(c+a.nodeSize,t),m=r.addToSet(d);for(let g=0;g<d.length;g++)d[g].isInSet(m)||(i&&i.to==f&&i.mark.eq(d[g])?i.to=h:s.push(i=new rt(f,h,d[g])));l&&l.to==f?l.to=h:o.push(l=new Dt(f,h,r))}}),s.forEach(a=>n.step(a)),o.forEach(a=>n.step(a))}function Zm(n,e,t,r){let s=[],o=0;n.doc.nodesBetween(e,t,(i,l)=>{if(!i.isInline)return;o++;let a=null;if(r instanceof Xs){let c=i.marks,u;for(;u=r.isInSet(c);)(a||(a=[])).push(u),c=u.removeFromSet(c)}else r?r.isInSet(i.marks)&&(a=[r]):a=i.marks;if(a&&a.length){let c=Math.min(l+i.nodeSize,t);for(let u=0;u<a.length;u++){let d=a[u],f;for(let h=0;h<s.length;h++){let m=s[h];m.step==o-1&&d.eq(s[h].style)&&(f=m)}f?(f.to=c,f.step=o):s.push({style:d,from:Math.max(l,e),to:c,step:o})}}}),s.forEach(i=>n.step(new rt(i.from,i.to,i.style)))}function el(n,e,t,r=t.contentMatch,s=!0){let o=n.doc.nodeAt(e),i=[],l=e+1;for(let a=0;a<o.childCount;a++){let c=o.child(a),u=l+c.nodeSize,d=r.matchType(c.type);if(!d)i.push(new ye(l,u,B.empty));else{r=d;for(let f=0;f<c.marks.length;f++)t.allowsMarkType(c.marks[f].type)||n.step(new rt(l,u,c.marks[f]));if(s&&c.isText&&t.whitespace!="pre"){let f,h=/\r?\n|\r/g,m;for(;f=h.exec(c.text);)m||(m=new B(O.from(t.schema.text(" ",t.allowedMarks(c.marks))),0,0)),i.push(new ye(l+f.index,l+f.index+f[0].length,m))}}l=u}if(!r.validEnd){let a=r.fillBefore(O.empty,!0);n.replace(l,l,new B(a,0,0))}for(let a=i.length-1;a>=0;a--)n.step(i[a])}function eg(n,e,t){return(e==0||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function qn(n){let t=n.parent.content.cutByIndex(n.startIndex,n.endIndex);for(let r=n.depth,s=0,o=0;;--r){let i=n.$from.node(r),l=n.$from.index(r)+s,a=n.$to.indexAfter(r)-o;if(r<n.depth&&i.canReplace(l,a,t))return r;if(r==0||i.type.spec.isolating||!eg(i,l,a))break;l&&(s=1),a<i.childCount&&(o=1)}return null}function tg(n,e,t){let{$from:r,$to:s,depth:o}=e,i=r.before(o+1),l=s.after(o+1),a=i,c=l,u=O.empty,d=0;for(let m=o,g=!1;m>t;m--)g||r.index(m)>0?(g=!0,u=O.from(r.node(m).copy(u)),d++):a--;let f=O.empty,h=0;for(let m=o,g=!1;m>t;m--)g||s.after(m+1)<s.end(m)?(g=!0,f=O.from(s.node(m).copy(f)),h++):c++;n.step(new we(a,c,i,l,new B(u.append(f),d,h),u.size-d,!0))}function tl(n,e,t=null,r=n){let s=ng(n,e),o=s&&rg(r,e);return o?s.map(ka).concat({type:e,attrs:t}).concat(o.map(ka)):null}function ka(n){return{type:n,attrs:null}}function ng(n,e){let{parent:t,startIndex:r,endIndex:s}=n,o=t.contentMatchAt(r).findWrapping(e);if(!o)return null;let i=o.length?o[0]:e;return t.canReplaceWith(r,s,i)?o:null}function rg(n,e){let{parent:t,startIndex:r,endIndex:s}=n,o=t.child(r),i=e.contentMatch.findWrapping(o.type);if(!i)return null;let a=(i.length?i[i.length-1]:e).contentMatch;for(let c=r;a&&c<s;c++)a=a.matchType(t.child(c).type);return!a||!a.validEnd?null:i}function sg(n,e,t){let r=O.empty;for(let i=t.length-1;i>=0;i--){if(r.size){let l=t[i].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=O.from(t[i].type.create(t[i].attrs,r))}let s=e.start,o=e.end;n.step(new we(s,o,s,o,new B(r,0,0),t.length,!0))}function og(n,e,t,r,s){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let o=n.steps.length;n.doc.nodesBetween(e,t,(i,l)=>{let a=typeof s=="function"?s(i):s;if(i.isTextblock&&!i.hasMarkup(r,a)&&ig(n.doc,n.mapping.slice(o).map(l),r)){let c=null;if(r.schema.linebreakReplacement){let h=r.whitespace=="pre",m=!!r.contentMatch.matchType(r.schema.linebreakReplacement);h&&!m?c=!1:!h&&m&&(c=!0)}c===!1&&Gu(n,i,l,o),el(n,n.mapping.slice(o).map(l,1),r,void 0,c===null);let u=n.mapping.slice(o),d=u.map(l,1),f=u.map(l+i.nodeSize,1);return n.step(new we(d,f,d+1,f-1,new B(O.from(r.create(a,null,i.marks)),0,0),1,!0)),c===!0&&Ju(n,i,l,o),!1}})}function Ju(n,e,t,r){e.forEach((s,o)=>{if(s.isText){let i,l=/\r?\n|\r/g;for(;i=l.exec(s.text);){let a=n.mapping.slice(r).map(t+1+o+i.index);n.replaceWith(a,a+1,e.type.schema.linebreakReplacement.create())}}})}function Gu(n,e,t,r){e.forEach((s,o)=>{if(s.type==s.type.schema.linebreakReplacement){let i=n.mapping.slice(r).map(t+1+o);n.replaceWith(i,i+1,e.type.schema.text(`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as B,j as o,C as L,b as T,r as $,B as M,p as N}from"./index-DHUcQ3Zc.js";import{s as q}from"./Plus-C4WTG9Kp.js";import{i as S}from"./Zap-DHi1Rc1o.js";import{S as D}from"./search-input-Dm12yYY_.js";import{P as l}from"./index-CUDGsjpT.js";import{E as b}from"./empty-state-C0HMrPFH.js";import{c as O}from"./use-automations-DmCHkQYX.js";import{c as V}from"./use-navigate-to-agent--gTBVJlO.js";import{A as F}from"./automation-list-row-Bc0NECF5.js";import{f as G}from"./constants-BHDe7bIw.js";import{u as H}from"./use-virtual-mcp-QyfBPZvN.js";import{R as J}from"./require-capability-ByUm4jHt.js";import"./SearchMd-BKcd0fB6.js";import"./sidebar-DDv6Q6Vr.js";import"./LayoutLeft-Chn2g8D1.js";import"./use-mobile-BjkhQEF-.js";import"./X-DQ-S1g4-.js";import"./tooltip-C_kxGPbz.js";import"./use-mcp-client-ptPJt8Ca.js";import"./auth-B1xyLxRH.js";import"./studio-tools-oG5STvP8.js";import"./hooks-Cpz2-QJF.js";import"./decopilot-sse-pool-Bc1zPkcw.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-CouMjkYR.js";import"./alert-dialog-D_YtJjUs.js";import"./dropdown-menu-DU7Il0vV.js";import"./Check-ChISHbfh.js";import"./ChevronRight-CvFLMLSs.js";import"./Circle-WWMwGxik.js";import"./Stars02-B-LWJdG7.js";import"./DotsVertical-CNYSgMU1.js";import"./Trash01-_2UtyZ3i.js";import"./agent-icon-ydo5jgpp.js";import"./AlertCircle-DG4a-YPJ.js";import"./UserPlus01-BYCDJ1qH.js";import"./Tool01-DcHeaUVL.js";import"./ArrowUp-CY3oZMDN.js";import"./Settings02-BojRVJl-.js";import"./Tool02-CITs9l5E.js";import"./XCircle-D994HWfT.js";import"./ArrowUpRight-BYqJ_odf.js";import"./TrendUp01-Ds4Xp_Ie.js";import"./ZapSquare-OWnxdaqo.js";import"./ZoomOut-CDmvqBAB.js";import"./Users03-Cttn4hE2.js";import"./CheckCircle-CfG0TsZ1.js";import"./ChevronDown-Bbe4LEpG.js";import"./ChevronUp-CG-5lkz8.js";import"./Copy01-ChDVmiye.js";import"./Globe01-DYMLCnX6.js";import"./Eye-BpNdlDWP.js";import"./FilterLines-cseXnN6n.js";import"./Flag01-rPnNU1v-.js";import"./Star01-BH1rvlEO.js";import"./Globe04-DMc415uO.js";import"./SwitchHorizontal01-CL9u8gys.js";import"./HardDrive-Dc7WUQMC.js";import"./Image01-4bzNBeP8.js";import"./Key01-BGutOYpw.js";import"./LinkExternal01-C3ixLwyv.js";import"./List-Cb6GXNpI.js";import"./Monitor01-DlZ0h2Cv.js";import"./Sun-c6JSAmBQ.js";import"./Package-D5pkJnJd.js";import"./Palette-LHyI2Mdb.js";import"./Play-Dca6um-D.js";import"./SearchLg-CyYHECU6.js";import"./Shield01-abTM_9f7.js";import"./Stars01-DFT0n9O7.js";import"./Upload01-BRK5C5r6.js";import"./User01-CU8XbMY2.js";import"./Users01-DvbIEeSV.js";import"./XClose-BiShBa_h.js";import"./use-collections-Cy2lyjQw.js";import"./use-capability-DLDYZAr8.js";import"./access-gate-CK3VnyOP.js";import"./capability-load-error-DPvQzY3V.js";function K(){const t=B.c(16),{org:e}=L(),{data:w}=O(void 0),u=w===void 0?[]:w,R=H(),k=V(),d=T(),[f,E]=$.useState(""),g=f.toLowerCase(),y=new Map(R.map(Q)),C=u.filter(i=>{if(!g||i.name.toLowerCase().includes(g))return!0;if(i.virtual_mcp_id){const a=y.get(i.virtual_mcp_id);if(a&&a.title.toLowerCase().includes(g))return!0}return!1}),P=(i,a)=>{const A=a&&y.has(a)?a:G(e.id);N("automations_list_row_clicked",{automation_id:i,agent_id:A,source:"settings_automations"}),k(A,{search:{main:"automation:"+i}})};let n;t[0]!==d||t[1]!==e.slug?(n=()=>{N("automations_empty_state_browse_agents_clicked"),d({to:"/$org/settings/agents",params:{org:e.slug}})},t[0]=d,t[1]=e.slug,t[2]=n):n=t[2];const z=n,x=l,h=l,j=l;let p;t[3]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsx(l.Title,{children:"Automations"}),t[3]=p):p=t[3];const _=u.length>0&&o.jsx(D,{value:f,onChange:E,placeholder:"Search automations...",className:"w-full md:w-[375px]"});let r;t[4]!==_?(r=o.jsxs("div",{className:"flex flex-col gap-6",children:[p,_]}),t[4]=_,t[5]=r):r=t[5];const v=u.length===0?o.jsx("div",{className:"flex items-center justify-center py-20",children:o.jsx(b,{image:o.jsx(S,{size:48,className:"text-muted-foreground"}),title:"No automations yet",description:"Automations are created per agent. Open an agent and add one from its Automations tab.",actions:o.jsxs(M,{size:"sm",onClick:z,children:[o.jsx(q,{size:14}),"Browse agents"]})})}):C.length===0?o.jsx("div",{className:"flex items-center justify-center py-20",children:o.jsx(b,{image:o.jsx(S,{size:48,className:"text-muted-foreground"}),title:"No automations found",description:`No automations match "${f}"`})}):o.jsx("div",{className:"mt-6 rounded-xl border border-border overflow-hidden",children:C.map(i=>o.jsx(F,{automation:i,showAgent:!0,onClick:()=>P(i.id,i.virtual_mcp_id)},i.id))});let s;t[6]!==j.Body||t[7]!==r||t[8]!==v?(s=o.jsxs(j.Body,{children:[r,v]}),t[6]=j.Body,t[7]=r,t[8]=v,t[9]=s):s=t[9];let m;t[10]!==h.Content||t[11]!==s?(m=o.jsx(h.Content,{children:s}),t[10]=h.Content,t[11]=s,t[12]=m):m=t[12];let c;return t[13]!==x||t[14]!==m?(c=o.jsx(x,{children:m}),t[13]=x,t[14]=m,t[15]=c):c=t[15],c}function Q(t){return[t.id,t]}function vo(){const t=B.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(J,{capability:"automations:manage",area:"automations",children:o.jsx(K,{})}),t[0]=e):e=t[0],e}export{vo as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as a}from"./index-
|
|
1
|
+
import{D as a}from"./index-DHUcQ3Zc.js";const i=1e4,m="true";function s(e,t){return a.chatAutosend(e,t)}function d(e){return e==="pending"||e==="sending"}function c(e){if(!e)return null;let t;try{t=JSON.parse(e)}catch{return null}return!t||typeof t!="object"||typeof t.createdAt!="number"||typeof t.message!="object"||!d(t.status)?null:t}function A(e,t,r,o,u=Date.now()){const n={message:o,createdAt:u,status:"pending"};return e.setItem(s(t,r),JSON.stringify(n)),n}function f(e,t,r){const o=s(t,r),u=c(e.getItem(o));return u||(e.removeItem(o),null)}function S(e,t,r,o=Date.now()){const u=s(t,r),n=f(e,t,r);return!n||n.status!=="pending"?null:o-n.createdAt>=i?(e.removeItem(u),null):(e.setItem(u,JSON.stringify({...n,status:"sending"})),{message:n.message,createdAt:n.createdAt})}function p(e,t,r){e.removeItem(s(t,r))}export{m as A,p as a,S as c,A as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as k,j as i,l as m,bC as R,cI as S,cJ as V,cK as $}from"./index-
|
|
1
|
+
import{c as k,j as i,l as m,bC as R,cI as S,cJ as V,cK as $}from"./index-DHUcQ3Zc.js";import{s as O}from"./User01-CU8XbMY2.js";function U(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=m("relative flex size-8 shrink-0 overflow-hidden rounded-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx($,{"data-slot":"avatar",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function E(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=m("aspect-square size-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(S,{"data-slot":"avatar-image",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function M(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=m("bg-muted flex size-full items-center justify-center rounded-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(V,{"data-slot":"avatar-fallback",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}const C=["drop-shadow-lg bg-gradient-to-br from-red-100 to-red-300 text-red-800 shadow-lg shadow-red-300/40 ring-1 ring-red-300/30","drop-shadow-lg bg-gradient-to-br from-lime-100 to-lime-300 text-lime-800 shadow-lg shadow-lime-300/40 ring-1 ring-lime-300/30","drop-shadow-lg bg-gradient-to-br from-emerald-100 to-emerald-300 text-emerald-800 shadow-lg shadow-emerald-300/40 ring-1 ring-emerald-300/30","drop-shadow-lg bg-gradient-to-br from-orange-100 to-orange-300 text-orange-800 shadow-lg shadow-orange-300/40 ring-1 ring-orange-300/30","drop-shadow-lg bg-gradient-to-br from-amber-100 to-amber-300 text-amber-800 shadow-lg shadow-amber-300/40 ring-1 ring-amber-300/30","drop-shadow-lg bg-gradient-to-br from-yellow-100 to-yellow-300 text-yellow-800 shadow-lg shadow-yellow-300/40 ring-1 ring-yellow-300/30","drop-shadow-lg bg-gradient-to-br from-green-100 to-green-300 text-green-800 shadow-lg shadow-green-300/40 ring-1 ring-green-300/30","drop-shadow-lg bg-gradient-to-br from-teal-100 to-teal-300 text-teal-800 shadow-lg shadow-teal-300/40 ring-1 ring-teal-300/30","drop-shadow-lg bg-gradient-to-br from-cyan-100 to-cyan-300 text-cyan-800 shadow-lg shadow-cyan-300/40 ring-1 ring-cyan-300/30","drop-shadow-lg bg-gradient-to-br from-sky-100 to-sky-300 text-sky-800 shadow-lg shadow-sky-300/40 ring-1 ring-sky-300/30","drop-shadow-lg bg-gradient-to-br from-blue-100 to-blue-300 text-blue-800 shadow-lg shadow-blue-300/40 ring-1 ring-blue-300/30","drop-shadow-lg bg-gradient-to-br from-indigo-100 to-indigo-300 text-indigo-800 shadow-lg shadow-indigo-300/40 ring-1 ring-indigo-300/30","drop-shadow-lg bg-gradient-to-br from-violet-100 to-violet-300 text-violet-800 shadow-lg shadow-violet-300/40 ring-1 ring-violet-300/30","drop-shadow-lg bg-gradient-to-br from-purple-100 to-purple-300 text-purple-800 shadow-lg shadow-purple-300/40 ring-1 ring-purple-300/30","drop-shadow-lg bg-gradient-to-br from-fuchsia-100 to-fuchsia-300 text-fuchsia-800 shadow-lg shadow-fuchsia-300/40 ring-1 ring-fuchsia-300/30","drop-shadow-lg bg-gradient-to-br from-pink-100 to-pink-300 text-pink-800 shadow-lg shadow-pink-300/40 ring-1 ring-pink-300/30","drop-shadow-lg bg-gradient-to-br from-rose-100 to-rose-300 text-rose-800 shadow-lg shadow-rose-300/40 ring-1 ring-rose-300/30"],L="drop-shadow-lg text-muted-foreground bg-muted shadow-lg";function T(r){let e=0;for(let t=0;t<r.length;t++)e=r.charCodeAt(t)+((e<<5)-e);const s=Math.abs(e)%C.length;return C[s]}const I=R("border border-border",{variants:{shape:{circle:"rounded-full",square:""},size:{"3xs":"w-3 h-3 text-[7px] font-semibold","2xs":"w-4 h-4 text-[9px] font-semibold",xs:"w-6 h-6 text-sm font-semibold",sm:"w-8 h-8 text-lg font-semibold",base:"w-10 h-10 text-2xl font-semibold",lg:"w-12 h-12 text-3xl font-semibold",xl:"w-16 h-16 text-4xl font-semibold","2xl":"w-20 h-20 text-5xl font-semibold","3xl":"w-32 h-32 text-7xl font-semibold"}},compoundVariants:[{shape:"square",size:"xs",class:"rounded-lg"},{shape:"square",size:"sm",class:"rounded-xl"},{shape:"square",size:"base",class:"rounded-xl"},{shape:"square",size:"lg",class:"rounded-xl"},{shape:"square",size:"xl",class:"rounded-2xl"},{shape:"square",size:"2xl",class:"rounded-3xl"},{shape:"square",size:"3xl",class:"rounded-[40px]"}],defaultVariants:{shape:"square",size:"base"}}),_=R("",{variants:{objectFit:{contain:"object-contain",cover:"object-cover"}},defaultVariants:{objectFit:"cover"}}),D=r=>{const e={"3xs":8,"2xs":8,xs:12,sm:16,base:24,lg:28,xl:36,"2xl":48,"3xl":80};return e[r]||e.base};function J(r){const e=k.c(34);let s,t,o,a,n,d,g,l;e[0]!==r?({url:l,fallback:t,shape:a,size:n,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g;let x;e:{if(typeof t=="string"){let c;e[9]!==t?(c=t.trim().slice(0,2).toUpperCase(),e[9]=t,e[10]=c):c=e[10],x=c;break e}x=t}const f=x;let y;e:{if(j){y=L;break e}if(typeof t=="string"){let c;e[11]!==t?(c=T(t),e[11]=t,e[12]=c):c=e[12],y=c;break e}y=C[0]}const z=y;let N;e[13]!==l?(N=l?.startsWith("icon://"),e[13]=l,e[14]=N):N=e[14];const p=N;let q;e[15]!==p||e[16]!==l?(q=p?l?.replace("icon://",""):void 0,e[15]=p,e[16]=l,e[17]=q):q=e[17];const F=q;let w;e[18]!==s||e[19]!==b||e[20]!==h?(w=m(I({shape:b,size:h}),s),e[18]=s,e[19]=b,e[20]=h,e[21]=w):w=e[21];let v;e[22]!==z||e[23]!==f||e[24]!==F||e[25]!==p||e[26]!==u||e[27]!==h||e[28]!==l?(v=p&&F?i.jsx("div",{className:m("flex items-center justify-center w-full h-full",z),children:i.jsx(O,{size:D(h)})}):i.jsxs(i.Fragment,{children:[l&&i.jsx(E,{src:l,loading:"lazy",alt:"Avatar",className:m(_({objectFit:u}))}),i.jsx(M,{className:m(z,"rounded-none"),delayMs:l?600:0,children:f})]}),e[22]=z,e[23]=f,e[24]=F,e[25]=p,e[26]=u,e[27]=h,e[28]=l,e[29]=v):v=e[29];let A;return e[30]!==o||e[31]!==v||e[32]!==w?(A=i.jsx(U,{className:w,...o,children:v}),e[30]=o,e[31]=v,e[32]=w,e[33]=A):A=e[33],A}function K(r){const e=k.c(18);let s,t,o,a,n,d,g,l;e[0]!==r?({shape:a,size:n,url:l,fallback:t,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g,x=h??"base";let f;return e[9]!==s||e[10]!==t||e[11]!==j||e[12]!==u||e[13]!==o||e[14]!==b||e[15]!==x||e[16]!==l?(f=i.jsx(J,{shape:b,url:l,fallback:t,size:x,objectFit:u,className:s,muted:j,...o}),e[9]=s,e[10]=t,e[11]=j,e[12]=u,e[13]=o,e[14]=b,e[15]=x,e[16]=l,e[17]=f):f=e[17],f}K.Skeleton=function({shape:e="square",size:s="base",className:t}){return i.jsx("div",{className:m(I({shape:e,size:s}),"bg-muted animate-pulse",t)})};export{K as A};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as l,l as u,j as g,bd as v,bC as b}from"./index-
|
|
1
|
+
import{c as l,l as u,j as g,bd as v,bC as b}from"./index-DHUcQ3Zc.js";const f=b("inline-flex items-center justify-center rounded-full border text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",success:"border-transparent bg-success text-success-foreground [a&]:hover:bg-success/90 focus-visible:ring-success/20 dark:focus-visible:ring-success/40",warning:"border-transparent bg-warning text-warning-foreground [a&]:hover:bg-warning/90 focus-visible:ring-warning/20 dark:focus-visible:ring-warning/40",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"},size:{default:"px-2 py-0.5",icon:"size-5"}},defaultVariants:{variant:"default",size:"default"}});function h(c){const e=l.c(14);let r,s,i,n,t;e[0]!==c?({className:r,variant:t,size:i,asChild:n,...s}=c,e[0]=c,e[1]=r,e[2]=s,e[3]=i,e[4]=n,e[5]=t):(r=e[1],s=e[2],i=e[3],n=e[4],t=e[5]);const d=(n===void 0?!1:n)?v:"span";let a;e[6]!==r||e[7]!==i||e[8]!==t?(a=u(f({variant:t,size:i}),r),e[6]=r,e[7]=i,e[8]=t,e[9]=a):a=e[9];let o;return e[10]!==d||e[11]!==s||e[12]!==a?(o=g.jsx(d,{"data-slot":"badge",className:a,...s}),e[10]=d,e[11]=s,e[12]=a,e[13]=o):o=e[13],o}export{h as B};
|