decocms 4.277.2 → 4.278.0
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-6tWU7wYa.js → AlertCircle-v8fMNriz.js} +1 -1
- package/dist/client/assets/{AreaChart-SMaPcNXw.js → AreaChart-B9V5nURY.js} +1 -1
- package/dist/client/assets/{ArrowLeft-CfuiIq5H.js → ArrowLeft-Npp6hG6h.js} +1 -1
- package/dist/client/assets/{ArrowUp-D3mIhiFm.js → ArrowUp-BWHgYGAi.js} +1 -1
- package/dist/client/assets/{Check-BIWtIuCf.js → Check-DWZ740y8.js} +1 -1
- package/dist/client/assets/{CheckCircle-DWInED8p.js → CheckCircle-COrgrT6l.js} +1 -1
- package/dist/client/assets/{ChevronDown-CVbb0r_e.js → ChevronDown-CWJ9JErq.js} +1 -1
- package/dist/client/assets/{ChevronRight-DDyA5W9O.js → ChevronRight-DyQIrKTD.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-CeVOSRh7.js → ChevronSelectorVertical-3t4I-rX4.js} +1 -1
- package/dist/client/assets/{ChevronUp-BFhKV90E.js → ChevronUp-D1hzk8dN.js} +1 -1
- package/dist/client/assets/{Copy01-Dd6exwRm.js → Copy01-Jlghnbuk.js} +1 -1
- package/dist/client/assets/{CreditCard01-COkd7l4h.js → CreditCard01-DkEBMnnR.js} +1 -1
- package/dist/client/assets/{DotsVertical-BWFsb5qJ.js → DotsVertical-BF66n5eI.js} +1 -1
- package/dist/client/assets/{Download01-ByYWlv8P.js → Download01-C4Qc9N3I.js} +1 -1
- package/dist/client/assets/{Eye-CoYKR0nI.js → Eye-CMkMKams.js} +1 -1
- package/dist/client/assets/{FilterLines-CIgGkBSe.js → FilterLines-Cqi0BW62.js} +1 -1
- package/dist/client/assets/{Globe01-sUFldSbl.js → Globe01-D6aW3Uev.js} +1 -1
- package/dist/client/assets/{Globe04-DUXrz6XD.js → Globe04-BusVz23y.js} +1 -1
- package/dist/client/assets/{HardDrive-Cx4T9PNd.js → HardDrive-DNOYRJQU.js} +1 -1
- package/dist/client/assets/{Key01-CRJ_Etjs.js → Key01-zK1D1sqm.js} +1 -1
- package/dist/client/assets/{LinkExternal01-BMTo98Dx.js → LinkExternal01-YzEu81ID.js} +1 -1
- package/dist/client/assets/{LockUnlocked01-BYZjwbAR.js → LockUnlocked01-ixiwdeGN.js} +1 -1
- package/dist/client/assets/{LogOut01-4jTBHB4S.js → LogOut01-dJ6EgXGv.js} +1 -1
- package/dist/client/assets/{Monitor01-DkkiUD9G.js → Monitor01-Cne_Y8mg.js} +1 -1
- package/dist/client/assets/{Palette-fIe3ZXln.js → Palette-DhXNXt05.js} +1 -1
- package/dist/client/assets/{Play-DvUOD8qW.js → Play-BMaFKxXP.js} +1 -1
- package/dist/client/assets/{Plus-Ns4_pIbl.js → Plus-DwD65rmB.js} +1 -1
- package/dist/client/assets/{SearchLg-Dx0A_3zi.js → SearchLg-HIa3QhaQ.js} +1 -1
- package/dist/client/assets/{SearchMd-Cn4Bukdn.js → SearchMd-BAZ9nMEZ.js} +1 -1
- package/dist/client/assets/{Settings02-Dspvirmc.js → Settings02-52fb6H5D.js} +1 -1
- package/dist/client/assets/{Share07-DTtbdEzm.js → Share07-DuVrrhTb.js} +1 -1
- package/dist/client/assets/{Shield01-Boe32FKW.js → Shield01-DJyhXvrh.js} +1 -1
- package/dist/client/assets/{Stars01-hOH5qHG7.js → Stars01-CxkNaTg4.js} +1 -1
- package/dist/client/assets/{Stars02-aJgerMdO.js → Stars02-q7wwk1en.js} +1 -1
- package/dist/client/assets/{Sun-cD-kH109.js → Sun-NTNtnr7x.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-CMlk6d1K.js → SwitchHorizontal01-BMDX56Pz.js} +1 -1
- package/dist/client/assets/{Tool01-55e9Pzj9.js → Tool01-Bn5sQ3cN.js} +1 -1
- package/dist/client/assets/{Tool02-HLpWqOaY.js → Tool02-D6336hR4.js} +1 -1
- package/dist/client/assets/{Trash01-CyoK4MU5.js → Trash01-MovncRVo.js} +1 -1
- package/dist/client/assets/{TrendUp01-MTqfV8xG.js → TrendUp01-Bpy6TdnO.js} +1 -1
- package/dist/client/assets/{Upload01-Cxy07oQg.js → Upload01-BF5d7vXt.js} +1 -1
- package/dist/client/assets/{User01-oIs-vUGA.js → User01-CXrM7AMp.js} +1 -1
- package/dist/client/assets/{UserSquare-DR98X7-R.js → UserSquare-CQKfRmeM.js} +1 -1
- package/dist/client/assets/{Users01-Fr1ZQuZu.js → Users01-sIZgN8cj.js} +1 -1
- package/dist/client/assets/{Users03-DeTmNZEn.js → Users03-DoII_J3k.js} +1 -1
- package/dist/client/assets/{XCircle-9IEiQ4L2.js → XCircle-CM7DlBEY.js} +1 -1
- package/dist/client/assets/{XClose-C_dHeH17.js → XClose-CkJJ5Qv5.js} +1 -1
- package/dist/client/assets/{YAxis-aqhzk5Fu.js → YAxis-BsQgPHsE.js} +1 -1
- package/dist/client/assets/{Zap-i23d8bq2.js → Zap-DJT0rSGL.js} +1 -1
- package/dist/client/assets/{ZapSquare-Dc-rKzAG.js → ZapSquare-C2ZJxHbM.js} +1 -1
- package/dist/client/assets/{access-gate-B-12I7Fo.js → access-gate-DQaMSvsa.js} +1 -1
- package/dist/client/assets/{agent-icon-BD4ir4AJ.js → agent-icon-B5DHtXHe.js} +1 -1
- package/dist/client/assets/{agents-list-OaLSaOqd.js → agents-list-Ccfv_j-W.js} +1 -1
- package/dist/client/assets/{ai-providers-BZ5DCQax.js → ai-providers-DisnIpET.js} +1 -1
- package/dist/client/assets/{alert-BKH3qmtb.js → alert-T2HaKg5P.js} +1 -1
- package/dist/client/assets/{alert-dialog-B4ltP1Zu.js → alert-dialog-XEF69z36.js} +1 -1
- package/dist/client/assets/{api-keys-C6jhaE5W.js → api-keys-xQrWiVcG.js} +1 -1
- package/dist/client/assets/app-editor-B_8s5q33.js +1 -0
- package/dist/client/assets/{auth-catchall-CI6LpmIg.js → auth-catchall-B9Qp-nXA.js} +1 -1
- package/dist/client/assets/{auth-entry-Bxt0RfFN.js → auth-entry-DIqf1A21.js} +1 -1
- package/dist/client/assets/{auth-split-layout-DbwomzZl.js → auth-split-layout-BZiYj9cN.js} +1 -1
- package/dist/client/assets/{auth-iZ8bZTve.js → auth-v-RUElOF.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-CSSCn7ah.js → authenticate-and-persist-oauth-DzVatwtJ.js} +1 -1
- package/dist/client/assets/{automation-list-row-DtJ3vlU6.js → automation-list-row-BFPoVnfX.js} +1 -1
- package/dist/client/assets/{automation-runs-o4xufCd8.js → automation-runs-BWX3epGD.js} +1 -1
- package/dist/client/assets/{automations-BVCzkA9O.js → automations-Clm7ZUeO.js} +1 -1
- package/dist/client/assets/{avatar-WApsR2TX.js → avatar-LmU2UuLS.js} +1 -1
- package/dist/client/assets/{badge-DHZdaANE.js → badge-nN_EtFX3.js} +1 -1
- package/dist/client/assets/{block-document-D-iyYRO2.js → block-document-C0hHVqbA.js} +1 -1
- package/dist/client/assets/{buckets-CX2gWTX6.js → buckets-DpyXyKld.js} +1 -1
- package/dist/client/assets/bulk-category-panel-kZ5K7chz.js +1 -0
- package/dist/client/assets/{capability-load-error-BI676ir-.js → capability-load-error-2Us1Lwx7.js} +1 -1
- package/dist/client/assets/{cards-kEvnJEN2.js → cards-CdQh5ina.js} +1 -1
- package/dist/client/assets/category-editor-sl2IQ5yw.js +1 -0
- package/dist/client/assets/{chart-B5D871qx.js → chart-gCLrqBZC.js} +4 -4
- package/dist/client/assets/{chat-context-DjYbmLav.js → chat-context-CEP09m4a.js} +1 -1
- package/dist/client/assets/{checkbox-DEpjJOPP.js → checkbox-i9fR-npW.js} +1 -1
- package/dist/client/assets/{choose-editor-Dy8AVodb.js → choose-editor-CC9A462E.js} +1 -1
- package/dist/client/assets/{cli-auth-success-tPZiJED1.js → cli-auth-success-J4EmTEHx.js} +1 -1
- package/dist/client/assets/collection-detail-OD9zo4dA.js +1 -0
- package/dist/client/assets/{collection-display-button-CIELt-_6.js → collection-display-button-BC9jr7k1.js} +1 -1
- package/dist/client/assets/{collection-search-bSeQdzpX.js → collection-search-DrUvH_5n.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DMHO68IL.js → collection-table-wrapper-CZapTgzC.js} +1 -1
- package/dist/client/assets/{collection-tabs-BKfmiSOC.js → collection-tabs-DzW94Hy1.js} +1 -1
- package/dist/client/assets/{command-lZx7XmuN.js → command-Dy2HO77F.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-CbtRbMEj.js → commerce-onboarding-rqUTn8pD.js} +1 -1
- package/dist/client/assets/{connect-DF2NVAE3.js → connect-DlRyQ_ii.js} +1 -1
- package/dist/client/assets/{connection-C5iuGmwz.js → connection-Cfz74IqW.js} +1 -1
- package/dist/client/assets/{connection-card-ClDZwlDp.js → connection-card-DMrqqNqH.js} +1 -1
- package/dist/client/assets/connection-detail-D562ck5e.js +1 -0
- package/dist/client/assets/{connection-form-helpers-DdNo9Syk.js → connection-form-helpers-CiugFKrh.js} +1 -1
- package/dist/client/assets/{connections-DMuXb1iu.js → connections-DuOD3GIO.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-DoVi8VY1.js → decopilot-sse-pool-BJumw45X.js} +1 -1
- package/dist/client/assets/{dialog-BBPJC7yY.js → dialog-ljnzZavy.js} +1 -1
- package/dist/client/assets/{domain-settings-DKyAf_7c.js → domain-settings-0GWRa7JO.js} +1 -1
- package/dist/client/assets/{drawer-QXmPtU62.js → drawer-DD6YpTGL.js} +1 -1
- package/dist/client/assets/{dropdown-menu-B_78l2v6.js → dropdown-menu-pWB0nubv.js} +1 -1
- package/dist/client/assets/{empty-state-Cm37ZiLn.js → empty-state-DapPFVEJ.js} +1 -1
- package/dist/client/assets/{extract-connection-data-k9CE5liA.js → extract-connection-data-CSTpDZtq.js} +1 -1
- package/dist/client/assets/file-explorer-Dro4b3lZ.js +2 -0
- package/dist/client/assets/{file-type-icon-CzJDfNY8.js → file-type-icon-DQgNU2Yc.js} +1 -1
- package/dist/client/assets/{form-CbBceGEv.js → form-CJ-cEs6U.js} +1 -1
- package/dist/client/assets/{general-C8rN-PTk.js → general-DQZWwTkj.js} +1 -1
- package/dist/client/assets/{github-repo-picker-Cybw3Ow4.js → github-repo-picker-ByuS_XNy.js} +1 -1
- package/dist/client/assets/{hooks-DUQfZTL_.js → hooks-BjsPfcI_.js} +1 -1
- package/dist/client/assets/{index-BqWFtpxV.js → index-BLErH5MN.js} +1 -1
- package/dist/client/assets/{index-utjlg1Pu.js → index-BQXRGS-f.js} +1 -1
- package/dist/client/assets/{index-EXr1UIv6.js → index-Bh-xO_bO.js} +1 -1
- package/dist/client/assets/index-BnUcr63C.js +1 -0
- package/dist/client/assets/index-CT0xBlIh.css +1 -0
- package/dist/client/assets/{index-BfphVVNB.js → index-Cms6Zm_G.js} +1 -1
- package/dist/client/assets/{index-C5NUTMdB.js → index-Con677tP.js} +1 -1
- package/dist/client/assets/{index-J7-Vf5K9.js → index-DA9dkxmu.js} +1 -1
- package/dist/client/assets/{index-11Axpbvx.js → index-DIDvVa8k.js} +5 -5
- package/dist/client/assets/{index-O4AqjsPe.js → index-Dr-sOexb.js} +1 -1
- package/dist/client/assets/{index-Beuv5tb0.js → index-QiUlATaf.js} +49 -49
- package/dist/client/assets/{index-redirect-Cmm8Rnl3.js → index-redirect-FDjHQpim.js} +1 -1
- package/dist/client/assets/{infra-billing-2u0oT5dJ.js → infra-billing-CyJY86O9.js} +1 -1
- package/dist/client/assets/{input-CmWpGJPZ.js → input-Cx92h0Kn.js} +1 -1
- package/dist/client/assets/{integration-icon-BTaqQLeL.js → integration-icon-DpwOPnrc.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-DqvSzDfV.js → invite-member-dialog-CqIhh61U.js} +1 -1
- package/dist/client/assets/{label-9fOXKvHw.js → label-B7_ye5dS.js} +1 -1
- package/dist/client/assets/{layout-DlBlIxyA.js → layout-ZUbqBy4G.js} +1 -1
- package/dist/client/assets/{login-C3SKmn2o.js → login-De8CdReW.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CrH_sNAB.js → mcp-oauth-CoG_Khez.js} +1 -1
- package/dist/client/assets/{members-BmH9aVKZ.js → members-BjFN6Olq.js} +1 -1
- package/dist/client/assets/{monaco-editor-DGH_uddi.js → monaco-editor-9zsh1pmj.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-D26_pyLB.js → monitoring-stats-row-B_EFHAx7.js} +1 -1
- package/dist/client/assets/{multi-select-CrjO7fm0.js → multi-select-B_bZvWcA.js} +1 -1
- package/dist/client/assets/{oauth-callback-BuP6nKLt.js → oauth-callback-DzP7BSBw.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-mp-Dif9b.js → oauth-callback-ai-provider-CN_i6625.js} +1 -1
- package/dist/client/assets/{onboarding-CfF0_VLr.js → onboarding-BBTDDmZf.js} +1 -1
- package/dist/client/assets/{org-layout-P0WG-MLl.js → org-layout-eaefJMPL.js} +1 -1
- package/dist/client/assets/{organization-choice-Cj78bBch.js → organization-choice-CpotnwyG.js} +1 -1
- package/dist/client/assets/{orgs-BWqrQOE-.js → orgs-lesxqCf8.js} +1 -1
- package/dist/client/assets/page-seo-form-wXtnmYEy.js +1 -0
- package/dist/client/assets/{popover-DvqYGJ6a.js → popover-lT5R5LRh.js} +1 -1
- package/dist/client/assets/post-calendar-CAjzXpry.js +1 -0
- package/dist/client/assets/post-editor-B27__PQd.js +1 -0
- package/dist/client/assets/{primitives-fNAqchsO.js → primitives-SD-T9qoH.js} +1 -1
- package/dist/client/assets/{profile-BUYxIM0c.js → profile-C_cWQjru.js} +1 -1
- package/dist/client/assets/project-app-view-DHnVRBzg.js +1 -0
- package/dist/client/assets/{prompts-DmN5rIix.js → prompts-DjsJwUX6.js} +1 -1
- package/dist/client/assets/record-editor-D53DLSEz.js +1 -0
- package/dist/client/assets/redirect-editor-BDMJrbxD.js +1 -0
- package/dist/client/assets/registry-Cw2XqsSc.js +2 -0
- package/dist/client/assets/{registry-layout-DsKkWGEq.js → registry-layout-B2AmIOcj.js} +1 -1
- package/dist/client/assets/{reports-C0hISp-d.js → reports-DYfZNUH3.js} +1 -1
- package/dist/client/assets/{require-capability-CYU1nEvM.js → require-capability-Chj6fY_O.js} +1 -1
- package/dist/client/assets/{required-auth-layout-UoP_VLdg.js → required-auth-layout-EVXeXvZH.js} +1 -1
- package/dist/client/assets/{reset-password-DQdukdt2.js → reset-password-C_hGzwAO.js} +1 -1
- package/dist/client/assets/{review-settings-CDlHP-7V.js → review-settings-CuGiVvtt.js} +1 -1
- package/dist/client/assets/{roles-DGEfUBoI.js → roles-BcTkaqJP.js} +1 -1
- package/dist/client/assets/{search-input-CBIAknoS.js → search-input-BQj9X4w3.js} +1 -1
- package/dist/client/assets/{secrets-z5YAHNDJ.js → secrets-C7FBQCzl.js} +1 -1
- package/dist/client/assets/sections-editor-DHeHMP3n.js +2 -0
- package/dist/client/assets/select-B6q0AMAc.js +1 -0
- package/dist/client/assets/{select-model-D3ApOsFk.js → select-model-hJUk9DEJ.js} +1 -1
- package/dist/client/assets/{self-tool-result-BsMOoqp1.js → self-tool-result-DimIwwIz.js} +1 -1
- package/dist/client/assets/seo-editor-CXG2DLIG.js +1 -0
- package/dist/client/assets/{settings-layout-38yEBMcG.js → settings-layout-B0PK1QpF.js} +1 -1
- package/dist/client/assets/{shell-controls-DMuzMgg0.js → shell-controls-DXi-8Slt.js} +1 -1
- package/dist/client/assets/{shell-layout-BjqyiyfI.js → shell-layout-C1VLqpGw.js} +1 -1
- package/dist/client/assets/{spinner-5sgFnmTJ.js → spinner-BLKi8P8K.js} +1 -1
- package/dist/client/assets/{sso-qjQsmRot.js → sso-CCfYmzZ0.js} +1 -1
- package/dist/client/assets/{store-DF69uPgt.js → store-082jvGUM.js} +1 -1
- package/dist/client/assets/store-registry-CPSM3z4O.js +2 -0
- package/dist/client/assets/{switch-DJ3fHjlZ.js → switch-IUmVVDRF.js} +1 -1
- package/dist/client/assets/{synced-repos-DmQJ015Q.js → synced-repos-GiFLW8ll.js} +1 -1
- package/dist/client/assets/{tab-id-DTQBZsSu.js → tab-id-DIe1Nijm.js} +1 -1
- package/dist/client/assets/{table-CDNSisGr.js → table-BYh1MtS_.js} +1 -1
- package/dist/client/assets/{tabs-DyZN3F6n.js → tabs-DNRBTIL1.js} +1 -1
- package/dist/client/assets/{tasks-D3XReqMa.js → tasks-Cd8VAscb.js} +1 -1
- package/dist/client/assets/{textarea-CKGtBy6P.js → textarea-hoarzJY0.js} +1 -1
- package/dist/client/assets/{toggle-group-CY548Ail.js → toggle-group-hLAGRLlY.js} +1 -1
- package/dist/client/assets/{toolbar-BXqDit6n.js → toolbar-D9CX4OwI.js} +1 -1
- package/dist/client/assets/{track-CAP9UGRM.js → track-BcLfb7j-.js} +1 -1
- package/dist/client/assets/{types-v-KFI9T9.js → types-DL1u6s93.js} +3 -3
- package/dist/client/assets/{use-ai-providers-C7-CezpT.js → use-ai-providers-BttXRxlj.js} +1 -1
- package/dist/client/assets/{use-api-keys-CWRqrQ8N.js → use-api-keys-1DXOdjU6.js} +1 -1
- package/dist/client/assets/{use-automations-CJls2uog.js → use-automations-yELoWtQL.js} +1 -1
- package/dist/client/assets/{use-autosave-BInQ1G8J.js → use-autosave-C2mvbIvv.js} +1 -1
- package/dist/client/assets/{use-clock-tick-C-fvo9-8.js → use-clock-tick-FTW32S7S.js} +1 -1
- package/dist/client/assets/{use-commerce-diagnostic-DGoxaXzu.js → use-commerce-diagnostic-Dd9rxs3f.js} +1 -1
- package/dist/client/assets/{use-connection-BT0yI2N1.js → use-connection-Dke1W-MN.js} +1 -1
- package/dist/client/assets/{use-copy-D_i4k6QZ.js → use-copy-7MhyLyP3.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-DxccahsJ.js → use-create-virtual-mcp-CfF213oO.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-CTxtKrwS.js → use-debounced-autosave-DBVA3ONY.js} +1 -1
- package/dist/client/assets/{use-debounced-value-BMmQGk2i.js → use-debounced-value-CWJBeEO4.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-DduusyI4.js → use-decopilot-events-DPQ0Z1kc.js} +1 -1
- package/dist/client/assets/{use-delete-connection-DlG10yM3.js → use-delete-connection-CU3icALm.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-DGtM1OY2.js → use-deployment-admin-DVIBY0i9.js} +1 -1
- package/dist/client/assets/{use-file-configs-RpYJRWfY.js → use-file-configs-AsB0iU0o.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-czLvmTC2.js → use-infinite-scroll-CImsH6dI.js} +1 -1
- package/dist/client/assets/{use-join-requests-CrM3fR1L.js → use-join-requests-SCbfewiT.js} +1 -1
- package/dist/client/assets/use-mcp-auth-status-BiK_LMM-.js +1 -0
- package/dist/client/assets/{use-mcp-client-Ccznzs5K.js → use-mcp-client-CNj9UP6h.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-Dis5cPUY.js → use-mcp-tools-BwivqAv9.js} +1 -1
- package/dist/client/assets/{use-members-BrkFmrC2.js → use-members-C_qJEHPM.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-CEI397ME.js → use-navigate-to-agent-CNDnIlgR.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-BQCacaH4.js → use-org-auth-client-B72rzozH.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-Fzi2yap-.js → use-org-repo-syncs-NzU2qMQj.js} +1 -1
- package/dist/client/assets/{use-org-sso-DictyNVb.js → use-org-sso-Cw6Q4qF1.js} +1 -1
- package/dist/client/assets/{use-organization-roles-3VLYSoij.js → use-organization-roles-CtefXf2i.js} +1 -1
- package/dist/client/assets/{use-organization-settings-BbsRSP2t.js → use-organization-settings-kuyc2bmW.js} +1 -1
- package/dist/client/assets/{use-registry-connections-C0BMOjmC.js → use-registry-connections-Bz6Ua2A3.js} +1 -1
- package/dist/client/assets/{use-secrets-DvM46U6Y.js → use-secrets-DJPeA-Fd.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-DzEMM7gE.js → use-section-preview-base-BCHzxoux.js} +1 -1
- package/dist/client/assets/{use-status-sounds-BC-Y3Qkm.js → use-status-sounds-C9VgXEEx.js} +1 -1
- package/dist/client/assets/{use-tags-BJEZBtxG.js → use-tags-NInDmENg.js} +1 -1
- package/dist/client/assets/{use-task-board-items-D2yKMw6C.js → use-task-board-items-DQqSS9zt.js} +1 -1
- package/dist/client/assets/{use-view-mode-1QIIASYP.js → use-view-mode-Darug4uL.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-myrJninv.js → use-virtual-mcp-lpZZNueP.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-YaU99gd-.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-BCbtGBrH.js +1 -0
- package/dist/client/assets/{users-D_3Ci4vh.js → users-B_W2L_TS.js} +1 -1
- package/dist/client/assets/variant-calendar-Dlq2QlJE.js +1 -0
- package/dist/client/assets/{view-mode-toggle-CDp1vlBH.js → view-mode-toggle-TX_wgotG.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +441 -441
- package/dist/server/server.js +313 -313
- package/package.json +1 -1
- package/dist/client/assets/app-editor-C99QxbVr.js +0 -1
- package/dist/client/assets/bulk-category-panel-dkuuzrOK.js +0 -1
- package/dist/client/assets/category-editor-DFe_8kh7.js +0 -1
- package/dist/client/assets/collection-detail-D44aYgaU.js +0 -1
- package/dist/client/assets/connection-detail-Bcp5xAJw.js +0 -1
- package/dist/client/assets/file-explorer-5HGX_HFH.js +0 -2
- package/dist/client/assets/index-D9Pbmk9A.css +0 -1
- package/dist/client/assets/index-V6-hWSaI.js +0 -1
- package/dist/client/assets/page-seo-form-CUYpPPow.js +0 -1
- package/dist/client/assets/post-calendar-Bh07OXFP.js +0 -1
- package/dist/client/assets/post-editor-4ebsIKyN.js +0 -1
- package/dist/client/assets/project-app-view-D7FUQg4b.js +0 -1
- package/dist/client/assets/record-editor-DmFVSnVz.js +0 -1
- package/dist/client/assets/redirect-editor-BrlCQjiO.js +0 -1
- package/dist/client/assets/registry-I40z-v1u.js +0 -2
- package/dist/client/assets/sections-editor-NQ2NE_IT.js +0 -2
- package/dist/client/assets/select-DCFOCjoX.js +0 -1
- package/dist/client/assets/seo-editor-CMk3v5B7.js +0 -1
- package/dist/client/assets/store-registry-fgxo6Bz0.js +0 -2
- package/dist/client/assets/useInfiniteQuery-CbKuLMPg.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-C33Ws-pQ.js +0 -1
- package/dist/client/assets/variant-calendar-D50appzS.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as q,c as W,b as fe,ay as nO,j as m,B as er,an as TE,ak as rO,ax as aO,cs as v_,ct as iO,aI as sO,b2 as xt,cu as oO,n as ye,cd as tb,cv as no,J as lO,d as ra,a5 as uO,f as cO,q as dO,a8 as Vr,a9 as Wr,ab as Yr,bn as pO,bk as nb,br as fO,bq as hO,cr as mO,bo as gO,cw as bO,bm as EO,H as Mn,p as yO,ac as __,e as TO,K as dn,t as Bm,o as rs,E as N_,b1 as C_,cx as rb,s as SO,b5 as w_,b3 as I_,b6 as ab,b7 as ib,bt as SE,aZ as xO}from"./index-11Axpbvx.js";import{aZ as kO,a_ as AO,aS as vO,a$ as _O,b0 as NO,r as CO,s as ro,D as wO,b1 as IO,p as Um,au as RO,i as xE,aG as OO,j as LO,b2 as DO,aX as R_,b3 as MO,b4 as O_,A as L_,b5 as wn,aM as PO,k as FO,w as BO}from"./agent-icon-BD4ir4AJ.js";import{i as jm}from"./ChevronRight-DDyA5W9O.js";import{u as D_}from"./useInfiniteQuery-CbKuLMPg.js";import{a as M_,u as UO}from"./use-connection-BT0yI2N1.js";import{c as jO,u as sb}from"./use-mcp-client-Ccznzs5K.js";import{u as HO}from"./use-virtual-mcp-myrJninv.js";import{c as P_,e as F_,a as sl,d as an,b as B_,T as sn}from"./table-CDNSisGr.js";import{E as Hm}from"./empty-state-Cm37ZiLn.js";import{u as ob}from"./use-infinite-scroll-czLvmTC2.js";import{a as $O}from"./use-members-BrkFmrC2.js";import{u as U_,a as wa}from"./use-clock-tick-C-fvo9-8.js";import{e as zO}from"./use-automations-CJls2uog.js";import{u as qO}from"./useSuspenseInfiniteQuery-C33Ws-pQ.js";import{A as j_}from"./avatar-WApsR2TX.js";import{t as ao}from"./ChevronDown-CVbb0r_e.js";import{n as $m}from"./ChevronUp-BFhKV90E.js";import{t as GO,a as H_,n as lb}from"./Tool02-HLpWqOaY.js";import{t as ol}from"./Stars01-hOH5qHG7.js";import{i as $_,b as xs}from"./XCircle-9IEiQ4L2.js";import{i as as}from"./Check-BIWtIuCf.js";import{a as ll}from"./Copy01-Dd6exwRm.js";import{b as xr,t as ub,c as kE}from"./format-time-BnbuEtat.js";import{u as z_}from"./use-copy-D_i4k6QZ.js";import{b as q_,a as VO,c as WO,d as YO,e as G_,g as KO,f as XO}from"./dialog-BBPJC7yY.js";import{n as V_}from"./Download01-ByYWlv8P.js";import{j as ZO,f as QO,q as JO,s as eL}from"./tab-id-DTQBZsSu.js";import{d as tL,b as nL,r as rL,e as aL}from"./hooks-DUQfZTL_.js";import{k as $a,D as iL,b as cb,c as W_,a as sL}from"./chat-context-DjYbmLav.js";import{c as oL}from"./monaco-editor-DGH_uddi.js";import{g as Y_,M as lL}from"./types-v-KFI9T9.js";import{i as K_}from"./AlertCircle-6tWU7wYa.js";import{s as uL}from"./Eye-CoYKR0nI.js";import{s as cL}from"./XClose-C_dHeH17.js";import{c as dL,b as pL,a as ks}from"./Tool01-55e9Pzj9.js";import{i as fL}from"./Share07-DTtbdEzm.js";import{i as Ei}from"./Monitor01-DkkiUD9G.js";import{i as hL}from"./SearchMd-Cn4Bukdn.js";import{u as mL,a as gL}from"./shell-layout-BjqyiyfI.js";import{n as X_}from"./LinkExternal01-BMTo98Dx.js";import{I as vr}from"./integration-icon-BTaqQLeL.js";import{a as db}from"./Users03-DeTmNZEn.js";import{a as In}from"./Palette-fIe3ZXln.js";import{c as Z_}from"./use-navigate-to-agent-CEI397ME.js";import{a as bL}from"./Stars02-aJgerMdO.js";import{e as EL,i as yL,a as TL,S as SL}from"./constants-z9Iog-sb.js";import{g as xL}from"./chart-B5D871qx.js";import{F as kL,d as AL,a as vL,e as _L,b as NL,c as CL}from"./form-CbBceGEv.js";import{I as wL}from"./input-CmWpGJPZ.js";import{S as IL}from"./spinner-5sgFnmTJ.js";import{i as RL}from"./Globe01-sUFldSbl.js";import{F as OL}from"./file-type-icon-CzJDfNY8.js";const LL={openrouter:t=>{const e=t?.openrouter;return typeof e=="object"&&e!==null&&"usage"in e&&typeof e.usage=="object"&&e.usage!==null&&"cost"in e.usage&&typeof e.usage.cost=="number"?e.usage.cost:null}};function Q_(t){if(!t?.providerMetadata)return 0;for(const e of Object.values(LL)){const n=e(t.providerMetadata);if(n!==null)return n}return 0}function J_(){return{inputTokens:0,outputTokens:0,reasoningTokens:0,totalTokens:0,cost:0,cacheReadTokens:0,cacheWriteTokens:0}}function eN(t,e){if(!e)return t;const n=e.inputTokenDetails?.cacheReadTokens??e.cachedInputTokens??0,r=e.inputTokenDetails?.cacheWriteTokens??0;return{inputTokens:t.inputTokens+(e.inputTokens??0),outputTokens:t.outputTokens+(e.outputTokens??0),reasoningTokens:t.reasoningTokens+(e.reasoningTokens??0),totalTokens:t.totalTokens+(e.totalTokens??0),cost:t.cost+Q_(e),cacheReadTokens:t.cacheReadTokens+n,cacheWriteTokens:t.cacheWriteTokens+r}}function pb(t){const e=Math.max(t.inputTokens,t.cacheReadTokens+t.cacheWriteTokens);return e>0?t.cacheReadTokens/e:0}function Vie(t){return t.reduce((e,n)=>eN(e,n.metadata?.usage),J_())}const DL={damping:.7,stiffness:.05,mass:1.25},ML=70,PL=1e3/60,FL=350;let ul=!1;globalThis.document?.addEventListener("mousedown",()=>{ul=!0});globalThis.document?.addEventListener("mouseup",()=>{ul=!1});globalThis.document?.addEventListener("click",()=>{ul=!1});const BL=(t={})=>{const[e,n]=q.useState(!1),[r,a]=q.useState(t.initial!==!1),[i,s]=q.useState(!1),o=q.useRef(null);o.current=t;const l=q.useCallback(()=>{if(!ul)return!1;const T=window.getSelection();if(!T||!T.rangeCount)return!1;const x=T.getRangeAt(0);return x.commonAncestorContainer.contains(b.current)||b.current?.contains(x.commonAncestorContainer)},[]),u=q.useCallback(T=>{d.isAtBottom=T,a(T)},[]),c=q.useCallback(T=>{d.escapedFromLock=T,n(T)},[]),d=q.useMemo(()=>{let T;return{escapedFromLock:e,isAtBottom:r,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return b.current?.scrollTop??0},set scrollTop(x){if(b.current){const{scrollBehavior:k}=getComputedStyle(b.current);k!=="auto"&&(b.current.style.scrollBehavior="auto"),b.current.scrollTop=x,d.ignoreScrollToTop=b.current.scrollTop,k!=="auto"&&(b.current.style.scrollBehavior=k)}},get targetScrollTop(){return!b.current||!y.current?0:b.current.scrollHeight-1-b.current.clientHeight},get calculatedTargetScrollTop(){if(!b.current||!y.current)return 0;const{targetScrollTop:x}=this;if(!t.targetScrollTop)return x;if(T?.targetScrollTop===x)return T.calculatedScrollTop;const k=Math.max(Math.min(t.targetScrollTop(x,{scrollElement:b.current,contentElement:y.current}),x),0);return T={targetScrollTop:x,calculatedScrollTop:k},requestAnimationFrame(()=>{T=void 0}),k},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=ML}}},[]),p=q.useCallback((T={})=>{typeof T=="string"&&(T={animation:T}),T.preserveScrollPosition||u(!0);const x=Date.now()+(Number(T.wait)||0),k=Zl(o.current,T.animation),{ignoreEscapes:v=!1}=T;let S,A=d.calculatedTargetScrollTop;T.duration instanceof Promise?T.duration.finally(()=>{S=Date.now()}):S=x+(T.duration??0);const _=async()=>{const N=new Promise(requestAnimationFrame).then(()=>{if(!d.isAtBottom)return d.animation=void 0,!1;const{scrollTop:C}=d,L=performance.now(),P=(L-(d.lastTick??L))/PL;if(d.animation||(d.animation={behavior:k,promise:N,ignoreEscapes:v}),d.animation.behavior===k&&(d.lastTick=L),l()||x>Date.now())return _();if(C<Math.min(A,d.calculatedTargetScrollTop)){if(d.animation?.behavior===k){if(k==="instant")return d.scrollTop=d.calculatedTargetScrollTop,_();d.velocity=(k.damping*d.velocity+k.stiffness*d.scrollDifference)/k.mass,d.accumulated+=d.velocity*P,d.scrollTop+=d.accumulated,d.scrollTop!==C&&(d.accumulated=0)}return _()}return S>Date.now()?(A=d.calculatedTargetScrollTop,_()):(d.animation=void 0,d.scrollTop<d.calculatedTargetScrollTop?p({animation:Zl(o.current,o.current.resize),ignoreEscapes:v,duration:Math.max(0,S-Date.now())||void 0}):d.isAtBottom)});return N.then(C=>(requestAnimationFrame(()=>{d.animation||(d.lastTick=void 0,d.velocity=0)}),C))};return T.wait!==!0&&(d.animation=void 0),d.animation?.behavior===k?d.animation.promise:_()},[u,l,d]),f=q.useCallback(()=>{c(!0),u(!1)},[c,u]),h=q.useCallback(({target:T})=>{if(T!==b.current)return;const{scrollTop:x,ignoreScrollToTop:k}=d;let{lastScrollTop:v=x}=d;d.lastScrollTop=x,d.ignoreScrollToTop=void 0,k&&k>x&&(v=k),s(d.isNearBottom),setTimeout(()=>{if(d.resizeDifference||x===k)return;if(l()){c(!0),u(!1);return}const S=x>v,A=x<v;if(d.animation?.ignoreEscapes){d.scrollTop=v;return}A&&(c(!0),u(!1)),S&&c(!1),!d.escapedFromLock&&d.isNearBottom&&u(!0)},1)},[c,u,l,d]),g=q.useCallback(({target:T,deltaY:x})=>{let k=T;for(;!["scroll","auto"].includes(getComputedStyle(k).overflow);){if(!k.parentElement)return;k=k.parentElement}k===b.current&&x<0&&b.current.scrollHeight>b.current.clientHeight&&!d.animation?.ignoreEscapes&&(c(!0),u(!1))},[c,u,d]),b=AE(T=>{b.current?.removeEventListener("scroll",h),b.current?.removeEventListener("wheel",g),T?.addEventListener("scroll",h,{passive:!0}),T?.addEventListener("wheel",g,{passive:!0})},[]),y=AE(T=>{if(d.resizeObserver?.disconnect(),d.resizeObserver=void 0,!T)return;let x;d.resizeObserver=new ResizeObserver(([k])=>{const{height:v}=k.contentRect,S=v-(x??v);if(d.resizeDifference=S,d.scrollTop>d.targetScrollTop&&(d.scrollTop=d.targetScrollTop),s(d.isNearBottom),S>=0){const A=Zl(o.current,x?o.current.resize:o.current.initial);p({animation:A,wait:!0,preserveScrollPosition:!0,duration:A==="instant"?void 0:FL})}else d.isNearBottom&&(c(!1),u(!0));x=v,requestAnimationFrame(()=>{setTimeout(()=>{d.resizeDifference===S&&(d.resizeDifference=0)},1)})}),d.resizeObserver?.observe(T)},[]);return{contentRef:y,scrollRef:b,scrollToBottom:p,stopScroll:f,isAtBottom:r||i,isNearBottom:i,escapedFromLock:e,state:d}};function AE(t,e){const n=q.useCallback(r=>(n.current=r,t(r)),e);return n}const Xl=new Map;function Zl(...t){const e={...DL};let n=!1;for(const a of t){if(a==="instant"){n=!0;continue}typeof a=="object"&&(n=!1,e.damping=a.damping??e.damping,e.stiffness=a.stiffness??e.stiffness,e.mass=a.mass??e.mass)}const r=JSON.stringify(e);return Xl.has(r)||Xl.set(r,Object.freeze(e)),n?"instant":Xl.get(r)}function UL(t){let e=2166136261;for(let n=0;n<t.length;n++)e=Math.imul(e^t.charCodeAt(n),16777619);return`a${(e>>>0).toString(36).padStart(6,"0").slice(-6)}`}function fb(t){if(t&&typeof t=="object"&&"gatewayClientId"in t&&typeof t.gatewayClientId=="string")return t.gatewayClientId}function hb(t,e){if(!e)return t;const n=`${UL(e)}_`;return t.startsWith(n)?t.slice(n.length):t}function jL(t,e){return hb(t,e).replace(/[_-]/g," ").toLowerCase()}function HL(t,e){const n={};for(const r of t?.arguments??[])n[r.name]=r.required?TE().min(1,e):TE();return rO(n)}function $L(t,e){const n={};for(const r of t.arguments??[])n[r.name]=e?.[r.name]??"";return n}function zL(t){const e=W.c(74),{prompt:n,setPrompt:r,onSubmit:a,defaultValues:i}=t,s=q.useId(),o=fe();let l,u;if(e[0]!==n||e[1]!==o){const w=HL(n,o("chat.dialogPromptArguments.required"));u=aO,l=nO(w),e[0]=n,e[1]=o,e[2]=l,e[3]=u}else l=e[2],u=e[3];let c;e[4]!==i||e[5]!==n?(c=n?$L(n,i):{},e[4]=i,e[5]=n,e[6]=c):c=e[6];let d;e[7]!==l||e[8]!==c?(d={resolver:l,defaultValues:c,mode:"onChange"},e[7]=l,e[8]=c,e[9]=d):d=e[9];const p=u(d);let f;e[10]!==n?.arguments?(f=n?.arguments??[],e[10]=n?.arguments,e[11]=f):f=e[11];const h=f;let g;e[12]!==p||e[13]!==a||e[14]!==r?(g=async w=>{await a(w),r(null),p.reset()},e[12]=p,e[13]=a,e[14]=r,e[15]=g):g=e[15];const b=g;let y;e[16]!==p||e[17]!==r?(y=w=>{w||(p.reset(),r(null))},e[16]=p,e[17]=r,e[18]=y):y=e[18];const T=y;if(!n)return null;let x;e[19]!==n._meta||e[20]!==n.name||e[21]!==n.title?(x=n.title||jL(n.name,fb(n._meta)),e[19]=n._meta,e[20]=n.name,e[21]=n.title,e[22]=x):x=e[22];let k;e[23]!==x?(k=m.jsx(q_,{children:m.jsx("span",{className:"capitalize",children:x})}),e[23]=x,e[24]=k):k=e[24];let v;e[25]!==n.description?(v=n.description&&m.jsx("p",{className:"text-sm text-muted-foreground",children:n.description}),e[25]=n.description,e[26]=v):v=e[26];let S;e[27]!==v||e[28]!==k?(S=m.jsxs(VO,{children:[k,v]}),e[27]=v,e[28]=k,e[29]=S):S=e[29];let A;e[30]!==p||e[31]!==b?(A=w=>{w.stopPropagation(),p.handleSubmit(b)(w)},e[30]=p,e[31]=b,e[32]=A):A=e[32];let _;if(e[33]!==h||e[34]!==p.control||e[35]!==p.formState.isSubmitting||e[36]!==o){let w;e[38]!==p.control||e[39]!==p.formState.isSubmitting||e[40]!==o?(w=V=>m.jsx(AL,{control:p.control,name:V.name,render:ee=>{const{field:R}=ee;return m.jsxs(vL,{children:[m.jsxs(_L,{className:"text-xs",children:[V.name,V.required?null:m.jsxs("span",{className:"text-muted-foreground font-normal",children:[" ",o("chat.dialogPromptArguments.optional")]})]}),m.jsx(NL,{children:m.jsx(wL,{...R,value:R.value??"",required:V.required,placeholder:V.description??"",className:"h-9",disabled:p.formState.isSubmitting})}),m.jsx(CL,{})]})}},V.name),e[38]=p.control,e[39]=p.formState.isSubmitting,e[40]=o,e[41]=w):w=e[41],_=h.map(w),e[33]=h,e[34]=p.control,e[35]=p.formState.isSubmitting,e[36]=o,e[37]=_}else _=e[37];let N;e[42]!==T?(N=()=>T(!1),e[42]=T,e[43]=N):N=e[43];const C=p.formState.isSubmitting;let L;e[44]!==o?(L=o("chat.dialogPromptArguments.cancel"),e[44]=o,e[45]=L):L=e[45];let P;e[46]!==p.formState.isSubmitting||e[47]!==N||e[48]!==L?(P=m.jsx(er,{type:"button",variant:"ghost",onClick:N,disabled:C,children:L}),e[46]=p.formState.isSubmitting,e[47]=N,e[48]=L,e[49]=P):P=e[49];let H;e[50]!==p.formState.isSubmitting||e[51]!==o?(H=p.formState.isSubmitting?m.jsxs("span",{className:"flex items-center gap-2",children:[m.jsx(IL,{size:"xs"}),o("chat.dialogPromptArguments.loading")]}):o("chat.dialogPromptArguments.usePrompt"),e[50]=p.formState.isSubmitting,e[51]=o,e[52]=H):H=e[52];let F;e[53]!==p.formState.isSubmitting||e[54]!==s||e[55]!==H?(F=m.jsx(er,{type:"submit",form:s,disabled:p.formState.isSubmitting,children:H}),e[53]=p.formState.isSubmitting,e[54]=s,e[55]=H,e[56]=F):F=e[56];let M;e[57]!==P||e[58]!==F?(M=m.jsxs(WO,{children:[P,F]}),e[57]=P,e[58]=F,e[59]=M):M=e[59];let j;e[60]!==s||e[61]!==A||e[62]!==_||e[63]!==M?(j=m.jsxs("form",{id:s,className:"space-y-4 py-4",autoComplete:"off",onSubmit:A,children:[_,M]}),e[60]=s,e[61]=A,e[62]=_,e[63]=M,e[64]=j):j=e[64];let U;e[65]!==p||e[66]!==j?(U=m.jsx(kL,{...p,children:j}),e[65]=p,e[66]=j,e[67]=U):U=e[67];let B;e[68]!==S||e[69]!==U?(B=m.jsxs(YO,{className:"sm:max-w-lg max-h-[80vh] overflow-y-auto",children:[S,U]}),e[68]=S,e[69]=U,e[70]=B):B=e[70];let Y;return e[71]!==T||e[72]!==B?(Y=m.jsx(G_,{open:!0,onOpenChange:T,children:B}),e[71]=T,e[72]=B,e[73]=Y):Y=e[73],Y}function zm(t){return t?t.replace(/[_-]/g," ").toLowerCase().split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "):""}function Tn(t,e){return t==="output-error"||t==="output-denied"?"error":t==="approval-requested"?"approval":t==="input-streaming"||t==="input-available"||t==="output-available"&&e===!0?"loading":"idle"}function za(t){if(t==null||typeof t!="object")return;const e=t;if(e.structuredContent&&typeof e.structuredContent=="object")return e.structuredContent;if(Array.isArray(e.content)){const n=e.content[0];if(n?.type==="text"&&typeof n.text=="string")try{return JSON.parse(n.text)}catch{return}return}return t}function ht(t){this.content=t}ht.prototype={constructor:ht,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,a=r.find(t),i=r.content.slice();return a==-1?i.push(n||t,e):(i[a+1]=e,n&&(i[a]=n)),new ht(i)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new ht(n)},addToStart:function(t,e){return new ht([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new ht(n)},addBefore:function(t,e,n){var r=this.remove(e),a=r.content.slice(),i=r.find(t);return a.splice(i==-1?a.length:i,0,e,n),new ht(a)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=ht.from(t),t.size?new ht(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=ht.from(t),t.size?new ht(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=ht.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}};ht.from=function(t){if(t instanceof ht)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new ht(e)};function tN(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let a=t.child(r),i=e.child(r);if(a==i){n+=a.nodeSize;continue}if(!a.sameMarkup(i))return n;if(a.isText&&a.text!=i.text){for(let s=0;a.text[s]==i.text[s];s++)n++;return n}if(a.content.size||i.content.size){let s=tN(a.content,i.content,n+1);if(s!=null)return s}n+=a.nodeSize}}function nN(t,e,n,r){for(let a=t.childCount,i=e.childCount;;){if(a==0||i==0)return a==i?null:{a:n,b:r};let s=t.child(--a),o=e.child(--i),l=s.nodeSize;if(s==o){n-=l,r-=l;continue}if(!s.sameMarkup(o))return{a:n,b:r};if(s.isText&&s.text!=o.text){let u=0,c=Math.min(s.text.length,o.text.length);for(;u<c&&s.text[s.text.length-u-1]==o.text[o.text.length-u-1];)u++,n--,r--;return{a:n,b:r}}if(s.content.size||o.content.size){let u=nN(s.content,o.content,n-1,r-1);if(u)return u}n-=l,r-=l}}class X{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,a=0,i){for(let s=0,o=0;o<n;s++){let l=this.content[s],u=o+l.nodeSize;if(u>e&&r(l,a+o,i||null,s)!==!1&&l.content.size){let c=o+1;l.nodesBetween(Math.max(0,e-c),Math.min(l.content.size,n-c),r,a+c)}o=u}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,a){let i="",s=!0;return this.nodesBetween(e,n,(o,l)=>{let u=o.isText?o.text.slice(Math.max(e,l)-l,n-l):o.isLeaf?a?typeof a=="function"?a(o):a:o.type.spec.leafText?o.type.spec.leafText(o):"":"";o.isBlock&&(o.isLeaf&&u||o.isTextblock)&&r&&(s?s=!1:i+=r),i+=u},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,a=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(a[a.length-1]=n.withText(n.text+r.text),i=1);i<e.content.length;i++)a.push(e.content[i]);return new X(a,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],a=0;if(n>e)for(let i=0,s=0;s<n;i++){let o=this.content[i],l=s+o.nodeSize;l>e&&((s<e||l>n)&&(o.isText?o=o.cut(Math.max(0,e-s),Math.min(o.text.length,n-s)):o=o.cut(Math.max(0,e-s-1),Math.min(o.content.size,n-s-1))),r.push(o),a+=o.nodeSize),s=l}return new X(r,a)}cutByIndex(e,n){return e==n?X.empty:e==0&&n==this.content.length?this:new X(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let a=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return a[e]=n,new X(a,i)}addToStart(e){return new X([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new X(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let a=this.content[n];e(a,r,n),r+=a.nodeSize}}findDiffStart(e,n=0){return tN(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return nN(this,e,n,r)}findIndex(e){if(e==0)return As(0,e);if(e==this.size)return As(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let a=this.child(n),i=r+a.nodeSize;if(i>=e)return i==e?As(n+1,i):As(n,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return X.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new X(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return X.empty;let n,r=0;for(let a=0;a<e.length;a++){let i=e[a];r+=i.nodeSize,a&&i.isText&&e[a-1].sameMarkup(i)?(n||(n=e.slice(0,a)),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new X(n||e,r)}static from(e){if(!e)return X.empty;if(e instanceof X)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new X([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}X.empty=new X([],0);const Ql={index:0,offset:0};function As(t,e){return Ql.index=t,Ql.offset=e,Ql}function io(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!io(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!io(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let $e=class qm{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let a=0;a<e.length;a++){let i=e[a];if(this.eq(i))return e;if(this.type.excludes(i.type))n||(n=e.slice(0,a));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(n||(n=e.slice(0,a)),n.push(this),r=!0),n&&n.push(i)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&io(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let a=r.create(n.attrs);return r.checkAttrs(a.attrs),a}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return qm.none;if(e instanceof qm)return[e];let n=e.slice();return n.sort((r,a)=>r.type.rank-a.type.rank),n}};$e.none=[];class so extends Error{}class ae{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=aN(this.content,e+this.openStart,n);return r&&new ae(r,this.openStart,this.openEnd)}removeBetween(e,n){return new ae(rN(this.content,e+this.openStart,n+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,n){if(!n)return ae.empty;let r=n.openStart||0,a=n.openEnd||0;if(typeof r!="number"||typeof a!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new ae(X.fromJSON(e,n.content),r,a)}static maxOpen(e,n=!0){let r=0,a=0;for(let i=e.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.lastChild)a++;return new ae(e,r,a)}}ae.empty=new ae(X.empty,0,0);function rN(t,e,n){let{index:r,offset:a}=t.findIndex(e),i=t.maybeChild(r),{index:s,offset:o}=t.findIndex(n);if(a==e||i.isText){if(o!=n&&!t.child(s).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return t.replaceChild(r,i.copy(rN(i.content,e-a-1,n-a-1)))}function aN(t,e,n,r){let{index:a,offset:i}=t.findIndex(e),s=t.maybeChild(a);if(i==e||s.isText)return r&&!r.canReplace(a,a,n)?null:t.cut(0,e).append(n).append(t.cut(e));let o=aN(s.content,e-i-1,n,s);return o&&t.replaceChild(a,s.copy(o))}function qL(t,e,n){if(n.openStart>t.depth)throw new so("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new so("Inconsistent open depths");return iN(t,e,n,0)}function iN(t,e,n,r){let a=t.index(r),i=t.node(r);if(a==e.index(r)&&r<t.depth-n.openStart){let s=iN(t,e,n,r+1);return i.copy(i.content.replaceChild(a,s))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let s=t.parent,o=s.content;return Hr(s,o.cut(0,t.parentOffset).append(n.content).append(o.cut(e.parentOffset)))}else{let{start:s,end:o}=GL(n,t);return Hr(i,oN(t,s,o,e,r))}else return Hr(i,oo(t,e,r))}function sN(t,e){if(!e.type.compatibleContent(t.type))throw new so("Cannot join "+e.type.name+" onto "+t.type.name)}function Gm(t,e,n){let r=t.node(n);return sN(r,e.node(n)),r}function jr(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function yi(t,e,n,r){let a=(e||t).node(n),i=0,s=e?e.index(n):a.childCount;t&&(i=t.index(n),t.depth>n?i++:t.textOffset&&(jr(t.nodeAfter,r),i++));for(let o=i;o<s;o++)jr(a.child(o),r);e&&e.depth==n&&e.textOffset&&jr(e.nodeBefore,r)}function Hr(t,e){return t.type.checkContent(e),t.copy(e)}function oN(t,e,n,r,a){let i=t.depth>a&&Gm(t,e,a+1),s=r.depth>a&&Gm(n,r,a+1),o=[];return yi(null,t,a,o),i&&s&&e.index(a)==n.index(a)?(sN(i,s),jr(Hr(i,oN(t,e,n,r,a+1)),o)):(i&&jr(Hr(i,oo(t,e,a+1)),o),yi(e,n,a,o),s&&jr(Hr(s,oo(n,r,a+1)),o)),yi(r,null,a,o),new X(o)}function oo(t,e,n){let r=[];if(yi(null,t,n,r),t.depth>n){let a=Gm(t,e,n+1);jr(Hr(a,oo(t,e,n+1)),r)}return yi(e,null,n,r),new X(r)}function GL(t,e){let n=e.depth-t.openStart,a=e.node(n).copy(t.content);for(let i=n-1;i>=0;i--)a=e.node(i).copy(X.from(a));return{start:a.resolveNoCache(t.openStart+n),end:a.resolveNoCache(a.content.size-t.openEnd-n)}}class Ui{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.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,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],a=e.child(n);return r?e.child(n).cut(r):a}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],a=n==0?0:this.path[n*3-1]+1;for(let i=0;i<e;i++)a+=r.child(i).nodeSize;return a}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return $e.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),a=e.maybeChild(n);if(!r){let o=r;r=a,a=o}let i=r.marks;for(var s=0;s<i.length;s++)i[s].type.spec.inclusive===!1&&(!a||!i[s].isInSet(a.marks))&&(i=i[s--].removeFromSet(i));return i}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,a=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!a||!r[i].isInSet(a.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){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)&&(!n||n(this.node(r))))return new lo(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 n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],a=0,i=n;for(let s=e;;){let{index:o,offset:l}=s.content.findIndex(i),u=i-l;if(r.push(s,o,a+l),!u||(s=s.child(o),s.isText))break;i=u-1,a+=l+1}return new Ui(n,r,i)}static resolveCached(e,n){let r=vE.get(e);if(r)for(let i=0;i<r.elts.length;i++){let s=r.elts[i];if(s.pos==n)return s}else vE.set(e,r=new VL);let a=r.elts[r.i]=Ui.resolve(e,n);return r.i=(r.i+1)%WL,a}}class VL{constructor(){this.elts=[],this.i=0}}const WL=12,vE=new WeakMap;class lo{constructor(e,n,r){this.$from=e,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const YL=Object.create(null);class gn{constructor(e,n,r,a=$e.none){this.type=e,this.attrs=n,this.marks=a,this.content=r||X.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,n,r,a=0){this.content.nodesBetween(e,n,r,a,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,n,r,a){return this.content.textBetween(e,n,r,a)}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,n,r){return this.type==e&&io(this.attrs,n||e.defaultAttrs||YL)&&$e.sameSet(this.marks,r||$e.none)}copy(e=null){return e==this.content?this:new gn(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new gn(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return ae.empty;let a=this.resolve(e),i=this.resolve(n),s=r?0:a.sharedDepth(n),o=a.start(s),u=a.node(s).content.cut(a.pos-o,i.pos-o);return new ae(u,a.depth-s,i.depth-s)}replace(e,n,r){return qL(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:a}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(a==e||n.isText)return n;e-=a+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let a=this.content.child(n-1);return{node:a,index:n-1,offset:r-a.nodeSize}}resolve(e){return Ui.resolveCached(this,e)}resolveNoCache(e){return Ui.resolve(this,e)}rangeHasMark(e,n,r){let a=!1;return n>e&&this.nodesBetween(e,n,i=>(r.isInSet(i.marks)&&(a=!0),!a)),a}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()+")"),lN(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=X.empty,a=0,i=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,a,i),o=s&&s.matchFragment(this.content,n);if(!o||!o.validEnd)return!1;for(let l=a;l<i;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,n,r,a){if(a&&!this.type.allowsMarks(a))return!1;let i=this.contentMatchAt(e).matchType(r),s=i&&i.matchFragment(this.content,n);return s?s.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=$e.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!$e.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n 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(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let a=X.fromJSON(e,n.content),i=e.nodeType(n.type).create(n.attrs,a,r);return i.type.checkAttrs(i.attrs),i}}gn.prototype.text=void 0;class uo extends gn{constructor(e,n,r,a){if(super(e,n,null,a),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):lN(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new uo(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new uo(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function lN(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class Kr{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new KL(e,n);if(r.next==null)return Kr.empty;let a=uN(r);r.next&&r.err("Unexpected trailing text");let i=nD(tD(a));return rD(i,r),i}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let a=this;for(let i=n;a&&i<r;i++)a=a.matchType(e.child(i).type);return a}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:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let a=[this];function i(s,o){let l=s.matchFragment(e,r);if(l&&(!n||l.validEnd))return X.from(o.map(u=>u.createAndFill()));for(let u=0;u<s.next.length;u++){let{type:c,next:d}=s.next[u];if(!(c.isText||c.hasRequiredAttrs())&&a.indexOf(d)==-1){a.push(d);let p=i(d,o.concat(c));if(p)return p}}return null}return i(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let a=r.shift(),i=a.match;if(i.matchType(e)){let s=[];for(let o=a;o.type;o=o.via)s.push(o.type);return s.reverse()}for(let s=0;s<i.next.length;s++){let{type:o,next:l}=i.next[s];!o.isLeaf&&!o.hasRequiredAttrs()&&!(o.name in n)&&(!a.type||l.validEnd)&&(r.push({match:o.contentMatch,type:o,via:a}),n[o.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 n(r){e.push(r);for(let a=0;a<r.next.length;a++)e.indexOf(r.next[a].next)==-1&&n(r.next[a].next)}return n(this),e.map((r,a)=>{let i=a+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)i+=(s?", ":"")+r.next[s].type.name+"->"+e.indexOf(r.next[s].next);return i}).join(`
|
|
1
|
+
import{r as q,c as W,b as fe,ay as nO,j as m,B as er,an as TE,ak as rO,ax as aO,co as v_,cp as iO,aI as sO,b2 as xt,cq as oO,n as ye,cd as tb,cr as no,J as lO,d as ra,a5 as uO,f as cO,q as dO,a8 as Vr,a9 as Wr,ab as Yr,bn as pO,bk as nb,br as fO,bq as hO,cs as mO,bo as gO,ct as bO,bm as EO,H as Mn,p as yO,ac as __,e as TO,K as dn,t as Bm,o as rs,E as N_,b1 as C_,cu as rb,s as SO,b5 as w_,b3 as I_,b6 as ab,b7 as ib,bt as SE,aZ as xO}from"./index-DIDvVa8k.js";import{aZ as kO,a_ as AO,aS as vO,a$ as _O,b0 as NO,r as CO,s as ro,D as wO,b1 as IO,p as Um,au as RO,i as xE,aG as OO,j as LO,b2 as DO,aX as R_,b3 as MO,b4 as O_,A as L_,b5 as wn,aM as PO,k as FO,w as BO}from"./agent-icon-B5DHtXHe.js";import{i as jm}from"./ChevronRight-DyQIrKTD.js";import{u as D_}from"./useInfiniteQuery-YaU99gd-.js";import{a as M_,u as UO}from"./use-connection-Dke1W-MN.js";import{c as jO,u as sb}from"./use-mcp-client-CNj9UP6h.js";import{u as HO}from"./use-virtual-mcp-lpZZNueP.js";import{c as P_,e as F_,a as sl,d as an,b as B_,T as sn}from"./table-BYh1MtS_.js";import{E as Hm}from"./empty-state-DapPFVEJ.js";import{u as ob}from"./use-infinite-scroll-CImsH6dI.js";import{a as $O}from"./use-members-C_qJEHPM.js";import{u as U_,a as wa}from"./use-clock-tick-FTW32S7S.js";import{e as zO}from"./use-automations-yELoWtQL.js";import{u as qO}from"./useSuspenseInfiniteQuery-BCbtGBrH.js";import{A as j_}from"./avatar-LmU2UuLS.js";import{t as ao}from"./ChevronDown-CWJ9JErq.js";import{n as $m}from"./ChevronUp-D1hzk8dN.js";import{t as GO,a as H_,n as lb}from"./Tool02-D6336hR4.js";import{t as ol}from"./Stars01-CxkNaTg4.js";import{i as $_,b as xs}from"./XCircle-CM7DlBEY.js";import{i as as}from"./Check-DWZ740y8.js";import{a as ll}from"./Copy01-Jlghnbuk.js";import{b as xr,t as ub,c as kE}from"./format-time-BnbuEtat.js";import{u as z_}from"./use-copy-7MhyLyP3.js";import{b as q_,a as VO,c as WO,d as YO,e as G_,g as KO,f as XO}from"./dialog-ljnzZavy.js";import{n as V_}from"./Download01-C4Qc9N3I.js";import{j as ZO,f as QO,q as JO,s as eL}from"./tab-id-DIe1Nijm.js";import{d as tL,b as nL,r as rL,e as aL}from"./hooks-BjsPfcI_.js";import{k as $a,D as iL,b as cb,c as W_,a as sL}from"./chat-context-CEP09m4a.js";import{c as oL}from"./monaco-editor-9zsh1pmj.js";import{g as Y_,M as lL}from"./types-DL1u6s93.js";import{i as K_}from"./AlertCircle-v8fMNriz.js";import{s as uL}from"./Eye-CMkMKams.js";import{s as cL}from"./XClose-CkJJ5Qv5.js";import{c as dL,b as pL,a as ks}from"./Tool01-Bn5sQ3cN.js";import{i as fL}from"./Share07-DuVrrhTb.js";import{i as Ei}from"./Monitor01-Cne_Y8mg.js";import{i as hL}from"./SearchMd-BAZ9nMEZ.js";import{u as mL,a as gL}from"./shell-layout-C1VLqpGw.js";import{n as X_}from"./LinkExternal01-YzEu81ID.js";import{I as vr}from"./integration-icon-DpwOPnrc.js";import{a as db}from"./Users03-DoII_J3k.js";import{a as In}from"./Palette-DhXNXt05.js";import{c as Z_}from"./use-navigate-to-agent-CNDnIlgR.js";import{a as bL}from"./Stars02-q7wwk1en.js";import{e as EL,i as yL,a as TL,S as SL}from"./constants-z9Iog-sb.js";import{g as xL}from"./chart-gCLrqBZC.js";import{F as kL,d as AL,a as vL,e as _L,b as NL,c as CL}from"./form-CJ-cEs6U.js";import{I as wL}from"./input-Cx92h0Kn.js";import{S as IL}from"./spinner-BLKi8P8K.js";import{i as RL}from"./Globe01-D6aW3Uev.js";import{F as OL}from"./file-type-icon-DQgNU2Yc.js";const LL={openrouter:t=>{const e=t?.openrouter;return typeof e=="object"&&e!==null&&"usage"in e&&typeof e.usage=="object"&&e.usage!==null&&"cost"in e.usage&&typeof e.usage.cost=="number"?e.usage.cost:null}};function Q_(t){if(!t?.providerMetadata)return 0;for(const e of Object.values(LL)){const n=e(t.providerMetadata);if(n!==null)return n}return 0}function J_(){return{inputTokens:0,outputTokens:0,reasoningTokens:0,totalTokens:0,cost:0,cacheReadTokens:0,cacheWriteTokens:0}}function eN(t,e){if(!e)return t;const n=e.inputTokenDetails?.cacheReadTokens??e.cachedInputTokens??0,r=e.inputTokenDetails?.cacheWriteTokens??0;return{inputTokens:t.inputTokens+(e.inputTokens??0),outputTokens:t.outputTokens+(e.outputTokens??0),reasoningTokens:t.reasoningTokens+(e.reasoningTokens??0),totalTokens:t.totalTokens+(e.totalTokens??0),cost:t.cost+Q_(e),cacheReadTokens:t.cacheReadTokens+n,cacheWriteTokens:t.cacheWriteTokens+r}}function pb(t){const e=Math.max(t.inputTokens,t.cacheReadTokens+t.cacheWriteTokens);return e>0?t.cacheReadTokens/e:0}function Vie(t){return t.reduce((e,n)=>eN(e,n.metadata?.usage),J_())}const DL={damping:.7,stiffness:.05,mass:1.25},ML=70,PL=1e3/60,FL=350;let ul=!1;globalThis.document?.addEventListener("mousedown",()=>{ul=!0});globalThis.document?.addEventListener("mouseup",()=>{ul=!1});globalThis.document?.addEventListener("click",()=>{ul=!1});const BL=(t={})=>{const[e,n]=q.useState(!1),[r,a]=q.useState(t.initial!==!1),[i,s]=q.useState(!1),o=q.useRef(null);o.current=t;const l=q.useCallback(()=>{if(!ul)return!1;const T=window.getSelection();if(!T||!T.rangeCount)return!1;const x=T.getRangeAt(0);return x.commonAncestorContainer.contains(b.current)||b.current?.contains(x.commonAncestorContainer)},[]),u=q.useCallback(T=>{d.isAtBottom=T,a(T)},[]),c=q.useCallback(T=>{d.escapedFromLock=T,n(T)},[]),d=q.useMemo(()=>{let T;return{escapedFromLock:e,isAtBottom:r,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return b.current?.scrollTop??0},set scrollTop(x){if(b.current){const{scrollBehavior:k}=getComputedStyle(b.current);k!=="auto"&&(b.current.style.scrollBehavior="auto"),b.current.scrollTop=x,d.ignoreScrollToTop=b.current.scrollTop,k!=="auto"&&(b.current.style.scrollBehavior=k)}},get targetScrollTop(){return!b.current||!y.current?0:b.current.scrollHeight-1-b.current.clientHeight},get calculatedTargetScrollTop(){if(!b.current||!y.current)return 0;const{targetScrollTop:x}=this;if(!t.targetScrollTop)return x;if(T?.targetScrollTop===x)return T.calculatedScrollTop;const k=Math.max(Math.min(t.targetScrollTop(x,{scrollElement:b.current,contentElement:y.current}),x),0);return T={targetScrollTop:x,calculatedScrollTop:k},requestAnimationFrame(()=>{T=void 0}),k},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=ML}}},[]),p=q.useCallback((T={})=>{typeof T=="string"&&(T={animation:T}),T.preserveScrollPosition||u(!0);const x=Date.now()+(Number(T.wait)||0),k=Zl(o.current,T.animation),{ignoreEscapes:v=!1}=T;let S,A=d.calculatedTargetScrollTop;T.duration instanceof Promise?T.duration.finally(()=>{S=Date.now()}):S=x+(T.duration??0);const _=async()=>{const N=new Promise(requestAnimationFrame).then(()=>{if(!d.isAtBottom)return d.animation=void 0,!1;const{scrollTop:C}=d,L=performance.now(),P=(L-(d.lastTick??L))/PL;if(d.animation||(d.animation={behavior:k,promise:N,ignoreEscapes:v}),d.animation.behavior===k&&(d.lastTick=L),l()||x>Date.now())return _();if(C<Math.min(A,d.calculatedTargetScrollTop)){if(d.animation?.behavior===k){if(k==="instant")return d.scrollTop=d.calculatedTargetScrollTop,_();d.velocity=(k.damping*d.velocity+k.stiffness*d.scrollDifference)/k.mass,d.accumulated+=d.velocity*P,d.scrollTop+=d.accumulated,d.scrollTop!==C&&(d.accumulated=0)}return _()}return S>Date.now()?(A=d.calculatedTargetScrollTop,_()):(d.animation=void 0,d.scrollTop<d.calculatedTargetScrollTop?p({animation:Zl(o.current,o.current.resize),ignoreEscapes:v,duration:Math.max(0,S-Date.now())||void 0}):d.isAtBottom)});return N.then(C=>(requestAnimationFrame(()=>{d.animation||(d.lastTick=void 0,d.velocity=0)}),C))};return T.wait!==!0&&(d.animation=void 0),d.animation?.behavior===k?d.animation.promise:_()},[u,l,d]),f=q.useCallback(()=>{c(!0),u(!1)},[c,u]),h=q.useCallback(({target:T})=>{if(T!==b.current)return;const{scrollTop:x,ignoreScrollToTop:k}=d;let{lastScrollTop:v=x}=d;d.lastScrollTop=x,d.ignoreScrollToTop=void 0,k&&k>x&&(v=k),s(d.isNearBottom),setTimeout(()=>{if(d.resizeDifference||x===k)return;if(l()){c(!0),u(!1);return}const S=x>v,A=x<v;if(d.animation?.ignoreEscapes){d.scrollTop=v;return}A&&(c(!0),u(!1)),S&&c(!1),!d.escapedFromLock&&d.isNearBottom&&u(!0)},1)},[c,u,l,d]),g=q.useCallback(({target:T,deltaY:x})=>{let k=T;for(;!["scroll","auto"].includes(getComputedStyle(k).overflow);){if(!k.parentElement)return;k=k.parentElement}k===b.current&&x<0&&b.current.scrollHeight>b.current.clientHeight&&!d.animation?.ignoreEscapes&&(c(!0),u(!1))},[c,u,d]),b=AE(T=>{b.current?.removeEventListener("scroll",h),b.current?.removeEventListener("wheel",g),T?.addEventListener("scroll",h,{passive:!0}),T?.addEventListener("wheel",g,{passive:!0})},[]),y=AE(T=>{if(d.resizeObserver?.disconnect(),d.resizeObserver=void 0,!T)return;let x;d.resizeObserver=new ResizeObserver(([k])=>{const{height:v}=k.contentRect,S=v-(x??v);if(d.resizeDifference=S,d.scrollTop>d.targetScrollTop&&(d.scrollTop=d.targetScrollTop),s(d.isNearBottom),S>=0){const A=Zl(o.current,x?o.current.resize:o.current.initial);p({animation:A,wait:!0,preserveScrollPosition:!0,duration:A==="instant"?void 0:FL})}else d.isNearBottom&&(c(!1),u(!0));x=v,requestAnimationFrame(()=>{setTimeout(()=>{d.resizeDifference===S&&(d.resizeDifference=0)},1)})}),d.resizeObserver?.observe(T)},[]);return{contentRef:y,scrollRef:b,scrollToBottom:p,stopScroll:f,isAtBottom:r||i,isNearBottom:i,escapedFromLock:e,state:d}};function AE(t,e){const n=q.useCallback(r=>(n.current=r,t(r)),e);return n}const Xl=new Map;function Zl(...t){const e={...DL};let n=!1;for(const a of t){if(a==="instant"){n=!0;continue}typeof a=="object"&&(n=!1,e.damping=a.damping??e.damping,e.stiffness=a.stiffness??e.stiffness,e.mass=a.mass??e.mass)}const r=JSON.stringify(e);return Xl.has(r)||Xl.set(r,Object.freeze(e)),n?"instant":Xl.get(r)}function UL(t){let e=2166136261;for(let n=0;n<t.length;n++)e=Math.imul(e^t.charCodeAt(n),16777619);return`a${(e>>>0).toString(36).padStart(6,"0").slice(-6)}`}function fb(t){if(t&&typeof t=="object"&&"gatewayClientId"in t&&typeof t.gatewayClientId=="string")return t.gatewayClientId}function hb(t,e){if(!e)return t;const n=`${UL(e)}_`;return t.startsWith(n)?t.slice(n.length):t}function jL(t,e){return hb(t,e).replace(/[_-]/g," ").toLowerCase()}function HL(t,e){const n={};for(const r of t?.arguments??[])n[r.name]=r.required?TE().min(1,e):TE();return rO(n)}function $L(t,e){const n={};for(const r of t.arguments??[])n[r.name]=e?.[r.name]??"";return n}function zL(t){const e=W.c(74),{prompt:n,setPrompt:r,onSubmit:a,defaultValues:i}=t,s=q.useId(),o=fe();let l,u;if(e[0]!==n||e[1]!==o){const w=HL(n,o("chat.dialogPromptArguments.required"));u=aO,l=nO(w),e[0]=n,e[1]=o,e[2]=l,e[3]=u}else l=e[2],u=e[3];let c;e[4]!==i||e[5]!==n?(c=n?$L(n,i):{},e[4]=i,e[5]=n,e[6]=c):c=e[6];let d;e[7]!==l||e[8]!==c?(d={resolver:l,defaultValues:c,mode:"onChange"},e[7]=l,e[8]=c,e[9]=d):d=e[9];const p=u(d);let f;e[10]!==n?.arguments?(f=n?.arguments??[],e[10]=n?.arguments,e[11]=f):f=e[11];const h=f;let g;e[12]!==p||e[13]!==a||e[14]!==r?(g=async w=>{await a(w),r(null),p.reset()},e[12]=p,e[13]=a,e[14]=r,e[15]=g):g=e[15];const b=g;let y;e[16]!==p||e[17]!==r?(y=w=>{w||(p.reset(),r(null))},e[16]=p,e[17]=r,e[18]=y):y=e[18];const T=y;if(!n)return null;let x;e[19]!==n._meta||e[20]!==n.name||e[21]!==n.title?(x=n.title||jL(n.name,fb(n._meta)),e[19]=n._meta,e[20]=n.name,e[21]=n.title,e[22]=x):x=e[22];let k;e[23]!==x?(k=m.jsx(q_,{children:m.jsx("span",{className:"capitalize",children:x})}),e[23]=x,e[24]=k):k=e[24];let v;e[25]!==n.description?(v=n.description&&m.jsx("p",{className:"text-sm text-muted-foreground",children:n.description}),e[25]=n.description,e[26]=v):v=e[26];let S;e[27]!==v||e[28]!==k?(S=m.jsxs(VO,{children:[k,v]}),e[27]=v,e[28]=k,e[29]=S):S=e[29];let A;e[30]!==p||e[31]!==b?(A=w=>{w.stopPropagation(),p.handleSubmit(b)(w)},e[30]=p,e[31]=b,e[32]=A):A=e[32];let _;if(e[33]!==h||e[34]!==p.control||e[35]!==p.formState.isSubmitting||e[36]!==o){let w;e[38]!==p.control||e[39]!==p.formState.isSubmitting||e[40]!==o?(w=V=>m.jsx(AL,{control:p.control,name:V.name,render:ee=>{const{field:R}=ee;return m.jsxs(vL,{children:[m.jsxs(_L,{className:"text-xs",children:[V.name,V.required?null:m.jsxs("span",{className:"text-muted-foreground font-normal",children:[" ",o("chat.dialogPromptArguments.optional")]})]}),m.jsx(NL,{children:m.jsx(wL,{...R,value:R.value??"",required:V.required,placeholder:V.description??"",className:"h-9",disabled:p.formState.isSubmitting})}),m.jsx(CL,{})]})}},V.name),e[38]=p.control,e[39]=p.formState.isSubmitting,e[40]=o,e[41]=w):w=e[41],_=h.map(w),e[33]=h,e[34]=p.control,e[35]=p.formState.isSubmitting,e[36]=o,e[37]=_}else _=e[37];let N;e[42]!==T?(N=()=>T(!1),e[42]=T,e[43]=N):N=e[43];const C=p.formState.isSubmitting;let L;e[44]!==o?(L=o("chat.dialogPromptArguments.cancel"),e[44]=o,e[45]=L):L=e[45];let P;e[46]!==p.formState.isSubmitting||e[47]!==N||e[48]!==L?(P=m.jsx(er,{type:"button",variant:"ghost",onClick:N,disabled:C,children:L}),e[46]=p.formState.isSubmitting,e[47]=N,e[48]=L,e[49]=P):P=e[49];let H;e[50]!==p.formState.isSubmitting||e[51]!==o?(H=p.formState.isSubmitting?m.jsxs("span",{className:"flex items-center gap-2",children:[m.jsx(IL,{size:"xs"}),o("chat.dialogPromptArguments.loading")]}):o("chat.dialogPromptArguments.usePrompt"),e[50]=p.formState.isSubmitting,e[51]=o,e[52]=H):H=e[52];let F;e[53]!==p.formState.isSubmitting||e[54]!==s||e[55]!==H?(F=m.jsx(er,{type:"submit",form:s,disabled:p.formState.isSubmitting,children:H}),e[53]=p.formState.isSubmitting,e[54]=s,e[55]=H,e[56]=F):F=e[56];let M;e[57]!==P||e[58]!==F?(M=m.jsxs(WO,{children:[P,F]}),e[57]=P,e[58]=F,e[59]=M):M=e[59];let j;e[60]!==s||e[61]!==A||e[62]!==_||e[63]!==M?(j=m.jsxs("form",{id:s,className:"space-y-4 py-4",autoComplete:"off",onSubmit:A,children:[_,M]}),e[60]=s,e[61]=A,e[62]=_,e[63]=M,e[64]=j):j=e[64];let U;e[65]!==p||e[66]!==j?(U=m.jsx(kL,{...p,children:j}),e[65]=p,e[66]=j,e[67]=U):U=e[67];let B;e[68]!==S||e[69]!==U?(B=m.jsxs(YO,{className:"sm:max-w-lg max-h-[80vh] overflow-y-auto",children:[S,U]}),e[68]=S,e[69]=U,e[70]=B):B=e[70];let Y;return e[71]!==T||e[72]!==B?(Y=m.jsx(G_,{open:!0,onOpenChange:T,children:B}),e[71]=T,e[72]=B,e[73]=Y):Y=e[73],Y}function zm(t){return t?t.replace(/[_-]/g," ").toLowerCase().split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "):""}function Tn(t,e){return t==="output-error"||t==="output-denied"?"error":t==="approval-requested"?"approval":t==="input-streaming"||t==="input-available"||t==="output-available"&&e===!0?"loading":"idle"}function za(t){if(t==null||typeof t!="object")return;const e=t;if(e.structuredContent&&typeof e.structuredContent=="object")return e.structuredContent;if(Array.isArray(e.content)){const n=e.content[0];if(n?.type==="text"&&typeof n.text=="string")try{return JSON.parse(n.text)}catch{return}return}return t}function ht(t){this.content=t}ht.prototype={constructor:ht,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,a=r.find(t),i=r.content.slice();return a==-1?i.push(n||t,e):(i[a+1]=e,n&&(i[a]=n)),new ht(i)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new ht(n)},addToStart:function(t,e){return new ht([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new ht(n)},addBefore:function(t,e,n){var r=this.remove(e),a=r.content.slice(),i=r.find(t);return a.splice(i==-1?a.length:i,0,e,n),new ht(a)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=ht.from(t),t.size?new ht(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=ht.from(t),t.size?new ht(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=ht.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}};ht.from=function(t){if(t instanceof ht)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new ht(e)};function tN(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let a=t.child(r),i=e.child(r);if(a==i){n+=a.nodeSize;continue}if(!a.sameMarkup(i))return n;if(a.isText&&a.text!=i.text){for(let s=0;a.text[s]==i.text[s];s++)n++;return n}if(a.content.size||i.content.size){let s=tN(a.content,i.content,n+1);if(s!=null)return s}n+=a.nodeSize}}function nN(t,e,n,r){for(let a=t.childCount,i=e.childCount;;){if(a==0||i==0)return a==i?null:{a:n,b:r};let s=t.child(--a),o=e.child(--i),l=s.nodeSize;if(s==o){n-=l,r-=l;continue}if(!s.sameMarkup(o))return{a:n,b:r};if(s.isText&&s.text!=o.text){let u=0,c=Math.min(s.text.length,o.text.length);for(;u<c&&s.text[s.text.length-u-1]==o.text[o.text.length-u-1];)u++,n--,r--;return{a:n,b:r}}if(s.content.size||o.content.size){let u=nN(s.content,o.content,n-1,r-1);if(u)return u}n-=l,r-=l}}class X{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,a=0,i){for(let s=0,o=0;o<n;s++){let l=this.content[s],u=o+l.nodeSize;if(u>e&&r(l,a+o,i||null,s)!==!1&&l.content.size){let c=o+1;l.nodesBetween(Math.max(0,e-c),Math.min(l.content.size,n-c),r,a+c)}o=u}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,a){let i="",s=!0;return this.nodesBetween(e,n,(o,l)=>{let u=o.isText?o.text.slice(Math.max(e,l)-l,n-l):o.isLeaf?a?typeof a=="function"?a(o):a:o.type.spec.leafText?o.type.spec.leafText(o):"":"";o.isBlock&&(o.isLeaf&&u||o.isTextblock)&&r&&(s?s=!1:i+=r),i+=u},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,a=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(a[a.length-1]=n.withText(n.text+r.text),i=1);i<e.content.length;i++)a.push(e.content[i]);return new X(a,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],a=0;if(n>e)for(let i=0,s=0;s<n;i++){let o=this.content[i],l=s+o.nodeSize;l>e&&((s<e||l>n)&&(o.isText?o=o.cut(Math.max(0,e-s),Math.min(o.text.length,n-s)):o=o.cut(Math.max(0,e-s-1),Math.min(o.content.size,n-s-1))),r.push(o),a+=o.nodeSize),s=l}return new X(r,a)}cutByIndex(e,n){return e==n?X.empty:e==0&&n==this.content.length?this:new X(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let a=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return a[e]=n,new X(a,i)}addToStart(e){return new X([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new X(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let a=this.content[n];e(a,r,n),r+=a.nodeSize}}findDiffStart(e,n=0){return tN(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return nN(this,e,n,r)}findIndex(e){if(e==0)return As(0,e);if(e==this.size)return As(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let a=this.child(n),i=r+a.nodeSize;if(i>=e)return i==e?As(n+1,i):As(n,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return X.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new X(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return X.empty;let n,r=0;for(let a=0;a<e.length;a++){let i=e[a];r+=i.nodeSize,a&&i.isText&&e[a-1].sameMarkup(i)?(n||(n=e.slice(0,a)),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new X(n||e,r)}static from(e){if(!e)return X.empty;if(e instanceof X)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new X([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}X.empty=new X([],0);const Ql={index:0,offset:0};function As(t,e){return Ql.index=t,Ql.offset=e,Ql}function io(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!io(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!io(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let $e=class qm{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let a=0;a<e.length;a++){let i=e[a];if(this.eq(i))return e;if(this.type.excludes(i.type))n||(n=e.slice(0,a));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(n||(n=e.slice(0,a)),n.push(this),r=!0),n&&n.push(i)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&io(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let a=r.create(n.attrs);return r.checkAttrs(a.attrs),a}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return qm.none;if(e instanceof qm)return[e];let n=e.slice();return n.sort((r,a)=>r.type.rank-a.type.rank),n}};$e.none=[];class so extends Error{}class ae{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=aN(this.content,e+this.openStart,n);return r&&new ae(r,this.openStart,this.openEnd)}removeBetween(e,n){return new ae(rN(this.content,e+this.openStart,n+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,n){if(!n)return ae.empty;let r=n.openStart||0,a=n.openEnd||0;if(typeof r!="number"||typeof a!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new ae(X.fromJSON(e,n.content),r,a)}static maxOpen(e,n=!0){let r=0,a=0;for(let i=e.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.lastChild)a++;return new ae(e,r,a)}}ae.empty=new ae(X.empty,0,0);function rN(t,e,n){let{index:r,offset:a}=t.findIndex(e),i=t.maybeChild(r),{index:s,offset:o}=t.findIndex(n);if(a==e||i.isText){if(o!=n&&!t.child(s).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return t.replaceChild(r,i.copy(rN(i.content,e-a-1,n-a-1)))}function aN(t,e,n,r){let{index:a,offset:i}=t.findIndex(e),s=t.maybeChild(a);if(i==e||s.isText)return r&&!r.canReplace(a,a,n)?null:t.cut(0,e).append(n).append(t.cut(e));let o=aN(s.content,e-i-1,n,s);return o&&t.replaceChild(a,s.copy(o))}function qL(t,e,n){if(n.openStart>t.depth)throw new so("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new so("Inconsistent open depths");return iN(t,e,n,0)}function iN(t,e,n,r){let a=t.index(r),i=t.node(r);if(a==e.index(r)&&r<t.depth-n.openStart){let s=iN(t,e,n,r+1);return i.copy(i.content.replaceChild(a,s))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let s=t.parent,o=s.content;return Hr(s,o.cut(0,t.parentOffset).append(n.content).append(o.cut(e.parentOffset)))}else{let{start:s,end:o}=GL(n,t);return Hr(i,oN(t,s,o,e,r))}else return Hr(i,oo(t,e,r))}function sN(t,e){if(!e.type.compatibleContent(t.type))throw new so("Cannot join "+e.type.name+" onto "+t.type.name)}function Gm(t,e,n){let r=t.node(n);return sN(r,e.node(n)),r}function jr(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function yi(t,e,n,r){let a=(e||t).node(n),i=0,s=e?e.index(n):a.childCount;t&&(i=t.index(n),t.depth>n?i++:t.textOffset&&(jr(t.nodeAfter,r),i++));for(let o=i;o<s;o++)jr(a.child(o),r);e&&e.depth==n&&e.textOffset&&jr(e.nodeBefore,r)}function Hr(t,e){return t.type.checkContent(e),t.copy(e)}function oN(t,e,n,r,a){let i=t.depth>a&&Gm(t,e,a+1),s=r.depth>a&&Gm(n,r,a+1),o=[];return yi(null,t,a,o),i&&s&&e.index(a)==n.index(a)?(sN(i,s),jr(Hr(i,oN(t,e,n,r,a+1)),o)):(i&&jr(Hr(i,oo(t,e,a+1)),o),yi(e,n,a,o),s&&jr(Hr(s,oo(n,r,a+1)),o)),yi(r,null,a,o),new X(o)}function oo(t,e,n){let r=[];if(yi(null,t,n,r),t.depth>n){let a=Gm(t,e,n+1);jr(Hr(a,oo(t,e,n+1)),r)}return yi(e,null,n,r),new X(r)}function GL(t,e){let n=e.depth-t.openStart,a=e.node(n).copy(t.content);for(let i=n-1;i>=0;i--)a=e.node(i).copy(X.from(a));return{start:a.resolveNoCache(t.openStart+n),end:a.resolveNoCache(a.content.size-t.openEnd-n)}}class Ui{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.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,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],a=e.child(n);return r?e.child(n).cut(r):a}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],a=n==0?0:this.path[n*3-1]+1;for(let i=0;i<e;i++)a+=r.child(i).nodeSize;return a}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return $e.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),a=e.maybeChild(n);if(!r){let o=r;r=a,a=o}let i=r.marks;for(var s=0;s<i.length;s++)i[s].type.spec.inclusive===!1&&(!a||!i[s].isInSet(a.marks))&&(i=i[s--].removeFromSet(i));return i}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,a=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!a||!r[i].isInSet(a.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){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)&&(!n||n(this.node(r))))return new lo(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 n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],a=0,i=n;for(let s=e;;){let{index:o,offset:l}=s.content.findIndex(i),u=i-l;if(r.push(s,o,a+l),!u||(s=s.child(o),s.isText))break;i=u-1,a+=l+1}return new Ui(n,r,i)}static resolveCached(e,n){let r=vE.get(e);if(r)for(let i=0;i<r.elts.length;i++){let s=r.elts[i];if(s.pos==n)return s}else vE.set(e,r=new VL);let a=r.elts[r.i]=Ui.resolve(e,n);return r.i=(r.i+1)%WL,a}}class VL{constructor(){this.elts=[],this.i=0}}const WL=12,vE=new WeakMap;class lo{constructor(e,n,r){this.$from=e,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const YL=Object.create(null);class gn{constructor(e,n,r,a=$e.none){this.type=e,this.attrs=n,this.marks=a,this.content=r||X.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,n,r,a=0){this.content.nodesBetween(e,n,r,a,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,n,r,a){return this.content.textBetween(e,n,r,a)}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,n,r){return this.type==e&&io(this.attrs,n||e.defaultAttrs||YL)&&$e.sameSet(this.marks,r||$e.none)}copy(e=null){return e==this.content?this:new gn(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new gn(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return ae.empty;let a=this.resolve(e),i=this.resolve(n),s=r?0:a.sharedDepth(n),o=a.start(s),u=a.node(s).content.cut(a.pos-o,i.pos-o);return new ae(u,a.depth-s,i.depth-s)}replace(e,n,r){return qL(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:a}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(a==e||n.isText)return n;e-=a+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let a=this.content.child(n-1);return{node:a,index:n-1,offset:r-a.nodeSize}}resolve(e){return Ui.resolveCached(this,e)}resolveNoCache(e){return Ui.resolve(this,e)}rangeHasMark(e,n,r){let a=!1;return n>e&&this.nodesBetween(e,n,i=>(r.isInSet(i.marks)&&(a=!0),!a)),a}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()+")"),lN(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=X.empty,a=0,i=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,a,i),o=s&&s.matchFragment(this.content,n);if(!o||!o.validEnd)return!1;for(let l=a;l<i;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,n,r,a){if(a&&!this.type.allowsMarks(a))return!1;let i=this.contentMatchAt(e).matchType(r),s=i&&i.matchFragment(this.content,n);return s?s.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=$e.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!$e.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n 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(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let a=X.fromJSON(e,n.content),i=e.nodeType(n.type).create(n.attrs,a,r);return i.type.checkAttrs(i.attrs),i}}gn.prototype.text=void 0;class uo extends gn{constructor(e,n,r,a){if(super(e,n,null,a),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):lN(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new uo(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new uo(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function lN(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class Kr{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new KL(e,n);if(r.next==null)return Kr.empty;let a=uN(r);r.next&&r.err("Unexpected trailing text");let i=nD(tD(a));return rD(i,r),i}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let a=this;for(let i=n;a&&i<r;i++)a=a.matchType(e.child(i).type);return a}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:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let a=[this];function i(s,o){let l=s.matchFragment(e,r);if(l&&(!n||l.validEnd))return X.from(o.map(u=>u.createAndFill()));for(let u=0;u<s.next.length;u++){let{type:c,next:d}=s.next[u];if(!(c.isText||c.hasRequiredAttrs())&&a.indexOf(d)==-1){a.push(d);let p=i(d,o.concat(c));if(p)return p}}return null}return i(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let a=r.shift(),i=a.match;if(i.matchType(e)){let s=[];for(let o=a;o.type;o=o.via)s.push(o.type);return s.reverse()}for(let s=0;s<i.next.length;s++){let{type:o,next:l}=i.next[s];!o.isLeaf&&!o.hasRequiredAttrs()&&!(o.name in n)&&(!a.type||l.validEnd)&&(r.push({match:o.contentMatch,type:o,via:a}),n[o.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 n(r){e.push(r);for(let a=0;a<r.next.length;a++)e.indexOf(r.next[a].next)==-1&&n(r.next[a].next)}return n(this),e.map((r,a)=>{let i=a+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)i+=(s?", ":"")+r.next[s].type.name+"->"+e.indexOf(r.next[s].next);return i}).join(`
|
|
2
2
|
`)}}Kr.empty=new Kr(!0);class KL{constructor(e,n){this.string=e,this.nodeTypes=n,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 uN(t){let e=[];do e.push(XL(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function XL(t){let e=[];do e.push(ZL(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function ZL(t){let e=eD(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=QL(t,e);else break;return e}function _E(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function QL(t,e){let n=_E(t),r=n;return t.eat(",")&&(t.next!="}"?r=_E(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function JL(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let a=[];for(let i in n){let s=n[i];s.isInGroup(e)&&a.push(s)}return a.length==0&&t.err("No node type or group '"+e+"' found"),a}function eD(t){if(t.eat("(")){let e=uN(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=JL(t,t.next).map(n=>(t.inline==null?t.inline=n.isInline:t.inline!=n.isInline&&t.err("Mixing inline and block content"),{type:"name",value:n}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function tD(t){let e=[[]];return a(i(t,0),n()),e;function n(){return e.push([])-1}function r(s,o,l){let u={term:l,to:o};return e[s].push(u),u}function a(s,o){s.forEach(l=>l.to=o)}function i(s,o){if(s.type=="choice")return s.exprs.reduce((l,u)=>l.concat(i(u,o)),[]);if(s.type=="seq")for(let l=0;;l++){let u=i(s.exprs[l],o);if(l==s.exprs.length-1)return u;a(u,o=n())}else if(s.type=="star"){let l=n();return r(o,l),a(i(s.expr,l),l),[r(l)]}else if(s.type=="plus"){let l=n();return a(i(s.expr,o),l),a(i(s.expr,l),l),[r(l)]}else{if(s.type=="opt")return[r(o)].concat(i(s.expr,o));if(s.type=="range"){let l=o;for(let u=0;u<s.min;u++){let c=n();a(i(s.expr,l),c),l=c}if(s.max==-1)a(i(s.expr,l),l);else for(let u=s.min;u<s.max;u++){let c=n();r(l,c),a(i(s.expr,l),c),l=c}return[r(l)]}else{if(s.type=="name")return[r(o,void 0,s.value)];throw new Error("Unknown expr type")}}}}function cN(t,e){return e-t}function NE(t,e){let n=[];return r(e),n.sort(cN);function r(a){let i=t[a];if(i.length==1&&!i[0].term)return r(i[0].to);n.push(a);for(let s=0;s<i.length;s++){let{term:o,to:l}=i[s];!o&&n.indexOf(l)==-1&&r(l)}}}function nD(t){let e=Object.create(null);return n(NE(t,0));function n(r){let a=[];r.forEach(s=>{t[s].forEach(({term:o,to:l})=>{if(!o)return;let u;for(let c=0;c<a.length;c++)a[c][0]==o&&(u=a[c][1]);NE(t,l).forEach(c=>{u||a.push([o,u=[]]),u.indexOf(c)==-1&&u.push(c)})})});let i=e[r.join(",")]=new Kr(r.indexOf(t.length-1)>-1);for(let s=0;s<a.length;s++){let o=a[s][1].sort(cN);i.next.push({type:a[s][0],next:e[o.join(",")]||n(o)})}return i}}function rD(t,e){for(let n=0,r=[t];n<r.length;n++){let a=r[n],i=!a.validEnd,s=[];for(let o=0;o<a.next.length;o++){let{type:l,next:u}=a.next[o];s.push(l.name),i&&!(l.isText||l.hasRequiredAttrs())&&(i=!1),r.indexOf(u)==-1&&r.push(u)}i&&e.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function dN(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function pN(t,e){let n=Object.create(null);for(let r in t){let a=e&&e[r];if(a===void 0){let i=t[r];if(i.hasDefault)a=i.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=a}return n}function fN(t,e,n,r){for(let a in e)if(!(a in t))throw new RangeError(`Unsupported attribute ${a} for ${n} of type ${a}`);for(let a in t){let i=t[a];i.validate&&i.validate(e[a])}}function hN(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new iD(t,r,e[r]);return n}let CE=class mN{constructor(e,n,r){this.name=e,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=hN(e,r.attrs),this.defaultAttrs=dN(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==Kr.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:pN(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new gn(this,this.computeAttrs(e),X.from(n),$e.setFrom(r))}createChecked(e=null,n,r){return n=X.from(n),this.checkContent(n),new gn(this,this.computeAttrs(e),n,$e.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),n=X.from(n),n.size){let s=this.contentMatch.fillBefore(n);if(!s)return null;n=s.append(n)}let a=this.contentMatch.matchFragment(n),i=a&&a.fillBefore(X.empty,!0);return i?new gn(this,e,n.append(i),$e.setFrom(r)):null}validContent(e){let n=this.contentMatch.matchFragment(e);if(!n||!n.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){fN(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 n=0;n<e.length;n++)if(!this.allowsMarkType(e[n].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let n;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?n&&n.push(e[r]):n||(n=e.slice(0,r));return n?n.length?n:$e.none:e}static compile(e,n){let r=Object.create(null);e.forEach((i,s)=>r[i]=new mN(i,n,s));let a=n.spec.topNode||"doc";if(!r[a])throw new RangeError("Schema is missing its top node type ('"+a+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function aD(t,e,n){let r=n.split("|");return a=>{let i=a===null?"null":typeof a;if(r.indexOf(i)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${t}, got ${i}`)}}class iD{constructor(e,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?aD(e,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class cl{constructor(e,n,r,a){this.name=e,this.rank=n,this.schema=r,this.spec=a,this.attrs=hN(e,a.attrs),this.excluded=null;let i=dN(this.attrs);this.instance=i?new $e(this,i):null}create(e=null){return!e&&this.instance?this.instance:new $e(this,pN(this.attrs,e))}static compile(e,n){let r=Object.create(null),a=0;return e.forEach((i,s)=>r[i]=new cl(i,a++,n,s)),r}removeFromSet(e){for(var n=0;n<e.length;n++)e[n].type==this&&(e=e.slice(0,n).concat(e.slice(n+1)),n--);return e}isInSet(e){for(let n=0;n<e.length;n++)if(e[n].type==this)return e[n]}checkAttrs(e){fN(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}let gN=class{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let a in e)n[a]=e[a];n.nodes=ht.from(e.nodes),n.marks=ht.from(e.marks||{}),this.nodes=CE.compile(this.spec.nodes,this),this.marks=cl.compile(this.spec.marks,this);let r=Object.create(null);for(let a in this.nodes){if(a in this.marks)throw new RangeError(a+" can not be both a node and a mark");let i=this.nodes[a],s=i.spec.content||"",o=i.spec.marks;if(i.contentMatch=r[s]||(r[s]=Kr.parse(s,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=o=="_"?null:o?wE(this,o.split(" ")):o==""||!i.inlineContent?[]:null}for(let a in this.marks){let i=this.marks[a],s=i.spec.excludes;i.excluded=s==null?[i]:s==""?[]:wE(this,s.split(" "))}this.nodeFromJSON=a=>gn.fromJSON(this,a),this.markFromJSON=a=>$e.fromJSON(this,a),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,n=null,r,a){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof CE){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(n,r,a)}text(e,n){let r=this.nodes.text;return new uo(r,r.defaultAttrs,e,$e.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}};function wE(t,e){let n=[];for(let r=0;r<e.length;r++){let a=e[r],i=t.marks[a],s=i;if(i)n.push(i);else for(let o in t.marks){let l=t.marks[o];(a=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(a)>-1)&&n.push(s=l)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}function sD(t){return t.tag!=null}function oD(t){return t.style!=null}class Zn{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(a=>{if(sD(a))this.tags.push(a);else if(oD(a)){let i=/[^=]*/.exec(a.style)[0];r.indexOf(i)<0&&r.push(i),this.styles.push(a)}}),this.normalizeLists=!this.tags.some(a=>{if(!/^(ul|ol)\b/.test(a.tag)||!a.node)return!1;let i=e.nodes[a.node];return i.contentMatch.matchType(i)})}parse(e,n={}){let r=new RE(this,n,!1);return r.addAll(e,$e.none,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new RE(this,n,!0);return r.addAll(e,$e.none,n.from,n.to),ae.maxOpen(r.finish())}matchTag(e,n,r){for(let a=r?this.tags.indexOf(r)+1:0;a<this.tags.length;a++){let i=this.tags[a];if(cD(e,i.tag)&&(i.namespace===void 0||e.namespaceURI==i.namespace)&&(!i.context||n.matchesContext(i.context))){if(i.getAttrs){let s=i.getAttrs(e);if(s===!1)continue;i.attrs=s||void 0}return i}}}matchStyle(e,n,r,a){for(let i=a?this.styles.indexOf(a)+1:0;i<this.styles.length;i++){let s=this.styles[i],o=s.style;if(!(o.indexOf(e)!=0||s.context&&!r.matchesContext(s.context)||o.length>e.length&&(o.charCodeAt(e.length)!=61||o.slice(e.length+1)!=n))){if(s.getAttrs){let l=s.getAttrs(n);if(l===!1)continue;s.attrs=l||void 0}return s}}}static schemaRules(e){let n=[];function r(a){let i=a.priority==null?50:a.priority,s=0;for(;s<n.length;s++){let o=n[s];if((o.priority==null?50:o.priority)<i)break}n.splice(s,0,a)}for(let a in e.marks){let i=e.marks[a].spec.parseDOM;i&&i.forEach(s=>{r(s=OE(s)),s.mark||s.ignore||s.clearMark||(s.mark=a)})}for(let a in e.nodes){let i=e.nodes[a].spec.parseDOM;i&&i.forEach(s=>{r(s=OE(s)),s.node||s.ignore||s.mark||(s.node=a)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Zn(e,Zn.schemaRules(e)))}}const bN={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},lD={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},EN={ol:!0,ul:!0},ji=1,Vm=2,Ti=4;function IE(t,e,n){return e!=null?(e?ji:0)|(e==="full"?Vm:0):t&&t.whitespace=="pre"?ji|Vm:n&~Ti}class vs{constructor(e,n,r,a,i,s){this.type=e,this.attrs=n,this.marks=r,this.solid=a,this.options=s,this.content=[],this.activeMarks=$e.none,this.match=i||(s&Ti?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(X.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,a;return(a=r.findWrapping(e.type))?(this.match=r,a):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&ji)){let r=this.content[this.content.length-1],a;if(r&&r.isText&&(a=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==a[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-a[0].length))}}let n=X.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(X.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!bN.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class RE{constructor(e,n,r){this.parser=e,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let a=n.topNode,i,s=IE(null,n.preserveWhitespace,0)|(r?Ti:0);a?i=new vs(a.type,a.attrs,$e.none,!0,n.topMatch||a.type.contentMatch,s):r?i=new vs(null,null,$e.none,!0,null,s):i=new vs(e.schema.topNodeType,null,$e.none,!0,null,s),this.nodes=[i],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,n){e.nodeType==3?this.addTextNode(e,n):e.nodeType==1&&this.addElement(e,n)}addTextNode(e,n){let r=e.nodeValue,a=this.top,i=a.options&Vm?"full":this.localPreserveWS||(a.options&ji)>0,{schema:s}=this.parser;if(i==="full"||a.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(i)if(i==="full")r=r.replace(/\r\n?/g,`
|
|
3
3
|
`);else if(s.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(s.linebreakReplacement.create())){let o=r.split(/\r?\n|\r/);for(let l=0;l<o.length;l++)l&&this.insertNode(s.linebreakReplacement.create(),n,!0),o[l]&&this.insertNode(s.text(o[l]),n,!/\S/.test(o[l]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let o=a.content[a.content.length-1],l=e.previousSibling;(!o||l&&l.nodeName=="BR"||o.isText&&/[ \t\r\n\u000c]$/.test(o.text))&&(r=r.slice(1))}r&&this.insertNode(s.text(r),n,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,n,r){let a=this.localPreserveWS,i=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let s=e.nodeName.toLowerCase(),o;EN.hasOwnProperty(s)&&this.parser.normalizeLists&&uD(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(o=this.parser.matchTag(e,this,r));e:if(l?l.ignore:lD.hasOwnProperty(s))this.findInside(e),this.ignoreFallback(e,n);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(e=l.skip);let u,c=this.needsBlock;if(bN.hasOwnProperty(s))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),u=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,n);break e}let d=l&&l.skip?n:this.readStyles(e,n);d&&this.addAll(e,d),u&&this.sync(i),this.needsBlock=c}else{let u=this.readStyles(e,n);u&&this.addElementByRule(e,l,u,l.consuming===!1?o:void 0)}this.localPreserveWS=a}leafFallback(e,n){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
|
|
4
4
|
`),n)}ignoreFallback(e,n){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(e,n){let r=e.style;if(r&&r.length)for(let a=0;a<this.parser.matchedStyles.length;a++){let i=this.parser.matchedStyles[a],s=r.getPropertyValue(i);if(s)for(let o=void 0;;){let l=this.parser.matchStyle(i,s,this,o);if(!l)break;if(l.ignore)return null;if(l.clearMark?n=n.filter(u=>!l.clearMark(u)):n=n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)o=l;else break}}return n}addElementByRule(e,n,r,a){let i,s;if(n.node)if(s=this.parser.schema.nodes[n.node],s.isLeaf)this.insertNode(s.create(n.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let l=this.enter(s,n.attrs||null,r,n.preserveWhitespace);l&&(i=!0,r=l)}else{let l=this.parser.schema.marks[n.mark];r=r.concat(l.create(n.attrs))}let o=this.top;if(s&&s.isLeaf)this.findInside(e);else if(a)this.addElement(e,r,a);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l,r,!1));else{let l=e;typeof n.contentElement=="string"?l=e.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(e):n.contentElement&&(l=n.contentElement),this.findAround(e,l,!0),this.addAll(l,r),this.findAround(e,l,!1)}i&&this.sync(o)&&this.open--}addAll(e,n,r,a){let i=r||0;for(let s=r?e.childNodes[r]:e.firstChild,o=a==null?null:e.childNodes[a];s!=o;s=s.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(s,n);this.findAtPoint(e,i)}findPlace(e,n,r){let a,i;for(let s=this.open,o=0;s>=0;s--){let l=this.nodes[s],u=l.findWrapping(e);if(u&&(!a||a.length>u.length+o)&&(a=u,i=l,!u.length))break;if(l.solid){if(r)break;o+=2}}if(!a)return null;this.sync(i);for(let s=0;s<a.length;s++)n=this.enterInner(a[s],null,n,!1);return n}insertNode(e,n,r){if(e.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(n=this.enterInner(i,null,n))}let a=this.findPlace(e,n,r);if(a){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(e.type));let s=$e.none;for(let o of a.concat(e.marks))(i.type?i.type.allowsMarkType(o.type):LE(o.type,e.type))&&(s=o.addToSet(s));return i.content.push(e.mark(s)),!0}return!1}enter(e,n,r,a){let i=this.findPlace(e.create(n),r,!1);return i&&(i=this.enterInner(e,n,r,!0,a)),i}enterInner(e,n,r,a=!1,i){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(e);let o=IE(e,i,s.options);s.options&Ti&&s.content.length==0&&(o|=Ti);let l=$e.none;return r=r.filter(u=>(s.type?s.type.allowsMarkType(u.type):LE(u.type,e))?(l=u.addToSet(l),!1):!0),this.nodes.push(new vs(e,n,l,a,null,o)),this.open++,r}closeExtra(e=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(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 n=this.open;n>=0;n--){if(this.nodes[n]==e)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=ji)}return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let a=r.length-1;a>=0;a--)e+=r[a].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,r){if(e!=n&&this.find)for(let a=0;a<this.find.length;a++)this.find[a].pos==null&&e.nodeType==1&&e.contains(this.find[a].node)&&n.compareDocumentPosition(this.find[a].node)&(r?2:4)&&(this.find[a].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),r=this.options.context,a=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(a?0:1),s=(o,l)=>{for(;o>=0;o--){let u=n[o];if(u==""){if(o==n.length-1||o==0)continue;for(;l>=i;l--)if(s(o-1,l))return!0;return!1}else{let c=l>0||l==0&&a?this.nodes[l].type:r&&l>=i?r.node(l-i).type:null;if(!c||c.name!=u&&!c.isInGroup(u))return!1;l--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function uD(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&EN.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function cD(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function OE(t){let e={};for(let n in t)e[n]=t[n];return e}function LE(t,e){let n=e.schema.nodes;for(let r in n){let a=n[r];if(!a.allowsMarkType(t))continue;let i=[],s=o=>{i.push(o);for(let l=0;l<o.edgeCount;l++){let{type:u,next:c}=o.edge(l);if(u==e||i.indexOf(c)<0&&s(c))return!0}};if(s(a.contentMatch))return!0}}class aa{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=Jl(n).createDocumentFragment());let a=r,i=[];return e.forEach(s=>{if(i.length||s.marks.length){let o=0,l=0;for(;o<i.length&&l<s.marks.length;){let u=s.marks[l];if(!this.marks[u.type.name]){l++;continue}if(!u.eq(i[o][0])||u.type.spec.spanning===!1)break;o++,l++}for(;o<i.length;)a=i.pop()[1];for(;l<s.marks.length;){let u=s.marks[l++],c=this.serializeMark(u,s.isInline,n);c&&(i.push([u,a]),a.appendChild(c.dom),a=c.contentDOM||c.dom)}}a.appendChild(this.serializeNodeInner(s,n))}),r}serializeNodeInner(e,n){let{dom:r,contentDOM:a}=Gs(Jl(n),this.nodes[e.type.name](e),null,e.attrs);if(a){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,n,a)}return r}serializeNode(e,n={}){let r=this.serializeNodeInner(e,n);for(let a=e.marks.length-1;a>=0;a--){let i=this.serializeMark(e.marks[a],e.isInline,n);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(e,n,r={}){let a=this.marks[e.type.name];return a&&Gs(Jl(r),a(e,n),null,e.attrs)}static renderSpec(e,n,r=null,a){return Gs(e,n,r,a)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new aa(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=DE(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return DE(e.marks)}}function DE(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function Jl(t){return t.document||window.document}const ME=new WeakMap;function dD(t){let e=ME.get(t);return e===void 0&&ME.set(t,e=pD(t)),e}function pD(t){let e=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let a=0;a<r.length;a++)n(r[a]);else for(let a in r)n(r[a])}return n(t),e}function Gs(t,e,n,r){if(typeof e=="string")return{dom:t.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let a=e[0],i;if(typeof a!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(i=dD(r))&&i.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 s=a.indexOf(" ");s>0&&(n=a.slice(0,s),a=a.slice(s+1));let o,l=n?t.createElementNS(n,a):t.createElement(a),u=e[1],c=1;if(u&&typeof u=="object"&&u.nodeType==null&&!Array.isArray(u)){c=2;for(let d in u)if(u[d]!=null){let p=d.indexOf(" ");p>0?l.setAttributeNS(d.slice(0,p),d.slice(p+1),u[d]):d=="style"&&l.style?l.style.cssText=u[d]:l.setAttribute(d,u[d])}}for(let d=c;d<e.length;d++){let p=e[d];if(p===0){if(d<e.length-1||d>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:f,contentDOM:h}=Gs(t,p,n,r);if(l.appendChild(f),h){if(o)throw new RangeError("Multiple content holes");o=h}}}return{dom:l,contentDOM:o}}const yN=65535,TN=Math.pow(2,16);function fD(t,e){return t+e*TN}function PE(t){return t&yN}function hD(t){return(t-(t&yN))/TN}const SN=1,xN=2,Vs=4,kN=8;class Wm{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&kN)>0}get deletedBefore(){return(this.delInfo&(SN|Vs))>0}get deletedAfter(){return(this.delInfo&(xN|Vs))>0}get deletedAcross(){return(this.delInfo&Vs)>0}}class Xt{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&Xt.empty)return Xt.empty}recover(e){let n=0,r=PE(e);if(!this.inverted)for(let a=0;a<r;a++)n+=this.ranges[a*3+2]-this.ranges[a*3+1];return this.ranges[r*3]+n+hD(e)}mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,r){let a=0,i=this.inverted?2:1,s=this.inverted?1:2;for(let o=0;o<this.ranges.length;o+=3){let l=this.ranges[o]-(this.inverted?a:0);if(l>e)break;let u=this.ranges[o+i],c=this.ranges[o+s],d=l+u;if(e<=d){let p=u?e==l?-1:e==d?1:n:n,f=l+a+(p<0?0:c);if(r)return f;let h=e==(n<0?l:d)?null:fD(o/3,e-l),g=e==l?xN:e==d?SN:Vs;return(n<0?e!=l:e!=d)&&(g|=kN),new Wm(f,g,h)}a+=c-u}return r?e+a:new Wm(e+a,0,null)}touches(e,n){let r=0,a=PE(n),i=this.inverted?2:1,s=this.inverted?1:2;for(let o=0;o<this.ranges.length;o+=3){let l=this.ranges[o]-(this.inverted?r:0);if(l>e)break;let u=this.ranges[o+i],c=l+u;if(e<=c&&o==a*3)return!0;r+=this.ranges[o+s]-u}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let a=0,i=0;a<this.ranges.length;a+=3){let s=this.ranges[a],o=s-(this.inverted?i:0),l=s+(this.inverted?0:i),u=this.ranges[a+n],c=this.ranges[a+r];e(o,o+u,l,l+c),i+=c-u}}invert(){return new Xt(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Xt.empty:new Xt(e<0?[0,-e,0]:[0,0,e])}}Xt.empty=new Xt([]);class Hi{constructor(e,n,r=0,a=e?e.length:0){this.mirror=n,this.from=r,this.to=a,this._maps=e||[],this.ownData=!(e||n)}get maps(){return this._maps}slice(e=0,n=this.maps.length){return new Hi(this._maps,this.mirror,e,n)}appendMap(e,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(e){for(let n=0,r=this._maps.length;n<e._maps.length;n++){let a=e.getMirror(n);this.appendMap(e._maps[n],a!=null&&a<n?r+a:void 0)}}getMirror(e){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==e)return this.mirror[n+(n%2?-1:1)]}}setMirror(e,n){this.mirror||(this.mirror=[]),this.mirror.push(e,n)}appendMappingInverted(e){for(let n=e.maps.length-1,r=this._maps.length+e._maps.length;n>=0;n--){let a=e.getMirror(n);this.appendMap(e._maps[n].invert(),a!=null&&a>n?r-a-1:void 0)}}invert(){let e=new Hi;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,n);return e}mapResult(e,n=1){return this._map(e,n,!1)}_map(e,n,r){let a=0;for(let i=this.from;i<this.to;i++){let s=this._maps[i],o=s.mapResult(e,n);if(o.recover!=null){let l=this.getMirror(i);if(l!=null&&l>i&&l<this.to){i=l,e=this._maps[l].recover(o.recover);continue}}a|=o.delInfo,e=o.pos}return r?e:new Wm(e,a,null)}}const eu=Object.create(null);class vt{getMap(){return Xt.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=eu[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in eu)throw new RangeError("Duplicate use of step JSON ID "+e);return eu[e]=n,n.prototype.jsonID=e,n}}class it{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new it(e,null)}static fail(e){return new it(null,e)}static fromReplace(e,n,r,a){try{return it.ok(e.replace(n,r,a))}catch(i){if(i instanceof so)return it.fail(i.message);throw i}}}function mb(t,e,n){let r=[];for(let a=0;a<t.childCount;a++){let i=t.child(a);i.content.size&&(i=i.copy(mb(i.content,e,i))),i.isInline&&(i=e(i,n,a)),r.push(i)}return X.fromArray(r)}class hr extends vt{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=e.resolve(this.from),a=r.node(r.sharedDepth(this.to)),i=new ae(mb(n.content,(s,o)=>!s.isAtom||!o.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),a),n.openStart,n.openEnd);return it.fromReplace(e,this.from,this.to,i)}invert(){return new mn(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new hr(n.pos,r.pos,this.mark)}merge(e){return e instanceof hr&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new hr(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,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new hr(n.from,n.to,e.markFromJSON(n.mark))}}vt.jsonID("addMark",hr);class mn extends vt{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=new ae(mb(n.content,a=>a.mark(this.mark.removeFromSet(a.marks)),e),n.openStart,n.openEnd);return it.fromReplace(e,this.from,this.to,r)}invert(){return new hr(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new mn(n.pos,r.pos,this.mark)}merge(e){return e instanceof mn&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new mn(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,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new mn(n.from,n.to,e.markFromJSON(n.mark))}}vt.jsonID("removeMark",mn);class mr extends vt{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return it.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return it.fromReplace(e,this.pos,this.pos+1,new ae(X.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let a=0;a<n.marks.length;a++)if(!n.marks[a].isInSet(r))return new mr(this.pos,n.marks[a]);return new mr(this.pos,this.mark)}}return new Xr(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new mr(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new mr(n.pos,e.markFromJSON(n.mark))}}vt.jsonID("addNodeMark",mr);class Xr extends vt{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return it.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return it.fromReplace(e,this.pos,this.pos+1,new ae(X.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new mr(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Xr(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Xr(n.pos,e.markFromJSON(n.mark))}}vt.jsonID("removeNodeMark",Xr);class at extends vt{constructor(e,n,r,a=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=a}apply(e){return this.structure&&Ym(e,this.from,this.to)?it.fail("Structure replace would overwrite content"):it.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Xt([this.from,this.to-this.from,this.slice.size])}invert(e){return new at(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let n=e.mapResult(this.to,-1),r=this.from==this.to&&at.MAP_BIAS<0?n:e.mapResult(this.from,1);return r.deletedAcross&&n.deletedAcross?null:new at(r.pos,Math.max(r.pos,n.pos),this.slice,this.structure)}merge(e){if(!(e instanceof at)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let n=this.slice.size+e.slice.size==0?ae.empty:new ae(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new at(this.from,this.to+(e.to-e.from),n,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let n=this.slice.size+e.slice.size==0?ae.empty:new ae(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new at(e.from,this.to,n,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,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new at(n.from,n.to,ae.fromJSON(e,n.slice),!!n.structure)}}at.MAP_BIAS=1;vt.jsonID("replace",at);class dt extends vt{constructor(e,n,r,a,i,s,o=!1){super(),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=a,this.slice=i,this.insert=s,this.structure=o}apply(e){if(this.structure&&(Ym(e,this.from,this.gapFrom)||Ym(e,this.gapTo,this.to)))return it.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return it.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?it.fromReplace(e,this.from,this.to,r):it.fail("Content does not fit in gap")}getMap(){return new Xt([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let n=this.gapTo-this.gapFrom;return new dt(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),a=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||a<n.pos||i>r.pos?null:new dt(n.pos,r.pos,a,i,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,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new dt(n.from,n.to,n.gapFrom,n.gapTo,ae.fromJSON(e,n.slice),n.insert,!!n.structure)}}vt.jsonID("replaceAround",dt);function Ym(t,e,n){let r=t.resolve(e),a=n-e,i=r.depth;for(;a>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,a--;if(a>0){let s=r.node(i).maybeChild(r.indexAfter(i));for(;a>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,a--}}return!1}function mD(t,e,n,r){let a=[],i=[],s,o;t.doc.nodesBetween(e,n,(l,u,c)=>{if(!l.isInline)return;let d=l.marks;if(!r.isInSet(d)&&c.type.allowsMarkType(r.type)){let p=Math.max(u,e),f=Math.min(u+l.nodeSize,n),h=r.addToSet(d);for(let g=0;g<d.length;g++)d[g].isInSet(h)||(s&&s.to==p&&s.mark.eq(d[g])?s.to=f:a.push(s=new mn(p,f,d[g])));o&&o.to==p?o.to=f:i.push(o=new hr(p,f,r))}}),a.forEach(l=>t.step(l)),i.forEach(l=>t.step(l))}function gD(t,e,n,r){let a=[],i=0;t.doc.nodesBetween(e,n,(s,o)=>{if(!s.isInline)return;i++;let l=null;if(r instanceof cl){let u=s.marks,c;for(;c=r.isInSet(u);)(l||(l=[])).push(c),u=c.removeFromSet(u)}else r?r.isInSet(s.marks)&&(l=[r]):l=s.marks;if(l&&l.length){let u=Math.min(o+s.nodeSize,n);for(let c=0;c<l.length;c++){let d=l[c],p;for(let f=0;f<a.length;f++){let h=a[f];h.step==i-1&&d.eq(a[f].style)&&(p=h)}p?(p.to=u,p.step=i):a.push({style:d,from:Math.max(o,e),to:u,step:i})}}}),a.forEach(s=>t.step(new mn(s.from,s.to,s.style)))}function gb(t,e,n,r=n.contentMatch,a=!0){let i=t.doc.nodeAt(e),s=[],o=e+1;for(let l=0;l<i.childCount;l++){let u=i.child(l),c=o+u.nodeSize,d=r.matchType(u.type);if(!d)s.push(new at(o,c,ae.empty));else{r=d;for(let p=0;p<u.marks.length;p++)n.allowsMarkType(u.marks[p].type)||t.step(new mn(o,c,u.marks[p]));if(a&&u.isText&&n.whitespace!="pre"){let p,f=/\r?\n|\r/g,h;for(;p=f.exec(u.text);)h||(h=new ae(X.from(n.schema.text(" ",n.allowedMarks(u.marks))),0,0)),s.push(new at(o+p.index,o+p.index+p[0].length,h))}}o=c}if(!r.validEnd){let l=r.fillBefore(X.empty,!0);t.replace(o,o,new ae(l,0,0))}for(let l=s.length-1;l>=0;l--)t.step(s[l])}function bD(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function qa(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth,a=0,i=0;;--r){let s=t.$from.node(r),o=t.$from.index(r)+a,l=t.$to.indexAfter(r)-i;if(r<t.depth&&s.canReplace(o,l,n))return r;if(r==0||s.type.spec.isolating||!bD(s,o,l))break;o&&(a=1),l<s.childCount&&(i=1)}return null}function ED(t,e,n){let{$from:r,$to:a,depth:i}=e,s=r.before(i+1),o=a.after(i+1),l=s,u=o,c=X.empty,d=0;for(let h=i,g=!1;h>n;h--)g||r.index(h)>0?(g=!0,c=X.from(r.node(h).copy(c)),d++):l--;let p=X.empty,f=0;for(let h=i,g=!1;h>n;h--)g||a.after(h+1)<a.end(h)?(g=!0,p=X.from(a.node(h).copy(p)),f++):u++;t.step(new dt(l,u,s,o,new ae(c.append(p),d,f),c.size-d,!0))}function bb(t,e,n=null,r=t){let a=yD(t,e),i=a&&TD(r,e);return i?a.map(FE).concat({type:e,attrs:n}).concat(i.map(FE)):null}function FE(t){return{type:t,attrs:null}}function yD(t,e){let{parent:n,startIndex:r,endIndex:a}=t,i=n.contentMatchAt(r).findWrapping(e);if(!i)return null;let s=i.length?i[0]:e;return n.canReplaceWith(r,a,s)?i:null}function TD(t,e){let{parent:n,startIndex:r,endIndex:a}=t,i=n.child(r),s=e.contentMatch.findWrapping(i.type);if(!s)return null;let l=(s.length?s[s.length-1]:e).contentMatch;for(let u=r;l&&u<a;u++)l=l.matchType(n.child(u).type);return!l||!l.validEnd?null:s}function SD(t,e,n){let r=X.empty;for(let s=n.length-1;s>=0;s--){if(r.size){let o=n[s].type.contentMatch.matchFragment(r);if(!o||!o.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=X.from(n[s].type.create(n[s].attrs,r))}let a=e.start,i=e.end;t.step(new dt(a,i,a,i,new ae(r,0,0),n.length,!0))}function xD(t,e,n,r,a){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=t.steps.length;t.doc.nodesBetween(e,n,(s,o)=>{let l=typeof a=="function"?a(s):a;if(s.isTextblock&&!s.hasMarkup(r,l)&&kD(t.doc,t.mapping.slice(i).map(o),r)){let u=null;if(r.schema.linebreakReplacement){let f=r.whitespace=="pre",h=!!r.contentMatch.matchType(r.schema.linebreakReplacement);f&&!h?u=!1:!f&&h&&(u=!0)}u===!1&&vN(t,s,o,i),gb(t,t.mapping.slice(i).map(o,1),r,void 0,u===null);let c=t.mapping.slice(i),d=c.map(o,1),p=c.map(o+s.nodeSize,1);return t.step(new dt(d,p,d+1,p-1,new ae(X.from(r.create(l,null,s.marks)),0,0),1,!0)),u===!0&&AN(t,s,o,i),!1}})}function AN(t,e,n,r){e.forEach((a,i)=>{if(a.isText){let s,o=/\r?\n|\r/g;for(;s=o.exec(a.text);){let l=t.mapping.slice(r).map(n+1+i+s.index);t.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function vN(t,e,n,r){e.forEach((a,i)=>{if(a.type==a.type.schema.linebreakReplacement){let s=t.mapping.slice(r).map(n+1+i);t.replaceWith(s,s+1,e.type.schema.text(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as B,j as o,b as D,H as M,d as $,r as q,P as d,B as H,q as R}from"./index-
|
|
1
|
+
import{c as B,j as o,b as D,H as M,d as $,r as q,P as d,B as H,q as R}from"./index-DIDvVa8k.js";import{s as V}from"./Plus-DwD65rmB.js";import{i as S}from"./Zap-DJT0rSGL.js";import{S as F}from"./search-input-BQj9X4w3.js";import{E as T}from"./empty-state-DapPFVEJ.js";import{c as G}from"./use-automations-yELoWtQL.js";import{c as J}from"./use-navigate-to-agent-CNDnIlgR.js";import{A as K}from"./automation-list-row-BFPoVnfX.js";import{l as O}from"./constants-z9Iog-sb.js";import{u as Q}from"./use-virtual-mcp-lpZZNueP.js";import{R as U}from"./require-capability-Chj6fY_O.js";import"./SearchMd-BAZ9nMEZ.js";import"./use-mcp-client-CNj9UP6h.js";import"./auth-v-RUElOF.js";import"./hooks-BjsPfcI_.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-BJumw45X.js";import"./reusable-new-chat-CzvRy4Pe.js";import"./session-runtime-wVXsCwcJ.js";import"./alert-dialog-XEF69z36.js";import"./dropdown-menu-pWB0nubv.js";import"./Check-DWZ740y8.js";import"./ChevronRight-DyQIrKTD.js";import"./DotsVertical-BF66n5eI.js";import"./Stars02-q7wwk1en.js";import"./Trash01-MovncRVo.js";import"./agent-icon-B5DHtXHe.js";import"./AlertCircle-v8fMNriz.js";import"./Tool01-Bn5sQ3cN.js";import"./ArrowUp-BWHgYGAi.js";import"./ArrowLeft-Npp6hG6h.js";import"./Tool02-D6336hR4.js";import"./XCircle-CM7DlBEY.js";import"./TrendUp01-Bpy6TdnO.js";import"./ZapSquare-C2ZJxHbM.js";import"./Users03-DoII_J3k.js";import"./CheckCircle-COrgrT6l.js";import"./ChevronDown-CWJ9JErq.js";import"./ChevronSelectorVertical-3t4I-rX4.js";import"./ChevronUp-D1hzk8dN.js";import"./UserSquare-CQKfRmeM.js";import"./Copy01-Jlghnbuk.js";import"./CreditCard01-DkEBMnnR.js";import"./Download01-C4Qc9N3I.js";import"./Settings02-52fb6H5D.js";import"./Eye-CMkMKams.js";import"./FilterLines-Cqi0BW62.js";import"./Share07-DuVrrhTb.js";import"./Globe01-D6aW3Uev.js";import"./Globe04-BusVz23y.js";import"./SwitchHorizontal01-BMDX56Pz.js";import"./HardDrive-DNOYRJQU.js";import"./Key01-zK1D1sqm.js";import"./LinkExternal01-YzEu81ID.js";import"./LockUnlocked01-ixiwdeGN.js";import"./LogOut01-dJ6EgXGv.js";import"./Monitor01-Cne_Y8mg.js";import"./Sun-NTNtnr7x.js";import"./Palette-DhXNXt05.js";import"./Play-BMaFKxXP.js";import"./SearchLg-HIa3QhaQ.js";import"./Shield01-DJyhXvrh.js";import"./Stars01-CxkNaTg4.js";import"./Upload01-BF5d7vXt.js";import"./User01-CXrM7AMp.js";import"./Users01-sIZgN8cj.js";import"./XClose-CkJJ5Qv5.js";import"./access-gate-DQaMSvsa.js";import"./capability-load-error-2Us1Lwx7.js";function W(){const t=B.c(20),e=D(),{org:l}=M(),{data:C}=G(void 0),g=C===void 0?[]:C,k=Q(),P=J(),f=$(),[x,E]=q.useState(""),h=x.toLowerCase(),A=new Map(k.map(X)),b=g.filter(i=>{if(!h||i.name.toLowerCase().includes(h))return!0;if(i.virtual_mcp_id){const p=A.get(i.virtual_mcp_id);if(p&&p.title.toLowerCase().includes(h))return!0}return!1}),z=(i,p)=>{const N=p&&A.has(p)?p:O(l.id);R("automations_list_row_clicked",{automation_id:i,agent_id:N,source:"settings_automations"}),P(N,{search:{main:"automation:"+i}})};let c;t[0]!==f||t[1]!==l.slug?(c=()=>{R("automations_empty_state_browse_agents_clicked"),f({to:"/$org/settings/agents",params:{org:l.slug}})},t[0]=f,t[1]=l.slug,t[2]=c):c=t[2];const L=c,j=d,v=d,w=d;let s;t[3]!==e?(s=e("settings.automations.pageTitle"),t[3]=e,t[4]=s):s=t[4];let r;t[5]!==s?(r=o.jsx(d.Title,{children:s}),t[5]=s,t[6]=r):r=t[6];const _=g.length>0&&o.jsx(F,{value:x,onChange:E,placeholder:e("settings.automations.searchPlaceholder"),className:"w-full md:w-[375px]"});let m;t[7]!==r||t[8]!==_?(m=o.jsxs("div",{className:"flex flex-col gap-6",children:[r,_]}),t[7]=r,t[8]=_,t[9]=m):m=t[9];const y=g.length===0?o.jsx("div",{className:"flex items-center justify-center py-20",children:o.jsx(T,{image:o.jsx(S,{size:48,className:"text-muted-foreground"}),title:e("settings.automations.emptyTitle"),description:e("settings.automations.emptyDescription"),actions:o.jsxs(H,{size:"sm",onClick:L,children:[o.jsx(V,{size:14}),e("settings.automations.browseAgentsButton")]})})}):b.length===0?o.jsx("div",{className:"flex items-center justify-center py-20",children:o.jsx(T,{image:o.jsx(S,{size:48,className:"text-muted-foreground"}),title:e("settings.automations.noResultsTitle"),description:e("settings.automations.noResultsDescription",{search:x})})}):o.jsx("div",{className:"mt-6 rounded-xl border border-border overflow-hidden",children:b.map(i=>o.jsx(K,{automation:i,showAgent:!0,onClick:()=>z(i.id,i.virtual_mcp_id)},i.id))});let n;t[10]!==w.Body||t[11]!==m||t[12]!==y?(n=o.jsxs(w.Body,{children:[m,y]}),t[10]=w.Body,t[11]=m,t[12]=y,t[13]=n):n=t[13];let a;t[14]!==v.Content||t[15]!==n?(a=o.jsx(v.Content,{children:n}),t[14]=v.Content,t[15]=n,t[16]=a):a=t[16];let u;return t[17]!==j||t[18]!==a?(u=o.jsx(j,{children:a}),t[17]=j,t[18]=a,t[19]=u):u=t[19],u}function X(t){return[t.id,t]}function go(){const t=B.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(U,{capability:"automations:manage",area:"automations",children:o.jsx(W,{})}),t[0]=e):e=t[0],e}export{go as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as k,j as i,n as m,bu as R,dD as V,dE as I,dF as $}from"./index-
|
|
1
|
+
import{c as k,j as i,n as m,bu as R,dD as V,dE as I,dF as $}from"./index-DIDvVa8k.js";import{s as E}from"./User01-CXrM7AMp.js";function O(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 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("aspect-square size-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(V,{"data-slot":"avatar-image",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function 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(I,{"data-slot":"avatar-fallback",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}const C=["drop-shadow-lg bg-gradient-to-br from-red-100 to-red-300 text-red-800 shadow-lg shadow-red-300/40 ring-1 ring-red-300/30","drop-shadow-lg bg-gradient-to-br from-lime-100 to-lime-300 text-lime-800 shadow-lg shadow-lime-300/40 ring-1 ring-lime-300/30","drop-shadow-lg bg-gradient-to-br from-emerald-100 to-emerald-300 text-emerald-800 shadow-lg shadow-emerald-300/40 ring-1 ring-emerald-300/30","drop-shadow-lg bg-gradient-to-br from-orange-100 to-orange-300 text-orange-800 shadow-lg shadow-orange-300/40 ring-1 ring-orange-300/30","drop-shadow-lg bg-gradient-to-br from-amber-100 to-amber-300 text-amber-800 shadow-lg shadow-amber-300/40 ring-1 ring-amber-300/30","drop-shadow-lg bg-gradient-to-br from-yellow-100 to-yellow-300 text-yellow-800 shadow-lg shadow-yellow-300/40 ring-1 ring-yellow-300/30","drop-shadow-lg bg-gradient-to-br from-green-100 to-green-300 text-green-800 shadow-lg shadow-green-300/40 ring-1 ring-green-300/30","drop-shadow-lg bg-gradient-to-br from-teal-100 to-teal-300 text-teal-800 shadow-lg shadow-teal-300/40 ring-1 ring-teal-300/30","drop-shadow-lg bg-gradient-to-br from-cyan-100 to-cyan-300 text-cyan-800 shadow-lg shadow-cyan-300/40 ring-1 ring-cyan-300/30","drop-shadow-lg bg-gradient-to-br from-sky-100 to-sky-300 text-sky-800 shadow-lg shadow-sky-300/40 ring-1 ring-sky-300/30","drop-shadow-lg bg-gradient-to-br from-blue-100 to-blue-300 text-blue-800 shadow-lg shadow-blue-300/40 ring-1 ring-blue-300/30","drop-shadow-lg bg-gradient-to-br from-indigo-100 to-indigo-300 text-indigo-800 shadow-lg shadow-indigo-300/40 ring-1 ring-indigo-300/30","drop-shadow-lg bg-gradient-to-br from-violet-100 to-violet-300 text-violet-800 shadow-lg shadow-violet-300/40 ring-1 ring-violet-300/30","drop-shadow-lg bg-gradient-to-br from-purple-100 to-purple-300 text-purple-800 shadow-lg shadow-purple-300/40 ring-1 ring-purple-300/30","drop-shadow-lg bg-gradient-to-br from-fuchsia-100 to-fuchsia-300 text-fuchsia-800 shadow-lg shadow-fuchsia-300/40 ring-1 ring-fuchsia-300/30","drop-shadow-lg bg-gradient-to-br from-pink-100 to-pink-300 text-pink-800 shadow-lg shadow-pink-300/40 ring-1 ring-pink-300/30","drop-shadow-lg bg-gradient-to-br from-rose-100 to-rose-300 text-rose-800 shadow-lg shadow-rose-300/40 ring-1 ring-rose-300/30"],D="drop-shadow-lg text-muted-foreground bg-muted shadow-lg";function L(r){let e=0;for(let t=0;t<r.length;t++)e=r.charCodeAt(t)+((e<<5)-e);const s=Math.abs(e)%C.length;return C[s]}const S=R("border border-border",{variants:{shape:{circle:"rounded-full",square:""},size:{"3xs":"w-3 h-3 text-[7px] font-semibold","2xs":"w-4 h-4 text-[9px] font-semibold",xs:"w-6 h-6 text-sm font-semibold",sm:"w-8 h-8 text-lg font-semibold",base:"w-10 h-10 text-2xl font-semibold",lg:"w-12 h-12 text-3xl font-semibold",xl:"w-16 h-16 text-4xl font-semibold","2xl":"w-20 h-20 text-5xl font-semibold","3xl":"w-32 h-32 text-7xl font-semibold"}},compoundVariants:[{shape:"square",size:"xs",class:"rounded-lg"},{shape:"square",size:"sm",class:"rounded-xl"},{shape:"square",size:"base",class:"rounded-xl"},{shape:"square",size:"lg",class:"rounded-xl"},{shape:"square",size:"xl",class:"rounded-2xl"},{shape:"square",size:"2xl",class:"rounded-3xl"},{shape:"square",size:"3xl",class:"rounded-[40px]"}],defaultVariants:{shape:"square",size:"base"}}),T=R("",{variants:{objectFit:{contain:"object-contain",cover:"object-cover"}},defaultVariants:{objectFit:"cover"}}),_=r=>{const e={"3xs":8,"2xs":8,xs:12,sm:16,base:24,lg:28,xl:36,"2xl":48,"3xl":80};return e[r]||e.base};function W(r){const e=k.c(34);let s,t,o,a,n,d,g,l;e[0]!==r?({url:l,fallback:t,shape:a,size:n,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g;let x;e:{if(typeof t=="string"){let c;e[9]!==t?(c=t.trim().slice(0,2).toUpperCase(),e[9]=t,e[10]=c):c=e[10],x=c;break e}x=t}const f=x;let y;e:{if(j){y=D;break e}if(typeof t=="string"){let c;e[11]!==t?(c=L(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(S({shape:b,size:h}),s),e[18]=s,e[19]=b,e[20]=h,e[21]=w):w=e[21];let v;e[22]!==z||e[23]!==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(E,{size:_(h)})}):i.jsxs(i.Fragment,{children:[l&&i.jsx(U,{src:l,loading:"lazy",alt:"Avatar",className:m(T({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(O,{className:w,...o,children:v}),e[30]=o,e[31]=v,e[32]=w,e[33]=A):A=e[33],A}function B(r){const e=k.c(18);let s,t,o,a,n,d,g,l;e[0]!==r?({shape:a,size:n,url:l,fallback:t,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g,x=h??"base";let 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(W,{shape:b,url:l,fallback:t,size:x,objectFit:u,className:s,muted:j,...o}),e[9]=s,e[10]=t,e[11]=j,e[12]=u,e[13]=o,e[14]=b,e[15]=x,e[16]=l,e[17]=f):f=e[17],f}B.Skeleton=function({shape:e="square",size:s="base",className:t}){return i.jsx("div",{className:m(S({shape:e,size:s}),"bg-muted animate-pulse",t)})};export{B as A};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as u,n as l,j as g,bW as v,bu as b}from"./index-
|
|
1
|
+
import{c as u,n as l,j as g,bW as v,bu as b}from"./index-DIDvVa8k.js";const f=b("inline-flex items-center justify-center rounded-full border text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",success:"border-transparent bg-success text-success-foreground [a&]:hover:bg-success/90 focus-visible:ring-success/20 dark:focus-visible:ring-success/40",warning:"border-transparent bg-warning text-warning-foreground [a&]:hover:bg-warning/90 focus-visible:ring-warning/20 dark:focus-visible:ring-warning/40",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"},size:{default:"px-2 py-0.5",icon:"size-5"}},defaultVariants:{variant:"default",size:"default"}});function h(c){const e=u.c(14);let r,s,i,n,t;e[0]!==c?({className:r,variant:t,size:i,asChild:n,...s}=c,e[0]=c,e[1]=r,e[2]=s,e[3]=i,e[4]=n,e[5]=t):(r=e[1],s=e[2],i=e[3],n=e[4],t=e[5]);const d=(n===void 0?!1:n)?v:"span";let a;e[6]!==r||e[7]!==i||e[8]!==t?(a=l(f({variant:t,size:i}),r),e[6]=r,e[7]=i,e[8]=t,e[9]=a):a=e[9];let o;return e[10]!==d||e[11]!==s||e[12]!==a?(o=g.jsx(d,{"data-slot":"badge",className:a,...s}),e[10]=d,e[11]=s,e[12]=a,e[13]=o):o=e[13],o}export{h as B};
|