decocms 4.577.0 → 4.578.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-BdE1rZoJ.js → AlertCircle-BHOdje2-.js} +1 -1
- package/dist/client/assets/{AreaChart-D0m3b7qG.js → AreaChart--NTdNKkN.js} +1 -1
- package/dist/client/assets/{ArrowLeft-DIrnwv8l.js → ArrowLeft-DwK9IQqr.js} +1 -1
- package/dist/client/assets/{ArrowUp-km-Xmh__.js → ArrowUp-BKp-bI0t.js} +1 -1
- package/dist/client/assets/{BookOpen01-BneB1q9z.js → BookOpen01-CCzJ3iHg.js} +1 -1
- package/dist/client/assets/{CartesianChart-BwsWHEdb.js → CartesianChart-DcsXR4up.js} +1 -1
- package/dist/client/assets/{CategoricalChart-Dxo_7xLg.js → CategoricalChart-BH2fCBYy.js} +1 -1
- package/dist/client/assets/{CheckCircle-CiBUynzC.js → CheckCircle-CpYSXUlJ.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-CRWdnYCm.js → ChevronSelectorVertical-BfPzQt1M.js} +1 -1
- package/dist/client/assets/{ChevronUp-B7dgqvYM.js → ChevronUp-yM6kuF7B.js} +1 -1
- package/dist/client/assets/{CreditCard01-CcIddg9s.js → CreditCard01-ClPhtnpy.js} +1 -1
- package/dist/client/assets/{Globe04-DIBckqos.js → Globe04-CpMO0Sfn.js} +1 -1
- package/dist/client/assets/{Key01-BV5ckBOE.js → Key01-BUefgO6r.js} +1 -1
- package/dist/client/assets/{LinkBroken01-Mv2kbzSM.js → LinkBroken01-Beajkv8Y.js} +1 -1
- package/dist/client/assets/{Minus-Bygm9L7w.js → Minus-CkHBDYFP.js} +1 -1
- package/dist/client/assets/{Monitor01-HDGt-WwC.js → Monitor01-6Z9BL4ul.js} +1 -1
- package/dist/client/assets/{Play-DROL2O51.js → Play-QQIqJKj8.js} +1 -1
- package/dist/client/assets/{Plus-C-Or0hIv.js → Plus-jqQtsDrV.js} +1 -1
- package/dist/client/assets/{ReferenceLine-BPmIH9b3.js → ReferenceLine-65eMf_HF.js} +1 -1
- package/dist/client/assets/{SearchMd-D88tiwag.js → SearchMd--9oaPr0p.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-Cdbqpanm.js → ShoppingBag01-DWT7jnvZ.js} +1 -1
- package/dist/client/assets/{Sun-CgOyXDTW.js → Sun-CBa0lZzX.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-Dkkqg27i.js → SwitchHorizontal01-Be5wnM3M.js} +1 -1
- package/dist/client/assets/{Tool01-D4tVVqAj.js → Tool01-C_vFDQiZ.js} +1 -1
- package/dist/client/assets/{Tooltip-cgLuNyXo.js → Tooltip-BxRazsja.js} +1 -1
- package/dist/client/assets/{Trash01-Cqkcp6ky.js → Trash01-D4h16nnS.js} +1 -1
- package/dist/client/assets/{Upload01-CsOcxm5q.js → Upload01-DLWP4rJI.js} +1 -1
- package/dist/client/assets/UserSquare-DomA7Npc.js +1 -0
- package/dist/client/assets/{Users01-BpEuprvx.js → Users01-DQk985Hj.js} +1 -1
- package/dist/client/assets/{XClose-D9taHFI1.js → XClose-DsOcImLD.js} +1 -1
- package/dist/client/assets/{Zap-BhxT34oC.js → Zap-CXSu8byh.js} +1 -1
- package/dist/client/assets/{access-gate-Bbt03qvc.js → access-gate-COWmI5bk.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-EzR6kkmo.js → add-connection-dialog-BcVopUkx.js} +1 -1
- package/dist/client/assets/agent-app-IytyCAeX.js +1 -0
- package/dist/client/assets/{agent-assets-DUoWUOFt.js → agent-assets-BiP4eXwk.js} +1 -1
- package/dist/client/assets/{agent-automation-Cyb5qsWY.js → agent-automation-DBUljkhT.js} +1 -1
- package/dist/client/assets/{agent-automations-HcbM2XMD.js → agent-automations-SLj1xajz.js} +1 -1
- package/dist/client/assets/{agent-blog-BLi3oKLw.js → agent-blog-CwfLgnOy.js} +2 -2
- package/dist/client/assets/{agent-blog-post-DXyE25Wg.js → agent-blog-post-Dv9DOEk2.js} +2 -2
- package/dist/client/assets/{agent-calendar-D7ih9de1.js → agent-calendar-CjQfj1Sz.js} +1 -1
- package/dist/client/assets/{agent-capabilities-CrqOfLmC.js → agent-capabilities-B2YgTs9t.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-DtVo8JXM.js → agent-connect-sources-COR6xHVk.js} +1 -1
- package/dist/client/assets/agent-deck-BaQ_Lg8E.js +1 -0
- package/dist/client/assets/{agent-e2e-CBM_w3qk.js → agent-e2e-CqM9gm_q.js} +1 -1
- package/dist/client/assets/agent-experiments-BQTqMeA9.js +1 -0
- package/dist/client/assets/{agent-file-DjiNMKB3.js → agent-file-aW_ERFnN.js} +1 -1
- package/dist/client/assets/agent-hosting-D1eqz9SR.js +1 -0
- package/dist/client/assets/agent-icon-C-RKmmDR.js +1 -0
- package/dist/client/assets/agent-library-BMuykAhZ.js +1 -0
- package/dist/client/assets/agent-library-file-DMgZUrW5.js +1 -0
- package/dist/client/assets/agent-overview-BCgVG2tE.js +1 -0
- package/dist/client/assets/{agent-releases-BlbJtMk9.js → agent-releases-IeUzKjUs.js} +1 -1
- package/dist/client/assets/agent-settings-DmzwtPvi.js +1 -0
- package/dist/client/assets/{agent-site-editor-BeTpu1p8.js → agent-site-editor-WH6jHL7m.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-CtuKhycC.js +2 -0
- package/dist/client/assets/agent-site-editor-content-6A0AHGJH.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-DiYiv2sS.js +1 -0
- package/dist/client/assets/agent-view-BLZVy10x.js +1 -0
- package/dist/client/assets/{agent-view-guard-CruOWgYs.js → agent-view-guard-DL_BQ0ym.js} +1 -1
- package/dist/client/assets/{ai-providers-C2yFfgyi.js → ai-providers-DQRQioIu.js} +1 -1
- package/dist/client/assets/{alert-jF8tTR34.js → alert-DejWJPEC.js} +1 -1
- package/dist/client/assets/{analytics-sections-Qo8FMsPn.js → analytics-sections-aJEg6Lrj.js} +1 -1
- package/dist/client/assets/api-keys-BVTq6_vY.js +1 -0
- package/dist/client/assets/{api-keys-15uqAkvj.js → api-keys-CtF2T7md.js} +1 -1
- package/dist/client/assets/{app-editor-B4pmL5qY.js → app-editor-BbInzuqi.js} +1 -1
- package/dist/client/assets/{asset-utils-CwQVXoYw.js → asset-utils-DLSL6NlD.js} +1 -1
- package/dist/client/assets/{auth-YGSVzhUG.js → auth-DQhl82rC.js} +1 -1
- package/dist/client/assets/{auth-catchall-hWKWJU80.js → auth-catchall-CKKMb7Qg.js} +1 -1
- package/dist/client/assets/{auth-entry-DpL4vu4t.js → auth-entry-GYtwsP_U.js} +1 -1
- package/dist/client/assets/{auth-split-layout-BFmr3RnK.js → auth-split-layout-Den49bbd.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-DHgqzdUM.js → authenticate-and-persist-oauth-BUdNrcOr.js} +1 -1
- package/dist/client/assets/{automation-list-row-BAeLE453.js → automation-list-row-BNUSbcf6.js} +1 -1
- package/dist/client/assets/{automation-runs-C7o6atC8.js → automation-runs-Pz0rgqnE.js} +1 -1
- package/dist/client/assets/{automations-BvOuQD58.js → automations-DQjVvCEj.js} +1 -1
- package/dist/client/assets/{badge-D9oJO89f.js → badge-lysbeP9P.js} +1 -1
- package/dist/client/assets/{block-document-Phc0b_hv.js → block-document-DvtTe-B8.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-XztheX0p.js → blocks-preview-workspace-context-CnaE8A0D.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-CPXZUbSV.js → blocks-tab-states-DScRj9jB.js} +1 -1
- package/dist/client/assets/{blog-preview-url-BlQDNdnl.js → blog-preview-url-BaS_j9Mv.js} +1 -1
- package/dist/client/assets/{blog-schema-BY4m7Viq.js → blog-schema-BZTYj2LA.js} +1 -1
- package/dist/client/assets/{blog-source-gate-CiOBhTPt.js → blog-source-gate-D36m3Pml.js} +1 -1
- package/dist/client/assets/{blog-view-gate-CCZFjbaz.js → blog-view-gate-DZU_55_0.js} +1 -1
- package/dist/client/assets/{buckets-BkOGaNvk.js → buckets-Bbtnc4QE.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-BvBG7PT7.js → build-improve-prompt-doc-Ukn_sIrt.js} +1 -1
- package/dist/client/assets/{calendar-CNAmcpRM.js → calendar-RFGSgZO6.js} +1 -1
- package/dist/client/assets/{capability-load-error-BfsuWu82.js → capability-load-error-zDoTf-tr.js} +1 -1
- package/dist/client/assets/{category-editor-DfKRUZ0M.js → category-editor-Dji5QxhQ.js} +1 -1
- package/dist/client/assets/{category-tree-C0ZkCPxc.js → category-tree-hquVl_NC.js} +1 -1
- package/dist/client/assets/{chart-CjhZfLhJ.js → chart-Y23GGTjZ.js} +1 -1
- package/dist/client/assets/{chat-context-BXBBnsXM.js → chat-context-o9Pyy_rd.js} +1 -1
- package/dist/client/assets/{chat-draft-BiNhHFHP.js → chat-draft-ZyzRFxm_.js} +1 -1
- package/dist/client/assets/{checkbox-BqeIWnOr.js → checkbox-BgJ_rDKP.js} +1 -1
- package/dist/client/assets/{choose-editor-C3lPTBrc.js → choose-editor-BE7aIxmQ.js} +1 -1
- package/dist/client/assets/{cli-auth-success-DXTy0zTr.js → cli-auth-success-BlHmHrJ9.js} +1 -1
- package/dist/client/assets/{client-icons-bVQyh7Ui.js → client-icons-ClEjJoc4.js} +1 -1
- package/dist/client/assets/{cms-settings-editor-BGhvXRA5.js → cms-settings-editor-DTSvLtYU.js} +1 -1
- package/dist/client/assets/{cms-store-drafts-C_2pJAHv.js → cms-store-drafts-DChYgVhP.js} +1 -1
- package/dist/client/assets/{collapsible-M6EMuds1.js → collapsible-Ck6jFTQH.js} +1 -1
- package/dist/client/assets/{collection-detail-DtpW8ulK.js → collection-detail-Cu5F_YZk.js} +1 -1
- package/dist/client/assets/{collection-display-button-CLT_iQ9K.js → collection-display-button-Cc8fDLFX.js} +1 -1
- package/dist/client/assets/{collection-search-d8_we7KS.js → collection-search-Cr2_Tgzy.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-jjhzHxOC.js → collection-table-wrapper-VD4O1Z7Z.js} +1 -1
- package/dist/client/assets/{collection-tabs-CDEZauaw.js → collection-tabs-BNEX9U1D.js} +1 -1
- package/dist/client/assets/{combobox-eXr44O4N.js → combobox-CqgGSY4o.js} +1 -1
- package/dist/client/assets/{command-CL5fBjco.js → command-CnhVLB17.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-ZhumvGkq.js → companion-mcps-section-CLNVvG7e.js} +1 -1
- package/dist/client/assets/{config-DTkH3DlA.js → config-a5cd-EVs.js} +1 -1
- package/dist/client/assets/{connect-DTRBNGAJ.js → connect-4PrNRBjZ.js} +1 -1
- package/dist/client/assets/{connect-layout-C9YZDE5a.js → connect-layout-CNlF_K4x.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-CtNzRZNm.js → connect-source-dialog-UDY4VqBo.js} +1 -1
- package/dist/client/assets/{connection-DQRUSri4.js → connection-CV7VyK2j.js} +1 -1
- package/dist/client/assets/{connection-card-DiXDtKCD.js → connection-card-DpuIDx02.js} +1 -1
- package/dist/client/assets/{connection-detail-A1N-eCPy.js → connection-detail-BTx1Lau8.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-DbQ-1SYg.js → connection-form-helpers-BHr2mHhQ.js} +1 -1
- package/dist/client/assets/{connection-slug-eNvNu5ns.js → connection-slug-D2uNKvQr.js} +1 -1
- package/dist/client/assets/{connections-F6Cb4hev.js → connections-DyhjRe5H.js} +1 -1
- package/dist/client/assets/{content-tab-zWTaVHTI.js → content-tab-BGklezQM.js} +3 -3
- package/dist/client/assets/{context-jjXucCze.js → context-Cw8yAq79.js} +1 -1
- package/dist/client/assets/{context-menu-C8EhSOHZ.js → context-menu-DIqy9oGB.js} +1 -1
- package/dist/client/assets/{context-shell-DAsZEr3G.js → context-shell-DzGB0CzT.js} +3 -3
- package/dist/client/assets/{core.esm-q-GZRseF.js → core.esm-AubJLKZ-.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-B0fwudcl.js → create-organization-dialog-D5uXvaYq.js} +1 -1
- package/dist/client/assets/{delete-copy-DewsXC-x.js → delete-copy-CdfctKz4.js} +1 -1
- package/dist/client/assets/{device-hint-DOHdIy74.js → device-hint-CFgRDD8m.js} +1 -1
- package/dist/client/assets/{discover-Sgb2XR4X.js → discover-DxhSOuBA.js} +1 -1
- package/dist/client/assets/{domain-settings-CzQKvon-.js → domain-settings-C9lZyHfM.js} +1 -1
- package/dist/client/assets/{drawer-CT21cqiT.js → drawer-Donq2Zq_.js} +1 -1
- package/dist/client/assets/{editor-DSTLBMSV.js → editor-BRySXv_B.js} +1 -1
- package/dist/client/assets/{editor-classes-DNgU6VQ_.js → editor-classes-8qIA7W4N.js} +1 -1
- package/dist/client/assets/{empty-message-0iKzEZgc.js → empty-message-BAHk-1bK.js} +1 -1
- package/dist/client/assets/{empty-state-C7mAM8aV.js → empty-state-BwFbOlsH.js} +1 -1
- package/dist/client/assets/{empty-state-De0GyKdS.js → empty-state-DDTtYKkY.js} +1 -1
- package/dist/client/assets/{experiments-tab-choice-DwnKczQ0.js → experiments-tab-choice-BM855EvI.js} +1 -1
- package/dist/client/assets/{extract-connection-data-C9uUQyrf.js → extract-connection-data-DsPBwLZT.js} +1 -1
- package/dist/client/assets/{feature-gate-BekWNhM3.js → feature-gate-CEBXLuF8.js} +1 -1
- package/dist/client/assets/{feature-paywall-CzMsGR-v.js → feature-paywall-DKb-BDqu.js} +1 -1
- package/dist/client/assets/{file-explorer-BA6AotC6.js → file-explorer-C_M9KHGa.js} +1 -1
- package/dist/client/assets/{file-preview-CK5Pkylz.js → file-preview-ekcEL18H.js} +1 -1
- package/dist/client/assets/{file-share-button-qjRy5kh1.js → file-share-button-ZGH-qkC_.js} +1 -1
- package/dist/client/assets/{file-type-icon-DI74_rhH.js → file-type-icon-D4Edy8Bo.js} +1 -1
- package/dist/client/assets/{folder-icon-RhxrL37z.js → folder-icon-C46Lx0s6.js} +1 -1
- package/dist/client/assets/{form-czY_WZeB.js → form-DddGN9Yh.js} +1 -1
- package/dist/client/assets/{frame-navigation-D3lcT6PQ.js → frame-navigation-HWq_5QB3.js} +1 -1
- package/dist/client/assets/{general-DyfkLFv0.js → general-brvHskhD.js} +1 -1
- package/dist/client/assets/{github-icon-DbvGzNXg.js → github-icon-CBn2nQtJ.js} +1 -1
- package/dist/client/assets/{held-block-view-616AHRnA.js → held-block-view-BFXBQ9fK.js} +1 -1
- package/dist/client/assets/{home-CvjGQ8iY.js → home-C--lHJVb.js} +1 -1
- package/dist/client/assets/{home-overview-BspPD0Qy.js → home-overview-DaE-41lI.js} +1 -1
- package/dist/client/assets/{hosted-reconcile-gX34y3hJ.js → hosted-reconcile-CrIPblfo.js} +1 -1
- package/dist/client/assets/{icon-button-Bek6uWU8.js → icon-button-DYLciVFZ.js} +1 -1
- package/dist/client/assets/{index-CYAg_mZ5.js → index-BJ5UuERb.js} +1 -1
- package/dist/client/assets/{index-BgGa_gEX.js → index-BNwuaZhD.js} +1 -1
- package/dist/client/assets/{index-e47kvUTQ.js → index-BZdAVrUU.js} +1 -1
- package/dist/client/assets/{index-CJqO_lXj.js → index-BmYwClLx.js} +1 -1
- package/dist/client/assets/{index-ZpYsIOky.js → index-BqD88VPt.js} +1 -1
- package/dist/client/assets/{index-5IFWC0PS.js → index-CHOxYhnv.js} +44 -44
- package/dist/client/assets/{index-BFLUunGm.js → index-CXvGxxAm.js} +1 -1
- package/dist/client/assets/{index-DI1WEe1Y.js → index-C_bl8gsZ.js} +1 -1
- package/dist/client/assets/{index-BASUN16S.js → index-Cqxphjz0.js} +1 -1
- package/dist/client/assets/{index-Co1pEKoz.js → index-DChf1qbF.js} +1 -1
- package/dist/client/assets/{index-D6lWWdm-.js → index-Dk-oU4JL.js} +1 -1
- package/dist/client/assets/{index-BVaQtZpO.js → index-DnxJcpC4.js} +1 -1
- package/dist/client/assets/{index-Cb-PI-oM.js → index-Dz6MGtCy.js} +1 -1
- package/dist/client/assets/{index-Cn4blTB2.js → index-Ujlc9MWT.js} +1 -1
- package/dist/client/assets/{index-CLog75-o.js → index-W-F8Gjme.js} +1 -1
- package/dist/client/assets/{index-B_hHGrWo.js → index-Z4MRwIRr.js} +1 -1
- package/dist/client/assets/{index-Cq3k2rBV.js → index-jntxieqb.js} +1 -1
- package/dist/client/assets/{index-redirect-B5LCK4UZ.js → index-redirect-Bw8K1uPG.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-CgeE9MzI.js → infiniteQueryObserver-Sb4-Zoh0.js} +1 -1
- package/dist/client/assets/{infra-billing-D_NOfbaI.js → infra-billing-B222FxLt.js} +1 -1
- package/dist/client/assets/{input-Cof38_0i.js → input-CHhCTfcg.js} +1 -1
- package/dist/client/assets/{input-1bbcsHzM.js → input-rNhKaUqk.js} +3 -3
- package/dist/client/assets/{integration-icon-ClorKiq5.js → integration-icon-CM5LyK_z.js} +1 -1
- package/dist/client/assets/{item-actions-pz3LKYdP.js → item-actions-Cdz0dPi_.js} +1 -1
- package/dist/client/assets/{jira-icon-CSE5FXRa.js → jira-icon-CgHUBjzE.js} +1 -1
- package/dist/client/assets/{label-C1myK8cj.js → label-B6kbb_qI.js} +1 -1
- package/dist/client/assets/{layout-B4vND3NH.js → layout-8yHvgWm7.js} +1 -1
- package/dist/client/assets/{legacy-admin-welcome-dialog-DtBTs-JZ.js → legacy-admin-welcome-dialog-C1EB7MCq.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-wdUtLgZd.js → legacy-agents-deep-BQInfINZ.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-D0dw61Zg.js → legacy-main-redirect-CJKXe_S6.js} +1 -1
- package/dist/client/assets/library-CLMpbtIy.js +1 -0
- package/dist/client/assets/{library-tab-3lHWVZnM.js → library-tab-CW_E0hfE.js} +1 -1
- package/dist/client/assets/{login-OeBuTK5R.js → login-CDwczf6C.js} +1 -1
- package/dist/client/assets/{markdown-BhnPL5Bs.js → markdown-Deyw3r6u.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-DeImvVKz.js → mcp-app-renderer-CEhql9SF.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DAPLorIu.js → mcp-oauth-BQtVOszP.js} +1 -1
- package/dist/client/assets/{mcp-oauth-D2St0yzi.js → mcp-oauth-JUy-C_de.js} +1 -1
- package/dist/client/assets/{members-CRV8r-1W.js → members-DrjrN5qN.js} +1 -1
- package/dist/client/assets/{memory-C08OAgnC.js → memory-BITIQ7DP.js} +1 -1
- package/dist/client/assets/{mock-board-UupkdDTJ.js → mock-board-CprpumRW.js} +3 -3
- package/dist/client/assets/{monaco-editor-DgmLjwMj.js → monaco-editor-CRckTkcR.js} +1 -1
- package/dist/client/assets/{monitoring-C2AkJ1E2.js → monitoring-GakxK6v8.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-BkupHr4w.js → monitoring-stats-row-CCOAzga2.js} +1 -1
- package/dist/client/assets/{multi-select-D_-o3Z5k.js → multi-select-B_Fvyk0J.js} +1 -1
- package/dist/client/assets/{mustache-D-pZ4GVh.js → mustache-BGNYir1R.js} +1 -1
- package/dist/client/assets/{named-rule-step-BqRLfozU.js → named-rule-step-WRCKmihp.js} +1 -1
- package/dist/client/assets/{named-rule-view-Cjao8aHC.js → named-rule-view-BGKV11Gn.js} +1 -1
- package/dist/client/assets/{new-project-dialog-ly3jlxrO.js → new-project-dialog-C9WcHYrC.js} +1 -1
- package/dist/client/assets/{oauth-callback-DGsbFvpE.js → oauth-callback-DG6fghbH.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DH_kBA_S.js → oauth-callback-ai-provider-BjKgNB2f.js} +1 -1
- package/dist/client/assets/{oauth-consent-DiV1G_a8.js → oauth-consent-C8DnEY1C.js} +1 -1
- package/dist/client/assets/{onboarding-wSysb6DG.js → onboarding-DWuD3Chf.js} +1 -1
- package/dist/client/assets/{openai-conversation-BnmAjQv3.js → openai-conversation-BMcQmBgw.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-BddiZzQV.js → optimistic-project-sidebar-views-xEm1EFDd.js} +1 -1
- package/dist/client/assets/{order-monitor-day-vJd_rbss.js → order-monitor-day-Cp9FGnxW.js} +1 -1
- package/dist/client/assets/{organization-choice-B_C6gRzc.js → organization-choice-DC3kAtog.js} +1 -1
- package/dist/client/assets/{orgs-Hd1POC7b.js → orgs-C3ExmEUV.js} +1 -1
- package/dist/client/assets/{own-accounts-section-DRAcUJQm.js → own-accounts-section-D0We85Qt.js} +1 -1
- package/dist/client/assets/{pair-DsQEIDjk.js → pair-BoFr4FJb.js} +1 -1
- package/dist/client/assets/{parse-sections-DAMeYP46.js → parse-sections-D9GxphKG.js} +2 -2
- package/dist/client/assets/plan-Bsk7Zd5h.js +1 -0
- package/dist/client/assets/{plan-ladder-BVTNP5Xz.js → plan-ladder-D1iTEGuZ.js} +1 -1
- package/dist/client/assets/{plan-usage-card-Du0lOF_J.js → plan-usage-card-BJ5m6iCB.js} +1 -1
- package/dist/client/assets/{popover-DP7XfF8t.js → popover-AfVmBiXN.js} +1 -1
- package/dist/client/assets/{post-calendar-DDpUGeeB.js → post-calendar-CuIdS76v.js} +1 -1
- package/dist/client/assets/{post-editor-DtDeATFH.js → post-editor-BnakSlKS.js} +2 -2
- package/dist/client/assets/{preview-content-C5OVyGLr.js → preview-content-DjjT4V-O.js} +1 -1
- package/dist/client/assets/{preview-dialog-DuuWqEir.js → preview-dialog-Ccy0t2uO.js} +1 -1
- package/dist/client/assets/{preview-panel-BZ5HJll2.js → preview-panel-lxiY3O14.js} +1 -1
- package/dist/client/assets/{preview-tab-P_107JPX.js → preview-tab-CqLWllse.js} +3 -3
- package/dist/client/assets/{product-picker-dialog-Dt7DCQ6n.js → product-picker-dialog-D8WcSokk.js} +1 -1
- package/dist/client/assets/{profile-GhJox0Lx.js → profile-Drjsxz7t.js} +1 -1
- package/dist/client/assets/{project-app-view-qeUPQ38h.js → project-app-view-iFxD19E8.js} +1 -1
- package/dist/client/assets/{project-apps-DfPcY68g.js → project-apps-CNXyAUnR.js} +1 -1
- package/dist/client/assets/{project-icon-B90806PF.js → project-icon-D_A1aREs.js} +1 -1
- package/dist/client/assets/{project-index-Do6iewlo.js → project-index-6AmZpE2T.js} +1 -1
- package/dist/client/assets/project-reports-Bph27UgY.js +1 -0
- package/dist/client/assets/project-tasks-g0DZAutp.js +1 -0
- package/dist/client/assets/{projects-CymMldT7.js → projects-C-jes6vD.js} +1 -1
- package/dist/client/assets/{projects-empty-state-BTGd2cv1.js → projects-empty-state-CzS59zMw.js} +1 -1
- package/dist/client/assets/{prompts-Cd0qPZsx.js → prompts-Cdt8Hsyk.js} +1 -1
- package/dist/client/assets/{record-editor-BH3fKYC8.js → record-editor-CDn5r9vK.js} +1 -1
- package/dist/client/assets/{redirect-editor-xZO49sls.js → redirect-editor-CjfokzC6.js} +1 -1
- package/dist/client/assets/reports-BNOk1CAK.js +1 -0
- package/dist/client/assets/{reports-B9pEcRxn.js → reports-W44854hR.js} +1 -1
- package/dist/client/assets/{reports-onboarding-DxeuhIZr.js → reports-onboarding-B8EBbkkq.js} +1 -1
- package/dist/client/assets/{reports-tab-YeP0tPeK.js → reports-tab-CAQtX43j.js} +2 -2
- package/dist/client/assets/repositories-Bh3IcyhH.js +1 -0
- package/dist/client/assets/{repositories-B0Temlg5.js → repositories-DKNamez0.js} +1 -1
- package/dist/client/assets/{repository-binding-L4ChVpPs.js → repository-binding-zOZEsVNQ.js} +1 -1
- package/dist/client/assets/{repository-picker-CCYsOJZQ.js → repository-picker-DQ8Ce_c3.js} +1 -1
- package/dist/client/assets/{require-capability-Cm5TFoc0.js → require-capability-DR3oejOb.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BUx3f5eg.js → required-auth-layout-D8CrwDut.js} +1 -1
- package/dist/client/assets/{reset-password-DWi7rqRm.js → reset-password-DMlXhive.js} +1 -1
- package/dist/client/assets/{resizable-Biivyzu2.js → resizable-DOkGVAXY.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-C_X-fR95.js → resolve-tab-icon-w8xgbNJA.js} +1 -1
- package/dist/client/assets/review-settings-CYZdQlMs.js +1 -0
- package/dist/client/assets/{role-color-_0YSG8Dj.js → role-color-Dmigi-fS.js} +1 -1
- package/dist/client/assets/{roles-akRjx2S4.js → roles-LwSdhOgS.js} +1 -1
- package/dist/client/assets/route-Bq6SpTLT.js +1 -0
- package/dist/client/assets/{route-CKHdrn7R.js → route-CxYCV9F1.js} +1 -1
- package/dist/client/assets/{route-D1Gpwe4D.js → route-DoHag-FN.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-BJx1JU2-.js → sandbox-lifecycle-context-DrAhvgSp.js} +1 -1
- package/dist/client/assets/{save-status-T9dswXr1.js → save-status-CzYNQ6G2.js} +1 -1
- package/dist/client/assets/{schema-Dc_MkHkp.js → schema-BB8zKrPl.js} +1 -1
- package/dist/client/assets/{schema-DjfjCUhq.js → schema-Cf58u1YZ.js} +1 -1
- package/dist/client/assets/{scroll-area-cgfYHO2J.js → scroll-area-w2Fr7CkP.js} +1 -1
- package/dist/client/assets/{search-input-CgAhBcAm.js → search-input-CxzHzt1i.js} +1 -1
- package/dist/client/assets/{search-toggle-BvL2EnQl.js → search-toggle-NGBAT2W1.js} +1 -1
- package/dist/client/assets/{secret-picker-pXy37N0W.js → secret-picker-B1Sm2AGS.js} +1 -1
- package/dist/client/assets/{secrets-DY2kpTfw.js → secrets-BnQFmasl.js} +1 -1
- package/dist/client/assets/{section-array-field-Dqv2uZIX.js → section-array-field-D7aYRyOo.js} +1 -1
- package/dist/client/assets/{sections-BYpfTFZT.js → sections-BB3EA9UD.js} +1 -1
- package/dist/client/assets/{sections-editor-D7uS2U4v.js → sections-editor-CgPW71Cu.js} +1 -1
- package/dist/client/assets/{select-model-BCp0KUZW.js → select-model-DRmGTTKK.js} +1 -1
- package/dist/client/assets/{select-Dj8hBfnd.js → select-oOpcW8y8.js} +1 -1
- package/dist/client/assets/{seo-editor-C6gHCSwh.js → seo-editor-CHYDqTFC.js} +1 -1
- package/dist/client/assets/{separator-CD_4C4Y0.js → separator-kcuCI0BI.js} +1 -1
- package/dist/client/assets/settings-tab-vjcKSXb3.js +1 -0
- package/dist/client/assets/{sheet-w42F36Fm.js → sheet-B4sQvcZD.js} +1 -1
- package/dist/client/assets/{shell-layout-SnEo2Z8s.js → shell-layout-C4gugWKg.js} +1 -1
- package/dist/client/assets/{site-draft-actions-X8qdJpR6.js → site-draft-actions-DpgDCYG8.js} +1 -1
- package/dist/client/assets/{site-draft-view-DieOLT9Q.js → site-draft-view-BZ84hckI.js} +1 -1
- package/dist/client/assets/site-editor-BJf_n_54.js +1 -0
- package/dist/client/assets/site-editor-toast-CPe_RO4U.js +1 -0
- package/dist/client/assets/{skills-BPDMMsh1.js → skills-CUzlP_yL.js} +1 -1
- package/dist/client/assets/{slider-BUH8Dwgf.js → slider-DMICv7y9.js} +1 -1
- package/dist/client/assets/{sortable.esm-BwyBVE7G.js → sortable.esm-DMidKm69.js} +1 -1
- package/dist/client/assets/{sso-Cf_QJD0l.js → sso-rrH5Y6U0.js} +1 -1
- package/dist/client/assets/{suggestion-EZp_1C2Z.js → suggestion-D5SniAVu.js} +1 -1
- package/dist/client/assets/{super-agent-icon-Cuh3vhpx.js → super-agent-icon-CDMKv4pz.js} +1 -1
- package/dist/client/assets/{switch-CcIiziq_.js → switch-DCbfNrSN.js} +1 -1
- package/dist/client/assets/{synced-repos-Cnb_uqs2.js → synced-repos-_SlW524E.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-DvOK9lLO.js → tab-icon-glyph-BmobLy_7.js} +1 -1
- package/dist/client/assets/{table-CX_Xjv5_.js → table-BdoV93HO.js} +1 -1
- package/dist/client/assets/{tabs-BVFow_A3.js → tabs-CGFgLwIj.js} +1 -1
- package/dist/client/assets/{task-board-DVtARw_U.js → task-board--eP68xys.js} +1 -1
- package/dist/client/assets/{task-route-Ck3RXNt1.js → task-route-Btx_tQTg.js} +1 -1
- package/dist/client/assets/{task-status-DFMg9mu2.js → task-status-BvghF77r.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-BUGnnj7V.js → taskboard-analytics-BZAQkd-b.js} +1 -1
- package/dist/client/assets/tasks-BNPmBOf9.js +1 -0
- package/dist/client/assets/{tasks-B3OOn3U2.js → tasks-C8a0rX7H.js} +1 -1
- package/dist/client/assets/{textarea-BxqysnAf.js → textarea-DiKdmgZC.js} +1 -1
- package/dist/client/assets/{thread-analytics-dnNDwV70.js → thread-analytics-D3z89Y54.js} +1 -1
- package/dist/client/assets/{thread-intent-BujELieJ.js → thread-intent-otNmUDpT.js} +1 -1
- package/dist/client/assets/{thread-route-CG4NoBnV.js → thread-route-CVZs3lS7.js} +1 -1
- package/dist/client/assets/{thread-route-BAkMWoFr.js → thread-route-CkasfYkE.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-iPIMT5tX.js → thread-sheet-body-DcJJrL4A.js} +1 -1
- package/dist/client/assets/{time-range-picker-DXMtxhmu.js → time-range-picker-DBVsSx_d.js} +1 -1
- package/dist/client/assets/{toggle-group-CFCrTuTF.js → toggle-group-DWJu5FLK.js} +1 -1
- package/dist/client/assets/{tool-namespace-C9gQSjv3.js → tool-namespace-BOC8taOg.js} +1 -1
- package/dist/client/assets/{tool-set-selector-Dpj_1lJt.js → tool-set-selector-BA1yDuio.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-Bk7F5Fex.js → toolbar-icon-button-Q9J4as0k.js} +1 -1
- package/dist/client/assets/{tooltip-Bj0ggRLV.js → tooltip-D2JXB44W.js} +1 -1
- package/dist/client/assets/{tooltipContext-BSiIa8-6.js → tooltipContext-DFFEsXAa.js} +1 -1
- package/dist/client/assets/{track-uewKzN4A.js → track-BoXXDgSF.js} +1 -1
- package/dist/client/assets/{types-BuSDoCm5.js → types-BQyA3BSs.js} +1 -1
- package/dist/client/assets/{url-slug-BFZflu8h.js → url-slug-C5-8vP9h.js} +1 -1
- package/dist/client/assets/{usage-stats-FTjlrZsR.js → usage-stats-PiJNBrSI.js} +1 -1
- package/dist/client/assets/{use-ai-providers-hOyNnU7s.js → use-ai-providers-BJRvsFFm.js} +1 -1
- package/dist/client/assets/{use-apply-named-rule-JRuS8Fqz.js → use-apply-named-rule-Bx_7T9aq.js} +1 -1
- package/dist/client/assets/use-ask-in-chat-BbPdenM-.js +1 -0
- package/dist/client/assets/{use-automations-BW9n1XZu.js → use-automations-D6sbYMe4.js} +1 -1
- package/dist/client/assets/{use-autosave-CFQpxLa7.js → use-autosave-B4Qmzq9F.js} +1 -1
- package/dist/client/assets/use-blocks-v8-project-D8GbwCrf.js +1 -0
- package/dist/client/assets/{use-chat-layout-state-Bib3kRoh.js → use-chat-layout-state-Do_nZB5B.js} +1 -1
- package/dist/client/assets/{use-cms-publish-actions-BanOYWkB.js → use-cms-publish-actions-xdyGorKy.js} +1 -1
- package/dist/client/assets/{use-connect-companion-hxxGTIoI.js → use-connect-companion-vyHul4nj.js} +1 -1
- package/dist/client/assets/{use-connection-CKudd0UO.js → use-connection-D0bmffUK.js} +1 -1
- package/dist/client/assets/{use-content-sync-DVFphaEf.js → use-content-sync-lsuVBOfK.js} +1 -1
- package/dist/client/assets/{use-copy-s7vshP5o.js → use-copy-BMjPWKp8.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-BcLGuFCX.js → use-date-fns-locale-BGBBIFpr.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DF7xOcC9.js → use-debounced-autosave-7L7lz31t.js} +1 -1
- package/dist/client/assets/{use-debounced-value-B0C48w17.js → use-debounced-value-CoBOVCcY.js} +1 -1
- package/dist/client/assets/{use-deco-credits-Cc7w_fUS.js → use-deco-credits-DVIvAOkL.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-Ctfpdj_z.js → use-decopilot-events-Bvlss2N9.js} +1 -1
- package/dist/client/assets/{use-delete-block-CMQm89VB.js → use-delete-block-C97xuHhI.js} +1 -1
- package/dist/client/assets/{use-delete-connection-BM0YKMsI.js → use-delete-connection-tX5LcknK.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-CJOxofw6.js → use-deployment-admin-BLMaSYC-.js} +1 -1
- package/dist/client/assets/{use-entitlements-BPjzEs4p.js → use-entitlements-npCYsfMp.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-BwHAw0OT.js → use-fast-preview-draft-url-Dd9sZXW3.js} +1 -1
- package/dist/client/assets/{use-file-configs-DA74H1hE.js → use-file-configs-H9DeMtGB.js} +1 -1
- package/dist/client/assets/{use-id-selection-CMNzhPoi.js → use-id-selection-DwyVyKTM.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-C-HQ6EgP.js → use-inbox-feed-CrWtaQnK.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-M12K1Dpn.js → use-infinite-scroll-6BCwcRG9.js} +1 -1
- package/dist/client/assets/{use-join-requests-ntiStw2Q.js → use-join-requests-B4f6m6mx.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-DLlaHA4v.js → use-main-panel-tabs-CRM1n__j.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-B2OMY_Tu.js → use-mcp-auth-status-C-7pHlxN.js} +1 -1
- package/dist/client/assets/{use-mcp-client-D_jTz-1i.js → use-mcp-client-CAI0PiRc.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-CFPSpaeI.js → use-mcp-prompts-DqQEh2Qr.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BMGCtRJK.js → use-mcp-tools-DTs06gsh.js} +1 -1
- package/dist/client/assets/{use-mobile-M7B5YJR_.js → use-mobile-DlyIeamj.js} +1 -1
- package/dist/client/assets/{use-move-blocks-B5DoaBOm.js → use-move-blocks-CfkVWpoJ.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-BoWId4qC.js → use-navigate-to-agent-rf_XQPo1.js} +1 -1
- package/dist/client/assets/{use-never-published-8p9ySrBa.js → use-never-published-DP-ayb_U.js} +1 -1
- package/dist/client/assets/{use-org-fs-Dpr5-hHp.js → use-org-fs-DzWj7Jta.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-DOKrzBXU.js → use-org-repo-syncs-0oF8-eI-.js} +1 -1
- package/dist/client/assets/{use-org-sso-zsNytoCe.js → use-org-sso-Bz3FXaUK.js} +1 -1
- package/dist/client/assets/{use-organization-settings-CIEI8bNF.js → use-organization-settings-04SG-hKv.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-tu_PxC_K.js → use-project-native-view-presence-C642E_7q.js} +1 -1
- package/dist/client/assets/{use-project-scope-D1EeIJG0.js → use-project-scope-BTU4ukSL.js} +1 -1
- package/dist/client/assets/{use-recent-apps-DSYeKmJU.js → use-recent-apps-Bh-9Swg8.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-ChnnkK6V.js → use-reports-diagnostic-C6P63hrA.js} +1 -1
- package/dist/client/assets/{use-sandbox-events-bxyyBbR-.js → use-sandbox-events-BgsP-jl-.js} +1 -1
- package/dist/client/assets/{use-secrets-NY7H3OwI.js → use-secrets-CL1K9zBu.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-Beu0iQz9.js → use-section-preview-base-DiLHxC8Z.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-D0GS7hdN.js → use-sidebar-collapsed-D-c-hbM9.js} +1 -1
- package/dist/client/assets/{use-tags-NAzrZ60o.js → use-tags-0c8J6MeW.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-DdzuizDS.js → use-task-board-analytics-Bp8Wbi_t.js} +1 -1
- package/dist/client/assets/{use-task-board-events-iA0mSg2Q.js → use-task-board-events-BC3zf7YM.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-Dw8_2urj.js → use-task-board-item-prs-BByRm2Es.js} +1 -1
- package/dist/client/assets/{use-task-board-items-DQYVvsFC.js → use-task-board-items-BhZCRvwX.js} +1 -1
- package/dist/client/assets/{use-task-board-prompts-DaZyR7M-.js → use-task-board-prompts-BRt0XfbY.js} +1 -1
- package/dist/client/assets/{use-task-metadata-c0FPnJ80.js → use-task-metadata-DK9jGytt.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-nmtU5Zq-.js → use-thread-outputs-DcXhIS9K.js} +1 -1
- package/dist/client/assets/{use-view-draft-kind-Cu0aFeKZ.js → use-view-draft-kind-By-WcYfU.js} +1 -1
- package/dist/client/assets/{use-voice-input-DPQbRCzt.js → use-voice-input-Bt11fXlC.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-Cr6l3hRz.js +1 -0
- package/dist/client/assets/{useQueries-BncTnCJs.js → useQueries-tOLR6QE3.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BEaEPCKW.js +1 -0
- package/dist/client/assets/{users-DnLbGcVd.js → users-BW_rkyv3.js} +1 -1
- package/dist/client/assets/{utils-yu1cqe5g.js → utils-2an1bWl1.js} +1 -1
- package/dist/client/assets/{variant-calendar-B9yPwKNQ.js → variant-calendar-7xv9ohqO.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-DUz7pA6N.js → variant-matcher-override-CGi_ZY_N.js} +1 -1
- package/dist/client/assets/{view-header-DYVjdF9_.js → view-header-DkkNDHNd.js} +1 -1
- package/dist/client/assets/{virtual-mcp-B46xFMzN.js → virtual-mcp-D-PJ7-_0.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-Cgkbp7EA.js → watch-sse-pool-Gp1E8HHl.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/migrate.js +245 -245
- package/dist/server/server.js +749 -748
- package/package.json +1 -1
- package/dist/client/assets/UserSquare-CK-bjijW.js +0 -1
- package/dist/client/assets/agent-app-xUigIkK8.js +0 -1
- package/dist/client/assets/agent-deck-Cs__MOn_.js +0 -1
- package/dist/client/assets/agent-experiments-CR3rcuNZ.js +0 -1
- package/dist/client/assets/agent-hosting-C70MC-PA.js +0 -1
- package/dist/client/assets/agent-icon-bK3wLPrb.js +0 -1
- package/dist/client/assets/agent-library-CeznhRs4.js +0 -1
- package/dist/client/assets/agent-library-file-B-Sx2y3P.js +0 -1
- package/dist/client/assets/agent-overview-CFue46Ll.js +0 -1
- package/dist/client/assets/agent-settings-BljPRjiA.js +0 -1
- package/dist/client/assets/agent-site-editor-code-BAiYvGFH.js +0 -2
- package/dist/client/assets/agent-site-editor-content-Bl3XwQ5q.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-Cys48HaE.js +0 -1
- package/dist/client/assets/agent-view-DlR04ups.js +0 -1
- package/dist/client/assets/api-keys-BYU6jhvq.js +0 -1
- package/dist/client/assets/library-DmRa8bBp.js +0 -1
- package/dist/client/assets/plan-9F8q1LmB.js +0 -1
- package/dist/client/assets/project-reports-CidF3Xyg.js +0 -1
- package/dist/client/assets/project-tasks-BYy46ISP.js +0 -1
- package/dist/client/assets/reports-DtEFVn9D.js +0 -1
- package/dist/client/assets/repositories-YEhOcvb2.js +0 -1
- package/dist/client/assets/review-settings-DhlyLgn0.js +0 -1
- package/dist/client/assets/route-tQ0sT4aI.js +0 -1
- package/dist/client/assets/settings-tab-DPVLqmJT.js +0 -1
- package/dist/client/assets/site-editor-D71enwO7.js +0 -1
- package/dist/client/assets/site-editor-toast-CAmfWZOg.js +0 -1
- package/dist/client/assets/tasks-DHWz5CTo.js +0 -1
- package/dist/client/assets/use-ask-in-chat-BkWoc5AG.js +0 -1
- package/dist/client/assets/use-blocks-v8-project-B4vRqcEf.js +0 -1
- package/dist/client/assets/useInfiniteQuery-CfdlXnOy.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-QQvh5ycV.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{N as P,q as De,c as k,R as Ie,r as Pe,t as se,v as E,w as Oe,T as H,x as je,y as M,z as L,A as ve,D as Q,B as Z,C as Fe,G as _e,H as Ve,I as Ke,J as q,f as Xe}from"./usage-stats-FTjlrZsR.js";const qe=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,Ue=P.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{},resize:!1}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:e}){return["img",k(this.options.HTMLAttributes,e)]},parseMarkdown:(e,t)=>t.createNode("image",{src:e.href,title:e.title,alt:e.text}),renderMarkdown:e=>{var t,n,o,l,r,s;const c=(t=(n=e.attrs)===null||n===void 0?void 0:n.src)!==null&&t!==void 0?t:"",i=(o=(l=e.attrs)===null||l===void 0?void 0:l.alt)!==null&&o!==void 0?o:"",a=(r=(s=e.attrs)===null||s===void 0?void 0:s.title)!==null&&r!==void 0?r:"";return a?``:``},addNodeView(){if(!this.options.resize||!this.options.resize.enabled||typeof document>"u")return null;const{directions:e,minWidth:t,minHeight:n,alwaysPreserveAspectRatio:o}=this.options.resize,l=new Set(["src","width","height"]);return({node:r,getPos:s,HTMLAttributes:c,editor:i})=>{const a=document.createElement("img");a.draggable=!1;const d=k(this.options.HTMLAttributes,c);Object.entries(d).forEach(([w,S])=>{if(S!=null)switch(w){case"src":case"width":case"height":break;default:a.setAttribute(w,S)}}),d.src!==null&&(a.src=d.src);let u={...c};const f=w=>{if(typeof w=="string"&&w!==""){a.getAttribute("src")!==w&&(a.src=w);return}a.hasAttribute("src")&&a.removeAttribute("src"),a.src!==""&&(a.src="")};f(c.src);const p=w=>{if(w.type!==r.type)return!1;const S=i.extensionManager.attributes.filter(A=>A.type===w.type.name),y=Pe(w,S);return Object.keys(u).forEach(A=>{!l.has(A)&&!(A in y)&&a.removeAttribute(A)}),Object.entries(y).forEach(([A,R])=>{l.has(A)||(R!=null?a.setAttribute(A,R):a.removeAttribute(A))}),f(y.src),u=y,!0},h=new Ie({element:a,editor:i,node:r,getPos:s,onResize:(w,S)=>{a.style.width=`${w}px`,a.style.height=`${S}px`},onCommit:(w,S)=>{const y=s();y!==void 0&&this.editor.chain().setNodeSelection(y).updateAttributes(this.name,{width:w,height:S}).run()},onUpdate:p,options:{directions:e,min:{width:t,height:n},preserveAspectRatio:o===!0}}),g=h.dom,m=()=>{g.style.visibility="",g.style.pointerEvents=""};return g.style.visibility="hidden",g.style.pointerEvents="none",a.complete&&a.naturalWidth>0?m():(a.onload=m,a.onerror=m),h}},addCommands(){return{setImage:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}},addInputRules(){return[De({find:qe,type:this.type,getAttributes:e=>{const[,,t,n,o]=e;return{src:n,alt:t,title:o}}})]}});var un=Ue;let ee,te;if(typeof WeakMap<"u"){let e=new WeakMap;ee=t=>e.get(t),te=(t,n)=>(e.set(t,n),n)}else{const e=[];let n=0;ee=o=>{for(let l=0;l<e.length;l+=2)if(e[l]==o)return e[l+1]},te=(o,l)=>(n==10&&(n=0),e[n++]=o,e[n++]=l)}var C=class{constructor(e,t,n,o){this.width=e,this.height=t,this.map=n,this.problems=o}findCell(e){for(let t=0;t<this.map.length;t++){const n=this.map[t];if(n!=e)continue;const o=t%this.width,l=t/this.width|0;let r=o+1,s=l+1;for(let c=1;r<this.width&&this.map[t+c]==n;c++)r++;for(let c=1;s<this.height&&this.map[t+this.width*c]==n;c++)s++;return{left:o,top:l,right:r,bottom:s}}throw new RangeError(`No cell with offset ${e} found`)}colCount(e){for(let t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw new RangeError(`No cell with offset ${e} found`)}nextCell(e,t,n){const{left:o,right:l,top:r,bottom:s}=this.findCell(e);return t=="horiz"?(n<0?o==0:l==this.width)?null:this.map[r*this.width+(n<0?o-1:l)]:(n<0?r==0:s==this.height)?null:this.map[o+this.width*(n<0?r-1:s)]}rectBetween(e,t){const{left:n,right:o,top:l,bottom:r}=this.findCell(e),{left:s,right:c,top:i,bottom:a}=this.findCell(t);return{left:Math.min(n,s),top:Math.min(l,i),right:Math.max(o,c),bottom:Math.max(r,a)}}cellsInRect(e){const t=[],n={};for(let o=e.top;o<e.bottom;o++)for(let l=e.left;l<e.right;l++){const r=o*this.width+l,s=this.map[r];n[s]||(n[s]=!0,!(l==e.left&&l&&this.map[r-1]==s||o==e.top&&o&&this.map[r-this.width]==s)&&t.push(s))}return t}positionAt(e,t,n){for(let o=0,l=0;;o++){const r=l+n.child(o).nodeSize;if(o==e){let s=t+e*this.width;const c=(e+1)*this.width;for(;s<c&&this.map[s]<l;)s++;return s==c?r-1:this.map[s]}l=r}}static get(e){return ee(e)||te(e,Je(e))}};function Je(e){if(e.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+e.type.name);const t=Ge(e),n=e.childCount,o=[];let l=0,r=null;const s=[];for(let a=0,d=t*n;a<d;a++)o[a]=0;for(let a=0,d=0;a<n;a++){const u=e.child(a);d++;for(let h=0;;h++){for(;l<o.length&&o[l]!=0;)l++;if(h==u.childCount)break;const g=u.child(h),{colspan:m,rowspan:w,colwidth:S}=g.attrs;for(let y=0;y<w;y++){if(y+a>=n){(r||(r=[])).push({type:"overlong_rowspan",pos:d,n:w-y});break}const A=l+y*t;for(let R=0;R<m;R++){o[A+R]==0?o[A+R]=d:(r||(r=[])).push({type:"collision",row:a,pos:d,n:m-R});const O=S&&S[R];if(O){const D=(A+R)%t*2,G=s[D];G==null||G!=O&&s[D+1]==1?(s[D]=O,s[D+1]=1):G==O&&s[D+1]++}}}l+=m,d+=g.nodeSize}const f=(a+1)*t;let p=0;for(;l<f;)o[l++]==0&&p++;p&&(r||(r=[])).push({type:"missing",row:a,n:p}),d++}(t===0||n===0)&&(r||(r=[])).push({type:"zero_sized"});const c=new C(t,n,o,r);let i=!1;for(let a=0;!i&&a<s.length;a+=2)s[a]!=null&&s[a+1]<n&&(i=!0);return i&&Ye(c,s,e),c}function Ge(e){let t=-1,n=!1;for(let o=0;o<e.childCount;o++){const l=e.child(o);let r=0;if(n)for(let s=0;s<o;s++){const c=e.child(s);for(let i=0;i<c.childCount;i++){const a=c.child(i);s+a.attrs.rowspan>o&&(r+=a.attrs.colspan)}}for(let s=0;s<l.childCount;s++){const c=l.child(s);r+=c.attrs.colspan,c.attrs.rowspan>1&&(n=!0)}t==-1?t=r:t!=r&&(t=Math.max(t,r))}return t}function Ye(e,t,n){e.problems||(e.problems=[]);const o={};for(let l=0;l<e.map.length;l++){const r=e.map[l];if(o[r])continue;o[r]=!0;const s=n.nodeAt(r);if(!s)throw new RangeError(`No cell with offset ${r} found`);let c=null;const i=s.attrs;for(let a=0;a<i.colspan;a++){const d=t[(l+a)%e.width*2];d!=null&&(!i.colwidth||i.colwidth[a]!=d)&&((c||(c=Qe(i)))[a]=d)}c&&e.problems.unshift({type:"colwidth mismatch",pos:r,colwidth:c})}}function Qe(e){if(e.colwidth)return e.colwidth.slice();const t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}function v(e){let t=e.cached.tableNodeTypes;if(!t){t=e.cached.tableNodeTypes={};for(const n in e.nodes){const o=e.nodes[n],l=o.spec.tableRole;l&&(t[l]=o)}}return t}const $=new se("selectingCells");function W(e){for(let t=e.depth-1;t>0;t--)if(e.node(t).type.spec.tableRole=="row")return e.node(0).resolve(e.before(t+1));return null}function Ze(e){for(let t=e.depth;t>0;t--){const n=e.node(t).type.spec.tableRole;if(n==="cell"||n==="header_cell")return e.node(t)}return null}function T(e){const t=e.selection.$head;for(let n=t.depth;n>0;n--)if(t.node(n).type.spec.tableRole=="row")return!0;return!1}function J(e){const t=e.selection;if("$anchorCell"in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if("node"in t&&t.node&&t.node.type.spec.tableRole=="cell")return t.$anchor;const n=W(t.$head)||et(t.$head);if(n)return n;throw new RangeError(`No cell found around position ${t.head}`)}function et(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){const o=t.type.spec.tableRole;if(o=="cell"||o=="header_cell")return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){const o=t.type.spec.tableRole;if(o=="cell"||o=="header_cell")return e.doc.resolve(n-t.nodeSize)}}function ne(e){return e.parent.type.spec.tableRole=="row"&&!!e.nodeAfter}function tt(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function ie(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function Re(e,t,n){const o=e.node(-1),l=C.get(o),r=e.start(-1),s=l.nextCell(e.pos-r,t,n);return s==null?null:e.node(0).resolve(r+s)}function B(e,t,n=1){const o={...e,colspan:e.colspan-n};return o.colwidth&&(o.colwidth=o.colwidth.slice(),o.colwidth.splice(t,n),o.colwidth.some(l=>l>0)||(o.colwidth=null)),o}function xe(e,t,n=1){const o={...e,colspan:e.colspan+n};if(o.colwidth){o.colwidth=o.colwidth.slice();for(let l=0;l<n;l++)o.colwidth.splice(t,0,0)}return o}function nt(e,t,n){const o=v(t.type.schema).header_cell;for(let l=0;l<e.height;l++)if(t.nodeAt(e.map[n+l*e.width]).type!=o)return!1;return!0}var b=class N extends E{constructor(t,n=t){const o=t.node(-1),l=C.get(o),r=t.start(-1),s=l.rectBetween(t.pos-r,n.pos-r),c=t.node(0),i=l.cellsInRect(s).filter(d=>d!=n.pos-r);i.unshift(n.pos-r);const a=i.map(d=>{const u=o.nodeAt(d);if(!u)throw new RangeError(`No cell with offset ${d} found`);const f=r+d+1;return new je(c.resolve(f),c.resolve(f+u.content.size))});super(a[0].$from,a[0].$to,a),this.$anchorCell=t,this.$headCell=n}map(t,n){const o=t.resolve(n.map(this.$anchorCell.pos)),l=t.resolve(n.map(this.$headCell.pos));if(ne(o)&&ne(l)&&ie(o,l)){const r=this.$anchorCell.node(-1)!=o.node(-1);return r&&this.isRowSelection()?N.rowSelection(o,l):r&&this.isColSelection()?N.colSelection(o,l):new N(o,l)}return H.between(o,l)}content(){const t=this.$anchorCell.node(-1),n=C.get(t),o=this.$anchorCell.start(-1),l=n.rectBetween(this.$anchorCell.pos-o,this.$headCell.pos-o),r={},s=[];for(let i=l.top;i<l.bottom;i++){const a=[];for(let d=i*n.width+l.left,u=l.left;u<l.right;u++,d++){const f=n.map[d];if(r[f])continue;r[f]=!0;const p=n.findCell(f);let h=t.nodeAt(f);if(!h)throw new RangeError(`No cell with offset ${f} found`);const g=l.left-p.left,m=p.right-l.right;if(g>0||m>0){let w=h.attrs;if(g>0&&(w=B(w,0,g)),m>0&&(w=B(w,w.colspan-m,m)),p.left<l.left){if(h=h.type.createAndFill(w),!h)throw new RangeError(`Could not create cell with attrs ${JSON.stringify(w)}`)}else h=h.type.create(w,h.content)}if(p.top<l.top||p.bottom>l.bottom){const w={...h.attrs,rowspan:Math.min(p.bottom,l.bottom)-Math.max(p.top,l.top)};p.top<l.top?h=h.type.createAndFill(w):h=h.type.create(w,h.content)}a.push(h)}s.push(t.child(i).copy(M.from(a)))}const c=this.isColSelection()&&this.isRowSelection()?t:s;return new L(M.from(c),1,1)}replace(t,n=L.empty){const o=t.steps.length,l=this.ranges;for(let s=0;s<l.length;s++){const{$from:c,$to:i}=l[s],a=t.mapping.slice(o);t.replace(a.map(c.pos),a.map(i.pos),s?L.empty:n)}const r=E.findFrom(t.doc.resolve(t.mapping.slice(o).map(this.to)),-1);r&&t.setSelection(r)}replaceWith(t,n){this.replace(t,new L(M.from(n),0,0))}forEachCell(t){const n=this.$anchorCell.node(-1),o=C.get(n),l=this.$anchorCell.start(-1),r=o.cellsInRect(o.rectBetween(this.$anchorCell.pos-l,this.$headCell.pos-l));for(let s=0;s<r.length;s++)t(n.nodeAt(r[s]),l+r[s])}isColSelection(){const t=this.$anchorCell.index(-1),n=this.$headCell.index(-1);if(Math.min(t,n)>0)return!1;const o=t+this.$anchorCell.nodeAfter.attrs.rowspan,l=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(o,l)==this.$headCell.node(-1).childCount}static colSelection(t,n=t){const o=t.node(-1),l=C.get(o),r=t.start(-1),s=l.findCell(t.pos-r),c=l.findCell(n.pos-r),i=t.node(0);return s.top<=c.top?(s.top>0&&(t=i.resolve(r+l.map[s.left])),c.bottom<l.height&&(n=i.resolve(r+l.map[l.width*(l.height-1)+c.right-1]))):(c.top>0&&(n=i.resolve(r+l.map[c.left])),s.bottom<l.height&&(t=i.resolve(r+l.map[l.width*(l.height-1)+s.right-1]))),new N(t,n)}isRowSelection(){const t=this.$anchorCell.node(-1),n=C.get(t),o=this.$anchorCell.start(-1),l=n.colCount(this.$anchorCell.pos-o),r=n.colCount(this.$headCell.pos-o);if(Math.min(l,r)>0)return!1;const s=l+this.$anchorCell.nodeAfter.attrs.colspan,c=r+this.$headCell.nodeAfter.attrs.colspan;return Math.max(s,c)==n.width}eq(t){return t instanceof N&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,n=t){const o=t.node(-1),l=C.get(o),r=t.start(-1),s=l.findCell(t.pos-r),c=l.findCell(n.pos-r),i=t.node(0);return s.left<=c.left?(s.left>0&&(t=i.resolve(r+l.map[s.top*l.width])),c.right<l.width&&(n=i.resolve(r+l.map[l.width*(c.top+1)-1]))):(c.left>0&&(n=i.resolve(r+l.map[c.top*l.width])),s.right<l.width&&(t=i.resolve(r+l.map[l.width*(s.top+1)-1]))),new N(t,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(t,n){return new N(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,o=n){return new N(t.resolve(n),t.resolve(o))}getBookmark(){return new ot(this.$anchorCell.pos,this.$headCell.pos)}};b.prototype.visible=!1;E.jsonID("cell",b);var ot=class Te{constructor(t,n){this.anchor=t,this.head=n}map(t){return new Te(t.map(this.anchor),t.map(this.head))}resolve(t){const n=t.resolve(this.anchor),o=t.resolve(this.head);return n.parent.type.spec.tableRole=="row"&&o.parent.type.spec.tableRole=="row"&&n.index()<n.parent.childCount&&o.index()<o.parent.childCount&&ie(n,o)?new b(n,o):E.near(o,1)}};function lt(e){if(!(e.selection instanceof b))return null;const t=[];return e.selection.forEachCell((n,o)=>{t.push(Z.node(o,o+n.nodeSize,{class:"selectedCell"}))}),Q.create(e.doc,t)}function rt({$from:e,$to:t}){if(e.pos==t.pos||e.pos<t.pos-6)return!1;let n=e.pos,o=t.pos,l=e.depth;for(;l>=0&&!(e.after(l+1)<e.end(l));l--,n++);for(let r=t.depth;r>=0&&!(t.before(r+1)>t.start(r));r--,o--);return n==o&&/row|table/.test(e.node(l).type.spec.tableRole)}function st({$from:e,$to:t}){let n,o;for(let l=e.depth;l>0;l--){const r=e.node(l);if(r.type.spec.tableRole==="cell"||r.type.spec.tableRole==="header_cell"){n=r;break}}for(let l=t.depth;l>0;l--){const r=t.node(l);if(r.type.spec.tableRole==="cell"||r.type.spec.tableRole==="header_cell"){o=r;break}}return n!==o&&t.parentOffset===0}function it(e,t,n){const o=(t||e).selection,l=(t||e).doc;let r,s;if(o instanceof Fe&&(s=o.node.type.spec.tableRole)){if(s=="cell"||s=="header_cell")r=b.create(l,o.from);else if(s=="row"){const c=l.resolve(o.from+1);r=b.rowSelection(c,c)}else if(!n){const c=C.get(o.node),i=o.from+1,a=i+c.map[c.width*c.height-1];r=b.create(l,i+1,a)}}else o instanceof H&&rt(o)?r=H.create(l,o.from):o instanceof H&&st(o)&&(r=H.create(l,o.$from.start(),o.$from.end()));return r&&(t||(t=e.tr)).setSelection(r),t}const ct=new se("fix-tables");function Me(e,t,n,o){const l=e.childCount,r=t.childCount;e:for(let s=0,c=0;s<r;s++){const i=t.child(s);for(let a=c,d=Math.min(l,s+3);a<d;a++)if(e.child(a)==i){c=a+1,n+=i.nodeSize;continue e}o(i,n),c<l&&e.child(c).sameMarkup(i)?Me(e.child(c),i,n+1,o):i.nodesBetween(0,i.content.size,o,n+1),n+=i.nodeSize}}function ze(e,t){let n;const o=(l,r)=>{l.type.spec.tableRole=="table"&&(n=at(e,l,r,n))};return t?t.doc!=e.doc&&Me(t.doc,e.doc,0,o):e.doc.descendants(o),n}function at(e,t,n,o){const l=C.get(t);if(!l.problems)return o;o||(o=e.tr);const r=[];for(let i=0;i<l.height;i++)r.push(0);for(let i=0;i<l.problems.length;i++){const a=l.problems[i];if(a.type=="collision"){const d=t.nodeAt(a.pos);if(!d)continue;const u=d.attrs;for(let f=0;f<u.rowspan;f++)r[a.row+f]+=a.n;o.setNodeMarkup(o.mapping.map(n+1+a.pos),null,B(u,u.colspan-a.n,a.n))}else if(a.type=="missing")r[a.row]+=a.n;else if(a.type=="overlong_rowspan"){const d=t.nodeAt(a.pos);if(!d)continue;o.setNodeMarkup(o.mapping.map(n+1+a.pos),null,{...d.attrs,rowspan:d.attrs.rowspan-a.n})}else if(a.type=="colwidth mismatch"){const d=t.nodeAt(a.pos);if(!d)continue;o.setNodeMarkup(o.mapping.map(n+1+a.pos),null,{...d.attrs,colwidth:a.colwidth})}else if(a.type=="zero_sized"){const d=o.mapping.map(n);o.delete(d,d+t.nodeSize)}}let s,c;for(let i=0;i<r.length;i++)r[i]&&(s==null&&(s=i),c=i);for(let i=0,a=n+1;i<l.height;i++){const d=t.child(i),u=a+d.nodeSize,f=r[i];if(f>0){let p="cell";d.firstChild&&(p=d.firstChild.type.spec.tableRole);const h=[];for(let m=0;m<f;m++){const w=v(e.schema)[p].createAndFill();w&&h.push(w)}const g=(i==0||s==i-1)&&c==i?a+1:u-1;o.insert(o.mapping.map(g),h)}a=u}return o.setMeta(ct,{fixTables:!0})}function z(e){const t=e.selection,n=J(e),o=n.node(-1),l=n.start(-1),r=C.get(o);return{...t instanceof b?r.rectBetween(t.$anchorCell.pos-l,t.$headCell.pos-l):r.findCell(n.pos-l),tableStart:l,map:r,table:o}}function Ne(e,{map:t,tableStart:n,table:o},l){let r=l>0?-1:0;nt(t,o,l+r)&&(r=l==0||l==t.width?null:0);for(let s=0;s<t.height;s++){const c=s*t.width+l;if(l>0&&l<t.width&&t.map[c-1]==t.map[c]){const i=t.map[c],a=o.nodeAt(i);e.setNodeMarkup(e.mapping.map(n+i),null,xe(a.attrs,l-t.colCount(i))),s+=a.attrs.rowspan-1}else{const i=r==null?v(o.type.schema).cell:o.nodeAt(t.map[c+r]).type,a=t.positionAt(s,l,o);e.insert(e.mapping.map(n+a),i.createAndFill())}}return e}function dt(e,t){if(!T(e))return!1;if(t){const n=z(e);t(Ne(e.tr,n,n.left))}return!0}function ut(e,t){if(!T(e))return!1;if(t){const n=z(e);t(Ne(e.tr,n,n.right))}return!0}function ft(e,{map:t,table:n,tableStart:o},l){const r=e.mapping.maps.length;for(let s=0;s<t.height;){const c=s*t.width+l,i=t.map[c],a=n.nodeAt(i),d=a.attrs;if(l>0&&t.map[c-1]==i||l<t.width-1&&t.map[c+1]==i)e.setNodeMarkup(e.mapping.slice(r).map(o+i),null,B(d,l-t.colCount(i)));else{const u=e.mapping.slice(r).map(o+i);e.delete(u,u+a.nodeSize)}s+=d.rowspan}}function ht(e,t){if(!T(e))return!1;if(t){const n=z(e),o=e.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let l=n.right-1;ft(o,n,l),l!=n.left;l--){const r=n.tableStart?o.doc.nodeAt(n.tableStart-1):o.doc;if(!r)throw new RangeError("No table found");n.table=r,n.map=C.get(r)}t(o)}return!0}function pt(e,t,n){var o;const l=v(t.type.schema).header_cell;for(let r=0;r<e.width;r++)if(((o=t.nodeAt(e.map[r+n*e.width]))===null||o===void 0?void 0:o.type)!=l)return!1;return!0}function Ee(e,{map:t,tableStart:n,table:o},l){let r=n;for(let a=0;a<l;a++)r+=o.child(a).nodeSize;const s=[];let c=l>0?-1:0;pt(t,o,l+c)&&(c=l==0||l==t.height?null:0);for(let a=0,d=t.width*l;a<t.width;a++,d++)if(l>0&&l<t.height&&t.map[d]==t.map[d-t.width]){const u=t.map[d],f=o.nodeAt(u).attrs;e.setNodeMarkup(n+u,null,{...f,rowspan:f.rowspan+1}),a+=f.colspan-1}else{var i;const u=c==null?v(o.type.schema).cell:(i=o.nodeAt(t.map[d+c*t.width]))===null||i===void 0?void 0:i.type,f=u?.createAndFill();f&&s.push(f)}return e.insert(r,v(o.type.schema).row.create(null,s)),e}function mt(e,t){if(!T(e))return!1;if(t){const n=z(e);t(Ee(e.tr,n,n.top))}return!0}function gt(e,t){if(!T(e))return!1;if(t){const n=z(e);t(Ee(e.tr,n,n.bottom))}return!0}function wt(e,{map:t,table:n,tableStart:o},l){let r=0;for(let a=0;a<l;a++)r+=n.child(a).nodeSize;const s=r+n.child(l).nodeSize,c=e.mapping.maps.length;e.delete(r+o,s+o);const i=new Set;for(let a=0,d=l*t.width;a<t.width;a++,d++){const u=t.map[d];if(!i.has(u)){if(i.add(u),l>0&&u==t.map[d-t.width]){const f=n.nodeAt(u).attrs;e.setNodeMarkup(e.mapping.slice(c).map(u+o),null,{...f,rowspan:f.rowspan-1}),a+=f.colspan-1}else if(l<t.height&&u==t.map[d+t.width]){const f=n.nodeAt(u),p=f.attrs,h=f.type.create({...p,rowspan:f.attrs.rowspan-1},f.content),g=t.positionAt(l+1,a,n);e.insert(e.mapping.slice(c).map(o+g),h),a+=p.colspan-1}}}}function bt(e,t){if(!T(e))return!1;if(t){const n=z(e),o=e.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let l=n.bottom-1;wt(o,n,l),l!=n.top;l--){const r=n.tableStart?o.doc.nodeAt(n.tableStart-1):o.doc;if(!r)throw new RangeError("No table found");n.table=r,n.map=C.get(n.table)}t(o)}return!0}function ce(e){const t=e.content;return t.childCount==1&&t.child(0).isTextblock&&t.child(0).childCount==0}function Ct({width:e,height:t,map:n},o){let l=o.top*e+o.left,r=l,s=(o.bottom-1)*e+o.left,c=l+(o.right-o.left-1);for(let i=o.top;i<o.bottom;i++){if(o.left>0&&n[r]==n[r-1]||o.right<e&&n[c]==n[c+1])return!0;r+=e,c+=e}for(let i=o.left;i<o.right;i++){if(o.top>0&&n[l]==n[l-e]||o.bottom<t&&n[s]==n[s+e])return!0;l++,s++}return!1}function ae(e,t){const n=e.selection;if(!(n instanceof b)||n.$anchorCell.pos==n.$headCell.pos)return!1;const o=z(e),{map:l}=o;if(Ct(l,o))return!1;if(t){const r=e.tr,s={};let c=M.empty,i,a;for(let d=o.top;d<o.bottom;d++)for(let u=o.left;u<o.right;u++){const f=l.map[d*l.width+u],p=o.table.nodeAt(f);if(!(s[f]||!p))if(s[f]=!0,i==null)i=f,a=p;else{ce(p)||(c=c.append(p.content));const h=r.mapping.map(f+o.tableStart);r.delete(h,h+p.nodeSize)}}if(i==null||a==null)return!0;if(r.setNodeMarkup(i+o.tableStart,null,{...xe(a.attrs,a.attrs.colspan,o.right-o.left-a.attrs.colspan),rowspan:o.bottom-o.top}),c.size>0){const d=i+1+a.content.size,u=ce(a)?i+1:d;r.replaceWith(u+o.tableStart,d+o.tableStart,c)}r.setSelection(new b(r.doc.resolve(i+o.tableStart))),t(r)}return!0}function de(e,t){const n=v(e.schema);return yt(({node:o})=>n[o.type.spec.tableRole])(e,t)}function yt(e){return(t,n)=>{const o=t.selection;let l,r;if(o instanceof b){if(o.$anchorCell.pos!=o.$headCell.pos)return!1;l=o.$anchorCell.nodeAfter,r=o.$anchorCell.pos}else{var s;if(l=Ze(o.$from),!l)return!1;r=(s=W(o.$from))===null||s===void 0?void 0:s.pos}if(l==null||r==null||l.attrs.colspan==1&&l.attrs.rowspan==1)return!1;if(n){let c=l.attrs;const i=[],a=c.colwidth;c.rowspan>1&&(c={...c,rowspan:1}),c.colspan>1&&(c={...c,colspan:1});const d=z(t),u=t.tr;for(let p=0;p<d.right-d.left;p++)i.push(a?{...c,colwidth:a&&a[p]?[a[p]]:null}:c);let f;for(let p=d.top;p<d.bottom;p++){let h=d.map.positionAt(p,d.left,d.table);p==d.top&&(h+=l.nodeSize);for(let g=d.left,m=0;g<d.right;g++,m++)g==d.left&&p==d.top||u.insert(f=u.mapping.map(h+d.tableStart,1),e({node:l,row:p,col:g}).createAndFill(i[m]))}u.setNodeMarkup(r,e({node:l,row:d.top,col:d.left}),i[0]),o instanceof b&&u.setSelection(new b(u.doc.resolve(o.$anchorCell.pos),f?u.doc.resolve(f):void 0)),n(u)}return!0}}function At(e,t){return function(n,o){if(!T(n))return!1;const l=J(n);if(l.nodeAfter.attrs[e]===t)return!1;if(o){const r=n.tr;n.selection instanceof b?n.selection.forEachCell((s,c)=>{s.attrs[e]!==t&&r.setNodeMarkup(c,null,{...s.attrs,[e]:t})}):r.setNodeMarkup(l.pos,null,{...l.nodeAfter.attrs,[e]:t}),o(r)}return!0}}function St(e){return function(t,n){if(!T(t))return!1;if(n){const o=v(t.schema),l=z(t),r=t.tr,s=l.map.cellsInRect(e=="column"?{left:l.left,top:0,right:l.right,bottom:l.map.height}:e=="row"?{left:0,top:l.top,right:l.map.width,bottom:l.bottom}:l),c=s.map(i=>l.table.nodeAt(i));for(let i=0;i<s.length;i++)c[i].type==o.header_cell&&r.setNodeMarkup(l.tableStart+s[i],o.cell,c[i].attrs);if(r.steps.length===0)for(let i=0;i<s.length;i++)r.setNodeMarkup(l.tableStart+s[i],o.header_cell,c[i].attrs);n(r)}return!0}}function ue(e,t,n){const o=t.map.cellsInRect({left:0,top:0,right:e=="row"?t.map.width:1,bottom:e=="column"?t.map.height:1});for(let l=0;l<o.length;l++){const r=t.table.nodeAt(o[l]);if(r&&r.type!==n.header_cell)return!1}return!0}function I(e,t){return t=t||{useDeprecatedLogic:!1},t.useDeprecatedLogic?St(e):function(n,o){if(!T(n))return!1;if(o){const l=v(n.schema),r=z(n),s=n.tr,c=ue("row",r,l),i=ue("column",r,l),a=(e==="column"?c:e==="row"&&i)?1:0,d=e=="column"?{left:0,top:a,right:1,bottom:r.map.height}:e=="row"?{left:a,top:0,right:r.map.width,bottom:1}:r,u=e=="column"?i?l.cell:l.header_cell:e=="row"?c?l.cell:l.header_cell:l.cell;r.map.cellsInRect(d).forEach(f=>{const p=f+r.tableStart,h=s.doc.nodeAt(p);h&&s.setNodeMarkup(p,u,h.attrs)}),o(s)}return!0}}I("row",{useDeprecatedLogic:!0});I("column",{useDeprecatedLogic:!0});const vt=I("cell",{useDeprecatedLogic:!0});function Rt(e,t){if(t<0){const n=e.nodeBefore;if(n)return e.pos-n.nodeSize;for(let o=e.index(-1)-1,l=e.before();o>=0;o--){const r=e.node(-1).child(o),s=r.lastChild;if(s)return l-1-s.nodeSize;l-=r.nodeSize}}else{if(e.index()<e.parent.childCount-1)return e.pos+e.nodeAfter.nodeSize;const n=e.node(-1);for(let o=e.indexAfter(-1),l=e.after();o<n.childCount;o++){const r=n.child(o);if(r.childCount)return l+1;l+=r.nodeSize}}return null}function fe(e){return function(t,n){if(!T(t))return!1;const o=Rt(J(t),e);if(o==null)return!1;if(n){const l=t.doc.resolve(o);n(t.tr.setSelection(H.between(l,tt(l))).scrollIntoView())}return!0}}function xt(e,t){const n=e.selection.$anchor;for(let o=n.depth;o>0;o--)if(n.node(o).type.spec.tableRole=="table")return t&&t(e.tr.delete(n.before(o),n.after(o)).scrollIntoView()),!0;return!1}function j(e,t){const n=e.selection;if(!(n instanceof b))return!1;if(t){const o=e.tr,l=v(e.schema).cell.createAndFill().content;n.forEachCell((r,s)=>{r.content.eq(l)||o.replace(o.mapping.map(s+1),o.mapping.map(s+r.nodeSize-1),new L(l,0,0))}),o.docChanged&&t(o)}return!0}function Tt(e){if(e.size===0)return null;let{content:t,openStart:n,openEnd:o}=e;for(;t.childCount==1&&(n>0&&o>0||t.child(0).type.spec.tableRole=="table");)n--,o--,t=t.child(0).content;const l=t.child(0),r=l.type.spec.tableRole,s=l.type.schema,c=[];if(r=="row")for(let i=0;i<t.childCount;i++){let a=t.child(i).content;const d=i?0:Math.max(0,n-1),u=i<t.childCount-1?0:Math.max(0,o-1);(d||u)&&(a=oe(v(s).row,new L(a,d,u)).content),c.push(a)}else if(r=="cell"||r=="header_cell")c.push(n||o?oe(v(s).row,new L(t,n,o)).content:t);else return null;return Mt(s,c)}function Mt(e,t){const n=[];for(let l=0;l<t.length;l++){const r=t[l];for(let s=r.childCount-1;s>=0;s--){const{rowspan:c,colspan:i}=r.child(s).attrs;for(let a=l;a<l+c;a++)n[a]=(n[a]||0)+i}}let o=0;for(let l=0;l<n.length;l++)o=Math.max(o,n[l]);for(let l=0;l<n.length;l++)if(l>=t.length&&t.push(M.empty),n[l]<o){const r=v(e).cell.createAndFill(),s=[];for(let c=n[l];c<o;c++)s.push(r);t[l]=t[l].append(M.from(s))}return{height:t.length,width:o,rows:t}}function oe(e,t){const n=e.createAndFill();return new _e(n).replace(0,n.content.size,t).doc}function zt({width:e,height:t,rows:n},o,l){if(e!=o){const r=[],s=[];for(let c=0;c<n.length;c++){const i=n[c],a=[];for(let d=r[c]||0,u=0;d<o;u++){let f=i.child(u%i.childCount);d+f.attrs.colspan>o&&(f=f.type.createChecked(B(f.attrs,f.attrs.colspan,d+f.attrs.colspan-o),f.content)),a.push(f),d+=f.attrs.colspan;for(let p=1;p<f.attrs.rowspan;p++)r[c+p]=(r[c+p]||0)+f.attrs.colspan}s.push(M.from(a))}n=s,e=o}if(t!=l){const r=[];for(let s=0,c=0;s<l;s++,c++){const i=[],a=n[c%t];for(let d=0;d<a.childCount;d++){let u=a.child(d);s+u.attrs.rowspan>l&&(u=u.type.create({...u.attrs,rowspan:Math.max(1,l-u.attrs.rowspan)},u.content)),i.push(u)}r.push(M.from(i))}n=r,t=l}return{width:e,height:t,rows:n}}function Nt(e,t,n,o,l,r,s){const c=e.doc.type.schema,i=v(c);let a,d;if(l>t.width)for(let u=0,f=0;u<t.height;u++){const p=n.child(u);f+=p.nodeSize;const h=[];let g;p.lastChild==null||p.lastChild.type==i.cell?g=a||(a=i.cell.createAndFill()):g=d||(d=i.header_cell.createAndFill());for(let m=t.width;m<l;m++)h.push(g);e.insert(e.mapping.slice(s).map(f-1+o),h)}if(r>t.height){const u=[];for(let h=0,g=(t.height-1)*t.width;h<Math.max(t.width,l);h++){const m=h>=t.width?!1:n.nodeAt(t.map[g+h]).type==i.header_cell;u.push(m?d||(d=i.header_cell.createAndFill()):a||(a=i.cell.createAndFill()))}const f=i.row.create(null,M.from(u)),p=[];for(let h=t.height;h<r;h++)p.push(f);e.insert(e.mapping.slice(s).map(o+n.nodeSize-2),p)}return!!(a||d)}function he(e,t,n,o,l,r,s,c){if(s==0||s==t.height)return!1;let i=!1;for(let a=l;a<r;a++){const d=s*t.width+a,u=t.map[d];if(t.map[d-t.width]==u){i=!0;const f=n.nodeAt(u),{top:p,left:h}=t.findCell(u);e.setNodeMarkup(e.mapping.slice(c).map(u+o),null,{...f.attrs,rowspan:s-p}),e.insert(e.mapping.slice(c).map(t.positionAt(s,h,n)),f.type.createAndFill({...f.attrs,rowspan:p+f.attrs.rowspan-s})),a+=f.attrs.colspan-1}}return i}function pe(e,t,n,o,l,r,s,c){if(s==0||s==t.width)return!1;let i=!1;for(let a=l;a<r;a++){const d=a*t.width+s,u=t.map[d];if(t.map[d-1]==u){i=!0;const f=n.nodeAt(u),p=t.colCount(u),h=e.mapping.slice(c).map(u+o);e.setNodeMarkup(h,null,B(f.attrs,s-p,f.attrs.colspan-(s-p))),e.insert(h+f.nodeSize,f.type.createAndFill(B(f.attrs,0,s-p))),a+=f.attrs.rowspan-1}}return i}function me(e,t,n,o,l){let r=n?e.doc.nodeAt(n-1):e.doc;if(!r)throw new Error("No table found");let s=C.get(r);const{top:c,left:i}=o,a=i+l.width,d=c+l.height,u=e.tr;let f=0;function p(){if(r=n?u.doc.nodeAt(n-1):u.doc,!r)throw new Error("No table found");s=C.get(r),f=u.mapping.maps.length}Nt(u,s,r,n,a,d,f)&&p(),he(u,s,r,n,i,a,c,f)&&p(),he(u,s,r,n,i,a,d,f)&&p(),pe(u,s,r,n,c,d,i,f)&&p(),pe(u,s,r,n,c,d,a,f)&&p();for(let h=c;h<d;h++){const g=s.positionAt(h,i,r),m=s.positionAt(h,a,r);u.replace(u.mapping.slice(f).map(g+n),u.mapping.slice(f).map(m+n),new L(l.rows[h-c],0,0))}p(),u.setSelection(new b(u.doc.resolve(n+s.positionAt(c,i,r)),u.doc.resolve(n+s.positionAt(d-1,a-1,r)))),t(u)}const Et=Oe({ArrowLeft:F("horiz",-1),ArrowRight:F("horiz",1),ArrowUp:F("vert",-1),ArrowDown:F("vert",1),"Shift-ArrowLeft":_("horiz",-1),"Shift-ArrowRight":_("horiz",1),"Shift-ArrowUp":_("vert",-1),"Shift-ArrowDown":_("vert",1),Backspace:j,"Mod-Backspace":j,Delete:j,"Mod-Delete":j});function K(e,t,n){return n.eq(e.selection)?!1:(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function F(e,t){return(n,o,l)=>{if(!l)return!1;const r=n.selection;if(r instanceof b)return K(n,o,E.near(r.$headCell,t));if(e!="horiz"&&!r.empty)return!1;const s=He(l,e,t);if(s==null)return!1;if(e=="horiz")return K(n,o,E.near(n.doc.resolve(r.head+t),t));{const c=n.doc.resolve(s),i=Re(c,e,t);let a;return i?a=E.near(i,1):t<0?a=E.near(n.doc.resolve(c.before(-1)),-1):a=E.near(n.doc.resolve(c.after(-1)),1),K(n,o,a)}}}function _(e,t){return(n,o,l)=>{if(!l)return!1;const r=n.selection;let s;if(r instanceof b)s=r;else{const i=He(l,e,t);if(i==null)return!1;s=new b(n.doc.resolve(i))}const c=Re(s.$headCell,e,t);return c?K(n,o,new b(s.$anchorCell,c)):!1}}function Ht(e,t){const n=e.state.doc,o=W(n.resolve(t));return o?(e.dispatch(e.state.tr.setSelection(new b(o))),!0):!1}function $t(e,t,n){if(!T(e.state))return!1;let o=Tt(n);const l=e.state.selection;if(l instanceof b){o||(o={width:1,height:1,rows:[M.from(oe(v(e.state.schema).cell,n))]});const r=l.$anchorCell.node(-1),s=l.$anchorCell.start(-1),c=C.get(r).rectBetween(l.$anchorCell.pos-s,l.$headCell.pos-s);return o=zt(o,c.right-c.left,c.bottom-c.top),me(e.state,e.dispatch,s,c,o),!0}else if(o){const r=J(e.state),s=r.start(-1);return me(e.state,e.dispatch,s,C.get(r.node(-1)).findCell(r.pos-s),o),!0}else return!1}function Lt(e,t){var n;if(t.button!=0||t.ctrlKey||t.metaKey)return;const o=ge(e,t.target);let l;if(t.shiftKey&&e.state.selection instanceof b)r(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&o&&(l=W(e.state.selection.$anchor))!=null&&((n=Y(e,t))===null||n===void 0?void 0:n.pos)!=l.pos)r(l,t),t.preventDefault();else if(!o)return;function r(i,a){let d=Y(e,a);const u=$.getState(e.state)==null;if(!d||!ie(i,d))if(u)d=i;else return;const f=new b(i,d);if(u||!e.state.selection.eq(f)){const p=e.state.tr.setSelection(f);u&&p.setMeta($,i.pos),e.dispatch(p)}}function s(){e.root.removeEventListener("mouseup",s),e.root.removeEventListener("dragstart",s),e.root.removeEventListener("mousemove",c),$.getState(e.state)!=null&&e.dispatch(e.state.tr.setMeta($,-1))}function c(i){const a=i,d=$.getState(e.state);let u;if(d!=null)u=e.state.doc.resolve(d);else if(ge(e,a.target)!=o&&(u=Y(e,t),!u))return s();u&&r(u,a)}e.root.addEventListener("mouseup",s),e.root.addEventListener("dragstart",s),e.root.addEventListener("mousemove",c)}function He(e,t,n){if(!(e.state.selection instanceof H))return null;const{$head:o}=e.state.selection;for(let l=o.depth-1;l>=0;l--){const r=o.node(l);if((n<0?o.index(l):o.indexAfter(l))!=(n<0?0:r.childCount))return null;if(r.type.spec.tableRole=="cell"||r.type.spec.tableRole=="header_cell"){const s=o.before(l),c=t=="vert"?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(c)?s:null}}return null}function ge(e,t){for(;t&&t!=e.dom;t=t.parentNode)if(t.nodeName=="TD"||t.nodeName=="TH")return t;return null}function Y(e,t){const n=e.posAtCoords({left:t.clientX,top:t.clientY});if(!n)return null;let{inside:o,pos:l}=n;return o>=0&&W(e.state.doc.resolve(o))||W(e.state.doc.resolve(l))}var kt=class{constructor(t,n){this.node=t,this.defaultCellMinWidth=n,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${n}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),le(t,this.colgroup,this.table,n),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(t){return t.type!=this.node.type?!1:(this.node=t,le(t,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(t){return t.type=="attributes"&&(t.target==this.table||this.colgroup.contains(t.target))}};function le(e,t,n,o,l,r){let s=0,c=!0,i=t.firstChild;const a=e.firstChild;if(a){for(let u=0,f=0;u<a.childCount;u++){const{colspan:p,colwidth:h}=a.child(u).attrs;for(let g=0;g<p;g++,f++){const m=l==f?r:h&&h[g],w=m?m+"px":"";if(s+=m||o,m||(c=!1),i)i.style.width!=w&&(i.style.width=w),i=i.nextSibling;else{const S=document.createElement("col");S.style.width=w,t.appendChild(S)}}}for(;i;){var d;const u=i.nextSibling;(d=i.parentNode)===null||d===void 0||d.removeChild(i),i=u}c?(n.style.width=s+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=s+"px")}}const x=new se("tableColumnResizing");function Wt({handleWidth:e=5,cellMinWidth:t=25,defaultCellMinWidth:n=100,View:o=kt,lastColumnResizable:l=!0}={}){const r=new ve({key:x,state:{init(s,c){var i;const a=(i=r.spec)===null||i===void 0||(i=i.props)===null||i===void 0?void 0:i.nodeViews,d=v(c.schema).table.name;return o&&a&&(a[d]=(u,f)=>new o(u,n,f)),new Bt(-1,!1)},apply(s,c){return c.apply(s)}},props:{attributes:s=>{const c=x.getState(s);return c&&c.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(s,c)=>{Dt(s,c,e,l)},mouseleave:s=>{It(s)},mousedown:(s,c)=>{Pt(s,c,t,n)}},decorations:s=>{const c=x.getState(s);if(c&&c.activeHandle>-1)return Vt(s,c.activeHandle)},nodeViews:{}}});return r}var Bt=class X{constructor(t,n){this.activeHandle=t,this.dragging=n}apply(t){const n=this,o=t.getMeta(x);if(o&&o.setHandle!=null)return new X(o.setHandle,!1);if(o&&o.setDragging!==void 0)return new X(n.activeHandle,o.setDragging);if(n.activeHandle>-1&&t.docChanged){let l=t.mapping.map(n.activeHandle,-1);return ne(t.doc.resolve(l))||(l=-1),new X(l,n.dragging)}return n}};function Dt(e,t,n,o){if(!e.editable)return;const l=x.getState(e.state);if(l&&!l.dragging){const r=jt(t.target);let s=-1;if(r){const{left:c,right:i}=r.getBoundingClientRect();t.clientX-c<=n?s=we(e,t,"left",n):i-t.clientX<=n&&(s=we(e,t,"right",n))}if(s!=l.activeHandle){if(!o&&s!==-1){const c=e.state.doc.resolve(s),i=c.node(-1),a=C.get(i),d=c.start(-1);if(a.colCount(c.pos-d)+c.nodeAfter.attrs.colspan-1==a.width-1)return}$e(e,s)}}}function It(e){if(!e.editable)return;const t=x.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&$e(e,-1)}function Pt(e,t,n,o){var l;if(!e.editable)return!1;const r=(l=e.dom.ownerDocument.defaultView)!==null&&l!==void 0?l:window,s=x.getState(e.state);if(!s||s.activeHandle==-1||s.dragging)return!1;const c=e.state.doc.nodeAt(s.activeHandle),i=Ot(e,s.activeHandle,c.attrs);e.dispatch(e.state.tr.setMeta(x,{setDragging:{startX:t.clientX,startWidth:i}}));function a(u){r.removeEventListener("mouseup",a),r.removeEventListener("mousemove",d);const f=x.getState(e.state);f?.dragging&&(Ft(e,f.activeHandle,be(f.dragging,u,n)),e.dispatch(e.state.tr.setMeta(x,{setDragging:null})))}function d(u){if(!u.which)return a(u);const f=x.getState(e.state);if(f&&f.dragging){const p=be(f.dragging,u,n);Ce(e,f.activeHandle,p,o)}}return Ce(e,s.activeHandle,i,o),r.addEventListener("mouseup",a),r.addEventListener("mousemove",d),t.preventDefault(),!0}function Ot(e,t,{colspan:n,colwidth:o}){const l=o&&o[o.length-1];if(l)return l;const r=e.domAtPos(t);let s=r.node.childNodes[r.offset].offsetWidth,c=n;if(o)for(let i=0;i<n;i++)o[i]&&(s-=o[i],c--);return s/c}function jt(e){for(;e&&e.nodeName!="TD"&&e.nodeName!="TH";)e=e.classList&&e.classList.contains("ProseMirror")?null:e.parentNode;return e}function we(e,t,n,o){const l=n=="right"?-o:o,r=e.posAtCoords({left:t.clientX+l,top:t.clientY});if(!r)return-1;const{pos:s}=r,c=W(e.state.doc.resolve(s));if(!c)return-1;if(n=="right")return c.pos;const i=C.get(c.node(-1)),a=c.start(-1),d=i.map.indexOf(c.pos-a);return d%i.width==0?-1:a+i.map[d-1]}function be(e,t,n){const o=t.clientX-e.startX;return Math.max(n,e.startWidth+o)}function $e(e,t){e.dispatch(e.state.tr.setMeta(x,{setHandle:t}))}function Ft(e,t,n){const o=e.state.doc.resolve(t),l=o.node(-1),r=C.get(l),s=o.start(-1),c=r.colCount(o.pos-s)+o.nodeAfter.attrs.colspan-1,i=e.state.tr;for(let a=0;a<r.height;a++){const d=a*r.width+c;if(a&&r.map[d]==r.map[d-r.width])continue;const u=r.map[d],f=l.nodeAt(u).attrs,p=f.colspan==1?0:c-r.colCount(u);if(f.colwidth&&f.colwidth[p]==n)continue;const h=f.colwidth?f.colwidth.slice():_t(f.colspan);h[p]=n,i.setNodeMarkup(s+u,null,{...f,colwidth:h})}i.docChanged&&e.dispatch(i)}function Ce(e,t,n,o){const l=e.state.doc.resolve(t),r=l.node(-1),s=l.start(-1),c=C.get(r).colCount(l.pos-s)+l.nodeAfter.attrs.colspan-1;let i=e.domAtPos(l.start(-1)).node;for(;i&&i.nodeName!="TABLE";)i=i.parentNode;i&&le(r,i.firstChild,i,o,c,n)}function _t(e){return Array(e).fill(0)}function Vt(e,t){const n=[],o=e.doc.resolve(t),l=o.node(-1);if(!l)return Q.empty;const r=C.get(l),s=o.start(-1),c=r.colCount(o.pos-s)+o.nodeAfter.attrs.colspan-1;for(let a=0;a<r.height;a++){const d=c+a*r.width;if((c==r.width-1||r.map[d]!=r.map[d+1])&&(a==0||r.map[d]!=r.map[d-r.width])){var i;const u=r.map[d],f=s+u+l.nodeAt(u).nodeSize-1,p=document.createElement("div");p.className="column-resize-handle",!((i=x.getState(e))===null||i===void 0)&&i.dragging&&n.push(Z.node(s+u,s+u+l.nodeAt(u).nodeSize,{class:"column-resize-dragging"})),n.push(Z.widget(f,p))}}return Q.create(e.doc,n)}function Kt({allowTableNodeSelection:e=!1}={}){return new ve({key:$,state:{init(){return null},apply(t,n){const o=t.getMeta($);if(o!=null)return o==-1?null:o;if(n==null||!t.docChanged)return n;const{deleted:l,pos:r}=t.mapping.mapResult(n);return l?null:r}},props:{decorations:lt,handleDOMEvents:{mousedown:Lt},createSelectionBetween(t){return $.getState(t.state)!=null?t.state.selection:null},handleTripleClick:Ht,handleKeyDown:Et,handlePaste:$t},appendTransaction(t,n,o){return it(o,ze(o,n),e)}})}function U(e){return e==="left"||e==="right"||e==="center"?e:null}function Xt(e){const t=(e.style.textAlign||"").trim().toLowerCase(),n=(e.getAttribute("align")||"").trim().toLowerCase();return U(t||n)}function qt(e){return U(e?.align)}function Le(){return{default:null,parseHTML:e=>Xt(e),renderHTML:e=>e.align?{style:`text-align: ${e.align}`}:{}}}function Ut(e){var t;const n=e.parentElement,o=e.closest("table");if(!n||!o)return null;const l=Array.from(n.children).indexOf(e),r=(t=o.querySelectorAll("colgroup > col")[l])===null||t===void 0?void 0:t.getAttribute("width");return r?[parseInt(r,10)]:null}function ke(e){const t=e.getAttribute("colwidth");return t?t.split(",").map(n=>parseInt(n,10)):Ut(e)}const Jt=/[ \t\r\n\f]+/g;function We(e){var t;return e.children.length>0?!1:((t=e.textContent)!==null&&t!==void 0?t:"").replace(Jt,"")===""}function Be(e){const t=e.createAndFill();if(!t)throw new Error(`[tiptap error]: "${e.name}" has no default content to backfill.`);return t.content}const Gt=P.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:ke},align:Le()}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td",getAttrs:e=>We(e)?{}:!1,getContent:(e,t)=>Be(t.nodes[this.name])},{tag:"td"}]},renderHTML({HTMLAttributes:e}){return["td",k(this.options.HTMLAttributes,e),0]}}),Yt=P.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:ke},align:Le()}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th",getAttrs:e=>We(e)?{}:!1,getContent:(e,t)=>Be(t.nodes[this.name])},{tag:"th"}]},renderHTML({HTMLAttributes:e}){return["th",k(this.options.HTMLAttributes,e),0]}}),Qt=P.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:e}){return["tr",k(this.options.HTMLAttributes,e),0]}});function re(e,t){return t?["width",`${Math.max(t,e)}px`]:["min-width",`${e}px`]}function ye(e,t,n,o,l,r){let s=0,c=!0,i=t.firstChild;const a=e.firstChild;if(a!==null)for(let f=0,p=0;f<a.childCount;f+=1){const{colspan:h,colwidth:g}=a.child(f).attrs;for(let m=0;m<h;m+=1,p+=1){const w=l===p?r:g&&g[m],S=w?`${w}px`:"";if(s+=w||o,w||(c=!1),i){if(i.style.width!==S){const[y,A]=re(o,w);i.style.setProperty(y,A)}i=i.nextSibling}else{const y=document.createElement("col"),[A,R]=re(o,w);y.style.setProperty(A,R),t.appendChild(y)}}}for(;i;){var d;const f=i.nextSibling;(d=i.parentNode)===null||d===void 0||d.removeChild(i),i=f}const u=e.attrs.style&&typeof e.attrs.style=="string"&&/\bwidth\s*:/i.test(e.attrs.style);c&&!u?(n.style.width=`${s}px`,n.style.minWidth=""):(n.style.width="",n.style.minWidth=`${s}px`)}var Zt=class{constructor(e,t,n,o={}){this.node=e,this.cellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table"));for(const[l,r]of Object.entries(o))r!=null&&(l==="style"?this.table.style.cssText=String(r):this.table.setAttribute(l,String(r)));e.attrs.style&&(this.table.style.cssText=e.attrs.style),this.colgroup=this.table.appendChild(document.createElement("colgroup")),ye(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!==this.node.type?!1:(this.node=e,ye(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){const t=e.target,n=this.dom.contains(t),o=this.contentDOM.contains(t);return!!(n&&!o&&(e.type==="attributes"||e.type==="childList"||e.type==="characterData"))}};function en(e,t,n,o){let l=0,r=!0;const s=[],c=e.firstChild;if(!c)return{};for(let d=0,u=0;d<c.childCount;d+=1){const{colspan:f,colwidth:p}=c.child(d).attrs;for(let h=0;h<f;h+=1,u+=1){const g=n===u?o:p&&p[h];l+=g||t,g||(r=!1);const[m,w]=re(t,g);s.push(["col",{style:`${m}: ${w}`}])}}const i=r?`${l}px`:"",a=r?"":`${l}px`;return{colgroup:["colgroup",{},...s],tableWidth:i,tableMinWidth:a}}function Ae(e,t){return e.createAndFill()}function tn(e){if(e.cached.tableNodeTypes)return e.cached.tableNodeTypes;const t={};return Object.keys(e.nodes).forEach(n=>{const o=e.nodes[n];o.spec.tableRole&&(t[o.spec.tableRole]=o)}),e.cached.tableNodeTypes=t,t}function nn(e,t,n,o,l){const r=tn(e),s=[],c=[];for(let a=0;a<n;a+=1){const d=Ae(r.cell);if(d&&c.push(d),o){const u=Ae(r.header_cell);u&&s.push(u)}}const i=[];for(let a=0;a<t;a+=1)i.push(r.row.createChecked(null,o&&a===0?s:c));return r.table.createChecked(null,i)}function on(e){return e instanceof b}const V=({editor:e})=>{const{selection:t}=e.state;if(!on(t))return!1;let n=0;const o=q(t.ranges[0].$from,l=>l.type.name==="table");return o?.node.descendants(l=>{if(l.type.name==="table")return!1;["tableCell","tableHeader"].includes(l.type.name)&&(n+=1)}),n!==t.ranges.length?!1:(e.commands.deleteTable(),!0)};function Se(e,t){const n=e.mapping.map(t),o=q(e.selection.$from,s=>s.type.name==="table");if(o?.pos===n)return;const l=e.doc.nodeAt(n);if(!l)return;const r=n+l.nodeSize-1;e.setSelection(H.near(e.doc.resolve(r),-1))}function ln(e){let t="",n=0;for(;n<e.length;){if(e[n]==="\\"&&n+1<e.length){t+=e[n]+e[n+1],n+=2;continue}if(e[n]!=="`"){t+=e[n++];continue}let o=0;for(;n+o<e.length&&e[n+o]==="`";)o+=1;let l=n+o,r=!1;for(;l<e.length;){if(e[l]!=="`"){l+=1;continue}let s=0;for(;l+s<e.length&&e[l+s]==="`";)s+=1;if(s===o){const c=e.slice(n+o,l);t+=e.slice(n,n+o)+c.replace(/\\\||\|/g,i=>i==="|"?"\\|":i)+e.slice(l,l+o),n=l+o,r=!0;break}l+=s}r||(t+=e.slice(n,n+o),n+=o)}return t}function rn(e){return e.split(`
|
|
1
|
+
import{N as P,q as De,c as k,R as Ie,r as Pe,t as se,v as E,w as Oe,T as H,x as je,y as M,z as L,A as ve,D as Q,B as Z,C as Fe,G as _e,H as Ve,I as Ke,J as q,f as Xe}from"./usage-stats-PiJNBrSI.js";const qe=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,Ue=P.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{},resize:!1}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:e}){return["img",k(this.options.HTMLAttributes,e)]},parseMarkdown:(e,t)=>t.createNode("image",{src:e.href,title:e.title,alt:e.text}),renderMarkdown:e=>{var t,n,o,l,r,s;const c=(t=(n=e.attrs)===null||n===void 0?void 0:n.src)!==null&&t!==void 0?t:"",i=(o=(l=e.attrs)===null||l===void 0?void 0:l.alt)!==null&&o!==void 0?o:"",a=(r=(s=e.attrs)===null||s===void 0?void 0:s.title)!==null&&r!==void 0?r:"";return a?``:``},addNodeView(){if(!this.options.resize||!this.options.resize.enabled||typeof document>"u")return null;const{directions:e,minWidth:t,minHeight:n,alwaysPreserveAspectRatio:o}=this.options.resize,l=new Set(["src","width","height"]);return({node:r,getPos:s,HTMLAttributes:c,editor:i})=>{const a=document.createElement("img");a.draggable=!1;const d=k(this.options.HTMLAttributes,c);Object.entries(d).forEach(([w,S])=>{if(S!=null)switch(w){case"src":case"width":case"height":break;default:a.setAttribute(w,S)}}),d.src!==null&&(a.src=d.src);let u={...c};const f=w=>{if(typeof w=="string"&&w!==""){a.getAttribute("src")!==w&&(a.src=w);return}a.hasAttribute("src")&&a.removeAttribute("src"),a.src!==""&&(a.src="")};f(c.src);const p=w=>{if(w.type!==r.type)return!1;const S=i.extensionManager.attributes.filter(A=>A.type===w.type.name),y=Pe(w,S);return Object.keys(u).forEach(A=>{!l.has(A)&&!(A in y)&&a.removeAttribute(A)}),Object.entries(y).forEach(([A,R])=>{l.has(A)||(R!=null?a.setAttribute(A,R):a.removeAttribute(A))}),f(y.src),u=y,!0},h=new Ie({element:a,editor:i,node:r,getPos:s,onResize:(w,S)=>{a.style.width=`${w}px`,a.style.height=`${S}px`},onCommit:(w,S)=>{const y=s();y!==void 0&&this.editor.chain().setNodeSelection(y).updateAttributes(this.name,{width:w,height:S}).run()},onUpdate:p,options:{directions:e,min:{width:t,height:n},preserveAspectRatio:o===!0}}),g=h.dom,m=()=>{g.style.visibility="",g.style.pointerEvents=""};return g.style.visibility="hidden",g.style.pointerEvents="none",a.complete&&a.naturalWidth>0?m():(a.onload=m,a.onerror=m),h}},addCommands(){return{setImage:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}},addInputRules(){return[De({find:qe,type:this.type,getAttributes:e=>{const[,,t,n,o]=e;return{src:n,alt:t,title:o}}})]}});var un=Ue;let ee,te;if(typeof WeakMap<"u"){let e=new WeakMap;ee=t=>e.get(t),te=(t,n)=>(e.set(t,n),n)}else{const e=[];let n=0;ee=o=>{for(let l=0;l<e.length;l+=2)if(e[l]==o)return e[l+1]},te=(o,l)=>(n==10&&(n=0),e[n++]=o,e[n++]=l)}var C=class{constructor(e,t,n,o){this.width=e,this.height=t,this.map=n,this.problems=o}findCell(e){for(let t=0;t<this.map.length;t++){const n=this.map[t];if(n!=e)continue;const o=t%this.width,l=t/this.width|0;let r=o+1,s=l+1;for(let c=1;r<this.width&&this.map[t+c]==n;c++)r++;for(let c=1;s<this.height&&this.map[t+this.width*c]==n;c++)s++;return{left:o,top:l,right:r,bottom:s}}throw new RangeError(`No cell with offset ${e} found`)}colCount(e){for(let t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw new RangeError(`No cell with offset ${e} found`)}nextCell(e,t,n){const{left:o,right:l,top:r,bottom:s}=this.findCell(e);return t=="horiz"?(n<0?o==0:l==this.width)?null:this.map[r*this.width+(n<0?o-1:l)]:(n<0?r==0:s==this.height)?null:this.map[o+this.width*(n<0?r-1:s)]}rectBetween(e,t){const{left:n,right:o,top:l,bottom:r}=this.findCell(e),{left:s,right:c,top:i,bottom:a}=this.findCell(t);return{left:Math.min(n,s),top:Math.min(l,i),right:Math.max(o,c),bottom:Math.max(r,a)}}cellsInRect(e){const t=[],n={};for(let o=e.top;o<e.bottom;o++)for(let l=e.left;l<e.right;l++){const r=o*this.width+l,s=this.map[r];n[s]||(n[s]=!0,!(l==e.left&&l&&this.map[r-1]==s||o==e.top&&o&&this.map[r-this.width]==s)&&t.push(s))}return t}positionAt(e,t,n){for(let o=0,l=0;;o++){const r=l+n.child(o).nodeSize;if(o==e){let s=t+e*this.width;const c=(e+1)*this.width;for(;s<c&&this.map[s]<l;)s++;return s==c?r-1:this.map[s]}l=r}}static get(e){return ee(e)||te(e,Je(e))}};function Je(e){if(e.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+e.type.name);const t=Ge(e),n=e.childCount,o=[];let l=0,r=null;const s=[];for(let a=0,d=t*n;a<d;a++)o[a]=0;for(let a=0,d=0;a<n;a++){const u=e.child(a);d++;for(let h=0;;h++){for(;l<o.length&&o[l]!=0;)l++;if(h==u.childCount)break;const g=u.child(h),{colspan:m,rowspan:w,colwidth:S}=g.attrs;for(let y=0;y<w;y++){if(y+a>=n){(r||(r=[])).push({type:"overlong_rowspan",pos:d,n:w-y});break}const A=l+y*t;for(let R=0;R<m;R++){o[A+R]==0?o[A+R]=d:(r||(r=[])).push({type:"collision",row:a,pos:d,n:m-R});const O=S&&S[R];if(O){const D=(A+R)%t*2,G=s[D];G==null||G!=O&&s[D+1]==1?(s[D]=O,s[D+1]=1):G==O&&s[D+1]++}}}l+=m,d+=g.nodeSize}const f=(a+1)*t;let p=0;for(;l<f;)o[l++]==0&&p++;p&&(r||(r=[])).push({type:"missing",row:a,n:p}),d++}(t===0||n===0)&&(r||(r=[])).push({type:"zero_sized"});const c=new C(t,n,o,r);let i=!1;for(let a=0;!i&&a<s.length;a+=2)s[a]!=null&&s[a+1]<n&&(i=!0);return i&&Ye(c,s,e),c}function Ge(e){let t=-1,n=!1;for(let o=0;o<e.childCount;o++){const l=e.child(o);let r=0;if(n)for(let s=0;s<o;s++){const c=e.child(s);for(let i=0;i<c.childCount;i++){const a=c.child(i);s+a.attrs.rowspan>o&&(r+=a.attrs.colspan)}}for(let s=0;s<l.childCount;s++){const c=l.child(s);r+=c.attrs.colspan,c.attrs.rowspan>1&&(n=!0)}t==-1?t=r:t!=r&&(t=Math.max(t,r))}return t}function Ye(e,t,n){e.problems||(e.problems=[]);const o={};for(let l=0;l<e.map.length;l++){const r=e.map[l];if(o[r])continue;o[r]=!0;const s=n.nodeAt(r);if(!s)throw new RangeError(`No cell with offset ${r} found`);let c=null;const i=s.attrs;for(let a=0;a<i.colspan;a++){const d=t[(l+a)%e.width*2];d!=null&&(!i.colwidth||i.colwidth[a]!=d)&&((c||(c=Qe(i)))[a]=d)}c&&e.problems.unshift({type:"colwidth mismatch",pos:r,colwidth:c})}}function Qe(e){if(e.colwidth)return e.colwidth.slice();const t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}function v(e){let t=e.cached.tableNodeTypes;if(!t){t=e.cached.tableNodeTypes={};for(const n in e.nodes){const o=e.nodes[n],l=o.spec.tableRole;l&&(t[l]=o)}}return t}const $=new se("selectingCells");function W(e){for(let t=e.depth-1;t>0;t--)if(e.node(t).type.spec.tableRole=="row")return e.node(0).resolve(e.before(t+1));return null}function Ze(e){for(let t=e.depth;t>0;t--){const n=e.node(t).type.spec.tableRole;if(n==="cell"||n==="header_cell")return e.node(t)}return null}function T(e){const t=e.selection.$head;for(let n=t.depth;n>0;n--)if(t.node(n).type.spec.tableRole=="row")return!0;return!1}function J(e){const t=e.selection;if("$anchorCell"in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if("node"in t&&t.node&&t.node.type.spec.tableRole=="cell")return t.$anchor;const n=W(t.$head)||et(t.$head);if(n)return n;throw new RangeError(`No cell found around position ${t.head}`)}function et(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){const o=t.type.spec.tableRole;if(o=="cell"||o=="header_cell")return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){const o=t.type.spec.tableRole;if(o=="cell"||o=="header_cell")return e.doc.resolve(n-t.nodeSize)}}function ne(e){return e.parent.type.spec.tableRole=="row"&&!!e.nodeAfter}function tt(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function ie(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function Re(e,t,n){const o=e.node(-1),l=C.get(o),r=e.start(-1),s=l.nextCell(e.pos-r,t,n);return s==null?null:e.node(0).resolve(r+s)}function B(e,t,n=1){const o={...e,colspan:e.colspan-n};return o.colwidth&&(o.colwidth=o.colwidth.slice(),o.colwidth.splice(t,n),o.colwidth.some(l=>l>0)||(o.colwidth=null)),o}function xe(e,t,n=1){const o={...e,colspan:e.colspan+n};if(o.colwidth){o.colwidth=o.colwidth.slice();for(let l=0;l<n;l++)o.colwidth.splice(t,0,0)}return o}function nt(e,t,n){const o=v(t.type.schema).header_cell;for(let l=0;l<e.height;l++)if(t.nodeAt(e.map[n+l*e.width]).type!=o)return!1;return!0}var b=class N extends E{constructor(t,n=t){const o=t.node(-1),l=C.get(o),r=t.start(-1),s=l.rectBetween(t.pos-r,n.pos-r),c=t.node(0),i=l.cellsInRect(s).filter(d=>d!=n.pos-r);i.unshift(n.pos-r);const a=i.map(d=>{const u=o.nodeAt(d);if(!u)throw new RangeError(`No cell with offset ${d} found`);const f=r+d+1;return new je(c.resolve(f),c.resolve(f+u.content.size))});super(a[0].$from,a[0].$to,a),this.$anchorCell=t,this.$headCell=n}map(t,n){const o=t.resolve(n.map(this.$anchorCell.pos)),l=t.resolve(n.map(this.$headCell.pos));if(ne(o)&&ne(l)&&ie(o,l)){const r=this.$anchorCell.node(-1)!=o.node(-1);return r&&this.isRowSelection()?N.rowSelection(o,l):r&&this.isColSelection()?N.colSelection(o,l):new N(o,l)}return H.between(o,l)}content(){const t=this.$anchorCell.node(-1),n=C.get(t),o=this.$anchorCell.start(-1),l=n.rectBetween(this.$anchorCell.pos-o,this.$headCell.pos-o),r={},s=[];for(let i=l.top;i<l.bottom;i++){const a=[];for(let d=i*n.width+l.left,u=l.left;u<l.right;u++,d++){const f=n.map[d];if(r[f])continue;r[f]=!0;const p=n.findCell(f);let h=t.nodeAt(f);if(!h)throw new RangeError(`No cell with offset ${f} found`);const g=l.left-p.left,m=p.right-l.right;if(g>0||m>0){let w=h.attrs;if(g>0&&(w=B(w,0,g)),m>0&&(w=B(w,w.colspan-m,m)),p.left<l.left){if(h=h.type.createAndFill(w),!h)throw new RangeError(`Could not create cell with attrs ${JSON.stringify(w)}`)}else h=h.type.create(w,h.content)}if(p.top<l.top||p.bottom>l.bottom){const w={...h.attrs,rowspan:Math.min(p.bottom,l.bottom)-Math.max(p.top,l.top)};p.top<l.top?h=h.type.createAndFill(w):h=h.type.create(w,h.content)}a.push(h)}s.push(t.child(i).copy(M.from(a)))}const c=this.isColSelection()&&this.isRowSelection()?t:s;return new L(M.from(c),1,1)}replace(t,n=L.empty){const o=t.steps.length,l=this.ranges;for(let s=0;s<l.length;s++){const{$from:c,$to:i}=l[s],a=t.mapping.slice(o);t.replace(a.map(c.pos),a.map(i.pos),s?L.empty:n)}const r=E.findFrom(t.doc.resolve(t.mapping.slice(o).map(this.to)),-1);r&&t.setSelection(r)}replaceWith(t,n){this.replace(t,new L(M.from(n),0,0))}forEachCell(t){const n=this.$anchorCell.node(-1),o=C.get(n),l=this.$anchorCell.start(-1),r=o.cellsInRect(o.rectBetween(this.$anchorCell.pos-l,this.$headCell.pos-l));for(let s=0;s<r.length;s++)t(n.nodeAt(r[s]),l+r[s])}isColSelection(){const t=this.$anchorCell.index(-1),n=this.$headCell.index(-1);if(Math.min(t,n)>0)return!1;const o=t+this.$anchorCell.nodeAfter.attrs.rowspan,l=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(o,l)==this.$headCell.node(-1).childCount}static colSelection(t,n=t){const o=t.node(-1),l=C.get(o),r=t.start(-1),s=l.findCell(t.pos-r),c=l.findCell(n.pos-r),i=t.node(0);return s.top<=c.top?(s.top>0&&(t=i.resolve(r+l.map[s.left])),c.bottom<l.height&&(n=i.resolve(r+l.map[l.width*(l.height-1)+c.right-1]))):(c.top>0&&(n=i.resolve(r+l.map[c.left])),s.bottom<l.height&&(t=i.resolve(r+l.map[l.width*(l.height-1)+s.right-1]))),new N(t,n)}isRowSelection(){const t=this.$anchorCell.node(-1),n=C.get(t),o=this.$anchorCell.start(-1),l=n.colCount(this.$anchorCell.pos-o),r=n.colCount(this.$headCell.pos-o);if(Math.min(l,r)>0)return!1;const s=l+this.$anchorCell.nodeAfter.attrs.colspan,c=r+this.$headCell.nodeAfter.attrs.colspan;return Math.max(s,c)==n.width}eq(t){return t instanceof N&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,n=t){const o=t.node(-1),l=C.get(o),r=t.start(-1),s=l.findCell(t.pos-r),c=l.findCell(n.pos-r),i=t.node(0);return s.left<=c.left?(s.left>0&&(t=i.resolve(r+l.map[s.top*l.width])),c.right<l.width&&(n=i.resolve(r+l.map[l.width*(c.top+1)-1]))):(c.left>0&&(n=i.resolve(r+l.map[c.top*l.width])),s.right<l.width&&(t=i.resolve(r+l.map[l.width*(s.top+1)-1]))),new N(t,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(t,n){return new N(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,o=n){return new N(t.resolve(n),t.resolve(o))}getBookmark(){return new ot(this.$anchorCell.pos,this.$headCell.pos)}};b.prototype.visible=!1;E.jsonID("cell",b);var ot=class Te{constructor(t,n){this.anchor=t,this.head=n}map(t){return new Te(t.map(this.anchor),t.map(this.head))}resolve(t){const n=t.resolve(this.anchor),o=t.resolve(this.head);return n.parent.type.spec.tableRole=="row"&&o.parent.type.spec.tableRole=="row"&&n.index()<n.parent.childCount&&o.index()<o.parent.childCount&&ie(n,o)?new b(n,o):E.near(o,1)}};function lt(e){if(!(e.selection instanceof b))return null;const t=[];return e.selection.forEachCell((n,o)=>{t.push(Z.node(o,o+n.nodeSize,{class:"selectedCell"}))}),Q.create(e.doc,t)}function rt({$from:e,$to:t}){if(e.pos==t.pos||e.pos<t.pos-6)return!1;let n=e.pos,o=t.pos,l=e.depth;for(;l>=0&&!(e.after(l+1)<e.end(l));l--,n++);for(let r=t.depth;r>=0&&!(t.before(r+1)>t.start(r));r--,o--);return n==o&&/row|table/.test(e.node(l).type.spec.tableRole)}function st({$from:e,$to:t}){let n,o;for(let l=e.depth;l>0;l--){const r=e.node(l);if(r.type.spec.tableRole==="cell"||r.type.spec.tableRole==="header_cell"){n=r;break}}for(let l=t.depth;l>0;l--){const r=t.node(l);if(r.type.spec.tableRole==="cell"||r.type.spec.tableRole==="header_cell"){o=r;break}}return n!==o&&t.parentOffset===0}function it(e,t,n){const o=(t||e).selection,l=(t||e).doc;let r,s;if(o instanceof Fe&&(s=o.node.type.spec.tableRole)){if(s=="cell"||s=="header_cell")r=b.create(l,o.from);else if(s=="row"){const c=l.resolve(o.from+1);r=b.rowSelection(c,c)}else if(!n){const c=C.get(o.node),i=o.from+1,a=i+c.map[c.width*c.height-1];r=b.create(l,i+1,a)}}else o instanceof H&&rt(o)?r=H.create(l,o.from):o instanceof H&&st(o)&&(r=H.create(l,o.$from.start(),o.$from.end()));return r&&(t||(t=e.tr)).setSelection(r),t}const ct=new se("fix-tables");function Me(e,t,n,o){const l=e.childCount,r=t.childCount;e:for(let s=0,c=0;s<r;s++){const i=t.child(s);for(let a=c,d=Math.min(l,s+3);a<d;a++)if(e.child(a)==i){c=a+1,n+=i.nodeSize;continue e}o(i,n),c<l&&e.child(c).sameMarkup(i)?Me(e.child(c),i,n+1,o):i.nodesBetween(0,i.content.size,o,n+1),n+=i.nodeSize}}function ze(e,t){let n;const o=(l,r)=>{l.type.spec.tableRole=="table"&&(n=at(e,l,r,n))};return t?t.doc!=e.doc&&Me(t.doc,e.doc,0,o):e.doc.descendants(o),n}function at(e,t,n,o){const l=C.get(t);if(!l.problems)return o;o||(o=e.tr);const r=[];for(let i=0;i<l.height;i++)r.push(0);for(let i=0;i<l.problems.length;i++){const a=l.problems[i];if(a.type=="collision"){const d=t.nodeAt(a.pos);if(!d)continue;const u=d.attrs;for(let f=0;f<u.rowspan;f++)r[a.row+f]+=a.n;o.setNodeMarkup(o.mapping.map(n+1+a.pos),null,B(u,u.colspan-a.n,a.n))}else if(a.type=="missing")r[a.row]+=a.n;else if(a.type=="overlong_rowspan"){const d=t.nodeAt(a.pos);if(!d)continue;o.setNodeMarkup(o.mapping.map(n+1+a.pos),null,{...d.attrs,rowspan:d.attrs.rowspan-a.n})}else if(a.type=="colwidth mismatch"){const d=t.nodeAt(a.pos);if(!d)continue;o.setNodeMarkup(o.mapping.map(n+1+a.pos),null,{...d.attrs,colwidth:a.colwidth})}else if(a.type=="zero_sized"){const d=o.mapping.map(n);o.delete(d,d+t.nodeSize)}}let s,c;for(let i=0;i<r.length;i++)r[i]&&(s==null&&(s=i),c=i);for(let i=0,a=n+1;i<l.height;i++){const d=t.child(i),u=a+d.nodeSize,f=r[i];if(f>0){let p="cell";d.firstChild&&(p=d.firstChild.type.spec.tableRole);const h=[];for(let m=0;m<f;m++){const w=v(e.schema)[p].createAndFill();w&&h.push(w)}const g=(i==0||s==i-1)&&c==i?a+1:u-1;o.insert(o.mapping.map(g),h)}a=u}return o.setMeta(ct,{fixTables:!0})}function z(e){const t=e.selection,n=J(e),o=n.node(-1),l=n.start(-1),r=C.get(o);return{...t instanceof b?r.rectBetween(t.$anchorCell.pos-l,t.$headCell.pos-l):r.findCell(n.pos-l),tableStart:l,map:r,table:o}}function Ne(e,{map:t,tableStart:n,table:o},l){let r=l>0?-1:0;nt(t,o,l+r)&&(r=l==0||l==t.width?null:0);for(let s=0;s<t.height;s++){const c=s*t.width+l;if(l>0&&l<t.width&&t.map[c-1]==t.map[c]){const i=t.map[c],a=o.nodeAt(i);e.setNodeMarkup(e.mapping.map(n+i),null,xe(a.attrs,l-t.colCount(i))),s+=a.attrs.rowspan-1}else{const i=r==null?v(o.type.schema).cell:o.nodeAt(t.map[c+r]).type,a=t.positionAt(s,l,o);e.insert(e.mapping.map(n+a),i.createAndFill())}}return e}function dt(e,t){if(!T(e))return!1;if(t){const n=z(e);t(Ne(e.tr,n,n.left))}return!0}function ut(e,t){if(!T(e))return!1;if(t){const n=z(e);t(Ne(e.tr,n,n.right))}return!0}function ft(e,{map:t,table:n,tableStart:o},l){const r=e.mapping.maps.length;for(let s=0;s<t.height;){const c=s*t.width+l,i=t.map[c],a=n.nodeAt(i),d=a.attrs;if(l>0&&t.map[c-1]==i||l<t.width-1&&t.map[c+1]==i)e.setNodeMarkup(e.mapping.slice(r).map(o+i),null,B(d,l-t.colCount(i)));else{const u=e.mapping.slice(r).map(o+i);e.delete(u,u+a.nodeSize)}s+=d.rowspan}}function ht(e,t){if(!T(e))return!1;if(t){const n=z(e),o=e.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let l=n.right-1;ft(o,n,l),l!=n.left;l--){const r=n.tableStart?o.doc.nodeAt(n.tableStart-1):o.doc;if(!r)throw new RangeError("No table found");n.table=r,n.map=C.get(r)}t(o)}return!0}function pt(e,t,n){var o;const l=v(t.type.schema).header_cell;for(let r=0;r<e.width;r++)if(((o=t.nodeAt(e.map[r+n*e.width]))===null||o===void 0?void 0:o.type)!=l)return!1;return!0}function Ee(e,{map:t,tableStart:n,table:o},l){let r=n;for(let a=0;a<l;a++)r+=o.child(a).nodeSize;const s=[];let c=l>0?-1:0;pt(t,o,l+c)&&(c=l==0||l==t.height?null:0);for(let a=0,d=t.width*l;a<t.width;a++,d++)if(l>0&&l<t.height&&t.map[d]==t.map[d-t.width]){const u=t.map[d],f=o.nodeAt(u).attrs;e.setNodeMarkup(n+u,null,{...f,rowspan:f.rowspan+1}),a+=f.colspan-1}else{var i;const u=c==null?v(o.type.schema).cell:(i=o.nodeAt(t.map[d+c*t.width]))===null||i===void 0?void 0:i.type,f=u?.createAndFill();f&&s.push(f)}return e.insert(r,v(o.type.schema).row.create(null,s)),e}function mt(e,t){if(!T(e))return!1;if(t){const n=z(e);t(Ee(e.tr,n,n.top))}return!0}function gt(e,t){if(!T(e))return!1;if(t){const n=z(e);t(Ee(e.tr,n,n.bottom))}return!0}function wt(e,{map:t,table:n,tableStart:o},l){let r=0;for(let a=0;a<l;a++)r+=n.child(a).nodeSize;const s=r+n.child(l).nodeSize,c=e.mapping.maps.length;e.delete(r+o,s+o);const i=new Set;for(let a=0,d=l*t.width;a<t.width;a++,d++){const u=t.map[d];if(!i.has(u)){if(i.add(u),l>0&&u==t.map[d-t.width]){const f=n.nodeAt(u).attrs;e.setNodeMarkup(e.mapping.slice(c).map(u+o),null,{...f,rowspan:f.rowspan-1}),a+=f.colspan-1}else if(l<t.height&&u==t.map[d+t.width]){const f=n.nodeAt(u),p=f.attrs,h=f.type.create({...p,rowspan:f.attrs.rowspan-1},f.content),g=t.positionAt(l+1,a,n);e.insert(e.mapping.slice(c).map(o+g),h),a+=p.colspan-1}}}}function bt(e,t){if(!T(e))return!1;if(t){const n=z(e),o=e.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let l=n.bottom-1;wt(o,n,l),l!=n.top;l--){const r=n.tableStart?o.doc.nodeAt(n.tableStart-1):o.doc;if(!r)throw new RangeError("No table found");n.table=r,n.map=C.get(n.table)}t(o)}return!0}function ce(e){const t=e.content;return t.childCount==1&&t.child(0).isTextblock&&t.child(0).childCount==0}function Ct({width:e,height:t,map:n},o){let l=o.top*e+o.left,r=l,s=(o.bottom-1)*e+o.left,c=l+(o.right-o.left-1);for(let i=o.top;i<o.bottom;i++){if(o.left>0&&n[r]==n[r-1]||o.right<e&&n[c]==n[c+1])return!0;r+=e,c+=e}for(let i=o.left;i<o.right;i++){if(o.top>0&&n[l]==n[l-e]||o.bottom<t&&n[s]==n[s+e])return!0;l++,s++}return!1}function ae(e,t){const n=e.selection;if(!(n instanceof b)||n.$anchorCell.pos==n.$headCell.pos)return!1;const o=z(e),{map:l}=o;if(Ct(l,o))return!1;if(t){const r=e.tr,s={};let c=M.empty,i,a;for(let d=o.top;d<o.bottom;d++)for(let u=o.left;u<o.right;u++){const f=l.map[d*l.width+u],p=o.table.nodeAt(f);if(!(s[f]||!p))if(s[f]=!0,i==null)i=f,a=p;else{ce(p)||(c=c.append(p.content));const h=r.mapping.map(f+o.tableStart);r.delete(h,h+p.nodeSize)}}if(i==null||a==null)return!0;if(r.setNodeMarkup(i+o.tableStart,null,{...xe(a.attrs,a.attrs.colspan,o.right-o.left-a.attrs.colspan),rowspan:o.bottom-o.top}),c.size>0){const d=i+1+a.content.size,u=ce(a)?i+1:d;r.replaceWith(u+o.tableStart,d+o.tableStart,c)}r.setSelection(new b(r.doc.resolve(i+o.tableStart))),t(r)}return!0}function de(e,t){const n=v(e.schema);return yt(({node:o})=>n[o.type.spec.tableRole])(e,t)}function yt(e){return(t,n)=>{const o=t.selection;let l,r;if(o instanceof b){if(o.$anchorCell.pos!=o.$headCell.pos)return!1;l=o.$anchorCell.nodeAfter,r=o.$anchorCell.pos}else{var s;if(l=Ze(o.$from),!l)return!1;r=(s=W(o.$from))===null||s===void 0?void 0:s.pos}if(l==null||r==null||l.attrs.colspan==1&&l.attrs.rowspan==1)return!1;if(n){let c=l.attrs;const i=[],a=c.colwidth;c.rowspan>1&&(c={...c,rowspan:1}),c.colspan>1&&(c={...c,colspan:1});const d=z(t),u=t.tr;for(let p=0;p<d.right-d.left;p++)i.push(a?{...c,colwidth:a&&a[p]?[a[p]]:null}:c);let f;for(let p=d.top;p<d.bottom;p++){let h=d.map.positionAt(p,d.left,d.table);p==d.top&&(h+=l.nodeSize);for(let g=d.left,m=0;g<d.right;g++,m++)g==d.left&&p==d.top||u.insert(f=u.mapping.map(h+d.tableStart,1),e({node:l,row:p,col:g}).createAndFill(i[m]))}u.setNodeMarkup(r,e({node:l,row:d.top,col:d.left}),i[0]),o instanceof b&&u.setSelection(new b(u.doc.resolve(o.$anchorCell.pos),f?u.doc.resolve(f):void 0)),n(u)}return!0}}function At(e,t){return function(n,o){if(!T(n))return!1;const l=J(n);if(l.nodeAfter.attrs[e]===t)return!1;if(o){const r=n.tr;n.selection instanceof b?n.selection.forEachCell((s,c)=>{s.attrs[e]!==t&&r.setNodeMarkup(c,null,{...s.attrs,[e]:t})}):r.setNodeMarkup(l.pos,null,{...l.nodeAfter.attrs,[e]:t}),o(r)}return!0}}function St(e){return function(t,n){if(!T(t))return!1;if(n){const o=v(t.schema),l=z(t),r=t.tr,s=l.map.cellsInRect(e=="column"?{left:l.left,top:0,right:l.right,bottom:l.map.height}:e=="row"?{left:0,top:l.top,right:l.map.width,bottom:l.bottom}:l),c=s.map(i=>l.table.nodeAt(i));for(let i=0;i<s.length;i++)c[i].type==o.header_cell&&r.setNodeMarkup(l.tableStart+s[i],o.cell,c[i].attrs);if(r.steps.length===0)for(let i=0;i<s.length;i++)r.setNodeMarkup(l.tableStart+s[i],o.header_cell,c[i].attrs);n(r)}return!0}}function ue(e,t,n){const o=t.map.cellsInRect({left:0,top:0,right:e=="row"?t.map.width:1,bottom:e=="column"?t.map.height:1});for(let l=0;l<o.length;l++){const r=t.table.nodeAt(o[l]);if(r&&r.type!==n.header_cell)return!1}return!0}function I(e,t){return t=t||{useDeprecatedLogic:!1},t.useDeprecatedLogic?St(e):function(n,o){if(!T(n))return!1;if(o){const l=v(n.schema),r=z(n),s=n.tr,c=ue("row",r,l),i=ue("column",r,l),a=(e==="column"?c:e==="row"&&i)?1:0,d=e=="column"?{left:0,top:a,right:1,bottom:r.map.height}:e=="row"?{left:a,top:0,right:r.map.width,bottom:1}:r,u=e=="column"?i?l.cell:l.header_cell:e=="row"?c?l.cell:l.header_cell:l.cell;r.map.cellsInRect(d).forEach(f=>{const p=f+r.tableStart,h=s.doc.nodeAt(p);h&&s.setNodeMarkup(p,u,h.attrs)}),o(s)}return!0}}I("row",{useDeprecatedLogic:!0});I("column",{useDeprecatedLogic:!0});const vt=I("cell",{useDeprecatedLogic:!0});function Rt(e,t){if(t<0){const n=e.nodeBefore;if(n)return e.pos-n.nodeSize;for(let o=e.index(-1)-1,l=e.before();o>=0;o--){const r=e.node(-1).child(o),s=r.lastChild;if(s)return l-1-s.nodeSize;l-=r.nodeSize}}else{if(e.index()<e.parent.childCount-1)return e.pos+e.nodeAfter.nodeSize;const n=e.node(-1);for(let o=e.indexAfter(-1),l=e.after();o<n.childCount;o++){const r=n.child(o);if(r.childCount)return l+1;l+=r.nodeSize}}return null}function fe(e){return function(t,n){if(!T(t))return!1;const o=Rt(J(t),e);if(o==null)return!1;if(n){const l=t.doc.resolve(o);n(t.tr.setSelection(H.between(l,tt(l))).scrollIntoView())}return!0}}function xt(e,t){const n=e.selection.$anchor;for(let o=n.depth;o>0;o--)if(n.node(o).type.spec.tableRole=="table")return t&&t(e.tr.delete(n.before(o),n.after(o)).scrollIntoView()),!0;return!1}function j(e,t){const n=e.selection;if(!(n instanceof b))return!1;if(t){const o=e.tr,l=v(e.schema).cell.createAndFill().content;n.forEachCell((r,s)=>{r.content.eq(l)||o.replace(o.mapping.map(s+1),o.mapping.map(s+r.nodeSize-1),new L(l,0,0))}),o.docChanged&&t(o)}return!0}function Tt(e){if(e.size===0)return null;let{content:t,openStart:n,openEnd:o}=e;for(;t.childCount==1&&(n>0&&o>0||t.child(0).type.spec.tableRole=="table");)n--,o--,t=t.child(0).content;const l=t.child(0),r=l.type.spec.tableRole,s=l.type.schema,c=[];if(r=="row")for(let i=0;i<t.childCount;i++){let a=t.child(i).content;const d=i?0:Math.max(0,n-1),u=i<t.childCount-1?0:Math.max(0,o-1);(d||u)&&(a=oe(v(s).row,new L(a,d,u)).content),c.push(a)}else if(r=="cell"||r=="header_cell")c.push(n||o?oe(v(s).row,new L(t,n,o)).content:t);else return null;return Mt(s,c)}function Mt(e,t){const n=[];for(let l=0;l<t.length;l++){const r=t[l];for(let s=r.childCount-1;s>=0;s--){const{rowspan:c,colspan:i}=r.child(s).attrs;for(let a=l;a<l+c;a++)n[a]=(n[a]||0)+i}}let o=0;for(let l=0;l<n.length;l++)o=Math.max(o,n[l]);for(let l=0;l<n.length;l++)if(l>=t.length&&t.push(M.empty),n[l]<o){const r=v(e).cell.createAndFill(),s=[];for(let c=n[l];c<o;c++)s.push(r);t[l]=t[l].append(M.from(s))}return{height:t.length,width:o,rows:t}}function oe(e,t){const n=e.createAndFill();return new _e(n).replace(0,n.content.size,t).doc}function zt({width:e,height:t,rows:n},o,l){if(e!=o){const r=[],s=[];for(let c=0;c<n.length;c++){const i=n[c],a=[];for(let d=r[c]||0,u=0;d<o;u++){let f=i.child(u%i.childCount);d+f.attrs.colspan>o&&(f=f.type.createChecked(B(f.attrs,f.attrs.colspan,d+f.attrs.colspan-o),f.content)),a.push(f),d+=f.attrs.colspan;for(let p=1;p<f.attrs.rowspan;p++)r[c+p]=(r[c+p]||0)+f.attrs.colspan}s.push(M.from(a))}n=s,e=o}if(t!=l){const r=[];for(let s=0,c=0;s<l;s++,c++){const i=[],a=n[c%t];for(let d=0;d<a.childCount;d++){let u=a.child(d);s+u.attrs.rowspan>l&&(u=u.type.create({...u.attrs,rowspan:Math.max(1,l-u.attrs.rowspan)},u.content)),i.push(u)}r.push(M.from(i))}n=r,t=l}return{width:e,height:t,rows:n}}function Nt(e,t,n,o,l,r,s){const c=e.doc.type.schema,i=v(c);let a,d;if(l>t.width)for(let u=0,f=0;u<t.height;u++){const p=n.child(u);f+=p.nodeSize;const h=[];let g;p.lastChild==null||p.lastChild.type==i.cell?g=a||(a=i.cell.createAndFill()):g=d||(d=i.header_cell.createAndFill());for(let m=t.width;m<l;m++)h.push(g);e.insert(e.mapping.slice(s).map(f-1+o),h)}if(r>t.height){const u=[];for(let h=0,g=(t.height-1)*t.width;h<Math.max(t.width,l);h++){const m=h>=t.width?!1:n.nodeAt(t.map[g+h]).type==i.header_cell;u.push(m?d||(d=i.header_cell.createAndFill()):a||(a=i.cell.createAndFill()))}const f=i.row.create(null,M.from(u)),p=[];for(let h=t.height;h<r;h++)p.push(f);e.insert(e.mapping.slice(s).map(o+n.nodeSize-2),p)}return!!(a||d)}function he(e,t,n,o,l,r,s,c){if(s==0||s==t.height)return!1;let i=!1;for(let a=l;a<r;a++){const d=s*t.width+a,u=t.map[d];if(t.map[d-t.width]==u){i=!0;const f=n.nodeAt(u),{top:p,left:h}=t.findCell(u);e.setNodeMarkup(e.mapping.slice(c).map(u+o),null,{...f.attrs,rowspan:s-p}),e.insert(e.mapping.slice(c).map(t.positionAt(s,h,n)),f.type.createAndFill({...f.attrs,rowspan:p+f.attrs.rowspan-s})),a+=f.attrs.colspan-1}}return i}function pe(e,t,n,o,l,r,s,c){if(s==0||s==t.width)return!1;let i=!1;for(let a=l;a<r;a++){const d=a*t.width+s,u=t.map[d];if(t.map[d-1]==u){i=!0;const f=n.nodeAt(u),p=t.colCount(u),h=e.mapping.slice(c).map(u+o);e.setNodeMarkup(h,null,B(f.attrs,s-p,f.attrs.colspan-(s-p))),e.insert(h+f.nodeSize,f.type.createAndFill(B(f.attrs,0,s-p))),a+=f.attrs.rowspan-1}}return i}function me(e,t,n,o,l){let r=n?e.doc.nodeAt(n-1):e.doc;if(!r)throw new Error("No table found");let s=C.get(r);const{top:c,left:i}=o,a=i+l.width,d=c+l.height,u=e.tr;let f=0;function p(){if(r=n?u.doc.nodeAt(n-1):u.doc,!r)throw new Error("No table found");s=C.get(r),f=u.mapping.maps.length}Nt(u,s,r,n,a,d,f)&&p(),he(u,s,r,n,i,a,c,f)&&p(),he(u,s,r,n,i,a,d,f)&&p(),pe(u,s,r,n,c,d,i,f)&&p(),pe(u,s,r,n,c,d,a,f)&&p();for(let h=c;h<d;h++){const g=s.positionAt(h,i,r),m=s.positionAt(h,a,r);u.replace(u.mapping.slice(f).map(g+n),u.mapping.slice(f).map(m+n),new L(l.rows[h-c],0,0))}p(),u.setSelection(new b(u.doc.resolve(n+s.positionAt(c,i,r)),u.doc.resolve(n+s.positionAt(d-1,a-1,r)))),t(u)}const Et=Oe({ArrowLeft:F("horiz",-1),ArrowRight:F("horiz",1),ArrowUp:F("vert",-1),ArrowDown:F("vert",1),"Shift-ArrowLeft":_("horiz",-1),"Shift-ArrowRight":_("horiz",1),"Shift-ArrowUp":_("vert",-1),"Shift-ArrowDown":_("vert",1),Backspace:j,"Mod-Backspace":j,Delete:j,"Mod-Delete":j});function K(e,t,n){return n.eq(e.selection)?!1:(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function F(e,t){return(n,o,l)=>{if(!l)return!1;const r=n.selection;if(r instanceof b)return K(n,o,E.near(r.$headCell,t));if(e!="horiz"&&!r.empty)return!1;const s=He(l,e,t);if(s==null)return!1;if(e=="horiz")return K(n,o,E.near(n.doc.resolve(r.head+t),t));{const c=n.doc.resolve(s),i=Re(c,e,t);let a;return i?a=E.near(i,1):t<0?a=E.near(n.doc.resolve(c.before(-1)),-1):a=E.near(n.doc.resolve(c.after(-1)),1),K(n,o,a)}}}function _(e,t){return(n,o,l)=>{if(!l)return!1;const r=n.selection;let s;if(r instanceof b)s=r;else{const i=He(l,e,t);if(i==null)return!1;s=new b(n.doc.resolve(i))}const c=Re(s.$headCell,e,t);return c?K(n,o,new b(s.$anchorCell,c)):!1}}function Ht(e,t){const n=e.state.doc,o=W(n.resolve(t));return o?(e.dispatch(e.state.tr.setSelection(new b(o))),!0):!1}function $t(e,t,n){if(!T(e.state))return!1;let o=Tt(n);const l=e.state.selection;if(l instanceof b){o||(o={width:1,height:1,rows:[M.from(oe(v(e.state.schema).cell,n))]});const r=l.$anchorCell.node(-1),s=l.$anchorCell.start(-1),c=C.get(r).rectBetween(l.$anchorCell.pos-s,l.$headCell.pos-s);return o=zt(o,c.right-c.left,c.bottom-c.top),me(e.state,e.dispatch,s,c,o),!0}else if(o){const r=J(e.state),s=r.start(-1);return me(e.state,e.dispatch,s,C.get(r.node(-1)).findCell(r.pos-s),o),!0}else return!1}function Lt(e,t){var n;if(t.button!=0||t.ctrlKey||t.metaKey)return;const o=ge(e,t.target);let l;if(t.shiftKey&&e.state.selection instanceof b)r(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&o&&(l=W(e.state.selection.$anchor))!=null&&((n=Y(e,t))===null||n===void 0?void 0:n.pos)!=l.pos)r(l,t),t.preventDefault();else if(!o)return;function r(i,a){let d=Y(e,a);const u=$.getState(e.state)==null;if(!d||!ie(i,d))if(u)d=i;else return;const f=new b(i,d);if(u||!e.state.selection.eq(f)){const p=e.state.tr.setSelection(f);u&&p.setMeta($,i.pos),e.dispatch(p)}}function s(){e.root.removeEventListener("mouseup",s),e.root.removeEventListener("dragstart",s),e.root.removeEventListener("mousemove",c),$.getState(e.state)!=null&&e.dispatch(e.state.tr.setMeta($,-1))}function c(i){const a=i,d=$.getState(e.state);let u;if(d!=null)u=e.state.doc.resolve(d);else if(ge(e,a.target)!=o&&(u=Y(e,t),!u))return s();u&&r(u,a)}e.root.addEventListener("mouseup",s),e.root.addEventListener("dragstart",s),e.root.addEventListener("mousemove",c)}function He(e,t,n){if(!(e.state.selection instanceof H))return null;const{$head:o}=e.state.selection;for(let l=o.depth-1;l>=0;l--){const r=o.node(l);if((n<0?o.index(l):o.indexAfter(l))!=(n<0?0:r.childCount))return null;if(r.type.spec.tableRole=="cell"||r.type.spec.tableRole=="header_cell"){const s=o.before(l),c=t=="vert"?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(c)?s:null}}return null}function ge(e,t){for(;t&&t!=e.dom;t=t.parentNode)if(t.nodeName=="TD"||t.nodeName=="TH")return t;return null}function Y(e,t){const n=e.posAtCoords({left:t.clientX,top:t.clientY});if(!n)return null;let{inside:o,pos:l}=n;return o>=0&&W(e.state.doc.resolve(o))||W(e.state.doc.resolve(l))}var kt=class{constructor(t,n){this.node=t,this.defaultCellMinWidth=n,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${n}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),le(t,this.colgroup,this.table,n),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(t){return t.type!=this.node.type?!1:(this.node=t,le(t,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(t){return t.type=="attributes"&&(t.target==this.table||this.colgroup.contains(t.target))}};function le(e,t,n,o,l,r){let s=0,c=!0,i=t.firstChild;const a=e.firstChild;if(a){for(let u=0,f=0;u<a.childCount;u++){const{colspan:p,colwidth:h}=a.child(u).attrs;for(let g=0;g<p;g++,f++){const m=l==f?r:h&&h[g],w=m?m+"px":"";if(s+=m||o,m||(c=!1),i)i.style.width!=w&&(i.style.width=w),i=i.nextSibling;else{const S=document.createElement("col");S.style.width=w,t.appendChild(S)}}}for(;i;){var d;const u=i.nextSibling;(d=i.parentNode)===null||d===void 0||d.removeChild(i),i=u}c?(n.style.width=s+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=s+"px")}}const x=new se("tableColumnResizing");function Wt({handleWidth:e=5,cellMinWidth:t=25,defaultCellMinWidth:n=100,View:o=kt,lastColumnResizable:l=!0}={}){const r=new ve({key:x,state:{init(s,c){var i;const a=(i=r.spec)===null||i===void 0||(i=i.props)===null||i===void 0?void 0:i.nodeViews,d=v(c.schema).table.name;return o&&a&&(a[d]=(u,f)=>new o(u,n,f)),new Bt(-1,!1)},apply(s,c){return c.apply(s)}},props:{attributes:s=>{const c=x.getState(s);return c&&c.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(s,c)=>{Dt(s,c,e,l)},mouseleave:s=>{It(s)},mousedown:(s,c)=>{Pt(s,c,t,n)}},decorations:s=>{const c=x.getState(s);if(c&&c.activeHandle>-1)return Vt(s,c.activeHandle)},nodeViews:{}}});return r}var Bt=class X{constructor(t,n){this.activeHandle=t,this.dragging=n}apply(t){const n=this,o=t.getMeta(x);if(o&&o.setHandle!=null)return new X(o.setHandle,!1);if(o&&o.setDragging!==void 0)return new X(n.activeHandle,o.setDragging);if(n.activeHandle>-1&&t.docChanged){let l=t.mapping.map(n.activeHandle,-1);return ne(t.doc.resolve(l))||(l=-1),new X(l,n.dragging)}return n}};function Dt(e,t,n,o){if(!e.editable)return;const l=x.getState(e.state);if(l&&!l.dragging){const r=jt(t.target);let s=-1;if(r){const{left:c,right:i}=r.getBoundingClientRect();t.clientX-c<=n?s=we(e,t,"left",n):i-t.clientX<=n&&(s=we(e,t,"right",n))}if(s!=l.activeHandle){if(!o&&s!==-1){const c=e.state.doc.resolve(s),i=c.node(-1),a=C.get(i),d=c.start(-1);if(a.colCount(c.pos-d)+c.nodeAfter.attrs.colspan-1==a.width-1)return}$e(e,s)}}}function It(e){if(!e.editable)return;const t=x.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&$e(e,-1)}function Pt(e,t,n,o){var l;if(!e.editable)return!1;const r=(l=e.dom.ownerDocument.defaultView)!==null&&l!==void 0?l:window,s=x.getState(e.state);if(!s||s.activeHandle==-1||s.dragging)return!1;const c=e.state.doc.nodeAt(s.activeHandle),i=Ot(e,s.activeHandle,c.attrs);e.dispatch(e.state.tr.setMeta(x,{setDragging:{startX:t.clientX,startWidth:i}}));function a(u){r.removeEventListener("mouseup",a),r.removeEventListener("mousemove",d);const f=x.getState(e.state);f?.dragging&&(Ft(e,f.activeHandle,be(f.dragging,u,n)),e.dispatch(e.state.tr.setMeta(x,{setDragging:null})))}function d(u){if(!u.which)return a(u);const f=x.getState(e.state);if(f&&f.dragging){const p=be(f.dragging,u,n);Ce(e,f.activeHandle,p,o)}}return Ce(e,s.activeHandle,i,o),r.addEventListener("mouseup",a),r.addEventListener("mousemove",d),t.preventDefault(),!0}function Ot(e,t,{colspan:n,colwidth:o}){const l=o&&o[o.length-1];if(l)return l;const r=e.domAtPos(t);let s=r.node.childNodes[r.offset].offsetWidth,c=n;if(o)for(let i=0;i<n;i++)o[i]&&(s-=o[i],c--);return s/c}function jt(e){for(;e&&e.nodeName!="TD"&&e.nodeName!="TH";)e=e.classList&&e.classList.contains("ProseMirror")?null:e.parentNode;return e}function we(e,t,n,o){const l=n=="right"?-o:o,r=e.posAtCoords({left:t.clientX+l,top:t.clientY});if(!r)return-1;const{pos:s}=r,c=W(e.state.doc.resolve(s));if(!c)return-1;if(n=="right")return c.pos;const i=C.get(c.node(-1)),a=c.start(-1),d=i.map.indexOf(c.pos-a);return d%i.width==0?-1:a+i.map[d-1]}function be(e,t,n){const o=t.clientX-e.startX;return Math.max(n,e.startWidth+o)}function $e(e,t){e.dispatch(e.state.tr.setMeta(x,{setHandle:t}))}function Ft(e,t,n){const o=e.state.doc.resolve(t),l=o.node(-1),r=C.get(l),s=o.start(-1),c=r.colCount(o.pos-s)+o.nodeAfter.attrs.colspan-1,i=e.state.tr;for(let a=0;a<r.height;a++){const d=a*r.width+c;if(a&&r.map[d]==r.map[d-r.width])continue;const u=r.map[d],f=l.nodeAt(u).attrs,p=f.colspan==1?0:c-r.colCount(u);if(f.colwidth&&f.colwidth[p]==n)continue;const h=f.colwidth?f.colwidth.slice():_t(f.colspan);h[p]=n,i.setNodeMarkup(s+u,null,{...f,colwidth:h})}i.docChanged&&e.dispatch(i)}function Ce(e,t,n,o){const l=e.state.doc.resolve(t),r=l.node(-1),s=l.start(-1),c=C.get(r).colCount(l.pos-s)+l.nodeAfter.attrs.colspan-1;let i=e.domAtPos(l.start(-1)).node;for(;i&&i.nodeName!="TABLE";)i=i.parentNode;i&&le(r,i.firstChild,i,o,c,n)}function _t(e){return Array(e).fill(0)}function Vt(e,t){const n=[],o=e.doc.resolve(t),l=o.node(-1);if(!l)return Q.empty;const r=C.get(l),s=o.start(-1),c=r.colCount(o.pos-s)+o.nodeAfter.attrs.colspan-1;for(let a=0;a<r.height;a++){const d=c+a*r.width;if((c==r.width-1||r.map[d]!=r.map[d+1])&&(a==0||r.map[d]!=r.map[d-r.width])){var i;const u=r.map[d],f=s+u+l.nodeAt(u).nodeSize-1,p=document.createElement("div");p.className="column-resize-handle",!((i=x.getState(e))===null||i===void 0)&&i.dragging&&n.push(Z.node(s+u,s+u+l.nodeAt(u).nodeSize,{class:"column-resize-dragging"})),n.push(Z.widget(f,p))}}return Q.create(e.doc,n)}function Kt({allowTableNodeSelection:e=!1}={}){return new ve({key:$,state:{init(){return null},apply(t,n){const o=t.getMeta($);if(o!=null)return o==-1?null:o;if(n==null||!t.docChanged)return n;const{deleted:l,pos:r}=t.mapping.mapResult(n);return l?null:r}},props:{decorations:lt,handleDOMEvents:{mousedown:Lt},createSelectionBetween(t){return $.getState(t.state)!=null?t.state.selection:null},handleTripleClick:Ht,handleKeyDown:Et,handlePaste:$t},appendTransaction(t,n,o){return it(o,ze(o,n),e)}})}function U(e){return e==="left"||e==="right"||e==="center"?e:null}function Xt(e){const t=(e.style.textAlign||"").trim().toLowerCase(),n=(e.getAttribute("align")||"").trim().toLowerCase();return U(t||n)}function qt(e){return U(e?.align)}function Le(){return{default:null,parseHTML:e=>Xt(e),renderHTML:e=>e.align?{style:`text-align: ${e.align}`}:{}}}function Ut(e){var t;const n=e.parentElement,o=e.closest("table");if(!n||!o)return null;const l=Array.from(n.children).indexOf(e),r=(t=o.querySelectorAll("colgroup > col")[l])===null||t===void 0?void 0:t.getAttribute("width");return r?[parseInt(r,10)]:null}function ke(e){const t=e.getAttribute("colwidth");return t?t.split(",").map(n=>parseInt(n,10)):Ut(e)}const Jt=/[ \t\r\n\f]+/g;function We(e){var t;return e.children.length>0?!1:((t=e.textContent)!==null&&t!==void 0?t:"").replace(Jt,"")===""}function Be(e){const t=e.createAndFill();if(!t)throw new Error(`[tiptap error]: "${e.name}" has no default content to backfill.`);return t.content}const Gt=P.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:ke},align:Le()}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td",getAttrs:e=>We(e)?{}:!1,getContent:(e,t)=>Be(t.nodes[this.name])},{tag:"td"}]},renderHTML({HTMLAttributes:e}){return["td",k(this.options.HTMLAttributes,e),0]}}),Yt=P.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:ke},align:Le()}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th",getAttrs:e=>We(e)?{}:!1,getContent:(e,t)=>Be(t.nodes[this.name])},{tag:"th"}]},renderHTML({HTMLAttributes:e}){return["th",k(this.options.HTMLAttributes,e),0]}}),Qt=P.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:e}){return["tr",k(this.options.HTMLAttributes,e),0]}});function re(e,t){return t?["width",`${Math.max(t,e)}px`]:["min-width",`${e}px`]}function ye(e,t,n,o,l,r){let s=0,c=!0,i=t.firstChild;const a=e.firstChild;if(a!==null)for(let f=0,p=0;f<a.childCount;f+=1){const{colspan:h,colwidth:g}=a.child(f).attrs;for(let m=0;m<h;m+=1,p+=1){const w=l===p?r:g&&g[m],S=w?`${w}px`:"";if(s+=w||o,w||(c=!1),i){if(i.style.width!==S){const[y,A]=re(o,w);i.style.setProperty(y,A)}i=i.nextSibling}else{const y=document.createElement("col"),[A,R]=re(o,w);y.style.setProperty(A,R),t.appendChild(y)}}}for(;i;){var d;const f=i.nextSibling;(d=i.parentNode)===null||d===void 0||d.removeChild(i),i=f}const u=e.attrs.style&&typeof e.attrs.style=="string"&&/\bwidth\s*:/i.test(e.attrs.style);c&&!u?(n.style.width=`${s}px`,n.style.minWidth=""):(n.style.width="",n.style.minWidth=`${s}px`)}var Zt=class{constructor(e,t,n,o={}){this.node=e,this.cellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table"));for(const[l,r]of Object.entries(o))r!=null&&(l==="style"?this.table.style.cssText=String(r):this.table.setAttribute(l,String(r)));e.attrs.style&&(this.table.style.cssText=e.attrs.style),this.colgroup=this.table.appendChild(document.createElement("colgroup")),ye(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!==this.node.type?!1:(this.node=e,ye(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){const t=e.target,n=this.dom.contains(t),o=this.contentDOM.contains(t);return!!(n&&!o&&(e.type==="attributes"||e.type==="childList"||e.type==="characterData"))}};function en(e,t,n,o){let l=0,r=!0;const s=[],c=e.firstChild;if(!c)return{};for(let d=0,u=0;d<c.childCount;d+=1){const{colspan:f,colwidth:p}=c.child(d).attrs;for(let h=0;h<f;h+=1,u+=1){const g=n===u?o:p&&p[h];l+=g||t,g||(r=!1);const[m,w]=re(t,g);s.push(["col",{style:`${m}: ${w}`}])}}const i=r?`${l}px`:"",a=r?"":`${l}px`;return{colgroup:["colgroup",{},...s],tableWidth:i,tableMinWidth:a}}function Ae(e,t){return e.createAndFill()}function tn(e){if(e.cached.tableNodeTypes)return e.cached.tableNodeTypes;const t={};return Object.keys(e.nodes).forEach(n=>{const o=e.nodes[n];o.spec.tableRole&&(t[o.spec.tableRole]=o)}),e.cached.tableNodeTypes=t,t}function nn(e,t,n,o,l){const r=tn(e),s=[],c=[];for(let a=0;a<n;a+=1){const d=Ae(r.cell);if(d&&c.push(d),o){const u=Ae(r.header_cell);u&&s.push(u)}}const i=[];for(let a=0;a<t;a+=1)i.push(r.row.createChecked(null,o&&a===0?s:c));return r.table.createChecked(null,i)}function on(e){return e instanceof b}const V=({editor:e})=>{const{selection:t}=e.state;if(!on(t))return!1;let n=0;const o=q(t.ranges[0].$from,l=>l.type.name==="table");return o?.node.descendants(l=>{if(l.type.name==="table")return!1;["tableCell","tableHeader"].includes(l.type.name)&&(n+=1)}),n!==t.ranges.length?!1:(e.commands.deleteTable(),!0)};function Se(e,t){const n=e.mapping.map(t),o=q(e.selection.$from,s=>s.type.name==="table");if(o?.pos===n)return;const l=e.doc.nodeAt(n);if(!l)return;const r=n+l.nodeSize-1;e.setSelection(H.near(e.doc.resolve(r),-1))}function ln(e){let t="",n=0;for(;n<e.length;){if(e[n]==="\\"&&n+1<e.length){t+=e[n]+e[n+1],n+=2;continue}if(e[n]!=="`"){t+=e[n++];continue}let o=0;for(;n+o<e.length&&e[n+o]==="`";)o+=1;let l=n+o,r=!1;for(;l<e.length;){if(e[l]!=="`"){l+=1;continue}let s=0;for(;l+s<e.length&&e[l+s]==="`";)s+=1;if(s===o){const c=e.slice(n+o,l);t+=e.slice(n,n+o)+c.replace(/\\\||\|/g,i=>i==="|"?"\\|":i)+e.slice(l,l+o),n=l+o,r=!0;break}l+=s}r||(t+=e.slice(n,n+o),n+=o)}return t}function rn(e){return e.split(`
|
|
2
2
|
`).map(t=>!t.includes("|")||!t.includes("`")?t:ln(t)).join(`
|
|
3
3
|
`)}function sn(e){return(e||"").replace(/\s+/g," ").trim()}function cn(e,t,n={}){var o;const l=(o=n.cellLineSeparator)!==null&&o!==void 0?o:"";if(!e||!e.content||e.content.length===0)return"";const r=[];e.content.forEach(h=>{const g=[];h.content&&h.content.forEach(m=>{let w="";m.content&&Array.isArray(m.content)&&m.content.length>1?w=m.content.map(R=>t.renderChildren(R)).join(l):w=m.content?t.renderChildren(m.content):"";const S=sn(w.split(l).join(`
|
|
4
4
|
`).replace(/[ \t]*\r?\n[ \t]*/g,"<br>")),y=m.type==="tableHeader",A=qt(m.attrs);g.push({text:S,isHeader:y,align:A})}),r.push(g)});const s=r.reduce((h,g)=>Math.max(h,g.length),0);if(s===0)return"";const c=Array.from({length:s}).fill(0);r.forEach(h=>{for(let m=0;m<s;m+=1){var g;const w=(((g=h[m])===null||g===void 0?void 0:g.text)||"").length;w>c[m]&&(c[m]=w),c[m]<3&&(c[m]=3)}});const i=(h,g)=>h+" ".repeat(Math.max(0,g-h.length)),a=r[0],d=a.some(h=>h.isHeader),u=Array.from({length:s}).fill(null);r.forEach(h=>{for(let m=0;m<s;m+=1){var g;!u[m]&&(!((g=h[m])===null||g===void 0)&&g.align)&&(u[m]=h[m].align)}});let f=`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as ue,r as xe,d as ns,a4 as ht,b as Pe,j as t,B as je,t as dt,bu as Yt,ak as as,K as bt,i as Et,a5 as As,m as ot,gD as _s,o as cs,h as Ks,dY as Us,ab as Vs,L as qs,u as Hs,n as _t,E as Wt,R as Bs,dS as Js,hd as Gs,T as Qs,W as Ys,I as Xt}from"./index-
|
|
1
|
+
import{c as ue,r as xe,d as ns,a4 as ht,b as Pe,j as t,B as je,t as dt,bu as Yt,ak as as,K as bt,i as Et,a5 as As,m as ot,gD as _s,o as cs,h as Ks,dY as Us,ab as Vs,L as qs,u as Hs,n as _t,E as Wt,R as Bs,dS as Js,hd as Gs,T as Qs,W as Ys,I as Xt}from"./index-CHOxYhnv.js";import{S as Ws}from"./search-input-CxzHzt1i.js";import{E as Ht}from"./empty-state-DDTtYKkY.js";import{R as Xs}from"./require-capability-DR3oejOb.js";import{f as js}from"./pair-BoFr4FJb.js";import{b as ts}from"./use-connection-D0bmffUK.js";import{g as Ps}from"./connection-slug-D2uNKvQr.js";import{B as Lt}from"./badge-lysbeP9P.js";import{P as ds,a as ms,b as us}from"./popover-AfVmBiXN.js";import{c as Pt,T as Dt,a as Rt,b as Zs}from"./tooltip-D2JXB44W.js";import{G as fs,e as Ut,bX as el,aN as Ns,a0 as tl}from"./agent-icon-C-RKmmDR.js";import{i as sl}from"./Key01-BUefgO6r.js";import{i as ll}from"./Play-QQIqJKj8.js";import{MonacoCodeEditor as bs}from"./monaco-editor-CRckTkcR.js";import{u as rl}from"./use-mcp-client-CAI0PiRc.js";import{a as il}from"./repository-binding-zOZEsVNQ.js";import{n as Ot}from"./LinkBroken01-Beajkv8Y.js";import{c as ol}from"./SwitchHorizontal01-Be5wnM3M.js";import{s as nl}from"./Plus-jqQtsDrV.js";import{s as al}from"./Trash01-D4h16nnS.js";import{M as zt}from"./multi-select-B_Fvyk0J.js";import{b as yt,a as wt,c as ze,d as St,S as Ct}from"./select-oOpcW8y8.js";import{e as ys,T as cl}from"./time-range-picker-DBVsSx_d.js";import{T as dl}from"./textarea-DiKdmgZC.js";import{C as Ds}from"./collection-tabs-BNEX9U1D.js";import{S as ml}from"./switch-DCbfNrSN.js";import{L as ul}from"./label-B6kbb_qI.js";import{I as It}from"./integration-icon-CM5LyK_z.js";import{A as fl,a as xl,b as pl}from"./alert-DejWJPEC.js";import{K as gt}from"./monitoring-stats-row-CCOAzga2.js";import{b as Bt}from"./use-entitlements-npCYsfMp.js";import{g as gl,b as ws,f as Nt,c as Zt,d as hl,e as Ss,a as xs,h as vl,i as ps,T as jl,j as Nl,r as bl,k as yl}from"./thread-sheet-body-DcJJrL4A.js";import{u as wl}from"./useSuspenseInfiniteQuery-BEaEPCKW.js";import{c as Sl,S as Cl,b as Rs,a as Ls}from"./sheet-B4sQvcZD.js";import{c as _e,b as vt,d as Jt,e as Gt,T as ge,a as Qt}from"./table-BdoV93HO.js";import{n as ss,t as ls}from"./ChevronUp-yM6kuF7B.js";import{u as Os}from"./use-id-selection-DwyVyKTM.js";import{u as Fs}from"./use-infinite-scroll-6BCwcRG9.js";import{u as Il}from"./useInfiniteQuery-Cr6l3hRz.js";import{g as Tl}from"./task-status-BvghF77r.js";import{u as kl,d as Ml}from"./use-automations-D6sbYMe4.js";import{A as _l}from"./automation-runs-Pz0rgqnE.js";import{i as Pl}from"./ArrowLeft-DwK9IQqr.js";import{E as Cs}from"./empty-state-BwFbOlsH.js";import{O as $s}from"./watch-sse-pool-Gp1E8HHl.js";import{t as Dl}from"./task-key-BCHdFiOO.js";import{b as Rl,r as Ll,O as Ol,e as Fl}from"./order-monitor-day-Cp9FGnxW.js";import{F as $l}from"./feature-gate-CEBXLuF8.js";import"./SearchMd--9oaPr0p.js";import"./access-gate-COWmI5bk.js";import"./capability-load-error-zDoTf-tr.js";import"./Tool01-C_vFDQiZ.js";import"./collapsible-Ck6jFTQH.js";import"./use-copy-BMjPWKp8.js";import"./usage-stats-PiJNBrSI.js";import"./tool-namespace-BOC8taOg.js";import"./form-DddGN9Yh.js";import"./utils-CVEq3hMx.js";import"./markdown-Deyw3r6u.js";import"./chat-context-o9Pyy_rd.js";import"./use-view-draft-kind-By-WcYfU.js";import"./thread-route-CVZs3lS7.js";import"./use-project-scope-BTU4ukSL.js";import"./use-organization-settings-04SG-hKv.js";import"./schema-BB8zKrPl.js";import"./task-board--eP68xys.js";import"./thread-intent-otNmUDpT.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./use-ai-providers-BJRvsFFm.js";import"./use-decopilot-events-Bvlss2N9.js";import"./use-mobile-DlyIeamj.js";import"./shell-layout-C4gugWKg.js";import"./Globe04-CpMO0Sfn.js";import"./UserSquare-DomA7Npc.js";import"./use-deployment-admin-BLMaSYC-.js";import"./admin-fetch-BhTJlAsX.js";import"./XClose-DsOcImLD.js";import"./CheckCircle-CpYSXUlJ.js";import"./Monitor01-6Z9BL4ul.js";import"./Zap-CXSu8byh.js";import"./command-CnhVLB17.js";import"./index-BNwuaZhD.js";import"./project-icon-D_A1aREs.js";import"./use-navigate-to-agent-rf_XQPo1.js";import"./use-debounced-value-CoBOVCcY.js";import"./new-project-dialog-C9WcHYrC.js";import"./repository-picker-DQ8Ce_c3.js";import"./github-icon-CBn2nQtJ.js";import"./collection-search-Cr2_Tgzy.js";import"./BookOpen01-CCzJ3iHg.js";import"./ShoppingBag01-DWT7jnvZ.js";import"./legacy-admin-welcome-dialog-C1EB7MCq.js";import"./drawer-Donq2Zq_.js";import"./required-auth-layout-D8CrwDut.js";import"./use-org-sso-Bz3FXaUK.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-CEhql9SF.js";import"./types-BQyA3BSs.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./AlertCircle-BHOdje2-.js";import"./use-mcp-prompts-DqQEh2Qr.js";import"./use-thread-outputs-DcXhIS9K.js";import"./file-type-icon-D4Edy8Bo.js";import"./index-BZdAVrUU.js";import"./ArrowUp-BKp-bI0t.js";import"./ChevronSelectorVertical-BfPzQt1M.js";import"./CreditCard01-ClPhtnpy.js";import"./Minus-CkHBDYFP.js";import"./Sun-CBa0lZzX.js";import"./Upload01-DLWP4rJI.js";import"./Users01-DQk985Hj.js";import"./editor-BRySXv_B.js";import"./auth-DQhl82rC.js";import"./checkbox-BgJ_rDKP.js";import"./index-BdQq_4o_.js";import"./scroll-area-w2Fr7CkP.js";import"./calendar-RFGSgZO6.js";import"./chart-Y23GGTjZ.js";import"./CategoricalChart-BH2fCBYy.js";import"./index-jntxieqb.js";import"./tooltipContext-DFFEsXAa.js";import"./CartesianChart-DcsXR4up.js";import"./AreaChart--NTdNKkN.js";import"./infiniteQueryObserver-Sb4-Zoh0.js";import"./useQueries-tOLR6QE3.js";import"./ReferenceLine-65eMf_HF.js";import"./feature-paywall-DKb-BDqu.js";import"./plan-ladder-D1iTEGuZ.js";const rs={maxJsonRenderSize:5e4,pageSize:50,streamingRefetchInterval:3e3},zl=["eq","contains","exists","in"];function El(s){return zl.includes(s)}function jt(s){return s.filter(e=>e.key.trim()).map(e=>{const l=encodeURIComponent(e.key.trim()),i=encodeURIComponent(e.value||"");return`${l}:${e.operator}:${i}`}).join(",")}function Al(s){return!s||typeof s!="string"?[]:s.split(",").map(e=>{if(!e)return;const[l,i,...m]=e.split(":"),n=l?decodeURIComponent(l):"";if(n.trim())return{key:n,operator:i&&El(i)?i:"eq",value:decodeURIComponent(m.join(":")||"")}}).filter(e=>e!==void 0)}function Vt(s){return s.filter(e=>e.key.trim()).map(e=>{switch(e.operator){case"eq":return`${e.key}=${e.value}`;case"contains":return`${e.key}~${e.value}`;case"exists":return`${e.key}?`;case"in":return`${e.key}@${e.value}`}}).join(`
|
|
2
2
|
`)}function Is(s){return s.trim()?s.split(`
|
|
3
3
|
`).map(e=>e.trim()).filter(e=>e.length>0).map(e=>{if(e.endsWith("?"))return{key:e.slice(0,-1),operator:"exists",value:""};if(e.includes("=")){const[l,...i]=e.split("=");return{key:l||"",operator:"eq",value:i.join("=")}}if(e.includes("~")){const[l,...i]=e.split("~");return{key:l||"",operator:"contains",value:i.join("~")}}if(e.includes("@")){const[l,...i]=e.split("@");return{key:l||"",operator:"in",value:i.join("@")}}return{key:e,operator:"exists",value:""}}):[]}function Kl(s){const e={},l={},i=[],m={};for(const n of s)if(n.key.trim())switch(n.operator){case"eq":n.value&&(e[n.key]=n.value);break;case"contains":n.value&&(l[n.key]=`%${n.value}%`);break;case"exists":i.push(n.key);break;case"in":n.value&&(m[n.key]=n.value);break}return{properties:Object.keys(e).length>0?e:void 0,propertyPatterns:Object.keys(l).length>0?l:void 0,propertyKeys:i.length>0?i:void 0,propertyInValues:Object.keys(m).length>0?m:void 0}}function Ts(s){if(!s)return{content:"null",isTruncated:!1,originalSize:4};const e=s._decocms_truncated;if(typeof e=="string"&&e.length>0)return{content:e,isTruncated:!0,originalSize:e.length};let l;try{l=JSON.stringify(s,null,2)}catch{return{content:"[Unable to serialize JSON]",isTruncated:!1,originalSize:0}}const i=l.length;return i<=rs.maxJsonRenderSize?{content:l,isTruncated:!1,originalSize:i}:{content:l.slice(0,rs.maxJsonRenderSize)+`
|
|
4
4
|
|