@inkeep/open-knowledge 0.4.0-beta.9 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/skills/open-knowledge/SKILL.md +1 -1
- package/dist/cli.mjs +31 -31
- package/dist/constants-BWv15Llm.mjs +2 -0
- package/dist/dist-Bu-MwAbD.mjs +1 -0
- package/dist/{dist-ou5qina8.mjs → dist-D4M20vXU.mjs} +13 -12
- package/dist/{dist-DVM7wH81.mjs → dist-DfIz2LcA.mjs} +15 -15
- package/dist/index.mjs +1 -1
- package/dist/{init-Cw_1Ay1s.mjs → init-B1cOyI0L.mjs} +5 -5
- package/dist/init-DssmNpgE.mjs +1 -0
- package/dist/loader-CHkc9V89.mjs +1 -0
- package/dist/{loader-BTC8Ab4t.mjs → loader-CWaAs1JL.mjs} +3 -3
- package/dist/open-browser-BOeCxs2W.mjs +2 -0
- package/dist/preview-BjoTulUl.mjs +1 -0
- package/dist/{preview-IJyfVtTf.mjs → preview-FAMk9J0z.mjs} +2 -2
- package/dist/public/assets/{ActivityModeContent-1ymqlcHI.js → ActivityModeContent-BS-F_q5b.js} +2 -2
- package/dist/public/assets/DocumentContext-CKgn09Wu.js +37 -0
- package/dist/public/assets/{GraphPanel-DdVygxYk.js → GraphPanel-BYxZ6mOr.js} +2 -2
- package/dist/public/assets/McpConsentDialogBody-C-eBNOSk.js +1 -0
- package/dist/public/assets/{OutlinePanel-dumodx-h.js → OutlinePanel-B1VwD6nb.js} +1 -1
- package/dist/public/assets/SettingsPane-Byz_-VcF.js +11 -0
- package/dist/public/assets/{SourceEditor-CR_7DOAH.js → SourceEditor-CF1C1jlS.js} +2 -2
- package/dist/public/assets/{_baseFor-CX8dsZbW.js → _baseFor-DTImdh6y.js} +1 -1
- package/dist/public/assets/{agent-presence-Ds2n3U5P.js → agent-presence-CaGG2gp7.js} +1 -1
- package/dist/public/assets/{arc-BL_OKZmE.js → arc-VNWsD8TF.js} +1 -1
- package/dist/public/assets/architecture-YZFGNWBL-BiRl99NU.js +1 -0
- package/dist/public/assets/{architectureDiagram-Q4EWVU46-BKKtWWhU.js → architectureDiagram-Q4EWVU46-C7EDVIb_.js} +1 -1
- package/dist/public/assets/{blockDiagram-DXYQGD6D-fzO4vZye.js → blockDiagram-DXYQGD6D-RDoQRmSR.js} +1 -1
- package/dist/public/assets/button-qDXa0MxS.js +1 -0
- package/dist/public/assets/{c4Diagram-AHTNJAMY-BkXqEjiP.js → c4Diagram-AHTNJAMY-DWq5v6f-.js} +1 -1
- package/dist/public/assets/channel-C0UNiHDS.js +1 -0
- package/dist/public/assets/checkbox-kWXLLH40.js +1 -0
- package/dist/public/assets/{chunk-2KRD3SAO-DQj0pw3H.js → chunk-2KRD3SAO-BTibUhx6.js} +1 -1
- package/dist/public/assets/{chunk-336JU56O-CBajDulv.js → chunk-336JU56O-Bm6IwRki.js} +2 -2
- package/dist/public/assets/chunk-426QAEUC-BexV_O4G.js +1 -0
- package/dist/public/assets/{chunk-4BX2VUAB-D8pbSOlJ.js → chunk-4BX2VUAB-Dzrv7xRQ.js} +1 -1
- package/dist/public/assets/{chunk-4TB4RGXK-mA6CujZO.js → chunk-4TB4RGXK-n_VCZ-Dw.js} +1 -1
- package/dist/public/assets/chunk-55IACEB6-yo8vOoww.js +1 -0
- package/dist/public/assets/{chunk-5FUZZQ4R-BVDLgFg2.js → chunk-5FUZZQ4R-CwFS-NM9.js} +1 -1
- package/dist/public/assets/{chunk-5PVQY5BW-Cxi5d3lT.js → chunk-5PVQY5BW-Cf3pEIAB.js} +1 -1
- package/dist/public/assets/{chunk-67CJDMHE-CdrAY8qZ.js → chunk-67CJDMHE-B1qjR6o5.js} +1 -1
- package/dist/public/assets/{chunk-7N4EOEYR-CJ3HBg3c.js → chunk-7N4EOEYR-9LthribN.js} +1 -1
- package/dist/public/assets/{chunk-AA7GKIK3-D0ckJAXt.js → chunk-AA7GKIK3-DFgv_Jxv.js} +1 -1
- package/dist/public/assets/{chunk-BSJP7CBP-D4bNhKd7.js → chunk-BSJP7CBP-BMfaq0VP.js} +1 -1
- package/dist/public/assets/{chunk-CIAEETIT-D1Fpp2md.js → chunk-CIAEETIT-DUfZ-zCl.js} +1 -1
- package/dist/public/assets/{chunk-EDXVE4YY-ChhT3Iyo.js → chunk-EDXVE4YY-BKbUy63F.js} +1 -1
- package/dist/public/assets/{chunk-ENJZ2VHE-Bby39so4.js → chunk-ENJZ2VHE-DIZOQmDi.js} +1 -1
- package/dist/public/assets/{chunk-FMBD7UC4-pRkDIOZn.js → chunk-FMBD7UC4-DA5iFIgZ.js} +1 -1
- package/dist/public/assets/{chunk-FOC6F5B3-BsB4oTj4.js → chunk-FOC6F5B3-DlEcGgqD.js} +1 -1
- package/dist/public/assets/{chunk-ICPOFSXX-CrnuSfeJ.js → chunk-ICPOFSXX-BDU_0nPa.js} +2 -2
- package/dist/public/assets/{chunk-K5T4RW27-CtREah_n.js → chunk-K5T4RW27-CZi_8YH2.js} +1 -1
- package/dist/public/assets/{chunk-KGLVRYIC-DtDxSfKu.js → chunk-KGLVRYIC-q8yxX2UV.js} +1 -1
- package/dist/public/assets/{chunk-LIHQZDEY-D63TRk6j.js → chunk-LIHQZDEY-BqlaDvTQ.js} +1 -1
- package/dist/public/assets/{chunk-ORNJ4GCN-Dv2PvYVu.js → chunk-ORNJ4GCN-B6A2jdfA.js} +1 -1
- package/dist/public/assets/{chunk-OYMX7WX6-BhfqKepC.js → chunk-OYMX7WX6-BtgGgZZ0.js} +1 -1
- package/dist/public/assets/chunk-QZHKN3VN-Dm2czGiD.js +1 -0
- package/dist/public/assets/{chunk-U2HBQHQK-6BAKH95D.js → chunk-U2HBQHQK-LrOM0aht.js} +1 -1
- package/dist/public/assets/{chunk-X2U36JSP-Cqpkx90-.js → chunk-X2U36JSP-CsEhwsxu.js} +1 -1
- package/dist/public/assets/{chunk-XPW4576I-DSytTnq4.js → chunk-XPW4576I-D3W7wPR1.js} +1 -1
- package/dist/public/assets/{chunk-YZCP3GAM-Dt9awjVh.js → chunk-YZCP3GAM-C2TR8l-U.js} +1 -1
- package/dist/public/assets/{chunk-ZZ45TVLE-JGFITgiO.js → chunk-ZZ45TVLE-DGa_Hgat.js} +1 -1
- package/dist/public/assets/classDiagram-6PBFFD2Q-DqMO_sxB.js +1 -0
- package/dist/public/assets/classDiagram-v2-HSJHXN6E-BbC-74zc.js +1 -0
- package/dist/public/assets/clone-DpRB82L-.js +1 -0
- package/dist/public/assets/config-validation-events-BX5T6Pv4.js +7 -0
- package/dist/public/assets/{cose-bilkent-S5V4N54A-B9nG-SHi.js → cose-bilkent-S5V4N54A-cxoevGhk.js} +1 -1
- package/dist/public/assets/{dagre-BEdPLXba.js → dagre-DoC3Vx7E.js} +1 -1
- package/dist/public/assets/{dagre-KV5264BT-DKn5nGCC.js → dagre-KV5264BT-CjRUxU3J.js} +1 -1
- package/dist/public/assets/{diagram-5BDNPKRD-BQuwYEd0.js → diagram-5BDNPKRD-DlgILr6_.js} +1 -1
- package/dist/public/assets/{diagram-G4DWMVQ6-BmzIMyV5.js → diagram-G4DWMVQ6-CA3PL8En.js} +1 -1
- package/dist/public/assets/{diagram-MMDJMWI5-CI5eJfgr.js → diagram-MMDJMWI5-DVx-bZhM.js} +1 -1
- package/dist/public/assets/{diagram-TYMM5635-Cc8TJ7v3.js → diagram-TYMM5635-DCl_Xx4h.js} +1 -1
- package/dist/public/assets/dialog-CV9Q4JrD.js +45 -0
- package/dist/public/assets/{dist-nPpvoMNC.js → dist-BEF_m-Pp.js} +1 -1
- package/dist/public/assets/{dist-BH1b1nWB.js → dist-BJPjDIRr.js} +1 -1
- package/dist/public/assets/{dist-S8LJmtzL.js → dist-Bf3rdSRu.js} +1 -1
- package/dist/public/assets/{dist-D08h1pJc.js → dist-ByDNshqn.js} +1 -1
- package/dist/public/assets/{dist-B4kUko7n.js → dist-CSfB7p8y.js} +1 -1
- package/dist/public/assets/{dist-VyzSEzD4.js → dist-DVWct0HX.js} +1 -1
- package/dist/public/assets/{dist-BOapDt7N.js → dist-Gvva1zQ6.js} +1 -1
- package/dist/public/assets/{doc-hash-Q6dTjwu5.js → doc-hash-CfmBVnag.js} +90 -90
- package/dist/public/assets/{erDiagram-SMLLAGMA-BkrhGWMT.js → erDiagram-SMLLAGMA-ChTvmoDx.js} +1 -1
- package/dist/public/assets/{flatten-UmyAv3V9.js → flatten-DXpXo4tl.js} +1 -1
- package/dist/public/assets/{flowDiagram-DWJPFMVM-qh62fanI.js → flowDiagram-DWJPFMVM-8ceKQudh.js} +1 -1
- package/dist/public/assets/{ganttDiagram-T4ZO3ILL-DXuCeCk6.js → ganttDiagram-T4ZO3ILL-uadeK_KN.js} +1 -1
- package/dist/public/assets/gitGraph-7Q5UKJZL-CN7yaTu1.js +1 -0
- package/dist/public/assets/{gitGraphDiagram-UUTBAWPF-BbcuenPj.js → gitGraphDiagram-UUTBAWPF-BcANz6_Q.js} +1 -1
- package/dist/public/assets/{graphlib-CasrTmMJ.js → graphlib-D3l3HBM4.js} +1 -1
- package/dist/public/assets/index-B4T9ZPge.js +1854 -0
- package/dist/public/assets/index-DFiz58v4.css +1 -0
- package/dist/public/assets/info-OMHHGYJF-oSrA8B1G.js +1 -0
- package/dist/public/assets/{infoDiagram-42DDH7IO-WFAMbO2S.js → infoDiagram-42DDH7IO-qKcHjiUa.js} +1 -1
- package/dist/public/assets/{isEmpty-DWJlzxR1.js → isEmpty-D9j5AQZB.js} +1 -1
- package/dist/public/assets/isSymbol-C4J31wCa.js +1 -0
- package/dist/public/assets/{ishikawaDiagram-UXIWVN3A-BJBiReWg.js → ishikawaDiagram-UXIWVN3A-DyndBZjz.js} +1 -1
- package/dist/public/assets/{journeyDiagram-VCZTEJTY-Boq77pl6.js → journeyDiagram-VCZTEJTY-CTiuXUzg.js} +1 -1
- package/dist/public/assets/{kanban-definition-6JOO6SKY-DYMSr18F.js → kanban-definition-6JOO6SKY-D03tqXqX.js} +1 -1
- package/dist/public/assets/label-BOVWulDu.js +1 -0
- package/dist/public/assets/{line-_p5Px7MV.js → line-CZuyNGqX.js} +1 -1
- package/dist/public/assets/{linear-DwuDS4qT.js → linear-CoY1VP-w.js} +1 -1
- package/dist/public/assets/{mermaid-parser.core-BcBb_Ows.js → mermaid-parser.core-D4O7MeLl.js} +2 -2
- package/dist/public/assets/{mermaid.core-ZLTnLqVQ.js → mermaid.core-4xgx5kDJ.js} +3 -3
- package/dist/public/assets/{mindmap-definition-QFDTVHPH-BSxM4djR.js → mindmap-definition-QFDTVHPH-BaMNW13B.js} +1 -1
- package/dist/public/assets/{now-BBH4UqDm.js → now-CJgVN_7h.js} +1 -1
- package/dist/public/assets/{ordinal-CeOFUmRv.js → ordinal-BZbu6HlW.js} +1 -1
- package/dist/public/assets/packet-4T2RLAQJ-N-KqWOhj.js +1 -0
- package/dist/public/assets/{panel-BgMqDESF.js → panel-BaN47PCr.js} +1 -1
- package/dist/public/assets/pie-ZZUOXDRM-BcRf7Q2g.js +1 -0
- package/dist/public/assets/{pieDiagram-DEJITSTG-CHRE_Jie.js → pieDiagram-DEJITSTG-_dBzvPAb.js} +1 -1
- package/dist/public/assets/{propagation-api-qAYD7s-v.js → propagation-api-CuTE-jIt.js} +1 -1
- package/dist/public/assets/{quadrantDiagram-34T5L4WZ-CQkE5TwH.js → quadrantDiagram-34T5L4WZ-jnOwhGSn.js} +1 -1
- package/dist/public/assets/radar-PYXPWWZC-CqcGRFrW.js +1 -0
- package/dist/public/assets/{reduce-DotyoGA7.js → reduce-Cn1fAmcq.js} +1 -1
- package/dist/public/assets/{requirementDiagram-MS252O5E-DHK98tKS.js → requirementDiagram-MS252O5E-DpZY5MOe.js} +1 -1
- package/dist/public/assets/{sankeyDiagram-XADWPNL6-BIXaStZh.js → sankeyDiagram-XADWPNL6-CNLrFRka.js} +1 -1
- package/dist/public/assets/{sequenceDiagram-FGHM5R23-BCNH3kJo.js → sequenceDiagram-FGHM5R23-Cqjio9cN.js} +1 -1
- package/dist/public/assets/{src-C9jsS3p4.js → src-CVigMQ0t.js} +1 -1
- package/dist/public/assets/{stateDiagram-FHFEXIEX-BC5mjB6x.js → stateDiagram-FHFEXIEX-rE9sZdwc.js} +1 -1
- package/dist/public/assets/stateDiagram-v2-QKLJ7IA2-CrJSNsUc.js +1 -0
- package/dist/public/assets/{target-navigation-intent-BfGOumP6.js → target-navigation-intent-CNDuSbLi.js} +1 -1
- package/dist/public/assets/{telemetry-impl-CMeDUVKn.js → telemetry-impl-iq6UBtaA.js} +2 -2
- package/dist/public/assets/{timeline-definition-GMOUNBTQ-VNxUGgXp.js → timeline-definition-GMOUNBTQ-B_X3o8J_.js} +1 -1
- package/dist/public/assets/tooltip-csUfbEtd.js +1 -0
- package/dist/public/assets/treeView-SZITEDCU-B1rO_oUt.js +1 -0
- package/dist/public/assets/treemap-W4RFUUIX-DXE3h2Bn.js +1 -0
- package/dist/public/assets/{vennDiagram-DHZGUBPP-DV2Y2j0r.js → vennDiagram-DHZGUBPP-Cs25K1vw.js} +1 -1
- package/dist/public/assets/wardley-RL74JXVD-ChWi2iyS.js +1 -0
- package/dist/public/assets/{wardleyDiagram-NUSXRM2D-C1mMZ3kx.js → wardleyDiagram-NUSXRM2D-RgfpVD8G.js} +1 -1
- package/dist/public/assets/{xychartDiagram-5P7HB3ND-CxFcwN2X.js → xychartDiagram-5P7HB3ND-BrRrEDJB.js} +1 -1
- package/dist/public/index.html +20 -19
- package/dist/src-B_Vh13Py.mjs +1 -0
- package/dist/{start-BDIOjX_O.mjs → start-CSRc43Yr.mjs} +2 -2
- package/dist/start-DVUu2YvT.mjs +1 -0
- package/package.json +1 -1
- package/dist/constants-CswmjLU5.mjs +0 -2
- package/dist/dist-BToVkFhc.mjs +0 -1
- package/dist/init-C90VliDt.mjs +0 -1
- package/dist/loader-BOTBqos-.mjs +0 -1
- package/dist/open-browser-BZZK_gJj.mjs +0 -2
- package/dist/preview-CGUMKfC0.mjs +0 -1
- package/dist/public/assets/DocumentContext-bvfr7pL2.js +0 -37
- package/dist/public/assets/McpConsentDialogBody-CJwPf_uv.js +0 -1
- package/dist/public/assets/SettingsPane-CtgbQZxP.js +0 -6
- package/dist/public/assets/architecture-YZFGNWBL-DVxNz-zn.js +0 -1
- package/dist/public/assets/button-BsFpqlpT.js +0 -1
- package/dist/public/assets/channel-CR-xJel6.js +0 -1
- package/dist/public/assets/chunk-426QAEUC-BoBKbVmN.js +0 -1
- package/dist/public/assets/chunk-55IACEB6-CqVyNzhX.js +0 -1
- package/dist/public/assets/chunk-QZHKN3VN-DBRWHtgj.js +0 -1
- package/dist/public/assets/classDiagram-6PBFFD2Q-oopM_Z0m.js +0 -1
- package/dist/public/assets/classDiagram-v2-HSJHXN6E-ZAL74u9S.js +0 -1
- package/dist/public/assets/clone-C5y6xhRJ.js +0 -1
- package/dist/public/assets/config-validation-events-BvuBj41U.js +0 -1
- package/dist/public/assets/dialog-Cv1qneWl.js +0 -45
- package/dist/public/assets/gitGraph-7Q5UKJZL-CYhZlmk3.js +0 -1
- package/dist/public/assets/index-BBbaN3Kd.js +0 -1858
- package/dist/public/assets/index-DOkkqO-8.css +0 -1
- package/dist/public/assets/info-OMHHGYJF-BslcKZhH.js +0 -1
- package/dist/public/assets/isSymbol-BP7IOIqG.js +0 -1
- package/dist/public/assets/mcp-consent-store-BBTXqzE6.js +0 -1
- package/dist/public/assets/packet-4T2RLAQJ-QVnYA304.js +0 -1
- package/dist/public/assets/pie-ZZUOXDRM-C61c5byc.js +0 -1
- package/dist/public/assets/radar-PYXPWWZC-CMxjRtd8.js +0 -1
- package/dist/public/assets/stateDiagram-v2-QKLJ7IA2-B8L3BBt1.js +0 -1
- package/dist/public/assets/tooltip-CBGDOTMI.js +0 -1
- package/dist/public/assets/treeView-SZITEDCU-DfSa_Oiv.js +0 -1
- package/dist/public/assets/treemap-W4RFUUIX-Cp0s5wEq.js +0 -1
- package/dist/public/assets/wardley-RL74JXVD-CXcBKCuj.js +0 -1
- package/dist/src-DXx7F2B7.mjs +0 -1
- package/dist/start-DmOxN4Ez.mjs +0 -1
- /package/dist/public/assets/{ActivityPanelDiffView-DoHWP1ak.js → ActivityPanelDiffView-B_49ivYc.js} +0 -0
- /package/dist/public/assets/{__vite-browser-external-FEGw1XPd.js → __vite-browser-external-6Gb3h3lj.js} +0 -0
- /package/dist/public/assets/{array-X0JlPOfd.js → array-DO1uCttT.js} +0 -0
- /package/dist/public/assets/{colors-XIJoz9Bd.js → colors-BjbB2MOj.js} +0 -0
- /package/dist/public/assets/{cytoscape.esm-BkjNfcSF.js → cytoscape.esm-AyAnQ5hQ.js} +0 -0
- /package/dist/public/assets/{defaultLocale-ZxyFnXCb.js → defaultLocale-B6RGN4id.js} +0 -0
- /package/dist/public/assets/{dist-CIRuNcH5.js → dist-0bM9CqzR.js} +0 -0
- /package/dist/public/assets/{go-a33xvodr.js → go-BRhAdNMM.js} +0 -0
- /package/dist/public/assets/{init-CBj3ecIW.js → init-BmUWJJHz.js} +0 -0
- /package/dist/public/assets/{isObjectLike-AdQZ65l0.js → isObjectLike-CjYO71dq.js} +0 -0
- /package/dist/public/assets/{katex-qwlL5fSd.js → katex-DBuiuHex.js} +0 -0
- /package/dist/public/assets/{min-HKuGSUqa.js → min-CwjSmrJ6.js} +0 -0
- /package/dist/public/assets/{path-rUlDLHdA.js → path-CoPyR7c2.js} +0 -0
- /package/dist/public/assets/{pdf-a35ddrIO.js → pdf-DaFpV-4n.js} +0 -0
- /package/dist/public/assets/{pdf.worker-CM-zAFN-.js → pdf.worker-Cq62cyp3.js} +0 -0
- /package/dist/public/assets/{rough.esm-BFJ-MgcB.js → rough.esm-ec8xsRC7.js} +0 -0
- /package/dist/public/assets/{shell-40VLet8r.js → shell-DT_H80Gx.js} +0 -0
- /package/dist/public/assets/{src-zyMpT2LE.js → src-CWigLjcs.js} +0 -0
- /package/dist/public/assets/{stex-BKMR5xQj.js → stex-DQW679lh.js} +0 -0
- /package/dist/public/assets/{trace-api-DPMyR1_m.js → trace-api-CbLDdnQA.js} +0 -0
- /package/dist/public/assets/{w3c-keyname-Dfj2imOv.js → w3c-keyname-B5t0fahT.js} +0 -0
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./mermaid.core-ZLTnLqVQ.js","./preload-helper-2ej06EnG.js","./chunk-U2HBQHQK-6BAKH95D.js","./src-C9jsS3p4.js","./chunk-CFjPhJqf.js","./src-zyMpT2LE.js","./chunk-5PVQY5BW-Cxi5d3lT.js","./dist-CIRuNcH5.js","./chunk-ICPOFSXX-CrnuSfeJ.js","./_baseFor-CX8dsZbW.js","./isObjectLike-AdQZ65l0.js","./isEmpty-DWJlzxR1.js","./chunk-336JU56O-CBajDulv.js","./chunk-5FUZZQ4R-BVDLgFg2.js","./chunk-X2U36JSP-Cqpkx90-.js","./chunk-ZZ45TVLE-JGFITgiO.js","./rough.esm-BFJ-MgcB.js","./chunk-ENJZ2VHE-Bby39so4.js","./line-_p5Px7MV.js","./path-rUlDLHdA.js","./array-X0JlPOfd.js","./chunk-BSJP7CBP-D4bNhKd7.js","./chunk-426QAEUC-BoBKbVmN.js","./chunk-XPW4576I-DSytTnq4.js","./pdf-a35ddrIO.js","./dist-BOapDt7N.js","./dist-nPpvoMNC.js","./w3c-keyname-Dfj2imOv.js","./dist-D08h1pJc.js","./dist-VyzSEzD4.js","./dist-B4kUko7n.js","./dist-S8LJmtzL.js","./dist-BH1b1nWB.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{o as e,t}from"./chunk-CFjPhJqf.js";import{t as n}from"./preload-helper-2ej06EnG.js";import{n as r,r as i,t as a}from"./compiler-runtime-CVnuRdak.js";import{$ as o,$n as s,$t as c,An as l,B as u,Bn as d,C as f,Cn as p,D as m,Dn as h,Dt as g,E as _,En as v,Et as y,F as b,Fn as x,Ft as S,G as C,Gn as w,H as T,Ht as E,In as D,It as O,J as k,Jn as A,Jt as j,K as M,Kn as N,L as P,Ln as F,Lt as I,Mn as L,Mt as R,Nn as z,Nt as B,On as V,Ot as H,P as U,Pn as W,Pt as ee,Q as te,Qn as ne,Qt as re,R as ie,Rn as ae,S as oe,Sn as se,T as ce,Tn as le,Ut as ue,V as de,Vn as fe,W as pe,Wt as me,X as he,Y as ge,Yn as _e,Z as ve,Zt as ye,_n as be,_t as xe,a as Se,ar as Ce,bt as we,c as Te,cr as Ee,ct as De,d as Oe,dn as ke,dr as Ae,er as je,et as Me,f as Ne,fr as Pe,g as Fe,gn as Ie,gt as Le,h as Re,hn as ze,ht as Be,i as Ve,ir as He,j as Ue,jn as We,jt as Ge,kn as Ke,l as qe,ln as Je,lt as Ye,mn as Xe,mr as Ze,n as Qe,nn as $e,o as et,or as tt,p as nt,pn as rt,q as it,qn as at,qt as ot,r as st,rr as ct,sr as lt,st as ut,tn as dt,u as ft,un as pt,ur as mt,ut as ht,vn as gt,w as _t,wt as vt,xt as yt,yn as bt,yt as xt,z as St,zn as Ct,zt as wt}from"./doc-hash-Q6dTjwu5.js";import{C as G,S as Tt,_ as Et,a as Dt,c as Ot,d as kt,f as At,h as jt,l as Mt,m as Nt,o as Pt,r as Ft,s as It,t as Lt,u as Rt,v as zt,w as Bt,x as Vt}from"./button-BsFpqlpT.js";import{S as Ht,_ as Ut,a as Wt,c as Gt,d as Kt,f as qt,g as Jt,h as Yt,i as Xt,m as Zt,n as Qt,o as $t,p as en,s as tn,t as nn,u as rn,v as an,x as on,y as sn}from"./dialog-Cv1qneWl.js";import{n as cn,t as ln}from"./propagation-api-qAYD7s-v.js";import{B as un,Bt as dn,D as fn,Et as pn,G as mn,H as hn,I as gn,K as _n,L as K,M as vn,N as yn,Nt as bn,P as xn,Pt as Sn,Tt as Cn,U as wn,V as Tn,W as En,Y as Dn,Z as On,_ as kn,a as An,b as jn,f as Mn,h as Nn,i as Pn,j as Fn,jt as In,k as Ln,kt as Rn,l as zn,lt as Bn,o as Vn,p as Hn,q as Un,r as Wn,s as Gn,t as Kn,u as qn,w as Jn,wt as Yn,y as Xn,z as Zn}from"./dist-nPpvoMNC.js";import{a as Qn,c as $n,s as er,t as tr}from"./dist-S8LJmtzL.js";import{i as nr,n as rr,r as ir,t as ar}from"./dist-D08h1pJc.js";var or=G(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),sr=G(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),cr=G(`book-open`,[[`path`,{d:`M12 7v14`,key:`1akyts`}],[`path`,{d:`M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z`,key:`ruj8y`}]]),lr=G(`box`,[[`path`,{d:`M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z`,key:`hh9hay`}],[`path`,{d:`m3.3 7 8.7 5 8.7-5`,key:`g66t2b`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}]]),ur=G(`bug`,[[`path`,{d:`M12 20v-9`,key:`1qisl0`}],[`path`,{d:`M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z`,key:`uouzyp`}],[`path`,{d:`M14.12 3.88 16 2`,key:`qol33r`}],[`path`,{d:`M21 21a4 4 0 0 0-3.81-4`,key:`1b0z45`}],[`path`,{d:`M21 5a4 4 0 0 1-3.55 3.97`,key:`5cxbf6`}],[`path`,{d:`M22 13h-4`,key:`1jl80f`}],[`path`,{d:`M3 21a4 4 0 0 1 3.81-4`,key:`1fjd4g`}],[`path`,{d:`M3 5a4 4 0 0 0 3.55 3.97`,key:`1d7oge`}],[`path`,{d:`M6 13H2`,key:`82j7cp`}],[`path`,{d:`m8 2 1.88 1.88`,key:`fmnt4t`}],[`path`,{d:`M9 7.13V6a3 3 0 1 1 6 0v1.13`,key:`1vgav8`}]]),dr=G(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),fr=G(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),pr=G(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),mr=G(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),hr=G(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),gr=G(`circle-question-mark`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),_r=G(`circle-x`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),vr=G(`clipboard-list`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}],[`path`,{d:`M12 11h4`,key:`1jrz19`}],[`path`,{d:`M12 16h4`,key:`n85exb`}],[`path`,{d:`M8 11h.01`,key:`1dfujw`}],[`path`,{d:`M8 16h.01`,key:`18s6g9`}]]),yr=G(`code-xml`,[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]]),br=G(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),xr=G(`file-image`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`circle`,{cx:`10`,cy:`12`,r:`2`,key:`737tya`}],[`path`,{d:`m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22`,key:`wt3hpn`}]]),Sr=G(`file-plus-corner`,[[`path`,{d:`M11.35 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v5.35`,key:`17jvcc`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M14 19h6`,key:`bvotb8`}],[`path`,{d:`M17 16v6`,key:`18yu1i`}]]),Cr=G(`file`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}]]),wr=G(`flask-conical`,[[`path`,{d:`M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2`,key:`18mbvz`}],[`path`,{d:`M6.453 15h11.094`,key:`3shlmq`}],[`path`,{d:`M8.5 2h7`,key:`csnxdl`}]]),Tr=G(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),Er=G(`hash`,[[`line`,{x1:`4`,x2:`20`,y1:`9`,y2:`9`,key:`4lhtct`}],[`line`,{x1:`4`,x2:`20`,y1:`15`,y2:`15`,key:`vyu0kd`}],[`line`,{x1:`10`,x2:`8`,y1:`3`,y2:`21`,key:`1ggp8o`}],[`line`,{x1:`16`,x2:`14`,y1:`3`,y2:`21`,key:`weycgp`}]]),Dr=G(`heading-1`,[[`path`,{d:`M4 12h8`,key:`17cfdx`}],[`path`,{d:`M4 18V6`,key:`1rz3zl`}],[`path`,{d:`M12 18V6`,key:`zqpxq5`}],[`path`,{d:`m17 12 3-2v8`,key:`1hhhft`}]]),Or=G(`heading-2`,[[`path`,{d:`M4 12h8`,key:`17cfdx`}],[`path`,{d:`M4 18V6`,key:`1rz3zl`}],[`path`,{d:`M12 18V6`,key:`zqpxq5`}],[`path`,{d:`M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1`,key:`9jr5yi`}]]),kr=G(`heading-3`,[[`path`,{d:`M4 12h8`,key:`17cfdx`}],[`path`,{d:`M4 18V6`,key:`1rz3zl`}],[`path`,{d:`M12 18V6`,key:`zqpxq5`}],[`path`,{d:`M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2`,key:`68ncm8`}],[`path`,{d:`M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2`,key:`1ejuhz`}]]),Ar=G(`image`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]),jr=G(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),Mr=G(`lightbulb`,[[`path`,{d:`M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5`,key:`1gvzjb`}],[`path`,{d:`M9 18h6`,key:`x1upvd`}],[`path`,{d:`M10 22h4`,key:`ceow96`}]]),Nr=G(`list-ordered`,[[`path`,{d:`M11 5h10`,key:`1cz7ny`}],[`path`,{d:`M11 12h10`,key:`1438ji`}],[`path`,{d:`M11 19h10`,key:`11t30w`}],[`path`,{d:`M4 4h1v5`,key:`10yrso`}],[`path`,{d:`M4 9h2`,key:`r1h2o0`}],[`path`,{d:`M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02`,key:`xtkcd5`}]]),Pr=G(`list-todo`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`rect`,{x:`3`,y:`4`,width:`6`,height:`6`,rx:`1`,key:`cif1o7`}]]),Fr=G(`list`,[[`path`,{d:`M3 5h.01`,key:`18ugdj`}],[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M3 19h.01`,key:`noohij`}],[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M8 12h13`,key:`1za7za`}],[`path`,{d:`M8 19h13`,key:`m83p4d`}]]),Ir=G(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),Lr=G(`message-square-warning`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M12 15h.01`,key:`q59x07`}],[`path`,{d:`M12 7v4`,key:`xawao1`}]]),Rr=G(`minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),zr=G(`octagon-alert`,[[`path`,{d:`M12 16h.01`,key:`1drbdi`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z`,key:`1fd625`}]]),Br=G(`panel-left`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]]),Vr=G(`pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),Hr=G(`quote`,[[`path`,{d:`M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z`,key:`rib7q0`}],[`path`,{d:`M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z`,key:`1ymkrd`}]]),Ur=G(`settings-2`,[[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`path`,{d:`M19 7h-9`,key:`6i9tg`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]),Wr=G(`sigma`,[[`path`,{d:`M18 7V5a1 1 0 0 0-1-1H6.5a.5.5 0 0 0-.4.8l4.5 6a2 2 0 0 1 0 2.4l-4.5 6a.5.5 0 0 0 .4.8H17a1 1 0 0 0 1-1v-2`,key:`wuwx1p`}]]),Gr=G(`square-play`,[[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}],[`path`,{d:`M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z`,key:`kmsa83`}]]),Kr=G(`superscript`,[[`path`,{d:`m4 19 8-8`,key:`hr47gm`}],[`path`,{d:`m12 19-8-8`,key:`1dhhmo`}],[`path`,{d:`M20 12h-4c0-1.5.442-2 1.5-2.5S20 8.334 20 7.002c0-.472-.17-.93-.484-1.29a2.105 2.105 0 0 0-2.617-.436c-.42.239-.738.614-.899 1.06`,key:`1dfcux`}]]),qr=G(`table-2`,[[`path`,{d:`M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18`,key:`gugj83`}]]),Jr=G(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),Yr=G(`unlink-2`,[[`path`,{d:`M15 7h2a5 5 0 0 1 0 10h-2m-6 0H7A5 5 0 0 1 7 7h2`,key:`1re2ne`}]]),Xr=G(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]),Zr=G(`volume-2`,[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`path`,{d:`M16 9a5 5 0 0 1 0 6`,key:`1q6k2b`}],[`path`,{d:`M19.364 18.364a9 9 0 0 0 0-12.728`,key:`ijwkga`}]]),Qr=G(`workflow`,[[`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`,key:`by2w9f`}],[`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`,key:`xkn7yn`}],[`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`,key:`1cgmvn`}]]),$r=G(`zap`,[[`path`,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`,key:`1xq2db`}]]),ei=G(`zoom-in`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`,key:`13gj7c`}],[`line`,{x1:`11`,x2:`11`,y1:`8`,y2:`14`,key:`1vmskp`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`,key:`durymu`}]]),ti=G(`zoom-out`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`,key:`13gj7c`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`,key:`durymu`}]]),q=e(r(),1),J=i(),ni=`Collapsible`,[ri,ii]=Nt(ni),[ai,oi]=ri(ni),si=q.forwardRef((e,t)=>{let{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[c,l]=Rt({prop:r,defaultProp:i??!1,onChange:o,caller:ni});return(0,J.jsx)(ai,{scope:n,disabled:a,contentId:Ot(),open:c,onOpenToggle:q.useCallback(()=>l(e=>!e),[l]),children:(0,J.jsx)(jt.div,{"data-state":pi(c),"data-disabled":a?``:void 0,...s,ref:t})})});si.displayName=ni;var ci=`CollapsibleTrigger`,li=q.forwardRef((e,t)=>{let{__scopeCollapsible:n,...r}=e,i=oi(ci,n);return(0,J.jsx)(jt.button,{type:`button`,"aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":pi(i.open),"data-disabled":i.disabled?``:void 0,disabled:i.disabled,...r,ref:t,onClick:At(e.onClick,i.onOpenToggle)})});li.displayName=ci;var ui=`CollapsibleContent`,di=q.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=oi(ui,e.__scopeCollapsible);return(0,J.jsx)(Mt,{present:n||i.open,children:({present:e})=>(0,J.jsx)(fi,{...r,ref:t,present:e})})});di.displayName=ui;var fi=q.forwardRef((e,t)=>{let{__scopeCollapsible:n,present:r,children:i,...a}=e,o=oi(ui,n),[s,c]=q.useState(r),l=q.useRef(null),u=Vt(t,l),d=q.useRef(0),f=d.current,p=q.useRef(0),m=p.current,h=o.open||s,g=q.useRef(h),_=q.useRef(void 0);return q.useEffect(()=>{let e=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(e)},[]),kt(()=>{let e=l.current;if(e){_.current=_.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration=`0s`,e.style.animationName=`none`;let t=e.getBoundingClientRect();d.current=t.height,p.current=t.width,g.current||(e.style.transitionDuration=_.current.transitionDuration,e.style.animationName=_.current.animationName),c(r)}},[o.open,r]),(0,J.jsx)(jt.div,{"data-state":pi(o.open),"data-disabled":o.disabled?``:void 0,id:o.contentId,hidden:!h,...a,ref:u,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:h&&i})});function pi(e){return e?`open`:`closed`}var mi=si,hi=li,gi=di,_i=t((e=>{var t=r();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:n,a=t.useState,o=t.useEffect,s=t.useLayoutEffect,c=t.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),vi=t(((e,t)=>{t.exports=_i()})),yi=e(Bt(),1);function bi(e){let t=q.useRef({value:e,previous:e});return q.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function xi(e,[t,n]){return Math.min(n,Math.max(t,e))}var Si=`Popover`,[Ci,wi]=Nt(Si,[_e]),Ti=_e(),[Ei,Di]=Ci(Si),Oi=e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=Ti(t),c=q.useRef(null),[l,u]=q.useState(!1),[d,f]=Rt({prop:r,defaultProp:i??!1,onChange:a,caller:Si});return(0,J.jsx)(A,{...s,children:(0,J.jsx)(Ei,{scope:t,contentId:Ot(),triggerRef:c,open:d,onOpenChange:f,onOpenToggle:q.useCallback(()=>f(e=>!e),[f]),hasCustomAnchor:l,onCustomAnchorAdd:q.useCallback(()=>u(!0),[]),onCustomAnchorRemove:q.useCallback(()=>u(!1),[]),modal:o,children:n})})};Oi.displayName=Si;var ki=`PopoverAnchor`,Ai=q.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=Di(ki,n),a=Ti(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return q.useEffect(()=>(o(),()=>s()),[o,s]),(0,J.jsx)(w,{...a,...r,ref:t})});Ai.displayName=ki;var ji=`PopoverTrigger`,Mi=q.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=Di(ji,n),a=Ti(n),o=Vt(t,i.triggerRef),s=(0,J.jsx)(jt.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":qi(i.open),...r,ref:o,onClick:At(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,J.jsx)(w,{asChild:!0,...a,children:s})});Mi.displayName=ji;var Ni=`PopoverPortal`,[Pi,Fi]=Ci(Ni,{forceMount:void 0}),Ii=e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=Di(Ni,t);return(0,J.jsx)(Pi,{scope:t,forceMount:n,children:(0,J.jsx)(Mt,{present:n||a.open,children:(0,J.jsx)(Dt,{asChild:!0,container:i,children:r})})})};Ii.displayName=Ni;var Li=`PopoverContent`,Ri=q.forwardRef((e,t)=>{let n=Fi(Li,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=Di(Li,e.__scopePopover);return(0,J.jsx)(Mt,{present:r||a.open,children:a.modal?(0,J.jsx)(Bi,{...i,ref:t}):(0,J.jsx)(Vi,{...i,ref:t})})});Ri.displayName=Li;var zi=zt(`PopoverContent.RemoveScroll`),Bi=q.forwardRef((e,t)=>{let n=Di(Li,e.__scopePopover),r=q.useRef(null),i=Vt(t,r),a=q.useRef(!1);return q.useEffect(()=>{let e=r.current;if(e)return Jt(e)},[]),(0,J.jsx)(Ut,{as:zi,allowPinchZoom:!0,children:(0,J.jsx)(Hi,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:At(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:At(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;a.current=t.button===2||n},{checkForDefaultPrevented:!1}),onFocusOutside:At(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),Vi=q.forwardRef((e,t)=>{let n=Di(Li,e.__scopePopover),r=q.useRef(!1),i=q.useRef(!1);return(0,J.jsx)(Hi,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),Hi=q.forwardRef((e,t)=>{let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=e,f=Di(Li,n),p=Ti(n);return an(),(0,J.jsx)(sn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,J.jsx)(Pt,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),children:(0,J.jsx)(at,{"data-state":qi(f.open),role:`dialog`,id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})}),Ui=`PopoverClose`,Wi=q.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=Di(Ui,n);return(0,J.jsx)(jt.button,{type:`button`,...r,ref:t,onClick:At(e.onClick,()=>i.onOpenChange(!1))})});Wi.displayName=Ui;var Gi=`PopoverArrow`,Ki=q.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=Ti(n);return(0,J.jsx)(N,{...i,...r,ref:t})});Ki.displayName=Gi;function qi(e){return e?`open`:`closed`}var Ji=Oi,Yi=Ai,Xi=Mi,Zi=Ii,Qi=Ri,$i=[` `,`Enter`,`ArrowUp`,`ArrowDown`],ea=[` `,`Enter`],ta=`Select`,[na,ra,ia]=Ee(ta),[aa,oa]=Nt(ta,[ia,_e]),sa=_e(),[ca,la]=aa(ta),[ua,da]=aa(ta),fa=e=>{let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:p,form:m}=e,h=sa(t),[g,_]=q.useState(null),[v,y]=q.useState(null),[b,x]=q.useState(!1),S=lt(l),[C,w]=Rt({prop:r,defaultProp:i??!1,onChange:a,caller:ta}),[T,E]=Rt({prop:o,defaultProp:s,onChange:c,caller:ta}),D=q.useRef(null),O=g?m||!!g.closest(`form`):!0,[k,j]=q.useState(new Set),M=Array.from(k).map(e=>e.props.value).join(`;`);return(0,J.jsx)(A,{...h,children:(0,J.jsxs)(ca,{required:p,scope:t,trigger:g,onTriggerChange:_,valueNode:v,onValueNodeChange:y,valueNodeHasChildren:b,onValueNodeHasChildrenChange:x,contentId:Ot(),value:T,onValueChange:E,open:C,onOpenChange:w,dir:S,triggerPointerDownPosRef:D,disabled:f,children:[(0,J.jsx)(na.Provider,{scope:t,children:(0,J.jsx)(ua,{scope:e.__scopeSelect,onNativeOptionAdd:q.useCallback(e=>{j(t=>new Set(t).add(e))},[]),onNativeOptionRemove:q.useCallback(e=>{j(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:n})}),O?(0,J.jsxs)(so,{"aria-hidden":!0,required:p,tabIndex:-1,name:u,autoComplete:d,value:T,onChange:e=>E(e.target.value),disabled:f,form:m,children:[T===void 0?(0,J.jsx)(`option`,{value:``}):null,Array.from(k)]},M):null]})})};fa.displayName=ta;var pa=`SelectTrigger`,ma=q.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...i}=e,a=sa(n),o=la(pa,n),s=o.disabled||r,c=Vt(t,o.onTriggerChange),l=ra(n),u=q.useRef(`touch`),[d,f,p]=lo(e=>{let t=l().filter(e=>!e.disabled),n=uo(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),m=e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,J.jsx)(w,{asChild:!0,...a,children:(0,J.jsx)(jt.button,{type:`button`,role:`combobox`,"aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":co(o.value)?``:void 0,...i,ref:c,onClick:At(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:At(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(m(e),e.preventDefault())}),onKeyDown:At(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&$i.includes(e.key)&&(m(),e.preventDefault())})})})});ma.displayName=pa;var ha=`SelectValue`,ga=q.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=la(ha,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=Vt(t,c.onValueNodeChange);return kt(()=>{l(u)},[l,u]),(0,J.jsx)(jt.span,{...s,ref:d,style:{pointerEvents:`none`},children:co(c.value)?(0,J.jsx)(J.Fragment,{children:o}):a})});ga.displayName=ha;var _a=`SelectIcon`,va=q.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return(0,J.jsx)(jt.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})});va.displayName=_a;var ya=`SelectPortal`,ba=e=>(0,J.jsx)(Dt,{asChild:!0,...e});ba.displayName=ya;var xa=`SelectContent`,Sa=q.forwardRef((e,t)=>{let n=la(xa,e.__scopeSelect),[r,i]=q.useState();if(kt(()=>{i(new DocumentFragment)},[]),!n.open){let t=r;return t?yi.createPortal((0,J.jsx)(wa,{scope:e.__scopeSelect,children:(0,J.jsx)(na.Slot,{scope:e.__scopeSelect,children:(0,J.jsx)(`div`,{children:e.children})})}),t):null}return(0,J.jsx)(Oa,{...e,ref:t})});Sa.displayName=xa;var Ca=10,[wa,Ta]=aa(xa),Ea=`SelectContentImpl`,Da=zt(`SelectContent.RemoveScroll`),Oa=q.forwardRef((e,t)=>{let{__scopeSelect:n,position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g,..._}=e,v=la(xa,n),[y,b]=q.useState(null),[x,S]=q.useState(null),C=Vt(t,e=>b(e)),[w,T]=q.useState(null),[E,D]=q.useState(null),O=ra(n),[k,A]=q.useState(!1),j=q.useRef(!1);q.useEffect(()=>{if(y)return Jt(y)},[y]),an();let M=q.useCallback(e=>{let[t,...n]=O().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&x&&(x.scrollTop=0),n===r&&x&&(x.scrollTop=x.scrollHeight),n?.focus(),document.activeElement!==i))return},[O,x]),N=q.useCallback(()=>M([w,y]),[M,w,y]);q.useEffect(()=>{k&&N()},[k,N]);let{onOpenChange:P,triggerPointerDownPosRef:F}=v;q.useEffect(()=>{if(y){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(F.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(F.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():y.contains(n.target)||P(!1),document.removeEventListener(`pointermove`,t),F.current=null};return F.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[y,P,F]),q.useEffect(()=>{let e=()=>P(!1);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[P]);let[I,L]=lo(e=>{let t=O().filter(e=>!e.disabled),n=uo(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current.focus())}),R=q.useCallback((e,t,n)=>{let r=!j.current&&!n;(v.value!==void 0&&v.value===t||r)&&(T(e),r&&(j.current=!0))},[v.value]),z=q.useCallback(()=>y?.focus(),[y]),B=q.useCallback((e,t,n)=>{let r=!j.current&&!n;(v.value!==void 0&&v.value===t||r)&&D(e)},[v.value]),V=r===`popper`?Ma:Aa,H=V===Ma?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,J.jsx)(wa,{scope:n,content:y,viewport:x,onViewportChange:S,itemRefCallback:R,selectedItem:w,onItemLeave:z,itemTextRefCallback:B,focusSelectedItem:N,selectedItemText:E,position:r,isPositioned:k,searchRef:I,children:(0,J.jsx)(Ut,{as:Da,allowPinchZoom:!0,children:(0,J.jsx)(sn,{asChild:!0,trapped:v.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:At(i,e=>{v.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,J.jsx)(Pt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:(0,J.jsx)(V,{role:`listbox`,id:v.contentId,"data-state":v.open?`open`:`closed`,dir:v.dir,onContextMenu:e=>e.preventDefault(),..._,...H,onPlaced:()=>A(!0),ref:C,style:{display:`flex`,flexDirection:`column`,outline:`none`,..._.style},onKeyDown:At(_.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&L(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=O().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>M(t)),e.preventDefault()}})})})})})})});Oa.displayName=Ea;var ka=`SelectItemAlignedPosition`,Aa=q.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...i}=e,a=la(xa,n),o=Ta(xa,n),[s,c]=q.useState(null),[l,u]=q.useState(null),d=Vt(t,e=>u(e)),f=ra(n),p=q.useRef(!1),m=q.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:_,focusSelectedItem:v}=o,y=q.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&h&&g&&_){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=_.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-Ca,d=xi(a,[Ca,Math.max(Ca,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-Ca,d=xi(a,[Ca,Math.max(Ca,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-Ca*2,u=h.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),v=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=m+v+u+b+y,S=Math.min(g.offsetHeight*5,x),C=window.getComputedStyle(h),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-Ca,D=c-E,O=g.offsetHeight/2,k=g.offsetTop+O,A=m+v+k,j=x-A;if(A<=E){let e=o.length>0&&g===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-h.offsetTop-h.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&g===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,m+h.offsetTop+(e?w:0)+O)+j;s.style.height=t+`px`,h.scrollTop=A-E+h.offsetTop}s.style.margin=`${Ca}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,l,h,g,_,a.dir,r]);kt(()=>y(),[y]);let[b,x]=q.useState();return kt(()=>{l&&x(window.getComputedStyle(l).zIndex)},[l]),(0,J.jsx)(Na,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:q.useCallback(e=>{e&&m.current===!0&&(y(),v?.(),m.current=!1)},[y,v]),children:(0,J.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:b},children:(0,J.jsx)(jt.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})});Aa.displayName=ka;var ja=`SelectPopperPosition`,Ma=q.forwardRef((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=Ca,...a}=e,o=sa(n);return(0,J.jsx)(at,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})});Ma.displayName=ja;var[Na,Pa]=aa(xa,{}),Fa=`SelectViewport`,Ia=q.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...i}=e,a=Ta(Fa,n),o=Pa(Fa,n),s=Vt(t,a.onViewportChange),c=q.useRef(0);return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,J.jsx)(na.Slot,{scope:n,children:(0,J.jsx)(jt.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:At(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-Ca*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})});Ia.displayName=Fa;var La=`SelectGroup`,[Ra,za]=aa(La),Ba=q.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=Ot();return(0,J.jsx)(Ra,{scope:n,id:i,children:(0,J.jsx)(jt.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})});Ba.displayName=La;var Va=`SelectLabel`,Ha=q.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=za(Va,n);return(0,J.jsx)(jt.div,{id:i.id,...r,ref:t})});Ha.displayName=Va;var Ua=`SelectItem`,[Wa,Ga]=aa(Ua),Ka=q.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=la(Ua,n),c=Ta(Ua,n),l=s.value===r,[u,d]=q.useState(a??``),[f,p]=q.useState(!1),m=Vt(t,e=>c.itemRefCallback?.(e,r,i)),h=Ot(),g=q.useRef(`touch`),_=()=>{i||(s.onValueChange(r),s.onOpenChange(!1))};if(r===``)throw Error(`A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.`);return(0,J.jsx)(Wa,{scope:n,value:r,disabled:i,textId:h,isSelected:l,onItemTextChange:q.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,J.jsx)(na.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,J.jsx)(jt.div,{role:`option`,"aria-labelledby":h,"data-highlighted":f?``:void 0,"aria-selected":l&&f,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:m,onFocus:At(o.onFocus,()=>p(!0)),onBlur:At(o.onBlur,()=>p(!1)),onClick:At(o.onClick,()=>{g.current!==`mouse`&&_()}),onPointerUp:At(o.onPointerUp,()=>{g.current===`mouse`&&_()}),onPointerDown:At(o.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:At(o.onPointerMove,e=>{g.current=e.pointerType,i?c.onItemLeave?.():g.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:At(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:At(o.onKeyDown,e=>{c.searchRef?.current!==``&&e.key===` `||(ea.includes(e.key)&&_(),e.key===` `&&e.preventDefault())})})})})});Ka.displayName=Ua;var qa=`SelectItemText`,Ja=q.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,...a}=e,o=la(qa,n),s=Ta(qa,n),c=Ga(qa,n),l=da(qa,n),[u,d]=q.useState(null),f=Vt(t,e=>d(e),c.onItemTextChange,e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=u?.textContent,m=q.useMemo(()=>(0,J.jsx)(`option`,{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:h,onNativeOptionRemove:g}=l;return kt(()=>(h(m),()=>g(m)),[h,g,m]),(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(jt.span,{id:c.textId,...a,ref:f}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?yi.createPortal(a.children,o.valueNode):null]})});Ja.displayName=qa;var Ya=`SelectItemIndicator`,Xa=q.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return Ga(Ya,n).isSelected?(0,J.jsx)(jt.span,{"aria-hidden":!0,...r,ref:t}):null});Xa.displayName=Ya;var Za=`SelectScrollUpButton`,Qa=q.forwardRef((e,t)=>{let n=Ta(Za,e.__scopeSelect),r=Pa(Za,e.__scopeSelect),[i,a]=q.useState(!1),o=Vt(t,r.onScrollButtonChange);return kt(()=>{if(n.viewport&&n.isPositioned){let e=function(){a(t.scrollTop>0)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,J.jsx)(to,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});Qa.displayName=Za;var $a=`SelectScrollDownButton`,eo=q.forwardRef((e,t)=>{let n=Ta($a,e.__scopeSelect),r=Pa($a,e.__scopeSelect),[i,a]=q.useState(!1),o=Vt(t,r.onScrollButtonChange);return kt(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;a(Math.ceil(t.scrollTop)<e)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,J.jsx)(to,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});eo.displayName=$a;var to=q.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=Ta(`SelectScrollButton`,n),o=q.useRef(null),s=ra(n),c=q.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return q.useEffect(()=>()=>c(),[c]),kt(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,J.jsx)(jt.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:At(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:At(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:At(i.onPointerLeave,()=>{c()})})}),no=`SelectSeparator`,ro=q.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,J.jsx)(jt.div,{"aria-hidden":!0,...r,ref:t})});ro.displayName=no;var io=`SelectArrow`,ao=q.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=sa(n),a=la(io,n),o=Ta(io,n);return a.open&&o.position===`popper`?(0,J.jsx)(N,{...i,...r,ref:t}):null});ao.displayName=io;var oo=`SelectBubbleInput`,so=q.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{let i=q.useRef(null),a=Vt(r,i),o=bi(t);return q.useEffect(()=>{let e=i.current;if(!e)return;let n=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(n,`value`).set;if(o!==t&&r){let n=new Event(`change`,{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[o,t]),(0,J.jsx)(jt.select,{...n,style:{...mt,...n.style},ref:a,defaultValue:t})});so.displayName=oo;function co(e){return e===``||e===void 0}function lo(e){let t=It(e),n=q.useRef(``),r=q.useRef(0),i=q.useCallback(e=>{let i=n.current+e;t(i),(function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))})(i)},[t]),a=q.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return q.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function uo(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=fo(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function fo(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var po=fa,mo=ma,ho=ga,go=va,_o=ba,vo=Sa,yo=Ia,bo=Ka,xo=Ja,So=Xa,Co=Qa,wo=eo,To=`Switch`,[Eo,Do]=Nt(To),[Oo,ko]=Eo(To),Ao=q.forwardRef((e,t)=>{let{__scopeSwitch:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c=`on`,onCheckedChange:l,form:u,...d}=e,[f,p]=q.useState(null),m=Vt(t,e=>p(e)),h=q.useRef(!1),g=f?u||!!f.closest(`form`):!0,[_,v]=Rt({prop:i,defaultProp:a??!1,onChange:l,caller:To});return(0,J.jsxs)(Oo,{scope:n,checked:_,disabled:s,children:[(0,J.jsx)(jt.button,{type:`button`,role:`switch`,"aria-checked":_,"aria-required":o,"data-state":Fo(_),"data-disabled":s?``:void 0,disabled:s,value:c,...d,ref:m,onClick:At(e.onClick,e=>{v(e=>!e),g&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())})}),g&&(0,J.jsx)(Po,{control:f,bubbles:!h.current,name:r,value:c,checked:_,required:o,disabled:s,form:u,style:{transform:`translateX(-100%)`}})]})});Ao.displayName=To;var jo=`SwitchThumb`,Mo=q.forwardRef((e,t)=>{let{__scopeSwitch:n,...r}=e,i=ko(jo,n);return(0,J.jsx)(jt.span,{"data-state":Fo(i.checked),"data-disabled":i.disabled?``:void 0,...r,ref:t})});Mo.displayName=jo;var No=`SwitchBubbleInput`,Po=q.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...i},a)=>{let o=q.useRef(null),s=Vt(o,a),c=bi(n),l=tt(t);return q.useEffect(()=>{let e=o.current;if(!e)return;let t=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(t,`checked`).set;if(c!==n&&i){let t=new Event(`click`,{bubbles:r});i.call(e,n),e.dispatchEvent(t)}},[c,n,r]),(0,J.jsx)(`input`,{type:`checkbox`,"aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:s,style:{...i.style,...l,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0}})});Po.displayName=No;function Fo(e){return e?`checked`:`unchecked`}var Io=Ao,Lo=Mo,Y=a();function Ro(e){let t=(0,Y.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,type:a,ref:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o;t[5]===n?o=t[6]:(o=Ft(`h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,n),t[5]=n,t[6]=o);let s;return t[7]!==r||t[8]!==i||t[9]!==o||t[10]!==a?(s=(0,J.jsx)(`input`,{type:a,ref:i,"data-slot":`input`,className:o,...r}),t[7]=r,t[8]=i,t[9]=o,t[10]=a,t[11]=s):s=t[11],s}var zo=vi(),Bo=Tt(`group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3! font-mono uppercase`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,secondary:`bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80`,warning:`bg-yellow-500/10 text-yellow-600 [a]:hover:bg-yellow-500/20`,destructive:`bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20`,outline:`border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground`,ghost:`hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50`,link:`text-primary underline-offset-4 hover:underline`,dashed:`border-dashed border-border text-muted-foreground rounded-sm`,primary:`border border-primary/50 text-primary bg-primary/5 rounded-sm p-0.5 px-1.5 font-mono`,gray:`border border-border text-muted-foreground bg-muted rounded-sm p-0.5 px-1.5 font-mono`}},defaultVariants:{variant:`default`}});function Vo(e){let t=(0,Y.c)(13),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,variant:i,asChild:a,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=i===void 0?`default`:i,s=a!==void 0&&a?Et:`span`,c;t[5]!==n||t[6]!==o?(c=Ft(Bo({variant:o}),n),t[5]=n,t[6]=o,t[7]=c):c=t[7];let l;return t[8]!==s||t[9]!==r||t[10]!==c||t[11]!==o?(l=(0,J.jsx)(s,{"data-slot":`badge`,"data-variant":o,className:c,...r}),t[8]=s,t[9]=r,t[10]=c,t[11]=o,t[12]=l):l=t[12],l}function Ho(e){let t=e.split(`/`);return t.length<2?`ok`:`${t[0]}/${t[1]}`}function Uo(e){if(!e)return;let t=Object.entries(e);if(t.length!==0)return t.map(([e,t])=>{if(t==null)return[e,String(t)];if(typeof t==`string`)return[e,t];if(typeof t==`number`||typeof t==`boolean`)return[e,String(t)];try{return[e,JSON.stringify(t)]}catch{return[e,`[unserializable]`]}})}function X(e,t,n){if(typeof performance>`u`||!performance.measure)return;let r=Ho(e),i=Uo(t),a={devtools:{dataType:`track-entry`,track:r,...i?{properties:i}:{},...n?.tooltipText?{tooltipText:n.tooltipText}:{}}},o=performance.now(),s=n?.startTime??o,c=n?.duration??Math.max(0,o-s);try{performance.measure(e,{start:s,duration:c,detail:a})}catch{}({...t?{properties:t}:{}})}function Wo(e){let t=(0,Y.c)(3),{name:n,children:r}=e,i;return t[0]!==r||t[1]!==n?(i=(0,J.jsx)(q.Profiler,{id:n,onRender:Go,children:r}),t[0]=r,t[1]=n,t[2]=i):i=t[2],i}var Go=(e,t,n,r,i,a)=>{X(`ok/render/${e}`,{phase:t,actualDuration:Math.round(n*1e3)/1e3,baseDuration:Math.round(r*1e3)/1e3},{startTime:i,duration:Math.max(0,a-i)})},{getOwnPropertyNames:Ko,getOwnPropertySymbols:qo}=Object,{hasOwnProperty:Jo}=Object.prototype;function Yo(e,t){return function(n,r,i){return e(n,r,i)&&t(n,r,i)}}function Xo(e){return function(t,n,r){if(!t||!n||typeof t!=`object`||typeof n!=`object`)return e(t,n,r);let{cache:i}=r,a=i.get(t),o=i.get(n);if(a&&o)return a===n&&o===t;i.set(t,n),i.set(n,t);let s=e(t,n,r);return i.delete(t),i.delete(n),s}}function Zo(e){return e?.[Symbol.toStringTag]}function Qo(e){return Ko(e).concat(qo(e))}var $o=Object.hasOwn||((e,t)=>Jo.call(e,t));function es(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var ts=`__v`,ns=`__o`,rs=`_owner`,{getOwnPropertyDescriptor:is,keys:as}=Object;function os(e,t){return e.byteLength===t.byteLength&&ys(new Uint8Array(e),new Uint8Array(t))}function ss(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function cs(e,t){return e.byteLength===t.byteLength&&ys(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function ls(e,t){return es(e.getTime(),t.getTime())}function us(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function ds(e,t){return e===t}function fs(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let i=Array(r),a=e.entries(),o,s,c=0;for(;(o=a.next())&&!o.done;){let r=t.entries(),a=!1,l=0;for(;(s=r.next())&&!s.done;){if(i[l]){l++;continue}let r=o.value,u=s.value;if(n.equals(r[0],u[0],c,l,e,t,n)&&n.equals(r[1],u[1],r[0],u[0],e,t,n)){a=i[l]=!0;break}l++}if(!a)return!1;c++}return!0}var ps=es;function ms(e,t,n){let r=as(e),i=r.length;if(as(t).length!==i)return!1;for(;i-- >0;)if(!xs(e,t,n,r[i]))return!1;return!0}function hs(e,t,n){let r=Qo(e),i=r.length;if(Qo(t).length!==i)return!1;let a,o,s;for(;i-- >0;)if(a=r[i],!xs(e,t,n,a)||(o=is(e,a),s=is(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function gs(e,t){return es(e.valueOf(),t.valueOf())}function _s(e,t){return e.source===t.source&&e.flags===t.flags}function vs(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let i=Array(r),a=e.values(),o,s;for(;(o=a.next())&&!o.done;){let r=t.values(),a=!1,c=0;for(;(s=r.next())&&!s.done;){if(!i[c]&&n.equals(o.value,s.value,o.value,s.value,e,t,n)){a=i[c]=!0;break}c++}if(!a)return!1}return!0}function ys(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function bs(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function xs(e,t,n,r){return(r===rs||r===ns||r===ts)&&(e.$$typeof||t.$$typeof)?!0:$o(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}var Ss=`[object ArrayBuffer]`,Cs=`[object Arguments]`,ws=`[object Boolean]`,Ts=`[object DataView]`,Es=`[object Date]`,Ds=`[object Error]`,Os=`[object Map]`,ks=`[object Number]`,As=`[object Object]`,js=`[object RegExp]`,Ms=`[object Set]`,Ns=`[object String]`,Ps={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},Fs=`[object URL]`,Is=Object.prototype.toString;function Ls({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:s,areObjectsEqual:c,arePrimitiveWrappersEqual:l,areRegExpsEqual:u,areSetsEqual:d,areTypedArraysEqual:f,areUrlsEqual:p,unknownTagComparators:m}){return function(h,g,_){if(h===g)return!0;if(h==null||g==null)return!1;let v=typeof h;if(v!==typeof g)return!1;if(v!==`object`)return v===`number`?s(h,g,_):v===`function`?a(h,g,_):!1;let y=h.constructor;if(y!==g.constructor)return!1;if(y===Object)return c(h,g,_);if(Array.isArray(h))return t(h,g,_);if(y===Date)return r(h,g,_);if(y===RegExp)return u(h,g,_);if(y===Map)return o(h,g,_);if(y===Set)return d(h,g,_);let b=Is.call(h);if(b===Es)return r(h,g,_);if(b===js)return u(h,g,_);if(b===Os)return o(h,g,_);if(b===Ms)return d(h,g,_);if(b===As)return typeof h.then!=`function`&&typeof g.then!=`function`&&c(h,g,_);if(b===Fs)return p(h,g,_);if(b===Ds)return i(h,g,_);if(b===Cs)return c(h,g,_);if(Ps[b])return f(h,g,_);if(b===Ss)return e(h,g,_);if(b===Ts)return n(h,g,_);if(b===ws||b===ks||b===Ns)return l(h,g,_);if(m){let e=m[b];if(!e){let t=Zo(h);t&&(e=m[t])}if(e)return e(h,g,_)}return!1}}function Rs({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:os,areArraysEqual:n?hs:ss,areDataViewsEqual:cs,areDatesEqual:ls,areErrorsEqual:us,areFunctionsEqual:ds,areMapsEqual:n?Yo(fs,hs):fs,areNumbersEqual:ps,areObjectsEqual:n?hs:ms,arePrimitiveWrappersEqual:gs,areRegExpsEqual:_s,areSetsEqual:n?Yo(vs,hs):vs,areTypedArraysEqual:n?Yo(ys,hs):ys,areUrlsEqual:bs,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){let e=Xo(r.areArraysEqual),t=Xo(r.areMapsEqual),n=Xo(r.areObjectsEqual),i=Xo(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:e,areMapsEqual:t,areObjectsEqual:n,areSetsEqual:i})}return r}function zs(e){return function(t,n,r,i,a,o,s){return e(t,n,s)}}function Bs({circular:e,comparator:t,createState:n,equals:r,strict:i}){if(n)return function(a,o){let{cache:s=e?new WeakMap:void 0,meta:c}=n();return t(a,o,{cache:s,equals:r,meta:c,strict:i})};if(e)return function(e,n){return t(e,n,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};let a={cache:void 0,equals:r,meta:void 0,strict:i};return function(e,n){return t(e,n,a)}}var Vs=Hs();Hs({strict:!0}),Hs({circular:!0}),Hs({circular:!0,strict:!0}),Hs({createInternalComparator:()=>es}),Hs({strict:!0,createInternalComparator:()=>es}),Hs({circular:!0,createInternalComparator:()=>es}),Hs({circular:!0,createInternalComparator:()=>es,strict:!0});function Hs(e={}){let{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,a=Ls(Rs(e));return Bs({circular:t,comparator:a,createState:r,equals:n?n(a):zs(a),strict:i})}var Us=t((e=>{var t=r(),n=vi();function i(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var a=typeof Object.is==`function`?Object.is:i,o=n.useSyncExternalStore,s=t.useRef,c=t.useEffect,l=t.useMemo,u=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var d=s(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=l(function(){function e(e){if(!o){if(o=!0,s=e,e=r(e),i!==void 0&&f.hasValue){var t=f.value;if(i(t,e))return c=t}return c=e}if(t=c,a(s,e))return t;var n=r(e);return i!==void 0&&i(t,n)?(s=e,t):(s=e,c=n)}var o=!1,s,c,l=n===void 0?null:n;return[function(){return e(t())},l===null?void 0:function(){return e(l())}]},[t,n,r,i]);var p=o(e,d[0],d[1]);return c(function(){f.hasValue=!0,f.value=p},[p]),u(p),p}})),Ws=t(((e,t)=>{t.exports=Us()}))(),Gs=(...e)=>t=>{e.forEach(e=>{typeof e==`function`?e(t):e&&(e.current=t)})},Ks=({contentComponent:e})=>{let t=(0,zo.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getServerSnapshot);return(0,J.jsx)(J.Fragment,{children:Object.values(t)})};function qs(){let e=new Set,t={};return{subscribe(t){return e.add(t),()=>{e.delete(t)}},getSnapshot(){return t},getServerSnapshot(){return t},setRenderer(n,r){t={...t,[n]:yi.createPortal(r.reactElement,r.element,n)},e.forEach(e=>e())},removeRenderer(n){let r={...t};delete r[n],t=r,e.forEach(e=>e())}}}var Js=class extends q.Component{constructor(e){super(e),this.editorContentRef=q.createRef()}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){let e=this.props.editor;if(e&&!e.isDestroyed&&e.view.dom?.parentNode){if(e.contentComponent)return;let t=this.editorContentRef.current;t.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:t}),e.contentComponent=qs(),e.createNodeViews(),e.isEditorContentInitialized=!0,this.forceUpdate()}}componentWillUnmount(){let e=this.props.editor;if(e){e.isEditorContentInitialized=!1,e.isDestroyed||e.view.setProps({nodeViews:{}}),e.contentComponent=null;try{if(!e.view.dom?.parentNode)return;let t=document.createElement(`div`);t.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:t})}catch{}}}render(){let{editor:e,innerRef:t,...n}=this.props;return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`div`,{ref:Gs(t,this.editorContentRef),...n}),e?.contentComponent&&(0,J.jsx)(Ks,{contentComponent:e.contentComponent})]})}},Ys=(0,q.forwardRef)((e,t)=>{let n=q.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[e.editor]);return q.createElement(Js,{key:n,innerRef:t,...e})}),Xs=q.memo(Ys),Zs=typeof window<`u`?q.useLayoutEffect:q.useEffect,Qs=class{constructor(e){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=e,this.lastSnapshot={editor:e,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}watch(e){if(this.editor=e,this.editor){let e=()=>{this.transactionNumber+=1,this.subscribers.forEach(e=>e())},t=this.editor;return t.on(`transaction`,e),()=>{t.off(`transaction`,e)}}}};function $s(e){let[t]=(0,q.useState)(()=>new Qs(e.editor)),n=(0,Ws.useSyncExternalStoreWithSelector)(t.subscribe,t.getSnapshot,t.getServerSnapshot,e.selector,e.equalityFn??Vs);return Zs(()=>t.watch(e.editor),[e.editor,t]),(0,q.useDebugValue)(n),n}typeof window>`u`||typeof window<`u`&&window.next;var ec=(0,q.createContext)({editor:null});ec.Consumer;var tc=()=>(0,q.useContext)(ec),nc=(0,q.createContext)({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}}),rc=()=>(0,q.useContext)(nc);function ic({as:e=`div`,...t}){let{nodeViewContentRef:n,nodeViewContentChildren:r}=rc();return(0,J.jsx)(e,{...t,ref:n,"data-node-view-content":``,style:{whiteSpace:`pre-wrap`,...t.style},children:r})}var ac=q.forwardRef((e,t)=>{let{onDragStart:n}=rc();return(0,J.jsx)(e.as||`div`,{...e,ref:t,"data-node-view-wrapper":``,onDragStart:n,style:{whiteSpace:`normal`,...e.style}})});function oc(e){return!!(typeof e==`function`&&e.prototype&&e.prototype.isReactComponent)}function sc(e){return!!(typeof e==`object`&&e.$$typeof&&(e.$$typeof.toString()===`Symbol(react.forward_ref)`||e.$$typeof.description===`react.forward_ref`))}function cc(e){return!!(typeof e==`object`&&e.$$typeof&&(e.$$typeof.toString()===`Symbol(react.memo)`||e.$$typeof.description===`react.memo`))}function lc(e){if(oc(e)||sc(e))return!0;if(cc(e)){let t=e.type;if(t)return oc(t)||sc(t)}return!1}function uc(){try{if(q.version)return parseInt(q.version.split(`.`)[0],10)>=19}catch{}return!1}var dc=class{constructor(e,{editor:t,props:n={},as:r=`div`,className:i=``}){this.ref=null,this.destroyed=!1,this.id=Math.floor(Math.random()*4294967295).toString(),this.component=e,this.editor=t,this.props=n,this.element=document.createElement(r),this.element.classList.add(`react-renderer`),i&&this.element.classList.add(...i.split(` `)),this.editor.isEditorContentInitialized?(0,yi.flushSync)(()=>{this.render()}):queueMicrotask(()=>{this.destroyed||this.render()})}render(){var e;if(this.destroyed)return;let t=this.component,n=this.props,r=this.editor,i=uc(),a=lc(t),o={...n};o.ref&&!(i||a)&&delete o.ref,!o.ref&&(i||a)&&(o.ref=e=>{this.ref=e}),this.reactElement=(0,J.jsx)(t,{...o}),(e=r?.contentComponent)==null||e.setRenderer(this.id,this)}updateProps(e={}){this.destroyed||(this.props={...this.props,...e},this.render())}destroy(){var e;this.destroyed=!0,(e=this.editor?.contentComponent)==null||e.removeRenderer(this.id);try{this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}catch{}}updateAttributes(e){Object.keys(e).forEach(t=>{this.element.setAttribute(t,e[t])})}};q.createContext({markViewContentRef:()=>{}});var fc=class extends ze{constructor(e,t,n){if(super(e,t,n),this.selectionRafId=null,this.positionCheckCallback=null,this.cachedExtensionWithSyncedStorage=null,!this.node.isLeaf){this.options.contentDOMElementTag?this.contentDOMElement=document.createElement(this.options.contentDOMElementTag):this.contentDOMElement=document.createElement(this.node.isInline?`span`:`div`),this.contentDOMElement.dataset.nodeViewContentReact=``,this.contentDOMElement.dataset.nodeViewWrapper=``,this.contentDOMElement.style.whiteSpace=`inherit`;let e=this.dom.querySelector(`[data-node-view-content]`);if(!e)return;e.appendChild(this.contentDOMElement)}}get extensionWithSyncedStorage(){if(!this.cachedExtensionWithSyncedStorage){let e=this.editor,t=this.extension;this.cachedExtensionWithSyncedStorage=new Proxy(t,{get(n,r,i){return r===`storage`?e.storage[t.name]??{}:Reflect.get(n,r,i)}})}return this.cachedExtensionWithSyncedStorage}mount(){let e={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,extension:this.extensionWithSyncedStorage,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(e={})=>this.updateAttributes(e),deleteNode:()=>this.deleteNode(),ref:(0,q.createRef)()};if(!this.component.displayName){let e=e=>e.charAt(0).toUpperCase()+e.substring(1);this.component.displayName=e(this.extension.name)}let t={onDragStart:this.onDragStart.bind(this),nodeViewContentRef:e=>{e&&this.contentDOMElement&&e.firstChild!==this.contentDOMElement&&(e.hasAttribute(`data-node-view-wrapper`)&&e.removeAttribute(`data-node-view-wrapper`),e.appendChild(this.contentDOMElement))}},n=this.component,r=(0,q.memo)(e=>(0,J.jsx)(nc.Provider,{value:t,children:(0,q.createElement)(n,e)}));r.displayName=`ReactNodeView`;let i=this.node.isInline?`span`:`div`;this.options.as&&(i=this.options.as);let{className:a=``}=this.options;this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.renderer=new dc(r,{editor:this.editor,props:e,as:i,className:`node-${this.node.type.name} ${a}`.trim()}),this.editor.on(`selectionUpdate`,this.handleSelectionUpdate),this.updateElementAttributes(),this.currentPos=this.getPos(),this.positionCheckCallback=()=>{let e=this.getPos();typeof e!=`number`||e===this.currentPos||(this.currentPos=e,this.renderer.updateProps({getPos:()=>this.getPos()}),typeof this.options.attrs==`function`&&this.updateElementAttributes())},h(this.editor,this.positionCheckCallback)}get dom(){if(this.renderer.element.firstElementChild&&!this.renderer.element.firstElementChild?.hasAttribute(`data-node-view-wrapper`))throw Error(`Please use the NodeViewWrapper component for your node view.`);return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.contentDOMElement}handleSelectionUpdate(){this.selectionRafId&&=(cancelAnimationFrame(this.selectionRafId),null),this.selectionRafId=requestAnimationFrame(()=>{this.selectionRafId=null;let{from:e,to:t}=this.editor.state.selection,n=this.currentPos;if(typeof n==`number`)if(e<=n&&t>=n+this.node.nodeSize){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}})}update(e,t,n){let r=e=>{this.renderer.updateProps(e),typeof this.options.attrs==`function`&&this.updateElementAttributes()};if(e.type!==this.node.type)return!1;if(typeof this.options.update==`function`){let i=this.node,a=this.decorations,o=this.innerDecorations;return this.node=e,this.decorations=t,this.innerDecorations=n,this.currentPos=this.getPos(),this.options.update({oldNode:i,oldDecorations:a,newNode:e,newDecorations:t,oldInnerDecorations:o,innerDecorations:n,updateProps:()=>r({node:e,decorations:t,innerDecorations:n,extension:this.extensionWithSyncedStorage})})}let i=this.getPos();return e===this.node&&this.decorations===t&&this.innerDecorations===n?i===this.currentPos?!0:(this.currentPos=i,r({node:e,decorations:t,innerDecorations:n,extension:this.extensionWithSyncedStorage,getPos:()=>this.getPos()}),!0):(this.node=e,this.decorations=t,this.innerDecorations=n,this.currentPos=i,r({node:e,decorations:t,innerDecorations:n,extension:this.extensionWithSyncedStorage}),!0)}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element.classList.add(`ProseMirror-selectednode`)}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element.classList.remove(`ProseMirror-selectednode`)}destroy(){this.renderer.destroy(),this.editor.off(`selectionUpdate`,this.handleSelectionUpdate),this.positionCheckCallback&&=(Ie(this.editor,this.positionCheckCallback),null),this.contentDOMElement=null,this.selectionRafId&&=(cancelAnimationFrame(this.selectionRafId),null)}updateElementAttributes(){if(this.options.attrs){let e={};if(typeof this.options.attrs==`function`){let t=this.editor.extensionManager.attributes,n=gt(this.node,t);e=this.options.attrs({node:this.node,HTMLAttributes:n})}else e=this.options.attrs;this.renderer.updateAttributes(e)}}};function pc(e,t){return n=>n.editor.contentComponent?new fc(e,n,t):{}}var mc=(0,q.createContext)({get editor(){throw Error(`useTiptap must be used within a <Tiptap> provider`)}});mc.displayName=`TiptapContext`;var hc=()=>(0,q.useContext)(mc);function gc({editor:e,instance:t,children:n}){let r=e??t;if(!r)throw Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");let i=(0,q.useMemo)(()=>({editor:r}),[r]),a=(0,q.useMemo)(()=>({editor:r}),[r]);return(0,J.jsx)(ec.Provider,{value:a,children:(0,J.jsx)(mc.Provider,{value:i,children:n})})}gc.displayName=`Tiptap`;function _c({...e}){let{editor:t}=hc();return(0,J.jsx)(Xs,{editor:t,...e})}_c.displayName=`Tiptap.Content`,Object.assign(gc,{Content:_c});var vc=()=>new Map,yc=e=>{let t=vc();return e.forEach((e,n)=>{t.set(n,e)}),t},bc=(e,t,n)=>{let r=e.get(t);return r===void 0&&e.set(t,r=n()),r},xc=(e,t)=>{let n=[];for(let[r,i]of e)n.push(t(i,r));return n},Sc=(e,t)=>{for(let[n,r]of e)if(t(r,n))return!0;return!1},Cc=()=>new Set,wc=e=>e[e.length-1],Tc=(e,t)=>{for(let n=0;n<t.length;n++)e.push(t[n])},Ec=Array.from,Dc=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},Oc=(e,t)=>{for(let n=0;n<e.length;n++)if(t(e[n],n,e))return!0;return!1},kc=(e,t)=>{let n=Array(e);for(let r=0;r<e;r++)n[r]=t(r,n);return n},Ac=Array.isArray,jc=class{constructor(){this._observers=vc()}on(e,t){return bc(this._observers,e,Cc).add(t),t}once(e,t){let n=(...r)=>{this.off(e,n),t(...r)};this.on(e,n)}off(e,t){let n=this._observers.get(e);n!==void 0&&(n.delete(t),n.size===0&&this._observers.delete(e))}emit(e,t){return Ec((this._observers.get(e)||vc()).values()).forEach(e=>e(...t))}destroy(){this._observers=vc()}},Mc=class{constructor(){this._observers=vc()}on(e,t){bc(this._observers,e,Cc).add(t)}once(e,t){let n=(...r)=>{this.off(e,n),t(...r)};this.on(e,n)}off(e,t){let n=this._observers.get(e);n!==void 0&&(n.delete(t),n.size===0&&this._observers.delete(e))}emit(e,t){return Ec((this._observers.get(e)||vc()).values()).forEach(e=>e(...t))}destroy(){this._observers=vc()}},Nc=Math.floor,Pc=Math.abs,Fc=(e,t)=>e<t?e:t,Ic=(e,t)=>e>t?e:t;Number.isNaN;var Lc=e=>e===0?1/e<0:e<0,Rc=1<<17,zc=1<<18,Bc=1<<19,Vc=1<<20,Hc=1<<21,Uc=1<<22,Wc=1<<23,Gc=1<<24,Kc=1<<25,qc=1<<26,Jc=1<<27,Yc=1<<28,Xc=1<<29;Rc-1,zc-1,Bc-1,Vc-1,Hc-1,Uc-1,Wc-1,Gc-1,Kc-1,qc-1,Jc-1,Yc-1,Xc-1;var Zc=2**53-1,Qc=-(2**53-1),$c=Number.isInteger||(e=>typeof e==`number`&&isFinite(e)&&Nc(e)===e);Number.isNaN,Number.parseInt;var el=String.fromCharCode;String.fromCodePoint,el(65535);var tl=e=>e.toLowerCase(),nl=/^\s*/g,rl=e=>e.replace(nl,``),il=/([A-Z])/g,al=(e,t)=>rl(e.replace(il,e=>`${t}${tl(e)}`)),ol=e=>{let t=unescape(encodeURIComponent(e)),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e++)r[e]=t.codePointAt(e);return r},sl=typeof TextEncoder<`u`?new TextEncoder:null,cl=sl?e=>sl.encode(e):ol,ll=typeof TextDecoder>`u`?null:new TextDecoder(`utf-8`,{fatal:!0,ignoreBOM:!0});ll&&ll.decode(new Uint8Array).length===1&&(ll=null);var ul=(e,t)=>kc(t,()=>e).join(``),dl=class{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}},fl=()=>new dl,pl=e=>{let t=fl();return e(t),hl(t)},ml=e=>{let t=e.cpos;for(let n=0;n<e.bufs.length;n++)t+=e.bufs[n].length;return t},hl=e=>{let t=new Uint8Array(ml(e)),n=0;for(let r=0;r<e.bufs.length;r++){let i=e.bufs[r];t.set(i,n),n+=i.length}return t.set(new Uint8Array(e.cbuf.buffer,0,e.cpos),n),t},gl=(e,t)=>{let n=e.cbuf.length;n-e.cpos<t&&(e.bufs.push(new Uint8Array(e.cbuf.buffer,0,e.cpos)),e.cbuf=new Uint8Array(Ic(n,t)*2),e.cpos=0)},_l=(e,t)=>{let n=e.cbuf.length;e.cpos===n&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(n*2),e.cpos=0),e.cbuf[e.cpos++]=t},vl=_l,yl=(e,t)=>{for(;t>127;)_l(e,128|127&t),t=Nc(t/128);_l(e,127&t)},bl=(e,t)=>{let n=Lc(t);for(n&&(t=-t),_l(e,(t>63?128:0)|(n?64:0)|63&t),t=Nc(t/64);t>0;)_l(e,(t>127?128:0)|127&t),t=Nc(t/128)},xl=new Uint8Array(3e4),Sl=xl.length/3,Cl=sl&&sl.encodeInto?(e,t)=>{if(t.length<Sl){let n=sl.encodeInto(t,xl).written||0;yl(e,n);for(let t=0;t<n;t++)_l(e,xl[t])}else Tl(e,cl(t))}:(e,t)=>{let n=unescape(encodeURIComponent(t)),r=n.length;yl(e,r);for(let t=0;t<r;t++)_l(e,n.codePointAt(t))},wl=(e,t)=>{let n=e.cbuf.length,r=e.cpos,i=Fc(n-r,t.length),a=t.length-i;e.cbuf.set(t.subarray(0,i),r),e.cpos+=i,a>0&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(Ic(n*2,a)),e.cbuf.set(t.subarray(i)),e.cpos=a)},Tl=(e,t)=>{yl(e,t.byteLength),wl(e,t)},El=(e,t)=>{gl(e,t);let n=new DataView(e.cbuf.buffer,e.cpos,t);return e.cpos+=t,n},Dl=(e,t)=>El(e,4).setFloat32(0,t,!1),Ol=(e,t)=>El(e,8).setFloat64(0,t,!1),kl=(e,t)=>El(e,8).setBigInt64(0,t,!1),Al=new DataView(new ArrayBuffer(4)),jl=e=>(Al.setFloat32(0,e),Al.getFloat32(0)===e),Ml=(e,t)=>{switch(typeof t){case`string`:_l(e,119),Cl(e,t);break;case`number`:$c(t)&&Pc(t)<=2147483647?(_l(e,125),bl(e,t)):jl(t)?(_l(e,124),Dl(e,t)):(_l(e,123),Ol(e,t));break;case`bigint`:_l(e,122),kl(e,t);break;case`object`:if(t===null)_l(e,126);else if(Ac(t)){_l(e,117),yl(e,t.length);for(let n=0;n<t.length;n++)Ml(e,t[n])}else if(t instanceof Uint8Array)_l(e,116),Tl(e,t);else{_l(e,118);let n=Object.keys(t);yl(e,n.length);for(let r=0;r<n.length;r++){let i=n[r];Cl(e,i),Ml(e,t[i])}}break;case`boolean`:_l(e,t?120:121);break;default:_l(e,127)}},Nl=class extends dl{constructor(e){super(),this.w=e,this.s=null,this.count=0}write(e){this.s===e?this.count++:(this.count>0&&yl(this,this.count-1),this.count=1,this.w(this,e),this.s=e)}},Pl=e=>{e.count>0&&(bl(e.encoder,e.count===1?e.s:-e.s),e.count>1&&yl(e.encoder,e.count-2))},Fl=class{constructor(){this.encoder=new dl,this.s=0,this.count=0}write(e){this.s===e?this.count++:(Pl(this),this.count=1,this.s=e)}toUint8Array(){return Pl(this),hl(this.encoder)}},Il=e=>{if(e.count>0){let t=e.diff*2+(e.count===1?0:1);bl(e.encoder,t),e.count>1&&yl(e.encoder,e.count-2)}},Ll=class{constructor(){this.encoder=new dl,this.s=0,this.count=0,this.diff=0}write(e){this.diff===e-this.s?(this.s=e,this.count++):(Il(this),this.count=1,this.diff=e-this.s,this.s=e)}toUint8Array(){return Il(this),hl(this.encoder)}},Rl=class{constructor(){this.sarr=[],this.s=``,this.lensE=new Fl}write(e){this.s+=e,this.s.length>19&&(this.sarr.push(this.s),this.s=``),this.lensE.write(e.length)}toUint8Array(){let e=new dl;return this.sarr.push(this.s),this.s=``,Cl(e,this.sarr.join(``)),wl(e,this.lensE.toUint8Array()),hl(e)}},zl=e=>Error(e),Bl=()=>{throw zl(`Method unimplemented`)},Vl=()=>{throw zl(`Unexpected case`)},Hl=zl(`Unexpected end of array`),Ul=zl(`Integer out of Range`),Wl=class{constructor(e){this.arr=e,this.pos=0}},Gl=e=>new Wl(e),Kl=e=>e.pos!==e.arr.length,ql=(e,t)=>{let n=new Uint8Array(e.arr.buffer,e.pos+e.arr.byteOffset,t);return e.pos+=t,n},Jl=e=>ql(e,Xl(e)),Yl=e=>e.arr[e.pos++],Xl=e=>{let t=0,n=1,r=e.arr.length;for(;e.pos<r;){let r=e.arr[e.pos++];if(t+=(r&127)*n,n*=128,r<128)return t;if(t>Zc)throw Ul}throw Hl},Zl=e=>{let t=e.arr[e.pos++],n=t&63,r=64,i=(t&64)>0?-1:1;if(!(t&128))return i*n;let a=e.arr.length;for(;e.pos<a;){if(t=e.arr[e.pos++],n+=(t&127)*r,r*=128,t<128)return i*n;if(n>Zc)throw Ul}throw Hl},Ql=ll?e=>ll.decode(Jl(e)):e=>{let t=Xl(e);if(t===0)return``;{let n=String.fromCodePoint(Yl(e));if(--t<100)for(;t--;)n+=String.fromCodePoint(Yl(e));else for(;t>0;){let r=t<1e4?t:1e4,i=e.arr.subarray(e.pos,e.pos+r);e.pos+=r,n+=String.fromCodePoint.apply(null,i),t-=r}return decodeURIComponent(escape(n))}},$l=(e,t)=>{let n=new DataView(e.arr.buffer,e.arr.byteOffset+e.pos,t);return e.pos+=t,n},eu=[e=>void 0,e=>null,Zl,e=>$l(e,4).getFloat32(0,!1),e=>$l(e,8).getFloat64(0,!1),e=>$l(e,8).getBigInt64(0,!1),e=>!1,e=>!0,Ql,e=>{let t=Xl(e),n={};for(let r=0;r<t;r++){let t=Ql(e);n[t]=tu(e)}return n},e=>{let t=Xl(e),n=[];for(let r=0;r<t;r++)n.push(tu(e));return n},Jl],tu=e=>eu[127-Yl(e)](e),nu=class extends Wl{constructor(e,t){super(e),this.reader=t,this.s=null,this.count=0}read(){return this.count===0&&(this.s=this.reader(this),Kl(this)?this.count=Xl(this)+1:this.count=-1),this.count--,this.s}},ru=class extends Wl{constructor(e){super(e),this.s=0,this.count=0}read(){if(this.count===0){this.s=Zl(this);let e=Lc(this.s);this.count=1,e&&(this.s=-this.s,this.count=Xl(this)+2)}return this.count--,this.s}},iu=class extends Wl{constructor(e){super(e),this.s=0,this.count=0,this.diff=0}read(){if(this.count===0){let e=Zl(this),t=e&1;this.diff=Nc(e/2),this.count=1,t&&(this.count=Xl(this)+2)}return this.s+=this.diff,this.count--,this.s}},au=class{constructor(e){this.decoder=new ru(e),this.str=Ql(this.decoder),this.spos=0}read(){let e=this.spos+this.decoder.read(),t=this.str.slice(this.spos,e);return this.spos=e,t}};crypto.subtle;var ou=crypto.getRandomValues.bind(crypto),su=Math.random,cu=()=>ou(new Uint32Array(1))[0],lu=e=>e[Nc(su()*e.length)],uu=`10000000-1000-4000-8000-100000000000`,du=()=>uu.replace(/[018]/g,e=>(e^cu()&15>>e/4).toString(16)),fu=Date.now,pu=e=>new Promise(e);Promise.all.bind(Promise);var mu=e=>e===void 0?null:e,hu=new class{constructor(){this.map=new Map}setItem(e,t){this.map.set(e,t)}getItem(e){return this.map.get(e)}};try{typeof localStorage<`u`&&localStorage&&(hu=localStorage)}catch{}var gu=hu,_u=Symbol(`Equality`),vu=(e,t)=>e===t||!!e?.[_u]?.(t)||!1,yu=e=>typeof e==`object`,bu=Object.assign,xu=Object.keys,Su=(e,t)=>{for(let n in e)t(e[n],n)},Cu=e=>xu(e).length,wu=e=>{for(let t in e)return!1;return!0},Tu=(e,t)=>{for(let n in e)if(!t(e[n],n))return!1;return!0},Eu=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Du=(e,t)=>e===t||Cu(e)===Cu(t)&&Tu(e,(e,n)=>(e!==void 0||Eu(t,n))&&vu(t[n],e)),Ou=Object.freeze,ku=e=>{for(let t in e){let n=e[t];(typeof n==`object`||typeof n==`function`)&&ku(e[t])}return Ou(e)},Au=(e,t,n=0)=>{try{for(;n<e.length;n++)e[n](...t)}finally{n<e.length&&Au(e,t,n+1)}},ju=e=>e,Mu=(e,t)=>{if(e===t)return!0;if(e==null||t==null||e.constructor!==t.constructor&&(e.constructor||Object)!==(t.constructor||Object))return!1;if(e[_u]!=null)return e[_u](t);switch(e.constructor){case ArrayBuffer:e=new Uint8Array(e),t=new Uint8Array(t);case Uint8Array:if(e.byteLength!==t.byteLength)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;break;case Set:if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;break;case Map:if(e.size!==t.size)return!1;for(let n of e.keys())if(!t.has(n)||!Mu(e.get(n),t.get(n)))return!1;break;case void 0:case Object:if(Cu(e)!==Cu(t))return!1;for(let n in e)if(!Eu(e,n)||!Mu(e[n],t[n]))return!1;break;case Array:if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!Mu(e[n],t[n]))return!1;break;default:return!1}return!0},Nu=(e,t)=>t.includes(e),Pu=typeof process<`u`&&process.release&&/node|io\.js/.test(process.release.name)&&Object.prototype.toString.call(typeof process<`u`?process:0)===`[object process]`,Fu=typeof window<`u`&&typeof document<`u`&&!Pu;typeof navigator<`u`&&/Mac/.test(navigator.platform);var Iu,Lu=[],Ru=()=>{if(Iu===void 0)if(Pu){Iu=vc();let e=process.argv,t=null;for(let n=0;n<e.length;n++){let r=e[n];r[0]===`-`?(t!==null&&Iu.set(t,``),t=r):t===null?Lu.push(r):(Iu.set(t,r),t=null)}t!==null&&Iu.set(t,``)}else typeof location==`object`?(Iu=vc(),(location.search||`?`).slice(1).split(`&`).forEach(e=>{if(e.length!==0){let[t,n]=e.split(`=`);Iu.set(`--${al(t,`-`)}`,n),Iu.set(`-${al(t,`-`)}`,n)}})):Iu=vc();return Iu},zu=e=>Ru().has(e),Bu=e=>mu(Pu?{}[e.toUpperCase().replaceAll(`-`,`_`)]:gu.getItem(e)),Vu=e=>zu(`--`+e)||Bu(e)!==null,Hu=Vu(`production`),Uu=Pu&&Nu({}.FORCE_COLOR,[`true`,`1`,`2`])||!zu(`--no-colors`)&&!Vu(`no-color`)&&(!Pu||process.stdout.isTTY)&&(!Pu||zu(`--color`)||Bu(`COLORTERM`)!==null||(Bu(`TERM`)||``).includes(`color`)),Wu=e=>new Uint8Array(e),Gu=Fu?e=>{let t=``;for(let n=0;n<e.byteLength;n++)t+=el(e[n]);return btoa(t)}:e=>Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString(`base64`),Ku=e=>{let t=Wu(e.byteLength);return t.set(e),t},qu=e=>pl(t=>Ml(t,e)),Ju=class{constructor(e,t){this.left=e,this.right=t}},Yu=(e,t)=>new Ju(e,t),Xu=(e,t)=>e.forEach(e=>t(e.left,e.right)),Zu=e=>e.next()>=.5,Qu=(e,t,n)=>Nc(e.next()*(n+1-t)+t),$u=(e,t,n)=>Nc(e.next()*(n+1-t)+t),ed=(e,t,n)=>$u(e,t,n),td=e=>el(ed(e,97,122)),nd=(e,t=0,n=20)=>{let r=ed(e,t,n),i=``;for(let t=0;t<r;t++)i+=td(e);return i},rd=(e,t)=>t[ed(e,0,t.length-1)],id=Symbol(`0schema`),ad=class{constructor(){this._rerrs=[]}extend(e,t,n,r=null){this._rerrs.push({path:e,expected:t,has:n,message:r})}toString(){let e=[];for(let t=this._rerrs.length-1;t>0;t--){let n=this._rerrs[t];e.push(ul(` `,(this._rerrs.length-t)*2)+`${n.path==null?``:`[${n.path}] `}${n.has} doesn't match ${n.expected}. ${n.message}`)}return e.join(`
|
|
3
|
-
`)}},od=(e,t)=>e===t?!0:e==null||t==null||e.constructor!==t.constructor?!1:e[_u]?vu(e,t):Ac(e)?Dc(e,e=>Oc(t,t=>od(e,t))):yu(e)?Tu(e,(e,n)=>od(e,t[n])):!1,sd=class{static _dilutes=!1;extends(e){let[t,n]=[this.shape,e.shape];return this.constructor._dilutes&&([n,t]=[t,n]),od(t,n)}equals(e){return this.constructor===e.constructor&&Mu(this.shape,e.shape)}[id](){return!0}[_u](e){return this.equals(e)}validate(e){return this.check(e)}check(e,t){Bl()}get nullable(){return Bd(this,tf)}get optional(){return new vd(this)}cast(e){return of(e,this),e}expect(e){return of(e,this),e}},cd=class extends sd{constructor(e,t){super(),this.shape=e,this._c=t}check(e,t=void 0){let n=e?.constructor===this.shape&&(this._c==null||this._c(e));return!n&&t?.extend(null,this.shape.name,e?.constructor.name,e?.constructor===this.shape?`Check failed`:`Constructor match failed`),n}},ld=(e,t=null)=>new cd(e,t);ld(cd);var ud=class extends sd{constructor(e){super(),this.shape=e}check(e,t){let n=this.shape(e);return!n&&t?.extend(null,`custom prop`,e?.constructor.name,`failed to check custom prop`),n}},dd=e=>new ud(e);ld(ud);var fd=class extends sd{constructor(e){super(),this.shape=e}check(e,t){let n=this.shape.some(t=>t===e);return!n&&t?.extend(null,this.shape.join(` | `),e.toString()),n}},pd=(...e)=>new fd(e),md=ld(fd),hd=RegExp.escape||(e=>e.replace(/[().|&,$^[\]]/g,e=>`\\`+e)),gd=e=>{if(Xd.check(e))return[hd(e)];if(md.check(e))return e.shape.map(e=>e+``);if(Yd.check(e))return[`[+-]?\\d+.?\\d*`];if(Zd.check(e))return[`.*`];if(Vd.check(e))return e.shape.map(gd).flat(1);Vl()};ld(class extends sd{constructor(e){super(),this.shape=e,this._r=RegExp(`^`+e.map(gd).map(e=>`(${e.join(`|`)})`).join(``)+`$`)}check(e,t){let n=this._r.exec(e)!=null;return!n&&t?.extend(null,this._r.toString(),e.toString(),`String doesn't match string template.`),n}});var _d=Symbol(`optional`),vd=class extends sd{constructor(e){super(),this.shape=e}check(e,t){let n=e===void 0||this.shape.check(e);return!n&&t?.extend(null,`undefined (optional)`,`()`),n}get[_d](){return!0}},yd=ld(vd),bd=class extends sd{check(e,t){return t?.extend(null,`never`,typeof e),!1}};new bd,ld(bd);var xd=class e extends sd{constructor(e,t=!1){super(),this.shape=e,this._isPartial=t}static _dilutes=!0;get partial(){return new e(this.shape,!0)}check(e,t){return e==null?(t?.extend(null,`object`,`null`),!1):Tu(this.shape,(n,r)=>{let i=this._isPartial&&!Eu(e,r)||n.check(e[r],t);return!i&&t?.extend(r.toString(),n.toString(),typeof e[r],`Object property does not match`),i})}},Sd=e=>new xd(e),Cd=ld(xd),wd=dd(e=>e!=null&&(e.constructor===Object||e.constructor==null)),Td=class extends sd{constructor(e,t){super(),this.shape={keys:e,values:t}}check(e,t){return e!=null&&Tu(e,(n,r)=>{let i=this.shape.keys.check(r,t);return!i&&t?.extend(r+``,`Record`,typeof e,i?`Key doesn't match schema`:`Value doesn't match value`),i&&this.shape.values.check(n,t)})}},Ed=(e,t)=>new Td(e,t),Dd=ld(Td),Od=class extends sd{constructor(e){super(),this.shape=e}check(e,t){return e!=null&&Tu(this.shape,(n,r)=>{let i=n.check(e[r],t);return!i&&t?.extend(r.toString(),`Tuple`,typeof n),i})}},kd=(...e)=>new Od(e);ld(Od);var Ad=class extends sd{constructor(e){super(),this.shape=e.length===1?e[0]:new zd(e)}check(e,t){let n=Ac(e)&&Dc(e,e=>this.shape.check(e));return!n&&t?.extend(null,`Array`,``),n}},jd=(...e)=>new Ad(e),Md=ld(Ad),Nd=dd(e=>Ac(e)),Pd=class extends sd{constructor(e,t){super(),this.shape=e,this._c=t}check(e,t){let n=e instanceof this.shape&&(this._c==null||this._c(e));return!n&&t?.extend(null,this.shape.name,e?.constructor.name),n}},Fd=(e,t=null)=>new Pd(e,t);ld(Pd);var Id=Fd(sd),Ld=ld(class extends sd{constructor(e){super(),this.len=e.length-1,this.args=kd(...e.slice(-1)),this.res=e[this.len]}check(e,t){let n=e.constructor===Function&&e.length<=this.len;return!n&&t?.extend(null,`function`,typeof e),n}}),Rd=dd(e=>typeof e==`function`);ld(class extends sd{constructor(e){super(),this.shape=e}check(e,t){let n=Dc(this.shape,n=>n.check(e,t));return!n&&t?.extend(null,`Intersectinon`,typeof e),n}},e=>e.shape.length>0);var zd=class extends sd{static _dilutes=!0;constructor(e){super(),this.shape=e}check(e,t){let n=Oc(this.shape,n=>n.check(e,t));return t?.extend(null,`Union`,typeof e),n}},Bd=(...e)=>e.findIndex(e=>Vd.check(e))>=0?Bd(...e.map(e=>af(e)).map(e=>Vd.check(e)?e.shape:[e]).flat(1)):e.length===1?e[0]:new zd(e),Vd=ld(zd),Hd=()=>!0,Ud=dd(Hd),Wd=ld(ud,e=>e.shape===Hd),Gd=dd(e=>typeof e==`bigint`),Kd=dd(e=>e===Gd),qd=dd(e=>typeof e==`symbol`);dd(e=>e===qd);var Jd=dd(e=>typeof e==`number`),Yd=dd(e=>e===Jd),Xd=dd(e=>typeof e==`string`),Zd=dd(e=>e===Xd),Qd=dd(e=>typeof e==`boolean`),$d=dd(e=>e===Qd),ef=pd(void 0);ld(fd,e=>e.shape.length===1&&e.shape[0]===void 0),pd(void 0);var tf=pd(null),nf=ld(fd,e=>e.shape.length===1&&e.shape[0]===null);ld(Uint8Array),ld(cd,e=>e.shape===Uint8Array);var rf=Bd(Jd,Xd,tf,ef,Gd,Qd,qd);(()=>{let e=jd(Ud),t=Ed(Xd,Ud),n=Bd(Jd,Xd,tf,Qd,e,t);return e.shape=n,t.shape.values=n,n})();var af=e=>{if(Id.check(e))return e;if(wd.check(e)){let t={};for(let n in e)t[n]=af(e[n]);return Sd(t)}else if(Nd.check(e))return Bd(...e.map(af));else if(rf.check(e))return pd(e);else if(Rd.check(e))return ld(e);Vl()},of=Hu?()=>{}:(e,t)=>{let n=new ad;if(!t.check(e,n))throw zl(`Expected value to be of type ${t.constructor.name}.\n${n.toString()}`)},sf=class{constructor(e){this.patterns=[],this.$state=e}if(e,t){return this.patterns.push({if:af(e),h:t}),this}else(e){return this.if(Ud,e)}done(){return(e,t)=>{for(let n=0;n<this.patterns.length;n++){let r=this.patterns[n];if(r.if.check(e))return r.h(e,t)}throw zl(`Unhandled pattern`)}}},cf=(e=>new sf(e))(Ud).if(Yd,(e,t)=>Qu(t,Qc,Zc)).if(Zd,(e,t)=>nd(t)).if($d,(e,t)=>Zu(t)).if(Kd,(e,t)=>BigInt(Qu(t,Qc,Zc))).if(Vd,(e,t)=>lf(t,rd(t,e.shape))).if(Cd,(e,t)=>{let n={};for(let r in e.shape){let i=e.shape[r];if(yd.check(i)){if(Zu(t))continue;i=i.shape}n[r]=cf(i,t)}return n}).if(Md,(e,t)=>{let n=[],r=$u(t,0,42);for(let i=0;i<r;i++)n.push(lf(t,e.shape));return n}).if(md,(e,t)=>rd(t,e.shape)).if(nf,(e,t)=>null).if(Ld,(e,t)=>{let n=lf(t,e.res);return()=>n}).if(Wd,(e,t)=>lf(t,rd(t,[Jd,Xd,tf,ef,Gd,Qd,jd(Jd),Ed(Bd(`a`,`b`,`c`),Jd)]))).if(Dd,(e,t)=>{let n={},r=Qu(t,0,3);for(let i=0;i<r;i++){let r=lf(t,e.shape.keys);n[r]=lf(t,e.shape.values)}return n}).done(),lf=(e,t)=>cf(af(t),e),uf=typeof document<`u`?document:{},df=e=>uf.createElement(e),ff=()=>uf.createDocumentFragment();dd(e=>e.nodeType===wf);var pf=e=>uf.createTextNode(e);typeof DOMParser<`u`&&new DOMParser;var mf=(e,t)=>(Xu(t,(t,n)=>{n===!1?e.removeAttribute(t):n===!0?e.setAttribute(t,``):e.setAttribute(t,n)}),e),hf=e=>{let t=ff();for(let n=0;n<e.length;n++)bf(t,e[n]);return t},gf=(e,t)=>(bf(e,hf(t)),e),_f=(e,t=[],n=[])=>gf(mf(df(e),t),n);dd(e=>e.nodeType===xf);var vf=pf;dd(e=>e.nodeType===Sf);var yf=e=>xc(e,(e,t)=>`${t}:${e};`).join(``),bf=(e,t)=>e.appendChild(t),xf=uf.ELEMENT_NODE,Sf=uf.TEXT_NODE;uf.CDATA_SECTION_NODE,uf.COMMENT_NODE;var Cf=uf.DOCUMENT_NODE;uf.DOCUMENT_TYPE_NODE;var wf=uf.DOCUMENT_FRAGMENT_NODE;dd(e=>e.nodeType===Cf);var Tf=(e=>class{constructor(e){this._=e}destroy(){e(this._)}})(clearTimeout),Ef=(e,t)=>new Tf(setTimeout(t,e)),Df=Symbol,Of=Df(),kf=Df(),Af=Df(),jf=Df(),Mf=Df(),Nf=Df(),Pf=Df(),Ff=Df(),If=Df(),Lf=e=>{e.length===1&&e[0]?.constructor===Function&&(e=e[0]());let t=[],n=[],r=0;for(;r<e.length;r++){let n=e[r];if(n===void 0)break;if(n.constructor===String||n.constructor===Number)t.push(n);else if(n.constructor===Object)break}for(r>0&&n.push(t.join(``));r<e.length;r++){let t=e[r];t instanceof Symbol||n.push(t)}return n};fu();var Rf={[Of]:Yu(`font-weight`,`bold`),[kf]:Yu(`font-weight`,`normal`),[Af]:Yu(`color`,`blue`),[Mf]:Yu(`color`,`green`),[jf]:Yu(`color`,`grey`),[Nf]:Yu(`color`,`red`),[Pf]:Yu(`color`,`purple`),[Ff]:Yu(`color`,`orange`),[If]:Yu(`color`,`black`)},zf=Uu?e=>{e.length===1&&e[0]?.constructor===Function&&(e=e[0]());let t=[],n=[],r=vc(),i=[],a=0;for(;a<e.length;a++){let i=e[a],o=Rf[i];if(o!==void 0)r.set(o.left,o.right);else{if(i===void 0)break;if(i.constructor===String||i.constructor===Number){let e=yf(r);a>0||e.length>0?(t.push(`%c`+i),n.push(e)):t.push(i)}else break}}for(a>0&&(i=n,i.unshift(t.join(``)));a<e.length;a++){let t=e[a];t instanceof Symbol||i.push(t)}return i}:Lf,Bf=(...e)=>{console.log(...zf(e)),Hf.forEach(t=>t.print(e))},Vf=(...e)=>{console.warn(...zf(e)),e.unshift(Ff),Hf.forEach(t=>t.print(e))},Hf=Cc(),Uf=e=>({[Symbol.iterator](){return this},next:e}),Wf=(e,t)=>Uf(()=>{let n;do n=e.next();while(!n.done&&!t(n.value));return n}),Gf=(e,t)=>Uf(()=>{let{done:n,value:r}=e.next();return{done:n,value:n?void 0:t(r)}}),Kf=class{constructor(e,t){this.clock=e,this.len=t}},qf=class{constructor(){this.clients=new Map}},Jf=(e,t,n)=>t.clients.forEach((t,r)=>{let i=e.doc.store.clients.get(r);if(i!=null){let r=i[i.length-1],a=r.id.clock+r.length;for(let r=0,o=t[r];r<t.length&&o.clock<a;o=t[++r])fm(e,i,o.clock,o.len,n)}}),Yf=(e,t)=>{let n=0,r=e.length-1;for(;n<=r;){let i=Nc((n+r)/2),a=e[i],o=a.clock;if(o<=t){if(t<o+a.len)return i;n=i+1}else r=i-1}return null},Xf=(e,t)=>{let n=e.clients.get(t.client);return n!==void 0&&Yf(n,t.clock)!==null},Zf=e=>{e.clients.forEach(e=>{e.sort((e,t)=>e.clock-t.clock);let t,n;for(t=1,n=1;t<e.length;t++){let r=e[n-1],i=e[t];r.clock+r.len>=i.clock?e[n-1]=new Kf(r.clock,Ic(r.len,i.clock+i.len-r.clock)):(n<t&&(e[n]=i),n++)}e.length=n})},Qf=e=>{let t=new qf;for(let n=0;n<e.length;n++)e[n].clients.forEach((r,i)=>{if(!t.clients.has(i)){let a=r.slice();for(let t=n+1;t<e.length;t++)Tc(a,e[t].clients.get(i)||[]);t.clients.set(i,a)}});return Zf(t),t},$f=(e,t,n,r)=>{bc(e.clients,t,()=>[]).push(new Kf(n,r))},ep=()=>new qf,tp=e=>{let t=ep();return e.clients.forEach((e,n)=>{let r=[];for(let t=0;t<e.length;t++){let n=e[t];if(n.deleted){let i=n.id.clock,a=n.length;if(t+1<e.length)for(let n=e[t+1];t+1<e.length&&n.deleted;n=e[++t+1])a+=n.length;r.push(new Kf(i,a))}}r.length>0&&t.clients.set(n,r)}),t},np=(e,t)=>{yl(e.restEncoder,t.clients.size),Ec(t.clients.entries()).sort((e,t)=>t[0]-e[0]).forEach(([t,n])=>{e.resetDsCurVal(),yl(e.restEncoder,t);let r=n.length;yl(e.restEncoder,r);for(let t=0;t<r;t++){let r=n[t];e.writeDsClock(r.clock),e.writeDsLen(r.len)}})},rp=e=>{let t=new qf,n=Xl(e.restDecoder);for(let r=0;r<n;r++){e.resetDsCurVal();let n=Xl(e.restDecoder),r=Xl(e.restDecoder);if(r>0){let i=bc(t.clients,n,()=>[]);for(let t=0;t<r;t++)i.push(new Kf(e.readDsClock(),e.readDsLen()))}}return t},ip=(e,t,n)=>{let r=new qf,i=Xl(e.restDecoder);for(let a=0;a<i;a++){e.resetDsCurVal();let i=Xl(e.restDecoder),a=Xl(e.restDecoder),o=n.clients.get(i)||[],s=im(n,i);for(let n=0;n<a;n++){let n=e.readDsClock(),a=n+e.readDsLen();if(n<s){s<a&&$f(r,i,s,a-s);let e=om(o,n),c=o[e];for(!c.deleted&&c.id.clock<n&&(o.splice(e+1,0,kg(t,c,n-c.id.clock)),e++);e<o.length&&(c=o[e++],c.id.clock<a);)c.deleted||(a<c.id.clock+c.length&&o.splice(e,0,kg(t,c,a-c.id.clock)),c.delete(t))}else $f(r,i,n,a-n)}}if(r.clients.size>0){let e=new mp;return yl(e.restEncoder,0),np(e,r),e.toUint8Array()}return null},ap=cu,op=class e extends jc{constructor({guid:e=du(),collectionid:t=null,gc:n=!0,gcFilter:r=()=>!0,meta:i=null,autoLoad:a=!1,shouldLoad:o=!0}={}){super(),this.gc=n,this.gcFilter=r,this.clientID=ap(),this.guid=e,this.collectionid=t,this.share=new Map,this.store=new nm,this._transaction=null,this._transactionCleanups=[],this.subdocs=new Set,this._item=null,this.shouldLoad=o,this.autoLoad=a,this.meta=i,this.isLoaded=!1,this.isSynced=!1,this.isDestroyed=!1,this.whenLoaded=pu(e=>{this.on(`load`,()=>{this.isLoaded=!0,e(this)})});let s=()=>pu(e=>{let t=n=>{(n===void 0||n===!0)&&(this.off(`sync`,t),e())};this.on(`sync`,t)});this.on(`sync`,e=>{e===!1&&this.isSynced&&(this.whenSynced=s()),this.isSynced=e===void 0||e===!0,this.isSynced&&!this.isLoaded&&this.emit(`load`,[this])}),this.whenSynced=s()}load(){let e=this._item;e!==null&&!this.shouldLoad&&bm(e.parent.doc,e=>{e.subdocsLoaded.add(this)},null,!0),this.shouldLoad=!0}getSubdocs(){return this.subdocs}getSubdocGuids(){return new Set(Ec(this.subdocs).map(e=>e.guid))}transact(e,t=null){return bm(this,e,t)}get(e,t=Xm){let n=bc(this.share,e,()=>{let e=new t;return e._integrate(this,null),e}),r=n.constructor;if(t!==Xm&&r!==t)if(r===Xm){let r=new t;r._map=n._map,n._map.forEach(e=>{for(;e!==null;e=e.left)e.parent=r}),r._start=n._start;for(let e=r._start;e!==null;e=e.right)e.parent=r;return r._length=n._length,this.share.set(e,r),r._integrate(this,null),r}else throw Error(`Type with the name ${e} has already been defined with a different constructor`);return n}getArray(e=``){return this.get(e,_h)}getText(e=``){return this.get(e,Rh)}getMap(e=``){return this.get(e,bh)}getXmlElement(e=``){return this.get(e,Uh)}getXmlFragment(e=``){return this.get(e,Vh)}toJSON(){let e={};return this.share.forEach((t,n)=>{e[n]=t.toJSON()}),e}destroy(){this.isDestroyed=!0,Ec(this.subdocs).forEach(e=>e.destroy());let t=this._item;if(t!==null){this._item=null;let n=t.content;n.doc=new e({guid:this.guid,...n.opts,shouldLoad:!1}),n.doc._item=t,bm(t.parent.doc,e=>{let r=n.doc;t.deleted||e.subdocsAdded.add(r),e.subdocsRemoved.add(this)},null,!0)}this.emit(`destroyed`,[!0]),this.emit(`destroy`,[this]),super.destroy()}},sp=class{constructor(e){this.restDecoder=e}resetDsCurVal(){}readDsClock(){return Xl(this.restDecoder)}readDsLen(){return Xl(this.restDecoder)}},cp=class extends sp{readLeftID(){return Z(Xl(this.restDecoder),Xl(this.restDecoder))}readRightID(){return Z(Xl(this.restDecoder),Xl(this.restDecoder))}readClient(){return Xl(this.restDecoder)}readInfo(){return Yl(this.restDecoder)}readString(){return Ql(this.restDecoder)}readParentInfo(){return Xl(this.restDecoder)===1}readTypeRef(){return Xl(this.restDecoder)}readLen(){return Xl(this.restDecoder)}readAny(){return tu(this.restDecoder)}readBuf(){return Ku(Jl(this.restDecoder))}readJSON(){return JSON.parse(Ql(this.restDecoder))}readKey(){return Ql(this.restDecoder)}},lp=class{constructor(e){this.dsCurrVal=0,this.restDecoder=e}resetDsCurVal(){this.dsCurrVal=0}readDsClock(){return this.dsCurrVal+=Xl(this.restDecoder),this.dsCurrVal}readDsLen(){let e=Xl(this.restDecoder)+1;return this.dsCurrVal+=e,e}},up=class extends lp{constructor(e){super(e),this.keys=[],Xl(e),this.keyClockDecoder=new iu(Jl(e)),this.clientDecoder=new ru(Jl(e)),this.leftClockDecoder=new iu(Jl(e)),this.rightClockDecoder=new iu(Jl(e)),this.infoDecoder=new nu(Jl(e),Yl),this.stringDecoder=new au(Jl(e)),this.parentInfoDecoder=new nu(Jl(e),Yl),this.typeRefDecoder=new ru(Jl(e)),this.lenDecoder=new ru(Jl(e))}readLeftID(){return new Lp(this.clientDecoder.read(),this.leftClockDecoder.read())}readRightID(){return new Lp(this.clientDecoder.read(),this.rightClockDecoder.read())}readClient(){return this.clientDecoder.read()}readInfo(){return this.infoDecoder.read()}readString(){return this.stringDecoder.read()}readParentInfo(){return this.parentInfoDecoder.read()===1}readTypeRef(){return this.typeRefDecoder.read()}readLen(){return this.lenDecoder.read()}readAny(){return tu(this.restDecoder)}readBuf(){return Jl(this.restDecoder)}readJSON(){return tu(this.restDecoder)}readKey(){let e=this.keyClockDecoder.read();if(e<this.keys.length)return this.keys[e];{let e=this.stringDecoder.read();return this.keys.push(e),e}}},dp=class{constructor(){this.restEncoder=fl()}toUint8Array(){return hl(this.restEncoder)}resetDsCurVal(){}writeDsClock(e){yl(this.restEncoder,e)}writeDsLen(e){yl(this.restEncoder,e)}},fp=class extends dp{writeLeftID(e){yl(this.restEncoder,e.client),yl(this.restEncoder,e.clock)}writeRightID(e){yl(this.restEncoder,e.client),yl(this.restEncoder,e.clock)}writeClient(e){yl(this.restEncoder,e)}writeInfo(e){vl(this.restEncoder,e)}writeString(e){Cl(this.restEncoder,e)}writeParentInfo(e){yl(this.restEncoder,+!!e)}writeTypeRef(e){yl(this.restEncoder,e)}writeLen(e){yl(this.restEncoder,e)}writeAny(e){Ml(this.restEncoder,e)}writeBuf(e){Tl(this.restEncoder,e)}writeJSON(e){Cl(this.restEncoder,JSON.stringify(e))}writeKey(e){Cl(this.restEncoder,e)}},pp=class{constructor(){this.restEncoder=fl(),this.dsCurrVal=0}toUint8Array(){return hl(this.restEncoder)}resetDsCurVal(){this.dsCurrVal=0}writeDsClock(e){let t=e-this.dsCurrVal;this.dsCurrVal=e,yl(this.restEncoder,t)}writeDsLen(e){e===0&&Vl(),yl(this.restEncoder,e-1),this.dsCurrVal+=e}},mp=class extends pp{constructor(){super(),this.keyMap=new Map,this.keyClock=0,this.keyClockEncoder=new Ll,this.clientEncoder=new Fl,this.leftClockEncoder=new Ll,this.rightClockEncoder=new Ll,this.infoEncoder=new Nl(vl),this.stringEncoder=new Rl,this.parentInfoEncoder=new Nl(vl),this.typeRefEncoder=new Fl,this.lenEncoder=new Fl}toUint8Array(){let e=fl();return yl(e,0),Tl(e,this.keyClockEncoder.toUint8Array()),Tl(e,this.clientEncoder.toUint8Array()),Tl(e,this.leftClockEncoder.toUint8Array()),Tl(e,this.rightClockEncoder.toUint8Array()),Tl(e,hl(this.infoEncoder)),Tl(e,this.stringEncoder.toUint8Array()),Tl(e,hl(this.parentInfoEncoder)),Tl(e,this.typeRefEncoder.toUint8Array()),Tl(e,this.lenEncoder.toUint8Array()),wl(e,hl(this.restEncoder)),hl(e)}writeLeftID(e){this.clientEncoder.write(e.client),this.leftClockEncoder.write(e.clock)}writeRightID(e){this.clientEncoder.write(e.client),this.rightClockEncoder.write(e.clock)}writeClient(e){this.clientEncoder.write(e)}writeInfo(e){this.infoEncoder.write(e)}writeString(e){this.stringEncoder.write(e)}writeParentInfo(e){this.parentInfoEncoder.write(+!!e)}writeTypeRef(e){this.typeRefEncoder.write(e)}writeLen(e){this.lenEncoder.write(e)}writeAny(e){Ml(this.restEncoder,e)}writeBuf(e){Tl(this.restEncoder,e)}writeJSON(e){Ml(this.restEncoder,e)}writeKey(e){let t=this.keyMap.get(e);t===void 0?(this.keyClockEncoder.write(this.keyClock++),this.stringEncoder.write(e)):this.keyClockEncoder.write(t)}},hp=(e,t,n,r)=>{r=Ic(r,t[0].id.clock);let i=om(t,r);yl(e.restEncoder,t.length-i),e.writeClient(n),yl(e.restEncoder,r);let a=t[i];a.write(e,r-a.id.clock);for(let n=i+1;n<t.length;n++)t[n].write(e,0)},gp=(e,t,n)=>{let r=new Map;n.forEach((e,n)=>{im(t,n)>e&&r.set(n,e)}),rm(t).forEach((e,t)=>{n.has(t)||r.set(t,0)}),yl(e.restEncoder,r.size),Ec(r.entries()).sort((e,t)=>t[0]-e[0]).forEach(([n,r])=>{hp(e,t.clients.get(n),n,r)})},_p=(e,t)=>{let n=vc(),r=Xl(e.restDecoder);for(let i=0;i<r;i++){let r=Xl(e.restDecoder),i=Array(r),a=e.readClient(),o=Xl(e.restDecoder);n.set(a,{i:0,refs:i});for(let n=0;n<r;n++){let r=e.readInfo();switch(31&r){case 0:{let t=e.readLen();i[n]=new Qh(Z(a,o),t),o+=t;break}case 10:{let t=Xl(e.restDecoder);i[n]=new Ig(Z(a,o),t),o+=t;break}default:{let s=(r&192)==0,c=new Mg(Z(a,o),null,(r&128)==128?e.readLeftID():null,null,(r&64)==64?e.readRightID():null,s?e.readParentInfo()?t.get(e.readString()):e.readLeftID():null,s&&(r&32)==32?e.readString():null,Ng(e,r));i[n]=c,o+=c.length}}}}return n},vp=(e,t,n)=>{let r=[],i=Ec(n.keys()).sort((e,t)=>e-t);if(i.length===0)return null;let a=()=>{if(i.length===0)return null;let e=n.get(i[i.length-1]);for(;e.refs.length===e.i;)if(i.pop(),i.length>0)e=n.get(i[i.length-1]);else return null;return e},o=a();if(o===null)return null;let s=new nm,c=new Map,l=(e,t)=>{let n=c.get(e);(n==null||n>t)&&c.set(e,t)},u=o.refs[o.i++],d=new Map,f=()=>{for(let e of r){let t=e.id.client,r=n.get(t);r?(r.i--,s.clients.set(t,r.refs.slice(r.i)),n.delete(t),r.i=0,r.refs=[]):s.clients.set(t,[e]),i=i.filter(e=>e!==t)}r.length=0};for(;;){if(u.constructor!==Ig){let i=bc(d,u.id.client,()=>im(t,u.id.client))-u.id.clock;if(i<0)r.push(u),l(u.id.client,u.id.clock-1),f();else{let a=u.getMissing(e,t);if(a!==null){r.push(u);let e=n.get(a)||{refs:[],i:0};if(e.refs.length===e.i)l(a,im(t,a)),f();else{u=e.refs[e.i++];continue}}else (i===0||i<u.length)&&(u.integrate(e,i),d.set(u.id.client,u.id.clock+u.length))}}if(r.length>0)u=r.pop();else if(o!==null&&o.i<o.refs.length)u=o.refs[o.i++];else{if(o=a(),o===null)break;u=o.refs[o.i++]}}if(s.clients.size>0){let e=new mp;return gp(e,s,new Map),yl(e.restEncoder,0),{missing:c,update:e.toUint8Array()}}return null},yp=(e,t)=>gp(e,t.doc.store,t.beforeState),bp=(e,t,n,r=new up(e))=>bm(t,e=>{e.local=!1;let t=!1,n=e.doc,i=n.store,a=vp(e,i,_p(r,n)),o=i.pendingStructs;if(o){for(let[e,n]of o.missing)if(n<im(i,e)){t=!0;break}if(a){for(let[e,t]of a.missing){let n=o.missing.get(e);(n==null||n>t)&&o.missing.set(e,t)}o.update=Am([o.update,a.update])}}else i.pendingStructs=a;let s=ip(r,e,i);if(i.pendingDs){let t=new up(Gl(i.pendingDs));Xl(t.restDecoder);let n=ip(t,e,i);s&&n?i.pendingDs=Am([s,n]):i.pendingDs=s||n}else i.pendingDs=s;if(t){let t=i.pendingStructs.update;i.pendingStructs=null,xp(e.doc,t)}},n,!1),xp=(e,t,n,r=up)=>{let i=Gl(t);bp(i,e,n,new r(i))},Sp=(e,t,n)=>xp(e,t,n,cp),Cp=(e,t,n=new Map)=>{gp(e,t.store,n),np(e,tp(t.store))},wp=(e,t=new Uint8Array([0]),n=new mp)=>{Cp(n,e,Dp(t));let r=[n.toUint8Array()];if(e.store.pendingDs&&r.push(e.store.pendingDs),e.store.pendingStructs&&r.push(jm(e.store.pendingStructs.update,t)),r.length>1){if(n.constructor===fp)return Om(r.map((e,t)=>t===0?e:Im(e)));if(n.constructor===mp)return Am(r)}return r[0]},Tp=(e,t)=>wp(e,t,new fp),Ep=e=>{let t=new Map,n=Xl(e.restDecoder);for(let r=0;r<n;r++){let n=Xl(e.restDecoder),r=Xl(e.restDecoder);t.set(n,r)}return t},Dp=e=>Ep(new sp(Gl(e))),Op=(e,t)=>(yl(e.restEncoder,t.size),Ec(t.entries()).sort((e,t)=>t[0]-e[0]).forEach(([t,n])=>{yl(e.restEncoder,t),yl(e.restEncoder,n)}),e),kp=(e,t)=>Op(e,rm(t.store)),Ap=(e,t=new pp)=>(e instanceof Map?Op(t,e):kp(t,e),t.toUint8Array()),jp=e=>Ap(e,new dp),Mp=class{constructor(){this.l=[]}},Np=()=>new Mp,Pp=(e,t)=>e.l.push(t),Fp=(e,t)=>{let n=e.l,r=n.length;e.l=n.filter(e=>t!==e),r===e.l.length&&console.error(`[yjs] Tried to remove event handler that doesn't exist.`)},Ip=(e,t,n)=>Au(e.l,[t,n]),Lp=class{constructor(e,t){this.client=e,this.clock=t}},Rp=(e,t)=>e===t||e!==null&&t!==null&&e.client===t.client&&e.clock===t.clock,Z=(e,t)=>new Lp(e,t),zp=e=>{for(let[t,n]of e.doc.share.entries())if(n===e)return t;throw Vl()},Bp=(e,t)=>{for(;t!==null;){if(t.parent===e)return!0;t=t.parent._item}return!1},Vp=class{constructor(e,t,n,r=0){this.type=e,this.tname=t,this.item=n,this.assoc=r}},Hp=e=>{let t={};return e.type&&(t.type=e.type),e.tname&&(t.tname=e.tname),e.item&&(t.item=e.item),e.assoc!=null&&(t.assoc=e.assoc),t},Up=e=>new Vp(e.type==null?null:Z(e.type.client,e.type.clock),e.tname??null,e.item==null?null:Z(e.item.client,e.item.clock),e.assoc==null?0:e.assoc),Wp=class{constructor(e,t,n=0){this.type=e,this.index=t,this.assoc=n}},Gp=(e,t,n=0)=>new Wp(e,t,n),Kp=(e,t,n)=>{let r=null,i=null;return e._item===null?i=zp(e):r=Z(e._item.id.client,e._item.id.clock),new Vp(r,i,t,n)},qp=(e,t,n=0)=>{let r=e._start;if(n<0){if(t===0)return Kp(e,null,n);t--}for(;r!==null;){if(!r.deleted&&r.countable){if(r.length>t)return Kp(e,Z(r.id.client,r.id.clock+t),n);t-=r.length}if(r.right===null&&n<0)return Kp(e,r.lastId,n);r=r.right}return Kp(e,null,n)},Jp=(e,t)=>{let n=sm(e,t);return{item:n,diff:t.clock-n.id.clock}},Yp=(e,t,n=!0)=>{let r=t.store,i=e.item,a=e.type,o=e.tname,s=e.assoc,c=null,l=0;if(i!==null){if(im(r,i.client)<=i.clock)return null;let e=n?Dg(r,i):Jp(r,i),t=e.item;if(!(t instanceof Mg))return null;if(c=t.parent,c._item===null||!c._item.deleted){l=t.deleted||!t.countable?0:e.diff+(s>=0?0:1);let n=t.left;for(;n!==null;)!n.deleted&&n.countable&&(l+=n.length),n=n.left}}else{if(o!==null)c=t.get(o);else if(a!==null){if(im(r,a.client)<=a.clock)return null;let{item:e}=n?Dg(r,a):{item:sm(r,a)};if(e instanceof Mg&&e.content instanceof Tg)c=e.content.type;else return null}else throw Vl();l=s>=0?c._length:0}return Gp(c,l,e.assoc)},Xp=(e,t)=>e===t||e!==null&&t!==null&&e.tname===t.tname&&Rp(e.item,t.item)&&Rp(e.type,t.type)&&e.assoc===t.assoc,Zp=class{constructor(e,t){this.ds=e,this.sv=t}},Qp=(e,t)=>new Zp(e,t);Qp(ep(),new Map);var $p=e=>Qp(tp(e.store),rm(e.store)),em=(e,t)=>t===void 0?!e.deleted:t.sv.has(e.id.client)&&(t.sv.get(e.id.client)||0)>e.id.clock&&!Xf(t.ds,e.id),tm=(e,t)=>{let n=bc(e.meta,tm,Cc),r=e.doc.store;n.has(t)||(t.sv.forEach((t,n)=>{t<im(r,n)&&lm(e,Z(n,t))}),Jf(e,t.ds,e=>{}),n.add(t))},nm=class{constructor(){this.clients=new Map,this.pendingStructs=null,this.pendingDs=null}},rm=e=>{let t=new Map;return e.clients.forEach((e,n)=>{let r=e[e.length-1];t.set(n,r.id.clock+r.length)}),t},im=(e,t)=>{let n=e.clients.get(t);if(n===void 0)return 0;let r=n[n.length-1];return r.id.clock+r.length},am=(e,t)=>{let n=e.clients.get(t.id.client);if(n===void 0)n=[],e.clients.set(t.id.client,n);else{let e=n[n.length-1];if(e.id.clock+e.length!==t.id.clock)throw Vl()}n.push(t)},om=(e,t)=>{let n=0,r=e.length-1,i=e[r],a=i.id.clock;if(a===t)return r;let o=Nc(t/(a+i.length-1)*r);for(;n<=r;){if(i=e[o],a=i.id.clock,a<=t){if(t<a+i.length)return o;n=o+1}else r=o-1;o=Nc((n+r)/2)}throw Vl()},sm=(e,t)=>{let n=e.clients.get(t.client);return n[om(n,t.clock)]},cm=(e,t,n)=>{let r=om(t,n),i=t[r];return i.id.clock<n&&i instanceof Mg?(t.splice(r+1,0,kg(e,i,n-i.id.clock)),r+1):r},lm=(e,t)=>{let n=e.doc.store.clients.get(t.client);return n[cm(e,n,t.clock)]},um=(e,t,n)=>{let r=t.clients.get(n.client),i=om(r,n.clock),a=r[i];return n.clock!==a.id.clock+a.length-1&&a.constructor!==Qh&&r.splice(i+1,0,kg(e,a,n.clock-a.id.clock+1)),a},dm=(e,t,n)=>{let r=e.clients.get(t.id.client);r[om(r,t.id.clock)]=n},fm=(e,t,n,r,i)=>{if(r===0)return;let a=n+r,o=cm(e,t,n),s;do s=t[o++],a<s.id.clock+s.length&&cm(e,t,a),i(s);while(o<t.length&&t[o].id.clock<a)},pm=class{constructor(e,t,n){this.doc=e,this.deleteSet=new qf,this.beforeState=rm(e.store),this.afterState=new Map,this.changed=new Map,this.changedParentTypes=new Map,this._mergeStructs=[],this.origin=t,this.meta=new Map,this.local=n,this.subdocsAdded=new Set,this.subdocsRemoved=new Set,this.subdocsLoaded=new Set,this._needFormattingCleanup=!1}},mm=(e,t)=>t.deleteSet.clients.size===0&&!Sc(t.afterState,(e,n)=>t.beforeState.get(n)!==e)?!1:(Zf(t.deleteSet),yp(e,t),np(e,t.deleteSet),!0),hm=(e,t,n)=>{let r=t._item;(r===null||r.id.clock<(e.beforeState.get(r.id.client)||0)&&!r.deleted)&&bc(e.changed,t,Cc).add(n)},gm=(e,t)=>{let n=e[t],r=e[t-1],i=t;for(;i>0;n=r,r=e[--i-1]){if(r.deleted===n.deleted&&r.constructor===n.constructor&&r.mergeWith(n)){n instanceof Mg&&n.parentSub!==null&&n.parent._map.get(n.parentSub)===n&&n.parent._map.set(n.parentSub,r);continue}break}let a=t-i;return a&&e.splice(t+1-a,a),a},_m=(e,t,n)=>{for(let[r,i]of e.clients.entries()){let e=t.clients.get(r);for(let r=i.length-1;r>=0;r--){let a=i[r],o=a.clock+a.len;for(let r=om(e,a.clock),i=e[r];r<e.length&&i.id.clock<o;i=e[++r]){let i=e[r];if(a.clock+a.len<=i.id.clock)break;i instanceof Mg&&i.deleted&&!i.keep&&n(i)&&i.gc(t,!1)}}}},vm=(e,t)=>{e.clients.forEach((e,n)=>{let r=t.clients.get(n);for(let t=e.length-1;t>=0;t--){let n=e[t],i=Fc(r.length-1,1+om(r,n.clock+n.len-1));for(let e=i,t=r[e];e>0&&t.id.clock>=n.clock;t=r[e])e-=1+gm(r,e)}})},ym=(e,t)=>{if(t<e.length){let n=e[t],r=n.doc,i=r.store,a=n.deleteSet,o=n._mergeStructs;try{Zf(a),n.afterState=rm(n.doc.store),r.emit(`beforeObserverCalls`,[n,r]);let e=[];n.changed.forEach((t,r)=>e.push(()=>{(r._item===null||!r._item.deleted)&&r._callObserver(n,t)})),e.push(()=>{n.changedParentTypes.forEach((t,r)=>{r._dEH.l.length>0&&(r._item===null||!r._item.deleted)&&(t=t.filter(e=>e.target._item===null||!e.target._item.deleted),t.forEach(e=>{e.currentTarget=r,e._path=null}),t.sort((e,t)=>e.path.length-t.path.length),e.push(()=>{Ip(r._dEH,t,n)}))}),e.push(()=>r.emit(`afterTransaction`,[n,r])),e.push(()=>{n._needFormattingCleanup&&Fh(n)})}),Au(e,[])}finally{r.gc&&_m(a,i,r.gcFilter),vm(a,i),n.afterState.forEach((e,t)=>{let r=n.beforeState.get(t)||0;if(r!==e){let e=i.clients.get(t),n=Ic(om(e,r),1);for(let t=e.length-1;t>=n;)t-=1+gm(e,t)}});for(let e=o.length-1;e>=0;e--){let{client:t,clock:n}=o[e].id,r=i.clients.get(t),a=om(r,n);a+1<r.length&&gm(r,a+1)>1||a>0&&gm(r,a)}if(!n.local&&n.afterState.get(r.clientID)!==n.beforeState.get(r.clientID)&&(Bf(Ff,Of,`[yjs] `,kf,Nf,`Changed the client-id because another client seems to be using it.`),r.clientID=ap()),r.emit(`afterTransactionCleanup`,[n,r]),r._observers.has(`update`)){let e=new fp;mm(e,n)&&r.emit(`update`,[e.toUint8Array(),n.origin,r,n])}if(r._observers.has(`updateV2`)){let e=new mp;mm(e,n)&&r.emit(`updateV2`,[e.toUint8Array(),n.origin,r,n])}let{subdocsAdded:s,subdocsLoaded:c,subdocsRemoved:l}=n;(s.size>0||l.size>0||c.size>0)&&(s.forEach(e=>{e.clientID=r.clientID,e.collectionid??=r.collectionid,r.subdocs.add(e)}),l.forEach(e=>r.subdocs.delete(e)),r.emit(`subdocs`,[{loaded:c,added:s,removed:l},r,n]),l.forEach(e=>e.destroy())),e.length<=t+1?(r._transactionCleanups=[],r.emit(`afterAllTransactions`,[r,e])):ym(e,t+1)}}},bm=(e,t,n=null,r=!0)=>{let i=e._transactionCleanups,a=!1,o=null;e._transaction===null&&(a=!0,e._transaction=new pm(e,n,r),i.push(e._transaction),i.length===1&&e.emit(`beforeAllTransactions`,[e]),e.emit(`beforeTransaction`,[e._transaction,e]));try{o=t(e._transaction)}finally{if(a){let t=e._transaction===i[0];e._transaction=null,t&&ym(i,0)}}return o},xm=class{constructor(e,t){this.insertions=t,this.deletions=e,this.meta=new Map}},Sm=(e,t,n)=>{Jf(e,n.deletions,n=>{n instanceof Mg&&t.scope.some(t=>t===e.doc||Bp(t,n))&&Og(n,!1)})},Cm=(e,t,n)=>{let r=null,i=e.doc,a=e.scope;bm(i,n=>{for(;t.length>0&&e.currStackItem===null;){let r=i.store,o=t.pop(),s=new Set,c=[],l=!1;Jf(n,o.insertions,e=>{if(e instanceof Mg){if(e.redone!==null){let{item:t,diff:i}=Dg(r,e.id);i>0&&(t=lm(n,Z(t.id.client,t.id.clock+i))),e=t}!e.deleted&&a.some(t=>t===n.doc||Bp(t,e))&&c.push(e)}}),Jf(n,o.deletions,e=>{e instanceof Mg&&a.some(t=>t===n.doc||Bp(t,e))&&!Xf(o.insertions,e.id)&&s.add(e)}),s.forEach(t=>{l=jg(n,t,s,o.insertions,e.ignoreRemoteMapChanges,e)!==null||l});for(let t=c.length-1;t>=0;t--){let r=c[t];e.deleteFilter(r)&&(r.delete(n),l=!0)}e.currStackItem=l?o:null}n.changed.forEach((e,t)=>{e.has(null)&&t._searchMarker&&(t._searchMarker.length=0)}),r=n},e);let o=e.currStackItem;if(o!=null){let t=r.changedParentTypes;e.emit(`stack-item-popped`,[{stackItem:o,type:n,changedParentTypes:t,origin:e},e]),e.currStackItem=null}return o},wm=class extends jc{constructor(e,{captureTimeout:t=500,captureTransaction:n=e=>!0,deleteFilter:r=()=>!0,trackedOrigins:i=new Set([null]),ignoreRemoteMapChanges:a=!1,doc:o=Ac(e)?e[0].doc:e instanceof op?e:e.doc}={}){super(),this.scope=[],this.doc=o,this.addToScope(e),this.deleteFilter=r,i.add(this),this.trackedOrigins=i,this.captureTransaction=n,this.undoStack=[],this.redoStack=[],this.undoing=!1,this.redoing=!1,this.currStackItem=null,this.lastChange=0,this.ignoreRemoteMapChanges=a,this.captureTimeout=t,this.afterTransactionHandler=e=>{if(!this.captureTransaction(e)||!this.scope.some(t=>e.changedParentTypes.has(t)||t===this.doc)||!this.trackedOrigins.has(e.origin)&&(!e.origin||!this.trackedOrigins.has(e.origin.constructor)))return;let t=this.undoing,n=this.redoing,r=t?this.redoStack:this.undoStack;t?this.stopCapturing():n||this.clear(!1,!0);let i=new qf;e.afterState.forEach((t,n)=>{let r=e.beforeState.get(n)||0,a=t-r;a>0&&$f(i,n,r,a)});let a=fu(),o=!1;if(this.lastChange>0&&a-this.lastChange<this.captureTimeout&&r.length>0&&!t&&!n){let t=r[r.length-1];t.deletions=Qf([t.deletions,e.deleteSet]),t.insertions=Qf([t.insertions,i])}else r.push(new xm(e.deleteSet,i)),o=!0;!t&&!n&&(this.lastChange=a),Jf(e,e.deleteSet,t=>{t instanceof Mg&&this.scope.some(n=>n===e.doc||Bp(n,t))&&Og(t,!0)});let s=[{stackItem:r[r.length-1],origin:e.origin,type:t?`redo`:`undo`,changedParentTypes:e.changedParentTypes},this];o?this.emit(`stack-item-added`,s):this.emit(`stack-item-updated`,s)},this.doc.on(`afterTransaction`,this.afterTransactionHandler),this.doc.on(`destroy`,()=>{this.destroy()})}addToScope(e){let t=new Set(this.scope);e=Ac(e)?e:[e],e.forEach(e=>{t.has(e)||(t.add(e),(e instanceof Xm?e.doc!==this.doc:e!==this.doc)&&Vf(`[yjs#509] Not same Y.Doc`),this.scope.push(e))})}addTrackedOrigin(e){this.trackedOrigins.add(e)}removeTrackedOrigin(e){this.trackedOrigins.delete(e)}clear(e=!0,t=!0){(e&&this.canUndo()||t&&this.canRedo())&&this.doc.transact(n=>{e&&(this.undoStack.forEach(e=>Sm(n,this,e)),this.undoStack=[]),t&&(this.redoStack.forEach(e=>Sm(n,this,e)),this.redoStack=[]),this.emit(`stack-cleared`,[{undoStackCleared:e,redoStackCleared:t}])})}stopCapturing(){this.lastChange=0}undo(){this.undoing=!0;let e;try{e=Cm(this,this.undoStack,`undo`)}finally{this.undoing=!1}return e}redo(){this.redoing=!0;let e;try{e=Cm(this,this.redoStack,`redo`)}finally{this.redoing=!1}return e}canUndo(){return this.undoStack.length>0}canRedo(){return this.redoStack.length>0}destroy(){this.trackedOrigins.delete(this),this.doc.off(`afterTransaction`,this.afterTransactionHandler),super.destroy()}};function*Tm(e){let t=Xl(e.restDecoder);for(let n=0;n<t;n++){let t=Xl(e.restDecoder),n=e.readClient(),r=Xl(e.restDecoder);for(let i=0;i<t;i++){let t=e.readInfo();if(t===10){let t=Xl(e.restDecoder);yield new Ig(Z(n,r),t),r+=t}else if(31&t){let i=(t&192)==0,a=new Mg(Z(n,r),null,(t&128)==128?e.readLeftID():null,null,(t&64)==64?e.readRightID():null,i?e.readParentInfo()?e.readString():e.readLeftID():null,i&&(t&32)==32?e.readString():null,Ng(e,t));yield a,r+=a.length}else{let t=e.readLen();yield new Qh(Z(n,r),t),r+=t}}}}var Em=class{constructor(e,t){this.gen=Tm(e),this.curr=null,this.done=!1,this.filterSkips=t,this.next()}next(){do this.curr=this.gen.next().value||null;while(this.filterSkips&&this.curr!==null&&this.curr.constructor===Ig);return this.curr}},Dm=class{constructor(e){this.currClient=0,this.startClock=0,this.written=0,this.encoder=e,this.clientStructs=[]}},Om=e=>Am(e,cp,fp),km=(e,t)=>{if(e.constructor===Qh){let{client:n,clock:r}=e.id;return new Qh(Z(n,r+t),e.length-t)}else if(e.constructor===Ig){let{client:n,clock:r}=e.id;return new Ig(Z(n,r+t),e.length-t)}else{let n=e,{client:r,clock:i}=n.id;return new Mg(Z(r,i+t),null,Z(r,i+t-1),null,n.rightOrigin,n.parent,n.parentSub,n.content.splice(t))}},Am=(e,t=up,n=mp)=>{if(e.length===1)return e[0];let r=e.map(e=>new t(Gl(e))),i=r.map(e=>new Em(e,!0)),a=null,o=new n,s=new Dm(o);for(;i=i.filter(e=>e.curr!==null),i.sort((e,t)=>{if(e.curr.id.client===t.curr.id.client){let n=e.curr.id.clock-t.curr.id.clock;return n===0?e.curr.constructor===t.curr.constructor?0:e.curr.constructor===Ig?1:-1:n}else return t.curr.id.client-e.curr.id.client}),i.length!==0;){let e=i[0],t=e.curr.id.client;if(a!==null){let n=e.curr,r=!1;for(;n!==null&&n.id.clock+n.length<=a.struct.id.clock+a.struct.length&&n.id.client>=a.struct.id.client;)n=e.next(),r=!0;if(n===null||n.id.client!==t||r&&n.id.clock>a.struct.id.clock+a.struct.length)continue;if(t!==a.struct.id.client)Nm(s,a.struct,a.offset),a={struct:n,offset:0},e.next();else if(a.struct.id.clock+a.struct.length<n.id.clock)if(a.struct.constructor===Ig)a.struct.length=n.id.clock+n.length-a.struct.id.clock;else{Nm(s,a.struct,a.offset);let e=n.id.clock-a.struct.id.clock-a.struct.length;a={struct:new Ig(Z(t,a.struct.id.clock+a.struct.length),e),offset:0}}else{let t=a.struct.id.clock+a.struct.length-n.id.clock;t>0&&(a.struct.constructor===Ig?a.struct.length-=t:n=km(n,t)),a.struct.mergeWith(n)||(Nm(s,a.struct,a.offset),a={struct:n,offset:0},e.next())}}else a={struct:e.curr,offset:0},e.next();for(let n=e.curr;n!==null&&n.id.client===t&&n.id.clock===a.struct.id.clock+a.struct.length&&n.constructor!==Ig;n=e.next())Nm(s,a.struct,a.offset),a={struct:n,offset:0}}return a!==null&&(Nm(s,a.struct,a.offset),a=null),Pm(s),np(o,Qf(r.map(e=>rp(e)))),o.toUint8Array()},jm=(e,t,n=up,r=mp)=>{let i=Dp(t),a=new r,o=new Dm(a),s=new n(Gl(e)),c=new Em(s,!1);for(;c.curr;){let e=c.curr,t=e.id.client,n=i.get(t)||0;if(c.curr.constructor===Ig){c.next();continue}if(e.id.clock+e.length>n)for(Nm(o,e,Ic(n-e.id.clock,0)),c.next();c.curr&&c.curr.id.client===t;)Nm(o,c.curr,0),c.next();else for(;c.curr&&c.curr.id.client===t&&c.curr.id.clock+c.curr.length<=n;)c.next()}return Pm(o),np(a,rp(s)),a.toUint8Array()},Mm=e=>{e.written>0&&(e.clientStructs.push({written:e.written,restEncoder:hl(e.encoder.restEncoder)}),e.encoder.restEncoder=fl(),e.written=0)},Nm=(e,t,n)=>{e.written>0&&e.currClient!==t.id.client&&Mm(e),e.written===0&&(e.currClient=t.id.client,e.encoder.writeClient(t.id.client),yl(e.encoder.restEncoder,t.id.clock+n)),t.write(e.encoder,n),e.written++},Pm=e=>{Mm(e);let t=e.encoder.restEncoder;yl(t,e.clientStructs.length);for(let n=0;n<e.clientStructs.length;n++){let r=e.clientStructs[n];yl(t,r.written),wl(t,r.restEncoder)}},Fm=(e,t,n,r)=>{let i=new n(Gl(e)),a=new Em(i,!1),o=new r,s=new Dm(o);for(let e=a.curr;e!==null;e=a.next())Nm(s,t(e),0);return Pm(s),np(o,rp(i)),o.toUint8Array()},Im=e=>Fm(e,ju,up,fp),Lm=`You must not compute changes after the event-handler fired.`,Rm=class{constructor(e,t){this.target=e,this.currentTarget=e,this.transaction=t,this._changes=null,this._keys=null,this._delta=null,this._path=null}get path(){return this._path||=zm(this.currentTarget,this.target)}deletes(e){return Xf(this.transaction.deleteSet,e.id)}get keys(){if(this._keys===null){if(this.transaction.doc._transactionCleanups.length===0)throw zl(Lm);let e=new Map,t=this.target;this.transaction.changed.get(t).forEach(n=>{if(n!==null){let r=t._map.get(n),i,a;if(this.adds(r)){let e=r.left;for(;e!==null&&this.adds(e);)e=e.left;if(this.deletes(r))if(e!==null&&this.deletes(e))i=`delete`,a=wc(e.content.getContent());else return;else e!==null&&this.deletes(e)?(i=`update`,a=wc(e.content.getContent())):(i=`add`,a=void 0)}else if(this.deletes(r))i=`delete`,a=wc(r.content.getContent());else return;e.set(n,{action:i,oldValue:a})}}),this._keys=e}return this._keys}get delta(){return this.changes.delta}adds(e){return e.id.clock>=(this.transaction.beforeState.get(e.id.client)||0)}get changes(){let e=this._changes;if(e===null){if(this.transaction.doc._transactionCleanups.length===0)throw zl(Lm);let t=this.target,n=Cc(),r=Cc(),i=[];if(e={added:n,deleted:r,delta:i,keys:this.keys},this.transaction.changed.get(t).has(null)){let e=null,a=()=>{e&&i.push(e)};for(let i=t._start;i!==null;i=i.right)i.deleted?this.deletes(i)&&!this.adds(i)&&((e===null||e.delete===void 0)&&(a(),e={delete:0}),e.delete+=i.length,r.add(i)):this.adds(i)?((e===null||e.insert===void 0)&&(a(),e={insert:[]}),e.insert=e.insert.concat(i.content.getContent()),n.add(i)):((e===null||e.retain===void 0)&&(a(),e={retain:0}),e.retain+=i.length);e!==null&&e.retain===void 0&&a()}this._changes=e}return e}},zm=(e,t)=>{let n=[];for(;t._item!==null&&t!==e;){if(t._item.parentSub!==null)n.unshift(t._item.parentSub);else{let e=0,r=t._item.parent._start;for(;r!==t._item&&r!==null;)!r.deleted&&r.countable&&(e+=r.length),r=r.right;n.unshift(e)}t=t._item.parent}return n},Bm=()=>{Vf(`Invalid access: Add Yjs type to a document before reading data.`)},Vm=80,Hm=0,Um=class{constructor(e,t){e.marker=!0,this.p=e,this.index=t,this.timestamp=Hm++}},Wm=e=>{e.timestamp=Hm++},Gm=(e,t,n)=>{e.p.marker=!1,e.p=t,t.marker=!0,e.index=n,e.timestamp=Hm++},Km=(e,t,n)=>{if(e.length>=Vm){let r=e.reduce((e,t)=>e.timestamp<t.timestamp?e:t);return Gm(r,t,n),r}else{let r=new Um(t,n);return e.push(r),r}},qm=(e,t)=>{if(e._start===null||t===0||e._searchMarker===null)return null;let n=e._searchMarker.length===0?null:e._searchMarker.reduce((e,n)=>Pc(t-e.index)<Pc(t-n.index)?e:n),r=e._start,i=0;for(n!==null&&(r=n.p,i=n.index,Wm(n));r.right!==null&&i<t;){if(!r.deleted&&r.countable){if(t<i+r.length)break;i+=r.length}r=r.right}for(;r.left!==null&&i>t;)r=r.left,!r.deleted&&r.countable&&(i-=r.length);for(;r.left!==null&&r.left.id.client===r.id.client&&r.left.id.clock+r.left.length===r.id.clock;)r=r.left,!r.deleted&&r.countable&&(i-=r.length);return n!==null&&Pc(n.index-i)<r.parent.length/Vm?(Gm(n,r,i),n):Km(e._searchMarker,r,i)},Jm=(e,t,n)=>{for(let r=e.length-1;r>=0;r--){let i=e[r];if(n>0){let t=i.p;for(t.marker=!1;t&&(t.deleted||!t.countable);)t=t.left,t&&!t.deleted&&t.countable&&(i.index-=t.length);if(t===null||t.marker===!0){e.splice(r,1);continue}i.p=t,t.marker=!0}(t<i.index||n>0&&t===i.index)&&(i.index=Ic(t,i.index+n))}},Ym=(e,t,n)=>{let r=e,i=t.changedParentTypes;for(;bc(i,e,()=>[]).push(n),e._item!==null;)e=e._item.parent;Ip(r._eH,n,t)},Xm=class{constructor(){this._item=null,this._map=new Map,this._start=null,this.doc=null,this._length=0,this._eH=Np(),this._dEH=Np(),this._searchMarker=null}get parent(){return this._item?this._item.parent:null}_integrate(e,t){this.doc=e,this._item=t}_copy(){throw Bl()}clone(){throw Bl()}_write(e){}get _first(){let e=this._start;for(;e!==null&&e.deleted;)e=e.right;return e}_callObserver(e,t){!e.local&&this._searchMarker&&(this._searchMarker.length=0)}observe(e){Pp(this._eH,e)}observeDeep(e){Pp(this._dEH,e)}unobserve(e){Fp(this._eH,e)}unobserveDeep(e){Fp(this._dEH,e)}toJSON(){}},Zm=(e,t,n)=>{e.doc??Bm(),t<0&&(t=e._length+t),n<0&&(n=e._length+n);let r=n-t,i=[],a=e._start;for(;a!==null&&r>0;){if(a.countable&&!a.deleted){let e=a.content.getContent();if(e.length<=t)t-=e.length;else{for(let n=t;n<e.length&&r>0;n++)i.push(e[n]),r--;t=0}}a=a.right}return i},Qm=e=>{e.doc??Bm();let t=[],n=e._start;for(;n!==null;){if(n.countable&&!n.deleted){let e=n.content.getContent();for(let n=0;n<e.length;n++)t.push(e[n])}n=n.right}return t},$m=(e,t)=>{let n=[],r=e._start;for(;r!==null;){if(r.countable&&em(r,t)){let e=r.content.getContent();for(let t=0;t<e.length;t++)n.push(e[t])}r=r.right}return n},eh=(e,t)=>{let n=0,r=e._start;for(e.doc??Bm();r!==null;){if(r.countable&&!r.deleted){let i=r.content.getContent();for(let r=0;r<i.length;r++)t(i[r],n++,e)}r=r.right}},th=(e,t)=>{let n=[];return eh(e,(r,i)=>{n.push(t(r,i,e))}),n},nh=e=>{let t=e._start,n=null,r=0;return{[Symbol.iterator](){return this},next:()=>{if(n===null){for(;t!==null&&t.deleted;)t=t.right;if(t===null)return{done:!0,value:void 0};n=t.content.getContent(),r=0,t=t.right}let e=n[r++];return n.length<=r&&(n=null),{done:!1,value:e}}}},rh=(e,t)=>{e.doc??Bm();let n=qm(e,t),r=e._start;for(n!==null&&(r=n.p,t-=n.index);r!==null;r=r.right)if(!r.deleted&&r.countable){if(t<r.length)return r.content.getContent()[t];t-=r.length}},ih=(e,t,n,r)=>{let i=n,a=e.doc,o=a.clientID,s=a.store,c=n===null?t._start:n.right,l=[],u=()=>{l.length>0&&(i=new Mg(Z(o,im(s,o)),i,i&&i.lastId,c,c&&c.id,t,null,new pg(l)),i.integrate(e,0),l=[])};r.forEach(n=>{if(n===null)l.push(n);else switch(n.constructor){case Number:case Object:case Boolean:case Array:case String:l.push(n);break;default:switch(u(),n.constructor){case Uint8Array:case ArrayBuffer:i=new Mg(Z(o,im(s,o)),i,i&&i.lastId,c,c&&c.id,t,null,new $h(new Uint8Array(n))),i.integrate(e,0);break;case op:i=new Mg(Z(o,im(s,o)),i,i&&i.lastId,c,c&&c.id,t,null,new ig(n)),i.integrate(e,0);break;default:if(n instanceof Xm)i=new Mg(Z(o,im(s,o)),i,i&&i.lastId,c,c&&c.id,t,null,new Tg(n)),i.integrate(e,0);else throw Error(`Unexpected content type in insert operation`)}}}),u()},ah=()=>zl(`Length exceeded!`),oh=(e,t,n,r)=>{if(n>t._length)throw ah();if(n===0)return t._searchMarker&&Jm(t._searchMarker,n,r.length),ih(e,t,null,r);let i=n,a=qm(t,n),o=t._start;for(a!==null&&(o=a.p,n-=a.index,n===0&&(o=o.prev,n+=o&&o.countable&&!o.deleted?o.length:0));o!==null;o=o.right)if(!o.deleted&&o.countable){if(n<=o.length){n<o.length&&lm(e,Z(o.id.client,o.id.clock+n));break}n-=o.length}return t._searchMarker&&Jm(t._searchMarker,i,r.length),ih(e,t,o,r)},sh=(e,t,n)=>{let r=(t._searchMarker||[]).reduce((e,t)=>t.index>e.index?t:e,{index:0,p:t._start}).p;if(r)for(;r.right;)r=r.right;return ih(e,t,r,n)},ch=(e,t,n,r)=>{if(r===0)return;let i=n,a=r,o=qm(t,n),s=t._start;for(o!==null&&(s=o.p,n-=o.index);s!==null&&n>0;s=s.right)!s.deleted&&s.countable&&(n<s.length&&lm(e,Z(s.id.client,s.id.clock+n)),n-=s.length);for(;r>0&&s!==null;)s.deleted||(r<s.length&&lm(e,Z(s.id.client,s.id.clock+r)),s.delete(e),r-=s.length),s=s.right;if(r>0)throw ah();t._searchMarker&&Jm(t._searchMarker,i,-a+r)},lh=(e,t,n)=>{let r=t._map.get(n);r!==void 0&&r.delete(e)},uh=(e,t,n,r)=>{let i=t._map.get(n)||null,a=e.doc,o=a.clientID,s;if(r==null)s=new pg([r]);else switch(r.constructor){case Number:case Object:case Boolean:case Array:case String:case Date:case BigInt:s=new pg([r]);break;case Uint8Array:s=new $h(r);break;case op:s=new ig(r);break;default:if(r instanceof Xm)s=new Tg(r);else throw Error(`Unexpected content type`)}new Mg(Z(o,im(a.store,o)),i,i&&i.lastId,null,null,t,n,s).integrate(e,0)},dh=(e,t)=>{e.doc??Bm();let n=e._map.get(t);return n!==void 0&&!n.deleted?n.content.getContent()[n.length-1]:void 0},fh=e=>{let t={};return e.doc??Bm(),e._map.forEach((e,n)=>{e.deleted||(t[n]=e.content.getContent()[e.length-1])}),t},ph=(e,t)=>{e.doc??Bm();let n=e._map.get(t);return n!==void 0&&!n.deleted},mh=(e,t)=>{let n={};return e._map.forEach((e,r)=>{let i=e;for(;i!==null&&(!t.sv.has(i.id.client)||i.id.clock>=(t.sv.get(i.id.client)||0));)i=i.left;i!==null&&em(i,t)&&(n[r]=i.content.getContent()[i.length-1])}),n},hh=e=>(e.doc??Bm(),Wf(e._map.entries(),e=>!e[1].deleted)),gh=class extends Rm{},_h=class e extends Xm{constructor(){super(),this._prelimContent=[],this._searchMarker=[]}static from(t){let n=new e;return n.push(t),n}_integrate(e,t){super._integrate(e,t),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new e}clone(){let t=new e;return t.insert(0,this.toArray().map(e=>e instanceof Xm?e.clone():e)),t}get length(){return this.doc??Bm(),this._length}_callObserver(e,t){super._callObserver(e,t),Ym(this,e,new gh(this,e))}insert(e,t){this.doc===null?this._prelimContent.splice(e,0,...t):bm(this.doc,n=>{oh(n,this,e,t)})}push(e){this.doc===null?this._prelimContent.push(...e):bm(this.doc,t=>{sh(t,this,e)})}unshift(e){this.insert(0,e)}delete(e,t=1){this.doc===null?this._prelimContent.splice(e,t):bm(this.doc,n=>{ch(n,this,e,t)})}get(e){return rh(this,e)}toArray(){return Qm(this)}slice(e=0,t=this.length){return Zm(this,e,t)}toJSON(){return this.map(e=>e instanceof Xm?e.toJSON():e)}map(e){return th(this,e)}forEach(e){eh(this,e)}[Symbol.iterator](){return nh(this)}_write(e){e.writeTypeRef(vg)}},vh=e=>new _h,yh=class extends Rm{constructor(e,t,n){super(e,t),this.keysChanged=n}},bh=class e extends Xm{constructor(e){super(),this._prelimContent=null,e===void 0?this._prelimContent=new Map:this._prelimContent=new Map(e)}_integrate(e,t){super._integrate(e,t),this._prelimContent.forEach((e,t)=>{this.set(t,e)}),this._prelimContent=null}_copy(){return new e}clone(){let t=new e;return this.forEach((e,n)=>{t.set(n,e instanceof Xm?e.clone():e)}),t}_callObserver(e,t){Ym(this,e,new yh(this,e,t))}toJSON(){this.doc??Bm();let e={};return this._map.forEach((t,n)=>{if(!t.deleted){let r=t.content.getContent()[t.length-1];e[n]=r instanceof Xm?r.toJSON():r}}),e}get size(){return[...hh(this)].length}keys(){return Gf(hh(this),e=>e[0])}values(){return Gf(hh(this),e=>e[1].content.getContent()[e[1].length-1])}entries(){return Gf(hh(this),e=>[e[0],e[1].content.getContent()[e[1].length-1]])}forEach(e){this.doc??Bm(),this._map.forEach((t,n)=>{t.deleted||e(t.content.getContent()[t.length-1],n,this)})}[Symbol.iterator](){return this.entries()}delete(e){this.doc===null?this._prelimContent.delete(e):bm(this.doc,t=>{lh(t,this,e)})}set(e,t){return this.doc===null?this._prelimContent.set(e,t):bm(this.doc,n=>{uh(n,this,e,t)}),t}get(e){return dh(this,e)}has(e){return ph(this,e)}clear(){this.doc===null?this._prelimContent.clear():bm(this.doc,e=>{this.forEach(function(t,n,r){lh(e,r,n)})})}_write(e){e.writeTypeRef(yg)}},xh=e=>new bh,Sh=(e,t)=>e===t||typeof e==`object`&&typeof t==`object`&&e&&t&&Du(e,t),Ch=class{constructor(e,t,n,r){this.left=e,this.right=t,this.index=n,this.currentAttributes=r}forward(){switch(this.right===null&&Vl(),this.right.content.constructor){case cg:this.right.deleted||Dh(this.currentAttributes,this.right.content);break;default:this.right.deleted||(this.index+=this.right.length);break}this.left=this.right,this.right=this.right.right}},wh=(e,t,n)=>{for(;t.right!==null&&n>0;){switch(t.right.content.constructor){case cg:t.right.deleted||Dh(t.currentAttributes,t.right.content);break;default:t.right.deleted||(n<t.right.length&&lm(e,Z(t.right.id.client,t.right.id.clock+n)),t.index+=t.right.length,n-=t.right.length);break}t.left=t.right,t.right=t.right.right}return t},Th=(e,t,n,r)=>{let i=new Map,a=r?qm(t,n):null;return a?wh(e,new Ch(a.p.left,a.p,a.index,i),n-a.index):wh(e,new Ch(null,t._start,0,i),n)},Eh=(e,t,n,r)=>{for(;n.right!==null&&(n.right.deleted===!0||n.right.content.constructor===cg&&Sh(r.get(n.right.content.key),n.right.content.value));)n.right.deleted||r.delete(n.right.content.key),n.forward();let i=e.doc,a=i.clientID;r.forEach((r,o)=>{let s=n.left,c=n.right,l=new Mg(Z(a,im(i.store,a)),s,s&&s.lastId,c,c&&c.id,t,null,new cg(o,r));l.integrate(e,0),n.right=l,n.forward()})},Dh=(e,t)=>{let{key:n,value:r}=t;r===null?e.delete(n):e.set(n,r)},Oh=(e,t)=>{for(;e.right!==null&&(e.right.deleted||e.right.content.constructor===cg&&Sh(t[e.right.content.key]??null,e.right.content.value));)e.forward()},kh=(e,t,n,r)=>{let i=e.doc,a=i.clientID,o=new Map;for(let s in r){let c=r[s],l=n.currentAttributes.get(s)??null;if(!Sh(l,c)){o.set(s,l);let{left:r,right:u}=n;n.right=new Mg(Z(a,im(i.store,a)),r,r&&r.lastId,u,u&&u.id,t,null,new cg(s,c)),n.right.integrate(e,0),n.forward()}}return o},Ah=(e,t,n,r,i)=>{n.currentAttributes.forEach((e,t)=>{i[t]===void 0&&(i[t]=null)});let a=e.doc,o=a.clientID;Oh(n,i);let s=kh(e,t,n,i),c=r.constructor===String?new hg(r):r instanceof Xm?new Tg(r):new og(r),{left:l,right:u,index:d}=n;t._searchMarker&&Jm(t._searchMarker,n.index,c.getLength()),u=new Mg(Z(o,im(a.store,o)),l,l&&l.lastId,u,u&&u.id,t,null,c),u.integrate(e,0),n.right=u,n.index=d,n.forward(),Eh(e,t,n,s)},jh=(e,t,n,r,i)=>{let a=e.doc,o=a.clientID;Oh(n,i);let s=kh(e,t,n,i);iterationLoop:for(;n.right!==null&&(r>0||s.size>0&&(n.right.deleted||n.right.content.constructor===cg));){if(!n.right.deleted)switch(n.right.content.constructor){case cg:{let{key:t,value:a}=n.right.content,o=i[t];if(o!==void 0){if(Sh(o,a))s.delete(t);else{if(r===0)break iterationLoop;s.set(t,a)}n.right.delete(e)}else n.currentAttributes.set(t,a);break}default:r<n.right.length&&lm(e,Z(n.right.id.client,n.right.id.clock+r)),r-=n.right.length;break}n.forward()}if(r>0){let i=``;for(;r>0;r--)i+=`
|
|
4
|
-
`;n.right=new Mg(Z(o,im(a.store,o)),n.left,n.left&&n.left.lastId,n.right,n.right&&n.right.id,t,null,new hg(i)),n.right.integrate(e,0),n.forward()}Eh(e,t,n,s)},Mh=(e,t,n,r,i)=>{let a=t,o=vc();for(;a&&(!a.countable||a.deleted);){if(!a.deleted&&a.content.constructor===cg){let e=a.content;o.set(e.key,e)}a=a.right}let s=0,c=!1;for(;t!==a;){if(n===t&&(c=!0),!t.deleted){let n=t.content;switch(n.constructor){case cg:{let{key:a,value:l}=n,u=r.get(a)??null;(o.get(a)!==n||u===l)&&(t.delete(e),s++,!c&&(i.get(a)??null)===l&&u!==l&&(u===null?i.delete(a):i.set(a,u))),!c&&!t.deleted&&Dh(i,n);break}}}t=t.right}return s},Nh=(e,t)=>{for(;t&&t.right&&(t.right.deleted||!t.right.countable);)t=t.right;let n=new Set;for(;t&&(t.deleted||!t.countable);){if(!t.deleted&&t.content.constructor===cg){let r=t.content.key;n.has(r)?t.delete(e):n.add(r)}t=t.left}},Ph=e=>{let t=0;return bm(e.doc,n=>{let r=e._start,i=e._start,a=vc(),o=yc(a);for(;i;){if(i.deleted===!1)switch(i.content.constructor){case cg:Dh(o,i.content);break;default:t+=Mh(n,r,i,a,o),a=yc(o),r=i;break}i=i.right}}),t},Fh=e=>{let t=new Set,n=e.doc;for(let[r,i]of e.afterState.entries()){let a=e.beforeState.get(r)||0;i!==a&&fm(e,n.store.clients.get(r),a,i,e=>{!e.deleted&&e.content.constructor===cg&&e.constructor!==Qh&&t.add(e.parent)})}bm(n,n=>{Jf(e,e.deleteSet,e=>{if(e instanceof Qh||!e.parent._hasFormatting||t.has(e.parent))return;let r=e.parent;e.content.constructor===cg?t.add(r):Nh(n,e)});for(let e of t)Ph(e)})},Ih=(e,t,n)=>{let r=n,i=yc(t.currentAttributes),a=t.right;for(;n>0&&t.right!==null;){if(t.right.deleted===!1)switch(t.right.content.constructor){case Tg:case og:case hg:n<t.right.length&&lm(e,Z(t.right.id.client,t.right.id.clock+n)),n-=t.right.length,t.right.delete(e);break}t.forward()}a&&Mh(e,a,t.right,i,t.currentAttributes);let o=(t.left||t.right).parent;return o._searchMarker&&Jm(o._searchMarker,t.index,-r+n),t},Lh=class extends Rm{constructor(e,t,n){super(e,t),this.childListChanged=!1,this.keysChanged=new Set,n.forEach(e=>{e===null?this.childListChanged=!0:this.keysChanged.add(e)})}get changes(){return this._changes===null&&(this._changes={keys:this.keys,delta:this.delta,added:new Set,deleted:new Set}),this._changes}get delta(){if(this._delta===null){let e=this.target.doc,t=[];bm(e,e=>{let n=new Map,r=new Map,i=this.target._start,a=null,o={},s=``,c=0,l=0,u=()=>{if(a!==null){let e=null;switch(a){case`delete`:l>0&&(e={delete:l}),l=0;break;case`insert`:(typeof s==`object`||s.length>0)&&(e={insert:s},n.size>0&&(e.attributes={},n.forEach((t,n)=>{t!==null&&(e.attributes[n]=t)}))),s=``;break;case`retain`:c>0&&(e={retain:c},wu(o)||(e.attributes=bu({},o))),c=0;break}e&&t.push(e),a=null}};for(;i!==null;){switch(i.content.constructor){case Tg:case og:this.adds(i)?this.deletes(i)||(u(),a=`insert`,s=i.content.getContent()[0],u()):this.deletes(i)?(a!==`delete`&&(u(),a=`delete`),l+=1):i.deleted||(a!==`retain`&&(u(),a=`retain`),c+=1);break;case hg:this.adds(i)?this.deletes(i)||(a!==`insert`&&(u(),a=`insert`),s+=i.content.str):this.deletes(i)?(a!==`delete`&&(u(),a=`delete`),l+=i.length):i.deleted||(a!==`retain`&&(u(),a=`retain`),c+=i.length);break;case cg:{let{key:t,value:s}=i.content;if(this.adds(i))this.deletes(i)||(Sh(n.get(t)??null,s)?s!==null&&i.delete(e):(a===`retain`&&u(),Sh(s,r.get(t)??null)?delete o[t]:o[t]=s));else if(this.deletes(i)){r.set(t,s);let e=n.get(t)??null;Sh(e,s)||(a===`retain`&&u(),o[t]=e)}else if(!i.deleted){r.set(t,s);let n=o[t];n!==void 0&&(Sh(n,s)?n!==null&&i.delete(e):(a===`retain`&&u(),s===null?delete o[t]:o[t]=s))}i.deleted||(a===`insert`&&u(),Dh(n,i.content));break}}i=i.right}for(u();t.length>0;){let e=t[t.length-1];if(e.retain!==void 0&&e.attributes===void 0)t.pop();else break}}),this._delta=t}return this._delta}},Rh=class e extends Xm{constructor(e){super(),this._pending=e===void 0?[]:[()=>this.insert(0,e)],this._searchMarker=[],this._hasFormatting=!1}get length(){return this.doc??Bm(),this._length}_integrate(e,t){super._integrate(e,t);try{this._pending.forEach(e=>e())}catch(e){console.error(e)}this._pending=null}_copy(){return new e}clone(){let t=new e;return t.applyDelta(this.toDelta()),t}_callObserver(e,t){super._callObserver(e,t);let n=new Lh(this,e,t);Ym(this,e,n),!e.local&&this._hasFormatting&&(e._needFormattingCleanup=!0)}toString(){this.doc??Bm();let e=``,t=this._start;for(;t!==null;)!t.deleted&&t.countable&&t.content.constructor===hg&&(e+=t.content.str),t=t.right;return e}toJSON(){return this.toString()}applyDelta(e,{sanitize:t=!0}={}){this.doc===null?this._pending.push(()=>this.applyDelta(e)):bm(this.doc,n=>{let r=new Ch(null,this._start,0,new Map);for(let i=0;i<e.length;i++){let a=e[i];if(a.insert!==void 0){let o=!t&&typeof a.insert==`string`&&i===e.length-1&&r.right===null&&a.insert.slice(-1)===`
|
|
5
|
-
`?a.insert.slice(0,-1):a.insert;(typeof o!=`string`||o.length>0)&&Ah(n,this,r,o,a.attributes||{})}else a.retain===void 0?a.delete!==void 0&&Ih(n,r,a.delete):jh(n,this,r,a.retain,a.attributes||{})}})}toDelta(e,t,n){this.doc??Bm();let r=[],i=new Map,a=this.doc,o=``,s=this._start;function c(){if(o.length>0){let e={},t=!1;i.forEach((n,r)=>{t=!0,e[r]=n});let n={insert:o};t&&(n.attributes=e),r.push(n),o=``}}let l=()=>{for(;s!==null;){if(em(s,e)||t!==void 0&&em(s,t))switch(s.content.constructor){case hg:{let r=i.get(`ychange`);e!==void 0&&!em(s,e)?(r===void 0||r.user!==s.id.client||r.type!==`removed`)&&(c(),i.set(`ychange`,n?n(`removed`,s.id):{type:`removed`})):t!==void 0&&!em(s,t)?(r===void 0||r.user!==s.id.client||r.type!==`added`)&&(c(),i.set(`ychange`,n?n(`added`,s.id):{type:`added`})):r!==void 0&&(c(),i.delete(`ychange`)),o+=s.content.str;break}case Tg:case og:{c();let e={insert:s.content.getContent()[0]};if(i.size>0){let t={};e.attributes=t,i.forEach((e,n)=>{t[n]=e})}r.push(e);break}case cg:em(s,e)&&(c(),Dh(i,s.content));break}s=s.right}c()};return e||t?bm(a,n=>{e&&tm(n,e),t&&tm(n,t),l()},`cleanup`):l(),r}insert(e,t,n){if(t.length<=0)return;let r=this.doc;r===null?this._pending.push(()=>this.insert(e,t,n)):bm(r,r=>{let i=Th(r,this,e,!n);n||(n={},i.currentAttributes.forEach((e,t)=>{n[t]=e})),Ah(r,this,i,t,n)})}insertEmbed(e,t,n){let r=this.doc;r===null?this._pending.push(()=>this.insertEmbed(e,t,n||{})):bm(r,r=>{let i=Th(r,this,e,!n);Ah(r,this,i,t,n||{})})}delete(e,t){if(t===0)return;let n=this.doc;n===null?this._pending.push(()=>this.delete(e,t)):bm(n,n=>{Ih(n,Th(n,this,e,!0),t)})}format(e,t,n){if(t===0)return;let r=this.doc;r===null?this._pending.push(()=>this.format(e,t,n)):bm(r,r=>{let i=Th(r,this,e,!1);i.right!==null&&jh(r,this,i,t,n)})}removeAttribute(e){this.doc===null?this._pending.push(()=>this.removeAttribute(e)):bm(this.doc,t=>{lh(t,this,e)})}setAttribute(e,t){this.doc===null?this._pending.push(()=>this.setAttribute(e,t)):bm(this.doc,n=>{uh(n,this,e,t)})}getAttribute(e){return dh(this,e)}getAttributes(){return fh(this)}_write(e){e.writeTypeRef(bg)}},zh=e=>new Rh,Bh=class{constructor(e,t=()=>!0){this._filter=t,this._root=e,this._currentNode=e._start,this._firstCall=!0,e.doc??Bm()}[Symbol.iterator](){return this}next(){let e=this._currentNode,t=e&&e.content&&e.content.type;if(e!==null&&(!this._firstCall||e.deleted||!this._filter(t)))do if(t=e.content.type,!e.deleted&&(t.constructor===Uh||t.constructor===Vh)&&t._start!==null)e=t._start;else for(;e!==null;){let t=e.next;if(t!==null){e=t;break}else e=e.parent===this._root?null:e.parent._item}while(e!==null&&(e.deleted||!this._filter(e.content.type)));return this._firstCall=!1,e===null?{value:void 0,done:!0}:(this._currentNode=e,{value:e.content.type,done:!1})}},Vh=class e extends Xm{constructor(){super(),this._prelimContent=[]}get firstChild(){let e=this._first;return e?e.content.getContent()[0]:null}_integrate(e,t){super._integrate(e,t),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new e}clone(){let t=new e;return t.insert(0,this.toArray().map(e=>e instanceof Xm?e.clone():e)),t}get length(){return this.doc??Bm(),this._prelimContent===null?this._length:this._prelimContent.length}createTreeWalker(e){return new Bh(this,e)}querySelector(e){e=e.toUpperCase();let t=new Bh(this,t=>t.nodeName&&t.nodeName.toUpperCase()===e).next();return t.done?null:t.value}querySelectorAll(e){return e=e.toUpperCase(),Ec(new Bh(this,t=>t.nodeName&&t.nodeName.toUpperCase()===e))}_callObserver(e,t){Ym(this,e,new Gh(this,t,e))}toString(){return th(this,e=>e.toString()).join(``)}toJSON(){return this.toString()}toDOM(e=document,t={},n){let r=e.createDocumentFragment();return n!==void 0&&n._createAssociation(r,this),eh(this,i=>{r.insertBefore(i.toDOM(e,t,n),null)}),r}insert(e,t){this.doc===null?this._prelimContent.splice(e,0,...t):bm(this.doc,n=>{oh(n,this,e,t)})}insertAfter(e,t){if(this.doc!==null)bm(this.doc,n=>{let r=e&&e instanceof Xm?e._item:e;ih(n,this,r,t)});else{let n=this._prelimContent,r=e===null?0:n.findIndex(t=>t===e)+1;if(r===0&&e!==null)throw zl(`Reference item not found`);n.splice(r,0,...t)}}delete(e,t=1){this.doc===null?this._prelimContent.splice(e,t):bm(this.doc,n=>{ch(n,this,e,t)})}toArray(){return Qm(this)}push(e){this.insert(this.length,e)}unshift(e){this.insert(0,e)}get(e){return rh(this,e)}slice(e=0,t=this.length){return Zm(this,e,t)}forEach(e){eh(this,e)}_write(e){e.writeTypeRef(Sg)}},Hh=e=>new Vh,Uh=class e extends Vh{constructor(e=`UNDEFINED`){super(),this.nodeName=e,this._prelimAttrs=new Map}get nextSibling(){let e=this._item?this._item.next:null;return e?e.content.type:null}get prevSibling(){let e=this._item?this._item.prev:null;return e?e.content.type:null}_integrate(e,t){super._integrate(e,t),this._prelimAttrs.forEach((e,t)=>{this.setAttribute(t,e)}),this._prelimAttrs=null}_copy(){return new e(this.nodeName)}clone(){let t=new e(this.nodeName);return Su(this.getAttributes(),(e,n)=>{t.setAttribute(n,e)}),t.insert(0,this.toArray().map(e=>e instanceof Xm?e.clone():e)),t}toString(){let e=this.getAttributes(),t=[],n=[];for(let t in e)n.push(t);n.sort();let r=n.length;for(let i=0;i<r;i++){let r=n[i];t.push(r+`="`+e[r]+`"`)}let i=this.nodeName.toLocaleLowerCase();return`<${i}${t.length>0?` `+t.join(` `):``}>${super.toString()}</${i}>`}removeAttribute(e){this.doc===null?this._prelimAttrs.delete(e):bm(this.doc,t=>{lh(t,this,e)})}setAttribute(e,t){this.doc===null?this._prelimAttrs.set(e,t):bm(this.doc,n=>{uh(n,this,e,t)})}getAttribute(e){return dh(this,e)}hasAttribute(e){return ph(this,e)}getAttributes(e){return e?mh(this,e):fh(this)}toDOM(e=document,t={},n){let r=e.createElement(this.nodeName),i=this.getAttributes();for(let e in i){let t=i[e];typeof t==`string`&&r.setAttribute(e,t)}return eh(this,i=>{r.appendChild(i.toDOM(e,t,n))}),n!==void 0&&n._createAssociation(r,this),r}_write(e){e.writeTypeRef(xg),e.writeKey(this.nodeName)}},Wh=e=>new Uh(e.readKey()),Gh=class extends Rm{constructor(e,t,n){super(e,n),this.childListChanged=!1,this.attributesChanged=new Set,t.forEach(e=>{e===null?this.childListChanged=!0:this.attributesChanged.add(e)})}},Kh=class e extends bh{constructor(e){super(),this.hookName=e}_copy(){return new e(this.hookName)}clone(){let t=new e(this.hookName);return this.forEach((e,n)=>{t.set(n,e)}),t}toDOM(e=document,t={},n){let r=t[this.hookName],i;return i=r===void 0?document.createElement(this.hookName):r.createDom(this),i.setAttribute(`data-yjs-hook`,this.hookName),n!==void 0&&n._createAssociation(i,this),i}_write(e){e.writeTypeRef(Cg),e.writeKey(this.hookName)}},qh=e=>new Kh(e.readKey()),Jh=class e extends Rh{get nextSibling(){let e=this._item?this._item.next:null;return e?e.content.type:null}get prevSibling(){let e=this._item?this._item.prev:null;return e?e.content.type:null}_copy(){return new e}clone(){let t=new e;return t.applyDelta(this.toDelta()),t}toDOM(e=document,t,n){let r=e.createTextNode(this.toString());return n!==void 0&&n._createAssociation(r,this),r}toString(){return this.toDelta().map(e=>{let t=[];for(let n in e.attributes){let r=[];for(let t in e.attributes[n])r.push({key:t,value:e.attributes[n][t]});r.sort((e,t)=>e.key<t.key?-1:1),t.push({nodeName:n,attrs:r})}t.sort((e,t)=>e.nodeName<t.nodeName?-1:1);let n=``;for(let e=0;e<t.length;e++){let r=t[e];n+=`<${r.nodeName}`;for(let e=0;e<r.attrs.length;e++){let t=r.attrs[e];n+=` ${t.key}="${t.value}"`}n+=`>`}n+=e.insert;for(let e=t.length-1;e>=0;e--)n+=`</${t[e].nodeName}>`;return n}).join(``)}toJSON(){return this.toString()}_write(e){e.writeTypeRef(wg)}},Yh=e=>new Jh,Xh=class{constructor(e,t){this.id=e,this.length=t}get deleted(){throw Bl()}mergeWith(e){return!1}write(e,t,n){throw Bl()}integrate(e,t){throw Bl()}},Zh=0,Qh=class extends Xh{get deleted(){return!0}delete(){}mergeWith(e){return this.constructor===e.constructor?(this.length+=e.length,!0):!1}integrate(e,t){t>0&&(this.id.clock+=t,this.length-=t),am(e.doc.store,this)}write(e,t){e.writeInfo(Zh),e.writeLen(this.length-t)}getMissing(e,t){return null}},$h=class e{constructor(e){this.content=e}getLength(){return 1}getContent(){return[this.content]}isCountable(){return!0}copy(){return new e(this.content)}splice(e){throw Bl()}mergeWith(e){return!1}integrate(e,t){}delete(e){}gc(e){}write(e,t){e.writeBuf(this.content)}getRef(){return 3}},eg=e=>new $h(e.readBuf()),tg=class e{constructor(e){this.len=e}getLength(){return this.len}getContent(){return[]}isCountable(){return!1}copy(){return new e(this.len)}splice(t){let n=new e(this.len-t);return this.len=t,n}mergeWith(e){return this.len+=e.len,!0}integrate(e,t){$f(e.deleteSet,t.id.client,t.id.clock,this.len),t.markDeleted()}delete(e){}gc(e){}write(e,t){e.writeLen(this.len-t)}getRef(){return 1}},ng=e=>new tg(e.readLen()),rg=(e,t)=>new op({guid:e,...t,shouldLoad:t.shouldLoad||t.autoLoad||!1}),ig=class e{constructor(e){e._item&&console.error(`This document was already integrated as a sub-document. You should create a second instance instead with the same guid.`),this.doc=e;let t={};this.opts=t,e.gc||(t.gc=!1),e.autoLoad&&(t.autoLoad=!0),e.meta!==null&&(t.meta=e.meta)}getLength(){return 1}getContent(){return[this.doc]}isCountable(){return!0}copy(){return new e(rg(this.doc.guid,this.opts))}splice(e){throw Bl()}mergeWith(e){return!1}integrate(e,t){this.doc._item=t,e.subdocsAdded.add(this.doc),this.doc.shouldLoad&&e.subdocsLoaded.add(this.doc)}delete(e){e.subdocsAdded.has(this.doc)?e.subdocsAdded.delete(this.doc):e.subdocsRemoved.add(this.doc)}gc(e){}write(e,t){e.writeString(this.doc.guid),e.writeAny(this.opts)}getRef(){return 9}},ag=e=>new ig(rg(e.readString(),e.readAny())),og=class e{constructor(e){this.embed=e}getLength(){return 1}getContent(){return[this.embed]}isCountable(){return!0}copy(){return new e(this.embed)}splice(e){throw Bl()}mergeWith(e){return!1}integrate(e,t){}delete(e){}gc(e){}write(e,t){e.writeJSON(this.embed)}getRef(){return 5}},sg=e=>new og(e.readJSON()),cg=class e{constructor(e,t){this.key=e,this.value=t}getLength(){return 1}getContent(){return[]}isCountable(){return!1}copy(){return new e(this.key,this.value)}splice(e){throw Bl()}mergeWith(e){return!1}integrate(e,t){let n=t.parent;n._searchMarker=null,n._hasFormatting=!0}delete(e){}gc(e){}write(e,t){e.writeKey(this.key),e.writeJSON(this.value)}getRef(){return 6}},lg=e=>new cg(e.readKey(),e.readJSON()),ug=class e{constructor(e){this.arr=e}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new e(this.arr)}splice(t){let n=new e(this.arr.slice(t));return this.arr=this.arr.slice(0,t),n}mergeWith(e){return this.arr=this.arr.concat(e.arr),!0}integrate(e,t){}delete(e){}gc(e){}write(e,t){let n=this.arr.length;e.writeLen(n-t);for(let r=t;r<n;r++){let t=this.arr[r];e.writeString(t===void 0?`undefined`:JSON.stringify(t))}}getRef(){return 2}},dg=e=>{let t=e.readLen(),n=[];for(let r=0;r<t;r++){let t=e.readString();t===`undefined`?n.push(void 0):n.push(JSON.parse(t))}return new ug(n)},fg=Bu(`node_env`)===`development`,pg=class e{constructor(e){this.arr=e,fg&&ku(e)}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new e(this.arr)}splice(t){let n=new e(this.arr.slice(t));return this.arr=this.arr.slice(0,t),n}mergeWith(e){return this.arr=this.arr.concat(e.arr),!0}integrate(e,t){}delete(e){}gc(e){}write(e,t){let n=this.arr.length;e.writeLen(n-t);for(let r=t;r<n;r++){let t=this.arr[r];e.writeAny(t)}}getRef(){return 8}},mg=e=>{let t=e.readLen(),n=[];for(let r=0;r<t;r++)n.push(e.readAny());return new pg(n)},hg=class e{constructor(e){this.str=e}getLength(){return this.str.length}getContent(){return this.str.split(``)}isCountable(){return!0}copy(){return new e(this.str)}splice(t){let n=new e(this.str.slice(t));this.str=this.str.slice(0,t);let r=this.str.charCodeAt(t-1);return r>=55296&&r<=56319&&(this.str=this.str.slice(0,t-1)+`�`,n.str=`�`+n.str.slice(1)),n}mergeWith(e){return this.str+=e.str,!0}integrate(e,t){}delete(e){}gc(e){}write(e,t){e.writeString(t===0?this.str:this.str.slice(t))}getRef(){return 4}},gg=e=>new hg(e.readString()),_g=[vh,xh,zh,Wh,Hh,qh,Yh],vg=0,yg=1,bg=2,xg=3,Sg=4,Cg=5,wg=6,Tg=class e{constructor(e){this.type=e}getLength(){return 1}getContent(){return[this.type]}isCountable(){return!0}copy(){return new e(this.type._copy())}splice(e){throw Bl()}mergeWith(e){return!1}integrate(e,t){this.type._integrate(e.doc,t)}delete(e){let t=this.type._start;for(;t!==null;)t.deleted?t.id.clock<(e.beforeState.get(t.id.client)||0)&&e._mergeStructs.push(t):t.delete(e),t=t.right;this.type._map.forEach(t=>{t.deleted?t.id.clock<(e.beforeState.get(t.id.client)||0)&&e._mergeStructs.push(t):t.delete(e)}),e.changed.delete(this.type)}gc(e){let t=this.type._start;for(;t!==null;)t.gc(e,!0),t=t.right;this.type._start=null,this.type._map.forEach(t=>{for(;t!==null;)t.gc(e,!0),t=t.left}),this.type._map=new Map}write(e,t){this.type._write(e)}getRef(){return 7}},Eg=e=>new Tg(_g[e.readTypeRef()](e)),Dg=(e,t)=>{let n=t,r=0,i;do r>0&&(n=Z(n.client,n.clock+r)),i=sm(e,n),r=n.clock-i.id.clock,n=i.redone;while(n!==null&&i instanceof Mg);return{item:i,diff:r}},Og=(e,t)=>{for(;e!==null&&e.keep!==t;)e.keep=t,e=e.parent._item},kg=(e,t,n)=>{let{client:r,clock:i}=t.id,a=new Mg(Z(r,i+n),t,Z(r,i+n-1),t.right,t.rightOrigin,t.parent,t.parentSub,t.content.splice(n));return t.deleted&&a.markDeleted(),t.keep&&(a.keep=!0),t.redone!==null&&(a.redone=Z(t.redone.client,t.redone.clock+n)),t.right=a,a.right!==null&&(a.right.left=a),e._mergeStructs.push(a),a.parentSub!==null&&a.right===null&&a.parent._map.set(a.parentSub,a),t.length=n,a},Ag=(e,t)=>Oc(e,e=>Xf(e.deletions,t)),jg=(e,t,n,r,i,a)=>{let o=e.doc,s=o.store,c=o.clientID,l=t.redone;if(l!==null)return lm(e,l);let u=t.parent._item,d=null,f;if(u!==null&&u.deleted===!0){if(u.redone===null&&(!n.has(u)||jg(e,u,n,r,i,a)===null))return null;for(;u.redone!==null;)u=lm(e,u.redone)}let p=u===null?t.parent:u.content.type;if(t.parentSub===null){for(d=t.left,f=t;d!==null;){let t=d;for(;t!==null&&t.parent._item!==u;)t=t.redone===null?null:lm(e,t.redone);if(t!==null&&t.parent._item===u){d=t;break}d=d.left}for(;f!==null;){let t=f;for(;t!==null&&t.parent._item!==u;)t=t.redone===null?null:lm(e,t.redone);if(t!==null&&t.parent._item===u){f=t;break}f=f.right}}else if(f=null,t.right&&!i){for(d=t;d!==null&&d.right!==null&&(d.right.redone||Xf(r,d.right.id)||Ag(a.undoStack,d.right.id)||Ag(a.redoStack,d.right.id));)for(d=d.right;d.redone;)d=lm(e,d.redone);if(d&&d.right!==null)return null}else d=p._map.get(t.parentSub)||null;let m=Z(c,im(s,c)),h=new Mg(m,d,d&&d.lastId,f,f&&f.id,p,t.parentSub,t.content.copy());return t.redone=m,Og(h,!0),h.integrate(e,0),h},Mg=class e extends Xh{constructor(e,t,n,r,i,a,o,s){super(e,s.getLength()),this.origin=n,this.left=t,this.right=r,this.rightOrigin=i,this.parent=a,this.parentSub=o,this.redone=null,this.content=s,this.info=this.content.isCountable()?2:0}set marker(e){(this.info&8)>0!==e&&(this.info^=8)}get marker(){return(this.info&8)>0}get keep(){return(this.info&1)>0}set keep(e){this.keep!==e&&(this.info^=1)}get countable(){return(this.info&2)>0}get deleted(){return(this.info&4)>0}set deleted(e){this.deleted!==e&&(this.info^=4)}markDeleted(){this.info|=4}getMissing(t,n){if(this.origin&&this.origin.client!==this.id.client&&this.origin.clock>=im(n,this.origin.client))return this.origin.client;if(this.rightOrigin&&this.rightOrigin.client!==this.id.client&&this.rightOrigin.clock>=im(n,this.rightOrigin.client))return this.rightOrigin.client;if(this.parent&&this.parent.constructor===Lp&&this.id.client!==this.parent.client&&this.parent.clock>=im(n,this.parent.client))return this.parent.client;if(this.origin&&=(this.left=um(t,n,this.origin),this.left.lastId),this.rightOrigin&&=(this.right=lm(t,this.rightOrigin),this.right.id),this.left&&this.left.constructor===Qh||this.right&&this.right.constructor===Qh)this.parent=null;else if(!this.parent)this.left&&this.left.constructor===e?(this.parent=this.left.parent,this.parentSub=this.left.parentSub):this.right&&this.right.constructor===e&&(this.parent=this.right.parent,this.parentSub=this.right.parentSub);else if(this.parent.constructor===Lp){let e=sm(n,this.parent);e.constructor===Qh?this.parent=null:this.parent=e.content.type}return null}integrate(e,t){if(t>0&&(this.id.clock+=t,this.left=um(e,e.doc.store,Z(this.id.client,this.id.clock-1)),this.origin=this.left.lastId,this.content=this.content.splice(t),this.length-=t),this.parent){if(!this.left&&(!this.right||this.right.left!==null)||this.left&&this.left.right!==this.right){let t=this.left,n;if(t!==null)n=t.right;else if(this.parentSub!==null)for(n=this.parent._map.get(this.parentSub)||null;n!==null&&n.left!==null;)n=n.left;else n=this.parent._start;let r=new Set,i=new Set;for(;n!==null&&n!==this.right;){if(i.add(n),r.add(n),Rp(this.origin,n.origin)){if(n.id.client<this.id.client)t=n,r.clear();else if(Rp(this.rightOrigin,n.rightOrigin))break}else if(n.origin!==null&&i.has(sm(e.doc.store,n.origin)))r.has(sm(e.doc.store,n.origin))||(t=n,r.clear());else break;n=n.right}this.left=t}if(this.left!==null)this.right=this.left.right,this.left.right=this;else{let e;if(this.parentSub!==null)for(e=this.parent._map.get(this.parentSub)||null;e!==null&&e.left!==null;)e=e.left;else e=this.parent._start,this.parent._start=this;this.right=e}this.right===null?this.parentSub!==null&&(this.parent._map.set(this.parentSub,this),this.left!==null&&this.left.delete(e)):this.right.left=this,this.parentSub===null&&this.countable&&!this.deleted&&(this.parent._length+=this.length),am(e.doc.store,this),this.content.integrate(e,this),hm(e,this.parent,this.parentSub),(this.parent._item!==null&&this.parent._item.deleted||this.parentSub!==null&&this.right!==null)&&this.delete(e)}else new Qh(this.id,this.length).integrate(e,0)}get next(){let e=this.right;for(;e!==null&&e.deleted;)e=e.right;return e}get prev(){let e=this.left;for(;e!==null&&e.deleted;)e=e.left;return e}get lastId(){return this.length===1?this.id:Z(this.id.client,this.id.clock+this.length-1)}mergeWith(e){if(this.constructor===e.constructor&&Rp(e.origin,this.lastId)&&this.right===e&&Rp(this.rightOrigin,e.rightOrigin)&&this.id.client===e.id.client&&this.id.clock+this.length===e.id.clock&&this.deleted===e.deleted&&this.redone===null&&e.redone===null&&this.content.constructor===e.content.constructor&&this.content.mergeWith(e.content)){let t=this.parent._searchMarker;return t&&t.forEach(t=>{t.p===e&&(t.p=this,!this.deleted&&this.countable&&(t.index-=this.length))}),e.keep&&(this.keep=!0),this.right=e.right,this.right!==null&&(this.right.left=this),this.length+=e.length,!0}return!1}delete(e){if(!this.deleted){let t=this.parent;this.countable&&this.parentSub===null&&(t._length-=this.length),this.markDeleted(),$f(e.deleteSet,this.id.client,this.id.clock,this.length),hm(e,t,this.parentSub),this.content.delete(e)}}gc(e,t){if(!this.deleted)throw Vl();this.content.gc(e),t?dm(e,this,new Qh(this.id,this.length)):this.content=new tg(this.length)}write(e,t){let n=t>0?Z(this.id.client,this.id.clock+t-1):this.origin,r=this.rightOrigin,i=this.parentSub,a=this.content.getRef()&31|(n===null?0:128)|(r===null?0:64)|(i===null?0:32);if(e.writeInfo(a),n!==null&&e.writeLeftID(n),r!==null&&e.writeRightID(r),n===null&&r===null){let t=this.parent;if(t._item!==void 0){let n=t._item;if(n===null){let n=zp(t);e.writeParentInfo(!0),e.writeString(n)}else e.writeParentInfo(!1),e.writeLeftID(n.id)}else t.constructor===String?(e.writeParentInfo(!0),e.writeString(t)):t.constructor===Lp?(e.writeParentInfo(!1),e.writeLeftID(t)):Vl();i!==null&&e.writeString(i)}this.content.write(e,t)}},Ng=(e,t)=>Pg[t&31](e),Pg=[()=>{Vl()},ng,dg,eg,gg,sg,lg,Eg,mg,ag,()=>{Vl()}],Fg=10,Ig=class extends Xh{get deleted(){return!0}delete(){}mergeWith(e){return this.constructor===e.constructor?(this.length+=e.length,!0):!1}integrate(e,t){Vl()}write(e,t){e.writeInfo(Fg),yl(e.restEncoder,this.length-t)}getMissing(e,t){return null}},Lg=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:{},Rg=`__ $YJS$ __`;Lg[Rg]===!0&&console.error(`Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438`),Lg[Rg]=!0;var zg=()=>{let e=!0;return(t,n)=>{if(e){e=!1;try{t()}finally{e=!0}}else n!==void 0&&n()}},Bg=/[\uD800-\uDBFF]/,Vg=/[\uDC00-\uDFFF]/,Hg=(e,t)=>{let n=0,r=0;for(;n<e.length&&n<t.length&&e[n]===t[n];)n++;for(n>0&&Bg.test(e[n-1])&&n--;r+n<e.length&&r+n<t.length&&e[e.length-r-1]===t[t.length-r-1];)r++;return r>0&&Vg.test(e[e.length-r])&&r--,{index:n,remove:e.length-n-r,insert:t.slice(n,t.length-r)}},Ug=(e,t)=>e>>>t|e<<32-t,Wg=e=>Ug(e,2)^Ug(e,13)^Ug(e,22),Gg=e=>Ug(e,6)^Ug(e,11)^Ug(e,25),Kg=e=>Ug(e,7)^Ug(e,18)^e>>>3,qg=e=>Ug(e,17)^Ug(e,19)^e>>>10,Jg=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Yg=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Xg=class{constructor(){let e=new ArrayBuffer(320);this._H=new Uint32Array(e,0,8),this._H.set(Yg),this._W=new Uint32Array(e,64,64)}_updateHash(){let e=this._H,t=this._W;for(let e=16;e<64;e++)t[e]=qg(t[e-2])+t[e-7]+Kg(t[e-15])+t[e-16];let n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],c=e[6],l=e[7];for(let e=0,u,d;e<64;e++)u=l+Gg(o)+(o&s^~o&c)+Jg[e]+t[e]>>>0,d=Wg(n)+(n&r^n&i^r&i)>>>0,l=c,c=s,s=o,o=a+u>>>0,a=i,i=r,r=n,n=u+d>>>0;e[0]+=n,e[1]+=r,e[2]+=i,e[3]+=a,e[4]+=o,e[5]+=s,e[6]+=c,e[7]+=l}digest(e){let t=0;for(;t+56<=e.length;){let n=0;for(;n<16&&t+3<e.length;n++)this._W[n]=e[t++]<<24|e[t++]<<16|e[t++]<<8|e[t++];if(t%64!=0){for(this._W.fill(0,n,16);t<e.length;)this._W[n]|=e[t]<<(3-t%4)*8,t++;this._W[n]|=128<<(3-t%4)*8}this._updateHash()}let n=t%64!=0;this._W.fill(0,0,16);let r=0;for(;t<e.length;r++)for(let n=3;n>=0&&t<e.length;n--)this._W[r]|=e[t++]<<n*8;n||(this._W[r-(t%4==0?0:1)]|=128<<(3-t%4)*8),this._W[14]=e.byteLength/Xc,this._W[15]=e.byteLength*8,this._updateHash();let i=new Uint8Array(32);for(let e=0;e<this._H.length;e++)for(let t=0;t<4;t++)i[e*4+t]=this._H[e]>>>(3-t)*8;return i}},Zg=e=>new Xg().digest(e),Qg=new z(`y-sync`),$g=new z(`y-undo`),e_=new z(`yjs-cursor`),t_=e=>{for(let t=6;t<e.length;t++)e[t%6]=e[t%6]^e[t];return e.slice(0,6)},n_=e=>Gu(t_(Zg(qu(e)))),r_=(e,t)=>t===void 0?!e.deleted:t.sv.has(e.id.client)&&t.sv.get(e.id.client)>e.id.clock&&!Xf(t.ds,e.id),i_=[{light:`#ecd44433`,dark:`#ecd444`}],a_=(e,t,n)=>{if(!e.has(n)){if(e.size<t.length){let n=Cc();e.forEach(e=>n.add(e)),t=t.filter(e=>!n.has(e))}e.set(n,lu(t))}return e.get(n)},o_=(e,{colors:t=i_,colorMapping:n=new Map,permanentUserData:r=null,onFirstRender:i=()=>{},mapping:a}={})=>{let o=!1,s=new u_(e,a),c=new L({props:{editable:e=>{let t=Qg.getState(e);return t.snapshot==null&&t.prevSnapshot==null}},key:Qg,state:{init:(i,a)=>({type:e,doc:e.doc,binding:s,snapshot:null,prevSnapshot:null,isChangeOrigin:!1,isUndoRedoOperation:!1,addToHistory:!0,colors:t,colorMapping:n,permanentUserData:r}),apply:(e,t)=>{let n=e.getMeta(Qg);if(n!==void 0){t=Object.assign({},t);for(let e in n)t[e]=n[e]}return t.addToHistory=e.getMeta(`addToHistory`)!==!1,t.isChangeOrigin=n!==void 0&&!!n.isChangeOrigin,t.isUndoRedoOperation=n!==void 0&&!!n.isChangeOrigin&&!!n.isUndoRedoOperation,s.prosemirrorView!==null&&n!==void 0&&(n.snapshot!=null||n.prevSnapshot!=null)&&Ef(0,()=>{s.prosemirrorView!=null&&(n.restore==null?s._renderSnapshot(n.snapshot,n.prevSnapshot,t):(s._renderSnapshot(n.snapshot,n.snapshot,t),delete t.restore,delete t.snapshot,delete t.prevSnapshot,s.mux(()=>{s._prosemirrorChanged(s.prosemirrorView.state.doc)})))}),t}},view:e=>(s.initView(e),a??s._forceRerender(),i(),{update:()=>{let t=c.getState(e.state);if(t.snapshot==null&&t.prevSnapshot==null&&(o||e.state.doc.content.findDiffStart(e.state.doc.type.createAndFill().content)!==null)){if(o=!0,t.addToHistory===!1&&!t.isChangeOrigin){let t=$g.getState(e.state),n=t&&t.undoManager;n&&n.stopCapturing()}s.mux(()=>{t.doc.transact(n=>{n.meta.set(`addToHistory`,t.addToHistory),s._prosemirrorChanged(e.state.doc)},Qg)})}},destroy:()=>{s.destroy()}})});return c},s_=(e,t,n)=>{if(t!==null&&t.anchor!==null&&t.head!==null)if(t.type===`all`)e.setSelection(new l(e.doc));else if(t.type===`node`){let r=z_(n.doc,n.type,t.anchor,n.mapping);e.setSelection(c_(e,r))}else{let r=z_(n.doc,n.type,t.anchor,n.mapping),i=z_(n.doc,n.type,t.head,n.mapping);r!==null&&i!==null&&e.setSelection(D.between(e.doc.resolve(r),e.doc.resolve(i)))}},c_=(e,t)=>{let n=e.doc.resolve(t);return n.nodeAfter?We.create(e.doc,t):D.near(n)},l_=(e,t)=>({type:t.selection.jsonID,anchor:L_(t.selection.anchor,e.type,e.mapping),head:L_(t.selection.head,e.type,e.mapping)}),u_=class{constructor(e,t=new Map){this.type=e,this.prosemirrorView=null,this.mux=zg(),this.mapping=t,this.isOMark=new Map,this._observeFunction=this._typeChanged.bind(this),this.doc=e.doc,this.beforeTransactionSelection=null,this.beforeAllTransactions=()=>{this.beforeTransactionSelection===null&&this.prosemirrorView!=null&&(this.beforeTransactionSelection=l_(this,this.prosemirrorView.state))},this.afterAllTransactions=()=>{this.beforeTransactionSelection=null},this._domSelectionInView=null}get _tr(){return this.prosemirrorView.state.tr.setMeta(`addToHistory`,!1)}_isLocalCursorInView(){return this.prosemirrorView.hasFocus()?(Fu&&this._domSelectionInView===null&&(Ef(0,()=>{this._domSelectionInView=null}),this._domSelectionInView=this._isDomSelectionInView()),this._domSelectionInView):!1}_isDomSelectionInView(){let e=this.prosemirrorView._root.getSelection();if(e==null||e.anchorNode==null)return!1;let t=this.prosemirrorView._root.createRange();t.setStart(e.anchorNode,e.anchorOffset),t.setEnd(e.focusNode,e.focusOffset),t.getClientRects().length===0&&t.startContainer&&t.collapsed&&t.selectNodeContents(t.startContainer);let n=t.getBoundingClientRect(),r=uf.documentElement;return n.bottom>=0&&n.right>=0&&n.left<=(window.innerWidth||r.clientWidth||0)&&n.top<=(window.innerHeight||r.clientHeight||0)}renderSnapshot(e,t){t||=Qp(ep(),new Map),this.prosemirrorView.dispatch(this._tr.setMeta(Qg,{snapshot:e,prevSnapshot:t}))}unrenderSnapshot(){this.mapping.clear(),this.mux(()=>{let e=this.type.toArray().map(e=>f_(e,this.prosemirrorView.state.schema,this)).filter(e=>e!==null),t=this._tr.replace(0,this.prosemirrorView.state.doc.content.size,new fe(Ct.from(e),0,0));t.setMeta(Qg,{snapshot:null,prevSnapshot:null}),this.prosemirrorView.dispatch(t)})}_forceRerender(){this.mapping.clear(),this.mux(()=>{let e=this.beforeTransactionSelection===null?this.prosemirrorView.state.selection:null,t=this.type.toArray().map(e=>f_(e,this.prosemirrorView.state.schema,this)).filter(e=>e!==null),n=this._tr.replace(0,this.prosemirrorView.state.doc.content.size,new fe(Ct.from(t),0,0));if(e){let t=Fc(Ic(e.anchor,0),n.doc.content.size),r=Fc(Ic(e.head,0),n.doc.content.size);n.setSelection(D.create(n.doc,t,r))}this.prosemirrorView.dispatch(n.setMeta(Qg,{isChangeOrigin:!0,binding:this}))})}_renderSnapshot(e,t,n){let r=this.doc,i=this.type;if(e||=$p(this.doc),e instanceof Uint8Array||t instanceof Uint8Array)if((!(e instanceof Uint8Array)||!(t instanceof Uint8Array))&&Vl(),r=new op({gc:!1}),xp(r,t),t=$p(r),xp(r,e),e=$p(r),i._item===null){let e=Array.from(this.doc.share.keys()).find(e=>this.doc.share.get(e)===this.type);i=r.getXmlFragment(e)}else{let e=r.store.clients.get(i._item.id.client)??[];i=e[om(e,i._item.id.clock)].content.type}this.mapping.clear(),this.mux(()=>{r.transact(r=>{let a=n.permanentUserData;a&&a.dss.forEach(e=>{Jf(r,e,e=>{})});let o=(e,t)=>{let r=e===`added`?a.getUserByClientId(t.client):a.getUserByDeletedId(t);return{user:r,type:e,color:a_(n.colorMapping,n.colors,r)}},s=$m(i,new Zp(t.ds,e.sv)).map(n=>!n._item.deleted||r_(n._item,e)||r_(n._item,t)?f_(n,this.prosemirrorView.state.schema,{mapping:new Map,isOMark:new Map},e,t,o):null).filter(e=>e!==null),c=this._tr.replace(0,this.prosemirrorView.state.doc.content.size,new fe(Ct.from(s),0,0));this.prosemirrorView.dispatch(c.setMeta(Qg,{isChangeOrigin:!0}))},Qg)})}_typeChanged(e,t){if(this.prosemirrorView==null)return;let n=Qg.getState(this.prosemirrorView.state);if(e.length===0||n.snapshot!=null||n.prevSnapshot!=null){this.renderSnapshot(n.snapshot,n.prevSnapshot);return}this.mux(()=>{let e=(e,t)=>this.mapping.delete(t);Jf(t,t.deleteSet,e=>{if(e.constructor===Mg){let t=e.content.type;t&&this.mapping.delete(t)}}),t.changed.forEach(e),t.changedParentTypes.forEach(e);let n=this.type.toArray().map(e=>d_(e,this.prosemirrorView.state.schema,this)).filter(e=>e!==null),r=this._tr.replace(0,this.prosemirrorView.state.doc.content.size,new fe(Ct.from(n),0,0));s_(r,this.beforeTransactionSelection,this),r=r.setMeta(Qg,{isChangeOrigin:!0,isUndoRedoOperation:t.origin instanceof wm}),this.beforeTransactionSelection!==null&&this._isLocalCursorInView()&&r.scrollIntoView(),this.prosemirrorView.dispatch(r)})}_prosemirrorChanged(e){this.doc.transact(()=>{A_(this.doc,this.type,e,this),this.beforeTransactionSelection=l_(this,this.prosemirrorView.state)},Qg)}initView(e){this.prosemirrorView!=null&&this.destroy(),this.prosemirrorView=e,this.doc.on(`beforeAllTransactions`,this.beforeAllTransactions),this.doc.on(`afterAllTransactions`,this.afterAllTransactions),this.type.observeDeep(this._observeFunction)}destroy(){this.prosemirrorView!=null&&(this.prosemirrorView=null,this.type.unobserveDeep(this._observeFunction),this.doc.off(`beforeAllTransactions`,this.beforeAllTransactions),this.doc.off(`afterAllTransactions`,this.afterAllTransactions))}},d_=(e,t,n,r,i,a)=>{let o=n.mapping.get(e);if(o===void 0){if(e instanceof Uh)return f_(e,t,n,r,i,a);throw Bl()}return o},f_=(e,t,n,r,i,a)=>{let o=[],s=e=>{if(e instanceof Uh){let s=d_(e,t,n,r,i,a);s!==null&&o.push(s)}else{let s=e._item.right?.content?.type;s instanceof Rh&&!s._item.deleted&&s._item.id.client===s.doc.clientID&&(e.applyDelta([{retain:e.length},...s.toDelta()]),s.doc.transact(e=>{s._item.delete(e)}));let c=p_(e,t,n,r,i,a);c!==null&&c.forEach(e=>{e!==null&&o.push(e)})}};r===void 0||i===void 0?e.toArray().forEach(s):$m(e,new Zp(i.ds,r.sv)).forEach(s);try{let s=e.getAttributes(r);r!==void 0&&(r_(e._item,r)?r_(e._item,i)||(s.ychange=a?a(`added`,e._item.id):{type:`added`}):s.ychange=a?a(`removed`,e._item.id):{type:`removed`});let c=t.node(e.nodeName,s,o);return n.mapping.set(e,c),c}catch(r){console.warn(`[y-prosemirror] schema.node(`+e.nodeName+`) threw:`,String(r&&r.message||r));let i=globalThis.__okYpsCounters=globalThis.__okYpsCounters||{block:0,inline:0};if(t.nodes[e.nodeName]&&t.nodes[e.nodeName].spec&&t.nodes[e.nodeName].spec.inline)i.inline++;else if(i.block++,t.nodes.rawMdxFallback)try{let i=t.node(`rawMdxFallback`,{reason:String(r&&r.message||r)},[t.text(e.nodeName)]);return n.mapping.set(e,i),i}catch(e){console.warn(`[y-prosemirror] rawMdxFallback substitution also failed:`,String(e&&e.message||e))}return n.mapping.delete(e),null}},p_=(e,t,n,r,i,a)=>{let o=[],s=e.toDelta(r,i,a);try{for(let e=0;e<s.length;e++){let n=s[e];o.push(t.text(n.insert,O_(n.attributes,t)))}}catch(e){console.warn(`[y-prosemirror] schema.text() threw:`,String(e&&e.message||e));let t=globalThis.__okYpsCounters=globalThis.__okYpsCounters||{block:0,inline:0};return t.inline++,null}return o},m_=(e,t)=>{let n=new Jh,r=e.map(e=>({insert:e.text,attributes:k_(e.marks,t)}));return n.applyDelta(r),t.mapping.set(n,e),n},h_=(e,t)=>{let n=new Uh(e.type.name);for(let t in e.attrs){let r=e.attrs[t];r!==null&&t!==`ychange`&&n.setAttribute(t,r)}return n.insert(0,y_(e).map(e=>g_(e,t))),t.mapping.set(n,e),n},g_=(e,t)=>e instanceof Array?m_(e,t):h_(e,t),__=e=>typeof e==`object`&&!!e,v_=(e,t)=>{let n=Object.keys(e).filter(t=>e[t]!==null),r=n.length===Object.keys(t).filter(e=>t[e]!==null).length;for(let i=0;i<n.length&&r;i++){let a=n[i],o=e[a],s=t[a];r=a===`ychange`||o===s||__(o)&&__(s)&&v_(o,s)}return r},y_=e=>{let t=e.content.content,n=[];for(let e=0;e<t.length;e++){let r=t[e];if(r.isText){let r=[];for(let n=t[e];e<t.length&&n.isText;n=t[++e])r.push(n);e--,n.push(r)}else n.push(r)}return n},b_=(e,t)=>{let n=e.toDelta();return n.length===t.length&&n.every((e,n)=>e.insert===t[n].text&&xu(e.attributes||{}).length===t[n].marks.length&&Tu(e.attributes,(e,r)=>{let i=D_(r),a=t[n].marks;return a.find(e=>e.type.name===i)?v_(e,a.find(e=>e.type.name===i)?.attrs):!1}))},x_=(e,t)=>{if(e instanceof Uh&&!(t instanceof Array)&&j_(e,t)){let n=y_(t);return e._length===n.length&&v_(e.getAttributes(),t.attrs)&&e.toArray().every((e,t)=>x_(e,n[t]))}return e instanceof Jh&&t instanceof Array&&b_(e,t)},S_=(e,t)=>e===t||e instanceof Array&&t instanceof Array&&e.length===t.length&&e.every((e,n)=>t[n]===e),C_=(e,t,n)=>{let r=e.toArray(),i=y_(t),a=i.length,o=r.length,s=Fc(o,a),c=0,l=0,u=!1;for(;c<s;c++){let e=r[c],t=i[c];if(S_(n.mapping.get(e),t))u=!0;else if(!x_(e,t))break}for(;c+l<s;l++){let e=r[o-l-1],t=i[a-l-1];if(S_(n.mapping.get(e),t))u=!0;else if(!x_(e,t))break}return{equalityFactor:c+l,foundMappedChild:u}},w_=e=>{let t=``,n=e._start,r={};for(;n!==null;)n.deleted||(n.countable&&n.content instanceof hg?t+=n.content.str:n.content instanceof cg&&(r[n.content.key]=null)),n=n.right;return{str:t,nAttrs:r}},T_=(e,t,n)=>{n.mapping.set(e,t);let{nAttrs:r,str:i}=w_(e),a=t.map(e=>({insert:e.text,attributes:Object.assign({},r,k_(e.marks,n))})),{insert:o,remove:s,index:c}=Hg(i,a.map(e=>e.insert).join(``));e.delete(c,s),e.insert(c,o),e.applyDelta(a.map(e=>({retain:e.insert.length,attributes:e.attributes})))},E_=/(.*)(--[a-zA-Z0-9+/=]{8})$/,D_=e=>E_.exec(e)?.[1]??e,O_=(e,t)=>{let n=[];for(let r in e)n.push(t.mark(D_(r),e[r]));return n},k_=(e,t)=>{let n={};return e.forEach(e=>{if(e.type.name!==`ychange`){let r=bc(t.isOMark,e.type,()=>!e.type.excludes(e.type));n[r?`${e.type.name}--${n_(e.toJSON())}`:e.type.name]=e.attrs}}),n},A_=(e,t,n,r)=>{if(t instanceof Uh&&t.nodeName!==n.type.name)throw Error(`node name mismatch!`);if(r.mapping.set(t,n),t instanceof Uh){let e=t.getAttributes(),r=n.attrs;for(let n in r)r[n]===null?t.removeAttribute(n):e[n]!==r[n]&&n!==`ychange`&&t.setAttribute(n,r[n]);for(let n in e)r[n]===void 0&&t.removeAttribute(n)}let i=y_(n),a=i.length,o=t.toArray(),s=o.length,c=Fc(a,s),l=0,u=0;for(;l<c;l++){let e=o[l],t=i[l];if(!S_(r.mapping.get(e),t))if(x_(e,t))r.mapping.set(e,t);else break}for(;u+l+1<c;u++){let e=o[s-u-1],t=i[a-u-1];if(!S_(r.mapping.get(e),t))if(x_(e,t))r.mapping.set(e,t);else break}e.transact(()=>{for(;s-l-u>0&&a-l-u>0;){let n=o[l],c=i[l],d=o[s-u-1],f=i[a-u-1];if(n instanceof Jh&&c instanceof Array)b_(n,c)||T_(n,c,r),l+=1;else{let i=n instanceof Uh&&j_(n,c),a=d instanceof Uh&&j_(d,f);if(i&&a){let e=C_(n,c,r),t=C_(d,f,r);e.foundMappedChild&&!t.foundMappedChild?a=!1:!e.foundMappedChild&&t.foundMappedChild||e.equalityFactor<t.equalityFactor?i=!1:a=!1}i?(A_(e,n,c,r),l+=1):a?(A_(e,d,f,r),u+=1):(r.mapping.delete(t.get(l)),t.delete(l,1),t.insert(l,[g_(c,r)]),l+=1)}}let n=s-l-u;if(s===1&&a===0&&o[0]instanceof Jh?(r.mapping.delete(o[0]),o[0].delete(0,o[0].length)):n>0&&(t.slice(l,l+n).forEach(e=>r.mapping.delete(e)),t.delete(l,n)),l+u<a){let e=[];for(let t=l;t<a-u;t++)e.push(g_(i[t],r));t.insert(l,e)}},Qg)},j_=(e,t)=>!(t instanceof Array)&&e.nodeName===t.type.name,M_=null,N_=class{constructor(e,t,n){this.view=e,this.key=t,this.value=n}apply(){let e=Qg.getState(this.view.state);if(e&&e.binding&&!e.binding.isDestroyed){let e=this.view.state.tr;e.setMeta(this.key,this.value),this.view.dispatch(e)}}},P_=class e{constructor(e=[]){this.entries=e}getFirst(){return this.entries[0]}dequeueFirst(){return this.entries.shift()}isEmpty(){return this.entries.length===0}static fromViewsToUpdate(){let t=M_;M_=null;let n=[];return t.forEach((e,t)=>{e.forEach((e,r)=>{n.push(new N_(t,r,e))})}),new e(n)}},F_=(e=P_.fromViewsToUpdate(),t=!1)=>{let n=!0;for(;!e.isEmpty();){let r=e.getFirst();try{r.apply()}catch(r){if(r instanceof RangeError){t&&n&&e.dequeueFirst(),e.isEmpty()||Ef(0,()=>F_(e,!0));return}throw r}n=!1,e.dequeueFirst()}},I_=(e,t,n)=>{M_||(M_=new Map,Ef(0,F_)),bc(M_,e,vc).set(t,n)},L_=(e,t,n)=>{if(e===0)return qp(t,0,-1);let r=t._first===null?null:t._first.content.type;for(;r!==null&&t!==r;){if(r instanceof Jh){if(r._length>=e)return qp(r,e,-1);if(e-=r._length,r._item!==null&&r._item.next!==null)r=r._item.next.content.type;else{do r=r._item===null?null:r._item.parent,e--;while(r!==t&&r!==null&&r._item!==null&&r._item.next===null);r!==null&&r!==t&&(r=r._item===null?null:r._item.next.content.type)}}else{let i=(n.get(r)||{nodeSize:0}).nodeSize;if(r._first!==null&&e<i)r=r._first.content.type,e--;else{if(e===1&&r._length===0&&i>1)return new Vp(r._item===null?null:r._item.id,r._item===null?zp(r):null,null);if(e-=i,r._item!==null&&r._item.next!==null)r=r._item.next.content.type;else{if(e===0)return r=r._item===null?r:r._item.parent,new Vp(r._item===null?null:r._item.id,r._item===null?zp(r):null,null);do r=r._item.parent,e--;while(r!==t&&r._item.next===null);r!==t&&(r=r._item.next.content.type)}}}if(r===null)throw Vl();if(e===0&&r.constructor!==Jh&&r!==t)return R_(r._item.parent,r._item)}return qp(t,t._length,-1)},R_=(e,t)=>{let n=null,r=null;return e._item===null?r=zp(e):n=Z(e._item.id.client,e._item.id.clock),new Vp(n,r,t.id)},z_=(e,t,n,r)=>{let i=Yp(n,e);if(i===null||i.type!==t&&!Bp(t,i.type._item))return null;let a=i.type,o=0;if(a.constructor===Jh)o=i.index;else if(a._item===null||!a._item.deleted){let e=a._first,t=0;for(;t<a._length&&t<i.index&&e!==null;){if(!e.deleted){let n=e.content.type;t++,n instanceof Jh?o+=n._length:o+=r.get(n).nodeSize}e=e.right}o+=1}for(;a!==t&&a._item!==null;){let e=a._item.parent;if(e._item===null||!e._item.deleted){o+=1;let t=e._first;for(;t!==null;){let e=t.content.type;if(e===a)break;t.deleted||(e instanceof Jh?o+=e._length:o+=r.get(e).nodeSize),t=t.right}}a=e}return o-1},B_=(e,t,n)=>e!==t,V_=e=>{let t=document.createElement(`span`);t.classList.add(`ProseMirror-yjs-cursor`),t.setAttribute(`style`,`border-color: ${e.color}`);let n=document.createElement(`div`);n.setAttribute(`style`,`background-color: ${e.color}`),n.insertBefore(document.createTextNode(e.name),null);let r=document.createTextNode(``),i=document.createTextNode(``);return t.insertBefore(r,null),t.insertBefore(n,null),t.insertBefore(i,null),t},H_=e=>({style:`background-color: ${e.color}70`,class:`ProseMirror-yjs-selection`}),U_=/^#[0-9a-fA-F]{6}$/,W_=(e,t,n,r,i)=>{let a=Qg.getState(e);if(a==null||a.doc==null||a.binding==null)return Ke.create(e.doc,[]);let o=a.doc,s=[];return a.snapshot!=null||a.prevSnapshot!=null||a.binding.mapping.size===0?Ke.create(e.doc,[]):(t.getStates().forEach((t,c)=>{if(n(o.clientID,c,t)&&t.cursor!=null){let n=t.user||{};n.color==null?n.color=`#ffa500`:U_.test(n.color)||console.warn(`A user uses an unsupported color format`,n),n.name??=`User: ${c}`;let l=z_(o,a.type,Up(t.cursor.anchor),a.binding.mapping),u=z_(o,a.type,Up(t.cursor.head),a.binding.mapping);if(l!==null&&u!==null){let t=Ic(e.doc.content.size-1,0);l=Fc(l,t),u=Fc(u,t),s.push(V.widget(u,()=>r(n,c),{key:c+``,side:10}));let a=Fc(l,u),o=Ic(l,u);s.push(V.inline(a,o,i(n,c),{inclusiveEnd:!0,inclusiveStart:!1}))}}}),Ke.create(e.doc,s))},G_=(e,{awarenessStateFilter:t=B_,cursorBuilder:n=V_,selectionBuilder:r=H_,getSelection:i=e=>e.selection}={},a=`cursor`)=>new L({key:e_,state:{init(i,a){return W_(a,e,t,n,r)},apply(i,a,o,s){let c=Qg.getState(s),l=i.getMeta(e_);return c&&c.isChangeOrigin||l&&l.awarenessUpdated?W_(s,e,t,n,r):a.map(i.mapping,i.doc)}},props:{decorations:e=>e_.getState(e)},view:t=>{let n=()=>{t.docView&&I_(t,e_,{awarenessUpdated:!0})},r=()=>{let n=Qg.getState(t.state),r=e.getLocalState()||{};if(t.hasFocus()){let o=i(t.state),s=L_(o.anchor,n.type,n.binding.mapping),c=L_(o.head,n.type,n.binding.mapping);(r.cursor==null||!Xp(Up(r.cursor.anchor),s)||!Xp(Up(r.cursor.head),c))&&e.setLocalStateField(a,{anchor:s,head:c})}else r.cursor!=null&&z_(n.doc,n.type,Up(r.cursor.anchor),n.binding.mapping)!==null&&e.setLocalStateField(a,null)};return e.on(`change`,n),t.dom.addEventListener(`focusin`,r),t.dom.addEventListener(`focusout`,r),{update:r,destroy:()=>{t.dom.removeEventListener(`focusin`,r),t.dom.removeEventListener(`focusout`,r),e.off(`change`,n),e.setLocalStateField(a,null)}}}}),K_=e=>{let t=$g.getState(e).undoManager;if(t!=null)return t.undo(),!0},q_=e=>{let t=$g.getState(e).undoManager;if(t!=null)return t.redo(),!0},J_=new Set([`paragraph`]),Y_=(e,t)=>!(e instanceof Mg)||!(e.content instanceof Tg)||!(e.content.type instanceof Rh||e.content.type instanceof Uh&&t.has(e.content.type.nodeName))||e.content.type._length===0,X_=({protectedNodes:e=J_,trackedOrigins:t=[],undoManager:n=null}={})=>new L({key:$g,state:{init:(r,i)=>{let a=Qg.getState(i),o=n||new wm(a.type,{trackedOrigins:new Set([Qg].concat(t)),deleteFilter:t=>Y_(t,e),captureTransaction:e=>e.meta.get(`addToHistory`)!==!1});return{undoManager:o,prevSel:null,hasUndoOps:o.undoStack.length>0,hasRedoOps:o.redoStack.length>0}},apply:(e,t,n,r)=>{let i=Qg.getState(r).binding,a=t.undoManager,o=a.undoStack.length>0,s=a.redoStack.length>0;return i?{undoManager:a,prevSel:l_(i,n),hasUndoOps:o,hasRedoOps:s}:o!==t.hasUndoOps||s!==t.hasRedoOps?Object.assign({},t,{hasUndoOps:a.undoStack.length>0,hasRedoOps:a.redoStack.length>0}):t}},view:e=>{let t=Qg.getState(e.state),n=$g.getState(e.state).undoManager;return n.on(`stack-item-added`,({stackItem:n})=>{let r=t.binding;r&&n.meta.set(r,$g.getState(e.state).prevSel)}),n.on(`stack-item-popped`,({stackItem:e})=>{let n=t.binding;n&&(n.beforeTransactionSelection=e.meta.get(n)||n.beforeTransactionSelection)}),{destroy:()=>{n.destroy()}}}});function Z_(e){let{char:t,allowSpaces:n,allowToIncludeChar:r,allowedPrefixes:i,startOfLine:a,$position:o}=e,s=n&&!r,c=be(t),l=RegExp(`\\s${c}$`),u=a?`^`:``,d=r?``:c,f=RegExp(s?`${u}${c}.*?(?=\\s${d}|$)`:`${u}(?:^)?${c}[^\\s${d}]*`,`gm`),p=o.nodeBefore?.isText&&o.nodeBefore.text;if(!p)return null;let m=o.pos-p.length,h=Array.from(p.matchAll(f)).pop();if(!h||h.input===void 0||h.index===void 0)return null;let g=h.input.slice(Math.max(0,h.index-1),h.index),_=RegExp(`^[${i?.join(``)}\0]?$`).test(g);if(i!==null&&!_)return null;let v=m+h.index,y=v+h[0].length;return s&&l.test(p.slice(y-1,y+1))&&(h[0]+=` `,y+=1),v<o.pos&&y>=o.pos?{range:{from:v,to:y},query:h[0].slice(t.length),text:h[0]}:null}function Q_(e){return e.docChanged?e.steps.some(e=>{let t=e.slice;if(!t?.content)return!1;let n=t.content.textBetween(0,t.content.size,`
|
|
6
|
-
`);return/\s/.test(n)}):!1}var $_=new z(`suggestion`);function ev({pluginKey:e=$_,editor:t,char:n=`@`,allowSpaces:r=!1,allowToIncludeChar:i=!1,allowedPrefixes:a=[` `],startOfLine:o=!1,decorationTag:s=`span`,decorationClass:c=`suggestion`,decorationContent:l=``,decorationEmptyClass:u=`is-empty`,command:d=()=>null,items:f=()=>[],render:p=()=>({}),allow:m=()=>!0,findSuggestionMatch:h=Z_,shouldShow:g,shouldResetDismissed:_}){let v,y=p?.(),b=r&&!i,x=()=>{let e=t.state.selection.$anchor.pos,{top:n,right:r,bottom:i,left:a}=t.view.coordsAtPos(e);try{return new DOMRect(a,n,r-a,i-n)}catch{return null}},S=(n,r)=>r?()=>{let r=e.getState(t.state)?.decorationId;return n.dom.querySelector(`[data-decoration-id="${r}"]`)?.getBoundingClientRect()||null}:x,C=({match:e,dismissedRange:n,state:r,transaction:i})=>_?.({editor:t,state:r,range:n,match:e,transaction:i,allowSpaces:b})?!1:b?e.range.from===n.from:e.range.from===n.from&&!Q_(i);function w(n,r){var i;try{let r=e.getState(n.state),a=r?.decorationId?n.dom.querySelector(`[data-decoration-id="${r.decorationId}"]`):null,o={editor:t,range:r?.range||{from:0,to:0},query:r?.query||null,text:r?.text||null,items:[],command:e=>d({editor:t,range:r?.range||{from:0,to:0},props:e}),decorationNode:a,clientRect:S(n,a)};(i=y?.onExit)==null||i.call(y,o)}catch{}let a=n.state.tr.setMeta(r,{exit:!0});n.dispatch(a)}let T=new L({key:e,view(){return{update:async(e,n)=>{var r,i,a,o,s;let c=this.key?.getState(n),l=this.key?.getState(e.state),u=c.active&&l.active&&c.range.from!==l.range.from,p=!c.active&&l.active,m=c.active&&!l.active,h=!p&&!m&&c.query!==l.query,g=p||u&&h,_=h||u,b=m||u&&h;if(!g&&!_&&!b)return;let x=b&&!g?c:l,C=e.dom.querySelector(`[data-decoration-id="${x.decorationId}"]`);v={editor:t,range:x.range,query:x.query,text:x.text,items:[],command:e=>d({editor:t,range:x.range,props:e}),decorationNode:C,clientRect:S(e,C)},g&&((r=y?.onBeforeStart)==null||r.call(y,v)),_&&((i=y?.onBeforeUpdate)==null||i.call(y,v)),(_||g)&&(v.items=await f({editor:t,query:x.query})),b&&((a=y?.onExit)==null||a.call(y,v)),_&&((o=y?.onUpdate)==null||o.call(y,v)),g&&((s=y?.onStart)==null||s.call(y,v))},destroy:()=>{var e;v&&((e=y?.onExit)==null||e.call(y,v))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1,dismissedRange:null}},apply(s,c,l,u){let{isEditable:d}=t,{composing:f}=t.view,{selection:p}=s,{empty:_,from:v}=p,y={...c},b=s.getMeta(e);if(b&&b.exit)return y.active=!1,y.decorationId=null,y.range={from:0,to:0},y.query=null,y.text=null,y.dismissedRange=c.active?{...c.range}:c.dismissedRange,y;if(y.composing=f,s.docChanged&&y.dismissedRange!==null&&(y.dismissedRange={from:s.mapping.map(y.dismissedRange.from),to:s.mapping.map(y.dismissedRange.to)}),d&&(_||t.view.composing)){(v<c.range.from||v>c.range.to)&&!f&&!c.composing&&(y.active=!1);let e=h({char:n,allowSpaces:r,allowToIncludeChar:i,allowedPrefixes:a,startOfLine:o,$position:p.$from}),l=`id_${Math.floor(Math.random()*4294967295)}`;e&&m({editor:t,state:u,range:e.range,isActive:c.active})&&(!g||g({editor:t,range:e.range,query:e.query,text:e.text,transaction:s}))?(y.dismissedRange!==null&&!C({match:e,dismissedRange:y.dismissedRange,state:u,transaction:s})&&(y.dismissedRange=null),y.dismissedRange===null?(y.active=!0,y.decorationId=c.decorationId?c.decorationId:l,y.range=e.range,y.query=e.query,y.text=e.text):y.active=!1):(e||(y.dismissedRange=null),y.active=!1)}else y.active=!1;return y.active||(y.decorationId=null,y.range={from:0,to:0},y.query=null,y.text=null),y}},props:{handleKeyDown(t,n){var r;let{active:i,range:a}=T.getState(t.state);if(!i)return!1;if(n.key===`Escape`||n.key===`Esc`){let i=T.getState(t.state);return(r=y?.onKeyDown)==null||r.call(y,{view:t,event:n,range:i.range}),w(t,e),!0}return(y?.onKeyDown)?.call(y,{view:t,event:n,range:a})||!1},decorations(e){let{active:t,range:n,decorationId:r,query:i}=T.getState(e);if(!t)return null;let a=!i?.length,o=[c];return a&&o.push(u),Ke.create(e.doc,[V.inline(n.from,n.to,{nodeName:s,class:o.join(` `),"data-decoration-id":r,"data-decoration-content":l})])}}});return T}var tv=ev;function nv(e){return e.kind===`create`?`create:${e.value}`:`tag:${e.value}`}function rv(e){if(e.kind===`create`)return`Create new tag #${e.value}`;let t=e.count===1?`1 use`:`${e.count} uses`;return`Tag #${e.value}, ${t}`}function iv(e){let t=(0,Y.c)(32),{items:n,query:r,selectedIndex:i,onSelect:a,onHover:o,loading:s,error:c}=e,l=s===void 0?!1:s,u=c===void 0?null:c,d=(0,q.useRef)(null),f=(0,q.useId)(),p=i>=0&&i<n.length?`${f}-option-${i}`:void 0,m,h;t[0]===i?(m=t[1],h=t[2]):(m=()=>{let e=d.current;if(!e)return;let t=e.querySelectorAll(`[role="option"]`).item(i);t&&t.scrollIntoView({block:`nearest`})},h=[i],t[0]=i,t[1]=m,t[2]=h),(0,q.useEffect)(m,h);let g=av;if(l){let e;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,J.jsx)(`div`,{ref:d,role:`status`,"aria-live":`polite`,className:`w-64 rounded-lg border bg-popover p-2 shadow-md text-sm text-muted-foreground`,style:{maxHeight:`var(--suggestion-menu-max-height, 40vh)`},onMouseDown:g,children:`Loading tags…`}),t[3]=e):e=t[3],e}if(n.length===0){let e;t[4]===r?e=t[5]:(e=r.trim(),t[4]=r,t[5]=e);let n=e,i=u??(n?`No tags match "${n}". Continue typing to create one.`:`No tags yet. Continue typing to create one.`),a;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(a={maxHeight:`var(--suggestion-menu-max-height, 40vh)`},t[6]=a):a=t[6];let o;return t[7]===i?o=t[8]:(o=(0,J.jsx)(`div`,{ref:d,role:`status`,"aria-live":`polite`,className:`w-64 rounded-lg border bg-popover p-2 shadow-md text-sm text-muted-foreground`,style:a,onMouseDown:g,children:i}),t[7]=i,t[8]=o),o}let _=i>=0&&i<n.length?n[i]:null,v;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(v={maxHeight:`var(--suggestion-menu-max-height, 40vh)`},t[9]=v):v=t[9];let y;t[10]===_?y=t[11]:(y=_?rv(_):``,t[10]=_,t[11]=y);let b;t[12]===y?b=t[13]:(b=(0,J.jsx)(`span`,{className:`sr-only`,"aria-live":`polite`,"aria-atomic":`true`,children:y}),t[12]=y,t[13]=b);let x;t[14]===u?x=t[15]:(x=u&&(0,J.jsx)(`div`,{className:`rounded-md px-2 py-1.5 text-xs text-amber-700 dark:text-amber-300`,children:u}),t[14]=u,t[15]=x);let S;if(t[16]!==n||t[17]!==f||t[18]!==o||t[19]!==a||t[20]!==i){let e;t[22]!==f||t[23]!==o||t[24]!==a||t[25]!==i?(e=(e,t)=>{let n=t===i,r=nv(e),s=e.kind===`create`;return(0,J.jsxs)(`button`,{id:`${f}-option-${t}`,type:`button`,role:`option`,"aria-selected":n,"data-selected":n,"data-testid":s?`tag-suggestion-create`:`tag-suggestion-tag-${e.value}`,className:`flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm text-left ${n?`bg-accent text-accent-foreground`:``}`,onMouseDown:t=>{t.preventDefault(),a(e)},onPointerMove:o?()=>o(t):void 0,children:[(0,J.jsx)(`span`,{"aria-hidden":`true`,className:`font-mono text-xs text-muted-foreground`,children:`#`}),(0,J.jsx)(`span`,{className:`truncate font-medium flex-1`,children:e.value}),s?(0,J.jsx)(`span`,{className:`shrink-0 rounded-sm bg-primary/10 px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide text-primary`,children:`New`}):(0,J.jsx)(`span`,{className:`shrink-0 text-[11px] text-muted-foreground tabular-nums`,children:e.count})]},r)},t[22]=f,t[23]=o,t[24]=a,t[25]=i,t[26]=e):e=t[26],S=n.map(e),t[16]=n,t[17]=f,t[18]=o,t[19]=a,t[20]=i,t[21]=S}else S=t[21];let C;return t[27]!==p||t[28]!==b||t[29]!==x||t[30]!==S?(C=(0,J.jsxs)(`div`,{ref:d,role:`listbox`,"aria-label":`Tag suggestions`,"aria-activedescendant":p,tabIndex:-1,onMouseDown:g,className:`w-64 overflow-y-auto subtle-scrollbar rounded-lg border bg-popover p-1 shadow-md`,style:v,children:[b,x,S]}),t[27]=p,t[28]=b,t[29]=x,t[30]=S,t[31]=C):C=t[31],C}function av(e){return e.preventDefault()}function ov(e,t){let n=document.createElement(`div`);n.style.position=`fixed`,n.style.zIndex=`50`,n.style.visibility=`hidden`,document.body.appendChild(n);let r={getBoundingClientRect:()=>e()?.clientRect?.()??new DOMRect,get contextElement(){return e()?.editor.view.dom}},i=!1,a=!1,o=()=>{n.isConnected&&(n.style.removeProperty(`--suggestion-menu-max-height`),s(r,n,{placement:`bottom-start`,middleware:[ct(4),je(),He({padding:8}),Ce({apply({availableHeight:e}){n.isConnected&&n.style.setProperty(`--suggestion-menu-max-height`,`${Math.min(e,window.innerHeight*.4)}px`)}})]}).then(({x:e,y:t})=>{n.isConnected&&(n.style.left=`${e}px`,n.style.top=`${t}px`,i&&!a&&(n.style.removeProperty(`visibility`),a=!0))}).catch(e=>{n.isConnected&&console.warn(`[${t}] computePosition failed`,e)}))};return{popup:n,doPosition:o,startAutoUpdate:()=>ne(r,n,o),reveal:()=>{a||(i=!0,o())}}}function sv(e){e.stopAutoUpdate?.(),e.stopAutoUpdate=null,e.popup?.remove(),e.popup=null}var cv=new z(`tagSuggestion`),lv=8,uv=/^[a-zA-Z][\w/-]*$/;async function dv(){let e=await fetch(`/api/tags`);if(!e.ok)throw Error(`/api/tags responded with ${e.status}`);let t=await e.json();return t.ok&&Array.isArray(t.tags)?t.tags:[]}function fv(e,t){let n=t.trim(),r=n.toLowerCase(),i=n===``?e.slice():e.filter(e=>e.name.toLowerCase().includes(r));return i.sort((e,t)=>{let n=+!e.name.toLowerCase().startsWith(r),i=+!t.name.toLowerCase().startsWith(r);return n===i?t.count===e.count?e.name.localeCompare(t.name):t.count-e.count:n-i}),i}function pv(e,t){let n=fv(e,t).slice(0,lv).map(e=>({kind:`tag`,value:e.name,count:e.count,isLeaf:e.isLeaf})),r=t.trim();return r&&uv.test(r)&&!e.some(e=>e.name===r)&&n.unshift({kind:`create`,value:r}),n}function mv(e){let{$position:t}=e,n=t.parent.textBetween(0,t.parentOffset,void 0,``).match(/(^|[\s])#([a-zA-Z][\w/-]*)?$/);if(!n)return null;let r=n[2]??``,i=t.start(),a=n[1].length;return{range:{from:i+((n.index??0)+a),to:t.pos},query:r,text:`#${r}`}}function hv(e){let t=[],n=!1,r=null,i=null;return tv({editor:e,pluginKey:cv,char:`#`,allowedPrefixes:null,findSuggestionMatch:mv,items:async({query:e})=>{if(!n){r||=dv();try{t=await r,i=null}catch(e){console.error(`[tag-suggestion] Failed to fetch tags:`,e),i=`Failed to load tags. Press Escape and type # again to retry, or continue typing to create a new tag.`,t=[]}finally{n=!0,r=null}}return pv(t,e)},command:({editor:e,range:t,props:n})=>{try{let r=n.value;if(!r||!uv.test(r))return;e.chain().focus().deleteRange(t).insertContent({type:`tag`,attrs:{value:r}}).insertContent(` `).run()}catch(e){console.error(`[tag-suggestion] command failed`,{item:n,range:t},e)}},render:()=>{let e=null,a=null,o=0,s={popup:null,stopAutoUpdate:null},c=null,l=null,u=e=>{a?.command(e)},d=e=>{o!==e&&(o=e,p(null))};function f(e,t,r){let a=t===null?!n:t;return{items:e.items,query:e.query??``,selectedIndex:o,onSelect:r,onHover:d,loading:a,error:i}}let p=t=>{!e||!a||e.updateProps(f(a,t,u))};return{onBeforeStart(t){a=t,o=0;let n=ov(()=>a,`tag-suggestion`);s.popup=n.popup,c=n.doPosition,l=n.reveal,e=new dc(iv,{props:f(t,!0,u),editor:t.editor}),n.popup.appendChild(e.element),s.stopAutoUpdate=n.startAutoUpdate()},onStart(e){a=e,o=0,p(null),l?.()},onUpdate(e){a=e,o=Math.min(o,Math.max(0,e.items.length-1)),p(null),c?.()},onKeyDown({event:e}){if(!a)return!1;let t=a.items;if(e.key===`ArrowDown`)return t.length===0?!1:(o=(o+1)%t.length,p(null),!0);if(e.key===`ArrowUp`)return t.length===0?!1:(o=(o-1+t.length)%t.length,p(null),!0);if(e.key===`Enter`||e.key===`Tab`){let e=t[o];if(e)return a.command(e),!0;let n=(a.query??``).trim();return n&&uv.test(n)?(a.command({kind:`create`,value:n}),!0):!1}return e.key,!1},onExit(){sv(s),c=null,l=null,e?.destroy(),e=null,a=null,o=0,t=[],i=null,n=!1,r=null}}}})}var gv=[`.md`,`.mdx`];function _v(e){let t=e.toLowerCase();for(let e of gv)if(t.endsWith(e))return e;return null}function vv(e){let t=_v(e);return t?e.slice(0,-t.length):e}function yv(e){return e.trim()?e.includes(`..`)?`Path cannot contain ".."`:e.startsWith(`/`)?`Path cannot start with "/"`:e.includes(`\\`)?`Path cannot contain backslashes`:e.includes(`\0`)?`Path cannot contain null bytes`:null:`Name cannot be empty`}function bv(e){let t=e.fileName.trim(),n=_v(t)?t:`${t}${e.fileExtension??`.md`}`;if(e.kind===`folder`){let t=(e.folderName??``).trim();return`${e.initialDir?`${e.initialDir}/${t}`:t}/${n}`}return e.initialDir?`${e.initialDir}/${n}`:n}function xv(e){let t=e.target;return t?.tagName===`INPUT`||t?.tagName===`TEXTAREA`||t?.isContentEditable?!1:!!((e.metaKey||e.ctrlKey)&&e.altKey&&e.key.toLowerCase()===`n`)}function Sv(e){let t=e.value.lastIndexOf(`.`);t>0?e.setSelectionRange(0,t):e.select()}function Cv(e){let t=(0,Y.c)(96),{open:n,onOpenChange:r,kind:i,initialDir:a,suggestedName:o,description:s,onCreated:c}=e,{addPage:l}=Te(),[u,d]=(0,q.useState)(``),[f,p]=(0,q.useState)(``),[m,h]=(0,q.useState)(`.md`),[g,_]=(0,q.useState)(null),[v,y]=(0,q.useState)(!1),[b,x]=(0,q.useState)(null),S=(0,q.useId)(),C=(0,q.useId)(),w=(0,q.useId)(),T=(0,q.useRef)(null),E=(0,q.useRef)(null),D,O;t[0]!==i||t[1]!==n||t[2]!==o?(D=()=>{if(n){_(null),x(null),y(!1),p(``);let e=i===`file`?o??`untitled`:`index`,t=_v(e);h(t??`.md`),d(t?vv(e):e)}},O=[n,i,o],t[0]=i,t[1]=n,t[2]=o,t[3]=D,t[4]=O):(D=t[3],O=t[4]),(0,q.useEffect)(D,O);let k;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(k=function(e){let t=_v(e);t?(h(t),d(vv(e))):d(e),_(null)},t[5]=k):k=t[5];let A=k,j;t[6]!==m||t[7]!==u||t[8]!==f||t[9]!==a||t[10]!==i?(j=function(){return bv({kind:i,initialDir:a,fileName:u,fileExtension:m,folderName:f})},t[6]=m,t[7]=u,t[8]=f,t[9]=a,t[10]=i,t[11]=j):j=t[11];let M=j,N;t[12]!==u||t[13]!==f||t[14]!==i?(N=function(){if(i===`folder`){let e=yv(f.trim());if(e)return{message:`Folder name: ${e}`,field:`folder`}}let e=yv(u.trim());return e?{message:e,field:`file`}:null},t[12]=u,t[13]=f,t[14]=i,t[15]=N):N=t[15];let P=N,F;t[16]!==v||t[17]!==u||t[18]!==f||t[19]!==i?(F=v||!u.trim()||i===`folder`&&!f.trim(),t[16]=v,t[17]=u,t[18]=f,t[19]=i,t[20]=F):F=t[20];let I=F,L;t[21]!==l||t[22]!==M||t[23]!==P||t[24]!==i||t[25]!==c||t[26]!==r?(L=async function(){let e=P();if(e){_(e.message),x(e.field);return}y(!0),_(null),x(null);let t=M();try{let e=await fetch(`/api/create-page`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({path:t})});if(!e.ok){let t=`Server error (HTTP ${e.status})`;try{let n=await e.json();n?.error&&(t=n.error)}catch{}y(!1),_(t),x(`form`);return}let n=await e.json();if(y(!1),!n.ok){_(n.error??`Failed to create ${i}`),x(`form`);return}let a=n.docName??t.replace(/\.(mdx|md)$/,``);r(!1),window.location.hash=`#/${a}`,l(a),nt([`files`,`backlinks`,`graph`]),c?.(a)}catch(e){console.warn(`[NewItemDialog] create failed:`,e),y(!1),_(`Network error — please try again`),x(`form`)}},t[21]=l,t[22]=M,t[23]=P,t[24]=i,t[25]=c,t[26]=r,t[27]=L):L=t[27];let R=L,z=a||`(root)`,B=i===`file`?`New file`:`New folder`,V;t[28]===B?V=t[29]:(V=(0,J.jsx)(Gt,{children:B}),t[28]=B,t[29]=V);let H;t[30]!==s||t[31]!==z?(H=s??(0,J.jsxs)(J.Fragment,{children:[`Create in `,(0,J.jsx)(`span`,{className:`font-medium text-foreground`,children:z})]}),t[30]=s,t[31]=z,t[32]=H):H=t[32];let U;t[33]===H?U=t[34]:(U=(0,J.jsx)(Wt,{children:H}),t[33]=H,t[34]=U);let W;t[35]!==U||t[36]!==V?(W=(0,J.jsxs)(tn,{children:[V,U]}),t[35]=U,t[36]=V,t[37]=W):W=t[37];let ee;t[38]!==g||t[39]!==b||t[40]!==S||t[41]!==C||t[42]!==f||t[43]!==i?(ee=i===`folder`&&(0,J.jsxs)(`div`,{children:[(0,J.jsx)(`label`,{className:`mb-1.5 block text-sm font-medium`,htmlFor:C,children:`Folder name`}),(0,J.jsx)(Ro,{ref:E,id:C,value:f,onChange:e=>{p(e.target.value),_(null)},placeholder:`folder-name`,autoFocus:!0,"aria-describedby":g&&(b===`folder`||b===`form`)?S:void 0,"aria-invalid":g&&(b===`folder`||b===`form`)?!0:void 0,onKeyDown:e=>{if(e.key===`Enter`){e.preventDefault();let t=yv(f.trim());if(t){_(`Folder name: ${t}`),x(`folder`);return}T.current?.focus()}}})]}),t[38]=g,t[39]=b,t[40]=S,t[41]=C,t[42]=f,t[43]=i,t[44]=ee):ee=t[44];let te=i===`folder`?`First file name`:`File name`,ne;t[45]!==w||t[46]!==te?(ne=(0,J.jsx)(`label`,{className:`mb-1.5 block text-sm font-medium`,htmlFor:w,children:te}),t[45]=w,t[46]=te,t[47]=ne):ne=t[47];let re;t[48]===Symbol.for(`react.memo_cache_sentinel`)?(re=e=>A(e.target.value),t[48]=re):re=t[48];let ie=i===`file`,ae=g&&(b===`file`||b===`form`)?S:void 0,oe=g&&(b===`file`||b===`form`)?!0:void 0,se;t[49]!==R||t[50]!==I?(se=e=>{e.key===`Enter`&&!I&&R()},t[49]=R,t[50]=I,t[51]=se):se=t[51];let ce;t[52]!==w||t[53]!==u||t[54]!==ie||t[55]!==ae||t[56]!==oe||t[57]!==se?(ce=(0,J.jsx)(Ro,{ref:T,id:w,value:u,onChange:re,placeholder:`my-note`,autoFocus:ie,"aria-describedby":ae,"aria-invalid":oe,onFocus:Tv,onKeyDown:se,className:`flex-1`}),t[52]=w,t[53]=u,t[54]=ie,t[55]=ae,t[56]=oe,t[57]=se,t[58]=ce):ce=t[58];let le;t[59]===Symbol.for(`react.memo_cache_sentinel`)?(le=e=>{(e===`.md`||e===`.mdx`)&&h(e)},t[59]=le):le=t[59];let ue;t[60]===Symbol.for(`react.memo_cache_sentinel`)?(ue=gv.map(wv),t[60]=ue):ue=t[60];let de;t[61]===m?de=t[62]:(de=(0,J.jsx)(Se,{type:`single`,value:m,onValueChange:le,variant:`outline`,size:`sm`,"aria-label":`File extension`,className:`shrink-0`,children:ue}),t[61]=m,t[62]=de);let fe;t[63]!==ce||t[64]!==de?(fe=(0,J.jsxs)(`div`,{className:`flex items-stretch gap-2`,children:[ce,de]}),t[63]=ce,t[64]=de,t[65]=fe):fe=t[65];let pe;t[66]!==g||t[67]!==S?(pe=g&&(0,J.jsx)(`p`,{id:S,role:`alert`,className:`text-xs text-red-600 dark:text-red-400`,children:g}),t[66]=g,t[67]=S,t[68]=pe):pe=t[68];let me;t[69]!==ne||t[70]!==fe||t[71]!==pe?(me=(0,J.jsxs)(`div`,{children:[ne,fe,pe]}),t[69]=ne,t[70]=fe,t[71]=pe,t[72]=me):me=t[72];let he;t[73]!==ee||t[74]!==me?(he=(0,J.jsx)(Qt,{children:(0,J.jsxs)(`div`,{className:`space-y-3`,children:[ee,me]})}),t[73]=ee,t[74]=me,t[75]=he):he=t[75];let ge;t[76]===r?ge=t[77]:(ge=()=>r(!1),t[76]=r,t[77]=ge);let _e;t[78]!==v||t[79]!==ge?(_e=(0,J.jsx)(Lt,{variant:`outline`,className:`font-mono uppercase`,onClick:ge,disabled:v,children:`Cancel`}),t[78]=v,t[79]=ge,t[80]=_e):_e=t[80];let ve=v?`Creating...`:`Create`,ye;t[81]!==R||t[82]!==I||t[83]!==ve?(ye=(0,J.jsx)(Lt,{onClick:R,disabled:I,children:ve}),t[81]=R,t[82]=I,t[83]=ve,t[84]=ye):ye=t[84];let be;t[85]!==_e||t[86]!==ye?(be=(0,J.jsxs)($t,{children:[_e,ye]}),t[85]=_e,t[86]=ye,t[87]=be):be=t[87];let xe;t[88]!==W||t[89]!==he||t[90]!==be?(xe=(0,J.jsxs)(Xt,{className:`sm:max-w-md`,"data-ok-layer-spawned":``,children:[W,he,be]}),t[88]=W,t[89]=he,t[90]=be,t[91]=xe):xe=t[91];let Ce;return t[92]!==r||t[93]!==n||t[94]!==xe?(Ce=(0,J.jsx)(nn,{open:n,onOpenChange:r,children:xe}),t[92]=r,t[93]=n,t[94]=xe,t[95]=Ce):Ce=t[95],Ce}function wv(e){return(0,J.jsx)(et,{value:e,"aria-label":`Use ${e} extension`,children:e},e)}function Tv(e){return Sv(e.currentTarget)}pt({event:Je(`ok-branch-switched-clear-failed`),branch:ke(),docName:ke(),reason:ke()});async function Ev(e,t){let n=[];for(let[r,i]of e.entries)i.kind===`active`&&i.persistence!==null&&n.push(i.persistence.clearData().catch(e=>{let n={event:`ok-branch-switched-clear-failed`,docName:r,branch:t,reason:e instanceof Error?e.message:String(e)};console.warn(JSON.stringify(n))}));await Promise.all(n),e.clearBufferedUpdates(),e.recycleAllEntries()}function Dv(e){let t=!1;return()=>{t?e():t=!0}}function Ov(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}async function kv(e,t=``){let n;try{n=await fetch(`${t}/api/server-info`,{signal:AbortSignal.timeout(5e3)})}catch{return}if(!n.ok)return;let r;try{r=await n.json()}catch{return}let i=ge.safeParse(r);if(!i.success){console.warn(JSON.stringify({event:`ok-server-info-schema-mismatch`,issues:i.error.issues}));return}if(e.setExpectedServerInstanceId(i.data.serverInstanceId),i.data.currentBranch!==void 0&&e.compareAndUpdateObservedBranch(i.data.currentBranch)&&Ev(e,i.data.currentBranch),i.data.currentDiskAckSVs!==void 0){let t={};for(let[e,n]of Object.entries(i.data.currentDiskAckSVs))try{t[e]=Ov(n)}catch{}e.observeDiskAckBatch(t)}}async function Av(e){let t;try{t=await fetch(`/api/config`,{signal:e,headers:{Accept:`application/json`}})}catch(e){if(e.name===`AbortError`)throw e;return{status:`error`,code:`network`}}if(t.status===404||t.status===501)return{status:`absent`};if(!t.ok)return{status:`error`,code:t.status};let n;try{n=await t.json()}catch{return{status:`error`,code:`invalid-body`}}if(typeof n!=`object`||!n||Array.isArray(n))return{status:`error`,code:`invalid-body`};let r=n;return{status:`ok`,config:{collabUrl:typeof r.collabUrl==`string`?r.collabUrl:null,previewUrl:typeof r.previewUrl==`string`?r.previewUrl:null,port:typeof r.port==`number`?r.port:0}}}function jv(e){return Rv(e,ce)}function Mv(e){return Rv(e,m)}function Nv(e){return Rv(e,f)}function Pv(e){return Rv(e,_t)}function Fv(e){let t=Rv(e,_);if(!t)return null;try{return{docName:t.docName,sv:Iv(t.sv)}}catch{return null}}function Iv(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}function Lv(e,t){let n=Mv(e);if(n){t.onServerInfo?.(n);return}let r=Nv(e);if(r){t.onBranchSwitched?.(r);return}let i=Fv(e);if(i){t.onDiskAck?.(i);return}let a=jv(e);if(a){t.onDerivedView?.(a);return}let o=Pv(e);if(o){t.onConfigValidationRejected?.(o);return}t.onUnknown?.(e)}function Rv(e,t){let n;try{n=JSON.parse(e)}catch{return null}let r=t.safeParse(n);return r.success?r.data:null}function zv(){return typeof location>`u`?`ws://localhost/collab`:`${location.protocol===`https:`?`wss`:`ws`}://${location.host}/collab`}function Bv(e){if(e===void 0)return null;let t=e.okDesktop;return!t||!t.config.collabUrl||t.config.collabUrl.length===0?null:t}function Vv(e){return{collabUrl:e.collabUrl,attempts:0,terminal:!1,lastError:null}}var Hv=2e3,Uv=15e3;function Wv(e){let t=e.terminalAfterMs??3e4,n=e.initialDelayMs??Hv,r=e.maxDelayMs??Uv,i=e.log??{info:console.info,warn:console.warn},a=new AbortController,o=null,s=n,c=0,l=!1,u=!1,d=null,f=e.now(),p=async()=>{c+=1;let n=null;try{let t=await e.fetchConfig(a.signal);t.status===`absent`?(n=e.fallbackUrl(),d=null):t.status===`ok`&&t.config.collabUrl!==null?(n=t.config.collabUrl,d=null):t.status===`ok`?(u||(u=!0,i.info(`[collab-url] ok ui responded but server.lock has no port yet — retrying`)),d={kind:`null-collab`}):t.status===`error`&&(i.warn(`[collab-url] /api/config error (${t.code}) — retrying in ${s}ms`),d={kind:`error`,code:t.code})}catch(e){if(e.name===`AbortError`)return;d={kind:`error`,code:`network`}}if(!l){if(n!==null){e.onStateChange({collabUrl:n,attempts:c,terminal:!1,lastError:null});return}if(e.now()-f>=t){e.onStateChange({collabUrl:null,attempts:c,terminal:!0,lastError:d});return}e.onStateChange({collabUrl:null,attempts:c,terminal:!1,lastError:d}),o=e.setTimeout(()=>{p()},s),s=Math.min(s*2,r)}};return p(),{cancel:()=>{l=!0,a.abort(),o!==null&&(e.clearTimeout(o),o=null)}}}function Gv(){let e=(0,Y.c)(8),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={collabUrl:null,attempts:0,terminal:!1,lastError:null},e[0]=t):t=e[0];let[n,r]=(0,q.useState)(t),i;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(i={token:0},e[1]=i):i=e[1];let a=(0,q.useRef)(i),[o,s]=(0,q.useState)(0),c;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(c=()=>{let e=a.current.token=a.current.token+1,t=Bv(typeof window<`u`?window:void 0);if(t){r(Vv(t.config));let n=t.onProjectSwitched(t=>{e===a.current.token&&r(Vv(t))});return()=>{n()}}let n=Wv({fetchConfig:Av,fallbackUrl:zv,now:Date.now,setTimeout:Yv,clearTimeout:Jv,onStateChange:t=>{e===a.current.token&&r(t)}});return()=>{n.cancel()}},e[2]=c):c=e[2];let l;e[3]===o?l=e[4]:(l=[o],e[3]=o,e[4]=l),(0,q.useEffect)(c,l);let u;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(u=()=>{a.current.token=a.current.token+1,r(qv),s(Kv)},e[5]=u):u=e[5];let d=u,f;return e[6]===n?f=e[7]:(f={...n,retry:d},e[6]=n,e[7]=f),f}function Kv(e){return e+1}function qv(e){return{...e,terminal:!1,lastError:null}}function Jv(e){return globalThis.clearTimeout(e)}function Yv(e,t){return globalThis.setTimeout(e,t)}function Xv(e,t){return t}function Zv(e){try{let t=e.state;return $g.getState(t)?.undoManager??null}catch{return null}}var Qv=Xv(`MAX_CACHE`,10),$v=Xv(`VIEW_COUNT_CACHE_THRESHOLD`,50),ey=Xv(`BYTES_CACHE_THRESHOLD`,8e6);function ty(e){return!(e.viewCount>0&&e.viewCount>=$v||e.bytes>ey)}var ny=new Map,ry=new Map,iy=[],ay=[],oy=new Set,sy=null;function cy(){if(sy)return sy;if(typeof document>`u`||typeof document.createElement!=`function`)return null;let e=document.createElement(`div`);return e.setAttribute(`data-ok-editor-parking`,``),e.style.display=`none`,e.style.position=`absolute`,e.style.left=`-99999px`,sy=e,e}function ly(e){let{docName:t,container:n,factory:r,sizeStats:i}=e;if(i&&!ty(i)){let e=r(n);return X(`ok/cache/miss`,{docName:t,viewCount:i?.viewCount??-1,bytes:i?.bytes??-1,reason:`size-gate`}),{editor:e.editor,ydoc:e.ydoc,ytext:e.ytext,provider:e.provider,scrollTop:0,hadFocus:!1,activeMountKey:t,__uncached:!0}}let a=ny.get(t);if(a){if(X(`ok/cache/reparent-start`,{docName:t,kind:`tiptap`,viewCount:i?.viewCount??-1,bytes:i?.bytes??-1}),_y(a,n),a.activeMountKey=t,yy(iy,t),n.scrollTop=a.scrollTop,a.hadFocus)try{a.editor.commands.focus()}catch{}return X(`ok/cache/reparent-end`,{docName:t,kind:`tiptap`,viewCount:i?.viewCount??-1,bytes:i?.bytes??-1}),X(`ok/cache/hit`,{docName:t,kind:`tiptap`}),i&&X(`ok/cold/editor-mount-stats`,{docName:t,viewCount:i.viewCount,bytes:i.bytes,cacheHit:!0,kind:`tiptap`}),a}for(;ny.size>=Qv;){let e=by(iy,t);if(!e)break;dy(e)}let o=r(n),s={editor:o.editor,ydoc:o.ydoc,ytext:o.ytext,provider:o.provider,scrollTop:0,hadFocus:!1,activeMountKey:t};return ny.set(t,s),yy(iy,t),X(`ok/cache/miss`,{docName:t,viewCount:i?.viewCount??-1,bytes:i?.bytes??-1,reason:`cold`,kind:`tiptap`}),i&&X(`ok/cold/editor-mount-stats`,{docName:t,viewCount:i.viewCount,bytes:i.bytes,cacheHit:!1,kind:`tiptap`}),s}function uy(e){if(e.__uncached){let t=Zv(e.editor);try{e.editor.destroy()}catch{}t&&(t.restore=void 0),e.activeMountKey=null;return}let t=hy(e.editor);if(t){e.hadFocus=gy(t.dom),e.scrollTop=(t.scrollDOM??t.dom.parentElement??t.dom).scrollTop??0;let n=t.dom.parentElement;n&&n.removeChild(t.dom);let r=cy();r&&r.appendChild(t.dom)}e.activeMountKey=null}function dy(e){let t=ny.get(e);if(!t)return!1;let n=Zv(t.editor);try{t.editor.destroy()}catch(t){X(`ok/cache/evict-failed`,{docName:e,kind:`tiptap`,stage:`editor`,message:t instanceof Error?t.message:String(t)})}n&&(n.restore=void 0);try{t.provider.destroy()}catch(t){X(`ok/cache/evict-failed`,{docName:e,kind:`tiptap`,stage:`provider`,message:t instanceof Error?t.message:String(t)})}try{t.ydoc.destroy()}catch(t){X(`ok/cache/evict-failed`,{docName:e,kind:`tiptap`,stage:`ydoc`,message:t instanceof Error?t.message:String(t)})}ny.delete(e);let r=iy.indexOf(e);return r!==-1&&iy.splice(r,1),X(`ok/cache/evict`,{docName:e,kind:`tiptap`}),!0}function fy(e){let{docName:t,container:n,factory:r,sizeStats:i}=e;if(i&&!ty(i)){let e=r(n);return X(`ok/cache/miss`,{docName:t,viewCount:i?.viewCount??-1,bytes:i?.bytes??-1,reason:`size-gate`,kind:`cm`}),{view:e.view,ydoc:e.ydoc,ytext:e.ytext,provider:e.provider,scrollTop:0,hadFocus:!1,activeMountKey:t,__uncached:!0}}let a=ry.get(t);if(a){if(X(`ok/cache/reparent-start`,{docName:t,kind:`cm`,viewCount:i?.viewCount??-1,bytes:i?.bytes??-1}),vy(a,n),a.activeMountKey=t,yy(ay,t),n.scrollTop=a.scrollTop,a.hadFocus)try{a.view.focus()}catch{}return X(`ok/cache/reparent-end`,{docName:t,kind:`cm`,viewCount:i?.viewCount??-1,bytes:i?.bytes??-1}),X(`ok/cache/hit`,{docName:t,kind:`cm`}),i&&X(`ok/cold/editor-mount-stats`,{docName:t,viewCount:i.viewCount,bytes:i.bytes,cacheHit:!0,kind:`cm`}),a}for(;ry.size>=Qv;){let e=by(ay,t);if(!e)break;my(e)}let o=r(n),s={view:o.view,ydoc:o.ydoc,ytext:o.ytext,provider:o.provider,scrollTop:0,hadFocus:!1,activeMountKey:t};return ry.set(t,s),yy(ay,t),X(`ok/cache/miss`,{docName:t,viewCount:i?.viewCount??-1,bytes:i?.bytes??-1,reason:`cold`,kind:`cm`}),i&&X(`ok/cold/editor-mount-stats`,{docName:t,viewCount:i.viewCount,bytes:i.bytes,cacheHit:!1,kind:`cm`}),s}function py(e){if(e.__uncached){try{e.view.destroy()}catch{}e.activeMountKey=null;return}let t=e.view.dom;e.hadFocus=gy(t),e.scrollTop=(e.view.scrollDOM??t).scrollTop??0;let n=t.parentElement;n&&n.removeChild(t);let r=cy();r&&r.appendChild(t),e.activeMountKey=null}function my(e){let t=ry.get(e);if(!t)return!1;try{t.view.destroy()}catch(t){X(`ok/cache/evict-failed`,{docName:e,kind:`cm`,stage:`view`,message:t instanceof Error?t.message:String(t)})}try{t.provider.destroy()}catch(t){X(`ok/cache/evict-failed`,{docName:e,kind:`cm`,stage:`provider`,message:t instanceof Error?t.message:String(t)})}try{t.ydoc.destroy()}catch(t){X(`ok/cache/evict-failed`,{docName:e,kind:`cm`,stage:`ydoc`,message:t instanceof Error?t.message:String(t)})}ry.delete(e);let n=ay.indexOf(e);return n!==-1&&ay.splice(n,1),X(`ok/cache/evict`,{docName:e,kind:`cm`}),!0}function hy(e){return e.editorView??null}function gy(e){if(typeof document>`u`)return!1;let t=document.activeElement;return t?t===e?!0:e.contains(t):!1}function _y(e,t){let n=hy(e.editor);if(!n)return;let r=n.dom,i=r.parentElement;i&&i!==t&&i.removeChild(r),r.parentElement!==t&&t.appendChild(r)}function vy(e,t){let n=e.view.dom,r=n.parentElement;r&&r!==t&&r.removeChild(n),n.parentElement!==t&&t.appendChild(n)}function yy(e,t){let n=e.indexOf(t);n!==-1&&e.splice(n,1),e.push(t)}function by(e,t){for(let n of e)if(n!==t&&!oy.has(n))return n;X(`ok/cache/evict-fallback-activity-saturated`,{mountingDocName:t,lruLength:e.length,activityMountCount:oy.size});for(let n of e)if(n!==t)return n;return null}function xy(e){let t=oy,n=new Set(e);for(let e of t){if(n.has(e))continue;let t=Cy(e);if(t)try{t.disconnect(),X(`ok/cache/disconnect`,{docName:e})}catch(t){X(`ok/cache/disconnect-failed`,{docName:e,message:t instanceof Error?t.message:String(t)})}}for(let e of n){if(t.has(e))continue;let n=Cy(e);if(!n)continue;let r=t=>{X(`ok/cache/connect-failed`,{docName:e,message:t instanceof Error?t.message:String(t)})};try{let t=n.connect();t&&typeof t.then==`function`?t.then(()=>X(`ok/cache/connect`,{docName:e}),e=>r(e)):X(`ok/cache/connect`,{docName:e})}catch(e){r(e)}}oy=n}var Sy=null;function Cy(e){let t=ny.get(e);if(t)return t.provider;let n=ry.get(e);if(n)return n.provider;if(Sy){let t=Sy.entries.get(e);if(t)return t.provider}return null}function wy(e){Sy=e;let t=e.onEvict(e=>{dy(e),my(e)});return()=>{t(),Sy===e&&(Sy=null)}}var Ty=`ok-editor-tabs-v1:`;function Ey(e){return typeof e==`string`&&e.length>0}function Dy(e,t){if(!Array.isArray(e)||t<=0)return[];let n=[],r=new Set;for(let i of e)if(Ey(i)&&!r.has(i)&&(r.add(i),n.push(i),n.length>=t))break;return n}function Oy(e,t,n){let r=Dy(e,n);if(!Ey(t)||r.includes(t))return r;let i=[...r,t];return i.length>n?i.slice(i.length-n):i}function ky(e,t){return e.filter(e=>e!==t)}function Ay(e,t,n){if(t.length===0)return Dy(e,n);let r=new Map(t.map(e=>[e.fromDocName,e.toDocName])),i=[],a=new Set;for(let t of e){let e=r.get(t)??t;if(!a.has(e)&&(a.add(e),i.push(e),i.length>=n))break}return i}function jy(e,t,n){if(t!==n)return t;let r=e.indexOf(n);return r<0?e[0]??null:e[r+1]??e[r-1]??null}function My(e,t){if(typeof e!=`object`||!e)return{openTabs:[],activeDocName:null,updatedAt:null};let n=e,r=Dy(n.openTabs,t);return{openTabs:r,activeDocName:typeof n.activeDocName==`string`&&r.includes(n.activeDocName)?n.activeDocName:null,updatedAt:typeof n.updatedAt==`string`?n.updatedAt:null}}function Ny(e,t,n=()=>new Date){let r=Dy(e,2**53-1);return{openTabs:r,activeDocName:t&&r.includes(t)?t:null,updatedAt:n().toISOString()}}function Py(e){return`${Ty}${e}`}function Fy(e,t,n){if(!e)return{openTabs:[],activeDocName:null,updatedAt:null};try{let r=e.getItem(t);return r?My(JSON.parse(r),n):{openTabs:[],activeDocName:null,updatedAt:null}}catch(e){return console.warn(`[editor-tabs] failed to read local tab session:`,e),{openTabs:[],activeDocName:null,updatedAt:null}}}function Iy(e,t,n){if(e)try{e.setItem(t,JSON.stringify(n))}catch(e){console.warn(`[editor-tabs] failed to write local tab session:`,e)}}var Ly=Math.floor,Ry=(e,t)=>e<t?e:t,zy=(e,t)=>e>t?e:t;Number.isNaN;var By=128,Vy=1<<17,Hy=1<<18,Uy=1<<19,Wy=1<<20,Gy=1<<21,Ky=1<<22,qy=1<<23,Jy=1<<24,Yy=1<<25,Xy=1<<26,Zy=1<<27,Qy=1<<28,$y=1<<29,eb=1<<30,tb=127;Vy-1,Hy-1,Uy-1,Wy-1,Gy-1,Ky-1,qy-1,Jy-1,Yy-1,Xy-1,Zy-1,Qy-1,$y-1,eb-1;var nb=2**53-1;Number.isInteger,Number.isNaN,Number.parseInt;var rb=String.fromCharCode;String.fromCodePoint,rb(65535);var ib=e=>{let t=unescape(encodeURIComponent(e)),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e++)r[e]=t.codePointAt(e);return r},ab=typeof TextEncoder<`u`?new TextEncoder:null,ob=ab?e=>ab.encode(e):ib,sb=typeof TextDecoder>`u`?null:new TextDecoder(`utf-8`,{fatal:!0,ignoreBOM:!0});sb&&sb.decode(new Uint8Array).length===1&&(sb=null);var cb=(e,t)=>{let n=e.cbuf.length;e.cpos===n&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(n*2),e.cpos=0),e.cbuf[e.cpos++]=t},lb=(e,t)=>{for(;t>tb;)cb(e,By|tb&t),t=Ly(t/128);cb(e,tb&t)},ub=new Uint8Array(3e4),db=ub.length/3,fb=ab&&ab.encodeInto?(e,t)=>{if(t.length<db){let n=ab.encodeInto(t,ub).written||0;lb(e,n);for(let t=0;t<n;t++)cb(e,ub[t])}else mb(e,ob(t))}:(e,t)=>{let n=unescape(encodeURIComponent(t)),r=n.length;lb(e,r);for(let t=0;t<r;t++)cb(e,n.codePointAt(t))},pb=(e,t)=>{let n=e.cbuf.length,r=e.cpos,i=Ry(n-r,t.length),a=t.length-i;e.cbuf.set(t.subarray(0,i),r),e.cpos+=i,a>0&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(zy(n*2,a)),e.cbuf.set(t.subarray(i)),e.cpos=a)},mb=(e,t)=>{lb(e,t.byteLength),pb(e,t)},hb=e=>Error(e),gb=hb(`Unexpected end of array`),_b=hb(`Integer out of Range`),vb=(e,t)=>{let n=new Uint8Array(e.arr.buffer,e.pos+e.arr.byteOffset,t);return e.pos+=t,n},yb=e=>vb(e,xb(e)),bb=e=>e.arr[e.pos++],xb=e=>{let t=0,n=1,r=e.arr.length;for(;e.pos<r;){let r=e.arr[e.pos++];if(t+=(r&tb)*n,n*=128,r<By)return t;if(t>nb)throw _b}throw gb},Sb=sb?e=>sb.decode(yb(e)):e=>{let t=xb(e);if(t===0)return``;{let n=String.fromCodePoint(bb(e));if(--t<100)for(;t--;)n+=String.fromCodePoint(bb(e));else for(;t>0;){let r=t<1e4?t:1e4,i=e.arr.subarray(e.pos,e.pos+r);e.pos+=r,n+=String.fromCodePoint.apply(null,i),t-=r}return decodeURIComponent(escape(n))}},Cb=function(e){return e[e.Token=0]=`Token`,e[e.PermissionDenied=1]=`PermissionDenied`,e[e.Authenticated=2]=`Authenticated`,e}({}),wb=(e,t)=>{lb(e,Cb.Token),fb(e,t)},Tb=(e,t,n,r)=>{switch(xb(e)){case Cb.Token:t();break;case Cb.PermissionDenied:n(Sb(e));break;case Cb.Authenticated:r(Sb(e));break;default:}},Eb=e=>Array.from(e.entries()).map(([e,t])=>({clientId:e,...t})),Db=`\0`;function Ob(e,t){return e+Db+t}function kb(e){let t=e.indexOf(Db);return t===-1?{documentName:e,sessionId:null}:{documentName:e.substring(0,t),sessionId:e.substring(t+1)}}var Ab=function(e){return e[e.Connecting=0]=`Connecting`,e[e.Open=1]=`Open`,e[e.Closing=2]=`Closing`,e[e.Closed=3]=`Closed`,e}({});function jb(e){return e||={},{delay:e.delay===void 0?200:e.delay,initialDelay:e.initialDelay===void 0?0:e.initialDelay,minDelay:e.minDelay===void 0?0:e.minDelay,maxDelay:e.maxDelay===void 0?0:e.maxDelay,factor:e.factor===void 0?0:e.factor,maxAttempts:e.maxAttempts===void 0?3:e.maxAttempts,timeout:e.timeout===void 0?0:e.timeout,jitter:e.jitter===!0,initialJitter:e.initialJitter===!0,handleError:e.handleError===void 0?null:e.handleError,handleTimeout:e.handleTimeout===void 0?null:e.handleTimeout,beforeAttempt:e.beforeAttempt===void 0?null:e.beforeAttempt,calculateDelay:e.calculateDelay===void 0?null:e.calculateDelay}}async function Mb(e){return new Promise(t=>setTimeout(t,e))}function Nb(e,t){let n=t.delay;if(n===0)return 0;if(t.factor&&(n*=t.factor**(e.attemptNum-1),t.maxDelay!==0&&(n=Math.min(n,t.maxDelay))),t.jitter){let e=Math.ceil(t.minDelay);n=Math.floor(Math.random()*(Math.floor(n)-e+1))+e}return Math.round(n)}async function Pb(e,t){let n=jb(t);for(let e of[`delay`,`initialDelay`,`minDelay`,`maxDelay`,`maxAttempts`,`timeout`]){let t=n[e];if(!Number.isInteger(t)||t<0)throw Error(`Value for ${e} must be an integer greater than or equal to 0`)}if(n.factor.constructor!==Number||n.factor<0)throw Error(`Value for factor must be a number greater than or equal to 0`);if(n.delay<n.minDelay)throw Error(`delay cannot be less than minDelay (delay: ${n.delay}, minDelay: ${n.minDelay}`);let r={attemptNum:0,attemptsRemaining:n.maxAttempts?n.maxAttempts:-1,aborted:!1,abort(){r.aborted=!0}},i=n.calculateDelay||Nb;async function a(){if(n.beforeAttempt&&n.beforeAttempt(r,n),r.aborted){let e=Error(`Attempt aborted`);throw e.code=`ATTEMPT_ABORTED`,e}let t=async e=>{if(n.handleError&&await n.handleError(e,r,n),r.aborted||r.attemptsRemaining===0)throw e;r.attemptNum++;let t=i(r,n);return t&&await Mb(t),a()};return r.attemptsRemaining>0&&r.attemptsRemaining--,n.timeout?new Promise((i,a)=>{let o=setTimeout(()=>{if(n.handleTimeout)try{i(n.handleTimeout(r,n))}catch(e){a(e)}else{let e=Error(`Retry timeout (attemptNum: ${r.attemptNum}, timeout: ${n.timeout})`);e.code=`ATTEMPT_TIMEOUT`,a(e)}},n.timeout);e(r,n).then(e=>{clearTimeout(o),i(e)}).catch(e=>{clearTimeout(o),t(e).then(i).catch(a)})}):e(r,n).catch(t)}let o=n.calculateDelay?n.calculateDelay(r,n):n.initialDelay;if(o&&await Mb(o),r.attemptNum<1&&n.initialJitter){let e=i(r,n);e&&await Mb(e)}return a()}var Fb=Math.floor,Ib=(e,t)=>e<t?e:t,Lb=(e,t)=>e>t?e:t;Number.isNaN;var Rb=64,zb=128,Bb=1<<17,Vb=1<<18,Hb=1<<19,Ub=1<<20,Wb=1<<21,Gb=1<<22,Kb=1<<23,qb=1<<24,Jb=1<<25,Yb=1<<26,Xb=1<<27,Zb=1<<28,Qb=1<<29,$b=1<<30,ex=63,tx=127;Bb-1,Vb-1,Hb-1,Ub-1,Wb-1,Gb-1,Kb-1,qb-1,Jb-1,Yb-1,Xb-1,Zb-1,Qb-1,$b-1;var nx=2**53-1;Number.isInteger,Number.isNaN,Number.parseInt;var rx=()=>new Set,ix=Array.from;Array.isArray;var ax=String.fromCharCode;String.fromCodePoint,ax(65535);var ox=e=>{let t=unescape(encodeURIComponent(e)),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e++)r[e]=t.codePointAt(e);return r},sx=typeof TextEncoder<`u`?new TextEncoder:null,cx=sx?e=>sx.encode(e):ox,lx=typeof TextDecoder>`u`?null:new TextDecoder(`utf-8`,{fatal:!0,ignoreBOM:!0});lx&&lx.decode(new Uint8Array).length===1&&(lx=null);var ux=class{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}},dx=()=>new ux,fx=e=>{let t=e.cpos;for(let n=0;n<e.bufs.length;n++)t+=e.bufs[n].length;return t},px=e=>{let t=new Uint8Array(fx(e)),n=0;for(let r=0;r<e.bufs.length;r++){let i=e.bufs[r];t.set(i,n),n+=i.length}return t.set(new Uint8Array(e.cbuf.buffer,0,e.cpos),n),t},mx=(e,t)=>{let n=e.cbuf.length;e.cpos===n&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(n*2),e.cpos=0),e.cbuf[e.cpos++]=t},hx=(e,t)=>{for(;t>tx;)mx(e,zb|tx&t),t=Fb(t/128);mx(e,tx&t)},gx=new Uint8Array(3e4),_x=gx.length/3,vx=sx&&sx.encodeInto?(e,t)=>{if(t.length<_x){let n=sx.encodeInto(t,gx).written||0;hx(e,n);for(let t=0;t<n;t++)mx(e,gx[t])}else bx(e,cx(t))}:(e,t)=>{let n=unescape(encodeURIComponent(t)),r=n.length;hx(e,r);for(let t=0;t<r;t++)mx(e,n.codePointAt(t))},yx=(e,t)=>{let n=e.cbuf.length,r=e.cpos,i=Ib(n-r,t.length),a=t.length-i;e.cbuf.set(t.subarray(0,i),r),e.cpos+=i,a>0&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(Lb(n*2,a)),e.cbuf.set(t.subarray(i)),e.cpos=a)},bx=(e,t)=>{hx(e,t.byteLength),yx(e,t)},xx=e=>Error(e),Sx=xx(`Unexpected end of array`),Cx=xx(`Integer out of Range`),wx=class{constructor(e){this.arr=e,this.pos=0}},Tx=e=>new wx(e),Ex=(e,t)=>{let n=new Uint8Array(e.arr.buffer,e.pos+e.arr.byteOffset,t);return e.pos+=t,n},Dx=e=>Ex(e,kx(e)),Ox=e=>e.arr[e.pos++],kx=e=>{let t=0,n=1,r=e.arr.length;for(;e.pos<r;){let r=e.arr[e.pos++];if(t+=(r&tx)*n,n*=128,r<zb)return t;if(t>nx)throw Cx}throw Sx},Ax=e=>{let t=e.arr[e.pos++],n=t&ex,r=64,i=(t&Rb)>0?-1:1;if((t&zb)===0)return i*n;let a=e.arr.length;for(;e.pos<a;){if(t=e.arr[e.pos++],n+=(t&tx)*r,r*=128,t<zb)return i*n;if(n>nx)throw Cx}throw Sx},jx=lx?e=>lx.decode(Dx(e)):e=>{let t=kx(e);if(t===0)return``;{let n=String.fromCodePoint(Ox(e));if(--t<100)for(;t--;)n+=String.fromCodePoint(Ox(e));else for(;t>0;){let r=t<1e4?t:1e4,i=e.arr.subarray(e.pos,e.pos+r);e.pos+=r,n+=String.fromCodePoint.apply(null,i),t-=r}return decodeURIComponent(escape(n))}},Mx=e=>{let t=e.pos,n=jx(e);return e.pos=t,n},Nx=Date.now,Px=()=>new Map,Fx=(e,t,n)=>{let r=e.get(t);return r===void 0&&e.set(t,r=n()),r},Ix=class{constructor(){this._observers=Px()}on(e,t){Fx(this._observers,e,rx).add(t)}once(e,t){let n=(...r)=>{this.off(e,n),t(...r)};this.on(e,n)}off(e,t){let n=this._observers.get(e);n!==void 0&&(n.delete(t),n.size===0&&this._observers.delete(e))}emit(e,t){return ix((this._observers.get(e)||Px()).values()).forEach(e=>e(...t))}destroy(){this._observers=Px()}},Lx=Symbol(`Equality`),Rx=Object.keys,zx=e=>Rx(e).length,Bx=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Vx=(e,t)=>{if(e===t)return!0;if(e==null||t==null||e.constructor!==t.constructor&&(e.constructor||Object)!==(t.constructor||Object))return!1;if(e[Lx]!=null)return e[Lx](t);switch(e.constructor){case ArrayBuffer:e=new Uint8Array(e),t=new Uint8Array(t);case Uint8Array:if(e.byteLength!==t.byteLength)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;break;case Set:if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;break;case Map:if(e.size!==t.size)return!1;for(let n of e.keys())if(!t.has(n)||!Vx(e.get(n),t.get(n)))return!1;break;case void 0:case Object:if(zx(e)!==zx(t))return!1;for(let n in e)if(!Bx(e,n)||!Vx(e[n],t[n]))return!1;break;case Array:if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!Vx(e[n],t[n]))return!1;break;default:return!1}return!0},Hx=3e4,Ux=class extends Ix{constructor(e){super(),this.doc=e,this.clientID=e.clientID,this.states=new Map,this.meta=new Map,this._checkInterval=setInterval(()=>{let e=Nx();this.getLocalState()!==null&&Hx/2<=e-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());let t=[];this.meta.forEach((n,r)=>{r!==this.clientID&&Hx<=e-n.lastUpdated&&this.states.has(r)&&t.push(r)}),t.length>0&&Wx(this,t,`timeout`)},Fb(Hx/10)),e.on(`destroy`,()=>{this.destroy()}),this.setLocalState({})}destroy(){this.emit(`destroy`,[this]),this.setLocalState(null),super.destroy(),clearInterval(this._checkInterval)}getLocalState(){return this.states.get(this.clientID)||null}setLocalState(e){let t=this.clientID,n=this.meta.get(t),r=n===void 0?0:n.clock+1,i=this.states.get(t);e===null?this.states.delete(t):this.states.set(t,e),this.meta.set(t,{clock:r,lastUpdated:Nx()});let a=[],o=[],s=[],c=[];e===null?c.push(t):i==null?e!=null&&a.push(t):(o.push(t),Vx(i,e)||s.push(t)),(a.length>0||s.length>0||c.length>0)&&this.emit(`change`,[{added:a,updated:s,removed:c},`local`]),this.emit(`update`,[{added:a,updated:o,removed:c},`local`])}setLocalStateField(e,t){let n=this.getLocalState();n!==null&&this.setLocalState({...n,[e]:t})}getStates(){return this.states}},Wx=(e,t,n)=>{let r=[];for(let n=0;n<t.length;n++){let i=t[n];if(e.states.has(i)){if(e.states.delete(i),i===e.clientID){let t=e.meta.get(i);e.meta.set(i,{clock:t.clock+1,lastUpdated:Nx()})}r.push(i)}}r.length>0&&(e.emit(`change`,[{added:[],updated:[],removed:r},n]),e.emit(`update`,[{added:[],updated:[],removed:r},n]))},Gx=(e,t,n=e.states)=>{let r=t.length,i=dx();hx(i,r);for(let a=0;a<r;a++){let r=t[a],o=n.get(r)||null,s=e.meta.get(r).clock;hx(i,r),hx(i,s),vx(i,JSON.stringify(o))}return px(i)},Kx=(e,t,n)=>{let r=Tx(t),i=Nx(),a=[],o=[],s=[],c=[],l=kx(r);for(let t=0;t<l;t++){let t=kx(r),n=kx(r),l=JSON.parse(jx(r)),u=e.meta.get(t),d=e.states.get(t),f=u===void 0?0:u.clock;(f<n||f===n&&l===null&&e.states.has(t))&&(l===null?t===e.clientID&&e.getLocalState()!=null?n++:e.states.delete(t):e.states.set(t,l),e.meta.set(t,{clock:n,lastUpdated:i}),u===void 0&&l!==null?a.push(t):u!==void 0&&l===null?c.push(t):l!==null&&(Vx(l,d)||s.push(t),o.push(t)))}(a.length>0||s.length>0||c.length>0)&&e.emit(`change`,[{added:a,updated:s,removed:c},n]),(a.length>0||o.length>0||c.length>0)&&e.emit(`update`,[{added:a,updated:o,removed:c},n])},qx=class{constructor(){this.callbacks={}}on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){let n=this.callbacks[e];return n&&n.forEach(e=>e.apply(this,t)),this}off(e,t){let n=this.callbacks[e];return n&&(t?this.callbacks[e]=n.filter(e=>e!==t):delete this.callbacks[e]),this}removeAllListeners(){this.callbacks={}}},Jx=class{constructor(e){this.data=e,this.encoder=dx(),this.decoder=Tx(new Uint8Array(this.data))}peekVarString(){return Mx(this.decoder)}readVarUint(){return kx(this.decoder)}readVarString(){return jx(this.decoder)}readVarUint8Array(){return Dx(this.decoder)}writeVarUint(e){return hx(this.encoder,e)}writeVarString(e){return vx(this.encoder,e)}writeVarUint8Array(e){return bx(this.encoder,e)}length(){return fx(this.encoder)}},Yx=function(e){return e[e.Sync=0]=`Sync`,e[e.Awareness=1]=`Awareness`,e[e.Auth=2]=`Auth`,e[e.QueryAwareness=3]=`QueryAwareness`,e[e.Stateless=5]=`Stateless`,e[e.CLOSE=7]=`CLOSE`,e[e.SyncStatus=8]=`SyncStatus`,e[e.Ping=9]=`Ping`,e[e.Pong=10]=`Pong`,e}({}),Xx=function(e){return e.Connecting=`connecting`,e.Connected=`connected`,e.Disconnected=`disconnected`,e}({}),Zx=class{constructor(){this.encoder=dx()}get(e){return e.encoder}toUint8Array(){return px(this.encoder)}},Qx=class extends Zx{constructor(...e){super(...e),this.type=Yx.CLOSE,this.description=`Ask the server to close the connection`}get(e){return vx(this.encoder,e.documentName),hx(this.encoder,this.type),this.encoder}},$x=class e extends qx{static{this.DEDUPLICATABLE_TYPES=new Set([Yx.Awareness,Yx.QueryAwareness])}constructor(e){super(),this.messageQueue=[],this.configuration={url:``,autoConnect:!0,preserveTrailingSlash:!1,document:void 0,WebSocketPolyfill:void 0,messageReconnectTimeout:3e4,delay:1e3,initialDelay:0,factor:2,maxAttempts:0,minDelay:1e3,maxDelay:3e4,jitter:!0,timeout:0,onOpen:()=>null,onConnect:()=>null,onMessage:()=>null,onOutgoingMessage:()=>null,onStatus:()=>null,onDisconnect:()=>null,onClose:()=>null,onDestroy:()=>null,onAwarenessUpdate:()=>null,onAwarenessChange:()=>null,handleTimeout:null,providerMap:new Map},this.webSocket=null,this.webSocketHandlers={},this.shouldConnect=!0,this.status=Xx.Disconnected,this.lastMessageReceived=0,this.identifier=0,this.intervals={connectionChecker:null},this.connectionAttempt=null,this.receivedOnOpenPayload=void 0,this.closeTries=0,this.setConfiguration(e),this.configuration.WebSocketPolyfill=e.WebSocketPolyfill?e.WebSocketPolyfill:WebSocket,this.on(`open`,this.configuration.onOpen),this.on(`open`,this.onOpen.bind(this)),this.on(`connect`,this.configuration.onConnect),this.on(`message`,this.configuration.onMessage),this.on(`outgoingMessage`,this.configuration.onOutgoingMessage),this.on(`status`,this.configuration.onStatus),this.on(`disconnect`,this.configuration.onDisconnect),this.on(`close`,this.configuration.onClose),this.on(`destroy`,this.configuration.onDestroy),this.on(`awarenessUpdate`,this.configuration.onAwarenessUpdate),this.on(`awarenessChange`,this.configuration.onAwarenessChange),this.on(`close`,this.onClose.bind(this)),this.on(`message`,this.onMessage.bind(this)),this.intervals.connectionChecker=setInterval(this.checkConnection.bind(this),this.configuration.messageReconnectTimeout/10),this.shouldConnect&&this.connect()}async onOpen(e){this.status=Xx.Connected,this.emit(`status`,{status:Xx.Connected}),this.cancelWebsocketRetry=void 0,this.receivedOnOpenPayload=e}attach(e){let t=e.effectiveName,n=this.configuration.providerMap.get(t);if(n&&n!==e&&n.isAuthenticated)throw Error(`Cannot attach two providers with the same effective name "${t}". Use sessionAwareness: true to multiplex providers with the same document name.`);this.configuration.providerMap.set(t,e),this.status===Xx.Disconnected&&this.shouldConnect&&this.connect(),this.receivedOnOpenPayload&&this.status===Xx.Connected&&e.onOpen(this.receivedOnOpenPayload)}detach(e){let t=e.effectiveName;this.configuration.providerMap.has(t)&&(e.send(Qx,{documentName:t}),this.configuration.providerMap.delete(t))}setConfiguration(e={}){this.configuration={...this.configuration,...e},this.configuration.autoConnect||(this.shouldConnect=!1)}async connect(){if(this.status===Xx.Connected)return;this.cancelWebsocketRetry&&=(this.cancelWebsocketRetry(),void 0),this.receivedOnOpenPayload=void 0,this.shouldConnect=!0;let{retryPromise:e,cancelFunc:t}=(()=>{let e=!1;return{retryPromise:Pb(this.createWebSocketConnection.bind(this),{delay:this.configuration.delay,initialDelay:this.configuration.initialDelay,factor:this.configuration.factor,maxAttempts:this.configuration.maxAttempts,minDelay:this.configuration.minDelay,maxDelay:this.configuration.maxDelay,jitter:this.configuration.jitter,timeout:this.configuration.timeout,handleTimeout:this.configuration.handleTimeout,beforeAttempt:t=>{(!this.shouldConnect||e)&&t.abort()}}).catch(e=>{if(e&&e.code!==`ATTEMPT_ABORTED`)throw e}),cancelFunc:()=>{e=!0}}})();return this.cancelWebsocketRetry=t,e}attachWebSocketListeners(e,t){let{identifier:n}=e,r=e=>this.emit(`message`,e),i=e=>this.emit(`close`,{event:e}),a=e=>this.emit(`open`,e),o=e=>{t(e)};this.webSocketHandlers[n]={message:r,close:i,open:a,error:o};let s=this.webSocketHandlers[e.identifier];Object.keys(s).forEach(t=>{e.addEventListener(t,s[t])})}cleanupWebSocket(){if(!this.webSocket)return;let{identifier:e}=this.webSocket,t=this.webSocketHandlers[e];Object.keys(t).forEach(n=>{this.webSocket?.removeEventListener(n,t[n]),delete this.webSocketHandlers[e]}),this.webSocket.close(),this.webSocket=null}createWebSocketConnection(){return new Promise((e,t)=>{this.webSocket&&(this.messageQueue=[],this.cleanupWebSocket()),this.lastMessageReceived=0,this.identifier+=1;let n=new this.configuration.WebSocketPolyfill(this.url);n.binaryType=`arraybuffer`,n.identifier=this.identifier,this.attachWebSocketListeners(n,t),this.webSocket=n,this.status=Xx.Connecting,this.emit(`status`,{status:Xx.Connecting}),this.connectionAttempt={resolve:e,reject:t}})}onMessage(e){this.resolveConnectionAttempt(),this.lastMessageReceived=Nx();let t=new Uint8Array(e.data);if(t.length===1&&t[0]===Yx.Ping){this.sendPong();return}let n=new Jx(t).peekVarString();this.configuration.providerMap.get(n)?.onMessage(e)}sendPong(){let e=dx();hx(e,Yx.Pong),this.send(px(e))}resolveConnectionAttempt(){this.connectionAttempt&&(this.connectionAttempt.resolve(),this.connectionAttempt=null,this.status=Xx.Connected,this.emit(`status`,{status:Xx.Connected}),this.emit(`connect`),this.messageQueue.forEach(e=>this.send(e)),this.messageQueue=[])}stopConnectionAttempt(){this.connectionAttempt=null}rejectConnectionAttempt(){this.connectionAttempt?.reject(),this.connectionAttempt=null}checkConnection(){this.status===Xx.Connected&&this.lastMessageReceived&&(this.configuration.messageReconnectTimeout>=Nx()-this.lastMessageReceived||(this.closeTries+=1,this.closeTries>2?(this.onClose({event:{code:4408,reason:`forced`}}),this.closeTries=0):(this.webSocket?.close(),this.messageQueue=[])))}get serverUrl(){if(this.configuration.preserveTrailingSlash)return this.configuration.url;let e=this.configuration.url;for(;e[e.length-1]===`/`;)e=e.slice(0,e.length-1);return e}get url(){return this.serverUrl}disconnect(){if(this.shouldConnect=!1,this.webSocket!==null)try{this.webSocket.close(),this.messageQueue=[]}catch(e){console.error(e)}}parseQueuedMessage(e){try{let t=Tx(e);return{documentName:jx(t),messageType:kx(t)}}catch{return null}}addToQueue(t){if(t instanceof Uint8Array){let n=this.parseQueuedMessage(t);n&&e.DEDUPLICATABLE_TYPES.has(n.messageType)&&(this.messageQueue=this.messageQueue.filter(e=>{if(!(e instanceof Uint8Array))return!0;let t=this.parseQueuedMessage(e);return t?!(t.documentName===n.documentName&&t.messageType===n.messageType):!0}))}this.messageQueue.push(t)}send(e){this.webSocket?.readyState===Ab.Open?this.webSocket.send(e):this.addToQueue(e)}onClose({event:e}){this.closeTries=0,this.cleanupWebSocket(),this.connectionAttempt&&this.rejectConnectionAttempt(),this.status=Xx.Disconnected,this.emit(`status`,{status:Xx.Disconnected}),this.emit(`disconnect`,{event:e}),!this.cancelWebsocketRetry&&this.shouldConnect&&setTimeout(()=>{this.connect()},this.configuration.delay)}destroy(){this.emit(`destroy`),clearInterval(this.intervals.connectionChecker),this.stopConnectionAttempt(),this.disconnect(),this.removeAllListeners(),this.cleanupWebSocket()}},eS=0,tS=1,nS=2,rS=(e,t)=>{hx(e,eS),bx(e,jp(t))},iS=(e,t,n)=>{hx(e,tS),bx(e,Tp(t,n))},aS=(e,t,n)=>iS(t,n,Dx(e)),oS=(e,t,n,r)=>{try{Sp(t,Dx(e),n)}catch(e){r?.(e),console.error(`Caught error while handling a Yjs update`,e)}},sS=(e,t)=>{hx(e,nS),bx(e,t)},cS=oS,lS=(e,t,n,r,i)=>{let a=kx(e);switch(a){case eS:aS(e,t,n);break;case tS:oS(e,n,r,i);break;case nS:cS(e,n,r,i);break;default:throw Error(`Unknown message type`)}return a},uS=class{constructor(e){this.message=e}apply(e,t){let{message:n}=this,r=n.readVarUint(),i=n.length();switch(r){case Yx.Sync:this.applySyncMessage(e,t);break;case Yx.Awareness:this.applyAwarenessMessage(e);break;case Yx.Auth:this.applyAuthMessage(e);break;case Yx.QueryAwareness:this.applyQueryAwarenessMessage(e);break;case Yx.Stateless:e.receiveStateless(jx(n.decoder));break;case Yx.SyncStatus:this.applySyncStatusMessage(e,Ax(n.decoder)===1);break;case Yx.CLOSE:let i={code:1e3,reason:jx(n.decoder)};e.onClose(),e.configuration.onClose({event:i}),e.forwardClose({event:i});break;default:console.error(`Can’t apply message of unknown type: ${r}`)}n.length()>i+1&&e.send(Zx,{encoder:n.encoder})}applySyncMessage(e,t){let{message:n}=this;n.writeVarUint(Yx.Sync);let r=lS(n.decoder,n.encoder,e.document,e);t&&r===tS&&(e.synced=!0)}applySyncStatusMessage(e,t){t&&e.decrementUnsyncedChanges()}applyAwarenessMessage(e){if(!e.awareness)return;let{message:t}=this;Kx(e.awareness,t.readVarUint8Array(),e)}applyAuthMessage(e){let{message:t}=this;Tb(t.decoder,e.sendToken.bind(e),e.permissionDeniedHandler.bind(e),e.authenticatedHandler.bind(e))}applyQueryAwarenessMessage(e){if(!e.awareness)return;let{message:t}=this;t.writeVarUint(Yx.Awareness),t.writeVarUint8Array(Gx(e.awareness,Array.from(e.awareness.getStates().keys())))}},dS=class{constructor(e,t={}){this.message=new e,this.encoder=this.message.get(t)}create(){return px(this.encoder)}send(e){e?.send(this.create())}},fS=`4.0.0-rc.1`,pS=class extends Zx{constructor(...e){super(...e),this.type=Yx.Auth,this.description=`Authentication`}get(e){if(e.token===void 0)throw Error("The authentication message requires `token` as an argument.");return vx(this.encoder,e.documentName),hx(this.encoder,this.type),wb(this.encoder,e.token),vx(this.encoder,fS),this.encoder}},mS=class extends Zx{constructor(...e){super(...e),this.type=Yx.Awareness,this.description=`Awareness states update`}get(e){if(e.awareness===void 0)throw Error(`The awareness message requires awareness as an argument`);if(e.clients===void 0)throw Error(`The awareness message requires clients as an argument`);vx(this.encoder,e.documentName),hx(this.encoder,this.type);let t;return t=e.states===void 0?Gx(e.awareness,e.clients):Gx(e.awareness,e.clients,e.states),bx(this.encoder,t),this.encoder}},hS=class extends Zx{constructor(...e){super(...e),this.type=Yx.Stateless,this.description=`A stateless message`}get(e){return vx(this.encoder,e.documentName),hx(this.encoder,this.type),vx(this.encoder,e.payload??``),this.encoder}},gS=class extends Zx{constructor(...e){super(...e),this.type=Yx.Sync,this.description=`First sync step`}get(e){if(e.document===void 0)throw Error(`The sync step one message requires document as an argument`);return vx(this.encoder,e.documentName),hx(this.encoder,this.type),rS(this.encoder,e.document),this.encoder}},_S=class extends Zx{constructor(...e){super(...e),this.type=Yx.Sync,this.description=`A document update`}get(e){return vx(this.encoder,e.documentName),hx(this.encoder,this.type),sS(this.encoder,e.update),this.encoder}},vS=class extends Error{constructor(...e){super(...e),this.code=1001}},yS=class extends qx{get effectiveName(){return this.configuration.sessionAwareness?Ob(this.configuration.name,this.sessionId):this.configuration.name}constructor(e){super(),this.configuration={name:``,document:void 0,awareness:void 0,token:null,sessionAwareness:!0,forceSyncInterval:!1,onAuthenticated:()=>null,onAuthenticationFailed:()=>null,onOpen:()=>null,onConnect:()=>null,onMessage:()=>null,onOutgoingMessage:()=>null,onSynced:()=>null,onStatus:()=>null,onDisconnect:()=>null,onClose:()=>null,onDestroy:()=>null,onAwarenessUpdate:()=>null,onAwarenessChange:()=>null,onStateless:()=>null,onUnsyncedChanges:()=>null},this.isSynced=!1,this.unsyncedChanges=0,this.isAuthenticated=!1,this.authorizedScope=void 0,this.manageSocket=!1,this._isAttached=!1,this.sessionId=Math.random().toString(36).slice(2),this.intervals={forceSync:null},this.boundDocumentUpdateHandler=this.documentUpdateHandler.bind(this),this.boundAwarenessUpdateHandler=this.awarenessUpdateHandler.bind(this),this.boundPageHide=this.pageHide.bind(this),this.boundOnOpen=this.onOpen.bind(this),this.boundOnClose=this.onClose.bind(this),this.forwardConnect=()=>this.emit(`connect`),this.forwardStatus=e=>this.emit(`status`,e),this.forwardClose=e=>this.emit(`close`,e),this.forwardDisconnect=e=>this.emit(`disconnect`,e),this.forwardDestroy=()=>this.emit(`destroy`),this.setConfiguration(e),this.configuration.document=e.document?e.document:new op,this.configuration.awareness=e.awareness===void 0?new Ux(this.document):e.awareness,this.on(`open`,this.configuration.onOpen),this.on(`message`,this.configuration.onMessage),this.on(`outgoingMessage`,this.configuration.onOutgoingMessage),this.on(`synced`,this.configuration.onSynced),this.on(`destroy`,this.configuration.onDestroy),this.on(`awarenessUpdate`,this.configuration.onAwarenessUpdate),this.on(`awarenessChange`,this.configuration.onAwarenessChange),this.on(`stateless`,this.configuration.onStateless),this.on(`unsyncedChanges`,this.configuration.onUnsyncedChanges),this.on(`authenticated`,this.configuration.onAuthenticated),this.on(`authenticationFailed`,this.configuration.onAuthenticationFailed),this.awareness?.on(`update`,()=>{this.emit(`awarenessUpdate`,{states:Eb(this.awareness.getStates())})}),this.awareness?.on(`change`,()=>{this.emit(`awarenessChange`,{states:Eb(this.awareness.getStates())})}),this.document.on(`update`,this.boundDocumentUpdateHandler),this.awareness?.on(`update`,this.boundAwarenessUpdateHandler),this.registerEventListeners(),this.configuration.forceSyncInterval&&typeof this.configuration.forceSyncInterval==`number`&&(this.intervals.forceSync=setInterval(this.forceSync.bind(this),this.configuration.forceSyncInterval)),this.manageSocket&&this.attach()}setConfiguration(e={}){e.websocketProvider||(this.manageSocket=!0,this.configuration.websocketProvider=new $x(e)),this.configuration={...this.configuration,...e}}get document(){return this.configuration.document}get isAttached(){return this._isAttached}get awareness(){return this.configuration.awareness}get hasUnsyncedChanges(){return this.unsyncedChanges>0}resetUnsyncedChanges(){this.unsyncedChanges=1,this.emit(`unsyncedChanges`,{number:this.unsyncedChanges})}incrementUnsyncedChanges(){this.unsyncedChanges+=1,this.emit(`unsyncedChanges`,{number:this.unsyncedChanges})}decrementUnsyncedChanges(){this.unsyncedChanges>0&&--this.unsyncedChanges,this.unsyncedChanges===0&&(this.synced=!0),this.emit(`unsyncedChanges`,{number:this.unsyncedChanges})}forceSync(){this.resetUnsyncedChanges(),this.send(gS,{document:this.document,documentName:this.effectiveName})}pageHide(){this.awareness&&Wx(this.awareness,[this.document.clientID],`page hide`)}registerEventListeners(){typeof window>`u`||!(`addEventListener`in window)||window.addEventListener(`pagehide`,this.boundPageHide)}sendStateless(e){this.send(hS,{documentName:this.effectiveName,payload:e})}async sendToken(){let e;try{e=await this.getToken()}catch(e){this.permissionDeniedHandler(`Failed to get token during sendToken(): ${e}`);return}this.send(pS,{token:e??``,documentName:this.effectiveName})}documentUpdateHandler(e,t){t!==this&&(this.incrementUnsyncedChanges(),this.send(_S,{update:e,documentName:this.effectiveName}))}awarenessUpdateHandler({added:e,updated:t,removed:n},r){let i=e.concat(t).concat(n);this.send(mS,{awareness:this.awareness,clients:i,documentName:this.effectiveName})}get synced(){return this.isSynced}set synced(e){this.isSynced!==e&&(this.isSynced=e,e&&this.emit(`synced`,{state:e}))}receiveStateless(e){this.emit(`stateless`,{payload:e})}async connect(){if(this.manageSocket)return this.configuration.websocketProvider.connect();console.warn(`HocuspocusProvider::connect() is deprecated and does not do anything. Please connect/disconnect on the websocketProvider, or attach/deattach providers.`)}disconnect(){if(this.manageSocket)return this.configuration.websocketProvider.disconnect();console.warn(`HocuspocusProvider::disconnect() is deprecated and does not do anything. Please connect/disconnect on the websocketProvider, or attach/deattach providers.`)}async onOpen(e){this.isAuthenticated=!1,this.emit(`open`,{event:e}),await this.sendToken(),this.startSync()}async getToken(){return typeof this.configuration.token==`function`?await this.configuration.token():this.configuration.token}startSync(){this.resetUnsyncedChanges(),this.send(gS,{document:this.document,documentName:this.effectiveName}),this.awareness&&this.awareness.getLocalState()!==null&&this.send(mS,{awareness:this.awareness,clients:[this.document.clientID],documentName:this.effectiveName})}send(e,t){if(!this._isAttached)return;let n=new dS(e,t);this.emit(`outgoingMessage`,{message:n.message}),n.send(this.configuration.websocketProvider)}onMessage(e){let t=new Jx(e.data),{documentName:n}=kb(t.readVarString());t.writeVarString(this.effectiveName),this.emit(`message`,{event:e,message:new Jx(e.data)}),new uS(t).apply(this,!0)}onClose(){this.isAuthenticated=!1,this.synced=!1,this.awareness&&Wx(this.awareness,Array.from(this.awareness.getStates().keys()).filter(e=>e!==this.document.clientID),this)}destroy(){this.emit(`destroy`),this.intervals.forceSync&&clearInterval(this.intervals.forceSync),this.awareness&&(Wx(this.awareness,[this.document.clientID],`provider destroy`),this.awareness.off(`update`,this.boundAwarenessUpdateHandler),this.awareness.destroy()),this.document.off(`update`,this.boundDocumentUpdateHandler),this.removeAllListeners(),this.detach(),this.manageSocket&&this.configuration.websocketProvider.destroy(),!(typeof window>`u`||!(`removeEventListener`in window))&&window.removeEventListener(`pagehide`,this.boundPageHide)}detach(){this.configuration.websocketProvider.off(`connect`,this.configuration.onConnect),this.configuration.websocketProvider.off(`connect`,this.forwardConnect),this.configuration.websocketProvider.off(`status`,this.forwardStatus),this.configuration.websocketProvider.off(`status`,this.configuration.onStatus),this.configuration.websocketProvider.off(`open`,this.boundOnOpen),this.configuration.websocketProvider.off(`close`,this.boundOnClose),this.configuration.websocketProvider.off(`close`,this.configuration.onClose),this.configuration.websocketProvider.off(`close`,this.forwardClose),this.configuration.websocketProvider.off(`disconnect`,this.configuration.onDisconnect),this.configuration.websocketProvider.off(`disconnect`,this.forwardDisconnect),this.configuration.websocketProvider.off(`destroy`,this.configuration.onDestroy),this.configuration.websocketProvider.off(`destroy`,this.forwardDestroy),this.configuration.websocketProvider.detach(this),this._isAttached=!1}attach(){this._isAttached||=(this.configuration.websocketProvider.on(`connect`,this.configuration.onConnect),this.configuration.websocketProvider.on(`connect`,this.forwardConnect),this.configuration.websocketProvider.on(`status`,this.configuration.onStatus),this.configuration.websocketProvider.on(`status`,this.forwardStatus),this.configuration.websocketProvider.on(`open`,this.boundOnOpen),this.configuration.websocketProvider.on(`close`,this.boundOnClose),this.configuration.websocketProvider.on(`close`,this.configuration.onClose),this.configuration.websocketProvider.on(`close`,this.forwardClose),this.configuration.websocketProvider.on(`disconnect`,this.configuration.onDisconnect),this.configuration.websocketProvider.on(`disconnect`,this.forwardDisconnect),this.configuration.websocketProvider.on(`destroy`,this.configuration.onDestroy),this.configuration.websocketProvider.on(`destroy`,this.forwardDestroy),this.configuration.websocketProvider.attach(this),!0)}permissionDeniedHandler(e){this.emit(`authenticationFailed`,{reason:e}),this.isAuthenticated=!1}authenticatedHandler(e){this.isAuthenticated=!0,this.authorizedScope=e,this.emit(`authenticated`,{scope:e})}setAwarenessField(e,t){if(!this.awareness)throw new vS(`Cannot set awareness field "${e}" to ${JSON.stringify(t)}. You have disabled Awareness for this provider by explicitly passing awareness: null in the provider configuration.`);this.awareness.setLocalStateField(e,t)}},bS=e=>pu((t,n)=>{e.onerror=e=>n(Error(e.target.error)),e.onsuccess=e=>t(e.target.result)}),xS=(e,t)=>pu((n,r)=>{let i=indexedDB.open(e);i.onupgradeneeded=e=>t(e.target.result),i.onerror=e=>r(zl(e.target.error)),i.onsuccess=e=>{let t=e.target.result;t.onversionchange=()=>{t.close()},n(t)}}),SS=e=>bS(indexedDB.deleteDatabase(e)),CS=(e,t)=>t.forEach(t=>e.createObjectStore.apply(e,t)),wS=(e,t,n=`readwrite`)=>{let r=e.transaction(t,n);return t.map(e=>FS(r,e))},TS=(e,t)=>bS(e.count(t)),ES=(e,t)=>bS(e.get(t)),DS=(e,t)=>bS(e.delete(t)),OS=(e,t,n)=>bS(e.put(t,n)),kS=(e,t)=>bS(e.add(t)),AS=(e,t,n)=>bS(e.getAll(t,n)),jS=(e,t,n)=>{let r=null;return PS(e,t,e=>(r=e,!1),n).then(()=>r)},MS=(e,t=null)=>jS(e,t,`prev`),NS=(e,t)=>pu((n,r)=>{e.onerror=r,e.onsuccess=async e=>{let r=e.target.result;if(r===null||await t(r)===!1)return n();r.continue()}}),PS=(e,t,n,r=`next`)=>NS(e.openKeyCursor(t,r),e=>n(e.key)),FS=(e,t)=>e.objectStore(t),IS=(e,t)=>IDBKeyRange.upperBound(e,t),LS=(e,t)=>IDBKeyRange.lowerBound(e,t),RS=`custom`,zS=`updates`,BS=(e,t=()=>{},n=()=>{})=>{let[r]=wS(e.db,[zS]);return AS(r,LS(e._dbref,!1)).then(i=>{e._destroyed||(t(r),bm(e.doc,()=>{i.forEach(t=>Sp(e.doc,t))},e,!1),n(r))}).then(()=>MS(r).then(t=>{e._dbref=t+1})).then(()=>TS(r).then(t=>{e._dbsize=t})).then(()=>r)},VS=(e,t=!0)=>BS(e).then(n=>{(t||e._dbsize>=500)&&kS(n,Tp(e.doc)).then(()=>DS(n,IS(e._dbref,!0))).then(()=>TS(n).then(t=>{e._dbsize=t}))}),HS=class extends Mc{constructor(e,t){super(),this.doc=t,this.name=e,this._dbref=0,this._dbsize=0,this._destroyed=!1,this.db=null,this.synced=!1,this._db=xS(e,e=>CS(e,[[`updates`,{autoIncrement:!0}],[`custom`]])),this.whenSynced=pu(e=>this.on(`synced`,()=>e(this))),this._db.then(e=>{this.db=e,BS(this,async e=>{await TS(e)>0&&kS(e,Tp(t))},()=>{if(this._destroyed)return this;this.synced=!0,this.emit(`synced`,[this])})}),this._storeTimeout=1e3,this._storeTimeoutId=null,this._storeUpdate=(e,t)=>{if(this.db&&t!==this){let[t]=wS(this.db,[zS]);kS(t,e).catch(e=>{globalThis.__okYdbWriteWarned||(globalThis.__okYdbWriteWarned=!0,console.warn(JSON.stringify({event:`ok-ydb-write-failed`,cause:e?.name??`unknown`,message:e?.message??String(e)})))}),++this._dbsize>=500&&(this._storeTimeoutId!==null&&clearTimeout(this._storeTimeoutId),this._storeTimeoutId=setTimeout(()=>{VS(this,!1),this._storeTimeoutId=null},this._storeTimeout))}},t.on(`update`,this._storeUpdate),this.destroy=this.destroy.bind(this),t.on(`destroy`,this.destroy)}destroy(){return this._storeTimeoutId&&clearTimeout(this._storeTimeoutId),this.doc.off(`update`,this._storeUpdate),this.doc.off(`destroy`,this.destroy),this._destroyed=!0,this._db.then(e=>{e.close()})}clearData(){return this.destroy().then(()=>{SS(this.name)})}get(e){return this._db.then(t=>{let[n]=wS(t,[RS],`readonly`);return ES(n,e)})}set(e,t){return this._db.then(n=>{let[r]=wS(n,[RS]);return OS(r,t,e)})}del(e){return this._db.then(t=>{let[n]=wS(t,[RS]);return DS(n,e)})}};function US(){return!0}var WS=class{_idb;_dbName;whenSynced;constructor({branch:e,serverInstanceId:t,docName:n,doc:r}){if(typeof t!=`string`||t.length===0)throw Error(`createClientPersistence: serverInstanceId is required and must be non-empty`);this._dbName=`ok-ydoc:${e}:${t}:${n}`;let i=US()?0:performance.now();this._idb=new HS(this._dbName,r),this.whenSynced=this._idb.whenSynced.then(()=>{if(!US()){let e=performance.now();X(`ok/pool/idb-whensynced`,{docName:n,durationMs:Math.round((e-i)*1e3)/1e3},{startTime:i,duration:e-i})}return this})}get synced(){return this._idb.synced}async destroy(){let e=US()?0:performance.now();try{await this._idb.destroy()}finally{if(!US()){let t=performance.now();X(`ok/pool/idb-destroy`,{dbName:this._dbName,durationMs:Math.round((t-e)*1e3)/1e3},{startTime:e,duration:t-e})}}}async clearData(){let e=US()?0:performance.now();try{await this._idb.destroy();let e=this._dbName;await new Promise((t,n)=>{let r=indexedDB.deleteDatabase(e);r.onsuccess=()=>t(),r.onerror=()=>n(r.error),r.onblocked=()=>{console.warn(JSON.stringify({event:`ok-client-persistence-clear-blocked`,dbName:e})),n(Error(`idb-clear-blocked: ${e}`))}})}finally{if(!US()){let t=performance.now();X(`ok/pool/idb-cleardata`,{dbName:this._dbName,durationMs:Math.round((t-e)*1e3)/1e3},{startTime:e,duration:t-e})}}}};function GS(e){return new WS(e)}function KS(e){return jp(e)}function qS(e,t){return t===null?Tp(e):Tp(e,t)}function JS(e,t){if(e===null)return t;if(t===null)return e;let n=Dp(e),r=Dp(t),i=new Map;for(let[e,t]of n)i.set(e,t);for(let[e,t]of r){let n=i.get(e);(n===void 0||t>n)&&i.set(e,t)}return jp(i)}function YS(e){let t={};if(ln.inject(cn.active(),t),!t.traceparent)return e;let n=e.includes(`?`)?`&`:`?`,r=[`traceparent=${encodeURIComponent(t.traceparent)}`];return t.tracestate&&r.push(`tracestate=${encodeURIComponent(t.tracestate)}`),`${e}${n}${r.join(`&`)}`}var XS=({key:e,editor:t,onPaste:n,onDrop:r,allowedMimeTypes:i})=>new L({key:e||new z(`fileHandler`),props:{handleDrop(e,n){if(!r||!n.dataTransfer?.files.length)return!1;let a=e.posAtCoords({left:n.clientX,top:n.clientY}),o=Array.from(n.dataTransfer.files);return i&&(o=o.filter(e=>i.includes(e.type))),o.length===0?!1:(n.preventDefault(),n.stopPropagation(),r(t,o,a?.pos||0),!0)},handlePaste(e,r){if(!n||!r.clipboardData?.files.length)return!1;let a=Array.from(r.clipboardData.files),o=r.clipboardData.getData(`text/html`);return i&&(a=a.filter(e=>i.includes(e.type))),!(a.length===0||(r.preventDefault(),r.stopPropagation(),n(t,a,o),o.length>0))}}}),ZS=rt.create({name:`fileHandler`,addOptions(){return{onPaste:void 0,onDrop:void 0,allowedMimeTypes:void 0}},addProseMirrorPlugins(){return[XS({key:new z(this.name),editor:this.editor,allowedMimeTypes:this.options.allowedMimeTypes,onDrop:this.options.onDrop,onPaste:this.options.onPaste})]}}),QS=rt.create({name:`keyboardNav`,priority:50,addKeyboardShortcuts(){return{Escape:({editor:e})=>{let{state:t}=e;if(t.selection instanceof We){let n=t.selection.from+t.selection.node.nodeSize,r=t.doc.resolve(Math.min(n,t.doc.content.size)),i=D.near(r);return e.view.dispatch(t.tr.setSelection(i)),!0}return t.selection instanceof D?e.commands.selectParentNode():!1},ArrowUp:({editor:e})=>{let{state:t}=e;if(!(t.selection instanceof We))return!1;let n=t.selection.from,r=t.doc.resolve(n);if(r.index(r.depth)===0)return!1;let i=r.before(r.depth);if(i<=0)return!1;let a=t.doc.resolve(i-1).nodeBefore;if(!a||i-1-a.nodeSize+1<0)return!1;try{let n=We.create(t.doc,i-a.nodeSize);return e.view.dispatch(t.tr.setSelection(n).scrollIntoView()),!0}catch{return!1}},ArrowDown:({editor:e})=>{let{state:t}=e;if(!(t.selection instanceof We))return!1;let n=t.selection.from+t.selection.node.nodeSize;if(n>=t.doc.content.size)return!1;try{if(!t.doc.nodeAt(n))return!1;let r=We.create(t.doc,n);return e.view.dispatch(t.tr.setSelection(r).scrollIntoView()),!0}catch{return!1}},Enter:({editor:e})=>{let{state:t}=e;if(!(t.selection instanceof D)||!t.selection.empty)return!1;let n=t.selection.$from,r=n.parent;if(r.type.name!==`paragraph`||r.textContent!==``||n.depth<2)return!1;let i=-1;for(let e=n.depth-1;e>=1;e--)if(n.node(e).type.name===`jsxComponent`){i=e;break}if(i<0)return!1;let a=n.node(i);if(n.index(i)!==a.childCount-1)return!1;let o=n.after(i);if(o>t.doc.content.size)return!1;let s=t.tr,c=n.before(n.depth),l=n.after(n.depth);s.delete(c,l);let u=o-(l-c),d=t.schema.nodes.paragraph.create();s.insert(u,d);let f=u+1;return s.setSelection(D.create(s.doc,f)),e.view.dispatch(s.scrollIntoView()),!0}}}}),$S=new WeakMap;function eC(e,t){if(t===null){$S.delete(e);return}$S.set(e,t)}function tC(e){return $S.get(e)??null}function nC(e){return`pagesBySlug`in e}function rC(e){return nC(e)?e.pages:e}function iC(e,t){return nC(e)?e.assetPaths??new Set:t??new Set}function aC(e,t){let n=dt(e);if(n){if(nC(t))return t.pagesBySlug.get(n);for(let e of t)if(dt(e)===n)return e}}function oC(e){let t=e.trim();if(!t)return null;let n=dt(t);return n?{target:n,alias:n===t?null:t,anchor:null}:null}function sC(e){let t=e.trim();if(!t)return[];let n=dt(t);return n.length>0&&n!==t?[n]:[]}function cC(e){let t=((e.trim().split(`#`)[0]??``).trim().split(`?`)[0]??``).trim();return t.startsWith(`/`)?t.slice(1):t}function lC(e,t){let n=cC(e);if(!n)return null;if(t.has(n))return n;let r=n.toLowerCase();for(let e of t)if(e.toLowerCase()===r)return e;if(n.includes(`/`))return null;let i=[...t].filter(e=>{let t=e.lastIndexOf(`/`);return(t===-1?e:e.slice(t+1)).toLowerCase()===r});return i.length===0?null:i.sort((e,t)=>e.localeCompare(t))[0]??null}function uC(e,t,n){let r=e.trim();if(!r)return!1;if(lC(r,iC(t,n)))return!0;let i=rC(t);return i.has(r)||sC(r).some(e=>i.has(e))?!0:aC(r,t)!==void 0}var dC=new z(`imageUpload`);function fC(e){let t=document.createElement(`div`);return t.className=`image-upload-skeleton w-full h-40 rounded-md bg-muted animate-pulse motion-reduce:animate-none my-2`,t.setAttribute(`data-upload-widget`,`loading`),t.setAttribute(`role`,`status`),t.setAttribute(`aria-label`,e?.name?`Uploading ${e.name}…`:`Uploading file…`),t}var pC=new L({key:dC,state:{init(){return{decorations:Ke.empty,uploads:new Map}},apply(e,t){let n=t.decorations.map(e.mapping,e.doc),r=new Map;for(let[n,i]of t.uploads)r.set(n,e.mapping.map(i));let i=e.getMeta(dC);if(!i)return{decorations:n,uploads:r};if(i.type===`add`){let t=V.widget(i.pos,i.widget,{id:i.id,stopEvent:()=>!0}),a=n.add(e.doc,[t]),o=new Map(r);return o.set(i.id,e.mapping.map(i.pos)),{decorations:a,uploads:o}}if(i.type===`remove`){let e=n.find(void 0,void 0,e=>e.id===i.id),t=n.remove(e),a=new Map(r);return a.delete(i.id),{decorations:t,uploads:a}}return{decorations:n,uploads:r}}},props:{decorations(e){return dC.getState(e)?.decorations??Ke.empty}}});function mC(e){let t=e.lastIndexOf(`/`);return t===-1?``:e.slice(0,t)}function hC(e){let t=e.lastIndexOf(`/`);return t===-1?e:e.slice(t+1)}function gC(e){return e.split(`/`).filter(e=>e!==``)}function _C(e,t){let n=mC(e),r=mC(t),i=hC(e);if(n===r)return i;let a=gC(r),o=gC(n),s=0;for(;s<a.length&&s<o.length&&a[s]===o[s];)s++;let c=a.length-s,l=o.slice(s);return c===0?`./${[...l,i].join(`/`)}`:[...Array(c).fill(`..`),...l,i].join(`/`)}function vC(e){return tC(e)}function yC(e,t){return{type:`jsxComponent`,attrs:{componentName:e===`jsx-img`?`img`:e===`jsx-video`?`video`:`audio`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!0,props:e===`jsx-img`?{src:t,alt:``}:{src:t,controls:!0}}}}function bC(e){let t=we(e);return t===`md`||t===`mdx`?{kind:`wiki-link`,ext:t}:ie.has(t)?{kind:`jsx-img`,ext:t}:ve.has(t)?{kind:`jsx-video`,ext:t}:oe.has(t)?{kind:`jsx-audio`,ext:t}:te.has(t)?{kind:`wikiembed`,ext:t}:{kind:`markdown-link`,ext:t}}async function xC(e,t,n){let r=vC(t),i=r?`${r}.md`:``;if(!i){on.error(`Cannot upload: no document is open`);return}let a=crypto.randomUUID(),o=fC(e);t.view.dispatch(t.state.tr.setMeta(dC,{type:`add`,id:a,pos:n,widget:o}));let s=new FormData;s.append(`file`,e),s.append(`parentDocName`,i);let c;try{c=await fetch(`/api/upload`,{method:`POST`,body:s})}catch(e){console.error(`[uploadAndInsert] Network error:`,e),SC(t,a);return}let l={};try{l=await c.json()}catch{}if(!c.ok){let e=l.message??l.error??`Upload failed (${c.status})`;console.error(`[uploadAndInsert] Server error:`,e),SC(t,a,e);return}if(typeof l.src!=`string`){console.error(`[uploadAndInsert] Response missing src:`,l),SC(t,a);return}let u=l.src,d=l.deduped===!0,f=mC(i),p=typeof l.path==`string`&&l.path.length>0?l.path:f?`${f}/${u}`:u;d&&on.info(`Already at ${p} — reusing.`);let m=bC(e.name),{state:h}=t,g=dC.getState(h)?.uploads.get(a)??n,_=h.tr.setMeta(dC,{type:`remove`,id:a}),v=_C(p,i),y=`/${p}`;if(m.kind===`jsx-img`||m.kind===`jsx-video`||m.kind===`jsx-audio`){if(!h.schema.nodes.jsxComponent){console.error(`[uploadAndInsert] jsxComponent node missing from schema`),SC(t,a);return}let e=yC(m.kind,y);t.chain().command(({tr:e})=>(e.setMeta(dC,{type:`remove`,id:a}),!0)).focus().insertContentAt(g,e).command(({tr:e,dispatch:t})=>{if(!t)return!0;let n=e.mapping.map(g);return e.doc.nodeAt(n)?.type.name===`jsxComponent`&&e.setSelection(We.create(e.doc,n)),!0}).run();return}if(m.kind===`wikiembed`){let e=h.schema.nodes.wikiLinkEmbed;if(!e){console.error(`[uploadAndInsert] wikiLinkEmbed node missing from schema`),SC(t,a);return}_.insert(g,e.create({target:u,alias:null,anchor:null,resolvedSrc:y}))}else if(m.kind===`wiki-link`){let n=h.schema.nodes.wikiLink;if(!n){console.error(`[uploadAndInsert] wikiLink node missing from schema`),SC(t,a);return}let r=oC(e.name.replace(/\.(md|mdx)$/i,``));r?_.insert(g,n.create(r)):_.insert(g,h.schema.text(e.name))}else{let t=h.schema.marks.link;if(t){let n=h.schema.text(e.name,[t.create({href:v})]);_.insert(g,n)}else _.insert(g,h.schema.text(e.name))}t.view.dispatch(_)}function SC(e,t,n){e.view.dispatch(e.state.tr.setMeta(dC,{type:`remove`,id:t})),on.error(n??`Upload failed`)}var CC={ChevronRight:pr,Image:Ar,MessageSquareWarning:Lr,Sigma:Wr,SquarePlay:Gr,Volume2:Zr,Workflow:Qr};function wC(e){return e&&Object.hasOwn(CC,e)?CC[e]:lr}var TC={ChevronRight:pr};function EC(e){if(!e||!e.startsWith(`lucide:`))return null;let t=e.slice(7);return Object.hasOwn(TC,t)?TC[t]:null}function DC(e){let t=(0,Y.c)(24),n;t[0]===e.icon?n=t[1]:(n=EC(e.icon),t[0]=e.icon,t[1]=n);let r=n,i=r?`custom`:void 0,a;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,J.jsx)(pr,{size:14,className:`accordion-chevron`,"aria-hidden":`true`}),t[2]=a):a=t[2];let o;t[3]===r?o=t[4]:(o=r?(0,J.jsx)(r,{size:16,className:`accordion-icon`,"aria-hidden":`true`}):null,t[3]=r,t[4]=o);let s=e.title??`Accordion`,c;t[5]===s?c=t[6]:(c=(0,J.jsx)(`span`,{className:`accordion-title`,children:s}),t[5]=s,t[6]=c);let l;t[7]===e.description?l=t[8]:(l=e.description?(0,J.jsx)(`span`,{className:`accordion-description`,children:e.description}):null,t[7]=e.description,t[8]=l);let u;t[9]!==c||t[10]!==l?(u=(0,J.jsxs)(`span`,{className:`accordion-title-group`,children:[c,l]}),t[9]=c,t[10]=l,t[11]=u):u=t[11];let d;t[12]!==o||t[13]!==u?(d=(0,J.jsxs)(`summary`,{className:`accordion-summary`,contentEditable:!1,children:[a,o,u]}),t[12]=o,t[13]=u,t[14]=d):d=t[14];let f;t[15]===e.children?f=t[16]:(f=(0,J.jsx)(`div`,{className:`accordion-body`,children:e.children}),t[15]=e.children,t[16]=f);let p;return t[17]!==e.defaultOpen||t[18]!==e.id||t[19]!==e.name||t[20]!==i||t[21]!==d||t[22]!==f?(p=(0,J.jsxs)(`details`,{className:`accordion`,"data-accordion-icon":i,open:e.defaultOpen,id:e.id,name:e.name,children:[d,f]}),t[17]=e.defaultOpen,t[18]=e.id,t[19]=e.name,t[20]=i,t[21]=d,t[22]=f,t[23]=p):p=t[23],p}function OC(e){return e!==!1}function kC(e){let t=(0,Y.c)(10),n=e.src,r=e.title,i;t[0]===e.controls?i=t[1]:(i=OC(e.controls),t[0]=e.controls,t[1]=i);let a;return t[2]!==e.autoplay||t[3]!==e.loop||t[4]!==e.muted||t[5]!==e.preload||t[6]!==e.src||t[7]!==e.title||t[8]!==i?(a=(0,J.jsx)(`audio`,{className:`ok-audio`,src:n,title:r,controls:i,autoPlay:e.autoplay,loop:e.loop,muted:e.muted,preload:e.preload}),t[2]=e.autoplay,t[3]=e.loop,t[4]=e.muted,t[5]=e.preload,t[6]=e.src,t[7]=e.title,t[8]=i,t[9]=a):a=t[9],a}var AC={note:jr,tip:Mr,important:Lr,warning:Ae,caution:zr,abstract:vr,info:cr,todo:Pr,success:Pe,question:gr,failure:_r,danger:$r,bug:ur,example:wr,quote:Hr},jC={Info:jr,Lightbulb:Mr,MessageSquareWarning:Lr,AlertTriangle:Ae,AlertOctagon:zr,ClipboardList:vr,BookOpen:cr,ListTodo:Pr,CircleCheck:Pe,CircleHelp:gr,CircleX:_r,Zap:$r,Bug:ur,FlaskConical:wr,Quote:Hr};function MC(e,t){if(!e||!e.startsWith(`lucide:`))return AC[t];let n=e.slice(7);return Object.hasOwn(jC,n)?jC[n]:AC[t]}var NC=new Set([`note`,`tip`,`important`,`warning`,`caution`,`abstract`,`info`,`todo`,`success`,`question`,`failure`,`danger`,`bug`,`example`,`quote`]);function PC(e){return typeof e==`string`&&NC.has(e)?e:`note`}function FC(e){let t=(0,Y.c)(29),n,r;t[0]!==e.icon||t[1]!==e.type?(r=PC(e.type),n=MC(e.icon,r),t[0]=e.icon,t[1]=e.type,t[2]=n,t[3]=r):(n=t[2],r=t[3]);let i=n,a;t[4]===e.color?a=t[5]:(a=e.color?{"--callout-type-color":e.color}:{},t[4]=e.color,t[5]=a);let o=a,s;t[6]!==i||t[7]!==e.title?(s=e.title||i?(0,J.jsxs)(`span`,{className:`callout-header`,contentEditable:!1,children:[(0,J.jsx)(i,{size:16,className:`callout-icon`,"aria-hidden":`true`}),e.title?(0,J.jsx)(`span`,{className:`callout-title`,children:e.title}):null]}):null,t[6]=i,t[7]=e.title,t[8]=s):s=t[8];let c=s;if(e.collapsible){let n=e.defaultOpen??!0,i;t[9]===c?i=t[10]:(i=c??(0,J.jsx)(`span`,{className:`callout-title`,children:`Details`}),t[9]=c,t[10]=i);let a;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,J.jsx)(fr,{size:16,className:`callout-chevron`,"aria-hidden":`true`}),t[11]=a):a=t[11];let s;t[12]===i?s=t[13]:(s=(0,J.jsxs)(`summary`,{className:`callout-summary`,contentEditable:!1,children:[i,a]}),t[12]=i,t[13]=s);let l;t[14]===e.children?l=t[15]:(l=(0,J.jsx)(`div`,{className:`callout-body`,children:e.children}),t[14]=e.children,t[15]=l);let u;return t[16]!==n||t[17]!==o||t[18]!==s||t[19]!==l||t[20]!==r?(u=(0,J.jsxs)(`details`,{className:`callout callout-collapsible`,"data-callout-type":r,open:n,style:o,children:[s,l]}),t[16]=n,t[17]=o,t[18]=s,t[19]=l,t[20]=r,t[21]=u):u=t[21],u}let l;t[22]===e.children?l=t[23]:(l=(0,J.jsx)(`div`,{className:`callout-body`,children:e.children}),t[22]=e.children,t[23]=l);let u;return t[24]!==c||t[25]!==o||t[26]!==l||t[27]!==r?(u=(0,J.jsxs)(`div`,{className:`callout callout-static`,"data-callout-type":r,style:o,children:[c,l]}),t[24]=c,t[25]=o,t[26]=l,t[27]=r,t[28]=u):u=t[28],u}function IC(){return q.createElement(`svg`,{"aria-hidden":`true`,"data-rmiz-btn-unzoom-icon":!0,fill:`currentColor`,focusable:`false`,viewBox:`0 0 16 16`,xmlns:`http://www.w3.org/2000/svg`},q.createElement(`path`,{d:`M 14.144531 1.148438 L 9 6.292969 L 9 3 L 8 3 L 8 8 L 13 8 L 13 7 L 9.707031 7 L 14.855469 1.851563 Z M 8 8 L 3 8 L 3 9 L 6.292969 9 L 1.148438 14.144531 L 1.851563 14.855469 L 7 9.707031 L 7 13 L 8 13 Z`}))}function LC(){return q.createElement(`svg`,{"aria-hidden":`true`,"data-rmiz-btn-zoom-icon":!0,fill:`currentColor`,focusable:`false`,viewBox:`0 0 16 16`,xmlns:`http://www.w3.org/2000/svg`},q.createElement(`path`,{d:`M 9 1 L 9 2 L 12.292969 2 L 2 12.292969 L 2 9 L 1 9 L 1 14 L 6 14 L 6 13 L 2.707031 13 L 13 2.707031 L 13 6 L 14 6 L 14 1 Z`}))}function RC(e){return typeof Element>`u`?!1:e instanceof Element}var zC=(e,t)=>RC(t)&&t.tagName.toUpperCase()===e,BC=e=>zC(`DIV`,e)||zC(`SPAN`,e),VC=e=>zC(`IMG`,e),HC=e=>e.complete&&e.naturalHeight!==0,UC=e=>zC(`SVG`,e),WC=({height:e,offset:t,width:n})=>Math.min((window.innerWidth-t*2)/n,(window.innerHeight-t*2)/e),GC=({containerHeight:e,containerWidth:t,offset:n,targetHeight:r,targetWidth:i})=>{let a=WC({height:r,offset:n,width:i}),o=i>r?i/t:r/e;return a>1?o:a*o},KC=({containerHeight:e,containerWidth:t,hasScalableSrc:n,offset:r,targetHeight:i,targetWidth:a})=>e===0||t===0?1:!n&&i!==0&&a!==0?GC({containerHeight:e,containerWidth:t,offset:r,targetHeight:i,targetWidth:a}):WC({height:e,offset:r,width:t}),qC=/url(?:\(['"]?)(?<url>.*?)(?:['"]?\))/,JC=e=>{if(e!==null){if(VC(e))return e.currentSrc===``?void 0:e.currentSrc;if(BC(e)){let{backgroundImage:t}=window.getComputedStyle(e);if(t!==``)return qC.exec(t)?.[1]}}},YC=e=>{if(e!==null)return VC(e)?e.alt:e.getAttribute(`aria-label`)??void 0},XC=({containerHeight:e,containerLeft:t,containerTop:n,containerWidth:r,hasScalableSrc:i,offset:a,targetHeight:o,targetWidth:s})=>{let c=KC({containerHeight:e,containerWidth:r,hasScalableSrc:i,offset:a,targetHeight:o,targetWidth:s});return{top:n,left:t,width:r*c,height:e*c,transform:`translate(0,0) scale(${1/c})`}},ZC=({position:e,relativeNum:t})=>{let n=parseFloat(e);return e.endsWith(`%`)?t*n/100:n},QC=({containerHeight:e,containerLeft:t,containerTop:n,containerWidth:r,hasScalableSrc:i,objectFit:a,objectPosition:o,offset:s,targetHeight:c,targetWidth:l})=>{let u=a;if(u===`scale-down`&&(u=l<=r&&c<=e?`none`:`contain`),u===`cover`||u===`contain`){let a=r/l,d=e/c,f=u===`cover`?Math.max(a,d):Math.min(a,d),[p=`50%`,m=`50%`]=o.split(` `),h=ZC({position:p,relativeNum:r-l*f}),g=ZC({position:m,relativeNum:e-c*f}),_=KC({containerHeight:c*f,containerWidth:l*f,hasScalableSrc:i,offset:s,targetHeight:c,targetWidth:l});return{top:n+g,left:t+h,width:l*f*_,height:c*f*_,transform:`translate(0,0) scale(${1/_})`}}else if(u===`none`){let[a=`50%`,u=`50%`]=o.split(` `),d=ZC({position:a,relativeNum:r-l}),f=ZC({position:u,relativeNum:e-c}),p=KC({containerHeight:c,containerWidth:l,hasScalableSrc:i,offset:s,targetHeight:c,targetWidth:l});return{top:n+f,left:t+d,width:l*p,height:c*p,transform:`translate(0,0) scale(${1/p})`}}else if(u===`fill`){let t=r/l,n=e/c,a=Math.max(t,n),o=KC({containerHeight:c*a,containerWidth:l*a,hasScalableSrc:i,offset:s,targetHeight:c,targetWidth:l});return{width:r*o,height:e*o,transform:`translate(0,0) scale(${1/o})`}}else return{}},$C=({backgroundPosition:e,backgroundSize:t,containerHeight:n,containerLeft:r,containerTop:i,containerWidth:a,hasScalableSrc:o,offset:s,targetHeight:c,targetWidth:l})=>{if(t===`cover`||t===`contain`){let u=a/l,d=n/c,f=t===`cover`?Math.max(u,d):Math.min(u,d),[p=`50%`,m=`50%`]=e.split(` `),h=ZC({position:p,relativeNum:a-l*f}),g=ZC({position:m,relativeNum:n-c*f}),_=KC({containerHeight:c*f,containerWidth:l*f,hasScalableSrc:o,offset:s,targetHeight:c,targetWidth:l});return{top:i+g,left:r+h,width:l*f*_,height:c*f*_,transform:`translate(0,0) scale(${1/_})`}}else if(t===`auto`){let[t=`50%`,u=`50%`]=e.split(` `),d=ZC({position:t,relativeNum:a-l}),f=ZC({position:u,relativeNum:n-c}),p=KC({containerHeight:c,containerWidth:l,hasScalableSrc:o,offset:s,targetHeight:c,targetWidth:l});return{top:i+f,left:r+d,width:l*p,height:c*p,transform:`translate(0,0) scale(${1/p})`}}else{let[u=`50%`,d=`50%`]=t.split(` `),f=ZC({position:u,relativeNum:a}),p=ZC({position:d,relativeNum:n}),m=f/l,h=p/c,g=Math.min(m,h),[_=`50%`,v=`50%`]=e.split(` `),y=ZC({position:_,relativeNum:a-l*g}),b=ZC({position:v,relativeNum:n-c*g}),x=KC({containerHeight:c*g,containerWidth:l*g,hasScalableSrc:o,offset:s,targetHeight:c,targetWidth:l});return{top:i+b,left:r+y,width:l*g*x,height:c*g*x,transform:`translate(0,0) scale(${1/x})`}}},ew=/\.svg$/i,tw=({hasZoomImg:e,imgSrc:t,isSvg:n,isZoomed:r,loadedImgEl:i,offset:a,shouldRefresh:o,targetEl:s})=>{let c=n||t?.slice(0,18)===`data:image/svg+xml`||e||t!==void 0&&ew.test(t),l=s.getBoundingClientRect(),u=window.getComputedStyle(s),d=i!=null&&BC(s),f=i!=null&&!d,p=i!=null&&i.naturalHeight!==0?i.naturalHeight:l.height,m=i!=null&&i.naturalWidth!==0?i.naturalWidth:l.width,h=XC({containerHeight:l.height,containerLeft:l.left,containerTop:l.top,containerWidth:l.width,hasScalableSrc:c,offset:a,targetHeight:p,targetWidth:m}),g=f?QC({containerHeight:l.height,containerLeft:l.left,containerTop:l.top,containerWidth:l.width,hasScalableSrc:c,objectFit:u.objectFit,objectPosition:u.objectPosition,offset:a,targetHeight:p,targetWidth:m}):void 0,_=d?$C({backgroundPosition:u.backgroundPosition,backgroundSize:u.backgroundSize,containerHeight:l.height,containerLeft:l.left,containerTop:l.top,containerWidth:l.width,hasScalableSrc:c,offset:a,targetHeight:p,targetWidth:m}):void 0,v={...h,...g,..._};if(r){let e=window.innerWidth/2,t=window.innerHeight/2,n=parseFloat(String(v.left??0))+parseFloat(String(v.width??0))/2,r=parseFloat(String(v.top??0))+parseFloat(String(v.height??0))/2,i=e-n,a=t-r;o&&(v.transitionDuration=`0.01ms`),v.transform=`translate(${i}px,${a}px) scale(1)`}return v},nw=e=>{if(e==null)return{};if(UC(e)){let{parentElement:t}=e,n=e.getBoundingClientRect();if(t==null)return{height:n.height,left:n.left,width:n.width,top:n.top};{let e=t.getBoundingClientRect();return{height:n.height,left:e.left-n.left,top:e.top-n.top,width:n.width}}}else return{height:e.offsetHeight,left:e.offsetLeft,width:e.offsetWidth,top:e.offsetTop}},rw=e=>{let t=`-zoom`,n=[`clip-path`,`fill`,`mask`,`marker-start`,`marker-mid`,`marker-end`],r=new Map;if(e.hasAttribute(`id`)){let{id:n}=e,i=n+t;r.set(n,i);let a=e;a.id=i}e.querySelectorAll(`[id]`).forEach(e=>{let{id:n}=e,i=n+t;r.set(n,i);let a=e;a.id=i}),r.forEach((t,r)=>{let i=`url(#${r})`,a=`url(#${t})`,o=n.map(e=>`[${e}="${i}"]`).join(`, `);e.querySelectorAll(o).forEach(e=>{n.forEach(t=>{e.getAttribute(t)===i&&e.setAttribute(t,a)})})}),e.querySelectorAll(`style`).forEach(e=>{r.forEach((t,n)=>{let{textContent:r}=e;if(r!==``){let i=e;i.textContent=r.replaceAll(`#${n}`,`#${t}`)}})})},iw=[`img`,`svg`,`[role="img"]`,`[data-zoom]`].map(e=>`${e}:not([aria-hidden="true"])`).join(`,`),aw={overflow:``,width:``};function ow(){let e=document.querySelector(`[data-rmiz-portal]`);if(e!=null)return e;let t=document.createElement(`div`);return t.setAttribute(`data-rmiz-portal`,``),document.body.appendChild(t),t}function sw(e){e.preventDefault()}function cw(e){return q.createElement(lw,{...e})}var lw=class extends q.Component{constructor(){super(...arguments),this.state={id:``,isZoomImgLoaded:!1,loadedImgEl:void 0,modalState:`UNLOADED`,shouldRefresh:!1,styleGhost:{}},this.refContent=q.createRef(),this.refDialog=q.createRef(),this.refModalContent=q.createRef(),this.refModalImg=q.createRef(),this.refWrap=q.createRef(),this.imgEl=null,this.isScaling=!1,this.prevBodyAttrs=aw,this.styleModalImg={},this.handleModalStateChange=e=>{let{state:{modalState:t}}=this;e!==`LOADING`&&t===`LOADING`?(this.loadZoomImg(),window.addEventListener(`resize`,this.handleResize,{passive:!0}),window.addEventListener(`touchstart`,this.handleTouchStart,{passive:!0}),window.addEventListener(`touchmove`,this.handleTouchMove,{passive:!0}),window.addEventListener(`touchend`,this.handleTouchEnd,{passive:!0}),window.addEventListener(`touchcancel`,this.handleTouchCancel,{passive:!0}),document.addEventListener(`keydown`,this.handleKeyDown,!0)):e!==`LOADED`&&t===`LOADED`?window.addEventListener(`wheel`,this.handleWheel,{passive:!0}):e!==`UNLOADING`&&t===`UNLOADING`?(this.ensureImgTransitionEnd(),window.removeEventListener(`wheel`,this.handleWheel),window.removeEventListener(`touchstart`,this.handleTouchStart),window.removeEventListener(`touchmove`,this.handleTouchMove),window.removeEventListener(`touchend`,this.handleTouchEnd),window.removeEventListener(`touchcancel`,this.handleTouchCancel),document.removeEventListener(`keydown`,this.handleKeyDown,!0)):e!==`UNLOADED`&&t===`UNLOADED`&&(this.bodyScrollEnable(),window.removeEventListener(`resize`,this.handleResize),this.refModalImg.current?.removeEventListener(`transitionend`,this.handleImgTransitionEnd),this.refDialog.current?.close())},this.setId=()=>{let e=()=>Math.random().toString(16).slice(-4);this.setState({id:e()+e()+e()})},this.setAndTrackImg=()=>{let{refContent:{current:e}}=this;e!=null&&(this.imgEl=e.querySelector(iw),this.imgEl===null?this.contentNotFoundChangeObserver??(this.contentNotFoundChangeObserver=new MutationObserver(this.setAndTrackImg),this.contentNotFoundChangeObserver.observe(e,{childList:!0,subtree:!0})):(this.contentNotFoundChangeObserver?.disconnect(),this.imgEl.addEventListener(`load`,this.handleImgLoad),this.imgEl.addEventListener(`click`,this.handleZoom),this.state.loadedImgEl??this.handleImgLoad(),this.imgElResizeObserver=new ResizeObserver(e=>{let[t]=e;t?.target!==void 0&&(this.imgEl=t.target,this.setState({styleGhost:nw(this.imgEl)}))}),this.imgElResizeObserver.observe(this.imgEl),this.contentChangeObserver??(this.contentChangeObserver=new MutationObserver(()=>{this.setState({styleGhost:nw(this.imgEl)})}),this.contentChangeObserver.observe(e,{attributes:!0,childList:!0,subtree:!0}))))},this.handleIfZoomChanged=e=>{let{props:{isZoomed:t}}=this;!e&&t?this.zoom():e&&!t&&this.unzoom()},this.handleImgLoad=()=>{let e=JC(this.imgEl);if(e==null||e===``)return;let t=new Image,{imgEl:n}=this;if(VC(n)){let{sizes:e,srcset:r,crossOrigin:i}=n;t.sizes=e,t.srcset=r,t.crossOrigin=i}t.src=e;let r=()=>{this.setState({loadedImgEl:t,styleGhost:nw(this.imgEl)})};t.decode().then(r).catch(()=>{if(HC(t)){r();return}t.onload=r})},this.handleZoom=e=>{this.props.isDisabled!==!0&&this.hasImage()&&this.props.onZoomChange?.(!0,{event:e})},this.handleUnzoom=e=>{this.props.isDisabled!==!0&&this.props.onZoomChange?.(!1,{event:e})},this.handleBtnUnzoomClick=e=>{e.preventDefault(),e.stopPropagation(),this.handleUnzoom(e)},this.handleDialogClick=e=>{(e.target===this.refModalContent.current||e.target===this.refModalImg.current)&&(e.stopPropagation(),this.handleUnzoom(e))},this.handleDialogClose=e=>{e.stopPropagation(),this.handleUnzoom(e)},this.handleKeyDown=e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),this.handleUnzoom(e))},this.handleWheel=e=>{e.ctrlKey||(e.stopPropagation(),queueMicrotask(()=>{this.handleUnzoom(e)}))},this.handleTouchStart=e=>{if(e.touches.length>1){this.isScaling=!0;return}let{changedTouches:t}=e,[n]=t;if(t.length===1&&n!==void 0){let{screenY:e}=n;this.touchYStart=e}},this.handleTouchMove=e=>{let t=window.visualViewport?.scale??1,{changedTouches:n}=e,[r]=n;if(this.props.canSwipeToUnzoom&&!this.isScaling&&t<=1&&this.touchYStart!=null&&r!==void 0){let{screenY:t}=r;this.touchYEnd=t;let n=Math.max(this.touchYStart,this.touchYEnd),i=Math.min(this.touchYStart,this.touchYEnd);Math.abs(n-i)>this.props.swipeToUnzoomThreshold&&(this.touchYStart=void 0,this.touchYEnd=void 0,this.handleUnzoom(e))}},this.handleTouchEnd=()=>{this.isScaling=!1,this.touchYStart=void 0,this.touchYEnd=void 0},this.handleTouchCancel=()=>{this.isScaling=!1,this.touchYStart=void 0,this.touchYEnd=void 0},this.handleResize=()=>{this.setState({shouldRefresh:!0})},this.hasImage=()=>this.imgEl!==null&&(this.state.loadedImgEl!==void 0||UC(this.imgEl))&&window.getComputedStyle(this.imgEl).display!==`none`,this.zoom=()=>{this.bodyScrollDisable(),this.refDialog.current?.showModal(),this.refModalImg.current?.addEventListener(`transitionend`,this.handleImgTransitionEnd),this.setState({modalState:`LOADING`})},this.unzoom=()=>{this.setState({modalState:`UNLOADING`})},this.handleImgTransitionEnd=()=>{clearTimeout(this.timeoutTransitionEnd),this.state.modalState===`LOADING`?this.setState({modalState:`LOADED`}):this.state.modalState===`UNLOADING`&&this.setState({shouldRefresh:!1,modalState:`UNLOADED`})},this.ensureImgTransitionEnd=()=>{if(this.refModalImg.current!==null){let{transitionDuration:e}=window.getComputedStyle(this.refModalImg.current),t=parseFloat(e);if(t!==0&&!Number.isNaN(t)){let n=t*(e.endsWith(`ms`)?1:1e3)+50;this.timeoutTransitionEnd=setTimeout(this.handleImgTransitionEnd,n)}}},this.bodyScrollDisable=()=>{this.prevBodyAttrs={overflow:document.body.style.overflow,width:document.body.style.width};let{body:{clientWidth:e}}=document;document.body.style.overflow=`hidden`,document.body.style.width=`${e}px`},this.bodyScrollEnable=()=>{let{prevBodyAttrs:{overflow:e,width:t}}=this;document.body.style.width=t,document.body.style.overflow=e,this.prevBodyAttrs=aw},this.loadZoomImg=()=>{let{props:{zoomImg:e}}=this;if(e==null)return;let{src:t}=e;if(t!==void 0&&t!==``){let n=new Image;n.sizes=e.sizes??``,n.srcset=e.srcSet??``,n.crossOrigin=e.crossOrigin??void 0,n.src=t;let r=()=>{this.setState({isZoomImgLoaded:!0})};n.decode().then(r).catch(()=>{if(HC(n)){r();return}n.onload=r})}},this.UNSAFE_handleSvg=()=>{let{imgEl:e,refModalImg:t,styleModalImg:n}=this;if(UC(e)){let r=e.cloneNode(!0);rw(r),r.style.width=`${n.width??0}px`,r.style.height=`${n.height??0}px`,r.addEventListener(`click`,this.handleUnzoom),t.current?.firstChild?.remove(),t.current?.appendChild(r)}}}render(){let{handleBtnUnzoomClick:e,handleDialogClick:t,handleDialogClose:n,handleUnzoom:r,handleZoom:i,imgEl:a,props:{a11yNameButtonUnzoom:o,a11yNameButtonZoom:s,children:c,classDialog:l,IconUnzoom:u,IconZoom:d,isZoomed:f,wrapElement:p,ZoomContent:m,zoomImg:h,zoomMargin:g},refContent:_,refDialog:v,refModalContent:y,refModalImg:b,refWrap:x,state:{id:S,isZoomImgLoaded:C,loadedImgEl:w,modalState:T,shouldRefresh:E,styleGhost:D}}=this,O=`rmiz-modal-${S}`,k=`rmiz-modal-img-${S}`,A=BC(a),j=VC(a),M=UC(a),N=YC(a),P=JC(a),F=j?a.sizes:void 0,I=j?a.srcset:void 0,L=j?a.crossOrigin:void 0,R=h?.src!==void 0&&h.src!==``,z=this.hasImage(),B=N!==void 0&&N!==``?`${s}: ${N}`:s,V=T===`LOADING`||T===`LOADED`,H=z?`found`:`not-found`,U=T===`UNLOADED`||T===`UNLOADING`?`hidden`:`visible`,W={visibility:T===`UNLOADED`?`visible`:`hidden`};this.styleModalImg=z&&a!==null?tw({hasZoomImg:R,imgSrc:P,isSvg:M,isZoomed:f&&V,loadedImgEl:w,offset:g,shouldRefresh:E,targetEl:a}):{};let ee=null;if(z){let t=j||A?q.createElement(`img`,{alt:N,crossOrigin:L,sizes:F,src:P,srcSet:I,...C&&T===`LOADED`?h:{},"data-rmiz-modal-img":``,height:this.styleModalImg.height??void 0,id:k,ref:b,style:this.styleModalImg,width:this.styleModalImg.width??void 0}):M?q.createElement(`div`,{"data-rmiz-modal-img":!0,ref:b,style:this.styleModalImg}):null,n=q.createElement(`button`,{"aria-label":o,"data-rmiz-btn-unzoom":``,onClick:e,type:`button`},q.createElement(u,null));ee=m==null?q.createElement(q.Fragment,null,t,n):q.createElement(m,{buttonUnzoom:n,modalState:T,img:t,isZoomImgLoaded:C,onUnzoom:r})}return q.createElement(p,{"aria-owns":z?O:void 0,"data-rmiz":``,ref:x},q.createElement(p,{"data-rmiz-content":H,ref:_,style:W},c),z&&q.createElement(p,{"data-rmiz-ghost":``,style:D},q.createElement(`button`,{"aria-label":B,"data-rmiz-btn-zoom":``,onClick:i,type:`button`},q.createElement(d,null))),z&&yi.createPortal(q.createElement(`dialog`,{"aria-labelledby":k,"aria-modal":`true`,className:l,"data-rmiz-modal":``,id:O,onClick:t,onClose:n,onCancel:sw,ref:v,role:`dialog`},q.createElement(`div`,{"data-rmiz-modal-overlay":U}),q.createElement(`div`,{"data-rmiz-modal-content":``,ref:y},ee)),ow()))}componentDidMount(){this.setId(),this.setAndTrackImg(),this.handleImgLoad(),this.UNSAFE_handleSvg()}componentWillUnmount(){this.state.modalState!==`UNLOADED`&&this.bodyScrollEnable(),this.contentChangeObserver?.disconnect(),this.contentNotFoundChangeObserver?.disconnect(),this.imgElResizeObserver?.disconnect(),this.imgEl?.removeEventListener(`load`,this.handleImgLoad),this.imgEl?.removeEventListener(`click`,this.handleZoom),this.refModalImg.current?.removeEventListener(`transitionend`,this.handleImgTransitionEnd),window.removeEventListener(`wheel`,this.handleWheel),window.removeEventListener(`touchstart`,this.handleTouchStart),window.removeEventListener(`touchmove`,this.handleTouchMove),window.removeEventListener(`touchend`,this.handleTouchEnd),window.removeEventListener(`touchcancel`,this.handleTouchCancel),window.removeEventListener(`resize`,this.handleResize),document.removeEventListener(`keydown`,this.handleKeyDown,!0)}componentDidUpdate(e,t){this.handleModalStateChange(t.modalState),this.UNSAFE_handleSvg(),this.handleIfZoomChanged(e.isZoomed)}};lw.defaultProps={a11yNameButtonUnzoom:`Minimize image`,a11yNameButtonZoom:`Expand image`,canSwipeToUnzoom:!0,IconUnzoom:IC,IconZoom:LC,isDisabled:!1,swipeToUnzoomThreshold:10,wrapElement:`div`,zoomMargin:0};function uw({onZoomChange:e,...t}){let[n,r]=q.useState(!1),i=q.useCallback((t,{event:n})=>{r(t),e?.(t,{event:n})},[e]);return q.createElement(cw,{...t,isZoomed:n,onZoomChange:i})}function dw(e){return e??`lazy`}function fw(e){let t=(0,Y.c)(15),n=e.src,r=e.alt??``,i=e.width,a=e.height,o=e.title,s;t[0]===e.loading?s=t[1]:(s=dw(e.loading),t[0]=e.loading,t[1]=s);let c;return t[2]!==e.crossorigin||t[3]!==e.decoding||t[4]!==e.fetchpriority||t[5]!==e.height||t[6]!==e.referrerpolicy||t[7]!==e.sizes||t[8]!==e.src||t[9]!==e.srcset||t[10]!==e.title||t[11]!==e.width||t[12]!==r||t[13]!==s?(c=(0,J.jsx)(`img`,{src:n,alt:r,width:i,height:a,title:o,loading:s,srcSet:e.srcset,sizes:e.sizes,decoding:e.decoding,fetchPriority:e.fetchpriority,crossOrigin:e.crossorigin,referrerPolicy:e.referrerpolicy}),t[2]=e.crossorigin,t[3]=e.decoding,t[4]=e.fetchpriority,t[5]=e.height,t[6]=e.referrerpolicy,t[7]=e.sizes,t[8]=e.src,t[9]=e.srcset,t[10]=e.title,t[11]=e.width,t[12]=r,t[13]=s,t[14]=c):c=t[14],c}function pw(e){let t=(0,Y.c)(3),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={sizes:void 0},t[0]=n):n=t[0];let r;return t[1]===e?r=t[2]:(r=(0,J.jsx)(uw,{wrapElement:`span`,zoomMargin:20,zoomImg:n,children:(0,J.jsx)(fw,{...e})}),t[1]=e,t[2]=r),r}var mw=(0,q.lazy)(async()=>{let{default:e}=await n(async()=>{let{default:e}=await import(`./katex-qwlL5fSd.js`);return{default:e}},[],import.meta.url);function t(t){let n=(0,Y.c)(7),r;n[0]===t.formula?r=n[1]:(r=e.renderToString(t.formula,{displayMode:!0,throwOnError:!1,strict:`ignore`,trust:!1}),n[0]=t.formula,n[1]=r);let i=r,a;n[2]===i?a=n[3]:(a={__html:i},n[2]=i,n[3]=a);let o;return n[4]!==t.id||n[5]!==a?(o=(0,J.jsx)(`div`,{className:`math math-display`,"data-component-type":`math`,id:t.id,dangerouslySetInnerHTML:a}),n[4]=t.id,n[5]=a,n[6]=o):o=n[6],o}return{default:t}});function hw(e){let t=(0,Y.c)(3),n=e.formula||`\xA0`,r;return t[0]!==e.id||t[1]!==n?(r=(0,J.jsx)(`div`,{className:`math math-placeholder`,"data-component-type":`math`,id:e.id,children:n}),t[0]=e.id,t[1]=n,t[2]=r):r=t[2],r}function gw(e){let t=(0,Y.c)(6),n=e.formula??``;if(!n){let r;return t[0]!==n||t[1]!==e.id?(r=(0,J.jsx)(hw,{formula:n,id:e.id}),t[0]=n,t[1]=e.id,t[2]=r):r=t[2],r}let r;return t[3]!==n||t[4]!==e.id?(r=(0,J.jsx)(q.Suspense,{fallback:(0,J.jsx)(hw,{formula:n,id:e.id}),children:(0,J.jsx)(mw,{formula:n,id:e.id})}),t[3]=n,t[4]=e.id,t[5]=r):r=t[5],r}var _w=null;function vw(){return _w||=n(()=>import(`./mermaid.core-ZLTnLqVQ.js`).then(e=>{let t=e.default;return t.initialize({startOnLoad:!1,securityLevel:`strict`,theme:`default`,suppressErrorRendering:!0}),t}),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23]),import.meta.url).catch(e=>{throw _w=null,e}),_w}function yw(e){let t=(0,Y.c)(26),n=e.chart??``,r=(0,q.useId)(),i;if(t[0]!==r){let e;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=/:/g,t[2]=e):e=t[2],i=r.replace(e,`_`),t[0]=r,t[1]=i}else i=t[1];let a=`mermaid-${i}`,o;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(o={status:`idle`,svg:``,error:``},t[3]=o):o=t[3];let[s,c]=(0,q.useState)(o),l,u;if(t[4]!==n||t[5]!==a?(l=()=>{if(!n.trim()){c({status:`idle`,svg:``,error:``});return}let e=!1;return c(bw),vw().then(async t=>{try{let r=await t.render(a,n);e||c({status:`ready`,svg:r.svg,error:``})}catch(t){let n=t;e||c({status:`error`,svg:``,error:n instanceof Error?n.message:String(n)})}}).catch(t=>{e||c({status:`error`,svg:``,error:t instanceof Error?t.message:String(t)})}),()=>{e=!0}},u=[n,a],t[4]=n,t[5]=a,t[6]=l,t[7]=u):(l=t[6],u=t[7]),(0,q.useEffect)(l,u),!n.trim()){let n;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,J.jsx)(`span`,{className:`mermaid-empty`,children:` `}),t[8]=n):n=t[8];let r;return t[9]===e.id?r=t[10]:(r=(0,J.jsx)(`div`,{className:`mermaid mermaid-placeholder`,"data-component-type":`mermaid`,id:e.id,children:n}),t[9]=e.id,t[10]=r),r}if(s.status===`error`){let r;t[11]===n?r=t[12]:(r=(0,J.jsx)(`pre`,{className:`mermaid-error-source`,children:n}),t[11]=n,t[12]=r);let i;t[13]===s.error?i=t[14]:(i=(0,J.jsx)(`p`,{className:`mermaid-error-message`,children:s.error}),t[13]=s.error,t[14]=i);let a;return t[15]!==e.id||t[16]!==s.error||t[17]!==r||t[18]!==i?(a=(0,J.jsxs)(`div`,{className:`mermaid mermaid-error`,"data-component-type":`mermaid`,title:s.error,id:e.id,children:[r,i]}),t[15]=e.id,t[16]=s.error,t[17]=r,t[18]=i,t[19]=a):a=t[19],a}let d=`mermaid mermaid-${s.status}`,f;t[20]===s.svg?f=t[21]:(f={__html:s.svg},t[20]=s.svg,t[21]=f);let p;return t[22]!==e.id||t[23]!==d||t[24]!==f?(p=(0,J.jsx)(`div`,{className:d,"data-component-type":`mermaid`,id:e.id,dangerouslySetInnerHTML:f}),t[22]=e.id,t[23]=d,t[24]=f,t[25]=p):p=t[25],p}function bw(e){return{...e,status:`rendering`}}var xw=24,Sw=24,Cw=12,ww=.1;function Tw(e,t,n,r){if(n<=0&&(e===`fit-width`||e===`two-odd`||e===`two-even`)||r<=0&&e===`fit-height`)return 1;switch(e){case`fit-width`:return Math.max(ww,(n-xw)/t.naturalWidth);case`fit-height`:return Math.max(ww,(r-Sw)/t.naturalHeight);case`single`:return 1;case`two-odd`:case`two-even`:return Math.max(ww,((n-xw)/2-Cw)/t.naturalWidth)}}var Ew=600,Dw=.5,Ow=3,kw=.25,Aw=null;function jw(){return Aw||(Aw=(async()=>{let e=await n(()=>import(`./pdf-a35ddrIO.js`),__vite__mapDeps([24,1]),import.meta.url);if(!e.GlobalWorkerOptions.workerSrc){let t=(await n(async()=>{let{default:e}=await import(`./pdf.worker-CM-zAFN-.js`);return{default:e}},[],import.meta.url)).default;e.GlobalWorkerOptions.workerSrc=t}return e})(),Aw.catch(()=>{Aw=null})),Aw}function Mw(e){return e instanceof Error&&e.name===`RenderingCancelledException`}function Nw(e){let t=(0,Y.c)(84),n,r;if(t[0]!==e.anchor){let{height:i,viewerFragment:a}=j(e.anchor);n=i??Ew,r=zw(a),t[0]=e.anchor,t[1]=n,t[2]=r}else n=t[1],r=t[2];let i=r,a=(0,q.useRef)(null),o;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(o=[],t[3]=o):o=t[3];let s=(0,q.useRef)(o),c;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(c=[],t[4]=c):c=t[4];let l=(0,q.useRef)(c),u=(0,q.useRef)(null),d;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(d=[],t[5]=d):d=t[5];let[f,p]=(0,q.useState)(d),[m,h]=(0,q.useState)(!0),[g,_]=(0,q.useState)(null),[v,y]=(0,q.useState)(i??1),[b,x]=(0,q.useState)(String(i??1)),[S,C]=(0,q.useState)(1),[w,T]=(0,q.useState)(`fit-width`),[E,D]=(0,q.useState)(!1),[O,k]=(0,q.useState)(!1),[A,M]=(0,q.useState)(0),[N,P]=(0,q.useState)(0),F=f.length,I,L;t[6]===e.src?(I=t[7],L=t[8]):(I=()=>{if(!e.src){h(!1);return}let t=!1,n=null;return h(!0),_(null),(async()=>{try{let r=await(await jw()).getDocument({url:e.src,isEvalSupported:!1}).promise;if(t){await r.destroy();return}n=r,u.current=r;let i=[];for(let e=1;e<=r.numPages;e++){if(t)return;let n=(await r.getPage(e)).getViewport({scale:1});i.push({pageNumber:e,naturalWidth:n.width,naturalHeight:n.height})}if(t)return;p(i)}catch(e){let n=e;if(t)return;_(n instanceof Error?n.message:`Failed to load PDF`),h(!1)}})(),()=>{t=!0,n&&=(n.destroy(),null),u.current=null}},L=[e.src],t[6]=e.src,t[7]=I,t[8]=L),(0,q.useEffect)(I,L);let R,z;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(R=()=>{let e=a.current;if(!e)return;let t=()=>{M(e.clientWidth),P(e.clientHeight)};t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},z=[],t[9]=R,t[10]=z):(R=t[9],z=t[10]),(0,q.useEffect)(R,z);let B,V;t[11]!==N||t[12]!==A||t[13]!==w||t[14]!==f||t[15]!==S?(B=()=>{let e=u.current;if(!e||f.length===0||A===0)return;let t=!1,n=null;return(async()=>{try{let r=window.devicePixelRatio||1;for(let i of f){if(t)return;let a=s.current[i.pageNumber-1];if(!a)continue;let o=Tw(w,i,A,N)*S,c=await e.getPage(i.pageNumber);if(t)return;let l=c.getViewport({scale:o});a.width=Math.floor(l.width*r),a.height=Math.floor(l.height*r),a.style.width=`${l.width}px`,a.style.height=`${l.height}px`;let u=a.getContext(`2d`);u&&(u.setTransform(r,0,0,r,0,0),n=c.render({canvas:a,canvasContext:u,viewport:l}),await n.promise,n=null)}t||h(!1)}catch(e){let n=e;if(t||Mw(n))return;console.warn(`[Pdf] page render failed:`,n),_(n instanceof Error?n.message:`Failed to render PDF`),h(!1)}})(),()=>{if(t=!0,n){try{n.cancel()}catch{}n=null}}},V=[f,w,S,A,N],t[11]=N,t[12]=A,t[13]=w,t[14]=f,t[15]=S,t[16]=B,t[17]=V):(B=t[16],V=t[17]),(0,q.useEffect)(B,V);let H,U;t[18]!==f||t[19]!==E?(H=()=>{if(!E)return;let e=u.current;if(!e||f.length===0)return;let t=!1,n=null;return(async()=>{try{let r=window.devicePixelRatio||1;for(let i of f){if(t)return;let a=l.current[i.pageNumber-1];if(!a)continue;let o=120/i.naturalWidth,s=await e.getPage(i.pageNumber);if(t)return;let c=s.getViewport({scale:o});a.width=Math.floor(c.width*r),a.height=Math.floor(c.height*r),a.style.width=`${c.width}px`,a.style.height=`${c.height}px`;let u=a.getContext(`2d`);u&&(u.setTransform(r,0,0,r,0,0),n=s.render({canvas:a,canvasContext:u,viewport:c}),await n.promise,n=null)}}catch(e){let t=e;Mw(t)||console.warn(`[Pdf] thumbnail render failed:`,t)}})(),()=>{if(t=!0,n){try{n.cancel()}catch{}n=null}}},U=[E,f],t[18]=f,t[19]=E,t[20]=H,t[21]=U):(H=t[20],U=t[21]),(0,q.useEffect)(H,U);let W,ee;t[22]!==m||t[23]!==i?(W=()=>{if(m||!i)return;let e=a.current,t=s.current[i-1];e&&t&&(e.scrollTop=t.offsetTop-e.offsetTop)},ee=[m,i],t[22]=m,t[23]=i,t[24]=W,t[25]=ee):(W=t[24],ee=t[25]),(0,q.useEffect)(W,ee);let te,ne;t[26]===f?(te=t[27],ne=t[28]):(te=()=>{let e=a.current;if(!e||f.length===0)return;let t=!1,n=()=>{t||(t=!0,requestAnimationFrame(()=>{t=!1;let n=e.scrollTop,r=1;for(let t of f){let i=s.current[t.pageNumber-1];i&&i.offsetTop-e.offsetTop<=n+40&&(r=t.pageNumber)}y(r),x(String(r))}))};return e.addEventListener(`scroll`,n,{passive:!0}),()=>e.removeEventListener(`scroll`,n)},ne=[f],t[26]=f,t[27]=te,t[28]=ne),(0,q.useEffect)(te,ne);let re,ie;t[29]===O?(re=t[30],ie=t[31]):(re=()=>{if(!O)return;let e=e=>{let t=e.target,n=a.current?.closest(`.ok-pdf`);if(!n||!t||!n.contains(t)){k(!1);return}let r=n.querySelector(`.ok-pdf-layout-menu`);r&&!r.contains(t)&&k(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},ie=[O],t[29]=O,t[30]=re,t[31]=ie),(0,q.useEffect)(re,ie);let ae;t[32]===F?ae=t[33]:(ae=e=>{let t=Math.max(1,Math.min(F||1,e));y(t),x(String(t));let n=a.current,r=s.current[t-1];n&&r&&n.scrollTo({top:r.offsetTop-n.offsetTop,behavior:`smooth`})},t[32]=F,t[33]=ae);let oe=ae,se;t[34]!==v||t[35]!==oe||t[36]!==b?(se=()=>{let e=Number.parseInt(b,10);if(Number.isNaN(e)){x(String(v));return}oe(e)},t[34]=v,t[35]=oe,t[36]=b,t[37]=se):se=t[37];let ce=se,le;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(le=()=>C(Lw),t[38]=le):le=t[38];let ue=le,de;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(de=()=>C(Iw),t[39]=de):de=t[39];let fe=de,pe;t[40]===Symbol.for(`react.memo_cache_sentinel`)?(pe=e=>{T(e),k(!1),C(1)},t[40]=pe):pe=t[40];let me=pe,he=`${n}px`,ge;t[41]===he?ge=t[42]:(ge={height:he},t[41]=he,t[42]=ge);let _e;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(_e=()=>D(Fw),t[43]=_e):_e=t[43];let ve=E?`Hide thumbnails`:`Show thumbnails`,ye;t[44]===Symbol.for(`react.memo_cache_sentinel`)?(ye=(0,J.jsx)(Br,{size:14,"aria-hidden":`true`}),t[44]=ye):ye=t[44];let be;t[45]!==E||t[46]!==ve?(be=(0,J.jsx)(`button`,{type:`button`,onClick:_e,"aria-label":ve,"aria-pressed":E,className:`ok-pdf-btn`,title:`Toggle thumbnails`,children:ye}),t[45]=E,t[46]=ve,t[47]=be):be=t[47];let xe=e.title??`PDF`,Se;t[48]===xe?Se=t[49]:(Se=(0,J.jsx)(`span`,{className:`ok-pdf-title`,children:xe}),t[48]=xe,t[49]=Se);let Ce;t[50]!==O||t[51]!==w||t[52]!==b||t[53]!==ce||t[54]!==F||t[55]!==S?(Ce=F>0&&(0,J.jsxs)(`div`,{className:`ok-pdf-controls`,children:[(0,J.jsx)(`form`,{className:`ok-pdf-page-form`,onSubmit:e=>{e.preventDefault(),ce()},children:(0,J.jsx)(`input`,{type:`text`,inputMode:`numeric`,pattern:`[0-9]*`,className:`ok-pdf-page-input`,value:b,onChange:e=>x(e.target.value.replace(/[^0-9]/g,``)),onBlur:ce,"aria-label":`Page number`})}),(0,J.jsxs)(`span`,{className:`ok-pdf-page-of`,children:[`of `,F]}),(0,J.jsx)(`span`,{className:`ok-pdf-divider`,"aria-hidden":`true`}),(0,J.jsx)(`button`,{type:`button`,onClick:fe,disabled:S<=Dw,"aria-label":`Zoom out`,className:`ok-pdf-btn`,title:`Zoom out`,children:(0,J.jsx)(ti,{size:14,"aria-hidden":`true`})}),(0,J.jsxs)(`span`,{className:`ok-pdf-zoom-display`,"aria-live":`polite`,children:[Math.round(S*100),`%`]}),(0,J.jsx)(`button`,{type:`button`,onClick:ue,disabled:S>=Ow,"aria-label":`Zoom in`,className:`ok-pdf-btn`,title:`Zoom in`,children:(0,J.jsx)(ei,{size:14,"aria-hidden":`true`})}),(0,J.jsx)(`span`,{className:`ok-pdf-divider`,"aria-hidden":`true`}),(0,J.jsxs)(`div`,{className:`ok-pdf-layout-menu`,children:[(0,J.jsx)(`button`,{type:`button`,onClick:()=>k(Pw),"aria-label":`Layout options`,"aria-haspopup":`menu`,"aria-expanded":O,className:`ok-pdf-btn`,title:`Layout`,children:(0,J.jsx)(fr,{size:14,"aria-hidden":`true`})}),O&&(0,J.jsxs)(`div`,{role:`menu`,className:`ok-pdf-menu`,children:[(0,J.jsx)(Rw,{label:`Fit width`,active:w===`fit-width`,onSelect:()=>me(`fit-width`)}),(0,J.jsx)(Rw,{label:`Fit height`,active:w===`fit-height`,onSelect:()=>me(`fit-height`)}),(0,J.jsx)(`hr`,{className:`ok-pdf-menu-divider`}),(0,J.jsx)(Rw,{label:`Single page`,active:w===`single`,onSelect:()=>me(`single`)}),(0,J.jsx)(Rw,{label:`Two-page (odd)`,active:w===`two-odd`,onSelect:()=>me(`two-odd`)}),(0,J.jsx)(Rw,{label:`Two-page (even)`,active:w===`two-even`,onSelect:()=>me(`two-even`)})]})]})]}),t[50]=O,t[51]=w,t[52]=b,t[53]=ce,t[54]=F,t[55]=S,t[56]=Ce):Ce=t[56];let we;t[57]!==be||t[58]!==Se||t[59]!==Ce?(we=(0,J.jsxs)(`div`,{className:`ok-pdf-toolbar`,contentEditable:!1,children:[be,Se,Ce]}),t[57]=be,t[58]=Se,t[59]=Ce,t[60]=we):we=t[60];let Te;t[61]!==v||t[62]!==oe||t[63]!==f||t[64]!==E?(Te=E&&(0,J.jsx)(`aside`,{className:`ok-pdf-sidebar`,"aria-label":`Page thumbnails`,children:f.map((e,t)=>(0,J.jsxs)(`button`,{type:`button`,className:`ok-pdf-thumb`,"data-active":v===e.pageNumber||void 0,onClick:()=>oe(e.pageNumber),"aria-label":`Jump to page ${e.pageNumber}`,children:[(0,J.jsx)(`canvas`,{ref:e=>{l.current[t]=e},className:`ok-pdf-thumb-canvas`}),(0,J.jsx)(`span`,{className:`ok-pdf-thumb-num`,children:e.pageNumber})]},e.pageNumber))}),t[61]=v,t[62]=oe,t[63]=f,t[64]=E,t[65]=Te):Te=t[65];let Ee;t[66]===m?Ee=t[67]:(Ee=m&&(0,J.jsx)(`div`,{className:`ok-pdf-loading`,children:`Loading PDF…`}),t[66]=m,t[67]=Ee);let De;t[68]===g?De=t[69]:(De=g&&(0,J.jsxs)(`div`,{className:`ok-pdf-error`,children:[`Failed to load PDF: `,g]}),t[68]=g,t[69]=De);let Oe;t[70]===F?Oe=t[71]:(Oe=Array.from({length:F},(e,t)=>{let n=t+1;return(0,J.jsx)(`canvas`,{ref:e=>{s.current[t]=e},className:`ok-pdf-page`,"aria-label":`Page ${n}`},n)}),t[70]=F,t[71]=Oe);let ke;t[72]!==w||t[73]!==Ee||t[74]!==De||t[75]!==Oe?(ke=(0,J.jsxs)(`div`,{className:`ok-pdf-pages`,ref:a,"data-layout":w,children:[Ee,De,Oe]}),t[72]=w,t[73]=Ee,t[74]=De,t[75]=Oe,t[76]=ke):ke=t[76];let Ae;t[77]!==Te||t[78]!==ke?(Ae=(0,J.jsxs)(`div`,{className:`ok-pdf-body`,children:[Te,ke]}),t[77]=Te,t[78]=ke,t[79]=Ae):Ae=t[79];let je;return t[80]!==ge||t[81]!==we||t[82]!==Ae?(je=(0,J.jsxs)(`div`,{className:`ok-pdf`,style:ge,children:[we,Ae]}),t[80]=ge,t[81]=we,t[82]=Ae,t[83]=je):je=t[83],je}function Pw(e){return!e}function Fw(e){return!e}function Iw(e){return Math.max(Dw,+(e-kw).toFixed(2))}function Lw(e){return Math.min(Ow,+(e+kw).toFixed(2))}function Rw(e){let t=(0,Y.c)(8),n=e.active||void 0,r=e.active?`✓`:``,i;t[0]===r?i=t[1]:(i=(0,J.jsx)(`span`,{className:`ok-pdf-menu-check`,"aria-hidden":`true`,children:r}),t[0]=r,t[1]=i);let a;return t[2]!==e.active||t[3]!==e.label||t[4]!==e.onSelect||t[5]!==n||t[6]!==i?(a=(0,J.jsxs)(`button`,{type:`button`,role:`menuitemradio`,"aria-checked":e.active,className:`ok-pdf-menu-item`,"data-active":n,onClick:e.onSelect,children:[i,e.label]}),t[2]=e.active,t[3]=e.label,t[4]=e.onSelect,t[5]=n,t[6]=i,t[7]=a):a=t[7],a}function zw(e){if(!e)return null;for(let t of e.split(`&`)){let e=t.indexOf(`=`);if(!(e<0)&&t.slice(0,e)===`page`){let n=Number.parseInt(t.slice(e+1),10);if(!Number.isNaN(n)&&n>=1)return n}}return null}function Bw(e){return e!==!1}function Vw(e){let t=(0,Y.c)(14),n=e.src,r=e.title,i;t[0]===e.controls?i=t[1]:(i=Bw(e.controls),t[0]=e.controls,t[1]=i);let a;return t[2]!==e.autoplay||t[3]!==e.height||t[4]!==e.loop||t[5]!==e.muted||t[6]!==e.playsinline||t[7]!==e.poster||t[8]!==e.preload||t[9]!==e.src||t[10]!==e.title||t[11]!==e.width||t[12]!==i?(a=(0,J.jsx)(`video`,{className:`ok-video`,src:n,title:r,controls:i,autoPlay:e.autoplay,muted:e.muted,loop:e.loop,playsInline:e.playsinline,poster:e.poster,preload:e.preload,width:e.width,height:e.height}),t[2]=e.autoplay,t[3]=e.height,t[4]=e.loop,t[5]=e.muted,t[6]=e.playsinline,t[7]=e.poster,t[8]=e.preload,t[9]=e.src,t[10]=e.title,t[11]=e.width,t[12]=i,t[13]=a):a=t[13],a}function Hw(e){let t=(0,Y.c)(2),n;return t[0]===e.children?n=t[1]:(n=(0,J.jsx)(`div`,{className:`prose-no-margin`,children:e.children}),t[0]=e.children,t[1]=n),n}var Uw={Callout:FC,img:pw,video:Vw,audio:kC,Pdf:Nw,Accordion:DC,Math:gw,Mermaid:yw,"*":Hw};function Ww(e){let t=new Set;for(let n of e)n.type===`reactnode`&&t.add(n.name);return t}var Gw=Be(),Kw=new Map;function qw(e){if(e.surface===`compat`){let t=Uw[e.rendersAs];if(!t)throw Error(`Compat descriptor '${e.name}' declares rendersAs: '${e.rendersAs}', but no React component is registered under that name in componentMap. Add the canonical component before registering the compat descriptor.`);return{Component:t,reactNodePropNames:Ww(e.props)}}let t=Uw[e.name];return t?{Component:t,reactNodePropNames:Ww(e.props)}:null}for(let[e,t]of Gw.entries()){let n=qw(t);n&&Kw.set(e,n)}function Jw(e,t){return{...e,Component:t.Component,reactNodePropNames:t.reactNodePropNames}}function Yw(e){let t=Gw.getOrWildcard(e),n=Kw.get(t.name)??Kw.get(`*`);if(!n)throw Error(`No React component registered for ${t.name} (and no '*' wildcard)`);return Jw(t,n)}function Xw(){let e=[];for(let[t,n]of Gw.entries()){if(t===`*`)continue;let r=Kw.get(t);r&&e.push(Jw(n,r))}return e}var Zw=``+new URL(`image-preview-BJSGEOo4.png`,import.meta.url).href,Qw=``+new URL(`video-preview-vLovc_Vy.png`,import.meta.url).href,$w={Callout:{description:`Highlight tips, warnings, and notes.`,props:{type:`note`,title:`Heads up`},children:`Callouts draw attention to key information.`},Accordion:{description:`Collapsible section with a clickable summary.`,props:{title:`Click to expand`,defaultOpen:!0},children:`Hidden content goes here.`},img:{description:`Embed an image with optional alt text.`,props:{src:Zw,alt:`Sample image`}},video:{description:`Embed a video with native player controls.`,props:{controls:!0,poster:Qw}},audio:{description:`Embed an audio file with native player controls.`,props:{controls:!0}},Math:{description:`Block math equation rendered with KaTeX from a LaTeX source string.`,props:{formula:`c = \\pm\\sqrt{a^2 + b^2}`}}};function eT(e){let t={};for(let n of e.props)n.type!==`reactnode`&&`defaultValue`in n&&n.defaultValue!==void 0&&(t[n.name]=n.defaultValue);return t}function tT(e){let t=Yw(e),n=eT(t);return{type:`jsxComponent`,attrs:{componentName:t.name,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!0,props:n},content:t.hasChildren?[{type:`paragraph`}]:void 0}}var nT=new Set;function rT(e){nT.add(e)}function iT(e){if(typeof e==`number`)return nT.delete(e);let t=nT.values().next();return t.done?!1:(nT.delete(t.value),!0)}function aT(e,t,n){n.props.some(e=>!(`hidden`in e&&e.hidden)&&e.type!==`reactnode`)?(rT(t),requestAnimationFrame(()=>{e.commands.setNodeSelection(t)})):n.hasChildren&&e.commands.setTextSelection(t+2)}function oT(e){return t=>{let n=new WeakSet;t.state.doc.descendants(t=>{t.type.name===`jsxComponent`&&t.attrs.componentName===e.name&&n.add(t)}),t.chain().focus().insertContent(tT(e.name)).run();let r=-1;t.state.doc.descendants((t,i)=>{if(r>=0)return!1;t.type.name===`jsxComponent`&&t.attrs.componentName===e.name&&!n.has(t)&&(r=i)}),!(r<0)&&aT(t,r,e)}}function sT(){return Xw().filter(e=>e.surface===`canonical`).map(e=>{let t=$w[e.name],n=e.Component,r=t?{description:t.description,render:()=>(0,J.jsx)(n,{...t.props,children:t.children})}:void 0;return{name:`component-${e.name}`,label:e.displayName??e.name,icon:wC(e.icon),category:e.category??`content`,command:oT(e),aliases:e.searchTerms,description:e.description,preview:r}})}function cT(){return[{name:`component-Tag`,label:`Tag`,icon:Er,category:`content`,aliases:[`#`,`hashtag`,`label`],description:"Inline tag (`#tagname`) for cross-doc linking",command:e=>{let t=new WeakSet;e.state.doc.descendants(e=>{e.type.name===`tag`&&t.add(e)}),e.chain().focus().insertTag(``).run();let n=-1;e.state.doc.descendants((e,r)=>{if(n>=0)return!1;e.type.name===`tag`&&!t.has(e)&&(n=r)}),!(n<0)&&(rT(n),requestAnimationFrame(()=>{e.commands.setNodeSelection(n)}))}}]}var lT=[{name:`heading1`,label:`Heading 1`,icon:Dr,category:`basic`,command:e=>e.chain().focus().toggleHeading({level:1}).run(),aliases:[`h1`],preview:{description:`Big section heading.`,render:()=>(0,J.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight`,children:`Heading 1`})}},{name:`heading2`,label:`Heading 2`,icon:Or,category:`basic`,command:e=>e.chain().focus().toggleHeading({level:2}).run(),aliases:[`h2`],preview:{description:`Medium section heading.`,render:()=>(0,J.jsx)(`h2`,{className:`text-xl font-semibold tracking-tight`,children:`Heading 2`})}},{name:`heading3`,label:`Heading 3`,icon:kr,category:`basic`,command:e=>e.chain().focus().toggleHeading({level:3}).run(),aliases:[`h3`],preview:{description:`Small section heading.`,render:()=>(0,J.jsx)(`h3`,{className:`text-base font-semibold tracking-tight`,children:`Heading 3`})}},{name:`bulletList`,label:`Bullet List`,icon:Fr,category:`basic`,command:e=>e.chain().focus().toggleBulletList().run(),aliases:[`ul`,`unordered`],preview:{description:`Unordered list of items.`,render:()=>(0,J.jsxs)(`ul`,{className:`list-disc pl-5 text-sm leading-7`,children:[(0,J.jsx)(`li`,{children:`First item`}),(0,J.jsx)(`li`,{children:`Second item`})]})}},{name:`orderedList`,label:`Ordered List`,icon:Nr,category:`basic`,command:e=>e.chain().focus().toggleOrderedList().run(),aliases:[`ol`,`numbered`],preview:{description:`Numbered list of items.`,render:()=>(0,J.jsxs)(`ol`,{className:`list-decimal pl-5 text-sm leading-7`,children:[(0,J.jsx)(`li`,{children:`First item`}),(0,J.jsx)(`li`,{children:`Second item`})]})}},{name:`taskList`,label:`Task List`,icon:Pr,category:`basic`,command:e=>e.chain().focus().toggleTaskList().run(),aliases:[`todo`,`checklist`,`checkbox`],preview:{description:`Checklist with checkboxes.`,render:()=>(0,J.jsxs)(`ul`,{className:`space-y-1.5 text-sm`,children:[(0,J.jsxs)(`li`,{className:`flex items-center gap-2`,children:[(0,J.jsx)(`input`,{type:`checkbox`,checked:!0,readOnly:!0,className:`size-3.5`}),(0,J.jsx)(`span`,{className:`text-muted-foreground line-through`,children:`Done`})]}),(0,J.jsxs)(`li`,{className:`flex items-center gap-2`,children:[(0,J.jsx)(`input`,{type:`checkbox`,readOnly:!0,className:`size-3.5`}),(0,J.jsx)(`span`,{children:`To do`})]})]})}},{name:`blockquote`,label:`Quote`,icon:Hr,category:`basic`,command:e=>e.chain().focus().toggleBlockquote().run(),aliases:[`quote`],preview:{description:`Indented blockquote for citations.`,render:()=>(0,J.jsx)(`blockquote`,{className:`border-l-2 border-muted-foreground/40 pl-3 text-sm italic text-muted-foreground`,children:`A pull quote stands out from the surrounding text.`})}},{name:`codeBlock`,label:`Code Block`,icon:yr,category:`basic`,command:e=>e.chain().focus().toggleCodeBlock().run(),aliases:[`code`,`fence`],preview:{description:`Fenced code block with monospace text.`,render:()=>(0,J.jsx)(`pre`,{className:`rounded-md bg-muted px-2.5 py-2 font-mono text-xs leading-5`,children:(0,J.jsx)(`code`,{children:`const greeting = "Hello";
|
|
7
|
-
console.log(greeting);`})})}},{name:`table`,label:`Table`,icon:qr,category:`insert`,command:e=>e.chain().focus().insertTable({rows:3,cols:3,withHeaderRow:!0}).run(),aliases:[`grid`],preview:{description:`Grid of rows and columns with a header row.`,render:()=>(0,J.jsxs)(`table`,{className:`w-full border-collapse text-xs`,children:[(0,J.jsx)(`thead`,{children:(0,J.jsxs)(`tr`,{children:[(0,J.jsx)(`th`,{className:`border border-border bg-muted/50 px-2 py-1 text-left font-semibold`,children:`Name`}),(0,J.jsx)(`th`,{className:`border border-border bg-muted/50 px-2 py-1 text-left font-semibold`,children:`Role`})]})}),(0,J.jsxs)(`tbody`,{children:[(0,J.jsxs)(`tr`,{children:[(0,J.jsx)(`td`,{className:`border border-border px-2 py-1`,children:`Ada`}),(0,J.jsx)(`td`,{className:`border border-border px-2 py-1`,children:`Engineer`})]}),(0,J.jsxs)(`tr`,{children:[(0,J.jsx)(`td`,{className:`border border-border px-2 py-1`,children:`Grace`}),(0,J.jsx)(`td`,{className:`border border-border px-2 py-1`,children:`Admiral`})]})]})]})}},{name:`separator`,label:`Separator`,icon:Rr,category:`insert`,command:e=>e.chain().focus().setHorizontalRule().run(),aliases:[`hr`,`divider`,`rule`],preview:{description:`Horizontal rule that divides sections.`,render:()=>(0,J.jsxs)(`div`,{className:`w-full`,children:[(0,J.jsx)(`p`,{className:`mb-2 text-xs text-muted-foreground`,children:`Above`}),(0,J.jsx)(`hr`,{className:`border-border`}),(0,J.jsx)(`p`,{className:`mt-2 text-xs text-muted-foreground`,children:`Below`})]})}},{name:`footnote`,label:`Footnote`,icon:Kr,category:`insert`,command:e=>{let t=0;e.state.doc.descendants(e=>{if(e.type.name===`footnoteDefinition`){let n=String(e.attrs.identifier??``),r=Number.parseInt(n,10);!Number.isNaN(r)&&r>t&&(t=r)}return!0});let n=String(t+1),r=e.state.doc.content.size;e.chain().focus().insertFootnoteReference(n).insertContentAt(r+1,{type:`footnoteDefinition`,attrs:{identifier:n,label:n},content:[{type:`paragraph`}]}).run()},aliases:[`fn`,`ref`,`[^`],preview:{description:`Insert a footnote reference + matching definition stub.`,render:()=>(0,J.jsxs)(`p`,{className:`text-sm leading-6`,children:[`A line with a footnote`,(0,J.jsx)(`sup`,{className:`footnote-ref`,children:(0,J.jsx)(`a`,{className:`footnote-ref-link`,href:`#fn-1`,children:`[1]`})}),` `,`and a definition shown below.`]})}},{name:`inlineMath`,label:`Inline Math`,icon:Wr,category:`insert`,command:e=>{let t=e.state.selection.from;e.chain().focus().insertMathInline(``).run(),rT(t),requestAnimationFrame(()=>{e.commands.setNodeSelection(t)})},aliases:[`math`,`latex`,`equation`,`formula`,`katex`,`inlinemath`]}];function uT(e,t){if(!t)return e;let n=t.toLowerCase();return e.filter(e=>e.label.toLowerCase().includes(n)||e.name.toLowerCase().includes(n)||e.aliases?.some(e=>e.toLowerCase().includes(n)))}function dT(e){let{$from:t}=e.selection;return t.depth===0?null:{from:t.before(1),to:t.after(1)}}function fT(e,t){let n=dT(e);if(!n)return!1;let{from:r,to:i}=n;if(r===0)return!1;let a=e.doc.resolve(r-1);if(a.depth===0)return!1;let o=a.before(1),s=e.doc.slice(r,i).content,c=e.doc.slice(o,r).content;if(!t)return!0;let l=e.tr;l.replaceWith(o,i,s.append(c));let u=o+1,d=o+s.size,f=e.selection.from-r,p=Math.min(u+f,d);return l.setSelection(D.near(l.doc.resolve(p))),l.scrollIntoView(),t(l),!0}function pT(e,t){let n=dT(e);if(!n)return!1;let{from:r,to:i}=n;if(i>=e.doc.content.size)return!1;let a=e.doc.resolve(i+1);if(a.depth===0)return!1;let o=a.after(1),s=e.doc.slice(r,i).content,c=e.doc.slice(i,o).content;if(!t)return!0;let l=e.tr;l.replaceWith(r,o,c.append(s));let u=r+c.size+1,d=r+c.size+s.size,f=e.selection.from-r,p=Math.min(u+f,d);return l.setSelection(D.near(l.doc.resolve(p))),l.scrollIntoView(),t(l),!0}var mT=rt.create({name:`blockMover`,addKeyboardShortcuts(){return{"Mod-Shift-ArrowUp":({editor:e})=>fT(e.state,e.view.dispatch),"Mod-Shift-ArrowDown":({editor:e})=>pT(e.state,e.view.dispatch)}}}),hT=new z(`y-sync`);new z(`y-undo`),new z(`yjs-cursor`);var gT=new z(`bridgeId`);function _T(e){let t=hT.getState(e);return t?.binding?.mapping?t.binding.mapping:null}function vT(e){let t=_T(e);if(!t)return null;let n=new Map;for(let[e,r]of t)r&&`nodeName`in e&&typeof e.getAttribute==`function`&&n.set(r,e);return n}function yT(e,t){return e?e.get(t)??null:null}var bT=rt.create({name:`bridgeIdPlugin`,priority:1e3,addProseMirrorPlugins(){return[new L({key:gT,state:{init(e,t){let n={yElementToId:new WeakMap,posToId:new Map,counter:0},r=vT(t);return t.doc.descendants((e,t)=>{if(e.type.name!==`jsxComponent`)return;let i=yT(r,e);if(i){let e=`b${++n.counter}`;n.yElementToId.set(i,e),n.posToId.set(t,e)}else{let e=`b${++n.counter}`;n.posToId.set(t,e)}}),n},apply(e,t,n,r){if(!e.docChanged){let n=new Map;for(let[i,a]of t.posToId){let t=e.mapping.map(i);r.doc.nodeAt(t)?.type.name===`jsxComponent`&&n.set(t,a)}return{...t,posToId:n}}let i=new Map,{counter:a}=t,{yElementToId:o}=t,s=vT(r);return r.doc.descendants((n,r)=>{if(n.type.name!==`jsxComponent`)return;let c=yT(s,n);if(c){let e=o.get(c);if(e)i.set(r,e);else{let e=`b${++a}`;o.set(c,e),i.set(r,e)}}else{let n=!1;for(let[a,o]of t.posToId)if(e.mapping.map(a)===r){i.set(r,o),n=!0;break}if(!n){let e=`b${++a}`;i.set(r,e)}}}),{yElementToId:o,posToId:i,counter:a}}}})]}}),xT=new z(`chunkWrapperDecoration`),ST=`ok-chunk-wrapper`,CT=!1;function wT(){return globalThis.CSS===void 0||typeof globalThis.CSS.supports!=`function`?!0:globalThis.CSS.supports(`content-visibility`,`auto`)}var TT=wT();function ET(){return TT?new L({key:xT,props:{decorations(e){let t=[];return e.doc.forEach((e,n)=>{e.isInline||t.push(V.node(n,n+e.nodeSize,{class:ST}))}),t.length===0?null:(CT||(CT=!0,X(`ok/render/cv-auto-skip`,{chunkCount:t.length},{startTime:performance.now(),duration:0})),Ke.create(e.doc,t))}}}):new L({key:xT})}function DT(e){return!!e.getMeta(Qg)}function OT(e,t){let n=Qg.getState(e);return z_(n.doc,n.type,t,n.binding.mapping)||0}function kT(e,t){let n=Qg.getState(e);return L_(t,n.type,n.binding.mapping)}var AT=class e extends Xe{constructor(e,t){super(e),this.yRelativePosition=t}static fromJSON(t){return new e(t.position,t.yRelativePosition)}toJSON(){return{position:this.position,yRelativePosition:this.yRelativePosition}}};function jT(e,t){return new AT(e,kT(t,e))}function MT(e,t,n){let r=e instanceof AT?e.yRelativePosition:null;if(DT(t)&&r)return{position:new AT(OT(n,r),r),mapResult:null};let i=se(e,t),a=i.position.position;return{position:new AT(a,r??kT(n,a)),mapResult:i.mapResult}}var NT=rt.create({name:`collaboration`,priority:1e3,addOptions(){return{document:null,field:`default`,fragment:null,provider:null}},addStorage(){return{isDisabled:!1}},onCreate(){this.editor.extensionManager.extensions.find(e=>e.name===`undoRedo`)&&console.warn(`[tiptap warn]: "@tiptap/extension-collaboration" comes with its own history support and is not compatible with "@tiptap/extension-undo-redo".`)},onBeforeCreate(){this.editor.utils.getUpdatedPosition=(e,t)=>MT(e,t,this.editor.state),this.editor.utils.createMappablePosition=e=>jT(e,this.editor.state)},addCommands(){return{undo:()=>({tr:e,state:t,dispatch:n})=>(e.setMeta(`preventDispatch`,!0),$g.getState(t).undoManager.undoStack.length===0?!1:n?K_(t):!0),redo:()=>({tr:e,state:t,dispatch:n})=>(e.setMeta(`preventDispatch`,!0),$g.getState(t).undoManager.redoStack.length===0?!1:n?q_(t):!0)}},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Mod-y":()=>this.editor.commands.redo(),"Shift-Mod-z":()=>this.editor.commands.redo()}},addProseMirrorPlugins(){let e=this.options.fragment?this.options.fragment:this.options.document.getXmlFragment(this.options.field),t=X_(this.options.yUndoOptions),n=t.spec.view;return t.spec.view=e=>{let{undoManager:t}=$g.getState(e.state);t.restore&&=(t.restore(),()=>{});let r=n?n(e):void 0;return{destroy:()=>{let e=t.trackedOrigins.has(t),n=t._observers;t.restore=()=>{e&&t.trackedOrigins.add(t),t.doc.on(`afterTransaction`,t.afterTransactionHandler),t._observers=n},r?.destroy&&r.destroy()}}},[o_(e,{...this.options.ySyncOptions,onFirstRender:this.options.onFirstRender}),t,this.editor.options.enableContentCheck&&new L({key:new z(`filterInvalidContent`),filterTransaction:t=>{if(!DT(t))return!0;if(this.storage.isDisabled)return!1;if(!t.docChanged)return!0;try{return t.doc.check(),!0}catch(t){return this.storage.isDisabled=!0,this.editor.emit(`contentError`,{error:t,editor:this.editor,disableCollaboration:()=>{var t;(t=e.doc)==null||t.destroy()}}),!1}}})].filter(Boolean)}});function PT(e){if(!e.length)return Ke.empty;let t=[],n=e[0].$from.node(0);return e.forEach(e=>{let n=e.$from.pos,r=e.$from.nodeAfter;r&&t.push(V.node(n,n+r.nodeSize,{class:`ProseMirror-selectednoderange`}))}),Ke.create(n,t)}function FT(e,t,n){let r=n.isText||n.isAtom?0:1;return{start:e+r,end:e+t-r}}function IT(e,t,n,r={}){let i=[],a=e.node(0),{extendOnBoundaryOverlap:o=!0}=r;typeof n==`number`&&n>=0||(n=e.sameParent(t)?Math.max(0,e.sharedDepth(t.pos)-1):e.sharedDepth(t.pos));let s=new d(e,t,n),c=s.depth===0?0:a.resolve(s.start).posAtIndex(0);return s.parent.forEach((n,r)=>{let l=c+r,u=l+n.nodeSize,d=FT(l,n.nodeSize,n),f=o?t.pos>=d.start&&e.pos<=d.end:t.pos>d.start&&e.pos<d.end;if(l<s.start||l>=s.end||!f)return;let p=new x(a.resolve(l),a.resolve(u));i.push(p)}),i}var LT=class e{constructor(e,t){this.anchor=e,this.head=t}map(t){return new e(t.map(this.anchor),t.map(this.head))}resolve(e){return new RT(e.resolve(this.anchor),e.resolve(this.head))}},RT=class e extends W{constructor(e,t,n,r=1){let{doc:i}=e,a=e===t,o=e.pos===i.content.size&&t.pos===i.content.size,s=a&&!o?i.resolve(t.pos+(r>0?1:-1)):t,c=a&&o?i.resolve(e.pos-(r>0?1:-1)):e,l=IT(c.min(s),c.max(s),n),u=s.pos>=e.pos?l[0].$from:l[l.length-1].$to,d=s.pos>=e.pos?l[l.length-1].$to:l[0].$from;super(u,d,l),this.depth=n}get $to(){return this.ranges[this.ranges.length-1].$to}eq(t){return t instanceof e&&t.$from.pos===this.$from.pos&&t.$to.pos===this.$to.pos}map(t,n){return new e(t.resolve(n.map(this.anchor)),t.resolve(n.map(this.head)))}toJSON(){return{type:`nodeRange`,anchor:this.anchor,head:this.head}}get isForwards(){return this.head>=this.anchor}get isBackwards(){return!this.isForwards}extendBackwards(){let{doc:t}=this.$from;if(this.isForwards&&this.ranges.length>1){let t=this.ranges.slice(0,-1),n=t[0].$from,r=t[t.length-1].$to;return new e(n,r,this.depth)}let n=this.ranges[0],r=t.resolve(Math.max(0,n.$from.pos-1));return new e(this.$anchor,r,this.depth)}extendForwards(){let{doc:t}=this.$from;if(this.isBackwards&&this.ranges.length>1){let t=this.ranges.slice(1),n=t[0].$from,r=t[t.length-1].$to;return new e(r,n,this.depth)}let n=this.ranges[this.ranges.length-1],r=t.resolve(Math.min(t.content.size,n.$to.pos+1));return new e(this.$anchor,r,this.depth)}static fromJSON(t,n){return new e(t.resolve(n.anchor),t.resolve(n.head))}static create(e,t,n,r,i=1){return new this(e.resolve(t),e.resolve(n),r,i)}getBookmark(){return new LT(this.anchor,this.head)}};RT.prototype.visible=!1;function zT(e){return e instanceof RT}rt.create({name:`nodeRange`,addOptions(){return{depth:void 0,key:`Mod`}},addKeyboardShortcuts(){return{"Shift-ArrowUp":({editor:e})=>{let{depth:t}=this.options,{view:n,state:r}=e,{doc:i,selection:a,tr:o}=r,{anchor:s,head:c}=a;if(!zT(a)){let e=RT.create(i,s,c,t,-1);return o.setSelection(e),n.dispatch(o),!0}let l=a.extendBackwards();return o.setSelection(l),n.dispatch(o),!0},"Shift-ArrowDown":({editor:e})=>{let{depth:t}=this.options,{view:n,state:r}=e,{doc:i,selection:a,tr:o}=r,{anchor:s,head:c}=a;if(!zT(a)){let e=RT.create(i,s,c,t);return o.setSelection(e),n.dispatch(o),!0}let l=a.extendForwards();return o.setSelection(l),n.dispatch(o),!0},"Mod-a":({editor:e})=>{let{depth:t}=this.options,{view:n,state:r}=e,{doc:i,tr:a}=r,o=RT.create(i,0,i.content.size,t);return a.setSelection(o),n.dispatch(a),!0}}},onSelectionUpdate(){let{selection:e}=this.editor.state;zT(e)&&this.editor.view.dom.classList.add(`ProseMirror-noderangeselection`)},addProseMirrorPlugins(){let e=!1,t=!1;return[new L({key:new z(`nodeRange`),props:{attributes:()=>e?{class:`ProseMirror-noderangeselection`}:{class:``},handleDOMEvents:{mousedown:(e,n)=>{let{key:r}=this.options,i=/Mac/.test(navigator.platform),a=!!n.shiftKey,o=!!n.ctrlKey,s=!!n.altKey,c=!!n.metaKey;return(r==null||r===`Shift`&&a||r===`Control`&&o||r===`Alt`&&s||r===`Meta`&&c||r===`Mod`&&(i?c:o))&&(t=!0),t&&document.addEventListener(`mouseup`,()=>{t=!1;let{state:n}=e,{doc:r,selection:i,tr:a}=n,{$anchor:o,$head:s}=i;if(o.sameParent(s))return;let c=RT.create(r,o.pos,s.pos,this.options.depth);a.setSelection(c),e.dispatch(a)},{once:!0}),!1}},decorations:n=>{let{selection:r}=n,i=zT(r);if(e=!1,!t)return i?(e=!0,PT(r.ranges)):null;let{$from:a,$to:o}=r;if(!i&&a.sameParent(o))return null;let s=IT(a,o,this.options.depth);return s.length?(e=!0,PT(s)):null}}})]}});function BT(e){let t=``,n=getComputedStyle(e);for(let e=0;e<n.length;e+=1)t+=`${n[e]}:${n.getPropertyValue(n[e])};`;return t}function VT(e){let t=e.cloneNode(!0),n=[e,...Array.from(e.getElementsByTagName(`*`))],r=[t,...Array.from(t.getElementsByTagName(`*`))];return n.forEach((e,t)=>{r[t].style.cssText=BT(e)}),t}var HT=[{id:`listItemFirstChild`,evaluate:({parent:e,isFirst:t})=>t&&e&&[`listItem`,`taskItem`].includes(e.type.name)?1e3:0},{id:`listWrapperDeprioritize`,evaluate:({node:e})=>{let t=[`listItem`,`taskItem`],n=e.firstChild;return n&&t.includes(n.type.name)?1e3:0}},{id:`tableStructure`,evaluate:({node:e,parent:t})=>[`tableRow`,`tableCell`,`tableHeader`].includes(e.type.name)||t&&t.type.name===`tableHeader`?1e3:0},{id:`inlineContent`,evaluate:({node:e})=>e.isInline||e.isText?1e3:0}],UT={edges:[`left`,`top`],threshold:12,strength:500};function WT(e){return e===void 0||e===`left`?{...UT}:e===`right`?{edges:[`right`,`top`],threshold:12,strength:500}:e===`both`?{edges:[`left`,`right`,`top`],threshold:12,strength:500}:e===`none`?{edges:[],threshold:0,strength:0}:{...UT,...e}}function GT(e,t,n){if(n.edges.length===0)return!1;let r=t.getBoundingClientRect(),{threshold:i,edges:a}=n;return a.some(t=>t===`left`?e.x-r.left<i:t===`right`?r.right-e.x<i:t===`top`?e.y-r.top<i:t===`bottom`?r.bottom-e.y<i:!1)}function KT(e,t,n,r){return!t||n.edges.length===0?0:GT(e,t,n)?n.strength*r:0}var qT=1e3;function JT(e,t,n,r){let i=qT,a=!1;if(t.every(t=>{let n=t.evaluate(e);return i-=n,i<=0?(a=!0,!1):!0}),a)return-1;let o=e.view.nodeDOM(e.pos);return i-=KT(r,o,n,e.depth),i<=0?-1:i}function YT(e,t,n){return Array.from({length:t},(e,n)=>t-1-n).some(t=>n.includes(e.node(t).type.name))}function XT(e,t,n){if(!Number.isFinite(t.x)||!Number.isFinite(t.y))return null;let r=e.posAtCoords({left:t.x,top:t.y});if(!r)return null;let{doc:i}=e.state,a=i.resolve(r.pos),o=[];n.defaultRules&&o.push(...HT),o.push(...n.rules);let s=Array.from({length:a.depth},(e,t)=>a.depth-t).map(r=>{let i=a.node(r),s=a.before(r);if(n.allowedContainers&&r>0&&!YT(a,r,n.allowedContainers))return null;let c=r>0?a.node(r-1):null,l=r>0?a.index(r-1):0,u=c?c.childCount:1,d=JT({node:i,pos:s,depth:r,parent:c,index:l,isFirst:l===0,isLast:l===u-1,$pos:a,view:e},o,n.edgeDetection,t);return d<0?null:{node:i,pos:s,depth:r,score:d,dom:e.nodeDOM(s)}}).filter(e=>e!==null),c=a.nodeAfter;if(c&&c.isAtom&&!c.isInline){let i=r.pos,l=a.depth+1,u=a.parent,d=a.index(),f=u.childCount,p=!0;if(n.allowedContainers&&(p=YT(a,l,n.allowedContainers)),p){let r=JT({node:c,pos:i,depth:l,parent:u,index:d,isFirst:d===0,isLast:d===f-1,$pos:a,view:e},o,n.edgeDetection,t);if(r>=0){let t=e.nodeDOM(i);t&&s.push({node:c,pos:i,depth:l,score:r,dom:t})}}}if(s.length===0)return null;s.sort((e,t)=>t.score===e.score?t.depth-e.depth:t.score-e.score);let l=s[0];return l.dom?{node:l.node,pos:l.pos,dom:l.dom}:null}function ZT(e,t){let n=e;for(;n?.parentElement&&n.parentElement!==t.dom;)n=n.parentElement;return n?.parentElement===t.dom?n:void 0}function QT(e){return Number.isFinite(e.top)&&Number.isFinite(e.bottom)&&Number.isFinite(e.left)&&Number.isFinite(e.right)&&e.width>0&&e.height>0}function $T(e,t,n,r=5){if(!Number.isFinite(t)||!Number.isFinite(n))return null;let i=e.dom,a=i.firstElementChild,o=i.lastElementChild;if(!a||!o)return null;let s=a.getBoundingClientRect(),c=o.getBoundingClientRect();if(!QT(s)||!QT(c))return null;let l=Math.min(Math.max(s.top+r,n),c.bottom-r),u=.5,d=Math.abs(s.left-c.left)<u,f=Math.abs(s.right-c.right)<u,p=s;d&&f&&(p=s);let m=Math.min(Math.max(p.left+r,t),p.right-r);return!Number.isFinite(m)||!Number.isFinite(l)?null:{x:m,y:l}}var eE=e=>{let{x:t,y:n,editor:r,nestedOptions:i}=e,{view:a,state:o}=r,s=$T(a,t,n,5);if(!s)return{resultElement:null,resultNode:null,pos:null};let{x:c,y:l}=s;if(i?.enabled){let e=XT(a,{x:c,y:l},i);return e?{resultElement:e.dom,resultNode:e.node,pos:e.pos}:{resultElement:null,resultNode:null,pos:null}}let u=a.root.elementsFromPoint(c,l),d;if(Array.prototype.some.call(u,e=>{if(!a.dom.contains(e))return!1;let t=ZT(e,a);return t?(d=t,!0):!1}),!d){let e=a.posAtCoords({left:c,top:l});if(e){let t=o.doc.resolve(e.pos),n=Math.min(t.depth,1),r=n>0?t.before(n):t.pos,i=o.doc.nodeAt(r);if(i){let e=a.nodeDOM(r);return{resultElement:e instanceof HTMLElement?e:null,resultNode:i,pos:r}}}return{resultElement:null,resultNode:null,pos:null}}let f;try{f=a.posAtDOM(d,0)}catch{return{resultElement:null,resultNode:null,pos:null}}let p=o.doc.nodeAt(f);if(!p){let e=o.doc.resolve(f),t=e.parent;return{resultElement:d,resultNode:t,pos:e.start()}}return{resultElement:d,resultNode:p,pos:f}};function tE(e,t){let n=null,r=e.nodeDOM(t);if(r instanceof Element)n=r;else{let{node:r,offset:i}=e.domAtPos(t),a=r.childNodes[i];a instanceof Element?n=a:r instanceof Element?n=r:r.nodeType===Node.TEXT_NODE&&r.parentElement&&(n=r.parentElement)}return(n?getComputedStyle(n).direction:getComputedStyle(e.dom).direction)||`ltr`}function nE(e){var t;(t=e.parentNode)==null||t.removeChild(e)}function rE(e,t,n,r){let{doc:i}=t.view.state;if(n?.enabled&&r?.node&&r.pos>=0){let e=r.pos,t=r.pos+r.node.nodeSize;return[{$from:i.resolve(e),$to:i.resolve(t)}]}let a=eE({editor:t,x:e.clientX,y:e.clientY,direction:`right`,nestedOptions:n});if(!a.resultNode||a.pos===null)return[];let o=a.resultNode.isText||a.resultNode.isAtom?0:-1;return IT(i.resolve(a.pos),i.resolve(a.pos+a.resultNode.nodeSize+o),0,{extendOnBoundaryOverlap:!1})}function iE(e,t,n,r){let{view:i}=t;if(!e.dataTransfer)return;let{empty:a,$from:o,$to:s}=i.state.selection,c=rE(e,t,n,r),l=IT(o,s,0,{extendOnBoundaryOverlap:!1}),u=l.some(e=>c.find(t=>t.$from===e.$from&&t.$to===e.$to)),d=a||!u?c:l;if(!d.length)return;let{tr:f}=i.state,p=document.createElement(`div`),m=d[0].$from.pos,h=d[d.length-1].$to.pos;p.setAttribute(`dir`,tE(i,m));let g=n?.enabled&&r?.node,_,v;g?(_=i.state.doc.slice(m,h),v=We.create(i.state.doc,m)):(v=RT.create(i.state.doc,m,h),_=v.content()),d.forEach(e=>{let t=VT(i.nodeDOM(e.$from.pos));p.append(t)}),p.style.position=`absolute`,p.style.top=`-10000px`,document.body.append(p),e.dataTransfer.clearData();let y=p.getBoundingClientRect(),b=e.clientX-y.left;e.dataTransfer.setDragImage(p,Math.max(0,Math.min(b,y.width)),0);let x=!1,S=()=>{x||(x=!0,nE(p),document.removeEventListener(`drop`,S),document.removeEventListener(`dragend`,S))},C=v instanceof We?v:void 0;i.dragging={slice:_,move:!0,node:C},f.setSelection(v),i.dispatch(f),document.addEventListener(`drop`,S),document.addEventListener(`dragend`,S)}var aE=(e,t)=>{let n=e.resolve(t),{depth:r}=n;return r===0?t:n.pos-n.parentOffset-1},oE=(e,t)=>{let n=e.nodeAt(t),r=e.resolve(t),{depth:i}=r,a=n;for(;i>0;){let e=r.node(i);--i,i===0&&(a=e)}return a},sE=(e,t)=>{let n=Qg.getState(e);return n?L_(t,n.type,n.binding.mapping):null},cE=(e,t)=>{let n=Qg.getState(e);return n?z_(n.doc,n.type,t,n.binding.mapping)||0:-1},lE=(e,t)=>{let n=t;for(;n?.parentNode&&n.parentNode!==e.dom;)n=n.parentNode;return n},uE=new z(`dragHandle`),dE=({pluginKey:e=uE,element:t,editor:n,computePositionConfig:r,getReferencedVirtualElement:i,onNodeChange:a,onElementDragStart:o,onElementDragEnd:c,nestedOptions:l})=>{let u=document.createElement(`div`),d=!1,f=null,m=-1,h,g=null,_=null;function v(){t&&(t.style.visibility=`hidden`,t.style.pointerEvents=`none`)}function y(){if(t){if(!n.isEditable){v();return}t.style.visibility=``,t.style.pointerEvents=`auto`}}function b(e){s(i?.()||{getBoundingClientRect:()=>e.getBoundingClientRect()},t,r).then(e=>{Object.assign(t.style,{position:e.strategy,left:`${e.x}px`,top:`${e.y}px`})})}function x(e){o?.(e),iE(e,n,l,{node:f,pos:m}),t&&(t.dataset.dragging=`true`),setTimeout(()=>{t&&(t.style.pointerEvents=`none`)},0)}function S(e){c?.(e),v(),t&&(t.style.pointerEvents=`auto`,t.dataset.dragging=`false`)}function C(){if(p()){let e=n.view.dom;requestAnimationFrame(()=>{e.isContentEditable&&(e.contentEditable=`false`,e.contentEditable=`true`)})}}return u.appendChild(t),{unbind(){t.removeEventListener(`dragstart`,x),t.removeEventListener(`dragend`,S),document.removeEventListener(`drop`,C),g&&(cancelAnimationFrame(g),g=null,_=null)},plugin:new L({key:typeof e==`string`?new z(e):e,state:{init(){return{locked:!1}},apply(e,r,i,o){let s=e.getMeta(`lockDragHandle`),c=e.getMeta(`hideDragHandle`);if(s!==void 0&&(d=s),c)return v(),d=!1,f=null,m=-1,a?.({editor:n,node:null,pos:-1}),r;if(e.docChanged&&m!==-1&&t)if(DT(e)){let e=cE(o,h);e!==m&&(m=e)}else{let t=e.mapping.map(m);t!==m&&(m=t,h=sE(o,m))}return r}},view:e=>{var r;return t.draggable=!0,t.style.pointerEvents=`auto`,t.dataset.dragging=`false`,(r=n.view.dom.parentElement)==null||r.appendChild(u),u.style.pointerEvents=`none`,u.style.position=`absolute`,u.style.top=`0`,u.style.left=`0`,t.addEventListener(`dragstart`,x),t.addEventListener(`dragend`,S),document.addEventListener(`drop`,C),{update(r,i){if(!t)return;if(!n.isEditable){v();return}if(d?t.draggable=!1:t.draggable=!0,e.state.doc.eq(i.doc)||m===-1)return;let o=e.nodeDOM(m);if(o=lE(e,o),o===e.dom||o?.nodeType!==1)return;let s=e.posAtDOM(o,0),c=oE(n.state.doc,s),l=aE(n.state.doc,s);f=c,m=l,h=sE(e.state,m),a?.({editor:n,node:f,pos:m}),b(o)},destroy(){t.removeEventListener(`dragstart`,x),t.removeEventListener(`dragend`,S),document.removeEventListener(`drop`,C),g&&(cancelAnimationFrame(g),g=null,_=null),t&&nE(u)}}},props:{handleDOMEvents:{keydown(e){return!t||d?!1:e.hasFocus()?(v(),f=null,m=-1,a?.({editor:n,node:null,pos:-1}),!1):!1},mouseleave(e,t){return d||t.target&&!u.contains(t.relatedTarget)&&(v(),f=null,m=-1,a?.({editor:n,node:null,pos:-1})),!1},mousemove(e,r){return!t||d||(_={x:r.clientX,y:r.clientY},g)||(g=requestAnimationFrame(()=>{if(g=null,!_)return;let{x:t,y:r}=_;_=null;let i=eE({x:t,y:r,direction:`right`,editor:n,nestedOptions:l});if(!i.resultElement)return;let o=i.resultElement,s=i.resultNode,c=i.pos;if(!l?.enabled){if(o=lE(e,o),o===e.dom||o?.nodeType!==1)return;let t=e.posAtDOM(o,0);s=oE(n.state.doc,t),c=aE(n.state.doc,t)}s!==f&&(f=s,m=c??-1,h=sE(e.state,m),a?.({editor:n,node:f,pos:m}),b(o),y())})),!1}}}})}};function fE(e){return e===!1||e===void 0?{enabled:!1,rules:[],defaultRules:!0,allowedContainers:void 0,edgeDetection:WT(`none`)}:e===!0?{enabled:!0,rules:[],defaultRules:!0,allowedContainers:void 0,edgeDetection:WT(`left`)}:{enabled:!0,rules:e.rules??[],defaultRules:e.defaultRules??!0,allowedContainers:e.allowedContainers,edgeDetection:WT(e.edgeDetection)}}var pE={placement:`left-start`,strategy:`absolute`};rt.create({name:`dragHandle`,addOptions(){return{render(){let e=document.createElement(`div`);return e.classList.add(`drag-handle`),e},computePositionConfig:{},locked:!1,onNodeChange:()=>null,onElementDragStart:void 0,onElementDragEnd:void 0,nested:!1}},addCommands(){return{lockDragHandle:()=>({editor:e})=>(this.options.locked=!0,e.commands.setMeta(`lockDragHandle`,this.options.locked)),unlockDragHandle:()=>({editor:e})=>(this.options.locked=!1,e.commands.setMeta(`lockDragHandle`,this.options.locked)),toggleDragHandle:()=>({editor:e})=>(this.options.locked=!this.options.locked,e.commands.setMeta(`lockDragHandle`,this.options.locked))}},addProseMirrorPlugins(){let e=this.options.render(),t=fE(this.options.nested);return[dE({computePositionConfig:{...pE,...this.options.computePositionConfig},getReferencedVirtualElement:this.options.getReferencedVirtualElement,element:e,editor:this.editor,onNodeChange:this.options.onNodeChange,onElementDragStart:this.options.onElementDragStart,onElementDragEnd:this.options.onElementDragEnd,nestedOptions:t}).plugin]}});var mE=e(t(((e,t)=>{(function(e){let n=`(0?\\d+|0x[a-f0-9]+)`,r={fourOctet:RegExp(`^${n}\\.${n}\\.${n}\\.${n}$`,`i`),threeOctet:RegExp(`^${n}\\.${n}\\.${n}$`,`i`),twoOctet:RegExp(`^${n}\\.${n}$`,`i`),longValue:RegExp(`^${n}$`,`i`)},i=RegExp(`^0[0-7]+$`,`i`),a=RegExp(`^0x[a-f0-9]+$`,`i`),o=`%[0-9a-z]{1,}`,s=`(?:[0-9a-f]+::?)+`,c={zoneIndex:new RegExp(o,`i`),native:RegExp(`^(::)?(${s})?([0-9a-f]+)?(::)?(${o})?$`,`i`),deprecatedTransitional:RegExp(`^(?:::)(${n}\\.${n}\\.${n}\\.${n}(${o})?)$`,`i`),transitional:RegExp(`^((?:${s})|(?:::)(?:${s})?)${n}\\.${n}\\.${n}\\.${n}(${o})?$`,`i`)};function l(e,t){if(e.indexOf(`::`)!==e.lastIndexOf(`::`))return null;let n=0,r=-1,i=(e.match(c.zoneIndex)||[])[0],a,o;for(i&&(i=i.substring(1),e=e.replace(/%.+$/,``));(r=e.indexOf(`:`,r+1))>=0;)n++;if(e.substr(0,2)===`::`&&n--,e.substr(-2,2)===`::`&&n--,n>t)return null;for(o=t-n,a=`:`;o--;)a+=`0:`;return e=e.replace(`::`,a),e[0]===`:`&&(e=e.slice(1)),e[e.length-1]===`:`&&(e=e.slice(0,-1)),t=(function(){let t=e.split(`:`),n=[];for(let e=0;e<t.length;e++)n.push(parseInt(t[e],16));return n})(),{parts:t,zoneId:i}}function u(e,t,n,r){if(e.length!==t.length)throw Error(`ipaddr: cannot match CIDR for objects with different lengths`);let i=0,a;for(;r>0;){if(a=n-r,a<0&&(a=0),e[i]>>a!==t[i]>>a)return!1;r-=n,i+=1}return!0}function d(e){if(a.test(e))return parseInt(e,16);if(e[0]===`0`&&!isNaN(parseInt(e[1],10))){if(i.test(e))return parseInt(e,8);throw Error(`ipaddr: cannot parse ${e} as octal`)}return parseInt(e,10)}function f(e,t){for(;e.length<t;)e=`0${e}`;return e}let p={};p.IPv4=(function(){function e(e){if(e.length!==4)throw Error(`ipaddr: ipv4 octet count should be 4`);let t,n;for(t=0;t<e.length;t++)if(n=e[t],!(0<=n&&n<=255))throw Error(`ipaddr: ipv4 octet should fit in 8 bits`);this.octets=e}return e.prototype.SpecialRanges={unspecified:[[new e([0,0,0,0]),8]],broadcast:[[new e([255,255,255,255]),32]],multicast:[[new e([224,0,0,0]),4]],linkLocal:[[new e([169,254,0,0]),16]],loopback:[[new e([127,0,0,0]),8]],carrierGradeNat:[[new e([100,64,0,0]),10]],private:[[new e([10,0,0,0]),8],[new e([172,16,0,0]),12],[new e([192,168,0,0]),16]],reserved:[[new e([192,0,0,0]),24],[new e([192,0,2,0]),24],[new e([192,88,99,0]),24],[new e([198,18,0,0]),15],[new e([198,51,100,0]),24],[new e([203,0,113,0]),24],[new e([240,0,0,0]),4]],as112:[[new e([192,175,48,0]),24],[new e([192,31,196,0]),24]],amt:[[new e([192,52,193,0]),24]]},e.prototype.kind=function(){return`ipv4`},e.prototype.match=function(e,t){let n;if(t===void 0&&(n=e,e=n[0],t=n[1]),e.kind()!==`ipv4`)throw Error(`ipaddr: cannot match ipv4 address with non-ipv4 one`);return u(this.octets,e.octets,8,t)},e.prototype.prefixLengthFromSubnetMask=function(){let e=0,t=!1,n={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},r,i,a;for(r=3;r>=0;--r)if(i=this.octets[r],i in n){if(a=n[i],t&&a!==0)return null;a!==8&&(t=!0),e+=a}else return null;return 32-e},e.prototype.range=function(){return p.subnetMatch(this,this.SpecialRanges)},e.prototype.toByteArray=function(){return this.octets.slice(0)},e.prototype.toIPv4MappedAddress=function(){return p.IPv6.parse(`::ffff:${this.toString()}`)},e.prototype.toNormalizedString=function(){return this.toString()},e.prototype.toString=function(){return this.octets.join(`.`)},e})(),p.IPv4.broadcastAddressFromCIDR=function(e){try{let t=this.parseCIDR(e),n=t[0].toByteArray(),r=this.subnetMaskFromPrefixLength(t[1]).toByteArray(),i=[],a=0;for(;a<4;)i.push(parseInt(n[a],10)|parseInt(r[a],10)^255),a++;return new this(i)}catch{throw Error(`ipaddr: the address does not have IPv4 CIDR format`)}},p.IPv4.isIPv4=function(e){return this.parser(e)!==null},p.IPv4.isValid=function(e){try{return new this(this.parser(e)),!0}catch{return!1}},p.IPv4.isValidCIDR=function(e){try{return this.parseCIDR(e),!0}catch{return!1}},p.IPv4.isValidFourPartDecimal=function(e){return!!(p.IPv4.isValid(e)&&e.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},p.IPv4.isValidCIDRFourPartDecimal=function(e){let t=e.match(/^(.+)\/(\d+)$/);return!p.IPv4.isValidCIDR(e)||!t?!1:p.IPv4.isValidFourPartDecimal(t[1])},p.IPv4.networkAddressFromCIDR=function(e){let t,n,r,i,a;try{for(t=this.parseCIDR(e),r=t[0].toByteArray(),a=this.subnetMaskFromPrefixLength(t[1]).toByteArray(),i=[],n=0;n<4;)i.push(parseInt(r[n],10)&parseInt(a[n],10)),n++;return new this(i)}catch{throw Error(`ipaddr: the address does not have IPv4 CIDR format`)}},p.IPv4.parse=function(e){let t=this.parser(e);if(t===null)throw Error(`ipaddr: string is not formatted like an IPv4 Address`);return new this(t)},p.IPv4.parseCIDR=function(e){let t;if(t=e.match(/^(.+)\/(\d+)$/)){let e=parseInt(t[2]);if(e>=0&&e<=32){let n=[this.parse(t[1]),e];return Object.defineProperty(n,`toString`,{value:function(){return this.join(`/`)}}),n}}throw Error(`ipaddr: string is not formatted like an IPv4 CIDR range`)},p.IPv4.parser=function(e){let t,n,i;if(t=e.match(r.fourOctet))return(function(){let e=t.slice(1,6),r=[];for(let t=0;t<e.length;t++)n=e[t],r.push(d(n));return r})();if(t=e.match(r.longValue)){if(i=d(t[1]),i>4294967295||i<0)throw Error(`ipaddr: address outside defined range`);return(function(){let e=[],t;for(t=0;t<=24;t+=8)e.push(i>>t&255);return e})().reverse()}else if(t=e.match(r.twoOctet))return(function(){let e=t.slice(1,4),n=[];if(i=d(e[1]),i>16777215||i<0)throw Error(`ipaddr: address outside defined range`);return n.push(d(e[0])),n.push(i>>16&255),n.push(i>>8&255),n.push(i&255),n})();else if(t=e.match(r.threeOctet))return(function(){let e=t.slice(1,5),n=[];if(i=d(e[2]),i>65535||i<0)throw Error(`ipaddr: address outside defined range`);return n.push(d(e[0])),n.push(d(e[1])),n.push(i>>8&255),n.push(i&255),n})();else return null},p.IPv4.subnetMaskFromPrefixLength=function(e){if(e=parseInt(e),e<0||e>32)throw Error(`ipaddr: invalid IPv4 prefix length`);let t=[0,0,0,0],n=0,r=Math.floor(e/8);for(;n<r;)t[n]=255,n++;return r<4&&(t[r]=2**(e%8)-1<<8-e%8),new this(t)},p.IPv6=(function(){function e(e,t){let n,r;if(e.length===16)for(this.parts=[],n=0;n<=14;n+=2)this.parts.push(e[n]<<8|e[n+1]);else if(e.length===8)this.parts=e;else throw Error(`ipaddr: ipv6 part count should be 8 or 16`);for(n=0;n<this.parts.length;n++)if(r=this.parts[n],!(0<=r&&r<=65535))throw Error(`ipaddr: ipv6 part should fit in 16 bits`);t&&(this.zoneId=t)}return e.prototype.SpecialRanges={unspecified:[new e([0,0,0,0,0,0,0,0]),128],linkLocal:[new e([65152,0,0,0,0,0,0,0]),10],multicast:[new e([65280,0,0,0,0,0,0,0]),8],loopback:[new e([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new e([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new e([0,0,0,0,0,65535,0,0]),96],deprecatedSiteLocal:[new e([65216,0,0,0,0,0,0,0]),10],discard:[new e([256,0,0,0,0,0,0,0]),64],rfc6145:[new e([0,0,0,0,65535,0,0,0]),96],rfc6052:[[new e([100,65435,0,0,0,0,0,0]),96],[new e([100,65435,1,0,0,0,0,0]),48]],"6to4":[new e([8194,0,0,0,0,0,0,0]),16],teredo:[new e([8193,0,0,0,0,0,0,0]),32],benchmarking:[new e([8193,2,0,0,0,0,0,0]),48],amt:[new e([8193,3,0,0,0,0,0,0]),32],as112v6:[[new e([8193,4,274,0,0,0,0,0]),48],[new e([9760,79,32768,0,0,0,0,0]),48]],deprecatedOrchid:[new e([8193,16,0,0,0,0,0,0]),28],orchid2:[new e([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new e([8193,48,0,0,0,0,0,0]),28],segmentRouting:[new e([24320,0,0,0,0,0,0,0]),16],reserved:[[new e([8193,0,0,0,0,0,0,0]),23],[new e([8193,3512,0,0,0,0,0,0]),32],[new e([16383,0,0,0,0,0,0,0]),20]]},e.prototype.isIPv4MappedAddress=function(){return this.range()===`ipv4Mapped`},e.prototype.kind=function(){return`ipv6`},e.prototype.match=function(e,t){let n;if(t===void 0&&(n=e,e=n[0],t=n[1]),e.kind()!==`ipv6`)throw Error(`ipaddr: cannot match ipv6 address with non-ipv6 one`);return u(this.parts,e.parts,16,t)},e.prototype.prefixLengthFromSubnetMask=function(){let e=0,t=!1,n={0:16,32768:15,49152:14,57344:13,61440:12,63488:11,64512:10,65024:9,65280:8,65408:7,65472:6,65504:5,65520:4,65528:3,65532:2,65534:1,65535:0},r,i;for(let a=7;a>=0;--a)if(r=this.parts[a],r in n){if(i=n[r],t&&i!==0)return null;i!==16&&(t=!0),e+=i}else return null;return 128-e},e.prototype.range=function(){return p.subnetMatch(this,this.SpecialRanges)},e.prototype.toByteArray=function(){let e,t=[],n=this.parts;for(let r=0;r<n.length;r++)e=n[r],t.push(e>>8),t.push(e&255);return t},e.prototype.toFixedLengthString=function(){let e=(function(){let e=[];for(let t=0;t<this.parts.length;t++)e.push(f(this.parts[t].toString(16),4));return e}).call(this).join(`:`),t=``;return this.zoneId&&(t=`%${this.zoneId}`),e+t},e.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw Error(`ipaddr: trying to convert a generic ipv6 address to ipv4`);let e=this.parts.slice(-2),t=e[0],n=e[1];return new p.IPv4([t>>8,t&255,n>>8,n&255])},e.prototype.toNormalizedString=function(){let e=(function(){let e=[];for(let t=0;t<this.parts.length;t++)e.push(this.parts[t].toString(16));return e}).call(this).join(`:`),t=``;return this.zoneId&&(t=`%${this.zoneId}`),e+t},e.prototype.toRFC5952String=function(){let e=/((^|:)(0(:|$)){2,})/g,t=this.toNormalizedString(),n=0,r=-1,i;for(;i=e.exec(t);)i[0].length>r&&(n=i.index,r=i[0].length);return r<0?t:`${t.substring(0,n)}::${t.substring(n+r)}`},e.prototype.toString=function(){return this.toRFC5952String()},e})(),p.IPv6.broadcastAddressFromCIDR=function(e){try{let t=this.parseCIDR(e),n=t[0].toByteArray(),r=this.subnetMaskFromPrefixLength(t[1]).toByteArray(),i=[],a=0;for(;a<16;)i.push(parseInt(n[a],10)|parseInt(r[a],10)^255),a++;return new this(i)}catch(e){throw Error(`ipaddr: the address does not have IPv6 CIDR format (${e})`)}},p.IPv6.isIPv6=function(e){return this.parser(e)!==null},p.IPv6.isValid=function(e){if(typeof e==`string`&&e.indexOf(`:`)===-1)return!1;try{let t=this.parser(e);return new this(t.parts,t.zoneId),!0}catch{return!1}},p.IPv6.isValidCIDR=function(e){if(typeof e==`string`&&e.indexOf(`:`)===-1)return!1;try{return this.parseCIDR(e),!0}catch{return!1}},p.IPv6.networkAddressFromCIDR=function(e){let t,n,r,i,a;try{for(t=this.parseCIDR(e),r=t[0].toByteArray(),a=this.subnetMaskFromPrefixLength(t[1]).toByteArray(),i=[],n=0;n<16;)i.push(parseInt(r[n],10)&parseInt(a[n],10)),n++;return new this(i)}catch(e){throw Error(`ipaddr: the address does not have IPv6 CIDR format (${e})`)}},p.IPv6.parse=function(e){let t=this.parser(e);if(t.parts===null)throw Error(`ipaddr: string is not formatted like an IPv6 Address`);return new this(t.parts,t.zoneId)},p.IPv6.parseCIDR=function(e){let t,n,r;if((n=e.match(/^(.+)\/(\d+)$/))&&(t=parseInt(n[2]),t>=0&&t<=128))return r=[this.parse(n[1]),t],Object.defineProperty(r,`toString`,{value:function(){return this.join(`/`)}}),r;throw Error(`ipaddr: string is not formatted like an IPv6 CIDR range`)},p.IPv6.parser=function(e){let t,n,r,i,a,o;if(r=e.match(c.deprecatedTransitional))return this.parser(`::ffff:${r[1]}`);if(c.native.test(e))return l(e,8);if((r=e.match(c.transitional))&&(o=r[6]||``,t=r[1],r[1].endsWith(`::`)||(t=t.slice(0,-1)),t=l(t+o,6),t.parts)){for(a=[parseInt(r[2]),parseInt(r[3]),parseInt(r[4]),parseInt(r[5])],n=0;n<a.length;n++)if(i=a[n],!(0<=i&&i<=255))return null;return t.parts.push(a[0]<<8|a[1]),t.parts.push(a[2]<<8|a[3]),{parts:t.parts,zoneId:t.zoneId}}return null},p.IPv6.subnetMaskFromPrefixLength=function(e){if(e=parseInt(e),e<0||e>128)throw Error(`ipaddr: invalid IPv6 prefix length`);let t=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],n=0,r=Math.floor(e/8);for(;n<r;)t[n]=255,n++;return r<16&&(t[r]=2**(e%8)-1<<8-e%8),new this(t)},p.fromByteArray=function(e){let t=e.length;if(t===4)return new p.IPv4(e);if(t===16)return new p.IPv6(e);throw Error(`ipaddr: the binary input is neither an IPv6 nor IPv4 address`)},p.isValid=function(e){return p.IPv6.isValid(e)||p.IPv4.isValid(e)},p.isValidCIDR=function(e){return p.IPv6.isValidCIDR(e)||p.IPv4.isValidCIDR(e)},p.parse=function(e){if(p.IPv6.isValid(e))return p.IPv6.parse(e);if(p.IPv4.isValid(e))return p.IPv4.parse(e);throw Error(`ipaddr: the address has neither IPv6 nor IPv4 format`)},p.parseCIDR=function(e){try{return p.IPv6.parseCIDR(e)}catch{try{return p.IPv4.parseCIDR(e)}catch{throw Error(`ipaddr: the address has neither IPv6 nor IPv4 CIDR format`)}}},p.process=function(e){let t=this.parse(e);return t.kind()===`ipv6`&&t.isIPv4MappedAddress()?t.toIPv4Address():t},p.subnetMatch=function(e,t,n){let r,i,a,o;for(i in n??=`unicast`,t)if(Object.prototype.hasOwnProperty.call(t,i)){for(a=t[i],a[0]&&!(a[0]instanceof Array)&&(a=[a]),r=0;r<a.length;r++)if(o=a[r],e.kind()===o[0].kind()&&e.match.apply(e,o))return i}return n},t!==void 0&&t.exports?t.exports=p:e.ipaddr=p})(e)}))(),1),hE=new Set([`href`,`src`,`srcset`,`poster`,`formaction`,`xlink:href`]),gE=new Set([`aria-label`,`aria-description`,`title`]),_E=/(?:[a-zA-Z][a-zA-Z0-9+.-]*:\/\/[^\s"'<>]+|(?:javascript|vbscript|data|file|chrome-extension|moz-extension):[^\s"'<>]*)/gi,vE=/url\s*\(\s*['"]?\s*(?:javascript|vbscript|data)\s*:/i,yE=/\bexpression\s*\(/i,bE=/(oklch|oklab|lab|lch)\(\s*([^)]+)\s*\)/gi,xE=`data-clipboard-omit`;function SE(e){let t=e.trim();return t===``||it.test(t)?!0:E(t)}function CE(e){let t=e.split(`,`);for(let e of t){let t=e.trim();if(t!==``&&!SE(t.split(/\s+/)[0]??``))return!1}return!0}function wE(e,t){let n=!1,r=e.replace(_E,e=>SE(e)?e:(n=!0,`[blocked]`));return t?.reportNoChange&&!n?null:r}function TE(e){let t=e.toLowerCase();return t.length>=3&&t.startsWith(`on`)}function EE(e){return e.length>1e4||vE.test(e)||yE.test(e)?``:e}function DE(e){let t=e.indexOf(`/`),n=(t===-1?e:e.slice(0,t)).trim(),r=t===-1?null:e.slice(t+1).trim(),i=n.split(/[\s,]+/).filter(e=>e.length>0);if(i.length!==3)return null;let a=OE(i[0],1),o=OE(i[1],1),s=OE(i[2],1);if(Number.isNaN(a)||Number.isNaN(o)||Number.isNaN(s))return null;let c=null;if(r!==null){if(c=OE(r,1),Number.isNaN(c))return null;c=Math.max(0,Math.min(1,c))}return[a,o,s,c]}function OE(e,t){return e===`none`?0:e.endsWith(`%`)?Number.parseFloat(e.slice(0,-1))/100*t:Number.parseFloat(e)}function kE(e,t,n){let r=n*Math.PI/180;return[e,t*Math.cos(r),t*Math.sin(r)]}function AE(e,t,n){let r=e+.3963377774*t+.2158037573*n,i=e-.1055613458*t-.0638541728*n,a=e-.0894841775*t-1.291485548*n,o=r**3,s=i**3,c=a**3;return[4.0767416621*o-3.3077115913*s+.2309699292*c,-1.2684380046*o+2.6097574011*s-.3413193965*c,-.0041960863*o-.7034186147*s+1.707614701*c]}function jE(e){return e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055}function ME(e){return Number.isFinite(e)?Math.max(0,Math.min(255,Math.round(e*255))):0}function NE(e,t,n,r){let i=e.toLowerCase(),a,o,s;i===`oklch`?[a,o,s]=kE(t,n,r):i===`oklab`?[a,o,s]=[t,n,r]:i===`lch`?[a,o,s]=kE(t/100,n/100,r):[a,o,s]=[t/100,n/100,r/100];let[c,l,u]=AE(a,o,s);return[ME(jE(c)),ME(jE(l)),ME(jE(u))]}function PE(e){if(e.length>1e4)return e;let t=e.toLowerCase();return!t.includes(`oklch`)&&!t.includes(`oklab`)&&!t.includes(`lab`)&&!t.includes(`lch`)?e:e.replace(bE,(e,t,n)=>{let r=DE(n);if(r===null)return e;let[i,a,o,s]=r,[c,l,u]=NE(t,i,a,o);return s===null?`rgb(${c}, ${l}, ${u})`:`rgba(${c}, ${l}, ${u}, ${s})`})}var FE=new Set([`mailto`,`tel`,`sms`,`ftp`,`ftps`]);function IE(e){let t=e.trim();if(t.startsWith(`#`))return{portable:!0};if(E(t))return t.startsWith(`/`)?{portable:!1,reason:`server-absolute`}:{portable:!1,reason:`relative`};let n=new URL(t),r=n.protocol.slice(0,-1).toLowerCase();if(FE.has(r))return{portable:!0};if(r!==`http`&&r!==`https`)return{portable:!1,reason:`other`};let i=n.hostname.toLowerCase();if(i===``)return{portable:!1,reason:`other`};let a=i.endsWith(`.`)?i.slice(0,-1):i;if(a===`localhost`||a.endsWith(`.localhost`))return{portable:!1,reason:`localhost`};let o=i.startsWith(`[`)&&i.endsWith(`]`)?i.slice(1,-1):i;return mE.IPv4.isValid(o)?mE.IPv4.parse(o).range()===`unicast`?{portable:!0}:{portable:!1,reason:`private-ip`}:mE.IPv6.isValid(o)?mE.IPv6.parse(o).range()===`unicast`?{portable:!0}:{portable:!1,reason:`private-ip`}:{portable:!0}}function LE(e){if(!e)return`plaintext`;if(e.types.includes(`vscode-editor-data`))return`vscode`;if(e.types.includes(`text/x-gfm`))return`gfm`;let t=e.getData(`text/html`);return t?/data-pm-slice/i.test(t)?`pm-origin`:/docs-internal-guid-/i.test(t)?`gdocs`:/xmlns:o="urn:schemas-microsoft-com:office/i.test(t)||/<meta[^>]*Generator[^>]*Microsoft Word/i.test(t)?`word`:/class="gmail_|class='gmail_/i.test(t)?`gmail`:/notionvc:/i.test(t)?`notion`:/Cocoa HTML Writer/i.test(t)?`apple`:/c-message_kit__|c-message__|c-compose/i.test(t)?`slack`:/google-sheets-html-origin/i.test(t)?`gsheets`:/data-hovercard-type=/i.test(t)?`github`:`generic`:`plaintext`}var RE=250,zE=100;function BE(e,t){let n=performance.now()-e;n<(t.op===`paste`||t.op===`drop`?RE:zE)||console.warn(JSON.stringify({event:`clipboard-slow-op`,op:t.op,view:t.view,elapsedMs:Math.round(n),branch:t.branch,source:t.source,...t.htmlBytes==null?{}:{htmlBytes:t.htmlBytes}}))}function VE(e){console.warn(JSON.stringify({event:`clipboard-source-detected`,view:e.view,source:e.source,branch:e.branch}))}function HE(e){console.warn(JSON.stringify({event:`clipboard-html-conversion-failed`,view:e.view,stage:e.stage,source:e.source,...e.branch==null?{}:{branch:e.branch},reason:e.reason,...e.errorClass==null?{}:{errorClass:e.errorClass},...e.htmlBytes==null?{}:{htmlBytes:e.htmlBytes}}))}function UE(e){console.warn(JSON.stringify({event:`clipboard-serialize-failed`,view:e.view,kind:e.kind,reason:e.reason}))}function WE(e){console.warn(JSON.stringify({event:`clipboard-walker-fallback-fired`,descriptor:e.descriptor,view:e.view}))}function GE(e){console.warn(JSON.stringify({event:`clipboard-walker-non-portable-render-source-emitted`,descriptor:e.descriptor,view:e.view}))}function KE(e){console.warn(JSON.stringify({event:`clipboard-walker-url-blocked`,view:e.view,attr:e.attr,reason:e.reason}))}function qE(e){console.warn(JSON.stringify({event:`clipboard-walker-url-source-emitted`,view:e.view,tag:e.tag,class:e.class,reason:e.reason}))}function JE(e){console.warn(JSON.stringify({event:`clipboard-walker-url-classifier-failed`,view:e.view,tag:e.tag,phase:e.phase,...e.errorClass==null?{}:{errorClass:e.errorClass}}))}var YE=new Set;function XE(e){YE.has(e.lucideClass)||(YE.add(e.lucideClass),console.warn(JSON.stringify({event:`clipboard-walker-unmapped-lucide-detected`,view:e.view,lucideClass:e.lucideClass})))}function ZE(e){console.warn(JSON.stringify({event:`clipboard-chunked-insert-failed`,view:e.view,chunksCompleted:e.chunksCompleted,totalChunks:e.totalChunks,bytesWritten:e.bytesWritten,bytesRemaining:e.bytesRemaining,reason:e.reason}))}function QE(e){if(e instanceof P)return`HtmlPayloadTooLargeError`;if(e instanceof Ue)return`ChunkedInsertError`;if(e instanceof Error&&e.name&&e.name!==`Error`)return e.name}var $E=/^```/m,eD=/^#{1,6} /m,tD=/^[-*+] /m,nD=/^\d+[.)] /m,rD=/\[[^\]\n]+\]\([^)\n]+\)/,iD=/^\|.*\|$/m,aD=/^\|?\s*(:?-+:?)(\s*\|\s*:?-+:?)+\s*\|?$/m,oD=/\$\$[\s\S]+?\$\$/,sD=/^> /m,cD=/`[^`\n]+`/,lD=/\*\*[^*\n]+\*\*/,uD=/__[^_\n]+__/,dD=/~~[^~\n]+~~/,fD=/<[A-Z]\w*[\s/>]/,pD=/<[a-z]+\s+\w+="[^"]*"/,mD=/<[a-z]+>[^<\n]*<\/[a-z]+>/,hD=/^.+\n[=-]+$/m,gD=/(^|\s)\*[^*\s\n][^*\n]*[^*\s\n]\*(\s|$)/m,_D=/(^|\s)_[^_\s\n][^_\n]*[^_\s\n]_(\s|$)/m,vD=/^~~~/m,yD=/\\[\\`*_{}[\]<>()#+\-.!|]/,bD=256*1024,xD=32*1024;function SD(e){return e.length<=bD?e:`${e.slice(0,xD)}\n${e.slice(-xD)}`}function CD(e){if(!e)return!1;let t=SD(e),n=0;$E.test(t)&&n++,eD.test(t)&&n++,tD.test(t)&&n++,nD.test(t)&&n++,rD.test(t)&&n++,iD.test(t)&&aD.test(t)&&n++,oD.test(t)&&n++,sD.test(t)&&n++,cD.test(t)&&n++,(lD.test(t)||uD.test(t)||dD.test(t))&&n++,fD.test(t)&&n++,pD.test(t)&&n++,mD.test(t)&&n++,hD.test(t)&&n++,gD.test(t)&&n++,_D.test(t)&&n++,vD.test(t)&&n++,yD.test(t)&&n++;let r=t.split(`
|
|
8
|
-
`).length,i=Math.min(3,Math.floor(r/5));return n>=Math.max(1,i)}var wD=3e3,TD=new Map;function ED(e,t=`Pasted as plain text — some formatting could not be converted.`){let n=Date.now();return n-(TD.get(e)??0)<wD?!1:(TD.set(e,n),on.error(t),!0)}var DD=!1,OD=!1;function kD(e){DD=e.shiftKey}function AD(e){(e.key===`Shift`||!e.shiftKey)&&(DD=!1)}function jD(){DD=!1}function MD(){OD||typeof window>`u`||(window.addEventListener(`keydown`,kD,!0),window.addEventListener(`keyup`,AD,!0),window.addEventListener(`blur`,jD,!0),OD=!0)}function ND(){MD()}function PD(){return MD(),DD}function FD(e){return PD()?!0:e.shiftKey===!0}function ID(e){return(t,n)=>RD(t,n,`paste`,e)}function LD(e){return(t,n)=>n.dataTransfer?.files&&n.dataTransfer.files.length>0?!1:RD(t,n,`drop`,e)}function RD(e,t,n,r){let i=n===`paste`?t.clipboardData:t.dataTransfer;if(!i||i.types.length===0)return!1;let a=performance.now(),o=LE(i),s=i.getData(`text/plain`),c=i.getData(`text/html`);if(zD(t,n))return s&&VD(e,s),VE({view:`wysiwyg`,branch:`shift`,source:o}),BE(a,{op:n,view:`wysiwyg`,branch:`shift`,source:o}),!0;if(BD(e))return s&&VD(e,s),VE({view:`wysiwyg`,branch:`codeblock`,source:o}),BE(a,{op:n,view:`wysiwyg`,branch:`codeblock`,source:o}),!0;let l=i.getData(`vscode-editor-data`);if(l&&s&&UD(e,l,s,o))return VE({view:`wysiwyg`,branch:`A`,source:o}),BE(a,{op:n,view:`wysiwyg`,branch:`A`,source:o}),!0;let u=i.getData(`text/x-gfm`);return u&&WD(e,u,r,`B`,o)||s&&c&&CD(s)&&WD(e,s,r,`B`,o)?(VE({view:`wysiwyg`,branch:`B`,source:o}),BE(a,{op:n,view:`wysiwyg`,branch:`B`,source:o}),!0):c&&/data-pm-slice/i.test(c)?(VE({view:`wysiwyg`,branch:`C`,source:o}),BE(a,{op:n,view:`wysiwyg`,branch:`C`,source:o}),!1):c&&GD(e,c,r,o)?(VE({view:`wysiwyg`,branch:`D`,source:o}),BE(a,{op:n,view:`wysiwyg`,branch:`D`,source:o,htmlBytes:c.length}),!0):s?CD(s)&&WD(e,s,r,`E`,`markdown-text`)?(VE({view:`wysiwyg`,branch:`E`,source:`markdown-text`}),BE(a,{op:n,view:`wysiwyg`,branch:`E`,source:`markdown-text`}),!0):(VD(e,s),VE({view:`wysiwyg`,branch:`E`,source:`plaintext`}),BE(a,{op:n,view:`wysiwyg`,branch:`E`,source:`plaintext`}),!0):!1}function zD(e,t){return t===`paste`?FD(e):e.shiftKey===!0}function BD(e){let{$from:t}=e.state.selection;for(let e=t.depth;e>=0;e--)if(t.node(e).type.name===`codeBlock`)return!0;return!1}function VD(e,t){let{schema:n,tr:r}=e.state;t&&e.dispatch(r.replaceSelectionWith(n.text(t)).scrollIntoView())}var HD=/^[A-Za-z0-9_+-]+$/;function UD(e,t,n,r){try{let r=JSON.parse(t),i=typeof r.mode==`string`?r.mode:``,a=HD.test(i)?i:``,o=e.state.schema.nodes.codeBlock;if(!o)return!1;let s=o.create({language:a},n?e.state.schema.text(n):null);return e.dispatch(e.state.tr.replaceSelectionWith(s).scrollIntoView()),!0}catch(e){return HE({view:`wysiwyg`,stage:`branchA`,source:r,branch:`A`,reason:e?.message??`unknown`,errorClass:QE(e)}),!1}}function WD(e,t,n,r,i){let a;try{a=n.mdManager.parse(t)}catch(e){return HE({view:`wysiwyg`,stage:`mdManagerParse`,source:i,branch:r,reason:e?.message??`unknown`,errorClass:QE(e)}),!1}return KD(e,a,i,r)}function GD(e,t,n,r){let i;try{i=H(t)}catch(e){return HE({view:`wysiwyg`,stage:`htmlToMdast`,source:r,branch:`D`,reason:e?.message??`unknown`,errorClass:QE(e),htmlBytes:t.length}),ED(`wysiwyg`),!1}let a;try{a=me(i)}catch(e){return HE({view:`wysiwyg`,stage:`mdastToMarkdown`,source:r,branch:`D`,reason:e?.message??`unknown`,errorClass:QE(e),htmlBytes:t.length}),ED(`wysiwyg`),!1}let o;try{o=n.mdManager.parse(a)}catch(e){return HE({view:`wysiwyg`,stage:`mdManagerParse`,source:r,branch:`D`,reason:e?.message??`unknown`,errorClass:QE(e),htmlBytes:t.length}),ED(`wysiwyg`),!1}return KD(e,o,r,`D`,t.length)}function KD(e,t,n,r,i){try{let n=e.state.schema.nodeFromJSON(t);return e.dispatch(e.state.tr.replaceSelection(n.slice(0,n.content.size)).scrollIntoView()),!0}catch(e){return HE({view:`wysiwyg`,stage:`applyJsonSlice`,source:n,branch:r,reason:e?.message??`unknown`,errorClass:QE(e),...i==null?{}:{htmlBytes:i}}),!1}}function qD(e){if(e.type.name!==`jsxComponent`)return null;let t=e.attrs.componentName,n=e.attrs.props??{};switch(t){case`Math`:return{source:`$$\n${typeof n.formula==`string`?n.formula:``}\n$$`};case`Mermaid`:return{source:`\`\`\`mermaid\n${typeof n.chart==`string`?n.chart:``}\n\`\`\``};default:return null}}function JD(e,t){let n=qD(e);if(!n)return null;let r=t.createElement(`pre`);r.className=`mdx-component`;let i=t.createElement(`code`);return i.textContent=n.source,r.appendChild(i),r}var YD={note:{color:`#0969da`,bg:`#dbeafe`},tip:{color:`#1f883d`,bg:`#dcfce7`},important:{color:`#8250df`,bg:`#f3e8ff`},warning:{color:`#9a6700`,bg:`#fef3c7`},caution:{color:`#cf222e`,bg:`#fee2e2`}};function XD(e){return Object.hasOwn(YD,e)?YD[e]:YD.note}function ZD(e){let t=typeof e.type==`string`?e.type:`note`,n=XD(t),r=document.createElement(`aside`);if(r.setAttribute(`class`,`callout callout-${t}`),r.setAttribute(`data-callout-type`,t),r.setAttribute(`style`,`border-left: 3px solid ${n.color}; background-color: ${n.bg}; padding: 0.5rem 0.75rem; border-radius: 0.25rem;`),typeof e.title==`string`&&e.title){let t=document.createElement(`strong`);t.textContent=e.title,r.appendChild(t)}return r}function QD(e){let t=document.createElement(`details`);e.defaultOpen===!0&&t.setAttribute(`open`,``),t.setAttribute(`class`,`accordion`);let n=document.createElement(`summary`);return n.textContent=typeof e.title==`string`?e.title:`Accordion`,t.appendChild(n),t}function $D(e){let t=IE(e);return t.portable?null:t.reason}function eO(e){let t=document.createElement(`pre`);t.className=`mdx-component`;let n=document.createElement(`code`);return n.textContent=e,t.appendChild(n),t}function tO(e,t,n){if(e===``)return null;let r;try{r=$D(e)}catch(e){let n=QE(e);return JE({view:`wysiwyg`,tag:t,phase:`classifier-throw`,...n===void 0?{}:{errorClass:n}}),null}return r===null?null:(qE({view:`wysiwyg`,tag:t,class:`mdx-component`,reason:r}),eO(n))}function nO(e){let t=typeof e.alt==`string`?e.alt:``,n=typeof e.src==`string`?e.src:``,r=tO(n,`img`,``);if(r!==null)return r;let i=document.createElement(`img`);return n&&SE(n)&&i.setAttribute(`src`,n),typeof e.alt==`string`&&i.setAttribute(`alt`,e.alt),i}function rO(e,t){let n=document.createElement(e);return n.setAttribute(`src`,t),n.outerHTML}function iO(e){let t=typeof e.src==`string`?e.src:``,n=tO(t,`video`,rO(`video`,t));if(n!==null)return n;let r=document.createElement(`video`);return t&&SE(t)&&r.setAttribute(`src`,t),e.controls!==!1&&r.setAttribute(`controls`,``),r}function aO(e){let t=typeof e.src==`string`?e.src:``,n=tO(t,`audio`,rO(`audio`,t));if(n!==null)return n;let r=document.createElement(`audio`);return t&&SE(t)&&r.setAttribute(`src`,t),e.controls!==!1&&r.setAttribute(`controls`,``),r}function oO(e){if(e.type.name!==`jsxComponent`)return null;let t=e.attrs.componentName,n=e.attrs.props??{};switch(t){case`Callout`:case`GFMCallout`:return ZD(n);case`Accordion`:case`HtmlDetailsAccordion`:return QD(n);case`img`:case`CommonMarkImage`:return nO(n);case`video`:return iO(n);case`audio`:return aO(n);case`Math`:case`Mermaid`:return JD(e,document);default:return null}}var sO=`color.background-color.background-image.border.border-top.border-right.border-bottom.border-left.border-color.border-width.border-style.border-radius.padding.padding-top.padding-right.padding-bottom.padding-left.margin.margin-top.margin-right.margin-bottom.margin-left.font-family.font-size.font-weight.font-style.text-decoration.text-align.line-height.list-style.list-style-type.list-style-position.vertical-align.white-space`.split(`.`),cO=new Set([`jsx-component-wrapper`,`selectedCell`,`is-empty`,`ProseMirror-selectednode`,`ProseMirror-trailingBreak`]),lO=new Set([`data-selected`,`data-has-child-selected`,`data-dragging`,`contenteditable`,`data-pm-slice`]),uO={getComputedStyle:e=>window.getComputedStyle(e)};function dO(e,t=sO){let n=``;for(let r of t){let t=e.getPropertyValue(r);t&&(t===`initial`||t===`normal`||(n+=`${r}: ${PE(t)}; `))}return n.trim()}function fO(e,t=cO){return e.split(/\s+/).filter(e=>e.length>0&&!t.has(e)).join(` `)||null}function pO(e,t,n){let r=!1;return e.nodesBetween(t,n,(i,a,o)=>(o===e&&(t>a||n<a+i.nodeSize)&&(r=!0),!1)),r}function mO(e,t,n=uO){let r=document.createDocumentFragment(),{from:i,to:a}=t.state.selection;return i===a||pO(t.state.doc,i,a)||t.state.doc.nodesBetween(i,a,(e,i,a)=>{if(a!==t.state.doc)return!1;let o=t.nodeDOM(i);if(o==null){WE({descriptor:e.type.name,view:`wysiwyg`});let t=oO(e);return t&&r.appendChild(t),!1}if(!(o instanceof Element)||o.getAttribute(`data-clipboard-omit`)===`true`)return!1;let s=JD(e,document);return s===null?(r.appendChild(hO(o,n)),!1):(r.appendChild(s),GE({view:`wysiwyg`,descriptor:e.attrs.componentName??e.type.name}),!1)}),r}function hO(e,t){let n=e.cloneNode(!0);return xO(e,n,t),SO(n),gO(n),PO(e,n,t),bO(n),n}function gO(e){let t=Array.from(e.querySelectorAll(`[data-component-type="math-inline"]`));for(let n of t){if(!n.parentNode)continue;let t=n.getAttribute(`data-formula`)??``,r=e.ownerDocument.createElement(`span`);r.className=`mdx-inline`,r.textContent=`$$${t}$$`,n.replaceWith(r),GE({view:`wysiwyg`,descriptor:`mathInline`})}let n=Array.from(e.querySelectorAll(`a[data-wiki-embed]`));for(let t of n){if(!t.parentNode)continue;let n=t.getAttribute(`data-target`)??``;if(!n)continue;let r=t.getAttribute(`data-alias`)||null,i=t.getAttribute(`data-anchor`)||null,a=e.ownerDocument.createElement(`span`);a.className=`mdx-inline`,a.textContent=_O(n,i,r),t.replaceWith(a),GE({view:`wysiwyg`,descriptor:`wikiLinkEmbed`})}}function _O(e,t,n){let r=e;return t&&(r+=`#${t}`),n&&(r+=`|${n}`),`![[${r}]]`}var vO={"lucide-chevron-right":`›`,"lucide-chevron-down":`⌄`,"lucide-info":`ℹ`,"lucide-lightbulb":`💡`,"lucide-message-square-warning":`❗`,"lucide-alert-triangle":`⚠`,"lucide-alert-octagon":`⛔`},yO=/(?:^|\s)(lucide-[a-z0-9-]+)(?:\s|$)/;function bO(e){let t=e.querySelectorAll(`svg`);for(let e of Array.from(t)){let t=(e.getAttribute(`class`)??``).match(yO);if(!t)continue;let n=t[1],r=vO[n];if(!r){XE({lucideClass:n,view:`wysiwyg`});continue}let i=e.ownerDocument.createElement(`span`);i.setAttribute(`aria-hidden`,`true`),i.textContent=r,e.replaceWith(i)}}function xO(e,t,n){let r=dO(n.getComputedStyle(e));if(r){let e=t.getAttribute(`style`);t.setAttribute(`style`,e?`${e}; ${r}`:r)}let i=t.getAttribute(`class`);if(i!==null){let e=fO(i);e?t.setAttribute(`class`,e):t.removeAttribute(`class`)}for(let e of Array.from(t.attributes)){if(lO.has(e.name)){t.removeAttribute(e.name);continue}if(TE(e.name)){t.removeAttribute(e.name),KE({attr:`on*`,reason:`event-handler`,view:`wysiwyg`});continue}if(e.name===`style`){let n=EE(e.value);n===``?(t.removeAttribute(`style`),KE({attr:`style`,reason:`unsafe-url-or-expression`,view:`wysiwyg`})):n!==e.value&&t.setAttribute(`style`,n);continue}if(hE.has(e.name)){(e.name===`srcset`?CE(e.value):SE(e.value))||(t.removeAttribute(e.name),KE({attr:e.name,reason:e.name===`srcset`?`srcset-candidate`:`scheme`,view:`wysiwyg`}));continue}if(gE.has(e.name)){let n=wE(e.value,{reportNoChange:!0});n!==null&&(t.setAttribute(e.name,n),KE({attr:e.name,reason:`embedded-url`,view:`wysiwyg`}))}}let a=Array.from(e.children),o=Array.from(t.children),s=Math.min(a.length,o.length);for(let e=0;e<s;e++){let t=a[e],r=o[e];if(t.getAttribute(`data-clipboard-omit`)===`true`){r.remove();continue}xO(t,r,n)}}function SO(e){let t=e.querySelectorAll(`span[data-wiki-link]`);for(let e of Array.from(t)){let t=e.getAttribute(`data-target`)??``;if(!t)continue;let n=ot(e.getAttribute(`data-anchor`)),r=ot(e.getAttribute(`data-alias`)),i=$e(t,n),a=e.ownerDocument.createElement(`a`);a.setAttribute(`class`,`wiki-link`),a.setAttribute(`href`,i),a.setAttribute(`data-target`,t),a.setAttribute(`data-anchor`,n??``),a.setAttribute(`data-alias`,r??``),a.textContent=e.textContent??``,e.replaceWith(a)}}var CO=new Set([`img`,`video`,`audio`,`source`,`a`]);function wO(e){return CO.has(e)}function TO(e){return e.closest(`p`)===null?`mdx-component`:`mdx-inline`}function EO(e,t,n){if(t===`mdx-component`){let t=e.createElement(`pre`);t.className=`mdx-component`;let r=e.createElement(`code`);return r.textContent=n,t.appendChild(r),t}let r=e.createElement(`span`);return r.className=`mdx-inline`,r.textContent=n,r}function DO(e){let t=IE(e);return t.portable?null:t.reason}function OO(e){for(let t of e.split(`,`)){let e=t.trim();if(e===``)continue;let n=DO(e.split(/\s+/)[0]??``);if(n!==null)return n}return null}function kO(e,t){switch(t){case`img`:case`source`:{let t=e.getAttribute(`src`);if(t!==null){let e=DO(t);if(e!==null)return e}let n=e.getAttribute(`srcset`);if(n!==null){let e=OO(n);if(e!==null)return e}return null}case`video`:case`audio`:{let t=e.getAttribute(`src`);return t===null?null:DO(t)}case`a`:{let t=e.getAttribute(`href`);return t===null?null:DO(t)}default:return null}}function AO(e){let t=e.querySelectorAll(`source, img`);for(let e of Array.from(t)){let t=e.tagName.toLowerCase();if(!wO(t))continue;let n=kO(e,t);if(n!==null)return n}return null}function jO(e,t,n,r){let i;try{i=kO(n,r)}catch(e){let t=QE(e);return JE({view:`wysiwyg`,tag:r,phase:`classifier-throw`,...t===void 0?{}:{errorClass:t}}),!1}return i===null?!1:NO(e,t,n,r,i)}function MO(e,t,n){let r;try{r=AO(n)}catch(e){let t=QE(e);return JE({view:`wysiwyg`,tag:`picture`,phase:`classifier-throw`,...t===void 0?{}:{errorClass:t}}),!1}return r===null?!1:NO(e,t,n,`picture`,r)}function NO(e,t,n,r,i){let a=e.serializeElementMarkdown?e.serializeElementMarkdown(t):{kind:`no-correspondence`};switch(a.kind){case`no-correspondence`:return JE({view:`wysiwyg`,tag:r,phase:`serializer-null`}),!1;case`failed`:{let e=a.errorClass;return JE({view:`wysiwyg`,tag:r,phase:`serializer-throw`,...e===void 0?{}:{errorClass:e}}),!1}case`ok`:{let e=TO(n),t=EO(n.ownerDocument,e,a.markdown);return n.replaceWith(t),qE({view:`wysiwyg`,tag:r,class:e,reason:i}),!0}default:return!1}}function PO(e,t,n){if(!n.serializeElementMarkdown)return;let r=t.tagName.toLowerCase();if(r===`picture`&&MO(n,e,t)||wO(r)&&jO(n,e,t,r))return;let i=Array.from(e.children),a=Array.from(t.children),o=[];for(let e of i)e.getAttribute(`data-clipboard-omit`)!==`true`&&o.push(e);let s=Math.min(o.length,a.length);for(let e=0;e<s;e++)PO(o[e],a[e],n)}function FO(e){return(t,n)=>{try{return RO(t,n.state.schema,e.mdManager)}catch(e){return UE({view:`wysiwyg`,kind:`text`,reason:e?.message??`unknown`}),t.content.textBetween(0,t.content.size,`
|
|
9
|
-
|
|
10
|
-
`)}}}var IO=class extends ae{mdManager;view=null;constructor(e){super({},{}),this.mdManager=e}setView(e){this.view=e}serializeFragment(e,t,n){let r=this.view;if(r&&r.state.selection.from!==r.state.selection.to)try{let e=mO(r.state.selection.content(),r,BO(r,this.mdManager));if(e.childNodes.length>0){if(n){for(let t of Array.from(e.childNodes))n.appendChild(t);return n}return e}}catch(e){UE({view:`wysiwyg`,kind:`html`,reason:`walker:${e?.message??`unknown`}`})}try{let t=e.firstChild?.type.schema;if(!t)return n??document.createDocumentFragment();let r=UO(VO(e,t,this.mdManager));if(n){for(let e of Array.from(r.childNodes))n.appendChild(e);return n}return r}catch(e){return UE({view:`wysiwyg`,kind:`html`,reason:`markdown:${e?.message??`unknown`}`}),n??document.createDocumentFragment()}}};function LO(e){let t=new IO(e.mdManager);return{serializer:t,setView:e=>t.setView(e)}}function RO(e,t,n){return n.serialize(HO(e,t))}function zO(e){let t=null,n=e;for(;n&&!n.classList.contains(`ProseMirror`);)(n.classList.contains(`react-renderer`)||n.hasAttribute(`data-node-view-wrapper`)||n.hasAttribute(`data-jsx-component`))&&(t=n),n=n.parentElement;return t}function BO(e,t){return{getComputedStyle:e=>window.getComputedStyle(e),serializeElementMarkdown:n=>{let r=zO(n),i;try{let t=r?.parentElement;if(t&&r){let n=Array.from(t.children).indexOf(r);i=e.posAtDOM(t,n,-1)}else i=e.posAtDOM(n,0)}catch(e){return{kind:`failed`,errorClass:QE(e)}}if(i<0)return{kind:`no-correspondence`};let a=e.state.doc.nodeAt(i);if(!a)return{kind:`no-correspondence`};let o=e.state.doc.slice(i,i+a.nodeSize);try{return{kind:`ok`,markdown:RO(o,e.state.schema,t)}}catch(e){return{kind:`failed`,errorClass:QE(e)}}}}}function VO(e,t,n){return ue(RO(new fe(e,0,0),t,n))}function HO(e,t){let n=e.content;if(n.firstChild?.isInline){let e=t.nodes.paragraph;if(e){let t=e.createAndFill(null,n);t&&(n=Ct.from(t))}}let r=t.topNodeType.createAndFill(null,n);if(!r){let e=t.topNodeType.createAndFill();if(!e)throw Error(`[clipboard] schema cannot fill topNodeType`);return e.toJSON()}return r.toJSON()}function UO(e){let t=new DOMParser().parseFromString(e,`text/html`),n=document.createDocumentFragment();for(let e of Array.from(t.body.childNodes))n.appendChild(e);return n}function WO(e){return ND(),Dn.domEventHandlers({copy:(e,t)=>KO(e,t,`copy`),cut:(e,t)=>KO(e,t,`cut`),paste:(t,n)=>qO(t,n,e)})}function GO(e){let t=document.createElement(`pre`);t.className=`mdx-component`;let n=document.createElement(`code`);return n.textContent=e,t.appendChild(n),t.outerHTML}function KO(e,t,n){let{from:r,to:i}=t.state.selection.main;if(r===i)return e.preventDefault(),!0;let a=e.clipboardData;if(!a)return!1;let o=performance.now();try{let s=t.state.sliceDoc(r,i);a.setData(`text/plain`,s);try{a.setData(`text/html`,GO(s))}catch(e){UE({view:`source`,kind:`html`,reason:e?.message??`unknown`})}return e.preventDefault(),n===`cut`&&t.dispatch({changes:{from:r,to:i,insert:``}}),BE(o,{op:n,view:`source`,branch:`serialize`,source:`local`}),!0}catch(e){return UE({view:`source`,kind:`text`,reason:e?.message??`unknown`}),!1}}function qO(e,t,n){let r=e.clipboardData;if(!r||r.types.length===0)return!1;let i=performance.now(),a=LE(r),o=r.getData(`text/plain`),s=r.getData(`text/html`);if(FD(e))return VE({view:`source`,branch:`shift`,source:a}),BE(i,{op:`paste`,view:`source`,branch:`shift`,source:a}),!1;let c=r.getData(`vscode-editor-data`);return c&&o&&YO(t,c,o,a)?(e.preventDefault(),VE({view:`source`,branch:`A`,source:a}),BE(i,{op:`paste`,view:`source`,branch:`A`,source:a}),!0):o&&s&&CD(o)?(VE({view:`source`,branch:`B`,source:a}),BE(i,{op:`paste`,view:`source`,branch:`B`,source:a}),!1):s&&/data-pm-slice/i.test(s)?(VE({view:`source`,branch:`C`,source:a}),BE(i,{op:`paste`,view:`source`,branch:`C`,source:a}),!1):s&&XO(t,s,n,a)?(e.preventDefault(),VE({view:`source`,branch:`D`,source:a}),BE(i,{op:`paste`,view:`source`,branch:`D`,source:a,htmlBytes:s.length}),!0):(VE({view:`source`,branch:`E`,source:a}),BE(i,{op:`paste`,view:`source`,branch:`E`,source:a}),!1)}var JO=/^[A-Za-z0-9_+-]+$/;function YO(e,t,n,r){try{let r=JSON.parse(t),i=typeof r.mode==`string`?r.mode:``,a=`\`\`\`${JO.test(i)?i:``}\n${n}\n\`\`\`\n`,{from:o,to:s}=e.state.selection.main;return e.dispatch({changes:{from:o,to:s,insert:a},selection:{anchor:o+a.length}}),!0}catch(e){return HE({view:`source`,stage:`branchA`,source:r,branch:`A`,reason:e?.message??`unknown`,errorClass:QE(e)}),!1}}function XO(e,t,n,r){let i;try{i=H(t)}catch(e){return HE({view:`source`,stage:`htmlToMdast`,source:r,branch:`D`,reason:e?.message??`unknown`,errorClass:QE(e),htmlBytes:t.length}),!1}let a;try{a=me(i)}catch(e){return HE({view:`source`,stage:`mdastToMarkdown`,source:r,branch:`D`,reason:e?.message??`unknown`,errorClass:QE(e),htmlBytes:t.length}),!1}let{from:o,to:s}=e.state.selection.main;if(!(a.length>500*1024))return e.dispatch({changes:{from:o,to:s,insert:a},selection:{anchor:o+a.length}}),!0;let c=o===s?``:e.state.sliceDoc(o,s);o!==s&&e.dispatch({changes:{from:o,to:s,insert:``}});let l=o,u=qp(n.ytext,l);return De(n.ydoc,n.ytext,l,a,{resolveOffset:e=>{let t=Yp(u,n.ydoc);return t==null?e:t.index+(e-l)}}).catch(i=>{ZO({view:e,source:r,html:t,restoreText:c,anchorIndex:l,anchorRelPos:u,ydoc:n.ydoc,err:i})}),!0}function ZO(e){let{view:t,source:n,html:r,restoreText:i,anchorIndex:a,anchorRelPos:o,ydoc:s,err:c}=e,l=`no-restore-needed`;if(c instanceof Ue&&c.bytesWritten>0){let e=o&&s?Yp(o,s)?.index??a:a,n=Math.min(e+c.bytesWritten,t.state.doc.length);try{t.dispatch({changes:{from:e,to:n,insert:i}}),l=i.length>0?`restored`:`no-restore-needed`}catch(e){console.warn(`[clipboard] partial-chunk rollback dispatch failed`,e),l=i.length>0?`restore-failed`:`no-restore-needed`}}else if(i.length>0)try{t.dispatch({changes:{from:a,to:a,insert:i}}),l=`restored`}catch(e){console.warn(`[clipboard] selection-restore dispatch failed`,e),l=`restore-failed`}let u=l===`restored`?` Your selection has been restored.`:l===`restore-failed`?` Your selection could not be restored.`:``;if(c instanceof Ue){ZE({view:`source`,chunksCompleted:c.chunksCompleted,totalChunks:c.totalChunks,bytesWritten:c.bytesWritten,bytesRemaining:c.bytesRemaining,reason:c.message}),on.error(`Paste was incomplete — ${c.chunksCompleted} of ${c.totalChunks} chunks landed.${u}`);return}HE({view:`source`,stage:`chunkedYTextInsert`,source:n,branch:`D`,reason:c?.message??`unknown`,errorClass:QE(c),htmlBytes:r.length}),on.error(`Paste failed.${u}`)}var QO=20,$O=44,ek=28;function tk(){let e=document.createElement(`div`);e.className=`ok-block-controls`,e.setAttribute(xE,`true`),e.style.visibility=`hidden`;let t=document.createElement(`button`);t.className=`ok-add-block-btn`,t.setAttribute(`aria-label`,`Add block below`),t.setAttribute(`type`,`button`),t.innerHTML=`<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-plus"><path d="M5 12h14"/><path d="M12 5v14"/></svg>`,t.addEventListener(`mousedown`,e=>{e.preventDefault(),e.stopPropagation()});let n=document.createElement(`div`);return n.className=`ok-drag-grip`,n.setAttribute(`aria-hidden`,`true`),n.innerHTML=`<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-grip-vertical-icon lucide-grip-vertical"><circle cx="9" cy="12" r="1"/><circle cx="9" cy="5" r="1"/><circle cx="9" cy="19" r="1"/><circle cx="15" cy="12" r="1"/><circle cx="15" cy="5" r="1"/><circle cx="15" cy="19" r="1"/></svg>`,e.appendChild(t),e.appendChild(n),{container:e,addBtn:t}}function nk(e,t,n){let{state:r,view:i}=e;if(n.type.name===`jsxComponent`){let i=n.attrs.componentName??``;if(i){let a=Yw(i);if(a.emptyChildName){let i=t+1+n.content.size;if(i>r.doc.content.size)return;let o=a.emptyChildName;e.chain().focus().insertContentAt(i,tT(o)).run(),aT(e,i,Yw(o));return}}}let a=t+n.nodeSize;if(a>r.doc.content.size)return;let{tr:o}=r,s=r.schema.nodes.paragraph?.create();if(!s)return;o.insert(a,s);let c=D.near(o.doc.resolve(a+1));o.setSelection(c).scrollIntoView(),i.dispatch(o),i.focus(),e.commands.insertContent(`/`)}var rk=rt.create({name:`blockDragHandle`,addProseMirrorPlugins(){let e=this.editor,t=null,n=-1,{container:r,addBtn:i}=tk();return i.addEventListener(`click`,()=>{t&&n>=0&&nk(e,n,t)}),[dE({element:r,editor:e,onNodeChange({node:e,pos:r}){t=e,n=r??-1},computePositionConfig:{placement:`left-start`,strategy:`absolute`,middleware:[ct(({rects:e})=>({mainAxis:10,crossAxis:((e.reference.height<=$O?e.reference.height:ek)-QO)/2}))]},nestedOptions:fE(!1)}).plugin]}}),ik=/^#fn(?:ref)?-/,ak=rt.create({name:`footnoteAnchorScroll`,addProseMirrorPlugins(){return[new L({props:{handleDOMEvents:{click(e,t){let n=t.target;if(!(n instanceof Element))return!1;let r=n.closest(`a[href^="#fn"]`);if(!(r instanceof HTMLAnchorElement))return!1;let i=r.getAttribute(`href`)??``;if(!ik.test(i))return!1;let a=i.slice(1);t.preventDefault();let o=e.dom.ownerDocument.getElementById(a);return o&&o.scrollIntoView({behavior:`smooth`,block:`start`}),!0}}}})]}}),ok=rt.create({name:`headingAnchors`,addProseMirrorPlugins(){return[new L({props:{decorations(e){let t=[],n=new Map;return e.doc.descendants((e,r)=>{if(e.type.name===`heading`){let i=vt(e.textContent,n);if(!i)return;t.push(V.node(r,r+e.nodeSize,{id:i}))}}),Ke.create(e.doc,t)}}})]}}),sk=new class{byExt=new Map;register(e){for(let t of e.exts)this.byExt.set(t.toLowerCase(),e)}lookup(e){let t=this.byExt.get(e.toLowerCase());return t?{found:!0,viewer:t}:{found:!1}}clearForTests(){this.byExt.clear()}get size(){return this.byExt.size}};function ck(e){globalThis.window?.open(e,`_blank`,`noopener,noreferrer`)}async function lk(e,t={}){let n=t.registry??sk,r=`desktopBridge`in t?t.desktopBridge:globalThis.window?.okDesktop,i=t.openUrl??ck;if(!e.forceOsDelegation){let t=n.lookup(e.ext);if(t.found){t.viewer.render(e);return}}if(r){let t=await r.shell.openAsset(e.projectRelPath);t.ok||console.warn(`[asset-dispatch] openAsset refused:`,t.reason,{projectRelPath:e.projectRelPath,ext:e.ext});return}i(e.url)}var uk=new Set([`http:`,`https:`,`mailto:`,`tel:`]);function dk(e){try{let t=new URL(e);return uk.has(t.protocol)}catch{return!1}}function fk(e=window.location.hash){let t=e.match(/^#\/([^?#]+)/);return t?decodeURIComponent(t[1]):``}function pk(e,t=window.location.hash){return Ye(e,fk(t))}function mk({docName:e,anchor:t}){return t?`#/${e}?anchor=${encodeURIComponent(t)}`:`#/${e}`}function hk(e){e.startsWith(`#`)||dk(e)?window.open(e,`_blank`,`noopener,noreferrer`):console.warn(`[safe-nav] blocked non-safe scheme:`,e)}function gk(e){window.location.assign(mk(e))}function _k(e){hk(mk(e))}function vk(e){return e.metaKey||e.ctrlKey}function yk(e,t=window.location.hash){let n=fk(t);if(!n)return;let r=document.getElementById(e);r&&r.scrollIntoView({behavior:`smooth`,block:`start`}),window.location.assign(Ve(n,e))}function bk(e,t=window.location.hash){if(e.kind===`doc`){gk(e);return}if(e.kind===`anchor`){yk(e.anchor,t);return}hk(e.url)}function xk(e,t,n=window.location.hash){return ut(fk(n),e,t)}function Sk(e,t){let n=e;for(;n&&typeof n.hasAttribute==`function`;){if(n.hasAttribute(`data-wiki-embed`)){let e=n.getAttribute(`data-target`)??``;if(!e)return null;let r=ye(e,t);return r?{kind:n.tagName===`IMG`?`image`:`asset`,relPath:r,title:r.split(`/`).pop()??e}:null}if(n.hasAttribute(`data-wiki-link`)){let e=n.getAttribute(`data-target`)??``;return e?{kind:`wiki-link`,relPath:`${e}.md`,title:e}:null}if(n.tagName===`A`&&n.hasAttribute(`href`)){let e=Ye(n.getAttribute(`href`)??``,t);if(e?.kind===`asset`){let n=ye(e.url,t);return n?{kind:`asset`,relPath:n,title:n.split(`/`).pop()??e.url}:null}}if(n.tagName===`IMG`){let e=n.getAttribute(`src`)??``;if(e){let n=Ye(e,t);if(n?.kind===`asset`){let e=ye(n.url,t);return e?{kind:`image`,relPath:e,title:e.split(`/`).pop()??n.url}:null}}}n=n.parentElement}return null}var Ck=new z(`asset-context-menu`);function wk(e){return new L({key:Ck,view(t){let n=e.showAssetMenu??(e=>{let t=globalThis.window?.okDesktop;return t?t.shell.showAssetMenu({relPath:e.relPath,title:e.title,kind:e.kind}):Promise.resolve()}),r=t=>{if(!(t.target instanceof Element))return;let r=Sk(t.target,e.sourceDocName);r&&(t.preventDefault(),n(r))};return t.dom.addEventListener(`contextmenu`,r),{destroy(){t.dom.removeEventListener(`contextmenu`,r)}}}})}var Tk=e=>{let t=(0,Y.c)(17),{kind:n,ariaLabel:r,onDeactivate:i,children:a,triggerReference:o,layout:c,className:l,"data-slot":u}=e,d=c===void 0?`standard`:c,f=(0,q.useRef)(null),p,m;t[0]===o?(p=t[1],m=t[2]):(p=()=>{let e=f.current;if(e)return ne(o,e,()=>{s(o,e,{placement:`bottom-start`,strategy:`fixed`,middleware:[ct(8),je(),He({padding:8})]}).then(t=>{let{x:n,y:r}=t;e.isConnected&&(e.style.left=`${n}px`,e.style.top=`${r}px`)}).catch(Ek)})},m=[o],t[0]=o,t[1]=p,t[2]=m),(0,q.useLayoutEffect)(p,m);let h;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(h={position:`fixed`,left:`-9999px`,top:`-9999px`},t[3]=h):h=t[3];let g=d===`wide`?`w-[min(720px,calc(100%-1rem))]`:`w-80`,_;t[4]!==l||t[5]!==g?(_=Ft(`ok-interaction-prop-panel pointer-events-auto z-40 rounded-md border border-border bg-popover p-3 shadow-lg`,g,l),t[4]=l,t[5]=g,t[6]=_):_=t[6];let v;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,J.jsx)(Ht,{className:`size-3.5`,"aria-hidden":`true`}),t[7]=v):v=t[7];let y;t[8]===i?y=t[9]:(y=(0,J.jsx)(Lt,{type:`button`,variant:`ghost`,size:`icon`,"aria-label":`Close`,onClick:i,className:`absolute right-1 top-1 size-7`,children:v}),t[8]=i,t[9]=y);let b;return t[10]!==r||t[11]!==a||t[12]!==u||t[13]!==n||t[14]!==_||t[15]!==y?(b=(0,J.jsxs)(`div`,{ref:f,role:`dialog`,"aria-label":r,"data-ok-prop-panel":n,"data-slot":u,style:h,className:_,children:[a,y]}),t[10]=r,t[11]=a,t[12]=u,t[13]=n,t[14]=_,t[15]=y,t[16]=b):b=t[16],b};function Ek(){}function Dk(e,t){let n=[e,...t.fallbackTargets??[]],r=new Set,i=null;for(let e of n){if(r.has(e))continue;r.add(e);let n=ft(e,{pages:t.pages,folderPaths:t.folderPaths,pagesBySlug:t.pagesBySlug});if(n.kind!==`asset`){if(n.kind===`missing`){i??=n;continue}return{kind:`navigate`,displayState:n.kind===`folder`?`folder`:`resolved`,resolvedTarget:n,hashDocName:n.target}}}let a=i??ft(e,{pages:t.pages,folderPaths:t.folderPaths,pagesBySlug:t.pagesBySlug});if(a.kind!==`missing`&&a.kind!==`asset`)return{kind:`navigate`,displayState:a.kind===`folder`?`folder`:`resolved`,resolvedTarget:a,hashDocName:a.target};let o=a.kind===`asset`?{kind:`missing`,target:e}:a,s=t.createDialogSeed??Oe(o.target);return{kind:`create`,displayState:`missing`,resolvedTarget:o,initialDir:s.initialDir,suggestedName:s.suggestedName}}function Ok(e){if(e.kind!==`navigate`||e.displayState!==`folder`)return null;let t=e.resolvedTarget;return`folderPath`in t?{initialDir:t.folderPath,suggestedName:`index.md`}:null}var kk=class{registry=new Map;_activeNodeId=null;listeners=new Set;_snapshot={activeNodeId:null,active:null};register(e){this.registry.set(e.nodeId,e),this._activeNodeId===e.nodeId&&this.refreshSnapshot()}deregister(e){this.registry.delete(e)&&this._activeNodeId===e&&(this._activeNodeId=null,this.refreshSnapshot())}setActiveNode(e){this._activeNodeId!==e&&(e!==null&&!this.registry.has(e)||(this._activeNodeId=e,this.refreshSnapshot()))}getActiveNode(){return this._activeNodeId}getRegistration(e){return this.registry.get(e)}hasRegistration(e){return this.registry.has(e)}clear(){this.registry.clear(),this._activeNodeId=null,this.refreshSnapshot()}getSnapshot=()=>this._snapshot;subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});refreshSnapshot(){let e=this._activeNodeId==null?null:this.registry.get(this._activeNodeId)??null;this._snapshot={activeNodeId:this._activeNodeId,active:e};for(let e of this.listeners)e()}};function Ak(e,t){let n=e??null;for(;n&&typeof n==`object`;){let e=n.getAttribute;if(typeof e==`function`){let r=e.call(n,`data-mark-id`);if(r&&t.hasRegistration(r))return r;let i=e.call(n,`data-node-id`);if(i&&t.hasRegistration(i))return i}n=n.parentElement??null}return null}var jk=e=>{let t=(0,Y.c)(18),{store:n}=e,r;t[0]===n?r=t[1]:(r=()=>n.getSnapshot(),t[0]=n,t[1]=r);let[i,a]=(0,q.useState)(r),o,s;t[2]===n?(o=t[3],s=t[4]):(o=()=>(a(n.getSnapshot()),n.subscribe(()=>{a(n.getSnapshot())})),s=[n],t[2]=n,t[3]=o,t[4]=s),(0,q.useEffect)(o,s);let{active:c}=i;if(!c)return null;let l;t[5]===n?l=t[6]:(l=()=>n.setActiveNode(null),t[5]=n,t[6]=l);let u,d,f;if(t[7]!==c.controls||t[8]!==c.nodeId||t[9]!==c.type||t[10]!==l){let e={nodeId:c.nodeId,type:c.type,deactivate:l};u=c.controls.propPanel?.(e),d=c.controls.toolbar?.(e),f=c.controls.breadcrumb?.(e),t[7]=c.controls,t[8]=c.nodeId,t[9]=c.type,t[10]=l,t[11]=u,t[12]=d,t[13]=f}else u=t[11],d=t[12],f=t[13];let p;return t[14]!==u||t[15]!==d||t[16]!==f?(p=(0,J.jsxs)(J.Fragment,{children:[u,d,f]}),t[14]=u,t[15]=d,t[16]=f,t[17]=p):p=t[17],p};function Mk(e){return e.editorView?.dom??e.view?.dom??null}function Nk(e,t){let n=e;for(;n;){if(n.getAttribute?.(`data-mark-id`)===t||n.getAttribute?.(`data-node-id`)===t)return!0;n=n.parentElement}return!1}function Pk(e){let{editor:t}=e,n=new kk,r=Mk(t),i=!1,a=null,o=n.subscribe(()=>{let e=n.getActiveNode();if(e!==null){if(typeof document<`u`){let t=document.activeElement;a=t&&Nk(t,e)?t:null}return}if(typeof document>`u`)return;let i=a;if(a=null,i&&document.contains(i)&&typeof i.focus==`function`){try{i.focus({preventScroll:!0})}catch{}return}let o=r??Mk(t);if(o&&typeof o.focus==`function`)try{o.focus({preventScroll:!0})}catch{}}),s=e=>{let t=e;if(t.button===2)return;if(t.metaKey||t.ctrlKey||t.button===1){t.button===1&&t.preventDefault?.();return}let r=Ak(e.target,n);if(r===null)return;let i=n.getRegistration(r);i?.handlePrimary&&i.handlePrimary({nodeId:r,type:i.type,newTab:!1})||n.setActiveNode(r)},c=e=>{let t=e;if(t.button===2||t.type===`click`&&t.button===1||!(t.metaKey||t.ctrlKey||t.button===1))return;let r=Ak(e.target,n);if(r===null)return;let i=n.getRegistration(r);i?.handlePrimary&&i.handlePrimary({nodeId:r,type:i.type,newTab:!0})&&t.preventDefault?.()},l=e=>{let t=e;if(t.key===`Escape`){n.getActiveNode()!==null&&(n.setActiveNode(null),t.preventDefault?.());return}if(t.key!==`Enter`&&t.key!==` `&&t.key!==`Spacebar`)return;let r=Ak(e.target,n);if(r===null)return;let i=n.getRegistration(r);t.preventDefault?.(),!(i?.handlePrimary&&i.handlePrimary({nodeId:r,type:i.type,newTab:!1}))&&n.setActiveNode(r)},u=e=>{if(n.getActiveNode()===null)return;let t=e.target;t&&(r?.contains(t)||t instanceof Element&&(t.closest(`[data-ok-interaction-layer]`)||t.closest(`[data-ok-prop-panel]`)||t.closest(`[data-ok-layer-spawned]`))||n.setActiveNode(null))},d=()=>{i||(r=Mk(t),r&&(r.addEventListener(`pointerdown`,s,!0),r.addEventListener(`click`,c,!0),r.addEventListener(`auxclick`,c,!0),r.addEventListener(`keydown`,l,!0),typeof document<`u`&&document.addEventListener(`pointerdown`,u,!0),i=!0))},f=()=>{i&&=(r?.removeEventListener(`pointerdown`,s,!0),r?.removeEventListener(`click`,c,!0),r?.removeEventListener(`auxclick`,c,!0),r?.removeEventListener(`keydown`,l,!0),typeof document<`u`&&document.removeEventListener(`pointerdown`,u,!0),!1)};return d(),{register(e){n.register(e),i||d()},deregister(e){n.deregister(e)},setActiveNode(e){n.setActiveNode(e)},getActiveNode(){return n.getActiveNode()},getRegistration(e){return n.getRegistration(e)},destroy(){f(),o(),n.clear()},store:n}}var Fk=e=>{let t=(0,Y.c)(2),{store:n}=e,r;return t[0]===n?r=t[1]:(r=(0,J.jsx)(`div`,{"data-ok-interaction-layer":``,className:`contents`,children:(0,J.jsx)(jk,{store:n})}),t[0]=n,t[1]=r),r},Ik=new WeakMap;function Lk(e){let t=Ik.get(e);if(t)return t;let n=Pk({editor:e});return Ik.set(e,n),e.on(`destroy`,()=>{n.destroy(),Ik.delete(e)}),n}var Rk=new z(`markIdentity`);function zk(){return{byId:new Map,counter:0}}function Bk(e,t,n,r,i){let a=[];for(let e of t.byId.values()){let t=i?i.map(e.from,-1):e.from,n=i?i.map(e.to,1):e.to;n<=t||a.push({id:e.id,markType:e.markType,attrs:e.attrs,from:t,to:n})}let o=new Map,s=new Set,c=t.counter;return e.descendants((e,t)=>{if(!(!e.isInline||e.marks.length===0))for(let i of e.marks){if(!n.has(i.type.name)||r&&!r(i))continue;let l=null;for(let e of a)if(!s.has(e.id)&&e.markType===i.type.name&&Vk(e.attrs,i.attrs)&&!(t<e.from||t>=e.to)){l=e.id;break}let u=l??`m${++c}`;s.add(u);let d=t,f=t+e.nodeSize,p=o.get(u);p?p.to=Math.max(p.to,f):o.set(u,{id:u,markType:i.type.name,attrs:i.attrs,from:d,to:f})}}),{byId:o,counter:c}}function Vk(e,t){let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n){let n=e[r],i=t[r];if(n!==i&&!(typeof n==`object`&&n&&typeof i==`object`&&i&&Vk(n,i)))return!1}return!0}function Hk(e,t,n,r){let i=new Set(t.byId.keys());for(let[r,i]of t.byId)e.has(r)||n?.(i);for(let t of e)i.has(t)||r?.(t);return i}function Uk(e){let{markTypes:t,predicate:n,onRegister:r,onDeregister:i}=e,a=new Set(t);return new L({key:Rk,state:{init(e,t){return Bk(t.doc,zk(),a,n)},apply(e,t,r,i){return e.docChanged?Bk(i.doc,t,a,n,e.mapping):t}},view(){let e=new Set;return{update(t){let n=Rk.getState(t.state);n&&(e=Hk(e,n,r,i))},destroy(){for(let t of e)i?.(t);e=new Set}}}})}function Wk(e,t){return Rk.getState(e)?.byId.get(t)??null}function Gk(e){let{editor:t,layer:n,renderPropPanel:r,handlePrimary:i}=e;return{onRegister:e=>{n.register({type:e.markType,nodeId:e.id,controls:{propPanel:e=>r({editor:t,nodeId:e.nodeId,deactivate:e.deactivate})},handlePrimary:i?e=>i({editor:t,nodeId:e.nodeId,newTab:e.newTab}):void 0})},onDeregister:e=>{n.deregister(e)}}}function Kk(e){let{editor:t,layer:n,markTypes:r,predicate:i,renderPropPanel:a,handlePrimary:o}=e,s=Gk({editor:t,layer:n,renderPropPanel:a,handlePrimary:o});return Uk({markTypes:[...r],predicate:i,onRegister:s.onRegister,onDeregister:s.onDeregister})}function qk(e){let t=Lk(e.editor);return Kk({...e,layer:t})}function Jk(e){return e.kind===`asset`?e.target:e.kind===`anchor`?`${e.docName}#${e.slug}`:e.docName}function Yk(e){return e.kind===`anchor`?`Heading H${e.level}: ${e.text}`:e.kind===`asset`?`Asset: ${e.title}`:e.kind===`create`?e.actionLabel:e.title}function Xk(e){let t=(0,Y.c)(41),{items:n,query:r,selectedIndex:i,onSelect:a,loading:o,error:s,mode:c,pageTarget:l,anchorQuery:u}=e,d=o===void 0?!1:o,f=s===void 0?null:s,p=c===void 0?`page`:c,m=l===void 0?``:l,h=u===void 0?``:u,g=(0,q.useRef)(null),_=(0,q.useId)(),v=i>=0&&i<n.length?`${_}-option-${i}`:void 0,y,b;t[0]===i?(y=t[1],b=t[2]):(y=()=>{let e=g.current;if(!e)return;let t=e.querySelectorAll(`[role="option"]`).item(i);t&&t.scrollIntoView({block:`nearest`})},b=[i],t[0]=i,t[1]=y,t[2]=b),(0,q.useEffect)(y,b);let x=Zk;if(d){let e;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e={maxHeight:`var(--suggestion-menu-max-height, 40vh)`},t[3]=e):e=t[3];let n=p===`anchor`?`Loading headings for ${m}…`:`Loading pages…`,r;return t[4]===n?r=t[5]:(r=(0,J.jsx)(`div`,{ref:g,role:`status`,"aria-live":`polite`,className:`w-64 rounded-lg border bg-popover p-2 shadow-md text-sm text-muted-foreground`,style:e,onMouseDown:x,children:n}),t[4]=n,t[5]=r),r}if(n.length===0){let e;t[6]!==h||t[7]!==f||t[8]!==p||t[9]!==m||t[10]!==r?(e=f??(p===`anchor`?h.trim()?`No headings match "${h.trim()}"`:`No headings in ${m}`:r.trim()?`No pages found for "${r.trim()}"`:`No pages found`),t[6]=h,t[7]=f,t[8]=p,t[9]=m,t[10]=r,t[11]=e):e=t[11];let n=e,i;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(i={maxHeight:`var(--suggestion-menu-max-height, 40vh)`},t[12]=i):i=t[12];let a;return t[13]===n?a=t[14]:(a=(0,J.jsx)(`div`,{ref:g,role:`status`,"aria-live":`polite`,className:`w-64 rounded-lg border bg-popover p-2 shadow-md text-sm text-muted-foreground`,style:i,onMouseDown:x,children:n}),t[13]=n,t[14]=a),a}let S=i>=0&&i<n.length?n[i]:null,C=p===`anchor`?`Heading suggestions`:`Wiki link suggestions`,w;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(w={maxHeight:`var(--suggestion-menu-max-height, 40vh)`},t[15]=w):w=t[15];let T;t[16]===S?T=t[17]:(T=S?Yk(S):``,t[16]=S,t[17]=T);let E;t[18]===T?E=t[19]:(E=(0,J.jsx)(`span`,{className:`sr-only`,"aria-live":`polite`,"aria-atomic":`true`,children:T}),t[18]=T,t[19]=E);let D;t[20]===f?D=t[21]:(D=f&&(0,J.jsx)(`div`,{className:`rounded-md px-2 py-1.5 text-xs text-amber-700 dark:text-amber-300`,children:f}),t[20]=f,t[21]=D);let O;t[22]!==p||t[23]!==m?(O=p===`anchor`&&(0,J.jsx)(`div`,{className:`px-2 py-1 text-[10px] font-medium uppercase tracking-wide text-muted-foreground`,children:m}),t[22]=p,t[23]=m,t[24]=O):O=t[24];let k;if(t[25]!==n||t[26]!==_||t[27]!==a||t[28]!==i){let e;t[30]!==_||t[31]!==a||t[32]!==i?(e=(e,t)=>{let n=t===i,r=Jk(e);return e.kind===`anchor`?(0,J.jsxs)(`button`,{id:`${_}-option-${t}`,type:`button`,role:`option`,"aria-selected":n,"data-selected":n,className:`flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm text-left ${n?`bg-accent text-accent-foreground`:``}`,style:{paddingLeft:`${(e.level-1)*10+8}px`},onMouseDown:t=>{t.preventDefault(),a(e)},children:[(0,J.jsxs)(`span`,{className:`w-6 shrink-0 font-mono text-[10px] text-muted-foreground`,children:[`H`,e.level]}),(0,J.jsx)(`span`,{className:`truncate font-medium`,children:e.text})]},r):(0,J.jsxs)(`button`,{id:`${_}-option-${t}`,type:`button`,role:`option`,"aria-selected":n,"data-selected":n,className:`flex w-full flex-col rounded-md px-2 py-1.5 text-sm text-left ${n?`bg-accent text-accent-foreground`:``}`,onMouseDown:t=>{t.preventDefault(),a(e)},children:[(0,J.jsx)(`span`,{className:`truncate font-medium`,children:e.kind===`create`?e.actionLabel:e.title}),e.kind===`page`&&e.title!==e.docName&&(0,J.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:e.docName}),e.kind===`asset`&&(0,J.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:e.path}),e.kind===`create`&&(0,J.jsxs)(`span`,{className:`truncate text-xs text-muted-foreground`,children:[e.docName,`.md`]})]},r)},t[30]=_,t[31]=a,t[32]=i,t[33]=e):e=t[33],k=n.map(e),t[25]=n,t[26]=_,t[27]=a,t[28]=i,t[29]=k}else k=t[29];let A;return t[34]!==v||t[35]!==E||t[36]!==D||t[37]!==O||t[38]!==k||t[39]!==C?(A=(0,J.jsxs)(`div`,{ref:g,role:`listbox`,"aria-label":C,"aria-activedescendant":v,tabIndex:-1,onMouseDown:x,className:`w-64 overflow-y-auto subtle-scrollbar rounded-lg border bg-popover p-1 shadow-md`,style:w,children:[E,D,O,k]}),t[34]=v,t[35]=E,t[36]=D,t[37]=O,t[38]=k,t[39]=C,t[40]=A):A=t[40],A}function Zk(e){return e.preventDefault()}var Qk=new z(`wikiLinkSuggestion`),$k=8,eA=null,tA=null;function nA(e){let t=e.indexOf(`#`);return t>0?{mode:`anchor`,pageTarget:e.slice(0,t),anchorQuery:e.slice(t+1)}:{mode:`page`,pageTarget:``,anchorQuery:``}}function rA(e,t){if(!t)return e.slice(0,$k);let n=iA(e);return re(n.corpus,t,{intent:`autocomplete`,limit:$k}).map(e=>n.byPath.get(e.document.path)).filter(e=>!!e)}function iA(e){let t=e.map(e=>`${e.kind??`page`}\u0000${e.docName}\u0000${e.title}`).join(``);return eA?.fingerprint===t||(eA={fingerprint:t,byPath:new Map(e.map(e=>[e.docName,e])),corpus:Le(e.map(e=>xe({kind:`page`,path:e.docName,title:e.title})))}),eA}function aA(e){let t=e.map(e=>`${e.slug}\u0000${e.level}\u0000${e.text}`).join(``);return tA?.fingerprint===t||(tA={fingerprint:t,byPath:new Map(e.map(e=>[e.slug,e])),corpus:Le(e.map(e=>xe({kind:`page`,path:e.slug,title:e.text})))}),tA}function oA(e,t){if(!t)return e.slice(0,$k);let n=aA(e);return re(n.corpus,t,{intent:`autocomplete`,limit:$k}).map(e=>n.byPath.get(e.document.path)).filter(e=>!!e)}function sA(e,t){let n=rA(e,t);if(n.length>0)return n.map(e=>e.kind===`asset`?{kind:`asset`,target:e.docName,path:e.docName.replace(/^\//,``),title:e.title}:{kind:`page`,docName:e.docName,title:e.title});let r=oC(t);return r?[{kind:`create`,docName:r.target,title:t.trim(),actionLabel:`Insert unresolved link "${t.trim()}"`}]:[]}function cA(e,t,n){return oA(t,n).map(t=>({kind:`anchor`,docName:e,level:t.level,text:t.text,slug:t.slug}))}function lA(e){let{mode:t,pageTarget:n,anchorQuery:r}=nA(e);return t===`anchor`&&n?{target:n,alias:null,anchor:r.trim()||null}:oC(e)}function uA(e){let{$position:t}=e,n=t.parent.textBetween(0,t.parentOffset,void 0,``),r=n.match(/\[\[([^\]]*)$/);if(!r)return null;let i=r[1];return{range:{from:t.start()+n.lastIndexOf(`[[`),to:t.pos},query:i,text:r[0]}}async function dA(){let e=await fetch(`/api/pages`);if(!e.ok)throw Error(`/api/pages responded with ${e.status}`);let t=await e.json(),n=Array.isArray(t.pages)?t.pages.map(e=>({kind:`page`,docName:e.docName,title:e.title})):[],r;try{let e=await fetch(`/api/documents`);if(!e.ok)return console.warn(`[wiki-link-suggestion] /api/documents responded with`,e.status),n;if(r=await e.json(),!Array.isArray(r.documents))return n}catch(e){return console.warn(`[wiki-link-suggestion] Failed to fetch referenced assets:`,e),n}let i=r.documents.filter(e=>e.kind===`asset`&&typeof e.path==`string`&&e.path.length>0).map(e=>{let t=e.path.split(`/`).pop()??e.path;return{kind:`asset`,docName:`/${e.path}`,title:t}});return[...n,...i]}async function fA(e){let t=await fetch(`/api/page-headings?docName=${encodeURIComponent(e)}`);if(!t.ok)throw Error(`/api/page-headings responded with ${t.status}`);let n=await t.json();return n.ok&&Array.isArray(n.headings)?n.headings:[]}function pA(e){let t=[],n=!1,r=null,i=new Map,a=null,o=null,s=null;return tv({editor:e,pluginKey:Qk,char:`[[`,allowedPrefixes:null,findSuggestionMatch:uA,items:async({query:e})=>{let{mode:c,pageTarget:l,anchorQuery:u}=nA(e);if(c===`anchor`){if(!i.has(l)&&a!==l){a=l;try{let e=await fA(l);i.set(l,e),s=null}catch(e){console.error(`[wiki-link-suggestion] Failed to fetch headings:`,e),i.set(l,[]),s=`Failed to load headings for ${l}. Press Escape and type [[ again to retry.`}finally{a=null}}return cA(l,i.get(l)??[],u)}if(!n){r||=dA();try{t=await r,o=null}catch(e){console.error(`[wiki-link-suggestion] Failed to fetch pages:`,e),o=`Failed to load pages. Press Escape and type [[ again to retry, or continue typing to insert an unresolved link.`,t=[]}finally{n=!0,r=null}}return sA(t,e)},command:({editor:e,range:t,props:n})=>{try{let r=null;if(n.kind===`page`?r={target:n.docName,alias:null,anchor:null}:n.kind===`asset`?r={target:n.target,alias:n.title,anchor:null}:n.kind===`anchor`?r={target:n.docName,alias:null,anchor:n.slug}:n.kind===`create`&&(r=oC(n.title)),!r)return;e.chain().focus().deleteRange(t).insertContent({type:`wikiLink`,attrs:r}).run()}catch(e){console.error(`[wiki-link-suggestion] command failed`,{item:n,range:t},e)}},render:()=>{let e=null,c=null,l=0,u={popup:null,stopAutoUpdate:null},d=null,f=null,p=e=>{c?.command(e)};function m(e,t,r){let{mode:a,pageTarget:c,anchorQuery:u}=nA(e.query??``),d=t===null?a===`anchor`?!i.has(c):!n:t;return{items:e.items,query:e.query??``,selectedIndex:l,onSelect:r,loading:d,error:a===`page`?o:s,mode:a,pageTarget:c,anchorQuery:u}}let h=t=>{!e||!c||e.updateProps(m(c,t,p))},g=()=>{if(!c)return;let{editor:e,range:t}=c,n=lA(c.query??``);if(n)try{e.chain().focus().deleteRange(t).insertContent({type:`wikiLink`,attrs:n}).run()}catch(e){console.error(`[wiki-link-suggestion] fallback insert error:`,e)}};return{onBeforeStart(t){c=t,l=0;let n=ov(()=>c,`wiki-link-suggestion`);u.popup=n.popup,d=n.doPosition,f=n.reveal,e=new dc(Xk,{props:m(t,!0,p),editor:t.editor}),n.popup.appendChild(e.element),u.stopAutoUpdate=n.startAutoUpdate()},onBeforeUpdate(e){let t=c?nA(c.query??``).mode:null,n=nA(e.query??``).mode;c=e,t!==n&&(l=0,h(!0))},onStart(e){c=e,l=0,h(null),f?.()},onUpdate(e){c=e,l=Math.min(l,Math.max(0,e.items.length-1)),h(null),d?.()},onKeyDown({event:e}){if(!c)return!1;let t=c.items;if(e.key===`ArrowDown`)return t.length===0?!1:(l=(l+1)%t.length,h(null),!0);if(e.key===`ArrowUp`)return t.length===0?!1:(l=(l-1+t.length)%t.length,h(null),!0);if(e.key===`Enter`||e.key===`Tab`){let e=t[l];return e?c.command(e):g(),!0}return e.key,!1},onExit(){sv(u),d=null,f=null,e?.destroy(),e=null,c=null,l=0,t=[],i=new Map,o=null,s=null,n=!1,r=null,a=null}}}})}function mA(e,t){let n=(0,Y.c)(4),[r,i]=(0,q.useState)(null),a,o;return n[0]!==e||n[1]!==t?(a=()=>{if(!t||!e){i(null);return}let n=!1;return i(null),fA(e).then(e=>{n||i(e)}).catch(()=>{n||i([])}),()=>{n=!0}},o=[e,t],n[0]=e,n[1]=t,n[2]=a,n[3]=o):(a=n[2],o=n[3]),(0,q.useEffect)(a,o),r}function hA(e,t){let n=e.trim();return n?n.startsWith(`#`)?`anchor`:n.startsWith(`/`)||wt(n)?`external`:`doc`:t}function gA(e){return e?.kind===`doc`?`doc`:e?.kind===`anchor`?`anchor`:`external`}function _A(e){let t=(0,Y.c)(64),{open:n,href:r,pages:i,onOpenChange:a,onSave:o}=e,[s,c]=(0,q.useState)(``),[l,u]=(0,q.useState)(``),[d,f]=(0,q.useState)(`doc`),p=(0,q.useId)(),m=(0,q.useId)(),h=(0,q.useId)(),g,_;t[0]!==r||t[1]!==n?(g=()=>{if(!n)return;let e=pk(r);if(f(gA(e)),e?.kind===`doc`){c(e.docName),u(e.anchor??``);return}if(e?.kind===`anchor`){c(`#${e.anchor}`),u(``);return}c(e?.kind===`external`?e.url:r),u(``)},_=[r,n],t[0]=r,t[1]=n,t[2]=g,t[3]=_):(g=t[2],_=t[3]),(0,q.useEffect)(g,_);let v,y,b;t[4]!==d||t[5]!==s||t[6]!==i?(v=Ne(s),y=d===`doc`,b=y&&uC(v,i),t[4]=d,t[5]=s,t[6]=i,t[7]=v,t[8]=y,t[9]=b):(v=t[7],y=t[8],b=t[9]);let x=mA(v,b&&n),S=!!x?.length,C;t[10]!==v||t[11]!==y||t[12]!==l||t[13]!==s||t[14]!==a||t[15]!==o?(C=function(){let e=s.trim();e&&(o(y?xk(v,l.trim()||null):e),a(!1))},t[10]=v,t[11]=y,t[12]=l,t[13]=s,t[14]=a,t[15]=o,t[16]=C):C=t[16];let w=C,T;t[17]===w?T=t[18]:(T=function(e){e.key===`Enter`&&(e.preventDefault(),w())},t[17]=w,t[18]=T);let E=T,D;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,J.jsx)(qt,{className:`fixed inset-0 z-50 bg-black/40 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`}),t[19]=D):D=t[19];let O,k;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,J.jsx)(Yt,{className:`mb-1 text-base font-semibold`,children:`Edit markdown link`}),k=(0,J.jsx)(Kt,{className:`mb-4 text-sm text-muted-foreground`,children:`Update the destination and optional section anchor.`}),t[20]=O,t[21]=k):(O=t[20],k=t[21]);let A=y?`Page`:`Link target`,j;t[22]!==A||t[23]!==p?(j=(0,J.jsx)(`label`,{className:`mb-1.5 block text-sm font-medium`,htmlFor:p,children:A}),t[22]=A,t[23]=p,t[24]=j):j=t[24];let M;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(M=e=>{let t=e.target.value;c(t),f(e=>hA(t,e))},t[25]=M):M=t[25];let N;t[26]!==s||t[27]!==E||t[28]!==p?(N=(0,J.jsx)(Ro,{id:p,value:s,onChange:M,placeholder:`guides/install or https://example.com`,autoFocus:!0,onKeyDown:E}),t[26]=s,t[27]=E,t[28]=p,t[29]=N):N=t[29];let P;t[30]===y?P=t[31]:(P=y?(0,J.jsx)(`p`,{className:`mt-1.5 text-xs text-muted-foreground`,children:`This changes the destination page. The visible link text stays editable inline in the document.`}):null,t[30]=y,t[31]=P);let F;t[32]!==j||t[33]!==N||t[34]!==P?(F=(0,J.jsxs)(`div`,{children:[j,N,P]}),t[32]=j,t[33]=N,t[34]=P,t[35]=F):F=t[35];let I;t[36]!==m||t[37]!==y||t[38]!==l||t[39]!==E||t[40]!==h||t[41]!==x||t[42]!==S?(I=y?(0,J.jsxs)(`div`,{children:[(0,J.jsxs)(`label`,{className:`mb-1.5 block text-sm font-medium`,htmlFor:m,children:[`Section`,` `,(0,J.jsx)(`span`,{className:`font-normal text-muted-foreground`,children:`(optional heading anchor)`})]}),(0,J.jsx)(Ro,{id:m,value:l,onChange:e=>u(e.target.value),placeholder:`heading-slug`,"aria-controls":S?h:void 0,"aria-expanded":S?!0:void 0,"aria-haspopup":S?`listbox`:void 0,onKeyDown:E}),S?(0,J.jsx)(`div`,{role:`listbox`,id:h,"aria-label":`Heading anchors`,className:`mt-1.5 max-h-36 overflow-y-auto subtle-scrollbar rounded-md border border-border bg-muted/30`,children:x.map(e=>(0,J.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":l===e.slug,className:Ft(`flex w-full items-center gap-2 px-2 py-1 text-left text-sm hover:bg-accent hover:text-accent-foreground`,l===e.slug&&`bg-accent text-accent-foreground`),style:{paddingLeft:`${(e.level-1)*12+8}px`},onClick:()=>u(l===e.slug?``:e.slug),children:[(0,J.jsxs)(`span`,{className:`w-7 shrink-0 font-mono text-[10px] text-muted-foreground`,children:[`H`,e.level]}),(0,J.jsx)(`span`,{className:`truncate`,children:e.text})]},`${e.slug}-${e.level}-${e.text}`))}):null]}):null,t[36]=m,t[37]=y,t[38]=l,t[39]=E,t[40]=h,t[41]=x,t[42]=S,t[43]=I):I=t[43];let L;t[44]!==F||t[45]!==I?(L=(0,J.jsxs)(`div`,{className:`mb-4 space-y-6`,children:[F,I]}),t[44]=F,t[45]=I,t[46]=L):L=t[46];let R;t[47]===a?R=t[48]:(R=(0,J.jsx)(Lt,{variant:`outline`,onClick:()=>a(!1),children:`Cancel`}),t[47]=a,t[48]=R);let z;t[49]===s?z=t[50]:(z=s.trim(),t[49]=s,t[50]=z);let B=!z,V;t[51]!==w||t[52]!==B?(V=(0,J.jsx)(Lt,{onClick:w,disabled:B,children:`Save`}),t[51]=w,t[52]=B,t[53]=V):V=t[53];let H;t[54]!==R||t[55]!==V?(H=(0,J.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[R,V]}),t[54]=R,t[55]=V,t[56]=H):H=t[56];let U;t[57]!==L||t[58]!==H?(U=(0,J.jsxs)(en,{children:[D,(0,J.jsxs)(rn,{"data-slot":`dialog-content`,"data-ok-layer-spawned":``,className:`fixed left-1/2 top-1/2 z-50 w-full max-w-md -translate-x-1/2 -translate-y-1/2 rounded-lg border border-border bg-background p-6 shadow-xl data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,children:[O,k,L,H]})]}),t[57]=L,t[58]=H,t[59]=U):U=t[59];let W;return t[60]!==a||t[61]!==n||t[62]!==U?(W=(0,J.jsx)(Zt,{open:n,onOpenChange:a,children:U}),t[60]=a,t[61]=n,t[62]=U,t[63]=W):W=t[63],W}function vA(e){let t=(0,Y.c)(93),{editor:n,nodeId:r,sourceDocName:i,onClose:a}=e,o=Wk(n.state,r),s=o?.attrs?.href??``,[c,l]=(0,q.useState)(!1),[u,d]=(0,q.useState)(null),{folderPaths:f,pages:p,loading:m}=Te();if(!o||!s)return null;let h=Ye(s,i),g=h?.kind===`doc`?`${h.docName}${h.anchor?`#${h.anchor}`:``}`:h?.kind===`anchor`?`#${h.anchor}`:h?.kind===`external`?h.url:s,_;t[0]!==n||t[1]!==r?(_=function(e){let t=Wk(n.state,r);t&&n.chain().setTextSelection({from:t.from,to:t.to}).extendMarkRange(`link`).updateAttributes(`link`,{href:e}).run()},t[0]=n,t[1]=r,t[2]=_):_=t[2];let y=_,b;t[3]!==n||t[4]!==r||t[5]!==a?(b=function(){let e=Wk(n.state,r);e&&(n.chain().focus().setTextSelection({from:e.from,to:e.to}).extendMarkRange(`link`).unsetLink().run(),a())},t[3]=n,t[4]=r,t[5]=a,t[6]=b):b=t[6];let x=b,S=function(e){if(h){if(h.kind===`asset`){let t=ye(h.url,i);if(!t)return;lk({url:h.url,projectRelPath:t,ext:h.ext,title:t.split(`/`).pop()??h.url,forceOsDelegation:e.newTab??!1});return}if(h.kind===`external`){bk(h);return}if(h.kind===`anchor`||h.kind===`doc`){let t=h.kind===`doc`?h.docName:i,n=h.anchor??null;e.newTab?_k({docName:t,anchor:n}):window.location.assign(mk({docName:t,anchor:n}))}}},C=function(e){if(u!==`missing`)return;let t=Wk(n.state,r);t&&n.chain().setTextSelection({from:t.from,to:t.to}).extendMarkRange(`link`).updateAttributes(`link`,{href:xk(e,h?.kind===`doc`?h.anchor??null:null)}).run()},w,T=!1,E=!1,D=null;if(m){let e;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,J.jsx)(Ir,{className:`size-3.5 shrink-0 animate-spin`,"aria-hidden":`true`}),t[7]=e):e=t[7],w={icon:e,text:`Loading…`,className:`text-muted-foreground`}}else if(h?.kind===`asset`){let e;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,J.jsx)(Cr,{className:`size-3.5 shrink-0`,"aria-hidden":`true`}),t[8]=e):e=t[8],w={icon:e,text:`Asset reference`,className:`text-foreground`}}else if(h?.kind===`external`){let e;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,J.jsx)(br,{className:`size-3.5 shrink-0`,"aria-hidden":`true`}),t[9]=e):e=t[9],w={icon:e,text:`External link`,className:`text-foreground`}}else if(h?.kind===`anchor`){let e;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,J.jsx)(Cr,{className:`size-3.5 shrink-0`,"aria-hidden":`true`}),t[10]=e):e=t[10],w={icon:e,text:`Anchor in this page`,className:`text-foreground`}}else if(h?.kind===`doc`){let e=Dk(h.docName,{pages:p,folderPaths:f});if(D=Ok(e),E=e.kind===`navigate`&&e.displayState===`folder`,T=e.kind===`create`,E){let e;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,J.jsx)(Tr,{className:`size-3.5 shrink-0`,"aria-hidden":`true`}),t[11]=e):e=t[11],w={icon:e,text:`Folder (no index)`,className:`text-foreground`}}else if(T){let e;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,J.jsx)(hr,{className:`size-3.5 shrink-0`,"aria-hidden":`true`}),t[12]=e):e=t[12],w={icon:e,text:`Page not found`,className:`text-red-700 dark:text-red-300`}}else{let e;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,J.jsx)(Cr,{className:`size-3.5 shrink-0`,"aria-hidden":`true`}),t[13]=e):e=t[13],w={icon:e,text:`Page link`,className:`text-foreground`}}}else{let e;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,J.jsx)(hr,{className:`size-3.5 shrink-0`,"aria-hidden":`true`}),t[14]=e):e=t[14],w={icon:e,text:`Unrecognized link`,className:`text-muted-foreground`}}let O;t[15]!==n.state||t[16]!==n.view||t[17]!==r?(O=()=>{let e=Wk(n.state,r);if(!e)return new DOMRect;try{return v(n.view,e.from,e.to)}catch{return new DOMRect}},t[15]=n.state,t[16]=n.view,t[17]=r,t[18]=O):O=t[18];let k;t[19]!==n.view.dom||t[20]!==O?(k={getBoundingClientRect:O,contextElement:n.view.dom},t[19]=n.view.dom,t[20]=O,t[21]=k):k=t[21];let A=k,j=Ft(`text-sm font-medium`,w.className),M;t[22]!==w.text||t[23]!==j?(M=(0,J.jsx)(`div`,{className:j,children:w.text}),t[22]=w.text,t[23]=j,t[24]=M):M=t[24];let N;t[25]===g?N=t[26]:(N=(0,J.jsx)(`div`,{className:`truncate font-mono text-xs text-muted-foreground`,title:g,children:g}),t[25]=g,t[26]=N);let P;t[27]!==M||t[28]!==N?(P=(0,J.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[M,N]}),t[27]=M,t[28]=N,t[29]=P):P=t[29];let F;t[30]!==S||t[31]!==T||t[32]!==a||t[33]!==h?.kind?(F=T?null:(0,J.jsx)(Lt,{size:`sm`,variant:`default`,onClick:()=>{S({}),a()},children:h?.kind===`external`?`Open in new tab`:`Open`}),t[30]=S,t[31]=T,t[32]=a,t[33]=h?.kind,t[34]=F):F=t[34];let I;t[35]!==T||t[36]!==d?(I=T?(0,J.jsx)(Lt,{size:`sm`,variant:`default`,onClick:()=>d(`missing`),children:`Create page`}):null,t[35]=T,t[36]=d,t[37]=I):I=t[37];let L;t[38]!==D||t[39]!==E||t[40]!==d?(L=E&&D?(0,J.jsxs)(Lt,{size:`sm`,variant:`outline`,onClick:()=>d(`folder-index`),children:[(0,J.jsx)(Sr,{className:`size-3.5`,"aria-hidden":`true`}),`Create index`]}):null,t[38]=D,t[39]=E,t[40]=d,t[41]=L):L=t[41];let R;t[42]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,J.jsx)(`div`,{className:`flex-1`}),t[42]=R):R=t[42];let z;t[43]===l?z=t[44]:(z=()=>l(!0),t[43]=l,t[44]=z);let B;t[45]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,J.jsx)(Vr,{className:`size-3.5`,"aria-hidden":`true`}),t[45]=B):B=t[45];let V;t[46]===z?V=t[47]:(V=(0,J.jsxs)(Lt,{size:`sm`,variant:`outline`,onClick:z,children:[B,`Edit`]}),t[46]=z,t[47]=V);let H;t[48]===T?H=t[49]:(H=T?(0,J.jsx)(Yr,{className:`size-3.5`,"aria-hidden":`true`}):(0,J.jsx)(Jr,{className:`size-3.5`,"aria-hidden":`true`}),t[48]=T,t[49]=H);let U=T?`Unlink`:`Remove`,W;t[50]!==x||t[51]!==H||t[52]!==U?(W=(0,J.jsxs)(Lt,{size:`sm`,variant:`destructive`,onClick:x,children:[H,U]}),t[50]=x,t[51]=H,t[52]=U,t[53]=W):W=t[53];let ee;t[54]!==F||t[55]!==I||t[56]!==L||t[57]!==V||t[58]!==W?(ee=(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[F,I,L,R,V,W]}),t[54]=F,t[55]=I,t[56]=L,t[57]=V,t[58]=W,t[59]=ee):ee=t[59];let te=u!==null,ne;t[60]===d?ne=t[61]:(ne=e=>{e||d(null)},t[60]=d,t[61]=ne);let re;t[62]!==u||t[63]!==D||t[64]!==f||t[65]!==T||t[66]!==p||t[67]!==h?(re=u===`folder-index`&&D?D.initialDir:T&&h?.kind===`doc`&&Dk(h.docName,{pages:p,folderPaths:f}).kind===`create`?Dk(h.docName,{pages:p,folderPaths:f}).initialDir:``,t[62]=u,t[63]=D,t[64]=f,t[65]=T,t[66]=p,t[67]=h,t[68]=re):re=t[68];let ie;t[69]!==u||t[70]!==D||t[71]!==f||t[72]!==T||t[73]!==p||t[74]!==h?(ie=u===`folder-index`&&D?D.suggestedName:T&&h?.kind===`doc`&&Dk(h.docName,{pages:p,folderPaths:f}).kind===`create`?Dk(h.docName,{pages:p,folderPaths:f}).suggestedName:void 0,t[69]=u,t[70]=D,t[71]=f,t[72]=T,t[73]=p,t[74]=h,t[75]=ie):ie=t[75];let ae;t[76]!==u||t[77]!==D||t[78]!==h?(ae=u===`folder-index`&&D?(0,J.jsxs)(J.Fragment,{children:[`Create an index note for`,` `,(0,J.jsxs)(`span`,{className:`font-medium text-foreground`,children:[D.initialDir,`/`]})]}):(0,J.jsxs)(J.Fragment,{children:[`Create a page for`,` `,(0,J.jsx)(`span`,{className:`font-medium text-foreground`,children:h?.kind===`doc`?h.docName:``})]}),t[76]=u,t[77]=D,t[78]=h,t[79]=ae):ae=t[79];let oe;t[80]!==C||t[81]!==te||t[82]!==ne||t[83]!==re||t[84]!==ie||t[85]!==ae?(oe=(0,J.jsx)(Cv,{open:te,onOpenChange:ne,kind:`file`,initialDir:re,suggestedName:ie,description:ae,onCreated:C}),t[80]=C,t[81]=te,t[82]=ne,t[83]=re,t[84]=ie,t[85]=ae,t[86]=oe):oe=t[86];let se;return t[87]!==c||t[88]!==y||t[89]!==s||t[90]!==p||t[91]!==l?(se=(0,J.jsx)(_A,{open:c,href:s,pages:p,onOpenChange:l,onSave:y}),t[87]=c,t[88]=y,t[89]=s,t[90]=p,t[91]=l,t[92]=se):se=t[92],(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(Tk,{kind:`internal-link`,ariaLabel:`Link options`,onDeactivate:a,triggerReference:A,children:[(0,J.jsxs)(`div`,{className:`mb-2 flex items-start gap-2 pr-8`,children:[(0,J.jsx)(`div`,{className:Ft(`mt-0.5 flex shrink-0`,w.className),children:w.icon}),P]}),ee]}),oe,se]})}function yA(e,t,n){let r=Ye(e,t);if(!r)return`unresolved`;if(r.kind===`external`)return`external`;if(r.kind===`anchor`)return`anchor`;if(r.kind===`asset`)return`asset`;if(n===null)return`loading`;let i=Dk(r.docName,{pages:n.pages,folderPaths:n.folderPaths});return i.kind===`create`?`unresolved`:i.displayState}function bA(e,t,n){let r=e.attrs?.href;return typeof r!=`string`||r.length===0||e.attrs?.sourceForm===`wikiembed`?null:{"data-resolution-state":yA(r,n,t)}}function xA(e){return(t,n)=>bA(t,n,e)}new z(`markIdentityDecoration`);var SA=`data-mark-id`,CA=new z(`linkResolutionDecoration`);function wA(e,t,n,r,i){if(t.size===0)return null;let a=[];for(let e of t.values()){if(!n.has(e.markType))continue;let t=r(e,i),o={[SA]:e.id};t!==null&&Object.assign(o,t),a.push(V.inline(e.from,e.to,o))}return a.length===0?null:Ke.create(e,a)}function TA(e){let t=new Set(e.markTypes),{computeAttrs:n}=e;return new L({key:CA,state:{init:()=>({version:0}),apply(e,t){let n=e.getMeta(CA);return n&&typeof n==`object`&&n.refresh?{version:t.version+1}:t}},props:{decorations(e){let r=Rk.getState(e);if(!r)return null;let i=Re();return wA(e.doc,r.byId,t,n,i)}},view(e){X(`ok/render/decoration-merge`,{markTypes:Array.from(t).join(`,`)},{startTime:performance.now(),duration:0});let n=Fe(()=>{e.dispatch(e.state.tr.setMeta(CA,{refresh:!0}))});return{destroy(){n()}}}})}var EA=u.extend({addOptions(){return{...this.parent?.(),docName:``}},renderHTML({HTMLAttributes:e}){let t=typeof e.href==`string`?e.href:``;return[`span`,le(e,{"data-link":``,role:`link`,tabindex:`0`,"aria-label":t?`Link: ${t}`:`Link`,style:`touch-action: manipulation;`}),0]},addProseMirrorPlugins(){let e=this.options.docName??``;return[qk({editor:this.editor,markTypes:[`link`],renderPropPanel:({editor:t,nodeId:n,deactivate:r})=>(0,q.createElement)(vA,{editor:t,nodeId:n,sourceDocName:e,onClose:r}),handlePrimary:({editor:t,nodeId:n,newTab:r})=>{let i=Wk(t.state,n),a=i?.attrs?.href;if(typeof a!=`string`||!a)return!1;let o=i?.attrs?.sourceForm,s=Ye(a,e),c=yt(a);if(s?.kind===`asset`||o===`wikiembed`&&c!==null){let t=s?.kind===`asset`?s.url:a,n=s?.kind===`asset`?s.ext:c??``,i=ye(t,e);return i?(lk({url:t,projectRelPath:i,ext:n,title:i.split(`/`).pop()??t,forceOsDelegation:r}),!0):!1}return!r||!s?!1:s.kind===`doc`?(_k({docName:s.docName,anchor:s.anchor}),!0):s.kind===`anchor`?(_k({docName:e,anchor:s.anchor}),!0):dk(s.url)?(hk(s.url),!0):!1}}),TA({markTypes:[`link`],computeAttrs:xA(e)}),wk({sourceDocName:e})]}}),DA=(0,q.createContext)(null),OA={didCatch:!1,error:null},kA=class extends q.Component{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=OA}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(...e){let{error:t}=this.state;t!==null&&(this.props.onReset?.({args:e,reason:`imperative-api`}),this.setState(OA))}componentDidCatch(e,t){this.props.onError?.(e,t)}componentDidUpdate(e,t){let{didCatch:n}=this.state,{resetKeys:r}=this.props;n&&t.error!==null&&AA(e.resetKeys,r)&&(this.props.onReset?.({next:r,prev:e.resetKeys,reason:`keys`}),this.setState(OA))}render(){let{children:e,fallbackRender:t,FallbackComponent:n,fallback:r}=this.props,{didCatch:i,error:a}=this.state,o=e;if(i){let e={error:a,resetErrorBoundary:this.resetErrorBoundary};if(typeof t==`function`)o=t(e);else if(n)o=(0,q.createElement)(n,e);else if(r!==void 0)o=r;else throw a}return(0,q.createElement)(DA.Provider,{value:{didCatch:i,error:a,resetErrorBoundary:this.resetErrorBoundary}},o)}};function AA(e=[],t=[]){return e.length!==t.length||e.some((e,n)=>!Object.is(e,t[n]))}function jA(e){let t=(0,Y.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,J.jsx)(Ji,{"data-slot":`popover`,...n}),t[2]=n,t[3]=r),r}function MA(e){let t=(0,Y.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,J.jsx)(Xi,{"data-slot":`popover-trigger`,...n}),t[2]=n,t[3]=r),r}function NA(e){let t=(0,Y.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,align:i,sideOffset:a,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=i===void 0?`center`:i,s=a===void 0?4:a,c;t[5]===n?c=t[6]:(c=Ft(`z-50 w-72 rounded-lg border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,n),t[5]=n,t[6]=c);let l;return t[7]!==o||t[8]!==r||t[9]!==s||t[10]!==c?(l=(0,J.jsx)(Zi,{children:(0,J.jsx)(Qi,{"data-slot":`popover-content`,align:o,sideOffset:s,className:c,...r})}),t[7]=o,t[8]=r,t[9]=s,t[10]=c,t[11]=l):l=t[11],l}function PA(e){let t=(0,Y.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,J.jsx)(Yi,{"data-slot":`popover-anchor`,...n}),t[2]=n,t[3]=r),r}function FA(e){let t=(0,Y.c)(23),n,r,i,a,o,s;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6]):({label:i,Icon:n,onClick:a,selected:s,className:r,...o}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s);let c=s?`true`:void 0,l;t[7]===a?l=t[8]:(l=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),a())},t[7]=a,t[8]=l);let u;t[9]===r?u=t[10]:(u=Ft(`flex w-full items-center justify-center gap-2 rounded-md border border-dashed border-border bg-transparent px-3 py-2 text-center text-sm text-muted-foreground transition-colors hover:bg-muted/50 cursor-pointer outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2`,r),t[9]=r,t[10]=u);let d;t[11]===n?d=t[12]:(d=(0,J.jsx)(n,{size:16,"aria-hidden":`true`}),t[11]=n,t[12]=d);let f;t[13]===i?f=t[14]:(f=(0,J.jsx)(`span`,{children:i}),t[13]=i,t[14]=f);let p;return t[15]!==a||t[16]!==o||t[17]!==c||t[18]!==l||t[19]!==u||t[20]!==d||t[21]!==f?(p=(0,J.jsxs)(`div`,{...o,role:`button`,tabIndex:-1,contentEditable:!1,"data-descriptor-placeholder":``,"data-selected":c,onClick:a,onMouseDown:IA,onKeyDown:l,className:u,children:[d,f]}),t[15]=a,t[16]=o,t[17]=c,t[18]=l,t[19]=u,t[20]=d,t[21]=f,t[22]=p):p=t[22],p}function IA(e){e.preventDefault(),e.stopPropagation()}function LA(e){let t=(0,Y.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,J.jsx)(mi,{"data-slot":`collapsible`,...n}),t[2]=n,t[3]=r),r}function RA(e){let t=(0,Y.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,J.jsx)(hi,{"data-slot":`collapsible-trigger`,...n}),t[2]=n,t[3]=r),r}function zA(e){let t=(0,Y.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,J.jsx)(gi,{"data-slot":`collapsible-content`,...n}),t[2]=n,t[3]=r),r}function BA(e){let t=(0,Y.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,J.jsx)(po,{"data-slot":`select`,...n}),t[2]=n,t[3]=r),r}function VA(e){let t=(0,Y.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,J.jsx)(ho,{"data-slot":`select-value`,...n}),t[2]=n,t[3]=r),r}function HA(e){let t=(0,Y.c)(13),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,size:a,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=a===void 0?`default`:a,s;t[5]===r?s=t[6]:(s=Ft(`flex w-full items-center justify-between gap-2 rounded-lg border border-input bg-background text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=default]:px-2.5 data-[size=sm]:px-2 data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,r),t[5]=r,t[6]=s);let c;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,J.jsx)(go,{asChild:!0,children:(0,J.jsx)(fr,{className:`size-4 opacity-50`})}),t[7]=c):c=t[7];let l;return t[8]!==n||t[9]!==i||t[10]!==o||t[11]!==s?(l=(0,J.jsxs)(mo,{"data-slot":`select-trigger`,"data-size":o,className:s,...i,children:[n,c]}),t[8]=n,t[9]=i,t[10]=o,t[11]=s,t[12]=l):l=t[12],l}function UA(e){let t=(0,Y.c)(20),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,children:n,position:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=a===void 0?`popper`:a,s=o===`popper`&&`data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,c;t[5]!==r||t[6]!==s?(c=Ft(`relative z-50 max-h-(--radix-select-content-available-height) min-w-32 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border bg-popover text-popover-foreground shadow-md outline-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,s,r),t[5]=r,t[6]=s,t[7]=c):c=t[7];let l;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,J.jsx)(GA,{}),t[8]=l):l=t[8];let u=o===`popper`&&`h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1`,d;t[9]===u?d=t[10]:(d=Ft(`p-1`,u),t[9]=u,t[10]=d);let f;t[11]!==n||t[12]!==d?(f=(0,J.jsx)(yo,{className:d,children:n}),t[11]=n,t[12]=d,t[13]=f):f=t[13];let p;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,J.jsx)(KA,{}),t[14]=p):p=t[14];let m;return t[15]!==o||t[16]!==i||t[17]!==c||t[18]!==f?(m=(0,J.jsx)(_o,{children:(0,J.jsxs)(vo,{"data-slot":`select-content`,"data-ok-layer-spawned":``,position:o,className:c,...i,children:[l,f,p]})}),t[15]=o,t[16]=i,t[17]=c,t[18]=f,t[19]=m):m=t[19],m}function WA(e){let t=(0,Y.c)(13),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:r,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===r?a=t[5]:(a=Ft(`relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`,r),t[4]=r,t[5]=a);let o;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,J.jsx)(`span`,{className:`absolute right-2 flex size-3.5 items-center justify-center`,children:(0,J.jsx)(So,{children:(0,J.jsx)(dr,{className:`size-4`})})}),t[6]=o):o=t[6];let s;t[7]===n?s=t[8]:(s=(0,J.jsx)(xo,{children:n}),t[7]=n,t[8]=s);let c;return t[9]!==i||t[10]!==a||t[11]!==s?(c=(0,J.jsxs)(bo,{"data-slot":`select-item`,className:a,...i,children:[o,s]}),t[9]=i,t[10]=a,t[11]=s,t[12]=c):c=t[12],c}function GA(e){let t=(0,Y.c)(9),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=Ft(`flex cursor-default items-center justify-center py-1`,n),t[3]=n,t[4]=i);let a;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,J.jsx)(mr,{className:`size-4`}),t[5]=a):a=t[5];let o;return t[6]!==r||t[7]!==i?(o=(0,J.jsx)(Co,{"data-slot":`select-scroll-up-button`,className:i,...r,children:a}),t[6]=r,t[7]=i,t[8]=o):o=t[8],o}function KA(e){let t=(0,Y.c)(9),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=Ft(`flex cursor-default items-center justify-center py-1`,n),t[3]=n,t[4]=i);let a;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,J.jsx)(fr,{className:`size-4`}),t[5]=a):a=t[5];let o;return t[6]!==r||t[7]!==i?(o=(0,J.jsx)(wo,{"data-slot":`select-scroll-down-button`,className:i,...r,children:a}),t[6]=r,t[7]=i,t[8]=o):o=t[8],o}function qA(e){let t=(0,Y.c)(11),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,size:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?`default`:i,o;t[4]===n?o=t[5]:(o=Ft(`peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50`,n),t[4]=n,t[5]=o);let s;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,J.jsx)(Lo,{"data-slot":`switch-thumb`,className:`pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground`}),t[6]=s):s=t[6];let c;return t[7]!==r||t[8]!==a||t[9]!==o?(c=(0,J.jsx)(Io,{"data-slot":`switch`,"data-size":a,className:o,...r,children:s}),t[7]=r,t[8]=a,t[9]=o,t[10]=c):c=t[10],c}function JA(){if(typeof window>`u`)return null;let e=window.location.hash.match(/^#\/([^?#]+)/);return e?decodeURIComponent(e[1]):null}var YA=`/api/upload`;async function XA(e,t,n={}){let r=n.fetch??globalThis.fetch,i=n.docName===void 0?JA():n.docName;if(!i)throw Error(`No document is open`);let a=new FormData;a.append(`file`,e),a.append(`parentDocName`,i);let o;try{o=await r(YA,{method:`POST`,body:a})}catch(e){let t=e instanceof Error?e.message:String(e);throw Error(`Upload failed: ${t}`)}if(!o.ok){let e=`Upload failed (${o.status})`;try{let t=await o.json();t.error&&(e=t.error)}catch{}throw Error(e)}let s;try{let e=await o.json(),t=e.path??e.src;if(typeof t!=`string`)throw Error(`Server response missing "path"/"src" field`);s=t.startsWith(`/`)?t:`/${t}`}catch(e){let t=e instanceof Error?e.message:String(e);throw Error(`Upload response parse error: ${t}`)}return{url:s}}var ZA=new Intl.PluralRules(`en-US`);function QA(e,t,n){return n<=0?`${e} (empty)`:`${e} with ${n} ${ZA.select(n)===`one`?`item`:`items`}`}var $A=`Document`;function ej(e){for(let t of e)if(t.type===`string`&&t.hidden!==!0&&t.advanced!==!0&&t.autoFocus===!0)return t.name;return null}function tj(e){if(!e)return e;let t=e.replace(/[_-]+/g,` `).replace(/([a-z0-9])([A-Z])/g,`$1 $2`).replace(/([A-Z]+)([A-Z][a-z])/g,`$1 $2`);return t.charAt(0).toUpperCase()+t.slice(1)}function nj(e){return`ok.propPanel.advanced.${e}`}function rj(e){try{return typeof localStorage>`u`?!1:localStorage.getItem(nj(e))===`true`}catch{return!1}}function ij(e,t){try{if(typeof localStorage>`u`)return;localStorage.setItem(nj(e),t?`true`:`false`)}catch{}}function aj(e,t){let n=0;for(let r of e){let e=t[r.name],i=`defaultValue`in r?r.defaultValue:void 0;e!==void 0&&e!==i&&(n+=1)}return n}async function oj(e,t,n){try{let{url:r}=await XA(e,t);n(r)}catch(e){let t=e instanceof Error?e.message:String(e);on.error(`Upload failed: ${t}`)}}function sj(e){let t=(0,Y.c)(11),{descriptor:n,values:r,onChange:i}=e,a=n.props.filter(uj),o=a.filter(lj),s=a.filter(cj),c=aj(s,r),l;t[0]===n.props?l=t[1]:(l=ej(n.props),t[0]=n.props,t[1]=l);let u=l,d;t[2]===n.name?d=t[3]:(d=()=>rj(n.name),t[2]=n.name,t[3]=d);let[f,p]=(0,q.useState)(d);if(a.length===0)return null;let m;t[4]!==u||t[5]!==i||t[6]!==r?(m=e=>(0,J.jsx)(fj,{propDef:e,value:r[e.name],onChange:t=>i(e.name,t),isAutoFocused:e.name===u},e.name),t[4]=u,t[5]=i,t[6]=r,t[7]=m):m=t[7];let h=o.map(m),g=s.length>0&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`div`,{className:`my-1 border-t border-border`}),(0,J.jsxs)(LA,{open:f,onOpenChange:e=>{p(e),ij(n.name,e)},children:[(0,J.jsxs)(RA,{"data-prop-panel-advanced-trigger":``,className:`group flex w-full items-center justify-between rounded px-1 py-1 text-xs text-muted-foreground hover:bg-muted hover:text-foreground uppercase font-mono`,children:[(0,J.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,J.jsx)(fr,{className:`size-3 transition-transform group-data-[state=closed]:-rotate-90`}),`Advanced`]}),c>0&&(0,J.jsx)(Vo,{variant:`secondary`,"data-prop-panel-advanced-count":``,children:c})]}),(0,J.jsx)(zA,{className:`flex flex-col gap-4 pt-2`,children:s.map(e=>(0,J.jsx)(fj,{propDef:e,value:r[e.name],onChange:t=>i(e.name,t),isAutoFocused:e.name===u},e.name))})]})]}),_;return t[8]!==h||t[9]!==g?(_=(0,J.jsxs)(`div`,{"data-prop-panel":``,className:`flex flex-col gap-4 py-2 text-sm`,children:[h,g]}),t[8]=h,t[9]=g,t[10]=_):_=t[10],_}function cj(e){return`advanced`in e&&e.advanced}function lj(e){return!(`advanced`in e&&e.advanced)}function uj(e){return!(`hidden`in e&&e.hidden)&&e.type!==`reactnode`}function dj(e){throw Error(`PropPanel: unhandled PropDef type ${JSON.stringify(e)}`)}function fj(e){let t=(0,Y.c)(74),{propDef:n,value:r,onChange:i,isAutoFocused:a}=e;switch(n.type){case`reactnode`:return null;case`string`:{let e=`prop-${n.name}`,o=n.accept,s=o!==void 0&&o.length>0,c=!n.required&&n.defaultValue===void 0,l;t[0]===n.name?l=t[1]:(l=tj(n.name),t[0]=n.name,t[1]=l);let u;t[2]!==e||t[3]!==l?(u=(0,J.jsx)(`label`,{htmlFor:e,className:`text-xs text-muted-foreground`,children:l}),t[2]=e,t[3]=l,t[4]=u):u=t[4];let d=r??``,f;t[5]!==i||t[6]!==c?(f=e=>{let t=e.target.value;if(t===``&&c){i(void 0);return}i(t)},t[5]=i,t[6]=c,t[7]=f):f=t[7];let p=a?``:void 0,m;t[8]!==a||t[9]!==e||t[10]!==d||t[11]!==f||t[12]!==p?(m=(0,J.jsx)(Ro,{id:e,type:`text`,value:d,onChange:f,autoFocus:a,"data-prop-autofocus":p,className:`h-7 text-sm`}),t[8]=a,t[9]=e,t[10]=d,t[11]=f,t[12]=p,t[13]=m):m=t[13];let h;t[14]!==o||t[15]!==i||t[16]!==s?(h=s&&(0,J.jsx)(mj,{accept:o,onUploaded:e=>i(e)}),t[14]=o,t[15]=i,t[16]=s,t[17]=h):h=t[17];let g;t[18]!==m||t[19]!==h?(g=(0,J.jsxs)(`div`,{className:`flex gap-1`,children:[m,h]}),t[18]=m,t[19]=h,t[20]=g):g=t[20];let _;return t[21]!==u||t[22]!==g?(_=(0,J.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[u,g]}),t[21]=u,t[22]=g,t[23]=_):_=t[23],_}case`boolean`:{let e=`prop-${n.name}`,a;t[24]===n.name?a=t[25]:(a=tj(n.name),t[24]=n.name,t[25]=a);let o=a,s;t[26]!==e||t[27]!==o?(s=(0,J.jsx)(`label`,{htmlFor:e,className:`text-xs text-muted-foreground`,children:o}),t[26]=e,t[27]=o,t[28]=s):s=t[28];let c=!!r,l;t[29]===i?l=t[30]:(l=e=>i(e),t[29]=i,t[30]=l);let u;t[31]!==e||t[32]!==c||t[33]!==l?(u=(0,J.jsx)(qA,{id:e,checked:c,onCheckedChange:l}),t[31]=e,t[32]=c,t[33]=l,t[34]=u):u=t[34];let d;return t[35]!==s||t[36]!==u?(d=(0,J.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[s,u]}),t[35]=s,t[36]=u,t[37]=d):d=t[37],d}case`enum`:{let e=`prop-${n.name}`,a=r??n.enumValues[0]??``,o;t[38]===n.name?o=t[39]:(o=tj(n.name),t[38]=n.name,t[39]=o);let s;t[40]!==e||t[41]!==o?(s=(0,J.jsx)(`label`,{htmlFor:e,className:`text-xs text-muted-foreground`,children:o}),t[40]=e,t[41]=o,t[42]=s):s=t[42];let c;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,J.jsx)(VA,{}),t[43]=c):c=t[43];let l;t[44]===e?l=t[45]:(l=(0,J.jsx)(HA,{id:e,size:`sm`,children:c}),t[44]=e,t[45]=l);let u;t[46]===n.enumValues?u=t[47]:(u=n.enumValues.map(pj),t[46]=n.enumValues,t[47]=u);let d;t[48]===u?d=t[49]:(d=(0,J.jsx)(UA,{className:`z-70`,children:u}),t[48]=u,t[49]=d);let f;t[50]!==a||t[51]!==i||t[52]!==l||t[53]!==d?(f=(0,J.jsxs)(BA,{value:a,onValueChange:i,children:[l,d]}),t[50]=a,t[51]=i,t[52]=l,t[53]=d,t[54]=f):f=t[54];let p;return t[55]!==s||t[56]!==f?(p=(0,J.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[s,f]}),t[55]=s,t[56]=f,t[57]=p):p=t[57],p}case`number`:{let e=`prop-${n.name}`,a;t[58]===n.name?a=t[59]:(a=tj(n.name),t[58]=n.name,t[59]=a);let o;t[60]!==e||t[61]!==a?(o=(0,J.jsx)(`label`,{htmlFor:e,className:`text-xs text-muted-foreground`,children:a}),t[60]=e,t[61]=a,t[62]=o):o=t[62];let s=r==null?``:String(r),c;t[63]===i?c=t[64]:(c=e=>{let t=e.target.value;if(t===``){i(void 0);return}if(t===`-`)return;let n=Number(t);Number.isNaN(n)||i(n)},t[63]=i,t[64]=c);let l;t[65]!==e||t[66]!==s||t[67]!==c?(l=(0,J.jsx)(Ro,{id:e,type:`number`,inputMode:`numeric`,value:s,onChange:c,className:`h-7 text-sm`}),t[65]=e,t[66]=s,t[67]=c,t[68]=l):l=t[68];let u;return t[69]!==o||t[70]!==l?(u=(0,J.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[o,l]}),t[69]=o,t[70]=l,t[71]=u):u=t[71],u}default:{let e;return t[72]===n?e=t[73]:(e=dj(n),t[72]=n,t[73]=e),e}}}function pj(e){return(0,J.jsx)(WA,{value:e,children:e},e)}function mj(e){let t=(0,Y.c)(17),{accept:n,onUploaded:r}=e,[i,a]=(0,q.useState)(!1),o=(0,q.useRef)(null),s;t[0]===n?s=t[1]:(s=n.join(`,`),t[0]=n,t[1]=s);let c;t[2]!==n||t[3]!==r?(c=async e=>{let t=e.target.files?.[0];if(t){a(!0);try{await oj(t,n,r)}catch{}a(!1),o.current&&(o.current.value=``)}},t[2]=n,t[3]=r,t[4]=c):c=t[4];let l;t[5]!==s||t[6]!==c?(l=(0,J.jsx)(`input`,{ref:o,type:`file`,accept:s,className:`hidden`,"data-prop-upload-input":``,onChange:c}),t[5]=s,t[6]=c,t[7]=l):l=t[7];let u;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(u=()=>o.current?.click(),t[8]=u):u=t[8];let d;t[9]===i?d=t[10]:(d=i?(0,J.jsx)(Ir,{className:`size-3.5 animate-spin`}):(0,J.jsx)(Xr,{className:`size-3.5`}),t[9]=i,t[10]=d);let f;t[11]!==d||t[12]!==i?(f=(0,J.jsx)(Lt,{type:`button`,variant:`outline`,size:`sm`,disabled:i,"aria-label":`Upload file`,"data-prop-upload-trigger":``,className:`h-7 px-2`,onClick:u,children:d}),t[11]=d,t[12]=i,t[13]=f):f=t[13];let p;return t[14]!==l||t[15]!==f?(p=(0,J.jsxs)(J.Fragment,{children:[l,f]}),t[14]=l,t[15]=f,t[16]=p):p=t[16],p}var hj=`selectionStatePlugin/origin`,gj=`selectionStatePlugin/refresh`,_j=new z(`selectionState`),vj={selectedBlockId:null,ancestorChain:[],selectionOrigin:`programmatic`,isDragging:!1};function yj(e){return _j.getState(e.state)??vj}function bj(e,t){let n=[],{$from:r}=t;for(let t=1;t<=r.depth;t++){let i=r.node(t);if(i.type.name!==`jsxComponent`)continue;let a=r.before(t);n.push(xj(e,i,a))}if(t instanceof We){let r=t.node;r.type.name===`jsxComponent`&&n.push(xj(e,r,t.from))}return n}function xj(e,t,n){let r=t.attrs.componentName??`unknown`;return{bridgeId:Sj(e,n),componentName:r,pos:n}}function Sj(e,t){return gT.getState(e)?.posToId.get(t)??`pos-${t}`}function Cj(e,t,n={}){let r=bj(e,e.selection),i={selectedBlockId:r[r.length-1]?.bridgeId??null,ancestorChain:r,selectionOrigin:n.origin??t.selectionOrigin,isDragging:n.isDragging??t.isDragging};return wj(t,i)?t:i}function wj(e,t){if(e===t)return!0;if(e.selectedBlockId!==t.selectedBlockId||e.selectionOrigin!==t.selectionOrigin||e.isDragging!==t.isDragging||e.ancestorChain.length!==t.ancestorChain.length)return!1;for(let n=0;n<e.ancestorChain.length;n++){let r=e.ancestorChain[n],i=t.ancestorChain[n];if(r.bridgeId!==i.bridgeId||r.componentName!==i.componentName||r.pos!==i.pos)return!1}return!0}var Tj=new WeakMap;function Ej(e,t,n,r){let i=r?.isDragging??t.isDragging,a=!!e.getMeta(gj),o=e.selectionSet&&!a,s=e.getMeta(hj),c=o?r?.pendingOrigin??null:null,l=s??c??t.selectionOrigin;return o&&r&&(r.pendingOrigin=null),Cj(n,t,{origin:l,isDragging:i})}var Dj=rt.create({name:`selectionStatePlugin`,addProseMirrorPlugins(){let e=this.editor,t=new L({key:_j,state:{init(e,t){return Cj(t,vj)},apply(e,n,r,i){return Ej(e,n,i,Tj.get(t))}},props:{handleDOMEvents:{mousedown:()=>{let e=Tj.get(t);return e&&(e.pendingOrigin=`pointer`),!1},pointerdown:()=>{let e=Tj.get(t);return e&&(e.pendingOrigin=`pointer`),!1}},handleKeyDown:(e,n)=>{if(Oj(n.key)){let e=Tj.get(t);e&&(e.pendingOrigin=`keyboard`)}return!1}},view(n){Tj.set(t,{pendingOrigin:null,isDragging:!1});let r=()=>{let n=Tj.get(t);n&&(n.isDragging=!0,kj(e))},i=()=>{let n=Tj.get(t);n&&(n.isDragging=!1,kj(e))};return n.dom.addEventListener(`dragstart`,r,!0),n.dom.addEventListener(`dragend`,i,!0),n.dom.addEventListener(`drop`,i,!0),{destroy:()=>{n.dom.removeEventListener(`dragstart`,r,!0),n.dom.removeEventListener(`dragend`,i,!0),n.dom.removeEventListener(`drop`,i,!0),Tj.delete(t)}}}});return[t]}});function Oj(e){return e===`ArrowUp`||e===`ArrowDown`||e===`ArrowLeft`||e===`ArrowRight`||e===`Tab`||e===`Escape`||e===`Enter`||e===`Home`||e===`End`||e===`PageUp`||e===`PageDown`}function kj(e){queueMicrotask(()=>{if(!e.isDestroyed)try{let t=e.state.tr.setMeta(gj,!0);e.view.dispatch(t)}catch{}})}function Aj(e){let t=(0,Y.c)(5),n;t[0]===e?n=t[1]:(n=()=>e?yj(e):null,t[0]=e,t[1]=n);let[r,i]=(0,q.useState)(n),a,o;return t[2]===e?(a=t[3],o=t[4]):(a=()=>{if(!e){i(null);return}i(yj(e));let t=()=>{i(yj(e))};return e.on(`transaction`,t),e.on(`selectionUpdate`,t),()=>{e.off(`transaction`,t),e.off(`selectionUpdate`,t)}},o=[e],t[2]=e,t[3]=a,t[4]=o),(0,q.useEffect)(a,o),r}function jj(){}function Mj(e){let{xmlFragment:t,ytext:n}=e,r=(e,t)=>{},i=(e,t)=>{};return t.observeDeep(r),n.observe(i),()=>{t.unobserveDeep(r),n.unobserve(i)}}function Nj(e,t){if(e.hasChildren)return!1;let n=ej(e.props);return n===null?!1:t[n]===``}function Pj(e){let t=e.placeholder?.label,n=`Add ${(e.displayName??e.name).toLowerCase()}`;return{label:t??n,Icon:wC(e.placeholder?.icon??e.icon)}}var Fj=null;function Ij(){return Fj||=new de({extensions:c}),Fj}function Lj(e){if(!e.attrs.sourceDirty&&e.attrs.sourceRaw)return e.attrs.sourceRaw;let t=Ij(),n=e.type.schema.node(`doc`,null,[e]);return t.serialize(n.toJSON()).trim()}var Rj=new Set(M.map(e=>`${e}:`)),zj=6e4,Bj=10,Vj=new Map;function Hj(e,t){let n=t.toLowerCase();ee(n);let r=Date.now(),i=Vj.get(n);if(!i||r-i.windowStart>=zj)Vj.set(n,{windowStart:r,count:1});else if(i.count+=1,i.count>Bj)return;typeof console<`u`&&typeof console.warn==`function`&&console.warn(JSON.stringify({event:`jsx-prop-dropped`,reason:e,prop:t}))}var Uj=new Set([`href`,`src`,`action`,`formaction`,`poster`,`cite`,`data`,`manifest`,`background`,`ping`,`xlinkhref`,`xlinkactuate`,`xlinkrole`,`xlinkarcrole`,`xlinkshow`,`url`,`link`]),Wj=new Set([`dangerouslysetinnerhtml`,`ref`,`key`,`defaultvalue`,`defaultchecked`,`__proto__`,`constructor`,`prototype`]),Gj=1e4;function Kj(e){let t=e.toLowerCase();return!!(Wj.has(t)||t.length>=3&&t.startsWith(`on`))}function qj(e){return Uj.has(e.toLowerCase())}function Jj(e){if(typeof e!=`string`)return e;let t=e.trim();if(!t||t.startsWith(`#`)||t.startsWith(`//`)||E(t))return e;let n=t.indexOf(`:`),r=t.slice(0,n+1).toLowerCase();return Rj.has(r)?e:`#`}function Yj(e){if(e.length>Gj)return``;let t=e.toLowerCase();return/url\s*\(\s*['"]?\s*(?:javascript|vbscript|data)\s*:/.test(t)||/\bexpression\s*\(/.test(t)?``:e}function Xj(e){if(e==null)return e;if(Array.isArray(e)){let t=!1,n=Array(e.length);for(let r=0;r<e.length;r++){let i=Xj(e[r]);n[r]=i,i!==e[r]&&(t=!0)}return t?n:e}if(typeof e!=`object`)return e;let t=Object.getPrototypeOf(e);if(t!==Object.prototype&&t!==null)return e;let n=e,r=!1,i={};for(let[e,t]of Object.entries(n)){if(Kj(e)){Hj(`dangerous-prop-name-nested`,e),r=!0;continue}if(qj(e)&&typeof t==`string`){let n=Jj(t);n!==t&&(r=!0),i[e]=n}else{let n=Xj(t);n!==t&&(r=!0),i[e]=n}}return r?i:e}function Zj(e){let t=!1,n={};for(let[r,i]of Object.entries(e)){if(Kj(r)){Hj(`dangerous-prop-name`,r),t=!0;continue}if(qj(r)){let e=Jj(i);e!==i&&(t=!0),n[r]=e;continue}if(r===`style`){if(typeof i==`string`){let e=Yj(i);e!==i&&(t=!0),n[r]=e}else t=!0;continue}let e=Xj(i);e!==i&&(t=!0),n[r]=e}return t?n:e}function Qj(e){let t=(0,Y.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,J.jsx)(`div`,{className:`jsx-component-error-fallback`,children:n}),t[0]=n,t[1]=r),r}function $j(e){let t=(0,Y.c)(13),{children:n,resetKey:r,onError:i,descriptorName:a,rawComponentName:o}=e,s;t[0]===r?s=t[1]:(s=[r],t[0]=r,t[1]=s);let c;t[2]!==a||t[3]!==i||t[4]!==o?(c=(e,t)=>{let n=e instanceof Error?e:Error(String(e));console.warn(JSON.stringify({event:`jsx-render-failure`,component:a,rawComponentName:String(o??``).slice(0,200),error:String(n),stack:t.componentStack})),S(a),i(n)},t[2]=a,t[3]=i,t[4]=o,t[5]=c):c=t[5];let l;t[6]===n?l=t[7]:(l=e=>(0,J.jsx)(Qj,{...e,children:n}),t[6]=n,t[7]=l);let u;return t[8]!==n||t[9]!==s||t[10]!==c||t[11]!==l?(u=(0,J.jsx)(kA,{resetKeys:s,onError:c,fallbackRender:l,children:n}),t[8]=n,t[9]=s,t[10]=c,t[11]=l,t[12]=u):u=t[12],u}function eM(e){if(typeof e!=`object`||!e)return JSON.stringify(e);if(Array.isArray(e))return`[${e.map(eM).join(`,`)}]`;let t=Object.entries(e);return t.sort(([e],[t])=>e<t?-1:+(e>t)),`{${t.map(([e,t])=>`${JSON.stringify(e)}:${eM(t)}`).join(`,`)}}`}function tM(e,t){let n=e.props??{},r={};for(let[e,i]of Object.entries(n))t.has(e)||(r[e]=i);return Zj(r)}var nM=3;function rM(e){let t=(0,Y.c)(154),{node:n,editor:r,getPos:i,selected:a}=e,o=Yw(n.attrs.componentName),[s,c]=(0,q.useState)(null),[l,u]=(0,q.useState)(!1),d=(0,q.useRef)(!1),f=typeof i==`function`?i():void 0,p=!1,m=0,h=1;try{if(f!==void 0){let e=r.state.doc.resolve(f);e.depth>0&&e.parent.type.name===`jsxComponent`&&(p=!0,m=e.index(e.depth),h=e.parent.childCount)}}catch(e){let t=e;if(!(t instanceof RangeError))throw t}let g=p&&m>0,_=p&&m<h-1,v=Aj(r),y=typeof f==`number`?Sj(r.state,f):null,b=y!==null&&v?.selectedBlockId===y,x=y!==null&&!b&&(v?.ancestorChain.some(e=>e.bridgeId===y)??!1),S=b&&v?v.selectionOrigin:void 0,C=b&&(v?.isDragging??!1),w=o.props.some(sM),T=n.attrs.props??{},E=w&&o.props.some(e=>e.type!==`string`||!e.required||`hidden`in e&&e.hidden?!1:T[e.name]===``),k=Nj(o,T),A=k?Pj(o):null,j=!o.hasChildren||!!o.isSelfClosing;(0,q.useEffect)(()=>{a&&!d.current&&w&&iT(f)&&u(!0),d.current=a},[a,w,f]);let M=tM(n.attrs,o.reactNodePropNames),N=o.surface===`compat`?o.translateProps(M):M,P=`${o.name}::${eM(M)}`,F;t[0]!==i||t[1]!==n.content.size?(F=()=>(typeof i==`function`?i()??0:0)+1+n.content.size,t[0]=i,t[1]=n.content.size,t[2]=F):F=t[2];let L=F,z=o.name===`*`||s!==null,V=(0,q.useRef)(!1),H=(0,q.useRef)(0),[U,W]=(0,q.useState)(!1),ee;t[3]!==o.displayName||t[4]!==o.name||t[5]!==r||t[6]!==i||t[7]!==z||t[8]!==n||t[9]!==s?.message||t[10]!==U?(ee=()=>{if(!z||V.current||U)return;let e=typeof i==`function`?i():void 0;if(typeof e!=`number`)return;let t=Lj(n),a=o.name===`*`?`Unregistered component: ${n.attrs.componentName}`:`Render error in <${o.displayName??o.name}>: ${s?.message??`unknown`}`,c=n.type.schema.nodes.rawMdxFallback.create({reason:a},n.type.schema.text(t)),l=!1,u,d=()=>{if(!l)try{r.view.dispatch(r.state.tr.replaceWith(e,e+n.nodeSize,c)),V.current=!0,R(o.name===`*`?`wildcard`:o.name)}catch(e){let t=e,r=o.name===`*`?`wildcard`:o.name;if(console.warn(JSON.stringify({event:`jsx-component-auto-convert-failed`,component:r,rawComponentName:String(n.attrs.componentName??``).slice(0,200),reason:t instanceof Error?t.message.slice(0,500):String(t).slice(0,500),retry:H.current})),Ge(r),H.current+=1,H.current<nM){let e=50*(2**H.current-1);u=setTimeout(()=>{l||d()},e)}else l||W(!0)}},f=requestAnimationFrame(d);return()=>{l=!0,cancelAnimationFrame(f),u!==void 0&&clearTimeout(u)}},t[3]=o.displayName,t[4]=o.name,t[5]=r,t[6]=i,t[7]=z,t[8]=n,t[9]=s?.message,t[10]=U,t[11]=ee):ee=t[11];let te;if(t[12]!==o||t[13]!==r||t[14]!==i||t[15]!==z||t[16]!==n||t[17]!==s||t[18]!==U?(te=[z,n,r,i,o,s,U],t[12]=o,t[13]=r,t[14]=i,t[15]=z,t[16]=n,t[17]=s,t[18]=U,t[19]=te):te=t[19],(0,q.useEffect)(ee,te),U){let e=o.name===`*`?`<${n.attrs.componentName}> isn't a known component. Copy the source to use it elsewhere, or delete the block.`:`<${o.displayName??o.name}> failed to render (likely a bad prop). Copy the source to see what went wrong, or delete the block.`,a;t[20]!==o.name||t[21]!==n?(a=()=>{try{let e=Lj(n);typeof navigator<`u`&&navigator.clipboard?.writeText&&navigator.clipboard.writeText(e)}catch(e){let t=e;O(o.name),console.warn(JSON.stringify({event:`jsx-component-stuck-copy-failed`,component:o.name,rawComponentName:String(n.attrs.componentName??``).slice(0,200),reason:t instanceof Error?t.message.slice(0,500):String(t).slice(0,500)}))}},t[20]=o.name,t[21]=n,t[22]=a):a=t[22];let s=a,c;t[23]!==o.name||t[24]!==r||t[25]!==i||t[26]!==n.attrs.componentName?(c=()=>{let e=typeof i==`function`?i():void 0;if(typeof e==`number`)try{r.chain().focus().setNodeSelection(e).deleteSelection().run()}catch(e){let t=e;if(!(t instanceof RangeError))throw t;I(o.name),console.warn(JSON.stringify({event:`jsx-component-stuck-delete-failed`,component:o.name,rawComponentName:String(n.attrs.componentName??``).slice(0,200),reason:t.message.slice(0,500)}))}},t[23]=o.name,t[24]=r,t[25]=i,t[26]=n.attrs.componentName,t[27]=c):c=t[27];let l=c,u;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(u={[xE]:`true`},t[28]=u):u=t[28];let d;t[29]===e?d=t[30]:(d=(0,J.jsx)(`span`,{className:`flex-1`,children:e}),t[29]=e,t[30]=d);let f;t[31]===s?f=t[32]:(f=(0,J.jsx)(`button`,{type:`button`,className:`text-xs underline hover:no-underline`,onClick:s,children:`Copy source`}),t[31]=s,t[32]=f);let p;t[33]===l?p=t[34]:(p=(0,J.jsx)(`button`,{type:`button`,className:`text-xs underline hover:no-underline`,onClick:l,children:`Delete`}),t[33]=l,t[34]=p);let m;t[35]!==p||t[36]!==d||t[37]!==f?(m=(0,J.jsxs)(`div`,{className:`text-xs font-mono text-muted-foreground px-2 py-2 border border-destructive/40 rounded bg-destructive/5 flex items-center gap-2`,contentEditable:!1,...u,children:[d,f,p]}),t[35]=p,t[36]=d,t[37]=f,t[38]=m):m=t[38];let h;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,J.jsx)(ic,{className:`component-children`}),t[39]=h):h=t[39];let g;return t[40]===m?g=t[41]:(g=(0,J.jsxs)(ac,{className:`jsx-component-wrapper my-2`,children:[m,h]}),t[40]=m,t[41]=g),g}if(z){let e=o.name===`*`?`Unknown component: ${n.attrs.componentName} — source editable below`:`${o.displayName??o.name} — render error, source editable below`,r;t[42]===e?r=t[43]:(r=(0,J.jsx)(`div`,{className:`text-xs font-mono text-muted-foreground px-2 py-1`,contentEditable:!1,children:e}),t[42]=e,t[43]=r);let i;t[44]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,J.jsx)(ic,{className:`component-children`}),t[44]=i):i=t[44];let a;return t[45]===r?a=t[46]:(a=(0,J.jsxs)(ac,{className:`jsx-component-wrapper my-2`,children:[r,i]}),t[45]=r,t[46]=a),a}let ne=o.Component,re;t[47]!==r||t[48]!==j||t[49]!==f||t[50]!==k?(re=e=>{if(k||!j)return;let t=e.target;if(!e.currentTarget.contains(t)||t.closest(`.jsx-component-chrome`)||t.closest(`.jsx-add-child-pill, .jsx-empty-child-placeholder`)||typeof f!=`number`)return;let n=r.state.doc.nodeAt(f);if(!n)return;let i=f+n.nodeSize,a=r.state.selection.from;a<f||a>=i||r.chain().focus().setNodeSelection(f).run()},t[47]=r,t[48]=j,t[49]=f,t[50]=k,t[51]=re):re=t[51];let ie=re,ae;t[52]!==r||t[53]!==i||t[54]!==u?(ae=()=>{let e=typeof i==`function`?i():void 0;typeof e==`number`&&(r.chain().focus().setNodeSelection(e).run(),u(!0))},t[52]=r,t[53]=i,t[54]=u,t[55]=ae):ae=t[55];let oe=ae,se=o.displayName??o.name,ce=!!o.emptyChildName,le;t[56]!==se||t[57]!==o.emptyChildName||t[58]!==ce||t[59]!==n.childCount?(le=ce?QA(se,o.emptyChildName,n.childCount):void 0,t[56]=se,t[57]=o.emptyChildName,t[58]=ce,t[59]=n.childCount,t[60]=le):le=t[60];let ue=le,de;t[61]!==w||t[62]!==a||t[63]!==u?(de=e=>{if(e.key!==`Enter`&&e.key!==` `||!a||!w)return;let t=e.target;t.closest(`.jsx-component-chrome`)||t.closest(`input, textarea, select, button`)||(e.preventDefault(),u(!0))},t[61]=w,t[62]=a,t[63]=u,t[64]=de):de=t[64];let fe=de,pe;t[65]!==r||t[66]!==i||t[67]!==j||t[68]!==u?(pe=e=>{u(e),!e&&j&&requestAnimationFrame(()=>{let e=typeof i==`function`?i():void 0;if(typeof e!=`number`)return;let t=r.state.doc.nodeAt(e);if(!t)return;let n=e+t.nodeSize,a=r.state.selection.from;if(a<e||a>=n)return;let o=r.state.doc.resolve(Math.min(n,r.state.doc.content.size)),s=D.near(o,1);r.view.dispatch(r.state.tr.setSelection(s).scrollIntoView())})},t[65]=r,t[66]=i,t[67]=j,t[68]=u,t[69]=pe):pe=t[69];let me=pe,he;t[70]===o.name?he=t[71]:(he=o.name.toLowerCase(),t[70]=o.name,t[71]=he);let ge=b?`true`:void 0,_e=x?`true`:void 0,ve=C?`true`:void 0,ye=E?`true`:void 0,be=ce?`group`:void 0,xe=b?0:-1,Se;t[72]===p?Se=t[73]:(Se=p?{draggable:`false`,onDragStart:oM}:{"data-drag-handle":``,draggable:`true`},t[72]=p,t[73]=Se);let Ce;t[74]===Symbol.for(`react.memo_cache_sentinel`)?(Ce={[xE]:`true`},t[74]=Ce):Ce=t[74];let we;t[75]!==g||t[76]!==o.name||t[77]!==r||t[78]!==n.attrs.componentName||t[79]!==n.nodeSize||t[80]!==f?(we=g&&(0,J.jsx)(`button`,{type:`button`,className:`jsx-chrome-btn`,"aria-label":`Move up`,onClick:()=>{try{if(typeof f!=`number`)return;let e=r.state.doc.resolve(f),t=e.index(e.depth);if(t===0)return;let i=f-e.node(e.depth).child(t-1).nodeSize,a=f+n.nodeSize,o=r.state.tr,s=r.state.doc.slice(f,f+n.nodeSize),c=r.state.doc.slice(i,f);o.replaceWith(i,a,s.content.append(c.content)),r.view.dispatch(o.scrollIntoView())}catch(e){let t=e;if(!(t instanceof RangeError))throw t;B(`up`),console.warn(JSON.stringify({event:`jsx-component-move-failed`,direction:`up`,component:o.name,rawComponentName:String(n.attrs.componentName??``).slice(0,200),reason:t.message.slice(0,500)}))}},children:(0,J.jsx)(sr,{size:12,"aria-hidden":`true`})}),t[75]=g,t[76]=o.name,t[77]=r,t[78]=n.attrs.componentName,t[79]=n.nodeSize,t[80]=f,t[81]=we):we=t[81];let Te;t[82]!==_||t[83]!==o.name||t[84]!==r||t[85]!==n.attrs.componentName||t[86]!==n.nodeSize||t[87]!==f?(Te=_&&(0,J.jsx)(`button`,{type:`button`,className:`jsx-chrome-btn`,"aria-label":`Move down`,onClick:()=>{try{if(typeof f!=`number`)return;let e=r.state.doc.resolve(f),t=e.index(e.depth),i=e.node(e.depth);if(t>=i.childCount-1)return;let a=i.child(t+1),o=f,s=f+n.nodeSize+a.nodeSize,c=r.state.tr,l=r.state.doc.slice(f,f+n.nodeSize),u=r.state.doc.slice(f+n.nodeSize,s);c.replaceWith(o,s,u.content.append(l.content)),r.view.dispatch(c.scrollIntoView())}catch(e){let t=e;if(!(t instanceof RangeError))throw t;B(`down`),console.warn(JSON.stringify({event:`jsx-component-move-failed`,direction:`down`,component:o.name,rawComponentName:String(n.attrs.componentName??``).slice(0,200),reason:t.message.slice(0,500)}))}},children:(0,J.jsx)(or,{size:12,"aria-hidden":`true`})}),t[82]=_,t[83]=o.name,t[84]=r,t[85]=n.attrs.componentName,t[86]=n.nodeSize,t[87]=f,t[88]=Te):Te=t[88];let Ee=`Delete ${o.displayName??o.name}`,De;t[89]!==r||t[90]!==f?(De=()=>{typeof f==`number`&&r.chain().focus().setNodeSelection(f).deleteSelection().run()},t[89]=r,t[90]=f,t[91]=De):De=t[91];let Oe;t[92]===Symbol.for(`react.memo_cache_sentinel`)?(Oe=(0,J.jsx)(Jr,{size:12,"aria-hidden":`true`}),t[92]=Oe):Oe=t[92];let ke;t[93]!==Ee||t[94]!==De?(ke=(0,J.jsx)(`button`,{type:`button`,className:`jsx-chrome-btn jsx-chrome-btn--delete`,"aria-label":Ee,onClick:De,children:Oe}),t[93]=Ee,t[94]=De,t[95]=ke):ke=t[95];let Ae;t[96]!==o.displayName||t[97]!==o.name||t[98]!==w?(Ae=w&&(0,J.jsx)(MA,{asChild:!0,children:(0,J.jsx)(`button`,{type:`button`,className:`jsx-chrome-btn`,"aria-label":`${o.displayName??o.name} properties`,children:(0,J.jsx)(Ur,{size:12,"aria-hidden":`true`})})}),t[96]=o.displayName,t[97]=o.name,t[98]=w,t[99]=Ae):Ae=t[99];let je;t[100]!==we||t[101]!==Te||t[102]!==ke||t[103]!==Ae?(je=(0,J.jsxs)(`div`,{className:`jsx-component-chrome`,contentEditable:!1,onMouseDown:aM,...Ce,children:[we,Te,ke,Ae]}),t[100]=we,t[101]=Te,t[102]=ke,t[103]=Ae,t[104]=je):je=t[104];let Me;t[105]!==ne||t[106]!==o.hasChildren||t[107]!==o.isSelfClosing||t[108]!==o.name||t[109]!==b||t[110]!==n.attrs.componentName||t[111]!==n.childCount||t[112]!==oe||t[113]!==N||t[114]!==P||t[115]!==A||t[116]!==c||t[117]!==k?(Me=k&&A?(0,J.jsx)(PA,{asChild:!0,children:(0,J.jsx)(FA,{label:A.label,Icon:A.Icon,onClick:oe,selected:b})}):(0,J.jsx)($j,{resetKey:P,onError:c,descriptorName:o.name===`*`?`wildcard`:o.name,rawComponentName:n.attrs.componentName??``,children:(0,J.jsx)(ne,{...N,children:(0,J.jsx)(ic,{className:`component-children ${!o.hasChildren&&n.childCount===0?`min-h-0 m-0 p-0`:``}`,...!o.hasChildren||o.isSelfClosing?{contentEditable:!1}:{}})})}),t[105]=ne,t[106]=o.hasChildren,t[107]=o.isSelfClosing,t[108]=o.name,t[109]=b,t[110]=n.attrs.componentName,t[111]=n.childCount,t[112]=oe,t[113]=N,t[114]=P,t[115]=A,t[116]=c,t[117]=k,t[118]=Me):Me=t[118];let Ne;t[119]!==o.emptyChildName||t[120]!==r||t[121]!==L||t[122]!==n.childCount?(Ne=o.emptyChildName&&(0,J.jsx)(`button`,{type:`button`,contentEditable:!1,className:n.childCount===0?`jsx-empty-child-placeholder`:`jsx-add-child-pill`,onMouseDown:iM,onClick:()=>{let e=o.emptyChildName,t=tT(e),n=L();r.chain().focus().insertContentAt(n,t).run(),aT(r,n,Yw(e))},"data-clipboard-omit":`true`,children:(0,J.jsxs)(`span`,{children:[`+ Add `,o.emptyChildName]})}),t[119]=o.emptyChildName,t[120]=r,t[121]=L,t[122]=n.childCount,t[123]=Ne):Ne=t[123];let Pe;t[124]!==o.name||t[125]!==ue||t[126]!==ie||t[127]!==fe||t[128]!==S||t[129]!==he||t[130]!==ge||t[131]!==_e||t[132]!==ve||t[133]!==ye||t[134]!==be||t[135]!==xe||t[136]!==Se||t[137]!==je||t[138]!==Me||t[139]!==Ne?(Pe=(0,J.jsxs)(ac,{className:`jsx-component-wrapper my-2`,"data-jsx-component":``,"data-component-type":he,"data-selected":ge,"data-has-child-selected":_e,"data-selection-origin":S,"data-dragging":ve,"data-needs-config":ye,role:be,"aria-label":ue,tabIndex:xe,...Se,"data-component-name":o.name,onClick:ie,onKeyDown:fe,children:[je,Me,Ne]}),t[124]=o.name,t[125]=ue,t[126]=ie,t[127]=fe,t[128]=S,t[129]=he,t[130]=ge,t[131]=_e,t[132]=ve,t[133]=ye,t[134]=be,t[135]=xe,t[136]=Se,t[137]=je,t[138]=Me,t[139]=Ne,t[140]=Pe):Pe=t[140];let Fe;t[141]!==o||t[142]!==r||t[143]!==i||t[144]!==w||t[145]!==j||t[146]!==M||t[147]!==k?(Fe=w&&(0,J.jsxs)(NA,{side:k?`bottom`:`right`,align:k?`center`:`start`,sideOffset:k?-4:8,className:`w-64 p-3 z-[60] overflow-y-auto subtle-scrollbar max-h-[calc(100vh-2rem)] overscroll-contain`,onCloseAutoFocus:j?e=>{e.preventDefault(),r.view.focus()}:void 0,children:[(0,J.jsxs)(`div`,{className:`text-xs font-medium text-muted-foreground mb-2`,children:[o.displayName??o.name,` Properties`]}),(0,J.jsx)(sj,{descriptor:o,values:M,onChange:(e,t)=>{let n=typeof i==`function`?i():void 0;if(typeof n!=`number`)return;let a=r.state.doc.nodeAt(n);if(!a||a.attrs.kind!==`element`)return;let o={...a.attrs.props??{}},s=Array.isArray(a.attrs.attributes)?a.attrs.attributes:[],c=s;t===void 0?(delete o[e],c=s.filter(t=>!(typeof t==`object`&&t&&t.type===`mdxJsxAttribute`&&t.name===e))):o[e]=t,r.view.dispatch(r.state.tr.setNodeMarkup(n,null,{...a.attrs,attributes:c,props:o,sourceDirty:!0}))}})]}),t[141]=o,t[142]=r,t[143]=i,t[144]=w,t[145]=j,t[146]=M,t[147]=k,t[148]=Fe):Fe=t[148];let Ie;return t[149]!==me||t[150]!==l||t[151]!==Pe||t[152]!==Fe?(Ie=(0,J.jsxs)(jA,{open:l,onOpenChange:me,children:[Pe,Fe]}),t[149]=me,t[150]=l,t[151]=Pe,t[152]=Fe,t[153]=Ie):Ie=t[153],Ie}function iM(e){return e.stopPropagation()}function aM(e){return e.stopPropagation()}function oM(e){return e.preventDefault()}function sM(e){return!(`hidden`in e&&e.hidden)&&e.type!==`reactnode`}var cM=St.extend({addNodeView(){return pc(rM)}}),lM={name:`InlineMath`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,category:`content`,description:`Inline math`,props:[{name:`formula`,type:`string`,required:!0,autoFocus:!0,description:`LaTeX inline math source`}]},uM=(0,q.lazy)(async()=>{let{default:e}=await n(async()=>{let{default:e}=await import(`./katex-qwlL5fSd.js`);return{default:e}},[],import.meta.url);function t(t){let n=(0,Y.c)(4),r;n[0]===t.formula?r=n[1]:(r=e.renderToString(t.formula,{displayMode:!1,throwOnError:!1,strict:`ignore`,trust:!1}),n[0]=t.formula,n[1]=r);let i=r,a;return n[2]===i?a=n[3]:(a=(0,J.jsx)(`span`,{className:`math math-inline`,dangerouslySetInnerHTML:{__html:i}}),n[2]=i,n[3]=a),a}return{default:t}});function dM(){let e=(0,Y.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,J.jsx)(`span`,{className:`math math-inline math-placeholder math-placeholder-empty inline-flex items-center gap-1 rounded-sm border border-dashed border-muted-foreground/40 bg-muted/30 px-1.5 py-0.5 text-xs italic text-muted-foreground hover:bg-muted/60 cursor-pointer`,"data-component-type":`math-inline`,children:`f(x)`}),e[0]=t):t=e[0],t}function fM(e){let t=(0,Y.c)(2),n;return t[0]===e.formula?n=t[1]:(n=(0,J.jsx)(`span`,{className:`math math-inline math-placeholder`,"data-component-type":`math-inline`,children:e.formula}),t[0]=e.formula,t[1]=n),n}function pM(e){let t=(0,Y.c)(38),{node:n,selected:r,getPos:i,editor:a}=e,o=typeof n.attrs.formula==`string`?n.attrs.formula:``,s=typeof n.attrs.id==`string`?n.attrs.id:void 0,[c,l]=(0,q.useState)(!1),u=(0,q.useRef)(!1),d;t[0]!==a.state||t[1]!==i||t[2]!==r?(d=()=>{let e=r&&a.state.selection instanceof We;e&&!u.current?(iT(typeof i==`function`?i()??0:0),l(!0)):!e&&u.current&&l(!1),u.current=e},t[0]=a.state,t[1]=i,t[2]=r,t[3]=d):d=t[3];let f;t[4]!==a||t[5]!==i||t[6]!==r?(f=[r,i,a],t[4]=a,t[5]=i,t[6]=r,t[7]=f):f=t[7],(0,q.useEffect)(d,f);let p=r?`math-inline-selected`:void 0,m;t[8]===s?m=t[9]:(m=s?{id:s}:{},t[8]=s,t[9]=m);let h;t[10]===o?h=t[11]:(h=o?(0,J.jsx)(kA,{resetKeys:[o],onError:hM,fallbackRender:()=>(0,J.jsx)(`span`,{className:`math math-inline math-error`,children:o}),children:(0,J.jsx)(q.Suspense,{fallback:(0,J.jsx)(fM,{formula:o}),children:(0,J.jsx)(uM,{formula:o})})}):(0,J.jsx)(dM,{}),t[10]=o,t[11]=h);let g;t[12]!==o||t[13]!==m||t[14]!==h?(g=(0,J.jsx)(MA,{asChild:!0,children:(0,J.jsx)(`span`,{className:`math-inline-trigger`,"data-component-type":`math-inline`,"data-formula":o,...m,children:h})}),t[12]=o,t[13]=m,t[14]=h,t[15]=g):g=t[15];let _;t[16]===a.view?_=t[17]:(_=e=>{e.preventDefault(),a.view.focus()},t[16]=a.view,t[17]=_);let v;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,J.jsx)(`div`,{className:`text-xs font-medium text-muted-foreground px-3 pt-2`,children:`Inline Math Properties`}),t[18]=v):v=t[18];let y;t[19]===o?y=t[20]:(y={formula:o},t[19]=o,t[20]=y);let b;t[21]!==a.state||t[22]!==a.view||t[23]!==i?(b=(e,t)=>{let n=typeof i==`function`?i():void 0;if(typeof n!=`number`)return;let r=a.state.doc.nodeAt(n);if(!r||r.type.name!==`mathInline`)return;let o=a.state.tr.setNodeMarkup(n,null,{...r.attrs,[e]:t??``});o.setSelection(We.create(o.doc,n)),a.view.dispatch(o)},t[21]=a.state,t[22]=a.view,t[23]=i,t[24]=b):b=t[24];let x;t[25]!==b||t[26]!==y?(x=(0,J.jsx)(sj,{descriptor:lM,values:y,onChange:b}),t[25]=b,t[26]=y,t[27]=x):x=t[27];let S;t[28]!==x||t[29]!==_?(S=(0,J.jsxs)(NA,{className:`z-[60] w-72 p-0`,side:`bottom`,align:`start`,onOpenAutoFocus:mM,onCloseAutoFocus:_,children:[v,x]}),t[28]=x,t[29]=_,t[30]=S):S=t[30];let C;t[31]!==c||t[32]!==S||t[33]!==g?(C=(0,J.jsxs)(jA,{open:c,onOpenChange:l,children:[g,S]}),t[31]=c,t[32]=S,t[33]=g,t[34]=C):C=t[34];let w;return t[35]!==C||t[36]!==p?(w=(0,J.jsx)(ac,{as:`span`,className:p,children:C}),t[35]=C,t[36]=p,t[37]=w):w=t[37],w}function mM(e){e.preventDefault()}function hM(e,t){let n=e instanceof Error?e:Error(String(e));console.warn(JSON.stringify({event:`jsx-render-failure`,component:`mathInline`,rawComponentName:`mathInline`,error:String(n),stack:t.componentStack})),S(`mathInline`)}var gM=T.extend({addNodeView(){return pc(pM)}});function _M(e){return e.editorView}function vM(e){if(!e.isDestroyed)return e.extensionManager.extensions.find(e=>e.name===`collaboration`)?.options?.document}function yM(e){return e?e.startsWith(`Unregistered component:`)?`info`:e.startsWith(`Render error in`)?`warn`:`error`:`error`}var bM={info:{wrapperClass:`border-muted-foreground/30 bg-muted/30`,badgeClass:`text-muted-foreground bg-muted`,label:`unknown`},warn:{wrapperClass:`border-amber-400/60 dark:border-amber-500/40 bg-amber-50/50 dark:bg-amber-900/10`,badgeClass:`text-amber-600 dark:text-amber-400 bg-amber-100 dark:bg-amber-900/30`,label:`render error`},error:{wrapperClass:`border-destructive/60 bg-destructive/5`,badgeClass:`text-destructive bg-destructive/10`,label:`parse error`}},xM=class e{static create(t,n,r,i,a){return new e(t,n,r,i+(i<<8)+t+(n<<4)|0,a,[],[])}constructor(e,t,n,r,i,a,o){this.type=e,this.value=t,this.from=n,this.hash=r,this.end=i,this.children=a,this.positions=o,this.hashProp=[[un.contextHash,r]]}addChild(e,t){e.prop(un.contextHash)!=this.hash&&(e=new mn(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(t)}toTree(e,t=this.end){let n=this.children.length-1;return n>=0&&(t=Math.max(t,this.positions[n]+this.children[n].length+this.from)),new mn(e.types[this.type],this.children,this.positions,t-this.from).balance({makeTree:(e,t,n)=>new mn(hn.none,e,t,n,this.hashProp)})}},Q;(function(e){e[e.Document=1]=`Document`,e[e.CodeBlock=2]=`CodeBlock`,e[e.FencedCode=3]=`FencedCode`,e[e.Blockquote=4]=`Blockquote`,e[e.HorizontalRule=5]=`HorizontalRule`,e[e.BulletList=6]=`BulletList`,e[e.OrderedList=7]=`OrderedList`,e[e.ListItem=8]=`ListItem`,e[e.ATXHeading1=9]=`ATXHeading1`,e[e.ATXHeading2=10]=`ATXHeading2`,e[e.ATXHeading3=11]=`ATXHeading3`,e[e.ATXHeading4=12]=`ATXHeading4`,e[e.ATXHeading5=13]=`ATXHeading5`,e[e.ATXHeading6=14]=`ATXHeading6`,e[e.SetextHeading1=15]=`SetextHeading1`,e[e.SetextHeading2=16]=`SetextHeading2`,e[e.HTMLBlock=17]=`HTMLBlock`,e[e.LinkReference=18]=`LinkReference`,e[e.Paragraph=19]=`Paragraph`,e[e.CommentBlock=20]=`CommentBlock`,e[e.ProcessingInstructionBlock=21]=`ProcessingInstructionBlock`,e[e.Escape=22]=`Escape`,e[e.Entity=23]=`Entity`,e[e.HardBreak=24]=`HardBreak`,e[e.Emphasis=25]=`Emphasis`,e[e.StrongEmphasis=26]=`StrongEmphasis`,e[e.Link=27]=`Link`,e[e.Image=28]=`Image`,e[e.InlineCode=29]=`InlineCode`,e[e.HTMLTag=30]=`HTMLTag`,e[e.Comment=31]=`Comment`,e[e.ProcessingInstruction=32]=`ProcessingInstruction`,e[e.Autolink=33]=`Autolink`,e[e.HeaderMark=34]=`HeaderMark`,e[e.QuoteMark=35]=`QuoteMark`,e[e.ListMark=36]=`ListMark`,e[e.LinkMark=37]=`LinkMark`,e[e.EmphasisMark=38]=`EmphasisMark`,e[e.CodeMark=39]=`CodeMark`,e[e.CodeText=40]=`CodeText`,e[e.CodeInfo=41]=`CodeInfo`,e[e.LinkTitle=42]=`LinkTitle`,e[e.LinkLabel=43]=`LinkLabel`,e[e.URL=44]=`URL`})(Q||={});var SM=class{constructor(e,t){this.start=e,this.content=t,this.marks=[],this.parsers=[]}},CM=class{constructor(){this.text=``,this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return DM(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,t=0,n=0){for(let r=t;r<e;r++)n+=this.text.charCodeAt(r)==9?4-n%4:1;return n}findColumn(e){let t=0;for(let n=0;t<this.text.length&&n<e;t++)n+=this.text.charCodeAt(t)==9?4-n%4:1;return t}scrub(){if(!this.baseIndent)return this.text;let e=``;for(let t=0;t<this.basePos;t++)e+=` `;return e+this.text.slice(this.basePos)}};function wM(e,t,n){if(n.pos==n.text.length||e!=t.block&&n.indent>=t.stack[n.depth+1].value+n.baseIndent)return!0;if(n.indent>=n.baseIndent+4)return!1;let r=(e.type==Q.OrderedList?PM:NM)(n,t,!1);return r>0&&(e.type!=Q.BulletList||jM(n,t,!1)<0)&&n.text.charCodeAt(n.pos+r-1)==e.value}var TM={[Q.Blockquote](e,t,n){return n.next==62?(n.markers.push(cN(Q.QuoteMark,t.lineStart+n.pos,t.lineStart+n.pos+1)),n.moveBase(n.pos+(EM(n.text.charCodeAt(n.pos+1))?2:1)),e.end=t.lineStart+n.text.length,!0):!1},[Q.ListItem](e,t,n){return n.indent<n.baseIndent+e.value&&n.next>-1?!1:(n.moveBaseColumn(n.baseIndent+e.value),!0)},[Q.OrderedList]:wM,[Q.BulletList]:wM,[Q.Document](){return!0}};function EM(e){return e==32||e==9||e==10||e==13}function DM(e,t=0){for(;t<e.length&&EM(e.charCodeAt(t));)t++;return t}function OM(e,t,n){for(;t>n&&EM(e.charCodeAt(t-1));)t--;return t}function kM(e){if(e.next!=96&&e.next!=126)return-1;let t=e.pos+1;for(;t<e.text.length&&e.text.charCodeAt(t)==e.next;)t++;if(t<e.pos+3)return-1;if(e.next==96){for(let n=t;n<e.text.length;n++)if(e.text.charCodeAt(n)==96)return-1}return t}function AM(e){return e.next==62?e.text.charCodeAt(e.pos+1)==32?2:1:-1}function jM(e,t,n){if(e.next!=42&&e.next!=45&&e.next!=95)return-1;let r=1;for(let t=e.pos+1;t<e.text.length;t++){let n=e.text.charCodeAt(t);if(n==e.next)r++;else if(!EM(n))return-1}return n&&e.next==45&&IM(e)>-1&&e.depth==t.stack.length&&t.parser.leafBlockParsers.indexOf(JM.SetextHeading)>-1||r<3?-1:1}function MM(e,t){for(let n=e.stack.length-1;n>=0;n--)if(e.stack[n].type==t)return!0;return!1}function NM(e,t,n){return(e.next==45||e.next==43||e.next==42)&&(e.pos==e.text.length-1||EM(e.text.charCodeAt(e.pos+1)))&&(!n||MM(t,Q.BulletList)||e.skipSpace(e.pos+2)<e.text.length)?1:-1}function PM(e,t,n){let r=e.pos,i=e.next;for(;i>=48&&i<=57;){if(r++,r==e.text.length)return-1;i=e.text.charCodeAt(r)}return r==e.pos||r>e.pos+9||i!=46&&i!=41||r<e.text.length-1&&!EM(e.text.charCodeAt(r+1))||n&&!MM(t,Q.OrderedList)&&(e.skipSpace(r+1)==e.text.length||r>e.pos+1||e.next!=49)?-1:r+1-e.pos}function FM(e){if(e.next!=35)return-1;let t=e.pos+1;for(;t<e.text.length&&e.text.charCodeAt(t)==35;)t++;if(t<e.text.length&&e.text.charCodeAt(t)!=32)return-1;let n=t-e.pos;return n>6?-1:n}function IM(e){if(e.next!=45&&e.next!=61||e.indent>=e.baseIndent+4)return-1;let t=e.pos+1;for(;t<e.text.length&&e.text.charCodeAt(t)==e.next;)t++;let n=t;for(;t<e.text.length&&EM(e.text.charCodeAt(t));)t++;return t==e.text.length?n:-1}var LM=/^[ \t]*$/,RM=/-->/,zM=/\?>/,BM=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,RM],[/^\s*<\?/,zM],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?: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|h1|h2|h3|h4|h5|h6|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,LM],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,LM]];function VM(e,t,n){if(e.next!=60)return-1;let r=e.text.slice(e.pos);for(let e=0,t=BM.length-+!!n;e<t;e++)if(BM[e][0].test(r))return e;return-1}function HM(e,t){let n=e.countIndent(t,e.pos,e.indent),r=e.countIndent(e.skipSpace(t),t,n);return r>=n+5?n+1:r}function UM(e,t,n){let r=e.length-1;r>=0&&e[r].to==t&&e[r].type==Q.CodeText?e[r].to=n:e.push(cN(Q.CodeText,t,n))}var WM={LinkReference:void 0,IndentedCode(e,t){let n=t.baseIndent+4;if(t.indent<n)return!1;let r=t.findColumn(n),i=e.lineStart+r,a=e.lineStart+t.text.length,o=[],s=[];for(UM(o,i,a);e.nextLine()&&t.depth>=e.stack.length;)if(t.pos==t.text.length){UM(s,e.lineStart-1,e.lineStart);for(let e of t.markers)s.push(e)}else if(t.indent<n)break;else{if(s.length){for(let e of s)e.type==Q.CodeText?UM(o,e.from,e.to):o.push(e);s=[]}UM(o,e.lineStart-1,e.lineStart);for(let e of t.markers)o.push(e);a=e.lineStart+t.text.length;let n=e.lineStart+t.findColumn(t.baseIndent+4);n<a&&UM(o,n,a)}return s.length&&(s=s.filter(e=>e.type!=Q.CodeText),s.length&&(t.markers=s.concat(t.markers))),e.addNode(e.buffer.writeElements(o,-i).finish(Q.CodeBlock,a-i),i),!0},FencedCode(e,t){let n=kM(t);if(n<0)return!1;let r=e.lineStart+t.pos,i=t.next,a=n-t.pos,o=t.skipSpace(n),s=OM(t.text,t.text.length,o),c=[cN(Q.CodeMark,r,r+a)];o<s&&c.push(cN(Q.CodeInfo,e.lineStart+o,e.lineStart+s));for(let n=!0,r=!0,o=!1;e.nextLine()&&t.depth>=e.stack.length;n=!1){let s=t.pos;if(t.indent-t.baseIndent<4)for(;s<t.text.length&&t.text.charCodeAt(s)==i;)s++;if(s-t.pos>=a&&t.skipSpace(s)==t.text.length){for(let e of t.markers)c.push(e);r&&o&&UM(c,e.lineStart-1,e.lineStart),c.push(cN(Q.CodeMark,e.lineStart+t.pos,e.lineStart+s)),e.nextLine();break}else{o=!0,n||(UM(c,e.lineStart-1,e.lineStart),r=!1);for(let e of t.markers)c.push(e);let i=e.lineStart+t.basePos,a=e.lineStart+t.text.length;i<a&&(UM(c,i,a),r=!1)}}return e.addNode(e.buffer.writeElements(c,-r).finish(Q.FencedCode,e.prevLineEnd()-r),r),!0},Blockquote(e,t){let n=AM(t);return n<0?!1:(e.startContext(Q.Blockquote,t.pos),e.addNode(Q.QuoteMark,e.lineStart+t.pos,e.lineStart+t.pos+1),t.moveBase(t.pos+n),null)},HorizontalRule(e,t){if(jM(t,e,!1)<0)return!1;let n=e.lineStart+t.pos;return e.nextLine(),e.addNode(Q.HorizontalRule,n),!0},BulletList(e,t){let n=NM(t,e,!1);if(n<0)return!1;e.block.type!=Q.BulletList&&e.startContext(Q.BulletList,t.basePos,t.next);let r=HM(t,t.pos+1);return e.startContext(Q.ListItem,t.basePos,r-t.baseIndent),e.addNode(Q.ListMark,e.lineStart+t.pos,e.lineStart+t.pos+n),t.moveBaseColumn(r),null},OrderedList(e,t){let n=PM(t,e,!1);if(n<0)return!1;e.block.type!=Q.OrderedList&&e.startContext(Q.OrderedList,t.basePos,t.text.charCodeAt(t.pos+n-1));let r=HM(t,t.pos+n);return e.startContext(Q.ListItem,t.basePos,r-t.baseIndent),e.addNode(Q.ListMark,e.lineStart+t.pos,e.lineStart+t.pos+n),t.moveBaseColumn(r),null},ATXHeading(e,t){let n=FM(t);if(n<0)return!1;let r=t.pos,i=e.lineStart+r,a=OM(t.text,t.text.length,r),o=a;for(;o>r&&t.text.charCodeAt(o-1)==t.next;)o--;(o==a||o==r||!EM(t.text.charCodeAt(o-1)))&&(o=t.text.length);let s=e.buffer.write(Q.HeaderMark,0,n).writeElements(e.parser.parseInline(t.text.slice(r+n+1,o),i+n+1),-i);o<t.text.length&&s.write(Q.HeaderMark,o-r,a-r);let c=s.finish(Q.ATXHeading1-1+n,t.text.length-r);return e.nextLine(),e.addNode(c,i),!0},HTMLBlock(e,t){let n=VM(t,e,!1);if(n<0)return!1;let r=e.lineStart+t.pos,i=BM[n][1],a=[],o=i!=LM;for(;!i.test(t.text)&&e.nextLine();){if(t.depth<e.stack.length){o=!1;break}for(let e of t.markers)a.push(e)}o&&e.nextLine();let s=i==RM?Q.CommentBlock:i==zM?Q.ProcessingInstructionBlock:Q.HTMLBlock,c=e.prevLineEnd();return e.addNode(e.buffer.writeElements(a,-r).finish(s,c-r),r),!0},SetextHeading:void 0},GM=class{constructor(e){this.stage=0,this.elts=[],this.pos=0,this.start=e.start,this.advance(e.content)}nextLine(e,t,n){if(this.stage==-1)return!1;let r=n.content+`
|
|
11
|
-
`+t.scrub(),i=this.advance(r);return i>-1&&i<r.length?this.complete(e,n,i):!1}finish(e,t){return(this.stage==2||this.stage==3)&&DM(t.content,this.pos)==t.content.length?this.complete(e,t,t.content.length):!1}complete(e,t,n){return e.addLeafElement(t,cN(Q.LinkReference,this.start,this.start+n,this.elts)),!0}nextStage(e){return e?(this.pos=e.to-this.start,this.elts.push(e),this.stage++,!0):(e===!1&&(this.stage=-1),!1)}advance(e){for(;;)if(this.stage==-1)return-1;else if(this.stage==0){if(!this.nextStage(bN(e,this.pos,this.start,!0)))return-1;if(e.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push(cN(Q.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(vN(e,DM(e,this.pos),this.start)))return-1}else if(this.stage==2){let t=DM(e,this.pos),n=0;if(t>this.pos){let r=yN(e,t,this.start);if(r){let t=KM(e,r.to-this.start);t>0&&(this.nextStage(r),n=t)}}return n||=KM(e,this.pos),n>0&&n<e.length?n:-1}else return KM(e,this.pos)}};function KM(e,t){for(;t<e.length;t++){let n=e.charCodeAt(t);if(n==10)break;if(!EM(n))return-1}return t}var qM=class{nextLine(e,t,n){let r=t.depth<e.stack.length?-1:IM(t),i=t.next;if(r<0)return!1;let a=cN(Q.HeaderMark,e.lineStart+t.pos,e.lineStart+r);return e.nextLine(),e.addLeafElement(n,cN(i==61?Q.SetextHeading1:Q.SetextHeading2,n.start,e.prevLineEnd(),[...e.parser.parseInline(n.content,n.start),a])),!0}finish(){return!1}},JM={LinkReference(e,t){return t.content.charCodeAt(0)==91?new GM(t):null},SetextHeading(){return new qM}},YM=[(e,t)=>FM(t)>=0,(e,t)=>kM(t)>=0,(e,t)=>AM(t)>=0,(e,t)=>NM(t,e,!0)>=0,(e,t)=>PM(t,e,!0)>=0,(e,t)=>jM(t,e,!0)>=0,(e,t)=>VM(t,e,!0)>=0],XM={text:``,end:0},ZM=class{constructor(e,t,n,r){this.parser=e,this.input=t,this.ranges=r,this.line=new CM,this.atEnd=!1,this.reusePlaceholders=new Map,this.stoppedAt=null,this.rangeI=0,this.to=r[r.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=r[0].from,this.block=xM.create(Q.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=n.length?new wN(n,t):null,this.readLine()}get parsedPos(){return this.absoluteLineStart}advance(){if(this.stoppedAt!=null&&this.absoluteLineStart>this.stoppedAt)return this.finish();let{line:e}=this;for(;;){for(let t=0;;){let n=e.depth<this.stack.length?this.stack[this.stack.length-1]:null;for(;t<e.markers.length&&(!n||e.markers[t].from<n.end);){let n=e.markers[t++];this.addNode(n.type,n.from,n.to)}if(!n)break;this.finishContext()}if(e.pos<e.text.length)break;if(!this.nextLine())return this.finish()}if(this.fragments&&this.reuseFragment(e.basePos))return null;start:for(;;){for(let t of this.parser.blockParsers)if(t){let n=t(this,e);if(n!=0){if(n==1)return null;e.forward();continue start}}break}let t=new SM(this.lineStart+e.pos,e.text.slice(e.pos));for(let e of this.parser.leafBlockParsers)if(e){let n=e(this,t);n&&t.parsers.push(n)}lines:for(;this.nextLine()&&e.pos!=e.text.length;){if(e.indent<e.baseIndent+4){for(let n of this.parser.endLeafBlock)if(n(this,e,t))break lines}for(let n of t.parsers)if(n.nextLine(this,e,t))return null;t.content+=`
|
|
12
|
-
`+e.scrub();for(let n of e.markers)t.marks.push(n)}return this.finishLeaf(t),null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw RangeError(`Can't move stoppedAt forward`);this.stoppedAt=e}reuseFragment(e){if(!this.fragments.moveTo(this.absoluteLineStart+e,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let t=this.fragments.takeNodes(this);return t?(this.absoluteLineStart+=t,this.lineStart=TN(this.absoluteLineStart,this.ranges),this.moveRangeI(),this.absoluteLineStart<this.to?(this.lineStart++,this.absoluteLineStart++,this.readLine()):(this.atEnd=!0,this.readLine()),!0):!1}get depth(){return this.stack.length}parentType(e=this.depth-1){return this.parser.nodeSet.types[this.stack[e].type]}nextLine(){return this.lineStart+=this.line.text.length,this.absoluteLineEnd>=this.to?(this.absoluteLineStart=this.absoluteLineEnd,this.atEnd=!0,this.readLine(),!1):(this.lineStart++,this.absoluteLineStart=this.absoluteLineEnd+1,this.moveRangeI(),this.readLine(),!0)}peekLine(){return this.scanLine(this.absoluteLineEnd+1).text}moveRangeI(){for(;this.rangeI<this.ranges.length-1&&this.absoluteLineStart>=this.ranges[this.rangeI].to;)this.rangeI++,this.absoluteLineStart=Math.max(this.absoluteLineStart,this.ranges[this.rangeI].from)}scanLine(e){let t=XM;if(t.end=e,e>=this.to)t.text=``;else if(t.text=this.lineChunkAt(e),t.end+=t.text.length,this.ranges.length>1){let e=this.absoluteLineStart,n=this.rangeI;for(;this.ranges[n].to<t.end;){n++;let r=this.ranges[n].from,i=this.lineChunkAt(r);t.end=r+i.length,t.text=t.text.slice(0,this.ranges[n-1].to-e)+i,e=t.end-t.text.length}}return t}readLine(){let{line:e}=this,{text:t,end:n}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=n,e.reset(t);e.depth<this.stack.length;e.depth++){let t=this.stack[e.depth],n=this.parser.skipContextMarkup[t.type];if(!n)throw Error(`Unhandled block context `+Q[t.type]);let r=this.line.markers.length;if(!n(t,this,e)){this.line.markers.length>r&&(t.end=this.line.markers[this.line.markers.length-1].to),e.forward();break}e.forward()}}lineChunkAt(e){let t=this.input.chunk(e),n;if(this.input.lineChunks)n=t==`
|
|
13
|
-
`?``:t;else{let e=t.indexOf(`
|
|
14
|
-
`);n=e<0?t:t.slice(0,e)}return e+n.length>this.to?n.slice(0,this.to-e):n}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(e,t,n=0){this.block=xM.create(e,n,this.lineStart+t,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(e,t,n=0){this.startContext(this.parser.getNodeType(e),t,n)}addNode(e,t,n){typeof e==`number`&&(e=new mn(this.parser.nodeSet.types[e],iN,iN,(n??this.prevLineEnd())-t)),this.block.addChild(e,t-this.block.from)}addElement(e){this.block.addChild(e.toTree(this.parser.nodeSet),e.from-this.block.from)}addLeafElement(e,t){this.addNode(this.buffer.writeElements(SN(t.children,e.marks),-t.from).finish(t.type,t.to-t.from),t.from)}finishContext(){let e=this.stack.pop(),t=this.stack[this.stack.length-1];t.addChild(e.toTree(this.parser.nodeSet),e.from-t.from),this.block=t}finish(){for(;this.stack.length>1;)this.finishContext();return this.addGaps(this.block.toTree(this.parser.nodeSet,this.lineStart))}addGaps(e){return this.ranges.length>1?QM(this.ranges,0,e.topNode,this.ranges[0].from,this.reusePlaceholders):e}finishLeaf(e){for(let t of e.parsers)if(t.finish(this,e))return;let t=SN(this.parser.parseInline(e.content,e.start),e.marks);this.addNode(this.buffer.writeElements(t,-e.start).finish(Q.Paragraph,e.content.length),e.start)}elt(e,t,n,r){return typeof e==`string`?cN(this.parser.getNodeType(e),t,n,r):new sN(e,t)}get buffer(){return new aN(this.parser.nodeSet)}};function QM(e,t,n,r,i){let a=e[t].to,o=[],s=[],c=n.from+r;function l(n,i){for(;i?n>=a:n>a;){let i=e[t+1].from-a;r+=i,n+=i,t++,a=e[t].to}}for(let u=n.firstChild;u;u=u.nextSibling){l(u.from+r,!0);let n=u.from+r,d,f=i.get(u.tree);f?d=f:u.to+r>a?(d=QM(e,t,u,r,i),l(u.to+r,!1)):d=u.toTree(),o.push(d),s.push(n-c)}return l(n.to+r,!1),new mn(n.type,o,s,n.to+r-c,n.tree?n.tree.propValues:void 0)}var $M=class e extends En{constructor(e,t,n,r,i,a,o,s,c){super(),this.nodeSet=e,this.blockParsers=t,this.leafBlockParsers=n,this.blockNames=r,this.endLeafBlock=i,this.skipContextMarkup=a,this.inlineParsers=o,this.inlineNames=s,this.wrappers=c,this.nodeTypes=Object.create(null);for(let t of e.types)this.nodeTypes[t.name]=t.id}createParse(e,t,n){let r=new ZM(this,e,t,n);for(let i of this.wrappers)r=i(r,e,t,n);return r}configure(t){let n=tN(t);if(!n)return this;let{nodeSet:r,skipContextMarkup:i}=this,a=this.blockParsers.slice(),o=this.leafBlockParsers.slice(),s=this.blockNames.slice(),c=this.inlineParsers.slice(),l=this.inlineNames.slice(),u=this.endLeafBlock.slice(),d=this.wrappers;if(eN(n.defineNodes)){i=Object.assign({},i);let e=r.types.slice(),t;for(let r of n.defineNodes){let{name:n,block:a,composite:o,style:s}=typeof r==`string`?{name:r}:r;if(e.some(e=>e.name==n))continue;o&&(i[e.length]=(e,t,n)=>o(t,n,e.value));let c=e.length,l=o?[`Block`,`BlockContext`]:a?c>=Q.ATXHeading1&&c<=Q.SetextHeading2?[`Block`,`LeafBlock`,`Heading`]:[`Block`,`LeafBlock`]:void 0;e.push(hn.define({id:c,name:n,props:l&&[[un.group,l]]})),s&&(t||={},Array.isArray(s)||s instanceof xn?t[n]=s:Object.assign(t,s))}r=new Tn(e),t&&(r=r.extend(gn(t)))}if(eN(n.props)&&(r=r.extend(...n.props)),eN(n.remove))for(let e of n.remove){let t=this.blockNames.indexOf(e),n=this.inlineNames.indexOf(e);t>-1&&(a[t]=o[t]=void 0),n>-1&&(c[n]=void 0)}if(eN(n.parseBlock))for(let e of n.parseBlock){let t=s.indexOf(e.name);if(t>-1)a[t]=e.parse,o[t]=e.leaf;else{let t=e.before?nN(s,e.before):e.after?nN(s,e.after)+1:s.length-1;a.splice(t,0,e.parse),o.splice(t,0,e.leaf),s.splice(t,0,e.name)}e.endLeaf&&u.push(e.endLeaf)}if(eN(n.parseInline))for(let e of n.parseInline){let t=l.indexOf(e.name);if(t>-1)c[t]=e.parse;else{let t=e.before?nN(l,e.before):e.after?nN(l,e.after)+1:l.length-1;c.splice(t,0,e.parse),l.splice(t,0,e.name)}}return n.wrap&&(d=d.concat(n.wrap)),new e(r,a,o,s,u,i,c,l,d)}getNodeType(e){let t=this.nodeTypes[e];if(t==null)throw RangeError(`Unknown node type '${e}'`);return t}parseInline(e,t){let n=new xN(this,e,t);outer:for(let e=t;e<n.end;){let t=n.char(e);for(let r of this.inlineParsers)if(r){let i=r(n,t,e);if(i>=0){e=i;continue outer}}e++}return n.resolveMarkers(0)}};function eN(e){return e!=null&&e.length>0}function tN(e){if(!Array.isArray(e))return e;if(e.length==0)return null;let t=tN(e[0]);if(e.length==1)return t;let n=tN(e.slice(1));if(!n||!t)return t||n;let r=(e,t)=>(e||iN).concat(t||iN),i=t.wrap,a=n.wrap;return{props:r(t.props,n.props),defineNodes:r(t.defineNodes,n.defineNodes),parseBlock:r(t.parseBlock,n.parseBlock),parseInline:r(t.parseInline,n.parseInline),remove:r(t.remove,n.remove),wrap:i?a?(e,t,n,r)=>i(a(e,t,n,r),t,n,r):i:a}}function nN(e,t){let n=e.indexOf(t);if(n<0)throw RangeError(`Position specified relative to unknown parser ${t}`);return n}var rN=[hn.none];for(let e=1,t;t=Q[e];e++)rN[e]=hn.define({id:e,name:t,props:e>=Q.Escape?[]:[[un.group,e in TM?[`Block`,`BlockContext`]:[`Block`,`LeafBlock`]]],top:t==`Document`});var iN=[],aN=class{constructor(e){this.nodeSet=e,this.content=[],this.nodes=[]}write(e,t,n,r=0){return this.content.push(e,t,n,4+r*4),this}writeElements(e,t=0){for(let n of e)n.writeTo(this,t);return this}finish(e,t){return mn.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:e,length:t})}},oN=class{constructor(e,t,n,r=iN){this.type=e,this.from=t,this.to=n,this.children=r}writeTo(e,t){let n=e.content.length;e.writeElements(this.children,t),e.content.push(this.type,this.from+t,this.to+t,e.content.length+4-n)}toTree(e){return new aN(e).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}},sN=class{constructor(e,t){this.tree=e,this.from=t}get to(){return this.from+this.tree.length}get type(){return this.tree.type.id}get children(){return iN}writeTo(e,t){e.nodes.push(this.tree),e.content.push(e.nodes.length-1,this.from+t,this.to+t,-1)}toTree(){return this.tree}};function cN(e,t,n,r){return new oN(e,t,n,r)}var lN={resolve:`Emphasis`,mark:`EmphasisMark`},uN={resolve:`Emphasis`,mark:`EmphasisMark`},dN={},fN={},pN=class{constructor(e,t,n,r){this.type=e,this.from=t,this.to=n,this.side=r}},mN=`!"#$%&'()*+,-./:;<=>?@[\\]^_\`{|}~`,hN=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{hN=RegExp(`[\\p{S}|\\p{P}]`,`u`)}catch{}var gN={Escape(e,t,n){if(t!=92||n==e.end-1)return-1;let r=e.char(n+1);for(let t=0;t<32;t++)if(mN.charCodeAt(t)==r)return e.append(cN(Q.Escape,n,n+2));return-1},Entity(e,t,n){if(t!=38)return-1;let r=/^(?:#\d+|#x[a-f\d]+|\w+);/i.exec(e.slice(n+1,n+31));return r?e.append(cN(Q.Entity,n,n+1+r[0].length)):-1},InlineCode(e,t,n){if(t!=96||n&&e.char(n-1)==96)return-1;let r=n+1;for(;r<e.end&&e.char(r)==96;)r++;let i=r-n,a=0;for(;r<e.end;r++)if(e.char(r)==96){if(a++,a==i&&e.char(r+1)!=96)return e.append(cN(Q.InlineCode,n,r+1,[cN(Q.CodeMark,n,n+i),cN(Q.CodeMark,r+1-i,r+1)]))}else a=0;return-1},HTMLTag(e,t,n){if(t!=60||n==e.end-1)return-1;let r=e.slice(n+1,e.end),i=/^(?:[a-z][-\w+.]+:[^\s>]+|[a-z\d.!#$%&'*+/=?^_`{|}~-]+@[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?(?:\.[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?)*)>/i.exec(r);if(i)return e.append(cN(Q.Autolink,n,n+1+i[0].length,[cN(Q.LinkMark,n,n+1),cN(Q.URL,n+1,n+i[0].length),cN(Q.LinkMark,n+i[0].length,n+1+i[0].length)]));let a=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(r);if(a)return e.append(cN(Q.Comment,n,n+1+a[0].length));let o=/^\?[^]*?\?>/.exec(r);if(o)return e.append(cN(Q.ProcessingInstruction,n,n+1+o[0].length));let s=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(r);return s?e.append(cN(Q.HTMLTag,n,n+1+s[0].length)):-1},Emphasis(e,t,n){if(t!=95&&t!=42)return-1;let r=n+1;for(;e.char(r)==t;)r++;let i=e.slice(n-1,n),a=e.slice(r,r+1),o=hN.test(i),s=hN.test(a),c=/\s|^$/.test(i),l=/\s|^$/.test(a),u=!l&&(!s||c||o),d=!c&&(!o||l||s),f=u&&(t==42||!d||o),p=d&&(t==42||!u||s);return e.append(new pN(t==95?lN:uN,n,r,!!f|(p?2:0)))},HardBreak(e,t,n){if(t==92&&e.char(n+1)==10)return e.append(cN(Q.HardBreak,n,n+2));if(t==32){let t=n+1;for(;e.char(t)==32;)t++;if(e.char(t)==10&&t>=n+2)return e.append(cN(Q.HardBreak,n,t+1))}return-1},Link(e,t,n){return t==91?e.append(new pN(dN,n,n+1,1)):-1},Image(e,t,n){return t==33&&e.char(n+1)==91?e.append(new pN(fN,n,n+2,1)):-1},LinkEnd(e,t,n){if(t!=93)return-1;for(let t=e.parts.length-1;t>=0;t--){let r=e.parts[t];if(r instanceof pN&&(r.type==dN||r.type==fN)){if(!r.side||e.skipSpace(r.to)==n&&!/[(\[]/.test(e.slice(n+1,n+2)))return e.parts[t]=null,-1;let i=e.takeContent(t),a=e.parts[t]=_N(e,i,r.type==dN?Q.Link:Q.Image,r.from,n+1);if(r.type==dN)for(let n=0;n<t;n++){let t=e.parts[n];t instanceof pN&&t.type==dN&&(t.side=0)}return a.to}}return-1}};function _N(e,t,n,r,i){let{text:a}=e,o=e.char(i),s=i;if(t.unshift(cN(Q.LinkMark,r,r+(n==Q.Image?2:1))),t.push(cN(Q.LinkMark,i-1,i)),o==40){let n=e.skipSpace(i+1),r=vN(a,n-e.offset,e.offset),o;r&&(n=e.skipSpace(r.to),n!=r.to&&(o=yN(a,n-e.offset,e.offset),o&&(n=e.skipSpace(o.to)))),e.char(n)==41&&(t.push(cN(Q.LinkMark,i,i+1)),s=n+1,r&&t.push(r),o&&t.push(o),t.push(cN(Q.LinkMark,n,s)))}else if(o==91){let n=bN(a,i-e.offset,e.offset,!1);n&&(t.push(n),s=n.to)}return cN(n,r,s,t)}function vN(e,t,n){if(e.charCodeAt(t)==60){for(let r=t+1;r<e.length;r++){let i=e.charCodeAt(r);if(i==62)return cN(Q.URL,t+n,r+1+n);if(i==60||i==10)return!1}return null}else{let r=0,i=t;for(let t=!1;i<e.length;i++){let n=e.charCodeAt(i);if(EM(n))break;if(t)t=!1;else if(n==40)r++;else if(n==41){if(!r)break;r--}else n==92&&(t=!0)}return i>t?cN(Q.URL,t+n,i+n):i==e.length?null:!1}}function yN(e,t,n){let r=e.charCodeAt(t);if(r!=39&&r!=34&&r!=40)return!1;let i=r==40?41:r;for(let r=t+1,a=!1;r<e.length;r++){let o=e.charCodeAt(r);if(a)a=!1;else if(o==i)return cN(Q.LinkTitle,t+n,r+1+n);else o==92&&(a=!0)}return null}function bN(e,t,n,r){for(let i=!1,a=t+1,o=Math.min(e.length,a+999);a<o;a++){let o=e.charCodeAt(a);if(i)i=!1;else if(o==93)return r?!1:cN(Q.LinkLabel,t+n,a+1+n);else{if(r&&!EM(o)&&(r=!1),o==91)return!1;o==92&&(i=!0)}}return null}var xN=class{constructor(e,t,n){this.parser=e,this.text=t,this.offset=n,this.parts=[]}char(e){return e>=this.end?-1:this.text.charCodeAt(e-this.offset)}get end(){return this.offset+this.text.length}slice(e,t){return this.text.slice(e-this.offset,t-this.offset)}append(e){return this.parts.push(e),e.to}addDelimiter(e,t,n,r,i){return this.append(new pN(e,t,n,!!r|(i?2:0)))}get hasOpenLink(){for(let e=this.parts.length-1;e>=0;e--){let t=this.parts[e];if(t instanceof pN&&(t.type==dN||t.type==fN))return!0}return!1}addElement(e){return this.append(e)}resolveMarkers(e){for(let t=e;t<this.parts.length;t++){let n=this.parts[t];if(!(n instanceof pN&&n.type.resolve&&n.side&2))continue;let r=n.type==lN||n.type==uN,i=n.to-n.from,a,o=t-1;for(;o>=e;o--){let e=this.parts[o];if(e instanceof pN&&e.side&1&&e.type==n.type&&!(r&&(n.side&1||e.side&2)&&(e.to-e.from+i)%3==0&&((e.to-e.from)%3||i%3))){a=e;break}}if(!a)continue;let s=n.type.resolve,c=[],l=a.from,u=n.to;if(r){let e=Math.min(2,a.to-a.from,i);l=a.to-e,u=n.from+e,s=e==1?`Emphasis`:`StrongEmphasis`}a.type.mark&&c.push(this.elt(a.type.mark,l,a.to));for(let e=o+1;e<t;e++)this.parts[e]instanceof oN&&c.push(this.parts[e]),this.parts[e]=null;n.type.mark&&c.push(this.elt(n.type.mark,n.from,u));let d=this.elt(s,l,u,c);this.parts[o]=r&&a.from!=l?new pN(a.type,a.from,l,a.side):null,(this.parts[t]=r&&n.to!=u?new pN(n.type,u,n.to,n.side):null)?this.parts.splice(t,0,d):this.parts[t]=d}let t=[];for(let n=e;n<this.parts.length;n++){let e=this.parts[n];e instanceof oN&&t.push(e)}return t}findOpeningDelimiter(e){for(let t=this.parts.length-1;t>=0;t--){let n=this.parts[t];if(n instanceof pN&&n.type==e&&n.side&1)return t}return null}takeContent(e){let t=this.resolveMarkers(e);return this.parts.length=e,t}getDelimiterAt(e){let t=this.parts[e];return t instanceof pN?t:null}skipSpace(e){return DM(this.text,e-this.offset)+this.offset}elt(e,t,n,r){return typeof e==`string`?cN(this.parser.getNodeType(e),t,n,r):new sN(e,t)}};xN.linkStart=dN,xN.imageStart=fN;function SN(e,t){if(!t.length)return e;if(!e.length)return t;let n=e.slice(),r=0;for(let e of t){for(;r<n.length&&n[r].to<e.to;)r++;if(r<n.length&&n[r].from<e.from){let t=n[r];t instanceof oN&&(n[r]=new oN(t.type,t.from,t.to,SN(t.children,[e])))}else n.splice(r++,0,e)}return n}var CN=[Q.CodeBlock,Q.ListItem,Q.OrderedList,Q.BulletList],wN=class{constructor(e,t){this.fragments=e,this.input=t,this.i=0,this.fragment=null,this.fragmentEnd=-1,this.cursor=null,e.length&&(this.fragment=e[this.i++])}nextFragment(){this.fragment=this.i<this.fragments.length?this.fragments[this.i++]:null,this.cursor=null,this.fragmentEnd=-1}moveTo(e,t){for(;this.fragment&&this.fragment.to<=e;)this.nextFragment();if(!this.fragment||this.fragment.from>(e?e-1:0))return!1;if(this.fragmentEnd<0){let e=this.fragment.to;for(;e>0&&this.input.read(e-1,e)!=`
|
|
15
|
-
`;)e--;this.fragmentEnd=e?e-1:0}let n=this.cursor;n||(n=this.cursor=this.fragment.tree.cursor(),n.firstChild());let r=e+this.fragment.offset;for(;n.to<=r;)if(!n.parent())return!1;for(;;){if(n.from>=r)return this.fragment.from<=t;if(!n.childAfter(r))return!1}}matches(e){let t=this.cursor.tree;return t&&t.prop(un.contextHash)==e}takeNodes(e){let t=this.cursor,n=this.fragment.offset,r=this.fragmentEnd-+!!this.fragment.openEnd,i=e.absoluteLineStart,a=i,o=e.block.children.length,s=a,c=o;for(;;){if(t.to-n>r){if(t.type.isAnonymous&&t.firstChild())continue;break}let i=TN(t.from-n,e.ranges);if(t.to-n<=e.ranges[e.rangeI].to)e.addNode(t.tree,i);else{let n=new mn(e.parser.nodeSet.types[Q.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(n,t.tree),e.addNode(n,i)}if(t.type.is(`Block`)&&(CN.indexOf(t.type.id)<0?(a=t.to-n,o=e.block.children.length):(a=s,o=c),s=t.to-n,c=e.block.children.length),!t.nextSibling())break}for(;e.block.children.length>o;)e.block.children.pop(),e.block.positions.pop();return a-i}};function TN(e,t){let n=e;for(let r=1;r<t.length;r++){let i=t[r-1].to,a=t[r].from;i<e&&(n-=a-i)}return n}var EN=gn({"Blockquote/...":K.quote,HorizontalRule:K.contentSeparator,"ATXHeading1/... SetextHeading1/...":K.heading1,"ATXHeading2/... SetextHeading2/...":K.heading2,"ATXHeading3/...":K.heading3,"ATXHeading4/...":K.heading4,"ATXHeading5/...":K.heading5,"ATXHeading6/...":K.heading6,"Comment CommentBlock":K.comment,Escape:K.escape,Entity:K.character,"Emphasis/...":K.emphasis,"StrongEmphasis/...":K.strong,"Link/... Image/...":K.link,"OrderedList/... BulletList/...":K.list,"BlockQuote/...":K.quote,"InlineCode CodeText":K.monospace,"URL Autolink":K.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":K.processingInstruction,"CodeInfo LinkLabel":K.labelName,LinkTitle:K.string,Paragraph:K.content}),DN=new $M(new Tn(rN).extend(EN),Object.keys(WM).map(e=>WM[e]),Object.keys(WM).map(e=>JM[e]),Object.keys(WM),YM,TM,Object.keys(gN).map(e=>gN[e]),Object.keys(gN),[]);function ON(e,t,n){let r=[];for(let i=e.firstChild,a=t;;i=i.nextSibling){let e=i?i.from:n;if(e>a&&r.push({from:a,to:e}),!i)break;a=i.to}return r}function kN(e){let{codeParser:t,htmlParser:n}=e;return{wrap:_n((e,r)=>{let i=e.type.id;if(t&&(i==Q.CodeBlock||i==Q.FencedCode)){let n=``;if(i==Q.FencedCode){let t=e.node.getChild(Q.CodeInfo);t&&(n=r.read(t.from,t.to))}let a=t(n);if(a)return{parser:a,overlay:e=>e.type.id==Q.CodeText,bracketed:i==Q.FencedCode}}else if(n&&(i==Q.HTMLBlock||i==Q.HTMLTag||i==Q.CommentBlock))return{parser:n,overlay:ON(e.node,e.from,e.to)};return null})}}var AN={resolve:`Strikethrough`,mark:`StrikethroughMark`},jN={defineNodes:[{name:`Strikethrough`,style:{"Strikethrough/...":K.strikethrough}},{name:`StrikethroughMark`,style:K.processingInstruction}],parseInline:[{name:`Strikethrough`,parse(e,t,n){if(t!=126||e.char(n+1)!=126||e.char(n+2)==126)return-1;let r=e.slice(n-1,n),i=e.slice(n+2,n+3),a=/\s|^$/.test(r),o=/\s|^$/.test(i),s=hN.test(r),c=hN.test(i);return e.addDelimiter(AN,n,n+2,!o&&(!c||a||s),!a&&(!s||o||c))},after:`Emphasis`}]};function MN(e,t,n=0,r,i=0){let a=0,o=!0,s=-1,c=-1,l=!1,u=()=>{r.push(e.elt(`TableCell`,i+s,i+c,e.parser.parseInline(t.slice(s,c),i+s)))};for(let d=n;d<t.length;d++){let n=t.charCodeAt(d);n==124&&!l?((!o||s>-1)&&a++,o=!1,r&&(s>-1&&u(),r.push(e.elt(`TableDelimiter`,d+i,d+i+1))),s=c=-1):(l||n!=32&&n!=9)&&(s<0&&(s=d),c=d+1),l=!l&&n==92}return s>-1&&(a++,r&&u()),a}function NN(e,t){for(let n=t;n<e.length;n++){let t=e.charCodeAt(n);if(t==124)return!0;t==92&&n++}return!1}var PN=/^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/,FN=class{constructor(){this.rows=null}nextLine(e,t,n){if(this.rows==null){this.rows=!1;let r;if((t.next==45||t.next==58||t.next==124)&&PN.test(r=t.text.slice(t.pos))){let i=[];MN(e,n.content,0,i,n.start)==MN(e,r,t.pos)&&(this.rows=[e.elt(`TableHeader`,n.start,n.start+n.content.length,i),e.elt(`TableDelimiter`,e.lineStart+t.pos,e.lineStart+t.text.length)])}}else if(this.rows){let n=[];MN(e,t.text,t.pos,n,e.lineStart),this.rows.push(e.elt(`TableRow`,e.lineStart+t.pos,e.lineStart+t.text.length,n))}return!1}finish(e,t){return this.rows?(e.addLeafElement(t,e.elt(`Table`,t.start,t.start+t.content.length,this.rows)),!0):!1}},IN={defineNodes:[{name:`Table`,block:!0},{name:`TableHeader`,style:{"TableHeader/...":K.heading}},`TableRow`,{name:`TableCell`,style:K.content},{name:`TableDelimiter`,style:K.processingInstruction}],parseBlock:[{name:`Table`,leaf(e,t){return NN(t.content,0)?new FN:null},endLeaf(e,t,n){if(n.parsers.some(e=>e instanceof FN)||!NN(t.text,t.basePos))return!1;let r=e.peekLine();return PN.test(r)&&MN(e,t.text,t.basePos)==MN(e,r,t.basePos)},before:`SetextHeading`}]},LN=class{nextLine(){return!1}finish(e,t){return e.addLeafElement(t,e.elt(`Task`,t.start,t.start+t.content.length,[e.elt(`TaskMarker`,t.start,t.start+3),...e.parser.parseInline(t.content.slice(3),t.start+3)])),!0}},RN={defineNodes:[{name:`Task`,block:!0,style:K.list},{name:`TaskMarker`,style:K.atom}],parseBlock:[{name:`TaskList`,leaf(e,t){return/^\[[ xX]\][ \t]/.test(t.content)&&e.parentType().name==`ListItem`?new LN:null},after:`SetextHeading`}]},zN=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,BN=/[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy,VN=/[\w-]+\.[\w-]+($|\/)/,HN=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,UN=/\/[a-zA-Z\d@.]+/gy;function WN(e,t,n,r){let i=0;for(let a=t;a<n;a++)e[a]==r&&i++;return i}function GN(e,t){BN.lastIndex=t;let n=BN.exec(e);if(!n||VN.exec(n[0])[0].indexOf(`_`)>-1)return-1;let r=t+n[0].length;for(;;){let n=e[r-1],i;if(/[?!.,:*_~]/.test(n)||n==`)`&&WN(e,t,r,`)`)>WN(e,t,r,`(`))r--;else if(n==`;`&&(i=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(e.slice(t,r))))r=t+i.index;else break}return r}function KN(e,t){HN.lastIndex=t;let n=HN.exec(e);if(!n)return-1;let r=n[0][n[0].length-1];return r==`_`||r==`-`?-1:t+n[0].length-+(r==`.`)}var qN=[IN,RN,jN,{parseInline:[{name:`Autolink`,parse(e,t,n){let r=n-e.offset;if(r&&/\w/.test(e.text[r-1]))return-1;zN.lastIndex=r;let i=zN.exec(e.text),a=-1;return!i||(i[1]||i[2]?(a=GN(e.text,r+i[0].length),a>-1&&e.hasOpenLink&&(a=r+/([^\[\]]|\[[^\]]*\])*/.exec(e.text.slice(r,a))[0].length)):i[3]?a=KN(e.text,r):(a=KN(e.text,r+i[0].length),a>-1&&i[0]==`xmpp:`&&(UN.lastIndex=a,i=UN.exec(e.text),i&&(a=i.index+i[0].length))),a<0)?-1:(e.addElement(e.elt(`URL`,n,a+e.offset)),a+e.offset)}}]}];function JN(e,t,n){return(r,i,a)=>{if(i!=e||r.char(a+1)==e)return-1;let o=[r.elt(n,a,a+1)];for(let i=a+1;i<r.end;i++){let s=r.char(i);if(s==e)return r.addElement(r.elt(t,a,i+1,o.concat(r.elt(n,i,i+1))));if(s==92&&o.push(r.elt(`Escape`,i,i+++2)),EM(s))break}return-1}}var YN={defineNodes:[{name:`Superscript`,style:K.special(K.content)},{name:`SuperscriptMark`,style:K.processingInstruction}],parseInline:[{name:`Superscript`,parse:JN(94,`Superscript`,`SuperscriptMark`)}]},XN={defineNodes:[{name:`Subscript`,style:K.special(K.content)},{name:`SubscriptMark`,style:K.processingInstruction}],parseInline:[{name:`Subscript`,parse:JN(126,`Subscript`,`SubscriptMark`)}]},ZN={defineNodes:[{name:`Emoji`,style:K.character}],parseInline:[{name:`Emoji`,parse(e,t,n){let r;return t!=58||!(r=/^[a-zA-Z_0-9]+:/.exec(e.slice(n+1,e.end)))?-1:e.addElement(e.elt(`Emoji`,n,n+1+r[0].length))}}]},QN=55,$N=1,eP=56,tP=2,nP=57,rP=3,iP=4,aP=5,oP=6,sP=7,cP=8,lP=9,uP=10,dP=11,fP=12,pP=13,mP=58,hP=14,gP=15,_P=59,vP=21,yP=23,bP=24,xP=25,SP=27,CP=28,wP=29,TP=32,EP=35,DP=37,OP=38,kP=0,AP=1,jP={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},MP={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},NP={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function PP(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}var FP=null,IP=null,LP=0;function RP(e,t){let n=e.pos+t;if(LP==n&&IP==e)return FP;let r=e.peek(t),i=``;for(;PP(r);)i+=String.fromCharCode(r),r=e.peek(++t);return IP=e,LP=n,FP=i?i.toLowerCase():r==HP||r==UP?void 0:null}var zP=60,BP=62,VP=47,HP=63,UP=33,WP=45;function GP(e,t){this.name=e,this.parent=t}var KP=[oP,uP,sP,cP,lP],qP=new ar({start:null,shift(e,t,n,r){return KP.indexOf(t)>-1?new GP(RP(r,1)||``,e):e},reduce(e,t){return t==vP&&e?e.parent:e},reuse(e,t,n,r){let i=t.type.id;return i==oP||i==DP?new GP(RP(r,1)||``,e):e},strict:!1}),JP=new rr((e,t)=>{if(e.next!=zP){e.next<0&&t.context&&e.acceptToken(mP);return}e.advance();let n=e.next==VP;n&&e.advance();let r=RP(e,0);if(r===void 0)return;if(!r)return e.acceptToken(n?gP:hP);let i=t.context?t.context.name:null;if(n){if(r==i)return e.acceptToken(dP);if(i&&MP[i])return e.acceptToken(mP,-2);if(t.dialectEnabled(kP))return e.acceptToken(fP);for(let e=t.context;e;e=e.parent)if(e.name==r)return;e.acceptToken(pP)}else{if(r==`script`)return e.acceptToken(sP);if(r==`style`)return e.acceptToken(cP);if(r==`textarea`)return e.acceptToken(lP);if(jP.hasOwnProperty(r))return e.acceptToken(uP);i&&NP[i]&&NP[i][r]?e.acceptToken(mP,-1):e.acceptToken(oP)}},{contextual:!0}),YP=new rr(e=>{for(let t=0,n=0;;n++){if(e.next<0){n&&e.acceptToken(_P);break}if(e.next==WP)t++;else if(e.next==BP&&t>=2){n>=3&&e.acceptToken(_P,-2);break}else t=0;e.advance()}});function XP(e){for(;e;e=e.parent)if(e.name==`svg`||e.name==`math`)return!0;return!1}var ZP=new rr((e,t)=>{if(e.next==VP&&e.peek(1)==BP){let n=t.dialectEnabled(AP)||XP(t.context);e.acceptToken(n?aP:iP,2)}else e.next==BP&&e.acceptToken(iP,1)});function QP(e,t,n){let r=2+e.length;return new rr(i=>{for(let a=0,o=0,s=0;;s++){if(i.next<0){s&&i.acceptToken(t);break}if(a==0&&i.next==zP||a==1&&i.next==VP||a>=2&&a<r&&i.next==e.charCodeAt(a-2))a++,o++;else if(a==r&&i.next==BP){s>o?i.acceptToken(t,-o):i.acceptToken(n,-(o-2));break}else if((i.next==10||i.next==13)&&s){i.acceptToken(t,1);break}else a=o=0;i.advance()}})}var $P=QP(`script`,QN,$N),eF=QP(`style`,eP,tP),tF=QP(`textarea`,nP,rP),nF=gn({"Text RawText IncompleteTag IncompleteCloseTag":K.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":K.angleBracket,TagName:K.tagName,"MismatchedCloseTag/TagName":[K.tagName,K.invalid],AttributeName:K.attributeName,"AttributeValue UnquotedAttributeValue":K.attributeValue,Is:K.definitionOperator,"EntityReference CharacterReference":K.character,Comment:K.blockComment,ProcessingInst:K.processingInstruction,DoctypeDecl:K.documentMeta}),rF=ir.deserialize({version:14,states:",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO!tOaO'#CqO#PObO'#CqO#[OdO'#CqO$kO!rO'#CqOOO`'#Cq'#CqO$rO$fO'#DUO$zQ#tO'#DWO%PQ#tO'#DXOOO`'#Dl'#DlOOO`'#DZ'#DZQVO!rOOO%UQ&rO,59^O%aQ&rO,59gO%lQ&rO,59jO%wQ&rO,59mO&SQ&rO,59oOOOa'#D_'#D_O&_OaO'#CyO&jOaO,59]OOOb'#D`'#D`O&rObO'#C|O&}ObO,59]OOOd'#Da'#DaO'VOdO'#DPO'bOdO,59]OOO`'#Db'#DbO'jO!rO,59]O'qQ#tO'#DSOO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f!aO~OS!bO~OS!cO~Oj!dOShXThXihX~OS!fOT!gOiyO~OS!hOT!gOiyO~OS!iOT!gOiyO~OS!jOT!gOiyO~OS!gOT!gOiyO~Og!kO~Og!lO~Og!mO~OS!nO~Ol!qO!a!oO!c!pO~OS!rO~OS!sO~OS!tO~Ob!uOc!uOd!uO!a!wO!b!uO~Ob!xOc!xOd!xO!c!wO!d!xO~Ob!uOc!uOd!uO!a!{O!b!uO~Ob!xOc!xOd!xO!c!{O!d!xO~OT~cbd!ey|!e~`,goto:"%q!aPPPPPPPPPPPPPPPPPPPPP!b!hP!nPP!zP!}#Q#T#Z#^#a#g#j#m#s#y!bP!b!bP$P$V$m$s$y%P%V%]%cPPPPPPPP%iX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:`⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl`,maxTerm:68,context:qP,nodeProps:[[`closedBy`,-10,1,2,3,7,8,9,10,11,12,13,`EndTag`,6,`EndTag SelfClosingEndTag`,-4,22,31,34,37,`CloseTag`],[`openedBy`,4,`StartTag StartCloseTag`,5,`StartTag`,-4,30,33,36,38,`OpenTag`],[`group`,-10,14,15,18,19,20,21,40,41,42,43,`Entity`,17,`Entity TextContent`,-3,29,32,35,`T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dpyPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!b`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!b`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!b`yPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!b`!dpyPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!<TXjSaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[$P,eF,tF,ZP,JP,YP,0,1,2,3,4,5],topRules:{Document:[0,16]},dialects:{noMatch:0,selfClosing:515},tokenPrec:517});function iF(e,t){let n=Object.create(null);for(let r of e.getChildren(bP)){let e=r.getChild(xP),i=r.getChild(SP)||r.getChild(CP);e&&(n[t.read(e.from,e.to)]=i?i.type.id==SP?t.read(i.from+1,i.to-1):t.read(i.from,i.to):``)}return n}function aF(e,t){let n=e.getChild(yP);return n?t.read(n.from,n.to):` `}function oF(e,t,n){let r;for(let i of n)if(!i.attrs||i.attrs(r||=iF(e.node.parent.firstChild,t)))return{parser:i.parser,bracketed:!0};return null}function sF(e=[],t=[]){let n=[],r=[],i=[],a=[];for(let t of e)(t.tag==`script`?n:t.tag==`style`?r:t.tag==`textarea`?i:a).push(t);let o=t.length?Object.create(null):null;for(let e of t)(o[e.name]||(o[e.name]=[])).push(e);return _n((e,t)=>{let s=e.type.id;if(s==wP)return oF(e,t,n);if(s==TP)return oF(e,t,r);if(s==EP)return oF(e,t,i);if(s==vP&&a.length){let n=e.node,r=n.firstChild,i=r&&aF(r,t),o;if(i){for(let e of a)if(e.tag==i&&(!e.attrs||e.attrs(o||=iF(r,t)))){let t=n.lastChild,i=t.type.id==OP?t.from:n.to;if(i>r.to)return{parser:e.parser,overlay:[{from:r.to,to:i}]}}}}if(o&&s==bP){let n=e.node,r;if(r=n.firstChild){let e=o[t.read(r.from,r.to)];if(e)for(let r of e){if(r.tagName&&r.tagName!=aF(n.parent,t))continue;let e=n.lastChild;if(e.type.id==SP){let t=e.from+1,n=e.lastChild,i=e.to-(n&&n.isError?0:1);if(i>t)return{parser:r.parser,overlay:[{from:t,to:i}],bracketed:!0}}else if(e.type.id==CP)return{parser:r.parser,overlay:[{from:e.from,to:e.to}]}}}}return null})}var cF=135,lF=1,uF=136,dF=137,fF=2,pF=138,mF=3,hF=4,gF=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],_F=58,vF=40,yF=95,bF=91,xF=45,SF=46,CF=35,wF=37,TF=38,EF=92,DF=10,OF=42;function kF(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function AF(e){return e>=48&&e<=57}function jF(e){return AF(e)||e>=97&&e<=102||e>=65&&e<=70}var MF=(e,t,n)=>(r,i)=>{for(let a=!1,o=0,s=0;;s++){let{next:c}=r;if(kF(c)||c==xF||c==yF||a&&AF(c))!a&&(c!=xF||s>0)&&(a=!0),o===s&&c==xF&&o++,r.advance();else if(c==EF&&r.peek(1)!=DF){if(r.advance(),jF(r.next)){do r.advance();while(jF(r.next));r.next==32&&r.advance()}else r.next>-1&&r.advance();a=!0}else{a&&r.acceptToken(o==2&&i.canShift(fF)?t:c==vF?n:e);break}}},NF=new rr(MF(uF,fF,dF),{contextual:!0}),PF=new rr(MF(pF,mF,hF),{contextual:!0}),FF=new rr(e=>{if(gF.includes(e.peek(-1))){let{next:t}=e;(kF(t)||t==yF||t==CF||t==SF||t==OF||t==bF||t==_F&&kF(e.peek(1))||t==xF||t==TF)&&e.acceptToken(cF)}}),IF=new rr(e=>{if(!gF.includes(e.peek(-1))){let{next:t}=e;if(t==wF&&(e.advance(),e.acceptToken(lF)),kF(t)){do e.advance();while(kF(e.next)||AF(e.next));e.acceptToken(lF)}}}),LF=gn({"AtKeyword import charset namespace keyframes media supports font-feature-values":K.definitionKeyword,"from to selector scope MatchFlag":K.keyword,NamespaceName:K.namespace,KeyframeName:K.labelName,KeyframeRangeName:K.operatorKeyword,TagName:K.tagName,ClassName:K.className,PseudoClassName:K.constant(K.className),IdName:K.labelName,"FeatureName PropertyName":K.propertyName,AttributeName:K.attributeName,NumberLiteral:K.number,KeywordQuery:K.keyword,UnaryQueryOp:K.operatorKeyword,"CallTag ValueName FontName":K.atom,VariableName:K.variableName,Callee:K.operatorKeyword,Unit:K.unit,"UniversalSelector NestingSelector":K.definitionOperator,"MatchOp CompareOp":K.compareOperator,"ChildOp SiblingOp, LogicOp":K.logicOperator,BinOp:K.arithmeticOperator,Important:K.modifier,Comment:K.blockComment,ColorLiteral:K.color,"ParenthesizedContent StringLiteral":K.string,":":K.punctuation,"PseudoOp #":K.derefOperator,"; , |":K.separator,"( )":K.paren,"[ ]":K.squareBracket,"{ }":K.brace}),RF={__proto__:null,lang:44,"nth-child":44,"nth-last-child":44,"nth-of-type":44,"nth-last-of-type":44,dir:44,"host-context":44,if:90,url:132,"url-prefix":132,domain:132,regexp:132},zF={__proto__:null,or:104,and:104,not:112,only:112,layer:186},BF={__proto__:null,selector:118,layer:182},VF={__proto__:null,"@import":178,"@media":190,"@charset":194,"@namespace":198,"@keyframes":204,"@supports":216,"@scope":220,"@font-feature-values":226},HF={__proto__:null,to:223},UF=ir.deserialize({version:14,states:"IpQYQdOOO#}QdOOP$UO`OOO%OQaO'#CfOOQP'#Ce'#CeO%VQdO'#CgO%[Q`O'#CgO%aQaO'#FdO&XQdO'#CkO&xQaO'#CcO'SQdO'#CnO'_QdO'#DtO'dQdO'#DvO'oQdO'#D}O'oQdO'#EQOOQP'#Fd'#FdO)OQhO'#EsOOQS'#Fc'#FcOOQS'#Ev'#Ev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c!WR%S#dQ!ZZR#fzQ!_[R#g{T!^[{Q#r!]R%]#sQ!SXQ!i`Q#SjQ#m!QQ$P!dQ$l!yQ$r#QQ$u#UQ$x#XQ%e$OQ&S$tQ&y&OQ&|&TR'h&xSnP!RQ#]oQ$|#ZR&Z$}ZmPo!R#Z$}Q${#YQ&X$yR'P&WR$e!qQ&n%oR'm'_R!}gR#PhR$q#PS&O$p&PR'f&wV%|$p&P&wR#XkQ#_qR%Q#_QcOSoP!RU!kco$}R$}#ZQ%Z#pY&`%Z&f'U'^'sQ&f%_Q'U&aQ'^&kR's'kQ$Y!mQ$[!nQ$^!oV%j$Y$[$^Q%t$gR&t%tQ&j%gS']&j'lR'l'^Q&b%ZR'V&bQ&^%WR'T&^Q!QXR#l!QQ&W$yR'O&WQ#[nS%O#[%PR%P#]Q'`&nR'n'`Q$k!xR%x$kQ&P$pR&z&PQ&x&OR'g&xQ#WkR$w#WQ$O!dR%d$O_bOPco!R#Z$}^XOPco!R#Z$}Q!`]Q!a^Q#h|Q#i}Q#j!OQ#k!PQ$s#RQ%W#oR'S&]R%[#pQ!qdQ!zf[$V!m!n!o$Y$[$^Q$y#Yd%Y#p%Z%_&a&f&k'U'^'k'sQ%^#uQ%n$aS&U$y&WQ&[%UQ&}&VR'b&p]$X!m!n!o$Y$[$^Q!d`U!xe!q$eQ#QiQ#x!cS#{!d$OQ$Q!eQ%b#|Q%c#}Q%g$RS%r$g%tQ%w$jR'Z&iQ#z!cQ&h%`R'j'YR%i$RR%X#oQpPR#n!RQ!yeQ$d!qR%q$e",nodeNames:`⚠ Unit VariableName VariableName QueryCallee Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NamespacedTagSelector NamespaceName TagName NestingSelector ClassSelector . ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue AtKeyword # ; ] [ BracketedValue } { BracedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee IfExpression if ArgList IfBranch KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp ComparisonQuery CompareOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector ParenthesizedSelector CallQuery ArgList , PseudoQuery CallLiteral CallTag ParenthesizedContent PseudoClassName ArgList IdSelector IdName AttributeSelector AttributeName NamespacedAttribute NamespaceName AttributeName MatchOp MatchFlag ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp Block Declaration PropertyName Important ImportStatement import Layer layer LayerName layer MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports ScopeStatement scope to FontFeatureStatement font-feature-values FontName AtRule Styles`,maxTerm:159,nodeProps:[[`isolate`,-2,5,39,``],[`openedBy`,23,`(`,31,`[`,34,`{`],[`closedBy`,24,`)`,32,`]`,35,`}`]],propSources:[LF],skippedNodes:[0,5,117],repeatNodeCount:17,tokenData:"K`~R!bOX%ZX^&R^p%Zpq&Rqr)ers)vst+jtu2Xuv%Zvw3Rwx3dxy5Ryz5dz{5i{|6S|}:u}!O;W!O!P;u!P!Q<^!Q![=V![!]>Q!]!^>|!^!_?_!_!`@Z!`!a@n!a!b%Z!b!cAo!c!k%Z!k!lC|!l!u%Z!u!vC|!v!}%Z!}#OD_#O#P%Z#P#QDp#Q#R2X#R#]%Z#]#^ER#^#g%Z#g#hC|#h#o%Z#o#pIf#p#qIw#q#rJ`#r#sJq#s#y%Z#y#z&R#z$f%Z$f$g&R$g#BY%Z#BY#BZ&R#BZ$IS%Z$IS$I_&R$I_$I|%Z$I|$JO&R$JO$JT%Z$JT$JU&R$JU$KV%Z$KV$KW&R$KW&FU%Z&FU&FV&R&FV;'S%Z;'S;=`KY<%lO%Z`%^SOy%jz;'S%j;'S;=`%{<%lO%j`%oS!e`Oy%jz;'S%j;'S;=`%{<%lO%j`&OP;=`<%l%j~&Wh$Q~OX%jX^'r^p%jpq'rqy%jz#y%j#y#z'r#z$f%j$f$g'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;'S%j;'S;=`%{<%lO%jfI|U$XUOy%jz!_%j!_!`2n!`;'S%j;'S;=`%{<%lO%jjJeSrYOy%jz;'S%j;'S;=`%{<%lO%jfJvU!uQOy%jz!_%j!_!`2n!`;'S%j;'S;=`%{<%lO%j`K]P;=`<%l%Z",tokenizers:[FF,IF,NF,PF,1,2,3,4,new nr(`m~RRYZ[z{a~~g~aO$T~~dP!P!Qg~lO$U~~`,28,142)],topRules:{StyleSheet:[0,6],Styles:[1,116]},dynamicPrecedences:{84:1},specialized:[{term:137,get:e=>RF[e]||-1},{term:138,get:e=>zF[e]||-1},{term:4,get:e=>BF[e]||-1},{term:28,get:e=>VF[e]||-1},{term:136,get:e=>HF[e]||-1}],tokenPrec:2256}),WF=null;function GF(){if(!WF&&typeof document==`object`&&document.body){let{style:e}=document.body,t=[],n=new Set;for(let r in e)r!=`cssText`&&r!=`cssFloat`&&typeof e[r]==`string`&&(/[A-Z]/.test(r)&&(r=r.replace(/[A-Z]/g,e=>`-`+e.toLowerCase())),n.has(r)||(t.push(r),n.add(r)));WF=t.sort().map(e=>({type:`property`,label:e,apply:e+`: `}))}return WF||[]}var KF=`active.after.any-link.autofill.backdrop.before.checked.cue.default.defined.disabled.empty.enabled.file-selector-button.first.first-child.first-letter.first-line.first-of-type.focus.focus-visible.focus-within.fullscreen.has.host.host-context.hover.in-range.indeterminate.invalid.is.lang.last-child.last-of-type.left.link.marker.modal.not.nth-child.nth-last-child.nth-last-of-type.nth-of-type.only-child.only-of-type.optional.out-of-range.part.placeholder.placeholder-shown.read-only.read-write.required.right.root.scope.selection.slotted.target.target-text.valid.visited.where`.split(`.`).map(e=>({type:`class`,label:e})),qF=`above.absolute.activeborder.additive.activecaption.after-white-space.ahead.alias.all.all-scroll.alphabetic.alternate.always.antialiased.appworkspace.asterisks.attr.auto.auto-flow.avoid.avoid-column.avoid-page.avoid-region.axis-pan.background.backwards.baseline.below.bidi-override.blink.block.block-axis.bold.bolder.border.border-box.both.bottom.break.break-all.break-word.bullets.button.button-bevel.buttonface.buttonhighlight.buttonshadow.buttontext.calc.capitalize.caps-lock-indicator.caption.captiontext.caret.cell.center.checkbox.circle.cjk-decimal.clear.clip.close-quote.col-resize.collapse.color.color-burn.color-dodge.column.column-reverse.compact.condensed.contain.content.contents.content-box.context-menu.continuous.copy.counter.counters.cover.crop.cross.crosshair.currentcolor.cursive.cyclic.darken.dashed.decimal.decimal-leading-zero.default.default-button.dense.destination-atop.destination-in.destination-out.destination-over.difference.disc.discard.disclosure-closed.disclosure-open.document.dot-dash.dot-dot-dash.dotted.double.down.e-resize.ease.ease-in.ease-in-out.ease-out.element.ellipse.ellipsis.embed.end.ethiopic-abegede-gez.ethiopic-halehame-aa-er.ethiopic-halehame-gez.ew-resize.exclusion.expanded.extends.extra-condensed.extra-expanded.fantasy.fast.fill.fill-box.fixed.flat.flex.flex-end.flex-start.footnotes.forwards.from.geometricPrecision.graytext.grid.groove.hand.hard-light.help.hidden.hide.higher.highlight.highlighttext.horizontal.hsl.hsla.hue.icon.ignore.inactiveborder.inactivecaption.inactivecaptiontext.infinite.infobackground.infotext.inherit.initial.inline.inline-axis.inline-block.inline-flex.inline-grid.inline-table.inset.inside.intrinsic.invert.italic.justify.keep-all.landscape.large.larger.left.level.lighter.lighten.line-through.linear.linear-gradient.lines.list-item.listbox.listitem.local.logical.loud.lower.lower-hexadecimal.lower-latin.lower-norwegian.lowercase.ltr.luminosity.manipulation.match.matrix.matrix3d.medium.menu.menutext.message-box.middle.min-intrinsic.mix.monospace.move.multiple.multiple_mask_images.multiply.n-resize.narrower.ne-resize.nesw-resize.no-close-quote.no-drop.no-open-quote.no-repeat.none.normal.not-allowed.nowrap.ns-resize.numbers.numeric.nw-resize.nwse-resize.oblique.opacity.open-quote.optimizeLegibility.optimizeSpeed.outset.outside.outside-shape.overlay.overline.padding.padding-box.painted.page.paused.perspective.pinch-zoom.plus-darker.plus-lighter.pointer.polygon.portrait.pre.pre-line.pre-wrap.preserve-3d.progress.push-button.radial-gradient.radio.read-only.read-write.read-write-plaintext-only.rectangle.region.relative.repeat.repeating-linear-gradient.repeating-radial-gradient.repeat-x.repeat-y.reset.reverse.rgb.rgba.ridge.right.rotate.rotate3d.rotateX.rotateY.rotateZ.round.row.row-resize.row-reverse.rtl.run-in.running.s-resize.sans-serif.saturation.scale.scale3d.scaleX.scaleY.scaleZ.screen.scroll.scrollbar.scroll-position.se-resize.self-start.self-end.semi-condensed.semi-expanded.separate.serif.show.single.skew.skewX.skewY.skip-white-space.slide.slider-horizontal.slider-vertical.sliderthumb-horizontal.sliderthumb-vertical.slow.small.small-caps.small-caption.smaller.soft-light.solid.source-atop.source-in.source-out.source-over.space.space-around.space-between.space-evenly.spell-out.square.start.static.status-bar.stretch.stroke.stroke-box.sub.subpixel-antialiased.svg_masks.super.sw-resize.symbolic.symbols.system-ui.table.table-caption.table-cell.table-column.table-column-group.table-footer-group.table-header-group.table-row.table-row-group.text.text-bottom.text-top.textarea.textfield.thick.thin.threeddarkshadow.threedface.threedhighlight.threedlightshadow.threedshadow.to.top.transform.translate.translate3d.translateX.translateY.translateZ.transparent.ultra-condensed.ultra-expanded.underline.unidirectional-pan.unset.up.upper-latin.uppercase.url.var.vertical.vertical-text.view-box.visible.visibleFill.visiblePainted.visibleStroke.visual.w-resize.wait.wave.wider.window.windowframe.windowtext.words.wrap.wrap-reverse.x-large.x-small.xor.xx-large.xx-small`.split(`.`).map(e=>({type:`keyword`,label:e})).concat(`aliceblue.antiquewhite.aqua.aquamarine.azure.beige.bisque.black.blanchedalmond.blue.blueviolet.brown.burlywood.cadetblue.chartreuse.chocolate.coral.cornflowerblue.cornsilk.crimson.cyan.darkblue.darkcyan.darkgoldenrod.darkgray.darkgreen.darkkhaki.darkmagenta.darkolivegreen.darkorange.darkorchid.darkred.darksalmon.darkseagreen.darkslateblue.darkslategray.darkturquoise.darkviolet.deeppink.deepskyblue.dimgray.dodgerblue.firebrick.floralwhite.forestgreen.fuchsia.gainsboro.ghostwhite.gold.goldenrod.gray.grey.green.greenyellow.honeydew.hotpink.indianred.indigo.ivory.khaki.lavender.lavenderblush.lawngreen.lemonchiffon.lightblue.lightcoral.lightcyan.lightgoldenrodyellow.lightgray.lightgreen.lightpink.lightsalmon.lightseagreen.lightskyblue.lightslategray.lightsteelblue.lightyellow.lime.limegreen.linen.magenta.maroon.mediumaquamarine.mediumblue.mediumorchid.mediumpurple.mediumseagreen.mediumslateblue.mediumspringgreen.mediumturquoise.mediumvioletred.midnightblue.mintcream.mistyrose.moccasin.navajowhite.navy.oldlace.olive.olivedrab.orange.orangered.orchid.palegoldenrod.palegreen.paleturquoise.palevioletred.papayawhip.peachpuff.peru.pink.plum.powderblue.purple.rebeccapurple.red.rosybrown.royalblue.saddlebrown.salmon.sandybrown.seagreen.seashell.sienna.silver.skyblue.slateblue.slategray.snow.springgreen.steelblue.tan.teal.thistle.tomato.turquoise.violet.wheat.white.whitesmoke.yellow.yellowgreen`.split(`.`).map(e=>({type:`constant`,label:e}))),JF=`a.abbr.address.article.aside.b.bdi.bdo.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.dd.del.details.dfn.dialog.div.dl.dt.em.figcaption.figure.footer.form.header.hgroup.h1.h2.h3.h4.h5.h6.hr.html.i.iframe.img.input.ins.kbd.label.legend.li.main.meter.nav.ol.output.p.pre.ruby.section.select.small.source.span.strong.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.tr.u.ul`.split(`.`).map(e=>({type:`type`,label:e})),YF=[`@charset`,`@color-profile`,`@container`,`@counter-style`,`@font-face`,`@font-feature-values`,`@font-palette-values`,`@import`,`@keyframes`,`@layer`,`@media`,`@namespace`,`@page`,`@position-try`,`@property`,`@scope`,`@starting-style`,`@supports`,`@view-transition`].map(e=>({type:`keyword`,label:e})),XF=/^(\w[\w-]*|-\w[\w-]*|)$/,ZF=/^-(-[\w-]*)?$/;function QF(e,t){if((e.name==`(`||e.type.isError)&&(e=e.parent||e),e.name!=`ArgList`)return!1;let n=e.parent?.firstChild;return n?.name==`Callee`?t.sliceString(n.from,n.to)==`var`:!1}var $F=new wn,eI=[`Declaration`];function tI(e){for(let t=e;;){if(t.type.isTop)return t;if(!(t=t.parent))return e}}function nI(e,t,n){if(t.to-t.from>4096){let r=$F.get(t);if(r)return r;let i=[],a=new Set,o=t.cursor(Zn.IncludeAnonymous);if(o.firstChild())do for(let t of nI(e,o.node,n))a.has(t.label)||(a.add(t.label),i.push(t));while(o.nextSibling());return $F.set(t,i),i}else{let r=[],i=new Set;return t.cursor().iterate(t=>{if(n(t)&&t.matchContext(eI)&&t.node.nextSibling?.name==`:`){let n=e.sliceString(t.from,t.to);i.has(n)||(i.add(n),r.push({label:n,type:`variable`}))}}),r}}var rI=(e=>t=>{let{state:n,pos:r}=t,i=yn(n).resolveInner(r,-1),a=i.type.isError&&i.from==i.to-1&&n.doc.sliceString(i.from,i.to)==`-`;if(i.name==`PropertyName`||(a||i.name==`TagName`)&&/^(Block|Styles)$/.test(i.resolve(i.to).name))return{from:i.from,options:GF(),validFor:XF};if(i.name==`ValueName`)return{from:i.from,options:qF,validFor:XF};if(i.name==`PseudoClassName`)return{from:i.from,options:KF,validFor:XF};if(e(i)||(t.explicit||a)&&QF(i,n.doc))return{from:e(i)||a?i.from:r,options:nI(n.doc,tI(i),e),validFor:ZF};if(i.name==`TagName`){for(let{parent:e}=i;e;e=e.parent)if(e.name==`Block`)return{from:i.from,options:GF(),validFor:XF};return{from:i.from,options:JF,validFor:XF}}if(i.name==`AtKeyword`)return{from:i.from,options:YF,validFor:XF};if(!t.explicit)return null;let o=i.resolve(r),s=o.childBefore(r);return s&&s.name==`:`&&o.name==`PseudoClassSelector`?{from:r,options:KF,validFor:XF}:s&&s.name==`:`&&o.name==`Declaration`||o.name==`ArgList`?{from:r,options:qF,validFor:XF}:o.name==`Block`||o.name==`Styles`?{from:r,options:GF(),validFor:XF}:null})(e=>e.name==`VariableName`),iI=Wn.define({name:`css`,parser:UF.configure({props:[Jn.add({Declaration:qn()}),Xn.add({"Block KeyframeList":kn})]}),languageData:{commentTokens:{block:{open:`/*`,close:`*/`}},indentOnInput:/^\s*\}$/,wordChars:`-`}});function aI(){return new Vn(iI,iI.data.of({autocomplete:rI}))}var oI=316,sI=317,cI=1,lI=2,uI=3,dI=4,fI=318,pI=320,mI=321,hI=5,gI=6,_I=0,vI=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],yI=125,bI=59,xI=47,SI=42,CI=43,wI=45,TI=60,EI=44,DI=63,OI=46,kI=91,AI=new ar({start:!1,shift(e,t){return t==hI||t==gI||t==pI?e:t==mI},strict:!1}),jI=new rr((e,t)=>{let{next:n}=e;(n==yI||n==-1||t.context)&&e.acceptToken(fI)},{contextual:!0,fallback:!0}),MI=new rr((e,t)=>{let{next:n}=e,r;vI.indexOf(n)>-1||n==xI&&((r=e.peek(1))==xI||r==SI)||n!=yI&&n!=bI&&n!=-1&&!t.context&&e.acceptToken(oI)},{contextual:!0}),NI=new rr((e,t)=>{e.next==kI&&!t.context&&e.acceptToken(sI)},{contextual:!0}),PI=new rr((e,t)=>{let{next:n}=e;if(n==CI||n==wI){if(e.advance(),n==e.next){e.advance();let n=!t.context&&t.canShift(cI);e.acceptToken(n?cI:lI)}}else n==DI&&e.peek(1)==OI&&(e.advance(),e.advance(),(e.next<48||e.next>57)&&e.acceptToken(uI))},{contextual:!0});function FI(e,t){return e>=65&&e<=90||e>=97&&e<=122||e==95||e>=192||!t&&e>=48&&e<=57}var II=new rr((e,t)=>{if(e.next!=TI||!t.dialectEnabled(_I)||(e.advance(),e.next==xI))return;let n=0;for(;vI.indexOf(e.next)>-1;)e.advance(),n++;if(FI(e.next,!0)){for(e.advance(),n++;FI(e.next,!1);)e.advance(),n++;for(;vI.indexOf(e.next)>-1;)e.advance(),n++;if(e.next==EI)return;for(let t=0;;t++){if(t==7){if(!FI(e.next,!0))return;break}if(e.next!=`extends`.charCodeAt(t))break;e.advance(),n++}}e.acceptToken(dI,-n)}),LI=gn({"get set async static":K.modifier,"for while do if else switch try catch finally return throw break continue default case defer":K.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":K.operatorKeyword,"let var const using function class extends":K.definitionKeyword,"import export from":K.moduleKeyword,"with debugger new":K.keyword,TemplateString:K.special(K.string),super:K.atom,BooleanLiteral:K.bool,this:K.self,null:K.null,Star:K.modifier,VariableName:K.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":K.function(K.variableName),VariableDefinition:K.definition(K.variableName),Label:K.labelName,PropertyName:K.propertyName,PrivatePropertyName:K.special(K.propertyName),"CallExpression/MemberExpression/PropertyName":K.function(K.propertyName),"FunctionDeclaration/VariableDefinition":K.function(K.definition(K.variableName)),"ClassDeclaration/VariableDefinition":K.definition(K.className),"NewExpression/VariableName":K.className,PropertyDefinition:K.definition(K.propertyName),PrivatePropertyDefinition:K.definition(K.special(K.propertyName)),UpdateOp:K.updateOperator,"LineComment Hashbang":K.lineComment,BlockComment:K.blockComment,Number:K.number,String:K.string,Escape:K.escape,ArithOp:K.arithmeticOperator,LogicOp:K.logicOperator,BitOp:K.bitwiseOperator,CompareOp:K.compareOperator,RegExp:K.regexp,Equals:K.definitionOperator,Arrow:K.function(K.punctuation),": Spread":K.punctuation,"( )":K.paren,"[ ]":K.squareBracket,"{ }":K.brace,"InterpolationStart InterpolationEnd":K.special(K.brace),".":K.derefOperator,", ;":K.separator,"@":K.meta,TypeName:K.typeName,TypeDefinition:K.definition(K.typeName),"type enum interface implements namespace module declare":K.definitionKeyword,"abstract global Privacy readonly override":K.modifier,"is keyof unique infer asserts":K.operatorKeyword,JSXAttributeValue:K.attributeValue,JSXText:K.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":K.angleBracket,"JSXIdentifier JSXNameSpacedName":K.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":K.attributeName,"JSXBuiltin/JSXIdentifier":K.standard(K.tagName)}),RI={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:235,private:235,protected:235,readonly:237,instanceof:256,satisfies:259,import:292,keyof:349,unique:353,infer:359,asserts:395,is:397,abstract:417,implements:419,type:421,let:424,var:426,using:429,interface:435,enum:439,namespace:445,module:447,declare:451,global:455,defer:471,for:476,of:485,while:488,with:492,do:496,if:500,else:502,switch:506,case:512,try:518,catch:522,finally:526,return:530,throw:534,break:538,continue:542,debugger:546},zI={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:401},BI={__proto__:null,"<":193},VI=ir.deserialize({version:14,states:"$F|Q%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#DaO.QQlO'#DgO.bQlO'#DrO%[QlO'#DzO0fQlO'#ESOOQ!0Lf'#E['#E[O1PQ`O'#EXOOQO'#Ep'#EpOOQO'#Il'#IlO1XQ`O'#GsO1dQ`O'#EoO1iQ`O'#EoO3hQ!0MxO'#JrO6[Q!0MxO'#JsO6uQ`O'#F]O6zQ,UO'#FtOOQ!0Lf'#Ff'#FfO7VO7dO'#FfO9XQMhO'#F|O9`Q`O'#F{OOQ!0Lf'#Js'#JsOOQ!0Lb'#Jr'#JrO9eQ`O'#GwOOQ['#K_'#K_O9pQ`O'#IYO9uQ!0LrO'#IZOOQ['#J`'#J`OOQ['#I_'#I_Q`QlOOQ`QlOOO9}Q!L^O'#DvO:UQlO'#EOO:]QlO'#EQO9kQ`O'#GsO:dQMhO'#CoO:rQ`O'#EnO:}Q`O'#EyO;hQMhO'#FeO;xQ`O'#GsOOQO'#K`'#K`O;}Q`O'#K`O<]Q`O'#G{O<]Q`O'#G|O<]Q`O'#HOO9kQ`O'#HRO=SQ`O'#HUO>kQ`O'#CeO>{Q`O'#HcO?TQ`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m'X+[V#aW%h*YU#`W%h*YS(U#W(^U(Z#Z+Z/mS-['X+[T.O(T.TV'^!e%i*ZQ$lfR)x$qT)m$l)nR4V/UT*_$x*bT*h${*YQ0w+fQ1g,VQ3_.fQ5t1iQ6P1qQ7X3cQ8r6SQ9c7WQ:^8qQ:p9bQ;Z:`Q;c:rQ;n;[R;q;dnqOXst!Z#d%m&r&t&u&w,s,x2[2_Q&l!VR,h&itmOXst!U!V!Z#d%m&i&r&t&u&w,s,x2[2_R,o&oT%lm,oR1k,XR,g&gQ&U|S+}&V&WR1^,OR+s&PT&p!W&sT&q!W&sT2^,x2_",nodeNames:`⚠ ArithOp ArithOp ?. JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration defer ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem`,maxTerm:380,context:AI,nodeProps:[[`isolate`,-8,5,6,14,37,39,51,53,55,``],[`group`,-26,9,17,19,68,207,211,215,216,218,221,224,234,237,243,245,247,249,252,258,264,266,268,270,272,274,275,`Statement`,-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,120,121,136,139,141,142,143,144,145,147,148,167,169,171,`Expression`,-23,31,33,37,41,43,45,173,175,177,178,180,181,182,184,185,186,188,189,190,201,203,205,206,`Type`,-3,88,103,109,`ClassItem`],[`openedBy`,23,`<`,38,`InterpolationStart`,56,`[`,60,`{`,73,`(`,160,`JSXStartCloseTag`],[`closedBy`,-2,24,168,`>`,40,`InterpolationEnd`,50,`]`,61,`}`,74,`)`,165,`JSXEndTag`]],propSources:[LI],skippedNodes:[0,5,6,278],repeatNodeCount:37,t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],topRules:{Script:[0,7],SingleExpression:[1,276],SingleClassItem:[2,277]},dialects:{jsx:0,ts:15175},dynamicPrecedences:{80:1,82:1,94:1,169:1,199:1},specialized:[{term:327,get:e=>RI[e]||-1},{term:343,get:e=>zI[e]||-1},{term:95,get:e=>BI[e]||-1}],tokenPrec:15201}),HI=[$n("function ${name}(${params}) {\n ${}\n}",{label:`function`,detail:`definition`,type:`keyword`}),$n("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:`for`,detail:`loop`,type:`keyword`}),$n("for (let ${name} of ${collection}) {\n ${}\n}",{label:`for`,detail:`of loop`,type:`keyword`}),$n(`do {
|
|
16
|
-
\${}
|
|
17
|
-
} while (\${})`,{label:`do`,detail:`loop`,type:`keyword`}),$n(`while (\${}) {
|
|
18
|
-
\${}
|
|
19
|
-
}`,{label:`while`,detail:`loop`,type:`keyword`}),$n(`try {
|
|
20
|
-
\${}
|
|
21
|
-
} catch (\${error}) {
|
|
22
|
-
\${}
|
|
23
|
-
}`,{label:`try`,detail:`/ catch block`,type:`keyword`}),$n(`if (\${}) {
|
|
24
|
-
\${}
|
|
25
|
-
}`,{label:`if`,detail:`block`,type:`keyword`}),$n(`if (\${}) {
|
|
26
|
-
\${}
|
|
27
|
-
} else {
|
|
28
|
-
\${}
|
|
29
|
-
}`,{label:`if`,detail:`/ else block`,type:`keyword`}),$n(`class \${name} {
|
|
30
|
-
constructor(\${params}) {
|
|
31
|
-
\${}
|
|
32
|
-
}
|
|
33
|
-
}`,{label:`class`,detail:`definition`,type:`keyword`}),$n('import {${names}} from "${module}"\n${}',{label:`import`,detail:`named`,type:`keyword`}),$n('import ${name} from "${module}"\n${}',{label:`import`,detail:`default`,type:`keyword`})],UI=HI.concat([$n(`interface \${name} {
|
|
34
|
-
\${}
|
|
35
|
-
}`,{label:`interface`,detail:`definition`,type:`keyword`}),$n("type ${name} = ${type}",{label:`type`,detail:`definition`,type:`keyword`}),$n(`enum \${name} {
|
|
36
|
-
\${}
|
|
37
|
-
}`,{label:`enum`,detail:`definition`,type:`keyword`})]),WI=new wn,GI=new Set([`Script`,`Block`,`FunctionExpression`,`FunctionDeclaration`,`ArrowFunction`,`MethodDeclaration`,`ForStatement`]);function KI(e){return(t,n)=>{let r=t.node.getChild(`VariableDefinition`);return r&&n(r,e),!0}}var qI=[`FunctionDeclaration`],JI={FunctionDeclaration:KI(`function`),ClassDeclaration:KI(`class`),ClassExpression:()=>!0,EnumDeclaration:KI(`constant`),TypeAliasDeclaration:KI(`type`),NamespaceDeclaration:KI(`namespace`),VariableDefinition(e,t){e.matchContext(qI)||t(e,`variable`)},TypeDefinition(e,t){t(e,`type`)},__proto__:null};function YI(e,t){let n=WI.get(t);if(n)return n;let r=[],i=!0;function a(t,n){let i=e.sliceString(t.from,t.to);r.push({label:i,type:n})}return t.cursor(Zn.IncludeAnonymous).iterate(t=>{if(i)i=!1;else if(t.name){let e=JI[t.name];if(e&&e(t,a)||GI.has(t.name))return!1}else if(t.to-t.from>8192){for(let n of YI(e,t.node))r.push(n);return!1}}),WI.set(t,r),r}var XI=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,ZI=[`TemplateString`,`String`,`RegExp`,`LineComment`,`BlockComment`,`VariableDefinition`,`TypeDefinition`,`Label`,`PropertyDefinition`,`PropertyName`,`PrivatePropertyDefinition`,`PrivatePropertyName`,`JSXText`,`JSXAttributeValue`,`JSXOpenTag`,`JSXCloseTag`,`JSXSelfClosingTag`,`.`,`?.`];function QI(e){let t=yn(e.state).resolveInner(e.pos,-1);if(ZI.indexOf(t.name)>-1)return null;let n=t.name==`VariableName`||t.to-t.from<20&&XI.test(e.state.sliceDoc(t.from,t.to));if(!n&&!e.explicit)return null;let r=[];for(let n=t;n;n=n.parent)GI.has(n.name)&&(r=r.concat(YI(e.state.doc,n)));return{options:r,from:n?t.from:e.pos,validFor:XI}}var $I=Wn.define({name:`javascript`,parser:VI.configure({props:[Jn.add({IfStatement:qn({except:/^\s*({|else\b)/}),TryStatement:qn({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:Nn,SwitchBody:e=>{let t=e.textAfter,n=/^\s*\}/.test(t),r=/^\s*(case|default)\b/.test(t);return e.baseIndent+(n?0:r?1:2)*e.unit},Block:Hn({closing:`}`}),ArrowFunction:e=>e.baseIndent+e.unit,"TemplateString BlockComment":()=>null,"Statement Property":qn({except:/^\s*{/}),JSXElement(e){let t=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},JSXEscape(e){let t=/\s*\}/.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},"JSXOpenTag JSXSelfClosingTag"(e){return e.column(e.node.from)+e.unit}}),Xn.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":kn,BlockComment(e){return{from:e.from+2,to:e.to-2}},JSXElement(e){let t=e.firstChild;if(!t||t.name==`JSXSelfClosingTag`)return null;let n=e.lastChild;return{from:t.to,to:n.type.isError?e.to:n.from}},"JSXSelfClosingTag JSXOpenTag"(e){let t=e.firstChild?.nextSibling,n=e.lastChild;return!t||t.type.isError?null:{from:t.to,to:n.type.isError?e.to:n.from}}})]}),languageData:{closeBrackets:{brackets:[`(`,`[`,`{`,`'`,`"`,"`"]},commentTokens:{line:`//`,block:{open:`/*`,close:`*/`}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:`$`}}),eL={test:e=>/^JSX/.test(e.name),facet:Mn({commentTokens:{block:{open:`{/*`,close:`*/}`}}})},tL=$I.configure({dialect:`ts`},`typescript`),nL=$I.configure({dialect:`jsx`,props:[Fn.add(e=>e.isTop?[eL]:void 0)]}),rL=$I.configure({dialect:`jsx ts`,props:[Fn.add(e=>e.isTop?[eL]:void 0)]},`typescript`),iL=e=>({label:e,type:`keyword`}),aL=`break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield`.split(` `).map(iL),oL=aL.concat([`declare`,`implements`,`private`,`protected`,`public`].map(iL));function sL(e={}){let t=e.jsx?e.typescript?rL:nL:e.typescript?tL:$I,n=e.typescript?UI.concat(oL):HI.concat(aL);return new Vn(t,[$I.data.of({autocomplete:er(ZI,Qn(n))}),$I.data.of({autocomplete:QI}),e.jsx?dL:[]])}function cL(e){for(;;){if(e.name==`JSXOpenTag`||e.name==`JSXSelfClosingTag`||e.name==`JSXFragmentTag`)return e;if(e.name==`JSXEscape`||!e.parent)return null;e=e.parent}}function lL(e,t,n=e.length){for(let r=t?.firstChild;r;r=r.nextSibling)if(r.name==`JSXIdentifier`||r.name==`JSXBuiltin`||r.name==`JSXNamespacedName`||r.name==`JSXMemberExpression`)return e.sliceString(r.from,Math.min(r.to,n));return``}var uL=typeof navigator==`object`&&/Android\b/.test(navigator.userAgent),dL=Dn.inputHandler.of((e,t,n,r,i)=>{if((uL?e.composing:e.compositionStarted)||e.state.readOnly||t!=n||r!=`>`&&r!=`/`||!$I.isActiveAt(e.state,t,-1))return!1;let a=i(),{state:o}=a,s=o.changeByRange(e=>{let{head:t}=e,n=yn(o).resolveInner(t-1,-1),i;if(n.name==`JSXStartTag`&&(n=n.parent),!(o.doc.sliceString(t-1,t)!=r||n.name==`JSXAttributeValue`&&n.to>t)){if(r==`>`&&n.name==`JSXFragmentTag`)return{range:e,changes:{from:t,insert:`</>`}};if(r==`/`&&n.name==`JSXStartCloseTag`){let e=n.parent,r=e.parent;if(r&&e.from==t-2&&((i=lL(o.doc,r.firstChild,t))||r.firstChild?.name==`JSXFragmentTag`)){let e=`${i}>`;return{range:Cn.cursor(t+e.length,-1),changes:{from:t,insert:e}}}}else if(r==`>`){let r=cL(n);if(r&&r.name==`JSXOpenTag`&&!/^\/?>|^<\//.test(o.doc.sliceString(t,t+2))&&(i=lL(o.doc,r,t)))return{range:e,changes:{from:t,insert:`</${i}>`}}}}return{range:e}});return s.changes.empty?!1:(e.dispatch([a,o.update(s,{userEvent:`input.complete`,scrollIntoView:!0})]),!0)}),fL=[`_blank`,`_self`,`_top`,`_parent`],pL=[`ascii`,`utf-8`,`utf-16`,`latin1`,`latin1`],mL=[`get`,`post`,`put`,`delete`],hL=[`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`],gL=[`true`,`false`],$={},_L={a:{attrs:{href:null,ping:null,type:null,media:null,target:fL,hreflang:null}},abbr:$,address:$,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:[`default`,`rect`,`circle`,`poly`]}},article:$,aside:$,audio:{attrs:{src:null,mediagroup:null,crossorigin:[`anonymous`,`use-credentials`],preload:[`none`,`metadata`,`auto`],autoplay:[`autoplay`],loop:[`loop`],controls:[`controls`]}},b:$,base:{attrs:{href:null,target:fL}},bdi:$,bdo:$,blockquote:{attrs:{cite:null}},body:$,br:$,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:[`autofocus`],disabled:[`autofocus`],formenctype:hL,formmethod:mL,formnovalidate:[`novalidate`],formtarget:fL,type:[`submit`,`reset`,`button`]}},canvas:{attrs:{width:null,height:null}},caption:$,center:$,cite:$,code:$,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:[`command`,`checkbox`,`radio`],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:[`disabled`],checked:[`checked`]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:[`disabled`],multiple:[`multiple`]}},datalist:{attrs:{data:null}},dd:$,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:[`open`]}},dfn:$,div:$,dl:$,dt:$,em:$,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:[`disabled`],form:null,name:null}},figcaption:$,figure:$,footer:$,form:{attrs:{action:null,name:null,"accept-charset":pL,autocomplete:[`on`,`off`],enctype:hL,method:mL,novalidate:[`novalidate`],target:fL}},h1:$,h2:$,h3:$,h4:$,h5:$,h6:$,head:{children:[`title`,`base`,`link`,`style`,`meta`,`script`,`noscript`,`command`]},header:$,hgroup:$,hr:$,html:{attrs:{manifest:null}},i:$,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:[`allow-top-navigation`,`allow-same-origin`,`allow-forms`,`allow-scripts`],seamless:[`seamless`]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:[`anonymous`,`use-credentials`]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:[`audio/*`,`video/*`,`image/*`],autocomplete:[`on`,`off`],autofocus:[`autofocus`],checked:[`checked`],disabled:[`disabled`],formenctype:hL,formmethod:mL,formnovalidate:[`novalidate`],formtarget:fL,multiple:[`multiple`],readonly:[`readonly`],required:[`required`],type:[`hidden`,`text`,`search`,`tel`,`url`,`email`,`password`,`datetime`,`date`,`month`,`week`,`time`,`datetime-local`,`number`,`range`,`color`,`checkbox`,`radio`,`file`,`submit`,`image`,`reset`,`button`]}},ins:{attrs:{cite:null,datetime:null}},kbd:$,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:[`autofocus`],disabled:[`disabled`],keytype:[`RSA`]}},label:{attrs:{for:null,form:null}},legend:$,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:[`all`,`16x16`,`16x16 32x32`,`16x16 32x32 64x64`]}},map:{attrs:{name:null}},mark:$,menu:{attrs:{label:null,type:[`list`,`context`,`toolbar`]}},meta:{attrs:{content:null,charset:pL,name:[`viewport`,`application-name`,`author`,`description`,`generator`,`keywords`],"http-equiv":[`content-language`,`content-type`,`default-style`,`refresh`]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:$,noscript:$,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:[`typemustmatch`]}},ol:{attrs:{reversed:[`reversed`],start:null,type:[`1`,`a`,`A`,`i`,`I`]},children:[`li`,`script`,`template`,`ul`,`ol`]},optgroup:{attrs:{disabled:[`disabled`],label:null}},option:{attrs:{disabled:[`disabled`],label:null,selected:[`selected`],value:null}},output:{attrs:{for:null,form:null,name:null}},p:$,param:{attrs:{name:null,value:null}},pre:$,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:$,rt:$,ruby:$,samp:$,script:{attrs:{type:[`text/javascript`],src:null,async:[`async`],defer:[`defer`],charset:pL}},section:$,select:{attrs:{form:null,name:null,size:null,autofocus:[`autofocus`],disabled:[`disabled`],multiple:[`multiple`]}},slot:{attrs:{name:null}},small:$,source:{attrs:{src:null,type:null,media:null}},span:$,strong:$,style:{attrs:{type:[`text/css`],media:null,scoped:null}},sub:$,summary:$,sup:$,table:$,tbody:$,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:$,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:[`autofocus`],disabled:[`disabled`],readonly:[`readonly`],required:[`required`],wrap:[`soft`,`hard`]}},tfoot:$,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:[`row`,`col`,`rowgroup`,`colgroup`]}},thead:$,time:{attrs:{datetime:null}},title:$,tr:$,track:{attrs:{src:null,label:null,default:null,kind:[`subtitles`,`captions`,`descriptions`,`chapters`,`metadata`],srclang:null}},ul:{children:[`li`,`script`,`template`,`ul`,`ol`]},var:$,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:[`anonymous`,`use-credentials`],preload:[`auto`,`metadata`,`none`],autoplay:[`autoplay`],mediagroup:[`movie`],muted:[`muted`],controls:[`controls`]}},wbr:$},vL={accesskey:null,class:null,contenteditable:gL,contextmenu:null,dir:[`ltr`,`rtl`,`auto`],draggable:[`true`,`false`,`auto`],dropzone:[`copy`,`move`,`link`,`string:`,`file:`],hidden:[`hidden`],id:null,inert:[`inert`],itemid:null,itemprop:null,itemref:null,itemscope:[`itemscope`],itemtype:null,lang:[`ar`,`bn`,`de`,`en-GB`,`en-US`,`es`,`fr`,`hi`,`id`,`ja`,`pa`,`pt`,`ru`,`tr`,`zh`],spellcheck:gL,autocorrect:gL,autocapitalize:gL,style:null,tabindex:null,title:null,translate:[`yes`,`no`],rel:[`stylesheet`,`alternate`,`author`,`bookmark`,`help`,`license`,`next`,`nofollow`,`noreferrer`,`prefetch`,`prev`,`search`,`tag`],role:`alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer`.split(` `),"aria-activedescendant":null,"aria-atomic":gL,"aria-autocomplete":[`inline`,`list`,`both`,`none`],"aria-busy":gL,"aria-checked":[`true`,`false`,`mixed`,`undefined`],"aria-controls":null,"aria-describedby":null,"aria-disabled":gL,"aria-dropeffect":null,"aria-expanded":[`true`,`false`,`undefined`],"aria-flowto":null,"aria-grabbed":[`true`,`false`,`undefined`],"aria-haspopup":gL,"aria-hidden":gL,"aria-invalid":[`true`,`false`,`grammar`,`spelling`],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":[`off`,`polite`,`assertive`],"aria-multiline":gL,"aria-multiselectable":gL,"aria-owns":null,"aria-posinset":null,"aria-pressed":[`true`,`false`,`mixed`,`undefined`],"aria-readonly":gL,"aria-relevant":null,"aria-required":gL,"aria-selected":[`true`,`false`,`undefined`],"aria-setsize":null,"aria-sort":[`ascending`,`descending`,`none`,`other`],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},yL=`beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload`.split(` `).map(e=>`on`+e);for(let e of yL)vL[e]=null;var bL=class{constructor(e,t){this.tags={..._L,...e},this.globalAttrs={...vL,...t},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}};bL.default=new bL;function xL(e,t,n=e.length){if(!t)return``;let r=t.firstChild,i=r&&r.getChild(`TagName`);return i?e.sliceString(i.from,Math.min(i.to,n)):``}function SL(e,t=!1){for(;e;e=e.parent)if(e.name==`Element`)if(t)t=!1;else return e;return null}function CL(e,t,n){return n.tags[xL(e,SL(t))]?.children||n.allTags}function wL(e,t){let n=[];for(let r=SL(t);r&&!r.type.isTop;r=SL(r.parent)){let i=xL(e,r);if(i&&r.lastChild.name==`CloseTag`)break;i&&n.indexOf(i)<0&&(t.name==`EndTag`||t.from>=r.firstChild.to)&&n.push(i)}return n}var TL=/^[:\-\.\w\u00b7-\uffff]*$/;function EL(e,t,n,r,i){let a=/\s*>/.test(e.sliceDoc(i,i+5))?``:`>`,o=SL(n,n.name==`StartTag`||n.name==`TagName`);return{from:r,to:i,options:CL(e.doc,o,t).map(e=>({label:e,type:`type`})).concat(wL(e.doc,n).map((e,t)=>({label:`/`+e,apply:`/`+e+a,type:`type`,boost:99-t}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function DL(e,t,n,r){let i=/\s*>/.test(e.sliceDoc(r,r+5))?``:`>`;return{from:n,to:r,options:wL(e.doc,t).map((e,t)=>({label:e,apply:e+i,type:`type`,boost:99-t})),validFor:TL}}function OL(e,t,n,r){let i=[],a=0;for(let r of CL(e.doc,n,t))i.push({label:`<`+r,type:`type`});for(let t of wL(e.doc,n))i.push({label:`</`+t+`>`,type:`type`,boost:99-a++});return{from:r,to:r,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function kL(e,t,n,r,i){let a=SL(n),o=a?t.tags[xL(e.doc,a)]:null,s=o&&o.attrs?Object.keys(o.attrs):[];return{from:r,to:i,options:(o&&o.globalAttrs===!1?s:s.length?s.concat(t.globalAttrNames):t.globalAttrNames).map(e=>({label:e,type:`property`})),validFor:TL}}function AL(e,t,n,r,i){let a=n.parent?.getChild(`AttributeName`),o=[],s;if(a){let c=e.sliceDoc(a.from,a.to),l=t.globalAttrs[c];if(!l){let r=SL(n),i=r?t.tags[xL(e.doc,r)]:null;l=i?.attrs&&i.attrs[c]}if(l){let t=e.sliceDoc(r,i).toLowerCase(),n=`"`,a=`"`;/^['"]/.test(t)?(s=t[0]==`"`?/^[^"]*$/:/^[^']*$/,n=``,a=e.sliceDoc(i,i+1)==t[0]?``:t[0],t=t.slice(1),r++):s=/^[^\s<>='"]*$/;for(let e of l)o.push({label:e,apply:n+e+a,type:`constant`})}}return{from:r,to:i,options:o,validFor:s}}function jL(e,t){let{state:n,pos:r}=t,i=yn(n).resolveInner(r,-1),a=i.resolve(r);for(let e=r,t;a==i&&(t=i.childBefore(e));){let n=t.lastChild;if(!n||!n.type.isError||n.from<n.to)break;a=i=t,e=n.from}return i.name==`TagName`?i.parent&&/CloseTag$/.test(i.parent.name)?DL(n,i,i.from,r):EL(n,e,i,i.from,r):i.name==`StartTag`||i.name==`IncompleteTag`?EL(n,e,i,r,r):i.name==`StartCloseTag`||i.name==`IncompleteCloseTag`?DL(n,i,r,r):i.name==`OpenTag`||i.name==`SelfClosingTag`||i.name==`AttributeName`?kL(n,e,i,i.name==`AttributeName`?i.from:r,r):i.name==`Is`||i.name==`AttributeValue`||i.name==`UnquotedAttributeValue`?AL(n,e,i,i.name==`Is`?r:i.from,r):t.explicit&&(a.name==`Element`||a.name==`Text`||a.name==`Document`)?OL(n,e,i,r):null}function ML(e){return jL(bL.default,e)}function NL(e){let{extraTags:t,extraGlobalAttributes:n}=e,r=n||t?new bL(t,n):bL.default;return e=>jL(r,e)}var PL=$I.parser.configure({top:`SingleExpression`}),FL=[{tag:`script`,attrs:e=>e.type==`text/typescript`||e.lang==`ts`,parser:tL.parser},{tag:`script`,attrs:e=>e.type==`text/babel`||e.type==`text/jsx`,parser:nL.parser},{tag:`script`,attrs:e=>e.type==`text/typescript-jsx`,parser:rL.parser},{tag:`script`,attrs(e){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(e.type)},parser:PL},{tag:`script`,attrs(e){return!e.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(e.type)},parser:$I.parser},{tag:`style`,attrs(e){return(!e.lang||e.lang==`css`)&&(!e.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(e.type))},parser:iI.parser}],IL=[{name:`style`,parser:iI.parser.configure({top:`Styles`})}].concat(yL.map(e=>({name:e,parser:$I.parser}))),LL=Wn.define({name:`html`,parser:rF.configure({props:[Jn.add({Element(e){let t=/^(\s*)(<\/)?/.exec(e.textAfter);return e.node.to<=e.pos+t[0].length?e.continue():e.lineIndent(e.node.from)+(t[2]?0:e.unit)},"OpenTag CloseTag SelfClosingTag"(e){return e.column(e.node.from)+e.unit},Document(e){if(e.pos+/\s*/.exec(e.textAfter)[0].length<e.node.to)return e.continue();let t=null,n;for(let n=e.node;;){let e=n.lastChild;if(!e||e.name!=`Element`||e.to!=n.to)break;t=n=e}return t&&!((n=t.lastChild)&&(n.name==`CloseTag`||n.name==`SelfClosingTag`))?e.lineIndent(t.from)+e.unit:null}}),Xn.add({Element(e){let t=e.firstChild,n=e.lastChild;return!t||t.name!=`OpenTag`?null:{from:t.to,to:n.name==`CloseTag`?n.from:e.to}}}),zn.add({"OpenTag CloseTag":e=>e.getChild(`TagName`)})]}),languageData:{commentTokens:{block:{open:`<!--`,close:`-->`}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:`-_`}}),RL=LL.configure({wrap:sF(FL,IL)});function zL(e={}){let t=``,n;return e.matchClosingTags===!1&&(t=`noMatch`),e.selfClosingTags===!0&&(t=(t?t+` `:``)+`selfClosing`),(e.nestedLanguages&&e.nestedLanguages.length||e.nestedAttributes&&e.nestedAttributes.length)&&(n=sF((e.nestedLanguages||[]).concat(FL),(e.nestedAttributes||[]).concat(IL))),new Vn(n?LL.configure({wrap:n,dialect:t}):t?RL.configure({dialect:t}):RL,[RL.data.of({autocomplete:NL(e)}),e.autoCloseTags===!1?[]:VL,sL().support,aI().support])}var BL=new Set(`area base br col command embed frame hr img input keygen link meta param source track wbr menuitem`.split(` `)),VL=Dn.inputHandler.of((e,t,n,r,i)=>{if(e.composing||e.state.readOnly||t!=n||r!=`>`&&r!=`/`||!RL.isActiveAt(e.state,t,-1))return!1;let a=i(),{state:o}=a,s=o.changeByRange(e=>{let t=o.doc.sliceString(e.from-1,e.to)==r,{head:n}=e,i=yn(o).resolveInner(n,-1),a;if(t&&r==`>`&&i.name==`EndTag`){let t=i.parent;if(t.parent?.lastChild?.name!=`CloseTag`&&(a=xL(o.doc,t.parent,n))&&!BL.has(a))return{range:e,changes:{from:n,to:n+ +(o.doc.sliceString(n,n+1)===`>`),insert:`</${a}>`}}}else if(t&&r==`/`&&i.name==`IncompleteCloseTag`){let e=i.parent;if(i.from==n-2&&e.lastChild?.name!=`CloseTag`&&(a=xL(o.doc,e,n))&&!BL.has(a)){let e=n+ +(o.doc.sliceString(n,n+1)===`>`),t=`${a}>`;return{range:Cn.cursor(n+t.length,-1),changes:{from:n,to:e,insert:t}}}}return{range:e}});return s.changes.empty?!1:(e.dispatch([a,o.update(s,{userEvent:`input.complete`,scrollIntoView:!0})]),!0)}),HL=Mn({commentTokens:{block:{open:`<!--`,close:`-->`}}}),UL=new un,WL=DN.configure({props:[Xn.add(e=>!e.is(`Block`)||e.is(`Document`)||GL(e)!=null||KL(e)?void 0:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})),UL.add(GL),Jn.add({Document:()=>null}),Ln.add({Document:HL})]});function GL(e){let t=/^(?:ATX|Setext)Heading(\d)$/.exec(e.name);return t?+t[1]:void 0}function KL(e){return e.name==`OrderedList`||e.name==`BulletList`}function qL(e,t){let n=e;for(;;){let e=n.nextSibling,r;if(!e||(r=GL(e.type))!=null&&r<=t)break;n=e}return n.to}var JL=jn.of((e,t,n)=>{for(let r=yn(e).resolveInner(n,-1);r&&!(r.from<t);r=r.parent){let e=r.type.prop(UL);if(e==null)continue;let t=qL(r,e);if(t>n)return{from:n,to:t}}return null});function YL(e){return new Pn(HL,e,[],`markdown`)}var XL=YL(WL),ZL=YL(WL.configure([qN,XN,YN,ZN,{props:[Xn.add({Table:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}]));function QL(e,t){return n=>{if(n&&e){let t=null;if(n=/\S*/.exec(n)[0],t=typeof e==`function`?e(n):An.matchLanguageName(e,n,!0),t instanceof An)return t.support?t.support.language.parser:Gn.getSkippingParser(t.load());if(t)return t.parser}return t?t.parser:null}}var $L=class{constructor(e,t,n,r,i,a,o){this.node=e,this.from=t,this.to=n,this.spaceBefore=r,this.spaceAfter=i,this.type=a,this.item=o}blank(e,t=!0){let n=this.spaceBefore+(this.node.name==`Blockquote`?`>`:``);if(e!=null){for(;n.length<e;)n+=` `;return n}else{for(let e=this.to-this.from-n.length-this.spaceAfter.length;e>0;e--)n+=` `;return n+(t?this.spaceAfter:``)}}marker(e,t){let n=this.node.name==`OrderedList`?String(+tR(this.item,e)[2]+t):``;return this.spaceBefore+n+this.type+this.spaceAfter}};function eR(e,t){let n=[],r=[];for(let t=e;t;t=t.parent){if(t.name==`FencedCode`)return r;(t.name==`ListItem`||t.name==`Blockquote`)&&n.push(t)}for(let e=n.length-1;e>=0;e--){let i=n[e],a,o=t.lineAt(i.from),s=i.from-o.from;if(i.name==`Blockquote`&&(a=/^ *>( ?)/.exec(o.text.slice(s))))r.push(new $L(i,s,s+a[0].length,``,a[1],`>`,null));else if(i.name==`ListItem`&&i.parent.name==`OrderedList`&&(a=/^( *)\d+([.)])( *)/.exec(o.text.slice(s)))){let e=a[3],t=a[0].length;e.length>=4&&(e=e.slice(0,e.length-4),t-=4),r.push(new $L(i.parent,s,s+t,a[1],e,a[2],i))}else if(i.name==`ListItem`&&i.parent.name==`BulletList`&&(a=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(o.text.slice(s)))){let e=a[4],t=a[0].length;e.length>4&&(e=e.slice(0,e.length-4),t-=4);let n=a[2];a[3]&&(n+=a[3].replace(/[xX]/,` `)),r.push(new $L(i.parent,s,s+t,a[1],e,n,i))}}return r}function tR(e,t){return/^(\s*)(\d+)(?=[.)])/.exec(t.sliceString(e.from,e.from+10))}function nR(e,t,n,r=0){for(let i=-1,a=e;;){if(a.name==`ListItem`){let e=tR(a,t),o=+e[2];if(i>=0){if(o!=i+1)return;n.push({from:a.from+e[1].length,to:a.from+e[0].length,insert:String(i+2+r)})}i=o}let e=a.nextSibling;if(!e)break;a=e}}function rR(e,t){let n=/^[ \t]*/.exec(e)[0].length;if(!n||t.facet(fn)!=` `)return e;let r=dn(e,4,n),i=``;for(let e=r;e>0;)e>=4?(i+=` `,e-=4):(i+=` `,e--);return i+e.slice(n)}var iR=((e={})=>({state:t,dispatch:n})=>{let r=yn(t),{doc:i}=t,a=null,o=t.changeByRange(n=>{if(!n.empty||!ZL.isActiveAt(t,n.from,-1)&&!ZL.isActiveAt(t,n.from,1))return a={range:n};let o=n.from,s=i.lineAt(o),c=eR(r.resolveInner(o,-1),i);for(;c.length&&c[c.length-1].from>o-s.from;)c.pop();if(!c.length)return a={range:n};let l=c[c.length-1];if(l.to-l.spaceAfter.length>o-s.from)return a={range:n};let u=o>=l.to-l.spaceAfter.length&&!/\S/.test(s.text.slice(l.to));if(l.item&&u){let n=l.node.firstChild,r=l.node.getChild(`ListItem`,`ListItem`);if(n.to>=o||r&&r.to<o||s.from>0&&!/[^\s>]/.test(i.lineAt(s.from-1).text)||e.nonTightLists===!1){let e=c.length>1?c[c.length-2]:null,t,n=``;e&&e.item?(t=s.from+e.from,n=e.marker(i,1)):t=s.from+(e?e.to:0);let r=[{from:t,to:o,insert:n}];return l.node.name==`OrderedList`&&nR(l.item,i,r,-2),e&&e.node.name==`OrderedList`&&nR(e.item,i,r),{range:Cn.cursor(t+n.length),changes:r}}else{let e=sR(c,t,s);return{range:Cn.cursor(o+e.length+1),changes:{from:s.from,insert:e+t.lineBreak}}}}if(l.node.name==`Blockquote`&&u&&s.from){let e=i.lineAt(s.from-1),r=/>\s*$/.exec(e.text);if(r&&r.index==l.from){let i=t.changes([{from:e.from+r.index,to:e.to},{from:s.from+l.from,to:s.to}]);return{range:n.map(i),changes:i}}}let d=[];l.node.name==`OrderedList`&&nR(l.item,i,d);let f=l.item&&l.item.from<s.from,p=``;if(!f||/^[\s\d.)\-+*>]*/.exec(s.text)[0].length>=l.to)for(let e=0,t=c.length-1;e<=t;e++)p+=e==t&&!f?c[e].marker(i,1):c[e].blank(e<t?dn(s.text,4,c[e+1].from)-p.length:null);let m=o;for(;m>s.from&&/\s/.test(s.text.charAt(m-s.from-1));)m--;return p=rR(p,t),oR(l.node,t.doc)&&(p=sR(c,t,s)+t.lineBreak+p),d.push({from:m,to:o,insert:t.lineBreak+p}),{range:Cn.cursor(m+p.length+1),changes:d}});return a?!1:(n(t.update(o,{scrollIntoView:!0,userEvent:`input`})),!0)})();function aR(e){return e.name==`QuoteMark`||e.name==`ListMark`}function oR(e,t){if(e.name!=`OrderedList`&&e.name!=`BulletList`)return!1;let n=e.firstChild,r=e.getChild(`ListItem`,`ListItem`);if(!r)return!1;let i=t.lineAt(n.to),a=t.lineAt(r.from),o=/^[\s>]*$/.test(i.text);return i.number+ +!o<a.number}function sR(e,t,n){let r=``;for(let t=0,i=e.length-2;t<=i;t++)r+=e[t].blank(t<i?dn(n.text,4,e[t+1].from)-r.length:null,t<i);return rR(r,t)}function cR(e,t){let n=e.resolveInner(t,-1),r=t;aR(n)&&(r=n.from,n=n.parent);for(let e;e=n.childBefore(r);)if(aR(e))r=e.from;else if(e.name==`OrderedList`||e.name==`BulletList`)n=e.lastChild,r=n.to;else break;return n}var lR=[{key:`Enter`,run:iR},{key:`Backspace`,run:({state:e,dispatch:t})=>{let n=yn(e),r=null,i=e.changeByRange(t=>{let i=t.from,{doc:a}=e;if(t.empty&&ZL.isActiveAt(e,t.from)){let t=a.lineAt(i),r=eR(cR(n,i),a);if(r.length){let n=r[r.length-1],a=n.to-n.spaceAfter.length+ +!!n.spaceAfter;if(i-t.from>a&&!/\S/.test(t.text.slice(a,i-t.from)))return{range:Cn.cursor(t.from+a),changes:{from:t.from+a,to:i}};if(i-t.from==a&&(!n.item||t.from<=n.item.from||!/\S/.test(t.text.slice(0,n.to)))){let r=t.from+n.from;if(n.item&&n.node.from<n.item.from&&/\S/.test(t.text.slice(n.from,n.to))){let i=n.blank(dn(t.text,4,n.to)-dn(t.text,4,n.from));return r==t.from&&(i=rR(i,e)),{range:Cn.cursor(r+i.length),changes:{from:r,to:t.from+n.to,insert:i}}}if(r<i)return{range:Cn.cursor(r),changes:{from:r,to:i}}}}}return r={range:t}});return r?!1:(t(e.update(i,{scrollIntoView:!0,userEvent:`delete`})),!0)}}],uR=zL({matchClosingTags:!1});function dR(e={}){let{codeLanguages:t,defaultCodeLanguage:n,addKeymap:r=!0,base:{parser:i}=XL,completeHTMLTags:a=!0,pasteURLAsLink:o=!0,htmlTagLanguage:s=uR}=e;if(!(i instanceof $M))throw RangeError("Base parser provided to `markdown` should be a Markdown parser");let c=e.extensions?[e.extensions]:[],l=[s.support,JL],u;o&&l.push(gR),n instanceof Vn?(l.push(n.support),u=n.language):n&&(u=n);let d=t||u?QL(t,u):void 0;c.push(kN({codeParser:d,htmlParser:s.language.parser})),r&&l.push(Rn.high(Bn.of(lR)));let f=YL(i.configure(c));return a&&l.push(f.data.of({autocomplete:fR})),new Vn(f,l)}function fR(e){let{state:t,pos:n}=e,r=/<[:\-\.\w\u00b7-\uffff]*$/.exec(t.sliceDoc(n-25,n));if(!r)return null;let i=yn(t).resolveInner(n,-1);for(;i&&!i.type.isTop;){if(i.name==`CodeBlock`||i.name==`FencedCode`||i.name==`ProcessingInstructionBlock`||i.name==`CommentBlock`||i.name==`Link`||i.name==`Image`)return null;i=i.parent}return{from:n-r[0].length,to:n,options:mR(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}var pR=null;function mR(){if(pR)return pR;let e=ML(new tr(pn.create({extensions:uR}),0,!0));return pR=e?e.options:[]}var hR=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,gR=Dn.domEventHandlers({paste:(e,t)=>{let{main:n}=t.state.selection;if(n.empty)return!1;let r=e.clipboardData?.getData(`text/plain`);if(!r||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(r)||(/^www\./.test(r)&&(r=`https://`+r),!ZL.isActiveAt(t.state,n.from,1)))return!1;let i=yn(t.state),a=!1;return i.iterate({from:n.from,to:n.to,enter:e=>{(e.from>n.from||hR.test(e.name))&&(a=!0)},leave:e=>{e.to<n.to&&(a=!0)}}),a?!1:(t.dispatch({changes:[{from:n.from,insert:`[`},{from:n.to,insert:`](${r})`}],userEvent:`input.paste`,scrollIntoView:!0}),!0)}});function _R(){return _R=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_R.apply(null,arguments)}var vR=e=>{var{theme:t,settings:n={},styles:r=[]}=e,i={".cm-gutters":{}},a={};n.background&&(a.backgroundColor=n.background),n.backgroundImage&&(a.backgroundImage=n.backgroundImage),n.foreground&&(a.color=n.foreground),n.fontSize&&(a.fontSize=n.fontSize),(n.background||n.foreground)&&(i[`&`]=a),n.fontFamily&&(i[`&.cm-editor .cm-scroller`]={fontFamily:n.fontFamily}),n.gutterBackground&&(i[`.cm-gutters`].backgroundColor=n.gutterBackground),n.gutterForeground&&(i[`.cm-gutters`].color=n.gutterForeground),n.gutterBorder&&(i[`.cm-gutters`].borderRightColor=n.gutterBorder),n.caret&&(i[`.cm-content`]={caretColor:n.caret},i[`.cm-cursor, .cm-dropCursor`]={borderLeftColor:n.caret});var o={};return n.gutterActiveForeground&&(o.color=n.gutterActiveForeground),n.lineHighlight&&(i[`.cm-activeLine`]={backgroundColor:n.lineHighlight},o.backgroundColor=n.lineHighlight),i[`.cm-activeLineGutter`]=o,n.selection&&(i[`&.cm-focused .cm-selectionBackground, & .cm-line::selection, & .cm-selectionLayer .cm-selectionBackground, .cm-content ::selection`]={background:n.selection+` !important`}),n.selectionMatch&&(i[`& .cm-selectionMatch`]={backgroundColor:n.selectionMatch}),[Dn.theme(i,{dark:t===`dark`}),vn(Kn.define(r))]},yR={background:`#2E3235`,foreground:`#DDDDDD`,caret:`#DDDDDD`,selection:`#202325`,selectionMatch:`#202325`,gutterBackground:`#292d30`,gutterForeground:`#808080`,gutterBorder:`1px solid #ffffff10`,lineHighlight:`#B9D2FF30`},bR=[{tag:K.keyword,color:`#fda331`},{tag:[K.name,K.deleted,K.character,K.propertyName,K.macroName],color:`#b5bd68`},{tag:[K.variableName],color:`#6fb3d2`},{tag:[K.function(K.variableName)],color:`#fda331`},{tag:[K.labelName],color:`#fc6d24`},{tag:[K.color,K.constant(K.name),K.standard(K.name)],color:`#fda331`},{tag:[K.definition(K.name),K.separator],color:`#cc99cc`},{tag:[K.brace],color:`#cc99cc`},{tag:[K.annotation],color:`#fc6d24`},{tag:[K.number,K.changed,K.annotation,K.modifier,K.self,K.namespace],color:`#fda331`},{tag:[K.typeName,K.className],color:`#6fb3d2`},{tag:[K.operator,K.operatorKeyword],color:`#cc99cc`},{tag:[K.tagName],color:`#fda331`},{tag:[K.squareBracket],color:`#cc99cc`},{tag:[K.angleBracket],color:`#cc99cc`},{tag:[K.attributeName],color:`#6fb3d2`},{tag:[K.regexp],color:`#fda331`},{tag:[K.quote],color:`#DDDDDD`},{tag:[K.string],color:`#b5bd68`},{tag:K.link,color:`#6987AF`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[K.url,K.escape,K.special(K.string)],color:`#8abeb7`},{tag:[K.meta],color:`#A54543`},{tag:[K.comment],color:`#808080`,fontStyle:`italic`},{tag:K.monospace,color:`#DDDDDD`},{tag:K.strong,fontWeight:`bold`,color:`#fda331`},{tag:K.emphasis,fontStyle:`italic`,color:`#6fb3d2`},{tag:K.strikethrough,textDecoration:`line-through`},{tag:K.heading,fontWeight:`bold`,color:`#DDDDDD`},{tag:K.special(K.heading1),fontWeight:`bold`,color:`#DDDDDD`},{tag:K.heading1,fontWeight:`bold`,color:`#DDDDDD`},{tag:[K.heading2,K.heading3,K.heading4],fontWeight:`bold`,color:`#DDDDDD`},{tag:[K.heading5,K.heading6],color:`#DDDDDD`},{tag:[K.atom,K.bool,K.special(K.variableName)],color:`#8abeb7`},{tag:[K.processingInstruction,K.inserted],color:`#8abeb7`},{tag:[K.contentSeparator],color:`#6fb3d2`},{tag:K.invalid,color:`#B9D2FF`,borderBottom:`1px dotted #fc6d24`}],xR=e=>{var{theme:t=`dark`,settings:n={},styles:r=[]}=e||{};return vR({theme:t,settings:_R({},yR,n),styles:[...bR,...r]})};xR();var SR={background:`#ffffff`,foreground:`#2e3440`,caret:`#3b4252`,selection:`#eceff4`,selectionMatch:`#e5e9f0`,gutterBackground:`#eceff4`,gutterForeground:`#2e3440`,gutterBorder:`none`,lineHighlight:`#02255f11`},CR=[{tag:K.keyword,color:`#5e81ac`},{tag:[K.name,K.deleted,K.character,K.propertyName,K.macroName],color:`#d08770`},{tag:[K.variableName],color:`#d08770`},{tag:[K.function(K.variableName)],color:`#5e81ac`},{tag:[K.labelName],color:`#81a1c1`},{tag:[K.color,K.constant(K.name),K.standard(K.name)],color:`#5e81ac`},{tag:[K.definition(K.name),K.separator],color:`#a3be8c`},{tag:[K.brace],color:`#8fbcbb`},{tag:[K.annotation],color:`#d30102`},{tag:[K.number,K.changed,K.annotation,K.modifier,K.self,K.namespace],color:`#88c0d0`},{tag:[K.typeName,K.className],color:`#ebcb8b`},{tag:[K.operator,K.operatorKeyword],color:`#a3be8c`},{tag:[K.tagName],color:`#b48ead`},{tag:[K.squareBracket],color:`#bf616a`},{tag:[K.angleBracket],color:`#d08770`},{tag:[K.attributeName],color:`#ebcb8b`},{tag:[K.regexp],color:`#5e81ac`},{tag:[K.quote],color:`#3b4252`},{tag:[K.string],color:`#d08770`},{tag:K.link,color:`#8fbcbb`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[K.url,K.escape,K.special(K.string)],color:`#d08770`},{tag:[K.meta],color:`#88c0d0`},{tag:[K.comment],color:`#434c5e`,fontStyle:`italic`},{tag:K.strong,fontWeight:`bold`,color:`#5e81ac`},{tag:K.emphasis,fontStyle:`italic`,color:`#5e81ac`},{tag:K.strikethrough,textDecoration:`line-through`},{tag:K.heading,fontWeight:`bold`,color:`#5e81ac`},{tag:K.special(K.heading1),fontWeight:`bold`,color:`#5e81ac`},{tag:K.heading1,fontWeight:`bold`,color:`#5e81ac`},{tag:[K.heading2,K.heading3,K.heading4],fontWeight:`bold`,color:`#5e81ac`},{tag:[K.heading5,K.heading6],color:`#5e81ac`},{tag:[K.atom,K.bool,K.special(K.variableName)],color:`#d08770`},{tag:[K.processingInstruction,K.inserted],color:`#8fbcbb`},{tag:[K.contentSeparator],color:`#ebcb8b`},{tag:K.invalid,color:`#434c5e`,borderBottom:`1px dotted #d30102`}],wR=e=>{var{theme:t=`light`,settings:n={},styles:r=[]}=e||{};return vR({theme:t,settings:_R({},SR,n),styles:[...CR,...r]})};wR();var TR=[An.of({name:`javascript`,alias:[`js`,`jsx`],extensions:[`js`,`mjs`,`cjs`,`jsx`],load:async()=>sL({jsx:!0})}),An.of({name:`typescript`,alias:[`ts`,`tsx`],extensions:[`ts`,`mts`,`cts`,`tsx`],load:async()=>sL({typescript:!0,jsx:!0})}),An.of({name:`json`,alias:[`jsonc`],extensions:[`json`,`jsonc`],load:()=>n(()=>import(`./dist-BOapDt7N.js`).then(e=>e.json()),__vite__mapDeps([25,26,4,27,28]),import.meta.url)}),An.of({name:`yaml`,alias:[`yml`],extensions:[`yaml`,`yml`],load:()=>n(()=>import(`./dist-VyzSEzD4.js`).then(e=>e.yaml()),__vite__mapDeps([29,26,4,27,28]),import.meta.url)}),An.of({name:`css`,alias:[`scss`,`less`],extensions:[`css`,`scss`,`less`],load:async()=>aI()}),An.of({name:`html`,alias:[`htm`],extensions:[`html`,`htm`],load:async()=>zL()}),An.of({name:`python`,alias:[`py`],extensions:[`py`,`pyw`],load:()=>n(()=>import(`./dist-B4kUko7n.js`).then(e=>e.python()),__vite__mapDeps([30,31,26,4,27,28]),import.meta.url)}),An.of({name:`rust`,alias:[`rs`],extensions:[`rs`],load:()=>n(()=>import(`./dist-BH1b1nWB.js`).then(e=>e.rust()),__vite__mapDeps([32,26,4,27,28]),import.meta.url)}),An.of({name:`markdown`,alias:[`md`,`mdx`],extensions:[`md`,`mdx`,`markdown`],load:async()=>dR()}),An.of({name:`bash`,alias:[`sh`,`shell`,`zsh`],extensions:[`sh`,`bash`,`zsh`],load:async()=>{let[{StreamLanguage:e,LanguageSupport:t},{shell:r}]=await Promise.all([n(()=>import(`./dist-nPpvoMNC.js`).then(e=>e.m),__vite__mapDeps([26,4,27]),import.meta.url),n(()=>import(`./shell-40VLet8r.js`),[],import.meta.url)]);return new t(e.define(r))}}),An.of({name:`go`,alias:[`golang`],extensions:[`go`],load:async()=>{let[{StreamLanguage:e,LanguageSupport:t},{go:r}]=await Promise.all([n(()=>import(`./dist-nPpvoMNC.js`).then(e=>e.m),__vite__mapDeps([26,4,27]),import.meta.url),n(()=>import(`./go-a33xvodr.js`),[],import.meta.url)]);return new t(e.define(r))}}),An.of({name:`math`,alias:[`latex`,`tex`],extensions:[`tex`,`latex`],load:async()=>{let[{StreamLanguage:e,LanguageSupport:t},{stex:r}]=await Promise.all([n(()=>import(`./dist-nPpvoMNC.js`).then(e=>e.m),__vite__mapDeps([26,4,27]),import.meta.url),n(()=>import(`./stex-BKMR5xQj.js`),[],import.meta.url)]);return new t(e.define(r))}})],ER=bn.define(),DR=bn.define(),OR=Un.line({class:`agent-flash`}),kR=Sn.define({create(){return Un.none},update(e,t){e=e.map(t.changes);for(let n of t.effects)if(n.is(ER)){let{from:r,to:i}=n.value,a=[];for(let e=r;e<=i;){let n=t.state.doc.lineAt(e);a.push(OR.range(n.from)),e=n.to+1}e=e.update({add:a,sort:!0})}else n.is(DR)&&(e=Un.none);return e},provide:e=>Dn.decorations.from(e)});function AR(e){let t=e.getMap(`agent-flash`);return[kR,On.define(e=>{let n=0,r=Date.now(),i=null,a=null,o=!1;function s(){let t=e.state.doc.length;t!==0&&(o||(e.dispatch({effects:ER.of({from:0,to:t})}),a&&clearTimeout(a),a=setTimeout(()=>{a=null,!o&&e.dispatch({effects:DR.of(null)})},U)))}let c=e=>{if(xt(t),!g(t,r))return;r=Date.now();let a=Date.now();if(a-n<500){if(!i){let e=500-(a-n);i=setTimeout(()=>{i=null,n=Date.now(),s()},e)}return}n=a,s()};t.observe(c);let l=()=>{document.visibilityState===`visible`?g(t,r)&&(r=Date.now(),n=Date.now(),s()):r=Date.now()};return document.addEventListener(`visibilitychange`,l),{update(e){},destroy(){o=!0,t.unobserve(c),document.removeEventListener(`visibilitychange`,l),i&&=(clearTimeout(i),null),a&&=(clearTimeout(a),null)}}})]}var jR=/\[([^\]\n]*)\]\((<[^>\n]+>|[^)\s\n]+)(?:\s+(?:"[^"\n]*"|'[^'\n]*'|\([^)\n]*\)))?\)/g,MR=Un.mark({class:`cm-md-internal-link`});function NR(e,t){return t>0&&e[t-1]===`!`}function PR(e){let t=e[2]??``;return t.startsWith(`<`)&&t.endsWith(`>`)?t.slice(1,-1):t}function FR(e){let t=new In;for(let{from:n,to:r}of e.visibleRanges){let i=e.state.doc.sliceString(n,r);jR.lastIndex=0;let a=jR.exec(i);for(;a!==null;){let e=NR(i,a.index)?null:pk(PR(a));e&&e.kind!==`external`&&t.add(n+a.index,n+a.index+a[0].length,MR),a=jR.exec(i)}}return t.finish()}var IR=On.fromClass(class{decorations;constructor(e){this.decorations=FR(e)}update(e){(e.docChanged||e.viewportChanged)&&(this.decorations=FR(e.view))}},{decorations:e=>e.decorations}),LR=Dn.domEventHandlers({mousedown(e,t){if(!e.ctrlKey&&!e.metaKey)return!1;let n=t.posAtCoords({x:e.clientX,y:e.clientY});if(n===null)return!1;let r=t.state.doc.lineAt(n);jR.lastIndex=0;let i=jR.exec(r.text);for(;i!==null;){let t=r.from+i.index,a=t+i[0].length;if(n>=t&&n<=a){let t=NR(r.text,i.index)?null:pk(PR(i));if(t&&t.kind!==`external`)return e.preventDefault(),t.kind===`doc`&&vk(e)?(_k(t),!0):(bk(t),!0)}i=jR.exec(r.text)}return!1}}),RR=Dn.theme({".cm-md-internal-link":{color:`oklch(52.7% 0.154 228.4)`,fontWeight:`500`},".cm-md-internal-link:hover":{textDecoration:`underline`,cursor:`pointer`}});function zR(){return[IR,LR,RR]}var BR=5e3,VR=null,HR=0,UR=null,WR=new Map;async function GR(){let e=Date.now();return VR&&e-HR<BR?VR:(VR=await dA(),HR=e,UR=ZR(VR),VR)}async function KR(e){let t=Date.now(),n=WR.get(e);if(n!==void 0&&t-n.time<BR)return n.headings;try{let n=await fA(e);return WR.set(e,{headings:n,time:t}),n}catch(n){return console.warn(`[wiki-link-source] /api/page-headings fetch failed:`,n),WR.set(e,{headings:[],time:t}),[]}}var qR=/\[\[[^\]]*?\]\]/g,JR=Un.mark({class:`cm-wiki-link`}),YR=Un.mark({class:`cm-wiki-link cm-wiki-link-broken`});function XR(e){let t=new Set;for(let n of e)if(t.add(n.docName.toLowerCase()),n.title&&t.add(n.title.toLowerCase()),n.kind===`asset`){let e=n.docName.replace(/^\//,``);t.add(e.toLowerCase());let r=e.lastIndexOf(`/`);t.add((r===-1?e:e.slice(r+1)).toLowerCase())}return t}function ZR(e){let t=XR(e);for(let n of e){if(n.kind===`asset`)continue;let e=n.docName.split(`/`);e.pop();let r=``;for(let n of e)r=r?`${r}/${n}`:n,t.add(r.toLowerCase())}return t}function QR(e){return e.split(/[#|]/)[0].trim().toLowerCase()}function $R(e){let t=new In,n=VR?UR:null;for(let{from:r,to:i}of e.visibleRanges){let a=e.state.doc.sliceString(r,i);qR.lastIndex=0;let o=qR.exec(a);for(;o!==null;){let e=JR;if(n){let t=QR(o[0].slice(2,-2));t&&!n.has(t)&&(e=YR)}t.add(r+o.index,r+o.index+o[0].length,e),o=qR.exec(a)}}return t.finish()}var ez=On.fromClass(class{decorations;cacheWarmAtBuild;constructor(e){this.cacheWarmAtBuild=VR!==null,this.decorations=$R(e),this.cacheWarmAtBuild||this.warmCache(e)}update(e){let t=VR!==null;(e.docChanged||e.viewportChanged||!this.cacheWarmAtBuild&&t)&&(this.cacheWarmAtBuild=t,this.decorations=$R(e.view))}warmCache(e){GR().then(()=>{try{e.dispatch({})}catch{}}).catch(e=>{console.warn(`[wiki-link-source] warmCache fetch failed:`,e)})}},{decorations:e=>e.decorations}),tz=/\[\[([^[\]|#]+?)(?:#([^\]|]+?))?(?:\|([^\]]+?))?\]\]/g,nz=Dn.domEventHandlers({mousedown(e,t){if(!e.ctrlKey&&!e.metaKey)return!1;let n=t.posAtCoords({x:e.clientX,y:e.clientY});if(n===null)return!1;let r=t.state.doc.lineAt(n);tz.lastIndex=0;let i=tz.exec(r.text);for(;i!==null;){let t=r.from+i.index,a=t+i[0].length;if(n>=t&&n<=a){let t=i[1]?.trim(),n=i[2]?.trim()||null;if(t){let r=ht(t,n);if(!r)return!1;if(e.preventDefault(),r.kind===`external`)hk(r.url);else if(r.kind===`asset`){let t=lC(r.url,new Set((VR??[]).filter(e=>e.kind===`asset`).map(e=>e.docName.replace(/^\//,``))))??r.url.replace(/^\//,``);vk(e)?window.open(st(t),`_blank`,`noopener,noreferrer`):window.location.hash=st(t)}else vk(e)?_k(r):window.location.hash=r.anchor?`#/${r.docName}?anchor=${encodeURIComponent(r.anchor)}`:`#/${r.docName}`}return!0}i=tz.exec(r.text)}return!1}});async function rz(e){let t=e.state.doc.sliceString(0,e.pos).match(/\[\[([^\]]*)$/);if(!t)return null;let n=t[1],r=e.pos-n.length,i=n.indexOf(`#`);if(i>0){let e=n.slice(0,i),t=n.slice(i+1),a=r+i+1,o=await KR(e);if(!o.length)return null;let s=oA(o,t);return s.length?{from:a,filter:!1,options:s.map(e=>({label:e.text,detail:`H${e.level}`,apply(t,n,r,i){let a=t.state.doc.sliceString(i,i+2)===`]]`?``:`]]`;t.dispatch({changes:{from:r,to:i,insert:e.slug+a},selection:{anchor:r+e.slug.length+a.length}})}}))}:null}return{from:r,filter:!1,options:rA(await GR().catch(e=>(console.warn(`[wiki-link-source] Failed to fetch pages:`,e),[])),n).map(e=>({label:e.title,detail:e.title===e.docName?void 0:e.docName,apply(t,n,r,i){let a=t.state.doc.sliceString(i,i+2)===`]]`?``:`]]`,o=e.kind===`asset`?`${e.docName}|${e.title}${a}`:e.docName+a;t.dispatch({changes:{from:r,to:i,insert:o},selection:{anchor:r+o.length}})}}))}}var iz=Dn.theme({".cm-wiki-link":{color:`oklch(52.7% 0.154 228.4)`,fontWeight:`500`},".cm-wiki-link:hover":{textDecoration:`underline`,cursor:`pointer`}});function az(){return[ez,nz,iz,ZL.data.of({autocomplete:rz})]}var oz=xR({settings:{background:`transparent`,gutterBackground:`transparent`}}),sz=wR({settings:{background:`transparent`,gutterBackground:`transparent`}});function cz(e){let{themeCompartment:t,resolvedTheme:n,ydoc:r}=e,i=n===`dark`?oz:sz;return[dR({base:ZL,extensions:[qN],codeLanguages:TR}),az(),zR(),...r?[AR(r)]:[],Bn.of([]),t.of(i),Dn.lineWrapping,...e.extraKeymaps?[e.extraKeymaps]:[]]}function lz(e,t,n){let{state:r}=e,i=r.selection.main;if(!i.empty)return!1;if(t===`line`){let e=r.doc.lineAt(i.head);return n<0?e.from===0:e.to===r.doc.length}return n<0?i.head===0:i.head===r.doc.length}function uz(e){let{pmSel:t,nodePos:n,nodeSize:r,cmDocLen:i,cmSel:a,cmHasFocus:o}=e;if(t instanceof We&&t.from===n)return o?{kind:`noop`}:{kind:`focus`};let s=n+1,c=n+r-1;if(t.from>=s&&t.to<=c){let e=Math.max(0,Math.min(t.anchor-s,i)),n=Math.max(0,Math.min(t.head-s,i));return a.anchor===e&&a.head===n&&o?{kind:`noop`}:{kind:`selection`,anchor:e,head:n}}return{kind:`noop`}}function dz(e,t){let n=Ij().parseWithFallback(e),r;try{r=t.nodeFromJSON(n)}catch(e){return console.warn(JSON.stringify({event:`raw-mdx-upgrade-failure`,reason:e instanceof Error?e.message:String(e)})),null}if(r.childCount===0)return null;let i=[];for(let e=0;e<r.childCount;e++){let t=r.child(e);if(t.type.name===`rawMdxFallback`)return null;i.push(t)}return i}function fz(e,t){if(e===t)return null;let n=0,r=e.length,i=t.length;for(;n<r&&e.charCodeAt(n)===t.charCodeAt(n);)n++;for(;r>n&&i>n&&e.charCodeAt(r-1)===t.charCodeAt(i-1);)r--,i--;return{from:n,to:r,text:t.slice(n,i)}}var pz=`Unregistered component:`;function mz(e){if(!e.startsWith(pz))return null;let t=e.slice(23).trim();return t.length>0?t:null}function hz(e){let t=(0,Y.c)(49),{node:n,editor:r,getPos:i}=e,a=(0,q.useRef)(null),o=(0,q.useRef)(null),s=(0,q.useRef)(!1),c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=new Yn,t[0]=c):c=t[0];let l=(0,q.useRef)(c),{resolvedTheme:u}=Ze(),d=n.attrs.reason||`Parse failed`,f;t[1]===d?f=t[2]:(f=yM(d),t[1]=d,t[2]=f);let p=f,m=bM[p],h;t[3]!==d||t[4]!==p?(h=p===`info`?mz(d):null,t[3]=d,t[4]=p,t[5]=h):h=t[5];let g=h,_;t[6]!==r||t[7]!==i?(_=e=>{let t=typeof i==`function`?i():void 0;if(t===void 0)return;let n=_M(r);if(!n)return;let a=n.state.doc.nodeAt(t);if(!a||a.type.name!==`rawMdxFallback`)return;let o=t+1,c=t+a.nodeSize-1;s.current=!0;try{let t=n.state.tr;if(e.length===0)t.delete(o,c);else{let r=n.state.schema.text(e);t.replaceWith(o,c,r)}n.dispatch(t)}catch(e){let t=e;throw s.current=!1,t}s.current=!1},t[6]=r,t[7]=i,t[8]=_):_=t[8];let v=_,y;t[9]!==r||t[10]!==v||t[11]!==i||t[12]!==n.textContent||t[13]!==u?(y=()=>{let e=a.current;if(!e)return;let t=l.current,c=Bn.of([{key:`Mod-z`,run:()=>(r.commands.undo(),!0)},{key:`Mod-y`,run:()=>(r.commands.redo(),!0)},{key:`Mod-Shift-z`,run:()=>(r.commands.redo(),!0)}]),d=e=>{let t=typeof i==`function`?i():void 0;if(typeof t!=`number`)return!1;let n=_M(r);if(!n)return!1;let a=n.state.doc.nodeAt(t);if(!a||a.type.name!==`rawMdxFallback`)return!1;let o=e<0?t:t+a.nodeSize,s=W.near(n.state.doc.resolve(o),e);return n.dispatch(n.state.tr.setSelection(s).scrollIntoView()),n.focus(),!0},f=Bn.of([{key:`ArrowUp`,run:e=>lz(e,`line`,-1)?d(-1):!1},{key:`ArrowLeft`,run:e=>lz(e,`char`,-1)?d(-1):!1},{key:`ArrowDown`,run:e=>lz(e,`line`,1)?d(1):!1},{key:`ArrowRight`,run:e=>lz(e,`char`,1)?d(1):!1}]),p=cz({themeCompartment:t,resolvedTheme:u,ydoc:vM(r)??void 0,extraKeymaps:c});p.push(f),p.push(Dn.updateListener.of(e=>{if(e.docChanged&&!s.current&&v(e.state.doc.toString()),e.focusChanged&&e.view.hasFocus&&!s.current){let e=typeof i==`function`?i():void 0;if(typeof e!=`number`)return;let t=_M(r);if(!t)return;let n=t.state.selection;if(n instanceof We&&n.from===e)return;let a=t.state.doc.nodeAt(e);if(!a||a.type.name!==`rawMdxFallback`)return;s.current=!0;try{t.dispatch(t.state.tr.setSelection(We.create(t.state.doc,e)))}catch(e){let t=e;throw s.current=!1,t}s.current=!1}if(e.focusChanged&&!e.view.hasFocus&&!s.current){let t=typeof i==`function`?i():void 0;if(typeof t!=`number`)return;let n=_M(r);if(!n)return;let a=n.state.doc.nodeAt(t);if(!a||a.type.name!==`rawMdxFallback`)return;let o=dz(e.view.state.doc.toString(),n.state.schema);if(!o)return;s.current=!0;try{n.dispatch(n.state.tr.replaceWith(t,t+a.nodeSize,o))}catch(e){let t=e;throw s.current=!1,t}s.current=!1}}));let m=new Dn({doc:n.textContent,extensions:p,parent:e});o.current=m;let h=_z,g=m.contentDOM;g.addEventListener(`keydown`,h),g.addEventListener(`paste`,h),g.addEventListener(`drop`,h),g.addEventListener(`cut`,h);let _=()=>{g.removeEventListener(`keydown`,h),g.removeEventListener(`paste`,h),g.removeEventListener(`drop`,h),g.removeEventListener(`cut`,h)};return()=>{_(),m.destroy(),o.current=null}},t[9]=r,t[10]=v,t[11]=i,t[12]=n.textContent,t[13]=u,t[14]=y):y=t[14];let b;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(b=[],t[15]=b):b=t[15],(0,q.useEffect)(y,b);let x,S;t[16]===u?(x=t[17],S=t[18]):(x=()=>{let e=o.current;if(!e)return;let t=u===`dark`?oz:sz;e.dispatch({effects:l.current.reconfigure(t)})},S=[u],t[16]=u,t[17]=x,t[18]=S),(0,q.useEffect)(x,S);let C,w;t[19]!==r||t[20]!==i?(w=()=>{let e=()=>{let e=typeof i==`function`?i():void 0;if(typeof e!=`number`)return;let t=o.current;if(!t||s.current)return;let n=_M(r);if(!n)return;let a=n.state.doc.nodeAt(e);if(!a)return;let c=uz({pmSel:n.state.selection,nodePos:e,nodeSize:a.nodeSize,cmDocLen:t.state.doc.length,cmSel:{anchor:t.state.selection.main.anchor,head:t.state.selection.main.head},cmHasFocus:t.hasFocus});if(c.kind!==`noop`){s.current=!0;try{c.kind===`selection`&&t.dispatch({selection:{anchor:c.anchor,head:c.head}}),t.hasFocus||t.focus()}catch(e){let t=e;throw s.current=!1,t}s.current=!1}};return r.on(`selectionUpdate`,e),()=>{r.off(`selectionUpdate`,e)}},C=[r,i],t[19]=r,t[20]=i,t[21]=C,t[22]=w):(C=t[21],w=t[22]),(0,q.useEffect)(w,C);let T=n.textContent,E,D;t[23]===T?(E=t[24],D=t[25]):(E=()=>{let e=o.current;if(!e||s.current)return;let t=fz(e.state.doc.toString(),T);if(t){s.current=!0;try{e.dispatch({changes:{from:t.from,to:t.to,insert:t.text}})}catch(e){let t=e;throw s.current=!1,t}s.current=!1}},D=[T],t[23]=T,t[24]=E,t[25]=D),(0,q.useEffect)(E,D);let O;t[26]!==r||t[27]!==i?(O=()=>{let e=typeof i==`function`?i():void 0;typeof e==`number`&&r.chain().focus().setNodeSelection(e).deleteSelection().run()},t[26]=r,t[27]=i,t[28]=O):O=t[28];let k=O,A=g?`raw-mdx-fallback-wrapper jsx-component-wrapper jsx-component-wrapper--unregistered relative my-2 py-2 rounded border border-dashed ${m.wrapperClass}`:`raw-mdx-fallback-wrapper relative my-2 py-2 rounded border border-dashed ${m.wrapperClass}`,j;t[29]===g?j=t[30]:(j=g?{"data-jsx-component":``,role:`group`,"aria-label":`Unknown component: ${g}`}:{},t[29]=g,t[30]=j);let M=j,N=`rounded px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wider ${m.badgeClass}`,P;t[31]!==d||t[32]!==m.label||t[33]!==N?(P=(0,J.jsx)(`span`,{className:N,title:d,children:m.label}),t[31]=d,t[32]=m.label,t[33]=N,t[34]=P):P=t[34];let F;t[35]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,J.jsx)(Jr,{size:12}),t[35]=F):F=t[35];let I;t[36]===k?I=t[37]:(I=(0,J.jsx)(`button`,{type:`button`,className:`jsx-chrome-btn jsx-chrome-btn--delete`,"aria-label":`Delete block`,onClick:k,children:F}),t[36]=k,t[37]=I);let L;t[38]!==P||t[39]!==I?(L=(0,J.jsxs)(`div`,{className:`absolute top-1 right-1 z-10 flex items-center gap-1.5`,contentEditable:!1,onMouseDown:gz,children:[P,I]}),t[38]=P,t[39]=I,t[40]=L):L=t[40];let R=`Editing broken MDX source: ${d}`,z;t[41]===R?z=t[42]:(z=(0,J.jsx)(`div`,{ref:a,className:`raw-mdx-fallback-cm`,role:`group`,"aria-label":R}),t[41]=R,t[42]=z);let B;return t[43]!==p||t[44]!==L||t[45]!==z||t[46]!==M||t[47]!==A?(B=(0,J.jsxs)(ac,{className:A,contentEditable:!1,"data-drag-handle":``,draggable:`true`,"data-severity":p,...M,children:[L,z]}),t[43]=p,t[44]=L,t[45]=z,t[46]=M,t[47]=A,t[48]=B):B=t[48],B}function gz(e){return e.stopPropagation()}function _z(){}function vz(e,t){if(!e.selection.empty)return null;let n=t===`up`||t===`left`?-1:1,r=e.selection.$head,i=n>0?r.after():r.before();if(typeof i!=`number`)return null;let a=W.near(e.doc.resolve(i),n);return a.$head?.parent.type.name===`rawMdxFallback`?a:null}function yz(e,t){let{state:n,view:r}=e;if(!r.endOfTextblock(t))return!1;let i=vz(n,t);return i?(r.dispatch(n.tr.setSelection(i)),!0):!1}var bz=C.extend({addKeyboardShortcuts(){return{ArrowLeft:({editor:e})=>yz(e,`left`),ArrowRight:({editor:e})=>yz(e,`right`),ArrowUp:({editor:e})=>yz(e,`up`),ArrowDown:({editor:e})=>yz(e,`down`)}},addNodeView(){return pc(hz,{stopEvent:()=>!0,ignoreMutation:()=>!0})}});function xz(e){let t=(0,Y.c)(47),{items:n,selectedIndex:r,categoryLabels:i,onSelect:a,onHoverIndex:o}=e,s=(0,q.useRef)(null),c=(0,q.useId)(),l=r>=0&&r<n.length?`${c}-option-${r}`:void 0,u=Cz,d,f;if(t[0]===r?(d=t[1],f=t[2]):(d=()=>{let e=s.current;if(!e)return;let t=e.querySelectorAll(`[role="option"]`).item(r);t&&t.scrollIntoView({block:`nearest`})},f=[r],t[0]=r,t[1]=d,t[2]=f),(0,q.useEffect)(d,f),n.length===0){let e;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,J.jsx)(`div`,{ref:s,role:`status`,"aria-live":`polite`,className:`w-56 rounded-lg border bg-popover p-2 shadow-md text-sm text-muted-foreground`,style:{maxHeight:`var(--suggestion-menu-max-height, 40vh)`},onMouseDown:u,children:`No results`}),t[3]=e):e=t[3],e}let p,m,h,g,_,v,y,b,x,S,C,w,T;if(t[4]!==l||t[5]!==i||t[6]!==n||t[7]!==c||t[8]!==o||t[9]!==a||t[10]!==r){let e=[],d=0,f=new Map;for(let t of n){f.set(t,d++);let n=e.find(e=>e.key===t.category);n?n.items.push(t):e.push({key:t.category,items:[t]})}m=r>=0&&r<n.length?n[r]:null;let E;t[24]===n?E=t[25]:(E=n.some(Sz),t[24]=n,t[25]=E),p=E,v=`flex items-start gap-2`,y=s,b=`listbox`,x=`Slash commands`,S=l,C=-1,w=u,T=`w-56 overflow-y-auto subtle-scrollbar rounded-lg border bg-popover p-1 shadow-md`,t[26]===Symbol.for(`react.memo_cache_sentinel`)?(h={maxHeight:`var(--suggestion-menu-max-height, 40vh)`},t[26]=h):h=t[26];let D=m?`${m.label}${m.preview?`. ${m.preview.description}`:``}`:``;t[27]===D?g=t[28]:(g=(0,J.jsx)(`span`,{className:`sr-only`,"aria-live":`polite`,"aria-atomic":`true`,children:D}),t[27]=D,t[28]=g),_=e.map(e=>(0,J.jsxs)(`div`,{role:`group`,"aria-labelledby":`${c}-group-${e.key}`,children:[(0,J.jsx)(`div`,{id:`${c}-group-${e.key}`,className:`px-2 py-1.5 text-xs font-semibold text-muted-foreground`,children:i[e.key]??e.key}),e.items.map(e=>{let t=f.get(e)??0,n=t===r,i=e.icon;return(0,J.jsxs)(`button`,{id:`${c}-option-${t}`,type:`button`,role:`option`,"aria-selected":n,"data-selected":n,className:`flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm text-left ${n?`bg-accent text-accent-foreground`:``}`,onMouseEnter:()=>o?.(t),onMouseDown:t=>{t.preventDefault(),a(e)},children:[(0,J.jsx)(i,{className:`size-4 shrink-0 text-muted-foreground`}),(0,J.jsx)(`div`,{className:`flex flex-col min-w-0`,children:(0,J.jsx)(`span`,{className:`truncate`,children:e.label})})]},e.name)})]},e.key)),t[4]=l,t[5]=i,t[6]=n,t[7]=c,t[8]=o,t[9]=a,t[10]=r,t[11]=p,t[12]=m,t[13]=h,t[14]=g,t[15]=_,t[16]=v,t[17]=y,t[18]=b,t[19]=x,t[20]=S,t[21]=C,t[22]=w,t[23]=T}else p=t[11],m=t[12],h=t[13],g=t[14],_=t[15],v=t[16],y=t[17],b=t[18],x=t[19],S=t[20],C=t[21],w=t[22],T=t[23];let E;t[29]!==h||t[30]!==g||t[31]!==_||t[32]!==y||t[33]!==b||t[34]!==x||t[35]!==S||t[36]!==C||t[37]!==w||t[38]!==T?(E=(0,J.jsxs)(`div`,{ref:y,role:b,"aria-label":x,"aria-activedescendant":S,tabIndex:C,onMouseDown:w,className:T,style:h,children:[g,_]}),t[29]=h,t[30]=g,t[31]=_,t[32]=y,t[33]=b,t[34]=x,t[35]=S,t[36]=C,t[37]=w,t[38]=T,t[39]=E):E=t[39];let D;t[40]!==p||t[41]!==m?(D=p?(0,J.jsx)(`aside`,{"aria-hidden":`true`,onMouseDown:u,className:`w-64 rounded-lg border bg-popover p-2 shadow-md ${m?.preview?``:`invisible`}`,children:m?.preview?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`div`,{className:`mb-2 flex aspect-5/3 items-center justify-center overflow-hidden rounded-md bg-muted/40 p-3 *:max-h-full *:max-w-full [&_img]:size-full [&_img]:rounded-md [&_img]:object-contain`,children:m.preview.render()}),(0,J.jsx)(`p`,{className:`px-1 pb-1 text-xs text-muted-foreground`,children:m.preview.description})]}):null}):null,t[40]=p,t[41]=m,t[42]=D):D=t[42];let O;return t[43]!==v||t[44]!==E||t[45]!==D?(O=(0,J.jsxs)(`div`,{className:v,children:[E,D]}),t[43]=v,t[44]=E,t[45]=D,t[46]=O):O=t[46],O}function Sz(e){return e.preview}function Cz(e){return e.preventDefault()}var wz=new z(`slashCommand`),Tz=rt.create({name:`slashCommand`,addOptions(){return{itemsSources:[()=>lT],categoryLabels:{basic:`Basic blocks`,insert:`Insert`}}},addProseMirrorPlugins(){let e=this;return[tv({editor:this.editor,pluginKey:wz,char:`/`,startOfLine:!1,items:({query:t})=>{let n=e.options.itemsSources.flatMap(e=>{try{return e()}catch(e){return console.error(`[slash-command] item source threw an error`,e),[]}}),r=Object.keys(e.options.categoryLabels),i=e=>{let t=r.indexOf(e);return t===-1?1/0:t};return uT(n.map((e,t)=>({item:e,i:t})).sort((e,t)=>{let n=i(e.item.category)-i(t.item.category);return n===0?e.i-t.i:n}).map(e=>e.item),t)},command:({editor:e,range:t,props:n})=>{try{e.chain().focus().deleteRange(t).run()}catch(e){console.error(`[slash-command] deleteRange failed for "${n.name}"`,e);return}try{n.command(e)}catch(e){console.error(`[slash-command] command "${n.name}" threw an error`,e)}},render:()=>{let t=null,n=null,r=0,i={popup:null,stopAutoUpdate:null},a=null,o=e=>{e!==r&&(r=e,s())},s=()=>{!t||!n||t.updateProps({items:n.items,selectedIndex:r,categoryLabels:e.options.categoryLabels,onSelect:n.command,onHoverIndex:o})};return{onStart(s){n=s,r=0;let c=ov(()=>n,`slash-command`);i.popup=c.popup,a=c.doPosition,t=new dc(xz,{props:{items:s.items,selectedIndex:r,categoryLabels:e.options.categoryLabels,onSelect:s.command,onHoverIndex:o},editor:s.editor}),c.popup.appendChild(t.element),i.stopAutoUpdate=c.startAutoUpdate(),c.reveal()},onUpdate(e){n=e,r=Math.min(r,Math.max(0,e.items.length-1)),s(),a?.()},onKeyDown({event:e}){if(!n||n.items.length===0)return!1;let t=n.items;if(e.key===`ArrowDown`)return r=(r+1)%t.length,s(),!0;if(e.key===`ArrowUp`)return r=(r-1+t.length)%t.length,s(),!0;if(e.key===`Enter`||e.key===`Tab`){let e=t[r];return e&&n.command(e),!0}return e.key,!1},onExit(){sv(i),a=null,t?.destroy(),t=null,n=null,r=0}}}})]}}),Ez=new z(`sourceDirty`),Dz=rt.create({name:`sourceDirtyObserver`,addProseMirrorPlugins(){return[new L({key:Ez,appendTransaction(e,t,n){if(!e.some(e=>!e.getMeta(hT))||!e.some(e=>e.docChanged))return null;let r=new F;for(let t of e)r.appendMapping(t.mapping);let i=r.invert(),a=[];if(n.doc.descendants((e,n)=>{if(e.type.name!==`jsxComponent`||e.attrs.sourceDirty)return;let r=i.map(n),o=t.doc.nodeAt(r),s=!o||o.type.name!==`jsxComponent`,c=typeof e.attrs.sourceRaw==`string`&&e.attrs.sourceRaw.length>0;if(s&&c)return;if(!o){(e.content.size>0||Object.keys(e.attrs.props??{}).length>0)&&a.push({pos:n});return}if(o.type.name!==`jsxComponent`){a.push({pos:n});return}let l=!Oz(o.attrs.props,e.attrs.props),u=!o.content.eq(e.content);(l||u)&&a.push({pos:n})}),a.length===0)return null;let o=n.tr;for(let{pos:e}of a)o.setNodeAttribute(e,`sourceDirty`,!0);return o}})]}});function Oz(e,t){if(Object.is(e,t))return!0;if(e==null||t==null||typeof e!=typeof t||typeof e!=`object`)return!1;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!Oz(e[n],t[n]))return!1;return!0}let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Oz(e[r],t[r]))return!1;return!0}var kz=`ok:tag-click`;function Az(e){if(typeof document>`u`)return;let t={value:e};document.dispatchEvent(new CustomEvent(kz,{detail:t}))}function jz(e){return e instanceof Element?e.closest(`a[data-tag]`):null}var Mz=rt.create({name:`tagClick`,addProseMirrorPlugins(){return[new L({props:{handleDOMEvents:{click(e,t){let n=jz(t.target);if(!n)return!1;let r=n.getAttribute(`data-tag`);return r?(t.preventDefault(),t.stopPropagation(),Az(r),!0):!1}}}})]}}),Nz={name:`Tag`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,category:`content`,description:`Inline tag`,props:[{name:`value`,type:`string`,required:!0,autoFocus:!0,description:`Tag name (without #)`}]};function Pz(e){let t=(0,Y.c)(2),{hint:n}=e,r;return t[0]===n?r=t[1]:(r=(0,J.jsx)(`span`,{className:`tag tag-placeholder inline-flex items-center rounded-sm border border-dashed border-muted-foreground/40 bg-muted/30 px-1.5 py-0.5 text-xs italic text-muted-foreground hover:bg-muted/60 cursor-pointer`,"data-component-type":`tag-placeholder`,children:n}),t[0]=n,t[1]=r),r}function Fz(e){let t=(0,Y.c)(3),{value:n}=e,r=`#tag/${n}`,i;return t[0]!==r||t[1]!==n?(i=(0,J.jsxs)(`a`,{className:`tag`,"data-tag":n,href:r,children:[`#`,n]}),t[0]=r,t[1]=n,t[2]=i):i=t[2],i}function Iz(e){let t=(0,Y.c)(31),{node:n,selected:r,getPos:i,editor:a}=e,o=typeof n.attrs.value==`string`?n.attrs.value:``,[s,c]=(0,q.useState)(!1),l=(0,q.useRef)(!1),[u,d]=(0,q.useState)(null),f,p;t[0]!==i||t[1]!==r?(f=()=>{r&&!l.current?(iT(typeof i==`function`?i()??0:0),c(!0)):!r&&l.current&&(c(!1),d(null)),l.current=r},p=[r,i],t[0]=i,t[1]=r,t[2]=f,t[3]=p):(f=t[2],p=t[3]),(0,q.useEffect)(f,p);let m=r?`tag-inline-selected`:void 0,h;t[4]===o?h=t[5]:(h=(0,J.jsx)(MA,{asChild:!0,children:(0,J.jsx)(`span`,{className:`tag-inline-trigger`,"data-component-type":`tag-inline`,children:o?(0,J.jsx)(Fz,{value:o}):(0,J.jsx)(Pz,{hint:`#tag-name`})})}),t[4]=o,t[5]=h);let g;t[6]===a.view?g=t[7]:(g=e=>{e.preventDefault(),a.view.focus()},t[6]=a.view,t[7]=g);let _;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,J.jsx)(`div`,{className:`text-xs font-medium text-muted-foreground px-3 pt-2`,children:`Tag Properties`}),t[8]=_):_=t[8];let v;t[9]===o?v=t[10]:(v={value:o},t[9]=o,t[10]=v);let y;t[11]!==a.state||t[12]!==a.view||t[13]!==i?(y=(e,t)=>{if(e!==`value`)return;let n=typeof t==`string`?t:``;if(n!==``&&!b.test(n)){d(`Tag must match ${b.source} (letter then word/-//).`);return}d(null);let r=typeof i==`function`?i():void 0;if(typeof r!=`number`)return;let o=a.state.doc.nodeAt(r);if(!o||o.type.name!==`tag`)return;let s=a.state.tr.setNodeMarkup(r,null,{...o.attrs,value:n});s.setSelection(We.create(s.doc,r)),a.view.dispatch(s)},t[11]=a.state,t[12]=a.view,t[13]=i,t[14]=y):y=t[14];let x;t[15]!==v||t[16]!==y?(x=(0,J.jsx)(sj,{descriptor:Nz,values:v,onChange:y}),t[15]=v,t[16]=y,t[17]=x):x=t[17];let S;t[18]===u?S=t[19]:(S=u?(0,J.jsx)(`div`,{className:`px-3 pb-2 text-xs text-destructive`,"data-testid":`tag-validation-error`,role:`alert`,children:u}):null,t[18]=u,t[19]=S);let C;t[20]!==S||t[21]!==g||t[22]!==x?(C=(0,J.jsxs)(NA,{className:`z-60 w-72 p-0`,side:`bottom`,align:`start`,onOpenAutoFocus:Lz,onCloseAutoFocus:g,children:[_,x,S]}),t[20]=S,t[21]=g,t[22]=x,t[23]=C):C=t[23];let w;t[24]!==s||t[25]!==C||t[26]!==h?(w=(0,J.jsxs)(jA,{open:s,onOpenChange:c,children:[h,C]}),t[24]=s,t[25]=C,t[26]=h,t[27]=w):w=t[27];let T;return t[28]!==w||t[29]!==m?(T=(0,J.jsx)(ac,{as:`span`,className:m,children:w}),t[28]=w,t[29]=m,t[30]=T):T=t[30],T}function Lz(e){e.preventDefault()}var Rz=he.extend({priority:200,addNodeView(){return pc(Iz)},addKeyboardShortcuts(){return{Backspace:()=>{if(cv.getState(this.editor.state)?.active)return!1;let{selection:e}=this.editor.state;if(!e.empty)return!1;let t=e.$from.nodeBefore;if(t?.type.name===`tag`){let{state:n,view:r}=this.editor;return r.dispatch(n.tr.delete(e.from-t.nodeSize,e.from)),!0}return!1},Delete:()=>{if(cv.getState(this.editor.state)?.active)return!1;let{selection:e}=this.editor.state;if(!e.empty)return!1;let t=e.$from.nodeAfter;if(t?.type.name===`tag`){let{state:n,view:r}=this.editor;return r.dispatch(n.tr.delete(e.from,e.from+t.nodeSize)),!0}return!1}}},addProseMirrorPlugins(){return[hv(this.editor)]}});function zz(e){let t=(0,Y.c)(116),{open:n,target:r,alias:i,anchor:a,pages:o,assetPaths:s,onOpenChange:c,onSave:l}=e,[u,d]=(0,q.useState)(r),[f,p]=(0,q.useState)(i??``),[m,h]=(0,q.useState)(a??``),g=(0,q.useId)(),_=(0,q.useId)(),v=(0,q.useId)(),y=(0,q.useId)(),b;t[0]!==s||t[1]!==u?(b=lC(u,s),t[0]=s,t[1]=u,t[2]=b):b=t[2];let x=b,S;t[3]!==s||t[4]!==u||t[5]!==o?(S=uC(u,o,s),t[3]=s,t[4]=u,t[5]=o,t[6]=S):S=t[6];let C=mA(u,S&&!x&&n),w,T;t[7]!==i||t[8]!==a||t[9]!==n||t[10]!==r?(w=()=>{n&&(d(r),p(i??``),h(a??``))},T=[n,r,i,a],t[7]=i,t[8]=a,t[9]=n,t[10]=r,t[11]=w,t[12]=T):(w=t[11],T=t[12]),(0,q.useEffect)(w,T);let E;t[13]!==f||t[14]!==m||t[15]!==u||t[16]!==c||t[17]!==l?(E=function(){let e=u.trim();e&&(l(e,f.trim()||null,m.trim()||null),c(!1))},t[13]=f,t[14]=m,t[15]=u,t[16]=c,t[17]=l,t[18]=E):E=t[18];let D=E,O;t[19]===D?O=t[20]:(O=function(e){e.key===`Enter`&&D()},t[19]=D,t[20]=O);let k=O,A,j,M,N,P,F,I,L,R,z,B,V,H,U,W,ee;if(t[21]!==_||t[22]!==m||t[23]!==u||t[24]!==k||t[25]!==y||t[26]!==C||t[27]!==c||t[28]!==n||t[29]!==g){let e=new Map,r=C?.map(t=>{let n=e.get(t.slug)??0;e.set(t.slug,n+1);let r=n===0?t.slug:`${t.slug}-${n}`;return{...t,reactKey:r}}),i=!!r?.length;M=Zt,V=n,H=c,j=en,t[46]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,J.jsx)(qt,{className:`fixed inset-0 z-50 bg-black/40 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`}),t[46]=B):B=t[46],A=rn,F=`dialog-content`,I=``,L=`fixed left-1/2 top-1/2 z-50 w-full max-w-md -translate-x-1/2 -translate-y-1/2 rounded-lg border border-border bg-background p-6 shadow-xl data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,t[47]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,J.jsx)(Yt,{className:`mb-1 text-base font-semibold`,children:`Edit wiki link`}),z=(0,J.jsx)(Kt,{className:`mb-4 text-sm text-muted-foreground`,children:`Modify the link target, anchor, and display label.`}),t[47]=R,t[48]=z):(R=t[47],z=t[48]),N=`mb-4 space-y-6`;let a;t[49]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,J.jsx)(`span`,{className:`text-red-500`,children:`*`}),t[49]=a):a=t[49];let o;t[50]===g?o=t[51]:(o=(0,J.jsxs)(`label`,{className:`mb-1.5 block text-sm font-medium`,htmlFor:g,children:[`Page `,a]}),t[50]=g,t[51]=o);let s;t[52]===Symbol.for(`react.memo_cache_sentinel`)?(s=e=>d(e.target.value),t[52]=s):s=t[52];let l;t[53]!==u||t[54]!==k||t[55]!==g?(l=(0,J.jsx)(Ro,{id:g,value:u,onChange:s,placeholder:`page-name`,autoFocus:!0,"aria-required":`true`,onKeyDown:k}),t[53]=u,t[54]=k,t[55]=g,t[56]=l):l=t[56],t[57]!==o||t[58]!==l?(P=(0,J.jsxs)(`div`,{children:[o,l]}),t[57]=o,t[58]=l,t[59]=P):P=t[59];let f;t[60]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,J.jsx)(`span`,{className:`font-normal text-muted-foreground`,children:`(optional heading anchor)`}),t[60]=f):f=t[60],t[61]===_?U=t[62]:(U=(0,J.jsxs)(`label`,{className:`mb-1.5 block text-sm font-medium`,htmlFor:_,children:[`Section`,` `,f]}),t[61]=_,t[62]=U);let p;t[63]===Symbol.for(`react.memo_cache_sentinel`)?(p=e=>h(e.target.value),t[63]=p):p=t[63],t[64]!==_||t[65]!==m||t[66]!==k?(W=(0,J.jsx)(Ro,{id:_,value:m,onChange:p,placeholder:`heading-slug`,onKeyDown:k}),t[64]=_,t[65]=m,t[66]=k,t[67]=W):W=t[67],ee=i&&(0,J.jsx)(`div`,{role:`listbox`,id:y,"aria-label":`Heading anchors`,className:`mt-1.5 max-h-36 overflow-y-auto subtle-scrollbar rounded-md border border-border bg-muted/30`,children:r.map(e=>(0,J.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":m===e.slug,className:Ft(`flex w-full items-center gap-2 px-2 py-1 text-left text-sm hover:bg-accent hover:text-accent-foreground`,m===e.slug&&`bg-accent text-accent-foreground`),style:{paddingLeft:`${(e.level-1)*12+8}px`},onClick:()=>h(m===e.slug?``:e.slug),children:[(0,J.jsxs)(`span`,{className:`w-7 shrink-0 font-mono text-[10px] text-muted-foreground`,children:[`H`,e.level]}),(0,J.jsx)(`span`,{className:`truncate`,children:e.text})]},e.reactKey))}),t[21]=_,t[22]=m,t[23]=u,t[24]=k,t[25]=y,t[26]=C,t[27]=c,t[28]=n,t[29]=g,t[30]=A,t[31]=j,t[32]=M,t[33]=N,t[34]=P,t[35]=F,t[36]=I,t[37]=L,t[38]=R,t[39]=z,t[40]=B,t[41]=V,t[42]=H,t[43]=U,t[44]=W,t[45]=ee}else A=t[30],j=t[31],M=t[32],N=t[33],P=t[34],F=t[35],I=t[36],L=t[37],R=t[38],z=t[39],B=t[40],V=t[41],H=t[42],U=t[43],W=t[44],ee=t[45];let te;t[68]!==U||t[69]!==W||t[70]!==ee?(te=(0,J.jsxs)(`div`,{children:[U,W,ee]}),t[68]=U,t[69]=W,t[70]=ee,t[71]=te):te=t[71];let ne;t[72]===Symbol.for(`react.memo_cache_sentinel`)?(ne=(0,J.jsx)(`span`,{className:`font-normal text-muted-foreground`,children:`(optional display text)`}),t[72]=ne):ne=t[72];let re;t[73]===v?re=t[74]:(re=(0,J.jsxs)(`label`,{className:`mb-1.5 block text-sm font-medium`,htmlFor:v,children:[`Label`,` `,ne]}),t[73]=v,t[74]=re);let ie;t[75]===Symbol.for(`react.memo_cache_sentinel`)?(ie=e=>p(e.target.value),t[75]=ie):ie=t[75];let ae;t[76]!==v||t[77]!==f||t[78]!==k?(ae=(0,J.jsx)(Ro,{id:v,value:f,onChange:ie,placeholder:`Custom display text`,onKeyDown:k}),t[76]=v,t[77]=f,t[78]=k,t[79]=ae):ae=t[79];let oe;t[80]!==re||t[81]!==ae?(oe=(0,J.jsxs)(`div`,{children:[re,ae]}),t[80]=re,t[81]=ae,t[82]=oe):oe=t[82];let se;t[83]!==N||t[84]!==P||t[85]!==te||t[86]!==oe?(se=(0,J.jsxs)(`div`,{className:N,children:[P,te,oe]}),t[83]=N,t[84]=P,t[85]=te,t[86]=oe,t[87]=se):se=t[87];let ce;t[88]===c?ce=t[89]:(ce=(0,J.jsx)(Lt,{variant:`outline`,onClick:()=>c(!1),children:`Cancel`}),t[88]=c,t[89]=ce);let le;t[90]===u?le=t[91]:(le=u.trim(),t[90]=u,t[91]=le);let ue=!le,de;t[92]!==D||t[93]!==ue?(de=(0,J.jsx)(Lt,{onClick:D,disabled:ue,children:`Save`}),t[92]=D,t[93]=ue,t[94]=de):de=t[94];let fe;t[95]!==ce||t[96]!==de?(fe=(0,J.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[ce,de]}),t[95]=ce,t[96]=de,t[97]=fe):fe=t[97];let pe;t[98]!==A||t[99]!==F||t[100]!==I||t[101]!==L||t[102]!==R||t[103]!==z||t[104]!==se||t[105]!==fe?(pe=(0,J.jsxs)(A,{"data-slot":F,"data-ok-layer-spawned":I,className:L,children:[R,z,se,fe]}),t[98]=A,t[99]=F,t[100]=I,t[101]=L,t[102]=R,t[103]=z,t[104]=se,t[105]=fe,t[106]=pe):pe=t[106];let me;t[107]!==j||t[108]!==B||t[109]!==pe?(me=(0,J.jsxs)(j,{children:[B,pe]}),t[107]=j,t[108]=B,t[109]=pe,t[110]=me):me=t[110];let he;return t[111]!==M||t[112]!==V||t[113]!==H||t[114]!==me?(he=(0,J.jsx)(M,{open:V,onOpenChange:H,children:me}),t[111]=M,t[112]=V,t[113]=H,t[114]=me,t[115]=he):he=t[115],he}function Bz(e){let t=(0,Y.c)(135),{editor:n,getPos:r,onClose:i}=e,a=r(),o=a==null?null:n.state.doc.nodeAt(a),s=String(o?.attrs.target??``),c=ot(o?.attrs.alias),l=ot(o?.attrs.anchor),u=y({target:s,alias:c,anchor:l}),{assetPaths:d,folderPaths:f,pages:p,pagesBySlug:m,loading:h}=Te(),g=ht(s,l),_=g?.kind===`external`?g:null,b=g?.kind===`asset`?lC(g.url,d):null,x=b?null:Dk(s,{pages:p,folderPaths:f,pagesBySlug:m,fallbackTargets:sC(s)}),[S,C]=(0,q.useState)(!1),[w,T]=(0,q.useState)(null),E=x?Ok(x):null;if(!o)return null;let D;t[0]!==n.state||t[1]!==n.view||t[2]!==r?(D=function(e,t,i){let a=r();a!=null&&n.view.dispatch(n.state.tr.setNodeMarkup(a,void 0,{...n.state.doc.nodeAt(a)?.attrs,target:e,alias:t,anchor:i}))},t[0]=n.state,t[1]=n.view,t[2]=r,t[3]=D):D=t[3];let O=D,k;t[4]!==n.state||t[5]!==n.view||t[6]!==r||t[7]!==i?(k=function(){let e=r();if(e==null)return;let t=n.state.doc.nodeAt(e);t&&(n.view.dispatch(n.state.tr.delete(e,e+t.nodeSize)),i())},t[4]=n.state,t[5]=n.view,t[6]=r,t[7]=i,t[8]=k):k=t[8];let A=k,j;t[9]!==l||t[10]!==b||t[11]!==_||t[12]!==x||t[13]!==T?(j=function(e){if(_){dk(_.url)?window.open(_.url,`_blank`,`noopener,noreferrer`):console.warn(`[safe-nav] blocked non-safe scheme:`,_.url);return}if(b){let t=st(b);e.newTab?window.open(t,`_blank`,`noopener,noreferrer`):window.location.hash=t;return}if(!x)return;if(x.kind===`create`){T(`missing`);return}let t=x.hashDocName;if(e.newTab){_k({docName:t,anchor:l});return}if(l){let e=window.location.hash.match(/^#\/([^?#/]+)/);if((e?decodeURIComponent(e[1]):null)===t){let e=document.getElementById(l);e&&e.scrollIntoView({behavior:`smooth`,block:`start`})}window.location.hash=`#/${t}?anchor=${encodeURIComponent(l)}`;return}window.location.hash=`#/${t}`},t[9]=l,t[10]=b,t[11]=_,t[12]=x,t[13]=T,t[14]=j):j=t[14];let M=j,N;t[15]!==c||t[16]!==w||t[17]!==n.state||t[18]!==n.view||t[19]!==r||t[20]!==u||t[21]!==s?(N=function(e){if(w===`missing`&&e!==s){let t=r();if(t==null)return;n.view.dispatch(n.state.tr.setNodeMarkup(t,void 0,{...n.state.doc.nodeAt(t)?.attrs,target:e,alias:c??u}))}},t[15]=c,t[16]=w,t[17]=n.state,t[18]=n.view,t[19]=r,t[20]=u,t[21]=s,t[22]=N):N=t[22];let P=N,F=!_&&!h&&b!==null,I=!_&&!h&&x?.kind===`navigate`&&x.displayState===`resolved`,L=!_&&!h&&x?.kind===`navigate`&&x.displayState===`folder`,R=!_&&!h&&!b&&x?.kind===`create`,z,B,V,H,U,W,ee,te,ne,re;if(t[23]!==n.state||t[24]!==n.view||t[25]!==_||t[26]!==r||t[27]!==F||t[28]!==L||t[29]!==I||t[30]!==R||t[31]!==h||t[32]!==i){if(h){let e;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,J.jsx)(Ir,{className:`size-3.5 shrink-0 animate-spin`,"aria-hidden":`true`}),t[43]=e):e=t[43],B={icon:e,text:`Loading…`,className:`text-muted-foreground`}}else if(_){let e;t[44]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,J.jsx)(br,{className:`size-3.5 shrink-0`,"aria-hidden":`true`}),t[44]=e):e=t[44],B={icon:e,text:`External wiki link`,className:`text-foreground`}}else if(F){let e;t[45]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,J.jsx)(xr,{className:`size-3.5 shrink-0`,"aria-hidden":`true`}),t[45]=e):e=t[45],B={icon:e,text:`Asset`,className:`text-foreground`}}else if(L){let e;t[46]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,J.jsx)(Tr,{className:`size-3.5 shrink-0`,"aria-hidden":`true`}),t[46]=e):e=t[46],B={icon:e,text:`Folder (no index)`,className:`text-foreground`}}else if(R){let e;t[47]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,J.jsx)(hr,{className:`size-3.5 shrink-0`,"aria-hidden":`true`}),t[47]=e):e=t[47],B={icon:e,text:`Page not found`,className:`text-red-700 dark:text-red-300`}}else if(I){let e;t[48]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,J.jsx)(Cr,{className:`size-3.5 shrink-0`,"aria-hidden":`true`}),t[48]=e):e=t[48],B={icon:e,text:`Wiki link`,className:`text-foreground`}}else{let e;t[49]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,J.jsx)(hr,{className:`size-3.5 shrink-0`,"aria-hidden":`true`}),t[49]=e):e=t[49],B={icon:e,text:`Unrecognized wiki link`,className:`text-muted-foreground`}}let e;t[50]!==n.state||t[51]!==n.view||t[52]!==r?(e=()=>{let e=r();if(typeof e!=`number`)return new DOMRect;let t=n.state.doc.nodeAt(e);if(!t)return new DOMRect;try{return v(n.view,e,e+t.nodeSize)}catch{return new DOMRect}},t[50]=n.state,t[51]=n.view,t[52]=r,t[53]=e):e=t[53];let a;t[54]!==n.view.dom||t[55]!==e?(a={getBoundingClientRect:e,contextElement:n.view.dom},t[54]=n.view.dom,t[55]=e,t[56]=a):a=t[56];let o=a;z=Tk,re=`wiki-link`,V=`Wiki link options`,H=i,U=o,te=`mb-2 flex items-start gap-2 pr-8`,ne=(0,J.jsx)(`div`,{className:Ft(`mt-0.5 flex shrink-0`,B.className),children:B.icon}),ee=`flex-1 min-w-0`,W=Ft(`text-sm font-medium`,B.className),t[23]=n.state,t[24]=n.view,t[25]=_,t[26]=r,t[27]=F,t[28]=L,t[29]=I,t[30]=R,t[31]=h,t[32]=i,t[33]=z,t[34]=B,t[35]=V,t[36]=H,t[37]=U,t[38]=W,t[39]=ee,t[40]=te,t[41]=ne,t[42]=re}else z=t[33],B=t[34],V=t[35],H=t[36],U=t[37],W=t[38],ee=t[39],te=t[40],ne=t[41],re=t[42];let ie;t[57]!==B.text||t[58]!==W?(ie=(0,J.jsx)(`div`,{className:W,children:B.text}),t[57]=B.text,t[58]=W,t[59]=ie):ie=t[59];let ae=b??(_?_.url:`${s}${l?`#${l}`:``}`),oe=b??(_?_.url:`${s}${l?`#${l}`:``}`),se;t[60]!==ae||t[61]!==oe?(se=(0,J.jsx)(`div`,{className:`truncate font-mono text-xs text-muted-foreground`,title:ae,children:oe}),t[60]=ae,t[61]=oe,t[62]=se):se=t[62];let ce;t[63]!==ie||t[64]!==se||t[65]!==ee?(ce=(0,J.jsxs)(`div`,{className:ee,children:[ie,se]}),t[63]=ie,t[64]=se,t[65]=ee,t[66]=ce):ce=t[66];let le;t[67]!==ce||t[68]!==te||t[69]!==ne?(le=(0,J.jsxs)(`div`,{className:te,children:[ne,ce]}),t[67]=ce,t[68]=te,t[69]=ne,t[70]=le):le=t[70];let ue;t[71]!==_||t[72]!==M||t[73]!==R||t[74]!==i?(ue=R?null:(0,J.jsx)(Lt,{size:`sm`,variant:`default`,onClick:()=>{M({}),i()},children:_?`Open in new tab`:`Open`}),t[71]=_,t[72]=M,t[73]=R,t[74]=i,t[75]=ue):ue=t[75];let de;t[76]!==R||t[77]!==T?(de=R?(0,J.jsx)(Lt,{size:`sm`,variant:`default`,onClick:()=>T(`missing`),children:`Create page`}):null,t[76]=R,t[77]=T,t[78]=de):de=t[78];let fe;t[79]!==E||t[80]!==L||t[81]!==T?(fe=L&&E?(0,J.jsxs)(Lt,{size:`sm`,variant:`outline`,onClick:()=>T(`folder-index`),children:[(0,J.jsx)(Sr,{className:`size-3.5`,"aria-hidden":`true`}),`Create index`]}):null,t[79]=E,t[80]=L,t[81]=T,t[82]=fe):fe=t[82];let pe;t[83]===Symbol.for(`react.memo_cache_sentinel`)?(pe=(0,J.jsx)(`div`,{className:`flex-1`}),t[83]=pe):pe=t[83];let me;t[84]===C?me=t[85]:(me=()=>C(!0),t[84]=C,t[85]=me);let he;t[86]===Symbol.for(`react.memo_cache_sentinel`)?(he=(0,J.jsx)(Vr,{className:`size-3.5`,"aria-hidden":`true`}),t[86]=he):he=t[86];let ge;t[87]===me?ge=t[88]:(ge=(0,J.jsxs)(Lt,{size:`sm`,variant:`outline`,onClick:me,children:[he,`Edit`]}),t[87]=me,t[88]=ge);let _e;t[89]===R?_e=t[90]:(_e=R?(0,J.jsx)(Yr,{className:`size-3.5`,"aria-hidden":`true`}):(0,J.jsx)(Jr,{className:`size-3.5`,"aria-hidden":`true`}),t[89]=R,t[90]=_e);let ve=R?`Unlink`:`Remove`,ye;t[91]!==A||t[92]!==_e||t[93]!==ve?(ye=(0,J.jsxs)(Lt,{size:`sm`,variant:`destructive`,onClick:A,children:[_e,ve]}),t[91]=A,t[92]=_e,t[93]=ve,t[94]=ye):ye=t[94];let be;t[95]!==ue||t[96]!==de||t[97]!==fe||t[98]!==ge||t[99]!==ye?(be=(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[ue,de,fe,pe,ge,ye]}),t[95]=ue,t[96]=de,t[97]=fe,t[98]=ge,t[99]=ye,t[100]=be):be=t[100];let xe;t[101]!==z||t[102]!==V||t[103]!==H||t[104]!==U||t[105]!==le||t[106]!==be||t[107]!==re?(xe=(0,J.jsxs)(z,{kind:re,ariaLabel:V,onDeactivate:H,triggerReference:U,children:[le,be]}),t[101]=z,t[102]=V,t[103]=H,t[104]=U,t[105]=le,t[106]=be,t[107]=re,t[108]=xe):xe=t[108];let Se=w!==null,Ce;t[109]===T?Ce=t[110]:(Ce=e=>{e||T(null)},t[109]=T,t[110]=Ce);let we=w===`folder-index`&&E?E.initialDir:x?.kind===`create`?x.initialDir:``,Ee=w===`folder-index`&&E?E.suggestedName:x?.kind===`create`?x.suggestedName:void 0,De;t[111]!==w||t[112]!==E||t[113]!==s?(De=w===`folder-index`&&E?(0,J.jsxs)(J.Fragment,{children:[`Create an index note for`,` `,(0,J.jsxs)(`span`,{className:`font-medium text-foreground`,children:[E.initialDir,`/`]})]}):(0,J.jsxs)(J.Fragment,{children:[`Create a page for `,(0,J.jsx)(`span`,{className:`font-medium text-foreground`,children:s})]}),t[111]=w,t[112]=E,t[113]=s,t[114]=De):De=t[114];let Oe;t[115]!==P||t[116]!==Se||t[117]!==Ce||t[118]!==we||t[119]!==Ee||t[120]!==De?(Oe=(0,J.jsx)(Cv,{open:Se,onOpenChange:Ce,kind:`file`,initialDir:we,suggestedName:Ee,description:De,onCreated:P}),t[115]=P,t[116]=Se,t[117]=Ce,t[118]=we,t[119]=Ee,t[120]=De,t[121]=Oe):Oe=t[121];let ke;t[122]!==c||t[123]!==l||t[124]!==d||t[125]!==S||t[126]!==O||t[127]!==p||t[128]!==C||t[129]!==s?(ke=(0,J.jsx)(zz,{open:S,target:s,alias:c,anchor:l,pages:p,assetPaths:d,onOpenChange:C,onSave:O}),t[122]=c,t[123]=l,t[124]=d,t[125]=S,t[126]=O,t[127]=p,t[128]=C,t[129]=s,t[130]=ke):ke=t[130];let Ae;return t[131]!==xe||t[132]!==Oe||t[133]!==ke?(Ae=(0,J.jsxs)(J.Fragment,{children:[xe,Oe,ke]}),t[131]=xe,t[132]=Oe,t[133]=ke,t[134]=Ae):Ae=t[134],Ae}var Vz=0;function Hz(){return`wiki-link-${++Vz}`}function Uz(e){let t=e.doc??(typeof document<`u`?document:{createElement:null,createTextNode:null}),n=t.createElement(`span`);n.setAttribute(`data-wiki-link`,``),n.setAttribute(`data-node-id`,e.nodeId),n.setAttribute(`data-target`,e.target),n.setAttribute(`data-alias`,e.alias??``),n.setAttribute(`data-anchor`,e.anchor??``),n.setAttribute(`contenteditable`,`false`),n.setAttribute(`role`,`button`),n.setAttribute(`tabindex`,`0`),n.setAttribute(`aria-label`,`Wiki link: ${e.target}${e.anchor?`#${e.anchor}`:``}`),n.classList.add(`wiki-link-chip`),n.style.touchAction=`manipulation`;let r=e.alias??`${e.target}${e.anchor?`#${e.anchor}`:``}`,i=t.createTextNode(r);return n.appendChild(i),{dom:n}}var Wz=o.extend({priority:200,addOptions(){return{...this.parent?.(),docName:``}},addNodeView(){return({editor:e,node:t,getPos:n})=>{let r=Hz(),{dom:i}=Uz({nodeId:r,target:String(t.attrs.target??``),alias:t.attrs.alias==null?null:String(t.attrs.alias),anchor:t.attrs.anchor==null?null:String(t.attrs.anchor)}),a=t,o=()=>{let e=n();return typeof e==`number`?e:void 0},s=Lk(e);return s.register({type:`wikiLink`,nodeId:r,getPos:o,controls:{propPanel:t=>(0,q.createElement)(Bz,{editor:e,getPos:o,onClose:t.deactivate})},handlePrimary:({newTab:e})=>{let t=a.attrs,n=typeof t.target==`string`?t.target:``;if(!n)return!1;let r=ht(n,typeof t.anchor==`string`?t.anchor:null);if(!r)return!1;if(r.kind===`doc`)return e?(_k({docName:r.docName,anchor:r.anchor}),!0):!1;if(r.kind===`asset`){let t=lC(r.url,Re()?.assetPaths??new Set)??r.url.replace(/^\//,``);return e?hk(st(t)):window.location.hash=st(t),!0}return!e||!dk(r.url)?!1:(hk(r.url),!0)}}),{dom:i,ignoreMutation:()=>!0,update:e=>{if(e.type.name!==`wikiLink`)return!1;a=e;let t=String(e.attrs.target??``),n=e.attrs.alias==null?null:String(e.attrs.alias),r=e.attrs.anchor==null?null:String(e.attrs.anchor);return i.setAttribute(`data-target`,t),i.setAttribute(`data-alias`,n??``),i.setAttribute(`data-anchor`,r??``),i.setAttribute(`aria-label`,`Wiki link: ${t}${r?`#${r}`:``}`),i.textContent=n??`${t}${r?`#${r}`:``}`,!0},destroy:()=>{s.deregister(r)}}}},addKeyboardShortcuts(){return{Backspace:()=>{if(Qk.getState(this.editor.state)?.active)return!1;let{selection:e}=this.editor.state;if(!e.empty)return!1;let t=e.$from.nodeBefore;if(t?.type.name===`wikiLink`){let{state:n,view:r}=this.editor;return r.dispatch(n.tr.delete(e.from-t.nodeSize,e.from)),!0}return!1},Delete:()=>{if(Qk.getState(this.editor.state)?.active)return!1;let{selection:e}=this.editor.state;if(!e.empty)return!1;let t=e.$from.nodeAfter;if(t?.type.name===`wikiLink`){let{state:n,view:r}=this.editor;return r.dispatch(n.tr.delete(e.from,e.from+t.nodeSize)),!0}return!1}}},addProseMirrorPlugins(){return[pA(this.editor)]}}),Gz=0;function Kz(){return`wiki-link-embed-${++Gz}`}function qz(e){let t=e.doc??(typeof document<`u`?document:{createElement:null,createTextNode:null}),n=t.createElement(`a`);n.setAttribute(`data-wiki-embed`,``),n.setAttribute(`data-node-id`,e.nodeId),n.setAttribute(`data-target`,e.target),n.setAttribute(`data-alias`,e.alias??``),n.setAttribute(`data-anchor`,e.anchor??``),n.setAttribute(`href`,e.href),n.setAttribute(`target`,`_blank`),n.setAttribute(`rel`,`noopener noreferrer`),n.setAttribute(`contenteditable`,`false`),n.setAttribute(`role`,`button`),n.setAttribute(`tabindex`,`0`),n.setAttribute(`aria-label`,`Embed: ${e.target}${e.anchor?`#${e.anchor}`:``}`),n.classList.add(`wiki-link-embed-chip`),n.style.touchAction=`manipulation`;let r=e.alias??`${e.target}${e.anchor?`#${e.anchor}`:``}`,i=t.createTextNode(r);return n.appendChild(i),{dom:n}}function Jz(e){let t=(e.doc??(typeof document<`u`?document:{createElement:null})).createElement(`img`);return t.setAttribute(`data-wiki-embed`,``),t.setAttribute(`data-node-id`,e.nodeId),t.setAttribute(`data-target`,e.target),t.setAttribute(`data-alias`,e.alias??``),t.setAttribute(`src`,e.src),t.setAttribute(`alt`,e.alias??e.target),{dom:t}}function Yz(e){let t=yt(e);return t!==null&&ie.has(t)}var Xz=Me.extend({addNodeView(){return({editor:e,node:t,getPos:n})=>{let r=Kz(),i=t,a=String(t.attrs.target??``),o=t.attrs.alias==null?null:String(t.attrs.alias),s=t.attrs.anchor==null?null:String(t.attrs.anchor),c=t.attrs.resolvedSrc==null?null:String(t.attrs.resolvedSrc);if(Yz(a)){let{dom:e}=Jz({nodeId:r,target:a,alias:o,src:c??a});return{dom:e,ignoreMutation:()=>!0,update:t=>{if(t.type.name!==`wikiLinkEmbed`)return!1;i=t;let n=String(t.attrs.target??``),r=t.attrs.alias==null?null:String(t.attrs.alias),a=t.attrs.resolvedSrc==null?null:String(t.attrs.resolvedSrc);if(!Yz(n))return!1;let o=a??n;return e.setAttribute(`data-target`,n),e.setAttribute(`data-alias`,r??``),e.setAttribute(`src`,o),e.setAttribute(`alt`,r??n),!0}}}let{dom:l}=qz({nodeId:r,target:a,alias:o,anchor:s,href:c??a});l.addEventListener(`click`,e=>{e.preventDefault()});let u=()=>{let e=n();return typeof e==`number`?e:void 0},d=Lk(e);return d.register({type:`wikiLinkEmbed`,nodeId:r,getPos:u,controls:{},handlePrimary:({newTab:e})=>{let t=i.attrs,n=typeof t.target==`string`?t.target:``;if(!n)return!1;let r=(typeof t.resolvedSrc==`string`&&t.resolvedSrc.length>0?t.resolvedSrc:null)??n,a=yt(n);if(a===null)return!1;let o=ye(r,``)??n;return lk({url:r,projectRelPath:o,ext:a,title:o.split(`/`).pop()??r,forceOsDelegation:e}),!0}}),{dom:l,ignoreMutation:()=>!0,update:e=>{if(e.type.name!==`wikiLinkEmbed`)return!1;i=e;let t=String(e.attrs.target??``);if(Yz(t))return!1;let n=e.attrs.alias==null?null:String(e.attrs.alias),r=e.attrs.anchor==null?null:String(e.attrs.anchor),a=(e.attrs.resolvedSrc==null?null:String(e.attrs.resolvedSrc))??t;return l.setAttribute(`data-target`,t),l.setAttribute(`data-alias`,n??``),l.setAttribute(`data-anchor`,r??``),l.setAttribute(`href`,a),l.setAttribute(`aria-label`,`Embed: ${t}${r?`#${r}`:``}`),l.textContent=n??`${t}${r?`#${r}`:``}`,!0},destroy:()=>{d.deregister(r)}}}}}),Zz=[...c.map(e=>e.name===`jsxComponent`?cM:e.name===`rawMdxFallback`?bz:e.name===`wikiLink`?Wz:e.name===`wikiLinkEmbed`?Xz:e.name===`link`?EA:e.name===`mathInline`?gM:e.name===`tag`?Rz:e),Tz.configure({itemsSources:[()=>lT,sT,cT],categoryLabels:{content:`Components`,layout:`Layout`,media:`Media`,data:`Data`}}),ZS.configure({onDrop(e,t,n){for(let r of t)xC(r,e,n)},onPaste(e,t,n){for(let n of t)xC(n,e,e.state.selection.from)}}),ok,Mz,ak,rk,mT,Dz,QS,bT,Dj,rt.create({name:`chunkWrapperDecoration`,addProseMirrorPlugins(){return[ET()]}})];function Qz(e){return e===k}var $z=3e4,eB=class extends Error{docName;elapsedMs;constructor(e,t){super(`Sync timed out for "${e}" after ${t}ms`),this.name=`SyncTimeoutError`,this.docName=e,this.elapsedMs=t}},tB=class extends Error{docName;constructor(e){super(`Provider disconnected before sync for "${e}"`),this.name=`PreSyncDisconnectError`,this.docName=e}},nB=class extends Error{docName;constructor(e){super(`Document not found: "${e}"`),this.name=`DocumentNotFoundError`,this.docName=e}},rB=class extends Error{docName;cause;constructor(e,t){let n=t instanceof Error?t.message:String(t??`unknown`);super(`Bridge setup failed for "${e}": ${n}`),this.name=`BridgeSetupError`,this.docName=e,this.cause=t}},iB=class extends Error{docName;missingCapability;constructor(e,t){super(`Server is missing capability "${t}" required to open "${e}".`),this.name=`ServerCapabilityMismatchError`,this.docName=e,this.missingCapability=t}},aB=new Map,oB=!1;function sB(){for(let e of aB.values())if(!e.settled)return!0;return!1}function cB(){typeof document>`u`||document.visibilityState===`visible`&&lB(Date.now())}function lB(e){let t=[];for(let[n,r]of aB){if(r.settled)continue;let i=e-r.createdAt;if(i<3e4)continue;r.settled=!0;let a=new eB(n,i);pB(r),r.reject(a),t.push({docName:n,elapsedMs:i})}if(t.length>0){let e=t.map(e=>`${e.docName} (${e.elapsedMs}ms)`).join(`, `);console.warn(`[syncPromise] reaped ${t.length} timed-out ${t.length===1?`entry`:`entries`} on visibility restore (tab-sleep recovered): ${e}`)}return sB()||dB(),t.length}function uB(){oB||typeof document>`u`||(document.addEventListener(`visibilitychange`,cB),oB=!0)}function dB(){oB&&(typeof document>`u`||(document.removeEventListener(`visibilitychange`,cB),oB=!1))}var fB=new Map;function pB(e){e.detached||(e.detached=!0,e.timeoutHandle!==null&&clearTimeout(e.timeoutHandle),e.provider.off(`synced`,e.onSynced),e.provider.off(`close`,e.onClose))}function mB(e,t){let n=aB.get(e);if(n)return n.promise;let r=fB.get(e);if(r!==void 0){fB.delete(e);let n=r===`timeout`?new eB(e,0):new tB(e);console.warn(`[syncPromise] ${e} rejected on creation (test hook, armed ${r}): ${n.message}`),X(`ok/sync/create`,{docName:e,warm:!1,armed:r}),X(`ok/sync/reject`,{docName:e,reason:`armed-${r}`});let i=gB(n);return aB.set(e,_B(i,t)),i}if(t.synced){console.log(`[syncPromise] ${e} resolved synchronously (warm provider)`),X(`ok/sync/create`,{docName:e,warm:!0}),X(`ok/sync/resolve`,{docName:e,elapsedMs:0,warm:!0});let n=Promise.resolve();return aB.set(e,hB(n,t)),n}let i=Date.now(),a=()=>{},o=()=>{},s=new Promise((e,t)=>{a=e,o=t}),c=()=>{let t=aB.get(e);if(!t||t.settled)return;t.settled=!0;let n=Date.now()-t.createdAt;console.log(`[syncPromise] ${e} resolved in ${n}ms`),X(`ok/sync/resolve`,{docName:e,elapsedMs:n,warm:!1}),pB(t),sB()||dB(),t.resolve()},l=t=>{let n=aB.get(e);if(!n||n.settled)return;n.settled=!0;let r=new tB(e);console.warn(`[syncPromise] ${e} rejected: ${r.message}`),X(`ok/sync/reject`,{docName:e,reason:`pre-sync-disconnect`}),pB(n),sB()||dB(),n.reject(r)},u=setTimeout(()=>{let t=aB.get(e);if(!t||t.settled)return;t.settled=!0;let n=Date.now()-t.createdAt,r=new eB(e,n);console.warn(`[syncPromise] ${e} rejected: ${r.message}`),X(`ok/sync/reject`,{docName:e,reason:`timeout`,elapsedMs:n}),pB(t),sB()||dB(),t.reject(r)},$z),d={promise:s,resolve:a,reject:o,createdAt:i,timeoutHandle:u,provider:t,onSynced:c,onClose:l,settled:!1,detached:!1};return aB.set(e,d),t.on(`synced`,c),t.on(`close`,l),uB(),X(`ok/sync/create`,{docName:e,warm:!1}),s}function hB(e,t){return{promise:e,resolve:()=>{},reject:()=>{},createdAt:Date.now(),timeoutHandle:null,provider:t,onSynced:()=>{},onClose:()=>{},settled:!0,detached:!0}}function gB(e){let t=Promise.reject(e);t.catch(()=>{});let n=t;return n.status=`rejected`,n.reason=e,n}function _B(e,t){return{promise:e,resolve:()=>{},reject:()=>{},createdAt:Date.now(),timeoutHandle:null,provider:t,onSynced:()=>{},onClose:()=>{},settled:!0,detached:!0}}function vB(e){let t=aB.get(e);t&&(t.settled=!0,pB(t),aB.delete(e),sB()||dB())}function yB(e,t){let n=aB.get(e);return!n||n.settled?!1:(n.settled=!0,console.warn(`[syncPromise] ${e} rejected: ${t.message}`),pB(n),sB()||dB(),n.reject(t),!0)}var bB=Object.freeze({kind:`tab-replay`}),xB=Object.freeze({kind:`idle`});function SB(e,t){return()=>{}}var CB=bt(Zz),wB=4e3,TB=1e4,EB=class extends Error{constructor(e,t){super(`client persistence clearData timed out for ${e} after ${t}ms`),this.docName=e,this.timeoutMs=t,this.name=`ClientPersistenceClearTimeoutError`}},DB=`ok-last-observed-branch`,OB=5e3,kB=1*1024*1024,AB=Xv(`MAX_POOL`,10);function jB(e,t,n=null){let r={};if(e!==null&&(r.principalId=e.principalId,r.tabSessionId=e.tabSessionId),t!==null&&t.length>0&&(r.expectedServerInstanceId=t),n!==null&&n.length>0&&(r.expectedBranch=n),Object.keys(r).length!==0)return JSON.stringify(r)}var MB=class{_entries=new Map;get entries(){return this._entries}lruOrder=[];activeDocName=null;maxSize;wsUrl;recycleDebounceMs;clearDataTimeoutMs;onChange=null;tabIdentity=null;serverRestartRecoveryState=xB;cachedServerInstanceId=null;pendingServerInstanceKnown=null;recoveryMismatchStaleClaim;bufferedUpdates=new Map;persistenceFactory;storage;constructor(e,t,n){this.maxSize=e,this.wsUrl=t,this.recycleDebounceMs=n?.recycleDebounceMs??wB,this.clearDataTimeoutMs=n?.clearDataTimeoutMs??TB,this.persistenceFactory=n?.persistenceFactory??GS,n?.storage===void 0?this.storage=globalThis.localStorage===void 0?null:globalThis.localStorage:this.storage=n.storage}setTabIdentity(e){this.tabIdentity=e}setExpectedServerInstanceId(e){if(this.cachedServerInstanceId=e,!(e===null||e.length===0)){if(this.pendingServerInstanceKnown!==null){let t=this.pendingServerInstanceKnown;this.pendingServerInstanceKnown=null,t.resolve(e)}this.attachDeferredPersistence(e)}}whenServerInstanceKnown(){if(this.cachedServerInstanceId!==null&&this.cachedServerInstanceId.length>0)return Promise.resolve(this.cachedServerInstanceId);if(this.pendingServerInstanceKnown!==null)return this.pendingServerInstanceKnown.promise;let e,t=new Promise(t=>{e=t});return this.pendingServerInstanceKnown={promise:t,resolve:e},t}buildPersistence(e,t,n){return this.persistenceFactory({branch:this.getOrInitObservedBranch()??`_unknown_`,serverInstanceId:e,docName:t,doc:n})}attachDeferredPersistence(e){for(let t of this._entries.values())if(t.kind===`active`&&t.persistence===null)try{t.persistence=this.buildPersistence(e,t.docName,t.provider.document)}catch(e){let n=e instanceof Error?e.name:`non-error-throw`;this.emitStructuredClientRecoveryEvent({event:`ok-client-persistence-attach-failed`,...this.recoveryTelemetryBase(t.docName),errorName:n,errorMessage:e instanceof Error?e.message:String(e)})}}getServerRestartRecoveryState(){return this.serverRestartRecoveryState}observeDiskAck(e,t){let n=this.entries.get(e);!n||n.kind!==`active`||(n.lastDiskAckedSV=JS(n.lastDiskAckedSV,t))}observeDiskAckBatch(e){for(let[t,n]of Object.entries(e))this.observeDiskAck(t,n)}lastObservedBranch=null;lastObservedBranchInitialized=!1;getOrInitObservedBranch(){if(this.lastObservedBranchInitialized)return this.lastObservedBranch;this.lastObservedBranchInitialized=!0;try{let e=this.storage?.getItem(DB)??null;e!==null&&e.length>0&&(this.lastObservedBranch=e)}catch{}return this.lastObservedBranch}persistObservedBranch(e){this.lastObservedBranch=e,this.lastObservedBranchInitialized=!0;try{e===null||e.length===0?this.storage?.removeItem(DB):this.storage?.setItem(DB,e)}catch{}}withClearDataTimeout(e,t){return new Promise((n,r)=>{let i=setTimeout(()=>{r(new EB(e,this.clearDataTimeoutMs))},this.clearDataTimeoutMs);t.then(()=>{clearTimeout(i),n()},e=>{clearTimeout(i),r(e)})})}recoveryTelemetryBase(e,t){let n={docName:e,branch:this.getOrInitObservedBranch()??`_unknown_`},r=t===void 0?this.recoveryMismatchStaleClaim:t;return r!==void 0&&r.length>0&&(n.serverInstanceId=r),n}emitStructuredClientRecoveryEvent(e){console.warn(JSON.stringify(e))}clearRecoveryMismatchStaleClaimIfTerminal(){let e=this.serverRestartRecoveryState.kind;(e===`idle`||e===`failed`)&&(this.recoveryMismatchStaleClaim=void 0)}beginServerRestartRecovery(e,t){this.serverRestartRecoveryState={kind:`recovering`,phase:`clearing-local-cache`,docNames:e,failedDocNames:[],startedAt:t};for(let t of e)vB(t);this.notify()}enterServerRestartReconnect(e,t,n,r){if(e.length===0){this.serverRestartRecoveryState=t.length===0?xB:{kind:`failed`,reason:r,docNames:t,failedDocNames:t,startedAt:n},this.clearRecoveryMismatchStaleClaimIfTerminal(),this.notify();return}this.serverRestartRecoveryState={kind:`recovering`,phase:`reconnecting`,docNames:e,failedDocNames:t,startedAt:n,...t.length>0?{clearFailureReason:r}:{}},this.notify()}markServerRestartRecoverySynced(e){let t=this.serverRestartRecoveryState;if(t.kind!==`recovering`||t.phase!==`reconnecting`||!t.docNames.includes(e))return;let n=t.docNames.filter(t=>t!==e);if(n.length>0){this.serverRestartRecoveryState={...t,docNames:n};return}if(t.failedDocNames.length>0){this.serverRestartRecoveryState={kind:`failed`,reason:t.clearFailureReason??`clear-data-failed`,docNames:t.failedDocNames,failedDocNames:t.failedDocNames,startedAt:t.startedAt},this.clearRecoveryMismatchStaleClaimIfTerminal();return}this.serverRestartRecoveryState=xB,this.clearRecoveryMismatchStaleClaimIfTerminal()}setObservedBranch(e){this.persistObservedBranch(e)}compareAndUpdateObservedBranch(e){let t=this.getOrInitObservedBranch();return this.persistObservedBranch(e),t!==null&&t!==e}onBranchMismatch=null;branchMismatchInFlight=null;mismatchInFlight=null;setOnBranchMismatch(e){if(e===null){this.onBranchMismatch=null;return}this.onBranchMismatch=()=>{if(this.branchMismatchInFlight!==null)return;let t=Promise.resolve().then(e).finally(()=>{this.branchMismatchInFlight===t&&(this.branchMismatchInFlight=null)});this.branchMismatchInFlight=t}}setOnChange(e){this.onChange=e}notify(){this.onChange?.()}evictListeners=new Set;onEvict(e){return this.evictListeners.add(e),()=>{this.evictListeners.delete(e)}}fireEvict(e){for(let t of this.evictListeners)try{t(e)}catch(t){console.warn(`[ProviderPool] evict listener threw for ${e}:`,t)}}touch(e){let t=this.lruOrder.indexOf(e);t!==-1&&this.lruOrder.splice(t,1),this.lruOrder.push(e)}open(e){if(Qz(e))return null;let t=this.entries.get(e);if(t)return t.lastAccessedAt=Date.now(),this.touch(e),this.notify(),t;this.entries.size>=this.maxSize&&this.evictLru();let n=this.cachedServerInstanceId,r=jB(this.tabIdentity,n,this.getOrInitObservedBranch()),i=new yS({url:YS(this.wsUrl),name:e,forceSyncInterval:OB,...r===void 0?{}:{token:r}}),a=this.cachedServerInstanceId,o={kind:`active`,provider:i,persistence:a!==null&&a.length>0?this.buildPersistence(a,e,i.document):null,lastServerSyncedSV:null,lastDiskAckedSV:null,observerCleanup:null,observerFireCounterCleanup:SB(i.document,e),syncState:`connecting`,docName:e,lastAccessedAt:Date.now(),hasSynced:!1,pendingRecycleTimer:null,bridgeSetupFailed:!1};if(i.on(`status`,({status:t})=>{o.kind!==`active`||this.entries.get(e)!==o||t===`disconnected`&&(o.syncState=`disconnected`,this.notify())}),i.on(`synced`,()=>{if(!(o.kind!==`active`||this.entries.get(e)!==o)&&(o.syncState=`synced`,o.hasSynced=!0,o.lastServerSyncedSV=KS(i.document),o.pendingRecycleTimer&&=(clearTimeout(o.pendingRecycleTimer),null),this.markServerRestartRecoverySynced(e),this.notify(),!o.observerCleanup))try{let t=i.document,n=new de({extensions:Zz});o.observerCleanup=Mj({doc:t,xmlFragment:t.getXmlFragment(`default`),ytext:t.getText(`source`),mdManager:n,schema:CB,onSyncError:(t,n)=>{console.warn(`[Sync] ${t} failed for ${e}:`,n.message)}})}catch(t){console.error(`[ProviderPool] setupObservers init failed for ${e}:`,t),o.bridgeSetupFailed=!0,yB(e,new rB(e,t))}}),i.on(`disconnect`,()=>{o.kind!==`active`||this.entries.get(e)!==o||(o.syncState=`disconnected`,this.notify(),o.hasSynced&&i.unsyncedChanges===0&&!o.pendingRecycleTimer&&(o.pendingRecycleTimer=setTimeout(()=>{o.kind===`active`&&(o.pendingRecycleTimer=null,this.entries.get(e)===o&&this.recycleDisconnectedEntry(e))},this.recycleDebounceMs)))}),i.on(`authenticationFailed`,({reason:e})=>{if(![`server-instance-mismatch`,`branch-mismatch`].includes(e)){console.warn(JSON.stringify({event:`ok-auth-failed-unknown-reason`,reason:e}));return}let t=e;if(t===`server-instance-mismatch`){if(n===null||this.cachedServerInstanceId!==n)return;let e=n;this.cachedServerInstanceId=null,this.handleServerInstanceMismatch(e);return}if(t===`branch-mismatch`){this.onBranchMismatch?.();return}}),this.bufferedUpdates.get(e)!==void 0){let t=this.recoveryMismatchStaleClaim,n=()=>{if(i.off(`synced`,n),o.kind!==`active`||this.entries.get(e)!==o)return;let r=this.bufferedUpdates.get(e);if(r!==void 0){this.bufferedUpdates.delete(e);try{Sp(i.document,r,bB)}catch(n){let i=n instanceof Error?n.name:`non-error-throw`;this.emitStructuredClientRecoveryEvent({event:`ok-buffer-replay-failed`,...this.recoveryTelemetryBase(e,t),replayByteLength:r.byteLength,errorName:i,errorMessage:n instanceof Error?n.message:String(n)})}}};i.on(`synced`,n)}return this._entries.set(e,o),this.touch(e),this.notify(),o}handleServerInstanceMismatch(e){this.recoveryMismatchStaleClaim=e.length>0?e:void 0;let t=Array.from(this.entries.entries()),n=Date.now(),r=this.activeDocName,i=r!==null&&t.some(([e,t])=>e===r&&t.kind===`active`)?[r]:[],a=r??t.find(([,e])=>e.kind===`active`)?.[0]??``;a.length>0&&this.emitStructuredClientRecoveryEvent({event:`ok-client-cache-epoch-mismatch`,...this.recoveryTelemetryBase(a)}),this.beginServerRestartRecovery(i,n);for(let[e,n]of t)n.kind===`active`&&!i.includes(e)&&vB(e);for(let[e,n]of t){if(n.kind!==`active`)continue;let t=n.lastDiskAckedSV??n.lastServerSyncedSV;if(t===null){this.emitStructuredClientRecoveryEvent({event:`ok-buffer-replay-skipped-no-baseline`,...this.recoveryTelemetryBase(e),reason:`no-disk-ack-or-server-sync-vector`});continue}let r=qS(n.provider.document,t);if(r.byteLength>kB){X(`ok/pool/buffer-overflow`,{docName:e,bytes:r.byteLength});continue}r.byteLength>0&&this.bufferedUpdates.set(e,r)}let o=[];for(let[e,n]of t)n.kind===`active`&&n.persistence!==null&&o.push({docName:e,promise:this.withClearDataTimeout(e,n.persistence.clearData())});let s=Promise.allSettled(o.map(e=>e.promise)).then(e=>{let t=[],i=[],a=!1;e.forEach((e,n)=>{let r=o[n];if(!r)return;let s=r.docName;if(e.status===`rejected`){t.push(s);let n=e.reason instanceof EB;if(n&&(a=!0),n)this.emitStructuredClientRecoveryEvent({event:`ok-client-cache-clear-failed`,...this.recoveryTelemetryBase(s),failureKind:`timeout`});else{let t=e.reason instanceof Error?e.reason.name:`unknown`;this.emitStructuredClientRecoveryEvent({event:`ok-client-cache-clear-failed`,...this.recoveryTelemetryBase(s),failureKind:`rejected`,errorName:t,errorMessage:e.reason instanceof Error?e.reason.message:String(e.reason)})}}else i.push(s)});let s=i.filter(e=>e===r);if(t.length>0){let e=a?`clear-data-timeout`:`clear-data-failed`;console.warn(JSON.stringify({event:`ok-mismatch-recycle-partial-clears-failed`,failedDocs:t,clearedDocs:i})),this.enterServerRestartReconnect(s,t,n,e);for(let e of i)this.recycleDisconnectedEntry(e);return}this.enterServerRestartReconnect(s,[],n,`clear-data-failed`),this.recycleAllEntries()}).finally(()=>{this.mismatchInFlight===s&&(this.mismatchInFlight=null)});this.mismatchInFlight=s}awaitMismatchSettled(){return this.mismatchInFlight??Promise.resolve()}recycleAllEntries(){let e=Array.from(this.entries.keys());for(let t of e)this.recycleDisconnectedEntry(t)}prewarm(e){if(Qz(e))return null;let t=this.entries.get(e);if(t)return t;let n=this.open(e);if(!n)return null;let r=this.lruOrder.indexOf(e);return r!==-1&&(this.lruOrder.splice(r,1),this.lruOrder.unshift(e)),n}close(e){let t=this.entries.get(e);t&&(this.destroyEntry(t),this._entries.delete(e),this.lruOrder=this.lruOrder.filter(t=>t!==e),this.bufferedUpdates.delete(e),this.activeDocName===e&&(this.activeDocName=null),this.notify())}async closeAndClearPersistence(e){let t=this.entries.get(e);if(t?.kind===`active`&&t.persistence!==null){try{await t.persistence.clearData()}catch(t){console.warn(`[ProviderPool] clearData on rename failed for ${e}:`,t)}this.close(e);return}t&&this.close(e);let n=this.getOrInitObservedBranch(),r=this.cachedServerInstanceId;if(n===null||r===null)return;let i=`ok-ydoc:${n}:${r}:${e}`;try{await new Promise((e,t)=>{let n=indexedDB.deleteDatabase(i);n.onsuccess=()=>e(),n.onerror=()=>t(n.error),n.onblocked=()=>{console.warn(`[ProviderPool] IDB delete blocked for ${i}`),t(Error(`idb-clear-blocked: ${i}`))}})}catch(e){console.warn(`[ProviderPool] IDB delete on rename failed for ${i}:`,e)}}clearBufferedUpdates(){this.bufferedUpdates.clear()}__test_seedBufferedUpdate(e,t){this.bufferedUpdates.set(e,t)}__test_bufferedUpdatesSize(){return this.bufferedUpdates.size}__test_hasBufferedUpdate(e){return this.bufferedUpdates.has(e)}__test_getBufferedUpdate(e){return this.bufferedUpdates.get(e)}setActive(e){let t=this.entries.get(e);if(!t)throw Error(`[ProviderPool] Cannot setActive — "${e}" is not open`);t.lastAccessedAt=Date.now(),this.touch(e),this.activeDocName=e,this.notify()}clearActive(){this.activeDocName!==null&&(this.activeDocName=null,this.notify())}getActive(){return this.activeDocName?this.entries.get(this.activeDocName)??null:null}getActiveDocName(){return this.activeDocName}has(e){return this.entries.has(e)}recycle(e){this.recycleDisconnectedEntry(e)}dispose(){for(let e of this._entries.values())this.destroyEntry(e);this._entries.clear(),this.lruOrder=[],this.activeDocName=null,this.onChange=null,this.bufferedUpdates.clear(),this.onBranchMismatch=null,this.branchMismatchInFlight=null,this.evictListeners.clear(),this.serverRestartRecoveryState=xB,this.cachedServerInstanceId=null,this.pendingServerInstanceKnown=null,this.tabIdentity=null,this.recoveryMismatchStaleClaim=void 0}evictLru(){for(let e of this.lruOrder)if(e!==this.activeDocName){X(`ok/pool/evict-lru`,{docName:e}),this.close(e);return}}destroyEntry(e){if(e.kind===`tearing-down`)return;let t=e.observerCleanup,n=e.observerFireCounterCleanup,r=e.persistence,i=e.pendingRecycleTimer,a=e.docName,o=e;o.kind=`tearing-down`,o.persistence=null,o.observerCleanup=null,o.observerFireCounterCleanup=null,o.pendingRecycleTimer=null,i&&clearTimeout(i),vB(a),this.fireEvict(a),t?.(),n?.(),r!==null&&r.destroy().catch(e=>{console.warn(`[ProviderPool] persistence destroy failed for ${a}:`,e)});try{o.provider.destroy()}catch(e){console.warn(`[ProviderPool] Provider destroy failed for ${a}:`,e)}}recycleDisconnectedEntry(e){let t=this.entries.get(e);if(!t||t.kind!==`active`)return;let n=this.activeDocName===e;if(X(`ok/pool/recycle-disconnected`,{docName:e,wasActive:n}),this.destroyEntry(t),this._entries.delete(e),this.lruOrder=this.lruOrder.filter(t=>t!==e),n){this.open(e)&&this.setActive(e);return}this.notify()}},NB=crypto.randomUUID(),PB=!1;function FB(e){PB||(PB=!0,console.warn(`[principal-fetch] failed to resolve principal — falling back to random identity.`,e))}var IB=(0,q.createContext)(null),LB=null;function RB(e){return LB||(LB=new MB(AB,e),wy(LB)),LB}var zB={activeDocName:null,activeProvider:null,syncState:`connecting`,serverRestartRecovery:{kind:`idle`},poolEntries:[]};function BB(){if(typeof window>`u`)return null;let e=window.okDesktop;return e?.config.mode===`editor`?e:null}function VB(){return typeof window>`u`||window.okDesktop?.config.mode===`editor`?null:Py(window.location.origin)}function HB(){if(typeof window>`u`)return[];let e=VB();return e?Fy(window.localStorage===void 0?null:window.localStorage,e,AB).openTabs:[]}function UB(e){let t=e.getActive(),n=[];for(let t of e.entries.values())n.push({docName:t.docName,provider:t.provider,lastAccessedAt:t.lastAccessedAt});return n.sort((e,t)=>t.lastAccessedAt-e.lastAccessedAt),{activeDocName:e.getActiveDocName(),activeProvider:t?.provider??null,syncState:t?.syncState??`connecting`,serverRestartRecovery:e.getServerRestartRecoveryState(),poolEntries:n}}function WB(e){let t=(0,Y.c)(81),{children:n}=e,[r,i]=(0,q.useState)(zB),[a,o]=(0,q.useState)(null),[s,c]=(0,q.useState)(HB),[l,u]=(0,q.useState)(!1),[d,f]=(0,q.useState)(!1),[p,m]=(0,q.useState)(null),[h,g]=(0,q.useState)(null),[_,v]=(0,q.useState)(`doc`),[y,b]=(0,q.useState)(null),[x,S]=(0,q.useState)(0),{collabUrl:C,terminal:w,lastError:T,retry:E}=Gv(),D,O;t[0]!==C||t[1]!==d||t[2]!==l?(D=()=>{if(C===null||l||!d)return;let e=!1,t=BB(),n=VB(),r=typeof localStorage<`u`?localStorage:null;return(t?t.project.getSessionState():Promise.resolve(n?Fy(r,n,AB):{openTabs:[],activeDocName:null,updatedAt:null})).then(t=>{if(e)return;let n=My(t,AB),r=RB(C);for(let e of n.openTabs)r.open(e);c(e=>{let t=n.openTabs;for(let n of e)t=Oy(t,n,AB);return t});let i=Qe(window.location.hash)===null&&window.location.hash.length===0,a=n.activeDocName??n.openTabs[0]??null;i&&a&&(window.location.hash=Ve(a))}).catch(JB).finally(()=>{e||u(!0)}),()=>{e=!0}},O=[C,d,l],t[0]=C,t[1]=d,t[2]=l,t[3]=D,t[4]=O):(D=t[3],O=t[4]),(0,q.useEffect)(D,O);let k,A;t[5]!==s||t[6]!==r.activeDocName||t[7]!==l?(k=()=>{if(!l)return;let e=Ny(s,r.activeDocName),t=BB();if(t){t.project.setSessionState(e).catch(qB);return}let n=VB();n&&Iy(typeof localStorage<`u`?localStorage:null,n,e)},A=[s,r.activeDocName,l],t[5]=s,t[6]=r.activeDocName,t[7]=l,t[8]=k,t[9]=A):(k=t[8],A=t[9]),(0,q.useEffect)(k,A);let j,M;t[10]===C?(j=t[11],M=t[12]):(j=()=>{if(C===null)return;let e=!1;f(!1);let t=RB(C);return i(UB(t)),t.setOnBranchMismatch(()=>kv(t)),t.setOnChange(()=>i(UB(t))),fetch(`/api/principal`).then(KB).then(n=>{if(e)return;let r=pe.safeParse(n);r.success?(t.setTabIdentity({principalId:r.data.id,tabSessionId:NB}),m(r.data)):FB(r.error)}).catch(t=>{e||FB(t)}).finally(()=>{e||f(!0)}),kv(t),()=>{e=!0,t.setOnChange(null)}},M=[C],t[10]=C,t[11]=j,t[12]=M),(0,q.useEffect)(j,M);let N;t[13]===C?N=t[14]:(N=e=>{if(X(`ok/nav/open-document`,{docName:e,transition:!1}),C===null)return;let t=RB(C);t.open(e)&&(c(t=>Oy(t,e,AB)),t.setActive(e),o({kind:`doc`,target:e,docName:e}))},t[13]=C,t[14]=N);let P=N,F;t[15]===P?F=t[16]:(F=e=>{X(`ok/nav/open-document`,{docName:e,transition:!1}),P(e)},t[15]=P,t[16]=F);let I=F,L;t[17]===C?L=t[18]:(L=e=>{if(C===null)return;let t=RB(C),n=qe(e);if(n){if(!t.open(n))return;c(e=>Oy(e,n,AB)),t.setActive(n)}else t.clearActive();o(e)},t[17]=C,t[18]=L);let R=L,z;t[19]===R?z=t[20]:(z=e=>{X(`ok/nav/open-target`,{docName:qe(e),kind:e.kind,transition:!1}),R(e)},t[19]=R,t[20]=z);let B=z,V,H;t[21]===C?(V=t[22],H=t[23]):(V=()=>{if(C===null){o(null);return}RB(C).clearActive(),o(null)},H=e=>{C!==null&&(RB(C).close(e),c(t=>ky(t,e)),o(t=>t&&(qe(t)===e?null:t)))},t[21]=C,t[22]=V,t[23]=H);let U;t[24]!==C||t[25]!==r.activeDocName?(U=e=>{let t=null;if(C!==null&&RB(C).close(e),c(n=>(t=jy(n,r.activeDocName,e),ky(n,e))),r.activeDocName===e){if(t){window.location.hash=Ve(t);return}C!==null&&RB(C).clearActive(),o(null),window.location.hash=``}},t[24]=C,t[25]=r.activeDocName,t[26]=U):U=t[26];let W;t[27]!==C||t[28]!==s?(W=e=>{let t=Ay(s,e,AB);if(C!==null){let e=RB(C);for(let n of t)e.open(n)}c(t)},t[27]=C,t[28]=s,t[29]=W):W=t[29];let ee,te,ne;t[30]===C?(ee=t[31],te=t[32],ne=t[33]):(ee=async e=>{C!==null&&(await RB(C).closeAndClearPersistence(e),o(t=>t&&(qe(t)===e?null:t)))},te=e=>{C!==null&&RB(C).recycle(e)},ne=e=>{C!==null&&RB(C).prewarm(e)},t[30]=C,t[31]=ee,t[32]=te,t[33]=ne);let re,ie,ae,oe,se;t[34]===C?(re=t[35],ie=t[36],ae=t[37],oe=t[38],se=t[39]):(re=e=>{C!==null&&RB(C).setExpectedServerInstanceId(e)},ie=async e=>{if(C===null)return;let t=RB(C);t.setObservedBranch(e),await Ev(t,e)},ae=async e=>{if(C===null)return;let t=RB(C);t.compareAndUpdateObservedBranch(e)&&await Ev(t,e)},oe=(e,t)=>{C!==null&&RB(C).observeDiskAck(e,t)},se=async()=>{C!==null&&await kv(RB(C))},t[34]=C,t[35]=re,t[36]=ie,t[37]=ae,t[38]=oe,t[39]=se);let ce;t[40]!==y||t[41]!==_?(ce=e=>{if(_===`agent`&&y===e){v(`doc`);return}b(e),v(`agent`),S(GB)},t[40]=y,t[41]=_,t[42]=ce):ce=t[42];let le;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(le=()=>{v(`doc`),b(null)},t[43]=le):le=t[43];let ue;t[44]!==a||t[45]!==T||t[46]!==w||t[47]!==C||t[48]!==y||t[49]!==x||t[50]!==_||t[51]!==P||t[52]!==I||t[53]!==s||t[54]!==R||t[55]!==B||t[56]!==p||t[57]!==E||t[58]!==r.activeDocName||t[59]!==r.activeProvider||t[60]!==r.poolEntries||t[61]!==r.serverRestartRecovery||t[62]!==r.syncState||t[63]!==h||t[64]!==V||t[65]!==H||t[66]!==U||t[67]!==W||t[68]!==ee||t[69]!==te||t[70]!==ne||t[71]!==re||t[72]!==ie||t[73]!==ae||t[74]!==oe||t[75]!==se||t[76]!==ce?(ue={principal:p,activeTarget:a,activeDocName:r.activeDocName,activeProvider:r.activeProvider,openTabs:s,syncState:r.syncState,serverRestartRecovery:r.serverRestartRecovery,poolEntries:r.poolEntries,openDocument:P,openDocumentTransition:I,openTarget:R,openTargetTransition:B,clearTarget:V,closeDocument:H,closeTab:U,remapTabsForRename:W,closeAndClearForRename:ee,recycleDocument:te,prewarm:ne,systemProvider:h,setSystemProvider:g,updateServerInstanceId:re,onBranchSwitched:ie,observeBranch:ae,observeDiskAck:oe,refreshServerInfo:se,collabUrl:C,collabTerminal:w,collabLastError:T,retryCollab:E,docPanelMode:_,docPanelAgentId:y,docPanelExpandSignal:x,openActivityPanel:ce,closeActivityPanel:le},t[44]=a,t[45]=T,t[46]=w,t[47]=C,t[48]=y,t[49]=x,t[50]=_,t[51]=P,t[52]=I,t[53]=s,t[54]=R,t[55]=B,t[56]=p,t[57]=E,t[58]=r.activeDocName,t[59]=r.activeProvider,t[60]=r.poolEntries,t[61]=r.serverRestartRecovery,t[62]=r.syncState,t[63]=h,t[64]=V,t[65]=H,t[66]=U,t[67]=W,t[68]=ee,t[69]=te,t[70]=ne,t[71]=re,t[72]=ie,t[73]=ae,t[74]=oe,t[75]=se,t[76]=ce,t[77]=ue):ue=t[77];let de=ue,fe;return t[78]!==n||t[79]!==de?(fe=(0,J.jsx)(IB,{value:de,children:n}),t[78]=n,t[79]=de,t[80]=fe):fe=t[80],fe}function GB(e){return e+1}function KB(e){return e.ok?e.json():Promise.reject(Error(`HTTP ${e.status}`))}function qB(e){console.warn(`[editor-tabs] failed to persist tab session:`,e)}function JB(e){console.warn(`[editor-tabs] failed to restore tab session:`,e)}function YB(){let e=(0,q.use)(IB);if(!e)throw Error(`useDocumentContext must be used within <DocumentProvider />`);return e}function XB(){let e=(0,Y.c)(3),{openDocumentTransition:t,openTargetTransition:n}=YB(),r;return e[0]!==t||e[1]!==n?(r={openDocumentTransition:t,openTargetTransition:n},e[0]=t,e[1]=n,e[2]=r):r=e[2],r}export{py as $,cr as $t,RA as A,bi as At,WO as B,kr as Bt,jj as C,Xs as Ct,qA as D,X as Dt,$A as E,Wo as Et,Lk as F,Ir as Ft,NT as G,Cr as Gt,FO as H,Dr as Ht,Fk as I,Fr as It,pC as J,gr as Jt,gT as K,Sr as Kt,Ok as L,Pr as Lt,NA as M,Hr as Mt,MA as N,Vr as Nt,LA as O,Vo as Ot,kA as P,Br as Pt,ly as Q,dr as Qt,Dk as R,Nr as Rt,Ij as S,Fc as St,hj as T,$s as Tt,LD as U,Er as Ut,LO as V,Or as Vt,ID as W,Tr as Wt,yS as X,pr as Xt,eC as Y,hr as Yt,fy as Z,fr as Zt,sz as _,Hp as _t,nB as a,Cv as at,dR as b,Yu as bt,eB as c,fv as ct,Qz as d,op as dt,sr as en,uy as et,Zz as f,wm as ft,oz as g,qp as gt,cz as h,Up as ht,rB as i,Dv as it,jA as j,Jr as jt,zA as k,Ro as kt,vB as l,G_ as lt,Az as m,Yp as mt,YB as n,Xv as nt,tB as o,xv as ot,kz as p,Xp as pt,Yw as q,br as qt,XB as r,Lv as rt,iB as s,dv as st,WB as t,or as tn,xy as tt,mB as u,zg as ut,wR as v,_f as vt,Aj as w,tc as wt,_M as x,Ic as xt,xR as y,vf as yt,hk as z,jr as zt};
|