decocms 3.1.1 → 3.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-CxNILHAI.js → AlertCircle-ByuuAmrP.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-CFrvlSKb.js → ArrowUpRight-7eXsw1ql.js} +1 -1
- package/dist/client/assets/{Check-BeL4GS1_.js → Check-BbSnE7nF.js} +1 -1
- package/dist/client/assets/{CheckCircle-CBRDCM9J.js → CheckCircle-Ca1wJWW6.js} +1 -1
- package/dist/client/assets/{ChevronDown-MTne56XS.js → ChevronDown-B3TWWBuw.js} +1 -1
- package/dist/client/assets/ChevronLeft-CuRKchB5.js +1 -0
- package/dist/client/assets/{ChevronRight-CvPPvt0o.js → ChevronRight-CYgA53ZB.js} +1 -1
- package/dist/client/assets/{ChevronUp-YTSuZxrL.js → ChevronUp-0T6APBSE.js} +1 -1
- package/dist/client/assets/{Container-Bit7n1Sh.js → Container-RPSmr1XN.js} +1 -1
- package/dist/client/assets/{DotsVertical-B4Bc-DLw.js → DotsVertical-BQNv4yup.js} +1 -1
- package/dist/client/assets/{Eye-Ds4VIJhE.js → Eye-CNWO8gM7.js} +1 -1
- package/dist/client/assets/{FilterLines-BFeQ9DcO.js → FilterLines-Cpimx7eF.js} +1 -1
- package/dist/client/assets/{Globe01-BQzG3iWN.js → Globe01-C0ij8Y-s.js} +1 -1
- package/dist/client/assets/{HardDrive-DTFLQufl.js → HardDrive-ChaMHCwz.js} +1 -1
- package/dist/client/assets/{Key01-4js0dcqW.js → Key01-Bfuisq2G.js} +1 -1
- package/dist/client/assets/{LinkExternal01-BhtjVlM2.js → LinkExternal01-BDqI6g0z.js} +1 -1
- package/dist/client/assets/{Monitor01-BVdINEC9.js → Monitor01-CcL8iOzY.js} +1 -1
- package/dist/client/assets/{Palette-BesE5Pxh.js → Palette-DKpoyUgd.js} +1 -1
- package/dist/client/assets/{Play-lA-ptqjk.js → Play-Bb6uueKI.js} +1 -1
- package/dist/client/assets/{Plus-qO_BvdHx.js → Plus-CZ_sF7TZ.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-B128IIDx.js → RefreshCcw01-BPWCc7Ui.js} +1 -1
- package/dist/client/assets/{SearchMd-BtButnkh.js → SearchMd-BFlkVflN.js} +1 -1
- package/dist/client/assets/{Settings02-MdBElcG9.js → Settings02-Ch7efITK.js} +1 -1
- package/dist/client/assets/{Shield01-D8p4DW6d.js → Shield01-rrS6w-7t.js} +1 -1
- package/dist/client/assets/{Star01-COGAy9Dv.js → Star01-CNXX9diU.js} +1 -1
- package/dist/client/assets/{Stars01-DTRRtAlI.js → Stars01-BQswryR6.js} +1 -1
- package/dist/client/assets/{Stars02-BcY_Drly.js → Stars02-CSL2rgyN.js} +1 -1
- package/dist/client/assets/{Sun-Bas_PynU.js → Sun-Ck3cYoCA.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-CxmKybBS.js → SwitchHorizontal01-DsrQHrpb.js} +1 -1
- package/dist/client/assets/{Tool01-BkMOx_Zg.js → Tool01-Cjv1XJEb.js} +1 -1
- package/dist/client/assets/{Trash01-Bn69e6b9.js → Trash01-CxCHXGOx.js} +1 -1
- package/dist/client/assets/{Upload01-CIZcbYFv.js → Upload01-CeYSkJhe.js} +1 -1
- package/dist/client/assets/{User01-2zSxOgFX.js → User01-DrA8Lgm7.js} +1 -1
- package/dist/client/assets/{Users01-DgModWg5.js → Users01-3z4KNhww.js} +1 -1
- package/dist/client/assets/{Users03-Cz4uncjJ.js → Users03-C9tAd5Ba.js} +1 -1
- package/dist/client/assets/{X-CE3UzM4P.js → X-DSdGdxng.js} +1 -1
- package/dist/client/assets/{XCircle-1-iiLXjU.js → XCircle--wEB3Wnr.js} +1 -1
- package/dist/client/assets/{XClose-g9G_Zn7s.js → XClose-SBhbV0jV.js} +1 -1
- package/dist/client/assets/{Zap-C8mTTKvq.js → Zap-BRXknHpU.js} +1 -1
- package/dist/client/assets/ZapSquare-DW4J95z9.js +1 -0
- package/dist/client/assets/ZoomOut-1w3s7N6o.js +1 -0
- package/dist/client/assets/{access-gate-DgvEg9zV.js → access-gate-DUP-FMW_.js} +1 -1
- package/dist/client/assets/accordion-Bu_taiZe.js +1 -0
- package/dist/client/assets/add-section-modal-BvFEBv0h.js +1 -0
- package/dist/client/assets/{agent-capabilities-DDgUvP6S.js → agent-capabilities-DbMxSg-C.js} +1 -1
- package/dist/client/assets/agent-icon-DkS6Ap-C.js +1 -0
- package/dist/client/assets/{agent-icons-B5BeKXhV.js → agent-icons-BU8H-xTW.js} +1 -1
- package/dist/client/assets/agents-list-DVZwv3E6.js +1 -0
- package/dist/client/assets/{ai-providers-CfrS7pK8.js → ai-providers-agn-dcob.js} +1 -1
- package/dist/client/assets/{alert-D25zRMkS.js → alert-DN73WALn.js} +1 -1
- package/dist/client/assets/{alert-dialog-CTHJKvkc.js → alert-dialog-Bw7NBbRz.js} +1 -1
- package/dist/client/assets/app-editor-BuMABOjf.js +1 -0
- package/dist/client/assets/{auth-catchall-DbQXTRY4.js → auth-catchall-BlJ-5WHw.js} +1 -1
- package/dist/client/assets/{auth-split-layout-CwF9ktSf.js → auth-split-layout-Dzm1aPH4.js} +1 -1
- package/dist/client/assets/{automation-list-row-DgdQ33ky.js → automation-list-row-C3x-E244.js} +1 -1
- package/dist/client/assets/{automation-runs-DwVMM_f5.js → automation-runs-CTZmIulC.js} +1 -1
- package/dist/client/assets/automations-S87NSt_f.js +1 -0
- package/dist/client/assets/{avatar-CFfnEc-J.js → avatar-6TETgWGc.js} +1 -1
- package/dist/client/assets/{badge-C7r7dui9.js → badge-B8xisPo_.js} +1 -1
- package/dist/client/assets/{brand-context-CFlEXUcG.js → brand-context-Mfgei73B.js} +1 -1
- package/dist/client/assets/{buckets-DOpWF-IW.js → buckets-CVy4SLLv.js} +1 -1
- package/dist/client/assets/calendar-BvvsEYKA.js +1 -0
- package/dist/client/assets/{capability-load-error-HBMyqEVf.js → capability-load-error-VErw4nLB.js} +1 -1
- package/dist/client/assets/{card-CQeAx3Vx.js → card-XQIiSY-b.js} +1 -1
- package/dist/client/assets/{chat-context-CoDmdsVu.js → chat-context-DzUbC-xr.js} +1 -1
- package/dist/client/assets/{checkbox-BnUvD6mT.js → checkbox-Bpq-GtnK.js} +1 -1
- package/dist/client/assets/{cli-auth-success-DgBMSypx.js → cli-auth-success-BrX77bKE.js} +1 -1
- package/dist/client/assets/collection-detail-Dvs8YEXJ.js +1 -0
- package/dist/client/assets/{collection-display-button-C8INbai1.js → collection-display-button-B3IAyNvh.js} +1 -1
- package/dist/client/assets/{collection-search-djXmBIPE.js → collection-search-Dnrehh9Y.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-FUroqPQm.js → collection-table-wrapper-UpBeyOT3.js} +1 -1
- package/dist/client/assets/{collection-tabs-Bs1OSqt5.js → collection-tabs-CoI7UjOp.js} +1 -1
- package/dist/client/assets/{collections-CtABKNH_.js → collections-B7jkmTPa.js} +1 -1
- package/dist/client/assets/{command-BHuJVvxL.js → command-B39UMlEv.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-Bgqlrqoq.js → connect-desktop-dialog-B_fv-zC_.js} +1 -1
- package/dist/client/assets/{connection-card-DRDylcCs.js → connection-card-BxD3hzYk.js} +1 -1
- package/dist/client/assets/connection-detail-Bi7jbI9b.js +1 -0
- package/dist/client/assets/{connection-form-helpers-D5CHE7dE.js → connection-form-helpers-qDos9L_s.js} +1 -1
- package/dist/client/assets/connections-qXvhTW3S.js +1 -0
- package/dist/client/assets/{constants-BYh-snCd.js → constants-_OexfFJl.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-0-0bl-bw.js → decopilot-sse-pool-B9TJutJ9.js} +1 -1
- package/dist/client/assets/dialog-N8dYL9IV.js +1 -0
- package/dist/client/assets/{domain-settings-Bj0SU3Jh.js → domain-settings-BMZMOFLc.js} +1 -1
- package/dist/client/assets/{drawer-Dep0gGKV.js → drawer-BDyeiuJ6.js} +1 -1
- package/dist/client/assets/{dropdown-menu-CtbTHljl.js → dropdown-menu-Jaik1o9W.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-DFDLPUiJ.js → dynamic-plugin-layout-CGMYG2P8.js} +1 -1
- package/dist/client/assets/{empty-state-C4k8yJuW.js → empty-state-BIZp3Wzl.js} +1 -1
- package/dist/client/assets/{empty-state-AxYPR9mA.js → empty-state-DmuFPxSA.js} +1 -1
- package/dist/client/assets/{extract-connection-data-BEWjJFKe.js → extract-connection-data-BMrTOxqq.js} +1 -1
- package/dist/client/assets/{features-BAJOu4LV.js → features-RZhE2UVO.js} +1 -1
- package/dist/client/assets/file-explorer-eWHbqcdV.js +2 -0
- package/dist/client/assets/{file-type-icon-DdVRbJPB.js → file-type-icon-Bscuxmvi.js} +1 -1
- package/dist/client/assets/{files-BOX6m6w-.js → files-C6VU3gjR.js} +1 -1
- package/dist/client/assets/{form-CpQMhVrb.js → form-BzUl5L3O.js} +1 -1
- package/dist/client/assets/{general-DL2gq1lt.js → general-FkmFS6e6.js} +1 -1
- package/dist/client/assets/{generate-id-C_OqT9sT.js → generate-id-BHkehxKG.js} +1 -1
- package/dist/client/assets/{github-repo-picker-CkY8kpmI.js → github-repo-picker-BFiC9cbF.js} +1 -1
- package/dist/client/assets/header-tab-button-CeJ9c_tl.js +3 -0
- package/dist/client/assets/{hover-card-IdAGrE8c.js → hover-card-Cd5Q8igo.js} +1 -1
- package/dist/client/assets/{image-field-CCXEEm_r.js → image-field-UZAPAOOz.js} +1 -1
- package/dist/client/assets/{index-DRtry2B5.js → index-3PLXj9NO.js} +24 -26
- package/dist/client/assets/index-B8ILnfS6.js +1 -0
- package/dist/client/assets/{index-Bc32gYoS.js → index-BLB4nIBt.js} +1 -1
- package/dist/client/assets/index-BLLBrYfT.js +11 -0
- package/dist/client/assets/{index-DsSC-nYU.js → index-BQjzxwMq.js} +1 -1
- package/dist/client/assets/{index-tFqoM1Ue.js → index-BUA93rVM.js} +1 -1
- package/dist/client/assets/index-CEk4GIBJ.js +1 -0
- package/dist/client/assets/{index-Br_CKeN5.js → index-CUwWwcrX.js} +1 -1
- package/dist/client/assets/{index-BtsB6V7_.js → index-CVcc7k1H.js} +2 -2
- package/dist/client/assets/{index-BjwVvH1j.js → index-CXD35HrY.js} +4 -4
- package/dist/client/assets/{index-A1X2xYA3.js → index-CapCq4uG.js} +1 -1
- package/dist/client/assets/index-Dc-40HGd.js +3 -0
- package/dist/client/assets/{index-Clwo7vBK.js → index-Du62ET2a.js} +3 -3
- package/dist/client/assets/index-DzP6PZZ7.css +1 -0
- package/dist/client/assets/{index-BmWH7CJj.js → index-WmwIsUVI.js} +1 -1
- package/dist/client/assets/{index-D3GsqLC9.js → index-meHkju0S.js} +1 -1
- package/dist/client/assets/{index-redirect-D9hGZXDU.js → index-redirect-DDOXoojV.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-zIrc5Qb-.js → infiniteQueryObserver-CGU6vZCH.js} +1 -1
- package/dist/client/assets/{input-TCcH2B8J.js → input-C9wjfV7v.js} +1 -1
- package/dist/client/assets/{integration-icon-5HuLoYU0.js → integration-icon-DsMTB170.js} +1 -1
- package/dist/client/assets/{label-BViApHhU.js → label-g7qALGmg.js} +1 -1
- package/dist/client/assets/{layout-B9a5IDDQ.js → layout-bDoXge5D.js} +1 -1
- package/dist/client/assets/{login-D3EioMPr.js → login-CPZKVFaQ.js} +1 -1
- package/dist/client/assets/{members-CN5s--K8.js → members-DWt34Meb.js} +1 -1
- package/dist/client/assets/monaco-editor-CIVDk0X4.js +9 -0
- package/dist/client/assets/{monitoring-stats-row-DGR7pZ3H.js → monitoring-stats-row-DVsMM237.js} +1 -1
- package/dist/client/assets/{oauth-callback-DcFJji4Y.js → oauth-callback-CSUHKD_o.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-D9t9n8Ym.js → oauth-callback-ai-provider-BlWETFFP.js} +1 -1
- package/dist/client/assets/{onboarding-DHTDbj5z.js → onboarding-D5Ic9zJG.js} +1 -1
- package/dist/client/assets/{org-install-CIdRAEm2.js → org-install-Bn_KoOXH.js} +1 -1
- package/dist/client/assets/{org-layout-DRc-KmSs.js → org-layout-BELYI7z_.js} +1 -1
- package/dist/client/assets/{org-plugin-layout-DgmQetHp.js → org-plugin-layout-WHwrW77i.js} +1 -1
- package/dist/client/assets/{page-seo-form-D5SZyBD6.js → page-seo-form-Rig1soEP.js} +1 -1
- package/dist/client/assets/page-seo-sheet-Bf_FSOof.js +1 -0
- package/dist/client/assets/{pair-Dm3vXKHB.js → pair-zYr2GmQ7.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-Bf9odw8A.js → plugin-empty-state-CaWAfurE.js} +1 -1
- package/dist/client/assets/{plugin-header-Cq5KYo9E.js → plugin-header-BD-ptlOP.js} +1 -1
- package/dist/client/assets/{plugin-layout-BkNnTwna.js → plugin-layout-CIQ_MNTQ.js} +1 -1
- package/dist/client/assets/{popover-B1dASX2L.js → popover-OD-r-fVD.js} +1 -1
- package/dist/client/assets/{post-editor-3e4Nt15j.js → post-editor-Ww43847q.js} +2 -2
- package/dist/client/assets/{primitives-uPNqrnk9.js → primitives-BkhZbhaK.js} +1 -1
- package/dist/client/assets/{profile-BgHkQW0e.js → profile-DScmkuI4.js} +1 -1
- package/dist/client/assets/project-app-view-DRVCBkTN.js +1 -0
- package/dist/client/assets/record-editor-DNW7IuYT.js +1 -0
- package/dist/client/assets/registry-BDe37MkZ.js +2 -0
- package/dist/client/assets/{registry-layout-B1Hpl1yP.js → registry-layout-aQVqpLkk.js} +1 -1
- package/dist/client/assets/{require-capability-KE97O8Qd.js → require-capability-B83Rfplv.js} +1 -1
- package/dist/client/assets/{required-auth-layout-czExuZSc.js → required-auth-layout-DCPdZlSg.js} +1 -1
- package/dist/client/assets/{reset-password-BKRGZfbP.js → reset-password-BSCF-TYh.js} +1 -1
- package/dist/client/assets/resizable-BT2keVUf.js +1 -0
- package/dist/client/assets/roles-DDxTqNFx.js +1 -0
- package/dist/client/assets/{save-status-CPJd6ss9.js → save-status-BWK9t34W.js} +1 -1
- package/dist/client/assets/schema-form-DMN65tMe.js +1 -0
- package/dist/client/assets/{scroll-area-DZWAWvpP.js → scroll-area-huDDjp9h.js} +2 -2
- package/dist/client/assets/{search-input-CdCRzERo.js → search-input-Bo1czWuc.js} +1 -1
- package/dist/client/assets/{secrets-cR95slO6.js → secrets-BSGdlXxl.js} +1 -1
- package/dist/client/assets/{sections-editor-CvNT1WLU.js → sections-editor-Kc6kOt9I.js} +2 -2
- package/dist/client/assets/{select-DNVrcssU.js → select-D_rADyeN.js} +1 -1
- package/dist/client/assets/{select-model-B69NuWL6.js → select-model-D4qI7a0H.js} +1 -1
- package/dist/client/assets/seo-editor-GY9idGrl.js +1 -0
- package/dist/client/assets/settings-layout-B0Ul5kvB.js +1 -0
- package/dist/client/assets/{settings-section-Q3UDwB5x.js → settings-section-DMc4s0vU.js} +1 -1
- package/dist/client/assets/{sheet-Du3LaF1v.js → sheet-Pz5-NB3k.js} +1 -1
- package/dist/client/assets/{shell-controls-Bk3erCNC.js → shell-controls-C0ImSETI.js} +1 -1
- package/dist/client/assets/{shell-layout-D_pe8ifX.js → shell-layout-Dgdt_8rv.js} +1 -1
- package/dist/client/assets/{shell-route-loading-BoEMybHy.js → shell-route-loading-CB1BVSfX.js} +1 -1
- package/dist/client/assets/{sidebar-Dd570BWA.js → sidebar-B-j-nI2l.js} +1 -1
- package/dist/client/assets/{skeleton-IVNi55cd.js → skeleton-DIe_hcjh.js} +1 -1
- package/dist/client/assets/{sortable.esm-B3QQU5eL.js → sortable.esm-DY8YVkDQ.js} +1 -1
- package/dist/client/assets/{spinner-DYX6X7R4.js → spinner-B0UNMt-U.js} +1 -1
- package/dist/client/assets/{sso-j3NAsCEv.js → sso-B0wN1G0O.js} +1 -1
- package/dist/client/assets/{store-BgMFXMyn.js → store-Ck7Guxqc.js} +1 -1
- package/dist/client/assets/store-registry-CFkyafgO.js +2 -0
- package/dist/client/assets/{switch-v-IGg8-o.js → switch-CCm7Q442.js} +1 -1
- package/dist/client/assets/{tab-id-9wF6NJdU.js → tab-id-Bw_e4wJV.js} +1 -1
- package/dist/client/assets/{table-DPhKP8io.js → table-BYsCVFvU.js} +1 -1
- package/dist/client/assets/{tabs-DiXWlenI.js → tabs-DU8yElp1.js} +1 -1
- package/dist/client/assets/{task-status-X6M92gi6.js → task-status-DukwwWFW.js} +1 -1
- package/dist/client/assets/{textarea-C5Q-gAUC.js → textarea-Bg3_-gyq.js} +1 -1
- package/dist/client/assets/{toggle-group-CinhryiV.js → toggle-group-D3JRSHCm.js} +1 -1
- package/dist/client/assets/toolbar-BcNvXnW_.js +1 -0
- package/dist/client/assets/{tools-list-BQckCc_7.js → tools-list-D-XUldpQ.js} +1 -1
- package/dist/client/assets/{tooltip-DlPcHg_7.js → tooltip-BLOVWRLB.js} +1 -1
- package/dist/client/assets/{types-CxzjkgWq.js → types-BDkt4vmT.js} +1 -1
- package/dist/client/assets/{use-ai-providers-WePD6A-o.js → use-ai-providers-D8uqA8F3.js} +1 -1
- package/dist/client/assets/{use-automations-BoufmASv.js → use-automations-B9xj4bsi.js} +1 -1
- package/dist/client/assets/{use-capability-Cy5OhZ8q.js → use-capability-D90XVo0g.js} +1 -1
- package/dist/client/assets/{use-collections-CBTBl02k.js → use-collections-DoCz8MGT.js} +1 -1
- package/dist/client/assets/{use-connection-ByC-72lH.js → use-connection-BP0gNEj8.js} +1 -1
- package/dist/client/assets/{use-copy-CG7aV8Bw.js → use-copy-QEEDdK3_.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-C-9PxkTd.js → use-create-virtual-mcp-BH7S5Lx3.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DzWM-CGc.js → use-debounced-autosave-CiGa02ts.js} +1 -1
- package/dist/client/assets/{use-delete-connection-DRg_9jbq.js → use-delete-connection-ClZdPbyx.js} +1 -1
- package/dist/client/assets/{use-file-configs-BZO0VMnL.js → use-file-configs-DryWc5C3.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BqDKzW2x.js → use-infinite-scroll-G1byfuk0.js} +1 -1
- package/dist/client/assets/{use-list-state-BdNzxfM6.js → use-list-state-ao0R-NZI.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-BeFY3ScJ.js → use-mcp-prompts-Dsxmrp6C.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-G51_uFwc.js → use-mcp-tools-CP1ukXK9.js} +1 -1
- package/dist/client/assets/{use-members-BPoi4C1A.js → use-members-DJtUNna_.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-CtPEdzh1.js → use-navigate-to-agent-D4AslRZm.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-DdXOtn0H.js → use-org-auth-client-CxpHs_Vn.js} +1 -1
- package/dist/client/assets/{use-org-sso-fN4GsRuW.js → use-org-sso-RJt5vtQj.js} +1 -1
- package/dist/client/assets/{use-organization-roles-WXW_5wWn.js → use-organization-roles-B1v3SUrz.js} +1 -1
- package/dist/client/assets/{use-organization-settings-By_UmZEV.js → use-organization-settings-1zemtEzS.js} +1 -1
- package/dist/client/assets/{use-registry-connections-BkZ2ZOJD.js → use-registry-connections-Ex6acs_f.js} +1 -1
- package/dist/client/assets/{use-secrets-BJelzSB8.js → use-secrets-CIR-JEqt.js} +1 -1
- package/dist/client/assets/{use-status-sounds-DU2Ydnj4.js → use-status-sounds-DYoN9DxD.js} +1 -1
- package/dist/client/assets/{use-view-mode-DogmWo4G.js → use-view-mode-ZMLCKL2b.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-CT-9keNI.js → use-virtual-mcp-BRv_CvsW.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-Dsby0HYE.js +1 -0
- package/dist/client/assets/{useRouterState-CwEmwiBC.js → useRouterState-DNu2gJlX.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DMzYQ3Lt.js +1 -0
- package/dist/client/assets/{user-CoJ75n6g.js → user-CDUKY7Tn.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-Cab9lVhf.js → view-mode-toggle-DgZQSMnW.js} +1 -1
- package/dist/client/assets/workflow-H0Kk_Nq-.js +1 -0
- package/dist/client/assets/workflow-detail-G3IbeOSM.js +1 -0
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +576 -2930
- package/dist/server/server.js +296 -314
- package/package.json +1 -1
- package/dist/client/assets/ZapSquare-B6OY2f4C.js +0 -1
- package/dist/client/assets/ZoomOut-28hLmjYh.js +0 -1
- package/dist/client/assets/accordion-35QRcX3A.js +0 -1
- package/dist/client/assets/add-section-modal-DrradozH.js +0 -1
- package/dist/client/assets/agent-icon-Cskaw262.js +0 -1
- package/dist/client/assets/agents-list-VFl2m_9Z.js +0 -1
- package/dist/client/assets/app-editor-D4bXXFjO.js +0 -1
- package/dist/client/assets/automations-BEsJQmQT.js +0 -1
- package/dist/client/assets/calendar-DDYw9F8V.js +0 -1
- package/dist/client/assets/collection-detail-pzZ_eH5F.js +0 -1
- package/dist/client/assets/connection-detail-xAj5CM6r.js +0 -1
- package/dist/client/assets/connections-B2094sHk.js +0 -1
- package/dist/client/assets/dialog-B1WfX0fX.js +0 -1
- package/dist/client/assets/file-explorer-CaAsV_yv.js +0 -2
- package/dist/client/assets/file-preview-BGdcimIO.js +0 -1
- package/dist/client/assets/index-D-gelnlt.js +0 -2
- package/dist/client/assets/index-DvwFUL0N.js +0 -1
- package/dist/client/assets/index-NrIASxVs.js +0 -1
- package/dist/client/assets/index-uXid0yMu.css +0 -1
- package/dist/client/assets/monaco-editor-CE4b2z1c.js +0 -19
- package/dist/client/assets/page-seo-sheet-B7uG_k7J.js +0 -1
- package/dist/client/assets/project-app-view-DiTZBc1v.js +0 -1
- package/dist/client/assets/record-editor-jUcC7iQk.js +0 -1
- package/dist/client/assets/registry-gHvWojgu.js +0 -2
- package/dist/client/assets/roles-BGyrSjtm.js +0 -1
- package/dist/client/assets/schema-form-BLcU5y90.js +0 -1
- package/dist/client/assets/seo-editor-BlLr8Anw.js +0 -1
- package/dist/client/assets/settings-layout-JDfHTLLv.js +0 -1
- package/dist/client/assets/store-registry-BMLFpwYx.js +0 -2
- package/dist/client/assets/toolbar-CiwzJ7Ce.js +0 -1
- package/dist/client/assets/useInfiniteQuery-scYJJ_GM.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BDTBkP42.js +0 -1
- package/dist/client/assets/workflow-DmweYSPb.js +0 -1
- package/dist/client/assets/workflow-detail-Ce7Ha6ta.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as w,dv as $l,by as ju,j as O,aS as Hu,b1 as St,dw as Wu,a6 as it,a7 as Qe,bf as On,bc as Uu,bd as qu,bq as Mt,dp as Fl,af as _l,bb as Ku,ac as ut,e as Vl,c as jl}from"./index-BjwVvH1j.js";import{e as Ju}from"./select-DNVrcssU.js";function Q(n){this.content=n}Q.prototype={constructor:Q,find:function(n){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===n)return e;return-1},get:function(n){var e=this.find(n);return e==-1?void 0:this.content[e+1]},update:function(n,e,t){var r=t&&t!=n?this.remove(t):this,s=r.find(n),i=r.content.slice();return s==-1?i.push(t||n,e):(i[s+1]=e,t&&(i[s]=t)),new Q(i)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new Q(t)},addToStart:function(n,e){return new Q([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new Q(t)},addBefore:function(n,e,t){var r=this.remove(e),s=r.content.slice(),i=r.find(n);return s.splice(i==-1?s.length:i,0,e,t),new Q(s)},forEach:function(n){for(var e=0;e<this.content.length;e+=2)n(this.content[e],this.content[e+1])},prepend:function(n){return n=Q.from(n),n.size?new Q(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=Q.from(n),n.size?new Q(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=Q.from(n);for(var t=0;t<n.content.length;t+=2)e=e.remove(n.content[t]);return e},toObject:function(){var n={};return this.forEach(function(e,t){n[e]=t}),n},get size(){return this.content.length>>1}};Q.from=function(n){if(n instanceof Q)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new Q(e)};function Hl(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let s=n.child(r),i=e.child(r);if(s==i){t+=s.nodeSize;continue}if(!s.sameMarkup(i))return t;if(s.isText&&s.text!=i.text){for(let o=0;s.text[o]==i.text[o];o++)t++;return t}if(s.content.size||i.content.size){let o=Hl(s.content,i.content,t+1);if(o!=null)return o}t+=s.nodeSize}}function Wl(n,e,t,r){for(let s=n.childCount,i=e.childCount;;){if(s==0||i==0)return s==i?null:{a:t,b:r};let o=n.child(--s),l=e.child(--i),a=o.nodeSize;if(o==l){t-=a,r-=a;continue}if(!o.sameMarkup(l))return{a:t,b:r};if(o.isText&&o.text!=l.text){let c=0,u=Math.min(o.text.length,l.text.length);for(;c<u&&o.text[o.text.length-c-1]==l.text[l.text.length-c-1];)c++,t--,r--;return{a:t,b:r}}if(o.content.size||l.content.size){let c=Wl(o.content,l.content,t-1,r-1);if(c)return c}t-=a,r-=a}}class k{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,s=0,i){for(let o=0,l=0;l<t;o++){let a=this.content[o],c=l+a.nodeSize;if(c>e&&r(a,s+l,i||null,o)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,t-u),r,s+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,s){let i="",o=!0;return this.nodesBetween(e,t,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,t-a):l.isLeaf?s?typeof s=="function"?s(l):s:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(o?o=!1:i+=r),i+=c},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,s=this.content.slice(),i=0;for(t.isText&&t.sameMarkup(r)&&(s[s.length-1]=t.withText(t.text+r.text),i=1);i<e.content.length;i++)s.push(e.content[i]);return new k(s,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],s=0;if(t>e)for(let i=0,o=0;o<t;i++){let l=this.content[i],a=o+l.nodeSize;a>e&&((o<e||a>t)&&(l.isText?l=l.cut(Math.max(0,e-o),Math.min(l.text.length,t-o)):l=l.cut(Math.max(0,e-o-1),Math.min(l.content.size,t-o-1))),r.push(l),s+=l.nodeSize),o=a}return new k(r,s)}cutByIndex(e,t){return e==t?k.empty:e==0&&t==this.content.length?this:new k(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let s=this.content.slice(),i=this.size+t.nodeSize-r.nodeSize;return s[e]=t,new k(s,i)}addToStart(e){return new k([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new k(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let s=this.content[t];e(s,r,t),r+=s.nodeSize}}findDiffStart(e,t=0){return Hl(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return Wl(this,e,t,r)}findIndex(e){if(e==0)return Ln(0,e);if(e==this.size)return Ln(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,r=0;;t++){let s=this.child(t),i=r+s.nodeSize;if(i>=e)return i==e?Ln(t+1,i):Ln(t,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return k.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new k(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return k.empty;let t,r=0;for(let s=0;s<e.length;s++){let i=e[s];r+=i.nodeSize,s&&i.isText&&e[s-1].sameMarkup(i)?(t||(t=e.slice(0,s)),t[t.length-1]=i.withText(t[t.length-1].text+i.text)):t&&t.push(i)}return new k(t||e,r)}static from(e){if(!e)return k.empty;if(e instanceof k)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new k([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}k.empty=new k([],0);const ls={index:0,offset:0};function Ln(n,e){return ls.index=n,ls.offset=e,ls}function Qn(n,e){if(n===e)return!0;if(!(n&&typeof n=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(n);if(Array.isArray(e)!=t)return!1;if(t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!Qn(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!Qn(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let z=class Ps{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let s=0;s<e.length;s++){let i=e[s];if(this.eq(i))return e;if(this.type.excludes(i.type))t||(t=e.slice(0,s));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(t||(t=e.slice(0,s)),t.push(this),r=!0),t&&t.push(i)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Qn(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw new RangeError(`There is no mark type ${t.type} in this schema`);let s=r.create(t.attrs);return r.checkAttrs(s.attrs),s}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Ps.none;if(e instanceof Ps)return[e];let t=e.slice();return t.sort((r,s)=>r.type.rank-s.type.rank),t}};z.none=[];class Zn extends Error{}class v{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=ql(this.content,e+this.openStart,t);return r&&new v(r,this.openStart,this.openEnd)}removeBetween(e,t){return new v(Ul(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return v.empty;let r=t.openStart||0,s=t.openEnd||0;if(typeof r!="number"||typeof s!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new v(k.fromJSON(e,t.content),r,s)}static maxOpen(e,t=!0){let r=0,s=0;for(let i=e.firstChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.lastChild)s++;return new v(e,r,s)}}v.empty=new v(k.empty,0,0);function Ul(n,e,t){let{index:r,offset:s}=n.findIndex(e),i=n.maybeChild(r),{index:o,offset:l}=n.findIndex(t);if(s==e||i.isText){if(l!=t&&!n.child(o).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=o)throw new RangeError("Removing non-flat range");return n.replaceChild(r,i.copy(Ul(i.content,e-s-1,t-s-1)))}function ql(n,e,t,r){let{index:s,offset:i}=n.findIndex(e),o=n.maybeChild(s);if(i==e||o.isText)return r&&!r.canReplace(s,s,t)?null:n.cut(0,e).append(t).append(n.cut(e));let l=ql(o.content,e-i-1,t,o);return l&&n.replaceChild(s,o.copy(l))}function Gu(n,e,t){if(t.openStart>n.depth)throw new Zn("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new Zn("Inconsistent open depths");return Kl(n,e,t,0)}function Kl(n,e,t,r){let s=n.index(r),i=n.node(r);if(s==e.index(r)&&r<n.depth-t.openStart){let o=Kl(n,e,t,r+1);return i.copy(i.content.replaceChild(s,o))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let o=n.parent,l=o.content;return yt(o,l.cut(0,n.parentOffset).append(t.content).append(l.cut(e.parentOffset)))}else{let{start:o,end:l}=Yu(t,n);return yt(i,Gl(n,o,l,e,r))}else return yt(i,er(n,e,r))}function Jl(n,e){if(!e.type.compatibleContent(n.type))throw new Zn("Cannot join "+e.type.name+" onto "+n.type.name)}function Ls(n,e,t){let r=n.node(t);return Jl(r,e.node(t)),r}function gt(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function an(n,e,t,r){let s=(e||n).node(t),i=0,o=e?e.index(t):s.childCount;n&&(i=n.index(t),n.depth>t?i++:n.textOffset&&(gt(n.nodeAfter,r),i++));for(let l=i;l<o;l++)gt(s.child(l),r);e&&e.depth==t&&e.textOffset&>(e.nodeBefore,r)}function yt(n,e){return n.type.checkContent(e),n.copy(e)}function Gl(n,e,t,r,s){let i=n.depth>s&&Ls(n,e,s+1),o=r.depth>s&&Ls(t,r,s+1),l=[];return an(null,n,s,l),i&&o&&e.index(s)==t.index(s)?(Jl(i,o),gt(yt(i,Gl(n,e,t,r,s+1)),l)):(i&>(yt(i,er(n,e,s+1)),l),an(e,t,s,l),o&>(yt(o,er(t,r,s+1)),l)),an(r,null,s,l),new k(l)}function er(n,e,t){let r=[];if(an(null,n,t,r),n.depth>t){let s=Ls(n,e,t+1);gt(yt(s,er(n,e,t+1)),r)}return an(e,null,t,r),new k(r)}function Yu(n,e){let t=e.depth-n.openStart,s=e.node(t).copy(n.content);for(let i=t-1;i>=0;i--)s=e.node(i).copy(k.from(s));return{start:s.resolveNoCache(n.openStart+t),end:s.resolveNoCache(s.content.size-n.openEnd-t)}}class kn{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],s=e.child(t);return r?e.child(t).cut(r):s}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],s=t==0?0:this.path[t*3-1]+1;for(let i=0;i<e;i++)s+=r.child(i).nodeSize;return s}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return z.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),s=e.maybeChild(t);if(!r){let l=r;r=s,s=l}let i=r.marks;for(var o=0;o<i.length;o++)i[o].type.spec.inclusive===!1&&(!s||!i[o].isInSet(s.marks))&&(i=i[o--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,s=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!s||!r[i].isInSet(s.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new tr(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],s=0,i=t;for(let o=e;;){let{index:l,offset:a}=o.content.findIndex(i),c=i-a;if(r.push(o,l,s+a),!c||(o=o.child(l),o.isText))break;i=c-1,s+=a+1}return new kn(t,r,i)}static resolveCached(e,t){let r=so.get(e);if(r)for(let i=0;i<r.elts.length;i++){let o=r.elts[i];if(o.pos==t)return o}else so.set(e,r=new Xu);let s=r.elts[r.i]=kn.resolve(e,t);return r.i=(r.i+1)%Qu,s}}class Xu{constructor(){this.elts=[],this.i=0}}const Qu=12,so=new WeakMap;class tr{constructor(e,t,r){this.$from=e,this.$to=t,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const Zu=Object.create(null);class Ee{constructor(e,t,r,s=z.none){this.type=e,this.attrs=t,this.marks=s,this.content=r||k.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,r,s=0){this.content.nodesBetween(e,t,r,s,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,r,s){return this.content.textBetween(e,t,r,s)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,r){return this.type==e&&Qn(this.attrs,t||e.defaultAttrs||Zu)&&z.sameSet(this.marks,r||z.none)}copy(e=null){return e==this.content?this:new Ee(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Ee(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return v.empty;let s=this.resolve(e),i=this.resolve(t),o=r?0:s.sharedDepth(t),l=s.start(o),c=s.node(o).content.cut(s.pos-l,i.pos-l);return new v(c,s.depth-o,i.depth-o)}replace(e,t,r){return Gu(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:s}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(s==e||t.isText)return t;e-=s+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let s=this.content.child(t-1);return{node:s,index:t-1,offset:r-s.nodeSize}}resolve(e){return kn.resolveCached(this,e)}resolveNoCache(e){return kn.resolve(this,e)}rangeHasMark(e,t,r){let s=!1;return t>e&&this.nodesBetween(e,t,i=>(r.isInSet(i.marks)&&(s=!0),!s)),s}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),Yl(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=k.empty,s=0,i=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,s,i),l=o&&o.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let a=s;a<i;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0}canReplaceWith(e,t,r,s){if(s&&!this.type.allowsMarks(s))return!1;let i=this.contentMatchAt(e).matchType(r),o=i&&i.matchFragment(this.content,t);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=z.none;for(let t=0;t<this.marks.length;t++){let r=this.marks[t];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!z.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let s=k.fromJSON(e,t.content),i=e.nodeType(t.type).create(t.attrs,s,r);return i.type.checkAttrs(i.attrs),i}}Ee.prototype.text=void 0;class nr extends Ee{constructor(e,t,r,s){if(super(e,t,null,s),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Yl(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new nr(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new nr(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function Yl(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class wt{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new ed(e,t);if(r.next==null)return wt.empty;let s=Xl(r);r.next&&r.err("Unexpected trailing text");let i=ld(od(s));return ad(i,r),i}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let s=this;for(let i=t;s&&i<r;i++)s=s.matchType(e.child(i).type);return s}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let s=[this];function i(o,l){let a=o.matchFragment(e,r);if(a&&(!t||a.validEnd))return k.from(l.map(c=>c.createAndFill()));for(let c=0;c<o.next.length;c++){let{type:u,next:d}=o.next[c];if(!(u.isText||u.hasRequiredAttrs())&&s.indexOf(d)==-1){s.push(d);let f=i(d,l.concat(u));if(f)return f}}return null}return i(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let s=r.shift(),i=s.match;if(i.matchType(e)){let o=[];for(let l=s;l.type;l=l.via)o.push(l.type);return o.reverse()}for(let o=0;o<i.next.length;o++){let{type:l,next:a}=i.next[o];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in t)&&(!s.type||a.validEnd)&&(r.push({match:l.contentMatch,type:l,via:s}),t[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let s=0;s<r.next.length;s++)e.indexOf(r.next[s].next)==-1&&t(r.next[s].next)}return t(this),e.map((r,s)=>{let i=s+(r.validEnd?"*":" ")+" ";for(let o=0;o<r.next.length;o++)i+=(o?", ":"")+r.next[o].type.name+"->"+e.indexOf(r.next[o].next);return i}).join(`
|
|
1
|
+
import{r as w,dv as $l,by as ju,j as O,aS as Hu,b1 as St,dw as Wu,a6 as it,a7 as Qe,bf as On,bc as Uu,bd as qu,bq as Mt,dp as Fl,af as _l,bb as Ku,ac as ut,e as Vl,c as jl}from"./index-CXD35HrY.js";import{e as Ju}from"./select-D_rADyeN.js";function Q(n){this.content=n}Q.prototype={constructor:Q,find:function(n){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===n)return e;return-1},get:function(n){var e=this.find(n);return e==-1?void 0:this.content[e+1]},update:function(n,e,t){var r=t&&t!=n?this.remove(t):this,s=r.find(n),i=r.content.slice();return s==-1?i.push(t||n,e):(i[s+1]=e,t&&(i[s]=t)),new Q(i)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new Q(t)},addToStart:function(n,e){return new Q([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new Q(t)},addBefore:function(n,e,t){var r=this.remove(e),s=r.content.slice(),i=r.find(n);return s.splice(i==-1?s.length:i,0,e,t),new Q(s)},forEach:function(n){for(var e=0;e<this.content.length;e+=2)n(this.content[e],this.content[e+1])},prepend:function(n){return n=Q.from(n),n.size?new Q(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=Q.from(n),n.size?new Q(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=Q.from(n);for(var t=0;t<n.content.length;t+=2)e=e.remove(n.content[t]);return e},toObject:function(){var n={};return this.forEach(function(e,t){n[e]=t}),n},get size(){return this.content.length>>1}};Q.from=function(n){if(n instanceof Q)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new Q(e)};function Hl(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let s=n.child(r),i=e.child(r);if(s==i){t+=s.nodeSize;continue}if(!s.sameMarkup(i))return t;if(s.isText&&s.text!=i.text){for(let o=0;s.text[o]==i.text[o];o++)t++;return t}if(s.content.size||i.content.size){let o=Hl(s.content,i.content,t+1);if(o!=null)return o}t+=s.nodeSize}}function Wl(n,e,t,r){for(let s=n.childCount,i=e.childCount;;){if(s==0||i==0)return s==i?null:{a:t,b:r};let o=n.child(--s),l=e.child(--i),a=o.nodeSize;if(o==l){t-=a,r-=a;continue}if(!o.sameMarkup(l))return{a:t,b:r};if(o.isText&&o.text!=l.text){let c=0,u=Math.min(o.text.length,l.text.length);for(;c<u&&o.text[o.text.length-c-1]==l.text[l.text.length-c-1];)c++,t--,r--;return{a:t,b:r}}if(o.content.size||l.content.size){let c=Wl(o.content,l.content,t-1,r-1);if(c)return c}t-=a,r-=a}}class k{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,s=0,i){for(let o=0,l=0;l<t;o++){let a=this.content[o],c=l+a.nodeSize;if(c>e&&r(a,s+l,i||null,o)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,t-u),r,s+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,s){let i="",o=!0;return this.nodesBetween(e,t,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,t-a):l.isLeaf?s?typeof s=="function"?s(l):s:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(o?o=!1:i+=r),i+=c},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,s=this.content.slice(),i=0;for(t.isText&&t.sameMarkup(r)&&(s[s.length-1]=t.withText(t.text+r.text),i=1);i<e.content.length;i++)s.push(e.content[i]);return new k(s,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],s=0;if(t>e)for(let i=0,o=0;o<t;i++){let l=this.content[i],a=o+l.nodeSize;a>e&&((o<e||a>t)&&(l.isText?l=l.cut(Math.max(0,e-o),Math.min(l.text.length,t-o)):l=l.cut(Math.max(0,e-o-1),Math.min(l.content.size,t-o-1))),r.push(l),s+=l.nodeSize),o=a}return new k(r,s)}cutByIndex(e,t){return e==t?k.empty:e==0&&t==this.content.length?this:new k(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let s=this.content.slice(),i=this.size+t.nodeSize-r.nodeSize;return s[e]=t,new k(s,i)}addToStart(e){return new k([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new k(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let s=this.content[t];e(s,r,t),r+=s.nodeSize}}findDiffStart(e,t=0){return Hl(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return Wl(this,e,t,r)}findIndex(e){if(e==0)return Ln(0,e);if(e==this.size)return Ln(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,r=0;;t++){let s=this.child(t),i=r+s.nodeSize;if(i>=e)return i==e?Ln(t+1,i):Ln(t,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return k.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new k(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return k.empty;let t,r=0;for(let s=0;s<e.length;s++){let i=e[s];r+=i.nodeSize,s&&i.isText&&e[s-1].sameMarkup(i)?(t||(t=e.slice(0,s)),t[t.length-1]=i.withText(t[t.length-1].text+i.text)):t&&t.push(i)}return new k(t||e,r)}static from(e){if(!e)return k.empty;if(e instanceof k)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new k([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}k.empty=new k([],0);const ls={index:0,offset:0};function Ln(n,e){return ls.index=n,ls.offset=e,ls}function Qn(n,e){if(n===e)return!0;if(!(n&&typeof n=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(n);if(Array.isArray(e)!=t)return!1;if(t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!Qn(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!Qn(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let z=class Ps{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let s=0;s<e.length;s++){let i=e[s];if(this.eq(i))return e;if(this.type.excludes(i.type))t||(t=e.slice(0,s));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(t||(t=e.slice(0,s)),t.push(this),r=!0),t&&t.push(i)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Qn(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw new RangeError(`There is no mark type ${t.type} in this schema`);let s=r.create(t.attrs);return r.checkAttrs(s.attrs),s}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Ps.none;if(e instanceof Ps)return[e];let t=e.slice();return t.sort((r,s)=>r.type.rank-s.type.rank),t}};z.none=[];class Zn extends Error{}class v{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=ql(this.content,e+this.openStart,t);return r&&new v(r,this.openStart,this.openEnd)}removeBetween(e,t){return new v(Ul(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return v.empty;let r=t.openStart||0,s=t.openEnd||0;if(typeof r!="number"||typeof s!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new v(k.fromJSON(e,t.content),r,s)}static maxOpen(e,t=!0){let r=0,s=0;for(let i=e.firstChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.lastChild)s++;return new v(e,r,s)}}v.empty=new v(k.empty,0,0);function Ul(n,e,t){let{index:r,offset:s}=n.findIndex(e),i=n.maybeChild(r),{index:o,offset:l}=n.findIndex(t);if(s==e||i.isText){if(l!=t&&!n.child(o).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=o)throw new RangeError("Removing non-flat range");return n.replaceChild(r,i.copy(Ul(i.content,e-s-1,t-s-1)))}function ql(n,e,t,r){let{index:s,offset:i}=n.findIndex(e),o=n.maybeChild(s);if(i==e||o.isText)return r&&!r.canReplace(s,s,t)?null:n.cut(0,e).append(t).append(n.cut(e));let l=ql(o.content,e-i-1,t,o);return l&&n.replaceChild(s,o.copy(l))}function Gu(n,e,t){if(t.openStart>n.depth)throw new Zn("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new Zn("Inconsistent open depths");return Kl(n,e,t,0)}function Kl(n,e,t,r){let s=n.index(r),i=n.node(r);if(s==e.index(r)&&r<n.depth-t.openStart){let o=Kl(n,e,t,r+1);return i.copy(i.content.replaceChild(s,o))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let o=n.parent,l=o.content;return yt(o,l.cut(0,n.parentOffset).append(t.content).append(l.cut(e.parentOffset)))}else{let{start:o,end:l}=Yu(t,n);return yt(i,Gl(n,o,l,e,r))}else return yt(i,er(n,e,r))}function Jl(n,e){if(!e.type.compatibleContent(n.type))throw new Zn("Cannot join "+e.type.name+" onto "+n.type.name)}function Ls(n,e,t){let r=n.node(t);return Jl(r,e.node(t)),r}function gt(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function an(n,e,t,r){let s=(e||n).node(t),i=0,o=e?e.index(t):s.childCount;n&&(i=n.index(t),n.depth>t?i++:n.textOffset&&(gt(n.nodeAfter,r),i++));for(let l=i;l<o;l++)gt(s.child(l),r);e&&e.depth==t&&e.textOffset&>(e.nodeBefore,r)}function yt(n,e){return n.type.checkContent(e),n.copy(e)}function Gl(n,e,t,r,s){let i=n.depth>s&&Ls(n,e,s+1),o=r.depth>s&&Ls(t,r,s+1),l=[];return an(null,n,s,l),i&&o&&e.index(s)==t.index(s)?(Jl(i,o),gt(yt(i,Gl(n,e,t,r,s+1)),l)):(i&>(yt(i,er(n,e,s+1)),l),an(e,t,s,l),o&>(yt(o,er(t,r,s+1)),l)),an(r,null,s,l),new k(l)}function er(n,e,t){let r=[];if(an(null,n,t,r),n.depth>t){let s=Ls(n,e,t+1);gt(yt(s,er(n,e,t+1)),r)}return an(e,null,t,r),new k(r)}function Yu(n,e){let t=e.depth-n.openStart,s=e.node(t).copy(n.content);for(let i=t-1;i>=0;i--)s=e.node(i).copy(k.from(s));return{start:s.resolveNoCache(n.openStart+t),end:s.resolveNoCache(s.content.size-n.openEnd-t)}}class kn{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],s=e.child(t);return r?e.child(t).cut(r):s}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],s=t==0?0:this.path[t*3-1]+1;for(let i=0;i<e;i++)s+=r.child(i).nodeSize;return s}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return z.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),s=e.maybeChild(t);if(!r){let l=r;r=s,s=l}let i=r.marks;for(var o=0;o<i.length;o++)i[o].type.spec.inclusive===!1&&(!s||!i[o].isInSet(s.marks))&&(i=i[o--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,s=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!s||!r[i].isInSet(s.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new tr(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],s=0,i=t;for(let o=e;;){let{index:l,offset:a}=o.content.findIndex(i),c=i-a;if(r.push(o,l,s+a),!c||(o=o.child(l),o.isText))break;i=c-1,s+=a+1}return new kn(t,r,i)}static resolveCached(e,t){let r=so.get(e);if(r)for(let i=0;i<r.elts.length;i++){let o=r.elts[i];if(o.pos==t)return o}else so.set(e,r=new Xu);let s=r.elts[r.i]=kn.resolve(e,t);return r.i=(r.i+1)%Qu,s}}class Xu{constructor(){this.elts=[],this.i=0}}const Qu=12,so=new WeakMap;class tr{constructor(e,t,r){this.$from=e,this.$to=t,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const Zu=Object.create(null);class Ee{constructor(e,t,r,s=z.none){this.type=e,this.attrs=t,this.marks=s,this.content=r||k.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,r,s=0){this.content.nodesBetween(e,t,r,s,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,r,s){return this.content.textBetween(e,t,r,s)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,r){return this.type==e&&Qn(this.attrs,t||e.defaultAttrs||Zu)&&z.sameSet(this.marks,r||z.none)}copy(e=null){return e==this.content?this:new Ee(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Ee(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return v.empty;let s=this.resolve(e),i=this.resolve(t),o=r?0:s.sharedDepth(t),l=s.start(o),c=s.node(o).content.cut(s.pos-l,i.pos-l);return new v(c,s.depth-o,i.depth-o)}replace(e,t,r){return Gu(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:s}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(s==e||t.isText)return t;e-=s+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let s=this.content.child(t-1);return{node:s,index:t-1,offset:r-s.nodeSize}}resolve(e){return kn.resolveCached(this,e)}resolveNoCache(e){return kn.resolve(this,e)}rangeHasMark(e,t,r){let s=!1;return t>e&&this.nodesBetween(e,t,i=>(r.isInSet(i.marks)&&(s=!0),!s)),s}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),Yl(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=k.empty,s=0,i=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,s,i),l=o&&o.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let a=s;a<i;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0}canReplaceWith(e,t,r,s){if(s&&!this.type.allowsMarks(s))return!1;let i=this.contentMatchAt(e).matchType(r),o=i&&i.matchFragment(this.content,t);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=z.none;for(let t=0;t<this.marks.length;t++){let r=this.marks[t];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!z.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let s=k.fromJSON(e,t.content),i=e.nodeType(t.type).create(t.attrs,s,r);return i.type.checkAttrs(i.attrs),i}}Ee.prototype.text=void 0;class nr extends Ee{constructor(e,t,r,s){if(super(e,t,null,s),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Yl(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new nr(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new nr(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function Yl(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class wt{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new ed(e,t);if(r.next==null)return wt.empty;let s=Xl(r);r.next&&r.err("Unexpected trailing text");let i=ld(od(s));return ad(i,r),i}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let s=this;for(let i=t;s&&i<r;i++)s=s.matchType(e.child(i).type);return s}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let s=[this];function i(o,l){let a=o.matchFragment(e,r);if(a&&(!t||a.validEnd))return k.from(l.map(c=>c.createAndFill()));for(let c=0;c<o.next.length;c++){let{type:u,next:d}=o.next[c];if(!(u.isText||u.hasRequiredAttrs())&&s.indexOf(d)==-1){s.push(d);let f=i(d,l.concat(u));if(f)return f}}return null}return i(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let s=r.shift(),i=s.match;if(i.matchType(e)){let o=[];for(let l=s;l.type;l=l.via)o.push(l.type);return o.reverse()}for(let o=0;o<i.next.length;o++){let{type:l,next:a}=i.next[o];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in t)&&(!s.type||a.validEnd)&&(r.push({match:l.contentMatch,type:l,via:s}),t[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let s=0;s<r.next.length;s++)e.indexOf(r.next[s].next)==-1&&t(r.next[s].next)}return t(this),e.map((r,s)=>{let i=s+(r.validEnd?"*":" ")+" ";for(let o=0;o<r.next.length;o++)i+=(o?", ":"")+r.next[o].type.name+"->"+e.indexOf(r.next[o].next);return i}).join(`
|
|
2
2
|
`)}}wt.empty=new wt(!0);class ed{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function Xl(n){let e=[];do e.push(td(n));while(n.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function td(n){let e=[];do e.push(nd(n));while(n.next&&n.next!=")"&&n.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function nd(n){let e=id(n);for(;;)if(n.eat("+"))e={type:"plus",expr:e};else if(n.eat("*"))e={type:"star",expr:e};else if(n.eat("?"))e={type:"opt",expr:e};else if(n.eat("{"))e=rd(n,e);else break;return e}function io(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function rd(n,e){let t=io(n),r=t;return n.eat(",")&&(n.next!="}"?r=io(n):r=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function sd(n,e){let t=n.nodeTypes,r=t[e];if(r)return[r];let s=[];for(let i in t){let o=t[i];o.isInGroup(e)&&s.push(o)}return s.length==0&&n.err("No node type or group '"+e+"' found"),s}function id(n){if(n.eat("(")){let e=Xl(n);return n.eat(")")||n.err("Missing closing paren"),e}else if(/\W/.test(n.next))n.err("Unexpected token '"+n.next+"'");else{let e=sd(n,n.next).map(t=>(n.inline==null?n.inline=t.isInline:n.inline!=t.isInline&&n.err("Mixing inline and block content"),{type:"name",value:t}));return n.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function od(n){let e=[[]];return s(i(n,0),t()),e;function t(){return e.push([])-1}function r(o,l,a){let c={term:a,to:l};return e[o].push(c),c}function s(o,l){o.forEach(a=>a.to=l)}function i(o,l){if(o.type=="choice")return o.exprs.reduce((a,c)=>a.concat(i(c,l)),[]);if(o.type=="seq")for(let a=0;;a++){let c=i(o.exprs[a],l);if(a==o.exprs.length-1)return c;s(c,l=t())}else if(o.type=="star"){let a=t();return r(l,a),s(i(o.expr,a),a),[r(a)]}else if(o.type=="plus"){let a=t();return s(i(o.expr,l),a),s(i(o.expr,a),a),[r(a)]}else{if(o.type=="opt")return[r(l)].concat(i(o.expr,l));if(o.type=="range"){let a=l;for(let c=0;c<o.min;c++){let u=t();s(i(o.expr,a),u),a=u}if(o.max==-1)s(i(o.expr,a),a);else for(let c=o.min;c<o.max;c++){let u=t();r(a,u),s(i(o.expr,a),u),a=u}return[r(a)]}else{if(o.type=="name")return[r(l,void 0,o.value)];throw new Error("Unknown expr type")}}}}function Ql(n,e){return e-n}function oo(n,e){let t=[];return r(e),t.sort(Ql);function r(s){let i=n[s];if(i.length==1&&!i[0].term)return r(i[0].to);t.push(s);for(let o=0;o<i.length;o++){let{term:l,to:a}=i[o];!l&&t.indexOf(a)==-1&&r(a)}}}function ld(n){let e=Object.create(null);return t(oo(n,0));function t(r){let s=[];r.forEach(o=>{n[o].forEach(({term:l,to:a})=>{if(!l)return;let c;for(let u=0;u<s.length;u++)s[u][0]==l&&(c=s[u][1]);oo(n,a).forEach(u=>{c||s.push([l,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let i=e[r.join(",")]=new wt(r.indexOf(n.length-1)>-1);for(let o=0;o<s.length;o++){let l=s[o][1].sort(Ql);i.next.push({type:s[o][0],next:e[l.join(",")]||t(l)})}return i}}function ad(n,e){for(let t=0,r=[n];t<r.length;t++){let s=r[t],i=!s.validEnd,o=[];for(let l=0;l<s.next.length;l++){let{type:a,next:c}=s.next[l];o.push(a.name),i&&!(a.isText||a.hasRequiredAttrs())&&(i=!1),r.indexOf(c)==-1&&r.push(c)}i&&e.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function Zl(n){let e=Object.create(null);for(let t in n){let r=n[t];if(!r.hasDefault)return null;e[t]=r.default}return e}function ea(n,e){let t=Object.create(null);for(let r in n){let s=e&&e[r];if(s===void 0){let i=n[r];if(i.hasDefault)s=i.default;else throw new RangeError("No value supplied for attribute "+r)}t[r]=s}return t}function ta(n,e,t,r){for(let s in e)if(!(s in n))throw new RangeError(`Unsupported attribute ${s} for ${t} of type ${s}`);for(let s in n){let i=n[s];i.validate&&i.validate(e[s])}}function na(n,e){let t=Object.create(null);if(e)for(let r in e)t[r]=new ud(n,r,e[r]);return t}let lo=class ra{constructor(e,t,r){this.name=e,this.schema=t,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=na(e,r.attrs),this.defaultAttrs=Zl(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==wt.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:ea(this.attrs,e)}create(e=null,t,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Ee(this,this.computeAttrs(e),k.from(t),z.setFrom(r))}createChecked(e=null,t,r){return t=k.from(t),this.checkContent(t),new Ee(this,this.computeAttrs(e),t,z.setFrom(r))}createAndFill(e=null,t,r){if(e=this.computeAttrs(e),t=k.from(t),t.size){let o=this.contentMatch.fillBefore(t);if(!o)return null;t=o.append(t)}let s=this.contentMatch.matchFragment(t),i=s&&s.fillBefore(k.empty,!0);return i?new Ee(this,e,t.append(i),z.setFrom(r)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){ta(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?t&&t.push(e[r]):t||(t=e.slice(0,r));return t?t.length?t:z.none:e}static compile(e,t){let r=Object.create(null);e.forEach((i,o)=>r[i]=new ra(i,t,o));let s=t.spec.topNode||"doc";if(!r[s])throw new RangeError("Schema is missing its top node type ('"+s+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function cd(n,e,t){let r=t.split("|");return s=>{let i=s===null?"null":typeof s;if(r.indexOf(i)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${n}, got ${i}`)}}class ud{constructor(e,t,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?cd(e,t,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class jr{constructor(e,t,r,s){this.name=e,this.rank=t,this.schema=r,this.spec=s,this.attrs=na(e,s.attrs),this.excluded=null;let i=Zl(this.attrs);this.instance=i?new z(this,i):null}create(e=null){return!e&&this.instance?this.instance:new z(this,ea(this.attrs,e))}static compile(e,t){let r=Object.create(null),s=0;return e.forEach((i,o)=>r[i]=new jr(i,s++,t,o)),r}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){ta(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class sa{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let s in e)t[s]=e[s];t.nodes=Q.from(e.nodes),t.marks=Q.from(e.marks||{}),this.nodes=lo.compile(this.spec.nodes,this),this.marks=jr.compile(this.spec.marks,this);let r=Object.create(null);for(let s in this.nodes){if(s in this.marks)throw new RangeError(s+" can not be both a node and a mark");let i=this.nodes[s],o=i.spec.content||"",l=i.spec.marks;if(i.contentMatch=r[o]||(r[o]=wt.parse(o,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=l=="_"?null:l?ao(this,l.split(" ")):l==""||!i.inlineContent?[]:null}for(let s in this.marks){let i=this.marks[s],o=i.spec.excludes;i.excluded=o==null?[i]:o==""?[]:ao(this,o.split(" "))}this.nodeFromJSON=s=>Ee.fromJSON(this,s),this.markFromJSON=s=>z.fromJSON(this,s),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,r,s){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof lo){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(t,r,s)}text(e,t){let r=this.nodes.text;return new nr(r,r.defaultAttrs,e,z.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function ao(n,e){let t=[];for(let r=0;r<e.length;r++){let s=e[r],i=n.marks[s],o=i;if(i)t.push(i);else for(let l in n.marks){let a=n.marks[l];(s=="_"||a.spec.group&&a.spec.group.split(" ").indexOf(s)>-1)&&t.push(o=a)}if(!o)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return t}function dd(n){return n.tag!=null}function fd(n){return n.style!=null}class Ze{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let r=this.matchedStyles=[];t.forEach(s=>{if(dd(s))this.tags.push(s);else if(fd(s)){let i=/[^=]*/.exec(s.style)[0];r.indexOf(i)<0&&r.push(i),this.styles.push(s)}}),this.normalizeLists=!this.tags.some(s=>{if(!/^(ul|ol)\b/.test(s.tag)||!s.node)return!1;let i=e.nodes[s.node];return i.contentMatch.matchType(i)})}parse(e,t={}){let r=new uo(this,t,!1);return r.addAll(e,z.none,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new uo(this,t,!0);return r.addAll(e,z.none,t.from,t.to),v.maxOpen(r.finish())}matchTag(e,t,r){for(let s=r?this.tags.indexOf(r)+1:0;s<this.tags.length;s++){let i=this.tags[s];if(md(e,i.tag)&&(i.namespace===void 0||e.namespaceURI==i.namespace)&&(!i.context||t.matchesContext(i.context))){if(i.getAttrs){let o=i.getAttrs(e);if(o===!1)continue;i.attrs=o||void 0}return i}}}matchStyle(e,t,r,s){for(let i=s?this.styles.indexOf(s)+1:0;i<this.styles.length;i++){let o=this.styles[i],l=o.style;if(!(l.indexOf(e)!=0||o.context&&!r.matchesContext(o.context)||l.length>e.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=t))){if(o.getAttrs){let a=o.getAttrs(t);if(a===!1)continue;o.attrs=a||void 0}return o}}}static schemaRules(e){let t=[];function r(s){let i=s.priority==null?50:s.priority,o=0;for(;o<t.length;o++){let l=t[o];if((l.priority==null?50:l.priority)<i)break}t.splice(o,0,s)}for(let s in e.marks){let i=e.marks[s].spec.parseDOM;i&&i.forEach(o=>{r(o=fo(o)),o.mark||o.ignore||o.clearMark||(o.mark=s)})}for(let s in e.nodes){let i=e.nodes[s].spec.parseDOM;i&&i.forEach(o=>{r(o=fo(o)),o.node||o.ignore||o.mark||(o.node=s)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Ze(e,Ze.schemaRules(e)))}}const ia={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},hd={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},oa={ol:!0,ul:!0},xn=1,Bs=2,cn=4;function co(n,e,t){return e!=null?(e?xn:0)|(e==="full"?Bs:0):n&&n.whitespace=="pre"?xn|Bs:t&~cn}class Bn{constructor(e,t,r,s,i,o){this.type=e,this.attrs=t,this.marks=r,this.solid=s,this.options=o,this.content=[],this.activeMarks=z.none,this.match=i||(o&cn?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(k.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let r=this.type.contentMatch,s;return(s=r.findWrapping(e.type))?(this.match=r,s):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&xn)){let r=this.content[this.content.length-1],s;if(r&&r.isText&&(s=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==s[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-s[0].length))}}let t=k.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(k.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!ia.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class uo{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let s=t.topNode,i,o=co(null,t.preserveWhitespace,0)|(r?cn:0);s?i=new Bn(s.type,s.attrs,z.none,!0,t.topMatch||s.type.contentMatch,o):r?i=new Bn(null,null,z.none,!0,null,o):i=new Bn(e.schema.topNodeType,null,z.none,!0,null,o),this.nodes=[i],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let r=e.nodeValue,s=this.top,i=s.options&Bs?"full":this.localPreserveWS||(s.options&xn)>0,{schema:o}=this.parser;if(i==="full"||s.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(i)if(i==="full")r=r.replace(/\r\n?/g,`
|
|
3
3
|
`);else if(o.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(o.linebreakReplacement.create())){let l=r.split(/\r?\n|\r/);for(let a=0;a<l.length;a++)a&&this.insertNode(o.linebreakReplacement.create(),t,!0),l[a]&&this.insertNode(o.text(l[a]),t,!/\S/.test(l[a]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let l=s.content[s.content.length-1],a=e.previousSibling;(!l||a&&a.nodeName=="BR"||l.isText&&/[ \t\r\n\u000c]$/.test(l.text))&&(r=r.slice(1))}r&&this.insertNode(o.text(r),t,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,t,r){let s=this.localPreserveWS,i=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let o=e.nodeName.toLowerCase(),l;oa.hasOwnProperty(o)&&this.parser.normalizeLists&&pd(e);let a=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(l=this.parser.matchTag(e,this,r));e:if(a?a.ignore:hd.hasOwnProperty(o))this.findInside(e),this.ignoreFallback(e,t);else if(!a||a.skip||a.closeParent){a&&a.closeParent?this.open=Math.max(0,this.open-1):a&&a.skip.nodeType&&(e=a.skip);let c,u=this.needsBlock;if(ia.hasOwnProperty(o))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),c=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break e}let d=a&&a.skip?t:this.readStyles(e,t);d&&this.addAll(e,d),c&&this.sync(i),this.needsBlock=u}else{let c=this.readStyles(e,t);c&&this.addElementByRule(e,a,c,a.consuming===!1?l:void 0)}this.localPreserveWS=s}leafFallback(e,t){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
|
|
4
4
|
`),t)}ignoreFallback(e,t){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),t,!0)}readStyles(e,t){let r=e.style;if(r&&r.length)for(let s=0;s<this.parser.matchedStyles.length;s++){let i=this.parser.matchedStyles[s],o=r.getPropertyValue(i);if(o)for(let l=void 0;;){let a=this.parser.matchStyle(i,o,this,l);if(!a)break;if(a.ignore)return null;if(a.clearMark?t=t.filter(c=>!a.clearMark(c)):t=t.concat(this.parser.schema.marks[a.mark].create(a.attrs)),a.consuming===!1)l=a;else break}}return t}addElementByRule(e,t,r,s){let i,o;if(t.node)if(o=this.parser.schema.nodes[t.node],o.isLeaf)this.insertNode(o.create(t.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let a=this.enter(o,t.attrs||null,r,t.preserveWhitespace);a&&(i=!0,r=a)}else{let a=this.parser.schema.marks[t.mark];r=r.concat(a.create(t.attrs))}let l=this.top;if(o&&o.isLeaf)this.findInside(e);else if(s)this.addElement(e,r,s);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(a=>this.insertNode(a,r,!1));else{let a=e;typeof t.contentElement=="string"?a=e.querySelector(t.contentElement):typeof t.contentElement=="function"?a=t.contentElement(e):t.contentElement&&(a=t.contentElement),this.findAround(e,a,!0),this.addAll(a,r),this.findAround(e,a,!1)}i&&this.sync(l)&&this.open--}addAll(e,t,r,s){let i=r||0;for(let o=r?e.childNodes[r]:e.firstChild,l=s==null?null:e.childNodes[s];o!=l;o=o.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(o,t);this.findAtPoint(e,i)}findPlace(e,t,r){let s,i;for(let o=this.open,l=0;o>=0;o--){let a=this.nodes[o],c=a.findWrapping(e);if(c&&(!s||s.length>c.length+l)&&(s=c,i=a,!c.length))break;if(a.solid){if(r)break;l+=2}}if(!s)return null;this.sync(i);for(let o=0;o<s.length;o++)t=this.enterInner(s[o],null,t,!1);return t}insertNode(e,t,r){if(e.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(t=this.enterInner(i,null,t))}let s=this.findPlace(e,t,r);if(s){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(e.type));let o=z.none;for(let l of s.concat(e.marks))(i.type?i.type.allowsMarkType(l.type):ho(l.type,e.type))&&(o=l.addToSet(o));return i.content.push(e.mark(o)),!0}return!1}enter(e,t,r,s){let i=this.findPlace(e.create(t),r,!1);return i&&(i=this.enterInner(e,t,r,!0,s)),i}enterInner(e,t,r,s=!1,i){this.closeExtra();let o=this.top;o.match=o.match&&o.match.matchType(e);let l=co(e,i,o.options);o.options&cn&&o.content.length==0&&(l|=cn);let a=z.none;return r=r.filter(c=>(o.type?o.type.allowsMarkType(c.type):ho(c.type,e))?(a=c.addToSet(a),!1):!0),this.nodes.push(new Bn(e,t,a,s,null,l)),this.open++,r}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let t=this.open;t>=0;t--){if(this.nodes[t]==e)return this.open=t,!0;this.localPreserveWS&&(this.nodes[t].options|=xn)}return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let r=this.nodes[t].content;for(let s=r.length-1;s>=0;s--)e+=r[s].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==t&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,r){if(e!=t&&this.find)for(let s=0;s<this.find.length;s++)this.find[s].pos==null&&e.nodeType==1&&e.contains(this.find[s].node)&&t.compareDocumentPosition(this.find[s].node)&(r?2:4)&&(this.find[s].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),r=this.options.context,s=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(s?0:1),o=(l,a)=>{for(;l>=0;l--){let c=t[l];if(c==""){if(l==t.length-1||l==0)continue;for(;a>=i;a--)if(o(l-1,a))return!0;return!1}else{let u=a>0||a==0&&s?this.nodes[a].type:r&&a>=i?r.node(a-i).type:null;if(!u||u.name!=c&&!u.isInGroup(c))return!1;a--}}return!0};return o(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let r=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let t in this.parser.schema.nodes){let r=this.parser.schema.nodes[t];if(r.isTextblock&&r.defaultAttrs)return r}}}function pd(n){for(let e=n.firstChild,t=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&oa.hasOwnProperty(r)&&t?(t.appendChild(e),e=t):r=="li"?t=e:r&&(t=null)}}function md(n,e){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,e)}function fo(n){let e={};for(let t in n)e[t]=n[t];return e}function ho(n,e){let t=e.schema.nodes;for(let r in t){let s=t[r];if(!s.allowsMarkType(n))continue;let i=[],o=l=>{i.push(l);for(let a=0;a<l.edgeCount;a++){let{type:c,next:u}=l.edge(a);if(c==e||i.indexOf(u)<0&&o(u))return!0}};if(o(s.contentMatch))return!0}}class At{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},r){r||(r=as(t).createDocumentFragment());let s=r,i=[];return e.forEach(o=>{if(i.length||o.marks.length){let l=0,a=0;for(;l<i.length&&a<o.marks.length;){let c=o.marks[a];if(!this.marks[c.type.name]){a++;continue}if(!c.eq(i[l][0])||c.type.spec.spanning===!1)break;l++,a++}for(;l<i.length;)s=i.pop()[1];for(;a<o.marks.length;){let c=o.marks[a++],u=this.serializeMark(c,o.isInline,t);u&&(i.push([c,s]),s.appendChild(u.dom),s=u.contentDOM||u.dom)}}s.appendChild(this.serializeNodeInner(o,t))}),r}serializeNodeInner(e,t){let{dom:r,contentDOM:s}=Kn(as(t),this.nodes[e.type.name](e),null,e.attrs);if(s){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,s)}return r}serializeNode(e,t={}){let r=this.serializeNodeInner(e,t);for(let s=e.marks.length-1;s>=0;s--){let i=this.serializeMark(e.marks[s],e.isInline,t);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(e,t,r={}){let s=this.marks[e.type.name];return s&&Kn(as(r),s(e,t),null,e.attrs)}static renderSpec(e,t,r=null,s){return Kn(e,t,r,s)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new At(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=po(e.nodes);return t.text||(t.text=r=>r.text),t}static marksFromSchema(e){return po(e.marks)}}function po(n){let e={};for(let t in n){let r=n[t].spec.toDOM;r&&(e[t]=r)}return e}function as(n){return n.document||window.document}const mo=new WeakMap;function gd(n){let e=mo.get(n);return e===void 0&&mo.set(n,e=yd(n)),e}function yd(n){let e=null;function t(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let s=0;s<r.length;s++)t(r[s]);else for(let s in r)t(r[s])}return t(n),e}function Kn(n,e,t,r){if(typeof e=="string")return{dom:n.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let s=e[0],i;if(typeof s!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(i=gd(r))&&i.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let o=s.indexOf(" ");o>0&&(t=s.slice(0,o),s=s.slice(o+1));let l,a=t?n.createElementNS(t,s):n.createElement(s),c=e[1],u=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){u=2;for(let d in c)if(c[d]!=null){let f=d.indexOf(" ");f>0?a.setAttributeNS(d.slice(0,f),d.slice(f+1),c[d]):d=="style"&&a.style?a.style.cssText=c[d]:a.setAttribute(d,c[d])}}for(let d=u;d<e.length;d++){let f=e[d];if(f===0){if(d<e.length-1||d>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else{let{dom:h,contentDOM:p}=Kn(n,f,t,r);if(a.appendChild(h),p){if(l)throw new RangeError("Multiple content holes");l=p}}}return{dom:a,contentDOM:l}}const la=65535,aa=Math.pow(2,16);function bd(n,e){return n+e*aa}function go(n){return n&la}function kd(n){return(n-(n&la))/aa}const ca=1,ua=2,Jn=4,da=8;class zs{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(this.delInfo&da)>0}get deletedBefore(){return(this.delInfo&(ca|Jn))>0}get deletedAfter(){return(this.delInfo&(ua|Jn))>0}get deletedAcross(){return(this.delInfo&Jn)>0}}class fe{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&fe.empty)return fe.empty}recover(e){let t=0,r=go(e);if(!this.inverted)for(let s=0;s<r;s++)t+=this.ranges[s*3+2]-this.ranges[s*3+1];return this.ranges[r*3]+t+kd(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,r){let s=0,i=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?s:0);if(a>e)break;let c=this.ranges[l+i],u=this.ranges[l+o],d=a+c;if(e<=d){let f=c?e==a?-1:e==d?1:t:t,h=a+s+(f<0?0:u);if(r)return h;let p=e==(t<0?a:d)?null:bd(l/3,e-a),m=e==a?ua:e==d?ca:Jn;return(t<0?e!=a:e!=d)&&(m|=da),new zs(h,m,p)}s+=u-c}return r?e+s:new zs(e+s,0,null)}touches(e,t){let r=0,s=go(t),i=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?r:0);if(a>e)break;let c=this.ranges[l+i],u=a+c;if(e<=u&&l==s*3)return!0;r+=this.ranges[l+o]-c}return!1}forEach(e){let t=this.inverted?2:1,r=this.inverted?1:2;for(let s=0,i=0;s<this.ranges.length;s+=3){let o=this.ranges[s],l=o-(this.inverted?i:0),a=o+(this.inverted?0:i),c=this.ranges[s+t],u=this.ranges[s+r];e(l,l+c,a,a+u),i+=u-c}}invert(){return new fe(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?fe.empty:new fe(e<0?[0,-e,0]:[0,0,e])}}fe.empty=new fe([]);class Sn{constructor(e,t,r=0,s=e?e.length:0){this.mirror=t,this.from=r,this.to=s,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(e=0,t=this.maps.length){return new Sn(this._maps,this.mirror,e,t)}appendMap(e,t){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),t!=null&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,r=this._maps.length;t<e._maps.length;t++){let s=e.getMirror(t);this.appendMap(e._maps[t],s!=null&&s<t?r+s:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,r=this._maps.length+e._maps.length;t>=0;t--){let s=e.getMirror(t);this.appendMap(e._maps[t].invert(),s!=null&&s>t?r-s-1:void 0)}}invert(){let e=new Sn;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,r){let s=0;for(let i=this.from;i<this.to;i++){let o=this._maps[i],l=o.mapResult(e,t);if(l.recover!=null){let a=this.getMirror(i);if(a!=null&&a>i&&a<this.to){i=a,e=this._maps[a].recover(l.recover);continue}}s|=l.delInfo,e=l.pos}return r?e:new zs(e,s,null)}}const cs=Object.create(null);class se{getMap(){return fe.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=cs[t.stepType];if(!r)throw new RangeError(`No step type ${t.stepType} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in cs)throw new RangeError("Duplicate use of step JSON ID "+e);return cs[e]=t,t.prototype.jsonID=e,t}}class q{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new q(e,null)}static fail(e){return new q(null,e)}static fromReplace(e,t,r,s){try{return q.ok(e.replace(t,r,s))}catch(i){if(i instanceof Zn)return q.fail(i.message);throw i}}}function di(n,e,t){let r=[];for(let s=0;s<n.childCount;s++){let i=n.child(s);i.content.size&&(i=i.copy(di(i.content,e,i))),i.isInline&&(i=e(i,t,s)),r.push(i)}return k.fromArray(r)}class Ge extends se{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=e.resolve(this.from),s=r.node(r.sharedDepth(this.to)),i=new v(di(t.content,(o,l)=>!o.isAtom||!l.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),s),t.openStart,t.openEnd);return q.fromReplace(e,this.from,this.to,i)}invert(){return new ve(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new Ge(t.pos,r.pos,this.mark)}merge(e){return e instanceof Ge&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Ge(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Ge(t.from,t.to,e.markFromJSON(t.mark))}}se.jsonID("addMark",Ge);class ve extends se{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=new v(di(t.content,s=>s.mark(this.mark.removeFromSet(s.marks)),e),t.openStart,t.openEnd);return q.fromReplace(e,this.from,this.to,r)}invert(){return new Ge(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new ve(t.pos,r.pos,this.mark)}merge(e){return e instanceof ve&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new ve(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new ve(t.from,t.to,e.markFromJSON(t.mark))}}se.jsonID("removeMark",ve);class Ye extends se{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return q.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return q.fromReplace(e,this.pos,this.pos+1,new v(k.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let r=this.mark.addToSet(t.marks);if(r.length==t.marks.length){for(let s=0;s<t.marks.length;s++)if(!t.marks[s].isInSet(r))return new Ye(this.pos,t.marks[s]);return new Ye(this.pos,this.mark)}}return new Ct(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Ye(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new Ye(t.pos,e.markFromJSON(t.mark))}}se.jsonID("addNodeMark",Ye);class Ct extends se{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return q.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return q.fromReplace(e,this.pos,this.pos+1,new v(k.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new Ye(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Ct(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Ct(t.pos,e.markFromJSON(t.mark))}}se.jsonID("removeNodeMark",Ct);class U extends se{constructor(e,t,r,s=!1){super(),this.from=e,this.to=t,this.slice=r,this.structure=s}apply(e){return this.structure&&$s(e,this.from,this.to)?q.fail("Structure replace would overwrite content"):q.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new fe([this.from,this.to-this.from,this.slice.size])}invert(e){return new U(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.to,-1),r=this.from==this.to&&U.MAP_BIAS<0?t:e.mapResult(this.from,1);return r.deletedAcross&&t.deletedAcross?null:new U(r.pos,Math.max(r.pos,t.pos),this.slice,this.structure)}merge(e){if(!(e instanceof U)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let t=this.slice.size+e.slice.size==0?v.empty:new v(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new U(this.from,this.to+(e.to-e.from),t,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let t=this.slice.size+e.slice.size==0?v.empty:new v(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new U(e.from,this.to,t,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new U(t.from,t.to,v.fromJSON(e,t.slice),!!t.structure)}}U.MAP_BIAS=1;se.jsonID("replace",U);class Y extends se{constructor(e,t,r,s,i,o,l=!1){super(),this.from=e,this.to=t,this.gapFrom=r,this.gapTo=s,this.slice=i,this.insert=o,this.structure=l}apply(e){if(this.structure&&($s(e,this.from,this.gapFrom)||$s(e,this.gapTo,this.to)))return q.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return q.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,t.content);return r?q.fromReplace(e,this.from,this.to,r):q.fail("Content does not fit in gap")}getMap(){return new fe([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new Y(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),s=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return t.deletedAcross&&r.deletedAcross||s<t.pos||i>r.pos?null:new Y(t.pos,r.pos,s,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Y(t.from,t.to,t.gapFrom,t.gapTo,v.fromJSON(e,t.slice),t.insert,!!t.structure)}}se.jsonID("replaceAround",Y);function $s(n,e,t){let r=n.resolve(e),s=t-e,i=r.depth;for(;s>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,s--;if(s>0){let o=r.node(i).maybeChild(r.indexAfter(i));for(;s>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,s--}}return!1}function xd(n,e,t,r){let s=[],i=[],o,l;n.doc.nodesBetween(e,t,(a,c,u)=>{if(!a.isInline)return;let d=a.marks;if(!r.isInSet(d)&&u.type.allowsMarkType(r.type)){let f=Math.max(c,e),h=Math.min(c+a.nodeSize,t),p=r.addToSet(d);for(let m=0;m<d.length;m++)d[m].isInSet(p)||(o&&o.to==f&&o.mark.eq(d[m])?o.to=h:s.push(o=new ve(f,h,d[m])));l&&l.to==f?l.to=h:i.push(l=new Ge(f,h,r))}}),s.forEach(a=>n.step(a)),i.forEach(a=>n.step(a))}function Sd(n,e,t,r){let s=[],i=0;n.doc.nodesBetween(e,t,(o,l)=>{if(!o.isInline)return;i++;let a=null;if(r instanceof jr){let c=o.marks,u;for(;u=r.isInSet(c);)(a||(a=[])).push(u),c=u.removeFromSet(c)}else r?r.isInSet(o.marks)&&(a=[r]):a=o.marks;if(a&&a.length){let c=Math.min(l+o.nodeSize,t);for(let u=0;u<a.length;u++){let d=a[u],f;for(let h=0;h<s.length;h++){let p=s[h];p.step==i-1&&d.eq(s[h].style)&&(f=p)}f?(f.to=c,f.step=i):s.push({style:d,from:Math.max(l,e),to:c,step:i})}}}),s.forEach(o=>n.step(new ve(o.from,o.to,o.style)))}function fi(n,e,t,r=t.contentMatch,s=!0){let i=n.doc.nodeAt(e),o=[],l=e+1;for(let a=0;a<i.childCount;a++){let c=i.child(a),u=l+c.nodeSize,d=r.matchType(c.type);if(!d)o.push(new U(l,u,v.empty));else{r=d;for(let f=0;f<c.marks.length;f++)t.allowsMarkType(c.marks[f].type)||n.step(new ve(l,u,c.marks[f]));if(s&&c.isText&&t.whitespace!="pre"){let f,h=/\r?\n|\r/g,p;for(;f=h.exec(c.text);)p||(p=new v(k.from(t.schema.text(" ",t.allowedMarks(c.marks))),0,0)),o.push(new U(l+f.index,l+f.index+f[0].length,p))}}l=u}if(!r.validEnd){let a=r.fillBefore(k.empty,!0);n.replace(l,l,new v(a,0,0))}for(let a=o.length-1;a>=0;a--)n.step(o[a])}function wd(n,e,t){return(e==0||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function Yt(n){let t=n.parent.content.cutByIndex(n.startIndex,n.endIndex);for(let r=n.depth,s=0,i=0;;--r){let o=n.$from.node(r),l=n.$from.index(r)+s,a=n.$to.indexAfter(r)-i;if(r<n.depth&&o.canReplace(l,a,t))return r;if(r==0||o.type.spec.isolating||!wd(o,l,a))break;l&&(s=1),a<o.childCount&&(i=1)}return null}function Cd(n,e,t){let{$from:r,$to:s,depth:i}=e,o=r.before(i+1),l=s.after(i+1),a=o,c=l,u=k.empty,d=0;for(let p=i,m=!1;p>t;p--)m||r.index(p)>0?(m=!0,u=k.from(r.node(p).copy(u)),d++):a--;let f=k.empty,h=0;for(let p=i,m=!1;p>t;p--)m||s.after(p+1)<s.end(p)?(m=!0,f=k.from(s.node(p).copy(f)),h++):c++;n.step(new Y(a,c,o,l,new v(u.append(f),d,h),u.size-d,!0))}function hi(n,e,t=null,r=n){let s=vd(n,e),i=s&&Ed(r,e);return i?s.map(yo).concat({type:e,attrs:t}).concat(i.map(yo)):null}function yo(n){return{type:n,attrs:null}}function vd(n,e){let{parent:t,startIndex:r,endIndex:s}=n,i=t.contentMatchAt(r).findWrapping(e);if(!i)return null;let o=i.length?i[0]:e;return t.canReplaceWith(r,s,o)?i:null}function Ed(n,e){let{parent:t,startIndex:r,endIndex:s}=n,i=t.child(r),o=e.contentMatch.findWrapping(i.type);if(!o)return null;let a=(o.length?o[o.length-1]:e).contentMatch;for(let c=r;a&&c<s;c++)a=a.matchType(t.child(c).type);return!a||!a.validEnd?null:o}function Td(n,e,t){let r=k.empty;for(let o=t.length-1;o>=0;o--){if(r.size){let l=t[o].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=k.from(t[o].type.create(t[o].attrs,r))}let s=e.start,i=e.end;n.step(new Y(s,i,s,i,new v(r,0,0),t.length,!0))}function Md(n,e,t,r,s){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=n.steps.length;n.doc.nodesBetween(e,t,(o,l)=>{let a=typeof s=="function"?s(o):s;if(o.isTextblock&&!o.hasMarkup(r,a)&&Ad(n.doc,n.mapping.slice(i).map(l),r)){let c=null;if(r.schema.linebreakReplacement){let h=r.whitespace=="pre",p=!!r.contentMatch.matchType(r.schema.linebreakReplacement);h&&!p?c=!1:!h&&p&&(c=!0)}c===!1&&ha(n,o,l,i),fi(n,n.mapping.slice(i).map(l,1),r,void 0,c===null);let u=n.mapping.slice(i),d=u.map(l,1),f=u.map(l+o.nodeSize,1);return n.step(new Y(d,f,d+1,f-1,new v(k.from(r.create(a,null,o.marks)),0,0),1,!0)),c===!0&&fa(n,o,l,i),!1}})}function fa(n,e,t,r){e.forEach((s,i)=>{if(s.isText){let o,l=/\r?\n|\r/g;for(;o=l.exec(s.text);){let a=n.mapping.slice(r).map(t+1+i+o.index);n.replaceWith(a,a+1,e.type.schema.linebreakReplacement.create())}}})}function ha(n,e,t,r){e.forEach((s,i)=>{if(s.type==s.type.schema.linebreakReplacement){let o=n.mapping.slice(r).map(t+1+i);n.replaceWith(o,o+1,e.type.schema.text(`
|
|
@@ -139,4 +139,4 @@ ${h.slice(c+2)}`,d+=1;else break}e.push({indent:c,number:parseInt(l,10),content:
|
|
|
139
139
|
`):"",markdownTokenizer:{name:"orderedList",level:"block",start:n=>{const e=n.match(/^(\s*)(\d+)\.\s+/),t=e?.index;return t!==void 0?t:-1},tokenize:(n,e,t)=>{var r;const s=n.split(`
|
|
140
140
|
`),[i,o]=Nb(s);if(i.length===0)return;const l=Cu(i,0,t);return l.length===0?void 0:{type:"list",ordered:!0,start:((r=i[0])==null?void 0:r.number)||1,items:l,raw:s.slice(0,o).join(`
|
|
141
141
|
`)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:n,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(Rb,this.editor.getAttributes(Pl)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let n=Jt({find:Ll,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(n=Jt({find:Ll,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(Pl)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[n]}}),Db=/^\s*(\[([( |x])?\])\s$/,Ib=pe.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:n=>{const e=n.getAttribute("data-checked");return e===""||e==="true"},renderHTML:n=>({"data-checked":n.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:n,HTMLAttributes:e}){return["li",J(this.options.HTMLAttributes,e,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:n.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(n,e)=>{const t=[];if(n.tokens&&n.tokens.length>0?t.push(e.createNode("paragraph",{},e.parseInline(n.tokens))):n.text?t.push(e.createNode("paragraph",{},[e.createNode("text",{text:n.text})])):t.push(e.createNode("paragraph",{},[])),n.nestedTokens&&n.nestedTokens.length>0){const r=e.parseChildren(n.nestedTokens);t.push(...r)}return e.createNode("taskItem",{checked:n.checked||!1},t)},renderMarkdown:(n,e)=>{var t;const s=`- [${(t=n.attrs)!=null&&t.checked?"x":" "}] `;return $i(n,e,s)},addKeyboardShortcuts(){const n={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...n,Tab:()=>this.editor.commands.sinkListItem(this.name)}:n},addNodeView(){return({node:n,HTMLAttributes:e,getPos:t,editor:r})=>{const s=document.createElement("li"),i=document.createElement("label"),o=document.createElement("span"),l=document.createElement("input"),a=document.createElement("div"),c=d=>{var f,h;l.ariaLabel=((h=(f=this.options.a11y)==null?void 0:f.checkboxLabel)==null?void 0:h.call(f,d,l.checked))||`Task item checkbox for ${d.textContent||"empty task item"}`};c(n),i.contentEditable="false",l.type="checkbox",l.addEventListener("mousedown",d=>d.preventDefault()),l.addEventListener("change",d=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){l.checked=!l.checked;return}const{checked:f}=d.target;r.isEditable&&typeof t=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:h})=>{const p=t();if(typeof p!="number")return!1;const m=h.doc.nodeAt(p);return h.setNodeMarkup(p,void 0,{...m?.attrs,checked:f}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(n,f)||(l.checked=!l.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([d,f])=>{s.setAttribute(d,f)}),s.dataset.checked=n.attrs.checked,l.checked=n.attrs.checked,i.append(l,o),s.append(i,a),Object.entries(e).forEach(([d,f])=>{s.setAttribute(d,f)});let u=new Set(Object.keys(e));return{dom:s,contentDOM:a,update:d=>{if(d.type!==this.type)return!1;s.dataset.checked=d.attrs.checked,l.checked=d.attrs.checked,c(d);const f=r.extensionManager.attributes,h=qt(d,f),p=new Set(Object.keys(h)),m=this.options.HTMLAttributes;return u.forEach(g=>{p.has(g)||(g in m?s.setAttribute(g,m[g]):s.removeAttribute(g))}),Object.entries(h).forEach(([g,y])=>{y==null?g in m?s.setAttribute(g,m[g]):s.removeAttribute(g):s.setAttribute(g,y)}),u=p,!0}}}},addInputRules(){return[Jt({find:Db,type:this.type,getAttributes:n=>({checked:n[n.length-1]==="x"})})]}}),Pb=pe.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:n}){return["ul",J(this.options.HTMLAttributes,n,{"data-type":this.name}),0]},parseMarkdown:(n,e)=>e.createNode("taskList",{},e.parseChildren(n.items||[])),renderMarkdown:(n,e)=>n.content?e.renderChildren(n.content,`
|
|
142
|
-
`):"",markdownTokenizer:{name:"taskList",level:"block",start(n){var e;const t=(e=n.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:e.index;return t!==void 0?t:-1},tokenize(n,e,t){const r=i=>{const o=Zs(i,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:l=>({indentLevel:l[1].length,mainContent:l[4],checked:l[3].toLowerCase()==="x"}),createToken:(l,a)=>({type:"taskItem",raw:"",mainContent:l.mainContent,indentLevel:l.indentLevel,checked:l.checked,text:l.mainContent,tokens:t.inlineTokens(l.mainContent),nestedTokens:a}),customNestedParser:r},t);return o?[{type:"taskList",raw:o.raw,items:o.items}]:t.blockTokens(i)},s=Zs(n,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:i=>({indentLevel:i[1].length,mainContent:i[4],checked:i[3].toLowerCase()==="x"}),createToken:(i,o)=>({type:"taskItem",raw:"",mainContent:i.mainContent,indentLevel:i.indentLevel,checked:i.checked,text:i.mainContent,tokens:t.inlineTokens(i.mainContent),nestedTokens:o}),customNestedParser:r},t);if(s)return{type:"taskList",raw:s.raw,items:s.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:n})=>n.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});W.create({name:"listKit",addExtensions(){const n=[];return this.options.bulletList!==!1&&n.push(mu.configure(this.options.bulletList)),this.options.listItem!==!1&&n.push(gu.configure(this.options.listItem)),this.options.listKeymap!==!1&&n.push(wu.configure(this.options.listKeymap)),this.options.orderedList!==!1&&n.push(vu.configure(this.options.orderedList)),this.options.taskItem!==!1&&n.push(Ib.configure(this.options.taskItem)),this.options.taskList!==!1&&n.push(Pb.configure(this.options.taskList)),n}});var Bl=" ",Lb=" ",Bb=pe.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:n}){return["p",J(this.options.HTMLAttributes,n),0]},parseMarkdown:(n,e)=>{const t=n.tokens||[];if(t.length===1&&t[0].type==="image")return e.parseChildren([t[0]]);const r=e.parseInline(t);return r.length===1&&r[0].type==="text"&&(r[0].text===Bl||r[0].text===Lb)?e.createNode("paragraph",void 0,[]):e.createNode("paragraph",void 0,r)},renderMarkdown:(n,e,t)=>{var r,s;if(!n)return"";const i=Array.isArray(n.content)?n.content:[];if(i.length===0){const o=Array.isArray((r=t?.previousNode)==null?void 0:r.content)?t.previousNode.content:[];return((s=t?.previousNode)==null?void 0:s.type)==="paragraph"&&o.length===0?Bl:""}return e.renderChildren(i)},addCommands(){return{setParagraph:()=>({commands:n})=>n.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),zb=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,$b=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,Fb=Nt.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:n=>n.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["s",J(this.options.HTMLAttributes,n),0]},markdownTokenName:"del",parseMarkdown:(n,e)=>e.applyMark("strike",e.parseInline(n.tokens||[])),renderMarkdown:(n,e)=>`~~${e.renderChildren(n)}~~`,addCommands(){return{setStrike:()=>({commands:n})=>n.setMark(this.name),toggleStrike:()=>({commands:n})=>n.toggleMark(this.name),unsetStrike:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Kt({find:zb,type:this.type})]},addPasteRules(){return[Tt({find:$b,type:this.type})]}}),_b=pe.create({name:"text",group:"inline",parseMarkdown:n=>({type:"text",text:n.text||""}),renderMarkdown:n=>n.text||""}),Vb=Nt.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:n=>n.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["u",J(this.options.HTMLAttributes,n),0]},parseMarkdown(n,e){return e.applyMark(this.name||"underline",e.parseInline(n.tokens||[]))},renderMarkdown(n,e){return`++${e.renderChildren(n)}++`},markdownTokenizer:{name:"underline",level:"inline",start(n){return n.indexOf("++")},tokenize(n,e,t){const s=/^(\+\+)([\s\S]+?)(\+\+)/.exec(n);if(!s)return;const i=s[2].trim();return{type:"underline",raw:s[0],text:i,tokens:t.inlineTokens(i)}}},addCommands(){return{setUnderline:()=>({commands:n})=>n.setMark(this.name),toggleUnderline:()=>({commands:n})=>n.toggleMark(this.name),unsetUnderline:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),jb=W.create({name:"starterKit",addExtensions(){var n,e,t,r;const s=[];return this.options.bold!==!1&&s.push(By.configure(this.options.bold)),this.options.blockquote!==!1&&s.push(Ry.configure(this.options.blockquote)),this.options.bulletList!==!1&&s.push(mu.configure(this.options.bulletList)),this.options.code!==!1&&s.push(Fy.configure(this.options.code)),this.options.codeBlock!==!1&&s.push(jy.configure(this.options.codeBlock)),this.options.document!==!1&&s.push(Hy.configure(this.options.document)),this.options.dropcursor!==!1&&s.push(Ey.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&s.push(Ty.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&s.push(Wy.configure(this.options.hardBreak)),this.options.heading!==!1&&s.push(Uy.configure(this.options.heading)),this.options.undoRedo!==!1&&s.push(Ny.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&s.push(qy.configure(this.options.horizontalRule)),this.options.italic!==!1&&s.push(Xy.configure(this.options.italic)),this.options.listItem!==!1&&s.push(gu.configure(this.options.listItem)),this.options.listKeymap!==!1&&s.push(wu.configure((n=this.options)==null?void 0:n.listKeymap)),this.options.link!==!1&&s.push(wb.configure((e=this.options)==null?void 0:e.link)),this.options.orderedList!==!1&&s.push(vu.configure(this.options.orderedList)),this.options.paragraph!==!1&&s.push(Bb.configure(this.options.paragraph)),this.options.strike!==!1&&s.push(Fb.configure(this.options.strike)),this.options.text!==!1&&s.push(_b.configure(this.options.text)),this.options.underline!==!1&&s.push(Vb.configure((t=this.options)==null?void 0:t.underline)),this.options.trailingNode!==!1&&s.push(Ay.configure((r=this.options)==null?void 0:r.trailingNode)),s}}),m0=jb,rs="Collapsible",[Hb,g0]=_l(rs),[Wb,Qi]=Hb(rs),Eu=w.forwardRef((n,e)=>{const{__scopeCollapsible:t,open:r,defaultOpen:s,disabled:i,onOpenChange:o,...l}=n,[a,c]=Uu({prop:r,defaultProp:s??!1,onChange:o,caller:rs});return O.jsx(Wb,{scope:t,disabled:i,contentId:qu(),open:a,onOpenToggle:w.useCallback(()=>c(u=>!u),[c]),children:O.jsx(it.div,{"data-state":eo(a),"data-disabled":i?"":void 0,...l,ref:e})})});Eu.displayName=rs;var Tu="CollapsibleTrigger",Mu=w.forwardRef((n,e)=>{const{__scopeCollapsible:t,...r}=n,s=Qi(Tu,t);return O.jsx(it.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":eo(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...r,ref:e,onClick:Qe(n.onClick,s.onOpenToggle)})});Mu.displayName=Tu;var Zi="CollapsibleContent",Au=w.forwardRef((n,e)=>{const{forceMount:t,...r}=n,s=Qi(Zi,n.__scopeCollapsible);return O.jsx(On,{present:t||s.open,children:({present:i})=>O.jsx(Ub,{...r,ref:e,present:i})})});Au.displayName=Zi;var Ub=w.forwardRef((n,e)=>{const{__scopeCollapsible:t,present:r,children:s,...i}=n,o=Qi(Zi,t),[l,a]=w.useState(r),c=w.useRef(null),u=Mt(e,c),d=w.useRef(0),f=d.current,h=w.useRef(0),p=h.current,m=o.open||l,g=w.useRef(m),y=w.useRef(void 0);return w.useEffect(()=>{const b=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(b)},[]),Fl(()=>{const b=c.current;if(b){y.current=y.current||{transitionDuration:b.style.transitionDuration,animationName:b.style.animationName},b.style.transitionDuration="0s",b.style.animationName="none";const C=b.getBoundingClientRect();d.current=C.height,h.current=C.width,g.current||(b.style.transitionDuration=y.current.transitionDuration,b.style.animationName=y.current.animationName),a(r)}},[o.open,r]),O.jsx(it.div,{"data-state":eo(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!m,...i,ref:u,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":p?`${p}px`:void 0,...n.style},children:m&&s})});function eo(n){return n?"open":"closed"}var y0=Eu,b0=Mu,k0=Au;function qb(n,e){return w.useReducer((t,r)=>e[t][r]??t,n)}var to="ScrollArea",[Nu]=_l(to),[Kb,we]=Nu(to),Ou=w.forwardRef((n,e)=>{const{__scopeScrollArea:t,type:r="hover",dir:s,scrollHideDelay:i=600,...o}=n,[l,a]=w.useState(null),[c,u]=w.useState(null),[d,f]=w.useState(null),[h,p]=w.useState(null),[m,g]=w.useState(null),[y,b]=w.useState(0),[C,T]=w.useState(0),[S,M]=w.useState(!1),[E,I]=w.useState(!1),R=Mt(e,de=>a(de)),$=Ku(s);return O.jsx(Kb,{scope:t,type:r,dir:$,scrollHideDelay:i,scrollArea:l,viewport:c,onViewportChange:u,content:d,onContentChange:f,scrollbarX:h,onScrollbarXChange:p,scrollbarXEnabled:S,onScrollbarXEnabledChange:M,scrollbarY:m,onScrollbarYChange:g,scrollbarYEnabled:E,onScrollbarYEnabledChange:I,onCornerWidthChange:b,onCornerHeightChange:T,children:O.jsx(it.div,{dir:$,...o,ref:R,style:{position:"relative","--radix-scroll-area-corner-width":y+"px","--radix-scroll-area-corner-height":C+"px",...n.style}})})});Ou.displayName=to;var Ru="ScrollAreaViewport",Du=w.forwardRef((n,e)=>{const{__scopeScrollArea:t,children:r,nonce:s,...i}=n,o=we(Ru,t),l=w.useRef(null),a=Mt(e,l,o.onViewportChange);return O.jsxs(O.Fragment,{children:[O.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),O.jsx(it.div,{"data-radix-scroll-area-viewport":"",...i,ref:a,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...n.style},children:O.jsx("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});Du.displayName=Ru;var Re="ScrollAreaScrollbar",Iu=w.forwardRef((n,e)=>{const{forceMount:t,...r}=n,s=we(Re,n.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:o}=s,l=n.orientation==="horizontal";return w.useEffect(()=>(l?i(!0):o(!0),()=>{l?i(!1):o(!1)}),[l,i,o]),s.type==="hover"?O.jsx(Jb,{...r,ref:e,forceMount:t}):s.type==="scroll"?O.jsx(Gb,{...r,ref:e,forceMount:t}):s.type==="auto"?O.jsx(Pu,{...r,ref:e,forceMount:t}):s.type==="always"?O.jsx(no,{...r,ref:e}):null});Iu.displayName=Re;var Jb=w.forwardRef((n,e)=>{const{forceMount:t,...r}=n,s=we(Re,n.__scopeScrollArea),[i,o]=w.useState(!1);return w.useEffect(()=>{const l=s.scrollArea;let a=0;if(l){const c=()=>{window.clearTimeout(a),o(!0)},u=()=>{a=window.setTimeout(()=>o(!1),s.scrollHideDelay)};return l.addEventListener("pointerenter",c),l.addEventListener("pointerleave",u),()=>{window.clearTimeout(a),l.removeEventListener("pointerenter",c),l.removeEventListener("pointerleave",u)}}},[s.scrollArea,s.scrollHideDelay]),O.jsx(On,{present:t||i,children:O.jsx(Pu,{"data-state":i?"visible":"hidden",...r,ref:e})})}),Gb=w.forwardRef((n,e)=>{const{forceMount:t,...r}=n,s=we(Re,n.__scopeScrollArea),i=n.orientation==="horizontal",o=is(()=>a("SCROLL_END"),100),[l,a]=qb("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return w.useEffect(()=>{if(l==="idle"){const c=window.setTimeout(()=>a("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(c)}},[l,s.scrollHideDelay,a]),w.useEffect(()=>{const c=s.viewport,u=i?"scrollLeft":"scrollTop";if(c){let d=c[u];const f=()=>{const h=c[u];d!==h&&(a("SCROLL"),o()),d=h};return c.addEventListener("scroll",f),()=>c.removeEventListener("scroll",f)}},[s.viewport,i,a,o]),O.jsx(On,{present:t||l!=="hidden",children:O.jsx(no,{"data-state":l==="hidden"?"hidden":"visible",...r,ref:e,onPointerEnter:Qe(n.onPointerEnter,()=>a("POINTER_ENTER")),onPointerLeave:Qe(n.onPointerLeave,()=>a("POINTER_LEAVE"))})})}),Pu=w.forwardRef((n,e)=>{const t=we(Re,n.__scopeScrollArea),{forceMount:r,...s}=n,[i,o]=w.useState(!1),l=n.orientation==="horizontal",a=is(()=>{if(t.viewport){const c=t.viewport.offsetWidth<t.viewport.scrollWidth,u=t.viewport.offsetHeight<t.viewport.scrollHeight;o(l?c:u)}},10);return Gt(t.viewport,a),Gt(t.content,a),O.jsx(On,{present:r||i,children:O.jsx(no,{"data-state":i?"visible":"hidden",...s,ref:e})})}),no=w.forwardRef((n,e)=>{const{orientation:t="vertical",...r}=n,s=we(Re,n.__scopeScrollArea),i=w.useRef(null),o=w.useRef(0),[l,a]=w.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=Fu(l.viewport,l.content),u={...r,sizes:l,onSizesChange:a,hasThumb:c>0&&c<1,onThumbChange:f=>i.current=f,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:f=>o.current=f};function d(f,h){return t0(f,o.current,l,h)}return t==="horizontal"?O.jsx(Yb,{...u,ref:e,onThumbPositionChange:()=>{if(s.viewport&&i.current){const f=s.viewport.scrollLeft,h=zl(f,l,s.dir);i.current.style.transform=`translate3d(${h}px, 0, 0)`}},onWheelScroll:f=>{s.viewport&&(s.viewport.scrollLeft=f)},onDragScroll:f=>{s.viewport&&(s.viewport.scrollLeft=d(f,s.dir))}}):t==="vertical"?O.jsx(Xb,{...u,ref:e,onThumbPositionChange:()=>{if(s.viewport&&i.current){const f=s.viewport.scrollTop,h=zl(f,l);i.current.style.transform=`translate3d(0, ${h}px, 0)`}},onWheelScroll:f=>{s.viewport&&(s.viewport.scrollTop=f)},onDragScroll:f=>{s.viewport&&(s.viewport.scrollTop=d(f))}}):null}),Yb=w.forwardRef((n,e)=>{const{sizes:t,onSizesChange:r,...s}=n,i=we(Re,n.__scopeScrollArea),[o,l]=w.useState(),a=w.useRef(null),c=Mt(e,a,i.onScrollbarXChange);return w.useEffect(()=>{a.current&&l(getComputedStyle(a.current))},[a]),O.jsx(Bu,{"data-orientation":"horizontal",...s,ref:c,sizes:t,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":ss(t)+"px",...n.style},onThumbPointerDown:u=>n.onThumbPointerDown(u.x),onDragScroll:u=>n.onDragScroll(u.x),onWheelScroll:(u,d)=>{if(i.viewport){const f=i.viewport.scrollLeft+u.deltaX;n.onWheelScroll(f),Vu(f,d)&&u.preventDefault()}},onResize:()=>{a.current&&i.viewport&&o&&r({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:a.current.clientWidth,paddingStart:Vr(o.paddingLeft),paddingEnd:Vr(o.paddingRight)}})}})}),Xb=w.forwardRef((n,e)=>{const{sizes:t,onSizesChange:r,...s}=n,i=we(Re,n.__scopeScrollArea),[o,l]=w.useState(),a=w.useRef(null),c=Mt(e,a,i.onScrollbarYChange);return w.useEffect(()=>{a.current&&l(getComputedStyle(a.current))},[a]),O.jsx(Bu,{"data-orientation":"vertical",...s,ref:c,sizes:t,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":ss(t)+"px",...n.style},onThumbPointerDown:u=>n.onThumbPointerDown(u.y),onDragScroll:u=>n.onDragScroll(u.y),onWheelScroll:(u,d)=>{if(i.viewport){const f=i.viewport.scrollTop+u.deltaY;n.onWheelScroll(f),Vu(f,d)&&u.preventDefault()}},onResize:()=>{a.current&&i.viewport&&o&&r({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:a.current.clientHeight,paddingStart:Vr(o.paddingTop),paddingEnd:Vr(o.paddingBottom)}})}})}),[Qb,Lu]=Nu(Re),Bu=w.forwardRef((n,e)=>{const{__scopeScrollArea:t,sizes:r,hasThumb:s,onThumbChange:i,onThumbPointerUp:o,onThumbPointerDown:l,onThumbPositionChange:a,onDragScroll:c,onWheelScroll:u,onResize:d,...f}=n,h=we(Re,t),[p,m]=w.useState(null),g=Mt(e,R=>m(R)),y=w.useRef(null),b=w.useRef(""),C=h.viewport,T=r.content-r.viewport,S=ut(u),M=ut(a),E=is(d,10);function I(R){if(y.current){const $=R.clientX-y.current.left,de=R.clientY-y.current.top;c({x:$,y:de})}}return w.useEffect(()=>{const R=$=>{const de=$.target;p?.contains(de)&&S($,T)};return document.addEventListener("wheel",R,{passive:!1}),()=>document.removeEventListener("wheel",R,{passive:!1})},[C,p,T,S]),w.useEffect(M,[r,M]),Gt(p,E),Gt(h.content,E),O.jsx(Qb,{scope:t,scrollbar:p,hasThumb:s,onThumbChange:ut(i),onThumbPointerUp:ut(o),onThumbPositionChange:M,onThumbPointerDown:ut(l),children:O.jsx(it.div,{...f,ref:g,style:{position:"absolute",...f.style},onPointerDown:Qe(n.onPointerDown,R=>{R.button===0&&(R.target.setPointerCapture(R.pointerId),y.current=p.getBoundingClientRect(),b.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",h.viewport&&(h.viewport.style.scrollBehavior="auto"),I(R))}),onPointerMove:Qe(n.onPointerMove,I),onPointerUp:Qe(n.onPointerUp,R=>{const $=R.target;$.hasPointerCapture(R.pointerId)&&$.releasePointerCapture(R.pointerId),document.body.style.webkitUserSelect=b.current,h.viewport&&(h.viewport.style.scrollBehavior=""),y.current=null})})})}),_r="ScrollAreaThumb",zu=w.forwardRef((n,e)=>{const{forceMount:t,...r}=n,s=Lu(_r,n.__scopeScrollArea);return O.jsx(On,{present:t||s.hasThumb,children:O.jsx(Zb,{ref:e,...r})})}),Zb=w.forwardRef((n,e)=>{const{__scopeScrollArea:t,style:r,...s}=n,i=we(_r,t),o=Lu(_r,t),{onThumbPositionChange:l}=o,a=Mt(e,d=>o.onThumbChange(d)),c=w.useRef(void 0),u=is(()=>{c.current&&(c.current(),c.current=void 0)},100);return w.useEffect(()=>{const d=i.viewport;if(d){const f=()=>{if(u(),!c.current){const h=n0(d,l);c.current=h,l()}};return l(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[i.viewport,u,l]),O.jsx(it.div,{"data-state":o.hasThumb?"visible":"hidden",...s,ref:a,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Qe(n.onPointerDownCapture,d=>{const h=d.target.getBoundingClientRect(),p=d.clientX-h.left,m=d.clientY-h.top;o.onThumbPointerDown({x:p,y:m})}),onPointerUp:Qe(n.onPointerUp,o.onThumbPointerUp)})});zu.displayName=_r;var ro="ScrollAreaCorner",$u=w.forwardRef((n,e)=>{const t=we(ro,n.__scopeScrollArea),r=!!(t.scrollbarX&&t.scrollbarY);return t.type!=="scroll"&&r?O.jsx(e0,{...n,ref:e}):null});$u.displayName=ro;var e0=w.forwardRef((n,e)=>{const{__scopeScrollArea:t,...r}=n,s=we(ro,t),[i,o]=w.useState(0),[l,a]=w.useState(0),c=!!(i&&l);return Gt(s.scrollbarX,()=>{const u=s.scrollbarX?.offsetHeight||0;s.onCornerHeightChange(u),a(u)}),Gt(s.scrollbarY,()=>{const u=s.scrollbarY?.offsetWidth||0;s.onCornerWidthChange(u),o(u)}),c?O.jsx(it.div,{...r,ref:e,style:{width:i,height:l,position:"absolute",right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:0,...n.style}}):null});function Vr(n){return n?parseInt(n,10):0}function Fu(n,e){const t=n/e;return isNaN(t)?0:t}function ss(n){const e=Fu(n.viewport,n.content),t=n.scrollbar.paddingStart+n.scrollbar.paddingEnd,r=(n.scrollbar.size-t)*e;return Math.max(r,18)}function t0(n,e,t,r="ltr"){const s=ss(t),i=s/2,o=e||i,l=s-o,a=t.scrollbar.paddingStart+o,c=t.scrollbar.size-t.scrollbar.paddingEnd-l,u=t.content-t.viewport,d=r==="ltr"?[0,u]:[u*-1,0];return _u([a,c],d)(n)}function zl(n,e,t="ltr"){const r=ss(e),s=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,i=e.scrollbar.size-s,o=e.content-e.viewport,l=i-r,a=t==="ltr"?[0,o]:[o*-1,0],c=Ju(n,a);return _u([0,o],[0,l])(c)}function _u(n,e){return t=>{if(n[0]===n[1]||e[0]===e[1])return e[0];const r=(e[1]-e[0])/(n[1]-n[0]);return e[0]+r*(t-n[0])}}function Vu(n,e){return n>0&&n<e}var n0=(n,e=()=>{})=>{let t={left:n.scrollLeft,top:n.scrollTop},r=0;return(function s(){const i={left:n.scrollLeft,top:n.scrollTop},o=t.left!==i.left,l=t.top!==i.top;(o||l)&&e(),t=i,r=window.requestAnimationFrame(s)})(),()=>window.cancelAnimationFrame(r)};function is(n,e){const t=ut(n),r=w.useRef(0);return w.useEffect(()=>()=>window.clearTimeout(r.current),[]),w.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(t,e)},[t,e])}function Gt(n,e){const t=ut(e);Fl(()=>{let r=0;if(n){const s=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(t)});return s.observe(n),()=>{window.cancelAnimationFrame(r),s.unobserve(n)}}},[n,t])}var r0=Ou,s0=Du,i0=$u;function x0(n){const e=Vl.c(17);let t,r,s,i;e[0]!==n?({className:r,children:t,hideScrollbar:i,...s}=n,e[0]=n,e[1]=t,e[2]=r,e[3]=s,e[4]=i):(t=e[1],r=e[2],s=e[3],i=e[4]);const o=i===void 0?!1:i;let l;e[5]!==r?(l=jl("relative h-full w-full",r),e[5]=r,e[6]=l):l=e[6];let a;e[7]!==t?(a=O.jsx(s0,{"data-slot":"scroll-area-viewport",className:"h-full w-full overflow-auto rounded-[inherit] outline-none transition-[color,box-shadow] focus-visible:ring-[2px] focus-visible:ring-ring/20",children:O.jsx("div",{className:"flex min-w-0 flex-col",children:t})}),e[7]=t,e[8]=a):a=e[8];let c;e[9]!==o?(c=O.jsx(o0,{hideScrollbar:o}),e[9]=o,e[10]=c):c=e[10];let u;e[11]===Symbol.for("react.memo_cache_sentinel")?(u=O.jsx(i0,{}),e[11]=u):u=e[11];let d;return e[12]!==s||e[13]!==l||e[14]!==a||e[15]!==c?(d=O.jsxs(r0,{"data-slot":"scroll-area",className:l,...s,children:[a,c,u]}),e[12]=s,e[13]=l,e[14]=a,e[15]=c,e[16]=d):d=e[16],d}function o0(n){const e=Vl.c(15);let t,r,s,i;e[0]!==n?({className:t,orientation:s,hideScrollbar:i,...r}=n,e[0]=n,e[1]=t,e[2]=r,e[3]=s,e[4]=i):(t=e[1],r=e[2],s=e[3],i=e[4]);const o=s===void 0?"vertical":s,l=i===void 0?!1:i,a=o==="vertical"&&"h-full w-2.5 border-l border-l-transparent",c=o==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",u=l&&"hidden";let d;e[5]!==t||e[6]!==a||e[7]!==c||e[8]!==u?(d=jl("select-none touch-none p-px transition-colors",a,c,u,t),e[5]=t,e[6]=a,e[7]=c,e[8]=u,e[9]=d):d=e[9];let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f=O.jsx(zu,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"}),e[10]=f):f=e[10];let h;return e[11]!==o||e[12]!==r||e[13]!==d?(h=O.jsx(Iu,{"data-slot":"scroll-area-scrollbar",orientation:o,className:d,...r,children:f}),e[11]=o,e[12]=r,e[13]=d,e[14]=h):h=e[14],h}export{Mu as C,_ as D,Fi as E,pe as N,G as P,h0 as R,x0 as S,b0 as T,V as a,p0 as b,d0 as c,Kg as d,f0 as e,Au as f,y0 as g,k0 as h,m0 as i,g0 as j,ie as k,c0 as l,Ee as m,eg as n,J as o,sy as p,o0 as q,u0 as u};
|
|
142
|
+
`):"",markdownTokenizer:{name:"taskList",level:"block",start(n){var e;const t=(e=n.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:e.index;return t!==void 0?t:-1},tokenize(n,e,t){const r=i=>{const o=Zs(i,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:l=>({indentLevel:l[1].length,mainContent:l[4],checked:l[3].toLowerCase()==="x"}),createToken:(l,a)=>({type:"taskItem",raw:"",mainContent:l.mainContent,indentLevel:l.indentLevel,checked:l.checked,text:l.mainContent,tokens:t.inlineTokens(l.mainContent),nestedTokens:a}),customNestedParser:r},t);return o?[{type:"taskList",raw:o.raw,items:o.items}]:t.blockTokens(i)},s=Zs(n,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:i=>({indentLevel:i[1].length,mainContent:i[4],checked:i[3].toLowerCase()==="x"}),createToken:(i,o)=>({type:"taskItem",raw:"",mainContent:i.mainContent,indentLevel:i.indentLevel,checked:i.checked,text:i.mainContent,tokens:t.inlineTokens(i.mainContent),nestedTokens:o}),customNestedParser:r},t);if(s)return{type:"taskList",raw:s.raw,items:s.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:n})=>n.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});W.create({name:"listKit",addExtensions(){const n=[];return this.options.bulletList!==!1&&n.push(mu.configure(this.options.bulletList)),this.options.listItem!==!1&&n.push(gu.configure(this.options.listItem)),this.options.listKeymap!==!1&&n.push(wu.configure(this.options.listKeymap)),this.options.orderedList!==!1&&n.push(vu.configure(this.options.orderedList)),this.options.taskItem!==!1&&n.push(Ib.configure(this.options.taskItem)),this.options.taskList!==!1&&n.push(Pb.configure(this.options.taskList)),n}});var Bl=" ",Lb=" ",Bb=pe.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:n}){return["p",J(this.options.HTMLAttributes,n),0]},parseMarkdown:(n,e)=>{const t=n.tokens||[];if(t.length===1&&t[0].type==="image")return e.parseChildren([t[0]]);const r=e.parseInline(t);return r.length===1&&r[0].type==="text"&&(r[0].text===Bl||r[0].text===Lb)?e.createNode("paragraph",void 0,[]):e.createNode("paragraph",void 0,r)},renderMarkdown:(n,e,t)=>{var r,s;if(!n)return"";const i=Array.isArray(n.content)?n.content:[];if(i.length===0){const o=Array.isArray((r=t?.previousNode)==null?void 0:r.content)?t.previousNode.content:[];return((s=t?.previousNode)==null?void 0:s.type)==="paragraph"&&o.length===0?Bl:""}return e.renderChildren(i)},addCommands(){return{setParagraph:()=>({commands:n})=>n.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),zb=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,$b=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,Fb=Nt.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:n=>n.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["s",J(this.options.HTMLAttributes,n),0]},markdownTokenName:"del",parseMarkdown:(n,e)=>e.applyMark("strike",e.parseInline(n.tokens||[])),renderMarkdown:(n,e)=>`~~${e.renderChildren(n)}~~`,addCommands(){return{setStrike:()=>({commands:n})=>n.setMark(this.name),toggleStrike:()=>({commands:n})=>n.toggleMark(this.name),unsetStrike:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Kt({find:zb,type:this.type})]},addPasteRules(){return[Tt({find:$b,type:this.type})]}}),_b=pe.create({name:"text",group:"inline",parseMarkdown:n=>({type:"text",text:n.text||""}),renderMarkdown:n=>n.text||""}),Vb=Nt.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:n=>n.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["u",J(this.options.HTMLAttributes,n),0]},parseMarkdown(n,e){return e.applyMark(this.name||"underline",e.parseInline(n.tokens||[]))},renderMarkdown(n,e){return`++${e.renderChildren(n)}++`},markdownTokenizer:{name:"underline",level:"inline",start(n){return n.indexOf("++")},tokenize(n,e,t){const s=/^(\+\+)([\s\S]+?)(\+\+)/.exec(n);if(!s)return;const i=s[2].trim();return{type:"underline",raw:s[0],text:i,tokens:t.inlineTokens(i)}}},addCommands(){return{setUnderline:()=>({commands:n})=>n.setMark(this.name),toggleUnderline:()=>({commands:n})=>n.toggleMark(this.name),unsetUnderline:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),jb=W.create({name:"starterKit",addExtensions(){var n,e,t,r;const s=[];return this.options.bold!==!1&&s.push(By.configure(this.options.bold)),this.options.blockquote!==!1&&s.push(Ry.configure(this.options.blockquote)),this.options.bulletList!==!1&&s.push(mu.configure(this.options.bulletList)),this.options.code!==!1&&s.push(Fy.configure(this.options.code)),this.options.codeBlock!==!1&&s.push(jy.configure(this.options.codeBlock)),this.options.document!==!1&&s.push(Hy.configure(this.options.document)),this.options.dropcursor!==!1&&s.push(Ey.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&s.push(Ty.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&s.push(Wy.configure(this.options.hardBreak)),this.options.heading!==!1&&s.push(Uy.configure(this.options.heading)),this.options.undoRedo!==!1&&s.push(Ny.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&s.push(qy.configure(this.options.horizontalRule)),this.options.italic!==!1&&s.push(Xy.configure(this.options.italic)),this.options.listItem!==!1&&s.push(gu.configure(this.options.listItem)),this.options.listKeymap!==!1&&s.push(wu.configure((n=this.options)==null?void 0:n.listKeymap)),this.options.link!==!1&&s.push(wb.configure((e=this.options)==null?void 0:e.link)),this.options.orderedList!==!1&&s.push(vu.configure(this.options.orderedList)),this.options.paragraph!==!1&&s.push(Bb.configure(this.options.paragraph)),this.options.strike!==!1&&s.push(Fb.configure(this.options.strike)),this.options.text!==!1&&s.push(_b.configure(this.options.text)),this.options.underline!==!1&&s.push(Vb.configure((t=this.options)==null?void 0:t.underline)),this.options.trailingNode!==!1&&s.push(Ay.configure((r=this.options)==null?void 0:r.trailingNode)),s}}),m0=jb,rs="Collapsible",[Hb,g0]=_l(rs),[Wb,Qi]=Hb(rs),Eu=w.forwardRef((n,e)=>{const{__scopeCollapsible:t,open:r,defaultOpen:s,disabled:i,onOpenChange:o,...l}=n,[a,c]=Uu({prop:r,defaultProp:s??!1,onChange:o,caller:rs});return O.jsx(Wb,{scope:t,disabled:i,contentId:qu(),open:a,onOpenToggle:w.useCallback(()=>c(u=>!u),[c]),children:O.jsx(it.div,{"data-state":eo(a),"data-disabled":i?"":void 0,...l,ref:e})})});Eu.displayName=rs;var Tu="CollapsibleTrigger",Mu=w.forwardRef((n,e)=>{const{__scopeCollapsible:t,...r}=n,s=Qi(Tu,t);return O.jsx(it.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":eo(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...r,ref:e,onClick:Qe(n.onClick,s.onOpenToggle)})});Mu.displayName=Tu;var Zi="CollapsibleContent",Au=w.forwardRef((n,e)=>{const{forceMount:t,...r}=n,s=Qi(Zi,n.__scopeCollapsible);return O.jsx(On,{present:t||s.open,children:({present:i})=>O.jsx(Ub,{...r,ref:e,present:i})})});Au.displayName=Zi;var Ub=w.forwardRef((n,e)=>{const{__scopeCollapsible:t,present:r,children:s,...i}=n,o=Qi(Zi,t),[l,a]=w.useState(r),c=w.useRef(null),u=Mt(e,c),d=w.useRef(0),f=d.current,h=w.useRef(0),p=h.current,m=o.open||l,g=w.useRef(m),y=w.useRef(void 0);return w.useEffect(()=>{const b=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(b)},[]),Fl(()=>{const b=c.current;if(b){y.current=y.current||{transitionDuration:b.style.transitionDuration,animationName:b.style.animationName},b.style.transitionDuration="0s",b.style.animationName="none";const C=b.getBoundingClientRect();d.current=C.height,h.current=C.width,g.current||(b.style.transitionDuration=y.current.transitionDuration,b.style.animationName=y.current.animationName),a(r)}},[o.open,r]),O.jsx(it.div,{"data-state":eo(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!m,...i,ref:u,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":p?`${p}px`:void 0,...n.style},children:m&&s})});function eo(n){return n?"open":"closed"}var y0=Eu,b0=Mu,k0=Au;function qb(n,e){return w.useReducer((t,r)=>e[t][r]??t,n)}var to="ScrollArea",[Nu]=_l(to),[Kb,we]=Nu(to),Ou=w.forwardRef((n,e)=>{const{__scopeScrollArea:t,type:r="hover",dir:s,scrollHideDelay:i=600,...o}=n,[l,a]=w.useState(null),[c,u]=w.useState(null),[d,f]=w.useState(null),[h,p]=w.useState(null),[m,g]=w.useState(null),[y,b]=w.useState(0),[C,T]=w.useState(0),[S,M]=w.useState(!1),[E,I]=w.useState(!1),R=Mt(e,de=>a(de)),$=Ku(s);return O.jsx(Kb,{scope:t,type:r,dir:$,scrollHideDelay:i,scrollArea:l,viewport:c,onViewportChange:u,content:d,onContentChange:f,scrollbarX:h,onScrollbarXChange:p,scrollbarXEnabled:S,onScrollbarXEnabledChange:M,scrollbarY:m,onScrollbarYChange:g,scrollbarYEnabled:E,onScrollbarYEnabledChange:I,onCornerWidthChange:b,onCornerHeightChange:T,children:O.jsx(it.div,{dir:$,...o,ref:R,style:{position:"relative","--radix-scroll-area-corner-width":y+"px","--radix-scroll-area-corner-height":C+"px",...n.style}})})});Ou.displayName=to;var Ru="ScrollAreaViewport",Du=w.forwardRef((n,e)=>{const{__scopeScrollArea:t,children:r,nonce:s,...i}=n,o=we(Ru,t),l=w.useRef(null),a=Mt(e,l,o.onViewportChange);return O.jsxs(O.Fragment,{children:[O.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),O.jsx(it.div,{"data-radix-scroll-area-viewport":"",...i,ref:a,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...n.style},children:O.jsx("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});Du.displayName=Ru;var Re="ScrollAreaScrollbar",Iu=w.forwardRef((n,e)=>{const{forceMount:t,...r}=n,s=we(Re,n.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:o}=s,l=n.orientation==="horizontal";return w.useEffect(()=>(l?i(!0):o(!0),()=>{l?i(!1):o(!1)}),[l,i,o]),s.type==="hover"?O.jsx(Jb,{...r,ref:e,forceMount:t}):s.type==="scroll"?O.jsx(Gb,{...r,ref:e,forceMount:t}):s.type==="auto"?O.jsx(Pu,{...r,ref:e,forceMount:t}):s.type==="always"?O.jsx(no,{...r,ref:e}):null});Iu.displayName=Re;var Jb=w.forwardRef((n,e)=>{const{forceMount:t,...r}=n,s=we(Re,n.__scopeScrollArea),[i,o]=w.useState(!1);return w.useEffect(()=>{const l=s.scrollArea;let a=0;if(l){const c=()=>{window.clearTimeout(a),o(!0)},u=()=>{a=window.setTimeout(()=>o(!1),s.scrollHideDelay)};return l.addEventListener("pointerenter",c),l.addEventListener("pointerleave",u),()=>{window.clearTimeout(a),l.removeEventListener("pointerenter",c),l.removeEventListener("pointerleave",u)}}},[s.scrollArea,s.scrollHideDelay]),O.jsx(On,{present:t||i,children:O.jsx(Pu,{"data-state":i?"visible":"hidden",...r,ref:e})})}),Gb=w.forwardRef((n,e)=>{const{forceMount:t,...r}=n,s=we(Re,n.__scopeScrollArea),i=n.orientation==="horizontal",o=is(()=>a("SCROLL_END"),100),[l,a]=qb("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return w.useEffect(()=>{if(l==="idle"){const c=window.setTimeout(()=>a("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(c)}},[l,s.scrollHideDelay,a]),w.useEffect(()=>{const c=s.viewport,u=i?"scrollLeft":"scrollTop";if(c){let d=c[u];const f=()=>{const h=c[u];d!==h&&(a("SCROLL"),o()),d=h};return c.addEventListener("scroll",f),()=>c.removeEventListener("scroll",f)}},[s.viewport,i,a,o]),O.jsx(On,{present:t||l!=="hidden",children:O.jsx(no,{"data-state":l==="hidden"?"hidden":"visible",...r,ref:e,onPointerEnter:Qe(n.onPointerEnter,()=>a("POINTER_ENTER")),onPointerLeave:Qe(n.onPointerLeave,()=>a("POINTER_LEAVE"))})})}),Pu=w.forwardRef((n,e)=>{const t=we(Re,n.__scopeScrollArea),{forceMount:r,...s}=n,[i,o]=w.useState(!1),l=n.orientation==="horizontal",a=is(()=>{if(t.viewport){const c=t.viewport.offsetWidth<t.viewport.scrollWidth,u=t.viewport.offsetHeight<t.viewport.scrollHeight;o(l?c:u)}},10);return Gt(t.viewport,a),Gt(t.content,a),O.jsx(On,{present:r||i,children:O.jsx(no,{"data-state":i?"visible":"hidden",...s,ref:e})})}),no=w.forwardRef((n,e)=>{const{orientation:t="vertical",...r}=n,s=we(Re,n.__scopeScrollArea),i=w.useRef(null),o=w.useRef(0),[l,a]=w.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=Fu(l.viewport,l.content),u={...r,sizes:l,onSizesChange:a,hasThumb:c>0&&c<1,onThumbChange:f=>i.current=f,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:f=>o.current=f};function d(f,h){return t0(f,o.current,l,h)}return t==="horizontal"?O.jsx(Yb,{...u,ref:e,onThumbPositionChange:()=>{if(s.viewport&&i.current){const f=s.viewport.scrollLeft,h=zl(f,l,s.dir);i.current.style.transform=`translate3d(${h}px, 0, 0)`}},onWheelScroll:f=>{s.viewport&&(s.viewport.scrollLeft=f)},onDragScroll:f=>{s.viewport&&(s.viewport.scrollLeft=d(f,s.dir))}}):t==="vertical"?O.jsx(Xb,{...u,ref:e,onThumbPositionChange:()=>{if(s.viewport&&i.current){const f=s.viewport.scrollTop,h=zl(f,l);i.current.style.transform=`translate3d(0, ${h}px, 0)`}},onWheelScroll:f=>{s.viewport&&(s.viewport.scrollTop=f)},onDragScroll:f=>{s.viewport&&(s.viewport.scrollTop=d(f))}}):null}),Yb=w.forwardRef((n,e)=>{const{sizes:t,onSizesChange:r,...s}=n,i=we(Re,n.__scopeScrollArea),[o,l]=w.useState(),a=w.useRef(null),c=Mt(e,a,i.onScrollbarXChange);return w.useEffect(()=>{a.current&&l(getComputedStyle(a.current))},[a]),O.jsx(Bu,{"data-orientation":"horizontal",...s,ref:c,sizes:t,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":ss(t)+"px",...n.style},onThumbPointerDown:u=>n.onThumbPointerDown(u.x),onDragScroll:u=>n.onDragScroll(u.x),onWheelScroll:(u,d)=>{if(i.viewport){const f=i.viewport.scrollLeft+u.deltaX;n.onWheelScroll(f),Vu(f,d)&&u.preventDefault()}},onResize:()=>{a.current&&i.viewport&&o&&r({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:a.current.clientWidth,paddingStart:Vr(o.paddingLeft),paddingEnd:Vr(o.paddingRight)}})}})}),Xb=w.forwardRef((n,e)=>{const{sizes:t,onSizesChange:r,...s}=n,i=we(Re,n.__scopeScrollArea),[o,l]=w.useState(),a=w.useRef(null),c=Mt(e,a,i.onScrollbarYChange);return w.useEffect(()=>{a.current&&l(getComputedStyle(a.current))},[a]),O.jsx(Bu,{"data-orientation":"vertical",...s,ref:c,sizes:t,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":ss(t)+"px",...n.style},onThumbPointerDown:u=>n.onThumbPointerDown(u.y),onDragScroll:u=>n.onDragScroll(u.y),onWheelScroll:(u,d)=>{if(i.viewport){const f=i.viewport.scrollTop+u.deltaY;n.onWheelScroll(f),Vu(f,d)&&u.preventDefault()}},onResize:()=>{a.current&&i.viewport&&o&&r({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:a.current.clientHeight,paddingStart:Vr(o.paddingTop),paddingEnd:Vr(o.paddingBottom)}})}})}),[Qb,Lu]=Nu(Re),Bu=w.forwardRef((n,e)=>{const{__scopeScrollArea:t,sizes:r,hasThumb:s,onThumbChange:i,onThumbPointerUp:o,onThumbPointerDown:l,onThumbPositionChange:a,onDragScroll:c,onWheelScroll:u,onResize:d,...f}=n,h=we(Re,t),[p,m]=w.useState(null),g=Mt(e,R=>m(R)),y=w.useRef(null),b=w.useRef(""),C=h.viewport,T=r.content-r.viewport,S=ut(u),M=ut(a),E=is(d,10);function I(R){if(y.current){const $=R.clientX-y.current.left,de=R.clientY-y.current.top;c({x:$,y:de})}}return w.useEffect(()=>{const R=$=>{const de=$.target;p?.contains(de)&&S($,T)};return document.addEventListener("wheel",R,{passive:!1}),()=>document.removeEventListener("wheel",R,{passive:!1})},[C,p,T,S]),w.useEffect(M,[r,M]),Gt(p,E),Gt(h.content,E),O.jsx(Qb,{scope:t,scrollbar:p,hasThumb:s,onThumbChange:ut(i),onThumbPointerUp:ut(o),onThumbPositionChange:M,onThumbPointerDown:ut(l),children:O.jsx(it.div,{...f,ref:g,style:{position:"absolute",...f.style},onPointerDown:Qe(n.onPointerDown,R=>{R.button===0&&(R.target.setPointerCapture(R.pointerId),y.current=p.getBoundingClientRect(),b.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",h.viewport&&(h.viewport.style.scrollBehavior="auto"),I(R))}),onPointerMove:Qe(n.onPointerMove,I),onPointerUp:Qe(n.onPointerUp,R=>{const $=R.target;$.hasPointerCapture(R.pointerId)&&$.releasePointerCapture(R.pointerId),document.body.style.webkitUserSelect=b.current,h.viewport&&(h.viewport.style.scrollBehavior=""),y.current=null})})})}),_r="ScrollAreaThumb",zu=w.forwardRef((n,e)=>{const{forceMount:t,...r}=n,s=Lu(_r,n.__scopeScrollArea);return O.jsx(On,{present:t||s.hasThumb,children:O.jsx(Zb,{ref:e,...r})})}),Zb=w.forwardRef((n,e)=>{const{__scopeScrollArea:t,style:r,...s}=n,i=we(_r,t),o=Lu(_r,t),{onThumbPositionChange:l}=o,a=Mt(e,d=>o.onThumbChange(d)),c=w.useRef(void 0),u=is(()=>{c.current&&(c.current(),c.current=void 0)},100);return w.useEffect(()=>{const d=i.viewport;if(d){const f=()=>{if(u(),!c.current){const h=n0(d,l);c.current=h,l()}};return l(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[i.viewport,u,l]),O.jsx(it.div,{"data-state":o.hasThumb?"visible":"hidden",...s,ref:a,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Qe(n.onPointerDownCapture,d=>{const h=d.target.getBoundingClientRect(),p=d.clientX-h.left,m=d.clientY-h.top;o.onThumbPointerDown({x:p,y:m})}),onPointerUp:Qe(n.onPointerUp,o.onThumbPointerUp)})});zu.displayName=_r;var ro="ScrollAreaCorner",$u=w.forwardRef((n,e)=>{const t=we(ro,n.__scopeScrollArea),r=!!(t.scrollbarX&&t.scrollbarY);return t.type!=="scroll"&&r?O.jsx(e0,{...n,ref:e}):null});$u.displayName=ro;var e0=w.forwardRef((n,e)=>{const{__scopeScrollArea:t,...r}=n,s=we(ro,t),[i,o]=w.useState(0),[l,a]=w.useState(0),c=!!(i&&l);return Gt(s.scrollbarX,()=>{const u=s.scrollbarX?.offsetHeight||0;s.onCornerHeightChange(u),a(u)}),Gt(s.scrollbarY,()=>{const u=s.scrollbarY?.offsetWidth||0;s.onCornerWidthChange(u),o(u)}),c?O.jsx(it.div,{...r,ref:e,style:{width:i,height:l,position:"absolute",right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:0,...n.style}}):null});function Vr(n){return n?parseInt(n,10):0}function Fu(n,e){const t=n/e;return isNaN(t)?0:t}function ss(n){const e=Fu(n.viewport,n.content),t=n.scrollbar.paddingStart+n.scrollbar.paddingEnd,r=(n.scrollbar.size-t)*e;return Math.max(r,18)}function t0(n,e,t,r="ltr"){const s=ss(t),i=s/2,o=e||i,l=s-o,a=t.scrollbar.paddingStart+o,c=t.scrollbar.size-t.scrollbar.paddingEnd-l,u=t.content-t.viewport,d=r==="ltr"?[0,u]:[u*-1,0];return _u([a,c],d)(n)}function zl(n,e,t="ltr"){const r=ss(e),s=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,i=e.scrollbar.size-s,o=e.content-e.viewport,l=i-r,a=t==="ltr"?[0,o]:[o*-1,0],c=Ju(n,a);return _u([0,o],[0,l])(c)}function _u(n,e){return t=>{if(n[0]===n[1]||e[0]===e[1])return e[0];const r=(e[1]-e[0])/(n[1]-n[0]);return e[0]+r*(t-n[0])}}function Vu(n,e){return n>0&&n<e}var n0=(n,e=()=>{})=>{let t={left:n.scrollLeft,top:n.scrollTop},r=0;return(function s(){const i={left:n.scrollLeft,top:n.scrollTop},o=t.left!==i.left,l=t.top!==i.top;(o||l)&&e(),t=i,r=window.requestAnimationFrame(s)})(),()=>window.cancelAnimationFrame(r)};function is(n,e){const t=ut(n),r=w.useRef(0);return w.useEffect(()=>()=>window.clearTimeout(r.current),[]),w.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(t,e)},[t,e])}function Gt(n,e){const t=ut(e);Fl(()=>{let r=0;if(n){const s=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(t)});return s.observe(n),()=>{window.cancelAnimationFrame(r),s.unobserve(n)}}},[n,t])}var r0=Ou,s0=Du,i0=$u;function x0(n){const e=Vl.c(17);let t,r,s,i;e[0]!==n?({className:r,children:t,hideScrollbar:i,...s}=n,e[0]=n,e[1]=t,e[2]=r,e[3]=s,e[4]=i):(t=e[1],r=e[2],s=e[3],i=e[4]);const o=i===void 0?!1:i;let l;e[5]!==r?(l=jl("relative h-full w-full",r),e[5]=r,e[6]=l):l=e[6];let a;e[7]!==t?(a=O.jsx(s0,{"data-slot":"scroll-area-viewport",className:"h-full w-full overflow-auto rounded-[inherit] outline-none transition-[color,box-shadow] focus-visible:ring-[2px] focus-visible:ring-ring/20",children:O.jsx("div",{className:"flex min-w-0 flex-col",children:t})}),e[7]=t,e[8]=a):a=e[8];let c;e[9]!==o?(c=O.jsx(o0,{hideScrollbar:o}),e[9]=o,e[10]=c):c=e[10];let u;e[11]===Symbol.for("react.memo_cache_sentinel")?(u=O.jsx(i0,{}),e[11]=u):u=e[11];let d;return e[12]!==s||e[13]!==l||e[14]!==a||e[15]!==c?(d=O.jsxs(r0,{"data-slot":"scroll-area",className:l,...s,children:[a,c,u]}),e[12]=s,e[13]=l,e[14]=a,e[15]=c,e[16]=d):d=e[16],d}function o0(n){const e=Vl.c(15);let t,r,s,i;e[0]!==n?({className:t,orientation:s,hideScrollbar:i,...r}=n,e[0]=n,e[1]=t,e[2]=r,e[3]=s,e[4]=i):(t=e[1],r=e[2],s=e[3],i=e[4]);const o=s===void 0?"vertical":s,l=i===void 0?!1:i,a=o==="vertical"&&"h-full w-2.5 border-l border-l-transparent",c=o==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",u=l&&"hidden";let d;e[5]!==t||e[6]!==a||e[7]!==c||e[8]!==u?(d=jl("select-none touch-none p-px transition-colors",a,c,u,t),e[5]=t,e[6]=a,e[7]=c,e[8]=u,e[9]=d):d=e[9];let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f=O.jsx(zu,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"}),e[10]=f):f=e[10];let h;return e[11]!==o||e[12]!==r||e[13]!==d?(h=O.jsx(Iu,{"data-slot":"scroll-area-scrollbar",orientation:o,className:d,...r,children:f}),e[11]=o,e[12]=r,e[13]=d,e[14]=h):h=e[14],h}export{Mu as C,_ as D,Fi as E,pe as N,G as P,h0 as R,x0 as S,b0 as T,V as a,p0 as b,d0 as c,Kg as d,f0 as e,Au as f,y0 as g,ie as h,m0 as i,c0 as j,k0 as k,g0 as l,Ee as m,eg as n,J as o,sy as p,o0 as q,u0 as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as b,c as w,j as a,l as j}from"./index-
|
|
1
|
+
import{e as b,c as w,j as a,l as j}from"./index-CXD35HrY.js";import{i as N}from"./SearchMd-BFlkVflN.js";function S(f){const e=b.c(17),{value:l,onChange:c,placeholder:g,onKeyDown:d,className:u,isSearching:p,disabled:i}=f,m=g===void 0?"Search...":g,x=i&&"pointer-events-none opacity-50";let t;e[0]!==u||e[1]!==x?(t=w("flex items-center gap-4 rounded-lg bg-background dark:bg-input/30 px-3 h-8 card-shadow","focus-within:border-ring focus-within:ring-ring/20 focus-within:ring-[2px]","transition-[color,box-shadow]",x,u),e[0]=u,e[1]=x,e[2]=t):t=e[2];let n;e[3]!==p?(n=p?a.jsx(j,{size:16,className:"animate-spin text-muted-foreground/75 shrink-0"}):a.jsx(N,{size:16,className:"text-muted-foreground/75 shrink-0"}),e[3]=p,e[4]=n):n=e[4];let s;e[5]!==c?(s=h=>c(h.target.value),e[5]=c,e[6]=s):s=e[6];let o;e[7]!==i||e[8]!==d||e[9]!==m||e[10]!==s||e[11]!==l?(o=a.jsx("input",{type:"text",value:l,onChange:s,onKeyDown:d,placeholder:m,disabled:i,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[7]=i,e[8]=d,e[9]=m,e[10]=s,e[11]=l,e[12]=o):o=e[12];let r;return e[13]!==t||e[14]!==n||e[15]!==o?(r=a.jsxs("label",{className:t,children:[n,o]}),e[13]=t,e[14]=n,e[15]=o,e[16]=r):r=e[16],r}export{S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as p,j as t,E as P,r as j,D as w,B as S,o as y}from"./index-
|
|
1
|
+
import{e as p,j as t,E as P,r as j,D as w,B as S,o as y}from"./index-CXD35HrY.js";import{i as k}from"./AlertCircle-ByuuAmrP.js";import{s as z}from"./Plus-CZ_sF7TZ.js";import{s as E}from"./User01-DrA8Lgm7.js";import{t as F}from"./Users01-3z4KNhww.js";import{D as $,a as I,b as O,c as A,e as R,d as T}from"./dialog-N8dYL9IV.js";import{I as N}from"./input-C9wjfV7v.js";import{L as g}from"./label-g7qALGmg.js";import{d as B,S as V,a as L,b as q,c as C}from"./select-D_rADyeN.js";import{S as H}from"./skeleton-DIe_hcjh.js";import{T as K}from"./textarea-Bg3_-gyq.js";import{P as b}from"./index-meHkju0S.js";import{c as W}from"./settings-section-DMc4s0vU.js";import{u as Y,a as G}from"./use-secrets-CIR-JEqt.js";import{R as J}from"./require-capability-B83Rfplv.js";import"./X-DSdGdxng.js";import"./tooltip-BLOVWRLB.js";import"./Check-BbSnE7nF.js";import"./ChevronDown-B3TWWBuw.js";import"./ChevronUp-0T6APBSE.js";import"./sidebar-B-j-nI2l.js";import"./sheet-Pz5-NB3k.js";import"./card-XQIiSY-b.js";import"./ArrowUpRight-7eXsw1ql.js";import"./constants-_OexfFJl.js";import"./unwrap-tool-result-BYXdCQMg.js";import"./use-capability-D90XVo0g.js";import"./access-gate-DUP-FMW_.js";import"./capability-load-error-VErw4nLB.js";function M(s){const e=p.c(3),{error:r}=s;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(k,{size:16}),e[0]=o):o=e[0];let n;return e[1]!==r.message?(n=t.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[o,t.jsxs("span",{className:"text-sm font-medium",children:["Failed to load secrets: ",r.message]})]}),e[1]=r.message,e[2]=n):n=e[2],n}function Q(s){const e=p.c(5),{scope:r}=s,o=r==="user"?E:F,n=r==="user"?"Private":"Organization";let i;e[0]!==o?(i=t.jsx(o,{size:12}),e[0]=o,e[1]=i):i=e[1];let a;return e[2]!==n||e[3]!==i?(a=t.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-md bg-muted text-muted-foreground text-xs",children:[i,n]}),e[2]=n,e[3]=i,e[4]=a):a=e[4],a}function D(s){const e=p.c(20),{secret:r}=s;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:t.jsx(w,{size:16,className:"text-muted-foreground"})}),e[0]=o):o=e[0];let n;e[1]!==r.name?(n=t.jsx("span",{className:"font-medium text-sm truncate",children:r.name}),e[1]=r.name,e[2]=n):n=e[2];let i;e[3]!==r.scope?(i=t.jsx(Q,{scope:r.scope}),e[3]=r.scope,e[4]=i):i=e[4];let a;e[5]!==n||e[6]!==i?(a=t.jsxs("div",{className:"flex items-center gap-2",children:[n,i]}),e[5]=n,e[6]=i,e[7]=a):a=e[7];let d;e[8]!==r.description?(d=r.description?t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:r.description}):null,e[8]=r.description,e[9]=d):d=e[9];let u;e[10]!==a||e[11]!==d?(u=t.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[o,t.jsxs("div",{className:"min-w-0",children:[a,d]})]}),e[10]=a,e[11]=d,e[12]=u):u=e[12];let l;e[13]!==r.createdAt?(l=new Date(r.createdAt).toLocaleDateString(),e[13]=r.createdAt,e[14]=l):l=e[14];let c;e[15]!==l?(c=t.jsx("div",{className:"text-xs text-muted-foreground shrink-0",children:l}),e[15]=l,e[16]=c):c=e[16];let x;return e[17]!==u||e[18]!==c?(x=t.jsxs("div",{className:"flex items-start justify-between gap-4 py-3 border-b border-border/60 last:border-b-0",children:[u,c]}),e[17]=u,e[18]=c,e[19]=x):x=e[19],x}function U(s){const e=p.c(5),{onCreate:r}=s;let o,n;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:t.jsx(w,{size:20,className:"text-muted-foreground"})}),n=t.jsxs("div",{children:[t.jsx("p",{className:"font-medium text-sm",children:"No secrets yet"}),t.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:"Store API keys, tokens, and other sensitive values. Values are encrypted at rest and never returned over the API."})]}),e[0]=o,e[1]=n):(o=e[0],n=e[1]);let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(z,{size:14}),e[2]=i):i=e[2];let a;return e[3]!==r?(a=t.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[o,n,t.jsxs(S,{onClick:r,size:"sm",className:"mt-2",children:[i,"New secret"]})]}),e[3]=r,e[4]=a):a=e[4],a}function _({open:s,onOpenChange:e}){const[r,o]=j.useState("organization"),[n,i]=j.useState(""),[a,d]=j.useState(""),[u,l]=j.useState(""),c=G();function x(){o("organization"),i(""),d(""),l("")}function f(){x(),e(!1)}async function h(m){if(m.preventDefault(),!(!n.trim()||!a))try{await c.mutateAsync({scope:r,name:n.trim(),value:a,description:u.trim()||void 0}),y.success(`Secret "${n.trim()}" created`),f()}catch(v){y.error(v instanceof Error?v.message:"Failed to create secret")}}return t.jsx($,{open:s,onOpenChange:m=>{m?e(m):f()},children:t.jsxs(I,{className:"sm:max-w-lg",children:[t.jsxs(O,{children:[t.jsx(A,{children:"New secret"}),t.jsx(R,{children:"Stored encrypted in the credential vault. Choose who can read it."})]}),t.jsxs("form",{onSubmit:h,className:"space-y-4",children:[t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(g,{htmlFor:"secret-scope",children:"Scope"}),t.jsxs(B,{value:r,onValueChange:m=>o(m),children:[t.jsx(V,{id:"secret-scope",children:t.jsx(L,{})}),t.jsxs(q,{children:[t.jsx(C,{value:"organization",children:"Organization — visible to all members"}),t.jsx(C,{value:"user",children:"Private — only visible to me"})]})]})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(g,{htmlFor:"secret-name",children:"Name"}),t.jsx(N,{id:"secret-name",value:n,onChange:m=>i(m.target.value),placeholder:"STRIPE_API_KEY",autoComplete:"off",required:!0}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Letters, digits, underscore, dot, hyphen. Case-insensitive within its scope."})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(g,{htmlFor:"secret-value",children:"Value"}),t.jsx(N,{id:"secret-value",type:"password",value:a,onChange:m=>d(m.target.value),autoComplete:"new-password",required:!0})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(g,{htmlFor:"secret-description",children:"Description (optional)"}),t.jsx(K,{id:"secret-description",value:u,onChange:m=>l(m.target.value),rows:2,placeholder:"What is this secret used for?"})]}),t.jsxs(T,{children:[t.jsx(S,{type:"button",variant:"outline",onClick:f,disabled:c.isPending,children:"Cancel"}),t.jsx(S,{type:"submit",disabled:c.isPending||!n.trim()||!a,children:c.isPending?"Creating…":"Create secret"})]})]})]})})}function X(){const s=p.c(21),e=Y(),[r,o]=j.useState(!1);if(e.length===0){let l;s[0]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(U,{onCreate:()=>o(!0)}),s[0]=l):l=s[0];let c;return s[1]!==r?(c=t.jsxs(t.Fragment,{children:[l,t.jsx(_,{open:r,onOpenChange:o})]}),s[1]=r,s[2]=c):c=s[2],c}let n,i,a;if(s[3]!==e){const l=e.filter(se),c=e.filter(te),x=e.length===1?"":"s";let f;s[7]!==e.length||s[8]!==x?(f=t.jsxs("p",{className:"text-sm text-muted-foreground",children:[e.length," secret",x," stored"]}),s[7]=e.length,s[8]=x,s[9]=f):f=s[9];let h;s[10]===Symbol.for("react.memo_cache_sentinel")?(h=()=>o(!0),s[10]=h):h=s[10];let m;s[11]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsxs(S,{onClick:h,size:"sm",children:[t.jsx(z,{size:14}),"New secret"]}),s[11]=m):m=s[11],s[12]!==f?(n=t.jsxs("div",{className:"flex items-center justify-between",children:[f,m]}),s[12]=f,s[13]=n):n=s[13],i=l.length>0?t.jsxs("section",{className:"rounded-2xl border border-border/60 bg-background p-5",children:[t.jsx("h3",{className:"text-xs font-medium text-muted-foreground mb-2",children:"Organization"}),t.jsx("div",{children:l.map(ee)})]}):null,a=c.length>0?t.jsxs("section",{className:"rounded-2xl border border-border/60 bg-background p-5",children:[t.jsx("h3",{className:"text-xs font-medium text-muted-foreground mb-2",children:"Private to me"}),t.jsx("div",{children:c.map(Z)})]}):null,s[3]=e,s[4]=n,s[5]=i,s[6]=a}else n=s[4],i=s[5],a=s[6];let d;s[14]!==r?(d=t.jsx(_,{open:r,onOpenChange:o}),s[14]=r,s[15]=d):d=s[15];let u;return s[16]!==n||s[17]!==i||s[18]!==a||s[19]!==d?(u=t.jsxs(t.Fragment,{children:[n,i,a,d]}),s[16]=n,s[17]=i,s[18]=a,s[19]=d,s[20]=u):u=s[20],u}function Z(s){return t.jsx(D,{secret:s},s.id)}function ee(s){return t.jsx(D,{secret:s},s.id)}function te(s){return s.scope==="user"}function se(s){return s.scope==="organization"}function re(){const s=p.c(2);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(b.Title,{children:"Secrets"}),s[0]=e):e=s[0];let r;return s[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(b,{children:t.jsx(b.Content,{children:t.jsx(b.Body,{children:t.jsxs(W,{children:[e,t.jsx(P,{fallback:ne,children:t.jsx(j.Suspense,{fallback:t.jsx(H,{className:"h-32 w-full"}),children:t.jsx(X,{})})})]})})})}),s[1]=r):r=s[1],r}function ne(s){const{error:e}=s;return t.jsx(M,{error:e??new Error("Failed to load secrets")})}function Ie(){const s=p.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(J,{capability:"secrets:manage",area:"secrets",children:t.jsx(re,{})}),s[0]=e):e=s[0],e}export{Ie as default};
|