decocms 4.523.2 → 4.524.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/{ActiveShapeUtils-BiggFcjT.js → ActiveShapeUtils-Bp4fmUBo.js} +1 -1
- package/dist/client/assets/{AlertCircle-DuL_FFHx.js → AlertCircle-Bq5T03B8.js} +1 -1
- package/dist/client/assets/{AreaChart-CwzHmgIC.js → AreaChart-CCyND0Jp.js} +1 -1
- package/dist/client/assets/{ArrowLeft-D94SnK45.js → ArrowLeft-Bwi_Jr7f.js} +1 -1
- package/dist/client/assets/{ArrowUp-Dn7IgtbA.js → ArrowUp-CzX0fTk7.js} +1 -1
- package/dist/client/assets/{BarChart-cNHCiDCi.js → BarChart-wLDzzyOQ.js} +1 -1
- package/dist/client/assets/{Building02-BmRvdezs.js → Building02-A_MT9tNO.js} +1 -1
- package/dist/client/assets/{CartesianChart-iNB7Klro.js → CartesianChart-B0qX_dpC.js} +1 -1
- package/dist/client/assets/{CategoricalChart-C1fCYXI1.js → CategoricalChart-BDZ_2Tmn.js} +1 -1
- package/dist/client/assets/{CheckCircle-BCzuQhZn.js → CheckCircle-BE1i_X4b.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-CxqUMZg6.js → ChevronSelectorVertical-DNrt0MHW.js} +1 -1
- package/dist/client/assets/{ChevronUp-DWUYL4oz.js → ChevronUp-RlBkcpdd.js} +1 -1
- package/dist/client/assets/{Copy01-B5Qm_DvO.js → Copy01-B9x501ud.js} +1 -1
- package/dist/client/assets/{CreditCard01-8EhoJBRm.js → CreditCard01-Bu_qRR36.js} +1 -1
- package/dist/client/assets/{DotsVertical-BmVaGWAg.js → DotsVertical-D9231JAc.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-7FUCCj8N.js → ErrorBarContext-PGp8cmoe.js} +1 -1
- package/dist/client/assets/{Globe04-KfEeo3Pn.js → Globe04-DQlP6Nhr.js} +1 -1
- package/dist/client/assets/{Image01-KdUybmWt.js → Image01-ClayPF_a.js} +1 -1
- package/dist/client/assets/{Key01-6z52NoNj.js → Key01-CxKYO-oQ.js} +1 -1
- package/dist/client/assets/{Link01-oKshySD_.js → Link01-B7BHRxIW.js} +1 -1
- package/dist/client/assets/{LinkBroken01-edPm2SIJ.js → LinkBroken01-XqJUgSE7.js} +1 -1
- package/dist/client/assets/{Minus-BvqQFZHP.js → Minus-Bh6ogRng.js} +1 -1
- package/dist/client/assets/{Monitor01-DZmeiH6p.js → Monitor01-BpzvJnXA.js} +1 -1
- package/dist/client/assets/{Play-3WH9Ikap.js → Play-w4omVTRa.js} +1 -1
- package/dist/client/assets/{Plus-D3sv1Vc5.js → Plus-CcJNnBya.js} +1 -1
- package/dist/client/assets/{ReferenceLine-D2o1nZW0.js → ReferenceLine-CI6ZmeJ0.js} +1 -1
- package/dist/client/assets/{SearchMd-DzFzOALq.js → SearchMd-5lGv5a5H.js} +1 -1
- package/dist/client/assets/{Sector-DlWxPN8J.js → Sector-gkUUnvA4.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-B1nTczbE.js → ShoppingBag01-C82UeRR9.js} +1 -1
- package/dist/client/assets/{Sun-D5qn9wPg.js → Sun-IvvKZ51n.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-DQQsmdwN.js → SwitchHorizontal01-B1MoYKPo.js} +1 -1
- package/dist/client/assets/{Tool01-Bhj-QHDu.js → Tool01-BvlRH5Ln.js} +1 -1
- package/dist/client/assets/{Trash01-DT07olaT.js → Trash01-C9E8l_mI.js} +1 -1
- package/dist/client/assets/{Upload01-BocTk920.js → Upload01-mlw10ZK-.js} +1 -1
- package/dist/client/assets/{UserSquare-zP4-JvXz.js → UserSquare-DwNuAluZ.js} +1 -1
- package/dist/client/assets/{Users01-DfLHZjoX.js → Users01-DcHPIKgH.js} +1 -1
- package/dist/client/assets/{XClose-1FEelrZ4.js → XClose-BBReaSBA.js} +1 -1
- package/dist/client/assets/{ZoomOut-DH4NDKgS.js → ZoomOut-CnbxUNSo.js} +1 -1
- package/dist/client/assets/access-gate-BNOWXoYR.js +1 -0
- package/dist/client/assets/{add-connection-dialog-B9X2bENr.js → add-connection-dialog-CEj8kbGq.js} +1 -1
- package/dist/client/assets/agent-analytics-DcqQcnI_.js +1 -0
- package/dist/client/assets/agent-app-BWM9EEcJ.js +1 -0
- package/dist/client/assets/agent-assets-CppO2yKd.js +1 -0
- package/dist/client/assets/agent-automation-BtSTyUKu.js +20 -0
- package/dist/client/assets/agent-automations-Bf-0_57T.js +1 -0
- package/dist/client/assets/agent-calendar-Bp6Y1tPy.js +1 -0
- package/dist/client/assets/agent-connect-sources-C_0x6Udu.js +1 -0
- package/dist/client/assets/agent-deck-BOaej8yV.js +1 -0
- package/dist/client/assets/agent-e2e-DokyQFgS.js +1 -0
- package/dist/client/assets/agent-experiments-7O17P9sC.js +1 -0
- package/dist/client/assets/agent-file-B5Z-mSXW.js +1 -0
- package/dist/client/assets/agent-hosting-v3_GHpmO.js +1 -0
- package/dist/client/assets/agent-icon-KvVT3fA8.js +1 -0
- package/dist/client/assets/agent-library-B3W6CGJl.js +1 -0
- package/dist/client/assets/agent-library-file-CHgoG2j3.js +1 -0
- package/dist/client/assets/agent-monitor-C9pMT5KA.js +1 -0
- package/dist/client/assets/agent-overview-9FhsI0nk.js +1 -0
- package/dist/client/assets/agent-releases-CRh6y5DW.js +2 -0
- package/dist/client/assets/agent-settings-CfNarIdW.js +1 -0
- package/dist/client/assets/{agent-site-editor-Ccqk13sk.js → agent-site-editor-BALtgla6.js} +2 -2
- package/dist/client/assets/agent-site-editor-code-D6BBbIl8.js +2 -0
- package/dist/client/assets/agent-site-editor-content-DAMOp9X5.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-B0IbykqU.js +1 -0
- package/dist/client/assets/agent-view-B5q0EqmS.js +1 -0
- package/dist/client/assets/{agent-view-guard-BQQDslge.js → agent-view-guard-bPXLqLsK.js} +1 -1
- package/dist/client/assets/agents-list-DrT_0gVh.js +1 -0
- package/dist/client/assets/{ai-providers-DZoJeRvf.js → ai-providers-DorJXBZe.js} +2 -2
- package/dist/client/assets/{alert-SHlQi_f5.js → alert-DEw5BVAh.js} +1 -1
- package/dist/client/assets/analytics-sections-g9foqwY5.js +1 -0
- package/dist/client/assets/analytics-tab-D5KshkAH.js +2 -0
- package/dist/client/assets/api-keys-B-qwgNok.js +1 -0
- package/dist/client/assets/api-keys-CIPiPSYY.js +1 -0
- package/dist/client/assets/app-editor-ChUXEXt-.js +1 -0
- package/dist/client/assets/{asset-utils-B48ApnSg.js → asset-utils-DRJP317P.js} +1 -1
- package/dist/client/assets/{auth--QyNLTbP.js → auth-Dqt9menC.js} +1 -1
- package/dist/client/assets/{auth-catchall-9FBGni3X.js → auth-catchall-B5Em8iaq.js} +1 -1
- package/dist/client/assets/{auth-entry-Bb0XRefn.js → auth-entry-CNtzQsix.js} +1 -1
- package/dist/client/assets/{auth-split-layout-aJ5w9glJ.js → auth-split-layout-BoWG-no5.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-D2Ooe96m.js → authenticate-and-persist-oauth-BziZaG_M.js} +1 -1
- package/dist/client/assets/automation-list-row-BRtPLrxX.js +1 -0
- package/dist/client/assets/automation-runs-C0-BhIZn.js +1 -0
- package/dist/client/assets/automations-CXOQ5gKM.js +1 -0
- package/dist/client/assets/{autosend-CUttN5XY.js → autosend-BRUzWk70.js} +1 -1
- package/dist/client/assets/{badge-DVaine1x.js → badge-Ckz5LqgP.js} +1 -1
- package/dist/client/assets/{block-document-Dsg6Fb4A.js → block-document-BPaZQC5L.js} +3 -3
- package/dist/client/assets/{blocks-preview-workspace-context-DrgIe1RS.js → blocks-preview-workspace-context-C-uj3YG0.js} +1 -1
- package/dist/client/assets/blocks-tab-states-BcxrQPOR.js +1 -0
- package/dist/client/assets/blog-schema-Du7ILh7Q.js +1 -0
- package/dist/client/assets/buckets-CKZYh6Ij.js +1 -0
- package/dist/client/assets/build-improve-prompt-doc-DJhZN8lj.js +2 -0
- package/dist/client/assets/{calendar-CpwMOIuL.js → calendar-DkZz5VlH.js} +1 -1
- package/dist/client/assets/campaigns-view-Dc88Zs16.js +1 -0
- package/dist/client/assets/{capability-load-error-DvFhO1Pk.js → capability-load-error-CRB9otZt.js} +1 -1
- package/dist/client/assets/category-editor-CSPe0t_-.js +1 -0
- package/dist/client/assets/{cdn-tab-9Pvplnml.js → cdn-tab-KPAxnC3T.js} +1 -1
- package/dist/client/assets/{chart-DMJIFNic.js → chart-Bp6om7lj.js} +1 -1
- package/dist/client/assets/{chat-context-DwIrrO5r.js → chat-context-CIOqAIIy.js} +7 -7
- package/dist/client/assets/{chat-draft-stAhUvyw.js → chat-draft-OR83_S8w.js} +1 -1
- package/dist/client/assets/{checkbox-aTYJ3HOV.js → checkbox-BQ7Ebuar.js} +1 -1
- package/dist/client/assets/choose-editor-CspgtGFS.js +1 -0
- package/dist/client/assets/{cli-auth-success-CuJJaXpQ.js → cli-auth-success-CGyir_iF.js} +1 -1
- package/dist/client/assets/{client-icons-Du3qqcxN.js → client-icons-BOMFh2QS.js} +1 -1
- package/dist/client/assets/cms-settings-editor-DbU_3ksB.js +1 -0
- package/dist/client/assets/{collapsible-Btd20NT7.js → collapsible-BB8_usPT.js} +1 -1
- package/dist/client/assets/collection-detail-H-UqYky8.js +1 -0
- package/dist/client/assets/collection-display-button-CulG1s8m.js +1 -0
- package/dist/client/assets/{collection-search-C3Qx3Y9p.js → collection-search-Cf4li4kg.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-BzK9w_p-.js → collection-table-wrapper-DnZHa5Lt.js} +1 -1
- package/dist/client/assets/{collection-tabs-D5iCdwPv.js → collection-tabs-x8ccQUAC.js} +1 -1
- package/dist/client/assets/{column-rules-UU8JLygo.js → column-rules-C_DWUbCh.js} +2 -2
- package/dist/client/assets/{combobox-PWtcP6b2.js → combobox-BZoZToki.js} +1 -1
- package/dist/client/assets/{command-Dqne3j1N.js → command-MmMDew8i.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-kvftD547.js → companion-mcps-section-By8_AO07.js} +1 -1
- package/dist/client/assets/{config-CJdQI2Ik.js → config-DBn3iCC3.js} +1 -1
- package/dist/client/assets/{connect-CaOmDTIh.js → connect-DbK_vN0J.js} +3 -3
- package/dist/client/assets/{connect-layout-Dx_3veD9.js → connect-layout-9tsE00M7.js} +1 -1
- package/dist/client/assets/connect-source-dialog-DqWilbbC.js +1 -0
- package/dist/client/assets/{connection-DJp1XqBL.js → connection-QGwhnKZn.js} +1 -1
- package/dist/client/assets/{connection-card-CwHoa3H_.js → connection-card-DEMVrMsW.js} +1 -1
- package/dist/client/assets/connection-detail-4PyaBO0_.js +1 -0
- package/dist/client/assets/{connection-form-helpers-BThulWcJ.js → connection-form-helpers-DCRY9s0M.js} +1 -1
- package/dist/client/assets/connections-CpcdB3jc.js +1 -0
- package/dist/client/assets/content-tab-YME7HMCb.js +22 -0
- package/dist/client/assets/{context-menu-Bsyqk_Km.js → context-menu-Cpvztbef.js} +1 -1
- package/dist/client/assets/context-oSwYvz9P.js +1 -0
- package/dist/client/assets/{context-shell-DFZc3RTT.js → context-shell-BVBpRdKB.js} +5 -5
- package/dist/client/assets/{core.esm-BRS9Ks9b.js → core.esm-B2cbbV3O.js} +1 -1
- package/dist/client/assets/create-organization-dialog-NLldLLor.js +1 -0
- package/dist/client/assets/{daily-pulse-BqDvmnPn.js → daily-pulse-ClSeB_Ta.js} +1 -1
- package/dist/client/assets/discover-DmBynuR0.js +1 -0
- package/dist/client/assets/{domain-settings-jCTqOxdl.js → domain-settings-Cu3Pj63v.js} +1 -1
- package/dist/client/assets/{drawer-DePU4o02.js → drawer-GssD8cb3.js} +1 -1
- package/dist/client/assets/{editor-wUI_HNkS.js → editor-BTovmEAS.js} +1 -1
- package/dist/client/assets/{editor-classes-B3UoGQQP.js → editor-classes-CcPgajKG.js} +1 -1
- package/dist/client/assets/{empty-state-cJTBr2cU.js → empty-state-D86P1Giw.js} +1 -1
- package/dist/client/assets/{empty-state-W9_vBymb.js → empty-state-DLNzdrwg.js} +1 -1
- package/dist/client/assets/experiments-tab-CjpJzYQ9.js +1 -0
- package/dist/client/assets/experiments-tab-choice-pVOiMOWe.js +1 -0
- package/dist/client/assets/{extract-connection-data-DFv9Bgl-.js → extract-connection-data-DwkOg2rJ.js} +1 -1
- package/dist/client/assets/{feature-gate-B4srxCCI.js → feature-gate-BIwsQPiQ.js} +1 -1
- package/dist/client/assets/{feature-paywall-CnDJ3rvy.js → feature-paywall-DpVlsq5a.js} +1 -1
- package/dist/client/assets/file-explorer-B9Wz0lPl.js +2 -0
- package/dist/client/assets/{file-preview-bA4ayYHL.js → file-preview-CX5xfaHR.js} +1 -1
- package/dist/client/assets/{file-share-button-BLIlQQod.js → file-share-button-Cx66riM5.js} +2 -2
- package/dist/client/assets/{file-type-icon-DTTBg-Cp.js → file-type-icon-tAeiI9_2.js} +1 -1
- package/dist/client/assets/{folder-icon-I00h66JN.js → folder-icon-C25vLo5g.js} +2 -2
- package/dist/client/assets/{form-KgHP-Hpi.js → form-CKF06Eu0.js} +1 -1
- package/dist/client/assets/general-CA7uhFzP.js +1 -0
- package/dist/client/assets/held-block-view-CU5t1B8c.js +20 -0
- package/dist/client/assets/home-BuPVKVzx.js +1 -0
- package/dist/client/assets/{icon-button-uPrtYnSE.js → icon-button-5JlhYc9R.js} +1 -1
- package/dist/client/assets/{index-Cbee4-AB.js → index-AY0yzUAx.js} +3 -3
- package/dist/client/assets/{index-XCP5r1I_.js → index-B0Hb2bUK.js} +1 -1
- package/dist/client/assets/{index-BfC50J0F.js → index-B8bCJ3Gm.js} +1 -1
- package/dist/client/assets/{index-BX1aT4SZ.js → index-BLRFIWph.js} +6 -6
- package/dist/client/assets/index-BerfNxBu.js +1 -0
- package/dist/client/assets/{index-D4ru75Fc.js → index-Bz0XRw1e.js} +1 -1
- package/dist/client/assets/index-C4tYnNih.js +253 -0
- package/dist/client/assets/{index-CDrRsU-I.js → index-CDfG-oXn.js} +1 -1
- package/dist/client/assets/{index-CvNALbEH.js → index-CJ8-jtJ3.js} +2 -2
- package/dist/client/assets/{index-DKUcI8bc.js → index-CMXP-HlZ.js} +1 -1
- package/dist/client/assets/index-CieIETkx.js +4 -0
- package/dist/client/assets/{index-DL_9Zurb.js → index-D8kI0oe2.js} +1 -1
- package/dist/client/assets/{index-WWkbzoL4.js → index-DG_Aoo8H.js} +1 -1
- package/dist/client/assets/{index-DqOQgVM6.js → index-DMcUJv3F.js} +1 -1
- package/dist/client/assets/{index-DdXWXy9i.js → index-DQ4MCRAi.js} +9 -9
- package/dist/client/assets/{index-redirect-BQkqIeGD.js → index-redirect-DSkhUiz1.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-6MK6GS3o.js → infiniteQueryObserver-CyNcT3qz.js} +1 -1
- package/dist/client/assets/{infra-billing-3yuTy4Pj.js → infra-billing-OmwhvZsy.js} +1 -1
- package/dist/client/assets/{input-BY2tBiEb.js → input-C0IBlV9i.js} +7 -7
- package/dist/client/assets/{input-BUcDagSA.js → input-Drj3v1Rm.js} +1 -1
- package/dist/client/assets/{integration-icon-BwzO3Wq9.js → integration-icon-wG7mou98.js} +1 -1
- package/dist/client/assets/{jira-icon-g2GVH5bw.js → jira-icon-Ct9neMH3.js} +1 -1
- package/dist/client/assets/{label-CG_DMVpg.js → label-Kngegn1Y.js} +1 -1
- package/dist/client/assets/{layout-CsbDSI6l.js → layout-D1PXm8wr.js} +1 -1
- package/dist/client/assets/legacy-agents-deep-CqqR00U7.js +1 -0
- package/dist/client/assets/{legacy-main-redirect-CS4Abpwd.js → legacy-main-redirect-j5rWQTR7.js} +1 -1
- package/dist/client/assets/library-BB_eexuL.js +1 -0
- package/dist/client/assets/{login-DW5wI5H0.js → login-dCZC1OIS.js} +1 -1
- package/dist/client/assets/{markdown-D5ryQAkZ.js → markdown-C-J5-sTt.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-BYcHi_da.js → mcp-app-renderer-vHEVQIZL.js} +2 -2
- package/dist/client/assets/{mcp-oauth-Bn5p4oSU.js → mcp-oauth-5QMuPFQa.js} +1 -1
- package/dist/client/assets/{mcp-oauth-4UvGlLYO.js → mcp-oauth-CnB7EPe0.js} +1 -1
- package/dist/client/assets/members-D62Ns7xb.js +1 -0
- package/dist/client/assets/{memory-FU3t5-1z.js → memory-BRnI6IWM.js} +2 -2
- package/dist/client/assets/{mini-report-page-BBST8cjq.js → mini-report-page-RV5HcY13.js} +1 -1
- package/dist/client/assets/{mock-board-igDH_YVZ.js → mock-board-C5ljPU5m.js} +5 -5
- package/dist/client/assets/{monaco-editor-eDEJF7LD.js → monaco-editor-CG1RPml4.js} +2 -2
- package/dist/client/assets/monitoring-kGWQYp7Z.js +1 -0
- package/dist/client/assets/{monitoring-stats-row-D5LuoYp3.js → monitoring-stats-row-BpfaRq5_.js} +1 -1
- package/dist/client/assets/{multi-select-DYiX5KEM.js → multi-select-D79TIC6v.js} +1 -1
- package/dist/client/assets/mustache-BdHuXtQC.js +4 -0
- package/dist/client/assets/{named-rule-uses-BrQiTKM3.js → named-rule-uses-DDsPTKwP.js} +1 -1
- package/dist/client/assets/named-rule-view-CelDjugE.js +1 -0
- package/dist/client/assets/{new-project-dialog-B9qWs4Pr.js → new-project-dialog-DQPlctqf.js} +1 -1
- package/dist/client/assets/{oauth-callback-Dtw5ILTB.js → oauth-callback-ah6cR8xQ.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-BSRRr6Yq.js → oauth-callback-ai-provider-C5jhPG9E.js} +1 -1
- package/dist/client/assets/onboarding-BPgxXbEy.js +1 -0
- package/dist/client/assets/openai-conversation-COLqoqqY.js +3 -0
- package/dist/client/assets/{optimistic-project-sidebar-views-CU6JI5UK.js → optimistic-project-sidebar-views-BXm7Dv06.js} +1 -1
- package/dist/client/assets/{order-monitor-day-D7HisKzI.js → order-monitor-day-DzTTlxAw.js} +1 -1
- package/dist/client/assets/organization-choice-CMYQUq77.js +1 -0
- package/dist/client/assets/orgs-Cb-j6SHO.js +1 -0
- package/dist/client/assets/page-seo-form-CCa1Xirx.js +1 -0
- package/dist/client/assets/{pair-9h1O_BO7.js → pair-CRFLUGB-.js} +8 -8
- package/dist/client/assets/parse-sections-CBOr5TcU.js +1 -0
- package/dist/client/assets/plan-CZiCKWsL.js +1 -0
- package/dist/client/assets/{plan-ladder-Dz8bCoAd.js → plan-ladder-Clu_D1dM.js} +1 -1
- package/dist/client/assets/{popover-Cdz7pgAQ.js → popover-7hw0_Cgu.js} +1 -1
- package/dist/client/assets/post-calendar-oSfCtk_Z.js +1 -0
- package/dist/client/assets/post-editor-DqdLoENq.js +2 -0
- package/dist/client/assets/{preview-content-BNxnqe7O.js → preview-content-tpqwn9DV.js} +1 -1
- package/dist/client/assets/{preview-dialog-tDLXXdPQ.js → preview-dialog-DDUA3zbn.js} +1 -1
- package/dist/client/assets/{preview-panel-D04CDEWQ.js → preview-panel-B7KDfk34.js} +1 -1
- package/dist/client/assets/preview-tab-CwHbL-uL.js +551 -0
- package/dist/client/assets/{product-picker-dialog-B9YEPxMK.js → product-picker-dialog-q_j-OMur.js} +1 -1
- package/dist/client/assets/profile--UpTdMEW.js +1 -0
- package/dist/client/assets/project-app-view-BDtUwetx.js +1 -0
- package/dist/client/assets/{project-apps-nQXtEtz0.js → project-apps-M24hPHW2.js} +1 -1
- package/dist/client/assets/project-feed-Dm5w30sM.js +1 -0
- package/dist/client/assets/{project-icon-BqAOVSaG.js → project-icon-BlULUcrw.js} +1 -1
- package/dist/client/assets/project-reports-BXESPzCU.js +1 -0
- package/dist/client/assets/project-tasks-CRajXa6Z.js +1 -0
- package/dist/client/assets/projects-C9fr3jni.js +1 -0
- package/dist/client/assets/{projects-empty-state-dd0PXzD2.js → projects-empty-state-DRas-7X9.js} +1 -1
- package/dist/client/assets/{prompts-C-zf2EeW.js → prompts-CiGgpCOz.js} +1 -1
- package/dist/client/assets/record-editor-Dw_A1nYV.js +1 -0
- package/dist/client/assets/redirect-editor-DbPiIIKk.js +1 -0
- package/dist/client/assets/releases-api-DA_Oz9WG.js +1 -0
- package/dist/client/assets/{reports-Dvk3psp8.js → reports-Czva0tSD.js} +1 -1
- package/dist/client/assets/reports-I3thcjRj.js +1 -0
- package/dist/client/assets/reports-onboarding-BsOWdPaY.js +1 -0
- package/dist/client/assets/reports-tab-C2STfD1k.js +2 -0
- package/dist/client/assets/repositories-B5BeE82u.js +1 -0
- package/dist/client/assets/repositories-Dp2o7kK8.js +1 -0
- package/dist/client/assets/repository-binding-C7GXruB1.js +1 -0
- package/dist/client/assets/{repository-import-picker-B0yxPI2j.js → repository-import-picker-BIFRKH2H.js} +1 -1
- package/dist/client/assets/repository-picker-D6fEwnOk.js +1 -0
- package/dist/client/assets/{require-capability-BFyuzPqV.js → require-capability-DSeRbn1u.js} +1 -1
- package/dist/client/assets/{required-auth-layout--9OrAOrr.js → required-auth-layout-D4yn4VOg.js} +1 -1
- package/dist/client/assets/{reset-password-C3K9ZZ2t.js → reset-password-CLlk4Qyg.js} +1 -1
- package/dist/client/assets/{resizable-BqY6-uYR.js → resizable-B3zVq59U.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-H3Wty7u7.js → resolve-tab-icon-NGCKQk4u.js} +1 -1
- package/dist/client/assets/review-settings-ChOJMpqj.js +1 -0
- package/dist/client/assets/roles-034YEIy0.js +1 -0
- package/dist/client/assets/route-B9sbaFmI.js +1 -0
- package/dist/client/assets/route-D3_kGiYP.js +1 -0
- package/dist/client/assets/route-DixoE7S2.js +1 -0
- package/dist/client/assets/{sandbox-lifecycle-context-CXn37zMt.js → sandbox-lifecycle-context-DS1zxfZb.js} +1 -1
- package/dist/client/assets/{schema-D2gJoNK3.js → schema-DIZqRcY2.js} +1 -1
- package/dist/client/assets/{schema-D5kxh02n.js → schema-DXQBt-Da.js} +1 -1
- package/dist/client/assets/{scroll-area-DvfamsPF.js → scroll-area-BYOXOcFm.js} +1 -1
- package/dist/client/assets/search-input-CM9T7koR.js +1 -0
- package/dist/client/assets/{search-toggle-CdGIHwQK.js → search-toggle-BA_oiAdj.js} +1 -1
- package/dist/client/assets/secret-picker-D2Cr-oRZ.js +1 -0
- package/dist/client/assets/secrets-BRbaixQo.js +1 -0
- package/dist/client/assets/section-array-field-TQFJqwVV.js +1 -0
- package/dist/client/assets/{sections-p-TiUqOZ.js → sections-05hBo9NL.js} +1 -1
- package/dist/client/assets/sections-editor-BR_A8Bqr.js +1 -0
- package/dist/client/assets/{select-DAagAjcm.js → select-BZ2tKCpr.js} +1 -1
- package/dist/client/assets/{select-model-DMBmIlHh.js → select-model-DskJe0jJ.js} +1 -1
- package/dist/client/assets/seo-editor-DWsRiK1b.js +1 -0
- package/dist/client/assets/{separator-Caw0JVLD.js → separator-DdBbm1xl.js} +1 -1
- package/dist/client/assets/settings-tab-5QV5D7iT.js +1 -0
- package/dist/client/assets/{sheet-BHsKOUfF.js → sheet-DYw2VD7L.js} +1 -1
- package/dist/client/assets/shell-layout-DQPoLlFW.js +1 -0
- package/dist/client/assets/site-draft-actions-dD4jyBUz.js +12 -0
- package/dist/client/assets/site-draft-view-Ds5aQAqU.js +2 -0
- package/dist/client/assets/site-editor-D8vmphjE.js +1 -0
- package/dist/client/assets/site-editor-toast-gO0geSY6.js +1 -0
- package/dist/client/assets/skills-BG0VOLIN.js +1 -0
- package/dist/client/assets/{slider-D9yxsjlo.js → slider-ApiojjsY.js} +1 -1
- package/dist/client/assets/{sortable.esm-B7h1ef6s.js → sortable.esm-DPfgkRcd.js} +1 -1
- package/dist/client/assets/sso-CfSDpa9Z.js +1 -0
- package/dist/client/assets/{suggestion-CMN-fEG6.js → suggestion-DTo0Z5su.js} +2 -2
- package/dist/client/assets/{switch-DpD3lo_J.js → switch-B3v6apDN.js} +1 -1
- package/dist/client/assets/{symbol-Hd-wRYbC.js → symbol-pDh9bf5z.js} +1 -1
- package/dist/client/assets/synced-repos-oiGV5Ihu.js +1 -0
- package/dist/client/assets/{tab-icon-glyph-XxQjDugr.js → tab-icon-glyph-BzFDI553.js} +1 -1
- package/dist/client/assets/{table-Cc4crfQ0.js → table-CANIhtsr.js} +1 -1
- package/dist/client/assets/{tabs-BpLvUwhr.js → tabs-B5O9VNwn.js} +1 -1
- package/dist/client/assets/task-assignee-avatar-BOAf_3H_.js +1 -0
- package/dist/client/assets/{task-board-M_bY8eys.js → task-board-CBBaN9ua.js} +1 -1
- package/dist/client/assets/{task-route-Cz8IMljw.js → task-route-1lojPQeZ.js} +1 -1
- package/dist/client/assets/{task-status-D4WkmdQN.js → task-status-DM1NBqlc.js} +1 -1
- package/dist/client/assets/taskboard-analytics-DK79qp1-.js +1 -0
- package/dist/client/assets/tasks--LaoDxg8.js +1 -0
- package/dist/client/assets/tasks-Czi5B_ZB.js +4 -0
- package/dist/client/assets/{textarea--yDYOLyf.js → textarea-CAZh8Kr5.js} +1 -1
- package/dist/client/assets/thread-analytics-K9PkKnHr.js +1 -0
- package/dist/client/assets/{thread-intent-DSZI851P.js → thread-intent-B9ceQWmI.js} +6 -6
- package/dist/client/assets/{thread-route-BLXCdzrT.js → thread-route-_-Jo9yAq.js} +1 -1
- package/dist/client/assets/thread-route-gmMlW4oz.js +1 -0
- package/dist/client/assets/thread-sheet-body-ClyiLZhS.js +1 -0
- package/dist/client/assets/{time-range-picker-C3BbzoOH.js → time-range-picker-m7OMfbU0.js} +1 -1
- package/dist/client/assets/toggle-group-8XrNtMoS.js +1 -0
- package/dist/client/assets/{tool-namespace-CzQWuXDV.js → tool-namespace-cn6zTT0m.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-7gQeG_XH.js → toolbar-icon-button-fBm5AosV.js} +1 -1
- package/dist/client/assets/{tooltip-rhtdmPcj.js → tooltip-B1eS9Khq.js} +1 -1
- package/dist/client/assets/{tooltipContext-Db2Lu1qi.js → tooltipContext-DMiC5t9-.js} +1 -1
- package/dist/client/assets/track-BcscPlt3.js +1 -0
- package/dist/client/assets/{types-s41XNAq6.js → types-C_LaIhQe.js} +9 -9
- package/dist/client/assets/{url-slug-DQ6KErQd.js → url-slug-BEmF9qH1.js} +1 -1
- package/dist/client/assets/{usage-stats-DBiTgJdn.js → usage-stats-DtO_zGwF.js} +7 -7
- package/dist/client/assets/{use-ai-providers-DeyDa8Td.js → use-ai-providers-C315xBlf.js} +1 -1
- package/dist/client/assets/use-apply-named-rule-9ihG8ELj.js +1 -0
- package/dist/client/assets/{use-automations-CAga8LHD.js → use-automations-BpSvam4M.js} +1 -1
- package/dist/client/assets/use-autosave-CRCl3eTr.js +1 -0
- package/dist/client/assets/{use-chat-layout-state-P4eOAh0Q.js → use-chat-layout-state-ByIICjWr.js} +1 -1
- package/dist/client/assets/{use-clock-tick-DKd3Khi0.js → use-clock-tick-QAJndZ00.js} +1 -1
- package/dist/client/assets/{use-connect-companion-CXaOPPYN.js → use-connect-companion-rEYy0Kcd.js} +1 -1
- package/dist/client/assets/use-connection-CBlLT-Gl.js +1 -0
- package/dist/client/assets/{use-content-sync-D83lTU1r.js → use-content-sync-TKItZ8SP.js} +1 -1
- package/dist/client/assets/{use-copy-D2ar5QXj.js → use-copy-C9NYM8DB.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-C5_jirS7.js → use-create-virtual-mcp-DFsMYI92.js} +1 -1
- package/dist/client/assets/use-date-fns-locale-bL-I5mOj.js +1 -0
- package/dist/client/assets/{use-debounced-autosave-QgHKWEfB.js → use-debounced-autosave-DfJudaYl.js} +1 -1
- package/dist/client/assets/{use-debounced-value-CNkh6EY5.js → use-debounced-value-DOPKXMfX.js} +1 -1
- package/dist/client/assets/use-deco-credits-DL_DG4I5.js +1 -0
- package/dist/client/assets/{use-decopilot-events-DGj-wEwB.js → use-decopilot-events-4yDcDH2I.js} +1 -1
- package/dist/client/assets/use-delete-connection-3ef0jZgj.js +1 -0
- package/dist/client/assets/{use-deployment-admin-CR9n1OEp.js → use-deployment-admin-C2GaZpz9.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-DKL4b1dE.js → use-fast-preview-draft-url-CN-8cYCq.js} +1 -1
- package/dist/client/assets/{use-file-configs-D3Cv6-L2.js → use-file-configs-Dfr8whNN.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-CVakZcHF.js → use-inbox-feed-UXhkZ9eS.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-DcjLDU4h.js → use-infinite-scroll-WEv8wBk9.js} +1 -1
- package/dist/client/assets/use-join-requests-Bf1nx4BW.js +1 -0
- package/dist/client/assets/use-main-panel-tabs-CnvhH3AB.js +1 -0
- package/dist/client/assets/{use-mcp-auth-status-DX7pkWco.js → use-mcp-auth-status-Dxn8Kcei.js} +1 -1
- package/dist/client/assets/{use-mcp-client-BYbk6jXo.js → use-mcp-client-BkBWhGyj.js} +10 -10
- package/dist/client/assets/{use-mcp-prompts-B78UkAZ_.js → use-mcp-prompts-DWjSk3XQ.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-COs5QQOc.js → use-mcp-tools-Cq-ES3mk.js} +1 -1
- package/dist/client/assets/{use-mobile-19frZVl2.js → use-mobile-BADuLdb7.js} +1 -1
- package/dist/client/assets/use-move-blocks-Ds_0OJ4H.js +1 -0
- package/dist/client/assets/{use-navigate-to-agent-Bh4JZJoL.js → use-navigate-to-agent-B3bMlZK-.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-CUDKmO6U.js → use-open-billing-url-Dfpg8Tio.js} +1 -1
- package/dist/client/assets/{use-org-fs-BFFpcHJy.js → use-org-fs-Dt6mQNyr.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-C29Ouwht.js → use-org-repo-syncs-D2j2_BKY.js} +1 -1
- package/dist/client/assets/{use-org-sso-BlWFmoCA.js → use-org-sso-CWvWEDQk.js} +1 -1
- package/dist/client/assets/use-organization-roles-DsjUZx1i.js +1 -0
- package/dist/client/assets/{use-organization-settings-XPH6XBPi.js → use-organization-settings-DBQ6GIch.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-BKTq-N_H.js → use-panel-navigate-DZO4-0o6.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-aJpFnShz.js → use-project-native-view-presence-Y3Sopx8q.js} +1 -1
- package/dist/client/assets/{use-project-scope-hi480z1p.js → use-project-scope-CKNjz3VB.js} +1 -1
- package/dist/client/assets/{use-recent-apps-DII4SRHf.js → use-recent-apps-TrfPEwKE.js} +1 -1
- package/dist/client/assets/{use-releases-GaRydy_l.js → use-releases-DSFeRsP3.js} +1 -1
- package/dist/client/assets/use-reports-diagnostic-YBAEN0Wc.js +1 -0
- package/dist/client/assets/{use-sandbox-events-CsNrKmda.js → use-sandbox-events-C6ionJ0p.js} +2 -2
- package/dist/client/assets/{use-secrets-DJcOfixK.js → use-secrets-xwuuJgHg.js} +1 -1
- package/dist/client/assets/use-section-preview-base-BdMX2uY9.js +1 -0
- package/dist/client/assets/use-session-runtime-CtTWKH1c.js +1 -0
- package/dist/client/assets/{use-sidebar-collapsed-8USbBI0-.js → use-sidebar-collapsed-DXyrU3VA.js} +1 -1
- package/dist/client/assets/{use-tags-DvW8yrHX.js → use-tags-CwZHa3pE.js} +1 -1
- package/dist/client/assets/use-task-board-analytics-BzPvlYE9.js +1 -0
- package/dist/client/assets/{use-task-board-events-De3JY1Pe.js → use-task-board-events-qI_skUMm.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-CXzTAmMM.js → use-task-board-item-prs-CiXpN6jW.js} +1 -1
- package/dist/client/assets/{use-task-metadata-9cyD8qGI.js → use-task-metadata-E8aNM85o.js} +1 -1
- package/dist/client/assets/{use-thread-analytics-DltmG-kv.js → use-thread-analytics-DKupwFaR.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-BKCBvLqB.js → use-thread-outputs-Di1RSISN.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-CtWUiDbh.js +1 -0
- package/dist/client/assets/useQueries-BOzKsoXi.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-Diw12fEI.js +1 -0
- package/dist/client/assets/users-Cup6bGNw.js +1 -0
- package/dist/client/assets/{utils-BnP8cv1B.js → utils-wTX1Gyo-.js} +1 -1
- package/dist/client/assets/variant-calendar-Doi5lHFb.js +1 -0
- package/dist/client/assets/variant-matcher-override-LGFgaSJn.js +1 -0
- package/dist/client/assets/{virtual-mcp-B8cZ7VfA.js → virtual-mcp-DO56RLOP.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-DYaS1vyu.js → watch-sse-pool-BBTCM7MS.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/server.js +713 -713
- package/package.json +2 -2
- package/dist/client/assets/User01-BqHvPhUP.js +0 -1
- package/dist/client/assets/access-gate-DyUtzmE9.js +0 -1
- package/dist/client/assets/agent-analytics-vIfEsYvC.js +0 -1
- package/dist/client/assets/agent-app-BrsqSpps.js +0 -1
- package/dist/client/assets/agent-assets-Cmwamjo6.js +0 -1
- package/dist/client/assets/agent-automation-DTP-nUve.js +0 -20
- package/dist/client/assets/agent-automations-DMzq_O24.js +0 -1
- package/dist/client/assets/agent-calendar-XJ6NXM0R.js +0 -1
- package/dist/client/assets/agent-connect-sources-BcRlDvxt.js +0 -1
- package/dist/client/assets/agent-deck-DDf8uIAO.js +0 -1
- package/dist/client/assets/agent-e2e-C9yo2VIy.js +0 -1
- package/dist/client/assets/agent-experiments-CBXMu_zo.js +0 -1
- package/dist/client/assets/agent-file-NVbz9x8-.js +0 -1
- package/dist/client/assets/agent-hosting--zgA3Vth.js +0 -1
- package/dist/client/assets/agent-icon-B_vqhfDt.js +0 -1
- package/dist/client/assets/agent-library-DnuSkP9c.js +0 -1
- package/dist/client/assets/agent-library-file-BvLizRc3.js +0 -1
- package/dist/client/assets/agent-monitor-rNkT_MKe.js +0 -1
- package/dist/client/assets/agent-overview-5SBfPz9h.js +0 -1
- package/dist/client/assets/agent-releases-Ln3sIMtS.js +0 -2
- package/dist/client/assets/agent-settings-D6bOK1ga.js +0 -1
- package/dist/client/assets/agent-site-editor-code-0Vxgov65.js +0 -2
- package/dist/client/assets/agent-site-editor-content-CoS3vIfM.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-7txrWBOo.js +0 -1
- package/dist/client/assets/agent-view-C8DZj3zZ.js +0 -1
- package/dist/client/assets/agents-list-CUtOSk6b.js +0 -1
- package/dist/client/assets/alert-dialog-Bjihy8X7.js +0 -7
- package/dist/client/assets/analytics-sections-B_qn34eY.js +0 -1
- package/dist/client/assets/analytics-tab-DluP6EHx.js +0 -2
- package/dist/client/assets/api-keys-B5pbeuIW.js +0 -1
- package/dist/client/assets/api-keys-DRbQ6j-D.js +0 -1
- package/dist/client/assets/app-editor-l5QnxgXk.js +0 -1
- package/dist/client/assets/automation-list-row-DfibF1_j.js +0 -1
- package/dist/client/assets/automation-runs-CzCUPkiw.js +0 -1
- package/dist/client/assets/automations-CEr5Md2h.js +0 -1
- package/dist/client/assets/avatar-C5-kxiV_.js +0 -1
- package/dist/client/assets/blocks-tab-states-DSvvcfKU.js +0 -1
- package/dist/client/assets/blog-schema-7PNm5SA8.js +0 -1
- package/dist/client/assets/buckets-B99EVfxO.js +0 -1
- package/dist/client/assets/build-improve-prompt-doc-Dx-5MdwQ.js +0 -2
- package/dist/client/assets/campaigns-view-_4Aj2Qex.js +0 -1
- package/dist/client/assets/category-editor-Bz5Ohuf6.js +0 -1
- package/dist/client/assets/choose-editor-BpBHfKld.js +0 -1
- package/dist/client/assets/cms-settings-editor-DgOpqRn9.js +0 -1
- package/dist/client/assets/collection-detail-B4JsebMy.js +0 -1
- package/dist/client/assets/collection-display-button-BFEeUD4b.js +0 -1
- package/dist/client/assets/connect-source-dialog-BucnBQV1.js +0 -1
- package/dist/client/assets/connection-detail-BUrc4tQa.js +0 -1
- package/dist/client/assets/connections-UgNbDD55.js +0 -1
- package/dist/client/assets/content-tab-BzJzqdaq.js +0 -22
- package/dist/client/assets/context-BQ17H5cY.js +0 -1
- package/dist/client/assets/create-organization-dialog-4e3oT20D.js +0 -1
- package/dist/client/assets/differenceInSeconds-C3x8sHUj.js +0 -1
- package/dist/client/assets/discover-Du9d6I7b.js +0 -1
- package/dist/client/assets/experiments-tab-BGSl9C7j.js +0 -1
- package/dist/client/assets/experiments-tab-choice-C5L5-OKs.js +0 -1
- package/dist/client/assets/file-explorer-CSFyTcCU.js +0 -2
- package/dist/client/assets/format-time-Cq80KKvY.js +0 -1
- package/dist/client/assets/general-DDniHgaA.js +0 -1
- package/dist/client/assets/home-BRa0QePQ.js +0 -1
- package/dist/client/assets/index-BSPqDg2b.js +0 -243
- package/dist/client/assets/index-BV9YjMM8.js +0 -4
- package/dist/client/assets/index-CoCFpkNq.js +0 -1
- package/dist/client/assets/legacy-agents-deep-D4dQPRbz.js +0 -1
- package/dist/client/assets/library-CvZRvu0t.js +0 -1
- package/dist/client/assets/members-DV5nm69j.js +0 -1
- package/dist/client/assets/monitoring-L8Ph-qIO.js +0 -1
- package/dist/client/assets/mustache-DcAMNVPe.js +0 -4
- package/dist/client/assets/named-rule-view-DPJVdujZ.js +0 -1
- package/dist/client/assets/onboarding-CJ1-Q27q.js +0 -1
- package/dist/client/assets/openai-conversation-rJmL2Chq.js +0 -3
- package/dist/client/assets/organization-choice-B3HKKRFg.js +0 -1
- package/dist/client/assets/orgs-BGahARMX.js +0 -1
- package/dist/client/assets/page-seo-form-BiLzLwOU.js +0 -1
- package/dist/client/assets/parse-sections-DS7cH63b.js +0 -1
- package/dist/client/assets/plan-TS8UDjIx.js +0 -1
- package/dist/client/assets/post-calendar-BVj47Msq.js +0 -1
- package/dist/client/assets/post-editor-C7Epq6Gf.js +0 -2
- package/dist/client/assets/preview-tab-CstRd2P8.js +0 -551
- package/dist/client/assets/profile-HCYVLr3x.js +0 -1
- package/dist/client/assets/project-app-view-CsgTKaq6.js +0 -1
- package/dist/client/assets/project-feed-CSKm059T.js +0 -1
- package/dist/client/assets/project-reports-N6Np5HVd.js +0 -1
- package/dist/client/assets/project-tasks-hQ8mdw3x.js +0 -1
- package/dist/client/assets/projects-BR95BuCh.js +0 -1
- package/dist/client/assets/record-editor-gFz45d56.js +0 -1
- package/dist/client/assets/redirect-editor-DPpKBLYS.js +0 -1
- package/dist/client/assets/releases-api-CSVCy8ox.js +0 -1
- package/dist/client/assets/reports-BVHdd1DX.js +0 -1
- package/dist/client/assets/reports-onboarding-UQrdSX_1.js +0 -1
- package/dist/client/assets/reports-tab-ppUXZsCY.js +0 -2
- package/dist/client/assets/repositories-5RxDBg9o.js +0 -1
- package/dist/client/assets/repositories-DZ7Jj2ky.js +0 -1
- package/dist/client/assets/repository-binding-BPraGDH6.js +0 -1
- package/dist/client/assets/repository-picker-C8ArkEMp.js +0 -1
- package/dist/client/assets/review-settings-CdVHPED2.js +0 -1
- package/dist/client/assets/roles-OamyC7La.js +0 -1
- package/dist/client/assets/route-C9Fxdgiw.js +0 -1
- package/dist/client/assets/route-CwPF8ORe.js +0 -1
- package/dist/client/assets/route-u0GAyBX0.js +0 -1
- package/dist/client/assets/runnable-block-editor-Bp72FsGX.js +0 -20
- package/dist/client/assets/search-input-5CsF8kzc.js +0 -1
- package/dist/client/assets/secret-ciphertext-DjJJ47rv.js +0 -1
- package/dist/client/assets/secret-picker-BO4uK8to.js +0 -1
- package/dist/client/assets/secrets-D1oNMOlx.js +0 -1
- package/dist/client/assets/sections-editor-DR2QTs_8.js +0 -4
- package/dist/client/assets/seo-editor-_CrgKo3u.js +0 -1
- package/dist/client/assets/settings-tab-CXub7dpW.js +0 -1
- package/dist/client/assets/shell-layout-CnFOD7IR.js +0 -1
- package/dist/client/assets/site-draft-actions-DahX0dKS.js +0 -12
- package/dist/client/assets/site-draft-view-D6OUnR3H.js +0 -2
- package/dist/client/assets/site-editor-FcBrQD_V.js +0 -1
- package/dist/client/assets/site-editor-toast-CrL8-myE.js +0 -1
- package/dist/client/assets/skills-dBhtb1Gn.js +0 -1
- package/dist/client/assets/sso-K3rjig-T.js +0 -1
- package/dist/client/assets/synced-repos-Dnzg3gpT.js +0 -1
- package/dist/client/assets/task-assignee-avatar-ZgHLf6ou.js +0 -1
- package/dist/client/assets/taskboard-analytics-BkUf4gRJ.js +0 -1
- package/dist/client/assets/tasks-CAS-CTER.js +0 -4
- package/dist/client/assets/tasks-qaZFyecx.js +0 -1
- package/dist/client/assets/thread-analytics-DUGo9IpI.js +0 -1
- package/dist/client/assets/thread-route-GuSmOAXN.js +0 -1
- package/dist/client/assets/thread-sheet-body-BFLCqyyQ.js +0 -1
- package/dist/client/assets/toggle-group-6nw88m-B.js +0 -1
- package/dist/client/assets/track-CZFERlEy.js +0 -1
- package/dist/client/assets/use-apply-named-rule-CTNrtoG8.js +0 -1
- package/dist/client/assets/use-autosave-BhBt5LM5.js +0 -1
- package/dist/client/assets/use-connection-CjozY_rG.js +0 -1
- package/dist/client/assets/use-date-fns-locale-QW50a7Gw.js +0 -1
- package/dist/client/assets/use-deco-credits-B57v3A_1.js +0 -1
- package/dist/client/assets/use-delete-connection-C8eU1V0w.js +0 -1
- package/dist/client/assets/use-join-requests-Cbj3PHUb.js +0 -1
- package/dist/client/assets/use-main-panel-tabs-CO8s8ZiU.js +0 -1
- package/dist/client/assets/use-members-Dyl3oSqD.js +0 -1
- package/dist/client/assets/use-move-blocks-DJK_Y1io.js +0 -1
- package/dist/client/assets/use-org-auth-client-Dw_o5R0I.js +0 -1
- package/dist/client/assets/use-organization-roles-DaU1N-it.js +0 -1
- package/dist/client/assets/use-reports-diagnostic-BCaZjPYS.js +0 -1
- package/dist/client/assets/use-section-preview-base-BqthfvXx.js +0 -1
- package/dist/client/assets/use-session-runtime-GSil35TM.js +0 -1
- package/dist/client/assets/use-task-board-analytics-CzI79mN4.js +0 -1
- package/dist/client/assets/useInfiniteQuery-BMw5-0ES.js +0 -1
- package/dist/client/assets/useQueries-MmC9BfTO.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BzZNrnpe.js +0 -1
- package/dist/client/assets/users-DwCtEgjJ.js +0 -1
- package/dist/client/assets/variant-calendar-2sbluJx7.js +0 -1
- package/dist/client/assets/variant-matcher-override-BuVYz4je.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as l,
|
|
1
|
+
import{r as l,cu as ce,j as p,cA as _,cz as T,cx as C,cE as le,ct as de,cQ as ue,cM as fe,cF as me}from"./index-C4tYnNih.js";import{c as Y}from"./index-BdQq_4o_.js";var $=["PageUp","PageDown"],X=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],G={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},M="Slider",[H,Se,pe]=le(M),[W]=fe(M,[pe]),[he,V]=W(M),Q=l.forwardRef((e,t)=>{const{name:o,min:n=0,max:s=100,step:c=1,orientation:r="horizontal",disabled:a=!1,minStepsBetweenThumbs:u=0,defaultValue:w=[n],value:h,onValueChange:i=()=>{},onValueCommit:d=()=>{},inverted:v=!1,form:R,...g}=e,m=l.useRef(new Set),f=l.useRef(0),x=r==="horizontal"?ge:ve,[S=[],K]=ce({prop:h,defaultProp:w,onChange:b=>{[...m.current][f.current]?.focus(),i(b)}}),j=l.useRef(S);function B(b){const y=ye(S,b);A(b,y)}function se(b){A(b,f.current)}function ae(){const b=j.current[f.current];S[f.current]!==b&&d(S)}function A(b,y,{commit:k}={commit:!1}){const F=_e(c),z=Ce(Math.round((b-n)/c)*c+n,F),I=Y(z,[n,s]);K((D=[])=>{const P=be(D,I,y);if(De(P,u*c)){f.current=P.indexOf(I);const U=String(P)!==String(D);return U&&k&&d(P),U?P:D}else return D})}return p.jsx(he,{scope:e.__scopeSlider,name:o,disabled:a,min:n,max:s,valueIndexToChangeRef:f,thumbs:m.current,values:S,orientation:r,form:R,children:p.jsx(H.Provider,{scope:e.__scopeSlider,children:p.jsx(H.Slot,{scope:e.__scopeSlider,children:p.jsx(x,{"aria-disabled":a,"data-disabled":a?"":void 0,...g,ref:t,onPointerDown:_(g.onPointerDown,()=>{a||(j.current=S)}),min:n,max:s,inverted:v,onSlideStart:a?void 0:B,onSlideMove:a?void 0:se,onSlideEnd:a?void 0:ae,onHomeKeyDown:()=>!a&&A(n,0,{commit:!0}),onEndKeyDown:()=>!a&&A(s,S.length-1,{commit:!0}),onStepKeyDown:({event:b,direction:y})=>{if(!a){const z=$.includes(b.key)||b.shiftKey&&X.includes(b.key)?10:1,I=f.current,D=S[I],P=c*z*y;A(D+P,I,{commit:!0})}}})})})})});Q.displayName=M;var[q,J]=W(M,{startEdge:"left",endEdge:"right",size:"width",direction:1}),ge=l.forwardRef((e,t)=>{const{min:o,max:n,dir:s,inverted:c,onSlideStart:r,onSlideMove:a,onSlideEnd:u,onStepKeyDown:w,...h}=e,[i,d]=l.useState(null),v=C(t,x=>d(x)),R=l.useRef(void 0),g=de(s),m=g==="ltr",f=m&&!c||!m&&c;function E(x){const S=R.current||i.getBoundingClientRect(),K=[0,S.width],B=O(K,f?[o,n]:[n,o]);return R.current=S,B(x-S.left)}return p.jsx(q,{scope:e.__scopeSlider,startEdge:f?"left":"right",endEdge:f?"right":"left",direction:f?1:-1,size:"width",children:p.jsx(Z,{dir:g,"data-orientation":"horizontal",...h,ref:v,style:{...h.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:x=>{const S=E(x.clientX);r?.(S)},onSlideMove:x=>{const S=E(x.clientX);a?.(S)},onSlideEnd:()=>{R.current=void 0,u?.()},onStepKeyDown:x=>{const K=G[f?"from-left":"from-right"].includes(x.key);w?.({event:x,direction:K?-1:1})}})})}),ve=l.forwardRef((e,t)=>{const{min:o,max:n,inverted:s,onSlideStart:c,onSlideMove:r,onSlideEnd:a,onStepKeyDown:u,...w}=e,h=l.useRef(null),i=C(t,h),d=l.useRef(void 0),v=!s;function R(g){const m=d.current||h.current.getBoundingClientRect(),f=[0,m.height],x=O(f,v?[n,o]:[o,n]);return d.current=m,x(g-m.top)}return p.jsx(q,{scope:e.__scopeSlider,startEdge:v?"bottom":"top",endEdge:v?"top":"bottom",size:"height",direction:v?1:-1,children:p.jsx(Z,{"data-orientation":"vertical",...w,ref:i,style:{...w.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:g=>{const m=R(g.clientY);c?.(m)},onSlideMove:g=>{const m=R(g.clientY);r?.(m)},onSlideEnd:()=>{d.current=void 0,a?.()},onStepKeyDown:g=>{const f=G[v?"from-bottom":"from-top"].includes(g.key);u?.({event:g,direction:f?-1:1})}})})}),Z=l.forwardRef((e,t)=>{const{__scopeSlider:o,onSlideStart:n,onSlideMove:s,onSlideEnd:c,onHomeKeyDown:r,onEndKeyDown:a,onStepKeyDown:u,...w}=e,h=V(M,o);return p.jsx(T.span,{...w,ref:t,onKeyDown:_(e.onKeyDown,i=>{i.key==="Home"?(r(i),i.preventDefault()):i.key==="End"?(a(i),i.preventDefault()):$.concat(X).includes(i.key)&&(u(i),i.preventDefault())}),onPointerDown:_(e.onPointerDown,i=>{const d=i.target;d.setPointerCapture(i.pointerId),i.preventDefault(),h.thumbs.has(d)?d.focus():n(i)}),onPointerMove:_(e.onPointerMove,i=>{i.target.hasPointerCapture(i.pointerId)&&s(i)}),onPointerUp:_(e.onPointerUp,i=>{const d=i.target;d.hasPointerCapture(i.pointerId)&&(d.releasePointerCapture(i.pointerId),c(i))})})}),ee="SliderTrack",te=l.forwardRef((e,t)=>{const{__scopeSlider:o,...n}=e,s=V(ee,o);return p.jsx(T.span,{"data-disabled":s.disabled?"":void 0,"data-orientation":s.orientation,...n,ref:t})});te.displayName=ee;var N="SliderRange",ne=l.forwardRef((e,t)=>{const{__scopeSlider:o,...n}=e,s=V(N,o),c=J(N,o),r=l.useRef(null),a=C(t,r),u=s.values.length,w=s.values.map(d=>ie(d,s.min,s.max)),h=u>1?Math.min(...w):0,i=100-Math.max(...w);return p.jsx(T.span,{"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,...n,ref:a,style:{...e.style,[c.startEdge]:h+"%",[c.endEdge]:i+"%"}})});ne.displayName=N;var L="SliderThumb",oe=l.forwardRef((e,t)=>{const o=Se(e.__scopeSlider),[n,s]=l.useState(null),c=C(t,a=>s(a)),r=l.useMemo(()=>n?o().findIndex(a=>a.ref.current===n):-1,[o,n]);return p.jsx(we,{...e,ref:c,index:r})}),we=l.forwardRef((e,t)=>{const{__scopeSlider:o,index:n,name:s,...c}=e,r=V(L,o),a=J(L,o),[u,w]=l.useState(null),h=C(t,E=>w(E)),i=u?r.form||!!u.closest("form"):!0,d=ue(u),v=r.values[n],R=v===void 0?0:ie(v,r.min,r.max),g=Re(n,r.values.length),m=d?.[a.size],f=m?Pe(m,R,a.direction):0;return l.useEffect(()=>{if(u)return r.thumbs.add(u),()=>{r.thumbs.delete(u)}},[u,r.thumbs]),p.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${R}% + ${f}px)`},children:[p.jsx(H.ItemSlot,{scope:e.__scopeSlider,children:p.jsx(T.span,{role:"slider","aria-label":e["aria-label"]||g,"aria-valuemin":r.min,"aria-valuenow":v,"aria-valuemax":r.max,"aria-orientation":r.orientation,"data-orientation":r.orientation,"data-disabled":r.disabled?"":void 0,tabIndex:r.disabled?void 0:0,...c,ref:h,style:v===void 0?{display:"none"}:e.style,onFocus:_(e.onFocus,()=>{r.valueIndexToChangeRef.current=n})})}),i&&p.jsx(re,{name:s??(r.name?r.name+(r.values.length>1?"[]":""):void 0),form:r.form,value:v},n)]})});oe.displayName=L;var xe="RadioBubbleInput",re=l.forwardRef(({__scopeSlider:e,value:t,...o},n)=>{const s=l.useRef(null),c=C(s,n),r=me(t);return l.useEffect(()=>{const a=s.current;if(!a)return;const u=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(u,"value").set;if(r!==t&&h){const i=new Event("input",{bubbles:!0});h.call(a,t),a.dispatchEvent(i)}},[r,t]),p.jsx(T.input,{style:{display:"none"},...o,ref:c,defaultValue:t})});re.displayName=xe;function be(e=[],t,o){const n=[...e];return n[o]=t,n.sort((s,c)=>s-c)}function ie(e,t,o){const c=100/(o-t)*(e-t);return Y(c,[0,100])}function Re(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function ye(e,t){if(e.length===1)return 0;const o=e.map(s=>Math.abs(s-t)),n=Math.min(...o);return o.indexOf(n)}function Pe(e,t,o){const n=e/2,c=O([0,50],[0,n]);return(n-c(t)*o)*o}function Ee(e){return e.slice(0,-1).map((t,o)=>e[o+1]-t)}function De(e,t){if(t>0){const o=Ee(e);return Math.min(...o)>=t}return!0}function O(e,t){return o=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(o-e[0])}}function _e(e){return(String(e).split(".")[1]||"").length}function Ce(e,t){const o=Math.pow(10,t);return Math.round(e*o)/o}var Ae=Q,Ie=te,Te=ne,Ve=oe;export{Te as R,Ie as T,Ae as a,Ve as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as $,b as j,r as E,j as b,l as q,af as vt,t as ue,aW as Xe,a2 as At,m as Mt,K as St,b3 as Ct,h as Je}from"./index-BSPqDg2b.js";import{a as Rt,n as Ye,E as ie,o as Et,x as $t,y as P,z as _t,A as Lt,B as et,C as N,G as Ee,H as It,I as zt,J as $e,K as Pt,L as V,N as D,m as H,O as Y,T as tt,R as ke,Q as xe,U as Ht,V as jt,W as Nt,X as Ot,Y as Bt,s as Dt,Z as Ft,u as qt,b as Wt}from"./usage-stats-DBiTgJdn.js";import{T as _,n as Ut,i as Gt,E as Zt}from"./editor-classes-B3UoGQQP.js";import{a as Vt,e as nt,s as Kt,S as Qt}from"./suggestion-CMN-fEG6.js";import{B as Xt,c as Jt,t as Yt,C as rt,f as en,g as _e,s as tn,m as Le,a as Ie,b as nn,d as ze,e as rn,h as sn,i as an,j as on,k as ln,l as cn,n as un}from"./index-DL_9Zurb.js";import{ai as hn,aj as dn,al as pn,a0 as fn,be as gn,aW as mn}from"./agent-icon-B_vqhfDt.js";import{i as kn}from"./SwitchHorizontal01-DQQsmdwN.js";import{i as xn}from"./Link01-oKshySD_.js";import{s as bn}from"./Trash01-DT07olaT.js";import{i as wn,b as yn}from"./use-org-fs-BFFpcHJy.js";import{E as Pe,i as st,b as Tn,c as vn,d as it,A as An,e as Mn,m as Sn,f as Cn}from"./markdown-D5ryQAkZ.js";import{A as Rn}from"./avatar-C5-kxiV_.js";import{d as En,e as $n,c as _n,C as Ln,b as In}from"./command-Dqne3j1N.js";import{u as zn}from"./use-org-auth-client-Dw_o5R0I.js";import{I as Pn}from"./icon-button-uPrtYnSE.js";function Hn(t){const e=$.c(30),{editor:n}=t,r=j(),[s,i]=E.useState(!1),[a,l]=E.useState(""),[o,u]=E.useState(!1);let c;e[0]!==n?(c=n.isActive("link"),e[0]=n,e[1]=c):c=e[1];const h=c;let d;e[2]!==n||e[3]!==s?(d=()=>{if(s){i(!1);return}const M=n.getAttributes("link").href;l(typeof M=="string"?M:""),u(!1),i(!0)},e[2]=n,e[3]=s,e[4]=d):d=e[4];const f=d;let p;e[5]!==n?(p=()=>{n.chain().focus().extendMarkRange("link").unsetLink().run(),i(!1)},e[5]=n,e[6]=p):p=e[6];const g=p;let m;e[7]!==a||e[8]!==n||e[9]!==g?(m=()=>{const M=Ut(a);if(M===""){g();return}if(!Gt(M)){u(!0);return}n.chain().focus().extendMarkRange("link").setLink({href:M}).run(),i(!1)},e[7]=a,e[8]=n,e[9]=g,e[10]=m):m=e[10];const k=m;let w;e[11]!==r?(w=r("markdownEditor.link"),e[11]=r,e[12]=w):w=e[12];let y;e[13]===Symbol.for("react.memo_cache_sentinel")?(y=b.jsx(xn,{size:14}),e[13]=y):y=e[13];let T;e[14]!==h||e[15]!==w||e[16]!==f?(T=b.jsx(_,{active:h,label:w,onClick:f,children:y}),e[14]=h,e[15]=w,e[16]=f,e[17]=T):T=e[17];let x;e[18]!==h||e[19]!==k||e[20]!==a||e[21]!==n||e[22]!==o||e[23]!==s||e[24]!==g||e[25]!==r?(x=s&&b.jsxs("div",{className:"absolute left-0 top-full z-20 mt-1.5 flex w-64 items-center gap-0.5 rounded-md bg-popover p-1 shadow-soft",onBlur:M=>{M.currentTarget.contains(M.relatedTarget)||i(!1)},children:[b.jsx("input",{autoFocus:!0,type:"text","aria-label":r("markdownEditor.linkInputAriaLabel"),"aria-invalid":o,placeholder:r("markdownEditor.linkPlaceholder"),value:a,onChange:M=>{l(M.target.value),u(!1)},onKeyDown:M=>{M.key==="Enter"?(M.preventDefault(),k()):M.key==="Escape"&&(M.preventDefault(),i(!1),n.chain().focus().run())},className:q("h-7 min-w-0 flex-1 rounded bg-transparent px-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none",o&&"text-destructive")}),b.jsx(_,{active:!1,label:r("markdownEditor.linkApply"),onClick:k,children:b.jsx(vt,{size:14})}),h&&b.jsx(_,{active:!1,label:r("markdownEditor.linkRemove"),onClick:g,children:b.jsx(bn,{size:14})})]}),e[18]=h,e[19]=k,e[20]=a,e[21]=n,e[22]=o,e[23]=s,e[24]=g,e[25]=r,e[26]=x):x=e[26];let v;return e[27]!==T||e[28]!==x?(v=b.jsxs("div",{className:"relative",children:[T,x]}),e[27]=T,e[28]=x,e[29]=v):v=e[29],v}const le=()=>{const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=b.jsx("div",{className:"mx-0.5 h-4 w-px bg-border"}),t[0]=e):e=t[0],e},He=t=>{const e=$.c(2),{children:n}=t;let r;return e[0]!==n?(r=b.jsx("span",{className:"text-2xs font-semibold leading-none",children:n}),e[0]=n,e[1]=r):r=e[1],r},at=[1,2,3],jn=({editor:t,state:e})=>t.isEditable&&!e.selection.empty&&!t.isActive("image")&&!t.isActive("attachment")&&!t.isActive("codeBlock");function Nn(t){const e=$.c(20),{editor:n}=t,r=j(),[s,i]=E.useState(null);let a;e[0]!==n?(a={editor:n,selector:On},e[0]=n,e[1]=a):a=e[1];const l=Rt(a);let o;e[2]!==r?(o=r("markdownEditor.heading1"),e[2]=r,e[3]=o):o=e[3];let u;e[4]!==r?(u=r("markdownEditor.heading2"),e[4]=r,e[5]=u):u=e[5];let c;e[6]!==r?(c=r("markdownEditor.heading3"),e[6]=r,e[7]=c):c=e[7];let h;e[8]!==o||e[9]!==u||e[10]!==c?(h={1:o,2:u,3:c},e[8]=o,e[9]=u,e[10]=c,e[11]=h):h=e[11];const d=h;let f;e[12]!==n||e[13]!==d||e[14]!==s||e[15]!==l||e[16]!==r?(f=s&&b.jsxs(Xt,{editor:n,shouldShow:jn,appendTo:s,className:"flex items-center gap-0.5 rounded-lg bg-popover p-1 shadow-soft","aria-label":r("markdownEditor.toolbarAriaLabel"),children:[b.jsx(_,{active:l.bold,label:r("markdownEditor.bold"),onClick:()=>n.chain().focus().toggleBold().run(),children:b.jsx(hn,{size:14})}),b.jsx(_,{active:l.italic,label:r("markdownEditor.italic"),onClick:()=>n.chain().focus().toggleItalic().run(),children:b.jsx(dn,{size:14})}),b.jsx(_,{active:l.strike,label:r("markdownEditor.strikethrough"),onClick:()=>n.chain().focus().toggleStrike().run(),children:b.jsx(pn,{size:14})}),b.jsx(_,{active:l.code,label:r("markdownEditor.code"),onClick:()=>n.chain().focus().toggleCode().run(),children:b.jsx(fn,{size:14})}),b.jsx(le,{}),at.map((g,m)=>b.jsx(_,{active:l.headings[m]??!1,label:d[g],onClick:()=>n.chain().focus().toggleHeading({level:g}).run(),children:b.jsx(He,{children:`H${g}`})},g)),b.jsx(le,{}),b.jsx(_,{active:l.bulletList,label:r("markdownEditor.bulletList"),onClick:()=>n.chain().focus().toggleBulletList().run(),children:b.jsx(kn,{size:14})}),b.jsx(_,{active:l.orderedList,label:r("markdownEditor.orderedList"),onClick:()=>n.chain().focus().toggleOrderedList().run(),children:b.jsx(He,{children:"1."})}),b.jsx(_,{active:l.blockquote,label:r("markdownEditor.quote"),onClick:()=>n.chain().focus().toggleBlockquote().run(),children:b.jsx(gn,{size:14})}),b.jsx(le,{}),b.jsx(Hn,{editor:n})]}),e[12]=n,e[13]=d,e[14]=s,e[15]=l,e[16]=r,e[17]=f):f=e[17];let p;return e[18]!==f?(p=b.jsx("div",{ref:i,className:"relative z-20",children:f}),e[18]=f,e[19]=p):p=e[19],p}function On(t){const{editor:e}=t;return{bold:e.isActive("bold"),italic:e.isActive("italic"),strike:e.isActive("strike"),code:e.isActive("code"),headings:at.map(n=>e.isActive("heading",{level:n})),bulletList:e.isActive("bulletList"),orderedList:e.isActive("orderedList"),blockquote:e.isActive("blockquote")}}const Bn=10,Dn=25,Fn={"image/png":".png","image/jpeg":".jpg","image/gif":".gif","image/webp":".webp","image/avif":".avif","image/svg+xml":".svg"};function qn(t){return t.name.match(/\.[a-z0-9]{1,8}$/i)?.[0]??Fn[t.type]??""}function Wn(){const t=$.c(4),e=j(),{upload:n}=wn(Pe),r=yn(Pe);let s;return t[0]!==r||t[1]!==e||t[2]!==n?(s={uploadFile:async a=>{const l=st(a),o=l?Bn:Dn;if(a.size>o*1024*1024)return ue.error(e("markdownEditor.fileTooLarge",{name:a.name,max:String(o)})),null;const u=l?Tn:vn,c=`${crypto.randomUUID()}${qn(a)}`;try{return await n.mutateAsync({dir:u,files:[new File([a],c,{type:a.type})]}),r(`${u}/${c}`)}catch{return ue.error(e("markdownEditor.uploadFailed",{name:a.name})),null}}},t[0]=r,t[1]=e,t[2]=n,t[3]=s):s=t[3],s}const ee=new Ye("uploadSlots"),Un=ie.create({name:"uploadSlots",addProseMirrorPlugins(){return[new Et({key:ee,state:{init:()=>new Map,apply(t,e){const n=t.getMeta(ee);if(!t.docChanged&&!n)return e;const r=new Map;for(const[s,i]of e)r.set(s,t.mapping.map(i));if(n){const[s,i]=n;i===null?r.delete(s):r.set(s,i)}return r}}})]}});function he(t,e,n){return t.setMeta(ee,[e,n])}function Gn(t,e){return ee.getState(t)?.get(e)}function Zn(t,e,n,r,s){const{schema:i}=t.state,a=i.nodes[n];if(!a)return;const l=a.create(r),o=t.state.selection.to===e,u=t.state.doc.resolve(e),c=u.parent.textBetween(Math.max(0,u.parentOffset-1),u.parentOffset,void 0,""),h=()=>i.text(" "),d=l.isInline?[...c&&!/\s/.test(c)?[h()]:[],l,h()]:l,f=t.state.tr.replaceWith(e,e,d);let p=e,g=e;f.mapping.maps.at(-1)?.forEach((T,x,v,M)=>{p=v,g=M});let m;f.doc.nodesBetween(p,g,(T,x)=>{T===l&&(m=x+T.nodeSize)});let k=m??g;m!==void 0&&l.isInline&&(k+=1);const w=i.nodes.paragraph;m!==void 0&&l.isBlock&&w&&(f.doc.resolve(m).nodeAfter?.isTextblock||f.insert(m,w.create()),k=m+1);const y=$t.near(f.doc.resolve(k));o&&f.setSelection(y),s&&he(f,s,y.to),t.dispatch(f)}function Vn(t){return!t||t.files.length===0?[]:t.getData("text/html")!==""&&t.getData("text/plain").trim()!==""?[]:Array.from(t.files)}function Kn(t=!0){const e=j(),{uploadFile:n}=Wn(),r=E.useRef(n);r.current=n;const[s,i]=E.useState(0),a=E.useRef(0),l=h=>{a.current+=h,i(a.current)},o=(h,d,f)=>{if(!t||d.length===0)return!1;l(d.length);const p=Symbol("upload");return h.dispatch(he(h.state.tr,p,f)),(async()=>{for(const g of d)try{const m=await r.current(g);if(!m||h.isDestroyed)continue;const k=st(g);Zn(h,Gn(h.state,p)??h.state.selection.to,k?"image":"attachment",k?{src:m,alt:g.name}:{href:m,name:g.name},p)}catch{ue.error(e("markdownEditor.uploadFailed",{name:g.name}))}finally{l(-1)}h.isDestroyed||h.dispatch(he(h.state.tr,p,null))})(),!0};return{pending:s,uploading:()=>a.current>0,uploadInto:o,handlePaste:(h,d)=>{const f=Vn(d.clipboardData);return f.length===0?!1:(d.stopPropagation(),o(h,f,h.state.selection.to))},handleDrop:(h,d,f,p)=>{if(p)return!1;const g=Array.from(d.dataTransfer?.files??[]);if(g.length===0)return!1;const m=h.posAtCoords({left:d.clientX,top:d.clientY})?.pos;return m===void 0?!1:(d.stopPropagation(),o(h,g,m))}}}function be(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var F=be();function ot(t){F=t}var O={exec:()=>null};function A(t,e=""){let n=typeof t=="string"?t:t.source,r={replace:(s,i)=>{let a=typeof i=="string"?i:i.source;return a=a.replace(R.caret,"$1"),n=n.replace(s,a),r},getRegex:()=>new RegExp(n,e)};return r}var Qn=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),R={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}>`)},Xn=/^(?:[ \t]*(?:\n|$))+/,Jn=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Yn=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,K=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,er=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,we=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,lt=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ct=A(lt).replace(/bull/g,we).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),tr=A(lt).replace(/bull/g,we).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),ye=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,nr=/^[^\n]+/,Te=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,rr=A(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Te).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),sr=A(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,we).getRegex(),ae="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ve=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,ir=A("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ve).replace("tag",ae).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ut=A(ye).replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ae).getRegex(),ar=A(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ut).getRegex(),Ae={blockquote:ar,code:Jn,def:rr,fences:Yn,heading:er,hr:K,html:ir,lheading:ct,list:sr,newline:Xn,paragraph:ut,table:O,text:nr},je=A("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ae).getRegex(),or={...Ae,lheading:tr,table:je,paragraph:A(ye).replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",je).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ae).getRegex()},lr={...Ae,html:A(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ve).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:O,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:A(ye).replace("hr",K).replace("heading",` *#{1,6} *[^
|
|
1
|
+
import{c as $,b as j,r as E,j as b,l as q,ai as vt,t as ue,b7 as Xe,a4 as At,gC as Mt,m as St,K as Ct,bP as Rt,h as Je,o as Et}from"./index-C4tYnNih.js";import{a as $t,n as Ye,E as ie,o as _t,x as Lt,y as P,z as It,A as zt,B as et,C as N,G as Ee,H as Pt,I as Ht,J as $e,K as jt,L as V,N as D,m as H,O as Y,T as tt,R as ke,Q as xe,U as Nt,V as Ot,W as Bt,X as Dt,Y as Ft,s as qt,Z as Wt,u as Ut,b as Gt}from"./usage-stats-DtO_zGwF.js";import{T as _,n as Zt,i as Vt,E as Kt}from"./editor-classes-CcPgajKG.js";import{a as Qt,e as nt,s as Xt,S as Jt}from"./suggestion-DTo0Z5su.js";import{B as Yt,c as en,t as tn,C as rt,f as nn,g as _e,s as rn,m as Le,a as Ie,b as sn,d as ze,e as an,h as on,i as ln,j as cn,k as un,l as hn,n as dn}from"./index-D8kI0oe2.js";import{ai as pn,aj as fn,al as gn,a0 as mn,be as kn,aW as xn}from"./agent-icon-KvVT3fA8.js";import{i as bn}from"./SwitchHorizontal01-B1MoYKPo.js";import{i as wn}from"./Link01-B7BHRxIW.js";import{s as yn}from"./Trash01-C9E8l_mI.js";import{i as Tn,b as vn}from"./use-org-fs-Dt6mQNyr.js";import{E as Pe,i as st,b as An,c as Mn,d as it,A as Sn,e as Cn,m as Rn,f as En}from"./markdown-C-J5-sTt.js";import{d as $n,e as _n,c as Ln,C as In,b as zn}from"./command-MmMDew8i.js";import{I as Pn}from"./icon-button-5JlhYc9R.js";function Hn(t){const e=$.c(30),{editor:n}=t,r=j(),[s,i]=E.useState(!1),[a,l]=E.useState(""),[o,u]=E.useState(!1);let c;e[0]!==n?(c=n.isActive("link"),e[0]=n,e[1]=c):c=e[1];const h=c;let d;e[2]!==n||e[3]!==s?(d=()=>{if(s){i(!1);return}const M=n.getAttributes("link").href;l(typeof M=="string"?M:""),u(!1),i(!0)},e[2]=n,e[3]=s,e[4]=d):d=e[4];const f=d;let p;e[5]!==n?(p=()=>{n.chain().focus().extendMarkRange("link").unsetLink().run(),i(!1)},e[5]=n,e[6]=p):p=e[6];const g=p;let m;e[7]!==a||e[8]!==n||e[9]!==g?(m=()=>{const M=Zt(a);if(M===""){g();return}if(!Vt(M)){u(!0);return}n.chain().focus().extendMarkRange("link").setLink({href:M}).run(),i(!1)},e[7]=a,e[8]=n,e[9]=g,e[10]=m):m=e[10];const k=m;let w;e[11]!==r?(w=r("markdownEditor.link"),e[11]=r,e[12]=w):w=e[12];let y;e[13]===Symbol.for("react.memo_cache_sentinel")?(y=b.jsx(wn,{size:14}),e[13]=y):y=e[13];let T;e[14]!==h||e[15]!==w||e[16]!==f?(T=b.jsx(_,{active:h,label:w,onClick:f,children:y}),e[14]=h,e[15]=w,e[16]=f,e[17]=T):T=e[17];let x;e[18]!==h||e[19]!==k||e[20]!==a||e[21]!==n||e[22]!==o||e[23]!==s||e[24]!==g||e[25]!==r?(x=s&&b.jsxs("div",{className:"absolute left-0 top-full z-20 mt-1.5 flex w-64 items-center gap-0.5 rounded-md bg-popover p-1 shadow-soft",onBlur:M=>{M.currentTarget.contains(M.relatedTarget)||i(!1)},children:[b.jsx("input",{autoFocus:!0,type:"text","aria-label":r("markdownEditor.linkInputAriaLabel"),"aria-invalid":o,placeholder:r("markdownEditor.linkPlaceholder"),value:a,onChange:M=>{l(M.target.value),u(!1)},onKeyDown:M=>{M.key==="Enter"?(M.preventDefault(),k()):M.key==="Escape"&&(M.preventDefault(),i(!1),n.chain().focus().run())},className:q("h-7 min-w-0 flex-1 rounded bg-transparent px-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none",o&&"text-destructive")}),b.jsx(_,{active:!1,label:r("markdownEditor.linkApply"),onClick:k,children:b.jsx(vt,{size:14})}),h&&b.jsx(_,{active:!1,label:r("markdownEditor.linkRemove"),onClick:g,children:b.jsx(yn,{size:14})})]}),e[18]=h,e[19]=k,e[20]=a,e[21]=n,e[22]=o,e[23]=s,e[24]=g,e[25]=r,e[26]=x):x=e[26];let v;return e[27]!==T||e[28]!==x?(v=b.jsxs("div",{className:"relative",children:[T,x]}),e[27]=T,e[28]=x,e[29]=v):v=e[29],v}const le=()=>{const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=b.jsx("div",{className:"mx-0.5 h-4 w-px bg-border"}),t[0]=e):e=t[0],e},He=t=>{const e=$.c(2),{children:n}=t;let r;return e[0]!==n?(r=b.jsx("span",{className:"text-2xs font-semibold leading-none",children:n}),e[0]=n,e[1]=r):r=e[1],r},at=[1,2,3],jn=({editor:t,state:e})=>t.isEditable&&!e.selection.empty&&!t.isActive("image")&&!t.isActive("attachment")&&!t.isActive("codeBlock");function Nn(t){const e=$.c(20),{editor:n}=t,r=j(),[s,i]=E.useState(null);let a;e[0]!==n?(a={editor:n,selector:On},e[0]=n,e[1]=a):a=e[1];const l=$t(a);let o;e[2]!==r?(o=r("markdownEditor.heading1"),e[2]=r,e[3]=o):o=e[3];let u;e[4]!==r?(u=r("markdownEditor.heading2"),e[4]=r,e[5]=u):u=e[5];let c;e[6]!==r?(c=r("markdownEditor.heading3"),e[6]=r,e[7]=c):c=e[7];let h;e[8]!==o||e[9]!==u||e[10]!==c?(h={1:o,2:u,3:c},e[8]=o,e[9]=u,e[10]=c,e[11]=h):h=e[11];const d=h;let f;e[12]!==n||e[13]!==d||e[14]!==s||e[15]!==l||e[16]!==r?(f=s&&b.jsxs(Yt,{editor:n,shouldShow:jn,appendTo:s,className:"flex items-center gap-0.5 rounded-lg bg-popover p-1 shadow-soft","aria-label":r("markdownEditor.toolbarAriaLabel"),children:[b.jsx(_,{active:l.bold,label:r("markdownEditor.bold"),onClick:()=>n.chain().focus().toggleBold().run(),children:b.jsx(pn,{size:14})}),b.jsx(_,{active:l.italic,label:r("markdownEditor.italic"),onClick:()=>n.chain().focus().toggleItalic().run(),children:b.jsx(fn,{size:14})}),b.jsx(_,{active:l.strike,label:r("markdownEditor.strikethrough"),onClick:()=>n.chain().focus().toggleStrike().run(),children:b.jsx(gn,{size:14})}),b.jsx(_,{active:l.code,label:r("markdownEditor.code"),onClick:()=>n.chain().focus().toggleCode().run(),children:b.jsx(mn,{size:14})}),b.jsx(le,{}),at.map((g,m)=>b.jsx(_,{active:l.headings[m]??!1,label:d[g],onClick:()=>n.chain().focus().toggleHeading({level:g}).run(),children:b.jsx(He,{children:`H${g}`})},g)),b.jsx(le,{}),b.jsx(_,{active:l.bulletList,label:r("markdownEditor.bulletList"),onClick:()=>n.chain().focus().toggleBulletList().run(),children:b.jsx(bn,{size:14})}),b.jsx(_,{active:l.orderedList,label:r("markdownEditor.orderedList"),onClick:()=>n.chain().focus().toggleOrderedList().run(),children:b.jsx(He,{children:"1."})}),b.jsx(_,{active:l.blockquote,label:r("markdownEditor.quote"),onClick:()=>n.chain().focus().toggleBlockquote().run(),children:b.jsx(kn,{size:14})}),b.jsx(le,{}),b.jsx(Hn,{editor:n})]}),e[12]=n,e[13]=d,e[14]=s,e[15]=l,e[16]=r,e[17]=f):f=e[17];let p;return e[18]!==f?(p=b.jsx("div",{ref:i,className:"relative z-20",children:f}),e[18]=f,e[19]=p):p=e[19],p}function On(t){const{editor:e}=t;return{bold:e.isActive("bold"),italic:e.isActive("italic"),strike:e.isActive("strike"),code:e.isActive("code"),headings:at.map(n=>e.isActive("heading",{level:n})),bulletList:e.isActive("bulletList"),orderedList:e.isActive("orderedList"),blockquote:e.isActive("blockquote")}}const Bn=10,Dn=25,Fn={"image/png":".png","image/jpeg":".jpg","image/gif":".gif","image/webp":".webp","image/avif":".avif","image/svg+xml":".svg"};function qn(t){return t.name.match(/\.[a-z0-9]{1,8}$/i)?.[0]??Fn[t.type]??""}function Wn(){const t=$.c(4),e=j(),{upload:n}=Tn(Pe),r=vn(Pe);let s;return t[0]!==r||t[1]!==e||t[2]!==n?(s={uploadFile:async a=>{const l=st(a),o=l?Bn:Dn;if(a.size>o*1024*1024)return ue.error(e("markdownEditor.fileTooLarge",{name:a.name,max:String(o)})),null;const u=l?An:Mn,c=`${crypto.randomUUID()}${qn(a)}`;try{return await n.mutateAsync({dir:u,files:[new File([a],c,{type:a.type})]}),r(`${u}/${c}`)}catch{return ue.error(e("markdownEditor.uploadFailed",{name:a.name})),null}}},t[0]=r,t[1]=e,t[2]=n,t[3]=s):s=t[3],s}const ee=new Ye("uploadSlots"),Un=ie.create({name:"uploadSlots",addProseMirrorPlugins(){return[new _t({key:ee,state:{init:()=>new Map,apply(t,e){const n=t.getMeta(ee);if(!t.docChanged&&!n)return e;const r=new Map;for(const[s,i]of e)r.set(s,t.mapping.map(i));if(n){const[s,i]=n;i===null?r.delete(s):r.set(s,i)}return r}}})]}});function he(t,e,n){return t.setMeta(ee,[e,n])}function Gn(t,e){return ee.getState(t)?.get(e)}function Zn(t,e,n,r,s){const{schema:i}=t.state,a=i.nodes[n];if(!a)return;const l=a.create(r),o=t.state.selection.to===e,u=t.state.doc.resolve(e),c=u.parent.textBetween(Math.max(0,u.parentOffset-1),u.parentOffset,void 0,""),h=()=>i.text(" "),d=l.isInline?[...c&&!/\s/.test(c)?[h()]:[],l,h()]:l,f=t.state.tr.replaceWith(e,e,d);let p=e,g=e;f.mapping.maps.at(-1)?.forEach((T,x,v,M)=>{p=v,g=M});let m;f.doc.nodesBetween(p,g,(T,x)=>{T===l&&(m=x+T.nodeSize)});let k=m??g;m!==void 0&&l.isInline&&(k+=1);const w=i.nodes.paragraph;m!==void 0&&l.isBlock&&w&&(f.doc.resolve(m).nodeAfter?.isTextblock||f.insert(m,w.create()),k=m+1);const y=Lt.near(f.doc.resolve(k));o&&f.setSelection(y),s&&he(f,s,y.to),t.dispatch(f)}function Vn(t){return!t||t.files.length===0?[]:t.getData("text/html")!==""&&t.getData("text/plain").trim()!==""?[]:Array.from(t.files)}function Kn(t=!0){const e=j(),{uploadFile:n}=Wn(),r=E.useRef(n);r.current=n;const[s,i]=E.useState(0),a=E.useRef(0),l=h=>{a.current+=h,i(a.current)},o=(h,d,f)=>{if(!t||d.length===0)return!1;l(d.length);const p=Symbol("upload");return h.dispatch(he(h.state.tr,p,f)),(async()=>{for(const g of d)try{const m=await r.current(g);if(!m||h.isDestroyed)continue;const k=st(g);Zn(h,Gn(h.state,p)??h.state.selection.to,k?"image":"attachment",k?{src:m,alt:g.name}:{href:m,name:g.name},p)}catch{ue.error(e("markdownEditor.uploadFailed",{name:g.name}))}finally{l(-1)}h.isDestroyed||h.dispatch(he(h.state.tr,p,null))})(),!0};return{pending:s,uploading:()=>a.current>0,uploadInto:o,handlePaste:(h,d)=>{const f=Vn(d.clipboardData);return f.length===0?!1:(d.stopPropagation(),o(h,f,h.state.selection.to))},handleDrop:(h,d,f,p)=>{if(p)return!1;const g=Array.from(d.dataTransfer?.files??[]);if(g.length===0)return!1;const m=h.posAtCoords({left:d.clientX,top:d.clientY})?.pos;return m===void 0?!1:(d.stopPropagation(),o(h,g,m))}}}function be(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var F=be();function ot(t){F=t}var O={exec:()=>null};function A(t,e=""){let n=typeof t=="string"?t:t.source,r={replace:(s,i)=>{let a=typeof i=="string"?i:i.source;return a=a.replace(R.caret,"$1"),n=n.replace(s,a),r},getRegex:()=>new RegExp(n,e)};return r}var Qn=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),R={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}>`)},Xn=/^(?:[ \t]*(?:\n|$))+/,Jn=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Yn=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,K=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,er=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,we=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,lt=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ct=A(lt).replace(/bull/g,we).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),tr=A(lt).replace(/bull/g,we).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),ye=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,nr=/^[^\n]+/,Te=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,rr=A(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Te).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),sr=A(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,we).getRegex(),ae="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ve=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,ir=A("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ve).replace("tag",ae).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ut=A(ye).replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ae).getRegex(),ar=A(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ut).getRegex(),Ae={blockquote:ar,code:Jn,def:rr,fences:Yn,heading:er,hr:K,html:ir,lheading:ct,list:sr,newline:Xn,paragraph:ut,table:O,text:nr},je=A("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ae).getRegex(),or={...Ae,lheading:tr,table:je,paragraph:A(ye).replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",je).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ae).getRegex()},lr={...Ae,html:A(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ve).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:O,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:A(ye).replace("hr",K).replace("heading",` *#{1,6} *[^
|
|
2
2
|
]`).replace("lheading",ct).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},cr=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ur=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ht=/^( {2,}|\\)\n(?!\s*$)/,hr=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,W=/[\p{P}\p{S}]/u,oe=/[\s\p{P}\p{S}]/u,Me=/[^\s\p{P}\p{S}]/u,dr=A(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,oe).getRegex(),dt=/(?!~)[\p{P}\p{S}]/u,pr=/(?!~)[\s\p{P}\p{S}]/u,fr=/(?:[^\s\p{P}\p{S}]|~)/u,gr=A(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Qn?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),pt=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,mr=A(pt,"u").replace(/punct/g,W).getRegex(),kr=A(pt,"u").replace(/punct/g,dt).getRegex(),ft="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",xr=A(ft,"gu").replace(/notPunctSpace/g,Me).replace(/punctSpace/g,oe).replace(/punct/g,W).getRegex(),br=A(ft,"gu").replace(/notPunctSpace/g,fr).replace(/punctSpace/g,pr).replace(/punct/g,dt).getRegex(),wr=A("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Me).replace(/punctSpace/g,oe).replace(/punct/g,W).getRegex(),yr=A(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,W).getRegex(),Tr="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",vr=A(Tr,"gu").replace(/notPunctSpace/g,Me).replace(/punctSpace/g,oe).replace(/punct/g,W).getRegex(),Ar=A(/\\(punct)/,"gu").replace(/punct/g,W).getRegex(),Mr=A(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Sr=A(ve).replace("(?:-->|$)","-->").getRegex(),Cr=A("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Sr).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),te=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,Rr=A(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",te).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),gt=A(/^!?\[(label)\]\[(ref)\]/).replace("label",te).replace("ref",Te).getRegex(),mt=A(/^!?\[(ref)\](?:\[\])?/).replace("ref",Te).getRegex(),Er=A("reflink|nolink(?!\\()","g").replace("reflink",gt).replace("nolink",mt).getRegex(),Ne=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Se={_backpedal:O,anyPunctuation:Ar,autolink:Mr,blockSkip:gr,br:ht,code:ur,del:O,delLDelim:O,delRDelim:O,emStrongLDelim:mr,emStrongRDelimAst:xr,emStrongRDelimUnd:wr,escape:cr,link:Rr,nolink:mt,punctuation:dr,reflink:gt,reflinkSearch:Er,tag:Cr,text:hr,url:O},$r={...Se,link:A(/^!?\[(label)\]\((.*?)\)/).replace("label",te).getRegex(),reflink:A(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",te).getRegex()},de={...Se,emStrongRDelimAst:br,emStrongLDelim:kr,delLDelim:yr,delRDelim:vr,url:A(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Ne).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:A(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Ne).getRegex()},_r={...de,br:A(ht).replace("{2,}","*").getRegex(),text:A(de.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Q={normal:Ae,gfm:or,pedantic:lr},U={normal:Se,gfm:de,breaks:_r,pedantic:$r},Lr={"&":"&","<":"<",">":">",'"':""","'":"'"},Oe=t=>Lr[t];function z(t,e){if(e){if(R.escapeTest.test(t))return t.replace(R.escapeReplace,Oe)}else if(R.escapeTestNoEncode.test(t))return t.replace(R.escapeReplaceNoEncode,Oe);return t}function Be(t){try{t=encodeURI(t).replace(R.percentDecode,"%")}catch{return null}return t}function De(t,e){let n=t.replace(R.findPipe,(i,a,l)=>{let o=!1,u=a;for(;--u>=0&&l[u]==="\\";)o=!o;return o?"|":" |"}),r=n.split(R.splitPipe),s=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;s<r.length;s++)r[s]=r[s].trim().replace(R.slashPipe,"|");return r}function G(t,e,n){let r=t.length;if(r===0)return"";let s=0;for(;s<r&&t.charAt(r-s-1)===e;)s++;return t.slice(0,r-s)}function Ir(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let r=0;r<t.length;r++)if(t[r]==="\\")r++;else if(t[r]===e[0])n++;else if(t[r]===e[1]&&(n--,n<0))return r;return n>0?-2:-1}function zr(t,e=0){let n=e,r="";for(let s of t)if(s===" "){let i=4-n%4;r+=" ".repeat(i),n+=i}else r+=s,n++;return r}function Fe(t,e,n,r,s){let i=e.href,a=e.title||null,l=t[1].replace(s.other.outputLinkReplace,"$1");r.state.inLink=!0;let o={type:t[0].charAt(0)==="!"?"image":"link",raw:n,href:i,title:a,text:l,tokens:r.inlineTokens(l)};return r.state.inLink=!1,o}function Pr(t,e,n){let r=t.match(n.other.indentCodeCompensation);if(r===null)return e;let s=r[1];return e.split(`
|
|
3
3
|
`).map(i=>{let a=i.match(n.other.beginningSpace);if(a===null)return i;let[l]=a;return l.length>=s.length?i.slice(s.length):i}).join(`
|
|
4
4
|
`)}var ne=class{options;rules;lexer;constructor(t){this.options=t||F}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let n=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?n:G(n,`
|
|
@@ -58,12 +58,12 @@ ${t}</tr>
|
|
|
58
58
|
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${z(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:n}){let r=this.parser.parseInline(n),s=Be(t);if(s===null)return r;t=s;let i='<a href="'+t+'"';return e&&(i+=' title="'+z(e)+'"'),i+=">"+r+"</a>",i}image({href:t,title:e,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let s=Be(t);if(s===null)return z(n);t=s;let i=`<img src="${t}" alt="${z(n)}"`;return e&&(i+=` title="${z(e)}"`),i+=">",i}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:z(t.text)}},Ce=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}checkbox({raw:t}){return t}},I=class fe{options;renderer;textRenderer;constructor(e){this.options=e||F,this.options.renderer=this.options.renderer||new re,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Ce}static parse(e,n){return new fe(n).parse(e)}static parseInline(e,n){return new fe(n).parseInline(e)}parse(e){this.renderer.parser=this;let n="";for(let r=0;r<e.length;r++){let s=e[r];if(this.options.extensions?.renderers?.[s.type]){let a=s,l=this.options.extensions.renderers[a.type].call({parser:this},a);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(a.type)){n+=l||"";continue}}let i=s;switch(i.type){case"space":{n+=this.renderer.space(i);break}case"hr":{n+=this.renderer.hr(i);break}case"heading":{n+=this.renderer.heading(i);break}case"code":{n+=this.renderer.code(i);break}case"table":{n+=this.renderer.table(i);break}case"blockquote":{n+=this.renderer.blockquote(i);break}case"list":{n+=this.renderer.list(i);break}case"checkbox":{n+=this.renderer.checkbox(i);break}case"html":{n+=this.renderer.html(i);break}case"def":{n+=this.renderer.def(i);break}case"paragraph":{n+=this.renderer.paragraph(i);break}case"text":{n+=this.renderer.text(i);break}default:{let a='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return n}parseInline(e,n=this.renderer){this.renderer.parser=this;let r="";for(let s=0;s<e.length;s++){let i=e[s];if(this.options.extensions?.renderers?.[i.type]){let l=this.options.extensions.renderers[i.type].call({parser:this},i);if(l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){r+=l||"";continue}}let a=i;switch(a.type){case"escape":{r+=n.text(a);break}case"html":{r+=n.html(a);break}case"link":{r+=n.link(a);break}case"image":{r+=n.image(a);break}case"checkbox":{r+=n.checkbox(a);break}case"strong":{r+=n.strong(a);break}case"em":{r+=n.em(a);break}case"codespan":{r+=n.codespan(a);break}case"br":{r+=n.br(a);break}case"del":{r+=n.del(a);break}case"text":{r+=n.text(a);break}default:{let l='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return r}},Z=class{options;block;constructor(t){this.options=t||F}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(t=this.block){return t?L.lex:L.lexInline}provideParser(t=this.block){return t?I.parse:I.parseInline}},Hr=class{defaults=be();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=I;Renderer=re;TextRenderer=Ce;Lexer=L;Tokenizer=ne;Hooks=Z;constructor(...t){this.use(...t)}walkTokens(t,e){let n=[];for(let r of t)switch(n=n.concat(e.call(this,r)),r.type){case"table":{let s=r;for(let i of s.header)n=n.concat(this.walkTokens(i.tokens,e));for(let i of s.rows)for(let a of i)n=n.concat(this.walkTokens(a.tokens,e));break}case"list":{let s=r;n=n.concat(this.walkTokens(s.items,e));break}default:{let s=r;this.defaults.extensions?.childTokens?.[s.type]?this.defaults.extensions.childTokens[s.type].forEach(i=>{let a=s[i].flat(1/0);n=n.concat(this.walkTokens(a,e))}):s.tokens&&(n=n.concat(this.walkTokens(s.tokens,e)))}}return n}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{let r={...n};if(r.async=this.defaults.async||r.async||!1,n.extensions&&(n.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let i=e.renderers[s.name];i?e.renderers[s.name]=function(...a){let l=s.renderer.apply(this,a);return l===!1&&(l=i.apply(this,a)),l}:e.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let i=e[s.level];i?i.unshift(s.tokenizer):e[s.level]=[s.tokenizer],s.start&&(s.level==="block"?e.startBlock?e.startBlock.push(s.start):e.startBlock=[s.start]:s.level==="inline"&&(e.startInline?e.startInline.push(s.start):e.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(e.childTokens[s.name]=s.childTokens)}),r.extensions=e),n.renderer){let s=this.defaults.renderer||new re(this.defaults);for(let i in n.renderer){if(!(i in s))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let a=i,l=n.renderer[a],o=s[a];s[a]=(...u)=>{let c=l.apply(s,u);return c===!1&&(c=o.apply(s,u)),c||""}}r.renderer=s}if(n.tokenizer){let s=this.defaults.tokenizer||new ne(this.defaults);for(let i in n.tokenizer){if(!(i in s))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let a=i,l=n.tokenizer[a],o=s[a];s[a]=(...u)=>{let c=l.apply(s,u);return c===!1&&(c=o.apply(s,u)),c}}r.tokenizer=s}if(n.hooks){let s=this.defaults.hooks||new Z;for(let i in n.hooks){if(!(i in s))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let a=i,l=n.hooks[a],o=s[a];Z.passThroughHooks.has(i)?s[a]=u=>{if(this.defaults.async&&Z.passThroughHooksRespectAsync.has(i))return(async()=>{let h=await l.call(s,u);return o.call(s,h)})();let c=l.call(s,u);return o.call(s,c)}:s[a]=(...u)=>{if(this.defaults.async)return(async()=>{let h=await l.apply(s,u);return h===!1&&(h=await o.apply(s,u)),h})();let c=l.apply(s,u);return c===!1&&(c=o.apply(s,u)),c}}r.hooks=s}if(n.walkTokens){let s=this.defaults.walkTokens,i=n.walkTokens;r.walkTokens=function(a){let l=[];return l.push(i.call(this,a)),s&&(l=l.concat(s.call(this,a))),l}}this.defaults={...this.defaults,...r}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return L.lex(t,e??this.defaults)}parser(t,e){return I.parse(t,e??this.defaults)}parseMarkdown(t){return(e,n)=>{let r={...n},s={...this.defaults,...r},i=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&r.async===!1)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return i(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=t),s.async)return(async()=>{let a=s.hooks?await s.hooks.preprocess(e):e,l=await(s.hooks?await s.hooks.provideLexer(t):t?L.lex:L.lexInline)(a,s),o=s.hooks?await s.hooks.processAllTokens(l):l;s.walkTokens&&await Promise.all(this.walkTokens(o,s.walkTokens));let u=await(s.hooks?await s.hooks.provideParser(t):t?I.parse:I.parseInline)(o,s);return s.hooks?await s.hooks.postprocess(u):u})().catch(i);try{s.hooks&&(e=s.hooks.preprocess(e));let a=(s.hooks?s.hooks.provideLexer(t):t?L.lex:L.lexInline)(e,s);s.hooks&&(a=s.hooks.processAllTokens(a)),s.walkTokens&&this.walkTokens(a,s.walkTokens);let l=(s.hooks?s.hooks.provideParser(t):t?I.parse:I.parseInline)(a,s);return s.hooks&&(l=s.hooks.postprocess(l)),l}catch(a){return i(a)}}}onError(t,e){return n=>{if(n.message+=`
|
|
59
59
|
Please report this to https://github.com/markedjs/marked.`,t){let r="<p>An error occurred:</p><pre>"+z(n.message+"",!0)+"</pre>";return e?Promise.resolve(r):r}if(e)return Promise.reject(n);throw n}}},B=new Hr;function S(t,e){return B.parse(t,e)}S.options=S.setOptions=function(t){return B.setOptions(t),S.defaults=B.defaults,ot(S.defaults),S};S.getDefaults=be;S.defaults=F;S.use=function(...t){return B.use(...t),S.defaults=B.defaults,ot(S.defaults),S};S.walkTokens=function(t,e){return B.walkTokens(t,e)};S.parseInline=B.parseInline;S.Parser=I;S.parser=I.parse;S.Renderer=re;S.TextRenderer=Ce;S.Lexer=L;S.lexer=L.lex;S.Tokenizer=ne;S.Hooks=Z;S.parse=S;S.options;S.setOptions;S.use;S.walkTokens;S.parseInline;I.parse;L.lex;const jr=/\n[^\S\n]*(?:\n[^\S\n]*)+$/;function Nr(t){return t.flatMap((e,n)=>{var r;if(e.type==="space"||((r=t[n+1])===null||r===void 0?void 0:r.type)==="space")return[e];const s=(e.raw||"").match(jr);return s?[{...e,raw:(e.raw||"").slice(0,-s[0].length)},{type:"space",raw:s[0]}]:[e]})}function Or(t,e){const n=e.split(`
|
|
60
60
|
`).flatMap(r=>[r,""]).map(r=>`${t}${r}`).join(`
|
|
61
|
-
`);return n.slice(0,n.length-1)}function Br(t,e){const n=[];return Array.from(t.entries()).forEach(([r,s])=>{if(!e){n.push(r);return}(e.marks||[]).find(i=>i.type===r&&V(i.attrs,s.attrs))||n.push(r)}),n}function Dr(t,e){const n=[];return Array.from(e.entries()).forEach(([r,s])=>{const i=t.get(r);(!i||!V(i.attrs,s.attrs))&&n.push({type:r,mark:s})}),n}function Fr(t,e,n,r){const s=!n,i=n&&(!n.marks||n.marks.length===0),a=n&&n.marks&&!r(e,new Map(n.marks.map(o=>[o.type,o]))),l=[];return(s||i||a)&&(n&&n.marks?Array.from(t.entries()).reverse().forEach(([o,u])=>{n.marks.find(c=>c.type===o&&V(c.attrs,u.attrs))||l.push(o)}):(s||i)&&l.push(...Array.from(t.keys()).reverse())),l}function qr(t,e){let n="";return Array.from(t.keys()).reverse().forEach(r=>{const s=e(r,t.get(r));s&&(n=s+n)}),t.clear(),n}function Wr(t,e,n){let r="";return Array.from(t.entries()).forEach(([s,i])=>{const a=n(s,i);a&&(r+=a),e.set(s,i)}),r}function ce(t){const e=(t.raw||t.text||"").match(/^(\s*)[-+*]\s+\[([ xX])\]\s+/);return e?{isTask:!0,checked:e[2].toLowerCase()==="x",indentLevel:e[1].length}:{isTask:!1,indentLevel:0}}function X(t,e){return typeof t!="string"?"json":e}const Ur=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","menu","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","search","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","circle","clippath","defs","ellipse","foreignobject","g","image","line","lineargradient","mask","path","polygon","polyline","radialgradient","rect","stop","switch","symbol","textpath","tspan","use","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"]),Gr=/<\/?([a-zA-Z][\w-]*)/g;function Zr(t){const e=[];let n;for(;(n=Gr.exec(t))!==null;)e.push(n[1].toLowerCase());return e}function Vr(t){const e=t.toLowerCase();return e.includes("-")?!1:!Ur.has(e)}function Kr(t,e){return Zr(t).some(n=>Vr(n)?!e.has(n):!1)}var qe=class{constructor(t){var e,n,r,s,i;this.activeParseLexer=null,this.extensionRanks=new Map,this.baseExtensions=[],this.extensions=[],this.codeTypes=new Set,this.schemaParseDomTagsCache=null,this.inlineNodeTypesCache=null,this.lastParseResult=null,this.markedInstance=(e=t?.marked)!==null&&e!==void 0?e:S,this.indentStyle=(n=t==null||(r=t.indentation)===null||r===void 0?void 0:r.style)!==null&&n!==void 0?n:"space",this.indentSize=(s=t==null||(i=t.indentation)===null||i===void 0?void 0:i.size)!==null&&s!==void 0?s:2,this.baseExtensions=t?.extensions||[],t?.markedOptions&&typeof this.markedInstance.setOptions=="function"&&this.markedInstance.setOptions(t.markedOptions),this.registry=new Map,this.nodeTypeRegistry=new Map,t?.extensions&&(this.baseExtensions=t.extensions,
|
|
61
|
+
`);return n.slice(0,n.length-1)}function Br(t,e){const n=[];return Array.from(t.entries()).forEach(([r,s])=>{if(!e){n.push(r);return}(e.marks||[]).find(i=>i.type===r&&V(i.attrs,s.attrs))||n.push(r)}),n}function Dr(t,e){const n=[];return Array.from(e.entries()).forEach(([r,s])=>{const i=t.get(r);(!i||!V(i.attrs,s.attrs))&&n.push({type:r,mark:s})}),n}function Fr(t,e,n,r){const s=!n,i=n&&(!n.marks||n.marks.length===0),a=n&&n.marks&&!r(e,new Map(n.marks.map(o=>[o.type,o]))),l=[];return(s||i||a)&&(n&&n.marks?Array.from(t.entries()).reverse().forEach(([o,u])=>{n.marks.find(c=>c.type===o&&V(c.attrs,u.attrs))||l.push(o)}):(s||i)&&l.push(...Array.from(t.keys()).reverse())),l}function qr(t,e){let n="";return Array.from(t.keys()).reverse().forEach(r=>{const s=e(r,t.get(r));s&&(n=s+n)}),t.clear(),n}function Wr(t,e,n){let r="";return Array.from(t.entries()).forEach(([s,i])=>{const a=n(s,i);a&&(r+=a),e.set(s,i)}),r}function ce(t){const e=(t.raw||t.text||"").match(/^(\s*)[-+*]\s+\[([ xX])\]\s+/);return e?{isTask:!0,checked:e[2].toLowerCase()==="x",indentLevel:e[1].length}:{isTask:!1,indentLevel:0}}function X(t,e){return typeof t!="string"?"json":e}const Ur=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","menu","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","search","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","circle","clippath","defs","ellipse","foreignobject","g","image","line","lineargradient","mask","path","polygon","polyline","radialgradient","rect","stop","switch","symbol","textpath","tspan","use","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"]),Gr=/<\/?([a-zA-Z][\w-]*)/g;function Zr(t){const e=[];let n;for(;(n=Gr.exec(t))!==null;)e.push(n[1].toLowerCase());return e}function Vr(t){const e=t.toLowerCase();return e.includes("-")?!1:!Ur.has(e)}function Kr(t,e){return Zr(t).some(n=>Vr(n)?!e.has(n):!1)}var qe=class{constructor(t){var e,n,r,s,i;this.activeParseLexer=null,this.extensionRanks=new Map,this.baseExtensions=[],this.extensions=[],this.codeTypes=new Set,this.schemaParseDomTagsCache=null,this.inlineNodeTypesCache=null,this.lastParseResult=null,this.markedInstance=(e=t?.marked)!==null&&e!==void 0?e:S,this.indentStyle=(n=t==null||(r=t.indentation)===null||r===void 0?void 0:r.style)!==null&&n!==void 0?n:"space",this.indentSize=(s=t==null||(i=t.indentation)===null||i===void 0?void 0:i.size)!==null&&s!==void 0?s:2,this.baseExtensions=t?.extensions||[],t?.markedOptions&&typeof this.markedInstance.setOptions=="function"&&this.markedInstance.setOptions(t.markedOptions),this.registry=new Map,this.nodeTypeRegistry=new Map,t?.extensions&&(this.baseExtensions=t.extensions,It(zt(t.extensions)).forEach(a=>this.registerExtension(a)))}get instance(){return this.markedInstance}get indentCharacter(){return this.indentStyle==="space"?" ":" "}get indentString(){return this.indentCharacter.repeat(this.indentSize)}hasMarked(){return!!this.markedInstance}registerExtension(t){var e,n;this.extensions.push(t);const r=et(N(t,"code")),s=t.name;r&&this.codeTypes.add(s),this.extensionRanks.has(s)||this.extensionRanks.set(s,this.extensionRanks.size);const i=N(t,"markdownTokenName")||s,a=N(t,"parseMarkdown"),l=N(t,"renderMarkdown"),o=N(t,"markdownTokenizer"),u=(e=N(t,"markdownOptions"))!==null&&e!==void 0?e:null,c={tokenName:i,nodeName:s,parseMarkdown:a,renderMarkdown:l,isIndenting:(n=u?.indentsContent)!==null&&n!==void 0?n:!1,htmlReopen:u?.htmlReopen,tokenizer:o};if(i&&a){const h=this.registry.get(i)||[];h.push(c),this.registry.set(i,h)}if(l){const h=this.nodeTypeRegistry.get(s)||[];h.push(c),this.nodeTypeRegistry.set(s,h)}o&&this.hasMarked()&&this.registerTokenizer(o)}createLexer(){return new this.markedInstance.Lexer(this.markedInstance.defaults)}createTokenizerHelpers(t){return{inlineTokens:e=>t.inlineTokens(e),blockTokens:e=>t.blockTokens(e)}}tokenizeInline(t){var e;return((e=this.activeParseLexer)!==null&&e!==void 0?e:this.createLexer()).inlineTokens(t)}registerTokenizer(t){if(!this.hasMarked())return;const{name:e,start:n,level:r="inline",tokenize:s}=t,i=this.createTokenizerHelpers.bind(this),a=this.createLexer.bind(this);let l;n?l=typeof n=="function"?n:u=>u.indexOf(n):l=u=>{const c=s(u,[],this.createTokenizerHelpers(this.createLexer()));return c&&c.raw?u.indexOf(c.raw):-1};const o={name:e,level:r,start:l,tokenizer(u,c){const h=this.lexer?i(this.lexer):i(a()),d=s(u,c,h);if(d&&d.type)return{...d,type:d.type||e,raw:d.raw||"",tokens:d.tokens||[]}},childTokens:[]};this.markedInstance.use({extensions:[o]})}getHandlersForToken(t){try{return this.registry.get(t)||[]}catch{return[]}}getHandlerForToken(t){const e=this.getHandlersForToken(t);if(e.length>0)return e[0];const n=this.getHandlersForNodeType(t);return n.length>0?n[0]:void 0}getHandlersForNodeType(t){try{return this.nodeTypeRegistry.get(t)||[]}catch{return[]}}serialize(t){if(!t)return"";const e=this.renderNodes(t,t);return this.isEmptyOutput(e)?"":e}isEmptyOutput(t){return!t||t.trim()===""?!0:t.replace(/ /g,"").replace(/\u00A0/g,"").trim()===""}parse(t){if(!this.hasMarked())throw new Error("No marked instance available for parsing");const e=this.activeParseLexer,n=this.createLexer();this.activeParseLexer=n;try{const r=n.lex(t);return{type:"doc",content:this.parseTokens(r,!0)}}finally{this.activeParseLexer=e}}parseTokens(t,e=!1){const n=e?Nr(t):t,r=n.reduce((a,l,o)=>(l.type!=="space"&&a.push(o),a),[]);let s=-1,i=0;return n.flatMap((a,l)=>{for(;i<r.length&&r[i]<l;)s=r[i],i+=1;if(e&&a.type==="space"){var o;const c=(o=r[i])!==null&&o!==void 0?o:-1;return this.createImplicitEmptyParagraphsFromSpace(a,s,c)}const u=this.parseToken(a,e);return u===null?[]:Array.isArray(u)?u:[u]})}createImplicitEmptyParagraphsFromSpace(t,e,n){const r=this.countParagraphSeparators(t.raw||"");if(r===0)return[];const s=Math.max(r-(e===-1||n===-1?0:1),0);return Array.from({length:s},()=>({type:"paragraph",content:[]}))}countParagraphSeparators(t){return(t.replace(/\r\n/g,`
|
|
62
62
|
`).match(/\n\n/g)||[]).length}parseToken(t,e=!1){if(!t.type)return null;if(t.type==="list")return this.parseListToken(t);const n=this.getHandlersForToken(t.type),r=this.createParseHelpers();if(n.find(s=>{if(!s.parseMarkdown)return!1;const i=s.parseMarkdown(t,r),a=this.normalizeParseResult(i);return a&&(!Array.isArray(a)||a.length>0)?(this.lastParseResult=a,!0):!1})&&this.lastParseResult){const s=this.lastParseResult;return this.lastParseResult=null,s}return this.parseFallbackToken(t,e)}parseListToken(t){if(!t.items||t.items.length===0)return this.parseTokenWithHandlers(t);const e=t.items.some(l=>ce(l).isTask),n=t.items.some(l=>!ce(l).isTask);if(!e||!n||this.getHandlersForToken("taskList").length===0)return this.parseTokenWithHandlers(t);const r=[];let s=[],i=null;for(let l=0;l<t.items.length;l+=1){const o=t.items[l],{isTask:u,checked:c,indentLevel:h}=ce(o);let d=o;if(u){const p=(o.raw||o.text||"").split(`
|
|
63
63
|
`),g=p[0].match(/^\s*[-+*]\s+\[([ xX])\]\s+(.*)$/),m=g?g[2]:"";let k=[];if(p.length>1&&p.slice(1).join(`
|
|
64
64
|
`).trim()){const w=p.slice(1),y=w.filter(T=>T.trim());if(y.length>0){const T=Math.min(...y.map(v=>v.length-v.trimStart().length)),x=w.map(v=>v.trim()?v.slice(T):"").join(`
|
|
65
65
|
`).trim();x&&(k=this.markedInstance.lexer(`${x}
|
|
66
|
-
`))}}d={type:"taskItem",raw:"",mainContent:m,indentLevel:h,checked:c??!1,text:m,tokens:this.tokenizeInline(m),nestedTokens:k}}const f=u?"taskList":"list";i!==f?(s.length>0&&r.push({type:i,items:s}),s=[d],i=f):s.push(d)}s.length>0&&r.push({type:i,items:s});const a=[];for(let l=0;l<r.length;l+=1){const o=r[l],u={...t,type:o.type,items:o.items},c=this.parseToken(u);c&&(Array.isArray(c)?a.push(...c):a.push(c))}return a.length>0?a:null}parseTokenWithHandlers(t){if(!t.type)return null;const e=this.getHandlersForToken(t.type),n=this.createParseHelpers();if(e.find(r=>{if(!r.parseMarkdown)return!1;const s=r.parseMarkdown(t,n),i=this.normalizeParseResult(s);return i&&(!Array.isArray(i)||i.length>0)?(this.lastParseResult=i,!0):!1})&&this.lastParseResult){const r=this.lastParseResult;return this.lastParseResult=null,r}return this.parseFallbackToken(t)}createParseHelpers(){return{parseInline:t=>this.parseInlineTokens(t),tokenizeInline:t=>this.tokenizeInline(t),parseChildren:t=>this.parseTokens(t),parseBlockChildren:t=>this.parseTokens(t,!0),createTextNode:(t,e)=>({type:"text",text:t,marks:e||void 0}),createNode:(t,e,n)=>{const r={type:t,attrs:e||void 0,content:n||void 0};return(!e||Object.keys(e).length===0)&&delete r.attrs,r},applyMark:(t,e,n)=>({mark:t,content:e,attrs:n&&Object.keys(n).length>0?n:void 0})}}escapeRegex(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}parseInlineTokens(t){const e=[];for(let a=0;a<t.length;a+=1){const l=t[a];if(l.type==="text")e.push({type:"text",text:Ee(l.text||"")});else if(l.type==="escape")e.push({type:"text",text:l.text||""});else if(l.type==="html"){var n,r;const o=((n=(r=l.raw)!==null&&r!==void 0?r:l.text)!==null&&n!==void 0?n:"").toString(),u=/^<\/[\s]*[\w-]+/i.test(o),c=o.match(/^<[\s]*([\w-]+)(\s|>|\/|$)/i);if(!u&&c&&!/\/>$/.test(o)){const d=c[1],f=this.escapeRegex(d),p=new RegExp(`^<\\/\\s*${f}\\b`,"i");let g=-1;const m=[o];for(let k=a+1;k<t.length;k+=1){var s,i;const w=t[k],y=((s=(i=w.raw)!==null&&i!==void 0?i:w.text)!==null&&s!==void 0?s:"").toString();if(m.push(y),w.type==="html"&&p.test(y)){g=k;break}}if(g!==-1){const k=m.join(""),w={type:"html",raw:k,text:k,block:!1},y=this.parseHTMLToken(w);if(y){const T=this.normalizeParseResult(y);Array.isArray(T)?e.push(...T):T&&e.push(T)}a=g;continue}}const h=this.parseHTMLToken(l);if(h){const d=this.normalizeParseResult(h);Array.isArray(d)?e.push(...d):d&&e.push(d)}}else if(l.type){const o=this.getHandlerForToken(l.type);if(o&&o.parseMarkdown){const u=this.createParseHelpers(),c=o.parseMarkdown(l,u);if(this.isMarkResult(c)){const h=this.applyMarkToContent(c.mark,c.content,c.attrs);e.push(...h)}else{const h=this.normalizeParseResult(c);Array.isArray(h)?e.push(...h):h&&e.push(h)}}else l.tokens&&e.push(...this.parseInlineTokens(l.tokens))}}for(let a=e.length-1;a>0;a-=1){const l=e[a],o=e[a-1];if(l.type==="text"&&o.type==="text"){const u=l.marks||[],c=o.marks||[];It(u,c)&&(o.text=(o.text||"")+(l.text||""),e.splice(a,1))}}return e}applyMarkToContent(t,e,n){return e.map(r=>{if(r.type==="text"){const s=r.marks||[],i=n?{type:t,attrs:n}:{type:t};return{...r,marks:[...s,i]}}return{...r,content:r.content?this.applyMarkToContent(t,r.content,n):void 0}})}isMarkResult(t){return t&&typeof t=="object"&&"mark"in t}normalizeParseResult(t){return t?this.isMarkResult(t)?t.content:t:null}parseFallbackToken(t,e=!1){switch(t.type){case"paragraph":return{type:"paragraph",content:t.tokens?this.parseInlineTokens(t.tokens):[]};case"heading":return{type:"heading",attrs:{level:t.depth||1},content:t.tokens?this.parseInlineTokens(t.tokens):[]};case"text":return{type:"text",text:Ee(t.text||"")};case"html":return this.parseHTMLToken(t);case"escape":return{type:"text",text:t.text||""};case"space":return null;default:return t.tokens?this.parseTokens(t.tokens,e):null}}parseHTMLToken(t){const e=t.text||t.raw||"";if(!e.trim())return null;if(this.isUnrecognizedHtml(e))return this.htmlAsLiteralText(e,!!t.block);if(typeof window>"u"||typeof window.DOMParser>"u")return this.htmlAsLiteralText(e,!!t.block);try{const n=zt(e,this.baseExtensions);if(n.type==="doc"&&n.content){if(t.block)return n.content;const r=this.toInlineContent(n.content);return r.length>0?r:null}return n}catch(n){throw new Error(`Failed to parse HTML in markdown: ${n}`)}}toInlineContent(t){const e=this.getInlineNodeTypes();return t.flatMap(n=>n.type&&e.has(n.type)?[n]:n.content?this.toInlineContent(n.content):[])}getInlineNodeTypes(){if(this.inlineNodeTypesCache)return this.inlineNodeTypesCache;const t=new Set(["text"]);try{const e=$e(this.baseExtensions);Object.values(e.nodes).forEach(n=>{n.isInline&&t.add(n.name)})}catch{}return this.inlineNodeTypesCache=t,t}isUnrecognizedHtml(t){return Kr(t,this.getSchemaParseDomTags())}getSchemaParseDomTags(){if(this.schemaParseDomTagsCache)return this.schemaParseDomTagsCache;const t=new Set;try{const e=$e(this.baseExtensions),n=r=>{const s=r?.parseDOM;Array.isArray(s)&&s.forEach(i=>{if(typeof i?.tag=="string"){const a=i.tag.match(/^[a-zA-Z][\w-]*/);a&&t.add(a[0].toLowerCase())}})};Object.values(e.nodes).forEach(r=>n(r.spec)),Object.values(e.marks).forEach(r=>n(r.spec))}catch{}return this.schemaParseDomTagsCache=t,t}htmlAsLiteralText(t,e){const n=t.replace(/\s+$/,"");return n?e?{type:"paragraph",content:[{type:"text",text:n}]}:{type:"text",text:n}:null}encodeTextForMarkdown(t,e,n){return n?.type!=null&&this.codeTypes.has(n.type)||(e.marks||[]).some(r=>this.codeTypes.has(typeof r=="string"?r:r.type))?t:this.escapeMarkdownSyntax(Pt(t))}escapeMarkdownSyntax(t){return t.replace(/([\\`*_[\]~])/g,"\\$1")}renderNodeToMarkdown(t,e,n=0,r=0,s={}){var i;if(t.type==="text")return this.encodeTextForMarkdown(t.text||"",t,e);if(!t.type)return"";const a=this.getHandlerForToken(t.type);if(!a)return"";const l=Array.isArray(e?.content)&&n>0?e.content[n-1]:void 0,o={renderChildren:(c,h)=>{const d=a.isIndenting?r+1:r;return!Array.isArray(c)&&c.content?this.renderNodes(c.content,t,h||"",n,d):this.renderNodes(c,t,h||"",n,d)},renderChild:(c,h)=>{const d=a.isIndenting?r+1:r;return this.renderNodeToMarkdown(c,t,h,d)},indent:c=>this.indentString+c,wrapInBlock:Or},u={index:n,level:r,parentType:e?.type,previousNode:l,meta:{parentAttrs:e?.attrs,...s}};return((i=a.renderMarkdown)===null||i===void 0?void 0:i.call(a,t,o,u))||""}renderNodes(t,e,n="",r=0,s=0){return Array.isArray(t)?this.renderNodesWithMarkBoundaries(t,e,n,s):t.type?this.renderNodeToMarkdown(t,e,r,s):""}renderNodesWithMarkBoundaries(t,e,n="",r=0){const s=[],i=new Map,a=new Set,l=new Map;return t.forEach((o,u)=>{const c=u<t.length-1?t[u+1]:null;if(o.type)if(o.type==="text"){let h=this.encodeTextForMarkdown(o.text||"",o,e);const d=new Map((o.marks||[]).map(x=>[x.type,x])),f=this.getMarksToOpenForSerialization(i,d,c),p=Br(d,c),g=p.filter(x=>i.has(x)),m=g.length>0&&f.length>0;let k="";if(p.length>0&&!m){const x=h.match(/(\s+)$/);x&&(k=x[1],h=h.slice(0,-k.length))}m||p.slice().reverse().forEach(x=>{if(!i.has(x))return;const v=d.get(x),M=this.getMarkClosing(x,v,l.get(x));M&&(h+=M),i.has(x)&&(i.delete(x),l.delete(x))});let w="";if(f.length>0){const x=h.match(/^(\s+)/);x&&(w=x[1],h=h.slice(w.length))}f.forEach(({type:x,mark:v})=>{const M=a.has(x)?"html":"markdown",C=this.getMarkOpening(x,v,M);C&&(h=C+h),l.set(x,M),a.delete(x)}),m||f.slice().reverse().forEach(({type:x,mark:v})=>{i.set(x,v)}),h=w+h;let y;if(m){const x=new Set((c?.marks||[]).map(C=>C.type));f.forEach(({type:C})=>{x.has(C)&&this.getHtmlReopenTags(C)&&a.add(C)});const v=Array.from(i.keys()),M=g.slice().sort((C,Tt)=>v.indexOf(Tt)-v.indexOf(C));y=[...f.map(C=>C.type),...M]}else y=Fr(i,d,c,this.markSetsEqual.bind(this));let T="";if(y.length>0){const x=h.match(/(\s+)$/);x&&(T=x[1],h=h.slice(0,-T.length))}y.forEach(x=>{var v;const M=(v=i.get(x))!==null&&v!==void 0?v:d.get(x),C=this.getMarkClosing(x,M,l.get(x));C&&(h+=C),i.delete(x),l.delete(x)}),h+=T,h+=k,s.push(h)}else{const h=new Set((o.marks||[]).map(k=>k.type)),d=new Map,f=new Map;i.forEach((k,w)=>{if(h.has(w)){var y;d.set(w,k),f.set(w,(y=l.get(w))!==null&&y!==void 0?y:"markdown")}});const p=qr(i,(k,w)=>this.getMarkClosing(k,w,l.get(k)));l.clear();const g=this.renderNodeToMarkdown(o,e,u,r),m=o.type==="hardBreak"?"":Wr(d,i,(k,w)=>{var y;const T=(y=f.get(k))!==null&&y!==void 0?y:"markdown";return l.set(k,T),this.getMarkOpening(k,w,T)});s.push(p+g+m)}}),s.join(n)}getMarkOpening(t,e,n="markdown"){if(n==="html"){var r;return((r=this.getHtmlReopenTags(t))===null||r===void 0?void 0:r.open)||""}const s=this.getHandlersForNodeType(t),i=s.length>0?s[0]:void 0;if(!i||!i.renderMarkdown)return"";const a="__TIPTAP_MARKDOWN_PLACEHOLDER__",l={type:t,attrs:e.attrs||{},content:[{type:"text",text:a}]};try{const o=i.renderMarkdown(l,{renderChildren:()=>a,renderChild:()=>a,indent:c=>c,wrapInBlock:(c,h)=>c+h},{index:0,level:0,parentType:"text",meta:{}}),u=o.indexOf(a);return u>=0?o.substring(0,u):""}catch(o){throw new Error(`Failed to get mark opening for ${t}: ${o}`)}}getMarkClosing(t,e,n="markdown"){if(n==="html"){var r;return((r=this.getHtmlReopenTags(t))===null||r===void 0?void 0:r.close)||""}const s=this.getHandlersForNodeType(t),i=s.length>0?s[0]:void 0;if(!i||!i.renderMarkdown)return"";const a="__TIPTAP_MARKDOWN_PLACEHOLDER__",l={type:t,attrs:e.attrs||{},content:[{type:"text",text:a}]};try{const o=i.renderMarkdown(l,{renderChildren:()=>a,renderChild:()=>a,indent:h=>h,wrapInBlock:(h,d)=>h+d},{index:0,level:0,parentType:"text",meta:{}}),u=o.indexOf(a),c=u+33;return u>=0?o.substring(c):""}catch(o){throw new Error(`Failed to get mark closing for ${t}: ${o}`)}}getHtmlReopenTags(t){const e=this.getHandlersForNodeType(t),n=e.length>0?e[0]:void 0;return n?.htmlReopen}markSetsEqual(t,e){return t.size!==e.size?!1:Array.from(t.entries()).every(([n,r])=>{const s=e.get(n);return s&&V(r.attrs,s.attrs)})}getMarksToOpenForSerialization(t,e,n){const r=Dr(t,e);if(r.length<=1)return r;const s=n?.marks||[],i=(u,c)=>s.some(h=>h.type===u&&V(h.attrs,c)),a=(u,c)=>{var h,d;const f=(h=this.extensionRanks.get(u.type))!==null&&h!==void 0?h:Number.MAX_SAFE_INTEGER,p=(d=this.extensionRanks.get(c.type))!==null&&d!==void 0?d:Number.MAX_SAFE_INTEGER;return f!==p?p-f:u.type.localeCompare(c.type)},l=r.filter(u=>!i(u.type,u.mark.attrs)).sort(a),o=r.filter(u=>i(u.type,u.mark.attrs)).sort(a);return[...l,...o]}};const Qr=ie.create({name:"markdown",addOptions(){return{indentation:{style:"space",size:2},marked:void 0,markedOptions:{}}},addCommands(){return{setContent:(t,e)=>{if(!e?.contentType)return P.setContent(t,e);if(X(t,e?.contentType)!=="markdown"||!this.editor.markdown)return P.setContent(t,e);const n=this.editor.markdown.parse(t);return P.setContent(n,e)},insertContent:(t,e)=>{if(!e?.contentType)return P.insertContent(t,e);if(X(t,e?.contentType)!=="markdown"||!this.editor.markdown)return P.insertContent(t,e);const n=this.editor.markdown.parse(t);return P.insertContent(n,e)},insertContentAt:(t,e,n)=>{if(!n?.contentType)return P.insertContentAt(t,e,n);if(X(e,n?.contentType)!=="markdown"||!this.editor.markdown)return P.insertContentAt(t,e,n);const r=this.editor.markdown.parse(e);return P.insertContentAt(t,r,n)}}},addStorage(){return{manager:new qe({indentation:this.options.indentation,marked:this.options.marked,markedOptions:this.options.markedOptions,extensions:[]})}},onBeforeCreate(){var t;if(this.editor.markdown){console.error("[tiptap][markdown]: There is already a `markdown` property on the editor instance. This might lead to unexpected behavior.");return}if(this.storage.manager=new qe({indentation:this.options.indentation,marked:this.options.marked,markedOptions:this.options.markedOptions,extensions:this.editor.extensionManager.baseExtensions}),this.editor.markdown=this.storage.manager,this.editor.getMarkdown=()=>this.storage.manager.serialize(this.editor.getJSON()),!this.editor.options.contentType||X(this.editor.options.content,this.editor.options.contentType)!=="markdown")return;if(!this.editor.markdown)throw new Error('[tiptap][markdown]: The `contentType` option is set to "markdown", but the Markdown extension is not added to the editor. Please add the Markdown extension to use this feature.');if(this.editor.options.content===void 0||typeof this.editor.options.content!="string")throw new Error('[tiptap][markdown]: The `contentType` option is set to "markdown", but the initial content is not a string. Please provide the initial content as a markdown string.');const e=this.editor.markdown.parse(this.editor.options.content);!((t=e.content)===null||t===void 0)&&t.length&&(this.editor.options.content=e)}});function se(t){return t==="left"||t==="right"||t==="center"?t:null}function Xr(t){const e=(t.style.textAlign||"").trim().toLowerCase(),n=(t.getAttribute("align")||"").trim().toLowerCase();return se(e||n)}function Jr(t){return se(t?.align)}function kt(){return{default:null,parseHTML:t=>Xr(t),renderHTML:t=>t.align?{style:`text-align: ${t.align}`}:{}}}function Yr(t){var e;const n=t.parentElement,r=t.closest("table");if(!n||!r)return null;const s=Array.from(n.children).indexOf(t),i=(e=r.querySelectorAll("colgroup > col")[s])===null||e===void 0?void 0:e.getAttribute("width");return i?[parseInt(i,10)]:null}function xt(t){const e=t.getAttribute("colwidth");return e?e.split(",").map(n=>parseInt(n,10)):Yr(t)}const es=/[ \t\r\n\f]+/g;function bt(t){var e;return t.children.length>0?!1:((e=t.textContent)!==null&&e!==void 0?e:"").replace(es,"")===""}function wt(t){const e=t.createAndFill();if(!e)throw new Error(`[tiptap error]: "${t.name}" has no default content to backfill.`);return e.content}const ts=D.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:xt},align:kt()}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td",getAttrs:t=>bt(t)?{}:!1,getContent:(t,e)=>wt(e.nodes[this.name])},{tag:"td"}]},renderHTML({HTMLAttributes:t}){return["td",H(this.options.HTMLAttributes,t),0]}}),ns=D.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:xt},align:kt()}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th",getAttrs:t=>bt(t)?{}:!1,getContent:(t,e)=>wt(e.nodes[this.name])},{tag:"th"}]},renderHTML({HTMLAttributes:t}){return["th",H(this.options.HTMLAttributes,t),0]}}),rs=D.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:t}){return["tr",H(this.options.HTMLAttributes,t),0]}});function ge(t,e){return e?["width",`${Math.max(e,t)}px`]:["min-width",`${t}px`]}function We(t,e,n,r,s,i){let a=0,l=!0,o=e.firstChild;const u=t.firstChild;if(u!==null)for(let d=0,f=0;d<u.childCount;d+=1){const{colspan:p,colwidth:g}=u.child(d).attrs;for(let m=0;m<p;m+=1,f+=1){const k=s===f?i:g&&g[m],w=k?`${k}px`:"";if(a+=k||r,k||(l=!1),o){if(o.style.width!==w){const[y,T]=ge(r,k);o.style.setProperty(y,T)}o=o.nextSibling}else{const y=document.createElement("col"),[T,x]=ge(r,k);y.style.setProperty(T,x),e.appendChild(y)}}}for(;o;){var c;const d=o.nextSibling;(c=o.parentNode)===null||c===void 0||c.removeChild(o),o=d}const h=t.attrs.style&&typeof t.attrs.style=="string"&&/\bwidth\s*:/i.test(t.attrs.style);l&&!h?(n.style.width=`${a}px`,n.style.minWidth=""):(n.style.width="",n.style.minWidth=`${a}px`)}var ss=class{constructor(t,e,n,r={}){this.node=t,this.cellMinWidth=e,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table"));for(const[s,i]of Object.entries(r))i!=null&&(s==="style"?this.table.style.cssText=String(i):this.table.setAttribute(s,String(i)));t.attrs.style&&(this.table.style.cssText=t.attrs.style),this.colgroup=this.table.appendChild(document.createElement("colgroup")),We(t,this.colgroup,this.table,e),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(t){return t.type!==this.node.type?!1:(this.node=t,We(t,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(t){const e=t.target,n=this.dom.contains(e),r=this.contentDOM.contains(e);return!!(n&&!r&&(t.type==="attributes"||t.type==="childList"||t.type==="characterData"))}};function is(t,e,n,r){let s=0,i=!0;const a=[],l=t.firstChild;if(!l)return{};for(let c=0,h=0;c<l.childCount;c+=1){const{colspan:d,colwidth:f}=l.child(c).attrs;for(let p=0;p<d;p+=1,h+=1){const g=n===h?r:f&&f[p];s+=g||e,g||(i=!1);const[m,k]=ge(e,g);a.push(["col",{style:`${m}: ${k}`}])}}const o=i?`${s}px`:"",u=i?"":`${s}px`;return{colgroup:["colgroup",{},...a],tableWidth:o,tableMinWidth:u}}function Ue(t,e){return t.createAndFill()}function as(t){if(t.cached.tableNodeTypes)return t.cached.tableNodeTypes;const e={};return Object.keys(t.nodes).forEach(n=>{const r=t.nodes[n];r.spec.tableRole&&(e[r.spec.tableRole]=r)}),t.cached.tableNodeTypes=e,e}function os(t,e,n,r,s){const i=as(t),a=[],l=[];for(let u=0;u<n;u+=1){const c=Ue(i.cell);if(c&&l.push(c),r){const h=Ue(i.header_cell);h&&a.push(h)}}const o=[];for(let u=0;u<e;u+=1)o.push(i.row.createChecked(null,r&&u===0?a:l));return i.table.createChecked(null,o)}function ls(t){return t instanceof rt}const J=({editor:t})=>{const{selection:e}=t.state;if(!ls(e))return!1;let n=0;const r=Y(e.ranges[0].$from,s=>s.type.name==="table");return r?.node.descendants(s=>{if(s.type.name==="table")return!1;["tableCell","tableHeader"].includes(s.type.name)&&(n+=1)}),n!==e.ranges.length?!1:(t.commands.deleteTable(),!0)};function Ge(t,e){const n=t.mapping.map(e),r=Y(t.selection.$from,a=>a.type.name==="table");if(r?.pos===n)return;const s=t.doc.nodeAt(n);if(!s)return;const i=n+s.nodeSize-1;t.setSelection(tt.near(t.doc.resolve(i),-1))}function cs(t){let e="",n=0;for(;n<t.length;){if(t[n]==="\\"&&n+1<t.length){e+=t[n]+t[n+1],n+=2;continue}if(t[n]!=="`"){e+=t[n++];continue}let r=0;for(;n+r<t.length&&t[n+r]==="`";)r+=1;let s=n+r,i=!1;for(;s<t.length;){if(t[s]!=="`"){s+=1;continue}let a=0;for(;s+a<t.length&&t[s+a]==="`";)a+=1;if(a===r){const l=t.slice(n+r,s);e+=t.slice(n,n+r)+l.replace(/\\\||\|/g,o=>o==="|"?"\\|":o)+t.slice(s,s+r),n=s+r,i=!0;break}s+=a}i||(e+=t.slice(n,n+r),n+=r)}return e}function us(t){return t.split(`
|
|
66
|
+
`))}}d={type:"taskItem",raw:"",mainContent:m,indentLevel:h,checked:c??!1,text:m,tokens:this.tokenizeInline(m),nestedTokens:k}}const f=u?"taskList":"list";i!==f?(s.length>0&&r.push({type:i,items:s}),s=[d],i=f):s.push(d)}s.length>0&&r.push({type:i,items:s});const a=[];for(let l=0;l<r.length;l+=1){const o=r[l],u={...t,type:o.type,items:o.items},c=this.parseToken(u);c&&(Array.isArray(c)?a.push(...c):a.push(c))}return a.length>0?a:null}parseTokenWithHandlers(t){if(!t.type)return null;const e=this.getHandlersForToken(t.type),n=this.createParseHelpers();if(e.find(r=>{if(!r.parseMarkdown)return!1;const s=r.parseMarkdown(t,n),i=this.normalizeParseResult(s);return i&&(!Array.isArray(i)||i.length>0)?(this.lastParseResult=i,!0):!1})&&this.lastParseResult){const r=this.lastParseResult;return this.lastParseResult=null,r}return this.parseFallbackToken(t)}createParseHelpers(){return{parseInline:t=>this.parseInlineTokens(t),tokenizeInline:t=>this.tokenizeInline(t),parseChildren:t=>this.parseTokens(t),parseBlockChildren:t=>this.parseTokens(t,!0),createTextNode:(t,e)=>({type:"text",text:t,marks:e||void 0}),createNode:(t,e,n)=>{const r={type:t,attrs:e||void 0,content:n||void 0};return(!e||Object.keys(e).length===0)&&delete r.attrs,r},applyMark:(t,e,n)=>({mark:t,content:e,attrs:n&&Object.keys(n).length>0?n:void 0})}}escapeRegex(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}parseInlineTokens(t){const e=[];for(let a=0;a<t.length;a+=1){const l=t[a];if(l.type==="text")e.push({type:"text",text:Ee(l.text||"")});else if(l.type==="escape")e.push({type:"text",text:l.text||""});else if(l.type==="html"){var n,r;const o=((n=(r=l.raw)!==null&&r!==void 0?r:l.text)!==null&&n!==void 0?n:"").toString(),u=/^<\/[\s]*[\w-]+/i.test(o),c=o.match(/^<[\s]*([\w-]+)(\s|>|\/|$)/i);if(!u&&c&&!/\/>$/.test(o)){const d=c[1],f=this.escapeRegex(d),p=new RegExp(`^<\\/\\s*${f}\\b`,"i");let g=-1;const m=[o];for(let k=a+1;k<t.length;k+=1){var s,i;const w=t[k],y=((s=(i=w.raw)!==null&&i!==void 0?i:w.text)!==null&&s!==void 0?s:"").toString();if(m.push(y),w.type==="html"&&p.test(y)){g=k;break}}if(g!==-1){const k=m.join(""),w={type:"html",raw:k,text:k,block:!1},y=this.parseHTMLToken(w);if(y){const T=this.normalizeParseResult(y);Array.isArray(T)?e.push(...T):T&&e.push(T)}a=g;continue}}const h=this.parseHTMLToken(l);if(h){const d=this.normalizeParseResult(h);Array.isArray(d)?e.push(...d):d&&e.push(d)}}else if(l.type){const o=this.getHandlerForToken(l.type);if(o&&o.parseMarkdown){const u=this.createParseHelpers(),c=o.parseMarkdown(l,u);if(this.isMarkResult(c)){const h=this.applyMarkToContent(c.mark,c.content,c.attrs);e.push(...h)}else{const h=this.normalizeParseResult(c);Array.isArray(h)?e.push(...h):h&&e.push(h)}}else l.tokens&&e.push(...this.parseInlineTokens(l.tokens))}}for(let a=e.length-1;a>0;a-=1){const l=e[a],o=e[a-1];if(l.type==="text"&&o.type==="text"){const u=l.marks||[],c=o.marks||[];Pt(u,c)&&(o.text=(o.text||"")+(l.text||""),e.splice(a,1))}}return e}applyMarkToContent(t,e,n){return e.map(r=>{if(r.type==="text"){const s=r.marks||[],i=n?{type:t,attrs:n}:{type:t};return{...r,marks:[...s,i]}}return{...r,content:r.content?this.applyMarkToContent(t,r.content,n):void 0}})}isMarkResult(t){return t&&typeof t=="object"&&"mark"in t}normalizeParseResult(t){return t?this.isMarkResult(t)?t.content:t:null}parseFallbackToken(t,e=!1){switch(t.type){case"paragraph":return{type:"paragraph",content:t.tokens?this.parseInlineTokens(t.tokens):[]};case"heading":return{type:"heading",attrs:{level:t.depth||1},content:t.tokens?this.parseInlineTokens(t.tokens):[]};case"text":return{type:"text",text:Ee(t.text||"")};case"html":return this.parseHTMLToken(t);case"escape":return{type:"text",text:t.text||""};case"space":return null;default:return t.tokens?this.parseTokens(t.tokens,e):null}}parseHTMLToken(t){const e=t.text||t.raw||"";if(!e.trim())return null;if(this.isUnrecognizedHtml(e))return this.htmlAsLiteralText(e,!!t.block);if(typeof window>"u"||typeof window.DOMParser>"u")return this.htmlAsLiteralText(e,!!t.block);try{const n=Ht(e,this.baseExtensions);if(n.type==="doc"&&n.content){if(t.block)return n.content;const r=this.toInlineContent(n.content);return r.length>0?r:null}return n}catch(n){throw new Error(`Failed to parse HTML in markdown: ${n}`)}}toInlineContent(t){const e=this.getInlineNodeTypes();return t.flatMap(n=>n.type&&e.has(n.type)?[n]:n.content?this.toInlineContent(n.content):[])}getInlineNodeTypes(){if(this.inlineNodeTypesCache)return this.inlineNodeTypesCache;const t=new Set(["text"]);try{const e=$e(this.baseExtensions);Object.values(e.nodes).forEach(n=>{n.isInline&&t.add(n.name)})}catch{}return this.inlineNodeTypesCache=t,t}isUnrecognizedHtml(t){return Kr(t,this.getSchemaParseDomTags())}getSchemaParseDomTags(){if(this.schemaParseDomTagsCache)return this.schemaParseDomTagsCache;const t=new Set;try{const e=$e(this.baseExtensions),n=r=>{const s=r?.parseDOM;Array.isArray(s)&&s.forEach(i=>{if(typeof i?.tag=="string"){const a=i.tag.match(/^[a-zA-Z][\w-]*/);a&&t.add(a[0].toLowerCase())}})};Object.values(e.nodes).forEach(r=>n(r.spec)),Object.values(e.marks).forEach(r=>n(r.spec))}catch{}return this.schemaParseDomTagsCache=t,t}htmlAsLiteralText(t,e){const n=t.replace(/\s+$/,"");return n?e?{type:"paragraph",content:[{type:"text",text:n}]}:{type:"text",text:n}:null}encodeTextForMarkdown(t,e,n){return n?.type!=null&&this.codeTypes.has(n.type)||(e.marks||[]).some(r=>this.codeTypes.has(typeof r=="string"?r:r.type))?t:this.escapeMarkdownSyntax(jt(t))}escapeMarkdownSyntax(t){return t.replace(/([\\`*_[\]~])/g,"\\$1")}renderNodeToMarkdown(t,e,n=0,r=0,s={}){var i;if(t.type==="text")return this.encodeTextForMarkdown(t.text||"",t,e);if(!t.type)return"";const a=this.getHandlerForToken(t.type);if(!a)return"";const l=Array.isArray(e?.content)&&n>0?e.content[n-1]:void 0,o={renderChildren:(c,h)=>{const d=a.isIndenting?r+1:r;return!Array.isArray(c)&&c.content?this.renderNodes(c.content,t,h||"",n,d):this.renderNodes(c,t,h||"",n,d)},renderChild:(c,h)=>{const d=a.isIndenting?r+1:r;return this.renderNodeToMarkdown(c,t,h,d)},indent:c=>this.indentString+c,wrapInBlock:Or},u={index:n,level:r,parentType:e?.type,previousNode:l,meta:{parentAttrs:e?.attrs,...s}};return((i=a.renderMarkdown)===null||i===void 0?void 0:i.call(a,t,o,u))||""}renderNodes(t,e,n="",r=0,s=0){return Array.isArray(t)?this.renderNodesWithMarkBoundaries(t,e,n,s):t.type?this.renderNodeToMarkdown(t,e,r,s):""}renderNodesWithMarkBoundaries(t,e,n="",r=0){const s=[],i=new Map,a=new Set,l=new Map;return t.forEach((o,u)=>{const c=u<t.length-1?t[u+1]:null;if(o.type)if(o.type==="text"){let h=this.encodeTextForMarkdown(o.text||"",o,e);const d=new Map((o.marks||[]).map(x=>[x.type,x])),f=this.getMarksToOpenForSerialization(i,d,c),p=Br(d,c),g=p.filter(x=>i.has(x)),m=g.length>0&&f.length>0;let k="";if(p.length>0&&!m){const x=h.match(/(\s+)$/);x&&(k=x[1],h=h.slice(0,-k.length))}m||p.slice().reverse().forEach(x=>{if(!i.has(x))return;const v=d.get(x),M=this.getMarkClosing(x,v,l.get(x));M&&(h+=M),i.has(x)&&(i.delete(x),l.delete(x))});let w="";if(f.length>0){const x=h.match(/^(\s+)/);x&&(w=x[1],h=h.slice(w.length))}f.forEach(({type:x,mark:v})=>{const M=a.has(x)?"html":"markdown",C=this.getMarkOpening(x,v,M);C&&(h=C+h),l.set(x,M),a.delete(x)}),m||f.slice().reverse().forEach(({type:x,mark:v})=>{i.set(x,v)}),h=w+h;let y;if(m){const x=new Set((c?.marks||[]).map(C=>C.type));f.forEach(({type:C})=>{x.has(C)&&this.getHtmlReopenTags(C)&&a.add(C)});const v=Array.from(i.keys()),M=g.slice().sort((C,Tt)=>v.indexOf(Tt)-v.indexOf(C));y=[...f.map(C=>C.type),...M]}else y=Fr(i,d,c,this.markSetsEqual.bind(this));let T="";if(y.length>0){const x=h.match(/(\s+)$/);x&&(T=x[1],h=h.slice(0,-T.length))}y.forEach(x=>{var v;const M=(v=i.get(x))!==null&&v!==void 0?v:d.get(x),C=this.getMarkClosing(x,M,l.get(x));C&&(h+=C),i.delete(x),l.delete(x)}),h+=T,h+=k,s.push(h)}else{const h=new Set((o.marks||[]).map(k=>k.type)),d=new Map,f=new Map;i.forEach((k,w)=>{if(h.has(w)){var y;d.set(w,k),f.set(w,(y=l.get(w))!==null&&y!==void 0?y:"markdown")}});const p=qr(i,(k,w)=>this.getMarkClosing(k,w,l.get(k)));l.clear();const g=this.renderNodeToMarkdown(o,e,u,r),m=o.type==="hardBreak"?"":Wr(d,i,(k,w)=>{var y;const T=(y=f.get(k))!==null&&y!==void 0?y:"markdown";return l.set(k,T),this.getMarkOpening(k,w,T)});s.push(p+g+m)}}),s.join(n)}getMarkOpening(t,e,n="markdown"){if(n==="html"){var r;return((r=this.getHtmlReopenTags(t))===null||r===void 0?void 0:r.open)||""}const s=this.getHandlersForNodeType(t),i=s.length>0?s[0]:void 0;if(!i||!i.renderMarkdown)return"";const a="__TIPTAP_MARKDOWN_PLACEHOLDER__",l={type:t,attrs:e.attrs||{},content:[{type:"text",text:a}]};try{const o=i.renderMarkdown(l,{renderChildren:()=>a,renderChild:()=>a,indent:c=>c,wrapInBlock:(c,h)=>c+h},{index:0,level:0,parentType:"text",meta:{}}),u=o.indexOf(a);return u>=0?o.substring(0,u):""}catch(o){throw new Error(`Failed to get mark opening for ${t}: ${o}`)}}getMarkClosing(t,e,n="markdown"){if(n==="html"){var r;return((r=this.getHtmlReopenTags(t))===null||r===void 0?void 0:r.close)||""}const s=this.getHandlersForNodeType(t),i=s.length>0?s[0]:void 0;if(!i||!i.renderMarkdown)return"";const a="__TIPTAP_MARKDOWN_PLACEHOLDER__",l={type:t,attrs:e.attrs||{},content:[{type:"text",text:a}]};try{const o=i.renderMarkdown(l,{renderChildren:()=>a,renderChild:()=>a,indent:h=>h,wrapInBlock:(h,d)=>h+d},{index:0,level:0,parentType:"text",meta:{}}),u=o.indexOf(a),c=u+33;return u>=0?o.substring(c):""}catch(o){throw new Error(`Failed to get mark closing for ${t}: ${o}`)}}getHtmlReopenTags(t){const e=this.getHandlersForNodeType(t),n=e.length>0?e[0]:void 0;return n?.htmlReopen}markSetsEqual(t,e){return t.size!==e.size?!1:Array.from(t.entries()).every(([n,r])=>{const s=e.get(n);return s&&V(r.attrs,s.attrs)})}getMarksToOpenForSerialization(t,e,n){const r=Dr(t,e);if(r.length<=1)return r;const s=n?.marks||[],i=(u,c)=>s.some(h=>h.type===u&&V(h.attrs,c)),a=(u,c)=>{var h,d;const f=(h=this.extensionRanks.get(u.type))!==null&&h!==void 0?h:Number.MAX_SAFE_INTEGER,p=(d=this.extensionRanks.get(c.type))!==null&&d!==void 0?d:Number.MAX_SAFE_INTEGER;return f!==p?p-f:u.type.localeCompare(c.type)},l=r.filter(u=>!i(u.type,u.mark.attrs)).sort(a),o=r.filter(u=>i(u.type,u.mark.attrs)).sort(a);return[...l,...o]}};const Qr=ie.create({name:"markdown",addOptions(){return{indentation:{style:"space",size:2},marked:void 0,markedOptions:{}}},addCommands(){return{setContent:(t,e)=>{if(!e?.contentType)return P.setContent(t,e);if(X(t,e?.contentType)!=="markdown"||!this.editor.markdown)return P.setContent(t,e);const n=this.editor.markdown.parse(t);return P.setContent(n,e)},insertContent:(t,e)=>{if(!e?.contentType)return P.insertContent(t,e);if(X(t,e?.contentType)!=="markdown"||!this.editor.markdown)return P.insertContent(t,e);const n=this.editor.markdown.parse(t);return P.insertContent(n,e)},insertContentAt:(t,e,n)=>{if(!n?.contentType)return P.insertContentAt(t,e,n);if(X(e,n?.contentType)!=="markdown"||!this.editor.markdown)return P.insertContentAt(t,e,n);const r=this.editor.markdown.parse(e);return P.insertContentAt(t,r,n)}}},addStorage(){return{manager:new qe({indentation:this.options.indentation,marked:this.options.marked,markedOptions:this.options.markedOptions,extensions:[]})}},onBeforeCreate(){var t;if(this.editor.markdown){console.error("[tiptap][markdown]: There is already a `markdown` property on the editor instance. This might lead to unexpected behavior.");return}if(this.storage.manager=new qe({indentation:this.options.indentation,marked:this.options.marked,markedOptions:this.options.markedOptions,extensions:this.editor.extensionManager.baseExtensions}),this.editor.markdown=this.storage.manager,this.editor.getMarkdown=()=>this.storage.manager.serialize(this.editor.getJSON()),!this.editor.options.contentType||X(this.editor.options.content,this.editor.options.contentType)!=="markdown")return;if(!this.editor.markdown)throw new Error('[tiptap][markdown]: The `contentType` option is set to "markdown", but the Markdown extension is not added to the editor. Please add the Markdown extension to use this feature.');if(this.editor.options.content===void 0||typeof this.editor.options.content!="string")throw new Error('[tiptap][markdown]: The `contentType` option is set to "markdown", but the initial content is not a string. Please provide the initial content as a markdown string.');const e=this.editor.markdown.parse(this.editor.options.content);!((t=e.content)===null||t===void 0)&&t.length&&(this.editor.options.content=e)}});function se(t){return t==="left"||t==="right"||t==="center"?t:null}function Xr(t){const e=(t.style.textAlign||"").trim().toLowerCase(),n=(t.getAttribute("align")||"").trim().toLowerCase();return se(e||n)}function Jr(t){return se(t?.align)}function kt(){return{default:null,parseHTML:t=>Xr(t),renderHTML:t=>t.align?{style:`text-align: ${t.align}`}:{}}}function Yr(t){var e;const n=t.parentElement,r=t.closest("table");if(!n||!r)return null;const s=Array.from(n.children).indexOf(t),i=(e=r.querySelectorAll("colgroup > col")[s])===null||e===void 0?void 0:e.getAttribute("width");return i?[parseInt(i,10)]:null}function xt(t){const e=t.getAttribute("colwidth");return e?e.split(",").map(n=>parseInt(n,10)):Yr(t)}const es=/[ \t\r\n\f]+/g;function bt(t){var e;return t.children.length>0?!1:((e=t.textContent)!==null&&e!==void 0?e:"").replace(es,"")===""}function wt(t){const e=t.createAndFill();if(!e)throw new Error(`[tiptap error]: "${t.name}" has no default content to backfill.`);return e.content}const ts=D.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:xt},align:kt()}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td",getAttrs:t=>bt(t)?{}:!1,getContent:(t,e)=>wt(e.nodes[this.name])},{tag:"td"}]},renderHTML({HTMLAttributes:t}){return["td",H(this.options.HTMLAttributes,t),0]}}),ns=D.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:xt},align:kt()}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th",getAttrs:t=>bt(t)?{}:!1,getContent:(t,e)=>wt(e.nodes[this.name])},{tag:"th"}]},renderHTML({HTMLAttributes:t}){return["th",H(this.options.HTMLAttributes,t),0]}}),rs=D.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:t}){return["tr",H(this.options.HTMLAttributes,t),0]}});function ge(t,e){return e?["width",`${Math.max(e,t)}px`]:["min-width",`${t}px`]}function We(t,e,n,r,s,i){let a=0,l=!0,o=e.firstChild;const u=t.firstChild;if(u!==null)for(let d=0,f=0;d<u.childCount;d+=1){const{colspan:p,colwidth:g}=u.child(d).attrs;for(let m=0;m<p;m+=1,f+=1){const k=s===f?i:g&&g[m],w=k?`${k}px`:"";if(a+=k||r,k||(l=!1),o){if(o.style.width!==w){const[y,T]=ge(r,k);o.style.setProperty(y,T)}o=o.nextSibling}else{const y=document.createElement("col"),[T,x]=ge(r,k);y.style.setProperty(T,x),e.appendChild(y)}}}for(;o;){var c;const d=o.nextSibling;(c=o.parentNode)===null||c===void 0||c.removeChild(o),o=d}const h=t.attrs.style&&typeof t.attrs.style=="string"&&/\bwidth\s*:/i.test(t.attrs.style);l&&!h?(n.style.width=`${a}px`,n.style.minWidth=""):(n.style.width="",n.style.minWidth=`${a}px`)}var ss=class{constructor(t,e,n,r={}){this.node=t,this.cellMinWidth=e,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table"));for(const[s,i]of Object.entries(r))i!=null&&(s==="style"?this.table.style.cssText=String(i):this.table.setAttribute(s,String(i)));t.attrs.style&&(this.table.style.cssText=t.attrs.style),this.colgroup=this.table.appendChild(document.createElement("colgroup")),We(t,this.colgroup,this.table,e),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(t){return t.type!==this.node.type?!1:(this.node=t,We(t,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(t){const e=t.target,n=this.dom.contains(e),r=this.contentDOM.contains(e);return!!(n&&!r&&(t.type==="attributes"||t.type==="childList"||t.type==="characterData"))}};function is(t,e,n,r){let s=0,i=!0;const a=[],l=t.firstChild;if(!l)return{};for(let c=0,h=0;c<l.childCount;c+=1){const{colspan:d,colwidth:f}=l.child(c).attrs;for(let p=0;p<d;p+=1,h+=1){const g=n===h?r:f&&f[p];s+=g||e,g||(i=!1);const[m,k]=ge(e,g);a.push(["col",{style:`${m}: ${k}`}])}}const o=i?`${s}px`:"",u=i?"":`${s}px`;return{colgroup:["colgroup",{},...a],tableWidth:o,tableMinWidth:u}}function Ue(t,e){return t.createAndFill()}function as(t){if(t.cached.tableNodeTypes)return t.cached.tableNodeTypes;const e={};return Object.keys(t.nodes).forEach(n=>{const r=t.nodes[n];r.spec.tableRole&&(e[r.spec.tableRole]=r)}),t.cached.tableNodeTypes=e,e}function os(t,e,n,r,s){const i=as(t),a=[],l=[];for(let u=0;u<n;u+=1){const c=Ue(i.cell);if(c&&l.push(c),r){const h=Ue(i.header_cell);h&&a.push(h)}}const o=[];for(let u=0;u<e;u+=1)o.push(i.row.createChecked(null,r&&u===0?a:l));return i.table.createChecked(null,o)}function ls(t){return t instanceof rt}const J=({editor:t})=>{const{selection:e}=t.state;if(!ls(e))return!1;let n=0;const r=Y(e.ranges[0].$from,s=>s.type.name==="table");return r?.node.descendants(s=>{if(s.type.name==="table")return!1;["tableCell","tableHeader"].includes(s.type.name)&&(n+=1)}),n!==e.ranges.length?!1:(t.commands.deleteTable(),!0)};function Ge(t,e){const n=t.mapping.map(e),r=Y(t.selection.$from,a=>a.type.name==="table");if(r?.pos===n)return;const s=t.doc.nodeAt(n);if(!s)return;const i=n+s.nodeSize-1;t.setSelection(tt.near(t.doc.resolve(i),-1))}function cs(t){let e="",n=0;for(;n<t.length;){if(t[n]==="\\"&&n+1<t.length){e+=t[n]+t[n+1],n+=2;continue}if(t[n]!=="`"){e+=t[n++];continue}let r=0;for(;n+r<t.length&&t[n+r]==="`";)r+=1;let s=n+r,i=!1;for(;s<t.length;){if(t[s]!=="`"){s+=1;continue}let a=0;for(;s+a<t.length&&t[s+a]==="`";)a+=1;if(a===r){const l=t.slice(n+r,s);e+=t.slice(n,n+r)+l.replace(/\\\||\|/g,o=>o==="|"?"\\|":o)+t.slice(s,s+r),n=s+r,i=!0;break}s+=a}i||(e+=t.slice(n,n+r),n+=r)}return e}function us(t){return t.split(`
|
|
67
67
|
`).map(e=>!e.includes("|")||!e.includes("`")?e:cs(e)).join(`
|
|
68
68
|
`)}function hs(t){return(t||"").replace(/\s+/g," ").trim()}function ds(t,e,n={}){var r;const s=(r=n.cellLineSeparator)!==null&&r!==void 0?r:"";if(!t||!t.content||t.content.length===0)return"";const i=[];t.content.forEach(p=>{const g=[];p.content&&p.content.forEach(m=>{let k="";m.content&&Array.isArray(m.content)&&m.content.length>1?k=m.content.map(x=>e.renderChildren(x)).join(s):k=m.content?e.renderChildren(m.content):"";const w=hs(k.split(s).join(`
|
|
69
69
|
`).replace(/[ \t]*\r?\n[ \t]*/g,"<br>")),y=m.type==="tableHeader",T=Jr(m.attrs);g.push({text:w,isHeader:y,align:T})}),i.push(g)});const a=i.reduce((p,g)=>Math.max(p,g.length),0);if(a===0)return"";const l=Array.from({length:a}).fill(0);i.forEach(p=>{for(let m=0;m<a;m+=1){var g;const k=(((g=p[m])===null||g===void 0?void 0:g.text)||"").length;k>l[m]&&(l[m]=k),l[m]<3&&(l[m]=3)}});const o=(p,g)=>p+" ".repeat(Math.max(0,g-p.length)),u=i[0],c=u.some(p=>p.isHeader),h=Array.from({length:a}).fill(null);i.forEach(p=>{for(let m=0;m<a;m+=1){var g;!h[m]&&(!((g=p[m])===null||g===void 0)&&g.align)&&(h[m]=p[m].align)}});let d=`
|
|
@@ -77,7 +77,7 @@ Please report this to https://github.com/markedjs/marked.`,t){let r="<p>An error
|
|
|
77
77
|
`);if(i.length<2)return;const a=i[1];if(!/^[ \t|:]*-[ \t|:-]*$/.test(a)||!a.includes("|"))return;const l=us(s);if(l===s)return;const o=n.blockTokens(l)[0];if(o?.type!=="table"||!o.raw)return;const u=o.raw.split(`
|
|
78
78
|
`).length,c=t.split(`
|
|
79
79
|
`).slice(0,u).join(`
|
|
80
|
-
`);return{...o,raw:c}}},addCommands(){return{insertTable:({rows:t=3,cols:e=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:s,editor:i})=>{const a=os(i.schema,t,e,n);if(s){const l=r.selection.from+1;r.replaceSelectionWith(a).scrollIntoView().setSelection(tt.near(r.doc.resolve(l)))}return!0},addColumnBefore:()=>({state:t,dispatch:e})=>
|
|
81
|
-
`],allow:({state:n,range:r})=>{const s=t.dismissal;return s?r.from===s.from&&Rs(n.doc,s.from,s.text.length)===s.text?!1:(t.dismissal=null,!0):!0},items:()=>[],render:()=>({onStart:n=>{t.set({query:n.query,range:n.range,rect:n.clientRect??null,editor:n.editor})},onUpdate:n=>{t.set({query:n.query,range:n.range,rect:n.clientRect??null,editor:n.editor})},onKeyDown:({event:n})=>n.key==="Escape"?(yt(this.editor,t),t.close(),!0):!1,onExit:()=>{t.latched||t.close()}})};return[
|
|
80
|
+
`);return{...o,raw:c}}},addCommands(){return{insertTable:({rows:t=3,cols:e=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:s,editor:i})=>{const a=os(i.schema,t,e,n);if(s){const l=r.selection.from+1;r.replaceSelectionWith(a).scrollIntoView().setSelection(tt.near(r.doc.resolve(l)))}return!0},addColumnBefore:()=>({state:t,dispatch:e})=>dn(t,e),addColumnAfter:()=>({state:t,dispatch:e})=>hn(t,e),deleteColumn:()=>({state:t,dispatch:e})=>{const n=Y(t.selection.$from,r=>r.type.name==="table");return un(t,e&&(r=>{n&&Ge(r,n.pos),e(r)}))},addRowBefore:()=>({state:t,dispatch:e})=>cn(t,e),addRowAfter:()=>({state:t,dispatch:e})=>ln(t,e),deleteRow:()=>({state:t,dispatch:e})=>{const n=Y(t.selection.$from,r=>r.type.name==="table");return on(t,e&&(r=>{n&&Ge(r,n.pos),e(r)}))},deleteTable:()=>({state:t,dispatch:e})=>an(t,e),mergeCells:()=>({state:t,dispatch:e})=>Le(t,e),splitCell:()=>({state:t,dispatch:e})=>Ie(t,e),toggleHeaderColumn:()=>({state:t,dispatch:e})=>ze("column")(t,e),toggleHeaderRow:()=>({state:t,dispatch:e})=>ze("row")(t,e),toggleHeaderCell:()=>({state:t,dispatch:e})=>sn(t,e),mergeOrSplit:()=>({state:t,dispatch:e})=>Le(t,e)?!0:Ie(t,e),setCellAttribute:(t,e)=>({state:n,dispatch:r})=>rn(t,e)(n,r),goToNextCell:()=>({state:t,dispatch:e})=>_e(1)(t,e),goToPreviousCell:()=>({state:t,dispatch:e})=>_e(-1)(t,e),fixTables:()=>({state:t,dispatch:e})=>(e&&nn(t),!0),setCellSelection:t=>({tr:e,dispatch:n})=>{if(n){const r=rt.create(e.doc,t.anchorCell,t.headCell);e.setSelection(r)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:J,"Mod-Backspace":J,Delete:J,"Mod-Delete":J}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[en({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],tn({allowTableNodeSelection:this.options.allowTableNodeSelection})]},addNodeView(){const t=this.options.resizable&&this.editor.isEditable,e=this.options.View;return t||!e?null:({node:n,view:r,HTMLAttributes:s})=>{const i=H(this.options.HTMLAttributes,s);return new e(n,this.options.cellMinWidth,r,i)}},extendNodeSchema(t){const e={name:t.name,options:t.options,storage:t.storage};return{tableRole:et(N(t,"tableRole",e))}}}),fs=ie.create({name:"tableKit",addExtensions(){const t=[];return this.options.table!==!1&&t.push(ps.configure(this.options.table)),this.options.tableCell!==!1&&t.push(ts.configure(this.options.tableCell)),this.options.tableHeader!==!1&&t.push(ns.configure(this.options.tableHeader)),this.options.tableRow!==!1&&t.push(rs.configure(this.options.tableRow)),t}});function gs(t){const e=$.c(13),{node:n,selected:r,editor:s,deleteNode:i}=t,a=j(),l=typeof n.attrs.href=="string"?n.attrs.href:"",o=typeof n.attrs.name=="string"?n.attrs.name:"",u=r&&"ring-2 ring-ring ring-offset-2 ring-offset-background";let c;e[0]!==u?(c=q(Sn,"select-none",u),e[0]=u,e[1]=c):c=e[1];let h;e[2]!==i||e[3]!==s.isEditable||e[4]!==a?(h=s.isEditable&&b.jsx("button",{type:"button","aria-label":a("markdownEditor.removeFile"),onMouseDown:ms,onClick:i,className:"shrink-0 rounded-lg p-0.5 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",children:b.jsx(Xe,{size:14})}),e[2]=i,e[3]=s.isEditable,e[4]=a,e[5]=h):h=e[5];let d;e[6]!==l||e[7]!==o||e[8]!==h?(d=b.jsx(Cn,{href:l,name:o,children:h}),e[6]=l,e[7]=o,e[8]=h,e[9]=d):d=e[9];let f;return e[10]!==c||e[11]!==d?(f=b.jsx(xe,{as:"span",className:c,children:d}),e[10]=c,e[11]=d,e[12]=f):f=e[12],f}function ms(t){return t.preventDefault()}function ks(t){return t.replace(/([[\]])/g,"\\$1")}const xs=D.create({name:"attachment",group:"inline",inline:!0,atom:!0,draggable:!0,addAttributes(){return{href:{default:null,parseHTML:t=>t.getAttribute("href"),renderHTML:t=>t.href?{href:t.href}:{}},name:{default:null,parseHTML:t=>t.getAttribute("data-name")||t.textContent,renderHTML:t=>t.name?{"data-name":t.name}:{}}}},parseHTML(){return[{tag:"a[data-attachment]",getAttrs:t=>it(t.getAttribute("href")??"")?null:!1}]},renderHTML({HTMLAttributes:t,node:e}){return["a",H(t,{"data-attachment":""}),typeof e.attrs.name=="string"?e.attrs.name:""]},renderMarkdown:t=>{const e=typeof t.attrs?.href=="string"?t.attrs.href:"",n=typeof t.attrs?.name=="string"?t.attrs.name:"";return`[${ks(n)}](${e})`},addNodeView(){return ke(gs)}});function bs(t){const e=$.c(5),{node:n,selected:r}=t,s=typeof n.attrs.name=="string"?n.attrs.name:"",i=r&&"ring-2 ring-ring";let a;e[0]!==i?(a=q("select-none rounded px-1 font-medium text-primary","bg-primary/10",i),e[0]=i,e[1]=a):a=e[1];let l;return e[2]!==s||e[3]!==a?(l=b.jsxs(xe,{as:"span","data-testid":"mention-chip",className:a,children:["@",s]}),e[2]=s,e[3]=a,e[4]=l):l=e[4],l}const ws=D.create({name:"mention",group:"inline",inline:!0,atom:!0,selectable:!0,addAttributes(){return{id:{default:null,parseHTML:t=>t.getAttribute("data-mention-id"),renderHTML:t=>t.id?{"data-mention-id":t.id}:{}},name:{default:null,parseHTML:t=>t.getAttribute("data-mention-name"),renderHTML:t=>t.name?{"data-mention-name":t.name}:{}}}},parseHTML(){return[{tag:"span[data-mention-id]"}]},renderHTML({HTMLAttributes:t,node:e}){return["span",H(t),`@${typeof e.attrs.name=="string"?e.attrs.name:""}`]},renderMarkdown:t=>{const e=typeof t.attrs?.id=="string"?t.attrs.id:"",n=typeof t.attrs?.name=="string"?t.attrs.name:"";return e?Rn(e,n):`@${n}`},addNodeView(){return ke(bs)}}),ys="studio.mention-members.",me=new Map;function Ze(t){const e=me.get(t);if(e)return e;try{const n=localStorage.getItem(t);if(!n)return;const r=JSON.parse(n);if(!Array.isArray(r))return;const s=r.filter(i=>!!i&&typeof i.id=="string"&&typeof i.name=="string");return me.set(t,s),s}catch{return}}function Ts(t,e){me.set(t,e);try{localStorage.setItem(t,JSON.stringify(e))}catch{}}function vs(t,e){if(!t?.length)return e;const n=new Map(t.map(r=>[r.id,r]));return e.map(r=>{const s=n.get(r.id);return s&&s.name===r.name&&s.email===r.email&&s.image===r.image?s:r})}function As(t){return t.map(e=>({id:e.userId,name:e.user?.name?.trim()||e.user?.email?.trim()||"",email:e.user?.email??"",image:e.user?.image??null})).filter(e=>!!e.name).sort((e,n)=>e.name.localeCompare(n.name))}function Ms(t){const e=$.c(17),{locator:n}=At(),r=Mt(),s=`${ys}${n}`;let i;e[0]!==n?(i=Ct.mentionMembers(n),e[0]=n,e[1]=i):i=e[1];let a;e[2]!==s?(a=()=>Ze(s),e[2]=s,e[3]=a):a=e[3];let l;e[4]!==r||e[5]!==s?(l=async()=>{const f=await r.organization.listMembers(),p=vs(Ze(s),As(f?.data?.members??[]));return Ts(s,p),p},e[4]=r,e[5]=s,e[6]=l):l=e[6];let o;e[7]!==t||e[8]!==i||e[9]!==a||e[10]!==l?(o={queryKey:i,enabled:t,staleTime:0,placeholderData:a,queryFn:l},e[7]=t,e[8]=i,e[9]=a,e[10]=l,e[11]=o):o=e[11];const u=St(o);let c;e[12]!==u.data?(c=u.data??[],e[12]=u.data,e[13]=c):c=e[13];const h=u.isFetching&&!u.data;let d;return e[14]!==c||e[15]!==h?(d={members:c,loading:h},e[14]=c,e[15]=h,e[16]=d):d=e[16],d}const Ve={query:"",range:null,rect:null,editor:null};class Ss{state=Ve;listeners=new Set;dismissal=null;latched=!1;subscribe=e=>(this.listeners.add(e),()=>this.listeners.delete(e));getSnapshot=()=>this.state;set(e){this.state=e;for(const n of this.listeners)n()}close(){this.latched=!1,this.set(Ve)}}const Re=new Ye("markdownEditorMention");function Cs(t,e,n){t.chain().focus().insertContentAt(e,[{type:"mention",attrs:{id:n.id,name:n.name}},{type:"text",text:" "}]).run(),nt(t.view,Re)}function Rs(t,e,n){const r=Math.min(e+n,t.content.size);return e>=r?"":t.textBetween(e,r,"","")}function yt(t,e){const n=e.getSnapshot().range??void 0;n&&n.to>n.from&&(e.dismissal={from:n.from,text:t.state.doc.textBetween(n.from,n.to,"")}),nt(t.view,Re)}function Es(t){return ie.create({name:"mentionSuggestion",addProseMirrorPlugins(){const e={editor:this.editor,char:"@",pluginKey:Re,allowedPrefixes:[" ",`
|
|
81
|
+
`],allow:({state:n,range:r})=>{const s=t.dismissal;return s?r.from===s.from&&Rs(n.doc,s.from,s.text.length)===s.text?!1:(t.dismissal=null,!0):!0},items:()=>[],render:()=>({onStart:n=>{t.set({query:n.query,range:n.range,rect:n.clientRect??null,editor:n.editor})},onUpdate:n=>{t.set({query:n.query,range:n.range,rect:n.clientRect??null,editor:n.editor})},onKeyDown:({event:n})=>n.key==="Escape"?(yt(this.editor,t),t.close(),!0):!1,onExit:()=>{t.latched||t.close()}})};return[Qt(e)]}})}const Ke=256,$s=40,Qe=280,_s=140;function Ls(t){const e=$.c(4),{store:n}=t,r=E.useSyncExternalStore(n.subscribe,n.getSnapshot),s=r.range!==null;let i;return e[0]!==s||e[1]!==r||e[2]!==n?(i=s?b.jsx(Is,{store:n,state:r}):null,e[0]=s,e[1]=r,e[2]=n,e[3]=i):i=e[3],i}function Is({store:t,state:e}){const n=j(),{members:r,loading:s}=Ms(!0),[i,a]=E.useState(e.query),[l,o]=E.useState(null),u=zs(e.editor),c=u.getBoundingClientRect(),h=u===document.body?new DOMRect(0,0,window.innerWidth,window.innerHeight):c,d=e.rect?.()??new DOMRect(0,0,0,0),f=h.bottom-d.bottom,p=f<Qe&&d.top-h.top>f,g=(p?d.top-h.top:f)-8,m=Math.min(Qe,Math.max(g,_s))-$s,k={position:"absolute",width:Ke,left:Math.min(d.left,h.right-Ke-8)-c.left,...p?{bottom:c.bottom-d.top+6}:{top:d.bottom-c.top+6}},w=()=>{e.editor&&yt(e.editor,t),t.close()},y=x=>{const v=x.relatedTarget;if((!v||e.editor?.view.dom.contains(v)===!0)&&t.latched){l?.focus();return}w()},T=x=>{!e.editor||!e.range||(Cs(e.editor,e.range,x),t.close())};return Rt.createPortal(b.jsx("div",{style:k,"data-testid":"mention-menu",className:"z-50 overflow-hidden rounded-lg bg-popover shadow-soft",children:b.jsxs($n,{onKeyDown:x=>{x.key==="Escape"&&(x.preventDefault(),w(),e.editor?.commands.focus())},children:[b.jsx(_n,{ref:o,autoFocus:!0,onFocus:()=>{t.latched=!0},value:i,onValueChange:a,placeholder:n("markdownEditor.mentionSearch"),onBlur:y}),b.jsxs(Ln,{style:{maxHeight:m},children:[s?b.jsx("div",{className:"flex items-center justify-center py-6",children:b.jsx(Je,{size:"sm"})}):b.jsx(In,{children:n("markdownEditor.mentionEmpty")}),r.map(x=>b.jsxs(zn,{value:`${x.name} ${x.email}`,onSelect:()=>T(x),onMouseDown:v=>v.preventDefault(),className:"gap-2",children:[b.jsx(Et,{url:x.image??void 0,fallback:x.name??"?",shape:"circle",size:"xs"}),b.jsx("span",{className:"min-w-0 flex-1 truncate",children:x.name})]},x.id))]})]})}),u)}function zs(t){const e=t?.view.dom.closest('[role="dialog"]');return e instanceof HTMLElement?e:document.body}const Ps=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,Hs=D.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{},resize:!1}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:t}){return["img",H(this.options.HTMLAttributes,t)]},parseMarkdown:(t,e)=>e.createNode("image",{src:t.href,title:t.title,alt:t.text}),renderMarkdown:t=>{var e,n,r,s,i,a;const l=(e=(n=t.attrs)===null||n===void 0?void 0:n.src)!==null&&e!==void 0?e:"",o=(r=(s=t.attrs)===null||s===void 0?void 0:s.alt)!==null&&r!==void 0?r:"",u=(i=(a=t.attrs)===null||a===void 0?void 0:a.title)!==null&&i!==void 0?i:"";return u?``:``},addNodeView(){if(!this.options.resize||!this.options.resize.enabled||typeof document>"u")return null;const{directions:t,minWidth:e,minHeight:n,alwaysPreserveAspectRatio:r}=this.options.resize,s=new Set(["src","width","height"]);return({node:i,getPos:a,HTMLAttributes:l,editor:o})=>{const u=document.createElement("img");u.draggable=!1;const c=H(this.options.HTMLAttributes,l);Object.entries(c).forEach(([k,w])=>{if(w!=null)switch(k){case"src":case"width":case"height":break;default:u.setAttribute(k,w)}}),c.src!==null&&(u.src=c.src);let h={...l};const d=k=>{if(typeof k=="string"&&k!==""){u.getAttribute("src")!==k&&(u.src=k);return}u.hasAttribute("src")&&u.removeAttribute("src"),u.src!==""&&(u.src="")};d(l.src);const f=k=>{if(k.type!==i.type)return!1;const w=o.extensionManager.attributes.filter(T=>T.type===k.type.name),y=Bt(k,w);return Object.keys(h).forEach(T=>{!s.has(T)&&!(T in y)&&u.removeAttribute(T)}),Object.entries(y).forEach(([T,x])=>{s.has(T)||(x!=null?u.setAttribute(T,x):u.removeAttribute(T))}),d(y.src),h=y,!0},p=new Ot({element:u,editor:o,node:i,getPos:a,onResize:(k,w)=>{u.style.width=`${k}px`,u.style.height=`${w}px`},onCommit:(k,w)=>{const y=a();y!==void 0&&this.editor.chain().setNodeSelection(y).updateAttributes(this.name,{width:k,height:w}).run()},onUpdate:f,options:{directions:t,min:{width:e,height:n},preserveAspectRatio:r===!0}}),g=p.dom,m=()=>{g.style.visibility="",g.style.pointerEvents=""};return g.style.visibility="hidden",g.style.pointerEvents="none",u.complete&&u.naturalWidth>0?m():(u.onload=m,u.onerror=m),p}},addCommands(){return{setImage:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t})}},addInputRules(){return[Nt({find:Ps,type:this.type,getAttributes:t=>{const[,,e,n,r]=t;return{src:n,alt:e,title:r}}})]}});var js=Hs;function Ns(t){const e=$.c(16),{node:n,selected:r,editor:s,deleteNode:i}=t,a=j(),l=typeof n.attrs.src=="string"?n.attrs.src:"",o=typeof n.attrs.alt=="string"?n.attrs.alt:"";let u;e[0]!==o||e[1]!==a?(u=o||a("markdownEditor.imageAltFallback"),e[0]=o,e[1]=a,e[2]=u):u=e[2];const c=r&&"ring-2 ring-ring ring-offset-2 ring-offset-background";let h;e[3]!==c?(h=q("max-h-[420px] max-w-full rounded-lg border border-border object-contain",c),e[3]=c,e[4]=h):h=e[4];let d;e[5]!==l||e[6]!==u||e[7]!==h?(d=b.jsx("img",{src:l,alt:u,draggable:!1,className:h}),e[5]=l,e[6]=u,e[7]=h,e[8]=d):d=e[8];let f;e[9]!==i||e[10]!==s.isEditable||e[11]!==a?(f=s.isEditable&&b.jsx("button",{type:"button","aria-label":a("markdownEditor.removeImage"),onMouseDown:Os,onClick:i,className:"absolute right-2 top-2 flex size-7 items-center justify-center rounded-lg bg-card text-muted-foreground opacity-0 shadow-edge transition-opacity hover:text-foreground focus-visible:opacity-100 group-hover/image:opacity-100",children:b.jsx(Xe,{size:14})}),e[9]=i,e[10]=s.isEditable,e[11]=a,e[12]=f):f=e[12];let p;return e[13]!==d||e[14]!==f?(p=b.jsxs(xe,{className:"group/image relative my-3 w-fit max-w-full",children:[d,f]}),e[13]=d,e[14]=f,e[15]=p):p=e[15],p}function Os(t){return t.preventDefault()}const Bs=js.extend({addNodeView(){return ke(Ns)}}).configure({inline:!1,allowBase64:!1}),Ds={openOnClick:!1,autolink:!0,HTMLAttributes:{rel:"noopener noreferrer",target:"_blank"}},Fs=Dt.extend({parseMarkdown:(t,e)=>{const n=typeof t.href=="string"?t.href:"";if(it(n))return e.createNode("attachment",{href:n,name:t.text??""});const r=En(n);return r?e.createNode("mention",{id:r,name:(t.text??"").replace(/^@/,"")}):e.applyMark("link",e.parseInline(t.tokens??[]),{href:n,title:t.title||null})}});function qs(t="",e){return[qt.configure({heading:{levels:[1,2,3]},underline:!1,link:!1}),Fs.configure(Ds),Xt.configure({placeholder:t}),fs,Ft,Wt.configure({nested:!0}),Bs,xs,Un,ws,...e?[Es(e)]:[],Qr.configure({markedOptions:{breaks:!0}})]}const Ws=/^(\s*)([-*+]|\d+[.)])\s+\S/,Us=/^\s*(```|~~~)/,Gs=/^\s+(?![-*+>#]|\d+[.)]\s)\S/;function Zs(t){const e=[];let n=!1,r=!1;for(const s of t.split(`
|
|
82
82
|
`)){if(Us.test(s)){n=!n,r=!1,e.push(s);continue}if(n){e.push(s);continue}if(Ws.test(s)){r=!0,e.push(s);continue}if(!s.trim()){r=!1,e.push(s);continue}if(r&&Gs.test(s)){e[e.length-1]=`${e[e.length-1]} ${s.trim()}`;continue}r=!1,e.push(s)}return e.join(`
|
|
83
|
-
`)}function Vs(t){const e=$.c(12),{onFiles:n,disabled:r}=t,s=j(),i=E.useRef(null);let a;e[0]!==s?(a=s("markdownEditor.attachFile"),e[0]=s,e[1]=a):a=e[1];let l,o;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=()=>i.current?.click(),o=b.jsx(
|
|
83
|
+
`)}function Vs(t){const e=$.c(12),{onFiles:n,disabled:r}=t,s=j(),i=E.useRef(null);let a;e[0]!==s?(a=s("markdownEditor.attachFile"),e[0]=s,e[1]=a):a=e[1];let l,o;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=()=>i.current?.click(),o=b.jsx(xn,{size:16}),e[2]=l,e[3]=o):(l=e[2],o=e[3]);let u;e[4]!==r||e[5]!==a?(u=b.jsx(Pn,{type:"button",label:a,disabled:r,onClick:l,children:o}),e[4]=r,e[5]=a,e[6]=u):u=e[6];let c;e[7]!==n?(c=b.jsx("input",{ref:i,type:"file",multiple:!0,className:"hidden",onChange:d=>{const f=Array.from(d.target.files??[]);d.target.value="",f.length>0&&n(f)}}),e[7]=n,e[8]=c):c=e[8];let h;return e[9]!==u||e[10]!==c?(h=b.jsxs(b.Fragment,{children:[u,c]}),e[9]=u,e[10]=c,e[11]=h):h=e[11],h}function Ks(t){const e=$.c(6),{pending:n}=t,r=j();if(n===0)return null;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=b.jsx(Je,{className:"size-3"}),e[0]=s):s=e[0];let i;e[1]!==n||e[2]!==r?(i=n===1?r("markdownEditor.uploading"):r("markdownEditor.uploadingCount",{count:String(n)}),e[1]=n,e[2]=r,e[3]=i):i=e[3];let a;return e[4]!==i?(a=b.jsxs("span",{className:"inline-flex items-center gap-1.5 text-xs text-muted-foreground","aria-live":"polite",role:"status",children:[s,i]}),e[4]=i,e[5]=a):a=e[5],a}const Qs=["outline-none","[&>*:first-child]:mt-0 [&>*:last-child]:mb-0","[&_p]:my-3 [&_p]:leading-[1.5]","[&_h1]:my-3 [&_h1]:text-xl [&_h1]:font-semibold [&_h1]:leading-[1.5] [&_h1]:text-foreground","[&_h2]:my-3 [&_h2]:text-lg [&_h2]:font-semibold [&_h2]:leading-[1.5] [&_h2]:text-foreground","[&_h3]:my-3 [&_h3]:text-base [&_h3]:font-semibold [&_h3]:leading-[1.5] [&_h3]:text-foreground","[&_ul]:my-3 [&_ul]:list-disc [&_ul]:pl-5","[&_ol]:my-3 [&_ol]:list-decimal [&_ol]:pl-5","[&_li]:my-0.5 [&_li>p]:my-0","[&_blockquote]:my-2 [&_blockquote]:border-l-2 [&_blockquote]:border-border [&_blockquote]:pl-3 [&_blockquote]:text-muted-foreground","[&_code]:rounded [&_code]:bg-muted [&_code]:px-1 [&_code]:py-0.5 [&_code]:font-mono [&_code]:text-[0.85em]","[&_pre]:my-3 [&_pre]:overflow-x-auto [&_pre]:rounded-lg [&_pre]:bg-muted [&_pre]:p-3 [&_pre]:font-mono [&_pre]:text-sm","[&_pre_code]:bg-transparent [&_pre_code]:p-0",Kt,"[&_hr]:my-4 [&_hr]:border-border","[&_strong]:font-semibold [&_strong]:text-foreground","[&_table]:my-3 [&_table]:w-full [&_table]:table-fixed [&_table]:border-collapse","[&_th]:border [&_th]:border-border [&_th]:bg-muted [&_th]:p-2 [&_th]:text-left [&_th]:font-semibold","[&_td]:border [&_td]:border-border [&_td]:p-2 [&_td]:align-top","[&_th>p]:my-0 [&_td>p]:my-0","[&_ul[data-type=taskList]]:my-3 [&_ul[data-type=taskList]]:list-none [&_ul[data-type=taskList]]:pl-0","[&_li[data-type=taskItem]]:flex [&_li[data-type=taskItem]]:items-start [&_li[data-type=taskItem]]:gap-2","[&_li[data-type=taskItem]>label]:mt-1 [&_li[data-type=taskItem]>label]:shrink-0","[&_li[data-type=taskItem]>div]:min-w-0 [&_li[data-type=taskItem]>div>p]:my-0"].join(" "),Xs=["[&_p.is-editor-empty:first-child::before]:content-[attr(data-placeholder)]","[&_p.is-editor-empty:first-child::before]:text-muted-foreground/50","[&_p.is-editor-empty:first-child::before]:float-left","[&_p.is-editor-empty:first-child::before]:h-0","[&_p.is-editor-empty:first-child::before]:pointer-events-none"].join(" ");function Js(t){const e=$.c(10),{editor:n,mentions:r}=t,s=r.items;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=["markdown-editor-mentions"],e[0]=i):i=e[0];let a;e[1]!==s?(a=u=>{const{query:c}=u,h=c.trim().toLowerCase();return Promise.resolve(h?s.filter(d=>`${d.name} ${d.title??""}`.toLowerCase().includes(h)):s)},e[1]=s,e[2]=a):a=e[2];let l;e[3]!==n?(l=u=>{const{range:c,item:h}=u;n.chain().focus().insertContentAt(c,[{type:"text",text:`@${h.name}`,marks:h.href?[{type:"link",attrs:{href:h.href}}]:void 0},{type:"text",text:" "}]).run()},e[3]=n,e[4]=l):l=e[4];let o;return e[5]!==n||e[6]!==r.emptyLabel||e[7]!==a||e[8]!==l?(o=b.jsx(Jt,{editor:n,char:"@",pluginKey:"markdownMentionMenu",queryKey:i,queryFn:a,emptyLabel:r.emptyLabel,renderItem:Ys,onSelect:l}),e[5]=n,e[6]=r.emptyLabel,e[7]=a,e[8]=l,e[9]=o):o=e[9],o}function Ys(t){return b.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[b.jsx("span",{className:"truncate font-medium",children:t.title??t.name}),t.description&&b.jsx("span",{className:"line-clamp-1 text-xs text-muted-foreground",children:t.description})]})}function pi({defaultValue:t,onChange:e,placeholder:n,editable:r=!0,attachments:s=!0,mentions:i,inline:a=!1}){const l=Kn(s),[o]=E.useState(()=>new Ss),u=E.useRef(e);u.current=e;const c=Ut({extensions:qs(n,i?void 0:o),content:Zs(t),contentType:"markdown",editable:r,autofocus:a?"end":!1,editorProps:{attributes:{role:"textbox","aria-label":n??"","aria-multiline":"true",class:q(Qs,!a&&"min-h-[200px] sm:min-h-[320px]",Xs)},handlePaste:l.handlePaste,handleDrop:l.handleDrop},onUpdate:({editor:h,transaction:d})=>{d.docChanged&&u.current(h.getMarkdown())}});return c?b.jsxs("div",{className:"flex flex-col",children:[b.jsx(Nn,{editor:c}),!i&&b.jsx(Ls,{store:o}),b.jsx(Gt,{editor:c,className:q(a?"text-sm text-foreground":"text-base text-muted-foreground")}),r&&i&&b.jsx(Js,{editor:c,mentions:i}),b.jsxs("div",{className:"mt-4 flex items-center gap-2 text-xs text-muted-foreground empty:mt-0",children:[r&&i?.hint&&b.jsx("span",{children:i.hint}),r&&s&&b.jsx(Vs,{onFiles:h=>l.uploadInto(c.view,h,c.state.selection.to)}),b.jsx(Ks,{pending:l.pending})]})]}):null}export{Vs as A,Ss as M,Un as U,ws as a,Qr as b,Bs as c,xs as d,Re as e,Ls as f,Ks as g,pi as h,Es as m,Kn as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as H,j as i,o as Ge,b as U,r as q,B as Ne,a as be,t as de,J as Xe,ax as ye,az as _e,l as Y,m as qe,K as Ye,ah as Je,a4 as Le,d as Ue,aH as Ve,k as Qe,G as Ze,L as ke,_ as et,C as je,ad as Pe,P as tt}from"./index-C4tYnNih.js";import{u as Ce,c as De,i as st,j as nt,k as it,l as rt}from"./use-sidebar-collapsed-DXyrU3VA.js";import{S as ot,a as lt,b as at}from"./sheet-DYw2VD7L.js";import{u as ct}from"./use-mobile-BADuLdb7.js";import{u as dt,a as ut,D as ft,c as ht,C as mt,P as gt}from"./core.esm-B2cbbV3O.js";import{S as pt,v as xt,u as bt}from"./sortable.esm-DPfgkRcd.js";import{i as jt}from"./Tool01-BvlRH5Ln.js";import{D as yt,A as vt,E as Ae,F as St}from"./agent-icon-KvVT3fA8.js";import{s as wt}from"./Plus-CcJNnBya.js";import{s as Me}from"./XClose-BBReaSBA.js";import{T as he,a as me,c as ge}from"./tooltip-B1eS9Khq.js";import{C as ze,f as zt,g as Ot,e as _t}from"./context-menu-Cpvztbef.js";import{C as Ct}from"./create-organization-dialog-NLldLLor.js";import{P as Rt}from"./project-apps-M24hPHW2.js";import{u as Nt,a as At}from"./use-recent-apps-TrfPEwKE.js";import{b as Et}from"./use-navigate-to-agent-B3bMlZK-.js";import{u as Tt,a as It}from"./use-project-scope-CKNjz3VB.js";import{i as Lt}from"./UserSquare-DwNuAluZ.js";import{C as Ee,e as kt,b as Pt,c as Dt,f as Mt}from"./command-MmMDew8i.js";import{u as $t}from"./use-debounced-value-DOPKXMfX.js";const Kt={xs:"xs",sm:"xs",lg:"md"};function Re(t){const e=H.c(4),{org:s,size:o}=t,r=o===void 0?"sm":o,l=s.logo??void 0,n=Kt[r];let a;return e[0]!==s.name||e[1]!==l||e[2]!==n?(a=i.jsx(Ge,{url:l,fallback:s.name,size:n,tone:"solid"}),e[0]=s.name,e[1]=l,e[2]=n,e[3]=a):a=e[3],a}function Bs({invitation:t,onChanged:e}){const s=U(),[o,r]=q.useState(!1),l=t.organizationName??s("header.orgSwitcher.unknownOrganization"),n=async()=>{r(!0);try{const d=await be.organization.acceptInvitation({invitationId:t.id});if(d.error){de.error(d.error.message),r(!1);return}}catch{de.error(s("header.orgSwitcher.failedToAcceptInvitation")),r(!1);return}de.success(s("header.orgSwitcher.joined",{name:l})),Xe();let c;try{c=(await be.organization.getFullOrganization({query:{organizationId:t.organizationId}}))?.data?.slug}catch{}window.location.href=c?`/${c}`:"/"},a=async()=>{r(!0);try{const c=await be.organization.rejectInvitation({invitationId:t.id});if(c.error){de.error(c.error.message),r(!1);return}de.success(s("header.orgSwitcher.invitationDeclined")),r(!1),e()}catch{de.error(s("header.orgSwitcher.failedToDeclineInvitation")),r(!1)}};return i.jsxs("div",{className:"flex items-center gap-3 rounded-md border border-dashed border-border px-3 py-2.5",children:[i.jsx(Re,{org:{name:l},size:"sm"}),i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsx("p",{className:"truncate text-sm font-medium",children:l}),i.jsx("p",{className:"truncate text-xs text-muted-foreground",children:s("header.orgSwitcher.invitedToJoin")})]}),i.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[i.jsx(Ne,{size:"sm",variant:"default",onClick:n,disabled:o,children:s("header.orgSwitcher.accept")}),i.jsx(Ne,{size:"icon-sm",variant:"ghost",className:"text-muted-foreground",onClick:a,disabled:o,"aria-label":s("header.orgSwitcher.declineInvitationTo",{name:l}),children:i.jsx(Me,{size:14})})]})]})}const Wt=3,$e=10,Ft=440,Bt=55;function Ke(t){const e=Math.floor((t-Ft)/Bt);return Math.min($e,Math.max(Wt,e))}function Ht(t,e,s=$e*3,o=[]){return[...new Set([e,...o,...t])].slice(0,s)}function Gt(t,e){return!e.id||t.some(s=>s.slug===e.slug)?[...t]:[...t,e]}function Xt(t,e,s,o,r=[]){if(t.length<=o)return{shown:[...t],hidden:[]};const l=new Map(t.map(a=>[a.slug,a])),n=new Set;s&&l.has(s)&&n.add(s);for(const a of r)l.has(a)&&n.add(a);for(const a of e){if(n.size>=o)break;l.has(a)&&n.add(a)}for(const a of t){if(n.size>=o)break;n.add(a.slug)}return{shown:t.filter(a=>n.has(a.slug)),hidden:t.filter(a=>!n.has(a.slug))}}const Te=[];function qt(){const t=H.c(6);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=_e.recentOrgs(),t[0]=e):e=t[0];const[s,o]=ye(e,Te),r=Array.isArray(s)?s:Te;let l;t[1]!==o?(l=(a,c)=>o(d=>Ht(Array.isArray(d)?d:[],a,void 0,c)),t[1]=o,t[2]=l):l=t[2];let n;return t[3]!==r||t[4]!==l?(n={recent:r,remember:l},t[3]=r,t[4]=l,t[5]=n):n=t[5],n}const We={hidden:[],pinned:[],order:[]},fe=(t,e)=>t.filter(s=>s!==e);function ue(t){if(typeof t!="object"||t===null)return We;const e=o=>Array.isArray(o)?o.filter(r=>typeof r=="string"):[],s=t;return{hidden:e(s.hidden),pinned:e(s.pinned),order:e(s.order)}}function Yt(t,e){return{...t,hidden:[...fe(t.hidden,e),e],pinned:fe(t.pinned,e)}}function Jt(t,e){return{...t,hidden:fe(t.hidden,e)}}function Ut(t,e){return t.pinned.includes(e)?{...t,pinned:fe(t.pinned,e)}:{...t,hidden:fe(t.hidden,e),pinned:[...t.pinned,e]}}function Vt(t,e,s){const o=r=>{const l=e.order.indexOf(r);return l===-1?Number.MAX_SAFE_INTEGER:l};return t.filter(r=>r.slug===s||!e.hidden.includes(r.slug)).map((r,l)=>({org:r,index:l})).sort((r,l)=>Number(e.pinned.includes(l.org.slug))-Number(e.pinned.includes(r.org.slug))||o(r.org.slug)-o(l.org.slug)||r.index-l.index).map(({org:r})=>r)}function Qt(t,e,s,o){const r=e.indexOf(s),l=e.indexOf(o);if(r===-1||l===-1||r===l||t.pinned.includes(s)!==t.pinned.includes(o))return t;const n=[...e];return n.splice(r,1),n.splice(l,0,s),{...t,order:[...n,...t.order.filter(a=>!n.includes(a))]}}function ve(t){const e=H.c(11),{active:s,label:o,children:r}=t,l=s?"h-7 opacity-100":"h-2 opacity-0 group-hover/rail:opacity-60";let n;e[0]!==l?(n=Y("w-1 rounded-r-full bg-foreground","transition-[height,opacity] duration-200 ease-[var(--ease-out-cubic)]","motion-reduce:transition-none",l),e[0]=l,e[1]=n):n=e[1];let a;e[2]!==n?(a=i.jsx("span",{"aria-hidden":!0,className:"absolute top-0 -left-2.5 flex h-9 items-center",children:i.jsx("span",{className:n})}),e[2]=n,e[3]=a):a=e[3];let c;e[4]!==s||e[5]!==o?(c=o&&i.jsx("span",{"aria-hidden":!0,className:Y("line-clamp-2 w-full px-0.5 text-center text-2xs text-ellipsis transition-colors",s?"font-medium text-sidebar-foreground":"text-muted-foreground group-hover/rail:text-sidebar-foreground"),children:o}),e[4]=s,e[5]=o,e[6]=c):c=e[6];let d;return e[7]!==r||e[8]!==a||e[9]!==c?(d=i.jsxs("div",{className:"group/rail relative flex w-full shrink-0 flex-col items-center gap-1",children:[a,r,c]}),e[7]=r,e[8]=a,e[9]=c,e[10]=d):d=e[10],d}function Zt(t){return typeof t=="object"&&t!==null&&Array.isArray(t.items)}function es(t){const e=H.c(13),s=t.trim(),{data:o}=be.useSession(),r=o?.user?.id??"",l=s.length>0&&!!r,n=Ye.organizationSearch(r,s);let a;e[0]!==s?(a=async w=>{const{signal:O}=w,p=await fetch(`/api/_me/organizations/search?q=${encodeURIComponent(s)}`,{signal:O});if(!p.ok)throw new Error(`Organization search failed: ${p.status}`);const y=await p.json();if(!Zt(y))throw new Error("Invalid organization search response");return y},e[0]=s,e[1]=a):a=e[1];let c;e[2]!==l||e[3]!==n||e[4]!==a?(c={queryKey:n,queryFn:a,enabled:l,placeholderData:Je,staleTime:3e4,retry:!1},e[2]=l,e[3]=n,e[4]=a,e[5]=c):c=e[5];const{data:d,isFetching:g,isPlaceholderData:m,isError:h}=qe(c);let f;e[6]!==d?.items?(f=d?.items??[],e[6]=d?.items,e[7]=f):f=e[7];const u=l&&g,x=l&&m;let j;return e[8]!==h||e[9]!==f||e[10]!==u||e[11]!==x?(j={hits:f,isSearching:u,isStale:x,isError:h},e[8]=h,e[9]=f,e[10]=u,e[11]=x,e[12]=j):j=e[12],j}function ts(t){const e=H.c(61),{orgs:s,currentSlug:o,hiddenCount:r,onSelect:l}=t,n=U(),[a,c]=q.useState(!1),[d,g]=q.useState("");let m;e[0]!==d?(m=d.trim(),e[0]=d,e[1]=m):m=e[1];const h=m,f=$t(h,150),u=h.length>0,x=f===h,{hits:j,isSearching:w,isStale:O,isError:p}=es(u?f:""),y=u?j:s;let v;e[2]===Symbol.for("react.memo_cache_sentinel")?(v=G=>{c(G),G||g("")},e[2]=v):v=e[2];const z=v;let b;e[3]!==n?(b=n("sidebar.rail.searchOrganizations"),e[3]=n,e[4]=b):b=e[4];let A;e[5]===Symbol.for("react.memo_cache_sentinel")?(A=()=>z(!0),e[5]=A):A=e[5];let I;e[6]===Symbol.for("react.memo_cache_sentinel")?(I=i.jsx(Lt,{size:18}),e[6]=I):I=e[6];let _;e[7]!==b?(_=i.jsx(he,{asChild:!0,children:i.jsx("button",{type:"button","aria-label":b,onClick:A,className:"flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-foreground focus-ring",children:I})}),e[7]=b,e[8]=_):_=e[8];let E;e[9]!==r||e[10]!==n?(E=r>0?n("sidebar.rail.searchMoreOrganizations",{count:r}):n("sidebar.rail.searchOrganizations"),e[9]=r,e[10]=n,e[11]=E):E=e[11];let C;e[12]!==E?(C=i.jsx(me,{side:"right",children:E}),e[12]=E,e[13]=C):C=e[13];let T;e[14]!==_||e[15]!==C?(T=i.jsx(ve,{active:!1,children:i.jsxs(ge,{children:[_,C]})}),e[14]=_,e[15]=C,e[16]=T):T=e[16];let P;e[17]!==n?(P=n("sidebar.rail.searchOrganizations"),e[17]=n,e[18]=P):P=e[18];let S;e[19]!==n?(S=n("sidebar.rail.searchPlaceholder"),e[19]=n,e[20]=S):S=e[20];let R;e[21]!==n?(R=n("sidebar.rail.searchPlaceholder"),e[21]=n,e[22]=R):R=e[22];let M;e[23]!==d||e[24]!==R?(M=i.jsx(kt,{value:d,onValueChange:g,placeholder:R}),e[23]=d,e[24]=R,e[25]=M):M=e[25];const F=u&&(O||!x)&&"opacity-50";let K;e[26]!==F?(K=Y(F),e[26]=F,e[27]=K):K=e[27];let D;e[28]!==p||e[29]!==u||e[30]!==n?(D=u&&p&&i.jsx(Ee,{children:n("sidebar.rail.searchFailed")}),e[28]=p,e[29]=u,e[30]=n,e[31]=D):D=e[31];let $;e[32]!==p||e[33]!==w||e[34]!==y.length||e[35]!==x||e[36]!==n?($=!p&&x&&!w&&y.length===0&&i.jsx(Ee,{children:n("sidebar.rail.searchEmpty")}),e[32]=p,e[33]=w,e[34]=y.length,e[35]=x,e[36]=n,e[37]=$):$=e[37];let L;if(e[38]!==o||e[39]!==l||e[40]!==y||e[41]!==n){let G;e[43]!==o||e[44]!==l||e[45]!==n?(G=X=>i.jsxs(Pt,{value:X.slug,onSelect:()=>{z(!1),X.slug!==o&&l(X.slug)},className:"gap-2.5",children:[i.jsx(Re,{org:X,size:"sm"}),i.jsx("span",{className:"min-w-0 flex-1 truncate",children:X.name}),X.slug===o&&i.jsx("span",{className:"text-meta shrink-0",children:n("sidebar.rail.currentOrganization")})]},X.id),e[43]=o,e[44]=l,e[45]=n,e[46]=G):G=e[46],L=y.map(G),e[38]=o,e[39]=l,e[40]=y,e[41]=n,e[42]=L}else L=e[42];let k;e[47]!==K||e[48]!==D||e[49]!==$||e[50]!==L?(k=i.jsxs(Dt,{className:K,children:[D,$,L]}),e[47]=K,e[48]=D,e[49]=$,e[50]=L,e[51]=k):k=e[51];let W;e[52]!==a||e[53]!==P||e[54]!==S||e[55]!==M||e[56]!==k?(W=i.jsxs(Mt,{open:a,onOpenChange:z,title:P,description:S,shouldFilter:!1,children:[M,k]}),e[52]=a,e[53]=P,e[54]=S,e[55]=M,e[56]=k,e[57]=W):W=e[57];let J;return e[58]!==W||e[59]!==T?(J=i.jsxs(i.Fragment,{children:[T,W]}),e[58]=W,e[59]=T,e[60]=J):J=e[60],J}function ss(t){return globalThis.addEventListener("resize",t),()=>globalThis.removeEventListener("resize",t)}const ns=()=>Ke(globalThis.innerHeight),is=()=>Ke(0);function rs(t){const e=H.c(59),{org:s,active:o,onSelect:r,pinned:l,onOpenSettings:n,onTogglePin:a,onHide:c}=t,d=U();let g;e[0]!==s.slug?(g={id:s.slug},e[0]=s.slug,e[1]=g):g=e[1];const{setNodeRef:m,listeners:h,transform:f,transition:u,isDragging:x}=bt(g);let j;e[2]!==f?(j=mt.Transform.toString(f?{...f,x:0}:null),e[2]=f,e[3]=j):j=e[3];const w=x?1:void 0,O=`rail-org-${s.slug}`;let p;e[4]!==j||e[5]!==w||e[6]!==O||e[7]!==u?(p={transform:j,transition:u,zIndex:w,viewTransitionName:O},e[4]=j,e[5]=w,e[6]=O,e[7]=u,e[8]=p):p=e[8];const y=s.name,v=o||void 0,z=o?"opacity-100":"opacity-60 hover:scale-105 hover:opacity-100",b=r&&"cursor-pointer";let A;e[9]!==z||e[10]!==b?(A=Y("relative flex shrink-0 items-center justify-center rounded-xl focus-ring","transition-[opacity,transform] duration-150 ease-out",z,b),e[9]=z,e[10]=b,e[11]=A):A=e[11];let I;e[12]!==s?(I=i.jsx(Re,{org:s,size:"lg"}),e[12]=s,e[13]=I):I=e[13];let _;e[14]!==l?(_=l&&i.jsx("span",{"aria-hidden":!0,className:"absolute -top-1 -right-1 flex size-4 items-center justify-center rounded-full bg-sidebar-accent text-muted-foreground ring-2 ring-sidebar",children:i.jsx(Ae,{size:9})}),e[14]=l,e[15]=_):_=e[15];let E;e[16]!==r||e[17]!==s.name||e[18]!==A||e[19]!==I||e[20]!==_||e[21]!==v?(E=i.jsx(he,{asChild:!0,children:i.jsx(zt,{asChild:!0,children:i.jsxs("button",{type:"button","aria-label":y,"aria-current":v,onClick:r,className:A,children:[I,_]})})}),e[16]=r,e[17]=s.name,e[18]=A,e[19]=I,e[20]=_,e[21]=v,e[22]=E):E=e[22];let C;e[23]!==s.name?(C=i.jsx(me,{side:"right",children:s.name}),e[23]=s.name,e[24]=C):C=e[24];let T;e[25]!==E||e[26]!==C?(T=i.jsxs(ge,{children:[E,C]}),e[25]=E,e[26]=C,e[27]=T):T=e[27];let P;e[28]===Symbol.for("react.memo_cache_sentinel")?(P=i.jsx(St,{}),e[28]=P):P=e[28];let S;e[29]!==d?(S=d("sidebar.rail.organizationSettings"),e[29]=d,e[30]=S):S=e[30];let R;e[31]!==n||e[32]!==S?(R=i.jsxs(ze,{onSelect:n,children:[P,S]}),e[31]=n,e[32]=S,e[33]=R):R=e[33];let M;e[34]===Symbol.for("react.memo_cache_sentinel")?(M=i.jsx(Ae,{}),e[34]=M):M=e[34];let F;e[35]!==l||e[36]!==d?(F=d(l?"sidebar.rail.unpinOrganization":"sidebar.rail.pinOrganization"),e[35]=l,e[36]=d,e[37]=F):F=e[37];let K;e[38]!==a||e[39]!==F?(K=i.jsxs(ze,{onSelect:a,children:[M,F]}),e[38]=a,e[39]=F,e[40]=K):K=e[40];let D;e[41]!==c||e[42]!==d?(D=c&&i.jsxs(ze,{onSelect:c,children:[i.jsx(jt,{}),d("sidebar.rail.hideOrganization")]}),e[41]=c,e[42]=d,e[43]=D):D=e[43];let $;e[44]!==R||e[45]!==K||e[46]!==D?($=i.jsxs(Ot,{children:[R,K,D]}),e[44]=R,e[45]=K,e[46]=D,e[47]=$):$=e[47];let L;e[48]!==T||e[49]!==$?(L=i.jsxs(_t,{children:[T,$]}),e[48]=T,e[49]=$,e[50]=L):L=e[50];let k;e[51]!==o||e[52]!==L?(k=i.jsx(ve,{active:o,children:L}),e[51]=o,e[52]=L,e[53]=k):k=e[53];let W;return e[54]!==h||e[55]!==m||e[56]!==k||e[57]!==p?(W=i.jsx("div",{ref:m,...h,style:p,className:"w-full shrink-0 touch-none",children:k}),e[54]=h,e[55]=m,e[56]=k,e[57]=p,e[58]=W):W=e[58],W}function os(t){const e=H.c(64),{project:s,orgSlug:o,active:r,onClose:l,onNavigate:n}=t,a=U();let c,d,g,m,h,f,u,x,j,w,O;if(e[0]!==r||e[1]!==n||e[2]!==o||e[3]!==s.icon||e[4]!==s.id||e[5]!==s.title){const M=yt(s.icon,s.title);O="group/rail relative flex w-full flex-col items-center gap-1",g=ge,d=he,w=!0,c=ke,m=et.root,e[17]!==o||e[18]!==s.id?(h={org:o,agentId:s.id},e[17]=o,e[18]=s.id,e[19]=h):h=e[19],f=s.title,u=r||void 0,e[20]!==n?(x=()=>{je("org_rail_recent_project_opened"),n?.()},e[20]=n,e[21]=x):x=e[21],j=Y("flex shrink-0 rounded-lg focus-ring",M.text,r&&"ring-[1.5px] ring-current"),e[0]=r,e[1]=n,e[2]=o,e[3]=s.icon,e[4]=s.id,e[5]=s.title,e[6]=c,e[7]=d,e[8]=g,e[9]=m,e[10]=h,e[11]=f,e[12]=u,e[13]=x,e[14]=j,e[15]=w,e[16]=O}else c=e[6],d=e[7],g=e[8],m=e[9],h=e[10],f=e[11],u=e[12],x=e[13],j=e[14],w=e[15],O=e[16];let p;e[22]!==s.icon||e[23]!==s.title?(p=i.jsx(vt,{icon:s.icon,name:s.title,size:"sm",className:"size-8 rounded-lg"}),e[22]=s.icon,e[23]=s.title,e[24]=p):p=e[24];let y;e[25]!==c||e[26]!==m||e[27]!==h||e[28]!==f||e[29]!==u||e[30]!==x||e[31]!==j||e[32]!==p?(y=i.jsx(c,{to:m,params:h,"aria-label":f,"aria-current":u,onClick:x,className:j,children:p}),e[25]=c,e[26]=m,e[27]=h,e[28]=f,e[29]=u,e[30]=x,e[31]=j,e[32]=p,e[33]=y):y=e[33];let v;e[34]!==d||e[35]!==y||e[36]!==w?(v=i.jsx(d,{asChild:w,children:y}),e[34]=d,e[35]=y,e[36]=w,e[37]=v):v=e[37];let z;e[38]!==s.title?(z=i.jsx(me,{side:"right",children:s.title}),e[38]=s.title,e[39]=z):z=e[39];let b;e[40]!==g||e[41]!==v||e[42]!==z?(b=i.jsxs(g,{children:[v,z]}),e[40]=g,e[41]=v,e[42]=z,e[43]=b):b=e[43];const A=r?"font-medium text-sidebar-foreground":"text-muted-foreground group-hover/rail:text-sidebar-foreground";let I;e[44]!==A?(I=Y("line-clamp-2 w-full text-center text-2xs break-words transition-colors",A),e[44]=A,e[45]=I):I=e[45];let _;e[46]!==s.title||e[47]!==I?(_=i.jsx("span",{"aria-hidden":!0,className:I,children:s.title}),e[46]=s.title,e[47]=I,e[48]=_):_=e[48];let E;e[49]!==s.title||e[50]!==a?(E=a("sidebar.rail.closeApp",{name:s.title}),e[49]=s.title,e[50]=a,e[51]=E):E=e[51];let C;e[52]!==l?(C=()=>{je("org_rail_recent_project_closed"),l()},e[52]=l,e[53]=C):C=e[53];let T,P;e[54]===Symbol.for("react.memo_cache_sentinel")?(T=Y("absolute -top-1.5 right-[calc(50%-1.25rem)] flex size-4 cursor-pointer items-center justify-center rounded-full","bg-sidebar-accent text-muted-foreground ring-2 ring-sidebar hover:text-foreground","opacity-0 transition-opacity duration-150 group-hover/rail:opacity-100 focus-visible:opacity-100 focus-visible:outline-none"),P=i.jsx(Me,{size:10}),e[54]=T,e[55]=P):(T=e[54],P=e[55]);let S;e[56]!==E||e[57]!==C?(S=i.jsx("button",{type:"button","aria-label":E,onClick:C,className:T,children:P}),e[56]=E,e[57]=C,e[58]=S):S=e[58];let R;return e[59]!==b||e[60]!==_||e[61]!==S||e[62]!==O?(R=i.jsxs("div",{className:O,children:[b,_,S]}),e[59]=b,e[60]=_,e[61]=S,e[62]=O,e[63]=R):R=e[63],R}const ls={"site-editor":"/site-editor"};function as(t){const e=H.c(26),{app:s}=t,o=U(),r=Rt[s],l=ls[s];if(!r||!l)return null;let n;e[0]!==r.labelKey||e[1]!==o?(n=o(r.labelKey),e[0]=r.labelKey,e[1]=o,e[2]=n):n=e[2];let a;e[3]!==r.labelKey||e[4]!==o?(a=o(r.labelKey),e[3]=r.labelKey,e[4]=o,e[5]=a):a=e[5];let c;e[6]!==r.tone?(c=Y("flex size-9 shrink-0 items-center justify-center rounded-xl focus-ring opacity-100",r.tone),e[6]=r.tone,e[7]=c):c=e[7];let d;e[8]!==r.Icon?(d=i.jsx(r.Icon,{size:18}),e[8]=r.Icon,e[9]=d):d=e[9];let g;e[10]!==a||e[11]!==c||e[12]!==d||e[13]!==l?(g=i.jsx(he,{asChild:!0,children:i.jsx(ke,{to:l,"aria-label":a,"aria-current":"page","data-testid":"org-rail-local-app",className:c,children:d})}),e[10]=a,e[11]=c,e[12]=d,e[13]=l,e[14]=g):g=e[14];let m;e[15]!==r.labelKey||e[16]!==o?(m=o(r.labelKey),e[15]=r.labelKey,e[16]=o,e[17]=m):m=e[17];let h;e[18]!==m?(h=i.jsx(me,{side:"right",children:m}),e[18]=m,e[19]=h):h=e[19];let f;e[20]!==g||e[21]!==h?(f=i.jsxs(ge,{children:[g,h]}),e[20]=g,e[21]=h,e[22]=f):f=e[22];let u;return e[23]!==n||e[24]!==f?(u=i.jsx(ve,{active:!0,label:n,children:f}),e[23]=n,e[24]=f,e[25]=u):u=e[25],u}function cs(){const{org:t}=Le();return Nt(t.slug),null}function Fe(t){const e=H.c(56),{onNavigate:s}=t===void 0?{}:t,o=U(),r=Ue(),{org:l}=Le(),n=Ve();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={select:hs},e[0]=a):a=e[0];const c=Qe(a);let d;e[1]!==c||e[2]!==n?(d=c?n({to:"/$org",fuzzy:!0,pending:!0}):!1,e[1]=c,e[2]=n,e[3]=d):d=e[3];const g=d,m=g?g.org:l.slug,{data:h}=Ze(),[f,u]=q.useState(!1),x=Ce(),{recent:j,forget:w}=Et(l.slug),{projects:O}=Tt(),p=It(),y=At(),v=y&&y.projectId===null?y.app:null,z=v?[]:j.flatMap(N=>O.filter(B=>B.id===N)),b=Gt(h??[],l),{recent:A,remember:I}=qt();let _;e[4]===Symbol.for("react.memo_cache_sentinel")?(_=_e.railOrgPrefs(),e[4]=_):_=e[4];const[E,C]=ye(_,We),T=ue(E),P=q.useSyncExternalStore(ss,ns,is),{shown:S}=Xt(Vt(b,T,l.slug),A,l.slug,P,T.pinned);let R;e[5]===Symbol.for("react.memo_cache_sentinel")?(R={activationConstraint:{distance:8}},e[5]=R):R=e[5];const M=dt(ut(gt,R)),F=N=>{const{active:B,over:ce}=N;ce&&(je("org_rail_reordered"),C(He=>Qt(ue(He),S.map(fs),String(B.id),String(ce.id))))},K=N=>{s?.(),r({to:"/$org/home",params:{org:N},viewTransition:!0})},D=N=>{je("org_rail_travel");const B=S.some(ce=>ce.slug===N);C(ce=>Jt(ue(ce),N)),I(N,B?S.map(us):void 0),K(N)},$=!x&&"border-r border-sidebar-border";let L;e[6]!==$?(L=Y("flex w-[68px] shrink-0 flex-col items-center gap-2.5 overflow-y-auto bg-sidebar px-2.5 pt-3 pb-2 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",$),e[6]=$,e[7]=L):L=e[7];let k;e[8]!==o?(k=o("sidebar.rail.ariaLabel"),e[8]=o,e[9]=k):k=e[9];const W=ft,J=ht,G=pt,X=S.map(ds),Se=xt,we=S.map(N=>i.jsxs(q.Fragment,{children:[i.jsx(rs,{org:N,active:N.slug===m,pinned:T.pinned.includes(N.slug),onSelect:N.slug!==l.slug?()=>D(N.slug):p?()=>K(N.slug):void 0,onOpenSettings:()=>{s?.(),r({to:"/$org/settings",params:{org:N.slug}})},onTogglePin:()=>C(B=>Ut(ue(B),N.slug)),onHide:N.slug===l.slug?void 0:()=>C(B=>Yt(ue(B),N.slug))}),N.slug===l.slug&&z.length>0&&i.jsx("div",{style:{viewTransitionName:"rail-projects"},className:"-mx-1.5 flex w-[calc(100%+0.75rem)] flex-col items-center gap-3 rounded-[12px] bg-foreground/4 px-1 py-3",children:z.map(B=>i.jsx(os,{project:B,orgSlug:l.slug,active:p===B.id,onClose:()=>w(B.id),onNavigate:s},B.id))})]},N.id));let V;e[10]!==G||e[11]!==X||e[12]!==Se||e[13]!==we?(V=i.jsx(G,{items:X,strategy:Se,children:we}),e[10]=G,e[11]=X,e[12]=Se,e[13]=we,e[14]=V):V=e[14];let Q;e[15]!==W||e[16]!==F||e[17]!==M||e[18]!==V||e[19]!==J?(Q=i.jsx(W,{sensors:M,collisionDetection:J,onDragEnd:F,children:V}),e[15]=W,e[16]=F,e[17]=M,e[18]=V,e[19]=J,e[20]=Q):Q=e[20];let Z;e[21]!==l.slug||e[22]!==b||e[23]!==S.length||e[24]!==D?(Z=b.length>S.length&&i.jsx(ts,{orgs:b,currentSlug:l.slug,hiddenCount:b.length-S.length,onSelect:D}),e[21]=l.slug,e[22]=b,e[23]=S.length,e[24]=D,e[25]=Z):Z=e[25];let ee;e[26]!==o?(ee=o("sidebar.picker.newOrganization"),e[26]=o,e[27]=ee):ee=e[27];let te;e[28]!==u?(te=()=>u(!0),e[28]=u,e[29]=te):te=e[29];let pe;e[30]===Symbol.for("react.memo_cache_sentinel")?(pe=i.jsx(wt,{size:18}),e[30]=pe):pe=e[30];let se;e[31]!==ee||e[32]!==te?(se=i.jsx(he,{asChild:!0,children:i.jsx("button",{type:"button","aria-label":ee,onClick:te,className:"flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-foreground focus-ring",children:pe})}),e[31]=ee,e[32]=te,e[33]=se):se=e[33];let ne;e[34]!==o?(ne=o("sidebar.picker.newOrganization"),e[34]=o,e[35]=ne):ne=e[35];let ie;e[36]!==ne?(ie=i.jsx(me,{side:"right",children:ne}),e[36]=ne,e[37]=ie):ie=e[37];let re;e[38]!==se||e[39]!==ie?(re=i.jsx(ve,{active:!1,children:i.jsxs(ge,{children:[se,ie]})}),e[38]=se,e[39]=ie,e[40]=re):re=e[40];let oe;e[41]!==v?(oe=v&&i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"my-2 h-px w-6 shrink-0 bg-sidebar-border","aria-hidden":!0}),i.jsx(as,{app:v})]}),e[41]=v,e[42]=oe):oe=e[42];let le;e[43]!==Q||e[44]!==Z||e[45]!==re||e[46]!==oe||e[47]!==L||e[48]!==k?(le=i.jsxs("div",{className:L,"aria-label":k,children:[Q,Z,re,oe]}),e[43]=Q,e[44]=Z,e[45]=re,e[46]=oe,e[47]=L,e[48]=k,e[49]=le):le=e[49];let ae;e[50]!==f||e[51]!==u?(ae=i.jsx(Ct,{open:f,onOpenChange:u}),e[50]=f,e[51]=u,e[52]=ae):ae=e[52];let xe;return e[53]!==le||e[54]!==ae?(xe=i.jsxs(i.Fragment,{children:[le,ae]}),e[53]=le,e[54]=ae,e[55]=xe):xe=e[55],xe}function ds(t){return t.slug}function us(t){return t.slug}function fs(t){return t.slug}function hs(t){return t.isLoading}function ms(t){const e=H.c(15),{width:s,minWidth:o,maxWidth:r,onPointerDown:l,onKeyDown:n,onDoubleClick:a}=t,c=U(),{isMobile:d}=De(),g=Ce();if(d||g)return null;let m;e[0]!==c?(m=c("sidebar.sidebarResizeHandle.ariaLabel"),e[0]=c,e[1]=m):m=e[1];let h;e[2]!==c?(h=c("sidebar.sidebarResizeHandle.title"),e[2]=c,e[3]=h):h=e[3];let f,u;e[4]===Symbol.for("react.memo_cache_sentinel")?(f={left:"var(--sidebar-width)"},u=i.jsx("span",{className:"pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors duration-150 group-hover/resize:bg-border group-active/resize:bg-border group-focus-visible/resize:bg-ring"}),e[4]=f,e[5]=u):(f=e[4],u=e[5]);let x;return e[6]!==r||e[7]!==o||e[8]!==a||e[9]!==n||e[10]!==l||e[11]!==m||e[12]!==h||e[13]!==s?(x=i.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":m,"aria-valuenow":s,"aria-valuemin":o,"aria-valuemax":r,title:h,tabIndex:0,onPointerDown:l,onKeyDown:n,onDoubleClick:a,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize focus-visible:outline-none",style:f,children:u}),e[6]=r,e[7]=o,e[8]=a,e[9]=n,e[10]=l,e[11]=m,e[12]=h,e[13]=s,e[14]=x):x=e[14],x}const Oe=400,Ie=16,gs="sidebar.width.v2";function ps(){const t=H.c(14),e=xs;let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=u=>typeof u=="number"?e(u):192,t[0]=s):s=t[0];const[o,r]=ye(gs,s),l=q.useRef(null);let n;t[1]!==r||t[2]!==o?(n=u=>{u.preventDefault();const x=u.clientX,j=e(o),w=l.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),O=w?Array.from(w.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const v of O)v.style.transition="none";const p=v=>{const z=e(j+(v.clientX-x));w?.style.setProperty("--sidebar-width",`${z}px`)},y=v=>{const z=e(j+(v.clientX-x));r(z);for(const b of O)b.style.transition="";window.removeEventListener("pointermove",p),window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",y),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",p),window.addEventListener("pointerup",y),window.addEventListener("pointercancel",y)},t[1]=r,t[2]=o,t[3]=n):n=t[3];const a=n;let c;t[4]!==r?(c=()=>{r(192)},t[4]=r,t[5]=c):c=t[5];const d=c;let g;t[6]!==r||t[7]!==o?(g=u=>{if(u.key==="ArrowLeft")r(e(o-Ie));else if(u.key==="ArrowRight")r(e(o+Ie));else if(u.key==="Home")r(192);else if(u.key==="End")r(Oe);else return;u.preventDefault()},t[6]=r,t[7]=o,t[8]=g):g=t[8];const m=g,h=e(o);let f;return t[9]!==m||t[10]!==a||t[11]!==d||t[12]!==h?(f={width:h,minWidth:192,maxWidth:Oe,wrapperRef:l,onStartResize:a,onKeyDownResize:m,resetWidth:d},t[9]=m,t[10]=a,t[11]=d,t[12]=h,t[13]=f):f=t[13],f}function xs(t){return Math.max(192,Math.min(Oe,t))}const Be=q.createContext(null);function bs(){const t=q.use(Be);if(!t)throw new Error("Layout regions require a Layout");return t}function js({children:t,notice:e,outsideOrg:s}){const o=ct(),[r,l]=ye(_e.sidebarOpen(),!0),n=ps(),a=Pe();return i.jsx(Be,{value:{isMobile:o,resize:n},children:i.jsx(st,{open:r,onOpenChange:l,children:i.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[e,i.jsxs("div",{className:"flex flex-1 flex-row min-h-0",children:[a&&!s&&i.jsx(cs,{}),!o&&a&&(s?.rail??!0)&&i.jsx(Fe,{}),i.jsx(nt,{ref:n.wrapperRef,className:"flex-1 bg-sidebar relative min-h-0",style:{"--sidebar-width":`${n.width}px`,"--sidebar-width-icon":a?"0px":"3.125rem"},children:i.jsx(it,{children:t})})]})]})})})}function ys(t){const e=H.c(37),{children:s,renderMobile:o}=t,r=U(),{isMobile:l,resize:n}=bs(),{openMobile:a,setOpenMobile:c}=De(),d=Ce(),g=Pe();let m;e[0]!==c?(m=()=>c(!1),e[0]=c,e[1]=m):m=e[1];const h=m;if(!l){const v=g&&d;let z;e[2]!==s||e[3]!==v?(z=i.jsx("div",{className:"contents",inert:v,children:s}),e[2]=s,e[3]=v,e[4]=z):z=e[4];let b;e[5]!==n.maxWidth||e[6]!==n.minWidth||e[7]!==n.onKeyDownResize||e[8]!==n.onStartResize||e[9]!==n.resetWidth||e[10]!==n.width?(b=i.jsx(ms,{width:n.width,minWidth:n.minWidth,maxWidth:n.maxWidth,onPointerDown:n.onStartResize,onKeyDown:n.onKeyDownResize,onDoubleClick:n.resetWidth}),e[5]=n.maxWidth,e[6]=n.minWidth,e[7]=n.onKeyDownResize,e[8]=n.onStartResize,e[9]=n.resetWidth,e[10]=n.width,e[11]=b):b=e[11];let A;return e[12]!==z||e[13]!==b?(A=i.jsxs(i.Fragment,{children:[z,b]}),e[12]=z,e[13]=b,e[14]=A):A=e[14],A}let f;e[15]!==r?(f=r("layouts.shellControls.navigationTitle"),e[15]=r,e[16]=f):f=e[16];let u;e[17]!==f?(u=i.jsx(ot,{className:"sr-only",children:f}),e[17]=f,e[18]=u):u=e[18];let x;e[19]!==h||e[20]!==g?(x=g&&i.jsx(Fe,{onNavigate:h}),e[19]=h,e[20]=g,e[21]=x):x=e[21];let j;e[22]!==h||e[23]!==o?(j=o({onClose:h}),e[22]=h,e[23]=o,e[24]=j):j=e[24];let w;e[25]!==j?(w=i.jsx("div",{className:"min-w-0 flex-1",children:j}),e[25]=j,e[26]=w):w=e[26];let O;e[27]!==x||e[28]!==w?(O=i.jsxs("div",{className:"flex h-full min-h-0",children:[x,w]}),e[27]=x,e[28]=w,e[29]=O):O=e[29];let p;e[30]!==u||e[31]!==O?(p=i.jsxs(lt,{side:"left",hideCloseButton:!0,className:"w-screen max-w-none! p-0",onOpenAutoFocus:vs,children:[u,O]}),e[30]=u,e[31]=O,e[32]=p):p=e[32];let y;return e[33]!==a||e[34]!==c||e[35]!==p?(y=i.jsx(at,{open:a,onOpenChange:c,children:p}),e[33]=a,e[34]=c,e[35]=p,e[36]=y):y=e[36],y}function vs(t){return t.preventDefault()}function Ss(t){const e=H.c(3),{children:s}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={background:"transparent",containerType:"inline-size"},e[0]=o):o=e[0];let r;return e[1]!==s?(r=i.jsx(rt,{className:"flex flex-col min-h-0",style:o,children:i.jsx(tt,{variant:"plain",className:"bg-sidebar",children:i.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:s})})}),e[1]=s,e[2]=r):r=e[2],r}const Hs=Object.assign(js,{Sidebar:ys,Content:Ss});export{Bs as I,Hs as L,Re as O,es as u,Gt as w};
|